@empathyco/x-components 3.0.0-alpha.163 → 3.0.0-alpha.166
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 +39 -0
- package/core/index.js.map +1 -1
- package/design-system/full-theme.css +13 -12
- package/docs/API-reference/api/x-components.clearquerypreviewwire.md +13 -0
- package/docs/API-reference/api/x-components.fetchandsavequerypreview.md +13 -0
- package/docs/API-reference/api/x-components.fetchandsavequerypreviewwire.md +13 -0
- package/docs/API-reference/api/x-components.fetchquerypreview.md +13 -0
- package/docs/API-reference/api/x-components.md +8 -0
- package/docs/API-reference/api/x-components.nextqueries.animation.md +1 -1
- package/docs/API-reference/api/x-components.nextqueries.highlightcurated.md +1 -1
- package/docs/API-reference/api/x-components.nextqueries.maxitemstorender.md +1 -1
- package/docs/API-reference/api/x-components.nextqueries.suggestions.md +13 -0
- package/docs/API-reference/api/x-components.queriespreviewactions.fetchandsavequerypreview.md +24 -0
- package/docs/API-reference/api/x-components.queriespreviewactions.fetchquerypreview.md +26 -0
- package/docs/API-reference/api/x-components.queriespreviewactions.md +8 -0
- package/docs/API-reference/api/x-components.queriespreviewconfig.maxitemstorequest.md +13 -0
- package/docs/API-reference/api/x-components.queriespreviewconfig.md +20 -0
- package/docs/API-reference/api/x-components.queriespreviewmutations.clearquerypreview.md +24 -0
- package/docs/API-reference/api/x-components.queriespreviewmutations.md +10 -0
- package/docs/API-reference/api/x-components.queriespreviewmutations.setparams.md +24 -0
- package/docs/API-reference/api/x-components.queriespreviewmutations.setquerypreview.md +24 -0
- package/docs/API-reference/api/x-components.queriespreviewmutations.setstatus.md +24 -0
- package/docs/API-reference/api/x-components.queriespreviewstate.config.md +13 -0
- package/docs/API-reference/api/x-components.queriespreviewstate.md +9 -0
- package/docs/API-reference/api/x-components.queriespreviewstate.params.md +13 -0
- package/docs/API-reference/api/x-components.queriespreviewstate.queriespreview.md +11 -0
- package/docs/API-reference/api/x-components.queriespreviewxevents.md +8 -0
- package/docs/API-reference/api/x-components.queriespreviewxevents.querypreviewremoved.md +13 -0
- package/docs/API-reference/api/x-components.queriespreviewxevents.querypreviewrequestchanged.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewitem.md +23 -0
- package/docs/API-reference/api/x-components.querypreviewitem.request.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewitem.results.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewitem.totalresults.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewstatuspayload.md +21 -0
- package/docs/API-reference/api/x-components.querypreviewstatuspayload.query.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewstatuspayload.status.md +13 -0
- package/docs/API-reference/api/x-components.setqueriespreviewextraparamswire.md +13 -0
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +1 -0
- package/js/index.js +3 -1
- package/js/index.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue_script.vue.js +14 -3
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js +40 -0
- package/js/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.js.map +1 -0
- package/js/x-modules/queries-preview/store/actions/fetch-query-preview.action.js +24 -0
- package/js/x-modules/queries-preview/store/actions/fetch-query-preview.action.js.map +1 -0
- package/js/x-modules/queries-preview/store/module.js +30 -4
- package/js/x-modules/queries-preview/store/module.js.map +1 -1
- package/js/x-modules/queries-preview/wiring.js +49 -2
- package/js/x-modules/queries-preview/wiring.js.map +1 -1
- package/package.json +9 -5
- package/queries-preview/index.js +3 -1
- package/report/x-components.api.json +858 -8
- package/report/x-components.api.md +66 -9
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts +19 -7
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/config.types.d.ts +12 -0
- package/types/x-modules/queries-preview/config.types.d.ts.map +1 -0
- package/types/x-modules/queries-preview/events.types.d.ts +11 -0
- package/types/x-modules/queries-preview/events.types.d.ts.map +1 -1
- package/types/x-modules/queries-preview/index.d.ts +1 -0
- package/types/x-modules/queries-preview/index.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts +13 -0
- package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map +1 -0
- package/types/x-modules/queries-preview/store/actions/fetch-query-preview.action.d.ts +13 -0
- package/types/x-modules/queries-preview/store/actions/fetch-query-preview.action.d.ts.map +1 -0
- package/types/x-modules/queries-preview/store/index.d.ts +2 -0
- package/types/x-modules/queries-preview/store/index.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/module.d.ts +1 -1
- package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/types.d.ts +80 -1
- package/types/x-modules/queries-preview/store/types.d.ts.map +1 -1
- package/types/x-modules/queries-preview/wiring.d.ts +29 -1
- package/types/x-modules/queries-preview/wiring.d.ts.map +1 -1
|
@@ -779,6 +779,9 @@ export const clearIdentifierResultsQuery: AnyWire;
|
|
|
779
779
|
// @public
|
|
780
780
|
export const clearPendingScrollToWire: AnyWire;
|
|
781
781
|
|
|
782
|
+
// @public
|
|
783
|
+
export const clearQueryPreviewWire: Wire<string>;
|
|
784
|
+
|
|
782
785
|
// @public
|
|
783
786
|
export const clearQuerySuggestionsQuery: AnyWire;
|
|
784
787
|
|
|
@@ -1569,6 +1572,14 @@ export const fetchAndSaveNextQueryPreviewWire: Wire<string>;
|
|
|
1569
1572
|
// @public
|
|
1570
1573
|
export const fetchAndSavePopularSearches: (context: PopularSearchesActionContext, request: PopularSearchesRequest) => void | Promise<void>;
|
|
1571
1574
|
|
|
1575
|
+
// @public
|
|
1576
|
+
export const fetchAndSaveQueryPreview: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreview'];
|
|
1577
|
+
|
|
1578
|
+
// Warning: (ae-forgotten-export) The symbol "SearchRequest" needs to be exported by the entry point index.d.ts
|
|
1579
|
+
//
|
|
1580
|
+
// @public
|
|
1581
|
+
export const fetchAndSaveQueryPreviewWire: Wire<SearchRequest>;
|
|
1582
|
+
|
|
1572
1583
|
// Warning: (ae-forgotten-export) The symbol "QuerySuggestionsRequest" needs to be exported by the entry point index.d.ts
|
|
1573
1584
|
//
|
|
1574
1585
|
// @public
|
|
@@ -1605,6 +1616,9 @@ export const fetchNextQueries: NextQueriesXStoreModule['actions']['fetchNextQuer
|
|
|
1605
1616
|
// @public
|
|
1606
1617
|
export const fetchPopularSearches: PopularSearchesXStoreModule['actions']['fetchSuggestions'];
|
|
1607
1618
|
|
|
1619
|
+
// @public
|
|
1620
|
+
export const fetchQueryPreview: QueriesPreviewXStoreModule['actions']['fetchQueryPreview'];
|
|
1621
|
+
|
|
1608
1622
|
// @public
|
|
1609
1623
|
export const fetchQuerySuggestions: QuerySuggestionsXStoreModule['actions']['fetchSuggestions'];
|
|
1610
1624
|
|
|
@@ -2177,8 +2191,6 @@ export interface InstallXOptions<API extends XAPI = XAPI> extends XPluginOptions
|
|
|
2177
2191
|
vueOptions?: VueConstructorPartialArgument;
|
|
2178
2192
|
}
|
|
2179
2193
|
|
|
2180
|
-
// Warning: (ae-forgotten-export) The symbol "SearchRequest" needs to be exported by the entry point index.d.ts
|
|
2181
|
-
//
|
|
2182
2194
|
// @public
|
|
2183
2195
|
export interface InternalSearchRequest extends SearchRequest {
|
|
2184
2196
|
page: number;
|
|
@@ -2446,13 +2458,15 @@ export type NamespacedWiringData<ModuleName extends XModuleName> = StoreModuleSt
|
|
|
2446
2458
|
|
|
2447
2459
|
// @public
|
|
2448
2460
|
export class NextQueries extends Vue_2 {
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
// Warning: (ae-forgotten-export) The symbol "NextQuery" needs to be exported by the entry point index.d.ts
|
|
2453
|
-
//
|
|
2461
|
+
animation?: Vue_2;
|
|
2462
|
+
highlightCurated: boolean;
|
|
2463
|
+
maxItemsToRender?: number;
|
|
2454
2464
|
// @internal
|
|
2455
|
-
|
|
2465
|
+
protected get renderedNextQueries(): NextQuery_2[];
|
|
2466
|
+
// @internal
|
|
2467
|
+
stateNextQueries: NextQuery_2[];
|
|
2468
|
+
// Warning: (ae-forgotten-export) The symbol "NextQuery" needs to be exported by the entry point index.d.ts
|
|
2469
|
+
suggestions?: NextQuery_2[];
|
|
2456
2470
|
}
|
|
2457
2471
|
|
|
2458
2472
|
// @public
|
|
@@ -2861,6 +2875,13 @@ export type QueriesPreviewActionContext = XActionContext<QueriesPreviewState, Qu
|
|
|
2861
2875
|
|
|
2862
2876
|
// @public
|
|
2863
2877
|
export interface QueriesPreviewActions {
|
|
2878
|
+
fetchAndSaveQueryPreview(request: SearchRequest): void;
|
|
2879
|
+
fetchQueryPreview(request: SearchRequest): SearchResponse | null;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// @public
|
|
2883
|
+
export interface QueriesPreviewConfig {
|
|
2884
|
+
maxItemsToRequest: number;
|
|
2864
2885
|
}
|
|
2865
2886
|
|
|
2866
2887
|
// @internal
|
|
@@ -2872,17 +2893,37 @@ export interface QueriesPreviewGetters {
|
|
|
2872
2893
|
|
|
2873
2894
|
// @public
|
|
2874
2895
|
export interface QueriesPreviewMutations {
|
|
2896
|
+
clearQueryPreview(query: string): void;
|
|
2897
|
+
setParams(params: Dictionary<unknown>): void;
|
|
2898
|
+
setQueryPreview(queryPreview: QueryPreviewItem): void;
|
|
2899
|
+
setStatus(payload: QueryPreviewStatusPayload): void;
|
|
2875
2900
|
}
|
|
2876
2901
|
|
|
2877
2902
|
// @public
|
|
2878
2903
|
export interface QueriesPreviewState {
|
|
2904
|
+
config: QueriesPreviewConfig;
|
|
2905
|
+
params: Dictionary<unknown>;
|
|
2906
|
+
// (undocumented)
|
|
2907
|
+
queriesPreview: Dictionary<QueryPreviewItem>;
|
|
2879
2908
|
}
|
|
2880
2909
|
|
|
2881
2910
|
// @internal
|
|
2882
|
-
export const queriesPreviewWiring: {
|
|
2911
|
+
export const queriesPreviewWiring: {
|
|
2912
|
+
QueryPreviewRequestChanged: {
|
|
2913
|
+
fetchAndSaveQueryPreviewWire: Wire<SearchRequest>;
|
|
2914
|
+
};
|
|
2915
|
+
QueryPreviewRemoved: {
|
|
2916
|
+
clearQueryPreviewWire: Wire<string>;
|
|
2917
|
+
};
|
|
2918
|
+
ExtraParamsChanged: {
|
|
2919
|
+
setQueriesPreviewExtraParamsWire: Wire<Dictionary<unknown>>;
|
|
2920
|
+
};
|
|
2921
|
+
};
|
|
2883
2922
|
|
|
2884
2923
|
// @public
|
|
2885
2924
|
export interface QueriesPreviewXEvents {
|
|
2925
|
+
QueryPreviewRemoved: string;
|
|
2926
|
+
QueryPreviewRequestChanged: SearchRequest;
|
|
2886
2927
|
}
|
|
2887
2928
|
|
|
2888
2929
|
// @public
|
|
@@ -2916,6 +2957,19 @@ export interface QueryPreview {
|
|
|
2916
2957
|
title?: string;
|
|
2917
2958
|
}
|
|
2918
2959
|
|
|
2960
|
+
// @public
|
|
2961
|
+
export interface QueryPreviewItem extends StatusState {
|
|
2962
|
+
request: SearchRequest;
|
|
2963
|
+
results: Result[];
|
|
2964
|
+
totalResults: number;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
// @public
|
|
2968
|
+
export interface QueryPreviewStatusPayload {
|
|
2969
|
+
query: string;
|
|
2970
|
+
status: RequestStatus;
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2919
2973
|
// @public
|
|
2920
2974
|
export class QuerySuggestion extends Vue_3 {
|
|
2921
2975
|
// @internal
|
|
@@ -4058,6 +4112,9 @@ export const setPendingScrollToWire: AnyWire;
|
|
|
4058
4112
|
// @public
|
|
4059
4113
|
export const setPopularSearchesExtraParams: Wire<Dictionary<unknown>>;
|
|
4060
4114
|
|
|
4115
|
+
// @public
|
|
4116
|
+
export const setQueriesPreviewExtraParamsWire: Wire<Dictionary<unknown>>;
|
|
4117
|
+
|
|
4061
4118
|
// @public
|
|
4062
4119
|
export const setQueryFromLastHistoryQuery: NextQueriesXStoreModule['actions']['setQueryFromLastHistoryQuery'];
|
|
4063
4120
|
|
|
@@ -15,24 +15,36 @@ export default class NextQueries extends Vue {
|
|
|
15
15
|
*
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
animation?: Vue;
|
|
19
19
|
/**
|
|
20
20
|
* Number of next queries to be rendered.
|
|
21
21
|
*
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
maxItemsToRender?: number;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Flag to indicate if the curated next queries should be displayed different.
|
|
27
27
|
*
|
|
28
|
-
* @
|
|
28
|
+
* @public
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
highlightCurated: boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* NextQueries list to be used instead of state NextQueries.
|
|
33
33
|
*
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
suggestions?: NextQueryModel[];
|
|
37
|
+
/**
|
|
38
|
+
* The list of next queries from the state.
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
stateNextQueries: NextQueryModel[];
|
|
43
|
+
/**.
|
|
44
|
+
* The list of next queries finally rendered
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
protected get renderedNextQueries(): NextQueryModel[];
|
|
37
49
|
}
|
|
38
50
|
//# sourceMappingURL=next-queries.vue?rollup-plugin-vue=script.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-queries.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,GAAG,MAAM,KAAK,CAAC;AAQtB;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,GAAG;IAC1C;;;;OAIG;
|
|
1
|
+
{"version":3,"file":"next-queries.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,GAAG,MAAM,KAAK,CAAC;AAQtB;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,GAAG;IAC1C;;;;OAIG;IAEI,SAAS,CAAC,EAAE,GAAG,CAAC;IAEvB;;;;OAIG;IAEI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;IAEI,gBAAgB,EAAG,OAAO,CAAC;IAElC;;;;OAIG;IAEI,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAEtC;;;;OAIG;IAEI,gBAAgB,EAAG,cAAc,EAAE,CAAC;IAE3C;;;;OAIG;IACH,SAAS,KAAK,mBAAmB,IAAI,cAAc,EAAE,CAEpD;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for the {@link QueriesPreviewXModule}.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface QueriesPreviewConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Maximum number of items to request.
|
|
9
|
+
*/
|
|
10
|
+
maxItemsToRequest: number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=config.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/config.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SearchRequest } from '@empathyco/x-types';
|
|
1
2
|
/**
|
|
2
3
|
* Dictionary of the events of QueriesPreview XModule, where each key is the event name, and the
|
|
3
4
|
* value is the event payload type or `void` if it has no payload.
|
|
@@ -5,5 +6,15 @@
|
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
7
8
|
export interface QueriesPreviewXEvents {
|
|
9
|
+
/**
|
|
10
|
+
* Any property of the queries preview request has changed.
|
|
11
|
+
* Payload: The new {@link @empathyco/x-types#SearchRequest | request}.
|
|
12
|
+
*/
|
|
13
|
+
QueryPreviewRequestChanged: SearchRequest;
|
|
14
|
+
/**
|
|
15
|
+
* The component that shows a Query preview has been unmounted.
|
|
16
|
+
* Payload: The query whose preview has been removed.
|
|
17
|
+
*/
|
|
18
|
+
QueryPreviewRemoved: string;
|
|
8
19
|
}
|
|
9
20
|
//# sourceMappingURL=events.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/events.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;
|
|
1
|
+
{"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,0BAA0B,EAAE,aAAa,CAAC;IAC1C;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { QueriesPreviewXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link QueriesPreviewActions.fetchAndSaveQueryPreview}.
|
|
4
|
+
*
|
|
5
|
+
* @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param request - The query preview request to make.
|
|
8
|
+
* @returns A Promise of a SearchResponse when it fetches the results.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const fetchAndSaveQueryPreview: QueriesPreviewXStoreModule['actions']['fetchAndSaveQueryPreview'];
|
|
13
|
+
//# sourceMappingURL=fetch-and-save-query-preview.action.d.ts.map
|
package/types/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-and-save-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-and-save-query-preview.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;GASG;AAEH,eAAO,MAAM,wBAAwB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,0BAA0B,CA0BpG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { QueriesPreviewXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link QueriesPreviewActions.fetchQueryPreview}.
|
|
4
|
+
*
|
|
5
|
+
* @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param request - The query preview request to make.
|
|
8
|
+
* @returns A Promise of a SearchResponse when it fetches the results.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const fetchQueryPreview: QueriesPreviewXStoreModule['actions']['fetchQueryPreview'];
|
|
13
|
+
//# sourceMappingURL=fetch-query-preview.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-query-preview.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/queries-preview/store/actions/fetch-query-preview.action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAWxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,0BA2BxC,CAAC"}
|
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Result, SearchRequest, SearchResponse } from '@empathyco/x-types';
|
|
2
|
+
import { Dictionary } from '@empathyco/x-utils';
|
|
3
|
+
import { XActionContext } from '../../../store/actions.types';
|
|
4
|
+
import { XStoreModule } from '../../../store/store.types';
|
|
5
|
+
import { RequestStatus, StatusState } from '../../../store/utils/status-store.utils';
|
|
6
|
+
import { QueriesPreviewConfig } from '../config.types';
|
|
7
|
+
/**
|
|
8
|
+
* QueriesPreview store state.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface QueryPreviewItem extends StatusState {
|
|
13
|
+
/**
|
|
14
|
+
* Request object to retrieve the query preview using the search adapter, or null if there is
|
|
15
|
+
* no valid data to conform a valid request.
|
|
16
|
+
*/
|
|
17
|
+
request: SearchRequest;
|
|
18
|
+
/** Results of the query preview request. */
|
|
19
|
+
results: Result[];
|
|
20
|
+
/** The total number of results for the search query. */
|
|
21
|
+
totalResults: number;
|
|
22
|
+
}
|
|
2
23
|
/**
|
|
3
24
|
* QueriesPreview store state.
|
|
4
25
|
*
|
|
5
26
|
* @public
|
|
6
27
|
*/
|
|
7
28
|
export interface QueriesPreviewState {
|
|
29
|
+
queriesPreview: Dictionary<QueryPreviewItem>;
|
|
30
|
+
/** The configuration of the queries preview module. */
|
|
31
|
+
config: QueriesPreviewConfig;
|
|
32
|
+
/** The extra params property of the state. */
|
|
33
|
+
params: Dictionary<unknown>;
|
|
8
34
|
}
|
|
9
35
|
/**
|
|
10
36
|
* QueriesPreview store getters.
|
|
@@ -19,6 +45,30 @@ export interface QueriesPreviewGetters {
|
|
|
19
45
|
* @public
|
|
20
46
|
*/
|
|
21
47
|
export interface QueriesPreviewMutations {
|
|
48
|
+
/**
|
|
49
|
+
* Removes a query preview entry from the queries preview's dictionary.
|
|
50
|
+
*
|
|
51
|
+
* @param query - Query whose entry will be removed.
|
|
52
|
+
*/
|
|
53
|
+
clearQueryPreview(query: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the extra params of the module.
|
|
56
|
+
*
|
|
57
|
+
* @param params - The new extra params.
|
|
58
|
+
*/
|
|
59
|
+
setParams(params: Dictionary<unknown>): void;
|
|
60
|
+
/**
|
|
61
|
+
* Adds a new entry to the queries preview's dictionary.
|
|
62
|
+
*
|
|
63
|
+
* @param queryPreview - The query preview item to add.
|
|
64
|
+
*/
|
|
65
|
+
setQueryPreview(queryPreview: QueryPreviewItem): void;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the status of a query preview request.
|
|
68
|
+
*
|
|
69
|
+
* @param payload - Object containing the query and the status of a query preview item.
|
|
70
|
+
*/
|
|
71
|
+
setStatus(payload: QueryPreviewStatusPayload): void;
|
|
22
72
|
}
|
|
23
73
|
/**
|
|
24
74
|
* QueriesPreview store actions.
|
|
@@ -26,6 +76,20 @@ export interface QueriesPreviewMutations {
|
|
|
26
76
|
* @public
|
|
27
77
|
*/
|
|
28
78
|
export interface QueriesPreviewActions {
|
|
79
|
+
/**
|
|
80
|
+
* Requests the results for a query preview,
|
|
81
|
+
* limited by {@link QueriesPreviewConfig.maxItemsToRequest}.
|
|
82
|
+
*
|
|
83
|
+
* @param request - The request object to retrieve the query preview.
|
|
84
|
+
* @returns A search response based on the query.
|
|
85
|
+
*/
|
|
86
|
+
fetchQueryPreview(request: SearchRequest): SearchResponse | null;
|
|
87
|
+
/**
|
|
88
|
+
* Requests the results for a query preview and saves them in the state.
|
|
89
|
+
*
|
|
90
|
+
* @param request - The request object to retrieve the query preview.
|
|
91
|
+
*/
|
|
92
|
+
fetchAndSaveQueryPreview(request: SearchRequest): void;
|
|
29
93
|
}
|
|
30
94
|
/**
|
|
31
95
|
* QueriesPreview type safe store module.
|
|
@@ -39,4 +103,19 @@ export declare type QueriesPreviewXStoreModule = XStoreModule<QueriesPreviewStat
|
|
|
39
103
|
* @public
|
|
40
104
|
*/
|
|
41
105
|
export declare type QueriesPreviewActionContext = XActionContext<QueriesPreviewState, QueriesPreviewGetters, QueriesPreviewMutations, QueriesPreviewActions>;
|
|
106
|
+
/**
|
|
107
|
+
* Payload to use in the `setStatus` mutation.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export interface QueryPreviewStatusPayload {
|
|
112
|
+
/**
|
|
113
|
+
* The query whose request status to modify.
|
|
114
|
+
*/
|
|
115
|
+
query: string;
|
|
116
|
+
/**
|
|
117
|
+
* The new request status.
|
|
118
|
+
*/
|
|
119
|
+
status: RequestStatus;
|
|
120
|
+
}
|
|
42
121
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;;OAGG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAElC,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,uDAAuD;IACvD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,8CAA8C;IAC9C,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;CAAG;AAEzC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C;;;;OAIG;IACH,eAAe,CAAC,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtD;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACrD;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,GAAG,IAAI,CAAC;IACjE;;;;OAIG;IACH,wBAAwB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;CACxD;AAED;;;;GAIG;AACH,oBAAY,0BAA0B,GAAG,YAAY,CACnD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,2BAA2B,GAAG,cAAc,CACtD,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requests and stores the query preview results.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const fetchAndSaveQueryPreviewWire: import("../..").Wire<import("@empathyco/x-types").SearchRequest>;
|
|
7
|
+
/**
|
|
8
|
+
* Clears a query preview from queries preview module.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const clearQueryPreviewWire: import("../..").Wire<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the queries preview state `params`.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare const setQueriesPreviewExtraParamsWire: import("../..").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
1
19
|
/**
|
|
2
20
|
* Wiring configuration for the {@link QueriesPreviewXModule | queriesPreview module}.
|
|
3
21
|
*
|
|
4
22
|
* @internal
|
|
5
23
|
*/
|
|
6
|
-
export declare const queriesPreviewWiring: {
|
|
24
|
+
export declare const queriesPreviewWiring: {
|
|
25
|
+
QueryPreviewRequestChanged: {
|
|
26
|
+
fetchAndSaveQueryPreviewWire: import("../..").Wire<import("@empathyco/x-types").SearchRequest>;
|
|
27
|
+
};
|
|
28
|
+
QueryPreviewRemoved: {
|
|
29
|
+
clearQueryPreviewWire: import("../..").Wire<string>;
|
|
30
|
+
};
|
|
31
|
+
ExtraParamsChanged: {
|
|
32
|
+
setQueriesPreviewExtraParamsWire: import("../..").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
7
35
|
//# sourceMappingURL=wiring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/wiring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/queries-preview/wiring.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,kEAA2C,CAAC;AAErF;;;;GAIG;AAEH,eAAO,MAAM,qBAAqB,8BAAkC,CAAC;AACrE;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,wEAA0B,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;CAU/B,CAAC"}
|