@empathyco/x-components 3.0.0-alpha.39 → 3.0.0-alpha.43

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 (273) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/core/index.js +6 -2
  3. package/core/index.js.map +1 -1
  4. package/design-system/base.css +2 -1
  5. package/design-system/default-theme.css +98 -35
  6. package/design-system/full-theme.css +324 -45
  7. package/design-system/grid-default.css +6 -0
  8. package/design-system/input-group-default.css +16 -7
  9. package/design-system/list-default.css +0 -5
  10. package/design-system/option-list-bottom.css +76 -10
  11. package/design-system/option-list-default.css +39 -2
  12. package/design-system/result-default.css +1 -1
  13. package/design-system/sliding-panel-default.css +15 -17
  14. package/design-system/sliding-panel-default.token.css +0 -2
  15. package/design-system/typography-default.css +1 -0
  16. package/design-system/utilities-background-color.css +3 -0
  17. package/design-system/utilities-border-color.css +3 -0
  18. package/design-system/utilities-flex.css +32 -0
  19. package/design-system/utilities-font-color.css +3 -0
  20. package/design-system/utilities-font-size.css +79 -0
  21. package/design-system/utilities-line-height.css +17 -0
  22. package/design-system/utilities-text-decoration.css +15 -0
  23. package/design-system/utilities-text-transform.css +11 -0
  24. package/docs/API-reference/api/x-adapter.empathynextquery.md +1 -0
  25. package/docs/API-reference/api/x-adapter.empathynextquery.source.md +11 -0
  26. package/docs/API-reference/api/{x-components.resetpage.md → x-components.arrowdownicon.md} +3 -5
  27. package/docs/API-reference/api/{x-components.resetsort.md → x-components.arrowlefticon.md} +3 -5
  28. package/docs/API-reference/api/{x-components.resetfacets.md → x-components.arrowrighticon.md} +3 -5
  29. package/docs/API-reference/api/{x-components.arrowicon.md → x-components.arrowupicon.md} +2 -2
  30. package/docs/API-reference/api/x-components.cancelfetchandsavesearchresponsewire.md +1 -1
  31. package/docs/API-reference/api/x-components.fetchandsavesearchresponsewire.md +1 -1
  32. package/docs/API-reference/api/x-components.getnewandupdatedkeys.md +27 -0
  33. package/docs/API-reference/api/x-components.grid2rowsicon.md +11 -0
  34. package/docs/API-reference/api/x-components.increasepageappendingresults.md +1 -1
  35. package/docs/API-reference/api/x-components.md +12 -7
  36. package/docs/API-reference/api/x-components.nextqueries.highlightcurated.md +13 -0
  37. package/docs/API-reference/api/x-components.nextquery.highlightcurated.md +13 -0
  38. package/docs/API-reference/api/x-components.nextquery.md +1 -0
  39. package/docs/API-reference/api/x-components.resetappending.md +1 -1
  40. package/docs/API-reference/api/x-components.resetspellcheckquery.md +1 -1
  41. package/docs/API-reference/api/x-components.resetstatewire.md +13 -0
  42. package/docs/API-reference/api/x-components.saveoriginwire.md +1 -1
  43. package/docs/API-reference/api/x-components.scroll.md +1 -3
  44. package/docs/API-reference/api/x-components.scrollmixin.md +1 -0
  45. package/docs/API-reference/api/x-components.scrollmixin.reseton.md +13 -0
  46. package/docs/API-reference/api/x-components.searchactions.md +1 -0
  47. package/docs/API-reference/api/x-components.searchactions.resetstate.md +24 -0
  48. package/docs/API-reference/api/x-components.searchxevents.md +1 -0
  49. package/docs/API-reference/api/x-components.searchxevents.searchrequestupdated.md +13 -0
  50. package/docs/API-reference/api/x-components.setpagesize.md +1 -1
  51. package/docs/API-reference/api/x-components.setquerytagginginfo.md +13 -0
  52. package/docs/API-reference/api/x-components.setrelatedtags.md +1 -1
  53. package/docs/API-reference/api/x-components.setsearchextraparams.md +1 -1
  54. package/docs/API-reference/api/x-components.setsearchpage.md +1 -1
  55. package/docs/API-reference/api/x-components.setsearchquery.md +1 -1
  56. package/docs/API-reference/api/x-components.setselectedfilters.md +1 -1
  57. package/docs/API-reference/api/x-components.setsort.md +1 -1
  58. package/docs/API-reference/api/x-components.seturlparams.md +1 -1
  59. package/docs/API-reference/api/x-components.slidingpanel.md +2 -12
  60. package/docs/API-reference/api/x-components.slidingpanel.resetoncontentchange.md +13 -0
  61. package/docs/API-reference/api/x-components.slidingpanel.scrollfactor.md +1 -1
  62. package/docs/API-reference/api/x-components.slidingpanel.showbuttons.md +1 -1
  63. package/docs/API-reference/api/x-components.taggingmutations.md +1 -0
  64. package/docs/API-reference/api/x-components.taggingmutations.setquerytagginginfo.md +24 -0
  65. package/docs/API-reference/api/x-components.taggingstate.md +1 -0
  66. package/docs/API-reference/api/x-components.taggingstate.querytagginginfo.md +13 -0
  67. package/docs/API-reference/api/x-components.taggingxevents.md +1 -0
  68. package/docs/API-reference/api/x-components.taggingxevents.searchtaggingreceived.md +13 -0
  69. package/docs/API-reference/api/x-components.trackquerywire.md +1 -1
  70. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.md +21 -0
  71. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.newrequest.md +11 -0
  72. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.oldrequest.md +11 -0
  73. package/docs/API-reference/api/x-components.wiremetadata.md +1 -0
  74. package/docs/API-reference/api/x-components.wiremetadata.oldvalue.md +13 -0
  75. package/docs/API-reference/api/x-types.nextquery.iscurated.md +13 -0
  76. package/docs/API-reference/api/x-types.nextquery.md +6 -0
  77. package/docs/API-reference/components/common/icons/x-components.arrow-down.md +7 -0
  78. package/docs/API-reference/components/common/icons/x-components.arrow-left.md +7 -0
  79. package/docs/API-reference/components/common/icons/x-components.arrow-right.md +7 -0
  80. package/docs/API-reference/components/common/icons/x-components.arrow-up.md +7 -0
  81. package/docs/API-reference/components/common/icons/x-components.grid-2-rows.md +7 -0
  82. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +52 -33
  83. package/docs/API-reference/components/common/x-components.sliding-panel.md +192 -33
  84. package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -11
  85. package/docs/API-reference/components/next-queries/x-components.next-query.md +16 -7
  86. package/docs/API-reference/components/scroll/x-components.scroll.md +5 -8
  87. package/js/components/icons/arrow-down.vue.js +61 -0
  88. package/js/components/icons/arrow-down.vue.js.map +1 -0
  89. package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js +4 -0
  90. package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js.map +1 -0
  91. package/js/components/icons/{arrow.vue.js → arrow-left.vue.js} +2 -2
  92. package/js/components/icons/arrow-left.vue.js.map +1 -0
  93. package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js +4 -0
  94. package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js.map +1 -0
  95. package/js/components/icons/arrow-right.vue.js +61 -0
  96. package/js/components/icons/arrow-right.vue.js.map +1 -0
  97. package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js +4 -0
  98. package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js.map +1 -0
  99. package/js/components/icons/arrow-up.vue.js +61 -0
  100. package/js/components/icons/arrow-up.vue.js.map +1 -0
  101. package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js +4 -0
  102. package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js.map +1 -0
  103. package/js/components/icons/grid-2-rows.vue.js +65 -0
  104. package/js/components/icons/grid-2-rows.vue.js.map +1 -0
  105. package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js +4 -0
  106. package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js.map +1 -0
  107. package/js/components/icons/tag.vue.js +1 -1
  108. package/js/components/icons/tag.vue.js.map +1 -1
  109. package/js/components/scroll/base-scroll.vue.js +2 -2
  110. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  111. package/js/components/scroll/scroll.mixin.js +12 -6
  112. package/js/components/scroll/scroll.mixin.js.map +1 -1
  113. package/js/components/sliding-panel.vue.js +2 -2
  114. package/js/components/sliding-panel.vue.js.map +1 -1
  115. package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js +56 -40
  116. package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js.map +1 -1
  117. package/js/index.js +8 -4
  118. package/js/index.js.map +1 -1
  119. package/js/plugins/x-emitters.js +3 -3
  120. package/js/plugins/x-emitters.js.map +1 -1
  121. package/js/utils/object.js +17 -1
  122. package/js/utils/object.js.map +1 -1
  123. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +5 -1
  124. package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  125. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +5 -1
  126. package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
  127. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +5 -1
  128. package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
  129. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +5 -1
  130. package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  131. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +5 -1
  132. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
  133. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +5 -1
  134. package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  135. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +5 -1
  136. package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  137. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +5 -1
  138. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  139. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +5 -1
  140. package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  141. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +5 -1
  142. package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  143. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +5 -1
  144. package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
  145. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +5 -1
  146. package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
  147. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +5 -1
  148. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
  149. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +5 -1
  150. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
  151. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +5 -1
  152. package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  153. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +5 -1
  154. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  155. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +5 -1
  156. package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
  157. package/js/x-modules/facets/wiring.js +3 -0
  158. package/js/x-modules/facets/wiring.js.map +1 -1
  159. package/js/x-modules/next-queries/components/next-queries.vue.js +15 -4
  160. package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
  161. package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +3 -0
  162. package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js.map +1 -1
  163. package/js/x-modules/next-queries/components/next-query.vue.js +6 -1
  164. package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
  165. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +18 -0
  166. package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
  167. package/js/x-modules/related-tags/wiring.js +3 -0
  168. package/js/x-modules/related-tags/wiring.js.map +1 -1
  169. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +5 -1
  170. package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
  171. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +5 -1
  172. package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
  173. package/js/x-modules/scroll/components/scroll.vue.js +14 -13
  174. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
  175. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +2 -9
  176. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  177. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +5 -1
  178. package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  179. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +5 -1
  180. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
  181. package/js/x-modules/search/components/sort.mixin.js +5 -1
  182. package/js/x-modules/search/components/sort.mixin.js.map +1 -1
  183. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +5 -1
  184. package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
  185. package/js/x-modules/search/store/actions/increase-page-apending-results.action.js +1 -1
  186. package/js/x-modules/search/store/actions/increase-page-apending-results.action.js.map +1 -1
  187. package/js/x-modules/search/store/actions/reset-state.action.js +32 -0
  188. package/js/x-modules/search/store/actions/reset-state.action.js.map +1 -0
  189. package/js/x-modules/search/store/emitters.js +6 -0
  190. package/js/x-modules/search/store/emitters.js.map +1 -1
  191. package/js/x-modules/search/store/module.js +2 -0
  192. package/js/x-modules/search/store/module.js.map +1 -1
  193. package/js/x-modules/search/wiring.js +15 -32
  194. package/js/x-modules/search/wiring.js.map +1 -1
  195. package/js/x-modules/tagging/store/emitters.js +2 -4
  196. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  197. package/js/x-modules/tagging/store/module.js +5 -1
  198. package/js/x-modules/tagging/store/module.js.map +1 -1
  199. package/js/x-modules/tagging/wiring.js +15 -6
  200. package/js/x-modules/tagging/wiring.js.map +1 -1
  201. package/package.json +4 -4
  202. package/report/x-adapter.api.json +26 -0
  203. package/report/x-components.api.json +589 -292
  204. package/report/x-components.api.md +68 -35
  205. package/report/x-types.api.json +28 -1
  206. package/search/index.js +1 -1
  207. package/tagging/index.js +1 -1
  208. package/types/components/icons/arrow-down.vue.d.ts +3 -0
  209. package/types/components/icons/arrow-down.vue.d.ts.map +1 -0
  210. package/types/components/icons/arrow-left.vue.d.ts +3 -0
  211. package/types/components/icons/arrow-left.vue.d.ts.map +1 -0
  212. package/types/components/icons/arrow-right.vue.d.ts +3 -0
  213. package/types/components/icons/arrow-right.vue.d.ts.map +1 -0
  214. package/types/components/icons/arrow-up.vue.d.ts +3 -0
  215. package/types/components/icons/arrow-up.vue.d.ts.map +1 -0
  216. package/types/components/icons/grid-2-rows.vue.d.ts +3 -0
  217. package/types/components/icons/grid-2-rows.vue.d.ts.map +1 -0
  218. package/types/components/icons/index.d.ts +5 -1
  219. package/types/components/icons/index.d.ts.map +1 -1
  220. package/types/components/scroll/scroll.mixin.d.ts +7 -0
  221. package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
  222. package/types/components/sliding-panel.vue.d.ts +35 -18
  223. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  224. package/types/utils/object.d.ts +11 -0
  225. package/types/utils/object.d.ts.map +1 -1
  226. package/types/wiring/wiring.types.d.ts +2 -0
  227. package/types/wiring/wiring.types.d.ts.map +1 -1
  228. package/types/x-modules/facets/wiring.d.ts +3 -0
  229. package/types/x-modules/facets/wiring.d.ts.map +1 -1
  230. package/types/x-modules/next-queries/components/next-queries.vue.d.ts +6 -0
  231. package/types/x-modules/next-queries/components/next-queries.vue.d.ts.map +1 -1
  232. package/types/x-modules/next-queries/components/next-query.vue.d.ts +14 -0
  233. package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
  234. package/types/x-modules/related-tags/wiring.d.ts +3 -0
  235. package/types/x-modules/related-tags/wiring.d.ts.map +1 -1
  236. package/types/x-modules/scroll/components/scroll.vue.d.ts +2 -17
  237. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -1
  238. package/types/x-modules/search/events.types.d.ts +5 -0
  239. package/types/x-modules/search/events.types.d.ts.map +1 -1
  240. package/types/x-modules/search/store/actions/reset-state.action.d.ts +11 -0
  241. package/types/x-modules/search/store/actions/reset-state.action.d.ts.map +1 -0
  242. package/types/x-modules/search/store/emitters.d.ts +4 -0
  243. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  244. package/types/x-modules/search/store/module.d.ts.map +1 -1
  245. package/types/x-modules/search/store/types.d.ts +7 -1
  246. package/types/x-modules/search/store/types.d.ts.map +1 -1
  247. package/types/x-modules/search/types.d.ts +10 -0
  248. package/types/x-modules/search/types.d.ts.map +1 -1
  249. package/types/x-modules/search/wiring.d.ts +37 -59
  250. package/types/x-modules/search/wiring.d.ts.map +1 -1
  251. package/types/x-modules/tagging/events.types.d.ts +6 -0
  252. package/types/x-modules/tagging/events.types.d.ts.map +1 -1
  253. package/types/x-modules/tagging/store/emitters.d.ts +1 -0
  254. package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
  255. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  256. package/types/x-modules/tagging/store/types.d.ts +10 -0
  257. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  258. package/types/x-modules/tagging/wiring.d.ts +14 -5
  259. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  260. package/docs/API-reference/api/x-components.scroll.distancetobottom.md +0 -13
  261. package/docs/API-reference/api/x-components.scroll.throttlems.md +0 -13
  262. package/docs/API-reference/api/x-components.slidingpanel._refs.md +0 -15
  263. package/docs/API-reference/api/x-components.slidingpanel.beforedestroy.md +0 -15
  264. package/docs/API-reference/api/x-components.slidingpanel.isscrollatend.md +0 -13
  265. package/docs/API-reference/api/x-components.slidingpanel.isscrollatstart.md +0 -13
  266. package/docs/API-reference/api/x-components.slidingpanel.mounted.md +0 -15
  267. package/docs/API-reference/api/x-components.slidingpanel.scrollobserver.md +0 -13
  268. package/docs/API-reference/components/common/icons/x-components.arrow.md +0 -7
  269. package/js/components/icons/arrow.vue.js.map +0 -1
  270. package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js +0 -4
  271. package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js.map +0 -1
  272. package/types/components/icons/arrow.vue.d.ts +0 -3
  273. package/types/components/icons/arrow.vue.d.ts.map +0 -1
@@ -86,6 +86,9 @@ var relatedTagsWiring = createWiring({
86
86
  UserPickedARelatedTag: {
87
87
  toggleRelatedTagWire: toggleRelatedTagWire
88
88
  },
89
+ UserChangedExtraParams: {
90
+ clearSelectedRelatedTags: clearSelectedRelatedTags
91
+ },
89
92
  RelatedTagsRequestChanged: {
90
93
  fetchAndSaveRelatedTagsWire: fetchAndSaveRelatedTagsWire
91
94
  },
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-tags/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { NamespacedWireCommit, NamespacedWireDispatch } from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `relatedTags` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'relatedTags';\n/**\n * WireCommit for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n/**\n * WireDispatch for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n/**\n * WireDispatchWithoutPayload for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Sets the related tags state `query`.\n *\n * @public\n */\nexport const setRelatedTagsQuery = wireCommit('setQuery');\n\n/**\n * Sets the related tags state `params`.\n *\n * @public\n */\nexport const setRelatedTagsExtraParams = wireCommit('setParams');\n\n/**\n * Requests and stores the related tags.\n *\n * @public\n */\nexport const fetchAndSaveRelatedTagsWire = wireDispatch('fetchAndSaveRelatedTags');\n\n/**\n * Cancels the {@link RelatedTagsActions.fetchAndSaveRelatedTags} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveRelatedTagsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedTags'\n);\n\n/**\n * Sets the selected related tags.\n *\n * @public\n */\nexport const toggleRelatedTagWire = wireDispatch('toggleRelatedTag');\n\n/**\n * Clear the selected related tags.\n *\n * @public\n */\nexport const clearSelectedRelatedTags = wireCommit('setSelectedRelatedTags', []);\n\n/**\n * Clear the related tags query.\n *\n * @public\n */\nexport const clearRelatedTagsQuery = wireCommit('setQuery', '');\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nexport const setUrlParamsWire = wireDispatch('setUrlParams');\n\n/**\n * Wiring configuration for the {@link RelatedTagsXModule | related tags module}.\n *\n * @internal\n */\nexport const relatedTagsWiring = createWiring({\n UserAcceptedAQuery: {\n setRelatedTagsQuery,\n clearSelectedRelatedTags\n },\n UserPickedARelatedTag: {\n toggleRelatedTagWire\n },\n RelatedTagsRequestChanged: {\n fetchAndSaveRelatedTagsWire\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedTagsWire,\n clearRelatedTagsQuery,\n clearSelectedRelatedTags\n },\n ExtraParamsChanged: {\n setRelatedTagsExtraParams\n },\n ParamsLoadedFromUrl: {\n setUrlParamsWire\n }\n});\n"],"names":[],"mappings":";;;AAQA;;;;;AAKA,IAAM,UAAU,GAAG,aAAa,CAAC;AACjC;;;;;AAKA,IAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC7F;;;;;AAKA,IAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC,CAAC;AACnG;;;;;AAKA,IAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC,CAAC;AAEpF;;;;;IAKa,mBAAmB,GAAG,UAAU,CAAC,UAAU,EAAE;AAE1D;;;;;IAKa,yBAAyB,GAAG,UAAU,CAAC,WAAW,EAAE;AAEjE;;;;;IAKa,2BAA2B,GAAG,YAAY,CAAC,yBAAyB,EAAE;AAEnF;;;;;IAKa,iCAAiC,GAAG,0BAA0B,CACzE,+BAA+B,EAC/B;AAEF;;;;;IAKa,oBAAoB,GAAG,YAAY,CAAC,kBAAkB,EAAE;AAErE;;;;;IAKa,wBAAwB,GAAG,UAAU,CAAC,wBAAwB,EAAE,EAAE,EAAE;AAEjF;;;;;IAKa,qBAAqB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEhE;;;;;IAKa,gBAAgB,GAAG,YAAY,CAAC,cAAc,EAAE;AAE7D;;;;;IAKa,iBAAiB,GAAG,YAAY,CAAC;IAC5C,kBAAkB,EAAE;QAClB,mBAAmB,qBAAA;QACnB,wBAAwB,0BAAA;KACzB;IACD,qBAAqB,EAAE;QACrB,oBAAoB,sBAAA;KACrB;IACD,yBAAyB,EAAE;QACzB,2BAA2B,6BAAA;KAC5B;IACD,gBAAgB,EAAE;QAChB,iCAAiC,mCAAA;QACjC,qBAAqB,uBAAA;QACrB,wBAAwB,0BAAA;KACzB;IACD,kBAAkB,EAAE;QAClB,yBAAyB,2BAAA;KAC1B;IACD,mBAAmB,EAAE;QACnB,gBAAgB,kBAAA;KACjB;CACF;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-tags/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { NamespacedWireCommit, NamespacedWireDispatch } from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `relatedTags` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'relatedTags';\n/**\n * WireCommit for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n/**\n * WireDispatch for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n/**\n * WireDispatchWithoutPayload for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Sets the related tags state `query`.\n *\n * @public\n */\nexport const setRelatedTagsQuery = wireCommit('setQuery');\n\n/**\n * Sets the related tags state `params`.\n *\n * @public\n */\nexport const setRelatedTagsExtraParams = wireCommit('setParams');\n\n/**\n * Requests and stores the related tags.\n *\n * @public\n */\nexport const fetchAndSaveRelatedTagsWire = wireDispatch('fetchAndSaveRelatedTags');\n\n/**\n * Cancels the {@link RelatedTagsActions.fetchAndSaveRelatedTags} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveRelatedTagsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedTags'\n);\n\n/**\n * Sets the selected related tags.\n *\n * @public\n */\nexport const toggleRelatedTagWire = wireDispatch('toggleRelatedTag');\n\n/**\n * Clear the selected related tags.\n *\n * @public\n */\nexport const clearSelectedRelatedTags = wireCommit('setSelectedRelatedTags', []);\n\n/**\n * Clear the related tags query.\n *\n * @public\n */\nexport const clearRelatedTagsQuery = wireCommit('setQuery', '');\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nexport const setUrlParamsWire = wireDispatch('setUrlParams');\n\n/**\n * Wiring configuration for the {@link RelatedTagsXModule | related tags module}.\n *\n * @internal\n */\nexport const relatedTagsWiring = createWiring({\n UserAcceptedAQuery: {\n setRelatedTagsQuery,\n clearSelectedRelatedTags\n },\n UserPickedARelatedTag: {\n toggleRelatedTagWire\n },\n UserChangedExtraParams: {\n clearSelectedRelatedTags\n },\n RelatedTagsRequestChanged: {\n fetchAndSaveRelatedTagsWire\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedTagsWire,\n clearRelatedTagsQuery,\n clearSelectedRelatedTags\n },\n ExtraParamsChanged: {\n setRelatedTagsExtraParams\n },\n ParamsLoadedFromUrl: {\n setUrlParamsWire\n }\n});\n"],"names":[],"mappings":";;;AAQA;;;;;AAKA,IAAM,UAAU,GAAG,aAAa,CAAC;AACjC;;;;;AAKA,IAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC7F;;;;;AAKA,IAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC,CAAC;AACnG;;;;;AAKA,IAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC,CAAC;AAEpF;;;;;IAKa,mBAAmB,GAAG,UAAU,CAAC,UAAU,EAAE;AAE1D;;;;;IAKa,yBAAyB,GAAG,UAAU,CAAC,WAAW,EAAE;AAEjE;;;;;IAKa,2BAA2B,GAAG,YAAY,CAAC,yBAAyB,EAAE;AAEnF;;;;;IAKa,iCAAiC,GAAG,0BAA0B,CACzE,+BAA+B,EAC/B;AAEF;;;;;IAKa,oBAAoB,GAAG,YAAY,CAAC,kBAAkB,EAAE;AAErE;;;;;IAKa,wBAAwB,GAAG,UAAU,CAAC,wBAAwB,EAAE,EAAE,EAAE;AAEjF;;;;;IAKa,qBAAqB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEhE;;;;;IAKa,gBAAgB,GAAG,YAAY,CAAC,cAAc,EAAE;AAE7D;;;;;IAKa,iBAAiB,GAAG,YAAY,CAAC;IAC5C,kBAAkB,EAAE;QAClB,mBAAmB,qBAAA;QACnB,wBAAwB,0BAAA;KACzB;IACD,qBAAqB,EAAE;QACrB,oBAAoB,sBAAA;KACrB;IACD,sBAAsB,EAAE;QACtB,wBAAwB,0BAAA;KACzB;IACD,yBAAyB,EAAE;QACzB,2BAA2B,6BAAA;KAC5B;IACD,gBAAgB,EAAE;QAChB,iCAAiC,mCAAA;QACjC,qBAAqB,uBAAA;QACrB,wBAAwB,0BAAA;KACzB;IACD,kBAAkB,EAAE;QAClB,yBAAyB,2BAAA;KAC1B;IACD,mBAAmB,EAAE;QACnB,gBAAgB,kBAAA;KACjB;CACF;;;;"}
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
25
25
  import '../../../components/icons/star.vue.js';
26
26
  import '../../../components/base-rating.vue.js';
27
27
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
28
- import '../../../components/icons/arrow.vue.js';
28
+ import '../../../components/icons/arrow-down.vue.js';
29
+ import '../../../components/icons/arrow-left.vue.js';
30
+ import '../../../components/icons/arrow-right.vue.js';
31
+ import '../../../components/icons/arrow-up.vue.js';
29
32
  import '../../../components/icons/bag.vue.js';
30
33
  import '../../../components/icons/bar-code.vue.js';
31
34
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
49
52
  import '../../../components/icons/filters.vue.js';
50
53
  import '../../../components/icons/grid-1-col.vue.js';
51
54
  import '../../../components/icons/grid-2-col.vue.js';
55
+ import '../../../components/icons/grid-2-rows.vue.js';
52
56
  import '../../../components/icons/hide.vue.js';
53
57
  import '../../../components/icons/history-tiny.vue.js';
54
58
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
1
+ {"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
25
25
  import '../../../components/icons/star.vue.js';
26
26
  import '../../../components/base-rating.vue.js';
27
27
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
28
- import '../../../components/icons/arrow.vue.js';
28
+ import '../../../components/icons/arrow-down.vue.js';
29
+ import '../../../components/icons/arrow-left.vue.js';
30
+ import '../../../components/icons/arrow-right.vue.js';
31
+ import '../../../components/icons/arrow-up.vue.js';
29
32
  import '../../../components/icons/bag.vue.js';
30
33
  import '../../../components/icons/bar-code.vue.js';
31
34
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
49
52
  import '../../../components/icons/filters.vue.js';
50
53
  import '../../../components/icons/grid-1-col.vue.js';
51
54
  import '../../../components/icons/grid-2-col.vue.js';
55
+ import '../../../components/icons/grid-2-rows.vue.js';
52
56
  import '../../../components/icons/hide.vue.js';
53
57
  import '../../../components/icons/history-tiny.vue.js';
54
58
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}
1
+ {"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}
@@ -12,20 +12,21 @@ var __vue_render__ = function () {
12
12
  return _c(
13
13
  "BaseScroll",
14
14
  _vm._g(
15
- {
16
- attrs: {
17
- id: _vm.id,
18
- throttleMs: _vm.throttleMs,
19
- distanceToBottom: _vm.distanceToBottom,
15
+ _vm._b(
16
+ {
17
+ attrs: { id: _vm.id },
18
+ on: {
19
+ scroll: _vm.emitScroll,
20
+ "scroll:direction-change": _vm.emitScrollDirectionChange,
21
+ "scroll:at-start": _vm.emitScrollAtStart,
22
+ "scroll:almost-at-end": _vm.emitScrollAlmostAtEnd,
23
+ "scroll:at-end": _vm.emitScrollAtEnd,
24
+ },
20
25
  },
21
- on: {
22
- scroll: _vm.emitScroll,
23
- "scroll:direction-change": _vm.emitScrollDirectionChange,
24
- "scroll:at-start": _vm.emitScrollAtStart,
25
- "scroll:almost-at-end": _vm.emitScrollAlmostAtEnd,
26
- "scroll:at-end": _vm.emitScrollAtEnd,
27
- },
28
- },
26
+ "BaseScroll",
27
+ _vm.$attrs,
28
+ false
29
+ ),
29
30
  _vm.$listeners
30
31
  ),
31
32
  [_vm._t("default")],
@@ -1 +1 @@
1
- {"version":3,"file":"scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue"],"sourcesContent":["<template>\n <BaseScroll\n @scroll=\"emitScroll\"\n @scroll:direction-change=\"emitScrollDirectionChange\"\n @scroll:at-start=\"emitScrollAtStart\"\n @scroll:almost-at-end=\"emitScrollAlmostAtEnd\"\n @scroll:at-end=\"emitScrollAtEnd\"\n v-on=\"$listeners\"\n :id=\"id\"\n :throttleMs=\"throttleMs\"\n :distanceToBottom=\"distanceToBottom\"\n >\n <slot />\n </BaseScroll>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import BaseScroll from '../../../components/scroll/base-scroll.vue';\n import { ScrollDirection } from '../../../components/scroll/scroll.types';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * Base scroll component that depending on base scroll component and the user interaction emits\n * different x events for knowing when the user scrolls, the direction of scroll and if user\n * reaches the start or end.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n })\n export default class Scroll extends Vue {\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop()\n public throttleMs!: number;\n\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop()\n public distanceToBottom!: number;\n\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe Scroll is a component that wraps the BaseScroll and provides it for a unique id.\n\n### Customized usage\n\n#### Overriding the properties\n\nIt renders an element with scroll, with the content passed in the `default slot`.\n\n```vue\n<template>\n <Scroll id=\"exampleScrollId\" throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n }\n };\n</script>\n```\n\n#### Using scroll events.\n\n```vue\n<template>\n <Scroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n id=\"exampleScrollId\"\n throttleMs=\"50\"\n distanceToBottom=\"300\"\n >\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart(isAtStart) {\n console.log('scroll:at-start', isAtStart);\n },\n scrollAlmostAtEnd(isAlmostAtEnd) {\n console.log('scroll:almost-at-end', isAlmostAtEnd);\n },\n scrollAtEnd(isAtEnd) {\n console.log('scroll:at-end', isAtEnd);\n }\n }\n };\n</script>\n```\n\n#### Using XEvents.\n\nYou can use the XEvents subscribing to them.\n\n```vue\n<template>\n <Scroll throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n },\n mounted() {\n this.$x.on('UserScrolled').subscribe(distance => {\n console.log(distance);\n });\n this.$x.on('UserChangedScrollDirection').subscribe(direction => {\n console.log(direction);\n });\n this.$x.on('UserReachedScrollStart').subscribe(isAtStart => {\n console.log(isAtStart);\n });\n this.$x.on('UserAlmostReachedScrollEnd').subscribe(isAlmostAtEnd => {\n console.log(isAlmostAtEnd);\n });\n this.$x.on('UserReachedScrollEnd').subscribe(isAtEnd => {\n console.log(isAtEnd);\n });\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserScrolled`: emitted after the user scrolls in this container. The payload is the scroll top\n distance in pixels.\n- `UserChangedScrollDirection`: emitted when the user changes the scroll direction. The payload is\n the new scrolling direction.\n- `UserReachedScrollStart`: emitted when the user scrolls up to the initial position of the scroll.\n- `UserAlmostReachedScrollEnd`: emitted when the user is about to reach the bottom part of the\n scroll.\n- `UserReachedScrollEnd`: emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue"],"sourcesContent":["<template>\n <BaseScroll\n @scroll=\"emitScroll\"\n @scroll:direction-change=\"emitScrollDirectionChange\"\n @scroll:at-start=\"emitScrollAtStart\"\n @scroll:almost-at-end=\"emitScrollAlmostAtEnd\"\n @scroll:at-end=\"emitScrollAtEnd\"\n v-on=\"$listeners\"\n :id=\"id\"\n v-bind=\"$attrs\"\n >\n <slot />\n </BaseScroll>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import BaseScroll from '../../../components/scroll/base-scroll.vue';\n import { ScrollDirection } from '../../../components/scroll/scroll.types';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * Scrollable container that emits scroll related X Events. It exposes all the listeners\n * and props from the {@link BaseScroll} component.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n })\n export default class Scroll extends Vue {\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe Scroll is a component that wraps the BaseScroll and provides it for a unique id.\n\n### Customized usage\n\n#### Overriding the properties\n\nIt renders an element with scroll, with the content passed in the `default slot`.\n\n```vue\n<template>\n <Scroll id=\"exampleScrollId\" throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n }\n };\n</script>\n```\n\n#### Using scroll events.\n\n```vue\n<template>\n <Scroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n id=\"exampleScrollId\"\n throttleMs=\"50\"\n distanceToBottom=\"300\"\n >\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart(isAtStart) {\n console.log('scroll:at-start', isAtStart);\n },\n scrollAlmostAtEnd(isAlmostAtEnd) {\n console.log('scroll:almost-at-end', isAlmostAtEnd);\n },\n scrollAtEnd(isAtEnd) {\n console.log('scroll:at-end', isAtEnd);\n }\n }\n };\n</script>\n```\n\n#### Using XEvents.\n\nYou can use the XEvents subscribing to them.\n\n```vue\n<template>\n <Scroll throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n },\n mounted() {\n this.$x.on('UserScrolled').subscribe(distance => {\n console.log(distance);\n });\n this.$x.on('UserChangedScrollDirection').subscribe(direction => {\n console.log(direction);\n });\n this.$x.on('UserReachedScrollStart').subscribe(isAtStart => {\n console.log(isAtStart);\n });\n this.$x.on('UserAlmostReachedScrollEnd').subscribe(isAlmostAtEnd => {\n console.log(isAlmostAtEnd);\n });\n this.$x.on('UserReachedScrollEnd').subscribe(isAtEnd => {\n console.log(isAtEnd);\n });\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserScrolled`: emitted after the user scrolls in this container. The payload is the scroll top\n distance in pixels.\n- `UserChangedScrollDirection`: emitted when the user changes the scroll direction. The payload is\n the new scrolling direction.\n- `UserReachedScrollStart`: emitted when the user scrolls up to the initial position of the scroll.\n- `UserAlmostReachedScrollEnd`: emitted when the user is about to reach the bottom part of the\n scroll.\n- `UserReachedScrollEnd`: emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,9 +8,8 @@ import { MainScrollId } from './scroll.const.js';
8
8
  import BaseScroll from '../../../components/scroll/base-scroll.vue.js';
9
9
 
10
10
  /**
11
- * Base scroll component that depending on base scroll component and the user interaction emits
12
- * different x events for knowing when the user scrolls, the direction of scroll and if user
13
- * reaches the start or end.
11
+ * Scrollable container that emits scroll related X Events. It exposes all the listeners
12
+ * and props from the {@link BaseScroll} component.
14
13
  *
15
14
  * @public
16
15
  */
@@ -85,12 +84,6 @@ var Scroll = /** @class */ (function (_super) {
85
84
  (_a = this.$el) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0, behavior: 'smooth' });
86
85
  }
87
86
  };
88
- __decorate([
89
- Prop()
90
- ], Scroll.prototype, "throttleMs", void 0);
91
- __decorate([
92
- Prop()
93
- ], Scroll.prototype, "distanceToBottom", void 0);
94
87
  __decorate([
95
88
  Prop({ default: MainScrollId })
96
89
  ], Scroll.prototype, "id", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { WireMetadata } from '../../../wiring/wiring.types';\nimport { XOn } from '../../../components/decorators/bus.decorators';\nimport BaseScroll from '../../../components/scroll/base-scroll.vue';\nimport { ScrollDirection } from '../../../components/scroll/scroll.types';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * Base scroll component that depending on base scroll component and the user interaction emits\n * different x events for knowing when the user scrolls, the direction of scroll and if user\n * reaches the start or end.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n})\nexport default class Scroll extends Vue {\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop()\n public throttleMs!: number;\n\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop()\n public distanceToBottom!: number;\n\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;;;;AAWA;IAAoC,0BAAG;IAAvC;;KAmGC;;;;;;;IAlEW,2BAAU,GAApB,UAAqB,QAAgB;QACnC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACpE;;;;;;;IAQS,0CAAyB,GAAnC,UAAoC,SAA0B;QAC5D,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACnF;;;;;;;IAQS,kCAAiB,GAA3B,UAA4B,SAAkB;QAC5C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KAC/E;;;;;;;IAQS,sCAAqB,GAA/B,UAAgC,aAAsB;QACpD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,aAAa,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACvF;;;;;;;IAQS,gCAAe,GAAzB,UAA0B,OAAgB;QACxC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KAC3E;;;;;;;IAQS,oCAAmB,GAA7B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAkB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KACzD;;;;;;;IASD,4BAAW,GAAX,UAAY,QAAgB;;QAC1B,IAAI,QAAQ,KAAK,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE;YACpC,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;SACpD;KACF;IA1FD;QADC,IAAI,EAAE;8CACoB;IAS3B;QADC,IAAI,EAAE;oDAC0B;IAQjC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;sCACb;IAqEnB;QADC,GAAG,CAAC,wBAAwB,CAAC;6CAK7B;IAlGkB,MAAM;QAJ1B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,UAAU,YAAA,EAAE;SAC3B,CAAC;OACmB,MAAM,CAmG1B;IAAD,aAAC;CAAA,CAnGmC,GAAG;;;;"}
1
+ {"version":3,"file":"scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { WireMetadata } from '../../../wiring/wiring.types';\nimport { XOn } from '../../../components/decorators/bus.decorators';\nimport BaseScroll from '../../../components/scroll/base-scroll.vue';\nimport { ScrollDirection } from '../../../components/scroll/scroll.types';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * Scrollable container that emits scroll related X Events. It exposes all the listeners\n * and props from the {@link BaseScroll} component.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n})\nexport default class Scroll extends Vue {\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AA0BA;;;;;;AAUA;IAAoC,0BAAG;IAAvC;;KAiFC;;;;;;;IAlEW,2BAAU,GAApB,UAAqB,QAAgB;QACnC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACpE;;;;;;;IAQS,0CAAyB,GAAnC,UAAoC,SAA0B;QAC5D,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACnF;;;;;;;IAQS,kCAAiB,GAA3B,UAA4B,SAAkB;QAC5C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KAC/E;;;;;;;IAQS,sCAAqB,GAA/B,UAAgC,aAAsB;QACpD,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,aAAa,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACvF;;;;;;;IAQS,gCAAe,GAAzB,UAA0B,OAAgB;QACxC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KAC3E;;;;;;;IAQS,oCAAmB,GAA7B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAkB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KACzD;;;;;;;IASD,4BAAW,GAAX,UAAY,QAAgB;;QAC1B,IAAI,QAAQ,KAAK,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE;YACpC,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;SACpD;KACF;IAzED;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;sCACb;IAqEnB;QADC,GAAG,CAAC,wBAAwB,CAAC;6CAK7B;IAhFkB,MAAM;QAJ1B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,UAAU,YAAA,EAAE;SAC3B,CAAC;OACmB,MAAM,CAiF1B;IAAD,aAAC;CAAA,CAjFmC,GAAG;;;;"}
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
25
25
  import '../../../components/icons/star.vue.js';
26
26
  import '../../../components/base-rating.vue.js';
27
27
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
28
- import '../../../components/icons/arrow.vue.js';
28
+ import '../../../components/icons/arrow-down.vue.js';
29
+ import '../../../components/icons/arrow-left.vue.js';
30
+ import '../../../components/icons/arrow-right.vue.js';
31
+ import '../../../components/icons/arrow-up.vue.js';
29
32
  import '../../../components/icons/bag.vue.js';
30
33
  import '../../../components/icons/bar-code.vue.js';
31
34
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
49
52
  import '../../../components/icons/filters.vue.js';
50
53
  import '../../../components/icons/grid-1-col.vue.js';
51
54
  import '../../../components/icons/grid-2-col.vue.js';
55
+ import '../../../components/icons/grid-2-rows.vue.js';
52
56
  import '../../../components/icons/hide.vue.js';
53
57
  import '../../../components/icons/history-tiny.vue.js';
54
58
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;AAUA;IAA0C,gCAAmB;IAA7D;;KAuEC;IAvDC,8BAAO,GAAP;QAAA,iBAqBC;QApBC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,QAAgB;YAClC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACrE,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,UAAC,SAA0B;YAC7D,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACpF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAC,eAAwB;YACnD,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACtF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,UAAC,mBAA4B;YAC5D,KAAI,CAAC,EAAE,CAAC,IAAI,CACV,4BAA4B,EAC5B,mBAAmB,EACnB,KAAI,CAAC,oBAAoB,EAAE,CAC5B,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,UAAC,aAAsB;YAC/C,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,aAAa,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;KACJ;;;;;;;IAQS,2CAAoB,GAA9B;;;QAGE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,KAAK,MAAM,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;QACxF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACpE;;IAGD,6BAAM,GAAN,eAAiB;;;;IAKjB,oCAAa,GAAb;QACE,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACvE;;;;;;;IAQS,2CAAoB,GAA9B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KAC1C;IA/DD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;2DACsB;IAOhD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;4CACV;IAdH,YAAY;QAHhC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAuEhC;IAAD,mBAAC;CAvED,CAA0C,MAAM,CAAC,WAAW,CAAC;;;;"}
1
+ {"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;AAUA;IAA0C,gCAAmB;IAA7D;;KAuEC;IAvDC,8BAAO,GAAP;QAAA,iBAqBC;QApBC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,QAAgB;YAClC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACrE,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,UAAC,SAA0B;YAC7D,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACpF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAC,eAAwB;YACnD,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACtF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,UAAC,mBAA4B;YAC5D,KAAI,CAAC,EAAE,CAAC,IAAI,CACV,4BAA4B,EAC5B,mBAAmB,EACnB,KAAI,CAAC,oBAAoB,EAAE,CAC5B,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,UAAC,aAAsB;YAC/C,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,aAAa,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;KACJ;;;;;;;IAQS,2CAAoB,GAA9B;;;QAGE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,KAAK,MAAM,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;QACxF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACpE;;IAGD,6BAAM,GAAN,eAAiB;;;;IAKjB,oCAAa,GAAb;QACE,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACvE;;;;;;;IAQS,2CAAoB,GAA9B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KAC1C;IA/DD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;2DACsB;IAOhD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;4CACV;IAdH,YAAY;QAHhC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAuEhC;IAAD,mBAAC;CAvED,CAA0C,MAAM,CAAC,WAAW,CAAC;;;;"}
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
25
25
  import '../../../components/icons/star.vue.js';
26
26
  import '../../../components/base-rating.vue.js';
27
27
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
28
- import '../../../components/icons/arrow.vue.js';
28
+ import '../../../components/icons/arrow-down.vue.js';
29
+ import '../../../components/icons/arrow-left.vue.js';
30
+ import '../../../components/icons/arrow-right.vue.js';
31
+ import '../../../components/icons/arrow-up.vue.js';
29
32
  import '../../../components/icons/bag.vue.js';
30
33
  import '../../../components/icons/bar-code.vue.js';
31
34
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
49
52
  import '../../../components/icons/filters.vue.js';
50
53
  import '../../../components/icons/grid-1-col.vue.js';
51
54
  import '../../../components/icons/grid-2-col.vue.js';
55
+ import '../../../components/icons/grid-2-rows.vue.js';
52
56
  import '../../../components/icons/hide.vue.js';
53
57
  import '../../../components/icons/history-tiny.vue.js';
54
58
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"sort-list.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/sort-list.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { BaseEventButton } from '../../../components';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { VueCSSClasses } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { searchXModule } from '../x-module';\nimport SortMixin from './sort.mixin';\n\n/**\n * Sort list item options.\n *\n * @public\n */\ninterface SortListItem {\n item: Sort;\n cssClasses: VueCSSClasses;\n event: Partial<XEventsTypes>;\n}\n/**\n * The `SortList` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n *\n * @remarks It extends {@link SortMixin}.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)],\n components: {\n BaseEventButton\n }\n})\nexport default class SortList extends mixins(SortMixin) {\n /**\n * The transition to use for rendering the list.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n public animation?: string | typeof Vue;\n /**\n * Sort list items.\n *\n * @returns A list of items with their css class and the event associate to it.\n *\n * @internal\n */\n protected get listItems(): SortListItem[] {\n return this.items.map(item => ({\n item,\n cssClasses: [\n {\n 'x-sort-list__item--is-selected': item === this.selectedSort,\n 'x-option-list__item--is-selected': item === this.selectedSort\n }\n ],\n event: { UserClickedASort: item }\n }));\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA;;;;;;;;AAcA;IAAsC,4BAAiB;IAAvD;;KA2BC;IAZC,sBAAc,+BAAS;;;;;;;;aAAvB;YAAA,iBAWC;YAVC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,QAAC;gBAC7B,IAAI,MAAA;gBACJ,UAAU,EAAE;oBACV;wBACE,gCAAgC,EAAE,IAAI,KAAK,KAAI,CAAC,YAAY;wBAC5D,kCAAkC,EAAE,IAAI,KAAK,KAAI,CAAC,YAAY;qBAC/D;iBACF;gBACD,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE;aAClC,IAAC,CAAC,CAAC;SACL;;;OAAA;IAnBD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACe;IAPpB,QAAQ;QAN5B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE;gBACV,eAAe,iBAAA;aAChB;SACF,CAAC;OACmB,QAAQ,CA2B5B;IAAD,eAAC;CA3BD,CAAsC,MAAM,CAAC,SAAS,CAAC;;;;"}
1
+ {"version":3,"file":"sort-list.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/sort-list.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { BaseEventButton } from '../../../components';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { VueCSSClasses } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { searchXModule } from '../x-module';\nimport SortMixin from './sort.mixin';\n\n/**\n * Sort list item options.\n *\n * @public\n */\ninterface SortListItem {\n item: Sort;\n cssClasses: VueCSSClasses;\n event: Partial<XEventsTypes>;\n}\n/**\n * The `SortList` component allows user to select the search results order. This component\n * also allows to change the selected sort programmatically.\n *\n * @remarks It extends {@link SortMixin}.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)],\n components: {\n BaseEventButton\n }\n})\nexport default class SortList extends mixins(SortMixin) {\n /**\n * The transition to use for rendering the list.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n public animation?: string | typeof Vue;\n /**\n * Sort list items.\n *\n * @returns A list of items with their css class and the event associate to it.\n *\n * @internal\n */\n protected get listItems(): SortListItem[] {\n return this.items.map(item => ({\n item,\n cssClasses: [\n {\n 'x-sort-list__item--is-selected': item === this.selectedSort,\n 'x-option-list__item--is-selected': item === this.selectedSort\n }\n ],\n event: { UserClickedASort: item }\n }));\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA;;;;;;;;AAcA;IAAsC,4BAAiB;IAAvD;;KA2BC;IAZC,sBAAc,+BAAS;;;;;;;;aAAvB;YAAA,iBAWC;YAVC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,QAAC;gBAC7B,IAAI,MAAA;gBACJ,UAAU,EAAE;oBACV;wBACE,gCAAgC,EAAE,IAAI,KAAK,KAAI,CAAC,YAAY;wBAC5D,kCAAkC,EAAE,IAAI,KAAK,KAAI,CAAC,YAAY;qBAC/D;iBACF;gBACD,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE;aAClC,IAAC,CAAC,CAAC;SACL;;;OAAA;IAnBD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACe;IAPpB,QAAQ;QAN5B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE;gBACV,eAAe,iBAAA;aAChB;SACF,CAAC;OACmB,QAAQ,CA2B5B;IAAD,eAAC;CA3BD,CAAsC,MAAM,CAAC,SAAS,CAAC;;;;"}
@@ -26,7 +26,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
26
26
  import '../../../components/icons/star.vue.js';
27
27
  import '../../../components/base-rating.vue.js';
28
28
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
29
- import '../../../components/icons/arrow.vue.js';
29
+ import '../../../components/icons/arrow-down.vue.js';
30
+ import '../../../components/icons/arrow-left.vue.js';
31
+ import '../../../components/icons/arrow-right.vue.js';
32
+ import '../../../components/icons/arrow-up.vue.js';
30
33
  import '../../../components/icons/bag.vue.js';
31
34
  import '../../../components/icons/bar-code.vue.js';
32
35
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -50,6 +53,7 @@ import '../../../components/icons/cross.vue.js';
50
53
  import '../../../components/icons/filters.vue.js';
51
54
  import '../../../components/icons/grid-1-col.vue.js';
52
55
  import '../../../components/icons/grid-2-col.vue.js';
56
+ import '../../../components/icons/grid-2-rows.vue.js';
53
57
  import '../../../components/icons/hide.vue.js';
54
58
  import '../../../components/icons/history-tiny.vue.js';
55
59
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"sort.mixin.js","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"sourcesContent":["import { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport Component from 'vue-class-component';\nimport { Prop } from 'vue-property-decorator';\nimport { State, XEmit } from '../../../components';\n\n/**\n * Mixin to share Sort logic.\n *\n * @public\n */\n@Component\nexport default class SortMixin extends Vue {\n /**\n * The list of possible sort values. If there are no values selected, the first item of\n * this list will be selected.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: Sort[];\n\n /**\n * The search module selected sort. This is the source of truth when checking which\n * sort is selected.\n *\n * @internal\n */\n @State('search', 'sort')\n public selectedSort!: Sort;\n\n /**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the\n * provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the\n * {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n @XEmit('SelectedSortProvided')\n public get providedSelectedSort(): Sort {\n return this.selectedSort;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;AAMA;IAAuC,6BAAG;IAA1C;;KAgCC;IAHC,sBAAW,2CAAoB;;;;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;;;OAAA;IAvBD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;4CACH;IAStB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;mDACG;IAY3B;QADC,KAAK,CAAC,sBAAsB,CAAC;yDAG7B;IA/BkB,SAAS;QAD7B,SAAS;OACW,SAAS,CAgC7B;IAAD,gBAAC;CAAA,CAhCsC,GAAG;;;;"}
1
+ {"version":3,"file":"sort.mixin.js","sources":["../../../../../src/x-modules/search/components/sort.mixin.ts"],"sourcesContent":["import { Sort } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport Component from 'vue-class-component';\nimport { Prop } from 'vue-property-decorator';\nimport { State, XEmit } from '../../../components';\n\n/**\n * Mixin to share Sort logic.\n *\n * @public\n */\n@Component\nexport default class SortMixin extends Vue {\n /**\n * The list of possible sort values. If there are no values selected, the first item of\n * this list will be selected.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: Sort[];\n\n /**\n * The search module selected sort. This is the source of truth when checking which\n * sort is selected.\n *\n * @internal\n */\n @State('search', 'sort')\n public selectedSort!: Sort;\n\n /**\n * Emits the {@link SearchXEvents.SelectedSortProvided | SelectedSortProvided} event whenever the\n * provided {@link SortMixin.selectedSort} changes. If no value is provided, the first item of the\n * {@link SortMixin.items} will be used as fallback.\n *\n * @returns The sorting value.\n *\n * @public\n */\n @XEmit('SelectedSortProvided')\n public get providedSelectedSort(): Sort {\n return this.selectedSort;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;AAMA;IAAuC,6BAAG;IAA1C;;KAgCC;IAHC,sBAAW,2CAAoB;;;;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;;;OAAA;IAvBD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;4CACH;IAStB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;mDACG;IAY3B;QADC,KAAK,CAAC,sBAAsB,CAAC;yDAG7B;IA/BkB,SAAS;QAD7B,SAAS;OACW,SAAS,CAgC7B;IAAD,gBAAC;CAAA,CAhCsC,GAAG;;;;"}
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
25
25
  import '../../../components/icons/star.vue.js';
26
26
  import '../../../components/base-rating.vue.js';
27
27
  import '../../../components/filters/labels/base-rating-filter-label.vue.js';
28
- import '../../../components/icons/arrow.vue.js';
28
+ import '../../../components/icons/arrow-down.vue.js';
29
+ import '../../../components/icons/arrow-left.vue.js';
30
+ import '../../../components/icons/arrow-right.vue.js';
31
+ import '../../../components/icons/arrow-up.vue.js';
29
32
  import '../../../components/icons/bag.vue.js';
30
33
  import '../../../components/icons/bar-code.vue.js';
31
34
  import '../../../components/icons/barcode-tiny.vue.js';
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
49
52
  import '../../../components/icons/filters.vue.js';
50
53
  import '../../../components/icons/grid-1-col.vue.js';
51
54
  import '../../../components/icons/grid-2-col.vue.js';
55
+ import '../../../components/icons/grid-2-rows.vue.js';
52
56
  import '../../../components/icons/hide.vue.js';
53
57
  import '../../../components/icons/history-tiny.vue.js';
54
58
  import '../../../components/icons/history.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"spellcheck.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/spellcheck.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport { searchXModule } from '../x-module';\n\n/**\n * The `Spellcheck` component allows to inform the user with a friendly message that he\n * might have misspelled the search query. This message can be set using the default slot\n * of the component, which gives access to the searched query using the `query` scope property,\n * and the spellchecked query proposal, using the `spellcheckedQuery` scope property.\n *\n * The component will only render itself if the `spellcheckedQuery` property has value.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)]\n})\nexport default class Spellcheck extends Vue {\n /**\n * The query from the search state.\n *\n * @public\n */\n @State('search', 'query')\n public query!: string;\n\n /**\n * The spellcheckedQuery from the search state.\n *\n * @public\n */\n @State('search', 'spellcheckedQuery')\n public spellcheckedQuery!: string;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;;;;;;;;;AAaA;IAAwC,8BAAG;IAA3C;;KAgBC;IATC;QADC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC;6CACH;IAQtB;QADC,KAAK,CAAC,QAAQ,EAAE,mBAAmB,CAAC;yDACH;IAff,UAAU;QAH9B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,UAAU,CAgB9B;IAAD,iBAAC;CAAA,CAhBuC,GAAG;;;;"}
1
+ {"version":3,"file":"spellcheck.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/spellcheck.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport { searchXModule } from '../x-module';\n\n/**\n * The `Spellcheck` component allows to inform the user with a friendly message that he\n * might have misspelled the search query. This message can be set using the default slot\n * of the component, which gives access to the searched query using the `query` scope property,\n * and the spellchecked query proposal, using the `spellcheckedQuery` scope property.\n *\n * The component will only render itself if the `spellcheckedQuery` property has value.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)]\n})\nexport default class Spellcheck extends Vue {\n /**\n * The query from the search state.\n *\n * @public\n */\n @State('search', 'query')\n public query!: string;\n\n /**\n * The spellcheckedQuery from the search state.\n *\n * @public\n */\n @State('search', 'spellcheckedQuery')\n public spellcheckedQuery!: string;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;;;;;;;;;AAaA;IAAwC,8BAAG;IAA3C;;KAgBC;IATC;QADC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC;6CACH;IAQtB;QADC,KAAK,CAAC,QAAQ,EAAE,mBAAmB,CAAC;yDACH;IAff,UAAU;QAH9B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,UAAU,CAgB9B;IAAD,iBAAC;CAAA,CAhBuC,GAAG;;;;"}
@@ -10,7 +10,7 @@
10
10
  var increasePageAppendingResults = function (_a) {
11
11
  var commit = _a.commit, state = _a.state;
12
12
  var newPage = state.page + 1;
13
- if (newPage >= 1 && newPage * state.config.pageSize <= state.totalResults) {
13
+ if (newPage >= 1 && state.page * state.config.pageSize < state.totalResults) {
14
14
  commit('setPage', newPage);
15
15
  commit('setIsAppendResults', true);
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"increase-page-apending-results.action.js","sources":["../../../../../../src/x-modules/search/store/actions/increase-page-apending-results.action.ts"],"sourcesContent":["import { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.increasePageAppendingResults}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const increasePageAppendingResults: SearchXStoreModule['actions']['increasePageAppendingResults'] =\n ({ commit, state }) => {\n const newPage = state.page + 1;\n if (newPage >= 1 && newPage * state.config.pageSize <= state.totalResults) {\n commit('setPage', newPage);\n commit('setIsAppendResults', true);\n }\n };\n"],"names":[],"mappings":"AAEA;;;;;;;;AAQA;IACa,4BAA4B,GACvC,UAAC,EAAiB;QAAf,MAAM,YAAA,EAAE,KAAK,WAAA;IACd,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IAC/B,IAAI,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,YAAY,EAAE;QACzE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC3B,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;KACpC;AACH;;;;"}
1
+ {"version":3,"file":"increase-page-apending-results.action.js","sources":["../../../../../../src/x-modules/search/store/actions/increase-page-apending-results.action.ts"],"sourcesContent":["import { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.increasePageAppendingResults}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const increasePageAppendingResults: SearchXStoreModule['actions']['increasePageAppendingResults'] =\n ({ commit, state }) => {\n const newPage = state.page + 1;\n if (newPage >= 1 && state.page * state.config.pageSize < state.totalResults) {\n commit('setPage', newPage);\n commit('setIsAppendResults', true);\n }\n };\n"],"names":[],"mappings":"AAEA;;;;;;;;AAQA;IACa,4BAA4B,GACvC,UAAC,EAAiB;QAAf,MAAM,YAAA,EAAE,KAAK,WAAA;IACd,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IAC/B,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,YAAY,EAAE;QAC3E,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC3B,MAAM,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;KACpC;AACH;;;;"}
@@ -0,0 +1,32 @@
1
+ import { isArrayEmpty } from '../../../../utils/array.js';
2
+ import { getNewAndUpdatedKeys } from '../../../../utils/object.js';
3
+
4
+ /**
5
+ * Default implementation for the {@link SearchActions.resetState}.
6
+ *
7
+ * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
8
+ * provided by Vuex.
9
+ *
10
+ * @public
11
+ */
12
+ var resetState = function (_a, _b) {
13
+ var commit = _a.commit, state = _a.state;
14
+ var newRequest = _b.newRequest, oldRequest = _b.oldRequest;
15
+ var changedKeys = getNewAndUpdatedKeys(newRequest, oldRequest);
16
+ if (!isArrayEmpty(changedKeys)) {
17
+ if (!changedKeys.includes('page')) {
18
+ commit('setPage', 1);
19
+ }
20
+ if (changedKeys.includes('query')) {
21
+ commit('setSort', '');
22
+ }
23
+ var haveExtraParamsChanged = changedKeys.some(function (key) { return key in state.params; });
24
+ if (haveExtraParamsChanged) {
25
+ commit('setPage', 1);
26
+ commit('setSort', '');
27
+ }
28
+ }
29
+ };
30
+
31
+ export { resetState };
32
+ //# sourceMappingURL=reset-state.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-state.action.js","sources":["../../../../../../src/x-modules/search/store/actions/reset-state.action.ts"],"sourcesContent":["import { isArrayEmpty } from '../../../../utils/array';\nimport { getNewAndUpdatedKeys } from '../../../../utils/object';\nimport { SearchXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link SearchActions.resetState}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n *\n * @public\n */\nexport const resetState: SearchXStoreModule['actions']['resetState'] = (\n { commit, state },\n { newRequest, oldRequest }\n) => {\n const changedKeys = getNewAndUpdatedKeys(newRequest, oldRequest);\n\n if (!isArrayEmpty(changedKeys)) {\n if (!changedKeys.includes('page')) {\n commit('setPage', 1);\n }\n if (changedKeys.includes('query')) {\n commit('setSort', '');\n }\n\n const haveExtraParamsChanged = changedKeys.some(key => key in state.params);\n if (haveExtraParamsChanged) {\n commit('setPage', 1);\n commit('setSort', '');\n }\n }\n};\n"],"names":[],"mappings":";;;AAIA;;;;;;;;IAQa,UAAU,GAAgD,UACrE,EAAiB,EACjB,EAA0B;QADxB,MAAM,YAAA,EAAE,KAAK,WAAA;QACb,UAAU,gBAAA,EAAE,UAAU,gBAAA;IAExB,IAAM,WAAW,GAAG,oBAAoB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAEjE,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;QAC9B,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACjC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SACtB;QACD,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACjC,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;SACvB;QAED,IAAM,sBAAsB,GAAG,WAAW,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,IAAI,KAAK,CAAC,MAAM,GAAA,CAAC,CAAC;QAC5E,IAAI,sBAAsB,EAAE;YAC1B,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;SACvB;KACF;AACH;;;;"}
@@ -20,6 +20,12 @@ var searchEmitters = createStoreEmitters(searchXStoreModule, {
20
20
  PageChanged: function (state) { return state.page; },
21
21
  ResultsChanged: function (state) { return state.results; },
22
22
  SearchRequestChanged: function (_, getters) { return getters.request; },
23
+ SearchRequestUpdated: {
24
+ selector: function (_, getters) { return getters.request; },
25
+ filter: function (newValue, oldValue) {
26
+ return !!newValue && !!oldValue;
27
+ }
28
+ },
23
29
  SearchTaggingChanged: {
24
30
  selector: function (state) { return state.queryTagging; },
25
31
  filter: function (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search module.\n *\n * @internal\n */\nexport const searchEmitters = createStoreEmitters(searchXStoreModule, {\n FacetsChanged: {\n selector: state => state.facets,\n filter(newValue, oldValue): boolean {\n return newValue.length !== 0 || oldValue.length !== 0;\n }\n },\n PageChanged: state => state.page,\n ResultsChanged: state => state.results,\n SearchRequestChanged: (_, getters) => getters.request,\n SearchTaggingChanged: {\n selector: state => state.queryTagging,\n filter: ({ url }) => !isStringEmpty(url)\n },\n SpellcheckChanged: state => state.spellcheckedQuery,\n SortChanged: state => state.sort\n});\n"],"names":[],"mappings":";;;;;;;AAIA;;;;;IAKa,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;IACpE,aAAa,EAAE;QACb,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,MAAM,GAAA;QAC/B,MAAM,EAAN,UAAO,QAAQ,EAAE,QAAQ;YACvB,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;SACvD;KACF;IACD,WAAW,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,IAAI,GAAA;IAChC,cAAc,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,GAAA;IACtC,oBAAoB,EAAE,UAAC,CAAC,EAAE,OAAO,IAAK,OAAA,OAAO,CAAC,OAAO,GAAA;IACrD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,YAAY,GAAA;QACrC,MAAM,EAAE,UAAC,EAAO;gBAAL,GAAG,SAAA;YAAO,OAAA,CAAC,aAAa,CAAC,GAAG,CAAC;SAAA;KACzC;IACD,iBAAiB,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,iBAAiB,GAAA;IACnD,WAAW,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,IAAI,GAAA;CACjC;;;;"}
1
+ {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/search/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store';\nimport { isStringEmpty } from '../../../utils/string';\nimport { searchXStoreModule } from './module';\n\n/**\n * {@link StoreEmitters} For the search module.\n *\n * @internal\n */\nexport const searchEmitters = createStoreEmitters(searchXStoreModule, {\n FacetsChanged: {\n selector: state => state.facets,\n filter(newValue, oldValue): boolean {\n return newValue.length !== 0 || oldValue.length !== 0;\n }\n },\n PageChanged: state => state.page,\n ResultsChanged: state => state.results,\n SearchRequestChanged: (_, getters) => getters.request,\n SearchRequestUpdated: {\n selector: (_, getters) => getters.request!,\n filter(newValue, oldValue): boolean {\n return !!newValue && !!oldValue;\n }\n },\n SearchTaggingChanged: {\n selector: state => state.queryTagging,\n filter: ({ url }) => !isStringEmpty(url)\n },\n SpellcheckChanged: state => state.spellcheckedQuery,\n SortChanged: state => state.sort\n});\n"],"names":[],"mappings":";;;;;;;AAIA;;;;;IAKa,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;IACpE,aAAa,EAAE;QACb,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,MAAM,GAAA;QAC/B,MAAM,EAAN,UAAO,QAAQ,EAAE,QAAQ;YACvB,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;SACvD;KACF;IACD,WAAW,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,IAAI,GAAA;IAChC,cAAc,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,GAAA;IACtC,oBAAoB,EAAE,UAAC,CAAC,EAAE,OAAO,IAAK,OAAA,OAAO,CAAC,OAAO,GAAA;IACrD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,UAAC,CAAC,EAAE,OAAO,IAAK,OAAA,OAAO,CAAC,OAAQ,GAAA;QAC1C,MAAM,EAAN,UAAO,QAAQ,EAAE,QAAQ;YACvB,OAAO,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC;SACjC;KACF;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,YAAY,GAAA;QACrC,MAAM,EAAE,UAAC,EAAO;gBAAL,GAAG,SAAA;YAAO,OAAA,CAAC,aAAa,CAAC,GAAG,CAAC;SAAA;KACzC;IACD,iBAAiB,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,iBAAiB,GAAA;IACnD,WAAW,EAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,IAAI,GAAA;CACjC;;;;"}
@@ -4,6 +4,7 @@ import { isFacetFilter } from '@empathyco/x-types';
4
4
  import { cancelFetchAndSaveSearchResponse, fetchAndSaveSearchResponse } from './actions/fetch-and-save-search-response.action.js';
5
5
  import { fetchSearchResponse } from './actions/fetch-search-response.action.js';
6
6
  import { increasePageAppendingResults } from './actions/increase-page-apending-results.action.js';
7
+ import { resetState } from './actions/reset-state.action.js';
7
8
  import { saveOrigin } from './actions/save-origin.action.js';
8
9
  import { setUrlParams } from './actions/set-url-params.action.js';
9
10
  import { request } from './getters/request.getter.js';
@@ -112,6 +113,7 @@ var searchXStoreModule = {
112
113
  fetchSearchResponse: fetchSearchResponse,
113
114
  fetchAndSaveSearchResponse: fetchAndSaveSearchResponse,
114
115
  increasePageAppendingResults: increasePageAppendingResults,
116
+ resetState: resetState,
115
117
  setUrlParams: setUrlParams,
116
118
  saveOrigin: saveOrigin
117
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import { isFacetFilter } from '@empathyco/x-types';\nimport { setStatus } from '../../../store/utils/status-store.utils';\nimport { groupItemsBy } from '../../../utils/array';\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse\n} from './actions/fetch-and-save-search-response.action';\nimport { fetchSearchResponse } from './actions/fetch-search-response.action';\nimport { increasePageAppendingResults } from './actions/increase-page-apending-results.action';\nimport { saveOrigin } from './actions/save-origin.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { request } from './getters/request.getter';\nimport { SearchXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n query: '',\n params: {},\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n selectedFilters: {},\n config: {\n pageSize: 24\n },\n totalResults: 0,\n spellcheckedQuery: '',\n status: 'initial',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {}\n }\n }),\n getters: {\n request\n },\n mutations: {\n setQuery(state, newQuery) {\n state.query = newQuery;\n },\n setResults(state, results) {\n state.results = results;\n },\n appendResults(state, results) {\n state.results.push(...results);\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults;\n },\n setFacets(state, facets) {\n state.facets = facets;\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags;\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : '__unknown__'\n );\n },\n setBanners(state, banners) {\n state.banners = banners;\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds;\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery;\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setSort(state, sort) {\n state.sort = sort;\n },\n setPage(state, page) {\n state.page = page;\n },\n setPageSize(state, pageSize) {\n state.config.pageSize = pageSize;\n },\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults;\n },\n setStatus,\n setParams(state, params) {\n state.params = params;\n },\n setOrigin(state, origin = null) {\n state.origin = origin;\n },\n setRedirections(state, redirections) {\n state.redirections = redirections;\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging;\n }\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchSearchResponse,\n fetchAndSaveSearchResponse,\n increasePageAppendingResults,\n setUrlParams,\n saveOrigin\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;AAcA;;;;;IAKa,kBAAkB,GAAuB;IACpD,KAAK,EAAE,cAAM,QAAC;QACZ,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE;QAClB,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,EAAE;QACnB,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,KAAK;QACtB,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE;YACZ,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,IAAC;IACF,OAAO,EAAE;QACP,OAAO,SAAA;KACR;IACD,SAAS,EAAE;QACT,QAAQ,YAAC,KAAK,EAAE,QAAQ;YACtB,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;SACxB;QACD,UAAU,YAAC,KAAK,EAAE,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;SACzB;QACD,aAAa,YAAC,KAAK,EAAE,OAAO;;YAC1B,CAAA,KAAA,KAAK,CAAC,OAAO,EAAC,IAAI,WAAI,OAAO,EAAE;SAChC;QACD,iBAAiB,YAAC,KAAK,EAAE,cAAc;YACrC,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;SACvC;QACD,SAAS,YAAC,KAAK,EAAE,MAAM;YACrB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,cAAc,YAAC,KAAK,EAAE,WAAW;YAC/B,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;SACjC;QACD,kBAAkB,YAAC,KAAK,EAAE,eAAe;YACvC,KAAK,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,EAAE,UAAA,MAAM;gBAC1D,OAAA,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,GAAG,aAAa;aAAA,CACvD,CAAC;SACH;QACD,UAAU,YAAC,KAAK,EAAE,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;SACzB;QACD,YAAY,YAAC,KAAK,EAAE,SAAS;YAC3B,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;SAC7B;QACD,aAAa,YAAC,KAAK,EAAE,iBAAiB;YACpC,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;SAC7C;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,WAAW,YAAC,KAAK,EAAE,QAAQ;YACzB,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAClC;QACD,kBAAkB,YAAC,KAAK,EAAE,eAAe;YACvC,KAAK,CAAC,eAAe,GAAG,eAAe,CAAC;SACzC;QACD,SAAS,WAAA;QACT,SAAS,YAAC,KAAK,EAAE,MAAM;YACrB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,SAAS,YAAC,KAAK,EAAE,MAAa;YAAb,uBAAA,EAAA,aAAa;YAC5B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;KACF;IACD,OAAO,EAAE;QACP,gCAAgC,kCAAA;QAChC,mBAAmB,qBAAA;QACnB,0BAA0B,4BAAA;QAC1B,4BAA4B,8BAAA;QAC5B,YAAY,cAAA;QACZ,UAAU,YAAA;KACX;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import { isFacetFilter } from '@empathyco/x-types';\nimport { setStatus } from '../../../store/utils/status-store.utils';\nimport { groupItemsBy } from '../../../utils/array';\n// eslint-disable-next-line max-len\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse\n} from './actions/fetch-and-save-search-response.action';\nimport { fetchSearchResponse } from './actions/fetch-search-response.action';\nimport { increasePageAppendingResults } from './actions/increase-page-apending-results.action';\nimport { resetState } from './actions/reset-state.action';\nimport { saveOrigin } from './actions/save-origin.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { request } from './getters/request.getter';\nimport { SearchXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n query: '',\n params: {},\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n selectedFilters: {},\n config: {\n pageSize: 24\n },\n totalResults: 0,\n spellcheckedQuery: '',\n status: 'initial',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {}\n }\n }),\n getters: {\n request\n },\n mutations: {\n setQuery(state, newQuery) {\n state.query = newQuery;\n },\n setResults(state, results) {\n state.results = results;\n },\n appendResults(state, results) {\n state.results.push(...results);\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults;\n },\n setFacets(state, facets) {\n state.facets = facets;\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags;\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : '__unknown__'\n );\n },\n setBanners(state, banners) {\n state.banners = banners;\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds;\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery;\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults;\n },\n setSort(state, sort) {\n state.sort = sort;\n },\n setPage(state, page) {\n state.page = page;\n },\n setPageSize(state, pageSize) {\n state.config.pageSize = pageSize;\n },\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults;\n },\n setStatus,\n setParams(state, params) {\n state.params = params;\n },\n setOrigin(state, origin = null) {\n state.origin = origin;\n },\n setRedirections(state, redirections) {\n state.redirections = redirections;\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging;\n }\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchSearchResponse,\n fetchAndSaveSearchResponse,\n increasePageAppendingResults,\n resetState,\n setUrlParams,\n saveOrigin\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA;;;;;IAKa,kBAAkB,GAAuB;IACpD,KAAK,EAAE,cAAM,QAAC;QACZ,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE;QAClB,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,EAAE;QACnB,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,EAAE;QACrB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,KAAK;QACtB,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE;YACZ,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;SACX;KACF,IAAC;IACF,OAAO,EAAE;QACP,OAAO,SAAA;KACR;IACD,SAAS,EAAE;QACT,QAAQ,YAAC,KAAK,EAAE,QAAQ;YACtB,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;SACxB;QACD,UAAU,YAAC,KAAK,EAAE,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;SACzB;QACD,aAAa,YAAC,KAAK,EAAE,OAAO;;YAC1B,CAAA,KAAA,KAAK,CAAC,OAAO,EAAC,IAAI,WAAI,OAAO,EAAE;SAChC;QACD,iBAAiB,YAAC,KAAK,EAAE,cAAc;YACrC,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;SACvC;QACD,SAAS,YAAC,KAAK,EAAE,MAAM;YACrB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,cAAc,YAAC,KAAK,EAAE,WAAW;YAC/B,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;SACjC;QACD,kBAAkB,YAAC,KAAK,EAAE,eAAe;YACvC,KAAK,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,EAAE,UAAA,MAAM;gBAC1D,OAAA,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,GAAG,aAAa;aAAA,CACvD,CAAC;SACH;QACD,UAAU,YAAC,KAAK,EAAE,OAAO;YACvB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;SACzB;QACD,YAAY,YAAC,KAAK,EAAE,SAAS;YAC3B,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;SAC7B;QACD,aAAa,YAAC,KAAK,EAAE,iBAAiB;YACpC,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;SAC7C;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,OAAO,YAAC,KAAK,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;SACnB;QACD,WAAW,YAAC,KAAK,EAAE,QAAQ;YACzB,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAClC;QACD,kBAAkB,YAAC,KAAK,EAAE,eAAe;YACvC,KAAK,CAAC,eAAe,GAAG,eAAe,CAAC;SACzC;QACD,SAAS,WAAA;QACT,SAAS,YAAC,KAAK,EAAE,MAAM;YACrB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,SAAS,YAAC,KAAK,EAAE,MAAa;YAAb,uBAAA,EAAA,aAAa;YAC5B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;QACD,eAAe,YAAC,KAAK,EAAE,YAAY;YACjC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;SACnC;KACF;IACD,OAAO,EAAE;QACP,gCAAgC,kCAAA;QAChC,mBAAmB,qBAAA;QACnB,0BAA0B,4BAAA;QAC1B,4BAA4B,8BAAA;QAC5B,UAAU,YAAA;QACV,YAAY,cAAA;QACZ,UAAU,YAAA;KACX;;;;;"}