@empathyco/x-components 7.2.4 → 7.3.0

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 CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.3.0](https://github.com/empathyco/x/compare/@empathyco/x-components@7.2.5...@empathyco/x-components@7.3.0) (2026-07-06)
7
+
8
+ ### Features
9
+
10
+ * **next-queries:** add mutation and wiring to reset next queries state (#2131)
11
+
12
+
13
+ ## [7.2.5](https://github.com/empathyco/x/compare/@empathyco/x-components@7.2.4...@empathyco/x-components@7.2.5) (2026-07-02)
14
+
15
+ ### Code Refactoring
16
+
17
+ * **types:** remove unused `overview` origin type references (#2127)
18
+
19
+
6
20
  ## [7.2.4](https://github.com/empathyco/x/compare/@empathyco/x-components@7.2.3...@empathyco/x-components@7.2.4) (2026-07-02)
7
21
 
8
22
  ### Build System
@@ -9,7 +9,7 @@ Indicates where the feature is placed.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart' | 'overview';
12
+ export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart';
13
13
  ```
14
14
 
15
15
  ## Example 1
@@ -5868,6 +5868,17 @@ Resets the search state `fromNoResultsWithFilters`<!-- -->.
5868
5868
  Resets the search state `isNoResults`<!-- -->.
5869
5869
 
5870
5870
 
5871
+ </td></tr>
5872
+ <tr><td>
5873
+
5874
+ [resetNextQueriesWire](./x-components.resetnextquerieswire.md)
5875
+
5876
+
5877
+ </td><td>
5878
+
5879
+ Resets the next queries list to an empty array.
5880
+
5881
+
5871
5882
  </td></tr>
5872
5883
  <tr><td>
5873
5884
 
@@ -38,6 +38,25 @@ Description
38
38
  </th></tr></thead>
39
39
  <tbody><tr><td>
40
40
 
41
+ [resetNextQueries](./x-components.nextqueriesmutations.resetnextqueries.md)
42
+
43
+
44
+ </td><td>
45
+
46
+
47
+ </td><td>
48
+
49
+ () =&gt; void
50
+
51
+
52
+ </td><td>
53
+
54
+ Resets the next queries list to an empty array.
55
+
56
+
57
+ </td></tr>
58
+ <tr><td>
59
+
41
60
  [resetResultsPreview](./x-components.nextqueriesmutations.resetresultspreview.md)
42
61
 
43
62
 
@@ -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; [NextQueriesMutations](./x-components.nextqueriesmutations.md) &gt; [resetNextQueries](./x-components.nextqueriesmutations.resetnextqueries.md)
4
+
5
+ ## NextQueriesMutations.resetNextQueries property
6
+
7
+ Resets the next queries list to an empty array.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ resetNextQueries: () => void;
13
+ ```
@@ -9,5 +9,5 @@ The name of the tool that generated the query.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts' | 'overview';
12
+ export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts';
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; [resetNextQueriesWire](./x-components.resetnextquerieswire.md)
4
+
5
+ ## resetNextQueriesWire variable
6
+
7
+ Resets the next queries list to an empty array.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ resetNextQueriesWire: import("../..").AnyWire
13
+ ```
@@ -9,5 +9,5 @@ The name of the tool that generated the results.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'overview' | 'ai_carousel';
12
+ export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'ai_carousel';
13
13
  ```
package/js/index.js CHANGED
@@ -315,7 +315,7 @@ export { query } from './x-modules/next-queries/store/getters/next-queries-query
315
315
  export { nextQueries } from './x-modules/next-queries/store/getters/next-queries.getter.js';
316
316
  export { request as nextQueriesRequest } from './x-modules/next-queries/store/getters/request.getter.js';
317
317
  export { nextQueriesXStoreModule } from './x-modules/next-queries/store/module.js';
318
- export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries } from './x-modules/next-queries/wiring.js';
318
+ export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetNextQueriesWire, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries } from './x-modules/next-queries/wiring.js';
319
319
  export { nextQueriesXModule } from './x-modules/next-queries/x-module.js';
320
320
  export { default as PopularSearch } from './x-modules/popular-searches/components/popular-search.vue.js';
321
321
  export { default as PopularSearches } from './x-modules/popular-searches/components/popular-searches.vue.js';
@@ -58,6 +58,9 @@ const nextQueriesXStoreModule = {
58
58
  resetResultsPreview(state) {
59
59
  state.resultsPreview = {};
60
60
  },
61
+ resetNextQueries(state) {
62
+ state.nextQueries = [];
63
+ },
61
64
  setConfig,
62
65
  mergeConfig,
63
66
  },
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/next-queries/store/module.ts"],"sourcesContent":["import type { NextQueriesXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setStatus } from '../../../store/utils/status-store.utils'\nimport {\n cancelFetchAndSaveNextQueries,\n fetchAndSaveNextQueries,\n} from './actions/fetch-and-save-next-queries.action'\nimport { fetchAndSaveNextQueryPreview } from './actions/fetch-and-save-next-query-preview.action'\nimport { fetchNextQueries } from './actions/fetch-next-queries.action'\nimport { fetchNextQueryPreview } from './actions/fetch-next-query-preview.action'\nimport { setQueryFromLastHistoryQuery } from './actions/set-query-from-last-history-query.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/next-queries-query.getter'\nimport { nextQueries } from './getters/next-queries.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the next-queries module.\n *\n * @internal\n */\nexport const nextQueriesXStoreModule: NextQueriesXStoreModule = {\n state: () => ({\n query: '',\n nextQueries: [],\n searchedQueries: [],\n relatedTags: [],\n status: 'initial',\n config: {\n maxItemsToRequest: 20,\n hideSessionQueries: true,\n loadOnInit: true,\n maxPreviewItemsToRequest: 8,\n },\n params: {},\n resultsPreview: {},\n }),\n getters: {\n request,\n nextQueries,\n query,\n },\n mutations: {\n setQuery,\n setNextQueries(state, nextQueries) {\n state.nextQueries = nextQueries\n },\n setSearchedQueries(state, searchedQueries) {\n state.searchedQueries = searchedQueries\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setStatus,\n setParams(state, params) {\n state.params = params\n },\n setResultsPreview(state, resultsPreview) {\n state.resultsPreview = { ...state.resultsPreview, ...resultsPreview }\n },\n resetResultsPreview(state) {\n state.resultsPreview = {}\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n cancelFetchAndSaveNextQueries,\n fetchAndSaveNextQueries,\n fetchNextQueries,\n setQueryFromLastHistoryQuery,\n setUrlParams,\n fetchNextQueryPreview,\n fetchAndSaveNextQueryPreview,\n },\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiBA;;;;AAIG;AACI,MAAM,uBAAuB,GAA4B;AAC9D,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,MAAM,EAAE;AACN,YAAA,iBAAiB,EAAE,EAAE;AACrB,YAAA,kBAAkB,EAAE,IAAI;AACxB,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,wBAAwB,EAAE,CAAC;AAC5B,SAAA;AACD,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,cAAc,EAAE,EAAE;KACnB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,WAAW;QACX,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,QAAQ;QACR,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAA;AACvC,YAAA,KAAK,CAAC,eAAe,GAAG,eAAe;QACzC,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,SAAS;QACT,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM;QACvB,CAAC;QACD,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAA;AACrC,YAAA,KAAK,CAAC,cAAc,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE;QACvE,CAAC;AACD,QAAA,mBAAmB,CAAC,KAAK,EAAA;AACvB,YAAA,KAAK,CAAC,cAAc,GAAG,EAAE;QAC3B,CAAC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,6BAA6B;QAC7B,uBAAuB;QACvB,gBAAgB;QAChB,4BAA4B;QAC5B,YAAY;QACZ,qBAAqB;QACrB,4BAA4B;AAC7B,KAAA;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/next-queries/store/module.ts"],"sourcesContent":["import type { NextQueriesXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setStatus } from '../../../store/utils/status-store.utils'\nimport {\n cancelFetchAndSaveNextQueries,\n fetchAndSaveNextQueries,\n} from './actions/fetch-and-save-next-queries.action'\nimport { fetchAndSaveNextQueryPreview } from './actions/fetch-and-save-next-query-preview.action'\nimport { fetchNextQueries } from './actions/fetch-next-queries.action'\nimport { fetchNextQueryPreview } from './actions/fetch-next-query-preview.action'\nimport { setQueryFromLastHistoryQuery } from './actions/set-query-from-last-history-query.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/next-queries-query.getter'\nimport { nextQueries } from './getters/next-queries.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the next-queries module.\n *\n * @internal\n */\nexport const nextQueriesXStoreModule: NextQueriesXStoreModule = {\n state: () => ({\n query: '',\n nextQueries: [],\n searchedQueries: [],\n relatedTags: [],\n status: 'initial',\n config: {\n maxItemsToRequest: 20,\n hideSessionQueries: true,\n loadOnInit: true,\n maxPreviewItemsToRequest: 8,\n },\n params: {},\n resultsPreview: {},\n }),\n getters: {\n request,\n nextQueries,\n query,\n },\n mutations: {\n setQuery,\n setNextQueries(state, nextQueries) {\n state.nextQueries = nextQueries\n },\n setSearchedQueries(state, searchedQueries) {\n state.searchedQueries = searchedQueries\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setStatus,\n setParams(state, params) {\n state.params = params\n },\n setResultsPreview(state, resultsPreview) {\n state.resultsPreview = { ...state.resultsPreview, ...resultsPreview }\n },\n resetResultsPreview(state) {\n state.resultsPreview = {}\n },\n resetNextQueries(state) {\n state.nextQueries = []\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n cancelFetchAndSaveNextQueries,\n fetchAndSaveNextQueries,\n fetchNextQueries,\n setQueryFromLastHistoryQuery,\n setUrlParams,\n fetchNextQueryPreview,\n fetchAndSaveNextQueryPreview,\n },\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiBA;;;;AAIG;AACI,MAAM,uBAAuB,GAA4B;AAC9D,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,MAAM,EAAE;AACN,YAAA,iBAAiB,EAAE,EAAE;AACrB,YAAA,kBAAkB,EAAE,IAAI;AACxB,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,wBAAwB,EAAE,CAAC;AAC5B,SAAA;AACD,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,cAAc,EAAE,EAAE;KACnB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,WAAW;QACX,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,QAAQ;QACR,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAA;AACvC,YAAA,KAAK,CAAC,eAAe,GAAG,eAAe;QACzC,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,SAAS;QACT,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM;QACvB,CAAC;QACD,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAA;AACrC,YAAA,KAAK,CAAC,cAAc,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE;QACvE,CAAC;AACD,QAAA,mBAAmB,CAAC,KAAK,EAAA;AACvB,YAAA,KAAK,CAAC,cAAc,GAAG,EAAE;QAC3B,CAAC;AACD,QAAA,gBAAgB,CAAC,KAAK,EAAA;AACpB,YAAA,KAAK,CAAC,WAAW,GAAG,EAAE;QACxB,CAAC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,6BAA6B;QAC7B,uBAAuB;QACvB,gBAAgB;QAChB,4BAA4B;QAC5B,YAAY;QACZ,qBAAqB;QACrB,4BAA4B;AAC7B,KAAA;;;;;"}
@@ -88,6 +88,12 @@ const fetchAndSaveNextQueryPreviewWire = wireDispatch('fetchAndSaveNextQueryPrev
88
88
  * @public
89
89
  */
90
90
  const resetResultsPreviewWire = wireCommitWithoutPayload('resetResultsPreview');
91
+ /**
92
+ * Resets the next queries list to an empty array.
93
+ *
94
+ * @public
95
+ */
96
+ const resetNextQueriesWire = wireCommitWithoutPayload('resetNextQueries');
91
97
  /**
92
98
  * Sets the next queries state `searchedQueries` with the list of history queries.
93
99
  *
@@ -107,6 +113,7 @@ const nextQueriesWiring = createWiring({
107
113
  resetResultsPreviewWire,
108
114
  },
109
115
  UserAcceptedAQuery: {
116
+ resetNextQueriesWire,
110
117
  setNextQueriesQuery,
111
118
  },
112
119
  SelectedRelatedTagsChanged: {
@@ -132,5 +139,5 @@ const nextQueriesWiring = createWiring({
132
139
  },
133
140
  });
134
141
 
135
- export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries };
142
+ export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetNextQueriesWire, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries };
136
143
  //# sourceMappingURL=wiring.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"sourcesContent":["import type {\n NamespacedWireCommit,\n NamespacedWireCommitWithoutPayload,\n NamespacedWireDispatch,\n NamespacedWiringData,\n} from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `nextQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'nextQueries'\n\n/**\n * WireCommit for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireCommitWithoutPayload for {@link NextQueriesXModule}.\n */\nconst wireCommitWithoutPayload: NamespacedWireCommitWithoutPayload<typeof moduleName> =\n namespacedWireCommitWithoutPayload(moduleName)\n\n/**\n * WireDispatch for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the next queries state `query`.\n *\n * @public\n */\nexport const setNextQueriesQuery = wireCommit('setQuery')\n\n/**\n * Sets the next queries state `relatedTags`.\n *\n * @public\n */\nexport const setNextQueriesRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Sets the next queries state `query` with a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setNextQueriesQueryFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the next queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the next queries state `params`.\n *\n * @public\n */\nexport const setNextQueriesExtraParams = wireCommit('setParams')\n\n/**\n * Sets the next queries state `params` with a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setNextQueriesExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Requests and stores the next queries.\n *\n * @public\n */\nexport const fetchAndSaveNextQueriesWire = wireDispatch('fetchAndSaveNextQueries')\n\n/**\n * Sets the next queries state `query` with the last query in history queries.\n *\n * @public\n */\nexport const setQueryFromLastHistoryQueryWire = wireDispatch('setQueryFromLastHistoryQuery')\n\n/**\n * Requests and store the next query preview results.\n *\n * @public\n */\nexport const fetchAndSaveNextQueryPreviewWire = wireDispatch(\n 'fetchAndSaveNextQueryPreview',\n ({ eventPayload: query, metadata: { location } }: NamespacedWiringData<'nextQueries'>) => {\n return {\n query,\n location,\n }\n },\n)\n/**\n * Resets the next query preview results.\n *\n * @public\n */\nexport const resetResultsPreviewWire = wireCommitWithoutPayload('resetResultsPreview')\n\n/**\n * Sets the next queries state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueries = wireCommit('setSearchedQueries')\n\n/**\n * Wiring configuration for the {@link NextQueriesXModule | next queries module}.\n *\n * @internal\n */\nexport const nextQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n NextQueriesChanged: {\n resetResultsPreviewWire,\n },\n UserAcceptedAQuery: {\n setNextQueriesQuery,\n },\n SelectedRelatedTagsChanged: {\n setNextQueriesRelatedTags,\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueries,\n // TODO setQueryFromLastHistoryQuery it has to be called only one time\n setQueryFromLastHistoryQueryWire,\n },\n NextQueriesRequestUpdated: {\n fetchAndSaveNextQueriesWire,\n },\n ExtraParamsChanged: {\n setNextQueriesExtraParams,\n },\n NextQueryPreviewMountedHook: {\n fetchAndSaveNextQueryPreviewWire,\n },\n UserAcceptedAQueryPreview: {\n setNextQueriesQueryFromPreview,\n setNextQueriesExtraParamsFromPreview,\n },\n})\n"],"names":[],"mappings":";;;AAaA;;;;AAIG;AACH,MAAM,UAAU,GAAG,aAAa;AAEhC;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;AAEG;AACH,MAAM,wBAAwB,GAC5B,kCAAkC,CAAC,UAAU,CAAC;AAEhD;;;;AAIG;AACH,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC;AAElG;;;;AAIG;MACU,mBAAmB,GAAG,UAAU,CAAC,UAAU;AAExD;;;;AAIG;MACU,yBAAyB,GAAG,UAAU,CAAC,gBAAgB;AAEpE;;;;AAIG;MACU,8BAA8B,GAAG,UAAU,CACtD,WAAW,EACX,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK;AAGxC;;;;AAIG;AACH,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC;AAEjD;;;;AAIG;MACU,yBAAyB,GAAG,UAAU,CAAC,WAAW;AAE/D;;;;AAIG;MACU,oCAAoC,GAAG,UAAU,CAC5D,WAAW,EACX,CAAC,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,WAAW;AAGpD;;;;AAIG;MACU,2BAA2B,GAAG,YAAY,CAAC,yBAAyB;AAEjF;;;;AAIG;MACU,gCAAgC,GAAG,YAAY,CAAC,8BAA8B;AAE3F;;;;AAIG;MACU,gCAAgC,GAAG,YAAY,CAC1D,8BAA8B,EAC9B,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAuC,KAAI;IACvF,OAAO;QACL,KAAK;QACL,QAAQ;KACT;AACH,CAAC;AAEH;;;;AAIG;MACU,uBAAuB,GAAG,wBAAwB,CAAC,qBAAqB;AAErF;;;;AAIG;MACU,kBAAkB,GAAG,UAAU,CAAC,oBAAoB;AAEjE;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC5C,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,uBAAuB;AACxB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,mBAAmB;AACpB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,yBAAyB;AAC1B,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,kBAAkB;;QAElB,gCAAgC;AACjC,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,2BAA2B;AAC5B,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,yBAAyB;AAC1B,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,gCAAgC;AACjC,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,8BAA8B;QAC9B,oCAAoC;AACrC,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"sourcesContent":["import type {\n NamespacedWireCommit,\n NamespacedWireCommitWithoutPayload,\n NamespacedWireDispatch,\n NamespacedWiringData,\n} from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `nextQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'nextQueries'\n\n/**\n * WireCommit for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireCommitWithoutPayload for {@link NextQueriesXModule}.\n */\nconst wireCommitWithoutPayload: NamespacedWireCommitWithoutPayload<typeof moduleName> =\n namespacedWireCommitWithoutPayload(moduleName)\n\n/**\n * WireDispatch for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the next queries state `query`.\n *\n * @public\n */\nexport const setNextQueriesQuery = wireCommit('setQuery')\n\n/**\n * Sets the next queries state `relatedTags`.\n *\n * @public\n */\nexport const setNextQueriesRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Sets the next queries state `query` with a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setNextQueriesQueryFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the next queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the next queries state `params`.\n *\n * @public\n */\nexport const setNextQueriesExtraParams = wireCommit('setParams')\n\n/**\n * Sets the next queries state `params` with a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setNextQueriesExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Requests and stores the next queries.\n *\n * @public\n */\nexport const fetchAndSaveNextQueriesWire = wireDispatch('fetchAndSaveNextQueries')\n\n/**\n * Sets the next queries state `query` with the last query in history queries.\n *\n * @public\n */\nexport const setQueryFromLastHistoryQueryWire = wireDispatch('setQueryFromLastHistoryQuery')\n\n/**\n * Requests and store the next query preview results.\n *\n * @public\n */\nexport const fetchAndSaveNextQueryPreviewWire = wireDispatch(\n 'fetchAndSaveNextQueryPreview',\n ({ eventPayload: query, metadata: { location } }: NamespacedWiringData<'nextQueries'>) => {\n return {\n query,\n location,\n }\n },\n)\n/**\n * Resets the next query preview results.\n *\n * @public\n */\nexport const resetResultsPreviewWire = wireCommitWithoutPayload('resetResultsPreview')\n\n/**\n * Resets the next queries list to an empty array.\n *\n * @public\n */\nexport const resetNextQueriesWire = wireCommitWithoutPayload('resetNextQueries')\n\n/**\n * Sets the next queries state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueries = wireCommit('setSearchedQueries')\n\n/**\n * Wiring configuration for the {@link NextQueriesXModule | next queries module}.\n *\n * @internal\n */\nexport const nextQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n NextQueriesChanged: {\n resetResultsPreviewWire,\n },\n UserAcceptedAQuery: {\n resetNextQueriesWire,\n setNextQueriesQuery,\n },\n SelectedRelatedTagsChanged: {\n setNextQueriesRelatedTags,\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueries,\n // TODO setQueryFromLastHistoryQuery it has to be called only one time\n setQueryFromLastHistoryQueryWire,\n },\n NextQueriesRequestUpdated: {\n fetchAndSaveNextQueriesWire,\n },\n ExtraParamsChanged: {\n setNextQueriesExtraParams,\n },\n NextQueryPreviewMountedHook: {\n fetchAndSaveNextQueryPreviewWire,\n },\n UserAcceptedAQueryPreview: {\n setNextQueriesQueryFromPreview,\n setNextQueriesExtraParamsFromPreview,\n },\n})\n"],"names":[],"mappings":";;;AAaA;;;;AAIG;AACH,MAAM,UAAU,GAAG,aAAa;AAEhC;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;AAEG;AACH,MAAM,wBAAwB,GAC5B,kCAAkC,CAAC,UAAU,CAAC;AAEhD;;;;AAIG;AACH,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC;AAElG;;;;AAIG;MACU,mBAAmB,GAAG,UAAU,CAAC,UAAU;AAExD;;;;AA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,IAAA,yBAAyB,EAAE;QACzB,2BAA2B;AAC5B,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,yBAAyB;AAC1B,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,gCAAgC;AACjC,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,8BAA8B;QAC9B,oCAAoC;AACrC,KAAA;AACF,CAAA;;;;"}
@@ -10,5 +10,5 @@ export { query } from '../js/x-modules/next-queries/store/getters/next-queries-q
10
10
  export { nextQueries } from '../js/x-modules/next-queries/store/getters/next-queries.getter.js';
11
11
  export { request as nextQueriesRequest } from '../js/x-modules/next-queries/store/getters/request.getter.js';
12
12
  export { nextQueriesXStoreModule } from '../js/x-modules/next-queries/store/module.js';
13
- export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries } from '../js/x-modules/next-queries/wiring.js';
13
+ export { fetchAndSaveNextQueriesWire, fetchAndSaveNextQueryPreviewWire, nextQueriesWiring, resetNextQueriesWire, resetResultsPreviewWire, setNextQueriesExtraParams, setNextQueriesExtraParamsFromPreview, setNextQueriesQuery, setNextQueriesQueryFromPreview, setNextQueriesRelatedTags, setQueryFromLastHistoryQueryWire, setSearchedQueries } from '../js/x-modules/next-queries/wiring.js';
14
14
  export { nextQueriesXModule } from '../js/x-modules/next-queries/x-module.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "7.2.4",
3
+ "version": "7.3.0",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -117,5 +117,5 @@
117
117
  "access": "public",
118
118
  "directory": "dist"
119
119
  },
120
- "gitHead": "41a1b570390d424e529efc8527bfe7344db9cb0c"
120
+ "gitHead": "58b790f477dc044d55d166ae0d287eb3ef8e8564"
121
121
  }
@@ -28995,7 +28995,7 @@
28995
28995
  },
28996
28996
  {
28997
28997
  "kind": "Content",
28998
- "text": "'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart' | 'overview'"
28998
+ "text": "'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart'"
28999
28999
  },
29000
29000
  {
29001
29001
  "kind": "Content",
@@ -44271,6 +44271,33 @@
44271
44271
  "name": "NextQueriesMutations",
44272
44272
  "preserveMemberOrder": false,
44273
44273
  "members": [
44274
+ {
44275
+ "kind": "PropertySignature",
44276
+ "canonicalReference": "@empathyco/x-components!NextQueriesMutations#resetNextQueries:member",
44277
+ "docComment": "/**\n * Resets the next queries list to an empty array.\n */\n",
44278
+ "excerptTokens": [
44279
+ {
44280
+ "kind": "Content",
44281
+ "text": "resetNextQueries: "
44282
+ },
44283
+ {
44284
+ "kind": "Content",
44285
+ "text": "() => void"
44286
+ },
44287
+ {
44288
+ "kind": "Content",
44289
+ "text": ";"
44290
+ }
44291
+ ],
44292
+ "isReadonly": false,
44293
+ "isOptional": false,
44294
+ "releaseTag": "Public",
44295
+ "name": "resetNextQueries",
44296
+ "propertyTypeTokenRange": {
44297
+ "startIndex": 1,
44298
+ "endIndex": 2
44299
+ }
44300
+ },
44274
44301
  {
44275
44302
  "kind": "PropertySignature",
44276
44303
  "canonicalReference": "@empathyco/x-components!NextQueriesMutations#resetResultsPreview:member",
@@ -50345,7 +50372,7 @@
50345
50372
  },
50346
50373
  {
50347
50374
  "kind": "Content",
50348
- "text": "'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts' | 'overview'"
50375
+ "text": "'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts'"
50349
50376
  },
50350
50377
  {
50351
50378
  "kind": "Content",
@@ -59577,6 +59604,34 @@
59577
59604
  "endIndex": 3
59578
59605
  }
59579
59606
  },
59607
+ {
59608
+ "kind": "Variable",
59609
+ "canonicalReference": "@empathyco/x-components!resetNextQueriesWire:var",
59610
+ "docComment": "/**\n * Resets the next queries list to an empty array.\n *\n * @public\n */\n",
59611
+ "excerptTokens": [
59612
+ {
59613
+ "kind": "Content",
59614
+ "text": "resetNextQueriesWire: "
59615
+ },
59616
+ {
59617
+ "kind": "Content",
59618
+ "text": "import(\"../..\")."
59619
+ },
59620
+ {
59621
+ "kind": "Reference",
59622
+ "text": "AnyWire",
59623
+ "canonicalReference": "@empathyco/x-components!AnyWire:type"
59624
+ }
59625
+ ],
59626
+ "fileUrlPath": "src/x-modules/next-queries/wiring.ts",
59627
+ "isReadonly": true,
59628
+ "releaseTag": "Public",
59629
+ "name": "resetNextQueriesWire",
59630
+ "variableTypeTokenRange": {
59631
+ "startIndex": 1,
59632
+ "endIndex": 3
59633
+ }
59634
+ },
59580
59635
  {
59581
59636
  "kind": "Variable",
59582
59637
  "canonicalReference": "@empathyco/x-components!resetRequestOnRefinement:var",
@@ -59769,7 +59824,7 @@
59769
59824
  },
59770
59825
  {
59771
59826
  "kind": "Content",
59772
- "text": "'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'overview' | 'ai_carousel'"
59827
+ "text": "'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'ai_carousel'"
59773
59828
  },
59774
59829
  {
59775
59830
  "kind": "Content",
@@ -3151,7 +3151,7 @@ fromNoResultsWithFilters: ComputedRef<boolean>;
3151
3151
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3152
3152
 
3153
3153
  // @public
3154
- export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart' | 'overview';
3154
+ export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart';
3155
3155
 
3156
3156
  // @public
3157
3157
  export interface FetchAndSaveActions<Context extends XActionContext<StatusState, object, StatusMutations, object>, Request> {
@@ -4711,6 +4711,7 @@ showOnlyAfterOffset: boolean;
4711
4711
 
4712
4712
  // @public
4713
4713
  export interface NextQueriesMutations extends StatusMutations, QueryMutations, ConfigMutations<NextQueriesState> {
4714
+ resetNextQueries: () => void;
4714
4715
  resetResultsPreview: () => void;
4715
4716
  setNextQueries: (nextQueries: NextQuery_2[]) => void;
4716
4717
  setParams: (params: Dictionary<unknown>) => void;
@@ -4742,6 +4743,7 @@ export const nextQueriesWiring: {
4742
4743
  resetResultsPreviewWire: AnyWire;
4743
4744
  };
4744
4745
  UserAcceptedAQuery: {
4746
+ resetNextQueriesWire: AnyWire;
4745
4747
  setNextQueriesQuery: Wire<string>;
4746
4748
  };
4747
4749
  SelectedRelatedTagsChanged: {
@@ -5378,7 +5380,7 @@ export const query: NextQueriesXStoreModule['getters']['query'];
5378
5380
  export const QUERY_KEY: XInjectKey<string | undefined>;
5379
5381
 
5380
5382
  // @public
5381
- export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts' | 'overview';
5383
+ export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts';
5382
5384
 
5383
5385
  // @public
5384
5386
  export interface QueryMutations {
@@ -6421,6 +6423,9 @@ export const resetFromNoResultsWithFilters: AnyWire;
6421
6423
  // @public
6422
6424
  export const resetIsNoResults: AnyWire;
6423
6425
 
6426
+ // @public
6427
+ export const resetNextQueriesWire: AnyWire;
6428
+
6424
6429
  // @public
6425
6430
  export const resetRequestOnRefinement: SearchXStoreModule['actions']['resetRequestOnRefinement'];
6426
6431
 
@@ -6470,7 +6475,7 @@ export function resettableState(): {
6470
6475
  export const RESULT_WITH_VARIANTS_KEY: XInjectKey<Result>;
6471
6476
 
6472
6477
  // @public
6473
- export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'overview' | 'ai_carousel';
6478
+ export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'ai_carousel';
6474
6479
 
6475
6480
  // @public
6476
6481
  export type ResultOrigin = `${ResultFeature}:${FeatureLocation}`;
@@ -18,13 +18,13 @@ export type ResultOrigin = `${ResultFeature}:${FeatureLocation}`;
18
18
  *
19
19
  * @public
20
20
  */
21
- export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts' | 'overview';
21
+ export type QueryFeature = 'search_box' | 'url' | 'query_suggestion' | 'next_query' | 'popular_search' | 'history_query' | 'partial_result' | 'related_tag' | 'spellcheck' | 'customer' | 'semantics' | 'related_prompts';
22
22
  /**
23
23
  * The name of the tool that generated the results.
24
24
  *
25
25
  * @public
26
26
  */
27
- export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'overview' | 'ai_carousel';
27
+ export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_recommendations' | 'next_query_recommendations' | 'semantic_recommendations' | 'partial_results' | 'identifier_result' | 'related_prompts' | 'ai_carousel';
28
28
  /**
29
29
  * Indicates where the feature is placed.
30
30
  *
@@ -36,7 +36,7 @@ export type ResultFeature = 'search' | 'topclicked_recommendations' | 'brand_rec
36
36
  *
37
37
  * @public
38
38
  */
39
- export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart' | 'overview';
39
+ export type FeatureLocation = 'external' | 'my_history' | 'no_query' | 'results' | 'no_results' | 'low_results' | 'none' | 'predictive_layer' | 'pdp' | 'url_history' | 'url_history_pdp' | 'related_prompts' | 'add2cart';
40
40
  /**
41
41
  * Parameters to create a {@link QueryOrigin} or {@link ResultOrigin}.
42
42
  *
@@ -1 +1 @@
1
- {"version":3,"file":"origin.d.ts","sourceRoot":"","sources":["../../../../src/types/origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,YAAY,IAAI,eAAe,EAAE,CAAA;AAC9D;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,aAAa,IAAI,eAAe,EAAE,CAAA;AAEhE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,KAAK,GACL,kBAAkB,GAClB,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,UAAU,CAAA;AAEd;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,4BAA4B,GAC5B,uBAAuB,GACvB,4BAA4B,GAC5B,0BAA0B,GAC1B,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,UAAU,GACV,aAAa,CAAA;AAEjB;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,YAAY,GACZ,UAAU,GACV,SAAS,GACT,YAAY,GACZ,aAAa,GACb,MAAM,GACN,kBAAkB,GAClB,KAAK,GACL,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,UAAU,GACV,UAAU,CAAA;AAEd;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"origin.d.ts","sourceRoot":"","sources":["../../../../src/types/origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,YAAY,IAAI,eAAe,EAAE,CAAA;AAC9D;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,aAAa,IAAI,eAAe,EAAE,CAAA;AAEhE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,KAAK,GACL,kBAAkB,GAClB,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,WAAW,GACX,iBAAiB,CAAA;AAErB;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,4BAA4B,GAC5B,uBAAuB,GACvB,4BAA4B,GAC5B,0BAA0B,GAC1B,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,aAAa,CAAA;AAEjB;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,YAAY,GACZ,UAAU,GACV,SAAS,GACT,YAAY,GACZ,aAAa,GACb,MAAM,GACN,kBAAkB,GAClB,KAAK,GACL,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,UAAU,CAAA;AAEd;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAiBtD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAsDrC,CAAA"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAiBtD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAyDrC,CAAA"}
@@ -83,6 +83,10 @@ export interface NextQueriesMutations extends StatusMutations, QueryMutations, C
83
83
  * Resets the result's dictionary.
84
84
  */
85
85
  resetResultsPreview: () => void;
86
+ /**
87
+ * Resets the next queries list to an empty array.
88
+ */
89
+ resetNextQueries: () => void;
86
90
  }
87
91
  /**
88
92
  * Next queries module actions.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,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B,EACpB,kBAAkB,CACnB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CACnD,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,CACnB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,UAAU;IAC/D,kFAAkF;IAClF,WAAW,EAAE,SAAS,EAAE,CAAA;IACxB,sFAAsF;IAEtF,eAAe,EAAE,YAAY,EAAE,CAAA;IAC/B,kFAAkF;IAClF,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,wDAAwD;IACxD,MAAM,EAAE,iBAAiB,CAAA;IACzB,8CAA8C;IAC9C,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC3B,4CAA4C;IAC5C,cAAc,EAAE,UAAU,CAAC,cAAc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tE;;;;OAIG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IAC5C;;;;;;OAMG;IACH,qBAAqB,EAAE,CAAC,OAAO,EAAE;QAC/B,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;KACtC,KAAK,cAAc,GAAG,IAAI,CAAA;IAC3B;;;;OAIG;IACH,4BAA4B,EAAE,CAAC,OAAO,EAAE;QACtC,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;KACtC,KAAK,IAAI,CAAA;CACX;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAChD,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,CACnB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CACnD,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,CACnB,CAAA"}
@@ -52,6 +52,12 @@ export declare const fetchAndSaveNextQueryPreviewWire: import("../..").AnyWire;
52
52
  * @public
53
53
  */
54
54
  export declare const resetResultsPreviewWire: import("../..").AnyWire;
55
+ /**
56
+ * Resets the next queries list to an empty array.
57
+ *
58
+ * @public
59
+ */
60
+ export declare const resetNextQueriesWire: import("../..").AnyWire;
55
61
  /**
56
62
  * Sets the next queries state `searchedQueries` with the list of history queries.
57
63
  *
@@ -71,6 +77,7 @@ export declare const nextQueriesWiring: {
71
77
  resetResultsPreviewWire: import("../..").AnyWire;
72
78
  };
73
79
  UserAcceptedAQuery: {
80
+ resetNextQueriesWire: import("../..").AnyWire;
74
81
  setNextQueriesQuery: import("../..").Wire<string>;
75
82
  };
76
83
  SelectedRelatedTagsChanged: {
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/wiring.ts"],"names":[],"mappings":"AAwCA;;;;GAIG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