@empathyco/x-components 3.0.0-alpha.30 → 3.0.0-alpha.34

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 (671) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/core/index.js +3 -0
  3. package/core/index.js.map +1 -1
  4. package/design-system/default-theme.css +6 -1
  5. package/design-system/full-theme.css +6 -1
  6. package/design-system/list-default.css +3 -0
  7. package/design-system/suggestion-default.css +3 -1
  8. package/docs/API-reference/api/x-adapter.empathyrelatedtag.md +1 -0
  9. package/docs/API-reference/api/x-adapter.empathyrelatedtag.source.md +11 -0
  10. package/docs/API-reference/api/x-components.defaultsessionservice.clearsessionid.md +2 -0
  11. package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +4 -0
  12. package/docs/API-reference/api/x-components.defaultsessionservice.md +3 -3
  13. package/docs/API-reference/api/x-components.defaultsessionservice.session_id_key.md +3 -1
  14. package/docs/API-reference/api/x-components.featurelocation.md +1 -1
  15. package/docs/API-reference/api/x-components.globalxbus.created.md +15 -0
  16. package/docs/API-reference/api/x-components.globalxbus.md +21 -0
  17. package/docs/API-reference/api/x-components.identifierresultsactions.md +0 -1
  18. package/docs/API-reference/api/x-components.identifierresultsmutations.md +1 -0
  19. package/docs/API-reference/api/x-components.identifierresultsmutations.setparams.md +24 -0
  20. package/docs/API-reference/api/x-components.identifierresultsstate.md +1 -0
  21. package/docs/API-reference/api/x-components.identifierresultsstate.params.md +13 -0
  22. package/docs/API-reference/api/x-components.md +8 -0
  23. package/docs/API-reference/api/x-components.relatedtag.highlightcurated.md +13 -0
  24. package/docs/API-reference/api/x-components.relatedtag.md +1 -0
  25. package/docs/API-reference/api/x-components.relatedtags.highlightcurated.md +13 -0
  26. package/docs/API-reference/api/x-components.setconsent.md +1 -1
  27. package/docs/API-reference/api/x-components.setidentifierresultsextraparams.md +13 -0
  28. package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +1 -1
  29. package/docs/API-reference/api/x-components.setsessionduration.md +1 -1
  30. package/docs/API-reference/api/x-components.snippetcallbacks.md +15 -0
  31. package/docs/API-reference/api/x-components.snippetconfig.callbacks.md +13 -0
  32. package/docs/API-reference/api/x-components.snippetconfig.isspa.md +13 -0
  33. package/docs/API-reference/api/x-components.snippetconfig.md +2 -0
  34. package/docs/API-reference/api/x-components.tagging.activeconsent.md +18 -0
  35. package/docs/API-reference/api/x-components.tagging.consent.md +13 -0
  36. package/docs/API-reference/api/x-components.tagging.md +28 -0
  37. package/docs/API-reference/api/x-components.tagging.render.md +15 -0
  38. package/docs/API-reference/api/x-components.taggingactions.md +7 -0
  39. package/docs/API-reference/api/x-components.taggingactions.track.md +24 -0
  40. package/docs/API-reference/api/x-components.tagicon.md +11 -0
  41. package/docs/API-reference/api/x-components.track.md +13 -0
  42. package/docs/API-reference/api/x-components.trackwire.md +13 -0
  43. package/docs/API-reference/api/x-components.xeventlisteners.md +17 -0
  44. package/docs/API-reference/api/x-components.xeventstypes.md +1 -0
  45. package/docs/API-reference/api/x-components.xeventstypes.snippetcallbackexecuted.md +16 -0
  46. package/docs/API-reference/api/x-types.relatedtag.iscurated.md +13 -0
  47. package/docs/API-reference/api/x-types.relatedtag.md +1 -0
  48. package/docs/API-reference/components/common/animations/x-components.animate-width.md +5 -6
  49. package/docs/API-reference/components/common/animations/x-components.collapse-from-top.md +6 -7
  50. package/docs/API-reference/components/common/animations/x-components.collapse-height.md +7 -8
  51. package/docs/API-reference/components/common/animations/x-components.collapse-width.md +7 -8
  52. package/docs/API-reference/components/common/animations/x-components.cross-fade.md +6 -7
  53. package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +6 -7
  54. package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +7 -8
  55. package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +6 -7
  56. package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +6 -7
  57. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +7 -8
  58. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +6 -7
  59. package/docs/API-reference/components/common/currency/x-components.base-currency.md +7 -8
  60. package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +7 -8
  61. package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +7 -8
  62. package/docs/API-reference/components/common/icons/x-components.arrow.md +3 -4
  63. package/docs/API-reference/components/common/icons/x-components.bag.md +3 -4
  64. package/docs/API-reference/components/common/icons/x-components.bar-code.md +4 -5
  65. package/docs/API-reference/components/common/icons/x-components.barcode-tiny.md +4 -5
  66. package/docs/API-reference/components/common/icons/x-components.cart.md +3 -4
  67. package/docs/API-reference/components/common/icons/x-components.check-tiny.md +4 -5
  68. package/docs/API-reference/components/common/icons/x-components.check.md +3 -4
  69. package/docs/API-reference/components/common/icons/x-components.checkbox-card-selected.md +4 -5
  70. package/docs/API-reference/components/common/icons/x-components.checkbox-card-unselected.md +4 -5
  71. package/docs/API-reference/components/common/icons/x-components.checkbox-selected.md +4 -5
  72. package/docs/API-reference/components/common/icons/x-components.checkbox-unselected.md +4 -5
  73. package/docs/API-reference/components/common/icons/x-components.chevron-down.md +4 -5
  74. package/docs/API-reference/components/common/icons/x-components.chevron-left.md +4 -5
  75. package/docs/API-reference/components/common/icons/x-components.chevron-right.md +4 -5
  76. package/docs/API-reference/components/common/icons/x-components.chevron-tiny-down.md +4 -5
  77. package/docs/API-reference/components/common/icons/x-components.chevron-tiny-left.md +4 -5
  78. package/docs/API-reference/components/common/icons/x-components.chevron-tiny-right.md +4 -5
  79. package/docs/API-reference/components/common/icons/x-components.chevron-tiny-up.md +4 -5
  80. package/docs/API-reference/components/common/icons/x-components.chevron-up.md +4 -5
  81. package/docs/API-reference/components/common/icons/x-components.cross-tiny.md +4 -5
  82. package/docs/API-reference/components/common/icons/x-components.cross.md +3 -4
  83. package/docs/API-reference/components/common/icons/x-components.filters.md +3 -4
  84. package/docs/API-reference/components/common/icons/x-components.grid-1-col.md +4 -5
  85. package/docs/API-reference/components/common/icons/x-components.grid-2-col.md +4 -5
  86. package/docs/API-reference/components/common/icons/x-components.hide.md +3 -4
  87. package/docs/API-reference/components/common/icons/x-components.history-tiny.md +4 -5
  88. package/docs/API-reference/components/common/icons/x-components.history.md +3 -4
  89. package/docs/API-reference/components/common/icons/x-components.menu.md +3 -4
  90. package/docs/API-reference/components/common/icons/x-components.minus-tiny.md +4 -5
  91. package/docs/API-reference/components/common/icons/x-components.minus.md +3 -4
  92. package/docs/API-reference/components/common/icons/x-components.nq-1.md +4 -5
  93. package/docs/API-reference/components/common/icons/x-components.nq-2.md +4 -5
  94. package/docs/API-reference/components/common/icons/x-components.nq-3.md +4 -5
  95. package/docs/API-reference/components/common/icons/x-components.nq-4.md +4 -5
  96. package/docs/API-reference/components/common/icons/x-components.plus.md +3 -4
  97. package/docs/API-reference/components/common/icons/x-components.search-tiny.md +4 -5
  98. package/docs/API-reference/components/common/icons/x-components.search.md +3 -4
  99. package/docs/API-reference/components/common/icons/x-components.show.md +3 -4
  100. package/docs/API-reference/components/common/icons/x-components.star.md +3 -4
  101. package/docs/API-reference/components/common/icons/x-components.tag.md +7 -0
  102. package/docs/API-reference/components/common/icons/x-components.trash-open.md +4 -5
  103. package/docs/API-reference/components/common/icons/x-components.trash.md +3 -4
  104. package/docs/API-reference/components/common/icons/x-components.trending-tiny.md +4 -5
  105. package/docs/API-reference/components/common/icons/x-components.trending.md +3 -4
  106. package/docs/API-reference/components/common/icons/x-components.user.md +3 -4
  107. package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +6 -7
  108. package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +6 -7
  109. package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +6 -5
  110. package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +7 -8
  111. package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +7 -8
  112. package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +12 -13
  113. package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +7 -8
  114. package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +7 -8
  115. package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +9 -10
  116. package/docs/API-reference/components/common/modals/x-components.base-modal.md +6 -7
  117. package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +7 -8
  118. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +8 -9
  119. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +8 -9
  120. package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +6 -7
  121. package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +7 -8
  122. package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +7 -8
  123. package/docs/API-reference/components/common/result/x-components.base-result-fallback-image.md +4 -5
  124. package/docs/API-reference/components/common/result/x-components.base-result-image.md +6 -7
  125. package/docs/API-reference/components/common/result/x-components.base-result-link.md +5 -6
  126. package/docs/API-reference/components/common/result/x-components.base-result-placeholder-image.md +4 -5
  127. package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +6 -7
  128. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +6 -7
  129. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +7 -8
  130. package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +6 -7
  131. package/docs/API-reference/components/common/x-components.auto-progress-bar.md +5 -6
  132. package/docs/API-reference/components/common/x-components.base-dropdown.md +7 -8
  133. package/docs/API-reference/components/common/x-components.base-event-button.md +9 -10
  134. package/docs/API-reference/components/common/x-components.base-grid.md +11 -12
  135. package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +6 -7
  136. package/docs/API-reference/components/common/x-components.base-rating.md +7 -8
  137. package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +9 -10
  138. package/docs/API-reference/components/common/x-components.global-x-bus.md +50 -0
  139. package/docs/API-reference/components/common/x-components.items-list.md +6 -5
  140. package/docs/API-reference/components/common/x-components.location-provider.md +6 -7
  141. package/docs/API-reference/components/common/x-components.sliding-panel.md +6 -7
  142. package/docs/API-reference/components/common/x-components.snippet-callbacks.md +36 -0
  143. package/docs/API-reference/components/common/x-components.staggering-transition-group.md +6 -7
  144. package/docs/API-reference/components/device/x-components.device-detector.md +8 -9
  145. package/docs/API-reference/components/empathize/x-components.empathize.md +6 -7
  146. package/docs/API-reference/components/extra-params/x-components.extra-params.md +7 -8
  147. package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +7 -8
  148. package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +6 -7
  149. package/docs/API-reference/components/facets/x-components.clear-filters.md +6 -7
  150. package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +9 -10
  151. package/docs/API-reference/components/facets/x-components.facets/facets.md +6 -7
  152. package/docs/API-reference/components/facets/x-components.filters/all-filter.md +10 -11
  153. package/docs/API-reference/components/facets/x-components.filters/base-filter.md +8 -9
  154. package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +7 -8
  155. package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +5 -6
  156. package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +6 -7
  157. package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +9 -10
  158. package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +6 -7
  159. package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +8 -9
  160. package/docs/API-reference/components/facets/x-components.lists/filters-list.md +8 -9
  161. package/docs/API-reference/components/facets/x-components.lists/filters-search.md +6 -7
  162. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +7 -8
  163. package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +7 -8
  164. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +8 -9
  165. package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +6 -7
  166. package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +8 -9
  167. package/docs/API-reference/components/history-queries/x-components.history-queries.md +6 -7
  168. package/docs/API-reference/components/history-queries/x-components.history-query.md +8 -9
  169. package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +8 -9
  170. package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +7 -8
  171. package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +8 -9
  172. package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +7 -8
  173. package/docs/API-reference/components/next-queries/x-components.next-queries.md +10 -11
  174. package/docs/API-reference/components/next-queries/x-components.next-query.md +8 -9
  175. package/docs/API-reference/components/popular-searches/x-components.popular-search.md +8 -9
  176. package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +9 -10
  177. package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +8 -9
  178. package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +8 -9
  179. package/docs/API-reference/components/recommendations/x-components.recommendations.md +10 -11
  180. package/docs/API-reference/components/related-tags/x-components.related-tag.md +19 -17
  181. package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -19
  182. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +7 -8
  183. package/docs/API-reference/components/scroll/x-components.main-scroll.md +7 -8
  184. package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +7 -8
  185. package/docs/API-reference/components/scroll/x-components.scroll.md +7 -8
  186. package/docs/API-reference/components/scroll/x-components.window-scroll.md +8 -9
  187. package/docs/API-reference/components/search/x-components.banner.md +8 -9
  188. package/docs/API-reference/components/search/x-components.banners-list.md +7 -8
  189. package/docs/API-reference/components/search/x-components.partial-query-button.md +8 -9
  190. package/docs/API-reference/components/search/x-components.partial-results-list.md +7 -8
  191. package/docs/API-reference/components/search/x-components.promoted.md +7 -8
  192. package/docs/API-reference/components/search/x-components.promoteds-list.md +7 -8
  193. package/docs/API-reference/components/search/x-components.redirection.md +7 -8
  194. package/docs/API-reference/components/search/x-components.results-list.md +7 -8
  195. package/docs/API-reference/components/search/x-components.sort-dropdown.md +7 -8
  196. package/docs/API-reference/components/search/x-components.sort-list.md +7 -8
  197. package/docs/API-reference/components/search/x-components.spellcheck-button.md +8 -9
  198. package/docs/API-reference/components/search/x-components.spellcheck.md +8 -9
  199. package/docs/API-reference/components/search-box/x-components.clear-search-input.md +6 -7
  200. package/docs/API-reference/components/search-box/x-components.search-button.md +6 -7
  201. package/docs/API-reference/components/search-box/x-components.search-input.md +7 -8
  202. package/docs/API-reference/components/tagging/x-components.tagging.md +8 -5
  203. package/docs/API-reference/components/url/x-components.url-handler.md +7 -8
  204. package/docs/build-search-ui/README.md +108 -0
  205. package/docs/build-search-ui/web-archetype-integration-guide.md +178 -0
  206. package/docs/build-search-ui/web-use-x-components-guide.md +165 -0
  207. package/docs/build-search-ui/web-x-components-integration-guide.md +192 -0
  208. package/docs/build-search-ui/x-architecture/README.md +128 -0
  209. package/identifier-results/index.js +1 -1
  210. package/js/components/animations/animate-width.vue.js +1 -1
  211. package/js/components/animations/collapse-from-top.vue.js +1 -1
  212. package/js/components/animations/collapse-height.vue.js +3 -3
  213. package/js/components/animations/collapse-width.vue.js +3 -3
  214. package/js/components/animations/cross-fade.vue.js +1 -1
  215. package/js/components/animations/fade-and-slide.vue.js +2 -2
  216. package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
  217. package/js/components/animations/translate-from-left.vue.js +1 -1
  218. package/js/components/animations/translate-from-right.vue.js +1 -1
  219. package/js/components/auto-progress-bar.vue.js +4 -5
  220. package/js/components/auto-progress-bar.vue.js.map +1 -1
  221. package/js/components/base-dropdown.vue.js +33 -45
  222. package/js/components/base-dropdown.vue.js.map +1 -1
  223. package/js/components/base-event-button.vue.js +1 -1
  224. package/js/components/base-grid.vue.js +7 -9
  225. package/js/components/base-grid.vue.js.map +1 -1
  226. package/js/components/base-keyboard-navigation.vue.js +7 -10
  227. package/js/components/base-keyboard-navigation.vue.js.map +1 -1
  228. package/js/components/base-rating.vue.js +19 -20
  229. package/js/components/base-rating.vue.js.map +1 -1
  230. package/js/components/base-variable-column-grid.vue.js +6 -7
  231. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  232. package/js/components/column-picker/base-column-picker-dropdown.vue.js +11 -14
  233. package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
  234. package/js/components/column-picker/base-column-picker-list.vue.js +9 -11
  235. package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
  236. package/js/components/currency/base-currency.vue.js +2 -3
  237. package/js/components/currency/base-currency.vue.js.map +1 -1
  238. package/js/components/filters/labels/base-rating-filter-label.vue.js +7 -8
  239. package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
  240. package/js/components/global-x-bus.vue.js +39 -0
  241. package/js/components/global-x-bus.vue.js.map +1 -0
  242. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +46 -0
  243. package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -0
  244. package/js/components/icons/arrow.vue.js +4 -6
  245. package/js/components/icons/arrow.vue.js.map +1 -1
  246. package/js/components/icons/bag.vue.js +8 -12
  247. package/js/components/icons/bag.vue.js.map +1 -1
  248. package/js/components/icons/bar-code.vue.js +6 -9
  249. package/js/components/icons/bar-code.vue.js.map +1 -1
  250. package/js/components/icons/barcode-tiny.vue.js +6 -9
  251. package/js/components/icons/barcode-tiny.vue.js.map +1 -1
  252. package/js/components/icons/cart.vue.js +10 -13
  253. package/js/components/icons/cart.vue.js.map +1 -1
  254. package/js/components/icons/check-tiny.vue.js +4 -6
  255. package/js/components/icons/check-tiny.vue.js.map +1 -1
  256. package/js/components/icons/check.vue.js +4 -6
  257. package/js/components/icons/check.vue.js.map +1 -1
  258. package/js/components/icons/checkbox-card-selected.vue.js +5 -7
  259. package/js/components/icons/checkbox-card-selected.vue.js.map +1 -1
  260. package/js/components/icons/checkbox-card-unselected.vue.js +5 -7
  261. package/js/components/icons/checkbox-card-unselected.vue.js.map +1 -1
  262. package/js/components/icons/checkbox-selected.vue.js +5 -7
  263. package/js/components/icons/checkbox-selected.vue.js.map +1 -1
  264. package/js/components/icons/checkbox-unselected.vue.js +6 -6
  265. package/js/components/icons/chevron-down.vue.js +6 -8
  266. package/js/components/icons/chevron-down.vue.js.map +1 -1
  267. package/js/components/icons/chevron-left.vue.js +6 -8
  268. package/js/components/icons/chevron-left.vue.js.map +1 -1
  269. package/js/components/icons/chevron-right.vue.js +4 -6
  270. package/js/components/icons/chevron-right.vue.js.map +1 -1
  271. package/js/components/icons/chevron-tiny-down.vue.js +6 -8
  272. package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
  273. package/js/components/icons/chevron-tiny-left.vue.js +6 -8
  274. package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
  275. package/js/components/icons/chevron-tiny-right.vue.js +6 -8
  276. package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
  277. package/js/components/icons/chevron-tiny-up.vue.js +6 -8
  278. package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
  279. package/js/components/icons/chevron-up.vue.js +6 -8
  280. package/js/components/icons/chevron-up.vue.js.map +1 -1
  281. package/js/components/icons/cross-tiny.vue.js +4 -6
  282. package/js/components/icons/cross-tiny.vue.js.map +1 -1
  283. package/js/components/icons/cross.vue.js +4 -6
  284. package/js/components/icons/cross.vue.js.map +1 -1
  285. package/js/components/icons/filters.vue.js +10 -15
  286. package/js/components/icons/filters.vue.js.map +1 -1
  287. package/js/components/icons/grid-1-col.vue.js +6 -9
  288. package/js/components/icons/grid-1-col.vue.js.map +1 -1
  289. package/js/components/icons/grid-2-col.vue.js +8 -10
  290. package/js/components/icons/grid-2-col.vue.js.map +1 -1
  291. package/js/components/icons/hide.vue.js +10 -15
  292. package/js/components/icons/hide.vue.js.map +1 -1
  293. package/js/components/icons/history-tiny.vue.js +9 -12
  294. package/js/components/icons/history-tiny.vue.js.map +1 -1
  295. package/js/components/icons/history.vue.js +9 -12
  296. package/js/components/icons/history.vue.js.map +1 -1
  297. package/js/components/icons/menu.vue.js +6 -8
  298. package/js/components/icons/menu.vue.js.map +1 -1
  299. package/js/components/icons/minus-tiny.vue.js +4 -6
  300. package/js/components/icons/minus-tiny.vue.js.map +1 -1
  301. package/js/components/icons/minus.vue.js +4 -6
  302. package/js/components/icons/minus.vue.js.map +1 -1
  303. package/js/components/icons/nq-1.vue.js +4 -6
  304. package/js/components/icons/nq-1.vue.js.map +1 -1
  305. package/js/components/icons/nq-2.vue.js +4 -6
  306. package/js/components/icons/nq-2.vue.js.map +1 -1
  307. package/js/components/icons/nq-3.vue.js +6 -8
  308. package/js/components/icons/nq-3.vue.js.map +1 -1
  309. package/js/components/icons/nq-4.vue.js +9 -12
  310. package/js/components/icons/nq-4.vue.js.map +1 -1
  311. package/js/components/icons/plus.vue.js +4 -6
  312. package/js/components/icons/plus.vue.js.map +1 -1
  313. package/js/components/icons/search-tiny.vue.js +6 -9
  314. package/js/components/icons/search-tiny.vue.js.map +1 -1
  315. package/js/components/icons/search.vue.js +6 -8
  316. package/js/components/icons/search.vue.js.map +1 -1
  317. package/js/components/icons/show.vue.js +7 -10
  318. package/js/components/icons/show.vue.js.map +1 -1
  319. package/js/components/icons/star.vue.js +6 -9
  320. package/js/components/icons/star.vue.js.map +1 -1
  321. package/js/components/icons/tag.vue.js +59 -0
  322. package/js/components/icons/tag.vue.js.map +1 -0
  323. package/js/components/icons/tag.vue_rollup-plugin-vue=script.js +4 -0
  324. package/js/components/icons/tag.vue_rollup-plugin-vue=script.js.map +1 -0
  325. package/js/components/icons/trash-open.vue.js +12 -15
  326. package/js/components/icons/trash-open.vue.js.map +1 -1
  327. package/js/components/icons/trash.vue.js +8 -11
  328. package/js/components/icons/trash.vue.js.map +1 -1
  329. package/js/components/icons/trending-tiny.vue.js +8 -10
  330. package/js/components/icons/trending-tiny.vue.js.map +1 -1
  331. package/js/components/icons/trending.vue.js +8 -10
  332. package/js/components/icons/trending.vue.js.map +1 -1
  333. package/js/components/icons/user.vue.js +6 -9
  334. package/js/components/icons/user.vue.js.map +1 -1
  335. package/js/components/items-list.vue.js +6 -7
  336. package/js/components/items-list.vue.js.map +1 -1
  337. package/js/components/layouts/multi-column-max-width-layout.vue.js +54 -88
  338. package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
  339. package/js/components/layouts/single-column-layout.vue.js +39 -67
  340. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  341. package/js/components/modals/base-events-modal-close.vue.js +2 -2
  342. package/js/components/modals/base-events-modal-open.vue.js +2 -2
  343. package/js/components/modals/base-events-modal.vue.js +3 -3
  344. package/js/components/modals/base-id-modal-close.vue.js +2 -2
  345. package/js/components/modals/base-id-modal-open.vue.js +2 -2
  346. package/js/components/modals/base-id-modal.vue.js +3 -3
  347. package/js/components/modals/base-modal.vue.js +9 -11
  348. package/js/components/modals/base-modal.vue.js.map +1 -1
  349. package/js/components/panels/base-header-toggle-panel.vue.js +5 -7
  350. package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
  351. package/js/components/panels/base-id-toggle-panel-button.vue.js +2 -2
  352. package/js/components/panels/base-id-toggle-panel.vue.js +1 -1
  353. package/js/components/panels/base-toggle-panel.vue.js +3 -4
  354. package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
  355. package/js/components/result/base-result-add-to-cart.vue.js +2 -2
  356. package/js/components/result/base-result-current-price.vue.js +6 -8
  357. package/js/components/result/base-result-current-price.vue.js.map +1 -1
  358. package/js/components/result/base-result-fallback-image.vue.js +7 -9
  359. package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
  360. package/js/components/result/base-result-image.vue.js +9 -12
  361. package/js/components/result/base-result-image.vue.js.map +1 -1
  362. package/js/components/result/base-result-link.vue.js +5 -5
  363. package/js/components/result/base-result-placeholder-image.vue.js +7 -9
  364. package/js/components/result/base-result-placeholder-image.vue.js.map +1 -1
  365. package/js/components/result/base-result-previous-price.vue.js +7 -9
  366. package/js/components/result/base-result-previous-price.vue.js.map +1 -1
  367. package/js/components/scroll/base-scroll.vue.js +2 -2
  368. package/js/components/sliding-panel.vue.js +11 -14
  369. package/js/components/sliding-panel.vue.js.map +1 -1
  370. package/js/components/snippet-callbacks.vue.js +47 -0
  371. package/js/components/snippet-callbacks.vue.js.map +1 -0
  372. package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js +58 -0
  373. package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js.map +1 -0
  374. package/js/components/suggestions/base-suggestion.vue.js +6 -8
  375. package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
  376. package/js/components/suggestions/base-suggestions.vue.js +6 -7
  377. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  378. package/js/index.js +7 -2
  379. package/js/index.js.map +1 -1
  380. package/js/utils/origin.js +5 -3
  381. package/js/utils/origin.js.map +1 -1
  382. package/js/utils/storage.js +2 -2
  383. package/js/utils/storage.js.map +1 -1
  384. package/js/x-modules/device/components/device-detector.vue.js +2 -2
  385. package/js/x-modules/empathize/components/empathize.vue.js +5 -6
  386. package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
  387. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +3 -0
  388. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  389. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js +3 -4
  390. package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
  391. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +3 -0
  392. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  393. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js +1 -1
  394. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +3 -0
  395. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  396. package/js/x-modules/facets/components/clear-filters.vue.js +6 -8
  397. package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
  398. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +3 -0
  399. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  400. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +3 -0
  401. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  402. package/js/x-modules/facets/components/facets/facets.vue.js +10 -11
  403. package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
  404. package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -6
  405. package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
  406. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +3 -0
  407. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  408. package/js/x-modules/facets/components/filters/base-filter.vue.js +5 -6
  409. package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
  410. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +3 -0
  411. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  412. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +19 -23
  413. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
  414. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +29 -38
  415. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  416. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +3 -0
  417. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  418. package/js/x-modules/facets/components/filters/number-range-filter.vue.js +5 -6
  419. package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
  420. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +3 -0
  421. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  422. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +3 -0
  423. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  424. package/js/x-modules/facets/components/filters/simple-filter.vue.js +13 -17
  425. package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
  426. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +3 -0
  427. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  428. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +3 -0
  429. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  430. package/js/x-modules/facets/components/lists/filters-list.vue.js +4 -4
  431. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +3 -0
  432. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  433. package/js/x-modules/facets/components/lists/filters-search.vue.js +8 -10
  434. package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
  435. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +3 -0
  436. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  437. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +14 -20
  438. package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
  439. package/js/x-modules/facets/components/lists/selected-filters.vue.js +3 -4
  440. package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
  441. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +3 -0
  442. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  443. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +12 -18
  444. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  445. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +3 -0
  446. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  447. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +3 -0
  448. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  449. package/js/x-modules/history-queries/components/clear-history-queries.vue.js +5 -6
  450. package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
  451. package/js/x-modules/history-queries/components/history-queries.vue.js +19 -25
  452. package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
  453. package/js/x-modules/history-queries/components/history-query.vue.js +14 -18
  454. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  455. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
  456. package/js/x-modules/history-queries/components/remove-history-query.vue.js +2 -2
  457. package/js/x-modules/identifier-results/components/identifier-result.vue.js +2 -2
  458. package/js/x-modules/identifier-results/components/identifier-results.vue.js +4 -4
  459. package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js +4 -2
  460. package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js.map +1 -1
  461. package/js/x-modules/identifier-results/store/actions/save-query.action.js +4 -0
  462. package/js/x-modules/identifier-results/store/actions/save-query.action.js.map +1 -1
  463. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +4 -9
  464. package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
  465. package/js/x-modules/identifier-results/store/module.js +5 -3
  466. package/js/x-modules/identifier-results/store/module.js.map +1 -1
  467. package/js/x-modules/identifier-results/wiring.js +16 -3
  468. package/js/x-modules/identifier-results/wiring.js.map +1 -1
  469. package/js/x-modules/next-queries/components/next-queries-list.vue.js +9 -12
  470. package/js/x-modules/next-queries/components/next-queries-list.vue.js.map +1 -1
  471. package/js/x-modules/next-queries/components/next-queries.vue.js +15 -20
  472. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  473. package/js/x-modules/next-queries/components/next-query.vue.js +9 -10
  474. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  475. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
  476. package/js/x-modules/popular-searches/components/popular-search.vue.js +9 -10
  477. package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
  478. package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
  479. package/js/x-modules/popular-searches/components/popular-searches.vue.js +15 -20
  480. package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
  481. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +10 -11
  482. package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
  483. package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
  484. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +15 -20
  485. package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
  486. package/js/x-modules/recommendations/components/recommendations.vue.js +9 -12
  487. package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
  488. package/js/x-modules/related-tags/components/related-tag.vue.js +11 -8
  489. package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
  490. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +35 -7
  491. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
  492. package/js/x-modules/related-tags/components/related-tags.vue.js +28 -21
  493. package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
  494. package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue=script.js +3 -0
  495. package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue=script.js.map +1 -1
  496. package/js/x-modules/scroll/components/main-scroll-item.vue.js +1 -1
  497. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +3 -0
  498. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
  499. package/js/x-modules/scroll/components/scroll-to-top.vue.js +3 -4
  500. package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
  501. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +3 -0
  502. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
  503. package/js/x-modules/scroll/components/scroll.vue.js +4 -4
  504. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +3 -0
  505. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  506. package/js/x-modules/search/components/banner.vue.js +4 -6
  507. package/js/x-modules/search/components/banner.vue.js.map +1 -1
  508. package/js/x-modules/search/components/banners-list.vue.js +9 -12
  509. package/js/x-modules/search/components/banners-list.vue.js.map +1 -1
  510. package/js/x-modules/search/components/partial-query-button.vue.js +4 -5
  511. package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
  512. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +14 -6
  513. package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
  514. package/js/x-modules/search/components/partial-results-list.vue.js +4 -4
  515. package/js/x-modules/search/components/promoted.vue.js +4 -6
  516. package/js/x-modules/search/components/promoted.vue.js.map +1 -1
  517. package/js/x-modules/search/components/promoteds-list.vue.js +9 -12
  518. package/js/x-modules/search/components/promoteds-list.vue.js.map +1 -1
  519. package/js/x-modules/search/components/redirection.vue.js +4 -5
  520. package/js/x-modules/search/components/redirection.vue.js.map +1 -1
  521. package/js/x-modules/search/components/results-list.vue.js +9 -12
  522. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  523. package/js/x-modules/search/components/sort-dropdown.vue.js +13 -16
  524. package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
  525. package/js/x-modules/search/components/sort-list.vue.js +8 -10
  526. package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
  527. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +3 -0
  528. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  529. package/js/x-modules/search/components/sort.mixin.js +3 -0
  530. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  531. package/js/x-modules/search/components/spellcheck-button.vue.js +4 -5
  532. package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
  533. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +14 -6
  534. package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
  535. package/js/x-modules/search/components/spellcheck.vue.js +4 -6
  536. package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
  537. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +3 -0
  538. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  539. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +7 -2
  540. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  541. package/js/x-modules/search/store/emitters.js +8 -1
  542. package/js/x-modules/search/store/emitters.js.map +1 -1
  543. package/js/x-modules/search/store/getters/request.getter.js +2 -3
  544. package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
  545. package/js/x-modules/search/wiring.js +4 -3
  546. package/js/x-modules/search/wiring.js.map +1 -1
  547. package/js/x-modules/search-box/components/clear-search-input.vue.js +5 -6
  548. package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
  549. package/js/x-modules/search-box/components/search-button.vue.js +4 -5
  550. package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
  551. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +14 -6
  552. package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
  553. package/js/x-modules/search-box/components/search-input.vue.js +9 -11
  554. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  555. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +17 -14
  556. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
  557. package/js/x-modules/tagging/components/tagging.vue.js +39 -0
  558. package/js/x-modules/tagging/components/tagging.vue.js.map +1 -0
  559. package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js +65 -0
  560. package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js.map +1 -0
  561. package/js/x-modules/tagging/service/session.service.js +23 -6
  562. package/js/x-modules/tagging/service/session.service.js.map +1 -1
  563. package/js/x-modules/tagging/store/actions/track.action.js +43 -0
  564. package/js/x-modules/tagging/store/actions/track.action.js.map +1 -0
  565. package/js/x-modules/tagging/store/module.js +6 -2
  566. package/js/x-modules/tagging/store/module.js.map +1 -1
  567. package/js/x-modules/tagging/wiring.js +30 -3
  568. package/js/x-modules/tagging/wiring.js.map +1 -1
  569. package/js/x-modules/url/components/url-handler.vue.js +2 -2
  570. package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
  571. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +101 -5
  572. package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
  573. package/package.json +16 -14
  574. package/report/tsdoc-metadata.json +1 -1
  575. package/report/x-adapter.api.json +29 -3
  576. package/report/x-components.api.json +662 -59
  577. package/report/x-components.api.md +106 -18
  578. package/report/x-types.api.json +27 -1
  579. package/tagging/index.js +4 -2
  580. package/types/adapter/mocked-adapter.d.ts.map +1 -1
  581. package/types/components/global-x-bus.vue.d.ts +25 -0
  582. package/types/components/global-x-bus.vue.d.ts.map +1 -0
  583. package/types/components/icons/index.d.ts +1 -0
  584. package/types/components/icons/index.d.ts.map +1 -1
  585. package/types/components/icons/tag.vue.d.ts +3 -0
  586. package/types/components/icons/tag.vue.d.ts.map +1 -0
  587. package/types/components/index.d.ts +2 -0
  588. package/types/components/index.d.ts.map +1 -1
  589. package/types/components/snippet-callbacks.vue.d.ts +27 -0
  590. package/types/components/snippet-callbacks.vue.d.ts.map +1 -0
  591. package/types/types/origin.d.ts +1 -1
  592. package/types/types/origin.d.ts.map +1 -1
  593. package/types/utils/origin.d.ts +3 -1
  594. package/types/utils/origin.d.ts.map +1 -1
  595. package/types/utils/storage.d.ts +1 -7
  596. package/types/utils/storage.d.ts.map +1 -1
  597. package/types/wiring/events.types.d.ts +8 -0
  598. package/types/wiring/events.types.d.ts.map +1 -1
  599. package/types/x-installer/api/api.types.d.ts +14 -0
  600. package/types/x-installer/api/api.types.d.ts.map +1 -1
  601. package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
  602. package/types/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.d.ts.map +1 -1
  603. package/types/x-modules/identifier-results/store/actions/save-query.action.d.ts.map +1 -1
  604. package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
  605. package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
  606. package/types/x-modules/identifier-results/store/types.d.ts +9 -7
  607. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  608. package/types/x-modules/identifier-results/wiring.d.ts +11 -1
  609. package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
  610. package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
  611. package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
  612. package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
  613. package/types/x-modules/related-tags/components/related-tag.vue.d.ts +22 -0
  614. package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
  615. package/types/x-modules/related-tags/components/related-tags.vue.d.ts +6 -0
  616. package/types/x-modules/related-tags/components/related-tags.vue.d.ts.map +1 -1
  617. package/types/x-modules/search/components/partial-query-button.vue.d.ts +8 -0
  618. package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
  619. package/types/x-modules/search/components/spellcheck-button.vue.d.ts +8 -0
  620. package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
  621. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  622. package/types/x-modules/search/store/emitters.d.ts +4 -1
  623. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  624. package/types/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
  625. package/types/x-modules/search/wiring.d.ts +2 -1
  626. package/types/x-modules/search/wiring.d.ts.map +1 -1
  627. package/types/x-modules/search-box/components/search-button.vue.d.ts +8 -0
  628. package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
  629. package/types/x-modules/search-box/components/search-input.vue.d.ts +6 -3
  630. package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
  631. package/types/x-modules/tagging/components/tagging.vue.d.ts +47 -0
  632. package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -0
  633. package/types/x-modules/tagging/index.d.ts +1 -0
  634. package/types/x-modules/tagging/index.d.ts.map +1 -1
  635. package/types/x-modules/tagging/service/session.service.d.ts +18 -1
  636. package/types/x-modules/tagging/service/session.service.d.ts.map +1 -1
  637. package/types/x-modules/tagging/store/actions/index.d.ts +2 -0
  638. package/types/x-modules/tagging/store/actions/index.d.ts.map +1 -0
  639. package/types/x-modules/tagging/store/actions/track.action.d.ts +12 -0
  640. package/types/x-modules/tagging/store/actions/track.action.d.ts.map +1 -0
  641. package/types/x-modules/tagging/store/index.d.ts +1 -0
  642. package/types/x-modules/tagging/store/index.d.ts.map +1 -1
  643. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  644. package/types/x-modules/tagging/store/types.d.ts +7 -0
  645. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  646. package/types/x-modules/tagging/wiring.d.ts +17 -7
  647. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  648. package/types/x-modules/url/components/url-handler.vue.d.ts +70 -7
  649. package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
  650. package/docs/API-reference/api/x-components.identifierresultsactions.seturlparams.md +0 -24
  651. package/docs/css/global.scss +0 -1
  652. package/docs/css/utils/utils.scss +0 -35
  653. package/docs/css/xcomponents/clear-search-input.scss +0 -9
  654. package/docs/css/xcomponents/index.scss +0 -16
  655. package/docs/css/xcomponents/search-input.scss +0 -10
  656. package/docs/css/xcomponents/suggestions.scss +0 -19
  657. package/docs/guide/getting-started/components/clear-search-input.md +0 -98
  658. package/docs/guide/getting-started/components/live-examples.md +0 -100
  659. package/docs/guide/getting-started/components/query-suggestions.md +0 -76
  660. package/docs/guide/getting-started/components/search-button.md +0 -98
  661. package/docs/guide/getting-started/components/search-input.md +0 -105
  662. package/docs/guide/getting-started/install-xplugin.md +0 -72
  663. package/docs/guide/getting-started/use-components.md +0 -75
  664. package/docs/guide/install.md +0 -30
  665. package/docs/react-components/ReactComponents.jsx +0 -46
  666. package/docs/react-components/Utils.jsx +0 -34
  667. package/docs/sidebar.json +0 -1
  668. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +0 -17
  669. package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +0 -1
  670. package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts +0 -12
  671. package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +0 -1
@@ -6,7 +6,7 @@ import script from './recommendations.vue_rollup-plugin-vue=script.js';
6
6
  var __vue_script__ = script;
7
7
 
8
8
  /* template */
9
- var __vue_render__ = function() {
9
+ var __vue_render__ = function () {
10
10
  var _vm = this;
11
11
  var _h = _vm.$createElement;
12
12
  var _c = _vm._self._c || _h;
@@ -16,39 +16,36 @@ var __vue_render__ = function() {
16
16
  [
17
17
  _vm._t(
18
18
  "layout",
19
- function() {
19
+ function () {
20
20
  return [
21
21
  _c(
22
22
  _vm.animation,
23
23
  {
24
24
  tag: "component",
25
25
  staticClass: "x-list x-recommendations",
26
- attrs: { tag: "ul", "data-test": "recommendations" }
26
+ attrs: { tag: "ul", "data-test": "recommendations" },
27
27
  },
28
- _vm._l(_vm.recommendations, function(recommendation) {
28
+ _vm._l(_vm.recommendations, function (recommendation) {
29
29
  return _c(
30
30
  "li",
31
31
  {
32
32
  key: recommendation.id,
33
33
  staticClass: "x-recommendations__item",
34
- attrs: { "data-test": "recommendation-item" }
34
+ attrs: { "data-test": "recommendation-item" },
35
35
  },
36
36
  [
37
37
  _vm._t("default", null, {
38
- recommendation: recommendation
39
- })
40
- ],
38
+ recommendation: recommendation,
39
+ }) ],
41
40
  2
42
41
  )
43
42
  }),
44
43
  0
45
- )
46
- ]
44
+ ) ]
47
45
  },
48
46
  null,
49
47
  { animation: _vm.animation, recommendations: _vm.recommendations }
50
- )
51
- ],
48
+ ) ],
52
49
  2
53
50
  )
54
51
  : _vm._e()
@@ -1 +1 @@
1
- {"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"recommendations.length\">\n <!--\n @slot Customized Recommendations layout.\n @binding {Result[]} recommendations - Recommendations to render.\n @binding {Vue} animation - Animation to animate the elements.\n -->\n <slot name=\"layout\" v-bind=\"{ animation, recommendations }\">\n <component\n :is=\"animation\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-list x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Provide } from 'vue-property-decorator';\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { State } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { PropsWithType } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { recommendationsXModule } from '../x-module';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations | Recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink | result link component} besides any other component.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(recommendationsXModule)],\n components: {\n NoElement\n }\n })\n export default class Recommendations extends Vue {\n /**\n * The module's list of recommendations.\n *\n * @public\n */\n @State('recommendations', 'recommendations')\n public storedRecommendations!: Result[];\n\n /**\n * Animation component that will be used to animate the recommendations.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of recommendations to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n @Provide()\n protected resultClickExtraEvents: PropsWithType<XEventsTypes, Result>[] = [\n 'UserClickedARecommendation'\n ];\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n *\n * @internal\n */\n protected get recommendations(): Result[] {\n return this.storedRecommendations.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-recommendations {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders a list of recommendations from recommendations state by default. The component provides\nthe slot layout which wraps the whole component with the recommendations bound. It also provides the\ndefault slot to customize the item, which is within the layout slot, with the recommendation bound.\nEach recommendation should be represented by a BaseResultLink component besides any other component.\n\n## Basic example\n\n## Adding a custom BaseResultLink component\n\nA BaseResultLink **must** be used inside the Recommendations component. In the example below the\nBaseResultLink default slot is filled with an image of the result and a span for the title. Besides\nthat, an additional button has been added.\n\n```vue\n<Recommendations>\n <template #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\" class=\"x-recommendations__image\"/>\n <span class=\"x-recommendations__title\">{{ result.name }}</span>\n </template>\n </BaseResultLink>\n <button>Custom Behaviour</button>\n </template>\n</Recommendations>\n```\n\n## Overriding layout content\n\nIt renders a list of recommendations customizing the layout slot. In the example below, instead of\nusing the default Recommendations content, a BaseGrid component is used to render the\nrecommendations.\n\n```vue\n<Recommendations :animation=\"staggeredFadeAndSlide\">\n <template #layout=\"{ recommendations, animation }\">\n <BaseGrid :items=\"recommendations\" :animation=\"animation\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </BaseResultLink>\n </template>\n </BaseGrid>\n </template>\n</Recommendations>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedARecommendation`: the event is emitted after the user clicks the button.\n- A list of events emitted by the `BaseResultLink`.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"recommendations.length\">\n <!--\n @slot Customized Recommendations layout.\n @binding {Result[]} recommendations - Recommendations to render.\n @binding {Vue} animation - Animation to animate the elements.\n -->\n <slot name=\"layout\" v-bind=\"{ animation, recommendations }\">\n <component\n :is=\"animation\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-list x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Provide } from 'vue-property-decorator';\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { State } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { PropsWithType } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { recommendationsXModule } from '../x-module';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations | Recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink | result link component} besides any other component.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(recommendationsXModule)],\n components: {\n NoElement\n }\n })\n export default class Recommendations extends Vue {\n /**\n * The module's list of recommendations.\n *\n * @public\n */\n @State('recommendations', 'recommendations')\n public storedRecommendations!: Result[];\n\n /**\n * Animation component that will be used to animate the recommendations.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of recommendations to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n @Provide()\n protected resultClickExtraEvents: PropsWithType<XEventsTypes, Result>[] = [\n 'UserClickedARecommendation'\n ];\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n *\n * @internal\n */\n protected get recommendations(): Result[] {\n return this.storedRecommendations.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-recommendations {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders a list of recommendations from recommendations state by default. The component provides\nthe slot layout which wraps the whole component with the recommendations bound. It also provides the\ndefault slot to customize the item, which is within the layout slot, with the recommendation bound.\nEach recommendation should be represented by a BaseResultLink component besides any other component.\n\n## Basic example\n\n## Adding a custom BaseResultLink component\n\nA BaseResultLink **must** be used inside the Recommendations component. In the example below the\nBaseResultLink default slot is filled with an image of the result and a span for the title. Besides\nthat, an additional button has been added.\n\n```vue\n<Recommendations>\n <template #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\" class=\"x-recommendations__image\"/>\n <span class=\"x-recommendations__title\">{{ result.name }}</span>\n </template>\n </BaseResultLink>\n <button>Custom Behaviour</button>\n </template>\n</Recommendations>\n```\n\n## Overriding layout content\n\nIt renders a list of recommendations customizing the layout slot. In the example below, instead of\nusing the default Recommendations content, a BaseGrid component is used to render the\nrecommendations.\n\n```vue\n<Recommendations :animation=\"staggeredFadeAndSlide\">\n <template #layout=\"{ recommendations, animation }\">\n <BaseGrid :items=\"recommendations\" :animation=\"animation\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </BaseResultLink>\n </template>\n </BaseGrid>\n </template>\n</Recommendations>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedARecommendation`: the event is emitted after the user clicks the button.\n- A list of events emitted by the `BaseResultLink`.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,7 @@ import script from './related-tag.vue_rollup-plugin-vue=script.js';
6
6
  var __vue_script__ = script;
7
7
 
8
8
  /* template */
9
- var __vue_render__ = function() {
9
+ var __vue_render__ = function () {
10
10
  var _vm = this;
11
11
  var _h = _vm.$createElement;
12
12
  var _c = _vm._self._c || _h;
@@ -16,18 +16,21 @@ var __vue_render__ = function() {
16
16
  staticClass: "x-tag x-related-tag",
17
17
  class: _vm.dynamicClasses,
18
18
  attrs: { "data-test": "related-tag" },
19
- on: { click: _vm.emitEvents }
19
+ on: { click: _vm.emitEvents },
20
20
  },
21
21
  [
22
22
  _vm._t(
23
23
  "default",
24
- function() {
24
+ function () {
25
25
  return [_vm._v(_vm._s(_vm.relatedTag.tag))]
26
26
  },
27
27
  null,
28
- { relatedTag: _vm.relatedTag, isSelected: _vm.isSelected }
29
- )
30
- ],
28
+ {
29
+ relatedTag: _vm.relatedTag,
30
+ isSelected: _vm.isSelected,
31
+ shouldHighlightCurated: _vm.shouldHighlightCurated,
32
+ }
33
+ ) ],
31
34
  2
32
35
  )
33
36
  };
@@ -37,11 +40,11 @@ __vue_render__._withStripped = true;
37
40
  /* style */
38
41
  var __vue_inject_styles__ = function (inject) {
39
42
  if (!inject) { return }
40
- inject("data-v-fdaef8d0_0", { source: ".x-related-tag[data-v-fdaef8d0] {\n white-space: nowrap;\n}\n.x-related-tag--is-selected[data-v-fdaef8d0] {\n background: lightgrey;\n}", map: undefined, media: undefined });
43
+ inject("data-v-6081d22c_0", { source: ".x-related-tag[data-v-6081d22c] {\n white-space: nowrap;\n}\n.x-related-tag--is-selected[data-v-6081d22c] {\n background: lightgrey;\n}", map: undefined, media: undefined });
41
44
 
42
45
  };
43
46
  /* scoped */
44
- var __vue_scope_id__ = "data-v-fdaef8d0";
47
+ var __vue_scope_id__ = "data-v-6081d22c";
45
48
  /* module identifier */
46
49
  var __vue_module_identifier__ = undefined;
47
50
  /* functional template */
@@ -1 +1 @@
1
- {"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <button\n @click=\"emitEvents\"\n class=\"x-tag x-related-tag\"\n data-test=\"related-tag\"\n :class=\"dynamicClasses\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n -->\n <slot v-bind=\"{ relatedTag, isSelected }\">{{ relatedTag.tag }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { State } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils/types';\n import { relatedTagsXModule } from '../x-module';\n\n /**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTag extends Vue {\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emiting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n {\n target: this.$el as HTMLElement\n }\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, {\n target: this.$el as HTMLElement\n });\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tag {\n white-space: nowrap;\n\n &--is-selected {\n background: lightgrey;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Dynamic classes\n\n`RelatedTag` uses the `x-related-tag--is-selected` dynamic CSS class so you can style it when is\nselected.\n\n## Events\n\nThis component emits the following events:\n\n- [`UserDeselectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserPickedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nThe QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example related tag data is passed as a prop.\n\n_Here you can see how the RelatedTag component is rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, an HTML span element is passed in the `default` slot.\n\n_See how the related tag can be rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" #default=\"{ relatedTag }\">\n <span :aria-label=\"relatedTag.tag\">{{ relatedTag.tag }}</span>\n </RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\nevent is implemented, as illustrated by the “Tag” message returned.\n\n_See how the event is triggered when the related tag is clicked._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" @UserSelectedARelatedTag=\"alertRelatedTag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n },\n methods: {\n alertRelatedTag(relatedTag) {\n alert(`You have clicked the related tag: ${relatedTag.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <button\n @click=\"emitEvents\"\n class=\"x-tag x-related-tag\"\n data-test=\"related-tag\"\n :class=\"dynamicClasses\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\">{{ relatedTag.tag }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { State } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { relatedTagsXModule } from '../x-module';\n\n /**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTag extends Vue {\n /**\n * Indicates if the curated related tag should be highlighted.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'related_tag'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n this.createEventMetadata()\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Check if the related tag is curated and should be highlighted.\n *\n * @returns True if the related tag is curated and should be highlighted.\n *\n * @internal\n */\n protected get shouldHighlightCurated(): boolean {\n return this.highlightCurated && (this.relatedTag.isCurated ?? false);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-curated': this.shouldHighlightCurated,\n 'x-related-tag--is-curated': this.shouldHighlightCurated,\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tag {\n white-space: nowrap;\n\n &--is-selected {\n background: lightgrey;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Dynamic classes\n\n`RelatedTag` uses the following dynamic CSS classes so you can style it when is:\n\n- Selected: `x-related-tag--is-selected`.\n- Curated: `x-related-tag--is-curated`.\n\n## Events\n\nThis component emits the following events:\n\n- [`UserDeselectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserPickedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nThe QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example related tag data is passed as a prop.\n\n_Here you can see how the RelatedTag component is rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, an HTML span element is passed in the `default` slot.\n\n_See how the related tag can be rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" #default=\"{ relatedTag }\">\n <span :aria-label=\"relatedTag.tag\">{{ relatedTag.tag }}</span>\n </RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\nevent is implemented, as illustrated by the “Tag” message returned.\n\n_See how the event is triggered when the related tag is clicked._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" @UserSelectedARelatedTag=\"alertRelatedTag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n },\n methods: {\n alertRelatedTag(relatedTag) {\n alert(`You have clicked the related tag: ${relatedTag.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,6 +17,18 @@ var RelatedTag = /** @class */ (function (_super) {
17
17
  function RelatedTag() {
18
18
  return _super !== null && _super.apply(this, arguments) || this;
19
19
  }
20
+ /**
21
+ * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.
22
+ *
23
+ * @returns The {@link WireMetadata} object omitting the moduleName.
24
+ * @internal
25
+ */
26
+ RelatedTag.prototype.createEventMetadata = function () {
27
+ return {
28
+ target: this.$el,
29
+ feature: 'related_tag'
30
+ };
31
+ };
20
32
  /**
21
33
  * Emits events when the button is clicked.
22
34
  *
@@ -24,13 +36,9 @@ var RelatedTag = /** @class */ (function (_super) {
24
36
  */
25
37
  RelatedTag.prototype.emitEvents = function () {
26
38
  // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the
27
- // isSelected value before emiting this selection events.
28
- this.$x.emit(this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag', this.relatedTag, {
29
- target: this.$el
30
- });
31
- this.$x.emit('UserPickedARelatedTag', this.relatedTag, {
32
- target: this.$el
33
- });
39
+ // isSelected value before emitting this selection events.
40
+ this.$x.emit(this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag', this.relatedTag, this.createEventMetadata());
41
+ this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());
34
42
  };
35
43
  Object.defineProperty(RelatedTag.prototype, "isSelected", {
36
44
  /**
@@ -46,6 +54,21 @@ var RelatedTag = /** @class */ (function (_super) {
46
54
  enumerable: false,
47
55
  configurable: true
48
56
  });
57
+ Object.defineProperty(RelatedTag.prototype, "shouldHighlightCurated", {
58
+ /**
59
+ * Check if the related tag is curated and should be highlighted.
60
+ *
61
+ * @returns True if the related tag is curated and should be highlighted.
62
+ *
63
+ * @internal
64
+ */
65
+ get: function () {
66
+ var _a;
67
+ return this.highlightCurated && ((_a = this.relatedTag.isCurated) !== null && _a !== void 0 ? _a : false);
68
+ },
69
+ enumerable: false,
70
+ configurable: true
71
+ });
49
72
  Object.defineProperty(RelatedTag.prototype, "dynamicClasses", {
50
73
  /**
51
74
  * Adds the dynamic css classes to the component.
@@ -56,6 +79,8 @@ var RelatedTag = /** @class */ (function (_super) {
56
79
  */
57
80
  get: function () {
58
81
  return {
82
+ 'x-tag--is-curated': this.shouldHighlightCurated,
83
+ 'x-related-tag--is-curated': this.shouldHighlightCurated,
59
84
  'x-tag--is-selected': this.isSelected,
60
85
  'x-related-tag--is-selected': this.isSelected
61
86
  };
@@ -63,6 +88,9 @@ var RelatedTag = /** @class */ (function (_super) {
63
88
  enumerable: false,
64
89
  configurable: true
65
90
  });
91
+ __decorate([
92
+ Prop({ default: false, type: Boolean })
93
+ ], RelatedTag.prototype, "highlightCurated", void 0);
66
94
  __decorate([
67
95
  Prop({ required: true })
68
96
  ], RelatedTag.prototype, "relatedTag", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"related-tag.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport { State } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { VueCSSClasses } from '../../../utils/types';\nimport { relatedTagsXModule } from '../x-module';\n\n/**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n})\nexport default class RelatedTag extends Vue {\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emiting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n {\n target: this.$el as HTMLElement\n }\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, {\n target: this.$el as HTMLElement\n });\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;AAyBA;;;;;;;AAUA;IAAwC,8BAAG;IAA3C;;KA4DC;;;;;;IAvCW,+BAAU,GAApB;;;QAGE,IAAI,CAAC,EAAE,CAAC,IAAI,CACV,IAAI,CAAC,UAAU,GAAG,2BAA2B,GAAG,yBAAyB,EACzE,IAAI,CAAC,UAAU,EACf;YACE,MAAM,EAAE,IAAI,CAAC,GAAkB;SAChC,CACF,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,UAAU,EAAE;YACrD,MAAM,EAAE,IAAI,CAAC,GAAkB;SAChC,CAAC,CAAC;KACJ;IASD,sBAAc,kCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3D;;;OAAA;IASD,sBAAc,sCAAc;;;;;;;;aAA5B;YACE,OAAO;gBACL,oBAAoB,EAAE,IAAI,CAAC,UAAU;gBACrC,4BAA4B,EAAE,IAAI,CAAC,UAAU;aAC9C,CAAC;SACH;;;OAAA;IApDD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACc;IAOvC;QADC,KAAK,CAAC,aAAa,EAAE,qBAAqB,CAAC;2DACG;IAd5B,UAAU;QAH9B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,UAAU,CA4D9B;IAAD,iBAAC;CAAA,CA5DuC,GAAG;;;;"}
1
+ {"version":3,"file":"related-tag.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport { State } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { VueCSSClasses } from '../../../utils/types';\nimport { WireMetadata } from '../../../wiring/wiring.types';\nimport { relatedTagsXModule } from '../x-module';\n\n/**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n})\nexport default class RelatedTag extends Vue {\n /**\n * Indicates if the curated related tag should be highlighted.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'related_tag'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n this.createEventMetadata()\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Check if the related tag is curated and should be highlighted.\n *\n * @returns True if the related tag is curated and should be highlighted.\n *\n * @internal\n */\n protected get shouldHighlightCurated(): boolean {\n return this.highlightCurated && (this.relatedTag.isCurated ?? false);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-curated': this.shouldHighlightCurated,\n 'x-related-tag--is-curated': this.shouldHighlightCurated,\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;AA2BA;;;;;;;AAUA;IAAwC,8BAAG;IAA3C;;KAyFC;;;;;;;IA5DW,wCAAmB,GAA7B;QACE,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,GAAkB;YAC/B,OAAO,EAAE,aAAa;SACvB,CAAC;KACH;;;;;;IAOS,+BAAU,GAApB;;;QAGE,IAAI,CAAC,EAAE,CAAC,IAAI,CACV,IAAI,CAAC,UAAU,GAAG,2BAA2B,GAAG,yBAAyB,EACzE,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,mBAAmB,EAAE,CAC3B,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACpF;IASD,sBAAc,kCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3D;;;OAAA;IASD,sBAAc,8CAAsB;;;;;;;;aAApC;;YACE,OAAO,IAAI,CAAC,gBAAgB,KAAK,MAAA,IAAI,CAAC,UAAU,CAAC,SAAS,mCAAI,KAAK,CAAC,CAAC;SACtE;;;OAAA;IASD,sBAAc,sCAAc;;;;;;;;aAA5B;YACE,OAAO;gBACL,mBAAmB,EAAE,IAAI,CAAC,sBAAsB;gBAChD,2BAA2B,EAAE,IAAI,CAAC,sBAAsB;gBACxD,oBAAoB,EAAE,IAAI,CAAC,UAAU;gBACrC,4BAA4B,EAAE,IAAI,CAAC,UAAU;aAC9C,CAAC;SACH;;;OAAA;IAjFD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDACH;IAOrC;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACc;IAOvC;QADC,KAAK,CAAC,aAAa,EAAE,qBAAqB,CAAC;2DACG;IArB5B,UAAU;QAH9B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,UAAU,CAyF9B;IAAD,iBAAC;CAAA,CAzFuC,GAAG;;;;"}
@@ -6,7 +6,7 @@ import script from './related-tags.vue_rollup-plugin-vue=script.js';
6
6
  var __vue_script__ = script;
7
7
 
8
8
  /* template */
9
- var __vue_render__ = function() {
9
+ var __vue_render__ = function () {
10
10
  var _vm = this;
11
11
  var _h = _vm.$createElement;
12
12
  var _c = _vm._self._c || _h;
@@ -16,48 +16,55 @@ var __vue_render__ = function() {
16
16
  {
17
17
  tag: "component",
18
18
  staticClass: "x-list x-related-tags",
19
- attrs: { tag: "ul", "data-test": "related-tags" }
19
+ attrs: { tag: "ul", "data-test": "related-tags" },
20
20
  },
21
- _vm._l(_vm.relatedTags, function(relatedTag) {
21
+ _vm._l(_vm.relatedTags, function (relatedTag) {
22
22
  return _c(
23
23
  "li",
24
24
  {
25
25
  key: relatedTag.tag,
26
26
  staticClass: "x-related-tags__item",
27
- attrs: { "data-test": "related-tag-item" }
27
+ attrs: { "data-test": "related-tag-item" },
28
28
  },
29
29
  [
30
30
  _vm._t(
31
31
  "related-tag",
32
- function() {
32
+ function () {
33
33
  return [
34
34
  _c("RelatedTag", {
35
- attrs: { relatedTag: relatedTag },
35
+ attrs: {
36
+ highlightCurated: _vm.highlightCurated,
37
+ relatedTag: relatedTag,
38
+ },
36
39
  scopedSlots: _vm._u(
37
40
  [
38
41
  {
39
42
  key: "default",
40
- fn: function(ref) {
43
+ fn: function (ref) {
41
44
  var relatedTag = ref.relatedTag;
42
45
  var isSelected = ref.isSelected;
46
+ var shouldHighlightCurated =
47
+ ref.shouldHighlightCurated;
43
48
  return [
44
49
  _vm._t("related-tag-content", null, null, {
45
50
  relatedTag: relatedTag,
46
- isSelected: isSelected
47
- })
48
- ]
49
- }
50
- }
51
- ],
51
+ isSelected: isSelected,
52
+ shouldHighlightCurated:
53
+ shouldHighlightCurated,
54
+ }) ]
55
+ },
56
+ } ],
52
57
  null,
53
58
  true
54
- )
55
- })
56
- ]
59
+ ),
60
+ }) ]
57
61
  },
58
- { relatedTag: relatedTag }
59
- )
60
- ],
62
+ null,
63
+ {
64
+ relatedTag: relatedTag,
65
+ highlightCurated: _vm.highlightCurated,
66
+ }
67
+ ) ],
61
68
  2
62
69
  )
63
70
  }),
@@ -71,11 +78,11 @@ __vue_render__._withStripped = true;
71
78
  /* style */
72
79
  var __vue_inject_styles__ = function (inject) {
73
80
  if (!inject) { return }
74
- inject("data-v-4afc43ea_0", { source: ".x-related-tags[data-v-4afc43ea] {\n display: flex;\n list-style: none;\n}", map: undefined, media: undefined });
81
+ inject("data-v-04493c4b_0", { source: ".x-related-tags[data-v-04493c4b] {\n display: flex;\n list-style: none;\n}", map: undefined, media: undefined });
75
82
 
76
83
  };
77
84
  /* scoped */
78
- var __vue_scope_id__ = "data-v-4afc43ea";
85
+ var __vue_scope_id__ = "data-v-04493c4b";
79
86
  /* module identifier */
80
87
  var __vue_module_identifier__ = undefined;
81
88
  /* functional template */
@@ -1 +1 @@
1
- {"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-list x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.tag\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n -->\n <slot name=\"related-tag\" :relatedTag=\"relatedTag\">\n <RelatedTag :relatedTag=\"relatedTag\">\n <template #default=\"{ relatedTag, isSelected }\">\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n -->\n <slot name=\"related-tag-content\" v-bind=\"{ relatedTag, isSelected }\" />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { relatedTagsXModule } from '../x-module';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n @Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tags {\n display: flex;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a toy and press enter._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a toy and press Enter to see the related tags with the animation effect._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags animation=\"StaggeredFadeAndSlide\" :maxItemsToRender=\"3\"></RelatedTags>\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\"></RelatedTag>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a toy and see how the related tags are rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n <ResultsList></ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-list x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.tag\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} highlightCurated - True if the curated RTs should be displayed.\n -->\n <slot name=\"related-tag\" v-bind=\"{ relatedTag, highlightCurated }\">\n <RelatedTag :highlightCurated=\"highlightCurated\" :relatedTag=\"relatedTag\">\n <template #default=\"{ relatedTag, isSelected, shouldHighlightCurated }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n @binding {boolean} shouldHighlightCurated - True if the curated RTs should be displayed.\n -->\n <slot\n name=\"related-tag-content\"\n v-bind=\"{ relatedTag, isSelected, shouldHighlightCurated }\"\n />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { relatedTagsXModule } from '../x-module';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n @Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Flag to indicate if the curated tags should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tags {\n display: flex;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a toy and press enter._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a toy and press Enter to see the related tags with the animation effect._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags animation=\"StaggeredFadeAndSlide\" :maxItemsToRender=\"3\"></RelatedTags>\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\"></RelatedTag>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a toy and see how the related tags are rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n <ResultsList></ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -33,6 +33,9 @@ var RelatedTags = /** @class */ (function (_super) {
33
33
  __decorate([
34
34
  Prop()
35
35
  ], RelatedTags.prototype, "maxItemsToRender", void 0);
36
+ __decorate([
37
+ Prop({ default: false, type: Boolean })
38
+ ], RelatedTags.prototype, "highlightCurated", void 0);
36
39
  __decorate([
37
40
  Getter('relatedTags', 'relatedTags')
38
41
  ], RelatedTags.prototype, "storedRelatedTags", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"related-tags.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { relatedTagsXModule } from '../x-module';\nimport RelatedTag from './related-tag.vue';\n\n/**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n@Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n})\nexport default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AA2CA;;;;;;;;;AAaA;IAAyC,+BAAG;IAA5C;;KAuBC;IAHC,sBAAc,oCAAW;aAAzB;YACE,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAC/D;;;OAAA;IAfD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACE;IAQ1B;QADC,IAAI,EAAE;yDAC6B;IAGpC;QADC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;0DACQ;IAlB1B,WAAW;QAJ/B,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,UAAU,YAAA,EAAE;YAC1B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CAuB/B;IAAD,kBAAC;CAAA,CAvBwC,GAAG;;;;"}
1
+ {"version":3,"file":"related-tags.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { relatedTagsXModule } from '../x-module';\nimport RelatedTag from './related-tag.vue';\n\n/**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n@Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n})\nexport default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Flag to indicate if the curated tags should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAiDA;;;;;;;;;AAaA;IAAyC,+BAAG;IAA5C;;KA+BC;IAHC,sBAAc,oCAAW;aAAzB;YACE,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAC/D;;;OAAA;IAvBD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACE;IAQ1B;QADC,IAAI,EAAE;yDAC6B;IAQpC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDACH;IAGrC;QADC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;0DACQ;IA1B1B,WAAW;QAJ/B,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,UAAU,YAAA,EAAE;YAC1B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CA+B/B;IAAD,kBAAC;CAAA,CA/BwC,GAAG;;;;"}
@@ -5,7 +5,7 @@ import script from './main-scroll-item.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -63,6 +63,7 @@ import '../../../components/icons/plus.vue.js';
63
63
  import '../../../components/icons/search.vue.js';
64
64
  import '../../../components/icons/show.vue.js';
65
65
  import '../../../components/icons/search-tiny.vue.js';
66
+ import '../../../components/icons/tag.vue.js';
66
67
  import '../../../components/icons/trash-open.vue.js';
67
68
  import '../../../components/icons/trash.vue.js';
68
69
  import '../../../components/icons/trending-tiny.vue.js';
@@ -106,6 +107,8 @@ import { ScrollObserverKey } from './scroll.const.js';
106
107
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
107
108
  import '../../../components/layouts/single-column-layout.vue.js';
108
109
  import '../../../components/location-provider.vue.js';
110
+ import '../../../components/global-x-bus.vue.js';
111
+ import '../../../components/snippet-callbacks.vue.js';
109
112
  import '../../../components/items-list-injection.mixin.js';
110
113
 
111
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
1
+ {"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
@@ -5,7 +5,7 @@ import script from './scroll-to-top.vue_rollup-plugin-vue=script.js';
5
5
  var __vue_script__ = script;
6
6
 
7
7
  /* template */
8
- var __vue_render__ = function() {
8
+ var __vue_render__ = function () {
9
9
  var _vm = this;
10
10
  var _h = _vm.$createElement;
11
11
  var _c = _vm._self._c || _h;
@@ -19,15 +19,14 @@ var __vue_render__ = function() {
19
19
  _vm._g(
20
20
  {
21
21
  staticClass: "x-button x-scroll-to-top",
22
- attrs: { "data-test": "scroll-to-top", events: _vm.events }
22
+ attrs: { "data-test": "scroll-to-top", events: _vm.events },
23
23
  },
24
24
  _vm.$listeners
25
25
  ),
26
26
  [_vm._t("default")],
27
27
  2
28
28
  )
29
- : _vm._e()
30
- ],
29
+ : _vm._e() ],
31
30
  1
32
31
  )
33
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n v-on=\"$listeners\"\n class=\"x-button x-scroll-to-top\"\n data-test=\"scroll-to-top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { NoElement } from '../../../components/no-element';\n import { Dictionary } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { ScrollComponentState } from '../store';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n })\n export default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedScrollToTop`: the event is emitted after the user clicks the button. The event payload\n is the id of the scroll that it going to be scrolled.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n v-on=\"$listeners\"\n class=\"x-button x-scroll-to-top\"\n data-test=\"scroll-to-top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { NoElement } from '../../../components/no-element';\n import { Dictionary } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { ScrollComponentState } from '../store';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n })\n export default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedScrollToTop`: the event is emitted after the user clicks the button. The event payload\n is the id of the scroll that it going to be scrolled.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -63,6 +63,7 @@ import '../../../components/icons/plus.vue.js';
63
63
  import '../../../components/icons/search.vue.js';
64
64
  import '../../../components/icons/show.vue.js';
65
65
  import '../../../components/icons/search-tiny.vue.js';
66
+ import '../../../components/icons/tag.vue.js';
66
67
  import '../../../components/icons/trash-open.vue.js';
67
68
  import '../../../components/icons/trash.vue.js';
68
69
  import '../../../components/icons/trending-tiny.vue.js';
@@ -106,6 +107,8 @@ import { MainScrollId } from './scroll.const.js';
106
107
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
107
108
  import '../../../components/layouts/single-column-layout.vue.js';
108
109
  import '../../../components/location-provider.vue.js';
110
+ import '../../../components/global-x-bus.vue.js';
111
+ import '../../../components/snippet-callbacks.vue.js';
109
112
  import '../../../components/items-list-injection.mixin.js';
110
113
 
111
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}
1
+ {"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}