@empathyco/x-components 3.0.0-alpha.65 → 3.0.0-alpha.68
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 +43 -0
- package/core/index.js.map +1 -1
- package/design-system/full-theme.css +15 -14
- package/docs/API-reference/api/x-adapter.empathyqueryablerequestmapper.map.md +2 -2
- package/docs/API-reference/api/x-adapter.empathyqueryablerequestmapper.md +1 -1
- package/docs/API-reference/api/x-adapter.md +0 -1
- package/docs/API-reference/api/x-adapter.queryablerequest.md +0 -1
- package/docs/API-reference/api/x-components.historyqueriesmutations.md +2 -1
- package/docs/API-reference/api/x-components.historyqueriesstate.md +2 -1
- package/docs/API-reference/api/x-components.identifierresultsmutations.md +2 -2
- package/docs/API-reference/api/x-components.identifierresultsstate.md +2 -2
- package/docs/API-reference/api/x-components.md +3 -1
- package/docs/API-reference/api/x-components.nextqueriesmutations.md +2 -2
- package/docs/API-reference/api/x-components.nextqueriesstate.md +2 -2
- package/docs/API-reference/api/x-components.querysuggestionsmutations.md +2 -2
- package/docs/API-reference/api/x-components.querysuggestionsstate.md +2 -2
- package/docs/API-reference/api/x-components.relatedtagsgetters.md +1 -0
- package/docs/API-reference/api/x-components.relatedtagsgetters.query.md +13 -0
- package/docs/API-reference/api/x-components.relatedtagsmutations.md +2 -3
- package/docs/API-reference/api/x-components.relatedtagsquery.md +13 -0
- package/docs/API-reference/api/x-components.relatedtagsstate.md +2 -3
- package/docs/API-reference/api/x-components.searchboxmutations.md +2 -1
- package/docs/API-reference/api/x-components.searchboxstate.md +2 -1
- package/docs/API-reference/api/x-components.searchgetters.md +1 -0
- package/docs/API-reference/api/x-components.searchgetters.query.md +13 -0
- package/docs/API-reference/api/x-components.searchmutations.md +2 -2
- package/docs/API-reference/api/x-components.searchquery.md +13 -0
- package/docs/API-reference/api/x-components.searchstate.md +2 -2
- package/docs/API-reference/api/x-components.urlmutations.md +2 -1
- package/docs/API-reference/api/x-components.urlstate.initialextraparams.md +11 -0
- package/docs/API-reference/api/x-components.urlstate.md +9 -5
- package/docs/API-reference/api/x-types.relatedtag.md +0 -2
- package/js/index.js +2 -0
- package/js/index.js.map +1 -1
- package/js/store/utils/query.utils.js +37 -0
- package/js/store/utils/query.utils.js.map +1 -0
- package/js/x-modules/history-queries/store/module.js +2 -3
- package/js/x-modules/history-queries/store/module.js.map +1 -1
- package/js/x-modules/identifier-results/store/module.js +2 -3
- package/js/x-modules/identifier-results/store/module.js.map +1 -1
- package/js/x-modules/next-queries/store/module.js +2 -3
- package/js/x-modules/next-queries/store/module.js.map +1 -1
- package/js/x-modules/query-suggestions/store/module.js +2 -3
- package/js/x-modules/query-suggestions/store/module.js.map +1 -1
- package/js/x-modules/related-tags/store/actions/set-url-params.action.js +1 -3
- package/js/x-modules/related-tags/store/actions/set-url-params.action.js.map +1 -1
- package/js/x-modules/related-tags/store/getters/query.getter.js +18 -0
- package/js/x-modules/related-tags/store/getters/query.getter.js.map +1 -0
- package/js/x-modules/related-tags/store/getters/request.getter.js +3 -2
- package/js/x-modules/related-tags/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/related-tags/store/module.js +5 -4
- package/js/x-modules/related-tags/store/module.js.map +1 -1
- package/js/x-modules/search/store/getters/query.getter.js +18 -0
- package/js/x-modules/search/store/getters/query.getter.js.map +1 -0
- package/js/x-modules/search/store/getters/request.getter.js +2 -3
- package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/search/store/module.js +5 -4
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search-box/store/module.js +2 -3
- package/js/x-modules/search-box/store/module.js.map +1 -1
- package/js/x-modules/url/store/module.js +2 -3
- package/js/x-modules/url/store/module.js.map +1 -1
- package/package.json +8 -8
- package/related-tags/index.js +1 -0
- package/report/x-adapter.api.json +2 -133
- package/report/x-components.api.json +379 -110
- package/report/x-components.api.md +30 -19
- package/report/x-types.api.json +0 -52
- package/search/index.js +1 -0
- package/types/store/utils/query.utils.d.ts +56 -0
- package/types/store/utils/query.utils.d.ts.map +1 -0
- package/types/x-modules/history-queries/store/module.d.ts.map +1 -1
- package/types/x-modules/history-queries/store/types.d.ts +3 -2
- package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts +3 -2
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/module.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/types.d.ts +3 -2
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/module.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts +3 -2
- package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/actions/set-url-params.action.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/getters/query.getter.d.ts +13 -0
- package/types/x-modules/related-tags/store/getters/query.getter.d.ts.map +1 -0
- package/types/x-modules/related-tags/store/getters/request.getter.d.ts +2 -0
- package/types/x-modules/related-tags/store/getters/request.getter.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/index.d.ts +1 -0
- package/types/x-modules/related-tags/store/index.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/module.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/types.d.ts +5 -10
- package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
- package/types/x-modules/search/store/getters/query.getter.d.ts +13 -0
- package/types/x-modules/search/store/getters/query.getter.d.ts.map +1 -0
- package/types/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
- package/types/x-modules/search/store/index.d.ts +1 -0
- package/types/x-modules/search/store/index.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 +5 -2
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search-box/store/module.d.ts.map +1 -1
- package/types/x-modules/search-box/store/types.d.ts +3 -2
- package/types/x-modules/search-box/store/types.d.ts.map +1 -1
- package/types/x-modules/url/store/module.d.ts.map +1 -1
- package/types/x-modules/url/store/types.d.ts +4 -3
- package/types/x-modules/url/store/types.d.ts.map +1 -1
- package/docs/API-reference/api/x-adapter.empathyrequestrelatedtagsquerymapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyrequestrelatedtagsquerymapper.md +0 -21
- package/docs/API-reference/api/x-adapter.queryablerequest.relatedtags.md +0 -11
- package/docs/API-reference/api/x-components.relatedtagsmutations.setquery.md +0 -24
- package/docs/API-reference/api/x-components.relatedtagsstate.query.md +0 -13
- package/docs/API-reference/api/x-types.relatedtag.previous.md +0 -13
- package/docs/API-reference/api/x-types.relatedtag.selected.md +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.0-alpha.68](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.67...@empathyco/x-components@3.0.0-alpha.68) (2022-03-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- prevent node-ipc vulnerability
|
|
11
|
+
([fc8b83c](https://github.com/empathyco/x/commit/fc8b83ce73bdbd7148ce99ad3a95d7a7658bd8ba))
|
|
12
|
+
|
|
13
|
+
# Change Log
|
|
14
|
+
|
|
15
|
+
All notable changes to this project will be documented in this file. See
|
|
16
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
17
|
+
|
|
18
|
+
## [3.0.0-alpha.67](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.66...@empathyco/x-components@3.0.0-alpha.67) (2022-03-11)
|
|
19
|
+
|
|
20
|
+
### ⚠ BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
- Remove `selected` and `previous` logic from related tags.
|
|
23
|
+
- Remove `EmpathyRequestRelatedTagsQueryMapper`.
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- move related tags concatenation logic (#365)
|
|
28
|
+
([4e71797](https://github.com/empathyco/x/commit/4e717970198f67018a9b66ed6e47f511ecef4c62)),
|
|
29
|
+
closes [EX-5410](https://searchbroker.atlassian.net/browse/EX-5410)
|
|
30
|
+
|
|
31
|
+
# Change Log
|
|
32
|
+
|
|
33
|
+
All notable changes to this project will be documented in this file. See
|
|
34
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
35
|
+
|
|
36
|
+
## [3.0.0-alpha.66](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.65...@empathyco/x-components@3.0.0-alpha.66) (2022-03-09)
|
|
37
|
+
|
|
38
|
+
### Testing
|
|
39
|
+
|
|
40
|
+
- **e2e:** Fix E2E tests in Firefox
|
|
41
|
+
([6d25577](https://github.com/empathyco/x/commit/6d25577ad383e6e82a3072eb22809872dc0dc865)),
|
|
42
|
+
closes [EX-5525](https://searchbroker.atlassian.net/browse/EX-5525)
|
|
43
|
+
|
|
44
|
+
# Change Log
|
|
45
|
+
|
|
46
|
+
All notable changes to this project will be documented in this file. See
|
|
47
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
48
|
+
|
|
6
49
|
## [3.0.0-alpha.65](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.64...@empathyco/x-components@3.0.0-alpha.65) (2022-03-08)
|
|
7
50
|
|
|
8
51
|
### Features
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -100,20 +100,6 @@
|
|
|
100
100
|
--x-number-font-weight-badge-default: var(--x-number-font-weight-base-regular);
|
|
101
101
|
--x-size-font-badge-default: var(--x-size-font-base-xs);
|
|
102
102
|
}
|
|
103
|
-
.x-button--card.x-button,
|
|
104
|
-
.x-button--card .x-button {
|
|
105
|
-
--x-size-border-radius-button-default: var(--x-size-border-radius-button-card);
|
|
106
|
-
--x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-card);
|
|
107
|
-
--x-size-border-radius-top-right-button-default: var(
|
|
108
|
-
--x-size-border-radius-top-right-button-card
|
|
109
|
-
);
|
|
110
|
-
--x-size-border-radius-bottom-right-button-default: var(
|
|
111
|
-
--x-size-border-radius-bottom-right-button-card
|
|
112
|
-
);
|
|
113
|
-
--x-size-border-radius-bottom-left-button-default: var(
|
|
114
|
-
--x-size-border-radius-bottom-left-button-card
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
103
|
:root {
|
|
118
104
|
--x-size-border-radius-button-card: var(--x-size-border-radius-base-s);
|
|
119
105
|
--x-size-border-radius-top-left-button-card: var(--x-size-border-radius-button-card);
|
|
@@ -7566,3 +7552,18 @@
|
|
|
7566
7552
|
.x-normal-case {
|
|
7567
7553
|
text-transform: none;
|
|
7568
7554
|
}
|
|
7555
|
+
|
|
7556
|
+
.x-button--card.x-button,
|
|
7557
|
+
.x-button--card .x-button {
|
|
7558
|
+
--x-size-border-radius-button-default: var(--x-size-border-radius-button-card);
|
|
7559
|
+
--x-size-border-radius-top-left-button-default: var(--x-size-border-radius-top-left-button-card);
|
|
7560
|
+
--x-size-border-radius-top-right-button-default: var(
|
|
7561
|
+
--x-size-border-radius-top-right-button-card
|
|
7562
|
+
);
|
|
7563
|
+
--x-size-border-radius-bottom-right-button-default: var(
|
|
7564
|
+
--x-size-border-radius-bottom-right-button-card
|
|
7565
|
+
);
|
|
7566
|
+
--x-size-border-radius-bottom-left-button-default: var(
|
|
7567
|
+
--x-size-border-radius-bottom-left-button-card
|
|
7568
|
+
);
|
|
7569
|
+
}
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
<b>Signature:</b>
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
map({ query,
|
|
10
|
+
map({ query, ...rest }: QueryableRequest & Dictionary<string>, request: Dictionary<string>, context: RequestMapperContext): Dictionary<string>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
15
15
|
| Parameter | Type | Description |
|
|
16
16
|
| --- | --- | --- |
|
|
17
|
-
| { query,
|
|
17
|
+
| { query, ...rest } | [QueryableRequest](./x-adapter.queryablerequest.md) & [Dictionary](./x-adapter.dictionary.md)<!-- --><string> | |
|
|
18
18
|
| request | [Dictionary](./x-adapter.dictionary.md)<!-- --><string> | |
|
|
19
19
|
| context | [RequestMapperContext](./x-adapter.requestmappercontext.md) | |
|
|
20
20
|
|
|
@@ -23,5 +23,5 @@ export declare class EmpathyQueryableRequestMapper implements RequestMapper<Quer
|
|
|
23
23
|
|
|
24
24
|
| Method | Modifiers | Description |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
| [map({ query,
|
|
26
|
+
| [map({ query, ...rest }, request, context)](./x-adapter.empathyqueryablerequestmapper.map.md) | | |
|
|
27
27
|
|
|
@@ -36,7 +36,6 @@ Search-adapter library with the search API adapter. The library contains the cus
|
|
|
36
36
|
| [EmpathyRequestFiltersSolrSyntaxMapper](./x-adapter.empathyrequestfilterssolrsyntaxmapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
37
37
|
| [EmpathyRequestParamsMapper](./x-adapter.empathyrequestparamsmapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
38
38
|
| [EmpathyRequestQueryMapper](./x-adapter.empathyrequestquerymapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
39
|
-
| [EmpathyRequestRelatedTagsQueryMapper](./x-adapter.empathyrequestrelatedtagsquerymapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
40
39
|
| [EmpathyRequestSortMapper](./x-adapter.empathyrequestsortmapper.md) | Empathy SaaS API mapper for the [SearchRequest.sort](./x-adapter.searchrequest.sort.md) parameter. It excludes empty or undefined values from the sort. |
|
|
41
40
|
| [EmpathyResultMapper](./x-adapter.empathyresultmapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
42
41
|
| [EmpathyResultQueryTaggingMapper](./x-adapter.empathyresultquerytaggingmapper.md) | TODO https://searchbroker.atlassian.net/browse/EX-2163 |
|
|
@@ -9,9 +9,9 @@ IdentifierResults store mutations.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface IdentifierResultsMutations extends StatusMutations
|
|
12
|
+
export interface IdentifierResultsMutations extends StatusMutations, QueryMutations
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)
|
|
14
|
+
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)<!-- -->, QueryMutations
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -9,9 +9,9 @@ IdentifierResults store state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface IdentifierResultsState extends StatusState
|
|
12
|
+
export interface IdentifierResultsState extends StatusState, QueryState
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusState](./x-components.statusstate.md)
|
|
14
|
+
<b>Extends:</b> [StatusState](./x-components.statusstate.md)<!-- -->, QueryState
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -326,6 +326,7 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
326
326
|
| [UrlGetters](./x-components.urlgetters.md) | URL store getters. |
|
|
327
327
|
| [UrlMutations](./x-components.urlmutations.md) | URL store mutations. |
|
|
328
328
|
| [UrlParams](./x-components.urlparams.md) | URL store params. |
|
|
329
|
+
| [UrlState](./x-components.urlstate.md) | URL store state. |
|
|
329
330
|
| [UrlXEvents](./x-components.urlxevents.md) | Dictionary of the events of URL XModule, where each key is the event name, and the value is the event payload type or <code>void</code> if it has no payload. |
|
|
330
331
|
| [WatchedInternalSearchRequest](./x-components.watchedinternalsearchrequest.md) | A representation of a watched [InternalSearchRequest](./x-components.internalsearchrequest.md) object, wrapping its new and old values. |
|
|
331
332
|
| [WireMetadata](./x-components.wiremetadata.md) | The wires metadata includes more information about the emitted event, so then these events can be processed with more precision if needed. |
|
|
@@ -472,6 +473,7 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
472
473
|
| [refreshHistoryQueriesSession](./x-components.refreshhistoryqueriessession.md) | Triggers a session refresh, extending its validity for the time configured in the [HistoryQueriesConfig.sessionTTLInMs](./x-components.historyqueriesconfig.sessionttlinms.md)<!-- -->. |
|
|
473
474
|
| [refreshSession](./x-components.refreshsession.md) | Default implementation for the [HistoryQueriesActions.refreshSession()](./x-components.historyqueriesactions.refreshsession.md)<!-- -->. |
|
|
474
475
|
| [relatedTags](./x-components.relatedtags.md) | Default implementation for the [RelatedTagsGetters.relatedTags](./x-components.relatedtagsgetters.relatedtags.md) getter. |
|
|
476
|
+
| [relatedTagsQuery](./x-components.relatedtagsquery.md) | Default implementation for the [RelatedTagsGetters.query](./x-components.relatedtagsgetters.query.md) getter. |
|
|
475
477
|
| [relatedTagsRequest](./x-components.relatedtagsrequest.md) | Default implementation for the [RelatedTagsGetters.request](./x-components.relatedtagsgetters.request.md) getter. |
|
|
476
478
|
| [relatedTagsXModule](./x-components.relatedtagsxmodule.md) | RelatedTags [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>related-tags</code> entry point. |
|
|
477
479
|
| [removeFromHistory](./x-components.removefromhistory.md) | Default implementation for the [HistoryQueriesActions.removeFromHistory()](./x-components.historyqueriesactions.removefromhistory.md)<!-- -->. |
|
|
@@ -487,6 +489,7 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
487
489
|
| [scrollXModule](./x-components.scrollxmodule.md) | Scroll [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>empathize</code> entry point. |
|
|
488
490
|
| [searchBoxXModule](./x-components.searchboxxmodule.md) | SearchBox [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>search-box</code> entry point. |
|
|
489
491
|
| [SearchIcon](./x-components.searchicon.md) | |
|
|
492
|
+
| [searchQuery](./x-components.searchquery.md) | Default implementation for the [SearchState.query](./x-components.searchstate.query.md) getter. |
|
|
490
493
|
| [searchRequest](./x-components.searchrequest.md) | Default implementation for the [SearchGetters.request](./x-components.searchgetters.request.md) getter. |
|
|
491
494
|
| [SearchTinyIcon](./x-components.searchtinyicon.md) | |
|
|
492
495
|
| [searchXModule](./x-components.searchxmodule.md) | Search [XModule](./x-components.xmodule.md) implementation. This module is auto-registered as soon as you import any component from the <code>search</code> entry point. |
|
|
@@ -675,7 +678,6 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
675
678
|
| [UrlActionContext](./x-components.urlactioncontext.md) | Alias type for actions context of the [UrlXStoreModule](./x-components.urlxstoremodule.md)<!-- -->. |
|
|
676
679
|
| [UrlParamKey](./x-components.urlparamkey.md) | The key of the parameter to store in the URL. |
|
|
677
680
|
| [UrlParamValue](./x-components.urlparamvalue.md) | The allowed values of the parameters to store in the URL. |
|
|
678
|
-
| [UrlState](./x-components.urlstate.md) | URL store state. |
|
|
679
681
|
| [UrlXModule](./x-components.urlxmodule.md) | URL [XModule](./x-components.xmodule.md) alias. |
|
|
680
682
|
| [UrlXStoreModule](./x-components.urlxstoremodule.md) | URL type safe store module. |
|
|
681
683
|
| [VueConstructorPartialArgument](./x-components.vueconstructorpartialargument.md) | First parameter of the Vue constructor. |
|
|
@@ -9,9 +9,9 @@ Next queries module mutations.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface NextQueriesMutations extends StatusMutations
|
|
12
|
+
export interface NextQueriesMutations extends StatusMutations, QueryMutations
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)
|
|
14
|
+
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)<!-- -->, QueryMutations
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -9,9 +9,9 @@ Next queries module state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface NextQueriesState extends StatusState
|
|
12
|
+
export interface NextQueriesState extends StatusState, QueryState
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusState](./x-components.statusstate.md)
|
|
14
|
+
<b>Extends:</b> [StatusState](./x-components.statusstate.md)<!-- -->, QueryState
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -9,9 +9,9 @@ QuerySuggestions store mutations.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface QuerySuggestionsMutations extends StatusMutations
|
|
12
|
+
export interface QuerySuggestionsMutations extends StatusMutations, QueryMutations
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)
|
|
14
|
+
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)<!-- -->, QueryMutations
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -9,9 +9,9 @@ QuerySuggestions store state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface QuerySuggestionsState extends StatusState
|
|
12
|
+
export interface QuerySuggestionsState extends StatusState, QueryState
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusState](./x-components.statusstate.md)
|
|
14
|
+
<b>Extends:</b> [StatusState](./x-components.statusstate.md)<!-- -->, QueryState
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -16,6 +16,7 @@ export interface RelatedTagsGetters
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
+
| [query](./x-components.relatedtagsgetters.query.md) | string | The combination of the query and the selected related tags. |
|
|
19
20
|
| [relatedTags](./x-components.relatedtagsgetters.relatedtags.md) | RelatedTag\[\] | List that contains al the related tags, having the selected ones at the first positions (if there are any), and then the unselected ones. |
|
|
20
21
|
| [request](./x-components.relatedtagsgetters.request.md) | RelatedTagsRequest \| null | The adapter request object for retrieving the related tags, or null if there is not valid data to create a request. |
|
|
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) > [RelatedTagsGetters](./x-components.relatedtagsgetters.md) > [query](./x-components.relatedtagsgetters.query.md)
|
|
4
|
+
|
|
5
|
+
## RelatedTagsGetters.query property
|
|
6
|
+
|
|
7
|
+
The combination of the query and the selected related tags.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
query: string;
|
|
13
|
+
```
|
|
@@ -9,16 +9,15 @@ RelatedTags store mutations.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface RelatedTagsMutations extends StatusMutations
|
|
12
|
+
export interface RelatedTagsMutations extends StatusMutations, QueryMutations
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)
|
|
14
|
+
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)<!-- -->, QueryMutations
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
18
18
|
| Method | Description |
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| [setParams(params)](./x-components.relatedtagsmutations.setparams.md) | Sets the extra params of the module. |
|
|
21
|
-
| [setQuery(newQuery)](./x-components.relatedtagsmutations.setquery.md) | Sets the query of the module, which is used to retrieve the related tags. |
|
|
22
21
|
| [setRelatedTags(relatedTags)](./x-components.relatedtagsmutations.setrelatedtags.md) | Sets the related tags of the module. |
|
|
23
22
|
| [setSelectedRelatedTags(selectedRelatedTags)](./x-components.relatedtagsmutations.setselectedrelatedtags.md) | Sets the selected related tags of the module. |
|
|
24
23
|
|
|
@@ -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) > [relatedTagsQuery](./x-components.relatedtagsquery.md)
|
|
4
|
+
|
|
5
|
+
## relatedTagsQuery variable
|
|
6
|
+
|
|
7
|
+
Default implementation for the [RelatedTagsGetters.query](./x-components.relatedtagsgetters.query.md) getter.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
query: RelatedTagsXStoreModule['getters']['query']
|
|
13
|
+
```
|
|
@@ -9,9 +9,9 @@ RelatedTags store state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface RelatedTagsState extends StatusState
|
|
12
|
+
export interface RelatedTagsState extends StatusState, QueryState
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusState](./x-components.statusstate.md)
|
|
14
|
+
<b>Extends:</b> [StatusState](./x-components.statusstate.md)<!-- -->, QueryState
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -19,7 +19,6 @@ export interface RelatedTagsState extends StatusState
|
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| [config](./x-components.relatedtagsstate.config.md) | [RelatedTagsConfig](./x-components.relatedtagsconfig.md) | The configuration of the related tags module. |
|
|
21
21
|
| [params](./x-components.relatedtagsstate.params.md) | [Dictionary](./x-components.dictionary.md)<!-- --><unknown> | The extra params property of the state. |
|
|
22
|
-
| [query](./x-components.relatedtagsstate.query.md) | string | The internal query of the module. Used to request the related tags. |
|
|
23
22
|
| [relatedTags](./x-components.relatedtagsstate.relatedtags.md) | RelatedTag\[\] | The list of the related tags, related to the <code>query</code> property of the state. |
|
|
24
23
|
| [selectedRelatedTags](./x-components.relatedtagsstate.selectedrelatedtags.md) | RelatedTag\[\] | The list of the selected related tags. |
|
|
25
24
|
|
|
@@ -16,5 +16,6 @@ export interface SearchGetters
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
+
| [query](./x-components.searchgetters.query.md) | string | The combination of the query and the selected related tags. |
|
|
19
20
|
| [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
21
|
|
|
@@ -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) > [SearchGetters](./x-components.searchgetters.md) > [query](./x-components.searchgetters.query.md)
|
|
4
|
+
|
|
5
|
+
## SearchGetters.query property
|
|
6
|
+
|
|
7
|
+
The combination of the query and the selected related tags.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
query: string;
|
|
13
|
+
```
|
|
@@ -9,9 +9,9 @@ Search store mutations.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface SearchMutations extends StatusMutations
|
|
12
|
+
export interface SearchMutations extends StatusMutations, QueryMutations
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)
|
|
14
|
+
<b>Extends:</b> [StatusMutations](./x-components.statusmutations.md)<!-- -->, QueryMutations
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
@@ -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) > [searchQuery](./x-components.searchquery.md)
|
|
4
|
+
|
|
5
|
+
## searchQuery variable
|
|
6
|
+
|
|
7
|
+
Default implementation for the [SearchState.query](./x-components.searchstate.query.md) getter.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
query: SearchXStoreModule['getters']['query']
|
|
13
|
+
```
|
|
@@ -9,9 +9,9 @@ Search store state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface SearchState extends StatusState
|
|
12
|
+
export interface SearchState extends StatusState, QueryState
|
|
13
13
|
```
|
|
14
|
-
<b>Extends:</b> [StatusState](./x-components.statusstate.md)
|
|
14
|
+
<b>Extends:</b> [StatusState](./x-components.statusstate.md)<!-- -->, QueryState
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -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) > [UrlState](./x-components.urlstate.md) > [initialExtraParams](./x-components.urlstate.initialextraparams.md)
|
|
4
|
+
|
|
5
|
+
## UrlState.initialExtraParams property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
initialExtraParams: Dictionary<unknown>;
|
|
11
|
+
```
|
|
@@ -2,16 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [UrlState](./x-components.urlstate.md)
|
|
4
4
|
|
|
5
|
-
## UrlState
|
|
5
|
+
## UrlState interface
|
|
6
6
|
|
|
7
7
|
URL store state.
|
|
8
8
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export
|
|
13
|
-
initialExtraParams: Dictionary<unknown>;
|
|
14
|
-
};
|
|
12
|
+
export interface UrlState extends QueryState, UrlParams
|
|
15
13
|
```
|
|
16
|
-
<b>
|
|
14
|
+
<b>Extends:</b> QueryState, [UrlParams](./x-components.urlparams.md)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Type | Description |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| [initialExtraParams](./x-components.urlstate.initialextraparams.md) | [Dictionary](./x-components.dictionary.md)<!-- --><unknown> | |
|
|
17
21
|
|
|
@@ -18,7 +18,5 @@ export interface RelatedTag extends NamedModel<'RelatedTag'>, Previewable
|
|
|
18
18
|
| Property | Type | Description |
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| [isCurated?](./x-types.relatedtag.iscurated.md) | boolean | <i>(Optional)</i> If it's a curated related tag. |
|
|
21
|
-
| [previous](./x-types.relatedtag.previous.md) | string | The query to refine. |
|
|
22
|
-
| [selected](./x-types.relatedtag.selected.md) | boolean | If selection mode is enabled, tells if this related tag is selected or not. |
|
|
23
21
|
| [tag](./x-types.relatedtag.tag.md) | string | The term to add to the current query. |
|
|
24
22
|
|
package/js/index.js
CHANGED
|
@@ -279,6 +279,7 @@ export { fetchRelatedTags } from './x-modules/related-tags/store/actions/fetch-r
|
|
|
279
279
|
export { toggleRelatedTag } from './x-modules/related-tags/store/actions/toggle-related-tag.action.js';
|
|
280
280
|
export { relatedTagsEmitters } from './x-modules/related-tags/store/emitters.js';
|
|
281
281
|
export { relatedTags } from './x-modules/related-tags/store/getters/related-tags.getter.js';
|
|
282
|
+
export { query as relatedTagsQuery } from './x-modules/related-tags/store/getters/query.getter.js';
|
|
282
283
|
export { request as relatedTagsRequest } from './x-modules/related-tags/store/getters/request.getter.js';
|
|
283
284
|
export { relatedTagsXStoreModule } from './x-modules/related-tags/store/module.js';
|
|
284
285
|
export { cancelFetchAndSaveRelatedTagsWire, clearRelatedTagsQuery, clearSelectedRelatedTags, fetchAndSaveRelatedTagsWire, relatedTagsWiring, setRelatedTagsExtraParams, setRelatedTagsQuery, setUrlParamsWire, toggleRelatedTagWire } from './x-modules/related-tags/wiring.js';
|
|
@@ -310,6 +311,7 @@ export { cancelFetchAndSaveSearchResponse, fetchAndSaveSearchResponse } from './
|
|
|
310
311
|
export { fetchSearchResponse } from './x-modules/search/store/actions/fetch-search-response.action.js';
|
|
311
312
|
export { searchEmitters } from './x-modules/search/store/emitters.js';
|
|
312
313
|
export { request as searchRequest } from './x-modules/search/store/getters/request.getter.js';
|
|
314
|
+
export { query as searchQuery } from './x-modules/search/store/getters/query.getter.js';
|
|
313
315
|
export { searchXStoreModule } from './x-modules/search/store/module.js';
|
|
314
316
|
export { cancelFetchAndSaveSearchResponseWire, fetchAndSaveSearchResponseWire, increasePageAppendingResults, resetAppending, resetSpellcheckQuery, resetStateWire, saveOriginWire, searchWiring, setPageSize, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
|
|
315
317
|
export { searchXModule } from './x-modules/search/x-module.js';
|
package/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets the query of the module.
|
|
3
|
+
*
|
|
4
|
+
* @param state - State of the module.
|
|
5
|
+
* @param query - The new query to set.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
function setQuery(state, query) {
|
|
9
|
+
state.query = query;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates a getter that combines the current selected related tags and the query of the module.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Options on how the getter should behave.
|
|
15
|
+
* @returns A getter that combines the selected related tags with the query.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
function createRelatedTagsQueryGetter({ getRelatedTags }) {
|
|
19
|
+
return function relatedTagsQuery(state, getters) {
|
|
20
|
+
const query = state.query.trim();
|
|
21
|
+
return query ? getRelatedTags(state, getters).reduce(concatRelatedTag, query).trim() : '';
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Joins a query and a related tag respecting the tag position.
|
|
26
|
+
*
|
|
27
|
+
* @param partialQuery - The query to concatenate the related tag with.
|
|
28
|
+
* @param relatedTag - The related tag to concatenate.
|
|
29
|
+
* @returns The query and the related tag joined.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
function concatRelatedTag(partialQuery, { tag, query: relatedTagQuery }) {
|
|
33
|
+
return relatedTagQuery.startsWith(tag) ? `${tag} ${partialQuery}` : `${partialQuery} ${tag}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { createRelatedTagsQueryGetter, setQuery };
|
|
37
|
+
//# sourceMappingURL=query.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.utils.js","sources":["../../../../src/store/utils/query.utils.ts"],"sourcesContent":["import { RelatedTag } from '@empathyco/x-types';\n\n/**\n * Query state type, containing a property to hold the current query of the module.\n *\n * @public\n */\nexport interface QueryState {\n /** The query of the module. Different modules may have queries that differ in value\n * or time. */\n query: string;\n}\n\n/**\n * The {@link QueryState} mutations.\n *\n * @public\n */\nexport interface QueryMutations {\n /**\n * Sets the query.\n *\n * @param query - The new query.\n */\n setQuery(query: string): void;\n}\n\n/**\n * Options to create a getter that combines the query with the selected related tags.\n *\n * @public\n */\nexport interface CreateRelatedTagsQueryGetterOptions<State, Getters> {\n /**\n * Retrieves the selected related tags of the module.\n *\n * @param state - The state of the module.\n * @param getters - The getters of the module.\n * @returns The list of selected related tags.\n */\n getRelatedTags: (state: State, getters: Getters) => RelatedTag[];\n}\n\n/**\n * Sets the query of the module.\n *\n * @param state - State of the module.\n * @param query - The new query to set.\n * @public\n */\nexport function setQuery(state: QueryState, query: string): void {\n state.query = query;\n}\n\n/**\n * Creates a getter that combines the current selected related tags and the query of the module.\n *\n * @param options - Options on how the getter should behave.\n * @returns A getter that combines the selected related tags with the query.\n * @public\n */\nexport function createRelatedTagsQueryGetter<State extends QueryState, Getters>({\n getRelatedTags\n}: CreateRelatedTagsQueryGetterOptions<State, Getters>): (\n state: State,\n getters: Getters\n) => string {\n return function relatedTagsQuery(state, getters) {\n const query = state.query.trim();\n return query ? getRelatedTags(state, getters).reduce(concatRelatedTag, query).trim() : '';\n };\n}\n\n/**\n * Joins a query and a related tag respecting the tag position.\n *\n * @param partialQuery - The query to concatenate the related tag with.\n * @param relatedTag - The related tag to concatenate.\n * @returns The query and the related tag joined.\n * @internal\n */\nfunction concatRelatedTag(\n partialQuery: string,\n { tag, query: relatedTagQuery }: RelatedTag\n): string {\n return relatedTagQuery.startsWith(tag) ? `${tag} ${partialQuery}` : `${partialQuery} ${tag}`;\n}\n"],"names":[],"mappings":"AA2CA;;;;;;;SAOgB,QAAQ,CAAC,KAAiB,EAAE,KAAa;IACvD,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,CAAC;AAED;;;;;;;SAOgB,4BAA4B,CAAoC,EAC9E,cAAc,EACsC;IAIpD,OAAO,SAAS,gBAAgB,CAAC,KAAK,EAAE,OAAO;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACjC,OAAO,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;KAC3F,CAAC;AACJ,CAAC;AAED;;;;;;;;AAQA,SAAS,gBAAgB,CACvB,YAAoB,EACpB,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAc;IAE3C,OAAO,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,YAAY,EAAE,GAAG,GAAG,YAAY,IAAI,GAAG,EAAE,CAAC;AAC/F;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setQuery } from '../../../store/utils/query.utils.js';
|
|
1
2
|
import { addQueryToHistory } from './actions/add-query-to-history.action.js';
|
|
2
3
|
import { loadHistoryQueriesFromBrowserStorage } from './actions/load-history-queries-from-browser-storage.action.js';
|
|
3
4
|
import { refreshSession } from './actions/refresh-session.action.js';
|
|
@@ -39,9 +40,7 @@ const historyQueriesXStoreModule = {
|
|
|
39
40
|
setSessionTimeStamp(state, sessionTimeStamp) {
|
|
40
41
|
state.sessionTimeStampInMs = sessionTimeStamp;
|
|
41
42
|
},
|
|
42
|
-
setQuery
|
|
43
|
-
state.query = query;
|
|
44
|
-
}
|
|
43
|
+
setQuery
|
|
45
44
|
},
|
|
46
45
|
actions: {
|
|
47
46
|
addQueryToHistory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/history-queries/store/module.ts"],"sourcesContent":["import { addQueryToHistory } from './actions/add-query-to-history.action';\n// eslint-disable-next-line max-len\nimport { loadHistoryQueriesFromBrowserStorage } from './actions/load-history-queries-from-browser-storage.action';\nimport { refreshSession } from './actions/refresh-session.action';\nimport { removeFromHistory } from './actions/remove-query-from-history.action';\nimport { setHistoryQueries } from './actions/set-history-queries.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { historyQueries } from './getters/history-queries.getter';\nimport { normalizedQuery } from './getters/normalized-query.getter';\nimport { sessionHistoryQueries } from './getters/session-history-queries.getter';\nimport { storageKey } from './getters/storage-key.getter';\nimport { HistoryQueriesXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the history-queries module.\n *\n * @internal\n */\nexport const historyQueriesXStoreModule: HistoryQueriesXStoreModule = {\n state: () => ({\n config: {\n debounceInMs: 150,\n maxItemsToStore: 50,\n hideIfEqualsQuery: true,\n sessionTTLInMs: 30 * 60 * 1000\n },\n query: '',\n historyQueries: [],\n sessionTimeStampInMs: Date.now()\n }),\n getters: {\n historyQueries,\n normalizedQuery,\n sessionHistoryQueries,\n storageKey\n },\n mutations: {\n setHistoryQueries(state, historyQueries) {\n state.historyQueries = historyQueries;\n },\n setSessionTimeStamp(state, sessionTimeStamp) {\n state.sessionTimeStampInMs = sessionTimeStamp;\n },\n setQuery
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/history-queries/store/module.ts"],"sourcesContent":["import { setQuery } from '../../../store/utils/query.utils';\nimport { addQueryToHistory } from './actions/add-query-to-history.action';\n// eslint-disable-next-line max-len\nimport { loadHistoryQueriesFromBrowserStorage } from './actions/load-history-queries-from-browser-storage.action';\nimport { refreshSession } from './actions/refresh-session.action';\nimport { removeFromHistory } from './actions/remove-query-from-history.action';\nimport { setHistoryQueries } from './actions/set-history-queries.action';\nimport { setUrlParams } from './actions/set-url-params.action';\nimport { historyQueries } from './getters/history-queries.getter';\nimport { normalizedQuery } from './getters/normalized-query.getter';\nimport { sessionHistoryQueries } from './getters/session-history-queries.getter';\nimport { storageKey } from './getters/storage-key.getter';\nimport { HistoryQueriesXStoreModule } from './types';\n\n/**\n * {@link XStoreModule} For the history-queries module.\n *\n * @internal\n */\nexport const historyQueriesXStoreModule: HistoryQueriesXStoreModule = {\n state: () => ({\n config: {\n debounceInMs: 150,\n maxItemsToStore: 50,\n hideIfEqualsQuery: true,\n sessionTTLInMs: 30 * 60 * 1000\n },\n query: '',\n historyQueries: [],\n sessionTimeStampInMs: Date.now()\n }),\n getters: {\n historyQueries,\n normalizedQuery,\n sessionHistoryQueries,\n storageKey\n },\n mutations: {\n setHistoryQueries(state, historyQueries) {\n state.historyQueries = historyQueries;\n },\n setSessionTimeStamp(state, sessionTimeStamp) {\n state.sessionTimeStampInMs = sessionTimeStamp;\n },\n setQuery\n },\n actions: {\n addQueryToHistory,\n loadHistoryQueriesFromBrowserStorage,\n refreshSession,\n removeFromHistory,\n setHistoryQueries,\n setUrlParams\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAcA;;;;;MAKa,0BAA0B,GAA+B;IACpE,KAAK,EAAE,OAAO;QACZ,MAAM,EAAE;YACN,YAAY,EAAE,GAAG;YACjB,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,IAAI;YACvB,cAAc,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;SAC/B;QACD,KAAK,EAAE,EAAE;QACT,cAAc,EAAE,EAAE;QAClB,oBAAoB,EAAE,IAAI,CAAC,GAAG,EAAE;KACjC,CAAC;IACF,OAAO,EAAE;QACP,cAAc;QACd,eAAe;QACf,qBAAqB;QACrB,UAAU;KACX;IACD,SAAS,EAAE;QACT,iBAAiB,CAAC,KAAK,EAAE,cAAc;YACrC,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;SACvC;QACD,mBAAmB,CAAC,KAAK,EAAE,gBAAgB;YACzC,KAAK,CAAC,oBAAoB,GAAG,gBAAgB,CAAC;SAC/C;QACD,QAAQ;KACT;IACD,OAAO,EAAE;QACP,iBAAiB;QACjB,oCAAoC;QACpC,cAAc;QACd,iBAAiB;QACjB,iBAAiB;QACjB,YAAY;KACb;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setQuery } from '../../../store/utils/query.utils.js';
|
|
1
2
|
import { setStatus } from '../../../store/utils/status-store.utils.js';
|
|
2
3
|
import { cancelFetchAndSaveIdentifierResults, fetchAndSaveIdentifierResults } from './actions/fetch-and-save-identifier-results.action.js';
|
|
3
4
|
import { fetchIdentifierResults } from './actions/fetch-identifier-results.action.js';
|
|
@@ -41,9 +42,7 @@ const identifierResultsXStoreModule = {
|
|
|
41
42
|
setParams(state, params) {
|
|
42
43
|
state.params = params;
|
|
43
44
|
},
|
|
44
|
-
setQuery
|
|
45
|
-
state.query = query;
|
|
46
|
-
},
|
|
45
|
+
setQuery,
|
|
47
46
|
setStatus
|
|
48
47
|
},
|
|
49
48
|
actions: {
|