@empathyco/x-components 3.0.0-alpha.36 → 3.0.0-alpha.40

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 (199) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/core/index.js +1 -1
  3. package/design-system/.-variables.css +0 -0
  4. package/design-system/base.css +4 -2
  5. package/design-system/default-theme.css +28 -18
  6. package/design-system/full-theme.css +159 -131
  7. package/design-system/suggestion-default.css +4 -2
  8. package/design-system/tag-default.css +19 -14
  9. package/design-system/typography-accent.token.css +1 -1
  10. package/design-system/utilities-background-color.css +9 -0
  11. package/design-system/utilities-border-color.css +9 -0
  12. package/design-system/utilities-border-radius.css +0 -24
  13. package/design-system/utilities-border-width.css +40 -40
  14. package/design-system/utilities-box-shadow.css +64 -1
  15. package/design-system/utilities-font-color.css +9 -0
  16. package/design-system/utilities-margin.css +0 -24
  17. package/design-system/utilities-padding.css +0 -24
  18. package/docs/API-reference/api/x-adapter.empathynextquery.md +1 -0
  19. package/docs/API-reference/api/x-adapter.empathynextquery.source.md +11 -0
  20. package/docs/API-reference/api/x-components.cancelfetchandsavesearchresponsewire.md +1 -1
  21. package/docs/API-reference/api/x-components.fetchandsavesearchresponse.md +1 -1
  22. package/docs/API-reference/api/x-components.fetchandsavesearchresponsewire.md +1 -1
  23. package/docs/API-reference/api/x-components.getnewandupdatedkeys.md +27 -0
  24. package/docs/API-reference/api/x-components.increasepageappendingresults.md +1 -1
  25. package/docs/API-reference/api/x-components.internalsearchrequest.md +21 -0
  26. package/docs/API-reference/api/x-components.internalsearchrequest.page.md +13 -0
  27. package/docs/API-reference/api/x-components.mainscroll.md +2 -2
  28. package/docs/API-reference/api/x-components.md +8 -6
  29. package/docs/API-reference/api/x-components.resetappending.md +1 -1
  30. package/docs/API-reference/api/x-components.resetspellcheckquery.md +1 -1
  31. package/docs/API-reference/api/x-components.resetstatewire.md +13 -0
  32. package/docs/API-reference/api/x-components.saveoriginwire.md +1 -1
  33. package/docs/API-reference/api/x-components.scroll.md +1 -3
  34. package/docs/API-reference/api/x-components.scrollmixin.md +1 -0
  35. package/docs/API-reference/api/x-components.scrollmixin.reseton.md +13 -0
  36. package/docs/API-reference/api/x-components.searchactions.fetchandsavesearchresponse.md +2 -2
  37. package/docs/API-reference/api/x-components.searchactions.md +1 -0
  38. package/docs/API-reference/api/x-components.searchactions.resetstate.md +24 -0
  39. package/docs/API-reference/api/x-components.searchgetters.md +1 -1
  40. package/docs/API-reference/api/x-components.searchgetters.request.md +1 -1
  41. package/docs/API-reference/api/x-components.searchxevents.md +2 -1
  42. package/docs/API-reference/api/x-components.searchxevents.searchrequestchanged.md +1 -1
  43. package/docs/API-reference/api/x-components.searchxevents.searchrequestupdated.md +13 -0
  44. package/docs/API-reference/api/x-components.setpagesize.md +1 -1
  45. package/docs/API-reference/api/x-components.setquerytagginginfo.md +13 -0
  46. package/docs/API-reference/api/x-components.setrelatedtags.md +1 -1
  47. package/docs/API-reference/api/x-components.setsearchextraparams.md +1 -1
  48. package/docs/API-reference/api/x-components.setsearchpage.md +1 -1
  49. package/docs/API-reference/api/x-components.setsearchquery.md +1 -1
  50. package/docs/API-reference/api/x-components.setselectedfilters.md +1 -1
  51. package/docs/API-reference/api/x-components.setsort.md +1 -1
  52. package/docs/API-reference/api/x-components.seturlparams.md +1 -1
  53. package/docs/API-reference/api/x-components.slidingpanel.md +2 -12
  54. package/docs/API-reference/api/x-components.slidingpanel.resetoncontentchange.md +13 -0
  55. package/docs/API-reference/api/x-components.slidingpanel.scrollfactor.md +1 -1
  56. package/docs/API-reference/api/x-components.slidingpanel.showbuttons.md +1 -1
  57. package/docs/API-reference/api/x-components.taggingmutations.md +1 -0
  58. package/docs/API-reference/api/x-components.taggingmutations.setquerytagginginfo.md +24 -0
  59. package/docs/API-reference/api/x-components.taggingstate.md +1 -0
  60. package/docs/API-reference/api/x-components.taggingstate.querytagginginfo.md +13 -0
  61. package/docs/API-reference/api/x-components.taggingxevents.md +1 -0
  62. package/docs/API-reference/api/x-components.taggingxevents.searchtaggingreceived.md +13 -0
  63. package/docs/API-reference/api/x-components.trackquerywire.md +2 -2
  64. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.md +21 -0
  65. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.newrequest.md +11 -0
  66. package/docs/API-reference/api/x-components.watchedinternalsearchrequest.oldrequest.md +11 -0
  67. package/docs/API-reference/api/x-components.wiremetadata.md +1 -0
  68. package/docs/API-reference/api/x-components.wiremetadata.oldvalue.md +13 -0
  69. package/docs/API-reference/api/x-components.xcomponentaliasapi.md +1 -0
  70. package/docs/API-reference/api/x-components.xcomponentaliasapi.selectedsort.md +13 -0
  71. package/docs/API-reference/api/x-types.nextquery.iscurated.md +13 -0
  72. package/docs/API-reference/api/x-types.nextquery.md +6 -0
  73. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +52 -33
  74. package/docs/API-reference/components/common/x-components.sliding-panel.md +192 -33
  75. package/docs/API-reference/components/scroll/x-components.main-scroll.md +1 -1
  76. package/docs/API-reference/components/scroll/x-components.scroll.md +5 -8
  77. package/js/components/currency/base-currency.vue.js +3 -2
  78. package/js/components/currency/base-currency.vue.js.map +1 -1
  79. package/js/components/layouts/single-column-layout.vue.js +12 -4
  80. package/js/components/layouts/single-column-layout.vue.js.map +1 -1
  81. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
  82. package/js/components/result/base-result-image.vue.js +3 -2
  83. package/js/components/result/base-result-image.vue.js.map +1 -1
  84. package/js/components/result/base-result-image.vue_rollup-plugin-vue=script.js.map +1 -1
  85. package/js/components/scroll/base-scroll.vue.js +2 -2
  86. package/js/components/scroll/base-scroll.vue.js.map +1 -1
  87. package/js/components/scroll/scroll.mixin.js +12 -6
  88. package/js/components/scroll/scroll.mixin.js.map +1 -1
  89. package/js/components/sliding-panel.vue.js +2 -2
  90. package/js/components/sliding-panel.vue.js.map +1 -1
  91. package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js +56 -40
  92. package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js.map +1 -1
  93. package/js/directives/infinite-scroll/infinite-scroll.js +2 -1
  94. package/js/directives/infinite-scroll/infinite-scroll.js.map +1 -1
  95. package/js/index.js +3 -3
  96. package/js/plugins/x-emitters.js +3 -3
  97. package/js/plugins/x-emitters.js.map +1 -1
  98. package/js/plugins/x-plugin.alias.js +4 -0
  99. package/js/plugins/x-plugin.alias.js.map +1 -1
  100. package/js/utils/object.js +17 -1
  101. package/js/utils/object.js.map +1 -1
  102. package/js/x-modules/facets/wiring.js +3 -0
  103. package/js/x-modules/facets/wiring.js.map +1 -1
  104. package/js/x-modules/related-tags/wiring.js +3 -0
  105. package/js/x-modules/related-tags/wiring.js.map +1 -1
  106. package/js/x-modules/scroll/components/main-scroll.vue.js +17 -6
  107. package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -1
  108. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +20 -2
  109. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  110. package/js/x-modules/scroll/components/scroll.vue.js +14 -13
  111. package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
  112. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +2 -9
  113. package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -1
  114. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +19 -5
  115. package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
  116. package/js/x-modules/search/store/actions/increase-page-apending-results.action.js +1 -1
  117. package/js/x-modules/search/store/actions/increase-page-apending-results.action.js.map +1 -1
  118. package/js/x-modules/search/store/actions/reset-state.action.js +32 -0
  119. package/js/x-modules/search/store/actions/reset-state.action.js.map +1 -0
  120. package/js/x-modules/search/store/emitters.js +6 -0
  121. package/js/x-modules/search/store/emitters.js.map +1 -1
  122. package/js/x-modules/search/store/getters/request.getter.js +2 -2
  123. package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
  124. package/js/x-modules/search/store/module.js +2 -3
  125. package/js/x-modules/search/store/module.js.map +1 -1
  126. package/js/x-modules/search/wiring.js +15 -32
  127. package/js/x-modules/search/wiring.js.map +1 -1
  128. package/js/x-modules/tagging/store/emitters.js +2 -4
  129. package/js/x-modules/tagging/store/emitters.js.map +1 -1
  130. package/js/x-modules/tagging/store/module.js +5 -1
  131. package/js/x-modules/tagging/store/module.js.map +1 -1
  132. package/js/x-modules/tagging/wiring.js +19 -8
  133. package/js/x-modules/tagging/wiring.js.map +1 -1
  134. package/package.json +4 -4
  135. package/report/x-adapter.api.json +26 -0
  136. package/report/x-components.api.json +545 -304
  137. package/report/x-components.api.md +69 -46
  138. package/report/x-types.api.json +28 -1
  139. package/search/index.js +1 -1
  140. package/tagging/index.js +1 -1
  141. package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
  142. package/types/components/result/base-result-image.vue.d.ts.map +1 -1
  143. package/types/components/scroll/scroll.mixin.d.ts +7 -0
  144. package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
  145. package/types/components/sliding-panel.vue.d.ts +35 -18
  146. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  147. package/types/plugins/x-plugin.alias.d.ts.map +1 -1
  148. package/types/plugins/x-plugin.types.d.ts +2 -0
  149. package/types/plugins/x-plugin.types.d.ts.map +1 -1
  150. package/types/utils/object.d.ts +11 -0
  151. package/types/utils/object.d.ts.map +1 -1
  152. package/types/wiring/wiring.types.d.ts +2 -0
  153. package/types/wiring/wiring.types.d.ts.map +1 -1
  154. package/types/x-modules/facets/wiring.d.ts +3 -0
  155. package/types/x-modules/facets/wiring.d.ts.map +1 -1
  156. package/types/x-modules/related-tags/wiring.d.ts +3 -0
  157. package/types/x-modules/related-tags/wiring.d.ts.map +1 -1
  158. package/types/x-modules/scroll/components/main-scroll.vue.d.ts +11 -2
  159. package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -1
  160. package/types/x-modules/scroll/components/scroll.vue.d.ts +2 -17
  161. package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -1
  162. package/types/x-modules/search/events.types.d.ts +7 -2
  163. package/types/x-modules/search/events.types.d.ts.map +1 -1
  164. package/types/x-modules/search/index.d.ts +1 -0
  165. package/types/x-modules/search/index.d.ts.map +1 -1
  166. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts +2 -2
  167. package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
  168. package/types/x-modules/search/store/actions/reset-state.action.d.ts +11 -0
  169. package/types/x-modules/search/store/actions/reset-state.action.d.ts.map +1 -0
  170. package/types/x-modules/search/store/emitters.d.ts +5 -1
  171. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  172. package/types/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
  173. package/types/x-modules/search/store/module.d.ts.map +1 -1
  174. package/types/x-modules/search/store/types.d.ts +9 -2
  175. package/types/x-modules/search/store/types.d.ts.map +1 -1
  176. package/types/x-modules/search/types.d.ts +22 -0
  177. package/types/x-modules/search/types.d.ts.map +1 -0
  178. package/types/x-modules/search/wiring.d.ts +37 -59
  179. package/types/x-modules/search/wiring.d.ts.map +1 -1
  180. package/types/x-modules/tagging/events.types.d.ts +6 -0
  181. package/types/x-modules/tagging/events.types.d.ts.map +1 -1
  182. package/types/x-modules/tagging/store/emitters.d.ts +1 -0
  183. package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
  184. package/types/x-modules/tagging/store/module.d.ts.map +1 -1
  185. package/types/x-modules/tagging/store/types.d.ts +10 -0
  186. package/types/x-modules/tagging/store/types.d.ts.map +1 -1
  187. package/types/x-modules/tagging/wiring.d.ts +16 -7
  188. package/types/x-modules/tagging/wiring.d.ts.map +1 -1
  189. package/docs/API-reference/api/x-components.resetfacets.md +0 -13
  190. package/docs/API-reference/api/x-components.resetpage.md +0 -13
  191. package/docs/API-reference/api/x-components.resetsort.md +0 -13
  192. package/docs/API-reference/api/x-components.scroll.distancetobottom.md +0 -13
  193. package/docs/API-reference/api/x-components.scroll.throttlems.md +0 -13
  194. package/docs/API-reference/api/x-components.slidingpanel._refs.md +0 -15
  195. package/docs/API-reference/api/x-components.slidingpanel.beforedestroy.md +0 -15
  196. package/docs/API-reference/api/x-components.slidingpanel.isscrollatend.md +0 -13
  197. package/docs/API-reference/api/x-components.slidingpanel.isscrollatstart.md +0 -13
  198. package/docs/API-reference/api/x-components.slidingpanel.mounted.md +0 -15
  199. package/docs/API-reference/api/x-components.slidingpanel.scrollobserver.md +0 -13
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchActions](./x-components.searchactions.md) &gt; [resetState](./x-components.searchactions.resetstate.md)
4
+
5
+ ## SearchActions.resetState() method
6
+
7
+ Batches state resets in a single action after [SearchGetters.request](./x-components.searchgetters.request.md) parameters update.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ resetState(watchedRequest: WatchedInternalSearchRequest): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | watchedRequest | [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) | The watched internal search request object. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -16,5 +16,5 @@ export interface SearchGetters
16
16
 
17
17
  | Property | Type | Description |
18
18
  | --- | --- | --- |
19
- | [request](./x-components.searchgetters.request.md) | SearchRequest \| null | The adapter request object for retrieving the results, or null if there is not valid data to create a request. |
19
+ | [request](./x-components.searchgetters.request.md) | [InternalSearchRequest](./x-components.internalsearchrequest.md) \| null | The adapter request object for retrieving the results, or null if there is not valid data to create a request. |
20
20
 
@@ -9,5 +9,5 @@ The adapter request object for retrieving the results, or null if there is not v
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- request: SearchRequest | null;
12
+ request: InternalSearchRequest | null;
13
13
  ```
@@ -19,7 +19,8 @@ export interface SearchXEvents
19
19
  | [FacetsChanged](./x-components.searchxevents.facetschanged.md) | Facet\[\] | The facets have changed. \* Payload: The [facets](./x-types.facet.md) array. |
20
20
  | [PageChanged](./x-components.searchxevents.pagechanged.md) | number | Page has been changed. \* Payload: The new page number. |
21
21
  | [ResultsChanged](./x-components.searchxevents.resultschanged.md) | Result\[\] | Results have been changed. \* Payload: The new [results](./x-types.result.md)<!-- -->. |
22
- | [SearchRequestChanged](./x-components.searchxevents.searchrequestchanged.md) | SearchRequest \| null | Any property of the search request has changed. \* Payload: The new search request or <code>null</code> if there is not enough data in the state to conform a valid request. |
22
+ | [SearchRequestChanged](./x-components.searchxevents.searchrequestchanged.md) | [InternalSearchRequest](./x-components.internalsearchrequest.md) \| null | Any property of the search request has changed. \* Payload: The new search request or <code>null</code> if there is not enough data in the state to conform a valid request. |
23
+ | [SearchRequestUpdated](./x-components.searchxevents.searchrequestupdated.md) | [InternalSearchRequest](./x-components.internalsearchrequest.md) | Any property of the search request has been updated. \* Payload: The new internal request object. |
23
24
  | [SearchTaggingChanged](./x-components.searchxevents.searchtaggingchanged.md) | TaggingInfo | Query tagging has been changed. \* Payload: The new query tagging object. |
24
25
  | [SelectedSortProvided](./x-components.searchxevents.selectedsortprovided.md) | Sort | A new selected sort has been provided. \* Payload: The sort option that has been provided. |
25
26
  | [SortChanged](./x-components.searchxevents.sortchanged.md) | string | Sort has been changed. \* Payload: The new sort string. |
@@ -9,5 +9,5 @@ Any property of the search request has changed. \* Payload: The new search reque
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- SearchRequestChanged: SearchRequest | null;
12
+ SearchRequestChanged: InternalSearchRequest | null;
13
13
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchXEvents](./x-components.searchxevents.md) &gt; [SearchRequestUpdated](./x-components.searchxevents.searchrequestupdated.md)
4
+
5
+ ## SearchXEvents.SearchRequestUpdated property
6
+
7
+ Any property of the search request has been updated. \* Payload: The new internal request object.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ SearchRequestUpdated: InternalSearchRequest;
13
+ ```
@@ -9,5 +9,5 @@ Sets the search state `pageSize`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setPageSize: import("../..").Wire<number>
12
+ setPageSize: import("../../wiring/wiring.types").Wire<number>
13
13
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [setQueryTaggingInfo](./x-components.setquerytagginginfo.md)
4
+
5
+ ## setQueryTaggingInfo variable
6
+
7
+ Sets the tagging state of the query tagging info using a debounce which ends if the user accepts a query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setQueryTaggingInfo: Wire<TaggingInfo>
13
+ ```
@@ -9,5 +9,5 @@ Sets the search state `relatedTags`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setRelatedTags: import("../..").Wire<import("@empathyco/x-types").RelatedTag[]>
12
+ setRelatedTags: import("../../wiring/wiring.types").Wire<import("@empathyco/x-types").RelatedTag[]>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `params`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSearchExtraParams: import("../..").Wire<import("../..").Dictionary<unknown>>
12
+ setSearchExtraParams: import("../../wiring/wiring.types").Wire<import("../..").Dictionary<unknown>>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `page`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSearchPage: import("../..").Wire<number>
12
+ setSearchPage: import("../../wiring/wiring.types").Wire<number>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `query`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSearchQuery: import("../..").Wire<string>
12
+ setSearchQuery: import("../../wiring/wiring.types").Wire<string>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `selectedFilters`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSelectedFilters: import("../..").Wire<import("@empathyco/x-types").Filter[]>
12
+ setSelectedFilters: import("../../wiring/wiring.types").Wire<import("@empathyco/x-types").Filter[]>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `sort`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setSort: import("../..").Wire<string>
12
+ setSort: import("../../wiring/wiring.types").Wire<string>
13
13
  ```
@@ -9,5 +9,5 @@ Sets the search state `query`<!-- -->.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- setUrlParams: import("../..").Wire<import("../..").UrlParams>
12
+ setUrlParams: import("../../wiring/wiring.types").Wire<import("../..").UrlParams>
13
13
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## SlidingPanel class
6
6
 
7
- Horizontal slide panel component. The content that is provided to this component would be navigable horizontally using two navigational buttons.
7
+ This component allows for any other component or element inside it to be horizontally navigable. It also implements customizable buttons as well as other minor customizations to its general behavior.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
@@ -17,17 +17,7 @@ export default class SlidingPanel extends Vue
17
17
 
18
18
  | Property | Modifiers | Type | Description |
19
19
  | --- | --- | --- | --- |
20
- | [$refs](./x-components.slidingpanel._refs.md) | | { scrollContainer: HTMLElement; } | HTMLElement referencing the scroll of the component. |
21
- | [isScrollAtEnd](./x-components.slidingpanel.isscrollatend.md) | | boolean | Indicates if the scroll is at the end of the sliding panel. |
22
- | [isScrollAtStart](./x-components.slidingpanel.isscrollatstart.md) | | boolean | Indicates if the scroll is at the start of the sliding panel. |
20
+ | [resetOnContentChange](./x-components.slidingpanel.resetoncontentchange.md) | | boolean | When true, whenever the DOM content in the sliding panel slot changes, it will reset the scroll position to 0. |
23
21
  | [scrollFactor](./x-components.slidingpanel.scrollfactor.md) | | number | Scroll factor that will dictate how much the scroll moves when pressing a navigation button. |
24
- | [scrollObserver](./x-components.slidingpanel.scrollobserver.md) | | MutationObserver | MutationObserver that watches for changes inside the wrapping div to update the scroll position. |
25
22
  | [showButtons](./x-components.slidingpanel.showbuttons.md) | | boolean | Would make the navigation buttons visible when they're needed or always hide them. |
26
23
 
27
- ## Methods
28
-
29
- | Method | Modifiers | Description |
30
- | --- | --- | --- |
31
- | [beforeDestroy()](./x-components.slidingpanel.beforedestroy.md) | | |
32
- | [mounted()](./x-components.slidingpanel.mounted.md) | | |
33
-
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SlidingPanel](./x-components.slidingpanel.md) &gt; [resetOnContentChange](./x-components.slidingpanel.resetoncontentchange.md)
4
+
5
+ ## SlidingPanel.resetOnContentChange property
6
+
7
+ When true, whenever the DOM content in the sliding panel slot changes, it will reset the scroll position to 0.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ resetOnContentChange: boolean;
13
+ ```
@@ -9,5 +9,5 @@ Scroll factor that will dictate how much the scroll moves when pressing a naviga
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- protected scrollFactor: number;
12
+ scrollFactor: number;
13
13
  ```
@@ -9,5 +9,5 @@ Would make the navigation buttons visible when they're needed or always hide the
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- protected showButtons: boolean;
12
+ showButtons: boolean;
13
13
  ```
@@ -18,5 +18,6 @@ export interface TaggingMutations
18
18
  | --- | --- |
19
19
  | [setConsent(consent)](./x-components.taggingmutations.setconsent.md) | Sets the [TaggingState.consent](./x-components.taggingstate.consent.md) property. |
20
20
  | [setQueryTaggingDebounce(queryTaggingDebounceMs)](./x-components.taggingmutations.setquerytaggingdebounce.md) | Sets the [TaggingConfig.queryTaggingDebounceMs](./x-components.taggingconfig.querytaggingdebouncems.md) property. |
21
+ | [setQueryTaggingInfo(queryTaggingInfo)](./x-components.taggingmutations.setquerytagginginfo.md) | Sets the [TaggingState.queryTaggingInfo](./x-components.taggingstate.querytagginginfo.md) property. |
21
22
  | [setSessionDuration(sessionTTLMs)](./x-components.taggingmutations.setsessionduration.md) | Sets the [TaggingConfig.sessionTTLMs](./x-components.taggingconfig.sessionttlms.md) property. |
22
23
 
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [TaggingMutations](./x-components.taggingmutations.md) &gt; [setQueryTaggingInfo](./x-components.taggingmutations.setquerytagginginfo.md)
4
+
5
+ ## TaggingMutations.setQueryTaggingInfo() method
6
+
7
+ Sets the [TaggingState.queryTaggingInfo](./x-components.taggingstate.querytagginginfo.md) property.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setQueryTaggingInfo(queryTaggingInfo: TaggingInfo): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | queryTaggingInfo | TaggingInfo | The new [TaggingState.queryTaggingInfo](./x-components.taggingstate.querytagginginfo.md)<!-- -->. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -18,4 +18,5 @@ export interface TaggingState
18
18
  | --- | --- | --- |
19
19
  | [config](./x-components.taggingstate.config.md) | [TaggingConfig](./x-components.taggingconfig.md) | Configuration for the <code>Tagging</code> module. |
20
20
  | [consent](./x-components.taggingstate.consent.md) | boolean \| null | The current consent for tracking. |
21
+ | [queryTaggingInfo](./x-components.taggingstate.querytagginginfo.md) | TaggingInfo \| null | Tagging info for last accepted query. |
21
22
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [TaggingState](./x-components.taggingstate.md) &gt; [queryTaggingInfo](./x-components.taggingstate.querytagginginfo.md)
4
+
5
+ ## TaggingState.queryTaggingInfo property
6
+
7
+ Tagging info for last accepted query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ queryTaggingInfo: TaggingInfo | null;
13
+ ```
@@ -19,5 +19,6 @@ export interface TaggingXEvents
19
19
  | [ConsentChanged](./x-components.taggingxevents.consentchanged.md) | boolean | Consent has changed. \* Payload: The new consent value. |
20
20
  | [ConsentProvided](./x-components.taggingxevents.consentprovided.md) | boolean | Consent has been provided. \* Payload: The new consent value. |
21
21
  | [QueryTaggingDebounceProvided](./x-components.taggingxevents.querytaggingdebounceprovided.md) | number | Query tagging debounce has been provided. \* Payload: The new query tagging debounce value. |
22
+ | [SearchTaggingReceived](./x-components.taggingxevents.searchtaggingreceived.md) | TaggingInfo | Query tagging info has changed. \* Payload: The new query tagging info. |
22
23
  | [SessionDurationProvided](./x-components.taggingxevents.sessiondurationprovided.md) | number | Session duration has been provided. \* Payload: The new session duration value. |
23
24
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [TaggingXEvents](./x-components.taggingxevents.md) &gt; [SearchTaggingReceived](./x-components.taggingxevents.searchtaggingreceived.md)
4
+
5
+ ## TaggingXEvents.SearchTaggingReceived property
6
+
7
+ Query tagging info has changed. \* Payload: The new query tagging info.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ SearchTaggingReceived: TaggingInfo;
13
+ ```
@@ -4,10 +4,10 @@
4
4
 
5
5
  ## trackQueryWire variable
6
6
 
7
- Tracks the tagging of the query using a debounce which ends if the user accepts a query.
7
+ Tracks the tagging of the query.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- trackQueryWire: Wire<import("@empathyco/x-types").TaggingInfo | import("@empathyco/x-types").TaggingInfo[]>
12
+ trackQueryWire: Wire<TaggingInfo | TaggingInfo[]>
13
13
  ```
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md)
4
+
5
+ ## WatchedInternalSearchRequest interface
6
+
7
+ A representation of a watched [InternalSearchRequest](./x-components.internalsearchrequest.md) object, wrapping its new and old values.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export interface WatchedInternalSearchRequest
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Description |
18
+ | --- | --- | --- |
19
+ | [newRequest](./x-components.watchedinternalsearchrequest.newrequest.md) | [InternalSearchRequest](./x-components.internalsearchrequest.md) | |
20
+ | [oldRequest](./x-components.watchedinternalsearchrequest.oldrequest.md) | [InternalSearchRequest](./x-components.internalsearchrequest.md) | |
21
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) &gt; [newRequest](./x-components.watchedinternalsearchrequest.newrequest.md)
4
+
5
+ ## WatchedInternalSearchRequest.newRequest property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ newRequest: InternalSearchRequest;
11
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) &gt; [oldRequest](./x-components.watchedinternalsearchrequest.oldrequest.md)
4
+
5
+ ## WatchedInternalSearchRequest.oldRequest property
6
+
7
+ <b>Signature:</b>
8
+
9
+ ```typescript
10
+ oldRequest: InternalSearchRequest;
11
+ ```
@@ -20,5 +20,6 @@ export interface WireMetadata
20
20
  | [id?](./x-components.wiremetadata.id.md) | string | <i>(Optional)</i> The id of the component origin. |
21
21
  | [location?](./x-components.wiremetadata.location.md) | [FeatureLocation](./x-components.featurelocation.md) | <i>(Optional)</i> The [FeatureLocation](./x-components.featurelocation.md) from where the event has been emitted. |
22
22
  | [moduleName](./x-components.wiremetadata.modulename.md) | [XModuleName](./x-components.xmodulename.md) \| null | The [XModule](./x-components.xmodule.md) name that emitted the event or <code>null</code> if it has been emitted from an unknown module. |
23
+ | [oldValue?](./x-components.wiremetadata.oldvalue.md) | unknown | <i>(Optional)</i> The old value of a watched selector triggering an emitter. |
23
24
  | [target?](./x-components.wiremetadata.target.md) | HTMLElement | <i>(Optional)</i> The DOM element that triggered the event emission. |
24
25
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [WireMetadata](./x-components.wiremetadata.md) &gt; [oldValue](./x-components.wiremetadata.oldvalue.md)
4
+
5
+ ## WireMetadata.oldValue property
6
+
7
+ The old value of a watched selector triggering an emitter.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ oldValue?: unknown;
13
+ ```
@@ -32,6 +32,7 @@ export interface XComponentAliasAPI
32
32
  | [relatedTags](./x-components.xcomponentaliasapi.relatedtags.md) | ReadonlyArray&lt;RelatedTag&gt; | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) related tags (Both selected and deselected). |
33
33
  | [selectedFilters](./x-components.xcomponentaliasapi.selectedfilters.md) | Filter\[\] | The [FacetsXModule](./x-components.facetsxmodule.md) selected filters. |
34
34
  | [selectedRelatedTags](./x-components.xcomponentaliasapi.selectedrelatedtags.md) | ReadonlyArray&lt;RelatedTag&gt; | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) selected related tags. |
35
+ | [selectedSort](./x-components.xcomponentaliasapi.selectedsort.md) | string | The [SearchXModule](./x-components.searchxmodule.md) selected sort. |
35
36
  | [spellcheckedQuery](./x-components.xcomponentaliasapi.spellcheckedquery.md) | string \| null | The [SearchXModule](./x-components.searchxmodule.md) spellchecked query. |
36
37
  | [status](./x-components.xcomponentaliasapi.status.md) | [XComponentAliasStatusAPI](./x-components.xcomponentaliasstatusapi.md) | The status value of the different modules. |
37
38
  | [totalResults](./x-components.xcomponentaliasapi.totalresults.md) | number | The [SearchXModule](./x-components.searchxmodule.md) total results. |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [XComponentAliasAPI](./x-components.xcomponentaliasapi.md) &gt; [selectedSort](./x-components.xcomponentaliasapi.selectedsort.md)
4
+
5
+ ## XComponentAliasAPI.selectedSort property
6
+
7
+ The [SearchXModule](./x-components.searchxmodule.md) selected sort.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ readonly selectedSort: string;
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-types](./x-types.md) &gt; [NextQuery](./x-types.nextquery.md) &gt; [isCurated](./x-types.nextquery.iscurated.md)
4
+
5
+ ## NextQuery.isCurated property
6
+
7
+ If it's a curated next query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ isCurated?: boolean;
13
+ ```
@@ -13,3 +13,9 @@ export interface NextQuery extends NamedModel<'NextQuery'>, Required<Previewable
13
13
  ```
14
14
  <b>Extends:</b> [NamedModel](./x-types.namedmodel.md)<!-- -->&lt;'NextQuery'&gt;, Required&lt;[Previewable](./x-types.previewable.md)<!-- -->&gt;
15
15
 
16
+ ## Properties
17
+
18
+ | Property | Type | Description |
19
+ | --- | --- | --- |
20
+ | [isCurated?](./x-types.nextquery.iscurated.md) | boolean | <i>(Optional)</i> If it's a curated next query. |
21
+
@@ -11,12 +11,13 @@ knowing when the user scrolls, the direction of scroll and if user reaches the s
11
11
 
12
12
  ## Props
13
13
 
14
- | Name | Description | Type | Default |
15
- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------- |
16
- | <code>distanceToBottom</code> | Distance to the end of the scroll that when reached will emit the<br />`scroll:about-to-end` event. | <code>number</code> | <code>100</code> |
17
- | <code>firstElementThresholdPx</code> | Positive vertical distance to still consider that the an element is the first one visible.<br />For example, if set to 100, after scrolling 100 pixels, the first rendered element<br />will still be considered the first one. | <code>number</code> | <code>100</code> |
18
- | <code>throttleMs</code> | Time duration to ignore the subsequent scroll events after an emission.<br />Higher values will decrease events precision but can prevent performance issues. | <code>number</code> | <code>100</code> |
19
- | <code>resetOnChange</code> | If true (default), sets the scroll position to the top when certain events are emitted. | <code>boolean</code> | <code>true</code> |
14
+ | Name | Description | Type | Default |
15
+ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | <code>distanceToBottom</code> | Distance to the end of the scroll that when reached will emit the<br />`scroll:about-to-end` event. | <code>number</code> | <code>100</code> |
17
+ | <code>firstElementThresholdPx</code> | Positive vertical distance to still consider that the an element is the first one visible.<br />For example, if set to 100, after scrolling 100 pixels, the first rendered element<br />will still be considered the first one. | <code>number</code> | <code>100</code> |
18
+ | <code>throttleMs</code> | Time duration to ignore the subsequent scroll events after an emission.<br />Higher values will decrease events precision but can prevent performance issues. | <code>number</code> | <code>100</code> |
19
+ | <code>resetOnChange</code> | If true (default), sets the scroll position to the top when certain events are emitted. | <code>boolean</code> | <code>true</code> |
20
+ | <code>resetOn</code> | List of events that should reset the scroll when emitted. | <code>XEvent</code> | <code>() => [<br /> 'SearchBoxQueryChanged',<br /> 'SortChanged',<br /> 'SelectedFiltersChanged',<br /> 'SelectedRelatedTagsChanged',<br /> 'UserChangedExtraParams'<br />]</code> |
20
21
 
21
22
  ## Events
22
23
 
@@ -36,10 +37,10 @@ knowing when the user scrolls, the direction of scroll and if user reaches the s
36
37
 
37
38
  ## Example
38
39
 
39
- The BaseScroll is a component that manage the states of scroll of a specified element. The component
40
- does the necessary calculations for knowing the direction of scroll, if the scroll has reached to
41
- start or to end, and is about to reaching to end. The components emits the next events depending of
42
- movement that realize the user:
40
+ The `BaseScroll` is a component that manages the state of scroll of a specified element. The
41
+ component does the necessary calculations for knowing the direction of scroll, if the scroll has
42
+ reached to start or to end, and is about to reaching to end. The components emits the next events
43
+ depending of movement that realize the user:
43
44
 
44
45
  ```vue
45
46
  <template>
@@ -49,8 +50,8 @@ movement that realize the user:
49
50
  @scroll:at-start="scrollAtStart"
50
51
  @scroll:almost-at-end="scrollAlmostAtEnd"
51
52
  @scroll:at-end="scrollAtEnd"
52
- throttleMs="1000"
53
- distanceToBottom="200"
53
+ :throttleMs="1000"
54
+ :distanceToBottom="200"
54
55
  >
55
56
  <template>
56
57
  <div class="content-scroll">
@@ -96,15 +97,7 @@ Set to false the reset scroll on query change feature which is true by default.
96
97
 
97
98
  ```vue
98
99
  <template>
99
- <BaseScroll
100
- @scroll="scroll"
101
- @scroll:direction-change="scrollDirectionChange"
102
- @scroll:at-start="scrollAtStart"
103
- @scroll:almost-at-end="scrollAlmostAtEnd"
104
- @scroll:at-end="scrollAtEnd"
105
- throttleMs="1000"
106
- distanceToBottom="200"
107
- >
100
+ <BaseScroll @scroll="scroll" :resetOnChange="false">
108
101
  <template>
109
102
  <div class="content-scroll">
110
103
  <span>content1</span>
@@ -125,18 +118,44 @@ export default {
125
118
  methods: {
126
119
  scroll(position) {
127
120
  console.log("scroll", position);
128
- },
129
- scrollDirectionChange(direction) {
130
- console.log("scroll:direction-change", direction);
131
- },
132
- scrollAtStart() {
133
- console.log("scroll:at-start");
134
- },
135
- scrollAlmostAtEnd(distance) {
136
- console.log("scroll:almost-at-end", distance);
137
- },
138
- scrollAtEnd() {
139
- console.log("scroll:at-end");
121
+ }
122
+ }
123
+ };
124
+ </script>
125
+ ```
126
+
127
+ ### Reset scroll
128
+
129
+ You can configure which events reset the scroll position using the `resetOn` prop.
130
+
131
+ ```vue
132
+ <template>
133
+ <BaseScroll @scroll="scroll" :resetOn="resetScrollEvents">
134
+ <template>
135
+ <div class="content-scroll">
136
+ <span>content1</span>
137
+ <span>content1</span>
138
+ </div>
139
+ </template>
140
+ </BaseScroll>
141
+ </template>
142
+
143
+ <script>
144
+ import { BaseScroll } from "@empathyco/x-components";
145
+
146
+ export default {
147
+ name: "ScrollTest",
148
+ components: {
149
+ BaseScroll
150
+ },
151
+ data() {
152
+ return {
153
+ resetScrollEvents: ["UserAcceptedAQuery"]
154
+ };
155
+ },
156
+ methods: {
157
+ scroll(position) {
158
+ console.log("scroll", position);
140
159
  }
141
160
  }
142
161
  };