@empathyco/x-components 6.0.0-alpha.162 → 6.0.0-alpha.164
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 +17 -0
- package/docs/API-reference/api/x-adapter-platform.mapfilters.md +80 -0
- package/docs/API-reference/api/x-adapter-platform.md +1 -0
- package/docs/API-reference/api/x-components.aimutations.md +1 -0
- package/docs/API-reference/api/x-components.aimutations.setselectedfilters.md +13 -0
- package/docs/API-reference/api/x-components.aistate.md +1 -0
- package/docs/API-reference/api/x-components.aistate.selectedfilters.md +13 -0
- package/docs/API-reference/api/x-types.aisuggestionsrequest.md +2 -2
- package/docs/API-reference/api/x-types.aisuggestionssearchrequest.md +2 -2
- package/js/x-modules/ai/store/getters/suggestions-request.getter.js +2 -2
- package/js/x-modules/ai/store/getters/suggestions-request.getter.js.map +1 -1
- package/js/x-modules/ai/store/getters/suggestions-search-request.getter.js +2 -2
- package/js/x-modules/ai/store/getters/suggestions-search-request.getter.js.map +1 -1
- package/js/x-modules/ai/store/module.js +9 -2
- package/js/x-modules/ai/store/module.js.map +1 -1
- package/js/x-modules/ai/wiring.js +31 -21
- package/js/x-modules/ai/wiring.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter-platform.api.json +59 -0
- package/report/x-components.api.json +77 -0
- package/report/x-components.api.md +17 -10
- package/report/x-types.api.json +26 -0
- package/types/x-modules/ai/store/getters/suggestions-search-request.getter.d.ts.map +1 -1
- package/types/x-modules/ai/store/module.d.ts.map +1 -1
- package/types/x-modules/ai/store/types.d.ts +12 -1
- package/types/x-modules/ai/store/types.d.ts.map +1 -1
- package/types/x-modules/ai/wiring.d.ts +14 -8
- package/types/x-modules/ai/wiring.d.ts.map +1 -1
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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
|
+
## 6.0.0-alpha.164 (2025-10-20)
|
|
7
|
+
|
|
8
|
+
* feat(ai): connect query preview selection with ai module (#1904) ([400bacb](https://github.com/empathyco/x/commit/400bacb)), closes [#1904](https://github.com/empathyco/x/issues/1904)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.0.0-alpha.163 (2025-10-15)
|
|
15
|
+
|
|
16
|
+
* fix: minor improvements in implementation ([454fb8c](https://github.com/empathyco/x/commit/454fb8c))
|
|
17
|
+
* feat(AiOverview): add selected filters to requests ([2a6a446](https://github.com/empathyco/x/commit/2a6a446))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## 6.0.0-alpha.162 (2025-10-13)
|
|
7
24
|
|
|
8
25
|
* feat(ai): add `suggestions-extra-content` slot to ai-overview component ([350a7c1](https://github.com/empathyco/x/commit/350a7c1))
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [mapFilters](./x-adapter-platform.mapfilters.md)
|
|
4
|
+
|
|
5
|
+
## mapFilters() function
|
|
6
|
+
|
|
7
|
+
Converts the filters to the shape the Platform's API is expecting.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function mapFilters(filters?: Record<string, Filter[]>): string[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| filters | Record<string, Filter\[\]> | _(Optional)_ The filters from our internal request. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string\[\]
|
|
24
|
+
|
|
25
|
+
The filters ready to be consumed for the API.
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const filters = {
|
|
32
|
+
offer: [
|
|
33
|
+
{
|
|
34
|
+
facetId: 'offer',
|
|
35
|
+
modelName: 'SimpleFilter',
|
|
36
|
+
id: 'price:[0 TO 10]',
|
|
37
|
+
selected: true,
|
|
38
|
+
label: 'In Offer'
|
|
39
|
+
} as SimpleFilter
|
|
40
|
+
],
|
|
41
|
+
categoryPaths: [
|
|
42
|
+
{
|
|
43
|
+
facetId: 'categoryPaths',
|
|
44
|
+
id: 'categoryIds:ffc61e1e9__be257cb26',
|
|
45
|
+
label: 'Fragrance',
|
|
46
|
+
modelName: 'HierarchicalFilter',
|
|
47
|
+
parentId: 'categoryIds:ffc61e1e9',
|
|
48
|
+
selected: true,
|
|
49
|
+
totalResults: 1
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
facetId: 'categoryPaths',
|
|
53
|
+
id: 'categoryIds:ffc61e1e9__fa5ef54f2',
|
|
54
|
+
label: 'Fragrance',
|
|
55
|
+
modelName: 'HierarchicalFilter',
|
|
56
|
+
parentId: 'categoryIds:ffc61e1e9',
|
|
57
|
+
selected: true,
|
|
58
|
+
totalResults: 1
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],
|
|
62
|
+
facetId: 'categoryPaths',
|
|
63
|
+
id: 'categoryIds:ffc61e1e9',
|
|
64
|
+
label: 'Personal Care',
|
|
65
|
+
modelName: 'HierarchicalFilter',
|
|
66
|
+
parentId: null,
|
|
67
|
+
selected: true,
|
|
68
|
+
totalResults: 1
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const mappedFilters = mapFilters({ filters });
|
|
74
|
+
mappedFilters is [
|
|
75
|
+
'price:[0 TO 10]',
|
|
76
|
+
'categoryIds:ffc61e1e9__be257cb26',
|
|
77
|
+
'categoryIds:ffc61e1e9__fa5ef54f2'
|
|
78
|
+
];
|
|
79
|
+
```
|
|
80
|
+
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| [getDisplayTaggingInfoFromUrl(displayTaggingUrl)](./x-adapter-platform.getdisplaytagginginfofromurl.md) | Generates the displayClick tagging info. |
|
|
13
13
|
| [getFacetConfig(type)](./x-adapter-platform.getfacetconfig.md) | Returns the facet's config. |
|
|
14
14
|
| [getTaggingInfoFromUrl(taggingUrl)](./x-adapter-platform.gettagginginfofromurl.md) | Extracts the tagging info from a URL. |
|
|
15
|
+
| [mapFilters(filters)](./x-adapter-platform.mapfilters.md) | Converts the filters to the shape the Platform's API is expecting. |
|
|
15
16
|
|
|
16
17
|
## Interfaces
|
|
17
18
|
|
|
@@ -24,6 +24,7 @@ export interface AiMutations extends ConfigMutations<AiState>, QueryMutations
|
|
|
24
24
|
| [setParams](./x-components.aimutations.setparams.md) | | (params: Dictionary<unknown>) => void | Sets the extra params of the module. |
|
|
25
25
|
| [setQueries](./x-components.aimutations.setqueries.md) | | (queries: AiSuggestionQuery\[\]) => void | Sets the queries from the streamed response. |
|
|
26
26
|
| [setResponseText](./x-components.aimutations.setresponsetext.md) | | (responseText: string) => void | Sets the responseText from the streamed response. |
|
|
27
|
+
| [setSelectedFilters](./x-components.aimutations.setselectedfilters.md) | | (selectedFilters: Filter\[\]) => void | Sets the selected filters of the module. |
|
|
27
28
|
| [setSuggestionsLoading](./x-components.aimutations.setsuggestionsloading.md) | | (value: boolean) => void | Sets the loading for the suggestions response. |
|
|
28
29
|
| [setSuggestionsSearch](./x-components.aimutations.setsuggestionssearch.md) | | (suggestionsSearch: AiSuggestionSearch\[\]) => void | Sets the suggestions search from the suggestions search response. |
|
|
29
30
|
| [setSuggestionsSearchLoading](./x-components.aimutations.setsuggestionssearchloading.md) | | (value: boolean) => void | Sets the loading fot the suggestions search response. |
|
|
@@ -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) > [AiMutations](./x-components.aimutations.md) > [setSelectedFilters](./x-components.aimutations.setselectedfilters.md)
|
|
4
|
+
|
|
5
|
+
## AiMutations.setSelectedFilters property
|
|
6
|
+
|
|
7
|
+
Sets the selected filters of the module.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
setSelectedFilters: (selectedFilters: Filter[]) => void;
|
|
13
|
+
```
|
|
@@ -24,6 +24,7 @@ export interface AiState extends QueryState
|
|
|
24
24
|
| [queries](./x-components.aistate.queries.md) | | AiSuggestionQuery\[\] | |
|
|
25
25
|
| [relatedTags](./x-components.aistate.relatedtags.md) | | RelatedTag\[\] | The list of the related tags, related to the <code>query</code> property of the state. |
|
|
26
26
|
| [responseText](./x-components.aistate.responsetext.md) | | string | The streamed field from suggestion response. |
|
|
27
|
+
| [selectedFilters](./x-components.aistate.selectedfilters.md) | | Dictionary<Filter\[\]> | The dictionary of selected filters, used to perform the AI requests. The key is the facet ID, and the value the list of filters for that facet. |
|
|
27
28
|
| [suggestionsLoading](./x-components.aistate.suggestionsloading.md) | | boolean | Loading state for the suggestions response |
|
|
28
29
|
| [suggestionsSearch](./x-components.aistate.suggestionssearch.md) | | AiSuggestionSearch\[\] | The results per query retrieved by the suggestion search endpoint |
|
|
29
30
|
| [suggestionsSearchLoading](./x-components.aistate.suggestionssearchloading.md) | | boolean | Loading state for the suggestions search response |
|
|
@@ -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) > [AiState](./x-components.aistate.md) > [selectedFilters](./x-components.aistate.selectedfilters.md)
|
|
4
|
+
|
|
5
|
+
## AiState.selectedFilters property
|
|
6
|
+
|
|
7
|
+
The dictionary of selected filters, used to perform the AI requests. The key is the facet ID, and the value the list of filters for that facet.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
selectedFilters: Dictionary<Filter[]>;
|
|
13
|
+
```
|
|
@@ -9,9 +9,9 @@ Request for the ai suggestions endpoint.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface AiSuggestionsRequest extends ExtraParamsRequest, TrackableRequest
|
|
12
|
+
export interface AiSuggestionsRequest extends ExtraParamsRequest, TrackableRequest, FilterableRequest
|
|
13
13
|
```
|
|
14
|
-
**Extends:** [ExtraParamsRequest](./x-types.extraparamsrequest.md)<!-- -->, [TrackableRequest](./x-types.trackablerequest.md)
|
|
14
|
+
**Extends:** [ExtraParamsRequest](./x-types.extraparamsrequest.md)<!-- -->, [TrackableRequest](./x-types.trackablerequest.md)<!-- -->, [FilterableRequest](./x-types.filterablerequest.md)
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -9,9 +9,9 @@ Request for the suggestions-search endpoint.
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export interface AiSuggestionsSearchRequest extends ExtraParamsRequest, TrackableRequest
|
|
12
|
+
export interface AiSuggestionsSearchRequest extends ExtraParamsRequest, TrackableRequest, FilterableRequest
|
|
13
13
|
```
|
|
14
|
-
**Extends:** [ExtraParamsRequest](./x-types.extraparamsrequest.md)<!-- -->, [TrackableRequest](./x-types.trackablerequest.md)
|
|
14
|
+
**Extends:** [ExtraParamsRequest](./x-types.extraparamsrequest.md)<!-- -->, [TrackableRequest](./x-types.trackablerequest.md)<!-- -->, [FilterableRequest](./x-types.filterablerequest.md)
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
const suggestionsRequest = ({ params, origin }, { query }) => {
|
|
13
|
-
return { query, extraParams
|
|
12
|
+
const suggestionsRequest = ({ params: extraParams, selectedFilters: filters, origin }, { query }) => {
|
|
13
|
+
return { query, extraParams, filters, ...(origin && { origin }) };
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { suggestionsRequest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions-request.getter.js","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-request.getter.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\n\n/**\n * Default implementation for the {@link AiGetters.suggestionsRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai\n * module.\n * @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the\n * ai module.\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\nexport const suggestionsRequest: AiXStoreModule['getters']['suggestionsRequest'] = (\n { params, origin },\n { query },\n) => {\n return { query, extraParams
|
|
1
|
+
{"version":3,"file":"suggestions-request.getter.js","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-request.getter.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\n\n/**\n * Default implementation for the {@link AiGetters.suggestionsRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai\n * module.\n * @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the\n * ai module.\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\nexport const suggestionsRequest: AiXStoreModule['getters']['suggestionsRequest'] = (\n { params: extraParams, selectedFilters: filters, origin },\n { query },\n) => {\n return { query, extraParams, filters, ...(origin && { origin }) }\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;;;AAUG;MACU,kBAAkB,GAAoD,CACjF,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,EACzD,EAAE,KAAK,EAAE,KACP;AACF,IAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,MAAM,IAAI,EAAE,MAAM,EAAE,GAAG,CAAA;AACnE;;;;"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
const suggestionsSearchRequest = ({ params,
|
|
12
|
-
return queries.length ? { queries, extraParams
|
|
11
|
+
const suggestionsSearchRequest = ({ queries, params: extraParams, selectedFilters: filters, origin, }) => {
|
|
12
|
+
return queries.length ? { queries, extraParams, filters, ...(origin && { origin }) } : null;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { suggestionsSearchRequest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions-search-request.getter.js","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-search-request.getter.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\n\n/**\n * Default implementation for the {@link AiGetters.suggestionsSearchRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai\n * module.\n *\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\nexport const suggestionsSearchRequest: AiXStoreModule['getters']['suggestionsSearchRequest'] = ({\n params,\n
|
|
1
|
+
{"version":3,"file":"suggestions-search-request.getter.js","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-search-request.getter.ts"],"sourcesContent":["import type { AiXStoreModule } from '../types'\n\n/**\n * Default implementation for the {@link AiGetters.suggestionsSearchRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai\n * module.\n *\n * @returns The ai request to fetch data from the API.\n *\n * @public\n */\nexport const suggestionsSearchRequest: AiXStoreModule['getters']['suggestionsSearchRequest'] = ({\n queries,\n params: extraParams,\n selectedFilters: filters,\n origin,\n}) => {\n return queries.length ? { queries, extraParams, filters, ...(origin && { origin }) } : null\n}\n"],"names":[],"mappings":"AAEA;;;;;;;;;AASG;AACU,MAAA,wBAAwB,GAA0D,CAAC,EAC9F,OAAO,EACP,MAAM,EAAE,WAAW,EACnB,eAAe,EAAE,OAAO,EACxB,MAAM,GACP,KAAI;IACH,OAAO,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,MAAM,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI,CAAA;AAC7F;;;;"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { isFacetFilter } from '@empathyco/x-types';
|
|
1
2
|
import { setConfig, mergeConfig } from '../../../store/utils/config-store.utils.js';
|
|
3
|
+
import { groupItemsBy } from '../../../utils/array.js';
|
|
4
|
+
import { UNKNOWN_FACET_KEY } from '../../facets/store/constants.js';
|
|
2
5
|
import { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action.js';
|
|
3
6
|
import { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action.js';
|
|
4
7
|
import { saveOrigin } from './actions/save-origin.action.js';
|
|
@@ -15,6 +18,7 @@ import { suggestionsSearchRequest } from './getters/suggestions-search-request.g
|
|
|
15
18
|
const aiXStoreModule = {
|
|
16
19
|
state: () => ({
|
|
17
20
|
...resettableAiState(),
|
|
21
|
+
selectedFilters: {},
|
|
18
22
|
query: '',
|
|
19
23
|
config: {},
|
|
20
24
|
params: {},
|
|
@@ -50,8 +54,6 @@ const aiXStoreModule = {
|
|
|
50
54
|
setSuggestionsSearchLoading: (state, value) => {
|
|
51
55
|
state.suggestionsSearchLoading = value;
|
|
52
56
|
},
|
|
53
|
-
setConfig,
|
|
54
|
-
mergeConfig,
|
|
55
57
|
setQuery: (state, query) => {
|
|
56
58
|
state.query = query;
|
|
57
59
|
},
|
|
@@ -70,6 +72,11 @@ const aiXStoreModule = {
|
|
|
70
72
|
setIsNoResults(state, isNoResults) {
|
|
71
73
|
state.isNoResults = isNoResults;
|
|
72
74
|
},
|
|
75
|
+
setSelectedFilters(state, selectedFilters) {
|
|
76
|
+
state.selectedFilters = groupItemsBy(selectedFilters, filter => isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY);
|
|
77
|
+
},
|
|
78
|
+
setConfig,
|
|
79
|
+
mergeConfig,
|
|
73
80
|
},
|
|
74
81
|
actions: {
|
|
75
82
|
fetchAndSaveAiSuggestions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch } from '@empathyco/x-types'\nimport type { QueryState } from '../../../store'\nimport type { AiXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiQuery as query,\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n query: '',\n config: {},\n params: {},\n origin: null,\n relatedTags: [],\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n query,\n },\n mutations: {\n /* Streamed fields */\n setResponseText: (state, responseText: string) => {\n state.responseText = responseText\n },\n setSuggestionText: (state, suggestionText: string) => {\n state.suggestionText = suggestionText\n },\n setQueries: (state, queries: AiSuggestionQuery[]) => {\n state.queries = queries\n },\n setTagging: (state, tagging) => {\n state.tagging = tagging\n },\n /* END Streamed fields */\n setSuggestionsSearch: (state, suggestionsSearch: AiSuggestionSearch[]) => {\n state.suggestionsSearch = suggestionsSearch\n },\n setSuggestionsLoading: (state, value) => {\n state.suggestionsLoading = value\n },\n setSuggestionsSearchLoading: (state, value) => {\n state.suggestionsSearchLoading = value\n },\n
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch } from '@empathyco/x-types'\nimport type { QueryState } from '../../../store'\nimport type { AiXStoreModule } from './types'\nimport { isFacetFilter } from '@empathyco/x-types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { groupItemsBy } from '../../../utils/array'\nimport { UNKNOWN_FACET_KEY } from '../../facets/store/constants'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { saveOrigin } from './actions/save-origin.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiQuery as query,\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n selectedFilters: {},\n query: '',\n config: {},\n params: {},\n origin: null,\n relatedTags: [],\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n query,\n },\n mutations: {\n /* Streamed fields */\n setResponseText: (state, responseText: string) => {\n state.responseText = responseText\n },\n setSuggestionText: (state, suggestionText: string) => {\n state.suggestionText = suggestionText\n },\n setQueries: (state, queries: AiSuggestionQuery[]) => {\n state.queries = queries\n },\n setTagging: (state, tagging) => {\n state.tagging = tagging\n },\n /* END Streamed fields */\n setSuggestionsSearch: (state, suggestionsSearch: AiSuggestionSearch[]) => {\n state.suggestionsSearch = suggestionsSearch\n },\n setSuggestionsLoading: (state, value) => {\n state.suggestionsLoading = value\n },\n setSuggestionsSearchLoading: (state, value) => {\n state.suggestionsSearchLoading = value\n },\n setQuery: (state: QueryState, query: string) => {\n state.query = query\n },\n setParams(state, params) {\n state.params = params\n },\n setOrigin(state, origin = null) {\n state.origin = origin\n },\n resetAiState(state) {\n Object.assign(state, resettableAiState())\n },\n setAiRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setIsNoResults(state, isNoResults: boolean) {\n state.isNoResults = isNoResults\n },\n setSelectedFilters(state, selectedFilters) {\n state.selectedFilters = groupItemsBy(selectedFilters, filter =>\n isFacetFilter(filter) ? filter.facetId : UNKNOWN_FACET_KEY,\n )\n },\n setConfig,\n mergeConfig,\n },\n actions: {\n fetchAndSaveAiSuggestions,\n fetchAndSaveAiSuggestionsSearch,\n setUrlParams,\n saveOrigin,\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 AiState}.\n *\n * @internal\n */\nfunction resettableAiState() {\n return {\n responseText: '',\n suggestionText: '',\n queries: [],\n tagging: undefined,\n suggestionsSearch: [],\n suggestionsLoading: false,\n suggestionsSearchLoading: false,\n isNoResults: true,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAiBA;;;;AAIG;AACU,MAAA,cAAc,GAAmB;AAC5C,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,iBAAiB,EAAE;AACtB,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,WAAW,EAAE,EAAE;KAChB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,kBAAkB;QAClB,wBAAwB;QACxB,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;;AAET,QAAA,eAAe,EAAE,CAAC,KAAK,EAAE,YAAoB,KAAI;AAC/C,YAAA,KAAK,CAAC,YAAY,GAAG,YAA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AAK,EAAE,WAAoB,EAAA;AACxC,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAA;SAChC;QACD,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAA;YACvC,KAAK,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,IAC1D,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAC3D,CAAA;SACF;QACD,SAAS;QACT,WAAW;AACZ,KAAA;AACD,IAAA,OAAO,EAAE;QACP,yBAAyB;QACzB,+BAA+B;QAC/B,YAAY;QACZ,UAAU;AACX,KAAA;EACF;AAED;;;;;;;AAOG;AACH,SAAS,iBAAiB,GAAA;IACxB,OAAO;AACL,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,iBAAiB,EAAE,EAAE;AACrB,QAAA,kBAAkB,EAAE,KAAK;AACzB,QAAA,wBAAwB,EAAE,KAAK;AAC/B,QAAA,WAAW,EAAE,IAAI;KAClB,CAAA;AACH;;;;"}
|
|
@@ -3,7 +3,7 @@ import 'rxjs/operators';
|
|
|
3
3
|
import 'rxjs';
|
|
4
4
|
import { createWiring } from '../../wiring/wiring.utils.js';
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/** AI XModule name. */
|
|
7
7
|
const moduleName = 'ai';
|
|
8
8
|
/** WireCommit for AiXModule. */
|
|
9
9
|
const wireCommit = namespacedWireCommit(moduleName);
|
|
@@ -11,22 +11,26 @@ const wireCommit = namespacedWireCommit(moduleName);
|
|
|
11
11
|
const wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName);
|
|
12
12
|
/** WireDispatch for AiXModule.*/
|
|
13
13
|
const wireDispatch = namespacedWireDispatch(moduleName);
|
|
14
|
-
/** Sets the
|
|
15
|
-
const
|
|
16
|
-
/** Sets the
|
|
17
|
-
const
|
|
18
|
-
/** Sets the
|
|
19
|
-
const
|
|
14
|
+
/** Sets the AI state from URL data. */
|
|
15
|
+
const setUrlParamsWire = wireDispatch('setUrlParams');
|
|
16
|
+
/** Sets the AI state `params`. */
|
|
17
|
+
const setExtraParamsWire = wireCommit('setParams');
|
|
18
|
+
/** Sets the AI state `query`. */
|
|
19
|
+
const setAiQueryWire = wireCommit('setQuery');
|
|
20
|
+
/** Sets the AI state `query` with the selectedQueryPreview's query. */
|
|
21
|
+
const setAiQueryFromPreviewWire = wireCommit('setQuery', ({ eventPayload: { query } }) => query);
|
|
20
22
|
/** Fetches the AI suggestions streaming response. */
|
|
21
|
-
const
|
|
22
|
-
/** Fetches and save the
|
|
23
|
-
const
|
|
24
|
-
/** Sets the
|
|
25
|
-
const
|
|
23
|
+
const fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions');
|
|
24
|
+
/** Fetches and save the AI suggestions search response. */
|
|
25
|
+
const fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch');
|
|
26
|
+
/** Sets the AI state `relatedTags`.*/
|
|
27
|
+
const setAiRelatedTagsWire = wireCommit('setAiRelatedTags');
|
|
26
28
|
/** Resets the related prompts state. */
|
|
27
|
-
const
|
|
29
|
+
const resetAiStateWire = wireCommitWithoutPayload('resetAiState');
|
|
28
30
|
/** Sets the origin for the AI requests. */
|
|
29
31
|
const saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);
|
|
32
|
+
/** Sets the AI state `selectedFilters`. */
|
|
33
|
+
const setSelectedFiltersWire = wireCommit('setSelectedFilters');
|
|
30
34
|
/**
|
|
31
35
|
* Wiring configuration for the {@link AiXModule | AI module}.
|
|
32
36
|
*
|
|
@@ -34,26 +38,32 @@ const saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata);
|
|
|
34
38
|
*/
|
|
35
39
|
const aiWiring = createWiring({
|
|
36
40
|
ParamsLoadedFromUrl: {
|
|
37
|
-
|
|
41
|
+
setUrlParamsWire,
|
|
38
42
|
},
|
|
39
43
|
ExtraParamsChanged: {
|
|
40
|
-
|
|
44
|
+
setExtraParamsWire,
|
|
41
45
|
},
|
|
42
46
|
UserAcceptedAQuery: {
|
|
43
|
-
|
|
47
|
+
setAiQueryWire,
|
|
48
|
+
},
|
|
49
|
+
UserAcceptedAQueryPreview: {
|
|
50
|
+
setAiQueryFromPreviewWire,
|
|
44
51
|
},
|
|
45
52
|
UserClearedQuery: {
|
|
46
|
-
|
|
53
|
+
setAiQueryWire,
|
|
47
54
|
},
|
|
48
55
|
AiSuggestionsRequestUpdated: {
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
resetAiStateWire,
|
|
57
|
+
fetchAndSaveAiSuggestionsWire,
|
|
51
58
|
},
|
|
52
59
|
AiSuggestionsSearchRequestUpdated: {
|
|
53
|
-
|
|
60
|
+
fetchAndSaveAiSuggestionsSearchWire,
|
|
54
61
|
},
|
|
55
62
|
SelectedRelatedTagsChanged: {
|
|
56
|
-
|
|
63
|
+
setAiRelatedTagsWire,
|
|
64
|
+
},
|
|
65
|
+
SelectedFiltersForRequestChanged: {
|
|
66
|
+
setSelectedFiltersWire,
|
|
57
67
|
},
|
|
58
68
|
AiOverviewMounted: {
|
|
59
69
|
saveAiOriginWire,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/**
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** AI XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the AI state from URL data. */\nconst setUrlParamsWire = wireDispatch('setUrlParams')\n/** Sets the AI state `params`. */\nconst setExtraParamsWire = wireCommit('setParams')\n\n/** Sets the AI state `query`. */\nconst setAiQueryWire = wireCommit('setQuery')\n\n/** Sets the AI state `query` with the selectedQueryPreview's query. */\nconst setAiQueryFromPreviewWire = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch')\n\n/** Sets the AI state `relatedTags`.*/\nconst setAiRelatedTagsWire = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiStateWire = wireCommitWithoutPayload('resetAiState')\n\n/** Sets the origin for the AI requests. */\nconst saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata)\n\n/** Sets the AI state `selectedFilters`. */\nconst setSelectedFiltersWire = wireCommit('setSelectedFilters')\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n ExtraParamsChanged: {\n setExtraParamsWire,\n },\n UserAcceptedAQuery: {\n setAiQueryWire,\n },\n UserAcceptedAQueryPreview: {\n setAiQueryFromPreviewWire,\n },\n UserClearedQuery: {\n setAiQueryWire,\n },\n AiSuggestionsRequestUpdated: {\n resetAiStateWire,\n fetchAndSaveAiSuggestionsWire,\n },\n AiSuggestionsSearchRequestUpdated: {\n fetchAndSaveAiSuggestionsSearchWire,\n },\n SelectedRelatedTagsChanged: {\n setAiRelatedTag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nB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,cAAc;AACf,KAAA;AACD,IAAA,yBAAyB,EAAE;QACzB,yBAAyB;AAC1B,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,cAAc;AACf,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,gBAAgB;QAChB,6BAA6B;AAC9B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,mCAAmC;AACpC,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,oBAAoB;AACrB,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,sBAAsB;AACvB,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,gBAAgB;AACjB,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.164",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@empathyco/x-adapter": "^8.1.0-alpha.9",
|
|
82
|
-
"@empathyco/x-adapter-platform": "^1.1.0-alpha.
|
|
82
|
+
"@empathyco/x-adapter-platform": "^1.1.0-alpha.37",
|
|
83
83
|
"@empathyco/x-deep-merge": "^2.0.3-alpha.9",
|
|
84
84
|
"@empathyco/x-storage-service": "^2.0.3-alpha.7",
|
|
85
|
-
"@empathyco/x-types": "^10.1.0-alpha.
|
|
85
|
+
"@empathyco/x-types": "^10.1.0-alpha.30",
|
|
86
86
|
"@empathyco/x-utils": "^1.0.3-alpha.8",
|
|
87
87
|
"@vue/devtools-api": "~6.5.0",
|
|
88
88
|
"@vueuse/core": "~10.11.0",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"access": "public",
|
|
143
143
|
"directory": "dist"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "9f60598d4b342654beb077e7dc524a8505c5d229"
|
|
146
146
|
}
|
|
@@ -2166,6 +2166,65 @@
|
|
|
2166
2166
|
"endIndex": 8
|
|
2167
2167
|
}
|
|
2168
2168
|
},
|
|
2169
|
+
{
|
|
2170
|
+
"kind": "Function",
|
|
2171
|
+
"canonicalReference": "@empathyco/x-adapter-platform!mapFilters:function(1)",
|
|
2172
|
+
"docComment": "/**\n * Converts the filters to the shape the Platform's API is expecting.\n *\n * @param filters - The filters from our internal request.\n *\n * @returns The filters ready to be consumed for the API.\n *\n * @example\n * ```ts\n * const filters = {\n * offer: [\n * {\n * facetId: 'offer',\n * modelName: 'SimpleFilter',\n * id: 'price:[0 TO 10]',\n * selected: true,\n * label: 'In Offer'\n * } as SimpleFilter\n * ],\n * categoryPaths: [\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__be257cb26',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9__fa5ef54f2',\n * label: 'Fragrance',\n * modelName: 'HierarchicalFilter',\n * parentId: 'categoryIds:ffc61e1e9',\n * selected: true,\n * totalResults: 1\n * },\n * {\n * children: ['categoryIds:ffc61e1e9__be257cb26', 'categoryIds:ffc61e1e9__fa5ef54f2'],\n * facetId: 'categoryPaths',\n * id: 'categoryIds:ffc61e1e9',\n * label: 'Personal Care',\n * modelName: 'HierarchicalFilter',\n * parentId: null,\n * selected: true,\n * totalResults: 1\n * }\n * ]\n * };\n *\n * const mappedFilters = mapFilters({ filters });\n * mappedFilters is [\n * 'price:[0 TO 10]',\n * 'categoryIds:ffc61e1e9__be257cb26',\n * 'categoryIds:ffc61e1e9__fa5ef54f2'\n * ];\n * ```\n *\n */\n",
|
|
2173
|
+
"excerptTokens": [
|
|
2174
|
+
{
|
|
2175
|
+
"kind": "Content",
|
|
2176
|
+
"text": "export declare function mapFilters(filters?: "
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
"kind": "Reference",
|
|
2180
|
+
"text": "Record",
|
|
2181
|
+
"canonicalReference": "!Record:type"
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
"kind": "Content",
|
|
2185
|
+
"text": "<string, "
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
"kind": "Reference",
|
|
2189
|
+
"text": "Filter",
|
|
2190
|
+
"canonicalReference": "@empathyco/x-adapter-platform!Filter:interface"
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"kind": "Content",
|
|
2194
|
+
"text": "[]>"
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
"kind": "Content",
|
|
2198
|
+
"text": "): "
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
"kind": "Content",
|
|
2202
|
+
"text": "string[]"
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"kind": "Content",
|
|
2206
|
+
"text": ";"
|
|
2207
|
+
}
|
|
2208
|
+
],
|
|
2209
|
+
"fileUrlPath": "dist/types/mappers/filter.utils.d.ts",
|
|
2210
|
+
"returnTypeTokenRange": {
|
|
2211
|
+
"startIndex": 6,
|
|
2212
|
+
"endIndex": 7
|
|
2213
|
+
},
|
|
2214
|
+
"releaseTag": "Public",
|
|
2215
|
+
"overloadIndex": 1,
|
|
2216
|
+
"parameters": [
|
|
2217
|
+
{
|
|
2218
|
+
"parameterName": "filters",
|
|
2219
|
+
"parameterTypeTokenRange": {
|
|
2220
|
+
"startIndex": 1,
|
|
2221
|
+
"endIndex": 5
|
|
2222
|
+
},
|
|
2223
|
+
"isOptional": true
|
|
2224
|
+
}
|
|
2225
|
+
],
|
|
2226
|
+
"name": "mapFilters"
|
|
2227
|
+
},
|
|
2169
2228
|
{
|
|
2170
2229
|
"kind": "Variable",
|
|
2171
2230
|
"canonicalReference": "@empathyco/x-adapter-platform!nextQueriesEndpointAdapter:var",
|
|
@@ -1397,6 +1397,42 @@
|
|
|
1397
1397
|
"endIndex": 2
|
|
1398
1398
|
}
|
|
1399
1399
|
},
|
|
1400
|
+
{
|
|
1401
|
+
"kind": "PropertySignature",
|
|
1402
|
+
"canonicalReference": "@empathyco/x-components!AiMutations#setSelectedFilters:member",
|
|
1403
|
+
"docComment": "/**\n * Sets the selected filters of the module.\n *\n * @param selectedFilters - The new selected filters to save to the state.\n */\n",
|
|
1404
|
+
"excerptTokens": [
|
|
1405
|
+
{
|
|
1406
|
+
"kind": "Content",
|
|
1407
|
+
"text": "setSelectedFilters: "
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"kind": "Content",
|
|
1411
|
+
"text": "(selectedFilters: "
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"kind": "Reference",
|
|
1415
|
+
"text": "Filter",
|
|
1416
|
+
"canonicalReference": "@empathyco/x-components!Filter:interface"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"kind": "Content",
|
|
1420
|
+
"text": "[]) => void"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"kind": "Content",
|
|
1424
|
+
"text": ";"
|
|
1425
|
+
}
|
|
1426
|
+
],
|
|
1427
|
+
"isReadonly": false,
|
|
1428
|
+
"isOptional": false,
|
|
1429
|
+
"releaseTag": "Public",
|
|
1430
|
+
"name": "setSelectedFilters",
|
|
1431
|
+
"propertyTypeTokenRange": {
|
|
1432
|
+
"startIndex": 1,
|
|
1433
|
+
"endIndex": 4
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1400
1436
|
{
|
|
1401
1437
|
"kind": "PropertySignature",
|
|
1402
1438
|
"canonicalReference": "@empathyco/x-components!AiMutations#setSuggestionsLoading:member",
|
|
@@ -2152,6 +2188,47 @@
|
|
|
2152
2188
|
"endIndex": 2
|
|
2153
2189
|
}
|
|
2154
2190
|
},
|
|
2191
|
+
{
|
|
2192
|
+
"kind": "PropertySignature",
|
|
2193
|
+
"canonicalReference": "@empathyco/x-components!AiState#selectedFilters:member",
|
|
2194
|
+
"docComment": "/**\n * The dictionary of selected filters, used to perform the AI requests. The key is the facet ID, and the value the list of filters for that facet.\n */\n",
|
|
2195
|
+
"excerptTokens": [
|
|
2196
|
+
{
|
|
2197
|
+
"kind": "Content",
|
|
2198
|
+
"text": "selectedFilters: "
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
"kind": "Reference",
|
|
2202
|
+
"text": "Dictionary",
|
|
2203
|
+
"canonicalReference": "@empathyco/x-utils!Dictionary:type"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"kind": "Content",
|
|
2207
|
+
"text": "<"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"kind": "Reference",
|
|
2211
|
+
"text": "Filter",
|
|
2212
|
+
"canonicalReference": "@empathyco/x-components!Filter:interface"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"kind": "Content",
|
|
2216
|
+
"text": "[]>"
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"kind": "Content",
|
|
2220
|
+
"text": ";"
|
|
2221
|
+
}
|
|
2222
|
+
],
|
|
2223
|
+
"isReadonly": false,
|
|
2224
|
+
"isOptional": false,
|
|
2225
|
+
"releaseTag": "Public",
|
|
2226
|
+
"name": "selectedFilters",
|
|
2227
|
+
"propertyTypeTokenRange": {
|
|
2228
|
+
"startIndex": 1,
|
|
2229
|
+
"endIndex": 5
|
|
2230
|
+
}
|
|
2231
|
+
},
|
|
2155
2232
|
{
|
|
2156
2233
|
"kind": "PropertySignature",
|
|
2157
2234
|
"canonicalReference": "@empathyco/x-components!AiState#suggestionsLoading:member",
|
|
@@ -211,6 +211,8 @@ export interface AiMutations extends ConfigMutations<AiState>, QueryMutations {
|
|
|
211
211
|
// Warning: (ae-forgotten-export) The symbol "AiSuggestionQuery" needs to be exported by the entry point index.d.ts
|
|
212
212
|
setQueries: (queries: AiSuggestionQuery[]) => void;
|
|
213
213
|
setResponseText: (responseText: string) => void;
|
|
214
|
+
// Warning: (ae-forgotten-export) The symbol "Filter" needs to be exported by the entry point index.d.ts
|
|
215
|
+
setSelectedFilters: (selectedFilters: Filter[]) => void;
|
|
214
216
|
setSuggestionsLoading: (value: boolean) => void;
|
|
215
217
|
// Warning: (ae-forgotten-export) The symbol "AiSuggestionSearch" needs to be exported by the entry point index.d.ts
|
|
216
218
|
setSuggestionsSearch: (suggestionsSearch: AiSuggestionSearch[]) => void;
|
|
@@ -306,6 +308,7 @@ export interface AiState extends QueryState {
|
|
|
306
308
|
queries: AiSuggestionQuery[];
|
|
307
309
|
relatedTags: RelatedTag_2[];
|
|
308
310
|
responseText: string;
|
|
311
|
+
selectedFilters: Dictionary<Filter[]>;
|
|
309
312
|
suggestionsLoading: boolean;
|
|
310
313
|
suggestionsSearch: AiSuggestionSearch[];
|
|
311
314
|
suggestionsSearchLoading: boolean;
|
|
@@ -318,26 +321,32 @@ export interface AiState extends QueryState {
|
|
|
318
321
|
// @internal
|
|
319
322
|
export const aiWiring: {
|
|
320
323
|
ParamsLoadedFromUrl: {
|
|
321
|
-
|
|
324
|
+
setUrlParamsWire: Wire<UrlParams>;
|
|
322
325
|
};
|
|
323
326
|
ExtraParamsChanged: {
|
|
324
|
-
|
|
327
|
+
setExtraParamsWire: Wire<Dictionary<unknown>>;
|
|
325
328
|
};
|
|
326
329
|
UserAcceptedAQuery: {
|
|
327
|
-
|
|
330
|
+
setAiQueryWire: Wire<string>;
|
|
331
|
+
};
|
|
332
|
+
UserAcceptedAQueryPreview: {
|
|
333
|
+
setAiQueryFromPreviewWire: AnyWire;
|
|
328
334
|
};
|
|
329
335
|
UserClearedQuery: {
|
|
330
|
-
|
|
336
|
+
setAiQueryWire: Wire<string>;
|
|
331
337
|
};
|
|
332
338
|
AiSuggestionsRequestUpdated: {
|
|
333
|
-
|
|
334
|
-
|
|
339
|
+
resetAiStateWire: AnyWire;
|
|
340
|
+
fetchAndSaveAiSuggestionsWire: Wire<AiSuggestionsRequest | null>;
|
|
335
341
|
};
|
|
336
342
|
AiSuggestionsSearchRequestUpdated: {
|
|
337
|
-
|
|
343
|
+
fetchAndSaveAiSuggestionsSearchWire: Wire<AiSuggestionsSearchRequest | null>;
|
|
338
344
|
};
|
|
339
345
|
SelectedRelatedTagsChanged: {
|
|
340
|
-
|
|
346
|
+
setAiRelatedTagsWire: Wire<RelatedTag_2[]>;
|
|
347
|
+
};
|
|
348
|
+
SelectedFiltersForRequestChanged: {
|
|
349
|
+
setSelectedFiltersWire: Wire<Filter[]>;
|
|
341
350
|
};
|
|
342
351
|
AiOverviewMounted: {
|
|
343
352
|
saveAiOriginWire: AnyWire;
|
|
@@ -438,8 +447,6 @@ export type AnyXStoreModule = XStoreModule<any, any, any, any>;
|
|
|
438
447
|
// @public
|
|
439
448
|
export type AnyXStoreModuleOption = XStoreModuleOptions<AnyXStoreModule>;
|
|
440
449
|
|
|
441
|
-
// Warning: (ae-forgotten-export) The symbol "Filter" needs to be exported by the entry point index.d.ts
|
|
442
|
-
//
|
|
443
450
|
// @public
|
|
444
451
|
export function areFiltersDifferent(someFilters: Filter[], anotherFilters: Filter[]): boolean;
|
|
445
452
|
|
package/report/x-types.api.json
CHANGED
|
@@ -885,6 +885,15 @@
|
|
|
885
885
|
"text": "TrackableRequest",
|
|
886
886
|
"canonicalReference": "@empathyco/x-types!TrackableRequest:interface"
|
|
887
887
|
},
|
|
888
|
+
{
|
|
889
|
+
"kind": "Content",
|
|
890
|
+
"text": ", "
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"kind": "Reference",
|
|
894
|
+
"text": "FilterableRequest",
|
|
895
|
+
"canonicalReference": "@empathyco/x-types!FilterableRequest:interface"
|
|
896
|
+
},
|
|
888
897
|
{
|
|
889
898
|
"kind": "Content",
|
|
890
899
|
"text": " "
|
|
@@ -931,6 +940,10 @@
|
|
|
931
940
|
{
|
|
932
941
|
"startIndex": 3,
|
|
933
942
|
"endIndex": 4
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"startIndex": 5,
|
|
946
|
+
"endIndex": 6
|
|
934
947
|
}
|
|
935
948
|
]
|
|
936
949
|
},
|
|
@@ -957,6 +970,15 @@
|
|
|
957
970
|
"text": "TrackableRequest",
|
|
958
971
|
"canonicalReference": "@empathyco/x-types!TrackableRequest:interface"
|
|
959
972
|
},
|
|
973
|
+
{
|
|
974
|
+
"kind": "Content",
|
|
975
|
+
"text": ", "
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"kind": "Reference",
|
|
979
|
+
"text": "FilterableRequest",
|
|
980
|
+
"canonicalReference": "@empathyco/x-types!FilterableRequest:interface"
|
|
981
|
+
},
|
|
960
982
|
{
|
|
961
983
|
"kind": "Content",
|
|
962
984
|
"text": " "
|
|
@@ -1003,6 +1025,10 @@
|
|
|
1003
1025
|
{
|
|
1004
1026
|
"startIndex": 3,
|
|
1005
1027
|
"endIndex": 4
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"startIndex": 5,
|
|
1031
|
+
"endIndex": 6
|
|
1006
1032
|
}
|
|
1007
1033
|
]
|
|
1008
1034
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions-search-request.getter.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-search-request.getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"suggestions-search-request.getter.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/ai/store/getters/suggestions-search-request.getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,0BAA0B,CAO1F,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAe7C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,cAuE5B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiSuggestionQuery, AiSuggestionSearch, AiSuggestionsRequest, AiSuggestionsSearchRequest, AiSuggestionTagging, RelatedTag } from '@empathyco/x-types';
|
|
1
|
+
import type { AiSuggestionQuery, AiSuggestionSearch, AiSuggestionsRequest, AiSuggestionsSearchRequest, AiSuggestionTagging, Filter, RelatedTag } from '@empathyco/x-types';
|
|
2
2
|
import type { Dictionary } from '@empathyco/x-utils';
|
|
3
3
|
import type { ConfigMutations, QueryMutations, QueryState, XActionContext, XStoreModule } from '../../../store';
|
|
4
4
|
import type { QueryOrigin, QueryOriginInit, UrlParams } from '../../../types';
|
|
@@ -29,6 +29,11 @@ export interface AiState extends QueryState {
|
|
|
29
29
|
isNoResults: boolean;
|
|
30
30
|
/** The origin property of the request. */
|
|
31
31
|
origin: QueryOrigin | null;
|
|
32
|
+
/**
|
|
33
|
+
* The dictionary of selected filters, used to perform the AI requests.
|
|
34
|
+
* The key is the facet ID, and the value the list of filters for that facet.
|
|
35
|
+
*/
|
|
36
|
+
selectedFilters: Dictionary<Filter[]>;
|
|
32
37
|
}
|
|
33
38
|
/**
|
|
34
39
|
* Ai module getters.
|
|
@@ -124,6 +129,12 @@ export interface AiMutations extends ConfigMutations<AiState>, QueryMutations {
|
|
|
124
129
|
* @param origin - The new origin.
|
|
125
130
|
*/
|
|
126
131
|
setOrigin: (origin: QueryOrigin | undefined | null) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Sets the selected filters of the module.
|
|
134
|
+
*
|
|
135
|
+
* @param selectedFilters - The new selected filters to save to the state.
|
|
136
|
+
*/
|
|
137
|
+
setSelectedFilters: (selectedFilters: Filter[]) => void;
|
|
127
138
|
}
|
|
128
139
|
/**
|
|
129
140
|
* Ai module actions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,UAAU,EACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-mod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CAAA;CACxD;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,yBAAyB,EAAE,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAA;IAEzE;;;;OAIG;IACH,+BAA+B,EAAE,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAA;IAErF;;;;OAIG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IAC5C;;;;OAIG;IACH,UAAU,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAA;CAClD;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;AAErF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -5,26 +5,32 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const aiWiring: {
|
|
7
7
|
ParamsLoadedFromUrl: {
|
|
8
|
-
|
|
8
|
+
setUrlParamsWire: import("../../wiring").Wire<import("../..").UrlParams>;
|
|
9
9
|
};
|
|
10
10
|
ExtraParamsChanged: {
|
|
11
|
-
|
|
11
|
+
setExtraParamsWire: import("../../wiring").Wire<import("@empathyco/x-utils").Dictionary<unknown>>;
|
|
12
12
|
};
|
|
13
13
|
UserAcceptedAQuery: {
|
|
14
|
-
|
|
14
|
+
setAiQueryWire: import("../../wiring").Wire<string>;
|
|
15
|
+
};
|
|
16
|
+
UserAcceptedAQueryPreview: {
|
|
17
|
+
setAiQueryFromPreviewWire: import("../../wiring").AnyWire;
|
|
15
18
|
};
|
|
16
19
|
UserClearedQuery: {
|
|
17
|
-
|
|
20
|
+
setAiQueryWire: import("../../wiring").Wire<string>;
|
|
18
21
|
};
|
|
19
22
|
AiSuggestionsRequestUpdated: {
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
resetAiStateWire: import("../../wiring").AnyWire;
|
|
24
|
+
fetchAndSaveAiSuggestionsWire: import("../../wiring").Wire<import("@empathyco/x-types").AiSuggestionsRequest | null>;
|
|
22
25
|
};
|
|
23
26
|
AiSuggestionsSearchRequestUpdated: {
|
|
24
|
-
|
|
27
|
+
fetchAndSaveAiSuggestionsSearchWire: import("../../wiring").Wire<import("@empathyco/x-types").AiSuggestionsSearchRequest | null>;
|
|
25
28
|
};
|
|
26
29
|
SelectedRelatedTagsChanged: {
|
|
27
|
-
|
|
30
|
+
setAiRelatedTagsWire: import("../../wiring").Wire<import("@empathyco/x-types").RelatedTag[]>;
|
|
31
|
+
};
|
|
32
|
+
SelectedFiltersForRequestChanged: {
|
|
33
|
+
setSelectedFiltersWire: import("../../wiring").Wire<import("@empathyco/x-types").Filter[]>;
|
|
28
34
|
};
|
|
29
35
|
AiOverviewMounted: {
|
|
30
36
|
saveAiOriginWire: import("../../wiring").AnyWire;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAQnC;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;8BAoE8B,MAAM,KAAG,IAAI;wBAiEnB,OAAO;kBAeb,OAAO,QAAQ,MAAM,IAAI;kBAkBzB,OAAO,QAAQ,MAAM,IAAI;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAQnC;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;8BAoE8B,MAAM,KAAG,IAAI;wBAiEnB,OAAO;kBAeb,OAAO,QAAQ,MAAM,IAAI;kBAkBzB,OAAO,QAAQ,MAAM,IAAI;;;;;;;;;;;iCAoCq0Z,CAAC;sCAAqD,CAAC;8BAA6C,CAAC;;;;;;;;;;;;;IA7Ox9Z;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;;;;AAxCP,wBAiPE"}
|