@empathyco/x-components 8.3.0 → 8.4.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 +7 -0
- package/docs/API-reference/api/x-components.md +11 -0
- package/docs/API-reference/api/x-components.reseturlquery.md +13 -0
- package/js/index.js +1 -1
- package/js/x-modules/ai/wiring.js +4 -0
- package/js/x-modules/ai/wiring.js.map +1 -1
- package/js/x-modules/facets/wiring.js +9 -0
- package/js/x-modules/facets/wiring.js.map +1 -1
- package/js/x-modules/next-queries/wiring.js +4 -0
- package/js/x-modules/next-queries/wiring.js.map +1 -1
- package/js/x-modules/query-suggestions/wiring.js +4 -0
- package/js/x-modules/query-suggestions/wiring.js.map +1 -1
- package/js/x-modules/related-prompts/wiring.js +7 -0
- package/js/x-modules/related-prompts/wiring.js.map +1 -1
- package/js/x-modules/related-tags/wiring.js +5 -0
- package/js/x-modules/related-tags/wiring.js.map +1 -1
- package/js/x-modules/search-box/wiring.js +3 -0
- package/js/x-modules/search-box/wiring.js.map +1 -1
- package/js/x-modules/url/wiring.js +8 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +28 -0
- package/report/x-components.api.md +32 -0
- package/types/src/x-modules/ai/wiring.d.ts +4 -0
- package/types/src/x-modules/ai/wiring.d.ts.map +1 -1
- package/types/src/x-modules/facets/wiring.d.ts +3 -0
- package/types/src/x-modules/facets/wiring.d.ts.map +1 -1
- package/types/src/x-modules/next-queries/wiring.d.ts +4 -0
- package/types/src/x-modules/next-queries/wiring.d.ts.map +1 -1
- package/types/src/x-modules/query-suggestions/wiring.d.ts +4 -0
- package/types/src/x-modules/query-suggestions/wiring.d.ts.map +1 -1
- package/types/src/x-modules/related-prompts/wiring.d.ts +5 -0
- package/types/src/x-modules/related-prompts/wiring.d.ts.map +1 -1
- package/types/src/x-modules/related-tags/wiring.d.ts +5 -0
- package/types/src/x-modules/related-tags/wiring.d.ts.map +1 -1
- package/types/src/x-modules/search-box/wiring.d.ts +3 -0
- package/types/src/x-modules/search-box/wiring.d.ts.map +1 -1
- package/types/src/x-modules/url/wiring.d.ts +7 -0
- package/types/src/x-modules/url/wiring.d.ts.map +1 -1
- package/url/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
## [8.4.0](https://github.com/empathyco/x/compare/@empathyco/x-components@8.3.0...@empathyco/x-components@8.4.0) (2026-07-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* reset query field when UserBrowsedToCategory (#2139)
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [8.3.0](https://github.com/empathyco/x/compare/@empathyco/x-components@8.2.0...@empathyco/x-components@8.3.0) (2026-07-15)
|
|
7
14
|
|
|
8
15
|
### Features
|
|
@@ -6357,6 +6357,17 @@ Resets the search state when the request is changed to null. See the [SearchXSto
|
|
|
6357
6357
|
Sets the browseCategory of the url module.
|
|
6358
6358
|
|
|
6359
6359
|
|
|
6360
|
+
</td></tr>
|
|
6361
|
+
<tr><td>
|
|
6362
|
+
|
|
6363
|
+
[resetUrlQuery](./x-components.reseturlquery.md)
|
|
6364
|
+
|
|
6365
|
+
|
|
6366
|
+
</td><td>
|
|
6367
|
+
|
|
6368
|
+
Sets to empathy string the query of the url module.
|
|
6369
|
+
|
|
6370
|
+
|
|
6360
6371
|
</td></tr>
|
|
6361
6372
|
<tr><td>
|
|
6362
6373
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [resetUrlQuery](./x-components.reseturlquery.md)
|
|
4
|
+
|
|
5
|
+
## resetUrlQuery variable
|
|
6
|
+
|
|
7
|
+
Sets to empathy string the query of the url module.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
resetUrlQuery: import("../..").AnyWire
|
|
13
|
+
```
|
package/js/index.js
CHANGED
|
@@ -456,7 +456,7 @@ export { taggingXModule } from './x-modules/tagging/x-module.js';
|
|
|
456
456
|
export { default as UrlHandler } from './x-modules/url/components/url-handler.vue.js';
|
|
457
457
|
export { replaceableParams, urlEmitters } from './x-modules/url/store/emitters.js';
|
|
458
458
|
export { urlXStoreModule } from './x-modules/url/store/module.js';
|
|
459
|
-
export { resetUrlBrowseCategory, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
|
|
459
|
+
export { resetUrlBrowseCategory, resetUrlQuery, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from './x-modules/url/wiring.js';
|
|
460
460
|
export { urlXModule } from './x-modules/url/x-module.js';
|
|
461
461
|
export { default as VendorResultsList } from './x-modules/vendor/components/vendor-results-list.vue.js';
|
|
462
462
|
export { vendorEmitters } from './x-modules/vendor/store/emitters.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import type { ExtractMutationPayload } from '../../store'\nimport type { SearchXEvents } from '../search/events.types'\nimport type { InternalSearchResponse } from '../search/index'\nimport {\n createWiring,\n mapWire,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** AI XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the AI state from URL data. */\nconst setUrlParamsWire = wireDispatch('setUrlParams')\n/** Sets the AI state `params`. */\nconst setExtraParamsWire = wireCommit('setParams')\n\n/** Resets the AI state `query`. */\nconst resetAiQueryWire = wireCommit('setQuery', '')\n\n/** Sets the AI state `query`. */\nconst setAiQueryWire = wireCommit(\n 'setQuery',\n ({ eventPayload: { request } }: { eventPayload: InternalSearchResponse }) => request.query,\n)\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch', true)\n\n/** Sets the AI state `relatedTags`.*/\nconst setAiRelatedTagsWire = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiStateWire = wireCommitWithoutPayload('resetAiState')\n\n/** Sets the origin for the AI requests. */\nconst saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata)\n\n/** Sets the AI state `selectedFilters`. */\nconst setSelectedFiltersWire = wireCommit('setSelectedFilters')\n\n/** Resets the AI state `searchTotalResults`. */\nconst resetSearchTotalResultsWire = wireCommit('setSearchTotalResults', 0)\n\n/** Sets the AI state `searchTotalResults`. */\nconst setSearchTotalResultsWire = wireCommit(\n 'setSearchTotalResults',\n ({ eventPayload }: { eventPayload: { totalResults: number } }) => eventPayload.totalResults,\n)\n\n/** Sets the excluded result IDs from the search results. */\nconst setExcludedResultIdsWire = mapWire<\n SearchXEvents['ResultsChanged'],\n ExtractMutationPayload<'ai', 'setExcludedResultIds'>\n>(wireCommit('setExcludedResultIds'), results => results.map(result => result.id))\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n ExtraParamsChanged: {\n setExtraParamsWire,\n },\n UserClearedQuery: {\n resetAiQueryWire,\n resetSearchTotalResultsWire,\n },\n ResultsChanged: {\n setExcludedResultIdsWire,\n },\n AiSuggestionsRequestUpdated: {\n resetAiStateWire,\n fetchAndSaveAiSuggestionsWire,\n },\n AiSuggestionsSearchRequestUpdated: {\n fetchAndSaveAiSuggestionsSearchWire,\n },\n SelectedRelatedTagsChanged: {\n setAiRelatedTagsWire,\n },\n SelectedFiltersForRequestChanged: {\n setSelectedFiltersWire,\n },\n AiComponentMounted: {\n saveAiOriginWire,\n },\n SearchResponseChanged: {\n setAiQueryWire,\n setSearchTotalResultsWire,\n },\n})\n"],"names":[],"mappings":";;;;AAWA;AACA,MAAM,UAAU,GAAG,IAAI;AACvB;AACA,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AACnD;AACA,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC;AAC/E;AACA,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;AACA,MAAM,gBAAgB,GAAG,YAAY,CAAC,cAAc,CAAC;AACrD;AACA,MAAM,kBAAkB,GAAG,UAAU,CAAC,WAAW,CAAC;AAElD;AACA,MAAM,gBAAgB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC;AAEnD;AACA,MAAM,cAAc,GAAG,UAAU,CAC/B,UAAU,EACV,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAA4C,KAAK,OAAO,CAAC,KAAK,CAC3F;AAED;AACA,MAAM,6BAA6B,GAAG,YAAY,CAAC,2BAA2B,CAAC;AAE/E;AACA,MAAM,mCAAmC,GAAG,YAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC;AAEjG;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AA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import type { ExtractMutationPayload } from '../../store'\nimport type { SearchXEvents } from '../search/events.types'\nimport type { InternalSearchResponse } from '../search/index'\nimport {\n createWiring,\n mapWire,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** AI XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the AI state from URL data. */\nconst setUrlParamsWire = wireDispatch('setUrlParams')\n/** Sets the AI state `params`. */\nconst setExtraParamsWire = wireCommit('setParams')\n\n/** Resets the AI state `query`. */\nconst resetAiQueryWire = wireCommit('setQuery', '')\n\n/** Sets the AI state `query`. */\nconst setAiQueryWire = wireCommit(\n 'setQuery',\n ({ eventPayload: { request } }: { eventPayload: InternalSearchResponse }) => request.query,\n)\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch', true)\n\n/** Sets the AI state `relatedTags`.*/\nconst setAiRelatedTagsWire = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiStateWire = wireCommitWithoutPayload('resetAiState')\n\n/** Sets the origin for the AI requests. */\nconst saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata)\n\n/** Sets the AI state `selectedFilters`. */\nconst setSelectedFiltersWire = wireCommit('setSelectedFilters')\n\n/** Resets the AI state `searchTotalResults`. */\nconst resetSearchTotalResultsWire = wireCommit('setSearchTotalResults', 0)\n\n/** Sets the AI state `searchTotalResults`. */\nconst setSearchTotalResultsWire = wireCommit(\n 'setSearchTotalResults',\n ({ eventPayload }: { eventPayload: { totalResults: number } }) => eventPayload.totalResults,\n)\n\n/** Sets the excluded result IDs from the search results. */\nconst setExcludedResultIdsWire = mapWire<\n SearchXEvents['ResultsChanged'],\n ExtractMutationPayload<'ai', 'setExcludedResultIds'>\n>(wireCommit('setExcludedResultIds'), results => results.map(result => result.id))\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n ExtraParamsChanged: {\n setExtraParamsWire,\n },\n UserClearedQuery: {\n resetAiQueryWire,\n resetSearchTotalResultsWire,\n },\n UserBrowsedToCategory: {\n resetAiQueryWire,\n resetSearchTotalResultsWire,\n },\n ResultsChanged: {\n setExcludedResultIdsWire,\n },\n AiSuggestionsRequestUpdated: {\n resetAiStateWire,\n fetchAndSaveAiSuggestionsWire,\n },\n AiSuggestionsSearchRequestUpdated: {\n fetchAndSaveAiSuggestionsSearchWire,\n },\n SelectedRelatedTagsChanged: {\n setAiRelatedTagsWire,\n },\n SelectedFiltersForRequestChanged: {\n setSelectedFiltersWire,\n },\n AiComponentMounted: {\n saveAiOriginWire,\n },\n SearchResponseChanged: {\n setAiQueryWire,\n setSearchTotalResultsWire,\n },\n})\n"],"names":[],"mappings":";;;;AAWA;AACA,MAAM,UAAU,GAAG,IAAI;AACvB;AACA,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AACnD;AACA,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC;AAC/E;AACA,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;AACA,MAAM,gBAAgB,GAAG,YAAY,CAAC,cAAc,CAAC;AACrD;AACA,MAAM,kBAAkB,GAAG,UAAU,CAAC,WAAW,CAAC;AAElD;AACA,MAA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AAA,cAAc,EAAE;QACd,wBAAwB;AACzB,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,gBAAgB;QAChB,6BAA6B;AAC9B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,mCAAmC;AACpC,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,oBAAoB;AACrB,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,sBAAsB;AACvB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,gBAAgB;AACjB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,cAAc;QACd,yBAAyB;AAC1B,KAAA;AACF,CAAA;;;;"}
|
|
@@ -113,6 +113,12 @@ const selectPreselectedFilterWire = wireFacetsService('selectPreselectedFilters'
|
|
|
113
113
|
* @public
|
|
114
114
|
*/
|
|
115
115
|
const setQuery = wireFacetsService('setQuery');
|
|
116
|
+
/**
|
|
117
|
+
* Clear the facets state `query` .
|
|
118
|
+
*
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
const clearQuery = wireFacetsService('setQuery', '');
|
|
116
122
|
/**
|
|
117
123
|
* Removes all the sticky filters from the state.
|
|
118
124
|
*
|
|
@@ -184,6 +190,9 @@ const facetsWiring = createWiring({
|
|
|
184
190
|
clearAllFiltersButStickyWire,
|
|
185
191
|
setQuery,
|
|
186
192
|
},
|
|
193
|
+
UserBrowsedToCategory: {
|
|
194
|
+
clearQuery,
|
|
195
|
+
},
|
|
187
196
|
UserClickedOpenX: {
|
|
188
197
|
selectPreselectedFilterWire,
|
|
189
198
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/facets/wiring.ts"],"sourcesContent":["import type { Facet } from '@empathyco/x-types'\nimport type { UrlParams } from '../../types/url-params'\nimport type { XEventPayload } from '../../wiring/index'\nimport { createRawFilters } from '../../utils/filters'\nimport { namespacedWireCommit, namespacedWireCommitWithoutPayload } from '../../wiring/index'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultFacetsService } from './service/facets.service'\n\n/**\n * `facets` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'facets'\n\n/**\n * WireCommit for {@link FacetsXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireCommitWithoutPayload for {@link FacetsXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n\n/**\n * Wires factory for {@link DefaultFacetsService}.\n */\nconst wireFacetsService = wireService(DefaultFacetsService.instance)\n\n/**\n * Wires without payload factory for {@link DefaultFacetsService}.\n */\nconst wireFacetsServiceWithoutPayload = wireServiceWithoutPayload(DefaultFacetsService.instance)\n\n/**\n * Saves the facets contained in the `search` group, removing the previous ones, and keeping the\n * previous filters selected state.\n *\n * @public\n */\nconst updateFacetsGroupWithSearchFacetsWire = mapWire(\n wireFacetsService('updateFacets'),\n (facets: Facet[]) => ({\n facets,\n id: 'search',\n }),\n)\n\n/**\n * Saves the facets contained in the group, removing the previous ones, and keeping the new filters\n * selected state.\n *\n * @public\n */\nconst setFacetsGroupWire = wireFacetsService('setFacets')\n\n/**\n * Toggles the selected state of a filter.\n *\n * @public\n */\nconst toggleFilterWire = wireFacetsService('toggle')\n\n/**\n * Deselects all the filters. Optionally, it can accept a list of facets ids as payload, and it will\n * only deselect the filters from those facets.\n *\n * @public\n */\nconst clearFiltersWire = wireFacetsService('clearFilters')\n\n/**\n * Deselects all selected filters.\n *\n * @public\n */\nconst clearAllFiltersWire = wireFacetsServiceWithoutPayload('clearFilters')\n\n/**\n * Deselects all selected filters but keep the sticky ones.\n *\n * @internal\n */\nconst clearAllFiltersButStickyWire = wireFacetsService('clearFiltersWithMetadata', {\n metadata: {\n keepSticky: true,\n },\n})\n\n/**\n * Deselects all selected filters only when oldValue is not empty.\n *\n * @public\n */\nconst clearAllFiltersOnSecondQuery = filter(\n clearAllFiltersButStickyWire,\n ({ metadata }) => !!metadata.oldValue,\n)\n\n/**\n * Selects the filter passed by payload.\n *\n * @public\n */\nconst selectFilterWire = wireFacetsService('select')\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nconst setFiltersFromUrl = mapWire(wireFacetsService('select'), ({ filter }: UrlParams) =>\n createRawFilters(filter),\n)\n\n/**\n * Saves the preselected filters.\n *\n * @public\n */\nconst updatePreselectedFilters = wireFacetsService('updatePreselectedFilters')\n\n/**\n * Selects the preselected filters stored in the state.\n *\n * @public\n */\nconst selectPreselectedFilterWire = wireFacetsService('selectPreselectedFilters')\n\n/**\n * Sets the facets state `query`.\n *\n * @public\n */\nconst setQuery = wireFacetsService('setQuery')\n\n/**\n * Removes all the sticky filters from the state.\n *\n * @internal\n */\nconst clearStickyFilters = filter<XEventPayload<'SearchResponseChanged'>>(\n wireCommitWithoutPayload('clearStickyFilters'),\n ({ eventPayload }) => {\n return eventPayload.totalResults === 0\n },\n)\n\n/**\n * Sets the filters of the facets module from a queryPreview's filters.\n *\n * @public\n */\nexport const setSelectedFiltersFromPreview = wireCommit(\n 'setFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : []),\n)\n\n/**\n * Sets the filters of the facets module from a selectedHistoryQuery's filters.\n *\n * @public\n */\nexport const setFiltersFromHistoryQueries = wireCommit(\n 'setFilters',\n ({ eventPayload: { selectedFilters } }) => selectedFilters ?? [],\n)\n\n/**\n * Sets the query of the facets module from a queryPreview.\n *\n * @public\n */\nexport const setQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Wiring configuration for the {@link FacetsXModule | facets module}.\n *\n * @internal\n */\nexport const facetsWiring = createWiring({\n ParamsLoadedFromUrl: {\n // TODO: move this logic to Facets Service\n clearAllFiltersWire,\n setFiltersFromUrl,\n },\n PreselectedFiltersProvided: {\n updatePreselectedFilters,\n },\n FacetsChanged: {\n updateFacetsGroupWithSearchFacetsWire,\n },\n FacetsGroupProvided: {\n setFacetsGroupWire,\n },\n UserAcceptedAQuery: {\n setQuery,\n },\n FacetsQueryChanged: {\n clearAllFiltersOnSecondQuery,\n },\n UserChangedExtraParams: {\n clearAllFiltersButStickyWire,\n },\n UserClickedAFilter: {\n toggleFilterWire,\n },\n UserClickedClearAllFilters: {\n clearFiltersWire,\n },\n UserModifiedEditableNumberRangeFilter: {\n selectFilterWire,\n },\n UserClickedAllFilter: {\n clearFiltersWire,\n },\n UserClearedQuery: {\n clearAllFiltersButStickyWire,\n setQuery,\n },\n UserClickedOpenX: {\n selectPreselectedFilterWire,\n },\n SearchResponseChanged: {\n clearStickyFilters,\n },\n UserAcceptedAQueryPreview: {\n setQueryFromPreview,\n setSelectedFiltersFromPreview,\n },\n UserSelectedAHistoryQuery: {\n setFiltersFromHistoryQueries,\n },\n})\n"],"names":[],"mappings":";;;;;;;AAUA;;;;AAIG;AACH,MAAM,UAAU,GAAG,QAAQ;AAE3B;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC;AAE/E;;AAEG;AACH,MAAM,iBAAiB,GAAG,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC;AAEpE;;AAEG;AACH,MAAM,+BAA+B,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,QAAQ,CAAC;AAEhG;;;;;AAKG;AACH,MAAM,qCAAqC,GAAG,OAAO,CACnD,iBAAiB,CAAC,cAAc,CAAC,EACjC,CAAC,MAAe,MAAM;IACpB,MAAM;AACN,IAAA,EAAE,EAAE,QAAQ;AACb,CAAA,CAAC,CACH;AAED;;;;;AAKG;AACH,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,WAAW,CAAC;AAEzD;;;;AAIG;AACH,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC;AAE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wiring.ts"],"sourcesContent":["import type { Facet } from '@empathyco/x-types'\nimport type { UrlParams } from '../../types/url-params'\nimport type { XEventPayload } from '../../wiring/index'\nimport { createRawFilters } from '../../utils/filters'\nimport { namespacedWireCommit, namespacedWireCommitWithoutPayload } from '../../wiring/index'\nimport { wireService, wireServiceWithoutPayload } from '../../wiring/wires.factory'\nimport { filter, mapWire } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\nimport { DefaultFacetsService } from './service/facets.service'\n\n/**\n * `facets` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'facets'\n\n/**\n * WireCommit for {@link FacetsXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit(moduleName)\n\n/**\n * WireCommitWithoutPayload for {@link FacetsXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n\n/**\n * Wires factory for {@link DefaultFacetsService}.\n */\nconst wireFacetsService = wireService(DefaultFacetsService.instance)\n\n/**\n * Wires without payload factory for {@link DefaultFacetsService}.\n */\nconst wireFacetsServiceWithoutPayload = wireServiceWithoutPayload(DefaultFacetsService.instance)\n\n/**\n * Saves the facets contained in the `search` group, removing the previous ones, and keeping the\n * previous filters selected state.\n *\n * @public\n */\nconst updateFacetsGroupWithSearchFacetsWire = mapWire(\n wireFacetsService('updateFacets'),\n (facets: Facet[]) => ({\n facets,\n id: 'search',\n }),\n)\n\n/**\n * Saves the facets contained in the group, removing the previous ones, and keeping the new filters\n * selected state.\n *\n * @public\n */\nconst setFacetsGroupWire = wireFacetsService('setFacets')\n\n/**\n * Toggles the selected state of a filter.\n *\n * @public\n */\nconst toggleFilterWire = wireFacetsService('toggle')\n\n/**\n * Deselects all the filters. Optionally, it can accept a list of facets ids as payload, and it will\n * only deselect the filters from those facets.\n *\n * @public\n */\nconst clearFiltersWire = wireFacetsService('clearFilters')\n\n/**\n * Deselects all selected filters.\n *\n * @public\n */\nconst clearAllFiltersWire = wireFacetsServiceWithoutPayload('clearFilters')\n\n/**\n * Deselects all selected filters but keep the sticky ones.\n *\n * @internal\n */\nconst clearAllFiltersButStickyWire = wireFacetsService('clearFiltersWithMetadata', {\n metadata: {\n keepSticky: true,\n },\n})\n\n/**\n * Deselects all selected filters only when oldValue is not empty.\n *\n * @public\n */\nconst clearAllFiltersOnSecondQuery = filter(\n clearAllFiltersButStickyWire,\n ({ metadata }) => !!metadata.oldValue,\n)\n\n/**\n * Selects the filter passed by payload.\n *\n * @public\n */\nconst selectFilterWire = wireFacetsService('select')\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nconst setFiltersFromUrl = mapWire(wireFacetsService('select'), ({ filter }: UrlParams) =>\n createRawFilters(filter),\n)\n\n/**\n * Saves the preselected filters.\n *\n * @public\n */\nconst updatePreselectedFilters = wireFacetsService('updatePreselectedFilters')\n\n/**\n * Selects the preselected filters stored in the state.\n *\n * @public\n */\nconst selectPreselectedFilterWire = wireFacetsService('selectPreselectedFilters')\n\n/**\n * Sets the facets state `query`.\n *\n * @public\n */\nconst setQuery = wireFacetsService('setQuery')\n\n/**\n * Clear the facets state `query` .\n *\n * @public\n */\nconst clearQuery = wireFacetsService('setQuery', '')\n\n/**\n * Removes all the sticky filters from the state.\n *\n * @internal\n */\nconst clearStickyFilters = filter<XEventPayload<'SearchResponseChanged'>>(\n wireCommitWithoutPayload('clearStickyFilters'),\n ({ eventPayload }) => {\n return eventPayload.totalResults === 0\n },\n)\n\n/**\n * Sets the filters of the facets module from a queryPreview's filters.\n *\n * @public\n */\nexport const setSelectedFiltersFromPreview = wireCommit(\n 'setFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : []),\n)\n\n/**\n * Sets the filters of the facets module from a selectedHistoryQuery's filters.\n *\n * @public\n */\nexport const setFiltersFromHistoryQueries = wireCommit(\n 'setFilters',\n ({ eventPayload: { selectedFilters } }) => selectedFilters ?? [],\n)\n\n/**\n * Sets the query of the facets module from a queryPreview.\n *\n * @public\n */\nexport const setQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Wiring configuration for the {@link FacetsXModule | facets module}.\n *\n * @internal\n */\nexport const facetsWiring = createWiring({\n ParamsLoadedFromUrl: {\n // TODO: move this logic to Facets Service\n clearAllFiltersWire,\n setFiltersFromUrl,\n },\n PreselectedFiltersProvided: {\n updatePreselectedFilters,\n },\n FacetsChanged: {\n updateFacetsGroupWithSearchFacetsWire,\n },\n FacetsGroupProvided: {\n setFacetsGroupWire,\n },\n UserAcceptedAQuery: {\n setQuery,\n },\n FacetsQueryChanged: {\n clearAllFiltersOnSecondQuery,\n },\n UserChangedExtraParams: {\n clearAllFiltersButStickyWire,\n },\n UserClickedAFilter: {\n toggleFilterWire,\n },\n UserClickedClearAllFilters: {\n clearFiltersWire,\n },\n UserModifiedEditableNumberRangeFilter: {\n selectFilterWire,\n },\n UserClickedAllFilter: {\n clearFiltersWire,\n },\n UserClearedQuery: {\n clearAllFiltersButStickyWire,\n setQuery,\n },\n UserBrowsedToCategory: {\n clearQuery,\n },\n UserClickedOpenX: {\n selectPreselectedFilterWire,\n },\n SearchResponseChanged: {\n clearStickyFilters,\n },\n UserAcceptedAQueryPreview: {\n setQueryFromPreview,\n setSelectedFiltersFromPreview,\n },\n UserSelectedAHistoryQuery: {\n setFiltersFromHistoryQueries,\n },\n})\n"],"names":[],"mappings":";;;;;;;AAUA;;;;AAIG;AACH,MAAM,UAAU,GAAG,QAAQ;AAE3B;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AAEnD;;;;AAIG;AACH,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC;AAE/E;;AAEG;AACH,MAAM,iBAAiB,GAAG,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC;AAEpE;;AAEG;AACH,MAAM,+BAA+B,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,QAAQ,CAAC;AAEhG;;;;;AAKG;AACH,M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AA;AACD,IAAA,gBAAgB,EAAE;QAChB,4BAA4B;QAC5B,QAAQ;AACT,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,UAAU;AACX,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,2BAA2B;AAC5B,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,kBAAkB;AACnB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,mBAAmB;QACnB,6BAA6B;AAC9B,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,4BAA4B;AAC7B,KAAA;AACF,CAAA;;;;"}
|
|
@@ -126,6 +126,10 @@ const nextQueriesWiring = createWiring({
|
|
|
126
126
|
resetNextQueriesWire,
|
|
127
127
|
resetNextQueriesQuery,
|
|
128
128
|
},
|
|
129
|
+
UserBrowsedToCategory: {
|
|
130
|
+
resetNextQueriesWire,
|
|
131
|
+
resetNextQueriesQuery,
|
|
132
|
+
},
|
|
129
133
|
SelectedRelatedTagsChanged: {
|
|
130
134
|
setNextQueriesRelatedTags,
|
|
131
135
|
},
|
|
@@ -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 * Reset the next queries state `query`.\n *\n * @public\n */\nexport const resetNextQueriesQuery = 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 UserClearedQuery: {\n resetNextQueriesWire,\n resetNextQueriesQuery,\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;AACI,MAAM,qBAAqB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE;AAE9D;;;;AAIG;MACU,yBAAyB,GAAG,UAAU,CAAC,gBAAgB;AA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AgC;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 * Reset the next queries state `query`.\n *\n * @public\n */\nexport const resetNextQueriesQuery = 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 UserClearedQuery: {\n resetNextQueriesWire,\n resetNextQueriesQuery,\n },\n UserBrowsedToCategory: {\n resetNextQueriesWire,\n resetNextQueriesQuery,\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;AACI,MAAM,qBAAqB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE;AAE9D;;;;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;A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ggestionsWiring = createWiring({
|
|
|
103
103
|
clearQuerySuggestionsQuery,
|
|
104
104
|
cancelFetchAndSaveSuggestionsWire,
|
|
105
105
|
},
|
|
106
|
+
UserBrowsedToCategory: {
|
|
107
|
+
clearQuerySuggestionsQuery,
|
|
108
|
+
cancelFetchAndSaveSuggestionsWire,
|
|
109
|
+
},
|
|
106
110
|
QuerySuggestionsRequestUpdated: {
|
|
107
111
|
fetchAndSaveSuggestionsWire,
|
|
108
112
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/query-suggestions/wiring.ts"],"sourcesContent":["import type { NamespacedWireCommit } from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `querySuggestions` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'querySuggestions'\n\n/**\n * WireCommit for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatchWithoutPayload for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/**\n * WireDispatch for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the query-suggestions module query.\n *\n * @public\n */\nexport const setQuerySuggestionsQuery = wireCommit('setQuery')\n\n/**\n * Sets the query-suggestions module query from a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setQuerySuggestionsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the query-suggestions module params from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setQuerySuggestionsExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the query suggestions state `params`.\n *\n * @public\n */\nexport const setQuerySuggestionsExtraParams = wireCommit('setParams')\n\n/**\n * Sets the query suggestions state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueriesInSuggestions = wireCommit('setSearchedQueries')\n\n/**\n * Clears the query-suggestions module query.\n *\n * @public\n */\nexport const clearQuerySuggestionsQuery = wireCommit('setQuery', '')\n\n/**\n * Sets the query-suggestions state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Requests and stores a new set of query suggestions for the query.\n *\n * @public\n */\nexport const fetchAndSaveSuggestionsWire = wireDispatch('fetchAndSaveSuggestions')\n\n/**\n * Cancels the {@link QuerySuggestionsActions.fetchAndSaveSuggestions} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSuggestionsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSuggestions',\n)\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * QuerySuggestions wiring.\n *\n * @internal\n */\nexport const querySuggestionsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n UserIsTypingAQuery: {\n setQuerySuggestionsQueryDebounce: moduleDebounce(\n setQuerySuggestionsQuery,\n ({ state }) => state.config.debounceInMs,\n { cancelOn: 'UserAcceptedAQuery' },\n ),\n },\n UserAcceptedAQuery: {\n setQuerySuggestionsQuery,\n },\n UserClearedQuery: {\n clearQuerySuggestionsQuery,\n cancelFetchAndSaveSuggestionsWire,\n },\n QuerySuggestionsRequestUpdated: {\n fetchAndSaveSuggestionsWire,\n },\n ExtraParamsChanged: {\n setQuerySuggestionsExtraParams,\n },\n UserClickedCloseX: {\n clearQuerySuggestionsQuery,\n },\n UserClickedOutOfMainModal: {\n clearQuerySuggestionsQuery,\n },\n UserAcceptedAQueryPreview: {\n setQuerySuggestionsQueryFromPreview,\n setQuerySuggestionsExtraParamsFromPreview,\n },\n QueryPreviewUnselected: {\n setQuerySuggestionsExtraParams,\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueriesInSuggestions,\n },\n})\n"],"names":[],"mappings":";;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,kBAAkB;AAErC;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;;;AAIG;AACH,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC;AAEnF;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;;;AAIG;MACU,wBAAwB,GAAG,UAAU,CAAC,UAAU;AAE7D;;;;AAIG;MACU,mCAAmC,GAAG,UAAU,CAC3D,UAAU,EACV,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK;AAGxC;;;;AAIG;MACU,yCAAyC,GAAG,UAAU,CACjE,WAAW,EACX,CAAC,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,WAAW;AAGpD;;;;AAIG;MACU,8BAA8B,GAAG,UAAU,CAAC,WAAW;AAEpE;;;;AAIG;MACU,+BAA+B,GAAG,UAAU,CAAC,oBAAoB;AAE9E;;;;AAIG;AACI,MAAM,0BAA0B,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE;AAEnE;;;;AAIG;AACH,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC;AAEjD;;;;AAIG;MACU,2BAA2B,GAAG,YAAY,CAAC,yBAAyB;AAEjF;;;;AAIG;MACU,iCAAiC,GAAG,0BAA0B,CACzE,+BAA+B;AAGjC;;AAEG;AACH,MAAM,cAAc,GAAG,kBAAkB,CAAC,UAAU,CAAC;AAErD;;;;AAIG;AACI,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACjD,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,gCAAgC,EAAE,cAAc,CAC9C,wBAAwB,EACxB,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC,YAAY,EACxC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CACnC;AACF,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,wBAAwB;AACzB,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,0BAA0B;QAC1B,iCAAiC;AAClC,KAAA;AACD,IAAA,8BAA8B,EAAE;QAC9B,2BAA2B;AAC5B,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,8BAA8B;AAC/B,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,0BAA0B;AAC3B,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,0BAA0B;AAC3B,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,mCAAmC;QACnC,yCAAyC;AAC1C,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,8BAA8B;AAC/B,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,+BAA+B;AAChC,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/query-suggestions/wiring.ts"],"sourcesContent":["import type { NamespacedWireCommit } from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { namespacedDebounce } from '../../wiring/namespaced-wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `querySuggestions` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'querySuggestions'\n\n/**\n * WireCommit for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatchWithoutPayload for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/**\n * WireDispatch for {@link QuerySuggestionsXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the query-suggestions module query.\n *\n * @public\n */\nexport const setQuerySuggestionsQuery = wireCommit('setQuery')\n\n/**\n * Sets the query-suggestions module query from a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setQuerySuggestionsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the query-suggestions module params from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setQuerySuggestionsExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the query suggestions state `params`.\n *\n * @public\n */\nexport const setQuerySuggestionsExtraParams = wireCommit('setParams')\n\n/**\n * Sets the query suggestions state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueriesInSuggestions = wireCommit('setSearchedQueries')\n\n/**\n * Clears the query-suggestions module query.\n *\n * @public\n */\nexport const clearQuerySuggestionsQuery = wireCommit('setQuery', '')\n\n/**\n * Sets the query-suggestions state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Requests and stores a new set of query suggestions for the query.\n *\n * @public\n */\nexport const fetchAndSaveSuggestionsWire = wireDispatch('fetchAndSaveSuggestions')\n\n/**\n * Cancels the {@link QuerySuggestionsActions.fetchAndSaveSuggestions} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveSuggestionsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveSuggestions',\n)\n\n/**\n * Debounce function for the module.\n */\nconst moduleDebounce = namespacedDebounce(moduleName)\n\n/**\n * QuerySuggestions wiring.\n *\n * @internal\n */\nexport const querySuggestionsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n UserIsTypingAQuery: {\n setQuerySuggestionsQueryDebounce: moduleDebounce(\n setQuerySuggestionsQuery,\n ({ state }) => state.config.debounceInMs,\n { cancelOn: 'UserAcceptedAQuery' },\n ),\n },\n UserAcceptedAQuery: {\n setQuerySuggestionsQuery,\n },\n UserClearedQuery: {\n clearQuerySuggestionsQuery,\n cancelFetchAndSaveSuggestionsWire,\n },\n UserBrowsedToCategory: {\n clearQuerySuggestionsQuery,\n cancelFetchAndSaveSuggestionsWire,\n },\n QuerySuggestionsRequestUpdated: {\n fetchAndSaveSuggestionsWire,\n },\n ExtraParamsChanged: {\n setQuerySuggestionsExtraParams,\n },\n UserClickedCloseX: {\n clearQuerySuggestionsQuery,\n },\n UserClickedOutOfMainModal: {\n clearQuerySuggestionsQuery,\n },\n UserAcceptedAQueryPreview: {\n setQuerySuggestionsQueryFromPreview,\n setQuerySuggestionsExtraParamsFromPreview,\n },\n QueryPreviewUnselected: {\n setQuerySuggestionsExtraParams,\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueriesInSuggestions,\n },\n})\n"],"names":[],"mappings":";;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,kBAAkB;AAErC;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;;;AAIG;AACH,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC;AAEnF;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;;;AAIG;MACU,wBAAwB,GAAG,UAAU,CAAC,UAAU;AAE7D;;;;AAIG;MACU,mCAAmC,GAAG,UAAU,CAC3D,UAAU,EACV,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK;AAGxC;;;;AAIG;MACU,yCAAyC,GAAG,UAAU,CACjE,WAAW,EACX,CAAC,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,WAA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B,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,+BAA+B;AAChC,KAAA;AACF,CAAA;;;;"}
|
|
@@ -18,6 +18,8 @@ const setUrlParams = wireDispatch('setUrlParams');
|
|
|
18
18
|
const setExtraParams = wireCommit('setParams');
|
|
19
19
|
/** Sets the related prompts state `query`. */
|
|
20
20
|
const setRelatedPromptsQuery = wireCommit('setQuery');
|
|
21
|
+
/** Sets the related prompts state `query` to a empty string. */
|
|
22
|
+
const resetRelatedPromptsQuery = wireCommit('setQuery', '');
|
|
21
23
|
/** Sets the related prompts state `query` from the payload. */
|
|
22
24
|
const setRelatedPromptsQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query);
|
|
23
25
|
/** Sets the related prompts state `selectedQuery`. */
|
|
@@ -61,6 +63,11 @@ const relatedPromptsWiring = createWiring({
|
|
|
61
63
|
resetRelatedPromptsState,
|
|
62
64
|
setRelatedPromptsQuery,
|
|
63
65
|
},
|
|
66
|
+
UserBrowsedToCategory: {
|
|
67
|
+
cancelFetchAndSaveRelatedPrompts,
|
|
68
|
+
resetRelatedPromptsState,
|
|
69
|
+
resetRelatedPromptsQuery,
|
|
70
|
+
},
|
|
64
71
|
RelatedPromptsRequestUpdated: {
|
|
65
72
|
fetchAndSaveRelatedPrompts,
|
|
66
73
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-prompts/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { filter } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/** `relatedPrompts` XModule name. */\nconst moduleName = 'relatedPrompts'\n/** WireCommit for RelatedPromptsXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for RelatedPromptsXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for RelatedPromptsXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n/** WireDispatchWithoutPayload for RelatedPromptsXModule. */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/** Sets the related prompts state from URL data. */\nconst setUrlParams = wireDispatch('setUrlParams')\n/** Sets the related prompts state `params`. */\nconst setExtraParams = wireCommit('setParams')\n\n/** Sets the related prompts state `query`. */\nconst setRelatedPromptsQuery = wireCommit('setQuery')\n/** Sets the related prompts state `query` from the payload. */\nconst setRelatedPromptsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n/** Sets the related prompts state `selectedQuery`. */\nconst setRelatedPromptQuery = wireCommit('setSelectedQuery')\n/** Sets the related prompts state `selectedPrompt`. */\nconst setRelatedPrompt = wireCommit('setSelectedPrompt')\n/** Sets the related prompts state `relatedTags`.*/\nconst setRelatedPromptsRelatedTags = wireCommit('setRelatedPromptsRelatedTags')\n/** Fetches and saves the related prompts response. */\nconst fetchAndSaveRelatedPrompts = wireDispatch('fetchAndSaveRelatedPrompts')\n/** Fetches the same request and saves the related prompts response. */\nconst reloadRelatedPromptsRequestWire = wireDispatch(\n 'fetchAndSaveRelatedPrompts',\n ({ getters }) => getters.request,\n)\n/** Cancels the fetch and save related prompts response. */\nconst cancelFetchAndSaveRelatedPrompts = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedPrompts',\n)\n\n/** Resets the related prompts state. */\nconst resetRelatedPromptsState = wireCommitWithoutPayload('resetRelatedPromptsState')\n/** Resets the selected related prompt number. */\nconst resetRelatedPrompt = wireCommitWithoutPayload('resetSelectedPrompt')\n\n/**\n * Wiring configuration for the {@link RelatedPromptsXModule | related prompts module}.\n *\n * @internal\n */\nexport const relatedPromptsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n ExtraParamsChanged: {\n setExtraParams,\n },\n UserAcceptedAQuery: {\n setRelatedPromptsQuery,\n resetRelatedPrompt,\n },\n UserAcceptedAQueryPreview: {\n setRelatedPromptsQueryFromPreview,\n resetRelatedPrompt,\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedPrompts,\n resetRelatedPromptsState,\n setRelatedPromptsQuery,\n },\n RelatedPromptsRequestUpdated: {\n fetchAndSaveRelatedPrompts,\n },\n UserSelectedARelatedPrompt: {\n setRelatedPrompt,\n },\n UserSelectedARelatedPromptQuery: {\n setRelatedPromptQuery,\n },\n SearchRequestChanged: {\n resetRelatedPrompt: filter(\n resetRelatedPrompt,\n // Avoid reset selected prompt just after restored from URL with ParamsLoadedFromUrl event\n ({ store }) => store.state.x.search.origin !== 'url:external',\n ),\n },\n SelectedRelatedTagsChanged: {\n setRelatedPromptsRelatedTags,\n },\n ReloadRelatedPromptsRequested: {\n resetRelatedPromptsState,\n reloadRelatedPromptsRequestWire,\n },\n})\n"],"names":[],"mappings":";;;;AASA;AACA,MAAM,UAAU,GAAG,gBAAgB;AACnC;AACA,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC;AACnD;AACA,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC;AAC/E;AACA,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AACvD;AACA,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC;AAEnF;AACA,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC;AACjD;AACA,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;AAE9C;AACA,MAAM,sBAAsB,GAAG,UAAU,CAAC,UAAU,CAAC;AACrD;AACA,MAAM,iCAAiC,GAAG,UAAU,CAClD,UAAU,EACV,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,CACvC;AACD;AACA,MAAM,qBAAqB,GAAG,UAAU,CAAC,kBAAkB,CAAC;AAC5D;AACA,MAAM,gBAAgB,G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,EAAE;QAC7B,wBAAwB;QACxB,+BAA+B;AAChC,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-prompts/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { filter } from '../../wiring/wires.operators'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/** `relatedPrompts` XModule name. */\nconst moduleName = 'relatedPrompts'\n/** WireCommit for RelatedPromptsXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for RelatedPromptsXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for RelatedPromptsXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n/** WireDispatchWithoutPayload for RelatedPromptsXModule. */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/** Sets the related prompts state from URL data. */\nconst setUrlParams = wireDispatch('setUrlParams')\n/** Sets the related prompts state `params`. */\nconst setExtraParams = wireCommit('setParams')\n\n/** Sets the related prompts state `query`. */\nconst setRelatedPromptsQuery = wireCommit('setQuery')\n/** Sets the related prompts state `query` to a empty string. */\nconst resetRelatedPromptsQuery = wireCommit('setQuery', '')\n/** Sets the related prompts state `query` from the payload. */\nconst setRelatedPromptsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n/** Sets the related prompts state `selectedQuery`. */\nconst setRelatedPromptQuery = wireCommit('setSelectedQuery')\n/** Sets the related prompts state `selectedPrompt`. */\nconst setRelatedPrompt = wireCommit('setSelectedPrompt')\n/** Sets the related prompts state `relatedTags`.*/\nconst setRelatedPromptsRelatedTags = wireCommit('setRelatedPromptsRelatedTags')\n/** Fetches and saves the related prompts response. */\nconst fetchAndSaveRelatedPrompts = wireDispatch('fetchAndSaveRelatedPrompts')\n/** Fetches the same request and saves the related prompts response. */\nconst reloadRelatedPromptsRequestWire = wireDispatch(\n 'fetchAndSaveRelatedPrompts',\n ({ getters }) => getters.request,\n)\n/** Cancels the fetch and save related prompts response. */\nconst cancelFetchAndSaveRelatedPrompts = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedPrompts',\n)\n\n/** Resets the related prompts state. */\nconst resetRelatedPromptsState = wireCommitWithoutPayload('resetRelatedPromptsState')\n/** Resets the selected related prompt number. */\nconst resetRelatedPrompt = wireCommitWithoutPayload('resetSelectedPrompt')\n\n/**\n * Wiring configuration for the {@link RelatedPromptsXModule | related prompts module}.\n *\n * @internal\n */\nexport const relatedPromptsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n ExtraParamsChanged: {\n setExtraParams,\n },\n UserAcceptedAQuery: {\n setRelatedPromptsQuery,\n resetRelatedPrompt,\n },\n UserAcceptedAQueryPreview: {\n setRelatedPromptsQueryFromPreview,\n resetRelatedPrompt,\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedPrompts,\n resetRelatedPromptsState,\n setRelatedPromptsQuery,\n },\n UserBrowsedToCategory: {\n cancelFetchAndSaveRelatedPrompts,\n resetRelatedPromptsState,\n resetRelatedPromptsQuery,\n },\n RelatedPromptsRequestUpdated: {\n fetchAndSaveRelatedPrompts,\n },\n UserSelectedARelatedPrompt: {\n setRelatedPrompt,\n },\n UserSelectedARelatedPromptQuery: {\n setRelatedPromptQuery,\n },\n SearchRequestChanged: {\n resetRelatedPrompt: filter(\n resetRelatedPrompt,\n // Avoid reset selected prompt just after restored from URL with ParamsLoadedFromUrl event\n ({ store }) => store.state.x.search.origin !== 'url:external',\n ),\n },\n SelectedRelatedTagsChanged: {\n setRelatedPromptsRelatedTags,\n },\n ReloadRelatedPromptsRequested: {\n resetRelatedPromptsState,\n reloadRelatedPromptsRequestWire,\n },\n})\n"],"names":[],"mappings":";;;;AASA;AACA,MAAM,UAA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AAA,kBAAkB,EAAE;QAClB,cAAc;AACf,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,kBAAkB;AACnB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,iCAAiC;QACjC,kBAAkB;AACnB,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,gCAAgC;QAChC,wBAAwB;QACxB,sBAAsB;AACvB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,gCAAgC;QAChC,wBAAwB;QACxB,wBAAwB;AACzB,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,0BAA0B;AAC3B,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,gBAAgB;AACjB,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,qBAAqB;AACtB,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,kBAAkB,EAAE,MAAM,CACxB,kBAAkB;;AAElB,QAAA,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,cAAc,CAC9D;AACF,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,4BAA4B;AAC7B,KAAA;AACD,IAAA,6BAA6B,EAAE;QAC7B,wBAAwB;QACxB,+BAA+B;AAChC,KAAA;AACF,CAAA;;;;"}
|
|
@@ -112,6 +112,11 @@ const relatedTagsWiring = createWiring({
|
|
|
112
112
|
clearRelatedTagsQuery,
|
|
113
113
|
clearSelectedRelatedTags,
|
|
114
114
|
},
|
|
115
|
+
UserBrowsedToCategory: {
|
|
116
|
+
cancelFetchAndSaveRelatedTagsWire,
|
|
117
|
+
clearRelatedTagsQuery,
|
|
118
|
+
clearSelectedRelatedTags,
|
|
119
|
+
},
|
|
115
120
|
ExtraParamsChanged: {
|
|
116
121
|
setRelatedTagsExtraParams,
|
|
117
122
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-tags/wiring.ts"],"sourcesContent":["import type {\n NamespacedWireCommit,\n NamespacedWireDispatch,\n} from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `relatedTags` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'relatedTags'\n/**\n * WireCommit for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n/**\n * WireDispatch for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName)\n/**\n * WireDispatchWithoutPayload for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/**\n * Sets the related tags state `query`.\n *\n * @public\n */\nexport const setRelatedTagsQuery = wireCommit('setQuery')\n\n/**\n * Sets the related tags state `query` from a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setRelatedTagsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the related tags state `params` from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setRelatedTagsExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the related tags state `params`.\n *\n * @public\n */\nexport const setRelatedTagsExtraParams = wireCommit('setParams')\n\n/**\n * Requests and stores the related tags.\n *\n * @public\n */\nexport const fetchAndSaveRelatedTagsWire = wireDispatch('fetchAndSaveRelatedTags')\n\n/**\n * Cancels the {@link RelatedTagsActions.fetchAndSaveRelatedTags} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveRelatedTagsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedTags',\n)\n\n/**\n * Sets the selected related tags.\n *\n * @public\n */\nexport const toggleRelatedTagWire = wireDispatch('toggleRelatedTag')\n\n/**\n * Clear the selected related tags.\n *\n * @public\n */\nexport const clearSelectedRelatedTags = wireCommit('setSelectedRelatedTags', [])\n\n/**\n * Clear the related tags query.\n *\n * @public\n */\nexport const clearRelatedTagsQuery = wireCommit('setQuery', '')\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nexport const setUrlParamsWire = wireDispatch('setUrlParams')\n\n/**\n * Wiring configuration for the {@link RelatedTagsXModule | related tags module}.\n *\n * @internal\n */\nexport const relatedTagsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n UserAcceptedAQuery: {\n setRelatedTagsQuery,\n clearSelectedRelatedTags,\n },\n UserPickedARelatedTag: {\n toggleRelatedTagWire,\n },\n UserChangedExtraParams: {\n clearSelectedRelatedTags,\n },\n RelatedTagsRequestUpdated: {\n fetchAndSaveRelatedTagsWire,\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedTagsWire,\n clearRelatedTagsQuery,\n clearSelectedRelatedTags,\n },\n ExtraParamsChanged: {\n setRelatedTagsExtraParams,\n },\n UserClickedCloseX: {\n clearRelatedTagsQuery,\n },\n UserClickedOutOfMainModal: {\n clearRelatedTagsQuery,\n },\n UserAcceptedAQueryPreview: {\n setRelatedTagsQueryFromPreview,\n clearSelectedRelatedTags,\n setRelatedTagsExtraParamsFromPreview,\n },\n QueryPreviewUnselected: {\n setRelatedTagsExtraParams,\n },\n})\n"],"names":[],"mappings":";;;AAWA;;;;AAIG;AACH,MAAM,UAAU,GAAG,aAAa;AAChC;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAC5F;;;;AAIG;AACH,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC;AAClG;;;;AAIG;AACH,MAAM,0BAA0B,GAAG,oCAAoC,CAAC,UAAU,CAAC;AAEnF;;;;AA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,yBAAyB,EAAE;QACzB,qBAAqB;AACtB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,8BAA8B;QAC9B,wBAAwB;QACxB,oCAAoC;AACrC,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,yBAAyB;AAC1B,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/related-tags/wiring.ts"],"sourcesContent":["import type {\n NamespacedWireCommit,\n NamespacedWireDispatch,\n} from '../../wiring/namespaced-wiring.types'\nimport {\n namespacedWireCommit,\n namespacedWireDispatch,\n namespacedWireDispatchWithoutPayload,\n} from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `relatedTags` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'relatedTags'\n/**\n * WireCommit for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n/**\n * WireDispatch for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName)\n/**\n * WireDispatchWithoutPayload for {@link RelatedTagsXModule}.\n *\n * @internal\n */\nconst wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleName)\n\n/**\n * Sets the related tags state `query`.\n *\n * @public\n */\nexport const setRelatedTagsQuery = wireCommit('setQuery')\n\n/**\n * Sets the related tags state `query` from a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setRelatedTagsQueryFromPreview = wireCommit(\n 'setQuery',\n ({ eventPayload: { query } }) => query,\n)\n\n/**\n * Sets the related tags state `params` from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setRelatedTagsExtraParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the related tags state `params`.\n *\n * @public\n */\nexport const setRelatedTagsExtraParams = wireCommit('setParams')\n\n/**\n * Requests and stores the related tags.\n *\n * @public\n */\nexport const fetchAndSaveRelatedTagsWire = wireDispatch('fetchAndSaveRelatedTags')\n\n/**\n * Cancels the {@link RelatedTagsActions.fetchAndSaveRelatedTags} request promise.\n *\n * @public\n */\nexport const cancelFetchAndSaveRelatedTagsWire = wireDispatchWithoutPayload(\n 'cancelFetchAndSaveRelatedTags',\n)\n\n/**\n * Sets the selected related tags.\n *\n * @public\n */\nexport const toggleRelatedTagWire = wireDispatch('toggleRelatedTag')\n\n/**\n * Clear the selected related tags.\n *\n * @public\n */\nexport const clearSelectedRelatedTags = wireCommit('setSelectedRelatedTags', [])\n\n/**\n * Clear the related tags query.\n *\n * @public\n */\nexport const clearRelatedTagsQuery = wireCommit('setQuery', '')\n\n/**\n * Saves the params from the url.\n *\n * @public\n */\nexport const setUrlParamsWire = wireDispatch('setUrlParams')\n\n/**\n * Wiring configuration for the {@link RelatedTagsXModule | related tags module}.\n *\n * @internal\n */\nexport const relatedTagsWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n UserAcceptedAQuery: {\n setRelatedTagsQuery,\n clearSelectedRelatedTags,\n },\n UserPickedARelatedTag: {\n toggleRelatedTagWire,\n },\n UserChangedExtraParams: {\n clearSelectedRelatedTags,\n },\n RelatedTagsRequestUpdated: {\n fetchAndSaveRelatedTagsWire,\n },\n UserClearedQuery: {\n cancelFetchAndSaveRelatedTagsWire,\n clearRelatedTagsQuery,\n clearSelectedRelatedTags,\n },\n UserBrowsedToCategory: {\n cancelFetchAndSaveRelatedTagsWire,\n clearRelatedTagsQuery,\n clearSelectedRelatedTags,\n },\n ExtraParamsChanged: {\n setRelatedTagsExtraParams,\n },\n UserClickedCloseX: {\n clearRelatedTagsQuery,\n },\n UserClickedOutOfMainModal: {\n clearRelatedTagsQuery,\n },\n UserAcceptedAQueryPreview: {\n setRelatedTagsQueryFromPreview,\n clearSelectedRelatedTags,\n setRelatedTagsExtraParamsFromP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AAE;QACrB,oBAAoB;AACrB,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,wBAAwB;AACzB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,2BAA2B;AAC5B,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,iCAAiC;QACjC,qBAAqB;QACrB,wBAAwB;AACzB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,iCAAiC;QACjC,qBAAqB;QACrB,wBAAwB;AACzB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,yBAAyB;AAC1B,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,qBAAqB;AACtB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,qBAAqB;AACtB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,8BAA8B;QAC9B,wBAAwB;QACxB,oCAAoC;AACrC,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,yBAAyB;AAC1B,KAAA;AACF,CAAA;;;;"}
|
|
@@ -91,6 +91,9 @@ const searchBoxWiring = createWiring({
|
|
|
91
91
|
UserClearedQuery: {
|
|
92
92
|
transitionState: setInputStatus('UserClearedQuery'),
|
|
93
93
|
},
|
|
94
|
+
UserBrowsedToCategory: {
|
|
95
|
+
transitionState: setInputStatus('UserClearedQuery'),
|
|
96
|
+
},
|
|
94
97
|
UserFocusedSearchBox: {
|
|
95
98
|
transitionState: setInputStatus('UserFocusedSearchBox'),
|
|
96
99
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search-box/wiring.ts"],"sourcesContent":["import type { XEvent } from '../../wiring/events.types'\nimport type { NamespacedWireCommit } from '../../wiring/namespaced-wiring.types'\nimport type { AnyWire } from '../../wiring/wiring.types'\nimport { filter } from '../../wiring/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `searchBox` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'searchBox'\n\n/**\n * WireCommit for {@link SearchBoxXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link SearchBoxXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the query of the search-box module.\n *\n * @public\n */\nconst setSearchBoxQuery = wireCommit('setQuery')\n\n/**\n * Sets the search state `query` with the selectedQueryPreview's query.\n *\n * @public\n */\nconst setSearchBoxQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Clears the query of the search-box module.\n *\n * @public\n */\nconst clearSearchBoxQuery = wireCommit('setQuery', '')\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the search state `status`.\n *\n * @param event - The {@link XEvent} used to transition the status.\n *\n * @returns A wire.\n *\n * @public\n */\nconst setInputStatus = (event: XEvent): AnyWire => wireDispatch('setInputStatus', event)\n\n/**\n * SearchBox wiring.\n *\n * @internal\n */\nexport const searchBoxWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n transitionState: filter(setInputStatus('UserAcceptedAQuery'), ({ eventPayload: urlParams }) => {\n // eslint-disable-next-line ts/no-unsafe-member-access\n return !!urlParams.query\n }),\n },\n UserIsTypingAQuery: {\n setSearchBoxQuery,\n transitionState: setInputStatus('UserIsTypingAQuery'),\n },\n UserAcceptedAQuery: {\n setSearchBoxQuery,\n transitionState: setInputStatus('UserAcceptedAQuery'),\n },\n UserAcceptedAQueryPreview: {\n setSearchBoxQueryFromPreview,\n transitionState: setInputStatus('UserAcceptedAQuery'),\n },\n UserPressedClearSearchBoxButton: {\n clearSearchBoxQuery,\n },\n UserClickedCloseX: {\n clearSearchBoxQuery,\n },\n UserClickedOutOfMainModal: {\n clearSearchBoxQuery,\n },\n UserClearedQuery: {\n transitionState: setInputStatus('UserClearedQuery'),\n },\n UserFocusedSearchBox: {\n transitionState: setInputStatus('UserFocusedSearchBox'),\n },\n UserBlurredSearchBox: {\n transitionState: setInputStatus('UserBlurredSearchBox'),\n },\n})\n"],"names":[],"mappings":";;;;AAOA;;;;AAIG;AACH,MAAM,UAAU,GAAG,WAAW;AAE9B;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC;AAEvD;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC;AAEhD;;;;AAIG;AACH,MAAM,4BAA4B,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,CAAC;AAEnG;;;;AAIG;AACH,MAAM,mBAAmB,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC;AAEtD;;;;AAIG;AACH,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC;AAEjD;;;;;;;;AAQG;AACH,MAAM,cAAc,GAAG,CAAC,KAAa,KAAc,YAAY,CAAC,gBAAgB,EAAE,KAAK,CAAC;AAExF;;;;AAIG;AACI,MAAM,eAAe,GAAG,YAAY,CAAC;AAC1C,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACZ,QAAA,eAAe,EAAE,MAAM,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,KAAI;;AAE5F,YAAA,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK;AAC1B,QAAA,CAAC,CAAC;AACH,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,iBAAiB;AACjB,QAAA,eAAe,EAAE,cAAc,CAAC,oBAAoB,CAAC;AACtD,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,iBAAiB;AACjB,QAAA,eAAe,EAAE,cAAc,CAAC,oBAAoB,CAAC;AACtD,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,4BAA4B;AAC5B,QAAA,eAAe,EAAE,cAAc,CAAC,oBAAoB,CAAC;AACtD,KAAA;AACD,IAAA,+BAA+B,EAAE;QAC/B,mBAAmB;AACpB,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,mBAAmB;AACpB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,mBAAmB;AACpB,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAAC;AACpD,KAAA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAAC;AACxD,KAAA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAAC;AACxD,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/search-box/wiring.ts"],"sourcesContent":["import type { XEvent } from '../../wiring/events.types'\nimport type { NamespacedWireCommit } from '../../wiring/namespaced-wiring.types'\nimport type { AnyWire } from '../../wiring/wiring.types'\nimport { filter } from '../../wiring/index'\nimport { namespacedWireCommit, namespacedWireDispatch } from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * `searchBox` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'searchBox'\n\n/**\n * WireCommit for {@link SearchBoxXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName)\n\n/**\n * WireDispatch for {@link SearchBoxXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/**\n * Sets the query of the search-box module.\n *\n * @public\n */\nconst setSearchBoxQuery = wireCommit('setQuery')\n\n/**\n * Sets the search state `query` with the selectedQueryPreview's query.\n *\n * @public\n */\nconst setSearchBoxQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Clears the query of the search-box module.\n *\n * @public\n */\nconst clearSearchBoxQuery = wireCommit('setQuery', '')\n\n/**\n * Sets the search state `query`.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the search state `status`.\n *\n * @param event - The {@link XEvent} used to transition the status.\n *\n * @returns A wire.\n *\n * @public\n */\nconst setInputStatus = (event: XEvent): AnyWire => wireDispatch('setInputStatus', event)\n\n/**\n * SearchBox wiring.\n *\n * @internal\n */\nexport const searchBoxWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n transitionState: filter(setInputStatus('UserAcceptedAQuery'), ({ eventPayload: urlParams }) => {\n // eslint-disable-next-line ts/no-unsafe-member-access\n return !!urlParams.query\n }),\n },\n UserIsTypingAQuery: {\n setSearchBoxQuery,\n transitionState: setInputStatus('UserIsTypingAQuery'),\n },\n UserAcceptedAQuery: {\n setSearchBoxQuery,\n transitionState: setInputStatus('UserAcceptedAQuery'),\n },\n UserAcceptedAQueryPreview: {\n setSearchBoxQueryFromPreview,\n transitionState: setInputStatus('UserAcceptedAQuery'),\n },\n UserPressedClearSearchBoxButton: {\n clearSearchBoxQuery,\n },\n UserClickedCloseX: {\n clearSearchBoxQuery,\n },\n UserClickedOutOfMainModal: {\n clearSearchBoxQuery,\n },\n UserClearedQuery: {\n transitionState: setInputStatus('UserClearedQuery'),\n },\n UserBrowsedToCategory: {\n transitionState: setInputStatus('UserClearedQuery'),\n },\n UserFocusedSearchBox: {\n transitionState: setInputStatus('UserFocusedSearchBox'),\n },\n UserBlurredSearchBox: {\n transitionState: setInputStatus('UserBlurredSearchBox'),\n },\n})\n"],"names":[],"mappings":";;;;AAOA;;;;AAIG;AACH,MAAM,UAAU,GAAG,WAAW;AAE9B;;;;AAIG;AACH,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC;AAE5F;;;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AAmB;AACpB,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAAC;AACpD,KAAA;AACD,IAAA,qBAAqB,EAAE;AACrB,QAAA,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAAC;AACpD,KAAA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAAC;AACxD,KAAA;AACD,IAAA,oBAAoB,EAAE;AACpB,QAAA,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAAC;AACxD,KAAA;AACF,CAAA;;;;"}
|
|
@@ -26,6 +26,12 @@ const setUrlPrompt = wireCommit('setPrompt');
|
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
28
|
const setUrlQuery = wireCommit('setQuery');
|
|
29
|
+
/**
|
|
30
|
+
* Sets to empathy string the query of the url module.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
const resetUrlQuery = wireCommit('setQuery', '');
|
|
29
35
|
/**
|
|
30
36
|
* Sets the url state `query` with a selectedQueryPreview's query.
|
|
31
37
|
*
|
|
@@ -142,6 +148,7 @@ const urlWiring = createWiring({
|
|
|
142
148
|
},
|
|
143
149
|
UserBrowsedToCategory: {
|
|
144
150
|
setUrlBrowseCategory,
|
|
151
|
+
resetUrlQuery,
|
|
145
152
|
},
|
|
146
153
|
UserClickedCloseX: {
|
|
147
154
|
resetUrlBrowseCategory,
|
|
@@ -160,5 +167,5 @@ const urlWiring = createWiring({
|
|
|
160
167
|
},
|
|
161
168
|
});
|
|
162
169
|
|
|
163
|
-
export { resetUrlBrowseCategory, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring };
|
|
170
|
+
export { resetUrlBrowseCategory, resetUrlQuery, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring };
|
|
164
171
|
//# sourceMappingURL=wiring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/url/wiring.ts"],"sourcesContent":["import { createRawFilters } from '../../utils/filters'\nimport { namespacedWireCommit } from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * WireCommit for {@link UrlXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('url')\n\n/**\n * Sets the {@link RelatedTag | related tags }.\n *\n * @public\n */\nexport const setUrlRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Sets the related prompt of the URL module.\n *\n * @public\n */\nexport const setUrlPrompt = wireCommit('setPrompt')\n\n/**\n * Sets the query of the url module.\n *\n * @public\n */\nexport const setUrlQuery = wireCommit('setQuery')\n\n/**\n * Sets the url state `query` with a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setUrlQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Sets the page of the url module.\n *\n * @public\n */\nexport const setUrlPage = wireCommit('setPage')\n\n/**\n * Sets the sort of the url module.\n *\n * @public\n */\nexport const setUrlSort = wireCommit('setSort')\n\n/**\n * Sets the extra params of the url module.\n *\n * @public\n */\nexport const setParams = wireCommit('setParams')\n\n/**\n * Sets the extra params of the url module from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setUrlParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the filters of the url module from a selectedQueryPreview's filters.\n *\n * @public\n */\nexport const setUrlSelectedFiltersFromPreview = wireCommit(\n 'setFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : []),\n)\n\n/**\n * Sets the scroll of the url module.\n *\n * @public\n */\nexport const setUrlScroll = wireCommit('setScroll')\n\n/**\n * Sets the browseCategory of the url module.\n *\n * @public\n */\nexport const resetUrlBrowseCategory = wireCommit('setBrowseCategory', {\n browseField: '',\n browseValue: '',\n})\n\n/**\n * Sets the browseCategory of the url module.\n *\n * @public\n */\nexport const setUrlBrowseCategory = wireCommit('setBrowseCategory')\n\n/**\n * Sets the initial provided extra params.\n *\n * @public\n */\nexport const setInitialExtraParams = wireCommit('setInitialExtraParams')\n\n/**\n * Sets the filters of the url module.\n *\n * @public\n */\nexport const setUrlFilters = wireCommit('setFilters')\n\n/**\n * Wiring configuration for the {@link UrlXModule | url module}.\n *\n * @internal\n */\nexport const urlWiring = createWiring({\n ParamsLoadedFromUrl: {\n setParams,\n },\n UserAcceptedAQuery: {\n setUrlQuery,\n resetUrlBrowseCategory,\n },\n UserAcceptedAQueryPreview: {\n setUrlQueryFromPreview,\n setUrlParamsFromPreview,\n setUrlSelectedFiltersFromPreview,\n },\n UserClearedQuery: {\n setUrlQuery,\n },\n SelectedRelatedTagsChanged: {\n setUrlRelatedTags,\n },\n SelectedRelatedPromptChanged: {\n setUrlPrompt,\n },\n SelectedFiltersForRequestChanged: {\n setUrlFilters,\n },\n PageChanged: {\n setUrlPage,\n },\n SortChanged: {\n setUrlSort,\n },\n ExtraParamsChanged: {\n setParams,\n },\n ExtraParamsInitialized: {\n setInitialExtraParams,\n },\n UserScrolledToElement: {\n setUrlScroll,\n },\n UserBrowsedToCategory: {\n setUrlBrowseCategory,\n },\n UserClickedCloseX: {\n resetUrlBrowseCategory,\n },\n UserClickedOpenX: {\n resetUrlBrowseCategory,\n },\n SelectedBrowseSortProvided: {\n setUrlSort,\n },\n UserClickedABrowseSort: {\n setUrlSort,\n },\n UserSelectedABrowsePage: {\n setUrlPage,\n },\n})\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;AACH,MAAM,UAAU,GAA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EAAE;QAClB,WAAW;QACX,sBAAsB;AACvB,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,sBAAsB;QACtB,uBAAuB;QACvB,gCAAgC;AACjC,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,WAAW;AACZ,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,iBAAiB;AAClB,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,YAAY;AACb,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,aAAa;AACd,KAAA;AACD,IAAA,WAAW,EAAE;QACX,UAAU;AACX,KAAA;AACD,IAAA,WAAW,EAAE;QACX,UAAU;AACX,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,SAAS;AACV,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,qBAAqB;AACtB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,YAAY;AACb,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/url/wiring.ts"],"sourcesContent":["import { createRawFilters } from '../../utils/filters'\nimport { namespacedWireCommit } from '../../wiring/namespaced-wires.factory'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * WireCommit for {@link UrlXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('url')\n\n/**\n * Sets the {@link RelatedTag | related tags }.\n *\n * @public\n */\nexport const setUrlRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Sets the related prompt of the URL module.\n *\n * @public\n */\nexport const setUrlPrompt = wireCommit('setPrompt')\n\n/**\n * Sets the query of the url module.\n *\n * @public\n */\nexport const setUrlQuery = wireCommit('setQuery')\n\n/**\n * Sets to empathy string the query of the url module.\n *\n * @public\n */\nexport const resetUrlQuery = wireCommit('setQuery', '')\n\n/**\n * Sets the url state `query` with a selectedQueryPreview's query.\n *\n * @public\n */\nexport const setUrlQueryFromPreview = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/**\n * Sets the page of the url module.\n *\n * @public\n */\nexport const setUrlPage = wireCommit('setPage')\n\n/**\n * Sets the sort of the url module.\n *\n * @public\n */\nexport const setUrlSort = wireCommit('setSort')\n\n/**\n * Sets the extra params of the url module.\n *\n * @public\n */\nexport const setParams = wireCommit('setParams')\n\n/**\n * Sets the extra params of the url module from a selectedQueryPreview's extraParams.\n *\n * @public\n */\nexport const setUrlParamsFromPreview = wireCommit(\n 'setParams',\n ({ eventPayload: { extraParams } }) => extraParams,\n)\n\n/**\n * Sets the filters of the url module from a selectedQueryPreview's filters.\n *\n * @public\n */\nexport const setUrlSelectedFiltersFromPreview = wireCommit(\n 'setFilters',\n ({ eventPayload: { filters } }) => (filters ? createRawFilters(filters) : []),\n)\n\n/**\n * Sets the scroll of the url module.\n *\n * @public\n */\nexport const setUrlScroll = wireCommit('setScroll')\n\n/**\n * Sets the browseCategory of the url module.\n *\n * @public\n */\nexport const resetUrlBrowseCategory = wireCommit('setBrowseCategory', {\n browseField: '',\n browseValue: '',\n})\n\n/**\n * Sets the browseCategory of the url module.\n *\n * @public\n */\nexport const setUrlBrowseCategory = wireCommit('setBrowseCategory')\n\n/**\n * Sets the initial provided extra params.\n *\n * @public\n */\nexport const setInitialExtraParams = wireCommit('setInitialExtraParams')\n\n/**\n * Sets the filters of the url module.\n *\n * @public\n */\nexport const setUrlFilters = wireCommit('setFilters')\n\n/**\n * Wiring configuration for the {@link UrlXModule | url module}.\n *\n * @internal\n */\nexport const urlWiring = createWiring({\n ParamsLoadedFromUrl: {\n setParams,\n },\n UserAcceptedAQuery: {\n setUrlQuery,\n resetUrlBrowseCategory,\n },\n UserAcceptedAQueryPreview: {\n setUrlQueryFromPreview,\n setUrlParamsFromPreview,\n setUrlSelectedFiltersFromPreview,\n },\n UserClearedQuery: {\n setUrlQuery,\n },\n SelectedRelatedTagsChanged: {\n setUrlRelatedTags,\n },\n SelectedRelatedPromptChanged: {\n setUrlPrompt,\n },\n SelectedFiltersForRequestChanged: {\n setUrlFilters,\n },\n PageChanged: {\n setUrlPage,\n },\n SortChanged: {\n setUrlSort,\n },\n ExtraParamsChanged: {\n setParams,\n },\n ExtraParamsInitialized: {\n setInitialExtraParams,\n },\n UserScrolledToElement: {\n setUrlScroll,\n },\n UserBrowsedToCategory: {\n setUrlBrowseCategory,\n resetUrlQuery,\n },\n UserClickedCloseX: {\n resetUrlBrowseCategory,\n },\n UserClickedOpenX: {\n resetUrlBrowseCategory,\n },\n SelectedBrowseSortProvided: {\n setUrlSort,\n },\n UserClickedABrowseSort: {\n setUrlSort,\n },\n UserSelectedABrowsePage: {\n setUrlPage,\n },\n})\n"],"names":[],"mappings":";;;;AAIA;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC;AAE9C;;;;AAIG;MACU,iBAAiB,GAAG,UAAU,CAAC,gBAAgB;AAE5D;;;;AAIG;MACU,YAAY,GAAG,UAAU,CAAC,WAAW;AAElD;;;;AAIG;MACU,WAAW,GAAG,UAAU,CAAC,UAAU;AAEhD;;;;AAIG;AACI,MAAM,aAAa,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE;AAEtD;;;;AAIG;MACU,sBAAsB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK;AAEnG;;;;AAIG;MACU,UAAU,GAAG,UAAU,CAAC,SAAS;AAE9C;;;;AAIG;MACU,UAAU,GAAG,UAAU,CAAC,SAAS;AAE9C;;;;AAIG;MACU,SAAS,GAAG,UAAU,CAAC,WAAW;AAE/C;;;;AAIG;MACU,uBAAuB,GAAG,UAAU,CAC/C,WAAW,EACX,CAAC,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,WAAW;AAGpD;;;;AAIG;AACI,MAAM,gCAAgC,GAAG,UAAU,CACxD,YAAY,EACZ,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM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ChB,sBAAsB;AACvB,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,UAAU;AACX,KAAA;AACD,IAAA,sBAAsB,EAAE;QACtB,UAAU;AACX,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,UAAU;AACX,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.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": "
|
|
120
|
+
"gitHead": "d22a62cf9e98670408fa801df2c7927db7e57f58"
|
|
121
121
|
}
|
|
@@ -63292,6 +63292,34 @@
|
|
|
63292
63292
|
"endIndex": 3
|
|
63293
63293
|
}
|
|
63294
63294
|
},
|
|
63295
|
+
{
|
|
63296
|
+
"kind": "Variable",
|
|
63297
|
+
"canonicalReference": "@empathyco/x-components!resetUrlQuery:var",
|
|
63298
|
+
"docComment": "/**\n * Sets to empathy string the query of the url module.\n *\n * @public\n */\n",
|
|
63299
|
+
"excerptTokens": [
|
|
63300
|
+
{
|
|
63301
|
+
"kind": "Content",
|
|
63302
|
+
"text": "resetUrlQuery: "
|
|
63303
|
+
},
|
|
63304
|
+
{
|
|
63305
|
+
"kind": "Content",
|
|
63306
|
+
"text": "import(\"../..\")."
|
|
63307
|
+
},
|
|
63308
|
+
{
|
|
63309
|
+
"kind": "Reference",
|
|
63310
|
+
"text": "AnyWire",
|
|
63311
|
+
"canonicalReference": "@empathyco/x-components!AnyWire:type"
|
|
63312
|
+
}
|
|
63313
|
+
],
|
|
63314
|
+
"fileUrlPath": "src/x-modules/url/wiring.ts",
|
|
63315
|
+
"isReadonly": true,
|
|
63316
|
+
"releaseTag": "Public",
|
|
63317
|
+
"name": "resetUrlQuery",
|
|
63318
|
+
"variableTypeTokenRange": {
|
|
63319
|
+
"startIndex": 1,
|
|
63320
|
+
"endIndex": 3
|
|
63321
|
+
}
|
|
63322
|
+
},
|
|
63295
63323
|
{
|
|
63296
63324
|
"kind": "TypeAlias",
|
|
63297
63325
|
"canonicalReference": "@empathyco/x-components!ResultFeature:type",
|
|
@@ -311,6 +311,10 @@ export const aiWiring: {
|
|
|
311
311
|
resetAiQueryWire: AnyWire;
|
|
312
312
|
resetSearchTotalResultsWire: AnyWire;
|
|
313
313
|
};
|
|
314
|
+
UserBrowsedToCategory: {
|
|
315
|
+
resetAiQueryWire: AnyWire;
|
|
316
|
+
resetSearchTotalResultsWire: AnyWire;
|
|
317
|
+
};
|
|
314
318
|
ResultsChanged: {
|
|
315
319
|
setExcludedResultIdsWire: Wire<Result[]>;
|
|
316
320
|
};
|
|
@@ -3309,6 +3313,9 @@ export const facetsWiring: {
|
|
|
3309
3313
|
clearAllFiltersButStickyWire: AnyWire;
|
|
3310
3314
|
setQuery: Wire<string>;
|
|
3311
3315
|
};
|
|
3316
|
+
UserBrowsedToCategory: {
|
|
3317
|
+
clearQuery: AnyWire;
|
|
3318
|
+
};
|
|
3312
3319
|
UserClickedOpenX: {
|
|
3313
3320
|
selectPreselectedFilterWire: Wire<undefined>;
|
|
3314
3321
|
};
|
|
@@ -5039,6 +5046,10 @@ export const nextQueriesWiring: {
|
|
|
5039
5046
|
resetNextQueriesWire: AnyWire;
|
|
5040
5047
|
resetNextQueriesQuery: AnyWire;
|
|
5041
5048
|
};
|
|
5049
|
+
UserBrowsedToCategory: {
|
|
5050
|
+
resetNextQueriesWire: AnyWire;
|
|
5051
|
+
resetNextQueriesQuery: AnyWire;
|
|
5052
|
+
};
|
|
5042
5053
|
SelectedRelatedTagsChanged: {
|
|
5043
5054
|
setNextQueriesRelatedTags: Wire<RelatedTag_2[]>;
|
|
5044
5055
|
};
|
|
@@ -5973,6 +5984,10 @@ export const querySuggestionsWiring: {
|
|
|
5973
5984
|
clearQuerySuggestionsQuery: AnyWire;
|
|
5974
5985
|
cancelFetchAndSaveSuggestionsWire: AnyWire;
|
|
5975
5986
|
};
|
|
5987
|
+
UserBrowsedToCategory: {
|
|
5988
|
+
clearQuerySuggestionsQuery: AnyWire;
|
|
5989
|
+
cancelFetchAndSaveSuggestionsWire: AnyWire;
|
|
5990
|
+
};
|
|
5976
5991
|
QuerySuggestionsRequestUpdated: {
|
|
5977
5992
|
fetchAndSaveSuggestionsWire: Wire<QuerySuggestionsRequest | null>;
|
|
5978
5993
|
};
|
|
@@ -6398,6 +6413,11 @@ export const relatedPromptsWiring: {
|
|
|
6398
6413
|
resetRelatedPromptsState: AnyWire;
|
|
6399
6414
|
setRelatedPromptsQuery: Wire<string>;
|
|
6400
6415
|
};
|
|
6416
|
+
UserBrowsedToCategory: {
|
|
6417
|
+
cancelFetchAndSaveRelatedPrompts: AnyWire;
|
|
6418
|
+
resetRelatedPromptsState: AnyWire;
|
|
6419
|
+
resetRelatedPromptsQuery: AnyWire;
|
|
6420
|
+
};
|
|
6401
6421
|
RelatedPromptsRequestUpdated: {
|
|
6402
6422
|
fetchAndSaveRelatedPrompts: Wire<RelatedPromptsRequest | null>;
|
|
6403
6423
|
};
|
|
@@ -6586,6 +6606,11 @@ export const relatedTagsWiring: {
|
|
|
6586
6606
|
clearRelatedTagsQuery: AnyWire;
|
|
6587
6607
|
clearSelectedRelatedTags: AnyWire;
|
|
6588
6608
|
};
|
|
6609
|
+
UserBrowsedToCategory: {
|
|
6610
|
+
cancelFetchAndSaveRelatedTagsWire: AnyWire;
|
|
6611
|
+
clearRelatedTagsQuery: AnyWire;
|
|
6612
|
+
clearSelectedRelatedTags: AnyWire;
|
|
6613
|
+
};
|
|
6589
6614
|
ExtraParamsChanged: {
|
|
6590
6615
|
setRelatedTagsExtraParams: Wire<Dictionary<unknown>>;
|
|
6591
6616
|
};
|
|
@@ -6817,6 +6842,9 @@ export function resettableState(): {
|
|
|
6817
6842
|
// @public
|
|
6818
6843
|
export const resetUrlBrowseCategory: AnyWire;
|
|
6819
6844
|
|
|
6845
|
+
// @public
|
|
6846
|
+
export const resetUrlQuery: AnyWire;
|
|
6847
|
+
|
|
6820
6848
|
// @internal
|
|
6821
6849
|
export const RESULT_WITH_VARIANTS_KEY: XInjectKey<Result>;
|
|
6822
6850
|
|
|
@@ -7184,6 +7212,9 @@ export const searchBoxWiring: {
|
|
|
7184
7212
|
UserClearedQuery: {
|
|
7185
7213
|
transitionState: AnyWire;
|
|
7186
7214
|
};
|
|
7215
|
+
UserBrowsedToCategory: {
|
|
7216
|
+
transitionState: AnyWire;
|
|
7217
|
+
};
|
|
7187
7218
|
UserFocusedSearchBox: {
|
|
7188
7219
|
transitionState: AnyWire;
|
|
7189
7220
|
};
|
|
@@ -9341,6 +9372,7 @@ export const urlWiring: {
|
|
|
9341
9372
|
};
|
|
9342
9373
|
UserBrowsedToCategory: {
|
|
9343
9374
|
setUrlBrowseCategory: Wire<BrowsableRequest>;
|
|
9375
|
+
resetUrlQuery: AnyWire;
|
|
9344
9376
|
};
|
|
9345
9377
|
UserClickedCloseX: {
|
|
9346
9378
|
resetUrlBrowseCategory: AnyWire;
|
|
@@ -14,6 +14,10 @@ export declare const aiWiring: {
|
|
|
14
14
|
resetAiQueryWire: import("../../wiring").AnyWire;
|
|
15
15
|
resetSearchTotalResultsWire: import("../../wiring").AnyWire;
|
|
16
16
|
};
|
|
17
|
+
UserBrowsedToCategory: {
|
|
18
|
+
resetAiQueryWire: import("../../wiring").AnyWire;
|
|
19
|
+
resetSearchTotalResultsWire: import("../../wiring").AnyWire;
|
|
20
|
+
};
|
|
17
21
|
ResultsChanged: {
|
|
18
22
|
setExcludedResultIdsWire: import("../../wiring").Wire<import("@empathyco/x-types").Result[]>;
|
|
19
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"AAmEA;;;;GAIG;AACH,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"AAmEA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCnB,CAAA"}
|
|
@@ -62,6 +62,9 @@ export declare const facetsWiring: {
|
|
|
62
62
|
clearAllFiltersButStickyWire: import("../../wiring/wiring.types").AnyWire;
|
|
63
63
|
setQuery: import("../../wiring/wiring.types").Wire<string>;
|
|
64
64
|
};
|
|
65
|
+
UserBrowsedToCategory: {
|
|
66
|
+
clearQuery: import("../../wiring/wiring.types").AnyWire;
|
|
67
|
+
};
|
|
65
68
|
UserClickedOpenX: {
|
|
66
69
|
selectPreselectedFilterWire: import("../../wiring/wiring.types").Wire<undefined>;
|
|
67
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/wiring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/wiring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAiKvD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,6CAGzC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,6CAGxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,6CAAiE,CAAA;AAEjG;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDvB,CAAA"}
|
|
@@ -90,6 +90,10 @@ export declare const nextQueriesWiring: {
|
|
|
90
90
|
resetNextQueriesWire: import("../..").AnyWire;
|
|
91
91
|
resetNextQueriesQuery: import("../..").AnyWire;
|
|
92
92
|
};
|
|
93
|
+
UserBrowsedToCategory: {
|
|
94
|
+
resetNextQueriesWire: import("../..").AnyWire;
|
|
95
|
+
resetNextQueriesQuery: import("../..").AnyWire;
|
|
96
|
+
};
|
|
93
97
|
SelectedRelatedTagsChanged: {
|
|
94
98
|
setNextQueriesRelatedTags: import("../..").Wire<import("@empathyco/x-types").RelatedTag[]>;
|
|
95
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/wiring.ts"],"names":[],"mappings":"AAwCA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,8BAAyB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yBAA6B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,iEAA+B,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,yBAG1C,CAAA;AASD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wEAA0B,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,yBAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,8EAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,mEAA+C,CAAA;AAE5F;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,yBAQ5C,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yBAAkD,CAAA;AAEtF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,yBAA+C,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,mEAAmC,CAAA;AAElE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/wiring.ts"],"names":[],"mappings":"AAwCA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,8BAAyB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yBAA6B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,iEAA+B,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,yBAG1C,CAAA;AASD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wEAA0B,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,yBAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,8EAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,mEAA+C,CAAA;AAE5F;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,yBAQ5C,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yBAAkD,CAAA;AAEtF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,yBAA+C,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,mEAAmC,CAAA;AAElE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC5B,CAAA"}
|
|
@@ -65,6 +65,10 @@ export declare const querySuggestionsWiring: {
|
|
|
65
65
|
clearQuerySuggestionsQuery: import("../..").AnyWire;
|
|
66
66
|
cancelFetchAndSaveSuggestionsWire: import("../..").AnyWire;
|
|
67
67
|
};
|
|
68
|
+
UserBrowsedToCategory: {
|
|
69
|
+
clearQuerySuggestionsQuery: import("../..").AnyWire;
|
|
70
|
+
cancelFetchAndSaveSuggestionsWire: import("../..").AnyWire;
|
|
71
|
+
};
|
|
68
72
|
QuerySuggestionsRequestUpdated: {
|
|
69
73
|
fetchAndSaveSuggestionsWire: import("../..").Wire<import("@empathyco/x-types").QuerySuggestionsRequest | null>;
|
|
70
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/query-suggestions/wiring.ts"],"names":[],"mappings":"AAqCA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8BAAyB,CAAA;AAE9D;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,yBAG/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yCAAyC,yBAGrD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,wEAA0B,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,mEAAmC,CAAA;AAE/E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,yBAA6B,CAAA;AASpE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,mFAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,yBAE7C,CAAA;AAOD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/query-suggestions/wiring.ts"],"names":[],"mappings":"AAqCA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8BAAyB,CAAA;AAE9D;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,yBAG/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yCAAyC,yBAGrD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,wEAA0B,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,mEAAmC,CAAA;AAE/E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,yBAA6B,CAAA;AASpE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,mFAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,yBAE7C,CAAA;AAOD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CjC,CAAA"}
|
|
@@ -23,6 +23,11 @@ export declare const relatedPromptsWiring: {
|
|
|
23
23
|
resetRelatedPromptsState: import("../..").AnyWire;
|
|
24
24
|
setRelatedPromptsQuery: import("../..").Wire<string>;
|
|
25
25
|
};
|
|
26
|
+
UserBrowsedToCategory: {
|
|
27
|
+
cancelFetchAndSaveRelatedPrompts: import("../..").AnyWire;
|
|
28
|
+
resetRelatedPromptsState: import("../..").AnyWire;
|
|
29
|
+
resetRelatedPromptsQuery: import("../..").AnyWire;
|
|
30
|
+
};
|
|
26
31
|
RelatedPromptsRequestUpdated: {
|
|
27
32
|
fetchAndSaveRelatedPrompts: import("../..").Wire<import("@empathyco/x-types").RelatedPromptsRequest | null>;
|
|
28
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/wiring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/wiring.ts"],"names":[],"mappings":"AAyDA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD/B,CAAA"}
|
|
@@ -85,6 +85,11 @@ export declare const relatedTagsWiring: {
|
|
|
85
85
|
clearRelatedTagsQuery: import("../..").AnyWire;
|
|
86
86
|
clearSelectedRelatedTags: import("../..").AnyWire;
|
|
87
87
|
};
|
|
88
|
+
UserBrowsedToCategory: {
|
|
89
|
+
cancelFetchAndSaveRelatedTagsWire: import("../..").AnyWire;
|
|
90
|
+
clearRelatedTagsQuery: import("../..").AnyWire;
|
|
91
|
+
clearSelectedRelatedTags: import("../..").AnyWire;
|
|
92
|
+
};
|
|
88
93
|
ExtraParamsChanged: {
|
|
89
94
|
setRelatedTagsExtraParams: import("../..").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
90
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-tags/wiring.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,8BAAyB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,yBAG1C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,yBAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wEAA0B,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,8EAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,yBAE7C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+DAAmC,CAAA;AAEpE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,yBAA2C,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yBAA6B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,iDAA+B,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-tags/wiring.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,8BAAyB,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,yBAG1C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,yBAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wEAA0B,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,8EAA0C,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,yBAE7C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+DAAmC,CAAA;AAEpE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,yBAA2C,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yBAA6B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,iDAA+B,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search-box/wiring.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAiExD;;;;GAIG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search-box/wiring.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAiExD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC1B,CAAA"}
|
|
@@ -16,6 +16,12 @@ export declare const setUrlPrompt: import("../..").Wire<number>;
|
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
export declare const setUrlQuery: import("../..").Wire<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Sets to empathy string the query of the url module.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare const resetUrlQuery: import("../..").AnyWire;
|
|
19
25
|
/**
|
|
20
26
|
* Sets the url state `query` with a selectedQueryPreview's query.
|
|
21
27
|
*
|
|
@@ -129,6 +135,7 @@ export declare const urlWiring: {
|
|
|
129
135
|
};
|
|
130
136
|
UserBrowsedToCategory: {
|
|
131
137
|
setUrlBrowseCategory: import("../..").Wire<import("@empathyco/x-types").BrowsableRequest>;
|
|
138
|
+
resetUrlQuery: import("../..").AnyWire;
|
|
132
139
|
};
|
|
133
140
|
UserClickedCloseX: {
|
|
134
141
|
resetUrlBrowseCategory: import("../..").AnyWire;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/wiring.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iEAA+B,CAAA;AAE7D;;;;GAIG;AACH,eAAO,MAAM,YAAY,8BAA0B,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,WAAW,8BAAyB,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,yBAAiE,CAAA;AAEpG;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,SAAS,0DAA0B,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yBAGnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,yBAG5C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,8BAA0B,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,yBAGjC,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qEAAkC,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,wEAAsC,CAAA;AAExE;;;;GAIG;AACH,eAAO,MAAM,aAAa,6DAA2B,CAAA;AAErD;;;;GAIG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/url/wiring.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iEAA+B,CAAA;AAE7D;;;;GAIG;AACH,eAAO,MAAM,YAAY,8BAA0B,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,WAAW,8BAAyB,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,yBAA6B,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,yBAAiE,CAAA;AAEpG;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,8BAAwB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,SAAS,0DAA0B,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yBAGnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,yBAG5C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,8BAA0B,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,yBAGjC,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qEAAkC,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,wEAAsC,CAAA;AAExE;;;;GAIG;AACH,eAAO,MAAM,aAAa,6DAA2B,CAAA;AAErD;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DpB,CAAA"}
|
package/url/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as UrlHandler } from '../js/x-modules/url/components/url-handler.vue.js';
|
|
2
2
|
export { replaceableParams, urlEmitters } from '../js/x-modules/url/store/emitters.js';
|
|
3
3
|
export { urlXStoreModule } from '../js/x-modules/url/store/module.js';
|
|
4
|
-
export { resetUrlBrowseCategory, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from '../js/x-modules/url/wiring.js';
|
|
4
|
+
export { resetUrlBrowseCategory, resetUrlQuery, setInitialExtraParams, setParams, setUrlBrowseCategory, setUrlFilters, setUrlPage, setUrlParamsFromPreview, setUrlPrompt, setUrlQuery, setUrlQueryFromPreview, setUrlRelatedTags, setUrlScroll, setUrlSelectedFiltersFromPreview, setUrlSort, urlWiring } from '../js/x-modules/url/wiring.js';
|
|
5
5
|
export { urlXModule } from '../js/x-modules/url/x-module.js';
|