@empathyco/x-components 3.0.0-alpha.72 → 3.0.0-alpha.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/docs/API-reference/api/x-components.historyqueriesactions.md +1 -0
  3. package/docs/API-reference/api/x-components.historyqueriesactions.togglehistoryqueries.md +24 -0
  4. package/docs/API-reference/api/x-components.historyqueriesmutations.md +1 -0
  5. package/docs/API-reference/api/x-components.historyqueriesmutations.setisenabled.md +24 -0
  6. package/docs/API-reference/api/x-components.historyqueriesstate.isenabled.md +13 -0
  7. package/docs/API-reference/api/x-components.historyqueriesstate.md +1 -0
  8. package/docs/API-reference/api/x-components.historyqueriesxevents.md +1 -0
  9. package/docs/API-reference/api/x-components.historyqueriesxevents.usertoggledhistoryqueries.md +13 -0
  10. package/docs/API-reference/api/x-components.md +1 -0
  11. package/docs/API-reference/api/x-components.togglehistoryqueries.md +13 -0
  12. package/history-queries/index.js +1 -1
  13. package/js/index.js +1 -1
  14. package/js/x-modules/history-queries/store/actions/set-history-queries.action.js +6 -4
  15. package/js/x-modules/history-queries/store/actions/set-history-queries.action.js.map +1 -1
  16. package/js/x-modules/history-queries/store/actions/toggle-history-queries.action.js +13 -0
  17. package/js/x-modules/history-queries/store/actions/toggle-history-queries.action.js.map +1 -0
  18. package/js/x-modules/history-queries/store/constants.js +3 -2
  19. package/js/x-modules/history-queries/store/constants.js.map +1 -1
  20. package/js/x-modules/history-queries/store/module.js +11 -3
  21. package/js/x-modules/history-queries/store/module.js.map +1 -1
  22. package/js/x-modules/history-queries/wiring.js +10 -1
  23. package/js/x-modules/history-queries/wiring.js.map +1 -1
  24. package/package.json +2 -2
  25. package/report/x-components.api.json +170 -0
  26. package/report/x-components.api.md +10 -0
  27. package/types/x-modules/history-queries/events.types.d.ts +5 -0
  28. package/types/x-modules/history-queries/events.types.d.ts.map +1 -1
  29. package/types/x-modules/history-queries/store/actions/set-history-queries.action.d.ts.map +1 -1
  30. package/types/x-modules/history-queries/store/actions/toggle-history-queries.action.d.ts +3 -0
  31. package/types/x-modules/history-queries/store/actions/toggle-history-queries.action.d.ts.map +1 -0
  32. package/types/x-modules/history-queries/store/constants.d.ts +1 -0
  33. package/types/x-modules/history-queries/store/constants.d.ts.map +1 -1
  34. package/types/x-modules/history-queries/store/module.d.ts.map +1 -1
  35. package/types/x-modules/history-queries/store/types.d.ts +17 -0
  36. package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
  37. package/types/x-modules/history-queries/wiring.d.ts +9 -0
  38. package/types/x-modules/history-queries/wiring.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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.73](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.72...@empathyco/x-components@3.0.0-alpha.73) (2022-03-24)
7
+
8
+ ### Features
9
+
10
+ - **history-queries:** add toggle to enable/disable the history queries
11
+ ([655b55a](https://github.com/empathyco/x/commit/655b55a3f10788073a842d18f7849634e5f94376)),
12
+ closes [EX-5600](https://searchbroker.atlassian.net/browse/EX-5600)
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
6
19
  ## [3.0.0-alpha.72](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.71...@empathyco/x-components@3.0.0-alpha.72) (2022-03-23)
7
20
 
8
21
  ### Documentation
@@ -22,4 +22,5 @@ export interface HistoryQueriesActions
22
22
  | [removeFromHistory(historyQuery)](./x-components.historyqueriesactions.removefromhistory.md) | Removes a single query from the history, synchronizing it with the browser storage. |
23
23
  | [setHistoryQueries(historyQueries)](./x-components.historyqueriesactions.sethistoryqueries.md) | Sets the history queries, synchronizing them with the browser storage. It also removes the oldest query if the history queries length is bigger than the [HistoryQueriesConfig.maxItemsToStore](./x-components.historyqueriesconfig.maxitemstostore.md)<!-- -->. |
24
24
  | [setUrlParams(urlParams)](./x-components.historyqueriesactions.seturlparams.md) | Checks if the url has a query on it and then updates the state with that value. |
25
+ | [toggleHistoryQueries(isEnabled)](./x-components.historyqueriesactions.togglehistoryqueries.md) | Toggles the history queries and stores the state in the browser storage. It also cleans the history queries when disabling them. |
25
26
 
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [HistoryQueriesActions](./x-components.historyqueriesactions.md) &gt; [toggleHistoryQueries](./x-components.historyqueriesactions.togglehistoryqueries.md)
4
+
5
+ ## HistoryQueriesActions.toggleHistoryQueries() method
6
+
7
+ Toggles the history queries and stores the state in the browser storage. It also cleans the history queries when disabling them.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ toggleHistoryQueries(isEnabled: boolean): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | isEnabled | boolean | Whether to enable or disable the history queries. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -18,6 +18,7 @@ export interface HistoryQueriesMutations extends QueryMutations
18
18
  | Method | Description |
19
19
  | --- | --- |
20
20
  | [setHistoryQueries(historyQueries)](./x-components.historyqueriesmutations.sethistoryqueries.md) | Sets the [HistoryQueriesState.historyQueries](./x-components.historyqueriesstate.historyqueries.md) property. |
21
+ | [setIsEnabled(isEnabled)](./x-components.historyqueriesmutations.setisenabled.md) | Sets the [HistoryQueriesState.isEnabled](./x-components.historyqueriesstate.isenabled.md) property. |
21
22
  | [setQuery(query)](./x-components.historyqueriesmutations.setquery.md) | Sets the [HistoryQueriesState.query](./x-components.historyqueriesstate.query.md) property. |
22
23
  | [setSessionTimeStamp(timeStamp)](./x-components.historyqueriesmutations.setsessiontimestamp.md) | Sets the [HistoryQueriesState.sessionTimeStampInMs](./x-components.historyqueriesstate.sessiontimestampinms.md) property. |
23
24
 
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [HistoryQueriesMutations](./x-components.historyqueriesmutations.md) &gt; [setIsEnabled](./x-components.historyqueriesmutations.setisenabled.md)
4
+
5
+ ## HistoryQueriesMutations.setIsEnabled() method
6
+
7
+ Sets the [HistoryQueriesState.isEnabled](./x-components.historyqueriesstate.isenabled.md) property.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ setIsEnabled(isEnabled: boolean): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | isEnabled | boolean | The new [HistoryQueriesState.isEnabled](./x-components.historyqueriesstate.isenabled.md)<!-- -->. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [HistoryQueriesState](./x-components.historyqueriesstate.md) &gt; [isEnabled](./x-components.historyqueriesstate.isenabled.md)
4
+
5
+ ## HistoryQueriesState.isEnabled property
6
+
7
+ Whether the history queries are enabled or disabled.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ isEnabled: boolean;
13
+ ```
@@ -19,6 +19,7 @@ export interface HistoryQueriesState extends QueryState
19
19
  | --- | --- | --- |
20
20
  | [config](./x-components.historyqueriesstate.config.md) | [HistoryQueriesConfig](./x-components.historyqueriesconfig.md) | Configuration for the <code>HistoryQueries</code> module. |
21
21
  | [historyQueries](./x-components.historyqueriesstate.historyqueries.md) | HistoryQuery\[\] | The full list of queries made by the user. This list is persisted along different search sessions. |
22
+ | [isEnabled](./x-components.historyqueriesstate.isenabled.md) | boolean | Whether the history queries are enabled or disabled. |
22
23
  | [query](./x-components.historyqueriesstate.query.md) | string | The current query for searching into the [HistoryQueriesState.historyQueries](./x-components.historyqueriesstate.historyqueries.md)<!-- -->. |
23
24
  | [sessionTimeStampInMs](./x-components.historyqueriesstate.sessiontimestampinms.md) | number | Timestamp that indicates when the current search session has started. |
24
25
 
@@ -23,4 +23,5 @@ export interface HistoryQueriesXEvents
23
23
  | [UserPressedClearHistoryQueries](./x-components.historyqueriesxevents.userpressedclearhistoryqueries.md) | void | The user pressed the button for clearing all the history queries. \* Payload: none. |
24
24
  | [UserPressedRemoveHistoryQuery](./x-components.historyqueriesxevents.userpressedremovehistoryquery.md) | HistoryQuery | The user pressed the button for removing a single [history query](./x-types.historyquery.md)<!-- -->. \* Payload: The <code>HistoryQuery</code> to remove. |
25
25
  | [UserSelectedAHistoryQuery](./x-components.historyqueriesxevents.userselectedahistoryquery.md) | HistoryQuery | The user has selected a history-query. \* Payload: The [history query](./x-types.historyquery.md) selected. |
26
+ | [UserToggledHistoryQueries](./x-components.historyqueriesxevents.usertoggledhistoryqueries.md) | boolean | The user has toggled the history queries. \* Payload: whether it has been set to enable or disable. |
26
27
 
@@ -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; [HistoryQueriesXEvents](./x-components.historyqueriesxevents.md) &gt; [UserToggledHistoryQueries](./x-components.historyqueriesxevents.usertoggledhistoryqueries.md)
4
+
5
+ ## HistoryQueriesXEvents.UserToggledHistoryQueries property
6
+
7
+ The user has toggled the history queries. \* Payload: whether it has been set to enable or disable.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ UserToggledHistoryQueries: boolean;
13
+ ```
@@ -547,6 +547,7 @@ X-Components is a library usable everywhere not only for search experiences.
547
547
  | [taggingXModule](./x-components.taggingxmodule.md) | Tagging [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. |
548
548
  | [TagIcon](./x-components.tagicon.md) | |
549
549
  | [throttleFunction](./x-components.throttlefunction.md) | Util function that returns a throttled version of the function passed as parameter. |
550
+ | [toggleHistoryQueries](./x-components.togglehistoryqueries.md) | Enables or disables history queries. |
550
551
  | [toggleRelatedTag](./x-components.togglerelatedtag.md) | Default implementation for the [RelatedTagsActions.toggleRelatedTag()](./x-components.relatedtagsactions.togglerelatedtag.md)<!-- -->. |
551
552
  | [toggleRelatedTagWire](./x-components.togglerelatedtagwire.md) | Sets the selected related tags. |
552
553
  | [track](./x-components.track.md) | Default implementation for the [TaggingActions.track()](./x-components.taggingactions.track.md)<!-- -->. |
@@ -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; [toggleHistoryQueries](./x-components.togglehistoryqueries.md)
4
+
5
+ ## toggleHistoryQueries variable
6
+
7
+ Enables or disables history queries.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ toggleHistoryQueries: import("../..").Wire<boolean>
13
+ ```
@@ -13,5 +13,5 @@ export { HistoryQueriesGetter, historyQueries } from '../js/x-modules/history-qu
13
13
  export { sessionHistoryQueries } from '../js/x-modules/history-queries/store/getters/session-history-queries.getter.js';
14
14
  export { storageKey } from '../js/x-modules/history-queries/store/getters/storage-key.getter.js';
15
15
  export { historyQueriesXStoreModule } from '../js/x-modules/history-queries/store/module.js';
16
- export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery } from '../js/x-modules/history-queries/wiring.js';
16
+ export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery, toggleHistoryQueries } from '../js/x-modules/history-queries/wiring.js';
17
17
  export { historyQueriesXModule } from '../js/x-modules/history-queries/x-module.js';
package/js/index.js CHANGED
@@ -216,7 +216,7 @@ export { HistoryQueriesGetter, historyQueries } from './x-modules/history-querie
216
216
  export { sessionHistoryQueries } from './x-modules/history-queries/store/getters/session-history-queries.getter.js';
217
217
  export { storageKey } from './x-modules/history-queries/store/getters/storage-key.getter.js';
218
218
  export { historyQueriesXStoreModule } from './x-modules/history-queries/store/module.js';
219
- export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery } from './x-modules/history-queries/wiring.js';
219
+ export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery, toggleHistoryQueries } from './x-modules/history-queries/wiring.js';
220
220
  export { historyQueriesXModule } from './x-modules/history-queries/x-module.js';
221
221
  export { default as IdentifierResult } from './x-modules/identifier-results/components/identifier-result.vue.js';
222
222
  export { default as IdentifierResults } from './x-modules/identifier-results/components/identifier-results.vue.js';
@@ -9,11 +9,13 @@ import { localStorageService } from '../../../../utils/storage.js';
9
9
  * @public
10
10
  */
11
11
  const setHistoryQueries = ({ commit, state, getters }, historyQueries) => {
12
- if (historyQueries.length > state.config.maxItemsToStore) {
13
- historyQueries = historyQueries.slice(0, state.config.maxItemsToStore);
12
+ if (state.isEnabled) {
13
+ if (historyQueries.length > state.config.maxItemsToStore) {
14
+ historyQueries = historyQueries.slice(0, state.config.maxItemsToStore);
15
+ }
16
+ commit('setHistoryQueries', historyQueries);
17
+ localStorageService.setItem(getters.storageKey, historyQueries);
14
18
  }
15
- commit('setHistoryQueries', historyQueries);
16
- localStorageService.setItem(getters.storageKey, historyQueries);
17
19
  };
18
20
 
19
21
  export { setHistoryQueries };
@@ -1 +1 @@
1
- {"version":3,"file":"set-history-queries.action.js","sources":["../../../../../../src/x-modules/history-queries/store/actions/set-history-queries.action.ts"],"sourcesContent":["import { localStorageService } from '../../../../utils/storage';\nimport { HistoryQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link HistoryQueriesActions.setHistoryQueries}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param historyQueries - The new history queries to save to the store and browser storage.\n * @public\n */\nexport const setHistoryQueries: HistoryQueriesXStoreModule['actions']['setHistoryQueries'] = (\n { commit, state, getters },\n historyQueries\n) => {\n if (historyQueries.length > state.config.maxItemsToStore) {\n historyQueries = historyQueries.slice(0, state.config.maxItemsToStore);\n }\n commit('setHistoryQueries', historyQueries);\n localStorageService.setItem(getters.storageKey, historyQueries);\n};\n"],"names":[],"mappings":";;AAGA;;;;;;;;MAQa,iBAAiB,GAA+D,CAC3F,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAC1B,cAAc;IAEd,IAAI,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE;QACxD,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;KACxE;IACD,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;IAC5C,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAClE;;;;"}
1
+ {"version":3,"file":"set-history-queries.action.js","sources":["../../../../../../src/x-modules/history-queries/store/actions/set-history-queries.action.ts"],"sourcesContent":["import { localStorageService } from '../../../../utils/storage';\nimport { HistoryQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link HistoryQueriesActions.setHistoryQueries}.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param historyQueries - The new history queries to save to the store and browser storage.\n * @public\n */\nexport const setHistoryQueries: HistoryQueriesXStoreModule['actions']['setHistoryQueries'] = (\n { commit, state, getters },\n historyQueries\n) => {\n if (state.isEnabled) {\n if (historyQueries.length > state.config.maxItemsToStore) {\n historyQueries = historyQueries.slice(0, state.config.maxItemsToStore);\n }\n commit('setHistoryQueries', historyQueries);\n localStorageService.setItem(getters.storageKey, historyQueries);\n }\n};\n"],"names":[],"mappings":";;AAGA;;;;;;;;MAQa,iBAAiB,GAA+D,CAC3F,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAC1B,cAAc;IAEd,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,IAAI,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE;YACxD,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;SACxE;QACD,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;QAC5C,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;KACjE;AACH;;;;"}
@@ -0,0 +1,13 @@
1
+ import { localStorageService } from '../../../../utils/storage.js';
2
+ import { HISTORY_QUERIES_ENABLED_KEY } from '../constants.js';
3
+
4
+ const toggleHistoryQueries = async ({ dispatch, commit }, isEnabled) => {
5
+ if (!isEnabled) {
6
+ await dispatch('setHistoryQueries', []);
7
+ }
8
+ commit('setIsEnabled', isEnabled);
9
+ localStorageService.setItem(HISTORY_QUERIES_ENABLED_KEY, isEnabled);
10
+ };
11
+
12
+ export { toggleHistoryQueries };
13
+ //# sourceMappingURL=toggle-history-queries.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-history-queries.action.js","sources":["../../../../../../src/x-modules/history-queries/store/actions/toggle-history-queries.action.ts"],"sourcesContent":["import { localStorageService } from '../../../../utils/storage';\nimport { HISTORY_QUERIES_ENABLED_KEY } from '../constants';\nimport { HistoryQueriesXStoreModule } from '../types';\n\nexport const toggleHistoryQueries: HistoryQueriesXStoreModule['actions']['toggleHistoryQueries'] =\n async ({ dispatch, commit }, isEnabled) => {\n if (!isEnabled) {\n await dispatch('setHistoryQueries', []);\n }\n\n commit('setIsEnabled', isEnabled);\n localStorageService.setItem(HISTORY_QUERIES_ENABLED_KEY, isEnabled);\n };\n"],"names":[],"mappings":";;;MAIa,oBAAoB,GAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS;IACpC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;KACzC;IAED,MAAM,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IAClC,mBAAmB,CAAC,OAAO,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;AACtE;;;;"}
@@ -1,5 +1,6 @@
1
1
  const HISTORY_QUERIES_STORAGE_KEY = 'history-queries';
2
- const SESSION_TIME_STAMP_STORAGE_KEY = 'session-time-stamp';
2
+ const SESSION_TIME_STAMP_STORAGE_KEY = 'session-time-stamp';
3
+ const HISTORY_QUERIES_ENABLED_KEY = 'history-queries-enabled';
3
4
 
4
- export { HISTORY_QUERIES_STORAGE_KEY, SESSION_TIME_STAMP_STORAGE_KEY };
5
+ export { HISTORY_QUERIES_ENABLED_KEY, HISTORY_QUERIES_STORAGE_KEY, SESSION_TIME_STAMP_STORAGE_KEY };
5
6
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../src/x-modules/history-queries/store/constants.ts"],"sourcesContent":["export const HISTORY_QUERIES_STORAGE_KEY = 'history-queries';\nexport const SESSION_TIME_STAMP_STORAGE_KEY = 'session-time-stamp';\n"],"names":[],"mappings":"MAAa,2BAA2B,GAAG,kBAAkB;MAChD,8BAA8B,GAAG;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../src/x-modules/history-queries/store/constants.ts"],"sourcesContent":["export const HISTORY_QUERIES_STORAGE_KEY = 'history-queries';\nexport const SESSION_TIME_STAMP_STORAGE_KEY = 'session-time-stamp';\nexport const HISTORY_QUERIES_ENABLED_KEY = 'history-queries-enabled';\n"],"names":[],"mappings":"MAAa,2BAA2B,GAAG,kBAAkB;MAChD,8BAA8B,GAAG,qBAAqB;MACtD,2BAA2B,GAAG;;;;"}
@@ -1,10 +1,13 @@
1
1
  import { setQuery } from '../../../store/utils/query.utils.js';
2
+ import { localStorageService } from '../../../utils/storage.js';
2
3
  import { addQueryToHistory } from './actions/add-query-to-history.action.js';
3
4
  import { loadHistoryQueriesFromBrowserStorage } from './actions/load-history-queries-from-browser-storage.action.js';
4
5
  import { refreshSession } from './actions/refresh-session.action.js';
5
6
  import { removeFromHistory } from './actions/remove-query-from-history.action.js';
6
7
  import { setHistoryQueries } from './actions/set-history-queries.action.js';
7
8
  import { setUrlParams } from './actions/set-url-params.action.js';
9
+ import { toggleHistoryQueries } from './actions/toggle-history-queries.action.js';
10
+ import { HISTORY_QUERIES_ENABLED_KEY } from './constants.js';
8
11
  import { historyQueries } from './getters/history-queries.getter.js';
9
12
  import { normalizedQuery } from './getters/normalized-query.getter.js';
10
13
  import { sessionHistoryQueries } from './getters/session-history-queries.getter.js';
@@ -25,7 +28,8 @@ const historyQueriesXStoreModule = {
25
28
  },
26
29
  query: '',
27
30
  historyQueries: [],
28
- sessionTimeStampInMs: Date.now()
31
+ sessionTimeStampInMs: Date.now(),
32
+ isEnabled: localStorageService.getItem(HISTORY_QUERIES_ENABLED_KEY) ?? true
29
33
  }),
30
34
  getters: {
31
35
  historyQueries,
@@ -40,7 +44,10 @@ const historyQueriesXStoreModule = {
40
44
  setSessionTimeStamp(state, sessionTimeStamp) {
41
45
  state.sessionTimeStampInMs = sessionTimeStamp;
42
46
  },
43
- setQuery
47
+ setQuery,
48
+ setIsEnabled(state, isEnabled) {
49
+ state.isEnabled = isEnabled;
50
+ }
44
51
  },
45
52
  actions: {
46
53
  addQueryToHistory,
@@ -48,7 +55,8 @@ const historyQueriesXStoreModule = {
48
55
  refreshSession,
49
56
  removeFromHistory,
50
57
  setHistoryQueries,
51
- setUrlParams
58
+ setUrlParams,
59
+ toggleHistoryQueries
52
60
  }
53
61
  };
54
62
 
@@ -1 +1 @@
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
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/history-queries/store/module.ts"],"sourcesContent":["import { setQuery } from '../../../store/utils/query.utils';\nimport { localStorageService } from '../../../utils/storage';\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 { toggleHistoryQueries } from './actions/toggle-history-queries.action';\nimport { HISTORY_QUERIES_ENABLED_KEY } from './constants';\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 isEnabled: localStorageService.getItem<boolean>(HISTORY_QUERIES_ENABLED_KEY) ?? true\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 setIsEnabled(state, isEnabled) {\n state.isEnabled = isEnabled;\n }\n },\n actions: {\n addQueryToHistory,\n loadHistoryQueriesFromBrowserStorage,\n refreshSession,\n removeFromHistory,\n setHistoryQueries,\n setUrlParams,\n toggleHistoryQueries\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBA;;;;;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;QAChC,SAAS,EAAE,mBAAmB,CAAC,OAAO,CAAU,2BAA2B,CAAC,IAAI,IAAI;KACrF,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;QACR,YAAY,CAAC,KAAK,EAAE,SAAS;YAC3B,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;SAC7B;KACF;IACD,OAAO,EAAE;QACP,iBAAiB;QACjB,oCAAoC;QACpC,cAAc;QACd,iBAAiB;QACjB,iBAAiB;QACjB,YAAY;QACZ,oBAAoB;KACrB;;;;;"}
@@ -76,6 +76,12 @@ const clearHistoryQueries = wireDispatch('setHistoryQueries', []);
76
76
  * @public
77
77
  */
78
78
  const removeHistoryQuery = wireDispatch('removeFromHistory');
79
+ /**
80
+ * Enables or disables history queries.
81
+ *
82
+ * @public
83
+ */
84
+ const toggleHistoryQueries = wireDispatch('toggleHistoryQueries');
79
85
  /**
80
86
  * Debounce function for the module.
81
87
  */
@@ -110,8 +116,11 @@ const historyQueriesWiring = createWiring({
110
116
  },
111
117
  UserPressedRemoveHistoryQuery: {
112
118
  removeHistoryQuery
119
+ },
120
+ UserToggledHistoryQueries: {
121
+ toggleHistoryQueries
113
122
  }
114
123
  });
115
124
 
116
- export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery };
125
+ export { addQueryToHistoryQueries, clearHistoryQueries, clearHistoryQueriesQuery, historyQueriesWiring, loadHistoryQueriesFromBrowserStorageWire, refreshHistoryQueriesSession, removeHistoryQuery, setHistoryQueriesQuery, toggleHistoryQueries };
117
126
  //# sourceMappingURL=wiring.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/history-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators';\nimport { NamespacedWireCommit, NamespacedWireDispatch } from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `historyQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'historyQueries';\n/**\n * WireCommit for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n/**\n * WireDispatch for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n/**\n * WireDispatchWithoutPayload for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Saves a new query into the history queries.\n *\n * @public\n */\nexport const addQueryToHistoryQueries = wireDispatch('addQueryToHistory');\n\n/**\n * Sets the query of the history queries module. Used for searching into the history queries.\n *\n * @public\n */\nexport const setHistoryQueriesQuery = wireCommit('setQuery');\n\n/**\n * Sets the history queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the query of the history queries module to an empty string.\n *\n * @public\n */\nexport const clearHistoryQueriesQuery = wireCommit('setQuery', '');\n\n/**\n * Triggers a session refresh, extending its validity for the time configured in the\n * {@link HistoryQueriesConfig.sessionTTLInMs}.\n *\n * @public\n */\nexport const refreshHistoryQueriesSession = wireDispatchWithoutPayload('refreshSession');\n\n/**\n * Loads the history queries from the browser storage, saving them to the\n * {@link HistoryQueriesState.historyQueries}.\n *\n * @public\n */\nexport const loadHistoryQueriesFromBrowserStorageWire = wireDispatchWithoutPayload(\n 'loadHistoryQueriesFromBrowserStorage'\n);\n\n/**\n * Clears the history queries.\n *\n * @public\n */\nexport const clearHistoryQueries = wireDispatch('setHistoryQueries', []);\n\n/**\n * Removes a single history query from the history queries.\n *\n * @public\n */\nexport const removeHistoryQuery = wireDispatch('removeFromHistory');\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName);\n\n/**\n * Default wiring for the {@link HistoryQueries} module.\n *\n * @internal\n */\nexport const historyQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams\n },\n HistoryQueriesQueryChanged: {\n refreshHistoryQueriesSession\n },\n HistoryQueriesStorageKeyChanged: {\n loadHistoryQueriesFromBrowserStorageWire\n },\n UserClearedQuery: {\n clearHistoryQueriesQuery\n },\n UserAcceptedAQuery: {\n setHistoryQueriesQuery,\n addQueryToHistoryQueries\n },\n UserIsTypingAQuery: {\n setHistoryQueriesQueryDebounce: moduleDebounce(\n setHistoryQueriesQuery,\n ({ state }) => state.config.debounceInMs,\n { cancelOn: 'UserAcceptedAQuery' }\n )\n },\n UserPressedClearHistoryQueries: {\n clearHistoryQueries\n },\n UserPressedRemoveHistoryQuery: {\n removeHistoryQuery\n }\n});\n"],"names":[],"mappings":";;;;AASA;;;;;AAKA,MAAM,UAAU,GAAG,gBAAgB,CAAC;AACpC;;;;;AAKA,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC7F;;;;;AAKA,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC,CAAC;AACnG;;;;;AAKA,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC,CAAC;AAEpF;;;;;MAKa,wBAAwB,GAAG,YAAY,CAAC,mBAAmB,EAAE;AAE1E;;;;;MAKa,sBAAsB,GAAG,UAAU,CAAC,UAAU,EAAE;AAE7D;;;;;AAKA,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;AAElD;;;;;MAKa,wBAAwB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEnE;;;;;;MAMa,4BAA4B,GAAG,0BAA0B,CAAC,gBAAgB,EAAE;AAEzF;;;;;;MAMa,wCAAwC,GAAG,0BAA0B,CAChF,sCAAsC,EACtC;AAEF;;;;;MAKa,mBAAmB,GAAG,YAAY,CAAC,mBAAmB,EAAE,EAAE,EAAE;AAEzE;;;;;MAKa,kBAAkB,GAAG,YAAY,CAAC,mBAAmB,EAAE;AAEpE;;;AAGA,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;;MAKa,oBAAoB,GAAG,YAAY,CAAC;IAC/C,mBAAmB,EAAE;QACnB,YAAY;KACb;IACD,0BAA0B,EAAE;QAC1B,4BAA4B;KAC7B;IACD,+BAA+B,EAAE;QAC/B,wCAAwC;KACzC;IACD,gBAAgB,EAAE;QAChB,wBAAwB;KACzB;IACD,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,wBAAwB;KACzB;IACD,kBAAkB,EAAE;QAClB,8BAA8B,EAAE,cAAc,CAC5C,sBAAsB,EACtB,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,YAAY,EACxC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CACnC;KACF;IACD,8BAA8B,EAAE;QAC9B,mBAAmB;KACpB;IACD,6BAA6B,EAAE;QAC7B,kBAAkB;KACnB;CACF;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/history-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload\n} from '../../wiring/namespaced-wires.factory';\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators';\nimport { NamespacedWireCommit, NamespacedWireDispatch } from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `historyQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'historyQueries';\n/**\n * WireCommit for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n/**\n * WireDispatch for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n/**\n * WireDispatchWithoutPayload for {@link HistoryQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName);\n\n/**\n * Saves a new query into the history queries.\n *\n * @public\n */\nexport const addQueryToHistoryQueries = wireDispatch('addQueryToHistory');\n\n/**\n * Sets the query of the history queries module. Used for searching into the history queries.\n *\n * @public\n */\nexport const setHistoryQueriesQuery = wireCommit('setQuery');\n\n/**\n * Sets the history queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the query of the history queries module to an empty string.\n *\n * @public\n */\nexport const clearHistoryQueriesQuery = wireCommit('setQuery', '');\n\n/**\n * Triggers a session refresh, extending its validity for the time configured in the\n * {@link HistoryQueriesConfig.sessionTTLInMs}.\n *\n * @public\n */\nexport const refreshHistoryQueriesSession = wireDispatchWithoutPayload('refreshSession');\n\n/**\n * Loads the history queries from the browser storage, saving them to the\n * {@link HistoryQueriesState.historyQueries}.\n *\n * @public\n */\nexport const loadHistoryQueriesFromBrowserStorageWire = wireDispatchWithoutPayload(\n 'loadHistoryQueriesFromBrowserStorage'\n);\n\n/**\n * Clears the history queries.\n *\n * @public\n */\nexport const clearHistoryQueries = wireDispatch('setHistoryQueries', []);\n\n/**\n * Removes a single history query from the history queries.\n *\n * @public\n */\nexport const removeHistoryQuery = wireDispatch('removeFromHistory');\n/**\n * Enables or disables history queries.\n *\n * @public\n */\nexport const toggleHistoryQueries = wireDispatch('toggleHistoryQueries');\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName);\n\n/**\n * Default wiring for the {@link HistoryQueries} module.\n *\n * @internal\n */\nexport const historyQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams\n },\n HistoryQueriesQueryChanged: {\n refreshHistoryQueriesSession\n },\n HistoryQueriesStorageKeyChanged: {\n loadHistoryQueriesFromBrowserStorageWire\n },\n UserClearedQuery: {\n clearHistoryQueriesQuery\n },\n UserAcceptedAQuery: {\n setHistoryQueriesQuery,\n addQueryToHistoryQueries\n },\n UserIsTypingAQuery: {\n setHistoryQueriesQueryDebounce: moduleDebounce(\n setHistoryQueriesQuery,\n ({ state }) => state.config.debounceInMs,\n { cancelOn: 'UserAcceptedAQuery' }\n )\n },\n UserPressedClearHistoryQueries: {\n clearHistoryQueries\n },\n UserPressedRemoveHistoryQuery: {\n removeHistoryQuery\n },\n UserToggledHistoryQueries: {\n toggleHistoryQueries\n }\n});\n"],"names":[],"mappings":";;;;AASA;;;;;AAKA,MAAM,UAAU,GAAG,gBAAgB,CAAC;AACpC;;;;;AAKA,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC7F;;;;;AAKA,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC,CAAC;AACnG;;;;;AAKA,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC,CAAC;AAEpF;;;;;MAKa,wBAAwB,GAAG,YAAY,CAAC,mBAAmB,EAAE;AAE1E;;;;;MAKa,sBAAsB,GAAG,UAAU,CAAC,UAAU,EAAE;AAE7D;;;;;AAKA,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;AAElD;;;;;MAKa,wBAAwB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,EAAE;AAEnE;;;;;;MAMa,4BAA4B,GAAG,0BAA0B,CAAC,gBAAgB,EAAE;AAEzF;;;;;;MAMa,wCAAwC,GAAG,0BAA0B,CAChF,sCAAsC,EACtC;AAEF;;;;;MAKa,mBAAmB,GAAG,YAAY,CAAC,mBAAmB,EAAE,EAAE,EAAE;AAEzE;;;;;MAKa,kBAAkB,GAAG,YAAY,CAAC,mBAAmB,EAAE;AACpE;;;;;MAKa,oBAAoB,GAAG,YAAY,CAAC,sBAAsB,EAAE;AAEzE;;;AAGA,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAEtD;;;;;MAKa,oBAAoB,GAAG,YAAY,CAAC;IAC/C,mBAAmB,EAAE;QACnB,YAAY;KACb;IACD,0BAA0B,EAAE;QAC1B,4BAA4B;KAC7B;IACD,+BAA+B,EAAE;QAC/B,wCAAwC;KACzC;IACD,gBAAgB,EAAE;QAChB,wBAAwB;KACzB;IACD,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,wBAAwB;KACzB;IACD,kBAAkB,EAAE;QAClB,8BAA8B,EAAE,cAAc,CAC5C,sBAAsB,EACtB,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,YAAY,EACxC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CACnC;KACF;IACD,8BAA8B,EAAE;QAC9B,mBAAmB;KACpB;IACD,6BAA6B,EAAE;QAC7B,kBAAkB;KACnB;IACD,yBAAyB,EAAE;QACzB,oBAAoB;KACrB;CACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.72",
3
+ "version": "3.0.0-alpha.73",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -127,5 +127,5 @@
127
127
  "access": "public",
128
128
  "directory": "dist"
129
129
  },
130
- "gitHead": "7e53bc3ca696b6129614ed2618a8e6036713a90d"
130
+ "gitHead": "8cbf15643ea6eddeadd6c2e150b57bb26f4c7f08"
131
131
  }
@@ -19282,6 +19282,50 @@
19282
19282
  }
19283
19283
  ],
19284
19284
  "name": "setUrlParams"
19285
+ },
19286
+ {
19287
+ "kind": "MethodSignature",
19288
+ "canonicalReference": "@empathyco/x-components!HistoryQueriesActions#toggleHistoryQueries:member(1)",
19289
+ "docComment": "/**\n * Toggles the history queries and stores the state in the browser storage. It also cleans the history queries when disabling them.\n *\n * @param isEnabled - Whether to enable or disable the history queries.\n */\n",
19290
+ "excerptTokens": [
19291
+ {
19292
+ "kind": "Content",
19293
+ "text": "toggleHistoryQueries(isEnabled: "
19294
+ },
19295
+ {
19296
+ "kind": "Content",
19297
+ "text": "boolean"
19298
+ },
19299
+ {
19300
+ "kind": "Content",
19301
+ "text": "): "
19302
+ },
19303
+ {
19304
+ "kind": "Content",
19305
+ "text": "void"
19306
+ },
19307
+ {
19308
+ "kind": "Content",
19309
+ "text": ";"
19310
+ }
19311
+ ],
19312
+ "isOptional": false,
19313
+ "returnTypeTokenRange": {
19314
+ "startIndex": 3,
19315
+ "endIndex": 4
19316
+ },
19317
+ "releaseTag": "Public",
19318
+ "overloadIndex": 1,
19319
+ "parameters": [
19320
+ {
19321
+ "parameterName": "isEnabled",
19322
+ "parameterTypeTokenRange": {
19323
+ "startIndex": 1,
19324
+ "endIndex": 2
19325
+ }
19326
+ }
19327
+ ],
19328
+ "name": "toggleHistoryQueries"
19285
19329
  }
19286
19330
  ],
19287
19331
  "extendsTokenRanges": []
@@ -19697,6 +19741,50 @@
19697
19741
  ],
19698
19742
  "name": "setHistoryQueries"
19699
19743
  },
19744
+ {
19745
+ "kind": "MethodSignature",
19746
+ "canonicalReference": "@empathyco/x-components!HistoryQueriesMutations#setIsEnabled:member(1)",
19747
+ "docComment": "/**\n * Sets the {@link HistoryQueriesState.isEnabled} property.\n *\n * @param isEnabled - The new {@link HistoryQueriesState.isEnabled}.\n */\n",
19748
+ "excerptTokens": [
19749
+ {
19750
+ "kind": "Content",
19751
+ "text": "setIsEnabled(isEnabled: "
19752
+ },
19753
+ {
19754
+ "kind": "Content",
19755
+ "text": "boolean"
19756
+ },
19757
+ {
19758
+ "kind": "Content",
19759
+ "text": "): "
19760
+ },
19761
+ {
19762
+ "kind": "Content",
19763
+ "text": "void"
19764
+ },
19765
+ {
19766
+ "kind": "Content",
19767
+ "text": ";"
19768
+ }
19769
+ ],
19770
+ "isOptional": false,
19771
+ "returnTypeTokenRange": {
19772
+ "startIndex": 3,
19773
+ "endIndex": 4
19774
+ },
19775
+ "releaseTag": "Public",
19776
+ "overloadIndex": 1,
19777
+ "parameters": [
19778
+ {
19779
+ "parameterName": "isEnabled",
19780
+ "parameterTypeTokenRange": {
19781
+ "startIndex": 1,
19782
+ "endIndex": 2
19783
+ }
19784
+ }
19785
+ ],
19786
+ "name": "setIsEnabled"
19787
+ },
19700
19788
  {
19701
19789
  "kind": "MethodSignature",
19702
19790
  "canonicalReference": "@empathyco/x-components!HistoryQueriesMutations#setQuery:member(1)",
@@ -19873,6 +19961,32 @@
19873
19961
  "endIndex": 3
19874
19962
  }
19875
19963
  },
19964
+ {
19965
+ "kind": "PropertySignature",
19966
+ "canonicalReference": "@empathyco/x-components!HistoryQueriesState#isEnabled:member",
19967
+ "docComment": "/**\n * Whether the history queries are enabled or disabled.\n */\n",
19968
+ "excerptTokens": [
19969
+ {
19970
+ "kind": "Content",
19971
+ "text": "isEnabled: "
19972
+ },
19973
+ {
19974
+ "kind": "Content",
19975
+ "text": "boolean"
19976
+ },
19977
+ {
19978
+ "kind": "Content",
19979
+ "text": ";"
19980
+ }
19981
+ ],
19982
+ "isOptional": false,
19983
+ "releaseTag": "Public",
19984
+ "name": "isEnabled",
19985
+ "propertyTypeTokenRange": {
19986
+ "startIndex": 1,
19987
+ "endIndex": 2
19988
+ }
19989
+ },
19876
19990
  {
19877
19991
  "kind": "PropertySignature",
19878
19992
  "canonicalReference": "@empathyco/x-components!HistoryQueriesState#query:member",
@@ -20139,6 +20253,32 @@
20139
20253
  "startIndex": 1,
20140
20254
  "endIndex": 2
20141
20255
  }
20256
+ },
20257
+ {
20258
+ "kind": "PropertySignature",
20259
+ "canonicalReference": "@empathyco/x-components!HistoryQueriesXEvents#UserToggledHistoryQueries:member",
20260
+ "docComment": "/**\n * The user has toggled the history queries. * Payload: whether it has been set to enable or disable.\n */\n",
20261
+ "excerptTokens": [
20262
+ {
20263
+ "kind": "Content",
20264
+ "text": "UserToggledHistoryQueries: "
20265
+ },
20266
+ {
20267
+ "kind": "Content",
20268
+ "text": "boolean"
20269
+ },
20270
+ {
20271
+ "kind": "Content",
20272
+ "text": ";"
20273
+ }
20274
+ ],
20275
+ "isOptional": false,
20276
+ "releaseTag": "Public",
20277
+ "name": "UserToggledHistoryQueries",
20278
+ "propertyTypeTokenRange": {
20279
+ "startIndex": 1,
20280
+ "endIndex": 2
20281
+ }
20142
20282
  }
20143
20283
  ],
20144
20284
  "extendsTokenRanges": []
@@ -45488,6 +45628,36 @@
45488
45628
  "endIndex": 6
45489
45629
  }
45490
45630
  },
45631
+ {
45632
+ "kind": "Variable",
45633
+ "canonicalReference": "@empathyco/x-components!toggleHistoryQueries:var",
45634
+ "docComment": "/**\n * Enables or disables history queries.\n *\n * @public\n */\n",
45635
+ "excerptTokens": [
45636
+ {
45637
+ "kind": "Content",
45638
+ "text": "toggleHistoryQueries: "
45639
+ },
45640
+ {
45641
+ "kind": "Content",
45642
+ "text": "import(\"../..\")."
45643
+ },
45644
+ {
45645
+ "kind": "Reference",
45646
+ "text": "Wire",
45647
+ "canonicalReference": "@empathyco/x-components!Wire:type"
45648
+ },
45649
+ {
45650
+ "kind": "Content",
45651
+ "text": "<boolean>"
45652
+ }
45653
+ ],
45654
+ "releaseTag": "Public",
45655
+ "name": "toggleHistoryQueries",
45656
+ "variableTypeTokenRange": {
45657
+ "startIndex": 1,
45658
+ "endIndex": 4
45659
+ }
45660
+ },
45491
45661
  {
45492
45662
  "kind": "Variable",
45493
45663
  "canonicalReference": "@empathyco/x-components!toggleRelatedTag:var",
@@ -1835,6 +1835,7 @@ export interface HistoryQueriesActions {
1835
1835
  removeFromHistory(historyQuery: HistoryQuery_2): void;
1836
1836
  setHistoryQueries(historyQueries: HistoryQuery_2[]): void;
1837
1837
  setUrlParams(urlParams: UrlParams): void;
1838
+ toggleHistoryQueries(isEnabled: boolean): void;
1838
1839
  }
1839
1840
 
1840
1841
  // @public
@@ -1878,6 +1879,7 @@ export interface HistoryQueriesGetters {
1878
1879
  // @public
1879
1880
  export interface HistoryQueriesMutations extends QueryMutations {
1880
1881
  setHistoryQueries(historyQueries: HistoryQuery_2[]): void;
1882
+ setIsEnabled(isEnabled: boolean): void;
1881
1883
  setQuery(query: string): void;
1882
1884
  setSessionTimeStamp(timeStamp: number): void;
1883
1885
  }
@@ -1888,6 +1890,7 @@ export interface HistoryQueriesMutations extends QueryMutations {
1888
1890
  export interface HistoryQueriesState extends QueryState {
1889
1891
  config: HistoryQueriesConfig;
1890
1892
  historyQueries: HistoryQuery_2[];
1893
+ isEnabled: boolean;
1891
1894
  query: string;
1892
1895
  sessionTimeStampInMs: number;
1893
1896
  }
@@ -1919,6 +1922,9 @@ export const historyQueriesWiring: {
1919
1922
  UserPressedRemoveHistoryQuery: {
1920
1923
  removeHistoryQuery: Wire<HistoryQuery_2>;
1921
1924
  };
1925
+ UserToggledHistoryQueries: {
1926
+ toggleHistoryQueries: Wire<boolean>;
1927
+ };
1922
1928
  };
1923
1929
 
1924
1930
  // @public
@@ -1930,6 +1936,7 @@ export interface HistoryQueriesXEvents {
1930
1936
  UserPressedClearHistoryQueries: void;
1931
1937
  UserPressedRemoveHistoryQuery: HistoryQuery_2;
1932
1938
  UserSelectedAHistoryQuery: HistoryQuery_2;
1939
+ UserToggledHistoryQueries: boolean;
1933
1940
  }
1934
1941
 
1935
1942
  // @public
@@ -4357,6 +4364,9 @@ export interface TimedWireOperatorOptions {
4357
4364
  // @public
4358
4365
  export type TimeSelector = (storeModule: Store<RootXStoreState>) => number;
4359
4366
 
4367
+ // @public
4368
+ export const toggleHistoryQueries: Wire<boolean>;
4369
+
4360
4370
  // @public
4361
4371
  export const toggleRelatedTag: RelatedTagsXStoreModule['actions']['toggleRelatedTag'];
4362
4372
 
@@ -42,5 +42,10 @@ export interface HistoryQueriesXEvents {
42
42
  * * Payload: The {@link @empathyco/x-types#HistoryQuery | history query} selected.
43
43
  */
44
44
  UserSelectedAHistoryQuery: HistoryQuery;
45
+ /**
46
+ * The user has toggled the history queries.
47
+ * * Payload: whether it has been set to enable or disable.
48
+ */
49
+ UserToggledHistoryQueries: boolean;
45
50
  }
46
51
  //# sourceMappingURL=events.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/history-queries/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,uBAAuB,EAAE,YAAY,EAAE,CAAC;IACxC;;;OAGG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,+BAA+B,EAAE,MAAM,CAAC;IACxC;;;OAGG;IACH,4BAA4B,EAAE,YAAY,EAAE,CAAC;IAC7C;;;OAGG;IACH,8BAA8B,EAAE,IAAI,CAAC;IACrC;;;;OAIG;IACH,6BAA6B,EAAE,YAAY,CAAC;IAC5C;;;OAGG;IACH,yBAAyB,EAAE,YAAY,CAAC;CACzC"}
1
+ {"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/history-queries/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,uBAAuB,EAAE,YAAY,EAAE,CAAC;IACxC;;;OAGG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,+BAA+B,EAAE,MAAM,CAAC;IACxC;;;OAGG;IACH,4BAA4B,EAAE,YAAY,EAAE,CAAC;IAC7C;;;OAGG;IACH,8BAA8B,EAAE,IAAI,CAAC;IACrC;;;;OAIG;IACH,6BAA6B,EAAE,YAAY,CAAC;IAC5C;;;OAGG;IACH,yBAAyB,EAAE,YAAY,CAAC;IACxC;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"set-history-queries.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/history-queries/store/actions/set-history-queries.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,mBAAmB,CASxF,CAAC"}
1
+ {"version":3,"file":"set-history-queries.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/history-queries/store/actions/set-history-queries.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAWxF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { HistoryQueriesXStoreModule } from '../types';
2
+ export declare const toggleHistoryQueries: HistoryQueriesXStoreModule['actions']['toggleHistoryQueries'];
3
+ //# sourceMappingURL=toggle-history-queries.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-history-queries.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/history-queries/store/actions/toggle-history-queries.action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAQ5F,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export declare const HISTORY_QUERIES_STORAGE_KEY = "history-queries";
2
2
  export declare const SESSION_TIME_STAMP_STORAGE_KEY = "session-time-stamp";
3
+ export declare const HISTORY_QUERIES_ENABLED_KEY = "history-queries-enabled";
3
4
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,8BAA8B,uBAAuB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,8BAA8B,uBAAuB,CAAC;AACnE,eAAO,MAAM,2BAA2B,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/module.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,0BAmCxC,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/module.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,0BAwCxC,CAAC"}
@@ -26,6 +26,10 @@ export interface HistoryQueriesState extends QueryState {
26
26
  * The current query for searching into the {@link HistoryQueriesState.historyQueries}.
27
27
  */
28
28
  query: string;
29
+ /**
30
+ * Whether the history queries are enabled or disabled.
31
+ */
32
+ isEnabled: boolean;
29
33
  }
30
34
  /**
31
35
  * HistoryQueries store getters.
@@ -75,6 +79,12 @@ export interface HistoryQueriesMutations extends QueryMutations {
75
79
  * @param query - The new {@link HistoryQueriesState.query }.
76
80
  */
77
81
  setQuery(query: string): void;
82
+ /**
83
+ * Sets the {@link HistoryQueriesState.isEnabled } property.
84
+ *
85
+ * @param isEnabled - The new {@link HistoryQueriesState.isEnabled }.
86
+ */
87
+ setIsEnabled(isEnabled: boolean): void;
78
88
  }
79
89
  /**
80
90
  * HistoryQueries store actions.
@@ -156,6 +166,13 @@ export interface HistoryQueriesActions {
156
166
  * @param urlParams - List of params from the url.
157
167
  */
158
168
  setUrlParams(urlParams: UrlParams): void;
169
+ /**
170
+ * Toggles the history queries and stores the state in the browser storage. It also cleans the
171
+ * history queries when disabling them.
172
+ *
173
+ * @param isEnabled - Whether to enable or disable the history queries.
174
+ */
175
+ toggleHistoryQueries(isEnabled: boolean): void;
159
176
  }
160
177
  /**
161
178
  * HistoryQueries type safe store module.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD;;OAEG;IACH,MAAM,EAAE,oBAAoB,CAAC;IAC7B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,qBAAqB,EAAE,YAAY,EAAE,CAAC;IACtC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AACD;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACxD;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AACD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;;OAGG;IACH,oCAAoC,IAAI,IAAI,CAAC;IAC7C;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IACpD;;;;;;OAMG;IACH,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACxD;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1C;AACD;;;;GAIG;AACH,oBAAY,0BAA0B,GAAG,YAAY,CACnD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,2BAA2B,GAAG,cAAc,CACtD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD;;OAEG;IACH,MAAM,EAAE,oBAAoB,CAAC;IAC7B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,qBAAqB,EAAE,YAAY,EAAE,CAAC;IACtC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AACD;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACxD;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC;AACD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;;OAGG;IACH,oCAAoC,IAAI,IAAI,CAAC;IAC7C;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IACpD;;;;;;OAMG;IACH,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACxD;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACzC;;;;;OAKG;IACH,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CAChD;AACD;;;;GAIG;AACH,oBAAY,0BAA0B,GAAG,YAAY,CACnD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,2BAA2B,GAAG,cAAc,CACtD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC"}
@@ -42,6 +42,12 @@ export declare const clearHistoryQueries: import("../..").AnyWire;
42
42
  * @public
43
43
  */
44
44
  export declare const removeHistoryQuery: import("../..").Wire<import("@empathyco/x-types").HistoryQuery>;
45
+ /**
46
+ * Enables or disables history queries.
47
+ *
48
+ * @public
49
+ */
50
+ export declare const toggleHistoryQueries: import("../..").Wire<boolean>;
45
51
  /**
46
52
  * Default wiring for the {@link HistoryQueries} module.
47
53
  *
@@ -73,5 +79,8 @@ export declare const historyQueriesWiring: {
73
79
  UserPressedRemoveHistoryQuery: {
74
80
  removeHistoryQuery: import("../..").Wire<import("@empathyco/x-types").HistoryQuery>;
75
81
  };
82
+ UserToggledHistoryQueries: {
83
+ toggleHistoryQueries: import("../..").Wire<boolean>;
84
+ };
76
85
  };
77
86
  //# sourceMappingURL=wiring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/history-queries/wiring.ts"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8BAAoC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,8BAAyB,CAAC;AAS7D;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,yBAA6B,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,yBAA+C,CAAC;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,wCAAwC,yBAEpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,yBAAwC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iEAAoC,CAAC;AAOpE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/B,CAAC"}
1
+ {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/history-queries/wiring.ts"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8BAAoC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,8BAAyB,CAAC;AAS7D;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,yBAA6B,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,yBAA+C,CAAC;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,wCAAwC,yBAEpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,yBAAwC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iEAAoC,CAAC;AACpE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+BAAuC,CAAC;AAOzE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC/B,CAAC"}