@empathyco/x-components 10.13.0 → 10.15.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 +37 -0
- package/docs/API-reference/api/x-components.fetchandsavehooks.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavehooks.onsuccess.md +1 -1
- package/docs/API-reference/api/x-components.hierarchicalfilter.md +1 -0
- package/docs/API-reference/api/x-components.searchconfig.md +25 -0
- package/docs/API-reference/api/x-components.searchconfig.noresultsfallback.md +22 -0
- package/docs/API-reference/api/x-components.searchmutations.md +19 -0
- package/docs/API-reference/api/x-components.searchmutations.setisnoresultsfallback.md +13 -0
- package/docs/API-reference/api/x-components.searchstate.isnoresultsfallback.md +13 -0
- package/docs/API-reference/api/x-components.searchstate.md +19 -0
- package/docs/API-reference/api/x-components.searchxevents.md +19 -0
- package/docs/API-reference/api/x-components.searchxevents.noresultsfallbackextraparamsprovided.md +13 -0
- package/docs/API-reference/api/x-components.simplefilter.md +1 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +1 -0
- package/js/store/utils/fetch-and-save-action.utils.js +4 -2
- package/js/store/utils/fetch-and-save-action.utils.js.map +1 -1
- package/js/x-modules/extra-params/wiring.js +3 -0
- package/js/x-modules/extra-params/wiring.js.map +1 -1
- package/js/x-modules/query-suggestions/store/module.js +1 -1
- package/js/x-modules/query-suggestions/store/module.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +54 -6
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/module.js +4 -0
- package/js/x-modules/search/store/module.js.map +1 -1
- package/package.json +7 -7
- package/report/x-components.api.json +175 -8
- package/report/x-components.api.md +19 -5
- package/types/src/components/snippet-callbacks.vue.d.ts +1 -0
- package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
- package/types/src/store/utils/fetch-and-save-action.utils.d.ts +3 -1
- package/types/src/store/utils/fetch-and-save-action.utils.d.ts.map +1 -1
- package/types/src/x-modules/extra-params/wiring.d.ts +3 -0
- package/types/src/x-modules/extra-params/wiring.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +1 -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 +1 -0
- package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
- package/types/src/x-modules/search/config.types.d.ts +26 -0
- package/types/src/x-modules/search/config.types.d.ts.map +1 -1
- package/types/src/x-modules/search/events.types.d.ts +7 -0
- package/types/src/x-modules/search/events.types.d.ts.map +1 -1
- package/types/src/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/src/x-modules/search/store/module.d.ts +1 -0
- package/types/src/x-modules/search/store/module.d.ts.map +1 -1
- package/types/src/x-modules/search/store/types.d.ts +11 -0
- package/types/src/x-modules/search/store/types.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
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
|
+
## [10.15.0](https://github.com/empathyco/x/compare/@empathyco/x-components@10.3.0...@empathyco/x-components@10.15.0) (2026-11-24)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **base-modal:** add scrollLock prop to control page scroll behavior (#2200)
|
|
11
|
+
* **search:** add no-results fallback (#2205)
|
|
12
|
+
* **search:** add priceFacetId to SearchConfig and update request accordingly (#2194)
|
|
13
|
+
* set query suggestions debounce to 500 ms (#2209)
|
|
14
|
+
* **skills:** ship validated agent skills in every package (#2203)
|
|
15
|
+
* **x-components:** add responsive image props and loading events to BaseResultImage (#2195)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **ai:** set AI suggestions status to error when requests fail (ENG-2552) (#2204)
|
|
20
|
+
* change CSS selector for only child teleport (#2197)
|
|
21
|
+
* remove parent selector when BaseTeleport is unmounted (#2198)
|
|
22
|
+
* **vendor:** don't render the search results duplicated by vendor results (ENG-2618) (#2208)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [10.14.0](https://github.com/empathyco/x/compare/@empathyco/x-components@10.3.0...@empathyco/x-components@10.14.0) (2026-11-24)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **base-modal:** add scrollLock prop to control page scroll behavior (#2200)
|
|
30
|
+
* **search:** add no-results fallback (#2205)
|
|
31
|
+
* **search:** add priceFacetId to SearchConfig and update request accordingly (#2194)
|
|
32
|
+
* **skills:** ship validated agent skills in every package (#2203)
|
|
33
|
+
* **x-components:** add responsive image props and loading events to BaseResultImage (#2195)
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **ai:** set AI suggestions status to error when requests fail (ENG-2552) (#2204)
|
|
38
|
+
* change CSS selector for only child teleport (#2197)
|
|
39
|
+
* remove parent selector when BaseTeleport is unmounted (#2198)
|
|
40
|
+
* **vendor:** don't render the search results duplicated by vendor results (ENG-2618) (#2208)
|
|
41
|
+
|
|
42
|
+
|
|
6
43
|
## [10.13.0](https://github.com/empathyco/x/compare/@empathyco/x-components@10.3.0...@empathyco/x-components@10.13.0) (2026-11-23)
|
|
7
44
|
|
|
8
45
|
### Features
|
|
@@ -102,7 +102,7 @@ _(Optional)_ Asynchronous callback executed when either the [FetchAndSaveHooks.f
|
|
|
102
102
|
|
|
103
103
|
</td><td>
|
|
104
104
|
|
|
105
|
-
(context: Context, response: Response) => void
|
|
105
|
+
(context: Context, response: Response) => void \| boolean \| Promise<void \| boolean>
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
</td><td>
|
|
@@ -9,5 +9,5 @@ Asynchronous callback executed when the [FetchAndSaveHooks.fetch](./x-components
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
onSuccess: (context: Context, response: Response) => void
|
|
12
|
+
onSuccess: (context: Context, response: Response) => void | boolean | Promise<void | boolean>;
|
|
13
13
|
```
|
|
@@ -152,6 +152,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
152
152
|
UserPressedSearchButton?: string | undefined;
|
|
153
153
|
UserTalked?: string | undefined;
|
|
154
154
|
FacetsChanged?: import("@empathyco/x-types").Facet[] | undefined;
|
|
155
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
155
156
|
PageChanged?: number | undefined;
|
|
156
157
|
PartialResultsChanged?: import("@empathyco/x-types").PartialResult[] | undefined;
|
|
157
158
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -53,6 +53,31 @@ string
|
|
|
53
53
|
Catalog section sent when no catalog section has been selected, either because none was provided or because it was reset to an empty value.
|
|
54
54
|
|
|
55
55
|
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
59
|
+
[noResultsFallback?](./x-components.searchconfig.noresultsfallback.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</td><td>
|
|
66
|
+
|
|
67
|
+
{ catalogSection?: string; extraParams?: Record<string, string>; }
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
_(Optional)_ Values to search again with when a search returns no results, in a single new request: `{ catalogSection: 'section-a', extraParams: { market: 'market-b' } }`<!-- -->. It is applied at most once per search, and not if the selected catalog section or the search extra params already have those values.
|
|
73
|
+
|
|
74
|
+
The `catalogSection` becomes the selected catalog section. It is kept in the next searches until the user selects another section or the search is reset (the query is cleared, the layer is closed or the user browses to a category), and it changes even if the new search has no results either.
|
|
75
|
+
|
|
76
|
+
The `extraParams` are stored as extra params, with the keys of the request `extraParams` before the adapter maps them. They require the extra params module to be registered: without it, a fallback with `extraParams` does not search again and the status stays as `loading` until the next search.
|
|
77
|
+
|
|
78
|
+
The catalog section goes apart, in `catalogSection`<!-- -->, and not inside `extraParams`<!-- -->. The selected section is part of the search state, which is what the catalog section tabs read, and the search request sends it under the `catalogSectionParamKey`<!-- -->, taking precedence over the extra params. Inside `extraParams` the tabs would not change, and the value would not be sent if a section was already selected.
|
|
79
|
+
|
|
80
|
+
|
|
56
81
|
</td></tr>
|
|
57
82
|
<tr><td>
|
|
58
83
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [SearchConfig](./x-components.searchconfig.md) > [noResultsFallback](./x-components.searchconfig.noresultsfallback.md)
|
|
4
|
+
|
|
5
|
+
## SearchConfig.noResultsFallback property
|
|
6
|
+
|
|
7
|
+
Values to search again with when a search returns no results, in a single new request: `{ catalogSection: 'section-a', extraParams: { market: 'market-b' } }`<!-- -->. It is applied at most once per search, and not if the selected catalog section or the search extra params already have those values.
|
|
8
|
+
|
|
9
|
+
The `catalogSection` becomes the selected catalog section. It is kept in the next searches until the user selects another section or the search is reset (the query is cleared, the layer is closed or the user browses to a category), and it changes even if the new search has no results either.
|
|
10
|
+
|
|
11
|
+
The `extraParams` are stored as extra params, with the keys of the request `extraParams` before the adapter maps them. They require the extra params module to be registered: without it, a fallback with `extraParams` does not search again and the status stays as `loading` until the next search.
|
|
12
|
+
|
|
13
|
+
The catalog section goes apart, in `catalogSection`<!-- -->, and not inside `extraParams`<!-- -->. The selected section is part of the search state, which is what the catalog section tabs read, and the search request sends it under the `catalogSectionParamKey`<!-- -->, taking precedence over the extra params. Inside `extraParams` the tabs would not change, and the value would not be sent if a section was already selected.
|
|
14
|
+
|
|
15
|
+
**Signature:**
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
noResultsFallback?: {
|
|
19
|
+
catalogSection?: string;
|
|
20
|
+
extraParams?: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
```
|
|
@@ -225,6 +225,25 @@ Set the `isAppendResuls` flag value.
|
|
|
225
225
|
Sets the `isNoResults` flag value.
|
|
226
226
|
|
|
227
227
|
|
|
228
|
+
</td></tr>
|
|
229
|
+
<tr><td>
|
|
230
|
+
|
|
231
|
+
[setIsNoResultsFallback](./x-components.searchmutations.setisnoresultsfallback.md)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
</td><td>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
</td><td>
|
|
238
|
+
|
|
239
|
+
(isNoResultsFallback: boolean) => void
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</td><td>
|
|
243
|
+
|
|
244
|
+
Sets the `isNoResultsFallback` flag value.
|
|
245
|
+
|
|
246
|
+
|
|
228
247
|
</td></tr>
|
|
229
248
|
<tr><td>
|
|
230
249
|
|
|
@@ -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) > [SearchMutations](./x-components.searchmutations.md) > [setIsNoResultsFallback](./x-components.searchmutations.setisnoresultsfallback.md)
|
|
4
|
+
|
|
5
|
+
## SearchMutations.setIsNoResultsFallback property
|
|
6
|
+
|
|
7
|
+
Sets the `isNoResultsFallback` flag value.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setIsNoResultsFallback: (isNoResultsFallback: boolean) => void;
|
|
13
|
+
```
|
|
@@ -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) > [SearchState](./x-components.searchstate.md) > [isNoResultsFallback](./x-components.searchstate.isnoresultsfallback.md)
|
|
4
|
+
|
|
5
|
+
## SearchState.isNoResultsFallback property
|
|
6
|
+
|
|
7
|
+
Flag indicating that the search in progress is the one of the `noResultsFallback`<!-- -->, so it is not applied again.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
isNoResultsFallback: boolean;
|
|
13
|
+
```
|
|
@@ -187,6 +187,25 @@ boolean
|
|
|
187
187
|
Flag indicating if there is a no results situation.
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
</td></tr>
|
|
191
|
+
<tr><td>
|
|
192
|
+
|
|
193
|
+
[isNoResultsFallback](./x-components.searchstate.isnoresultsfallback.md)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
</td><td>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</td><td>
|
|
200
|
+
|
|
201
|
+
boolean
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
</td><td>
|
|
205
|
+
|
|
206
|
+
Flag indicating that the search in progress is the one of the `noResultsFallback`<!-- -->, so it is not applied again.
|
|
207
|
+
|
|
208
|
+
|
|
190
209
|
</td></tr>
|
|
191
210
|
<tr><td>
|
|
192
211
|
|
|
@@ -53,6 +53,25 @@ Facet\[\]
|
|
|
53
53
|
The facets have changed. Payload: The [facets](./x-types.facet.md) array.
|
|
54
54
|
|
|
55
55
|
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
59
|
+
[NoResultsFallbackExtraParamsProvided](./x-components.searchxevents.noresultsfallbackextraparamsprovided.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</td><td>
|
|
66
|
+
|
|
67
|
+
Dictionary<unknown>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
The `noResultsFallback` extra params have been provided, as a search without results is going to be searched again with them. Payload: The extra params of the fallback.
|
|
73
|
+
|
|
74
|
+
|
|
56
75
|
</td></tr>
|
|
57
76
|
<tr><td>
|
|
58
77
|
|
package/docs/API-reference/api/x-components.searchxevents.noresultsfallbackextraparamsprovided.md
ADDED
|
@@ -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) > [SearchXEvents](./x-components.searchxevents.md) > [NoResultsFallbackExtraParamsProvided](./x-components.searchxevents.noresultsfallbackextraparamsprovided.md)
|
|
4
|
+
|
|
5
|
+
## SearchXEvents.NoResultsFallbackExtraParamsProvided property
|
|
6
|
+
|
|
7
|
+
The `noResultsFallback` extra params have been provided, as a search without results is going to be searched again with them. Payload: The extra params of the fallback.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
NoResultsFallbackExtraParamsProvided: Dictionary<unknown>;
|
|
13
|
+
```
|
|
@@ -149,6 +149,7 @@ _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
|
149
149
|
UserPressedSearchButton?: string | undefined;
|
|
150
150
|
UserTalked?: string | undefined;
|
|
151
151
|
FacetsChanged?: import("@empathyco/x-types").Facet[] | undefined;
|
|
152
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
152
153
|
PageChanged?: number | undefined;
|
|
153
154
|
PartialResultsChanged?: import("@empathyco/x-types").PartialResult[] | undefined;
|
|
154
155
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -139,6 +139,7 @@ _default: import("vue").DefineComponent<{}, {
|
|
|
139
139
|
UserPressedSearchButton: (payload: string, metadata: WireMetadata) => unknown;
|
|
140
140
|
UserTalked: (payload: string, metadata: WireMetadata) => unknown;
|
|
141
141
|
FacetsChanged: (payload: import("@empathyco/x-types").Facet[], metadata: WireMetadata) => unknown;
|
|
142
|
+
NoResultsFallbackExtraParamsProvided: (payload: import("@empathyco/x-utils").Dictionary<unknown>, metadata: WireMetadata) => unknown;
|
|
142
143
|
PageChanged: (payload: number, metadata: WireMetadata) => unknown;
|
|
143
144
|
PartialResultsChanged: (payload: import("@empathyco/x-types").PartialResult[], metadata: WireMetadata) => unknown;
|
|
144
145
|
ReloadSearchRequested: (payload: undefined, metadata: WireMetadata) => unknown;
|
|
@@ -20,8 +20,10 @@ function createFetchAndSaveActions({ fetch, onSuccess, onError = console.error,
|
|
|
20
20
|
* @returns A Promise that resolves after handling the response.
|
|
21
21
|
*/
|
|
22
22
|
async function handleResponse(context, response) {
|
|
23
|
-
return Promise.resolve(onSuccess(context, response)).then(
|
|
24
|
-
|
|
23
|
+
return Promise.resolve(onSuccess(context, response)).then(result => {
|
|
24
|
+
if (result !== false) {
|
|
25
|
+
context.commit('setStatus', 'success');
|
|
26
|
+
}
|
|
25
27
|
});
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-action.utils.js","sources":["../../../../src/store/utils/fetch-and-save-action.utils.ts"],"sourcesContent":["import type { XActionContext } from '../actions.types'\nimport type { StatusMutations, StatusState } from './status-store.utils'\nimport { cancellablePromise, CancelSymbol } from '../../utils/cancellable-promise'\n\n/**\n * Utility to create an action that requests and save some data asynchronously, with the\n * option to cancel the request at any moment. This factory provides with the standard flow\n * for requesting, cancelling, handling errors for a module, while also taking care of its status.\n *\n * @param hooks - The {@link FetchAndSaveHooks} hooks to create the action.\n * @public\n * @returns An action to fetch and save some data, and an action to cancel the last request.\n */\nexport function createFetchAndSaveActions<\n // Using `object` type to ensure no actions/getters can be used.\n Context extends XActionContext<StatusState, object, StatusMutations, object>,\n Request,\n Response,\n>({\n fetch,\n onSuccess,\n onError = console.error,\n onCancel,\n}: FetchAndSaveHooks<Context, Request, Response>): FetchAndSaveActions<Context, Request> {\n let cancelPreviousRequest: undefined | (() => void)\n\n /**\n * Called asynchronously after a response has been received.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @param response - The fetch response.\n * @returns A Promise that resolves after handling the response.\n */\n async function handleResponse(context: Context, response: Response): Promise<void> {\n return Promise.resolve(onSuccess(context, response)).then(
|
|
1
|
+
{"version":3,"file":"fetch-and-save-action.utils.js","sources":["../../../../src/store/utils/fetch-and-save-action.utils.ts"],"sourcesContent":["import type { XActionContext } from '../actions.types'\nimport type { StatusMutations, StatusState } from './status-store.utils'\nimport { cancellablePromise, CancelSymbol } from '../../utils/cancellable-promise'\n\n/**\n * Utility to create an action that requests and save some data asynchronously, with the\n * option to cancel the request at any moment. This factory provides with the standard flow\n * for requesting, cancelling, handling errors for a module, while also taking care of its status.\n *\n * @param hooks - The {@link FetchAndSaveHooks} hooks to create the action.\n * @public\n * @returns An action to fetch and save some data, and an action to cancel the last request.\n */\nexport function createFetchAndSaveActions<\n // Using `object` type to ensure no actions/getters can be used.\n Context extends XActionContext<StatusState, object, StatusMutations, object>,\n Request,\n Response,\n>({\n fetch,\n onSuccess,\n onError = console.error,\n onCancel,\n}: FetchAndSaveHooks<Context, Request, Response>): FetchAndSaveActions<Context, Request> {\n let cancelPreviousRequest: undefined | (() => void)\n\n /**\n * Called asynchronously after a response has been received.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @param response - The fetch response.\n * @returns A Promise that resolves after handling the response.\n */\n async function handleResponse(context: Context, response: Response): Promise<void> {\n return Promise.resolve(onSuccess(context, response)).then(result => {\n if (result !== false) {\n context.commit('setStatus', 'success')\n }\n })\n }\n\n /**\n * Called immediately after a request has been cancelled.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n */\n function handleCancel(context: Context): void {\n cancelPreviousRequest = undefined\n context.commit('setStatus', 'success')\n onCancel?.()\n }\n\n /**\n * Called asynchronously whenever an error happens in the fetch and save flow.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @param error - The error information.\n */\n function handleError(context: Context, error: unknown): void {\n if (error !== CancelSymbol) {\n context.commit('setStatus', 'error')\n onError(error)\n }\n }\n\n /** @see FetchAndSaveActions.fetchAndSave */\n async function fetchAndSave(context: Context, request: Request): Promise<void> {\n cancelPrevious()\n context.commit('setStatus', 'loading')\n const { promise, cancel } = cancellablePromise(fetch(context, request), () => {\n handleCancel(context)\n })\n\n cancelPreviousRequest = cancel\n return promise\n .then(async response => handleResponse(context, response))\n .catch(error => handleError(context, error))\n }\n\n /** @see FetchAndSaveActions.cancelPrevious */\n function cancelPrevious(): void {\n cancelPreviousRequest?.()\n }\n\n return {\n fetchAndSave,\n cancelPrevious,\n }\n}\n\n/**\n * Options to use with the {@link createFetchAndSaveActions} factory.\n *\n * @public\n */\nexport interface FetchAndSaveHooks<\n // Using `object` type to ensure no actions/getters can be used.\n Context extends XActionContext<StatusState, object, StatusMutations, object>,\n Request,\n Response,\n> {\n /**\n * Retrieves and returns asynchronously some data.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @param request - The request object used for fetching.\n * @returns A Promise resolved with the response of the fetch request.\n */\n fetch: (context: Context, request: Request) => Promise<Response>\n /**\n * Asynchronous callback executed when the {@link FetchAndSaveHooks.fetch} is\n * performed successfully.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @param response - The data returned by {@link FetchAndSaveHooks.fetch}.\n * @returns `false` to not set the status to `success`, because another request is going to\n * resolve it. Any other value sets it.\n */\n onSuccess: (context: Context, response: Response) => void | boolean | Promise<void | boolean>\n /**\n * Asynchronous callback executed when either the {@link FetchAndSaveHooks.fetch}\n * or {@link FetchAndSaveHooks.onSuccess} methods fail.\n *\n * @param error - The error that triggered this callback.\n */\n onError?: (error: unknown) => void\n /**\n * Synchronous callback executed when the request is cancelled. This can happen mainly for two\n * reasons:\n * - The {@link FetchAndSaveActions.cancelPrevious} action is dispatched.\n * - A new {@link FetchAndSaveActions.fetchAndSave} is dispatched before the previous one was\n * resolved.\n */\n onCancel?: () => void\n}\n\n/**\n * Actions returned from the {@link createFetchAndSaveActions}.\n *\n * @public\n */\nexport interface FetchAndSaveActions<\n // Using `object` type to ensure no actions/getters can be used.\n Context extends XActionContext<StatusState, object, StatusMutations, object>,\n Request,\n> {\n /**\n * Action that requests and saves the response.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n * @returns A promise that resolves after saving the response.\n */\n fetchAndSave: (context: Context, request: Request) => void | Promise<void>\n /**\n * Action that cancels the previous request call if it stills in progress.\n */\n cancelPrevious: () => void\n}\n"],"names":[],"mappings":";;AAIA;;;;;;;;AAQG;AACG,SAAU,yBAAyB,CAKvC,EACA,KAAK,EACL,SAAS,EACT,OAAO,GAAG,OAAO,CAAC,KAAK,EACvB,QAAQ,GACsC,EAAA;AAC9C,IAAA,IAAI,qBAA+C;AAEnD;;;;;;;AAOG;AACH,IAAA,eAAe,cAAc,CAAC,OAAgB,EAAE,QAAkB,EAAA;AAChE,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAG;AACjE,YAAA,IAAI,MAAM,KAAK,KAAK,EAAE;AACpB,gBAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;YACxC;AACF,QAAA,CAAC,CAAC;IACJ;AAEA;;;;;AAKG;IACH,SAAS,YAAY,CAAC,OAAgB,EAAA;QACpC,qBAAqB,GAAG,SAAS;AACjC,QAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;QACtC,QAAQ,IAAI;IACd;AAEA;;;;;;AAMG;AACH,IAAA,SAAS,WAAW,CAAC,OAAgB,EAAE,KAAc,EAAA;AACnD,QAAA,IAAI,KAAK,KAAK,YAAY,EAAE;AAC1B,YAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC;QAChB;IACF;;AAGA,IAAA,eAAe,YAAY,CAAC,OAAgB,EAAE,OAAgB,EAAA;AAC5D,QAAA,cAAc,EAAE;AAChB,QAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;AACtC,QAAA,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAK;YAC3E,YAAY,CAAC,OAAO,CAAC;AACvB,QAAA,CAAC,CAAC;QAEF,qBAAqB,GAAG,MAAM;AAC9B,QAAA,OAAO;AACJ,aAAA,IAAI,CAAC,OAAM,QAAQ,KAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC;AACxD,aAAA,KAAK,CAAC,KAAK,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAChD;;AAGA,IAAA,SAAS,cAAc,GAAA;QACrB,qBAAqB,IAAI;IAC3B;IAEA,OAAO;QACL,YAAY;QACZ,cAAc;KACf;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/extra-params/wiring.ts"],"sourcesContent":["import { namespacedWireCommit } from '../../wiring'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * WireCommit for {@link ExtraParamsXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('extraParams')\n\n/**\n * Sets the extra params of the {@link ExtraParamsXModule}.\n *\n * @public\n */\nexport const setExtraParams = wireCommit('setParams')\n\n/**\n * Wiring configuration for the {@link ExtraParamsXModule | extraParams module}.\n *\n * @internal\n */\nexport const extraParamsWiring = createWiring({\n UserChangedExtraParams: {\n setExtraParams,\n },\n ExtraParamsProvided: {\n setExtraParams,\n },\n ExtraParamsLoadedFromUrl: {\n setExtraParams,\n },\n})\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,aAAa,CAAC;AAEtD;;;;AAIG;MACU,cAAc,GAAG,UAAU,CAAC,WAAW;AAEpD;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC5C,IAAA,sBAAsB,EAAE;QACtB,cAAc;AACf,KAAA;AACD,IAAA,mBAAmB,EAAE;QACnB,cAAc;AACf,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,cAAc;AACf,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/extra-params/wiring.ts"],"sourcesContent":["import { namespacedWireCommit } from '../../wiring'\nimport { createWiring } from '../../wiring/wiring.utils'\n\n/**\n * WireCommit for {@link ExtraParamsXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('extraParams')\n\n/**\n * Sets the extra params of the {@link ExtraParamsXModule}.\n *\n * @public\n */\nexport const setExtraParams = wireCommit('setParams')\n\n/**\n * Wiring configuration for the {@link ExtraParamsXModule | extraParams module}.\n *\n * @internal\n */\nexport const extraParamsWiring = createWiring({\n UserChangedExtraParams: {\n setExtraParams,\n },\n ExtraParamsProvided: {\n setExtraParams,\n },\n NoResultsFallbackExtraParamsProvided: {\n setExtraParams,\n },\n ExtraParamsLoadedFromUrl: {\n setExtraParams,\n },\n})\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,aAAa,CAAC;AAEtD;;;;AAIG;MACU,cAAc,GAAG,UAAU,CAAC,WAAW;AAEpD;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC5C,IAAA,sBAAsB,EAAE;QACtB,cAAc;AACf,KAAA;AACD,IAAA,mBAAmB,EAAE;QACnB,cAAc;AACf,KAAA;AACD,IAAA,oCAAoC,EAAE;QACpC,cAAc;AACf,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,cAAc;AACf,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/query-suggestions/store/module.ts"],"sourcesContent":["import type { QuerySuggestionsXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setStatus } from '../../../store/utils/status-store.utils'\nimport {\n cancelFetchAndSaveSuggestions,\n fetchAndSaveSuggestions,\n} from './actions/fetch-and-save-suggestions.action'\nimport { fetchSuggestions } from './actions/fetch-suggestions.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { normalizedQuery } from './getters/normalized-query.getter'\nimport { querySuggestions } from './getters/query-suggestions.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the query-suggestions module.\n *\n * @internal\n */\nexport const querySuggestionsXStoreModule: QuerySuggestionsXStoreModule = {\n state: () => ({\n query: '',\n suggestions: [],\n searchedQueries: [],\n status: 'initial',\n config: {\n debounceInMs:
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/query-suggestions/store/module.ts"],"sourcesContent":["import type { QuerySuggestionsXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setStatus } from '../../../store/utils/status-store.utils'\nimport {\n cancelFetchAndSaveSuggestions,\n fetchAndSaveSuggestions,\n} from './actions/fetch-and-save-suggestions.action'\nimport { fetchSuggestions } from './actions/fetch-suggestions.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { normalizedQuery } from './getters/normalized-query.getter'\nimport { querySuggestions } from './getters/query-suggestions.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the query-suggestions module.\n *\n * @internal\n */\nexport const querySuggestionsXStoreModule: QuerySuggestionsXStoreModule = {\n state: () => ({\n query: '',\n suggestions: [],\n searchedQueries: [],\n status: 'initial',\n config: {\n debounceInMs: 500,\n maxItemsToRequest: 10,\n hideIfEqualsQuery: true,\n hideSessionQueries: true,\n },\n params: {},\n }),\n getters: {\n request,\n normalizedQuery,\n querySuggestions,\n },\n mutations: {\n setQuery,\n setSuggestions(state, suggestions) {\n state.suggestions = suggestions\n },\n setSearchedQueries(state, searchedQueries) {\n state.searchedQueries = searchedQueries\n },\n setStatus,\n setParams(state, params) {\n state.params = params\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n cancelFetchAndSaveSuggestions,\n fetchSuggestions,\n fetchAndSaveSuggestions,\n setUrlParams,\n },\n}\n"],"names":[],"mappings":";;;;;;;;;;AAcA;;;;AAIG;AACI,MAAM,4BAA4B,GAAiC;AACxE,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,MAAM,EAAE;AACN,YAAA,YAAY,EAAE,GAAG;AACjB,YAAA,iBAAiB,EAAE,EAAE;AACrB,YAAA,iBAAiB,EAAE,IAAI;AACvB,YAAA,kBAAkB,EAAE,IAAI;AACzB,SAAA;AACD,QAAA,MAAM,EAAE,EAAE;KACX,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,eAAe;QACf,gBAAgB;AACjB,KAAA;AACD,IAAA,SAAS,EAAE;QACT,QAAQ;QACR,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAA;AACvC,YAAA,KAAK,CAAC,eAAe,GAAG,eAAe;QACzC,CAAC;QACD,SAAS;QACT,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM;QACvB,CAAC;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,6BAA6B;QAC7B,gBAAgB;QAChB,uBAAuB;QACvB,YAAY;AACb,KAAA;;;;;"}
|
|
@@ -1,17 +1,65 @@
|
|
|
1
|
+
import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
1
2
|
import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils.js';
|
|
2
3
|
|
|
3
4
|
const { fetchAndSave, cancelPrevious } = createFetchAndSaveActions({
|
|
4
|
-
async fetch({ dispatch, state }, request) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
async fetch({ commit, dispatch, state }, request) {
|
|
6
|
+
if (!request) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const isNoResultsFallback = state.isNoResultsFallback;
|
|
10
|
+
const fallback = state.config.noResultsFallback;
|
|
11
|
+
// The flag is cleared when the next request starts, not when it ends, so a new query that
|
|
12
|
+
// cancels the one of the fallback does not inherit it.
|
|
13
|
+
commit('setIsNoResultsFallback', false);
|
|
14
|
+
const response = await dispatch('fetchSearchResponse', enrichRequest(request, state));
|
|
15
|
+
const shouldApplyFallback = !isNoResultsFallback && response.totalResults === 0 && needsFallback(fallback, state);
|
|
16
|
+
return shouldApplyFallback ? { response, fallback } : { response };
|
|
8
17
|
},
|
|
9
|
-
onSuccess({ dispatch },
|
|
10
|
-
if (
|
|
18
|
+
onSuccess({ commit, dispatch }, payload) {
|
|
19
|
+
if (payload === null) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const { response, fallback } = payload;
|
|
23
|
+
if (!fallback) {
|
|
11
24
|
void dispatch('saveSearchResponse', response);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// The response without results is not saved. Changing the state makes the request change,
|
|
28
|
+
// which searches again with the fallback values.
|
|
29
|
+
// Marks the next request as the fallback one, so it is not applied twice.
|
|
30
|
+
commit('setIsNoResultsFallback', true);
|
|
31
|
+
// Both changes end in a single new request: the `Provided` suffix gives the event priority in
|
|
32
|
+
// the bus, so the extra params are stored before the request watcher runs, and it sees both.
|
|
33
|
+
if (fallback.extraParams) {
|
|
34
|
+
void XPlugin.bus.emit('NoResultsFallbackExtraParamsProvided', fallback.extraParams);
|
|
12
35
|
}
|
|
36
|
+
if (fallback.catalogSection !== undefined) {
|
|
37
|
+
commit('setCatalogSection', fallback.catalogSection);
|
|
38
|
+
}
|
|
39
|
+
// The status stays as `loading`: the new request resolves it, so no event is emitted with
|
|
40
|
+
// the state of the response that was not saved.
|
|
41
|
+
return false;
|
|
13
42
|
},
|
|
14
43
|
});
|
|
44
|
+
/**
|
|
45
|
+
* Checks if the `noResultsFallback` values still need to be applied. They are only needed if the
|
|
46
|
+
* search does not have them already, otherwise they would be applied again on every search without
|
|
47
|
+
* results.
|
|
48
|
+
*
|
|
49
|
+
* @param fallback - The configured `noResultsFallback`, if any.
|
|
50
|
+
* @param state - {@link SearchState}.
|
|
51
|
+
*
|
|
52
|
+
* @returns True if there is a fallback whose values are not in the state yet.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
function needsFallback(fallback, state) {
|
|
56
|
+
if (!fallback) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const isSectionPending = fallback.catalogSection !== undefined && state.catalogSection !== fallback.catalogSection;
|
|
60
|
+
const areParamsPending = Object.entries(fallback.extraParams ?? {}).some(([key, value]) => state.params[key] !== value);
|
|
61
|
+
return isSectionPending || areParamsPending;
|
|
62
|
+
}
|
|
15
63
|
/**
|
|
16
64
|
* Enriches the {@link SearchRequest} object with the origin and page properties taken from the
|
|
17
65
|
* {@link SearchState | search state}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"sourcesContent":["import type { SearchRequest, SearchResponse } from '@empathyco/x-types'\nimport type { InternalSearchRequest } from '../../types'\nimport type { SearchActionContext, SearchState } from '../types'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n InternalSearchRequest | null,\n
|
|
1
|
+
{"version":3,"file":"fetch-and-save-search-response.action.js","sources":["../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"sourcesContent":["import type { SearchRequest, SearchResponse } from '@empathyco/x-types'\nimport type { SearchConfig } from '../../config.types'\nimport type { InternalSearchRequest } from '../../types'\nimport type { SearchActionContext, SearchState } from '../types'\nimport { XPlugin } from '../../../../plugins/x-plugin'\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils'\n\ninterface FetchedSearch {\n response: SearchResponse\n /** The `noResultsFallback` to apply instead of saving the response, if it is needed. */\n fallback?: NonNullable<SearchConfig['noResultsFallback']>\n}\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n SearchActionContext,\n InternalSearchRequest | null,\n FetchedSearch | null\n>({\n async fetch({ commit, dispatch, state }, request) {\n if (!request) {\n return null\n }\n const isNoResultsFallback = state.isNoResultsFallback\n const fallback = state.config.noResultsFallback\n\n // The flag is cleared when the next request starts, not when it ends, so a new query that\n // cancels the one of the fallback does not inherit it.\n commit('setIsNoResultsFallback', false)\n\n const response = await dispatch('fetchSearchResponse', enrichRequest(request, state))\n\n const shouldApplyFallback =\n !isNoResultsFallback && response.totalResults === 0 && needsFallback(fallback, state)\n\n return shouldApplyFallback ? { response, fallback } : { response }\n },\n onSuccess({ commit, dispatch }, payload) {\n if (payload === null) {\n return\n }\n\n const { response, fallback } = payload\n if (!fallback) {\n void dispatch('saveSearchResponse', response)\n return\n }\n\n // The response without results is not saved. Changing the state makes the request change,\n // which searches again with the fallback values.\n\n // Marks the next request as the fallback one, so it is not applied twice.\n commit('setIsNoResultsFallback', true)\n\n // Both changes end in a single new request: the `Provided` suffix gives the event priority in\n // the bus, so the extra params are stored before the request watcher runs, and it sees both.\n if (fallback.extraParams) {\n void XPlugin.bus.emit('NoResultsFallbackExtraParamsProvided', fallback.extraParams)\n }\n if (fallback.catalogSection !== undefined) {\n commit('setCatalogSection', fallback.catalogSection)\n }\n\n // The status stays as `loading`: the new request resolves it, so no event is emitted with\n // the state of the response that was not saved.\n return false\n },\n})\n\n/**\n * Checks if the `noResultsFallback` values still need to be applied. They are only needed if the\n * search does not have them already, otherwise they would be applied again on every search without\n * results.\n *\n * @param fallback - The configured `noResultsFallback`, if any.\n * @param state - {@link SearchState}.\n *\n * @returns True if there is a fallback whose values are not in the state yet.\n * @internal\n */\nfunction needsFallback(\n fallback: SearchConfig['noResultsFallback'],\n state: SearchState,\n): fallback is NonNullable<SearchConfig['noResultsFallback']> {\n if (!fallback) {\n return false\n }\n const isSectionPending =\n fallback.catalogSection !== undefined && state.catalogSection !== fallback.catalogSection\n const areParamsPending = Object.entries(fallback.extraParams ?? {}).some(\n ([key, value]) => state.params[key] !== value,\n )\n return isSectionPending || areParamsPending\n}\n\n/**\n * Enriches the {@link SearchRequest} object with the origin and page properties taken from the\n * {@link SearchState | search state}.\n *\n * @param request - The {@link InternalSearchRequest}.\n * @param state - {@link SearchState}.\n *\n * @returns The search request.\n * @internal\n */\nfunction enrichRequest(request: InternalSearchRequest, state: SearchState): SearchRequest {\n const { page, ...restRequest } = request\n const {\n config: { pageSize, pageMode },\n origin,\n results,\n } = state\n\n let start\n if (pageMode === 'infinite_scroll') {\n start = page === 1 ? 0 : results.length\n } else {\n start = state.config.pageSize * (page - 1)\n }\n\n const rows = pageMode === 'infinite_scroll' ? pageSize * page - start : pageSize\n\n return {\n ...restRequest,\n ...(origin && { origin }),\n start,\n rows,\n }\n}\n\n/**\n * Default implementation for {@link SearchActions.fetchAndSaveSearchResponse} action.\n *\n * @public\n */\nexport const fetchAndSaveSearchResponse = fetchAndSave\n\n/**\n * Default implementation for {@link SearchActions.cancelFetchAndSaveSearchResponse} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveSear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Q,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ;IAEhF,OAAO;AACL,QAAA,GAAG,WAAW;AACd,QAAA,IAAI,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;QACzB,KAAK;QACL,IAAI;KACL;AACH;AAEA;;;;AAIG;AACI,MAAM,0BAA0B,GAAG;AAE1C;;;;AAIG;AACI,MAAM,gCAAgC,GAAG;;;;"}
|
|
@@ -94,6 +94,9 @@ const searchXStoreModule = {
|
|
|
94
94
|
setIsAppendResults(state, isAppendResults) {
|
|
95
95
|
state.isAppendResults = isAppendResults;
|
|
96
96
|
},
|
|
97
|
+
setIsNoResultsFallback(state, isNoResultsFallback) {
|
|
98
|
+
state.isNoResultsFallback = isNoResultsFallback;
|
|
99
|
+
},
|
|
97
100
|
setIsNoResults(state, isNoResults) {
|
|
98
101
|
state.isNoResults = isNoResults;
|
|
99
102
|
},
|
|
@@ -160,6 +163,7 @@ function resettableState() {
|
|
|
160
163
|
page: 1,
|
|
161
164
|
origin: null,
|
|
162
165
|
isAppendResults: false,
|
|
166
|
+
isNoResultsFallback: false,
|
|
163
167
|
redirections: [],
|
|
164
168
|
queryTagging: {
|
|
165
169
|
url: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import type { Stats } from '@empathyco/x-types'\nimport type { SearchXStoreModule } from './types'\nimport { isFacetFilter } from '@empathyco/x-types'\nimport { setStatus } from '../../../store'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { groupItemsBy } from '../../../utils/array'\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants'\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse,\n} from './actions'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/query.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n ...resettableState(),\n selectedFilters: {},\n params: {},\n catalogSection: undefined,\n config: {\n threshold: 24,\n pageSize: 24,\n pageMode: 'infinite_scroll',\n defaultCatalogSection: '',\n priceSortField: 'price',\n },\n status: 'initial',\n isNoResults: false,\n fromNoResultsWithFilters: false,\n }),\n getters: {\n request,\n query,\n },\n mutations: {\n appendResults(state, results) {\n state.results = [...state.results, ...results]\n },\n resetState(state) {\n Object.assign(state, resettableState())\n },\n resetStateForReload(state) {\n const { query, facets, sort, page, ...resettable } = resettableState()\n Object.assign(state, resettable)\n },\n setQuery,\n setResults(state, results) {\n state.results = results\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults\n },\n setFacets(state, facets) {\n state.facets = facets\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY,\n )\n },\n setBanners(state, banners) {\n state.banners = banners\n },\n setCatalogSection(state, catalogSection) {\n state.catalogSection = catalogSection\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults\n },\n setSort(state, sort) {\n state.sort = sort\n },\n setPage(state, page) {\n state.page = page\n },\n setConfig,\n mergeConfig,\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults\n },\n setIsNoResults(state, isNoResults) {\n state.isNoResults = isNoResults\n },\n setFromNoResultsWithFilters(state, fromNoResultsWithFilters) {\n state.fromNoResultsWithFilters = fromNoResultsWithFilters\n },\n setStatus,\n setParams(state, params) {\n state.params = params\n },\n setOrigin(state, origin = null) {\n state.origin = origin\n },\n setRedirections(state, redirections) {\n state.redirections = redirections\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging\n },\n setDisplayTagging(state, displayTagging) {\n state.displayTagging = displayTagging\n },\n updateResult(state, result) {\n const stateResult = state.results.find(stateResult => result.id === stateResult.id)\n if (stateResult) {\n Object.assign(stateResult, result)\n }\n },\n setStats(state, stats) {\n state.stats = stats\n },\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveOrigin,\n saveSearchResponse,\n setUrlParams,\n },\n}\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link SearchState}.\n *\n * @internal\n */\nexport function resettableState() {\n return {\n query: '',\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n totalResults: 0,\n spellcheckedQuery: '',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {},\n },\n displayTagging: {\n url: '',\n params: {},\n },\n stats: {} as Stats,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA;;;;AAIG;AACI,MAAM,kBAAkB,GAAuB;AACpD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,eAAe,EAAE;AACpB,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,cAAc,EAAE,SAAS;AACzB,QAAA,MAAM,EAAE;AACN,YAAA,SAAS,EAAE,EAAE;AACb,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,QAAQ,EAAE,iBAAiB;AAC3B,YAAA,qBAAqB,EAAE,EAAE;AACzB,YAAA,cAAc,EAAE,OAAO;AACxB,SAAA;AACD,QAAA,MAAM,EAAE,SAAS;AACjB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A,YAAY,EAAE;AACZ,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,MAAM,EAAE,EAAE;AACX,SAAA;AACD,QAAA,cAAc,EAAE;AACd,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,MAAM,EAAE,EAAE;AACX,SAAA;AACD,QAAA,KAAK,EAAE,EAAW;KACnB;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/search/store/module.ts"],"sourcesContent":["import type { Stats } from '@empathyco/x-types'\nimport type { SearchXStoreModule } from './types'\nimport { isFacetFilter } from '@empathyco/x-types'\nimport { setStatus } from '../../../store'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { groupItemsBy } from '../../../utils/array'\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants'\nimport {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveSearchResponse,\n} from './actions'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/query.getter'\nimport { request } from './getters/request.getter'\n\n/**\n * {@link XStoreModule} For the search module.\n *\n * @internal\n */\nexport const searchXStoreModule: SearchXStoreModule = {\n state: () => ({\n ...resettableState(),\n selectedFilters: {},\n params: {},\n catalogSection: undefined,\n config: {\n threshold: 24,\n pageSize: 24,\n pageMode: 'infinite_scroll',\n defaultCatalogSection: '',\n priceSortField: 'price',\n },\n status: 'initial',\n isNoResults: false,\n fromNoResultsWithFilters: false,\n }),\n getters: {\n request,\n query,\n },\n mutations: {\n appendResults(state, results) {\n state.results = [...state.results, ...results]\n },\n resetState(state) {\n Object.assign(state, resettableState())\n },\n resetStateForReload(state) {\n const { query, facets, sort, page, ...resettable } = resettableState()\n Object.assign(state, resettable)\n },\n setQuery,\n setResults(state, results) {\n state.results = results\n },\n setPartialResults(state, partialResults) {\n state.partialResults = partialResults\n },\n setFacets(state, facets) {\n state.facets = facets\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY,\n )\n },\n setBanners(state, banners) {\n state.banners = banners\n },\n setCatalogSection(state, catalogSection) {\n state.catalogSection = catalogSection\n },\n setPromoteds(state, promoteds) {\n state.promoteds = promoteds\n },\n setSpellcheck(state, spellcheckedQuery) {\n state.spellcheckedQuery = spellcheckedQuery\n },\n setTotalResults(state, totalResults) {\n state.totalResults = totalResults\n },\n setSort(state, sort) {\n state.sort = sort\n },\n setPage(state, page) {\n state.page = page\n },\n setConfig,\n mergeConfig,\n setIsAppendResults(state, isAppendResults) {\n state.isAppendResults = isAppendResults\n },\n setIsNoResultsFallback(state, isNoResultsFallback) {\n state.isNoResultsFallback = isNoResultsFallback\n },\n setIsNoResults(state, isNoResults) {\n state.isNoResults = isNoResults\n },\n setFromNoResultsWithFilters(state, fromNoResultsWithFilters) {\n state.fromNoResultsWithFilters = fromNoResultsWithFilters\n },\n setStatus,\n setParams(state, params) {\n state.params = params\n },\n setOrigin(state, origin = null) {\n state.origin = origin\n },\n setRedirections(state, redirections) {\n state.redirections = redirections\n },\n setQueryTagging(state, queryTagging) {\n state.queryTagging = queryTagging\n },\n setDisplayTagging(state, displayTagging) {\n state.displayTagging = displayTagging\n },\n updateResult(state, result) {\n const stateResult = state.results.find(stateResult => result.id === stateResult.id)\n if (stateResult) {\n Object.assign(stateResult, result)\n }\n },\n setStats(state, stats) {\n state.stats = stats\n },\n },\n actions: {\n cancelFetchAndSaveSearchResponse,\n fetchAndSaveSearchResponse,\n fetchSearchResponse,\n increasePageAppendingResults,\n resetRequestOnRefinement,\n saveOrigin,\n saveSearchResponse,\n setUrlParams,\n },\n}\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link SearchState}.\n *\n * @internal\n */\nexport function resettableState() {\n return {\n query: '',\n results: [],\n partialResults: [],\n facets: [],\n relatedTags: [],\n banners: [],\n promoteds: [],\n totalResults: 0,\n spellcheckedQuery: '',\n sort: '',\n page: 1,\n origin: null,\n isAppendResults: false,\n isNoResultsFallback: false,\n redirections: [],\n queryTagging: {\n url: '',\n params: {},\n },\n displayTagging: {\n url: '',\n params: {},\n },\n stats: {} as Stats,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA;;;;AAIG;AACI,MAAM,kBAAkB,GAAuB;AACpD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,eAAe,EAAE;AACpB,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,cAAc,EAAE,SAAS;AACzB,QAAA,MAAM,EAAE;AACN,YAAA,SAAS,EAAE,EAAE;AACb,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,QAAQ,EAAE,iBAAiB;AAC3B,YAAA,qBAAqB,EAAE,EAAE;AACzB,YAAA,cAAc,EAAE,OAAO;AACxB,SAAA;AACD,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,WAAW,EAAE,KAAK;AAClB,QAAA,wBAAwB,EAAE,KAAK;KAChC,CAAC;AACF,IAAA,OAAO,EAAE;QACP,OAAO;QACP,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,aAAa,CAAC,KAAK,EAAE,OAAO,EAAA;AAC1B,YAAA,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC;QAChD,CAAC;AACD,QAAA,UAAU,CAAC,KAAK,EAAA;YACd,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC;QACzC,CAAC;AACD,QAAA,mBAAmB,CAAC,KAAK,EAAA;AACvB,YAAA,MAAM,EAA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-
"version": "10.
|
|
3
|
+
"version": "10.15.0",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"vuex": "4.0.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@empathyco/x-adapter": "8.
|
|
71
|
-
"@empathyco/x-adapter-platform": "2.
|
|
72
|
-
"@empathyco/x-types": "11.
|
|
73
|
-
"@empathyco/x-utils": "1.
|
|
70
|
+
"@empathyco/x-adapter": "8.8.0",
|
|
71
|
+
"@empathyco/x-adapter-platform": "2.6.0",
|
|
72
|
+
"@empathyco/x-types": "11.6.0",
|
|
73
|
+
"@empathyco/x-utils": "1.7.0",
|
|
74
74
|
"@vue/devtools-api": "~6.6.4",
|
|
75
75
|
"@vueuse/core": "~12.8.2",
|
|
76
76
|
"js-md5": "~0.11.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@babel/preset-env": "8.0.7",
|
|
85
|
-
"@empathyco/x-design-system": "1.
|
|
85
|
+
"@empathyco/x-design-system": "1.8.0",
|
|
86
86
|
"@microsoft/api-documenter": "7.30.20",
|
|
87
87
|
"@microsoft/api-extractor": "7.60.1",
|
|
88
88
|
"@tailwindcss/vite": "4.3.5",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"access": "public",
|
|
118
118
|
"directory": "dist"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "d8245b6d5ba19d5f9d88e8898ed993bbc99b14e4"
|
|
121
121
|
}
|
|
@@ -33228,7 +33228,7 @@
|
|
|
33228
33228
|
{
|
|
33229
33229
|
"kind": "PropertySignature",
|
|
33230
33230
|
"canonicalReference": "@empathyco/x-components!FetchAndSaveHooks#onSuccess:member",
|
|
33231
|
-
"docComment": "/**\n * Asynchronous callback executed when the {@link FetchAndSaveHooks.fetch} is\n * performed successfully.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n *\n * @param response - The data returned by {@link FetchAndSaveHooks.fetch}.\n */\n",
|
|
33231
|
+
"docComment": "/**\n * Asynchronous callback executed when the {@link FetchAndSaveHooks.fetch} is\n * performed successfully.\n *\n * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the\n * actions, provided by Vuex.\n *\n * @param response - The data returned by {@link FetchAndSaveHooks.fetch}.\n *\n * @returns `false` to not set the status to `success`, because another request is going to\n * resolve it. Any other value sets it.\n */\n",
|
|
33232
33232
|
"excerptTokens": [
|
|
33233
33233
|
{
|
|
33234
33234
|
"kind": "Content",
|
|
@@ -33236,7 +33236,16 @@
|
|
|
33236
33236
|
},
|
|
33237
33237
|
{
|
|
33238
33238
|
"kind": "Content",
|
|
33239
|
-
"text": "(context: Context, response: Response) => void"
|
|
33239
|
+
"text": "(context: Context, response: Response) => void | boolean | "
|
|
33240
|
+
},
|
|
33241
|
+
{
|
|
33242
|
+
"kind": "Reference",
|
|
33243
|
+
"text": "Promise",
|
|
33244
|
+
"canonicalReference": "!Promise:interface"
|
|
33245
|
+
},
|
|
33246
|
+
{
|
|
33247
|
+
"kind": "Content",
|
|
33248
|
+
"text": "<void | boolean>"
|
|
33240
33249
|
},
|
|
33241
33250
|
{
|
|
33242
33251
|
"kind": "Content",
|
|
@@ -33249,7 +33258,7 @@
|
|
|
33249
33258
|
"name": "onSuccess",
|
|
33250
33259
|
"propertyTypeTokenRange": {
|
|
33251
33260
|
"startIndex": 1,
|
|
33252
|
-
"endIndex":
|
|
33261
|
+
"endIndex": 4
|
|
33253
33262
|
}
|
|
33254
33263
|
}
|
|
33255
33264
|
],
|
|
@@ -37468,7 +37477,16 @@
|
|
|
37468
37477
|
},
|
|
37469
37478
|
{
|
|
37470
37479
|
"kind": "Content",
|
|
37471
|
-
"text": "[] | undefined;\n
|
|
37480
|
+
"text": "[] | undefined;\n NoResultsFallbackExtraParamsProvided?: "
|
|
37481
|
+
},
|
|
37482
|
+
{
|
|
37483
|
+
"kind": "Reference",
|
|
37484
|
+
"text": "Dictionary",
|
|
37485
|
+
"canonicalReference": "@empathyco/x-utils!Dictionary:type"
|
|
37486
|
+
},
|
|
37487
|
+
{
|
|
37488
|
+
"kind": "Content",
|
|
37489
|
+
"text": "<unknown> | undefined;\n PageChanged?: number | undefined;\n PartialResultsChanged?: import(\"@empathyco/x-types\")."
|
|
37472
37490
|
},
|
|
37473
37491
|
{
|
|
37474
37492
|
"kind": "Reference",
|
|
@@ -38224,7 +38242,7 @@
|
|
|
38224
38242
|
"name": "HierarchicalFilter",
|
|
38225
38243
|
"variableTypeTokenRange": {
|
|
38226
38244
|
"startIndex": 1,
|
|
38227
|
-
"endIndex":
|
|
38245
|
+
"endIndex": 334
|
|
38228
38246
|
}
|
|
38229
38247
|
},
|
|
38230
38248
|
{
|
|
@@ -67976,6 +67994,42 @@
|
|
|
67976
67994
|
"endIndex": 2
|
|
67977
67995
|
}
|
|
67978
67996
|
},
|
|
67997
|
+
{
|
|
67998
|
+
"kind": "PropertySignature",
|
|
67999
|
+
"canonicalReference": "@empathyco/x-components!SearchConfig#noResultsFallback:member",
|
|
68000
|
+
"docComment": "/**\n * Values to search again with when a search returns no results, in a single new request:\n * `{ catalogSection: 'section-a', extraParams: { market: 'market-b' } }`.\n * It is applied at most once per search, and not if the selected catalog section or the search\n * extra params already have those values.\n *\n * The `catalogSection` becomes the selected catalog section. It is kept in the next searches\n * until the user selects another section or the search is reset (the query is cleared, the\n * layer is closed or the user browses to a category), and it changes even if the new search has\n * no results either.\n *\n * The `extraParams` are stored as extra params, with the keys of the request `extraParams`\n * before the adapter maps them. They require the extra params module to be registered: without\n * it, a fallback with `extraParams` does not search again and the status stays as `loading`\n * until the next search.\n *\n * The catalog section goes apart, in `catalogSection`, and not inside `extraParams`. The\n * selected section is part of the search state, which is what the catalog section tabs read,\n * and the search request sends it under the `catalogSectionParamKey`, taking precedence over\n * the extra params. Inside `extraParams` the tabs would not change, and the value would not be\n * sent if a section was already selected.\n */\n",
|
|
68001
|
+
"excerptTokens": [
|
|
68002
|
+
{
|
|
68003
|
+
"kind": "Content",
|
|
68004
|
+
"text": "noResultsFallback?: "
|
|
68005
|
+
},
|
|
68006
|
+
{
|
|
68007
|
+
"kind": "Content",
|
|
68008
|
+
"text": "{\n catalogSection?: string;\n extraParams?: "
|
|
68009
|
+
},
|
|
68010
|
+
{
|
|
68011
|
+
"kind": "Reference",
|
|
68012
|
+
"text": "Record",
|
|
68013
|
+
"canonicalReference": "!Record:type"
|
|
68014
|
+
},
|
|
68015
|
+
{
|
|
68016
|
+
"kind": "Content",
|
|
68017
|
+
"text": "<string, string>;\n }"
|
|
68018
|
+
},
|
|
68019
|
+
{
|
|
68020
|
+
"kind": "Content",
|
|
68021
|
+
"text": ";"
|
|
68022
|
+
}
|
|
68023
|
+
],
|
|
68024
|
+
"isReadonly": false,
|
|
68025
|
+
"isOptional": true,
|
|
68026
|
+
"releaseTag": "Public",
|
|
68027
|
+
"name": "noResultsFallback",
|
|
68028
|
+
"propertyTypeTokenRange": {
|
|
68029
|
+
"startIndex": 1,
|
|
68030
|
+
"endIndex": 4
|
|
68031
|
+
}
|
|
68032
|
+
},
|
|
67979
68033
|
{
|
|
67980
68034
|
"kind": "PropertySignature",
|
|
67981
68035
|
"canonicalReference": "@empathyco/x-components!SearchConfig#pageMode:member",
|
|
@@ -69040,6 +69094,33 @@
|
|
|
69040
69094
|
"endIndex": 2
|
|
69041
69095
|
}
|
|
69042
69096
|
},
|
|
69097
|
+
{
|
|
69098
|
+
"kind": "PropertySignature",
|
|
69099
|
+
"canonicalReference": "@empathyco/x-components!SearchMutations#setIsNoResultsFallback:member",
|
|
69100
|
+
"docComment": "/**\n * Sets the `isNoResultsFallback` flag value.\n *\n * @param isNoResultsFallback - The new flag value.\n */\n",
|
|
69101
|
+
"excerptTokens": [
|
|
69102
|
+
{
|
|
69103
|
+
"kind": "Content",
|
|
69104
|
+
"text": "setIsNoResultsFallback: "
|
|
69105
|
+
},
|
|
69106
|
+
{
|
|
69107
|
+
"kind": "Content",
|
|
69108
|
+
"text": "(isNoResultsFallback: boolean) => void"
|
|
69109
|
+
},
|
|
69110
|
+
{
|
|
69111
|
+
"kind": "Content",
|
|
69112
|
+
"text": ";"
|
|
69113
|
+
}
|
|
69114
|
+
],
|
|
69115
|
+
"isReadonly": false,
|
|
69116
|
+
"isOptional": false,
|
|
69117
|
+
"releaseTag": "Public",
|
|
69118
|
+
"name": "setIsNoResultsFallback",
|
|
69119
|
+
"propertyTypeTokenRange": {
|
|
69120
|
+
"startIndex": 1,
|
|
69121
|
+
"endIndex": 2
|
|
69122
|
+
}
|
|
69123
|
+
},
|
|
69043
69124
|
{
|
|
69044
69125
|
"kind": "PropertySignature",
|
|
69045
69126
|
"canonicalReference": "@empathyco/x-components!SearchMutations#setOrigin:member",
|
|
@@ -69913,6 +69994,33 @@
|
|
|
69913
69994
|
"endIndex": 2
|
|
69914
69995
|
}
|
|
69915
69996
|
},
|
|
69997
|
+
{
|
|
69998
|
+
"kind": "PropertySignature",
|
|
69999
|
+
"canonicalReference": "@empathyco/x-components!SearchState#isNoResultsFallback:member",
|
|
70000
|
+
"docComment": "/**\n * Flag indicating that the search in progress is the one of the `noResultsFallback`, so it is\n * not applied again.\n */\n",
|
|
70001
|
+
"excerptTokens": [
|
|
70002
|
+
{
|
|
70003
|
+
"kind": "Content",
|
|
70004
|
+
"text": "isNoResultsFallback: "
|
|
70005
|
+
},
|
|
70006
|
+
{
|
|
70007
|
+
"kind": "Content",
|
|
70008
|
+
"text": "boolean"
|
|
70009
|
+
},
|
|
70010
|
+
{
|
|
70011
|
+
"kind": "Content",
|
|
70012
|
+
"text": ";"
|
|
70013
|
+
}
|
|
70014
|
+
],
|
|
70015
|
+
"isReadonly": false,
|
|
70016
|
+
"isOptional": false,
|
|
70017
|
+
"releaseTag": "Public",
|
|
70018
|
+
"name": "isNoResultsFallback",
|
|
70019
|
+
"propertyTypeTokenRange": {
|
|
70020
|
+
"startIndex": 1,
|
|
70021
|
+
"endIndex": 2
|
|
70022
|
+
}
|
|
70023
|
+
},
|
|
69916
70024
|
{
|
|
69917
70025
|
"kind": "PropertySignature",
|
|
69918
70026
|
"canonicalReference": "@empathyco/x-components!SearchState#origin:member",
|
|
@@ -70402,6 +70510,38 @@
|
|
|
70402
70510
|
"endIndex": 3
|
|
70403
70511
|
}
|
|
70404
70512
|
},
|
|
70513
|
+
{
|
|
70514
|
+
"kind": "PropertySignature",
|
|
70515
|
+
"canonicalReference": "@empathyco/x-components!SearchXEvents#NoResultsFallbackExtraParamsProvided:member",
|
|
70516
|
+
"docComment": "/**\n * The `noResultsFallback` extra params have been provided, as a search without results is\n * going to be searched again with them.\n * Payload: The extra params of the fallback.\n */\n",
|
|
70517
|
+
"excerptTokens": [
|
|
70518
|
+
{
|
|
70519
|
+
"kind": "Content",
|
|
70520
|
+
"text": "NoResultsFallbackExtraParamsProvided: "
|
|
70521
|
+
},
|
|
70522
|
+
{
|
|
70523
|
+
"kind": "Reference",
|
|
70524
|
+
"text": "Dictionary",
|
|
70525
|
+
"canonicalReference": "@empathyco/x-utils!Dictionary:type"
|
|
70526
|
+
},
|
|
70527
|
+
{
|
|
70528
|
+
"kind": "Content",
|
|
70529
|
+
"text": "<unknown>"
|
|
70530
|
+
},
|
|
70531
|
+
{
|
|
70532
|
+
"kind": "Content",
|
|
70533
|
+
"text": ";"
|
|
70534
|
+
}
|
|
70535
|
+
],
|
|
70536
|
+
"isReadonly": false,
|
|
70537
|
+
"isOptional": false,
|
|
70538
|
+
"releaseTag": "Public",
|
|
70539
|
+
"name": "NoResultsFallbackExtraParamsProvided",
|
|
70540
|
+
"propertyTypeTokenRange": {
|
|
70541
|
+
"startIndex": 1,
|
|
70542
|
+
"endIndex": 3
|
|
70543
|
+
}
|
|
70544
|
+
},
|
|
70405
70545
|
{
|
|
70406
70546
|
"kind": "PropertySignature",
|
|
70407
70547
|
"canonicalReference": "@empathyco/x-components!SearchXEvents#PageChanged:member",
|
|
@@ -77181,7 +77321,16 @@
|
|
|
77181
77321
|
},
|
|
77182
77322
|
{
|
|
77183
77323
|
"kind": "Content",
|
|
77184
|
-
"text": "[] | undefined;\n
|
|
77324
|
+
"text": "[] | undefined;\n NoResultsFallbackExtraParamsProvided?: "
|
|
77325
|
+
},
|
|
77326
|
+
{
|
|
77327
|
+
"kind": "Reference",
|
|
77328
|
+
"text": "Dictionary",
|
|
77329
|
+
"canonicalReference": "@empathyco/x-utils!Dictionary:type"
|
|
77330
|
+
},
|
|
77331
|
+
{
|
|
77332
|
+
"kind": "Content",
|
|
77333
|
+
"text": "<unknown> | undefined;\n PageChanged?: number | undefined;\n PartialResultsChanged?: import(\"@empathyco/x-types\")."
|
|
77185
77334
|
},
|
|
77186
77335
|
{
|
|
77187
77336
|
"kind": "Reference",
|
|
@@ -77838,7 +77987,7 @@
|
|
|
77838
77987
|
"name": "SimpleFilter",
|
|
77839
77988
|
"variableTypeTokenRange": {
|
|
77840
77989
|
"startIndex": 1,
|
|
77841
|
-
"endIndex":
|
|
77990
|
+
"endIndex": 302
|
|
77842
77991
|
}
|
|
77843
77992
|
},
|
|
77844
77993
|
{
|
|
@@ -80383,6 +80532,24 @@
|
|
|
80383
80532
|
"text": "WireMetadata",
|
|
80384
80533
|
"canonicalReference": "@empathyco/x-components!WireMetadata:interface"
|
|
80385
80534
|
},
|
|
80535
|
+
{
|
|
80536
|
+
"kind": "Content",
|
|
80537
|
+
"text": ") => unknown;\n NoResultsFallbackExtraParamsProvided: (payload: import(\"@empathyco/x-utils\")."
|
|
80538
|
+
},
|
|
80539
|
+
{
|
|
80540
|
+
"kind": "Reference",
|
|
80541
|
+
"text": "Dictionary",
|
|
80542
|
+
"canonicalReference": "@empathyco/x-utils!Dictionary:type"
|
|
80543
|
+
},
|
|
80544
|
+
{
|
|
80545
|
+
"kind": "Content",
|
|
80546
|
+
"text": "<unknown>, metadata: "
|
|
80547
|
+
},
|
|
80548
|
+
{
|
|
80549
|
+
"kind": "Reference",
|
|
80550
|
+
"text": "WireMetadata",
|
|
80551
|
+
"canonicalReference": "@empathyco/x-components!WireMetadata:interface"
|
|
80552
|
+
},
|
|
80386
80553
|
{
|
|
80387
80554
|
"kind": "Content",
|
|
80388
80555
|
"text": ") => unknown;\n PageChanged: (payload: number, metadata: "
|
|
@@ -81609,7 +81776,7 @@
|
|
|
81609
81776
|
"name": "SnippetCallbacks",
|
|
81610
81777
|
"variableTypeTokenRange": {
|
|
81611
81778
|
"startIndex": 1,
|
|
81612
|
-
"endIndex":
|
|
81779
|
+
"endIndex": 642
|
|
81613
81780
|
}
|
|
81614
81781
|
},
|
|
81615
81782
|
{
|
|
@@ -3259,6 +3259,9 @@ export const extraParamsWiring: {
|
|
|
3259
3259
|
ExtraParamsProvided: {
|
|
3260
3260
|
setExtraParams: Wire<Dictionary<unknown>>;
|
|
3261
3261
|
};
|
|
3262
|
+
NoResultsFallbackExtraParamsProvided: {
|
|
3263
|
+
setExtraParams: Wire<Dictionary<unknown>>;
|
|
3264
|
+
};
|
|
3262
3265
|
ExtraParamsLoadedFromUrl: {
|
|
3263
3266
|
setExtraParams: Wire<Dictionary<unknown>>;
|
|
3264
3267
|
};
|
|
@@ -3623,7 +3626,7 @@ export interface FetchAndSaveHooks<Context extends XActionContext<StatusState, o
|
|
|
3623
3626
|
fetch: (context: Context, request: Request) => Promise<Response>;
|
|
3624
3627
|
onCancel?: () => void;
|
|
3625
3628
|
onError?: (error: unknown) => void;
|
|
3626
|
-
onSuccess: (context: Context, response: Response) => void
|
|
3629
|
+
onSuccess: (context: Context, response: Response) => void | boolean | Promise<void | boolean>;
|
|
3627
3630
|
}
|
|
3628
3631
|
|
|
3629
3632
|
// Warning: (ae-forgotten-export) The symbol "IdentifierResultsRequest" needs to be exported by the entry point index.d.ts
|
|
@@ -4094,6 +4097,7 @@ UserPressedEnterKey?: string | undefined;
|
|
|
4094
4097
|
UserPressedSearchButton?: string | undefined;
|
|
4095
4098
|
UserTalked?: string | undefined;
|
|
4096
4099
|
FacetsChanged?: Facet[] | undefined;
|
|
4100
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
4097
4101
|
PageChanged?: number | undefined;
|
|
4098
4102
|
PartialResultsChanged?: PartialResult[] | undefined;
|
|
4099
4103
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -7042,6 +7046,7 @@ export function resettableState(): {
|
|
|
7042
7046
|
page: number;
|
|
7043
7047
|
origin: null;
|
|
7044
7048
|
isAppendResults: boolean;
|
|
7049
|
+
isNoResultsFallback: boolean;
|
|
7045
7050
|
redirections: never[];
|
|
7046
7051
|
queryTagging: {
|
|
7047
7052
|
url: string;
|
|
@@ -7483,6 +7488,10 @@ emitEvents: () => void;
|
|
|
7483
7488
|
// @public
|
|
7484
7489
|
export interface SearchConfig {
|
|
7485
7490
|
defaultCatalogSection: string;
|
|
7491
|
+
noResultsFallback?: {
|
|
7492
|
+
catalogSection?: string;
|
|
7493
|
+
extraParams?: Record<string, string>;
|
|
7494
|
+
};
|
|
7486
7495
|
// (undocumented)
|
|
7487
7496
|
pageMode: PageMode;
|
|
7488
7497
|
pageSize: number;
|
|
@@ -7644,6 +7653,7 @@ export interface SearchMutations extends StatusMutations, QueryMutations, Config
|
|
|
7644
7653
|
setFromNoResultsWithFilters: (fromNoResultsWithFilters: boolean) => void;
|
|
7645
7654
|
setIsAppendResults: (isAppendResults: boolean) => void;
|
|
7646
7655
|
setIsNoResults: (isNoResults: boolean) => void;
|
|
7656
|
+
setIsNoResultsFallback: (isNoResultsFallback: boolean) => void;
|
|
7647
7657
|
setOrigin: (origin: QueryOrigin | undefined | null) => void;
|
|
7648
7658
|
setPage: (page: number) => void;
|
|
7649
7659
|
setParams: (params: Dictionary<unknown>) => void;
|
|
@@ -7677,6 +7687,7 @@ export interface SearchState extends StatusState, QueryState {
|
|
|
7677
7687
|
fromNoResultsWithFilters: boolean;
|
|
7678
7688
|
isAppendResults: boolean;
|
|
7679
7689
|
isNoResults: boolean;
|
|
7690
|
+
isNoResultsFallback: boolean;
|
|
7680
7691
|
origin: QueryOrigin | null;
|
|
7681
7692
|
page: number;
|
|
7682
7693
|
params: Dictionary<unknown>;
|
|
@@ -7785,6 +7796,7 @@ export const searchWiring: {
|
|
|
7785
7796
|
// @public
|
|
7786
7797
|
export interface SearchXEvents {
|
|
7787
7798
|
FacetsChanged: Facet[];
|
|
7799
|
+
NoResultsFallbackExtraParamsProvided: Dictionary<unknown>;
|
|
7788
7800
|
PageChanged: number;
|
|
7789
7801
|
PartialResultsChanged: PartialResult[];
|
|
7790
7802
|
ReloadSearchRequested: void;
|
|
@@ -8447,6 +8459,7 @@ UserPressedEnterKey?: string | undefined;
|
|
|
8447
8459
|
UserPressedSearchButton?: string | undefined;
|
|
8448
8460
|
UserTalked?: string | undefined;
|
|
8449
8461
|
FacetsChanged?: Facet[] | undefined;
|
|
8462
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
8450
8463
|
PageChanged?: number | undefined;
|
|
8451
8464
|
PartialResultsChanged?: PartialResult[] | undefined;
|
|
8452
8465
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -8866,6 +8879,7 @@ UserPressedEnterKey: (payload: string, metadata: WireMetadata) => unknown;
|
|
|
8866
8879
|
UserPressedSearchButton: (payload: string, metadata: WireMetadata) => unknown;
|
|
8867
8880
|
UserTalked: (payload: string, metadata: WireMetadata) => unknown;
|
|
8868
8881
|
FacetsChanged: (payload: Facet[], metadata: WireMetadata) => unknown;
|
|
8882
|
+
NoResultsFallbackExtraParamsProvided: (payload: Dictionary<unknown>, metadata: WireMetadata) => unknown;
|
|
8869
8883
|
PageChanged: (payload: number, metadata: WireMetadata) => unknown;
|
|
8870
8884
|
PartialResultsChanged: (payload: PartialResult[], metadata: WireMetadata) => unknown;
|
|
8871
8885
|
ReloadSearchRequested: (payload: undefined, metadata: WireMetadata) => unknown;
|
|
@@ -10824,10 +10838,10 @@ export type XStoreModuleOptions<StoreModule extends AnyXStoreModule> = StoreModu
|
|
|
10824
10838
|
// dist/types/src/x-modules/facets/components/filters/editable-number-range-filter.vue.d.ts:25:9 - (ae-forgotten-export) The symbol "EditableNumberRangeFilter_2" needs to be exported by the entry point index.d.ts
|
|
10825
10839
|
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:63:13 - (ae-forgotten-export) The symbol "ResultVariant" needs to be exported by the entry point index.d.ts
|
|
10826
10840
|
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:112:9 - (ae-forgotten-export) The symbol "NextQuery_2" needs to be exported by the entry point index.d.ts
|
|
10827
|
-
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:
|
|
10828
|
-
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:
|
|
10829
|
-
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:
|
|
10830
|
-
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:
|
|
10841
|
+
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:165:9 - (ae-forgotten-export) The symbol "PartialResult" needs to be exported by the entry point index.d.ts
|
|
10842
|
+
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:178:9 - (ae-forgotten-export) The symbol "Redirection_2" needs to be exported by the entry point index.d.ts
|
|
10843
|
+
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:191:9 - (ae-forgotten-export) The symbol "SemanticQuery_2" needs to be exported by the entry point index.d.ts
|
|
10844
|
+
// dist/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts:215:9 - (ae-forgotten-export) The symbol "RelatedPrompt_2" needs to be exported by the entry point index.d.ts
|
|
10831
10845
|
// dist/types/src/x-modules/facets/components/lists/selected-filters-list.vue.d.ts:27:5 - (ae-forgotten-export) The symbol "RenderFilter" needs to be exported by the entry point index.d.ts
|
|
10832
10846
|
// dist/types/src/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts:62:9 - (ae-forgotten-export) The symbol "RelatedPromptNextQuery" needs to be exported by the entry point index.d.ts
|
|
10833
10847
|
// dist/types/src/x-modules/search/components/banner.vue.d.ts:24:9 - (ae-forgotten-export) The symbol "Banner_2" needs to be exported by the entry point index.d.ts
|
|
@@ -135,6 +135,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
135
135
|
UserPressedSearchButton: (payload: string, metadata: WireMetadata) => unknown;
|
|
136
136
|
UserTalked: (payload: string, metadata: WireMetadata) => unknown;
|
|
137
137
|
FacetsChanged: (payload: import("@empathyco/x-types").Facet[], metadata: WireMetadata) => unknown;
|
|
138
|
+
NoResultsFallbackExtraParamsProvided: (payload: import("@empathyco/x-utils").Dictionary<unknown>, metadata: WireMetadata) => unknown;
|
|
138
139
|
PageChanged: (payload: number, metadata: WireMetadata) => unknown;
|
|
139
140
|
PartialResultsChanged: (payload: import("@empathyco/x-types").PartialResult[], metadata: WireMetadata) => unknown;
|
|
140
141
|
ReloadSearchRequested: (payload: undefined, metadata: WireMetadata) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet-callbacks.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../src/components/snippet-callbacks.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"snippet-callbacks.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../src/components/snippet-callbacks.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBA0CE"}
|
|
@@ -32,8 +32,10 @@ export interface FetchAndSaveHooks<Context extends XActionContext<StatusState, o
|
|
|
32
32
|
* @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the
|
|
33
33
|
* actions, provided by Vuex.
|
|
34
34
|
* @param response - The data returned by {@link FetchAndSaveHooks.fetch}.
|
|
35
|
+
* @returns `false` to not set the status to `success`, because another request is going to
|
|
36
|
+
* resolve it. Any other value sets it.
|
|
35
37
|
*/
|
|
36
|
-
onSuccess: (context: Context, response: Response) => void
|
|
38
|
+
onSuccess: (context: Context, response: Response) => void | boolean | Promise<void | boolean>;
|
|
37
39
|
/**
|
|
38
40
|
* Asynchronous callback executed when either the {@link FetchAndSaveHooks.fetch}
|
|
39
41
|
* or {@link FetchAndSaveHooks.onSuccess} methods fail.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-action.utils.d.ts","sourceRoot":"","sources":["../../../../../src/store/utils/fetch-and-save-action.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGxE;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAEvC,OAAO,SAAS,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,EAC5E,OAAO,EACP,QAAQ,EACR,EACA,KAAK,EACL,SAAS,EACT,OAAuB,EACvB,QAAQ,GACT,EAAE,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"fetch-and-save-action.utils.d.ts","sourceRoot":"","sources":["../../../../../src/store/utils/fetch-and-save-action.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGxE;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAEvC,OAAO,SAAS,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,EAC5E,OAAO,EACP,QAAQ,EACR,EACA,KAAK,EACL,SAAS,EACT,OAAuB,EACvB,QAAQ,GACT,EAAE,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAoEvF;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAEhC,OAAO,SAAS,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,EAC5E,OAAO,EACP,QAAQ;IAER;;;;;;;OAOG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IAChE;;;;;;;;;OASG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAA;IAC7F;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAElC,OAAO,SAAS,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,EAC5E,OAAO;IAEP;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B"}
|
|
@@ -16,6 +16,9 @@ export declare const extraParamsWiring: {
|
|
|
16
16
|
ExtraParamsProvided: {
|
|
17
17
|
setExtraParams: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
18
18
|
};
|
|
19
|
+
NoResultsFallbackExtraParamsProvided: {
|
|
20
|
+
setExtraParams: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
21
|
+
};
|
|
19
22
|
ExtraParamsLoadedFromUrl: {
|
|
20
23
|
setExtraParams: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
21
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/extra-params/wiring.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,cAAc,+EAA0B,CAAA;AAErD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/extra-params/wiring.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,cAAc,+EAA0B,CAAA;AAErD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAa5B,CAAA"}
|
|
@@ -160,6 +160,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
160
160
|
UserPressedSearchButton?: string | undefined;
|
|
161
161
|
UserTalked?: string | undefined;
|
|
162
162
|
FacetsChanged?: import("@empathyco/x-types").Facet[] | undefined;
|
|
163
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
163
164
|
PageChanged?: number | undefined;
|
|
164
165
|
PartialResultsChanged?: import("@empathyco/x-types").PartialResult[] | undefined;
|
|
165
166
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AASnE;;;;GAIG;;IAMC,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C
|
|
1
|
+
{"version":3,"file":"hierarchical-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AASnE;;;;GAIG;;IAMC,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAwDM,uBAAuB;;IA5EvE,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;AAzB9C,wBA+GE"}
|
|
@@ -150,6 +150,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
150
150
|
UserPressedSearchButton?: string | undefined;
|
|
151
151
|
UserTalked?: string | undefined;
|
|
152
152
|
FacetsChanged?: import("@empathyco/x-types").Facet[] | undefined;
|
|
153
|
+
NoResultsFallbackExtraParamsProvided?: Dictionary<unknown> | undefined;
|
|
153
154
|
PageChanged?: number | undefined;
|
|
154
155
|
PartialResultsChanged?: import("@empathyco/x-types").PartialResult[] | undefined;
|
|
155
156
|
ReloadSearchRequested?: void | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/simple-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAKnE;;;;GAIG;;IAOC,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"simple-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/simple-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAKnE;;;;GAIG;;IAOC,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAT3D,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;AAf/D,wBAsCE"}
|
|
@@ -20,5 +20,31 @@ export interface SearchConfig {
|
|
|
20
20
|
* sort is sent as-is, i.e. still using `price`.
|
|
21
21
|
*/
|
|
22
22
|
priceSortField?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Values to search again with when a search returns no results, in a single new request:
|
|
25
|
+
* `{ catalogSection: 'section-a', extraParams: { market: 'market-b' } }`.
|
|
26
|
+
* It is applied at most once per search, and not if the selected catalog section or the search
|
|
27
|
+
* extra params already have those values.
|
|
28
|
+
*
|
|
29
|
+
* The `catalogSection` becomes the selected catalog section. It is kept in the next searches
|
|
30
|
+
* until the user selects another section or the search is reset (the query is cleared, the
|
|
31
|
+
* layer is closed or the user browses to a category), and it changes even if the new search has
|
|
32
|
+
* no results either.
|
|
33
|
+
*
|
|
34
|
+
* The `extraParams` are stored as extra params, with the keys of the request `extraParams`
|
|
35
|
+
* before the adapter maps them. They require the extra params module to be registered: without
|
|
36
|
+
* it, a fallback with `extraParams` does not search again and the status stays as `loading`
|
|
37
|
+
* until the next search.
|
|
38
|
+
*
|
|
39
|
+
* The catalog section goes apart, in `catalogSection`, and not inside `extraParams`. The
|
|
40
|
+
* selected section is part of the search state, which is what the catalog section tabs read,
|
|
41
|
+
* and the search request sends it under the `catalogSectionParamKey`, taking precedence over
|
|
42
|
+
* the extra params. Inside `extraParams` the tabs would not change, and the value would not be
|
|
43
|
+
* sent if a section was already selected.
|
|
44
|
+
*/
|
|
45
|
+
noResultsFallback?: {
|
|
46
|
+
catalogSection?: string;
|
|
47
|
+
extraParams?: Record<string, string>;
|
|
48
|
+
};
|
|
23
49
|
}
|
|
24
50
|
//# sourceMappingURL=config.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/config.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAErD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,QAAQ,CAAA;IAClB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAA;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/config.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAErD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,QAAQ,CAAA;IAClB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAA;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,iBAAiB,CAAC,EAAE;QAClB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACrC,CAAA;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Banner, Facet, PartialResult, Promoted, Redirection, Result, Sort, TaggingRequest } from '@empathyco/x-types';
|
|
2
|
+
import type { Dictionary } from '@empathyco/x-utils';
|
|
2
3
|
import type { InternalSearchRequest, InternalSearchResponse } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* Dictionary of the events of Search XModule, where each key is the event name, and the value is
|
|
@@ -12,6 +13,12 @@ export interface SearchXEvents {
|
|
|
12
13
|
* Payload: The {@link @empathyco/x-types#Facet | facets} array.
|
|
13
14
|
*/
|
|
14
15
|
FacetsChanged: Facet[];
|
|
16
|
+
/**
|
|
17
|
+
* The `noResultsFallback` extra params have been provided, as a search without results is
|
|
18
|
+
* going to be searched again with them.
|
|
19
|
+
* Payload: The extra params of the fallback.
|
|
20
|
+
*/
|
|
21
|
+
NoResultsFallbackExtraParamsProvided: Dictionary<unknown>;
|
|
15
22
|
/**
|
|
16
23
|
* Page has been changed.
|
|
17
24
|
* Payload: The new page number.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,aAAa,EAAE,KAAK,EAAE,CAAA;IACtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,qBAAqB,EAAE,aAAa,EAAE,CAAA;IACtC;;OAEG;IACH,qBAAqB,EAAE,IAAI,CAAA;IAC3B;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB;;;;OAIG;IACH,oBAAoB,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAClD;;;;;;;;OAQG;IACH,oBAAoB,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAClD;;;OAGG;IACH,qBAAqB,EAAE,sBAAsB,CAAA;IAC7C;;;OAGG;IACH,oBAAoB,EAAE,cAAc,CAAA;IACpC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,gBAAgB,EAAE,IAAI,CAAA;IACtB;;;;;;OAMG;IACH,oBAAoB,EAAE,IAAI,CAAA;IAC1B;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAA;IAC/B;;OAEG;IACH,yBAAyB,EAAE,IAAI,CAAA;IAC/B;;;OAGG;IACH,uBAAuB,EAAE,WAAW,CAAA;IACpC;;;OAGG;IACH,oBAAoB,EAAE,QAAQ,CAAA;IAC9B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,4BAA4B,EAAE,IAAI,CAAA;IAClC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAA;CAC1B"}
|
|
1
|
+
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,aAAa,EAAE,KAAK,EAAE,CAAA;IACtB;;;;OAIG;IACH,oCAAoC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IACzD;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,qBAAqB,EAAE,aAAa,EAAE,CAAA;IACtC;;OAEG;IACH,qBAAqB,EAAE,IAAI,CAAA;IAC3B;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB;;;;OAIG;IACH,oBAAoB,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAClD;;;;;;;;OAQG;IACH,oBAAoB,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAClD;;;OAGG;IACH,qBAAqB,EAAE,sBAAsB,CAAA;IAC7C;;;OAGG;IACH,oBAAoB,EAAE,cAAc,CAAA;IACpC;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,gBAAgB,EAAE,IAAI,CAAA;IACtB;;;;;;OAMG;IACH,oBAAoB,EAAE,IAAI,CAAA;IAC1B;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAA;IAC/B;;OAEG;IACH,yBAAyB,EAAE,IAAI,CAAA;IAC/B;;;OAGG;IACH,uBAAuB,EAAE,WAAW,CAAA;IACpC;;;OAGG;IACH,oBAAoB,EAAE,QAAQ,CAAA;IAC9B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,4BAA4B,EAAE,IAAI,CAAA;IAClC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAA;CAC1B"}
|
package/types/src/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-search-response.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-and-save-search-response.action.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/search/store/actions/fetch-and-save-search-response.action.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,UAAU,CAAA;AA8HhE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,+FAAe,CAAA;AAEtD;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,YAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/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,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/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,kBAyHhC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;WAyBd,KAAK;EAErB"}
|
|
@@ -27,6 +27,11 @@ export interface SearchState extends StatusState, QueryState {
|
|
|
27
27
|
facets: Facet[];
|
|
28
28
|
/** A flag to indicate if new results are append to the current instead of replacing them. */
|
|
29
29
|
isAppendResults: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Flag indicating that the search in progress is the one of the `noResultsFallback`, so it is
|
|
32
|
+
* not applied again.
|
|
33
|
+
*/
|
|
34
|
+
isNoResultsFallback: boolean;
|
|
30
35
|
/** Flag indicating if there is a no results situation. */
|
|
31
36
|
isNoResults: boolean;
|
|
32
37
|
/** Flag indicating if there is a no results situation with filters selected. */
|
|
@@ -126,6 +131,12 @@ export interface SearchMutations extends StatusMutations, QueryMutations, Config
|
|
|
126
131
|
* @param isAppendResults - The new flag value.
|
|
127
132
|
*/
|
|
128
133
|
setIsAppendResults: (isAppendResults: boolean) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Sets the `isNoResultsFallback` flag value.
|
|
136
|
+
*
|
|
137
|
+
* @param isNoResultsFallback - The new flag value.
|
|
138
|
+
*/
|
|
139
|
+
setIsNoResultsFallback: (isNoResultsFallback: boolean) => void;
|
|
129
140
|
/**
|
|
130
141
|
* Sets the `isNoResults` flag value.
|
|
131
142
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,EACb,cAAc,EACd,IAAI,EACJ,KAAK,EACL,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAEnF;;;;GAIG;AACH,MAAM,WAAW,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AAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAA;IAC/D;;;;;;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"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/search/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,EACb,cAAc,EACd,IAAI,EACJ,KAAK,EACL,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAA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