@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
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestion.vue.js","sources":["../../../../src/components/suggestions/base-suggestion.vue"],"sourcesContent":["<template>\n <button @click=\"emitEvents\" :class=\"dynamicCSSClasses\" class=\"x-suggestion\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Button content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {string} queryHTML - Suggestion's query with the matching part inside a `<span>` tag\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ suggestion, queryHTML }\">\n <span v-html=\"queryHTML\" :aria-label=\"suggestion.query\" class=\"x-suggestion__query\" />\n </slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { QueryFeature } from '../../types/origin';\n import { forEach } from '../../utils/object';\n import { normalizeString } from '../../utils/normalize';\n import { sanitize } from '../../utils/sanitize';\n import { VueCSSClasses } from '../../utils/types';\n import { XEventsTypes } from '../../wiring/events.types';\n\n /**\n * Renders a button with a default slot. It receives a query, which should be the query of the\n * module using this component, a suggestion, the {@link XEvent | XEvents} that will be emitted\n * on click with a given feature.\n *\n * The default slot receives the suggestion and the matched query has props.\n *\n * @public\n */\n @Component\n export default class BaseSuggestion extends Vue {\n /**\n * The normalized query of the module using this component.\n *\n * @public\n */\n @Prop({ default: '' })\n protected query!: string;\n\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * The feature from which the events will be emitted.\n *\n * @public\n */\n @Prop() //TODO: set to true when the suggestions components pass it.\n protected feature?: QueryFeature;\n\n /**\n * The {@link XEvent | XEvents} that will be emitted when selecting a suggestion.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestionSelectedEvents!: Partial<XEventsTypes>;\n\n /**\n * The event handler that will be triggered when clicking on a suggestion.\n *\n * @remarks\n * * UserAcceptedAQuery: suggestion.query\n * * UserSelectedASuggestion: suggestion\n * * Merges the events defined in the suggestionSelectedEvents prop and also emits them\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserAcceptedAQuery: this.suggestion.query,\n UserSelectedASuggestion: this.suggestion,\n ...this.suggestionSelectedEvents\n };\n }\n\n /**\n * Emits the events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n forEach(this.events, (event, payload) => {\n this.$x.emit(event, payload, {\n target: this.$el as HTMLElement,\n feature: this.feature\n });\n });\n }\n\n /**\n * Checks if the normalized suggestion query matches with the module's query so it has a\n * matching part.\n *\n * @returns If the query has a matching part or not.\n * @internal\n */\n protected get hasMatchingQuery(): boolean {\n return !!this.query && normalizeString(this.suggestion.query).includes(this.query);\n }\n\n /**\n * Generates css classes dynamically.\n *\n * @remarks\n * 'x-suggestion--matching added when the query should be matched.\n *\n * @returns The {@link VueCSSClasses} classes.\n * @public\n */\n protected get dynamicCSSClasses(): VueCSSClasses {\n return {\n 'x-suggestion--matching': this.hasMatchingQuery\n };\n }\n\n /**\n * Highlights the matching part of the suggestion query with the query passed as prop of the\n * component putting it inside a `<span>` tag.\n *\n * @remarks\n * The query prop should be normalized.\n *\n * @returns The suggestion's query with the matching part inside a `<span>` tag.\n * @public\n */\n protected get queryHTML(): string {\n if (this.hasMatchingQuery) {\n const matcherIndex = normalizeString(this.suggestion.query).indexOf(this.query);\n\n const [beginning, matching, end] = this.splitAt(\n this.suggestion.query,\n matcherIndex,\n this.query.length\n );\n\n const attrsMatching = 'data-test=\"matching-part\" class=\"x-suggestion__matching-part\"';\n return `${beginning}<span ${attrsMatching}>${matching}</span>${end}`;\n }\n\n return sanitize(this.suggestion.query);\n }\n\n /**\n * Splits the label in three parts based on two indexes.\n *\n * @param label - The string that will be divided in three parts.\n * @param start - The first index that the label will be divided by.\n * @param skip - The second index that the label will be divided by.\n *\n * @returns The three parts of the divided label.\n * @internal\n */\n protected splitAt(label: string, start: number, skip: number): [string, string, string] {\n const startPart = label.substr(0, start);\n const matchingPart = label.substr(start, skip);\n const endPart = label.substr(start + skip);\n\n return [sanitize(startPart), sanitize(matchingPart), sanitize(endPart)];\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis default suggestion component expects a suggestion to render and pass to its default slot, a\nnormalized query to compare with the suggestion's query and highlight its matching parts and events\nto emit when the suggestion is selected.\n\n## Default usage\n\n```vue\n<BaseSuggestion v-bind=\"{ query, suggestion, suggestionSelectedEvents }\" />\n```\n\n## Customized usage\n\n```vue\n<BaseSuggestion v-bind=\"{ query, suggestion, suggestionSelectedEvents }\">\n <template #default=\"{ suggestion, queryHTML }\">\n <span\n class=\"my-suggestion\"\n v-html=\"queryHTML\"\n :aria-label=\"suggestion.query\"\n />\n </template>\n</BaseSuggestion>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQuery`: the event is emitted after the user clicks the button. The event payload is\n the suggestion query data.\n- `UserSelectedASuggestion`: the event is emitted after the user clicks the button. The event\n payload is the suggestion data.\n- The component can emit more events on click using the `suggestionSelectedEvents` prop.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-suggestion.vue.js","sources":["../../../../src/components/suggestions/base-suggestion.vue"],"sourcesContent":["<template>\n <button @click=\"emitEvents\" :class=\"dynamicCSSClasses\" class=\"x-suggestion\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Button content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {string} queryHTML - Suggestion's query with the matching part inside a `<span>` tag\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ suggestion, queryHTML }\">\n <span v-html=\"queryHTML\" :aria-label=\"suggestion.query\" class=\"x-suggestion__query\" />\n </slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { QueryFeature } from '../../types/origin';\n import { forEach } from '../../utils/object';\n import { normalizeString } from '../../utils/normalize';\n import { sanitize } from '../../utils/sanitize';\n import { VueCSSClasses } from '../../utils/types';\n import { XEventsTypes } from '../../wiring/events.types';\n\n /**\n * Renders a button with a default slot. It receives a query, which should be the query of the\n * module using this component, a suggestion, the {@link XEvent | XEvents} that will be emitted\n * on click with a given feature.\n *\n * The default slot receives the suggestion and the matched query has props.\n *\n * @public\n */\n @Component\n export default class BaseSuggestion extends Vue {\n /**\n * The normalized query of the module using this component.\n *\n * @public\n */\n @Prop({ default: '' })\n protected query!: string;\n\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * The feature from which the events will be emitted.\n *\n * @public\n */\n @Prop() //TODO: set to true when the suggestions components pass it.\n protected feature?: QueryFeature;\n\n /**\n * The {@link XEvent | XEvents} that will be emitted when selecting a suggestion.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestionSelectedEvents!: Partial<XEventsTypes>;\n\n /**\n * The event handler that will be triggered when clicking on a suggestion.\n *\n * @remarks\n * * UserAcceptedAQuery: suggestion.query\n * * UserSelectedASuggestion: suggestion\n * * Merges the events defined in the suggestionSelectedEvents prop and also emits them\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserAcceptedAQuery: this.suggestion.query,\n UserSelectedASuggestion: this.suggestion,\n ...this.suggestionSelectedEvents\n };\n }\n\n /**\n * Emits the events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n forEach(this.events, (event, payload) => {\n this.$x.emit(event, payload, {\n target: this.$el as HTMLElement,\n feature: this.feature\n });\n });\n }\n\n /**\n * Checks if the normalized suggestion query matches with the module's query so it has a\n * matching part.\n *\n * @returns If the query has a matching part or not.\n * @internal\n */\n protected get hasMatchingQuery(): boolean {\n return !!this.query && normalizeString(this.suggestion.query).includes(this.query);\n }\n\n /**\n * Generates css classes dynamically.\n *\n * @remarks\n * 'x-suggestion--matching added when the query should be matched.\n *\n * @returns The {@link VueCSSClasses} classes.\n * @public\n */\n protected get dynamicCSSClasses(): VueCSSClasses {\n return {\n 'x-suggestion--matching': this.hasMatchingQuery\n };\n }\n\n /**\n * Highlights the matching part of the suggestion query with the query passed as prop of the\n * component putting it inside a `<span>` tag.\n *\n * @remarks\n * The query prop should be normalized.\n *\n * @returns The suggestion's query with the matching part inside a `<span>` tag.\n * @public\n */\n protected get queryHTML(): string {\n if (this.hasMatchingQuery) {\n const matcherIndex = normalizeString(this.suggestion.query).indexOf(this.query);\n\n const [beginning, matching, end] = this.splitAt(\n this.suggestion.query,\n matcherIndex,\n this.query.length\n );\n\n const attrsMatching = 'data-test=\"matching-part\" class=\"x-suggestion__matching-part\"';\n return `${beginning}<span ${attrsMatching}>${matching}</span>${end}`;\n }\n\n return sanitize(this.suggestion.query);\n }\n\n /**\n * Splits the label in three parts based on two indexes.\n *\n * @param label - The string that will be divided in three parts.\n * @param start - The first index that the label will be divided by.\n * @param skip - The second index that the label will be divided by.\n *\n * @returns The three parts of the divided label.\n * @internal\n */\n protected splitAt(label: string, start: number, skip: number): [string, string, string] {\n const startPart = label.substr(0, start);\n const matchingPart = label.substr(start, skip);\n const endPart = label.substr(start + skip);\n\n return [sanitize(startPart), sanitize(matchingPart), sanitize(endPart)];\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis default suggestion component expects a suggestion to render and pass to its default slot, a\nnormalized query to compare with the suggestion's query and highlight its matching parts and events\nto emit when the suggestion is selected.\n\n## Default usage\n\n```vue\n<BaseSuggestion v-bind=\"{ query, suggestion, suggestionSelectedEvents }\" />\n```\n\n## Customized usage\n\n```vue\n<BaseSuggestion v-bind=\"{ query, suggestion, suggestionSelectedEvents }\">\n <template #default=\"{ suggestion, queryHTML }\">\n <span\n class=\"my-suggestion\"\n v-html=\"queryHTML\"\n :aria-label=\"suggestion.query\"\n />\n </template>\n</BaseSuggestion>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQuery`: the event is emitted after the user clicks the button. The event payload is\n the suggestion query data.\n- `UserSelectedASuggestion`: the event is emitted after the user clicks the button. The event\n payload is the suggestion data.\n- The component can emit more events on click using the `suggestionSelectedEvents` prop.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,7 @@ import script from './base-suggestions.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,22 +16,21 @@ var __vue_render__ = function() {
16
16
  {
17
17
  tag: "component",
18
18
  staticClass: "x-list x-suggestions",
19
- attrs: { tag: "ul" }
19
+ attrs: { tag: "ul" },
20
20
  },
21
- _vm._l(_vm.suggestionsToRender, function(suggestion, index) {
21
+ _vm._l(_vm.suggestionsToRender, function (suggestion, index) {
22
22
  return _c(
23
23
  "li",
24
24
  {
25
25
  key: _vm.suggestionsKeys[index],
26
26
  staticClass: "x-suggestions__item",
27
- attrs: { "data-test": "suggestion-item" }
27
+ attrs: { "data-test": "suggestion-item" },
28
28
  },
29
29
  [
30
30
  _vm._t("default", null, null, {
31
31
  suggestion: suggestion,
32
- index: index
33
- })
34
- ],
32
+ index: index,
33
+ }) ],
35
34
  2
36
35
  )
37
36
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-list x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-suggestions__item\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n -->\n <slot v-bind=\"{ suggestion, index }\" />\n </li>\n </component>\n</template>\n\n<style lang=\"scss\" scoped>\n .x-suggestions {\n list-style-type: none;\n }\n</style>\n\n<script lang=\"ts\">\n import { Component, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet } from '@empathyco/x-types';\n import Vue from 'vue';\n import { isArrayEmpty } from '../../utils/array';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Vue {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestions.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Slices the suggestions from the state.\n *\n * @returns - The list of suggestions slice by the number of items to render.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' })\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target });\n }\n }\n};\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</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-list x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-suggestions__item\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n -->\n <slot v-bind=\"{ suggestion, index }\" />\n </li>\n </component>\n</template>\n\n<style lang=\"scss\" scoped>\n .x-suggestions {\n list-style-type: none;\n }\n</style>\n\n<script lang=\"ts\">\n import { Component, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet } from '@empathyco/x-types';\n import Vue from 'vue';\n import { isArrayEmpty } from '../../utils/array';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Vue {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestions.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Slices the suggestions from the state.\n *\n * @returns - The list of suggestions slice by the number of items to render.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' })\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target });\n }\n }\n};\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</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/js/index.js CHANGED
@@ -77,6 +77,7 @@ export { default as PlusIcon } from './components/icons/plus.vue.js';
77
77
  export { default as SearchIcon } from './components/icons/search.vue.js';
78
78
  export { default as ShowIcon } from './components/icons/show.vue.js';
79
79
  export { default as SearchTinyIcon } from './components/icons/search-tiny.vue.js';
80
+ export { default as TagIcon } from './components/icons/tag.vue.js';
80
81
  export { default as TrashOpenIcon } from './components/icons/trash-open.vue.js';
81
82
  export { default as TrashIcon } from './components/icons/trash.vue.js';
82
83
  export { default as TrendingTinyIcon } from './components/icons/trending-tiny.vue.js';
@@ -136,6 +137,8 @@ export { default as Scroll } from './x-modules/scroll/components/scroll.vue.js';
136
137
  export { default as MultiColumnMaxWidthLayout } from './components/layouts/multi-column-max-width-layout.vue.js';
137
138
  export { default as SingleColumnLayout } from './components/layouts/single-column-layout.vue.js';
138
139
  export { default as LocationProvider } from './components/location-provider.vue.js';
140
+ export { default as GlobalXBus } from './components/global-x-bus.vue.js';
141
+ export { default as SnippetCallbacks } from './components/snippet-callbacks.vue.js';
139
142
  export { ItemsListInjectionMixin } from './components/items-list-injection.mixin.js';
140
143
  export { infiniteScroll } from './directives/infinite-scroll/infinite-scroll.js';
141
144
  export { compileMessage } from './filters/compile-message.filter.js';
@@ -220,7 +223,7 @@ export { identifierHighlightRegexp } from './x-modules/identifier-results/store/
220
223
  export { identifierResultsRequest } from './x-modules/identifier-results/store/getters/identifier-results-request.getter.js';
221
224
  export { identifierResultsXStoreModule } from './x-modules/identifier-results/store/module.js';
222
225
  export { identifierResultsEmitters } from './x-modules/identifier-results/store/emitters.js';
223
- export { cancelFetchAndSaveIdentifierResultsWire, clearIdentifierResultsQuery, fetchAndSaveIdentifierResultsWire, identifierResultsWiring, saveIdentifierResultsOriginWire, setIdentifierResultsQuery } from './x-modules/identifier-results/wiring.js';
226
+ export { cancelFetchAndSaveIdentifierResultsWire, clearIdentifierResultsQuery, fetchAndSaveIdentifierResultsWire, identifierResultsWiring, saveIdentifierResultsOriginWire, setIdentifierResultsExtraParams, setIdentifierResultsQuery } from './x-modules/identifier-results/wiring.js';
224
227
  export { identifierResultsXModule } from './x-modules/identifier-results/x-module.js';
225
228
  export { default as IdentifierResult } from './x-modules/identifier-results/components/identifier-result.vue.js';
226
229
  export { default as IdentifierResults } from './x-modules/identifier-results/components/identifier-results.vue.js';
@@ -308,10 +311,12 @@ export { default as ClearSearchInput } from './x-modules/search-box/components/c
308
311
  export { default as SearchButton } from './x-modules/search-box/components/search-button.vue.js';
309
312
  export { default as SearchInput } from './x-modules/search-box/components/search-input.vue.js';
310
313
  export { DefaultSessionService } from './x-modules/tagging/service/session.service.js';
314
+ export { track } from './x-modules/tagging/store/actions/track.action.js';
311
315
  export { taggingXStoreModule } from './x-modules/tagging/store/module.js';
312
316
  export { taggingEmitters } from './x-modules/tagging/store/emitters.js';
313
- export { setConsent, setQueryTaggingDebounce, setSessionDuration, taggingWiring } from './x-modules/tagging/wiring.js';
317
+ export { setConsent, setQueryTaggingDebounce, setSessionDuration, taggingWiring, trackWire } from './x-modules/tagging/wiring.js';
314
318
  export { taggingXModule } from './x-modules/tagging/x-module.js';
319
+ export { default as Tagging } from './x-modules/tagging/components/tagging.vue.js';
315
320
  export { urlXStoreModule } from './x-modules/url/store/module.js';
316
321
  export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
317
322
  export { setInitialExtraParams, setParams, setUrlFilters, setUrlPage, setUrlQuery, setUrlRelatedTags, setUrlScroll, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
package/js/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,19 @@
1
1
  /**
2
2
  * Creates a {@link QueryOrigin} or a {@link ResultOrigin} string given a {@link QueryFeature} and
3
3
  * a {@link FeatureLocation}.
4
- * If it can't be created, it returns `undefined`.
4
+ * If it can't be created, it returns `null`.
5
5
  *
6
6
  * @param originInit - An object containing the needed properties to create a {@link QueryOrigin} or
7
7
  * a {@link ResultOrigin}.
8
+ *
8
9
  * @returns The composed origin, or `null` if it is not able to create the origin.
10
+ *
9
11
  * @internal
10
12
  */
11
13
  function createOrigin(_a) {
12
14
  var feature = _a.feature, location = _a.location;
13
- if (location && feature) {
14
- return feature + ":" + location;
15
+ if (feature) {
16
+ return feature + ":" + (location !== null && location !== void 0 ? location : 'none');
15
17
  }
16
18
  return null;
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"origin.js","sources":["../../../src/utils/origin.ts"],"sourcesContent":["import { QueryOrigin, QueryOriginInit, ResultOrigin } from '../types/origin';\n\n/**\n * Creates a {@link QueryOrigin} or a {@link ResultOrigin} string given a {@link QueryFeature} and\n * a {@link FeatureLocation}.\n * If it can't be created, it returns `undefined`.\n *\n * @param originInit - An object containing the needed properties to create a {@link QueryOrigin} or\n * a {@link ResultOrigin}.\n * @returns The composed origin, or `null` if it is not able to create the origin.\n * @internal\n */\nexport function createOrigin({\n feature,\n location\n}: QueryOriginInit): QueryOrigin | ResultOrigin | null {\n if (location && feature) {\n return `${feature}:${location}`;\n }\n return null;\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;;;SAUgB,YAAY,CAAC,EAGX;QAFhB,OAAO,aAAA,EACP,QAAQ,cAAA;IAER,IAAI,QAAQ,IAAI,OAAO,EAAE;QACvB,OAAU,OAAO,SAAI,QAAU,CAAC;KACjC;IACD,OAAO,IAAI,CAAC;AACd;;;;"}
1
+ {"version":3,"file":"origin.js","sources":["../../../src/utils/origin.ts"],"sourcesContent":["import { QueryOrigin, QueryOriginInit, ResultOrigin } from '../types/origin';\n\n/**\n * Creates a {@link QueryOrigin} or a {@link ResultOrigin} string given a {@link QueryFeature} and\n * a {@link FeatureLocation}.\n * If it can't be created, it returns `null`.\n *\n * @param originInit - An object containing the needed properties to create a {@link QueryOrigin} or\n * a {@link ResultOrigin}.\n *\n * @returns The composed origin, or `null` if it is not able to create the origin.\n *\n * @internal\n */\nexport function createOrigin({\n feature,\n location\n}: QueryOriginInit): QueryOrigin | ResultOrigin | null {\n if (feature) {\n return `${feature}:${location ?? 'none'}`;\n }\n return null;\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;;;;;SAYgB,YAAY,CAAC,EAGX;QAFhB,OAAO,aAAA,EACP,QAAQ,cAAA;IAER,IAAI,OAAO,EAAE;QACX,OAAU,OAAO,UAAI,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,MAAM,CAAE,CAAC;KAC3C;IACD,OAAO,IAAI,CAAC;AACd;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { noOp } from './function.js';
2
- import { StorageService } from '@empathyco/x-storage-service';
2
+ import { BrowserStorageService } from '@empathyco/x-storage-service';
3
3
 
4
4
  /**
5
5
  * Service instance of {@link @empathyco/x-storage-service#StorageService | storage service} if
@@ -10,7 +10,7 @@ import { StorageService } from '@empathyco/x-storage-service';
10
10
  * @internal
11
11
  */
12
12
  var localStorageService = typeof localStorage !== 'undefined'
13
- ? new StorageService(localStorage, 'x')
13
+ ? new BrowserStorageService(localStorage, 'x')
14
14
  : {
15
15
  clear: noOp,
16
16
  getItem: noOp,
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sources":["../../../src/utils/storage.ts"],"sourcesContent":["import { StorageService } from '@empathyco/x-storage-service';\nimport { noOp } from './function';\n\n/**\n * Service instance of {@link @empathyco/x-storage-service#StorageService | storage service} if\n * localStorage is available.\n * If not, required {@link @empathyco/x-storage-service#StorageService | storage service} functions\n * are initialized with empty implementations.\n *\n * @internal\n */\nexport const localStorageService =\n typeof localStorage !== 'undefined'\n ? new StorageService(localStorage, 'x')\n : {\n clear: noOp,\n getItem: noOp,\n setItem: noOp,\n removeItem: noOp\n };\n"],"names":[],"mappings":";;;AAGA;;;;;;;;IAQa,mBAAmB,GAC9B,OAAO,YAAY,KAAK,WAAW;MAC/B,IAAI,cAAc,CAAC,YAAY,EAAE,GAAG,CAAC;MACrC;QACE,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;;;;;"}
1
+ {"version":3,"file":"storage.js","sources":["../../../src/utils/storage.ts"],"sourcesContent":["import { BrowserStorageService, StorageService } from '@empathyco/x-storage-service';\nimport { noOp } from './function';\n\n/**\n * Service instance of {@link @empathyco/x-storage-service#StorageService | storage service} if\n * localStorage is available.\n * If not, required {@link @empathyco/x-storage-service#StorageService | storage service} functions\n * are initialized with empty implementations.\n *\n * @internal\n */\nexport const localStorageService: StorageService =\n typeof localStorage !== 'undefined'\n ? new BrowserStorageService(localStorage, 'x')\n : {\n clear: noOp,\n getItem: noOp,\n setItem: noOp,\n removeItem: noOp\n };\n"],"names":[],"mappings":";;;AAGA;;;;;;;;IAQa,mBAAmB,GAC9B,OAAO,YAAY,KAAK,WAAW;MAC/B,IAAI,qBAAqB,CAAC,YAAY,EAAE,GAAG,CAAC;MAC5C;QACE,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;;;;;"}
@@ -5,14 +5,14 @@ import script from './device-detector.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;
12
12
  return !_vm.force
13
13
  ? _c("GlobalEvents", {
14
14
  attrs: { target: "window" },
15
- on: { resize: _vm.throttledStoreWindowWidth }
15
+ on: { resize: _vm.throttledStoreWindowWidth },
16
16
  })
17
17
  : _vm._e()
18
18
  };
@@ -5,7 +5,7 @@ import script from './empathize.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;
@@ -17,18 +17,17 @@ var __vue_render__ = function() {
17
17
  staticClass: "x-empathize",
18
18
  attrs: { "data-test": "empathize" },
19
19
  on: {
20
- mousedown: function($event) {
20
+ mousedown: function ($event) {
21
21
  $event.preventDefault();
22
22
  },
23
23
  focusin: _vm.open,
24
- focusout: _vm.close
25
- }
24
+ focusout: _vm.close,
25
+ },
26
26
  },
27
27
  [_vm._t("default")],
28
28
  2
29
29
  )
30
- : _vm._e()
31
- ])
30
+ : _vm._e() ])
32
31
  };
33
32
  var __vue_staticRenderFns__ = [];
34
33
  __vue_render__._withStripped = true;
@@ -1 +1 @@
1
- {"version":3,"file":"empathize.vue.js","sources":["../../../../../src/x-modules/empathize/components/empathize.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <div\n v-if=\"isOpen\"\n @mousedown.prevent\n @focusin=\"open\"\n @focusout=\"close\"\n class=\"x-empathize\"\n data-test=\"empathize\"\n >\n <!-- @slot (Required) Modal container content -->\n <slot />\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import Component from 'vue-class-component';\n import { Prop } from 'vue-property-decorator';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import { Debounce } from '../../../components/decorators/debounce.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata, XEvent } from '../../../wiring';\n import { empathizeXModule } from '../x-module';\n\n /**\n * Component containing the empathize. It has a required slot to define its content and two props\n * to define when to open and close it: eventsToOpenEmpathize and eventsToCloseEmpathize.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(empathizeXModule)]\n })\n export default class Empathize extends Vue {\n /**\n * Animation component that will be used to animate the empathize.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n protected animation!: Vue;\n\n /**\n * Array of {@link XEvent | xEvents} to open the empathize.\n *\n * @public\n */\n @Prop({ default: () => ['UserFocusedSearchBox', 'UserIsTypingAQuery', 'UserClickedSearchBox'] })\n protected eventsToOpenEmpathize!: XEvent[];\n\n /**\n * Array of {@link XEvent | xEvents} to close the empathize.\n *\n * @public\n */\n @Prop({\n default: () => [\n 'UserClosedEmpathize',\n 'UserSelectedASuggestion',\n 'UserPressedEnter',\n 'UserBlurredSearchBox'\n ]\n })\n protected eventsToCloseEmpathize!: XEvent[];\n\n /**\n * The modal container is open.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Open empathize. This method will be executed on any event in\n * {@link Empathize.eventsToOpenEmpathize} and on DOM event `focusin` on Empathize root element.\n *\n * @param payload - The payload of the {@link XEvent}, that is unused in this case.\n * @param metadata - The {@link WireMetadata} of the event, used to emit the Empathize XEvents.\n *\n * @internal\n */\n @XOn(component => (component as Empathize).eventsToOpenEmpathize)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental\n open(payload: unknown, metadata: WireMetadata): void {\n this.changeOpenState(true, metadata);\n }\n\n /**\n * Close empathize. This method will be executed on any event in\n * {@link Empathize.eventsToCloseEmpathize} and on DOM event `focusout` on Empathize root\n * element.\n *\n * @param payload - The payload of the {@link XEvent}, that is unused in this case.\n * @param metadata - The {@link WireMetadata} of the event, used to emit the Empathize XEvents.\n *\n * @internal\n */\n @XOn(component => (component as Empathize).eventsToCloseEmpathize)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental\n close(payload: unknown, metadata: WireMetadata): void {\n this.changeOpenState(false, metadata);\n }\n\n /**\n * Changes the state of {@link Empathize.isOpen} assigning to it the value of `newOpenState`\n * parameter. Also emits the {@link XEvent | XEvents} `EmpathizeOpened` or `EmpathizeClosed` if\n * the state really changes.\n *\n * @param newOpenState - The new state to assign to {@link Empathize.isOpen}.\n * @param metadata - The {@link WireMetadata} to emit the {@link XEvent | XEvents}. If is\n * undefined, a this component is used as source of info for the metadata.\n *\n * @internal\n */\n @Debounce(0)\n changeOpenState(newOpenState: boolean, metadata: WireMetadata): void {\n if (this.isOpen !== newOpenState) {\n this.isOpen = newOpenState;\n this.$x.emit(\n this.isOpen ? 'EmpathizeOpened' : 'EmpathizeClosed',\n undefined,\n metadata ?? { moduleName: 'empathize', target: this.$el }\n );\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis component will listen to the configured events in `eventsToOpenEmpathize` and\n`eventsToCloseEmpathize` props and open/close itself accordingly. By default, those props values\nare:\n\n- Open: `UserFocusedSearchBox`, `'`UserIsTypingAQuery`, `'`UserClickedSearchBox` and\n- Close: `UserClosedEmpathize`, `UserSelectedASuggestion`, `UserPressedEnter`,\n 'UserBlurredSearchBox`\n\n## Basic examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<Empathize>\n <template #default>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n </template>\n</Empathize>\n```\n\nDefining custom values for the events to open and close the Empathize. For example opening it when\nthe search box loses the focus and closing it when the search box receives the focus:\n\n```vue\n<Empathize\n :eventsToOpenEmpathize=\"['UserBlurredSearchBox']\"\n :eventsToCloseEmpathize=\"['UserFocusedSearchBox']\"\n>\n <template #default>\n Please, type a query in the Search Box.\n </template>\n</Empathize>\n```\n\nAn animation can be used for the opening and closing using the `animation` prop. The animation, must\nbe a Component with a `Transition` with a slot inside:\n\n```vue\n<Empathize :animation=\"collapseFromTop\">\n <template #default>\n <PopularSearches/>\n </template>\n</Empathize>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `EmpathizeOpened`: the event is emitted after receiving an event to change the state `isOpen` to\n `true`. The event payload is undefined and can have a metadata with the module and the element\n that emitted it.\n- `EmpathizeClosed`: the event is emitted after receiving an event to change the state `isOpen` to\n `false`. The event payload is undefined and can have a metadata with the module and the element\n that emitted it.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"empathize.vue.js","sources":["../../../../../src/x-modules/empathize/components/empathize.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <div\n v-if=\"isOpen\"\n @mousedown.prevent\n @focusin=\"open\"\n @focusout=\"close\"\n class=\"x-empathize\"\n data-test=\"empathize\"\n >\n <!-- @slot (Required) Modal container content -->\n <slot />\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import Component from 'vue-class-component';\n import { Prop } from 'vue-property-decorator';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import { Debounce } from '../../../components/decorators/debounce.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata, XEvent } from '../../../wiring';\n import { empathizeXModule } from '../x-module';\n\n /**\n * Component containing the empathize. It has a required slot to define its content and two props\n * to define when to open and close it: eventsToOpenEmpathize and eventsToCloseEmpathize.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(empathizeXModule)]\n })\n export default class Empathize extends Vue {\n /**\n * Animation component that will be used to animate the empathize.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n protected animation!: Vue;\n\n /**\n * Array of {@link XEvent | xEvents} to open the empathize.\n *\n * @public\n */\n @Prop({ default: () => ['UserFocusedSearchBox', 'UserIsTypingAQuery', 'UserClickedSearchBox'] })\n protected eventsToOpenEmpathize!: XEvent[];\n\n /**\n * Array of {@link XEvent | xEvents} to close the empathize.\n *\n * @public\n */\n @Prop({\n default: () => [\n 'UserClosedEmpathize',\n 'UserSelectedASuggestion',\n 'UserPressedEnter',\n 'UserBlurredSearchBox'\n ]\n })\n protected eventsToCloseEmpathize!: XEvent[];\n\n /**\n * The modal container is open.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Open empathize. This method will be executed on any event in\n * {@link Empathize.eventsToOpenEmpathize} and on DOM event `focusin` on Empathize root element.\n *\n * @param payload - The payload of the {@link XEvent}, that is unused in this case.\n * @param metadata - The {@link WireMetadata} of the event, used to emit the Empathize XEvents.\n *\n * @internal\n */\n @XOn(component => (component as Empathize).eventsToOpenEmpathize)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental\n open(payload: unknown, metadata: WireMetadata): void {\n this.changeOpenState(true, metadata);\n }\n\n /**\n * Close empathize. This method will be executed on any event in\n * {@link Empathize.eventsToCloseEmpathize} and on DOM event `focusout` on Empathize root\n * element.\n *\n * @param payload - The payload of the {@link XEvent}, that is unused in this case.\n * @param metadata - The {@link WireMetadata} of the event, used to emit the Empathize XEvents.\n *\n * @internal\n */\n @XOn(component => (component as Empathize).eventsToCloseEmpathize)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental\n close(payload: unknown, metadata: WireMetadata): void {\n this.changeOpenState(false, metadata);\n }\n\n /**\n * Changes the state of {@link Empathize.isOpen} assigning to it the value of `newOpenState`\n * parameter. Also emits the {@link XEvent | XEvents} `EmpathizeOpened` or `EmpathizeClosed` if\n * the state really changes.\n *\n * @param newOpenState - The new state to assign to {@link Empathize.isOpen}.\n * @param metadata - The {@link WireMetadata} to emit the {@link XEvent | XEvents}. If is\n * undefined, a this component is used as source of info for the metadata.\n *\n * @internal\n */\n @Debounce(0)\n changeOpenState(newOpenState: boolean, metadata: WireMetadata): void {\n if (this.isOpen !== newOpenState) {\n this.isOpen = newOpenState;\n this.$x.emit(\n this.isOpen ? 'EmpathizeOpened' : 'EmpathizeClosed',\n undefined,\n metadata ?? { moduleName: 'empathize', target: this.$el }\n );\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis component will listen to the configured events in `eventsToOpenEmpathize` and\n`eventsToCloseEmpathize` props and open/close itself accordingly. By default, those props values\nare:\n\n- Open: `UserFocusedSearchBox`, `'`UserIsTypingAQuery`, `'`UserClickedSearchBox` and\n- Close: `UserClosedEmpathize`, `UserSelectedASuggestion`, `UserPressedEnter`,\n 'UserBlurredSearchBox`\n\n## Basic examples\n\nThe component rendering the query suggestions, popular searches and history queries with keyboard\nnavigation.\n\n```vue\n<Empathize>\n <template #default>\n <BaseKeyboardNavigation>\n <QuerySuggestions/>\n <PopularSearches/>\n <HistoryQueries/>\n </BaseKeyboardNavigation>\n </template>\n</Empathize>\n```\n\nDefining custom values for the events to open and close the Empathize. For example opening it when\nthe search box loses the focus and closing it when the search box receives the focus:\n\n```vue\n<Empathize\n :eventsToOpenEmpathize=\"['UserBlurredSearchBox']\"\n :eventsToCloseEmpathize=\"['UserFocusedSearchBox']\"\n>\n <template #default>\n Please, type a query in the Search Box.\n </template>\n</Empathize>\n```\n\nAn animation can be used for the opening and closing using the `animation` prop. The animation, must\nbe a Component with a `Transition` with a slot inside:\n\n```vue\n<Empathize :animation=\"collapseFromTop\">\n <template #default>\n <PopularSearches/>\n </template>\n</Empathize>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `EmpathizeOpened`: the event is emitted after receiving an event to change the state `isOpen` to\n `true`. The event payload is undefined and can have a metadata with the module and the element\n that emitted it.\n- `EmpathizeClosed`: the event is emitted after receiving an event to change the state `isOpen` to\n `false`. The event payload is undefined and can have a metadata with the module and the element\n that emitted it.\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';
@@ -104,6 +105,8 @@ import { xComponentMixin } from '../../../components/x-component.mixin.js';
104
105
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
105
106
  import '../../../components/layouts/single-column-layout.vue.js';
106
107
  import '../../../components/location-provider.vue.js';
108
+ import '../../../components/global-x-bus.vue.js';
109
+ import '../../../components/snippet-callbacks.vue.js';
107
110
  import '../../../components/items-list-injection.mixin.js';
108
111
  import { extraParamsXModule } from '../x-module.js';
109
112
 
@@ -1 +1 @@
1
- {"version":3,"file":"extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin, XEmit } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class ExtraParams extends Vue {\n /**\n * Emits the initial extra params, overriding with the state extra params, just in case, those\n * values were already set by XComponents initialization (url, plugin config, etc.).\n */\n mounted(): void {\n this.$x.emit('ExtraParamsInitialized', this.values);\n this.$x.emit('ExtraParamsProvided', { ...this.values, ...this.storeExtraParams });\n }\n\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n /**\n * State extra params. Used to override the initial extra params.\n */\n @State('extraParams', 'params')\n public storeExtraParams!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;AASA;IAAyC,+BAAG;IAA5C;;KA8BC;;;;;IAzBC,6BAAO,GAAP;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,wBAAO,IAAI,CAAC,MAAM,GAAK,IAAI,CAAC,gBAAgB,EAAG,CAAC;KACnF;;IAqBD,4BAAM,GAAN,eAAiB;IATjB;QAFC,KAAK,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;+CACW;IAMpC;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;yDACe;IA1B3B,WAAW;QAH/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CA8B/B;IAAD,kBAAC;CAAA,CA9BwC,GAAG;;;;"}
1
+ {"version":3,"file":"extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin, XEmit } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.ExtraParamsProvided} with the values\n * received as a prop.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class ExtraParams extends Vue {\n /**\n * Emits the initial extra params, overriding with the state extra params, just in case, those\n * values were already set by XComponents initialization (url, plugin config, etc.).\n */\n mounted(): void {\n this.$x.emit('ExtraParamsInitialized', this.values);\n this.$x.emit('ExtraParamsProvided', { ...this.values, ...this.storeExtraParams });\n }\n\n /**\n * (Required) A Dictionary where the keys are the extra param names and its values.\n *\n * @remarks Emits the {@link ExtraParamsXEvents.ExtraParamsProvided} when the\n * component is rendered or the values changed.\n *\n * @public\n */\n @XEmit('ExtraParamsProvided', { deep: true })\n @Prop({ required: true })\n public values!: Dictionary<unknown>;\n\n /**\n * State extra params. Used to override the initial extra params.\n */\n @State('extraParams', 'params')\n public storeExtraParams!: Dictionary<unknown>;\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;AASA;IAAyC,+BAAG;IAA5C;;KA8BC;;;;;IAzBC,6BAAO,GAAP;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,wBAAO,IAAI,CAAC,MAAM,GAAK,IAAI,CAAC,gBAAgB,EAAG,CAAC;KACnF;;IAqBD,4BAAM,GAAN,eAAiB;IATjB;QAFC,KAAK,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;+CACW;IAMpC;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;yDACe;IA1B3B,WAAW;QAH/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CA8B/B;IAAD,kBAAC;CAAA,CA9BwC,GAAG;;;;"}
@@ -5,7 +5,7 @@ import script from './renderless-extra-param.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;
@@ -14,9 +14,8 @@ var __vue_render__ = function() {
14
14
  [
15
15
  _vm._t("default", null, null, {
16
16
  value: _vm.value,
17
- updateValue: _vm.updateValue
18
- })
19
- ],
17
+ updateValue: _vm.updateValue,
18
+ }) ],
20
19
  2
21
20
  )
22
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"renderless-extra-param.vue.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue"],"sourcesContent":["<template>\n <NoElement>\n <slot v-bind=\"{ value, updateValue }\"></slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { NoElement, State, xComponentMixin } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n })\n export default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nRenders default slot content. It binds to the default slot the name of the extra parameter and the\ndefault value of it.\n\n## Basic usage\n\n```vue\n<template>\n <RenderlessExtraParam #default=\"{ value, updateValue }\" name=\"store\">\n <BaseDropdown @change=\"updateValue\" :value=\"value\" :items=\"items\" />\n </RenderlessExtraParam>\n</template>\n\n<script>\n import { RenderlessExtraParams } from '@empathyco/x-components/extra-params';\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'RenderlessExtraParamsDemo',\n components: {\n RenderlessExtraParams,\n BaseDropdown\n },\n props: ['name'],\n data() {\n return {\n items: ['spain', 'portugal']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"renderless-extra-param.vue.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue"],"sourcesContent":["<template>\n <NoElement>\n <slot v-bind=\"{ value, updateValue }\"></slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { NoElement, State, xComponentMixin } from '../../../components';\n import { Dictionary } from '../../../utils';\n import { extraParamsXModule } from '../x-module';\n\n /**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n })\n export default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nRenders default slot content. It binds to the default slot the name of the extra parameter and the\ndefault value of it.\n\n## Basic usage\n\n```vue\n<template>\n <RenderlessExtraParam #default=\"{ value, updateValue }\" name=\"store\">\n <BaseDropdown @change=\"updateValue\" :value=\"value\" :items=\"items\" />\n </RenderlessExtraParam>\n</template>\n\n<script>\n import { RenderlessExtraParams } from '@empathyco/x-components/extra-params';\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'RenderlessExtraParamsDemo',\n components: {\n RenderlessExtraParams,\n BaseDropdown\n },\n props: ['name'],\n data() {\n return {\n items: ['spain', 'portugal']\n };\n }\n };\n</script>\n```\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';
@@ -104,6 +105,8 @@ import { xComponentMixin } from '../../../components/x-component.mixin.js';
104
105
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
105
106
  import '../../../components/layouts/single-column-layout.vue.js';
106
107
  import '../../../components/location-provider.vue.js';
108
+ import '../../../components/global-x-bus.vue.js';
109
+ import '../../../components/snippet-callbacks.vue.js';
107
110
  import '../../../components/items-list-injection.mixin.js';
108
111
  import { extraParamsXModule } from '../x-module.js';
109
112
 
@@ -1 +1 @@
1
- {"version":3,"file":"renderless-extra-param.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n})\nexport default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAYA;IAAkD,wCAAG;IAArD;;KAsCC;IAdC,sBAAc,uCAAK;;;;;;;;aAAnB;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpC;;;OAAA;;;;;;;;IASS,0CAAW,GAArB,UAAsB,QAAiB;;QACrC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,YAAI,GAAC,IAAI,CAAC,IAAI,IAAG,QAAQ,MAAG,CAAC;KACnE;IA9BD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sDACJ;IAQrB;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;6DACU;IAftB,oBAAoB;QANxC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;YAC7C,UAAU,EAAE;gBACV,SAAS,WAAA;aACV;SACF,CAAC;OACmB,oBAAoB,CAsCxC;IAAD,2BAAC;CAAA,CAtCiD,GAAG;;;;"}
1
+ {"version":3,"file":"renderless-extra-param.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/renderless-extra-param.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { Dictionary } from '../../../utils';\nimport { extraParamsXModule } from '../x-module';\n\n/**\n * It emits a {@link ExtraParamsXEvents.UserChangedExtraParams} when the `updateValue`\n * is called.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(extraParamsXModule)],\n components: {\n NoElement\n }\n})\nexport default class RenderlessExtraParam extends Vue {\n /**\n * The extra param's name.\n *\n * @public\n */\n @Prop({ required: true })\n public name!: string;\n\n /**\n * A dictionary with the extra params in the store state.\n *\n * @public\n */\n @State('extraParams', 'params')\n public stateParams!: Dictionary<unknown>;\n\n /**\n * It returns the value of the extra param from the store.\n *\n * @returns - The value from the store.\n *\n * @internal\n */\n protected get value(): unknown {\n return this.stateParams[this.name];\n }\n\n /**\n * It sets the new value to the store.\n *\n * @param newValue - The new value of the extra param.\n *\n * @internal\n */\n protected updateValue(newValue: unknown): void {\n this.$x.emit('UserChangedExtraParams', { [this.name]: newValue });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAYA;IAAkD,wCAAG;IAArD;;KAsCC;IAdC,sBAAc,uCAAK;;;;;;;;aAAnB;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpC;;;OAAA;;;;;;;;IASS,0CAAW,GAArB,UAAsB,QAAiB;;QACrC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,YAAI,GAAC,IAAI,CAAC,IAAI,IAAG,QAAQ,MAAG,CAAC;KACnE;IA9BD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sDACJ;IAQrB;QADC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC;6DACU;IAftB,oBAAoB;QANxC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;YAC7C,UAAU,EAAE;gBACV,SAAS,WAAA;aACV;SACF,CAAC;OACmB,oBAAoB,CAsCxC;IAAD,2BAAC;CAAA,CAtCiD,GAAG;;;;"}
@@ -5,7 +5,7 @@ import script from './snippet-config-extra-params.vue_rollup-plugin-vue=script.j
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;
@@ -80,6 +80,7 @@ import '../../../components/icons/plus.vue.js';
80
80
  import '../../../components/icons/search.vue.js';
81
81
  import '../../../components/icons/show.vue.js';
82
82
  import '../../../components/icons/search-tiny.vue.js';
83
+ import '../../../components/icons/tag.vue.js';
83
84
  import '../../../components/icons/trash-open.vue.js';
84
85
  import '../../../components/icons/trash.vue.js';
85
86
  import '../../../components/icons/trending-tiny.vue.js';
@@ -121,6 +122,8 @@ import { xComponentMixin } from '../../../components/x-component.mixin.js';
121
122
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
122
123
  import '../../../components/layouts/single-column-layout.vue.js';
123
124
  import '../../../components/location-provider.vue.js';
125
+ import '../../../components/global-x-bus.vue.js';
126
+ import '../../../components/snippet-callbacks.vue.js';
124
127
  import '../../../components/items-list-injection.mixin.js';
125
128
  import { extraParamsXModule } from '../x-module.js';
126
129
  import ExtraParams from './extra-params.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"snippet-config-extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Watch, Inject } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components';\nimport { Dictionary, forEach } from '../../../utils';\nimport { SnippetConfig } from '../../../x-installer';\nimport { extraParamsXModule } from '../x-module';\nimport ExtraParams from './extra-params.vue';\n\n/**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n@Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams({\n instance,\n scope,\n lang,\n searchLang,\n consent,\n documentDirection,\n currency,\n ...snippetExtraParams\n }: SnippetConfig): void {\n forEach(snippetExtraParams, (name, value) => {\n this.$set(this.extraParams, name, value);\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAUA;IAAsD,4CAAG;IAAzD;QAAA,qEAyCC;;;;;;;;;QAxBW,iBAAW,GAAwB,EAAE,CAAC;;KAwBjD;;;;;;;;IAdC,kDAAe,GAAf,UAAgB,EASA;QAVhB,iBAcC;QAZC,IAAA,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,UAAU,gBAAA,EACV,OAAO,aAAA,EACP,iBAAiB,uBAAA,EACjB,QAAQ,cAAA,EACL,kBAAkB,cARP,uFASf,CADsB;QAErB,OAAO,CAAC,kBAAkB,EAAE,UAAC,IAAI,EAAE,KAAK;YACtC,KAAI,CAAC,IAAI,CAAC,KAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1C,CAAC,CAAC;KACJ;IAjCD;QADC,MAAM,CAAC,eAAe,CAAC;mEACa;IAoBrC;QADC,KAAK,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mEAcvD;IAxCkB,wBAAwB;QAJ5C,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,WAAW,aAAA,EAAE;YAC3B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,wBAAwB,CAyC5C;IAAD,+BAAC;CAAA,CAzCqD,GAAG;;;;"}
1
+ {"version":3,"file":"snippet-config-extra-params.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Watch, Inject } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components';\nimport { Dictionary, forEach } from '../../../utils';\nimport { SnippetConfig } from '../../../x-installer';\nimport { extraParamsXModule } from '../x-module';\nimport ExtraParams from './extra-params.vue';\n\n/**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n@Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams({\n instance,\n scope,\n lang,\n searchLang,\n consent,\n documentDirection,\n currency,\n ...snippetExtraParams\n }: SnippetConfig): void {\n forEach(snippetExtraParams, (name, value) => {\n this.$set(this.extraParams, name, value);\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;AAUA;IAAsD,4CAAG;IAAzD;QAAA,qEAyCC;;;;;;;;;QAxBW,iBAAW,GAAwB,EAAE,CAAC;;KAwBjD;;;;;;;;IAdC,kDAAe,GAAf,UAAgB,EASA;QAVhB,iBAcC;QAZC,IAAA,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,UAAU,gBAAA,EACV,OAAO,aAAA,EACP,iBAAiB,uBAAA,EACjB,QAAQ,cAAA,EACL,kBAAkB,cARP,uFASf,CADsB;QAErB,OAAO,CAAC,kBAAkB,EAAE,UAAC,IAAI,EAAE,KAAK;YACtC,KAAI,CAAC,IAAI,CAAC,KAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1C,CAAC,CAAC;KACJ;IAjCD;QADC,MAAM,CAAC,eAAe,CAAC;mEACa;IAoBrC;QADC,KAAK,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mEAcvD;IAxCkB,wBAAwB;QAJ5C,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,WAAW,aAAA,EAAE;YAC3B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,wBAAwB,CAyC5C;IAAD,+BAAC;CAAA,CAzCqD,GAAG;;;;"}
@@ -5,7 +5,7 @@ import script from './clear-filters.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;
@@ -18,24 +18,22 @@ var __vue_render__ = function() {
18
18
  attrs: {
19
19
  "data-test": "clear-filters",
20
20
  disabled: !_vm.areThereSelectedFilters,
21
- events: _vm.events
22
- }
21
+ events: _vm.events,
22
+ },
23
23
  },
24
24
  [
25
25
  _vm._t(
26
26
  "default",
27
- function() {
27
+ function () {
28
28
  return [
29
29
  _vm._v(
30
30
  "\n Clear Filters (" +
31
31
  _vm._s(_vm.facetsSelectedFilters.length) +
32
32
  ")\n "
33
- )
34
- ]
33
+ ) ]
35
34
  },
36
35
  { selectedFilters: _vm.facetsSelectedFilters }
37
- )
38
- ],
36
+ ) ],
39
37
  2
40
38
  )
41
39
  : _vm._e()
@@ -1 +1 @@
1
- {"version":3,"file":"clear-filters.vue.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"show\"\n class=\"x-button x-clear-filters\"\n data-test=\"clear-filters\"\n :disabled=\"!areThereSelectedFilters\"\n :events=\"events\"\n :class=\"cssClasses\"\n >\n <slot :selectedFilters=\"facetsSelectedFilters\">\n Clear Filters ({{ facetsSelectedFilters.length }})\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { VueCSSClasses } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { facetsXModule } from '../x-module';\n\n /**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class ClearFilters extends Vue {\n /**\n * It handles if the ClearFilters button is always visible no matter if there are not\n * filters selected. If false, the ClearFilters button is not visible whether\n * there are no filters selected.\n *\n * @public\n */\n @Prop({ default: false })\n public alwaysVisible!: boolean;\n\n /**\n * Array of facets ids that will be passed to event like payload.\n *\n * @public\n */\n @Prop()\n public facetsIds?: Array<Facet['id']>;\n\n /**\n * Get the selected filters from store.\n *\n * @internal\n */\n @Getter('facets', 'selectedFilters')\n public allSelectedFilters!: Filter[];\n\n /**\n * If alwaysVisible prop is true, ClearAllFilters button is always shown, but disabled\n * if there are no filters selected.\n * If alwaysVisible prop is false, ClearAllFilters button is shown whether there\n * are some filter selected.\n *\n * @returns True if alwaysVisible is true or in the opposite case true or false depends\n * on if there are selected filters or not.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.areThereSelectedFilters;\n }\n\n /**\n * Get selected filters.\n * If there are facets ids, get selected filters whose facet id match with some of facets ids.\n * If there aren't facets ids, get selected filters.\n *\n * @returns Array of selected filters depends on there are facets ids or not.\n * @internal\n */\n protected get facetsSelectedFilters(): Filter[] {\n if (this.facetsIds) {\n return this.allSelectedFilters.filter(\n filter => isFacetFilter(filter) && this.facetsIds!.includes(filter.facetId)\n );\n } else {\n return this.allSelectedFilters;\n }\n }\n\n /**\n * Check if there are selected filters.\n *\n * @returns True or false depends on if there are facets ids and if there are selected filters.\n * @internal\n */\n protected get areThereSelectedFilters(): boolean {\n return !!this.facetsSelectedFilters.length;\n }\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return this.facetsIds\n ? {\n UserClickedClearAllFilters: this.facetsIds\n }\n : {\n UserClickedClearAllFilters: undefined\n };\n }\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-clear-filters--has-not-selected-filters': !this.areThereSelectedFilters,\n 'x-clear-filters--has-selected-filters': this.areThereSelectedFilters\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis component renders a button, which on clicked emits the `UserClickedClearAllFilters` or\n`UserClickedClearAllFilters` event.\n\n## Basic usage\n\n```vue\n<ClearFilters />\n```\n\n## Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\nIn this example, show the custom message in button with always visible a true and list of facets\nids.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedClearAllFilters`: the event is emitted after the user clicks the button to clear a\n certain facets filter. The event payload is the id of the facets that are going to be cleared.\n- `UserClickedClearAllFilters`: the event is emitted after the user clicks the button. The event\n payload is undefined.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"clear-filters.vue.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-if=\"show\"\n class=\"x-button x-clear-filters\"\n data-test=\"clear-filters\"\n :disabled=\"!areThereSelectedFilters\"\n :events=\"events\"\n :class=\"cssClasses\"\n >\n <slot :selectedFilters=\"facetsSelectedFilters\">\n Clear Filters ({{ facetsSelectedFilters.length }})\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { VueCSSClasses } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { facetsXModule } from '../x-module';\n\n /**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(facetsXModule)]\n })\n export default class ClearFilters extends Vue {\n /**\n * It handles if the ClearFilters button is always visible no matter if there are not\n * filters selected. If false, the ClearFilters button is not visible whether\n * there are no filters selected.\n *\n * @public\n */\n @Prop({ default: false })\n public alwaysVisible!: boolean;\n\n /**\n * Array of facets ids that will be passed to event like payload.\n *\n * @public\n */\n @Prop()\n public facetsIds?: Array<Facet['id']>;\n\n /**\n * Get the selected filters from store.\n *\n * @internal\n */\n @Getter('facets', 'selectedFilters')\n public allSelectedFilters!: Filter[];\n\n /**\n * If alwaysVisible prop is true, ClearAllFilters button is always shown, but disabled\n * if there are no filters selected.\n * If alwaysVisible prop is false, ClearAllFilters button is shown whether there\n * are some filter selected.\n *\n * @returns True if alwaysVisible is true or in the opposite case true or false depends\n * on if there are selected filters or not.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.areThereSelectedFilters;\n }\n\n /**\n * Get selected filters.\n * If there are facets ids, get selected filters whose facet id match with some of facets ids.\n * If there aren't facets ids, get selected filters.\n *\n * @returns Array of selected filters depends on there are facets ids or not.\n * @internal\n */\n protected get facetsSelectedFilters(): Filter[] {\n if (this.facetsIds) {\n return this.allSelectedFilters.filter(\n filter => isFacetFilter(filter) && this.facetsIds!.includes(filter.facetId)\n );\n } else {\n return this.allSelectedFilters;\n }\n }\n\n /**\n * Check if there are selected filters.\n *\n * @returns True or false depends on if there are facets ids and if there are selected filters.\n * @internal\n */\n protected get areThereSelectedFilters(): boolean {\n return !!this.facetsSelectedFilters.length;\n }\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return this.facetsIds\n ? {\n UserClickedClearAllFilters: this.facetsIds\n }\n : {\n UserClickedClearAllFilters: undefined\n };\n }\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-clear-filters--has-not-selected-filters': !this.areThereSelectedFilters,\n 'x-clear-filters--has-selected-filters': this.areThereSelectedFilters\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis component renders a button, which on clicked emits the `UserClickedClearAllFilters` or\n`UserClickedClearAllFilters` event.\n\n## Basic usage\n\n```vue\n<ClearFilters />\n```\n\n## Customizing its contents\n\nIn this example, show the custom message in button.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\nIn this example, show the custom message in button with always visible a true and list of facets\nids.\n\n```vue\n<ClearFilters v-slot=\"{ selectedFilters }\" :alwaysVisible=\"true\" :facetsIds=\"facetsIds\">\n Delete {{ selectedFilters.length }} selected\n</ClearFilters>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedClearAllFilters`: the event is emitted after the user clicks the button to clear a\n certain facets filter. The event payload is the id of the facets that are going to be cleared.\n- `UserClickedClearAllFilters`: the event is emitted after the user clicks the button. The event\n payload is undefined.\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';
@@ -104,6 +105,8 @@ import { xComponentMixin } from '../../../components/x-component.mixin.js';
104
105
  import '../../../components/layouts/multi-column-max-width-layout.vue.js';
105
106
  import '../../../components/layouts/single-column-layout.vue.js';
106
107
  import '../../../components/location-provider.vue.js';
108
+ import '../../../components/global-x-bus.vue.js';
109
+ import '../../../components/snippet-callbacks.vue.js';
107
110
  import '../../../components/items-list-injection.mixin.js';
108
111
  import { isFacetFilter } from '@empathyco/x-types';
109
112
  import { facetsXModule } from '../x-module.js';
@@ -1 +1 @@
1
- {"version":3,"file":"clear-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { Getter, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { VueCSSClasses } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { facetsXModule } from '../x-module';\n\n/**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\n@Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class ClearFilters extends Vue {\n /**\n * It handles if the ClearFilters button is always visible no matter if there are not\n * filters selected. If false, the ClearFilters button is not visible whether\n * there are no filters selected.\n *\n * @public\n */\n @Prop({ default: false })\n public alwaysVisible!: boolean;\n\n /**\n * Array of facets ids that will be passed to event like payload.\n *\n * @public\n */\n @Prop()\n public facetsIds?: Array<Facet['id']>;\n\n /**\n * Get the selected filters from store.\n *\n * @internal\n */\n @Getter('facets', 'selectedFilters')\n public allSelectedFilters!: Filter[];\n\n /**\n * If alwaysVisible prop is true, ClearAllFilters button is always shown, but disabled\n * if there are no filters selected.\n * If alwaysVisible prop is false, ClearAllFilters button is shown whether there\n * are some filter selected.\n *\n * @returns True if alwaysVisible is true or in the opposite case true or false depends\n * on if there are selected filters or not.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.areThereSelectedFilters;\n }\n\n /**\n * Get selected filters.\n * If there are facets ids, get selected filters whose facet id match with some of facets ids.\n * If there aren't facets ids, get selected filters.\n *\n * @returns Array of selected filters depends on there are facets ids or not.\n * @internal\n */\n protected get facetsSelectedFilters(): Filter[] {\n if (this.facetsIds) {\n return this.allSelectedFilters.filter(\n filter => isFacetFilter(filter) && this.facetsIds!.includes(filter.facetId)\n );\n } else {\n return this.allSelectedFilters;\n }\n }\n\n /**\n * Check if there are selected filters.\n *\n * @returns True or false depends on if there are facets ids and if there are selected filters.\n * @internal\n */\n protected get areThereSelectedFilters(): boolean {\n return !!this.facetsSelectedFilters.length;\n }\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return this.facetsIds\n ? {\n UserClickedClearAllFilters: this.facetsIds\n }\n : {\n UserClickedClearAllFilters: undefined\n };\n }\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-clear-filters--has-not-selected-filters': !this.areThereSelectedFilters,\n 'x-clear-filters--has-selected-filters': this.areThereSelectedFilters\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;;;AASA;IAA0C,gCAAG;IAA7C;;KAkGC;IA5DC,sBAAc,8BAAI;;;;;;;;;;;;aAAlB;YACE,OAAO,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,uBAAuB,CAAC;SAC3D;;;OAAA;IAUD,sBAAc,+CAAqB;;;;;;;;;aAAnC;YAAA,iBAQC;YAPC,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CACnC,UAAA,MAAM,IAAI,OAAA,aAAa,CAAC,MAAM,CAAC,IAAI,KAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAA,CAC5E,CAAC;aACH;iBAAM;gBACL,OAAO,IAAI,CAAC,kBAAkB,CAAC;aAChC;SACF;;;OAAA;IAQD,sBAAc,iDAAuB;;;;;;;aAArC;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;SAC5C;;;OAAA;IAQD,sBAAc,gCAAM;;;;;;;aAApB;YACE,OAAO,IAAI,CAAC,SAAS;kBACjB;oBACE,0BAA0B,EAAE,IAAI,CAAC,SAAS;iBAC3C;kBACD;oBACE,0BAA0B,EAAE,SAAS;iBACtC,CAAC;SACP;;;OAAA;IAQD,sBAAc,oCAAU;;;;;;;aAAxB;YACE,OAAO;gBACL,2CAA2C,EAAE,CAAC,IAAI,CAAC,uBAAuB;gBAC1E,uCAAuC,EAAE,IAAI,CAAC,uBAAuB;aACtE,CAAC;SACH;;;OAAA;IAxFD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;uDACM;IAQ/B;QADC,IAAI,EAAE;mDAC+B;IAQtC;QADC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC;4DACC;IAzBlB,YAAY;QAJhC,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;YAC/B,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAkGhC;IAAD,mBAAC;CAAA,CAlGyC,GAAG;;;;"}
1
+ {"version":3,"file":"clear-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/facets/components/clear-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Facet, Filter, isFacetFilter } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { Getter, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { VueCSSClasses } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { facetsXModule } from '../x-module';\n\n/**\n * Renders a simple button, emitting the needed events when clicked.\n *\n * @public\n */\n@Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class ClearFilters extends Vue {\n /**\n * It handles if the ClearFilters button is always visible no matter if there are not\n * filters selected. If false, the ClearFilters button is not visible whether\n * there are no filters selected.\n *\n * @public\n */\n @Prop({ default: false })\n public alwaysVisible!: boolean;\n\n /**\n * Array of facets ids that will be passed to event like payload.\n *\n * @public\n */\n @Prop()\n public facetsIds?: Array<Facet['id']>;\n\n /**\n * Get the selected filters from store.\n *\n * @internal\n */\n @Getter('facets', 'selectedFilters')\n public allSelectedFilters!: Filter[];\n\n /**\n * If alwaysVisible prop is true, ClearAllFilters button is always shown, but disabled\n * if there are no filters selected.\n * If alwaysVisible prop is false, ClearAllFilters button is shown whether there\n * are some filter selected.\n *\n * @returns True if alwaysVisible is true or in the opposite case true or false depends\n * on if there are selected filters or not.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.areThereSelectedFilters;\n }\n\n /**\n * Get selected filters.\n * If there are facets ids, get selected filters whose facet id match with some of facets ids.\n * If there aren't facets ids, get selected filters.\n *\n * @returns Array of selected filters depends on there are facets ids or not.\n * @internal\n */\n protected get facetsSelectedFilters(): Filter[] {\n if (this.facetsIds) {\n return this.allSelectedFilters.filter(\n filter => isFacetFilter(filter) && this.facetsIds!.includes(filter.facetId)\n );\n } else {\n return this.allSelectedFilters;\n }\n }\n\n /**\n * Check if there are selected filters.\n *\n * @returns True or false depends on if there are facets ids and if there are selected filters.\n * @internal\n */\n protected get areThereSelectedFilters(): boolean {\n return !!this.facetsSelectedFilters.length;\n }\n\n /**\n * The events that will be emitted when the button clear filters is clicked.\n *\n * @returns The events to be emitted when the button clear filters is clicked.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return this.facetsIds\n ? {\n UserClickedClearAllFilters: this.facetsIds\n }\n : {\n UserClickedClearAllFilters: undefined\n };\n }\n\n /**\n * Dynamic CSS classes to apply to the component.\n *\n * @returns The dynamic CSS classes to apply to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-clear-filters--has-not-selected-filters': !this.areThereSelectedFilters,\n 'x-clear-filters--has-selected-filters': this.areThereSelectedFilters\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;;;AASA;IAA0C,gCAAG;IAA7C;;KAkGC;IA5DC,sBAAc,8BAAI;;;;;;;;;;;;aAAlB;YACE,OAAO,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,uBAAuB,CAAC;SAC3D;;;OAAA;IAUD,sBAAc,+CAAqB;;;;;;;;;aAAnC;YAAA,iBAQC;YAPC,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CACnC,UAAA,MAAM,IAAI,OAAA,aAAa,CAAC,MAAM,CAAC,IAAI,KAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAA,CAC5E,CAAC;aACH;iBAAM;gBACL,OAAO,IAAI,CAAC,kBAAkB,CAAC;aAChC;SACF;;;OAAA;IAQD,sBAAc,iDAAuB;;;;;;;aAArC;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;SAC5C;;;OAAA;IAQD,sBAAc,gCAAM;;;;;;;aAApB;YACE,OAAO,IAAI,CAAC,SAAS;kBACjB;oBACE,0BAA0B,EAAE,IAAI,CAAC,SAAS;iBAC3C;kBACD;oBACE,0BAA0B,EAAE,SAAS;iBACtC,CAAC;SACP;;;OAAA;IAQD,sBAAc,oCAAU;;;;;;;aAAxB;YACE,OAAO;gBACL,2CAA2C,EAAE,CAAC,IAAI,CAAC,uBAAuB;gBAC1E,uCAAuC,EAAE,IAAI,CAAC,uBAAuB;aACtE,CAAC;SACH;;;OAAA;IAxFD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;uDACM;IAQ/B;QADC,IAAI,EAAE;mDAC+B;IAQtC;QADC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC;4DACC;IAzBlB,YAAY;QAJhC,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;YAC/B,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAkGhC;IAAD,mBAAC;CAAA,CAlGyC,GAAG;;;;"}
@@ -64,6 +64,7 @@ import '../../../../components/icons/plus.vue.js';
64
64
  import '../../../../components/icons/search.vue.js';
65
65
  import '../../../../components/icons/show.vue.js';
66
66
  import '../../../../components/icons/search-tiny.vue.js';
67
+ import '../../../../components/icons/tag.vue.js';
67
68
  import '../../../../components/icons/trash-open.vue.js';
68
69
  import '../../../../components/icons/trash.vue.js';
69
70
  import '../../../../components/icons/trending-tiny.vue.js';
@@ -105,6 +106,8 @@ import { xComponentMixin } from '../../../../components/x-component.mixin.js';
105
106
  import '../../../../components/layouts/multi-column-max-width-layout.vue.js';
106
107
  import '../../../../components/layouts/single-column-layout.vue.js';
107
108
  import '../../../../components/location-provider.vue.js';
109
+ import '../../../../components/global-x-bus.vue.js';
110
+ import '../../../../components/snippet-callbacks.vue.js';
108
111
  import '../../../../components/items-list-injection.mixin.js';
109
112
  import { facetsXModule } from '../../x-module.js';
110
113