@empathyco/x-components 3.0.0-alpha.182 → 3.0.0-alpha.183
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 +13 -0
- package/design-system/default-theme.css +73 -73
- package/design-system/full-theme.css +4 -4
- package/docs/API-reference/api/x-components.fetchandsavenextquerypreviewwire.md +1 -1
- package/docs/API-reference/api/x-components.nextqueriesactions.fetchandsavenextquerypreview.md +5 -2
- package/docs/API-reference/api/x-components.nextqueriesactions.fetchnextquerypreview.md +5 -2
- package/docs/API-reference/api/x-components.nextqueriesactions.md +2 -2
- package/js/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.js +2 -2
- package/js/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.js.map +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-next-query-preview.action.js +6 -2
- package/js/x-modules/next-queries/store/actions/fetch-next-query-preview.action.js.map +1 -1
- package/js/x-modules/next-queries/wiring.js +6 -1
- package/js/x-modules/next-queries/wiring.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +35 -21
- package/report/x-components.api.md +10 -4
- package/types/x-modules/next-queries/store/actions/fetch-next-query-preview.action.d.ts +1 -0
- package/types/x-modules/next-queries/store/actions/fetch-next-query-preview.action.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/types.d.ts +11 -4
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/wiring.d.ts +2 -2
- package/types/x-modules/next-queries/wiring.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.0-alpha.183](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.182...@empathyco/x-components@3.0.0-alpha.183) (2022-09-29)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **next-queries:** add `origin` to `next queries preview` (#746)
|
|
11
|
+
([8928676](https://github.com/empathyco/x/commit/89286768a007d9b8888bfbc6db43c39b6d963380)),
|
|
12
|
+
closes [EX-6757](https://searchbroker.atlassian.net/browse/EX-6757)
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
6
19
|
## [3.0.0-alpha.182](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.181...@empathyco/x-components@3.0.0-alpha.182) (2022-09-27)
|
|
7
20
|
|
|
8
21
|
### Bug Fixes
|
|
@@ -407,79 +407,6 @@
|
|
|
407
407
|
[dir="rtl"] .x-dropdown--right .x-dropdown__items-list {
|
|
408
408
|
left: 0;
|
|
409
409
|
}
|
|
410
|
-
:root {
|
|
411
|
-
--x-size-border-radius-dropdown-default: var(--x-size-border-radius-base-none);
|
|
412
|
-
--x-size-border-radius-top-left-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
413
|
-
--x-size-border-radius-top-right-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
414
|
-
--x-size-border-radius-bottom-right-dropdown-default: var(
|
|
415
|
-
--x-size-border-radius-dropdown-default
|
|
416
|
-
);
|
|
417
|
-
--x-size-border-radius-bottom-left-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
418
|
-
--x-size-border-width-dropdown-toggle-default: var(--x-size-border-width-base);
|
|
419
|
-
--x-size-border-width-top-dropdown-toggle-default: var(
|
|
420
|
-
--x-size-border-width-dropdown-toggle-default
|
|
421
|
-
);
|
|
422
|
-
--x-size-border-width-right-dropdown-toggle-default: var(
|
|
423
|
-
--x-size-border-width-dropdown-toggle-default
|
|
424
|
-
);
|
|
425
|
-
--x-size-border-width-bottom-dropdown-toggle-default: var(
|
|
426
|
-
--x-size-border-width-dropdown-toggle-default
|
|
427
|
-
);
|
|
428
|
-
--x-size-border-width-left-dropdown-toggle-default: var(
|
|
429
|
-
--x-size-border-width-dropdown-toggle-default
|
|
430
|
-
);
|
|
431
|
-
--x-size-border-width-dropdown-list-default: var(--x-size-border-width-base);
|
|
432
|
-
--x-size-border-width-top-dropdown-list-default: 0;
|
|
433
|
-
--x-size-border-width-right-dropdown-list-default: var(
|
|
434
|
-
--x-size-border-width-dropdown-list-default
|
|
435
|
-
);
|
|
436
|
-
--x-size-border-width-bottom-dropdown-list-default: var(
|
|
437
|
-
--x-size-border-width-dropdown-list-default
|
|
438
|
-
);
|
|
439
|
-
--x-size-border-width-left-dropdown-list-default: var(
|
|
440
|
-
--x-size-border-width-dropdown-list-default
|
|
441
|
-
);
|
|
442
|
-
--x-color-border-dropdown-toggle-default: var(--x-color-base-neutral-95);
|
|
443
|
-
--x-color-border-dropdown-list-default: var(--x-color-border-dropdown-toggle-default);
|
|
444
|
-
--x-color-background-dropdown-default: var(--x-color-base-neutral-100);
|
|
445
|
-
--x-color-background-dropdown-toggle-default: var(--x-color-base-neutral-100);
|
|
446
|
-
--x-color-background-dropdown-toggle-open-default: var(
|
|
447
|
-
--x-color-background-dropdown-toggle-default
|
|
448
|
-
);
|
|
449
|
-
--x-color-background-dropdown-item-default-selected: var(--x-color-base-neutral-95);
|
|
450
|
-
--x-color-background-dropdown-item-default-hover: var(--x-color-base-neutral-95);
|
|
451
|
-
--x-color-text-dropdown-default: var(--x-color-text-default);
|
|
452
|
-
--x-color-text-dropdown-toggle-default: var(--x-color-text-dropdown-default);
|
|
453
|
-
--x-color-text-dropdown-toggle-default-selected: var(--x-color-base-neutral-35);
|
|
454
|
-
--x-color-text-dropdown-item-default-hover: var(--x-color-base-neutral-35);
|
|
455
|
-
--x-color-text-dropdown-item-default-selected: var(--x-color-text-default);
|
|
456
|
-
--x-font-family-dropdown-default: var(--x-font-family-text);
|
|
457
|
-
--x-size-font-dropdown-default: var(--x-size-font-text);
|
|
458
|
-
--x-size-line-height-dropdown-default: var(--x-size-line-height-text);
|
|
459
|
-
--x-number-font-weight-dropdown-default: var(--x-number-font-weight-base-regular);
|
|
460
|
-
--x-number-font-weight-dropdown-item-default-hover: var(--x-number-font-weight-base-bold);
|
|
461
|
-
--x-number-font-weight-dropdown-item-default-selected: var(--x-number-font-weight-base-regular);
|
|
462
|
-
--x-font-decoration-dropdown-item-default-hover: none;
|
|
463
|
-
--x-font-decoration-dropdown-item-default-selected: none;
|
|
464
|
-
--x-size-width-dropdown-toggle-default: 100%;
|
|
465
|
-
--x-size-min-width-dropdown-list-default: 100%;
|
|
466
|
-
--x-size-gap-dropdown-default: 0;
|
|
467
|
-
--x-size-padding-top-dropdown-toggle-default: var(--x-size-padding-top-dropdown-item-default);
|
|
468
|
-
--x-size-padding-right-dropdown-toggle-default: var(--x-size-padding-right-dropdown-item-default);
|
|
469
|
-
--x-size-padding-bottom-dropdown-toggle-default: var(
|
|
470
|
-
--x-size-padding-bottom-dropdown-item-default
|
|
471
|
-
);
|
|
472
|
-
--x-size-padding-left-dropdown-toggle-default: var(--x-size-padding-left-dropdown-item-default);
|
|
473
|
-
--x-size-padding-vertical-dropdown-list-default: 0;
|
|
474
|
-
--x-size-padding-top-dropdown-item-default: var(--x-size-base-04);
|
|
475
|
-
--x-size-padding-right-dropdown-item-default: var(--x-size-base-05);
|
|
476
|
-
--x-size-padding-bottom-dropdown-item-default: var(--x-size-base-04);
|
|
477
|
-
--x-size-padding-left-dropdown-item-default: var(--x-size-base-05);
|
|
478
|
-
--x-size-gap-dropdown-item-default: var(--x-size-base-03);
|
|
479
|
-
--x-string-box-shadow-dropdown-default: none;
|
|
480
|
-
--x-string-overflow-dropdown-toggle-default: hidden;
|
|
481
|
-
--x-string-overflow-dropdown-list-default: hidden;
|
|
482
|
-
}
|
|
483
410
|
:root {
|
|
484
411
|
--x-color-background-facet-default: transparent;
|
|
485
412
|
--x-color-border-facet-default: var(--x-color-background-facet-default);
|
|
@@ -2902,4 +2829,77 @@
|
|
|
2902
2829
|
--x-size-line-height-base-s: 16px;
|
|
2903
2830
|
--x-size-line-height-base-m: 24px;
|
|
2904
2831
|
--x-size-line-height-base-l: 32px;
|
|
2832
|
+
}
|
|
2833
|
+
:root {
|
|
2834
|
+
--x-size-border-radius-dropdown-default: var(--x-size-border-radius-base-none);
|
|
2835
|
+
--x-size-border-radius-top-left-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
2836
|
+
--x-size-border-radius-top-right-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
2837
|
+
--x-size-border-radius-bottom-right-dropdown-default: var(
|
|
2838
|
+
--x-size-border-radius-dropdown-default
|
|
2839
|
+
);
|
|
2840
|
+
--x-size-border-radius-bottom-left-dropdown-default: var(--x-size-border-radius-dropdown-default);
|
|
2841
|
+
--x-size-border-width-dropdown-toggle-default: var(--x-size-border-width-base);
|
|
2842
|
+
--x-size-border-width-top-dropdown-toggle-default: var(
|
|
2843
|
+
--x-size-border-width-dropdown-toggle-default
|
|
2844
|
+
);
|
|
2845
|
+
--x-size-border-width-right-dropdown-toggle-default: var(
|
|
2846
|
+
--x-size-border-width-dropdown-toggle-default
|
|
2847
|
+
);
|
|
2848
|
+
--x-size-border-width-bottom-dropdown-toggle-default: var(
|
|
2849
|
+
--x-size-border-width-dropdown-toggle-default
|
|
2850
|
+
);
|
|
2851
|
+
--x-size-border-width-left-dropdown-toggle-default: var(
|
|
2852
|
+
--x-size-border-width-dropdown-toggle-default
|
|
2853
|
+
);
|
|
2854
|
+
--x-size-border-width-dropdown-list-default: var(--x-size-border-width-base);
|
|
2855
|
+
--x-size-border-width-top-dropdown-list-default: 0;
|
|
2856
|
+
--x-size-border-width-right-dropdown-list-default: var(
|
|
2857
|
+
--x-size-border-width-dropdown-list-default
|
|
2858
|
+
);
|
|
2859
|
+
--x-size-border-width-bottom-dropdown-list-default: var(
|
|
2860
|
+
--x-size-border-width-dropdown-list-default
|
|
2861
|
+
);
|
|
2862
|
+
--x-size-border-width-left-dropdown-list-default: var(
|
|
2863
|
+
--x-size-border-width-dropdown-list-default
|
|
2864
|
+
);
|
|
2865
|
+
--x-color-border-dropdown-toggle-default: var(--x-color-base-neutral-95);
|
|
2866
|
+
--x-color-border-dropdown-list-default: var(--x-color-border-dropdown-toggle-default);
|
|
2867
|
+
--x-color-background-dropdown-default: var(--x-color-base-neutral-100);
|
|
2868
|
+
--x-color-background-dropdown-toggle-default: var(--x-color-base-neutral-100);
|
|
2869
|
+
--x-color-background-dropdown-toggle-open-default: var(
|
|
2870
|
+
--x-color-background-dropdown-toggle-default
|
|
2871
|
+
);
|
|
2872
|
+
--x-color-background-dropdown-item-default-selected: var(--x-color-base-neutral-95);
|
|
2873
|
+
--x-color-background-dropdown-item-default-hover: var(--x-color-base-neutral-95);
|
|
2874
|
+
--x-color-text-dropdown-default: var(--x-color-text-default);
|
|
2875
|
+
--x-color-text-dropdown-toggle-default: var(--x-color-text-dropdown-default);
|
|
2876
|
+
--x-color-text-dropdown-toggle-default-selected: var(--x-color-base-neutral-35);
|
|
2877
|
+
--x-color-text-dropdown-item-default-hover: var(--x-color-base-neutral-35);
|
|
2878
|
+
--x-color-text-dropdown-item-default-selected: var(--x-color-text-default);
|
|
2879
|
+
--x-font-family-dropdown-default: var(--x-font-family-text);
|
|
2880
|
+
--x-size-font-dropdown-default: var(--x-size-font-text);
|
|
2881
|
+
--x-size-line-height-dropdown-default: var(--x-size-line-height-text);
|
|
2882
|
+
--x-number-font-weight-dropdown-default: var(--x-number-font-weight-base-regular);
|
|
2883
|
+
--x-number-font-weight-dropdown-item-default-hover: var(--x-number-font-weight-base-bold);
|
|
2884
|
+
--x-number-font-weight-dropdown-item-default-selected: var(--x-number-font-weight-base-regular);
|
|
2885
|
+
--x-font-decoration-dropdown-item-default-hover: none;
|
|
2886
|
+
--x-font-decoration-dropdown-item-default-selected: none;
|
|
2887
|
+
--x-size-width-dropdown-toggle-default: 100%;
|
|
2888
|
+
--x-size-min-width-dropdown-list-default: 100%;
|
|
2889
|
+
--x-size-gap-dropdown-default: 0;
|
|
2890
|
+
--x-size-padding-top-dropdown-toggle-default: var(--x-size-padding-top-dropdown-item-default);
|
|
2891
|
+
--x-size-padding-right-dropdown-toggle-default: var(--x-size-padding-right-dropdown-item-default);
|
|
2892
|
+
--x-size-padding-bottom-dropdown-toggle-default: var(
|
|
2893
|
+
--x-size-padding-bottom-dropdown-item-default
|
|
2894
|
+
);
|
|
2895
|
+
--x-size-padding-left-dropdown-toggle-default: var(--x-size-padding-left-dropdown-item-default);
|
|
2896
|
+
--x-size-padding-vertical-dropdown-list-default: 0;
|
|
2897
|
+
--x-size-padding-top-dropdown-item-default: var(--x-size-base-04);
|
|
2898
|
+
--x-size-padding-right-dropdown-item-default: var(--x-size-base-05);
|
|
2899
|
+
--x-size-padding-bottom-dropdown-item-default: var(--x-size-base-04);
|
|
2900
|
+
--x-size-padding-left-dropdown-item-default: var(--x-size-base-05);
|
|
2901
|
+
--x-size-gap-dropdown-item-default: var(--x-size-base-03);
|
|
2902
|
+
--x-string-box-shadow-dropdown-default: none;
|
|
2903
|
+
--x-string-overflow-dropdown-toggle-default: hidden;
|
|
2904
|
+
--x-string-overflow-dropdown-list-default: hidden;
|
|
2905
2905
|
}
|
|
@@ -1058,10 +1058,6 @@
|
|
|
1058
1058
|
--x-size-padding-bottom-filter-children: 0;
|
|
1059
1059
|
--x-size-padding-left-filter-children: var(--x-size-base-05);
|
|
1060
1060
|
}
|
|
1061
|
-
.x-filter--justified.x-filter > *:last-child:not(.x-filter__label),
|
|
1062
|
-
.x-filter--justified .x-filter > *:last-child:not(.x-filter__label) {
|
|
1063
|
-
margin-left: auto;
|
|
1064
|
-
}
|
|
1065
1061
|
.x-grid {
|
|
1066
1062
|
margin: 0;
|
|
1067
1063
|
display: grid;
|
|
@@ -2558,6 +2554,10 @@
|
|
|
2558
2554
|
margin-right: var(--x-size-gap-list-13);
|
|
2559
2555
|
}
|
|
2560
2556
|
}
|
|
2557
|
+
.x-filter--justified.x-filter > *:last-child:not(.x-filter__label),
|
|
2558
|
+
.x-filter--justified .x-filter > *:last-child:not(.x-filter__label) {
|
|
2559
|
+
margin-left: auto;
|
|
2560
|
+
}
|
|
2561
2561
|
/* @deprecated */
|
|
2562
2562
|
:root {
|
|
2563
2563
|
--x-size-padding-list-01: var(--x-size-base-01);
|
package/docs/API-reference/api/x-components.nextqueriesactions.fetchandsavenextquerypreview.md
CHANGED
|
@@ -9,14 +9,17 @@ Requests the results to preview a next query and saves them in the state.
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
fetchAndSaveNextQueryPreview(
|
|
12
|
+
fetchAndSaveNextQueryPreview(payload: {
|
|
13
|
+
query: string;
|
|
14
|
+
location: FeatureLocation | undefined;
|
|
15
|
+
}): void;
|
|
13
16
|
```
|
|
14
17
|
|
|
15
18
|
## Parameters
|
|
16
19
|
|
|
17
20
|
| Parameter | Type | Description |
|
|
18
21
|
| --- | --- | --- |
|
|
19
|
-
|
|
|
22
|
+
| payload | { query: string; location: [FeatureLocation](./x-components.featurelocation.md) \| undefined; } | The payload object containing the query and its location. |
|
|
20
23
|
|
|
21
24
|
<b>Returns:</b>
|
|
22
25
|
|
|
@@ -9,14 +9,17 @@ Requests the results to preview a next query, limited by [NextQueriesConfig.maxP
|
|
|
9
9
|
<b>Signature:</b>
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
fetchNextQueryPreview(
|
|
12
|
+
fetchNextQueryPreview(payload: {
|
|
13
|
+
query: string;
|
|
14
|
+
location: FeatureLocation | undefined;
|
|
15
|
+
}): SearchResponse | null;
|
|
13
16
|
```
|
|
14
17
|
|
|
15
18
|
## Parameters
|
|
16
19
|
|
|
17
20
|
| Parameter | Type | Description |
|
|
18
21
|
| --- | --- | --- |
|
|
19
|
-
|
|
|
22
|
+
| payload | { query: string; location: [FeatureLocation](./x-components.featurelocation.md) \| undefined; } | The payload object containing the query and its location. |
|
|
20
23
|
|
|
21
24
|
<b>Returns:</b>
|
|
22
25
|
|
|
@@ -18,9 +18,9 @@ export interface NextQueriesActions
|
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| [cancelFetchAndSaveNextQueries()](./x-components.nextqueriesactions.cancelfetchandsavenextqueries.md) | Cancels / interrupt [NextQueriesActions.fetchAndSaveNextQueries()](./x-components.nextqueriesactions.fetchandsavenextqueries.md) synchronous promise. |
|
|
20
20
|
| [fetchAndSaveNextQueries(request)](./x-components.nextqueriesactions.fetchandsavenextqueries.md) | Requests a new set of next queries and stores them in the module. |
|
|
21
|
-
| [fetchAndSaveNextQueryPreview(
|
|
21
|
+
| [fetchAndSaveNextQueryPreview(payload)](./x-components.nextqueriesactions.fetchandsavenextquerypreview.md) | Requests the results to preview a next query and saves them in the state. |
|
|
22
22
|
| [fetchNextQueries(request)](./x-components.nextqueriesactions.fetchnextqueries.md) | Requests a new set of next queries for the module query, and returns them. |
|
|
23
|
-
| [fetchNextQueryPreview(
|
|
23
|
+
| [fetchNextQueryPreview(payload)](./x-components.nextqueriesactions.fetchnextquerypreview.md) | Requests the results to preview a next query, limited by [NextQueriesConfig.maxPreviewItemsToRequest](./x-components.nextqueriesconfig.maxpreviewitemstorequest.md)<!-- -->. |
|
|
24
24
|
| [setQueryFromLastHistoryQuery(historyQueries)](./x-components.nextqueriesactions.setqueryfromlasthistoryquery.md) | Sets the query of the module based on the last history query. |
|
|
25
25
|
| [setUrlParams(urlParams)](./x-components.nextqueriesactions.seturlparams.md) | Checks if the url has a query on it and then updates the state with that value. |
|
|
26
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line max-len
|
|
2
|
-
const fetchAndSaveNextQueryPreview = ({ dispatch, commit }, query) => {
|
|
3
|
-
return dispatch('fetchNextQueryPreview', query)
|
|
2
|
+
const fetchAndSaveNextQueryPreview = ({ dispatch, commit }, { query, location }) => {
|
|
3
|
+
return dispatch('fetchNextQueryPreview', { query, location })
|
|
4
4
|
.then(response => {
|
|
5
5
|
if (response) {
|
|
6
6
|
commit('setResultsPreview', {
|
package/js/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-next-query-preview.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\n\n// eslint-disable-next-line max-len\nexport const fetchAndSaveNextQueryPreview: NextQueriesXStoreModule['actions']['fetchAndSaveNextQueryPreview'] =\n ({ dispatch, commit }, query) => {\n return dispatch('fetchNextQueryPreview', query)\n .then(response => {\n if (response) {\n commit('setResultsPreview', {\n [query]: {\n query,\n totalResults: response.totalResults,\n items: response.results\n }\n });\n }\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.error(error);\n });\n };\n"],"names":[],"mappings":"AAEA;MACa,4BAA4B,GACvC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"fetch-and-save-next-query-preview.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\n\n// eslint-disable-next-line max-len\nexport const fetchAndSaveNextQueryPreview: NextQueriesXStoreModule['actions']['fetchAndSaveNextQueryPreview'] =\n ({ dispatch, commit }, { query, location }) => {\n return dispatch('fetchNextQueryPreview', { query, location })\n .then(response => {\n if (response) {\n commit('setResultsPreview', {\n [query]: {\n query,\n totalResults: response.totalResults,\n items: response.results\n }\n });\n }\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.error(error);\n });\n };\n"],"names":[],"mappings":"AAEA;MACa,4BAA4B,GACvC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;IACxC,OAAO,QAAQ,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;SAC1D,IAAI,CAAC,QAAQ;QACZ,IAAI,QAAQ,EAAE;YACZ,MAAM,CAAC,mBAAmB,EAAE;gBAC1B,CAAC,KAAK,GAAG;oBACP,KAAK;oBACL,YAAY,EAAE,QAAQ,CAAC,YAAY;oBACnC,KAAK,EAAE,QAAQ,CAAC,OAAO;iBACxB;aACF,CAAC,CAAC;SACJ;KACF,CAAC;SACD,KAAK,CAAC,KAAK;;QAEV,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACtB,CAAC,CAAC;AACP;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
2
|
+
import { createOrigin } from '../../../../utils/origin.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Default implementation for the {@link NextQueriesActions.fetchNextQueryPreview}.
|
|
@@ -6,17 +7,20 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
6
7
|
* @param state - The state of the store, used to retrieve the rows and the extraParams to be sent
|
|
7
8
|
* in the request.
|
|
8
9
|
* @param query - The next query to send in the request.
|
|
10
|
+
* @param location - The {@link FeatureLocation} to send in the request.
|
|
9
11
|
* @returns A Promise of a SearchResponse when it fetches the results, `null` if the request was
|
|
10
12
|
* not made.
|
|
11
13
|
*/
|
|
12
|
-
const fetchNextQueryPreview = ({ state }, query) => {
|
|
14
|
+
const fetchNextQueryPreview = ({ state }, { query, location }) => {
|
|
13
15
|
if (!query) {
|
|
14
16
|
return null;
|
|
15
17
|
}
|
|
18
|
+
const origin = createOrigin({ feature: 'next_query', location }) ?? undefined;
|
|
16
19
|
return XPlugin.adapter.search({
|
|
17
20
|
query,
|
|
18
21
|
rows: state.config.maxPreviewItemsToRequest,
|
|
19
|
-
extraParams: state.params
|
|
22
|
+
extraParams: state.params,
|
|
23
|
+
origin
|
|
20
24
|
}, {
|
|
21
25
|
id: `fetchNextQueryPreview-${query}`
|
|
22
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-next-query-preview.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-query-preview.action.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\nimport { XPlugin } from '../../../../plugins/x-plugin';\n\n/**\n * Default implementation for the {@link NextQueriesActions.fetchNextQueryPreview}.\n *\n * @param state - The state of the store, used to retrieve the rows and the extraParams to be sent\n * in the request.\n * @param query - The next query to send in the request.\n * @returns A Promise of a SearchResponse when it fetches the results, `null` if the request was\n * not made.\n */\nexport const fetchNextQueryPreview: NextQueriesXStoreModule['actions']['fetchNextQueryPreview'] = (\n { state },\n query\n) => {\n if (!query) {\n return null;\n }\n return XPlugin.adapter.search(\n {\n query,\n rows: state.config.maxPreviewItemsToRequest,\n extraParams: state.params\n },\n {\n id: `fetchNextQueryPreview-${query}`\n }\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-next-query-preview.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-query-preview.action.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\nimport { XPlugin } from '../../../../plugins/x-plugin';\nimport { createOrigin } from '../../../../utils/origin';\n\n/**\n * Default implementation for the {@link NextQueriesActions.fetchNextQueryPreview}.\n *\n * @param state - The state of the store, used to retrieve the rows and the extraParams to be sent\n * in the request.\n * @param query - The next query to send in the request.\n * @param location - The {@link FeatureLocation} to send in the request.\n * @returns A Promise of a SearchResponse when it fetches the results, `null` if the request was\n * not made.\n */\nexport const fetchNextQueryPreview: NextQueriesXStoreModule['actions']['fetchNextQueryPreview'] = (\n { state },\n { query, location }\n) => {\n if (!query) {\n return null;\n }\n const origin = createOrigin({ feature: 'next_query', location }) ?? undefined;\n\n return XPlugin.adapter.search(\n {\n query,\n rows: state.config.maxPreviewItemsToRequest,\n extraParams: state.params,\n origin\n },\n {\n id: `fetchNextQueryPreview-${query}`\n }\n );\n};\n"],"names":[],"mappings":";;;AAIA;;;;;;;;;;MAUa,qBAAqB,GAAgE,CAChG,EAAE,KAAK,EAAE,EACT,EAAE,KAAK,EAAE,QAAQ,EAAE;IAEnB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,IAAI,CAAC;KACb;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,IAAI,SAAS,CAAC;IAE9E,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAC3B;QACE,KAAK;QACL,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,wBAAwB;QAC3C,WAAW,EAAE,KAAK,CAAC,MAAM;QACzB,MAAM;KACP,EACD;QACE,EAAE,EAAE,yBAAyB,KAAK,EAAE;KACrC,CACF,CAAC;AACJ;;;;"}
|
|
@@ -58,7 +58,12 @@ const setQueryFromLastHistoryQueryWire = wireDispatch('setQueryFromLastHistoryQu
|
|
|
58
58
|
*
|
|
59
59
|
* @public
|
|
60
60
|
*/
|
|
61
|
-
const fetchAndSaveNextQueryPreviewWire = wireDispatch('fetchAndSaveNextQueryPreview')
|
|
61
|
+
const fetchAndSaveNextQueryPreviewWire = wireDispatch('fetchAndSaveNextQueryPreview', ({ eventPayload: query, metadata: { location } }) => {
|
|
62
|
+
return {
|
|
63
|
+
query,
|
|
64
|
+
location
|
|
65
|
+
};
|
|
66
|
+
});
|
|
62
67
|
/**
|
|
63
68
|
* Resets the next query preview results.
|
|
64
69
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport {\n NamespacedWireCommit,\n NamespacedWireCommitWithoutPayload,\n NamespacedWireDispatch\n} from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `nextQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'nextQueries';\n\n/**\n * WireCommit for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n\n/**\n * WireCommitWithoutPayload for {@link NextQueriesXModule}.\n */\nconst wireCommitWithoutPayload: NamespacedWireCommitWithoutPayload<typeof moduleName> =\n namespacedWireCommitWithoutPayload(moduleName);\n\n/**\n * WireDispatch for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n\n/**\n * Sets the next queries state `query`.\n *\n * @public\n */\nexport const setNextQueriesQuery = wireCommit('setQuery');\n\n/**\n * Sets the next queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the next queries state `params`.\n *\n * @public\n */\nexport const setNextQueriesExtraParams = wireCommit('setParams');\n\n/**\n * Requests and stores the next queries.\n *\n * @public\n */\nexport const fetchAndSaveNextQueriesWire = wireDispatch('fetchAndSaveNextQueries');\n\n/**\n * Sets the next queries state `query` with the last query in history queries.\n *\n * @public\n */\nexport const setQueryFromLastHistoryQueryWire = wireDispatch('setQueryFromLastHistoryQuery');\n\n/**\n * Requests and store the next query preview results.\n *\n * @public\n */\nexport const fetchAndSaveNextQueryPreviewWire = wireDispatch('fetchAndSaveNextQueryPreview');\n\n/**\n * Resets the next query preview results.\n *\n * @public\n */\nexport const resetResultsPreviewWire = wireCommitWithoutPayload('resetResultsPreview');\n\n/**\n * Sets the next queries state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueries = wireCommit('setSearchedQueries');\n\n/**\n * Wiring configuration for the {@link NextQueriesXModule | next queries module}.\n *\n * @internal\n */\nexport const nextQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams\n },\n NextQueriesChanged: {\n resetResultsPreviewWire\n },\n UserAcceptedAQuery: {\n setNextQueriesQuery\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueries,\n // TODO setQueryFromLastHistoryQuery it has to be called only one time\n setQueryFromLastHistoryQueryWire\n },\n NextQueriesRequestChanged: {\n fetchAndSaveNextQueriesWire\n },\n ExtraParamsChanged: {\n setNextQueriesExtraParams\n },\n NextQueryPreviewMounted: {\n fetchAndSaveNextQueryPreviewWire\n }\n});\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"sourcesContent":["import {\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch\n} from '../../wiring/namespaced-wires.factory';\nimport {\n NamespacedWireCommit,\n NamespacedWireCommitWithoutPayload,\n NamespacedWireDispatch,\n NamespacedWiringData\n} from '../../wiring/namespaced-wiring.types';\nimport { createWiring } from '../../wiring/wiring.utils';\n\n/**\n * `nextQueries` {@link XModuleName | XModule name}.\n *\n * @internal\n */\nconst moduleName = 'nextQueries';\n\n/**\n * WireCommit for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireCommit: NamespacedWireCommit<typeof moduleName> = namespacedWireCommit(moduleName);\n\n/**\n * WireCommitWithoutPayload for {@link NextQueriesXModule}.\n */\nconst wireCommitWithoutPayload: NamespacedWireCommitWithoutPayload<typeof moduleName> =\n namespacedWireCommitWithoutPayload(moduleName);\n\n/**\n * WireDispatch for {@link NextQueriesXModule}.\n *\n * @internal\n */\nconst wireDispatch: NamespacedWireDispatch<typeof moduleName> = namespacedWireDispatch(moduleName);\n\n/**\n * Sets the next queries state `query`.\n *\n * @public\n */\nexport const setNextQueriesQuery = wireCommit('setQuery');\n\n/**\n * Sets the next queries state `query` from url.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams');\n\n/**\n * Sets the next queries state `params`.\n *\n * @public\n */\nexport const setNextQueriesExtraParams = wireCommit('setParams');\n\n/**\n * Requests and stores the next queries.\n *\n * @public\n */\nexport const fetchAndSaveNextQueriesWire = wireDispatch('fetchAndSaveNextQueries');\n\n/**\n * Sets the next queries state `query` with the last query in history queries.\n *\n * @public\n */\nexport const setQueryFromLastHistoryQueryWire = wireDispatch('setQueryFromLastHistoryQuery');\n\n/**\n * Requests and store the next query preview results.\n *\n * @public\n */\nexport const fetchAndSaveNextQueryPreviewWire = wireDispatch(\n 'fetchAndSaveNextQueryPreview',\n ({ eventPayload: query, metadata: { location } }: NamespacedWiringData<'nextQueries'>) => {\n return {\n query,\n location\n };\n }\n);\n/**\n * Resets the next query preview results.\n *\n * @public\n */\nexport const resetResultsPreviewWire = wireCommitWithoutPayload('resetResultsPreview');\n\n/**\n * Sets the next queries state `searchedQueries` with the list of history queries.\n *\n * @public\n */\nexport const setSearchedQueries = wireCommit('setSearchedQueries');\n\n/**\n * Wiring configuration for the {@link NextQueriesXModule | next queries module}.\n *\n * @internal\n */\nexport const nextQueriesWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams\n },\n NextQueriesChanged: {\n resetResultsPreviewWire\n },\n UserAcceptedAQuery: {\n setNextQueriesQuery\n },\n SessionHistoryQueriesChanged: {\n setSearchedQueries,\n // TODO setQueryFromLastHistoryQuery it has to be called only one time\n setQueryFromLastHistoryQueryWire\n },\n NextQueriesRequestChanged: {\n fetchAndSaveNextQueriesWire\n },\n ExtraParamsChanged: {\n setNextQueriesExtraParams\n },\n NextQueryPreviewMounted: {\n fetchAndSaveNextQueryPreviewWire\n }\n});\n"],"names":[],"mappings":";;;AAaA;;;;;AAKA,MAAM,UAAU,GAAG,aAAa,CAAC;AAEjC;;;;;AAKA,MAAM,UAAU,GAA4C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAE7F;;;AAGA,MAAM,wBAAwB,GAC5B,kCAAkC,CAAC,UAAU,CAAC,CAAC;AAEjD;;;;;AAKA,MAAM,YAAY,GAA8C,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAEnG;;;;;MAKa,mBAAmB,GAAG,UAAU,CAAC,UAAU,EAAE;AAE1D;;;;;AAKA,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;AAElD;;;;;MAKa,yBAAyB,GAAG,UAAU,CAAC,WAAW,EAAE;AAEjE;;;;;MAKa,2BAA2B,GAAG,YAAY,CAAC,yBAAyB,EAAE;AAEnF;;;;;MAKa,gCAAgC,GAAG,YAAY,CAAC,8BAA8B,EAAE;AAE7F;;;;;MAKa,gCAAgC,GAAG,YAAY,CAC1D,8BAA8B,EAC9B,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAuC;IACnF,OAAO;QACL,KAAK;QACL,QAAQ;KACT,CAAC;AACJ,CAAC,EACD;AACF;;;;;MAKa,uBAAuB,GAAG,wBAAwB,CAAC,qBAAqB,EAAE;AAEvF;;;;;MAKa,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,EAAE;AAEnE;;;;;MAKa,iBAAiB,GAAG,YAAY,CAAC;IAC5C,mBAAmB,EAAE;QACnB,YAAY;KACb;IACD,kBAAkB,EAAE;QAClB,uBAAuB;KACxB;IACD,kBAAkB,EAAE;QAClB,mBAAmB;KACpB;IACD,4BAA4B,EAAE;QAC5B,kBAAkB;;QAElB,gCAAgC;KACjC;IACD,yBAAyB,EAAE;QACzB,2BAA2B;KAC5B;IACD,kBAAkB,EAAE;QAClB,yBAAyB;KAC1B;IACD,uBAAuB,EAAE;QACvB,gCAAgC;KACjC;CACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.183",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"access": "public",
|
|
134
134
|
"directory": "dist"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "300ddba51b9e2397d73d0598195349143777b209"
|
|
137
137
|
}
|
|
@@ -16239,19 +16239,15 @@
|
|
|
16239
16239
|
},
|
|
16240
16240
|
{
|
|
16241
16241
|
"kind": "Reference",
|
|
16242
|
-
"text": "
|
|
16243
|
-
"canonicalReference": "@empathyco/x-components!
|
|
16244
|
-
},
|
|
16245
|
-
{
|
|
16246
|
-
"kind": "Content",
|
|
16247
|
-
"text": "<string>"
|
|
16242
|
+
"text": "AnyWire",
|
|
16243
|
+
"canonicalReference": "@empathyco/x-components!AnyWire:type"
|
|
16248
16244
|
}
|
|
16249
16245
|
],
|
|
16250
16246
|
"releaseTag": "Public",
|
|
16251
16247
|
"name": "fetchAndSaveNextQueryPreviewWire",
|
|
16252
16248
|
"variableTypeTokenRange": {
|
|
16253
16249
|
"startIndex": 1,
|
|
16254
|
-
"endIndex":
|
|
16250
|
+
"endIndex": 3
|
|
16255
16251
|
}
|
|
16256
16252
|
},
|
|
16257
16253
|
{
|
|
@@ -26491,15 +26487,24 @@
|
|
|
26491
26487
|
{
|
|
26492
26488
|
"kind": "MethodSignature",
|
|
26493
26489
|
"canonicalReference": "@empathyco/x-components!NextQueriesActions#fetchAndSaveNextQueryPreview:member(1)",
|
|
26494
|
-
"docComment": "/**\n * Requests the results to preview a next query and saves them in the state.\n *\n * @param
|
|
26490
|
+
"docComment": "/**\n * Requests the results to preview a next query and saves them in the state.\n *\n * @param payload - The payload object containing the query and its location.\n */\n",
|
|
26495
26491
|
"excerptTokens": [
|
|
26496
26492
|
{
|
|
26497
26493
|
"kind": "Content",
|
|
26498
|
-
"text": "fetchAndSaveNextQueryPreview(
|
|
26494
|
+
"text": "fetchAndSaveNextQueryPreview(payload: "
|
|
26499
26495
|
},
|
|
26500
26496
|
{
|
|
26501
26497
|
"kind": "Content",
|
|
26502
|
-
"text": "string"
|
|
26498
|
+
"text": "{\n query: string;\n location: "
|
|
26499
|
+
},
|
|
26500
|
+
{
|
|
26501
|
+
"kind": "Reference",
|
|
26502
|
+
"text": "FeatureLocation",
|
|
26503
|
+
"canonicalReference": "@empathyco/x-components!FeatureLocation:type"
|
|
26504
|
+
},
|
|
26505
|
+
{
|
|
26506
|
+
"kind": "Content",
|
|
26507
|
+
"text": " | undefined;\n }"
|
|
26503
26508
|
},
|
|
26504
26509
|
{
|
|
26505
26510
|
"kind": "Content",
|
|
@@ -26516,17 +26521,17 @@
|
|
|
26516
26521
|
],
|
|
26517
26522
|
"isOptional": false,
|
|
26518
26523
|
"returnTypeTokenRange": {
|
|
26519
|
-
"startIndex":
|
|
26520
|
-
"endIndex":
|
|
26524
|
+
"startIndex": 5,
|
|
26525
|
+
"endIndex": 6
|
|
26521
26526
|
},
|
|
26522
26527
|
"releaseTag": "Public",
|
|
26523
26528
|
"overloadIndex": 1,
|
|
26524
26529
|
"parameters": [
|
|
26525
26530
|
{
|
|
26526
|
-
"parameterName": "
|
|
26531
|
+
"parameterName": "payload",
|
|
26527
26532
|
"parameterTypeTokenRange": {
|
|
26528
26533
|
"startIndex": 1,
|
|
26529
|
-
"endIndex":
|
|
26534
|
+
"endIndex": 4
|
|
26530
26535
|
}
|
|
26531
26536
|
}
|
|
26532
26537
|
],
|
|
@@ -26589,15 +26594,24 @@
|
|
|
26589
26594
|
{
|
|
26590
26595
|
"kind": "MethodSignature",
|
|
26591
26596
|
"canonicalReference": "@empathyco/x-components!NextQueriesActions#fetchNextQueryPreview:member(1)",
|
|
26592
|
-
"docComment": "/**\n * Requests the results to preview a next query, limited by {@link NextQueriesConfig.maxPreviewItemsToRequest}.\n *\n * @param
|
|
26597
|
+
"docComment": "/**\n * Requests the results to preview a next query, limited by {@link NextQueriesConfig.maxPreviewItemsToRequest}.\n *\n * @param payload - The payload object containing the query and its location.\n *\n * @returns A search response based on the next query.\n */\n",
|
|
26593
26598
|
"excerptTokens": [
|
|
26594
26599
|
{
|
|
26595
26600
|
"kind": "Content",
|
|
26596
|
-
"text": "fetchNextQueryPreview(
|
|
26601
|
+
"text": "fetchNextQueryPreview(payload: "
|
|
26597
26602
|
},
|
|
26598
26603
|
{
|
|
26599
26604
|
"kind": "Content",
|
|
26600
|
-
"text": "string"
|
|
26605
|
+
"text": "{\n query: string;\n location: "
|
|
26606
|
+
},
|
|
26607
|
+
{
|
|
26608
|
+
"kind": "Reference",
|
|
26609
|
+
"text": "FeatureLocation",
|
|
26610
|
+
"canonicalReference": "@empathyco/x-components!FeatureLocation:type"
|
|
26611
|
+
},
|
|
26612
|
+
{
|
|
26613
|
+
"kind": "Content",
|
|
26614
|
+
"text": " | undefined;\n }"
|
|
26601
26615
|
},
|
|
26602
26616
|
{
|
|
26603
26617
|
"kind": "Content",
|
|
@@ -26619,17 +26633,17 @@
|
|
|
26619
26633
|
],
|
|
26620
26634
|
"isOptional": false,
|
|
26621
26635
|
"returnTypeTokenRange": {
|
|
26622
|
-
"startIndex":
|
|
26623
|
-
"endIndex":
|
|
26636
|
+
"startIndex": 5,
|
|
26637
|
+
"endIndex": 7
|
|
26624
26638
|
},
|
|
26625
26639
|
"releaseTag": "Public",
|
|
26626
26640
|
"overloadIndex": 1,
|
|
26627
26641
|
"parameters": [
|
|
26628
26642
|
{
|
|
26629
|
-
"parameterName": "
|
|
26643
|
+
"parameterName": "payload",
|
|
26630
26644
|
"parameterTypeTokenRange": {
|
|
26631
26645
|
"startIndex": 1,
|
|
26632
|
-
"endIndex":
|
|
26646
|
+
"endIndex": 4
|
|
26633
26647
|
}
|
|
26634
26648
|
}
|
|
26635
26649
|
],
|
|
@@ -1587,7 +1587,7 @@ export const fetchAndSaveNextQueries: (context: NextQueriesActionContext, reques
|
|
|
1587
1587
|
export const fetchAndSaveNextQueriesWire: Wire<NextQueriesRequest | null>;
|
|
1588
1588
|
|
|
1589
1589
|
// @public
|
|
1590
|
-
export const fetchAndSaveNextQueryPreviewWire:
|
|
1590
|
+
export const fetchAndSaveNextQueryPreviewWire: AnyWire;
|
|
1591
1591
|
|
|
1592
1592
|
// Warning: (ae-forgotten-export) The symbol "PopularSearchesRequest" needs to be exported by the entry point index.d.ts
|
|
1593
1593
|
//
|
|
@@ -2507,10 +2507,16 @@ export type NextQueriesActionContext = XActionContext<NextQueriesState, NextQuer
|
|
|
2507
2507
|
export interface NextQueriesActions {
|
|
2508
2508
|
cancelFetchAndSaveNextQueries(): void;
|
|
2509
2509
|
fetchAndSaveNextQueries(request: NextQueriesRequest | null): void;
|
|
2510
|
-
fetchAndSaveNextQueryPreview(
|
|
2510
|
+
fetchAndSaveNextQueryPreview(payload: {
|
|
2511
|
+
query: string;
|
|
2512
|
+
location: FeatureLocation | undefined;
|
|
2513
|
+
}): void;
|
|
2511
2514
|
fetchNextQueries(request: NextQueriesRequest | null): NextQuery_2[] | null;
|
|
2512
2515
|
// Warning: (ae-forgotten-export) The symbol "SearchResponse" needs to be exported by the entry point index.d.ts
|
|
2513
|
-
fetchNextQueryPreview(
|
|
2516
|
+
fetchNextQueryPreview(payload: {
|
|
2517
|
+
query: string;
|
|
2518
|
+
location: FeatureLocation | undefined;
|
|
2519
|
+
}): SearchResponse | null;
|
|
2514
2520
|
setQueryFromLastHistoryQuery(historyQueries: HistoryQuery_2[]): void;
|
|
2515
2521
|
setUrlParams(urlParams: UrlParams): void;
|
|
2516
2522
|
}
|
|
@@ -2610,7 +2616,7 @@ export const nextQueriesWiring: {
|
|
|
2610
2616
|
setNextQueriesExtraParams: Wire<Dictionary<unknown>>;
|
|
2611
2617
|
};
|
|
2612
2618
|
NextQueryPreviewMounted: {
|
|
2613
|
-
fetchAndSaveNextQueryPreviewWire:
|
|
2619
|
+
fetchAndSaveNextQueryPreviewWire: AnyWire;
|
|
2614
2620
|
};
|
|
2615
2621
|
};
|
|
2616
2622
|
|
|
@@ -5,6 +5,7 @@ import { NextQueriesXStoreModule } from '../types';
|
|
|
5
5
|
* @param state - The state of the store, used to retrieve the rows and the extraParams to be sent
|
|
6
6
|
* in the request.
|
|
7
7
|
* @param query - The next query to send in the request.
|
|
8
|
+
* @param location - The {@link FeatureLocation} to send in the request.
|
|
8
9
|
* @returns A Promise of a SearchResponse when it fetches the results, `null` if the request was
|
|
9
10
|
* not made.
|
|
10
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-next-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-query-preview.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch-next-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-query-preview.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAInD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAoB7F,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { QueryMutations, QueryState } from '../../../store/utils/query.utils';
|
|
|
5
5
|
import { StatusMutations, StatusState } from '../../../store/utils/status-store.utils';
|
|
6
6
|
import { UrlParams } from '../../../types/url-params';
|
|
7
7
|
import { NextQueriesConfig } from '../config.types';
|
|
8
|
+
import { FeatureLocation } from '../../../types/index';
|
|
8
9
|
/**
|
|
9
10
|
* Next queries module state.
|
|
10
11
|
*
|
|
@@ -114,16 +115,22 @@ export interface NextQueriesActions {
|
|
|
114
115
|
* Requests the results to preview a next query,
|
|
115
116
|
* limited by {@link NextQueriesConfig.maxPreviewItemsToRequest}.
|
|
116
117
|
*
|
|
117
|
-
* @param query - The next query to retrieve the results.
|
|
118
118
|
* @returns A search response based on the next query.
|
|
119
|
+
* @param payload - The payload object containing the query and its location.
|
|
119
120
|
*/
|
|
120
|
-
fetchNextQueryPreview(
|
|
121
|
+
fetchNextQueryPreview(payload: {
|
|
122
|
+
query: string;
|
|
123
|
+
location: FeatureLocation | undefined;
|
|
124
|
+
}): SearchResponse | null;
|
|
121
125
|
/**
|
|
122
126
|
* Requests the results to preview a next query and saves them in the state.
|
|
123
127
|
*
|
|
124
|
-
* @param
|
|
128
|
+
* @param payload - The payload object containing the query and its location.
|
|
125
129
|
*/
|
|
126
|
-
fetchAndSaveNextQueryPreview(
|
|
130
|
+
fetchAndSaveNextQueryPreview(payload: {
|
|
131
|
+
query: string;
|
|
132
|
+
location: FeatureLocation | undefined;
|
|
133
|
+
}): void;
|
|
127
134
|
}
|
|
128
135
|
/**
|
|
129
136
|
* Next queries store module.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,cAAc,EACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,UAAU;IAC/D,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,sFAAsF;IAEtF,eAAe,EAAE,YAAY,EAAE,CAAC;IAChC,wDAAwD;IACxD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,4CAA4C;IAC5C,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,+DAA+D;IAC/D,WAAW,EAAE,SAAS,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,eAAe,EAAE,cAAc;IAC3E;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC/C;;;;OAIG;IACH,kBAAkB,CAAC,eAAe,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC1D;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAE7C;;;;;OAKG;IACH,iBAAiB,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAEpE;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,6BAA6B,IAAI,IAAI,CAAC;IACtC;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IACzE;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,GAAG,IAAI,CAAC;IAClE;;OAEG;IACH,4BAA4B,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACnE;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACzC;;;;;;OAMG;IACH,qBAAqB,CAAC,OAAO,EAAE;QAC7B,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAC;KACvC,GAAG,cAAc,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,4BAA4B,CAAC,OAAO,EAAE;QACpC,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAC;KACvC,GAAG,IAAI,CAAC;CACV;AAED;;;;GAIG;AACH,oBAAY,uBAAuB,GAAG,YAAY,CAChD,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,CACnB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,wBAAwB,GAAG,cAAc,CACnD,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,CACnB,CAAC"}
|
|
@@ -27,7 +27,7 @@ export declare const setQueryFromLastHistoryQueryWire: import("../..").Wire<impo
|
|
|
27
27
|
*
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
|
-
export declare const fetchAndSaveNextQueryPreviewWire: import("../..").
|
|
30
|
+
export declare const fetchAndSaveNextQueryPreviewWire: import("../..").AnyWire;
|
|
31
31
|
/**
|
|
32
32
|
* Resets the next query preview results.
|
|
33
33
|
*
|
|
@@ -66,7 +66,7 @@ export declare const nextQueriesWiring: {
|
|
|
66
66
|
setNextQueriesExtraParams: import("../..").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
67
67
|
};
|
|
68
68
|
NextQueryPreviewMounted: {
|
|
69
|
-
fetchAndSaveNextQueryPreviewWire: import("../..").
|
|
69
|
+
fetchAndSaveNextQueryPreviewWire: import("../..").AnyWire;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
//# sourceMappingURL=wiring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/next-queries/wiring.ts"],"names":[],"mappings":"AAwCA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,8BAAyB,CAAC;AAS1D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wEAA0B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,8EAA0C,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,mEAA+C,CAAC;AAE7F;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,yBAQ5C,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yBAAkD,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,mEAAmC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;CAwB5B,CAAC"}
|