@empathyco/x-components 7.3.0 → 7.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 +14 -0
- package/docs/API-reference/api/x-components.basexapi.browse.md +54 -0
- package/docs/API-reference/api/x-components.basexapi.md +14 -0
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +7 -0
- package/docs/API-reference/api/x-components.md +33 -0
- package/docs/API-reference/api/x-components.resetnextqueriesquery.md +13 -0
- package/docs/API-reference/api/x-components.reseturlbrowsecategory.md +13 -0
- package/docs/API-reference/api/x-components.seturlbrowsecategory.md +13 -0
- package/docs/API-reference/api/x-components.simplefilter.md +7 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +7 -0
- package/docs/API-reference/api/x-components.urlmutations.md +19 -0
- package/docs/API-reference/api/x-components.urlmutations.setbrowsecategory.md +13 -0
- package/docs/API-reference/api/x-components.urlparams.browsefield.md +11 -0
- package/docs/API-reference/api/x-components.urlparams.browsevalue.md +11 -0
- package/docs/API-reference/api/x-components.urlparams.md +34 -0
- package/docs/API-reference/api/x-components.usealiasapi.browsetotalresults.md +13 -0
- package/docs/API-reference/api/x-components.usealiasapi.md +21 -0
- package/docs/API-reference/api/x-components.xapi.browse.md +13 -0
- package/docs/API-reference/api/x-components.xapi.md +19 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +2 -2
- package/docs/API-reference/api/x-components.xmodulestree.browse.md +11 -0
- package/docs/API-reference/api/x-components.xmodulestree.md +17 -0
- package/docs/API-reference/api/x-types.xcomponentsadapter.browse.md +11 -0
- package/docs/API-reference/api/x-types.xcomponentsadapter.md +17 -0
- package/docs/API-reference/components/browse/x-components.browse-results-list.md +21 -0
- package/docs/API-reference/components/browse/x-components.browse-sort-picker-list.md +24 -0
- package/js/composables/use-alias-api.js +3 -0
- package/js/composables/use-alias-api.js.map +1 -1
- package/js/index.js +2 -2
- package/js/x-installer/api/base-api.js +12 -0
- package/js/x-installer/api/base-api.js.map +1 -1
- package/js/x-modules/next-queries/wiring.js +11 -1
- package/js/x-modules/next-queries/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue2.js +4 -1
- package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
- package/js/x-modules/url/store/initial-state.js +2 -0
- package/js/x-modules/url/store/initial-state.js.map +1 -1
- package/js/x-modules/url/store/module.js +4 -0
- package/js/x-modules/url/store/module.js.map +1 -1
- package/js/x-modules/url/wiring.js +34 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/next-queries/index.js +1 -1
- package/package.json +4 -4
- package/report/x-components.api.json +543 -5
- package/report/x-components.api.md +72 -3
- package/report/x-types.api.json +50 -0
- package/types/src/components/snippet-callbacks.vue.d.ts +7 -0
- package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
- package/types/src/composables/use-alias-api.d.ts +2 -0
- package/types/src/composables/use-alias-api.d.ts.map +1 -1
- package/types/src/types/url-params.d.ts +2 -0
- package/types/src/types/url-params.d.ts.map +1 -1
- package/types/src/wiring/events.types.d.ts +2 -1
- package/types/src/wiring/events.types.d.ts.map +1 -1
- package/types/src/x-installer/api/api.types.d.ts +9 -0
- package/types/src/x-installer/api/api.types.d.ts.map +1 -1
- package/types/src/x-installer/api/base-api.d.ts +9 -0
- package/types/src/x-installer/api/base-api.d.ts.map +1 -1
- package/types/src/x-modules/browse/components/index.d.ts +3 -0
- package/types/src/x-modules/browse/components/index.d.ts.map +1 -0
- package/types/src/x-modules/browse/config.types.d.ts +14 -0
- package/types/src/x-modules/browse/config.types.d.ts.map +1 -0
- package/types/src/x-modules/browse/events.types.d.ts +55 -0
- package/types/src/x-modules/browse/events.types.d.ts.map +1 -0
- package/types/src/x-modules/browse/index.d.ts +8 -0
- package/types/src/x-modules/browse/index.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/fetch-and-save-browse-response.action.d.ts +15 -0
- package/types/src/x-modules/browse/store/actions/fetch-and-save-browse-response.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts +17 -0
- package/types/src/x-modules/browse/store/actions/fetch-and-save-results-enrichment.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/fetch-browse-response.action.d.ts +13 -0
- package/types/src/x-modules/browse/store/actions/fetch-browse-response.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/increase-page-apending-results.action.d.ts +11 -0
- package/types/src/x-modules/browse/store/actions/increase-page-apending-results.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/index.d.ts +9 -0
- package/types/src/x-modules/browse/store/actions/index.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/reset-request-on-refinement.action.d.ts +11 -0
- package/types/src/x-modules/browse/store/actions/reset-request-on-refinement.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/save-browse-response.action.d.ts +11 -0
- package/types/src/x-modules/browse/store/actions/save-browse-response.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/save-origin.action.d.ts +11 -0
- package/types/src/x-modules/browse/store/actions/save-origin.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/actions/set-url-params.action.d.ts +11 -0
- package/types/src/x-modules/browse/store/actions/set-url-params.action.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/emitters.d.ts +35 -0
- package/types/src/x-modules/browse/store/emitters.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/getters/index.d.ts +2 -0
- package/types/src/x-modules/browse/store/getters/index.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/getters/request.getter.d.ts +13 -0
- package/types/src/x-modules/browse/store/getters/request.getter.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/index.d.ts +6 -0
- package/types/src/x-modules/browse/store/index.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/module.d.ts +41 -0
- package/types/src/x-modules/browse/store/module.d.ts.map +1 -0
- package/types/src/x-modules/browse/store/types.d.ts +273 -0
- package/types/src/x-modules/browse/store/types.d.ts.map +1 -0
- package/types/src/x-modules/browse/types.d.ts +35 -0
- package/types/src/x-modules/browse/types.d.ts.map +1 -0
- package/types/src/x-modules/browse/wiring.d.ts +172 -0
- package/types/src/x-modules/browse/wiring.d.ts.map +1 -0
- package/types/src/x-modules/browse/x-module.d.ts +16 -0
- package/types/src/x-modules/browse/x-module.d.ts.map +1 -0
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +7 -0
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +7 -0
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/next-queries/wiring.d.ts +10 -0
- package/types/src/x-modules/next-queries/wiring.d.ts.map +1 -1
- package/types/src/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
- package/types/src/x-modules/url/store/initial-state.d.ts.map +1 -1
- package/types/src/x-modules/url/store/module.d.ts.map +1 -1
- package/types/src/x-modules/url/store/types.d.ts +7 -1
- package/types/src/x-modules/url/store/types.d.ts.map +1 -1
- package/types/src/x-modules/url/wiring.d.ts +30 -0
- package/types/src/x-modules/url/wiring.d.ts.map +1 -1
- package/types/src/x-modules/x-modules.types.d.ts +2 -0
- package/types/src/x-modules/x-modules.types.d.ts.map +1 -1
- package/url/index.js +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrowseXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link BrowseActions.saveBrowseResponse}.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param response - The {@link @empathyco/x-types#BrowseResponse} to save.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const saveBrowseResponse: BrowseXStoreModule['actions']['saveBrowseResponse'];
|
|
11
|
+
//# sourceMappingURL=save-browse-response.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-browse-response.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/actions/save-browse-response.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAoClF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrowseXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link BrowseActions.saveOrigin}.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param queryOriginInit - The object to create the {@link QueryOrigin} with.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const saveOrigin: BrowseXStoreModule['actions']['saveOrigin'];
|
|
11
|
+
//# sourceMappingURL=save-origin.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-origin.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/actions/save-origin.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAGlD;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,YAAY,CAKlE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrowseXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link BrowseActions.setUrlParams}.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param urlParams - List of params from the url.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const setUrlParams: BrowseXStoreModule['actions']['setUrlParams'];
|
|
11
|
+
//# sourceMappingURL=set-url-params.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-url-params.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/actions/set-url-params.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,cAAc,CAetE,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link StoreEmitters} For the browse module.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const browseEmitters: {
|
|
7
|
+
FacetsChanged: {
|
|
8
|
+
selector: (state: import("./types").BrowseState) => import("@empathyco/x-types").Facet[];
|
|
9
|
+
filter(newValue: import("@empathyco/x-types").Facet[], oldValue: import("@empathyco/x-types").Facet[]): boolean;
|
|
10
|
+
};
|
|
11
|
+
PageChanged: (state: import("./types").BrowseState) => number;
|
|
12
|
+
ResultsChanged: (state: import("./types").BrowseState) => import("@empathyco/x-types").Result[];
|
|
13
|
+
BrowseRequestChanged: (_: import("./types").BrowseState, getters: import("../../..").Returns<import("../../../store").GettersTree<import("./types").BrowseState, import("./types").BrowseGetters>>) => import("..").InternalBrowseRequest | null;
|
|
14
|
+
BrowseRequestUpdated: (_: import("./types").BrowseState, getters: import("../../..").Returns<import("../../../store").GettersTree<import("./types").BrowseState, import("./types").BrowseGetters>>) => import("..").InternalBrowseRequest | null;
|
|
15
|
+
BrowseResponseChanged: {
|
|
16
|
+
selector: (state: import("./types").BrowseState, getters: import("../../..").Returns<import("../../../store").GettersTree<import("./types").BrowseState, import("./types").BrowseGetters>>) => {
|
|
17
|
+
request: import("..").InternalBrowseRequest;
|
|
18
|
+
status: import("../../../store").RequestStatus;
|
|
19
|
+
banners: import("@empathyco/x-types").Banner[];
|
|
20
|
+
facets: import("@empathyco/x-types").Facet[];
|
|
21
|
+
promoteds: import("@empathyco/x-types").Promoted[];
|
|
22
|
+
browseTagging: import("@empathyco/x-types").TaggingRequest;
|
|
23
|
+
displayBrowseTagging: import("@empathyco/x-types").TaggingRequest;
|
|
24
|
+
results: import("@empathyco/x-types").Result[];
|
|
25
|
+
totalResults: number;
|
|
26
|
+
};
|
|
27
|
+
filter: (newValue: import("..").InternalBrowseResponse, oldValue: import("..").InternalBrowseResponse) => boolean;
|
|
28
|
+
};
|
|
29
|
+
BrowseTaggingChanged: {
|
|
30
|
+
selector: (state: import("./types").BrowseState) => import("@empathyco/x-types").TaggingRequest;
|
|
31
|
+
filter: ({ url }: import("@empathyco/x-types").TaggingRequest) => boolean;
|
|
32
|
+
};
|
|
33
|
+
SortChanged: (state: import("./types").BrowseState) => string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=emitters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emitters.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/browse/store/emitters.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;gHAGK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;CAiCrC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/getters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BrowseXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link BrowseGetters.request} getter.
|
|
4
|
+
*
|
|
5
|
+
* @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the browse
|
|
6
|
+
* module.
|
|
7
|
+
* @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the
|
|
8
|
+
* browse module.
|
|
9
|
+
* @returns The browse request to fetch data from the API.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const request: BrowseXStoreModule['getters']['request'];
|
|
13
|
+
//# sourceMappingURL=request.getter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.getter.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/browse/store/getters/request.getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,SAAS,CAoB5D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/browse/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Stats } from '@empathyco/x-types';
|
|
2
|
+
import type { BrowseXStoreModule } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* {@link XStoreModule} For the browse module.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const browseXStoreModule: BrowseXStoreModule;
|
|
9
|
+
/**
|
|
10
|
+
* Function to return the "resettable" part of the state. This will be used in the `resetState`
|
|
11
|
+
* mutation to reset to the initial state.
|
|
12
|
+
*
|
|
13
|
+
* @returns The "resettable" part of the {@link BrowseState}.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function resettableState(): {
|
|
18
|
+
selectedCategory: {
|
|
19
|
+
browseValue: string;
|
|
20
|
+
browseField: string;
|
|
21
|
+
};
|
|
22
|
+
results: never[];
|
|
23
|
+
facets: never[];
|
|
24
|
+
banners: never[];
|
|
25
|
+
promoteds: never[];
|
|
26
|
+
totalResults: number;
|
|
27
|
+
sort: string;
|
|
28
|
+
page: number;
|
|
29
|
+
origin: null;
|
|
30
|
+
isAppendResults: boolean;
|
|
31
|
+
browseTagging: {
|
|
32
|
+
url: string;
|
|
33
|
+
params: {};
|
|
34
|
+
};
|
|
35
|
+
displayBrowseTagging: {
|
|
36
|
+
url: string;
|
|
37
|
+
params: {};
|
|
38
|
+
};
|
|
39
|
+
stats: Stats;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/browse/store/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAoBjD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAyGhC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;WAuBd,KAAK;EAErB"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import type { Banner, BrowsableRequest, BrowseRequest, BrowseResponse, Facet, Filter, Promoted, Result, Sort, Stats, TaggingRequest } from '@empathyco/x-types';
|
|
2
|
+
import type { Dictionary } from '@empathyco/x-utils';
|
|
3
|
+
import type { StatusMutations, StatusState, XActionContext, XStoreModule } from '../../../store';
|
|
4
|
+
import type { ConfigMutations } from '../../../store/utils/config-store.utils';
|
|
5
|
+
import type { QueryOrigin, QueryOriginInit, UrlParams } from '../../../types';
|
|
6
|
+
import type { BrowseConfig } from '../config.types';
|
|
7
|
+
import type { InternalBrowseRequest, WatchedInternalBrowseRequest } from '../types';
|
|
8
|
+
/**
|
|
9
|
+
* Browse store state.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface BrowseState extends StatusState {
|
|
14
|
+
/** The list of the banners, related to the `browseCategory` property of the state. */
|
|
15
|
+
banners: Banner[];
|
|
16
|
+
/** The configuration of the browse module. */
|
|
17
|
+
config: BrowseConfig;
|
|
18
|
+
/** The list of the facets, related to the `query` property of the state. */
|
|
19
|
+
facets: Facet[];
|
|
20
|
+
/** A flag to indicate if new results are append to the current instead of replacing them. */
|
|
21
|
+
isAppendResults: boolean;
|
|
22
|
+
/** Flag indicating if there is a no results situation. */
|
|
23
|
+
isNoResults: boolean;
|
|
24
|
+
/** Flag indicating if there is a no results situation with filters selected. */
|
|
25
|
+
fromNoResultsWithFilters: boolean;
|
|
26
|
+
/** The origin property of the request. */
|
|
27
|
+
origin: QueryOrigin | null;
|
|
28
|
+
/** The current page of the request. */
|
|
29
|
+
page: number;
|
|
30
|
+
/** The extra params property of the state. */
|
|
31
|
+
params: Dictionary<unknown>;
|
|
32
|
+
/** The list of the promoted, related to the `query` property of the state. */
|
|
33
|
+
promoteds: Promoted[];
|
|
34
|
+
/** The browse tagging used to track the browse events. */
|
|
35
|
+
browseTagging: TaggingRequest;
|
|
36
|
+
/** The display tagging used to track the browse events. */
|
|
37
|
+
displayBrowseTagging: TaggingRequest;
|
|
38
|
+
/** The list of the results, related to the `query` property of the state. */
|
|
39
|
+
results: Result[];
|
|
40
|
+
/**
|
|
41
|
+
* The dictionary of selected filters, used to perform the browse request.
|
|
42
|
+
* The key is the facet id, and the value the list of filters for that facet.
|
|
43
|
+
*/
|
|
44
|
+
selectedFilters: Dictionary<Filter[]>;
|
|
45
|
+
/** The way of ordering the results. */
|
|
46
|
+
sort: Sort;
|
|
47
|
+
/** The stats of the results. */
|
|
48
|
+
stats: Stats;
|
|
49
|
+
/** The total number of results, related to the `query` property of the state. */
|
|
50
|
+
totalResults: number;
|
|
51
|
+
/** The current selected category of the request */
|
|
52
|
+
selectedCategory: BrowsableRequest;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Browse store getters.
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export interface BrowseGetters {
|
|
60
|
+
/**
|
|
61
|
+
* The adapter request object for retrieving the results, or null if there is no
|
|
62
|
+
* valid data to create a request.
|
|
63
|
+
*/
|
|
64
|
+
request: InternalBrowseRequest | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Browse store mutations.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export interface BrowseMutations extends StatusMutations, ConfigMutations<BrowseState> {
|
|
72
|
+
/**
|
|
73
|
+
* Append the results to the results state.
|
|
74
|
+
*
|
|
75
|
+
* @param results - Results array.
|
|
76
|
+
*/
|
|
77
|
+
appendResults: (results: Result[]) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Resets the "resettable" part of the Browse state to the initial state. See the
|
|
80
|
+
* {@link BrowseXStoreModule} for details.
|
|
81
|
+
*/
|
|
82
|
+
resetState: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* Resets the "resettable" part of the Browse state like {@link BrowseMutations.resetState} but
|
|
85
|
+
* maintains the values required to perform the browse request again.
|
|
86
|
+
*/
|
|
87
|
+
resetStateForReload: () => void;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the banners of the module.
|
|
90
|
+
*
|
|
91
|
+
* @param banners - The new banners to save to the state.
|
|
92
|
+
*/
|
|
93
|
+
setBanners: (banners: Banner[]) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the facets of the module.
|
|
96
|
+
*
|
|
97
|
+
* @param facets - The new facets to save to the state.
|
|
98
|
+
*/
|
|
99
|
+
setFacets: (facets: Facet[]) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Set the `isAppendResuls` flag value.
|
|
102
|
+
*
|
|
103
|
+
* @param isAppendResults - The new flag value.
|
|
104
|
+
*/
|
|
105
|
+
setIsAppendResults: (isAppendResults: boolean) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Sets the `isNoResults` flag value.
|
|
108
|
+
*
|
|
109
|
+
* @param isNoResults - The new flag value.
|
|
110
|
+
*/
|
|
111
|
+
setIsNoResults: (isNoResults: boolean) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Sets the `fromNoResultsWithFilters` flag value.
|
|
114
|
+
*
|
|
115
|
+
* @param fromNoResultsWithFilters - The new flag value.
|
|
116
|
+
*/
|
|
117
|
+
setFromNoResultsWithFilters: (fromNoResultsWithFilters: boolean) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Sets the origin of the module.
|
|
120
|
+
*
|
|
121
|
+
* @param origin - The new origin.
|
|
122
|
+
*/
|
|
123
|
+
setOrigin: (origin: QueryOrigin | undefined | null) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Sets the page of the module.
|
|
126
|
+
*
|
|
127
|
+
* @param page - The new page.
|
|
128
|
+
*/
|
|
129
|
+
setPage: (page: number) => void;
|
|
130
|
+
/** Sets the selected category of the module.
|
|
131
|
+
*
|
|
132
|
+
* @param selectedCategory - The new selectedCategory.
|
|
133
|
+
*/
|
|
134
|
+
setSelectedCategory: (selectedCategory: BrowsableRequest) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Sets the extra params of the module.
|
|
137
|
+
*
|
|
138
|
+
* @param params - The new extra params.
|
|
139
|
+
*/
|
|
140
|
+
setParams: (params: Dictionary<unknown>) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Sets the promoteds of the module.
|
|
143
|
+
*
|
|
144
|
+
* @param promoteds - The new promoted to save to the state.
|
|
145
|
+
*/
|
|
146
|
+
setPromoteds: (promoteds: Promoted[]) => void;
|
|
147
|
+
/**
|
|
148
|
+
* Sets the browse tagging of the module, which is used to track the query.
|
|
149
|
+
*
|
|
150
|
+
* @param browseTagging - The new query tagging object to save to the state.
|
|
151
|
+
*/
|
|
152
|
+
setBrowseTagging: (browseTagging: TaggingRequest) => void;
|
|
153
|
+
/**
|
|
154
|
+
* Sets the display tagging of the module.
|
|
155
|
+
*
|
|
156
|
+
* @param displayBrowseTagging - The new display tagging object to save to the state.
|
|
157
|
+
*/
|
|
158
|
+
setDisplayBrowseTagging: (displayBrowseTagging: TaggingRequest) => void;
|
|
159
|
+
/**
|
|
160
|
+
* Sets the results of the module.
|
|
161
|
+
*
|
|
162
|
+
* @param results - The new results to save to the state.
|
|
163
|
+
*/
|
|
164
|
+
setResults: (results: Result[]) => void;
|
|
165
|
+
/**
|
|
166
|
+
* Sets the selected filters of the module.
|
|
167
|
+
*
|
|
168
|
+
* @param selectedFilters - The new selected filters to save to the state.
|
|
169
|
+
*/
|
|
170
|
+
setSelectedFilters: (selectedFilters: Filter[]) => void;
|
|
171
|
+
/**
|
|
172
|
+
* Sets the selected sort option of the module.
|
|
173
|
+
*
|
|
174
|
+
* @param sort - The new sort.
|
|
175
|
+
*/
|
|
176
|
+
setSort: (sort: Sort) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Sets the stats of the module.
|
|
179
|
+
*
|
|
180
|
+
* @param stats - The new stats to save to the state.
|
|
181
|
+
*/
|
|
182
|
+
setStats: (stats: Stats) => void;
|
|
183
|
+
/**
|
|
184
|
+
* Sets the total results of the module.
|
|
185
|
+
*
|
|
186
|
+
* @param totalResults - The new total results to save to the state.
|
|
187
|
+
*/
|
|
188
|
+
setTotalResults: (totalResults: number) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Updates a result with new fields.
|
|
191
|
+
*
|
|
192
|
+
* @param result - A result containing at least an id, and the properties to modify.
|
|
193
|
+
*/
|
|
194
|
+
updateResult: (result: Partial<Result> & Pick<Result, 'id'>) => void;
|
|
195
|
+
/**
|
|
196
|
+
* Updates the results with the enrichment results.
|
|
197
|
+
*
|
|
198
|
+
* @param enrichmentResults - The enrichment results.
|
|
199
|
+
*/
|
|
200
|
+
updateResultsFromEnrichment: (enrichmentResults: any[]) => void;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Browse store actions.
|
|
204
|
+
*
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
export interface BrowseActions {
|
|
208
|
+
/**
|
|
209
|
+
* Batches state resets in a single action after {@link BrowseGetters.request} parameters update.
|
|
210
|
+
*
|
|
211
|
+
* @param watchedRequest - The watched internal browse request object.
|
|
212
|
+
*/
|
|
213
|
+
resetRequestOnRefinement: (watchedRequest: WatchedInternalBrowseRequest) => void;
|
|
214
|
+
/**
|
|
215
|
+
* Cancels / interrupt {@link BrowseActions.fetchAndSaveBrowseResponse} synchronous promise.
|
|
216
|
+
*/
|
|
217
|
+
cancelFetchAndSaveBrowseResponse: () => void;
|
|
218
|
+
/**
|
|
219
|
+
* Fetches a new browse response and stores them in the module state.
|
|
220
|
+
*/
|
|
221
|
+
fetchAndSaveBrowseResponse: (request: InternalBrowseRequest | null) => void;
|
|
222
|
+
/**
|
|
223
|
+
* Fetches the browse response and returns them.
|
|
224
|
+
*
|
|
225
|
+
* @returns The new browse response.
|
|
226
|
+
*/
|
|
227
|
+
fetchBrowseResponse: (request: BrowseRequest) => BrowseResponse;
|
|
228
|
+
/**
|
|
229
|
+
* Requests and stores the enrichment results for the results.
|
|
230
|
+
*
|
|
231
|
+
* @param results - The results.
|
|
232
|
+
*/
|
|
233
|
+
fetchAndSaveResultsEnrichment: (results: Result[]) => void;
|
|
234
|
+
/**
|
|
235
|
+
* Checks if there are more pages of results to load. If there are, then increases the page
|
|
236
|
+
* number in state and set to `true` the {@link BrowseState.isAppendResults} flag.
|
|
237
|
+
*
|
|
238
|
+
* @remarks This action is to implement the infinite scroll behaviour. To increase the page
|
|
239
|
+
* for other purposes, please use the {@link BrowseMutations.setPage} mutation.
|
|
240
|
+
*/
|
|
241
|
+
increasePageAppendingResults: () => void;
|
|
242
|
+
/**
|
|
243
|
+
* Checks if the url has params on it and then updates the state with these values.
|
|
244
|
+
*
|
|
245
|
+
* @param urlParams - List of params from the url.
|
|
246
|
+
*/
|
|
247
|
+
setUrlParams: (urlParams: UrlParams) => void;
|
|
248
|
+
/**
|
|
249
|
+
* Creates a {@link QueryOrigin} and saves it.
|
|
250
|
+
*
|
|
251
|
+
* @param originInit - The object to create the origin with.
|
|
252
|
+
*/
|
|
253
|
+
saveOrigin: (originInit: QueryOriginInit) => void;
|
|
254
|
+
/**
|
|
255
|
+
* Saves the {@link @empathyco/x-types#BrowseResponse}.
|
|
256
|
+
*
|
|
257
|
+
* @param response - The {@link @empathyco/x-types#BrowseResponse} to save.
|
|
258
|
+
*/
|
|
259
|
+
saveBrowseResponse: (response: BrowseResponse) => void;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Browse type safe store module.
|
|
263
|
+
*
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
export type BrowseXStoreModule = XStoreModule<BrowseState, BrowseGetters, BrowseMutations, BrowseActions>;
|
|
267
|
+
/**
|
|
268
|
+
* Alias type for actions context of the {@link BrowseXStoreModule}.
|
|
269
|
+
*
|
|
270
|
+
* @public
|
|
271
|
+
*/
|
|
272
|
+
export type BrowseActionContext = XActionContext<BrowseState, BrowseGetters, BrowseMutations, BrowseActions>;
|
|
273
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/browse/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,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H,6BAA6B,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC1D;;;;;;OAMG;IACH,4BAA4B,EAAE,MAAM,IAAI,CAAA;IACxC;;;;OAIG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IAC5C;;;;OAIG;IACH,UAAU,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAA;IACjD;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAA;CACvD;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAC3C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAC9C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BrowseRequest, BrowseResponse } from '@empathyco/x-types';
|
|
2
|
+
import type { RequestStatus } from '../../store/utils/status-store.utils';
|
|
3
|
+
/**
|
|
4
|
+
* An internal browse request containing the page used to calculate the start and rows properties of
|
|
5
|
+
* a {@link @empathyco/x-types#BrowseRequest}.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface InternalBrowseRequest extends BrowseRequest {
|
|
10
|
+
/** The page number. */
|
|
11
|
+
page: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A representation of a watched {@link InternalBrowseRequest} object, wrapping its new and old
|
|
15
|
+
* values.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface WatchedInternalBrowseRequest {
|
|
20
|
+
newRequest: InternalBrowseRequest;
|
|
21
|
+
oldRequest: InternalBrowseRequest;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* An internal browse response containing the {@link InternalBrowseRequest} performed to get a
|
|
25
|
+
* {@link @empathyco/x-types#BrowseResponse} and its {@link RequestStatus}.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface InternalBrowseResponse extends BrowseResponse {
|
|
30
|
+
/** The browse request. */
|
|
31
|
+
request: InternalBrowseRequest;
|
|
32
|
+
/** The response status. */
|
|
33
|
+
status: RequestStatus;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/browse/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AAEzE;;;;;GAKG;AACH,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,qBAAqB,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,0BAA0B;IAC1B,OAAO,EAAE,qBAAqB,CAAA;IAC9B,2BAA2B;IAC3B,MAAM,EAAE,aAAa,CAAA;CACtB"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { InternalBrowseRequest } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Cancels the {@link BrowseActions.fetchAndSaveBrowseResponse} request promise.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const cancelFetchAndSaveBrowseResponseWire: import("../../wiring").AnyWire;
|
|
8
|
+
/**
|
|
9
|
+
* Sets the browse state `origin`.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare const saveOriginWire: import("../../wiring").AnyWire;
|
|
14
|
+
/**
|
|
15
|
+
* Requests and stores the browse response.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare const fetchAndSaveBrowseResponseWire: import("../../wiring").Wire<InternalBrowseRequest | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Requests and stores the enrichment results for the results.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare const fetchAndSaveResultsEnrichmentWire: import("../../wiring").Wire<import("@empathyco/x-types").Result[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the browse state `selectedCategory`.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const setBrowseCategory: import("../../wiring").Wire<import("@empathyco/x-types").BrowsableRequest>;
|
|
32
|
+
/**
|
|
33
|
+
* Clears the browse state `selectedCategory`.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare const clearBrowseQuery: import("../../wiring").AnyWire;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the browse state `selectedFilters`.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare const setSelectedFilters: import("../../wiring").Wire<import("@empathyco/x-types").Filter[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the browse state `sort`.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export declare const setSort: import("../../wiring").Wire<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the browse state `query`.
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare const setUrlParams: import("../../wiring").Wire<import("../..").UrlParams>;
|
|
56
|
+
/**
|
|
57
|
+
* Sets the browse state `page`.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare const setBrowsePage: import("../../wiring").Wire<number>;
|
|
62
|
+
/**
|
|
63
|
+
* Sets the browse state `params`.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export declare const setBrowseExtraParams: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
68
|
+
/**
|
|
69
|
+
* Resets the browse state to reload the current browse.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare const resetStateForReloadWire: import("../../wiring").AnyWire;
|
|
74
|
+
/**
|
|
75
|
+
* Resets the browse state `isNoResults`.
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export declare const resetIsNoResults: import("../../wiring").AnyWire;
|
|
80
|
+
/**
|
|
81
|
+
* Resets the browse state `fromNoResultsWithFilters`.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export declare const resetFromNoResultsWithFilters: import("../../wiring").AnyWire;
|
|
86
|
+
/**
|
|
87
|
+
* Increases the current browse state `page` by one.
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export declare const increasePageAppendingResultsWire: import("../../wiring").AnyWire;
|
|
92
|
+
/**
|
|
93
|
+
* Resets the browse state `isAppendingResults`.
|
|
94
|
+
*
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
export declare const resetAppending: import("../../wiring").AnyWire;
|
|
98
|
+
/**
|
|
99
|
+
* Resets the {@link BrowseGetters.request} parameters when refining request and before the actual
|
|
100
|
+
* request is launched.
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export declare const resetRequestOnRefinementWire: import("../../wiring").AnyWire;
|
|
105
|
+
/**
|
|
106
|
+
* Resets the browse state when the request is changed to null. See the
|
|
107
|
+
* {@link BrowseXStoreModule} for details.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export declare const resetStateIfNoRequestWire: import("../../wiring").Wire<InternalBrowseRequest | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Browse wiring.
|
|
114
|
+
*
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
export declare const browseWiring: {
|
|
118
|
+
ParamsLoadedFromUrl: {
|
|
119
|
+
setUrlParams: import("../../wiring").Wire<import("../..").UrlParams>;
|
|
120
|
+
saveOriginWire: import("../../wiring").AnyWire;
|
|
121
|
+
};
|
|
122
|
+
UserClickedABrowseSort: {
|
|
123
|
+
setSort: import("../../wiring").Wire<string>;
|
|
124
|
+
};
|
|
125
|
+
UserReachedResultsListEnd: {
|
|
126
|
+
increasePageAppendingResultsWire: import("../../wiring").AnyWire;
|
|
127
|
+
};
|
|
128
|
+
BrowseRequestUpdated: {
|
|
129
|
+
resetStateIfNoRequestWire: import("../../wiring").Wire<InternalBrowseRequest | null>;
|
|
130
|
+
fetchAndSaveBrowseResponseWire: import("../../wiring").Wire<InternalBrowseRequest | null>;
|
|
131
|
+
};
|
|
132
|
+
BrowseRequestChanged: {
|
|
133
|
+
resetRequestOnRefinementWire: import("../../wiring").AnyWire;
|
|
134
|
+
};
|
|
135
|
+
SelectedFiltersForRequestChanged: {
|
|
136
|
+
setSelectedFilters: import("../../wiring").Wire<import("@empathyco/x-types").Filter[]>;
|
|
137
|
+
};
|
|
138
|
+
ResultsChanged: {
|
|
139
|
+
resetAppending: import("../../wiring").AnyWire;
|
|
140
|
+
fetchAndSaveResultsEnrichmentWire: import("../../wiring").Wire<import("@empathyco/x-types").Result[]>;
|
|
141
|
+
};
|
|
142
|
+
ReloadBrowseRequested: {
|
|
143
|
+
resetStateForReloadWire: import("../../wiring").AnyWire;
|
|
144
|
+
};
|
|
145
|
+
SelectedSortProvided: {
|
|
146
|
+
setSort: import("../../wiring").Wire<string>;
|
|
147
|
+
};
|
|
148
|
+
ExtraParamsChanged: {
|
|
149
|
+
setBrowseExtraParams: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
150
|
+
};
|
|
151
|
+
UserClickedCloseX: {
|
|
152
|
+
clearBrowseQuery: import("../../wiring").AnyWire;
|
|
153
|
+
resetStateForReloadWire: import("../../wiring").AnyWire;
|
|
154
|
+
cancelFetchAndSaveBrowseResponseWire: import("../../wiring").AnyWire;
|
|
155
|
+
};
|
|
156
|
+
UserClickedOpenX: {
|
|
157
|
+
clearBrowseQuery: import("../../wiring").AnyWire;
|
|
158
|
+
resetStateForReloadWire: import("../../wiring").AnyWire;
|
|
159
|
+
cancelFetchAndSaveBrowseResponseWire: import("../../wiring").AnyWire;
|
|
160
|
+
};
|
|
161
|
+
UserClickedOutOfMainModal: {
|
|
162
|
+
clearBrowseQuery: import("../../wiring").AnyWire;
|
|
163
|
+
};
|
|
164
|
+
UserSelectedAPage: {
|
|
165
|
+
setBrowsePage: import("../../wiring").Wire<number>;
|
|
166
|
+
resetAppending: import("../../wiring").AnyWire;
|
|
167
|
+
};
|
|
168
|
+
UserBrowsedToCategory: {
|
|
169
|
+
setBrowseCategory: import("../../wiring").Wire<import("@empathyco/x-types").BrowsableRequest>;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=wiring.d.ts.map
|