@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.
- package/CHANGELOG.md +93 -0
- package/core/index.js +1 -1
- package/design-system/.-variables.css +0 -0
- package/design-system/base.css +4 -2
- package/design-system/default-theme.css +28 -18
- package/design-system/full-theme.css +159 -131
- package/design-system/suggestion-default.css +4 -2
- package/design-system/tag-default.css +19 -14
- package/design-system/typography-accent.token.css +1 -1
- package/design-system/utilities-background-color.css +9 -0
- package/design-system/utilities-border-color.css +9 -0
- package/design-system/utilities-border-radius.css +0 -24
- package/design-system/utilities-border-width.css +40 -40
- package/design-system/utilities-box-shadow.css +64 -1
- package/design-system/utilities-font-color.css +9 -0
- package/design-system/utilities-margin.css +0 -24
- package/design-system/utilities-padding.css +0 -24
- package/docs/API-reference/api/x-adapter.empathynextquery.md +1 -0
- package/docs/API-reference/api/x-adapter.empathynextquery.source.md +11 -0
- package/docs/API-reference/api/x-components.cancelfetchandsavesearchresponsewire.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavesearchresponse.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavesearchresponsewire.md +1 -1
- package/docs/API-reference/api/x-components.getnewandupdatedkeys.md +27 -0
- package/docs/API-reference/api/x-components.increasepageappendingresults.md +1 -1
- package/docs/API-reference/api/x-components.internalsearchrequest.md +21 -0
- package/docs/API-reference/api/x-components.internalsearchrequest.page.md +13 -0
- package/docs/API-reference/api/x-components.mainscroll.md +2 -2
- package/docs/API-reference/api/x-components.md +8 -6
- package/docs/API-reference/api/x-components.resetappending.md +1 -1
- package/docs/API-reference/api/x-components.resetspellcheckquery.md +1 -1
- package/docs/API-reference/api/x-components.resetstatewire.md +13 -0
- package/docs/API-reference/api/x-components.saveoriginwire.md +1 -1
- package/docs/API-reference/api/x-components.scroll.md +1 -3
- package/docs/API-reference/api/x-components.scrollmixin.md +1 -0
- package/docs/API-reference/api/x-components.scrollmixin.reseton.md +13 -0
- package/docs/API-reference/api/x-components.searchactions.fetchandsavesearchresponse.md +2 -2
- package/docs/API-reference/api/x-components.searchactions.md +1 -0
- package/docs/API-reference/api/x-components.searchactions.resetstate.md +24 -0
- package/docs/API-reference/api/x-components.searchgetters.md +1 -1
- package/docs/API-reference/api/x-components.searchgetters.request.md +1 -1
- package/docs/API-reference/api/x-components.searchxevents.md +2 -1
- package/docs/API-reference/api/x-components.searchxevents.searchrequestchanged.md +1 -1
- package/docs/API-reference/api/x-components.searchxevents.searchrequestupdated.md +13 -0
- package/docs/API-reference/api/x-components.setpagesize.md +1 -1
- package/docs/API-reference/api/x-components.setquerytagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.setrelatedtags.md +1 -1
- package/docs/API-reference/api/x-components.setsearchextraparams.md +1 -1
- package/docs/API-reference/api/x-components.setsearchpage.md +1 -1
- package/docs/API-reference/api/x-components.setsearchquery.md +1 -1
- package/docs/API-reference/api/x-components.setselectedfilters.md +1 -1
- package/docs/API-reference/api/x-components.setsort.md +1 -1
- package/docs/API-reference/api/x-components.seturlparams.md +1 -1
- package/docs/API-reference/api/x-components.slidingpanel.md +2 -12
- package/docs/API-reference/api/x-components.slidingpanel.resetoncontentchange.md +13 -0
- package/docs/API-reference/api/x-components.slidingpanel.scrollfactor.md +1 -1
- package/docs/API-reference/api/x-components.slidingpanel.showbuttons.md +1 -1
- package/docs/API-reference/api/x-components.taggingmutations.md +1 -0
- package/docs/API-reference/api/x-components.taggingmutations.setquerytagginginfo.md +24 -0
- package/docs/API-reference/api/x-components.taggingstate.md +1 -0
- package/docs/API-reference/api/x-components.taggingstate.querytagginginfo.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.md +1 -0
- package/docs/API-reference/api/x-components.taggingxevents.searchtaggingreceived.md +13 -0
- package/docs/API-reference/api/x-components.trackquerywire.md +2 -2
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.md +21 -0
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.newrequest.md +11 -0
- package/docs/API-reference/api/x-components.watchedinternalsearchrequest.oldrequest.md +11 -0
- package/docs/API-reference/api/x-components.wiremetadata.md +1 -0
- package/docs/API-reference/api/x-components.wiremetadata.oldvalue.md +13 -0
- package/docs/API-reference/api/x-components.xcomponentaliasapi.md +1 -0
- package/docs/API-reference/api/x-components.xcomponentaliasapi.selectedsort.md +13 -0
- package/docs/API-reference/api/x-types.nextquery.iscurated.md +13 -0
- package/docs/API-reference/api/x-types.nextquery.md +6 -0
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +52 -33
- package/docs/API-reference/components/common/x-components.sliding-panel.md +192 -33
- package/docs/API-reference/components/scroll/x-components.main-scroll.md +1 -1
- package/docs/API-reference/components/scroll/x-components.scroll.md +5 -8
- package/js/components/currency/base-currency.vue.js +3 -2
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue.js +12 -4
- package/js/components/layouts/single-column-layout.vue.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +3 -2
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +2 -2
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/scroll/scroll.mixin.js +12 -6
- package/js/components/scroll/scroll.mixin.js.map +1 -1
- package/js/components/sliding-panel.vue.js +2 -2
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js +56 -40
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/directives/infinite-scroll/infinite-scroll.js +2 -1
- package/js/directives/infinite-scroll/infinite-scroll.js.map +1 -1
- package/js/index.js +3 -3
- package/js/plugins/x-emitters.js +3 -3
- package/js/plugins/x-emitters.js.map +1 -1
- package/js/plugins/x-plugin.alias.js +4 -0
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/js/utils/object.js +17 -1
- package/js/utils/object.js.map +1 -1
- package/js/x-modules/facets/wiring.js +3 -0
- package/js/x-modules/facets/wiring.js.map +1 -1
- package/js/x-modules/related-tags/wiring.js +3 -0
- package/js/x-modules/related-tags/wiring.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll.vue.js +17 -6
- package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +20 -2
- package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue.js +14 -13
- package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +2 -9
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +19 -5
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/actions/increase-page-apending-results.action.js +1 -1
- package/js/x-modules/search/store/actions/increase-page-apending-results.action.js.map +1 -1
- package/js/x-modules/search/store/actions/reset-state.action.js +32 -0
- package/js/x-modules/search/store/actions/reset-state.action.js.map +1 -0
- package/js/x-modules/search/store/emitters.js +6 -0
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search/store/getters/request.getter.js +2 -2
- package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/search/store/module.js +2 -3
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +15 -32
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/tagging/store/emitters.js +2 -4
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +5 -1
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +19 -8
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter.api.json +26 -0
- package/report/x-components.api.json +545 -304
- package/report/x-components.api.md +69 -46
- package/report/x-types.api.json +28 -1
- package/search/index.js +1 -1
- package/tagging/index.js +1 -1
- package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
- package/types/components/result/base-result-image.vue.d.ts.map +1 -1
- package/types/components/scroll/scroll.mixin.d.ts +7 -0
- package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
- package/types/components/sliding-panel.vue.d.ts +35 -18
- package/types/components/sliding-panel.vue.d.ts.map +1 -1
- package/types/plugins/x-plugin.alias.d.ts.map +1 -1
- package/types/plugins/x-plugin.types.d.ts +2 -0
- package/types/plugins/x-plugin.types.d.ts.map +1 -1
- package/types/utils/object.d.ts +11 -0
- package/types/utils/object.d.ts.map +1 -1
- package/types/wiring/wiring.types.d.ts +2 -0
- package/types/wiring/wiring.types.d.ts.map +1 -1
- package/types/x-modules/facets/wiring.d.ts +3 -0
- package/types/x-modules/facets/wiring.d.ts.map +1 -1
- package/types/x-modules/related-tags/wiring.d.ts +3 -0
- package/types/x-modules/related-tags/wiring.d.ts.map +1 -1
- package/types/x-modules/scroll/components/main-scroll.vue.d.ts +11 -2
- package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -1
- package/types/x-modules/scroll/components/scroll.vue.d.ts +2 -17
- package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +7 -2
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/search/index.d.ts +1 -0
- package/types/x-modules/search/index.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts +2 -2
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/reset-state.action.d.ts +11 -0
- package/types/x-modules/search/store/actions/reset-state.action.d.ts.map +1 -0
- package/types/x-modules/search/store/emitters.d.ts +5 -1
- package/types/x-modules/search/store/emitters.d.ts.map +1 -1
- package/types/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
- package/types/x-modules/search/store/module.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +9 -2
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search/types.d.ts +22 -0
- package/types/x-modules/search/types.d.ts.map +1 -0
- package/types/x-modules/search/wiring.d.ts +37 -59
- package/types/x-modules/search/wiring.d.ts.map +1 -1
- package/types/x-modules/tagging/events.types.d.ts +6 -0
- package/types/x-modules/tagging/events.types.d.ts.map +1 -1
- package/types/x-modules/tagging/store/emitters.d.ts +1 -0
- package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
- package/types/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/x-modules/tagging/store/types.d.ts +10 -0
- package/types/x-modules/tagging/store/types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +16 -7
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.resetfacets.md +0 -13
- package/docs/API-reference/api/x-components.resetpage.md +0 -13
- package/docs/API-reference/api/x-components.resetsort.md +0 -13
- package/docs/API-reference/api/x-components.scroll.distancetobottom.md +0 -13
- package/docs/API-reference/api/x-components.scroll.throttlems.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel._refs.md +0 -15
- package/docs/API-reference/api/x-components.slidingpanel.beforedestroy.md +0 -15
- package/docs/API-reference/api/x-components.slidingpanel.isscrollatend.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel.isscrollatstart.md +0 -13
- package/docs/API-reference/api/x-components.slidingpanel.mounted.md +0 -15
- 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) > [@empathyco/x-components](./x-components.md) > [SearchActions](./x-components.searchactions.md) > [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) |
|
|
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
|
|
|
@@ -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) |
|
|
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. |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchXEvents](./x-components.searchxevents.md) > [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
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [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("
|
|
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("
|
|
12
|
+
setSearchExtraParams: import("../../wiring/wiring.types").Wire<import("../..").Dictionary<unknown>>
|
|
13
13
|
```
|
|
@@ -9,5 +9,5 @@ Sets the search state `selectedFilters`<!-- -->.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
setSelectedFilters: import("
|
|
12
|
+
setSelectedFilters: import("../../wiring/wiring.types").Wire<import("@empathyco/x-types").Filter[]>
|
|
13
13
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## SlidingPanel class
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
| [
|
|
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) > [@empathyco/x-components](./x-components.md) > [SlidingPanel](./x-components.slidingpanel.md) > [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
|
+
```
|
|
@@ -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) > [@empathyco/x-components](./x-components.md) > [TaggingMutations](./x-components.taggingmutations.md) > [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) > [@empathyco/x-components](./x-components.md) > [TaggingState](./x-components.taggingstate.md) > [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) > [@empathyco/x-components](./x-components.md) > [TaggingXEvents](./x-components.taggingxevents.md) > [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
|
|
7
|
+
Tracks the tagging of the query.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
trackQueryWire: Wire<
|
|
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) > [@empathyco/x-components](./x-components.md) > [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) > [@empathyco/x-components](./x-components.md) > [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) > [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) > [@empathyco/x-components](./x-components.md) > [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) > [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) > [@empathyco/x-components](./x-components.md) > [WireMetadata](./x-components.wiremetadata.md) > [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<RelatedTag> | 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<RelatedTag> | 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) > [@empathyco/x-components](./x-components.md) > [XComponentAliasAPI](./x-components.xcomponentaliasapi.md) > [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) > [@empathyco/x-types](./x-types.md) > [NextQuery](./x-types.nextquery.md) > [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)<!-- --><'NextQuery'>, Required<[Previewable](./x-types.previewable.md)<!-- -->>
|
|
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
|
|
40
|
-
does the necessary calculations for knowing the direction of scroll, if the scroll has
|
|
41
|
-
start or to end, and is about to reaching to end. The components emits the next events
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
};
|