@empathyco/x-components 6.1.3 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/ai/index.js +0 -1
  3. package/core/index.js.map +1 -1
  4. package/docs/API-reference/api/x-components.aicarousel.md +24 -28
  5. package/docs/API-reference/api/x-components.aimutations.md +1 -58
  6. package/docs/API-reference/api/x-components.aimutations.setexcludedresultids.md +1 -1
  7. package/docs/API-reference/api/x-components.aistate.md +0 -55
  8. package/docs/API-reference/api/x-components.aixevents.md +3 -3
  9. package/docs/API-reference/api/{x-components.aixevents.userclickedaioverviewexpandbutton.md → x-components.aixevents.userclickedanaicarouseladd2cart.md} +3 -3
  10. package/docs/API-reference/api/{x-components.aixevents.userclickedanaioverviewresult.md → x-components.aixevents.userclickedanaicarouselresult.md} +3 -3
  11. package/docs/API-reference/api/x-components.hierarchicalfilter.md +2 -2
  12. package/docs/API-reference/api/x-components.md +0 -9
  13. package/docs/API-reference/api/x-components.simplefilter.md +2 -2
  14. package/docs/API-reference/api/x-components.snippetcallbacks.md +2 -2
  15. package/docs/API-reference/components/ai/x-components.ai-carousel.md +9 -7
  16. package/docs/API-reference/components/ai/x-components.ai-grouped-carousel.md +25 -0
  17. package/docs/API-reference/components/common/x-components.display-click-provider.md +1 -1
  18. package/js/components/display-click-provider.vue.js +3 -3
  19. package/js/components/display-click-provider.vue.js.map +1 -1
  20. package/js/components/icons/spinner.vue.js +2 -2
  21. package/js/index.js +0 -1
  22. package/js/index.js.map +1 -1
  23. package/js/x-modules/ai/components/ai-carousel.vue.js +121 -66
  24. package/js/x-modules/ai/components/ai-carousel.vue.js.map +1 -1
  25. package/js/x-modules/ai/components/ai-carousel.vue2.js +18 -17
  26. package/js/x-modules/ai/components/ai-carousel.vue2.js.map +1 -1
  27. package/js/x-modules/ai/components/ai-carousel.vue3.js +1 -1
  28. package/js/x-modules/ai/components/ai-grouped-carousel.vue.js +68 -0
  29. package/js/x-modules/ai/components/ai-grouped-carousel.vue.js.map +1 -0
  30. package/js/x-modules/ai/components/{ai-overview.vue2.js → ai-grouped-carousel.vue2.js} +24 -86
  31. package/js/x-modules/ai/components/ai-grouped-carousel.vue2.js.map +1 -0
  32. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js +2 -10
  33. package/js/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js.map +1 -1
  34. package/js/x-modules/ai/store/module.js +6 -18
  35. package/js/x-modules/ai/store/module.js.map +1 -1
  36. package/js/x-modules/tagging/wiring.js +2 -2
  37. package/js/x-modules/tagging/wiring.js.map +1 -1
  38. package/package.json +9 -10
  39. package/report/x-components.api.json +102 -709
  40. package/report/x-components.api.md +37 -128
  41. package/types/src/components/snippet-callbacks.vue.d.ts +2 -2
  42. package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts +24 -28
  43. package/types/src/x-modules/ai/components/ai-carousel.vue.d.ts.map +1 -1
  44. package/types/src/x-modules/ai/components/ai-grouped-carousel.vue.d.ts +19 -0
  45. package/types/src/x-modules/ai/components/ai-grouped-carousel.vue.d.ts.map +1 -0
  46. package/types/src/x-modules/ai/components/index.d.ts +0 -1
  47. package/types/src/x-modules/ai/components/index.d.ts.map +1 -1
  48. package/types/src/x-modules/ai/events.types.d.ts +2 -2
  49. package/types/src/x-modules/ai/events.types.d.ts.map +1 -1
  50. package/types/src/x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.d.ts.map +1 -1
  51. package/types/src/x-modules/ai/store/module.d.ts.map +1 -1
  52. package/types/src/x-modules/ai/store/types.d.ts +6 -29
  53. package/types/src/x-modules/ai/store/types.d.ts.map +1 -1
  54. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +2 -2
  55. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +2 -2
  56. package/types/src/x-modules/tagging/wiring.d.ts +2 -2
  57. package/docs/API-reference/api/x-components.aimutations.setisnoresults.md +0 -13
  58. package/docs/API-reference/api/x-components.aimutations.setresponsetext.md +0 -13
  59. package/docs/API-reference/api/x-components.aimutations.setsuggestiontext.md +0 -13
  60. package/docs/API-reference/api/x-components.aioverview.md +0 -88
  61. package/docs/API-reference/api/x-components.aistate.isnoresults.md +0 -13
  62. package/docs/API-reference/api/x-components.aistate.responsetext.md +0 -13
  63. package/docs/API-reference/api/x-components.aistate.suggestiontext.md +0 -11
  64. package/docs/API-reference/components/ai/x-components.ai-overview.md +0 -96
  65. package/js/x-modules/ai/components/ai-overview.vue.js +0 -267
  66. package/js/x-modules/ai/components/ai-overview.vue.js.map +0 -1
  67. package/js/x-modules/ai/components/ai-overview.vue2.js.map +0 -1
  68. package/js/x-modules/ai/components/ai-overview.vue3.js +0 -7
  69. package/js/x-modules/ai/components/ai-overview.vue3.js.map +0 -1
  70. package/types/src/x-modules/ai/components/ai-overview.vue.d.ts +0 -81
  71. package/types/src/x-modules/ai/components/ai-overview.vue.d.ts.map +0 -1
@@ -1,88 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [AiOverview](./x-components.aioverview.md)
4
-
5
- ## AiOverview variable
6
-
7
- **Signature:**
8
-
9
- ```typescript
10
- _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
- title: {
12
- type: StringConstructor;
13
- };
14
- titleLoading: {
15
- type: StringConstructor;
16
- default: string;
17
- };
18
- autoExpandInSearchNoResults: {
19
- type: BooleanConstructor;
20
- default: boolean;
21
- };
22
- contentClasses: {
23
- type: StringConstructor;
24
- };
25
- slidingPanelsClasses: {
26
- type: StringConstructor;
27
- };
28
- slidingPanelContainersClasses: {
29
- type: StringConstructor;
30
- };
31
- slidingPanelButtonsClasses: {
32
- type: StringConstructor;
33
- };
34
- }>, {
35
- aiOverviewRef: import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>;
36
- emptyTaggingRequest: TaggingRequest;
37
- expanded: import("vue").Ref<boolean, boolean>;
38
- parsedResponseText: import("vue").ComputedRef<string | Promise<string>>;
39
- suggestionsLoading: import("vue").ComputedRef<boolean>;
40
- suggestionsSearch: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionSearch[]>;
41
- suggestionText: import("vue").ComputedRef<string>;
42
- shouldAnimateSuggestion: import("vue").Ref<boolean, boolean>;
43
- query: import("vue").ComputedRef<string>;
44
- tagging: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionTagging | undefined>;
45
- isNoResults: import("vue").ComputedRef<boolean>;
46
- queries: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionQuery[]>;
47
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
48
- title: {
49
- type: StringConstructor;
50
- };
51
- titleLoading: {
52
- type: StringConstructor;
53
- default: string;
54
- };
55
- autoExpandInSearchNoResults: {
56
- type: BooleanConstructor;
57
- default: boolean;
58
- };
59
- contentClasses: {
60
- type: StringConstructor;
61
- };
62
- slidingPanelsClasses: {
63
- type: StringConstructor;
64
- };
65
- slidingPanelContainersClasses: {
66
- type: StringConstructor;
67
- };
68
- slidingPanelButtonsClasses: {
69
- type: StringConstructor;
70
- };
71
- }>> & Readonly<{}>, {
72
- titleLoading: string;
73
- autoExpandInSearchNoResults: boolean;
74
- }, {}, {
75
- AIStarIcon: import("vue").DefineComponent<{}, {}, any>;
76
- ArrowRightIcon: import("vue").DefineComponent<{}, {}, any>;
77
- BaseEventButton: import("vue").DefineComponent<{}, {}, any>;
78
- CollapseHeight: import("vue").DefineComponent<{}, {}, any>;
79
- ChangeHeight: import("vue").DefineComponent<{}, {}, any>;
80
- Fade: import("vue").DefineComponent<{}, {}, any>;
81
- SlidingPanel: import("vue").DefineComponent<{}, {}, any>;
82
- SpinnerIcon: import("vue").DefineComponent<{}, {}, any>;
83
- DisplayEmitter: import("vue").DefineComponent<{}, {}, any>;
84
- DisplayClickProvider: import("vue").DefineComponent<{}, {}, any>;
85
- }, {
86
- typing: import("vue").Directive<import("../../../directives").TypingHTMLElement, import("../../../directives").TypingOptions>;
87
- }, string, import("vue").ComponentProvideOptions, true, {}, any>
88
- ```
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [AiState](./x-components.aistate.md) &gt; [isNoResults](./x-components.aistate.isnoresults.md)
4
-
5
- ## AiState.isNoResults property
6
-
7
- Flag to indicate that the AI response has no results
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- isNoResults: boolean;
13
- ```
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [AiState](./x-components.aistate.md) &gt; [responseText](./x-components.aistate.responsetext.md)
4
-
5
- ## AiState.responseText property
6
-
7
- The streamed field from suggestion response.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- responseText: string;
13
- ```
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [AiState](./x-components.aistate.md) &gt; [suggestionText](./x-components.aistate.suggestiontext.md)
4
-
5
- ## AiState.suggestionText property
6
-
7
- **Signature:**
8
-
9
- ```typescript
10
- suggestionText: string;
11
- ```
@@ -1,96 +0,0 @@
1
- ---
2
-
3
- title: AiOverview
4
-
5
- ---
6
-
7
- # AiOverview
8
-
9
- ## Props
10
-
11
- | Name | Description | Type | Default |
12
- | ------------------------------------------ | ----------- | -------------------- | ----------------------------------------- |
13
- | <code>title</code> | | <code>string</code> | <code></code> |
14
- | <code>titleLoading</code> | | <code>string</code> | <code>'Generating with Empathy AI'</code> |
15
- | <code>autoExpandInSearchNoResults</code> | | <code>boolean</code> | <code>true</code> |
16
- | <code>contentClasses</code> | | <code>string</code> | <code></code> |
17
- | <code>slidingPanelsClasses</code> | | <code>string</code> | <code></code> |
18
- | <code>slidingPanelContainersClasses</code> | | <code>string</code> | <code></code> |
19
- | <code>slidingPanelButtonsClasses</code> | | <code>string</code> | <code></code> |
20
-
21
- ## Slots
22
-
23
- | Name | Description | Bindings<br />(name - type - description) |
24
- | ---------------------------------------- | ---------------------- | ----------------------------------------- |
25
- | <code>title-loading</code> | | None |
26
- | <code>extra-content</code> | | None |
27
- | <code>sliding-panel</code> | | |
28
- | <code>sliding-panels-addons</code> | | |
29
- | <code>sliding-panels-left-button</code> | | None |
30
- | <code>sliding-panels-right-button</code> | | None |
31
- | <code>result</code> | (required) result card | |
32
- | <code>suggestions-extra-content</code> | | None |
33
-
34
- ## AI Overview Examples
35
-
36
- The `ai-overview` component provides an AI-generated summary and suggestions for queries.
37
-
38
- ### Basic usage
39
-
40
- ```vue
41
- <template>
42
- <AiOverview
43
- :title="'AI Overview'"
44
- :title-loading="'Generating with Empathy AI'"
45
- :expand-text="'Show more'"
46
- :collapse-text="'Show less'"
47
- :content-classes="'my-content-class'"
48
- :sliding-panels-classes="'my-sliding-panel-class'"
49
- :sliding-panel-containers-classes="'my-sliding-panel-container-class'"
50
- :sliding-panel-buttons-classes="'my-sliding-panel-button-class'"
51
- >
52
- <template #result="{ result }">
53
- <ResultCard :result="result" />
54
- </template>
55
- </AiOverview>
56
- </template>
57
-
58
- <script setup>
59
- import AiOverview from "@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue";
60
- import ResultCard from "./ResultCard.vue";
61
- </script>
62
- ```
63
-
64
- ### Customizing slots
65
-
66
- You can customize the loading title, extra content, and sliding panel slots:
67
-
68
- ```vue
69
- <template>
70
- <AiOverview
71
- :title="'AI Overview'"
72
- :title-loading="'Loading... Please wait'"
73
- :expand-text="'Show more'"
74
- :collapse-text="'Show less'"
75
- >
76
- <template #title-loading>
77
- <span>Custom loading title...</span>
78
- </template>
79
- <template #extra-content>
80
- <div>Extra content below the main overview</div>
81
- </template>
82
- <template #sliding-panels-addons="{ arrivedState }">
83
- <span v-if="arrivedState.left">Left end reached</span>
84
- <span v-if="arrivedState.right">Right end reached</span>
85
- </template>
86
- <template #result="{ result }">
87
- <ResultCard :result="result" />
88
- </template>
89
- </AiOverview>
90
- </template>
91
-
92
- <script setup>
93
- import AiOverview from "@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue";
94
- import ResultCard from "./ResultCard.vue";
95
- </script>
96
- ```
@@ -1,267 +0,0 @@
1
- import _sfc_main from './ai-overview.vue2.js';
2
- import { resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createElementVNode, createVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, normalizeClass, normalizeStyle, Fragment, renderList } from 'vue';
3
- import './ai-overview.vue3.js';
4
- import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
5
-
6
- const _hoisted_1 = {
7
- key: 0,
8
- ref: "aiOverviewRef",
9
- class: "x-ai-overview",
10
- "data-test": "ai-overview-wrapper"
11
- };
12
- const _hoisted_2 = { class: "x-ai-overview-main" };
13
- const _hoisted_3 = {
14
- key: 0,
15
- class: "x-ai-overview-title-loading",
16
- "data-test": "ai-overview-title-loading"
17
- };
18
- const _hoisted_4 = {
19
- class: "x-ai-overview-title-loading-text",
20
- "data-test": "ai-overview-title-loading-text"
21
- };
22
- const _hoisted_5 = {
23
- class: "x-ai-overview-title",
24
- "data-test": "ai-overview-title"
25
- };
26
- const _hoisted_6 = { class: "x-ai-overview-content-wrapper" };
27
- const _hoisted_7 = {
28
- key: 0,
29
- class: "x-ai-overview-content-title",
30
- "data-test": "ai-overview-content-title"
31
- };
32
- const _hoisted_8 = ["innerHTML"];
33
- const _hoisted_9 = {
34
- key: 1,
35
- class: "x-ai-overview-suggestions",
36
- "data-test": "ai-overview-suggestions-container"
37
- };
38
- const _hoisted_10 = { class: "x-ai-overview-suggestion-results" };
39
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
40
- const _component_AIStarIcon = resolveComponent("AIStarIcon");
41
- const _component_DisplayEmitter = resolveComponent("DisplayEmitter");
42
- const _component_Fade = resolveComponent("Fade");
43
- const _component_ChangeHeight = resolveComponent("ChangeHeight");
44
- const _component_SpinnerIcon = resolveComponent("SpinnerIcon");
45
- const _component_ArrowRightIcon = resolveComponent("ArrowRightIcon");
46
- const _component_BaseEventButton = resolveComponent("BaseEventButton");
47
- const _component_SlidingPanel = resolveComponent("SlidingPanel");
48
- const _component_DisplayClickProvider = resolveComponent("DisplayClickProvider");
49
- const _component_CollapseHeight = resolveComponent("CollapseHeight");
50
- return openBlock(), createBlock(_component_CollapseHeight, null, {
51
- default: withCtx(() => [
52
- !_ctx.isNoResults ? (openBlock(), createElementBlock(
53
- "div",
54
- _hoisted_1,
55
- [
56
- createElementVNode("div", _hoisted_2, [
57
- createVNode(_component_Fade, { mode: "out-in" }, {
58
- default: withCtx(() => [
59
- _ctx.suggestionsLoading ? (openBlock(), createElementBlock("span", _hoisted_3, [
60
- _cache[0] || (_cache[0] = createElementVNode(
61
- "span",
62
- { class: "x-ai-overview-title-loading-indicator" },
63
- null,
64
- -1
65
- /* CACHED */
66
- )),
67
- createElementVNode("span", _hoisted_4, [
68
- renderSlot(_ctx.$slots, "title-loading", {}, () => [
69
- createTextVNode(
70
- toDisplayString(_ctx.titleLoading),
71
- 1
72
- /* TEXT */
73
- )
74
- ])
75
- ])
76
- ])) : (openBlock(), createBlock(_component_DisplayEmitter, {
77
- key: 1,
78
- payload: _ctx.tagging?.toolingDisplay ?? _ctx.emptyTaggingRequest,
79
- "event-metadata": {
80
- feature: "overview",
81
- displayOriginalQuery: _ctx.query || "overview-without-query",
82
- replaceable: false
83
- },
84
- "data-test": "ai-overview-display-emitter"
85
- }, {
86
- default: withCtx(() => [
87
- createElementVNode("span", _hoisted_5, [
88
- createVNode(_component_AIStarIcon, { class: "x-ai-overview-title-icon" }),
89
- createTextVNode(
90
- toDisplayString(!!_ctx.title ? _ctx.title : _ctx.suggestionText),
91
- 1
92
- /* TEXT */
93
- )
94
- ])
95
- ]),
96
- _: 1
97
- /* STABLE */
98
- }, 8, ["payload", "event-metadata"]))
99
- ]),
100
- _: 3
101
- /* FORWARDED */
102
- }),
103
- createVNode(_component_ChangeHeight, null, {
104
- default: withCtx(() => [
105
- createElementVNode("div", _hoisted_6, [
106
- _ctx.title ? (openBlock(), createElementBlock(
107
- "span",
108
- _hoisted_7,
109
- toDisplayString(_ctx.suggestionText),
110
- 1
111
- /* TEXT */
112
- )) : createCommentVNode("v-if", true),
113
- createElementVNode("div", {
114
- class: normalizeClass(_ctx.contentClasses),
115
- "data-test": "ai-overview-content",
116
- innerHTML: _ctx.parsedResponseText
117
- }, null, 10, _hoisted_8)
118
- ])
119
- ]),
120
- _: 1
121
- /* STABLE */
122
- }),
123
- renderSlot(_ctx.$slots, "extra-content")
124
- ]),
125
- createVNode(_component_CollapseHeight, {
126
- style: normalizeStyle({
127
- "--x-collapse-height-transition-duration": `${300 * _ctx.suggestionsSearch.length}ms`
128
- }),
129
- "data-test": "ai-overview-collapse-height-suggestions"
130
- }, {
131
- default: withCtx(() => [
132
- !_ctx.suggestionsSearch.length ? (openBlock(), createBlock(_component_SpinnerIcon, {
133
- key: 0,
134
- class: "x-ai-overview-suggestions-loading",
135
- "data-test": "ai-overview-suggestions-loading"
136
- })) : (openBlock(), createElementBlock("div", _hoisted_9, [
137
- (openBlock(true), createElementBlock(
138
- Fragment,
139
- null,
140
- renderList(_ctx.suggestionsSearch, ({ query: suggestionQuery, results: queriesResults }, suggestionIndex) => {
141
- return openBlock(), createBlock(_component_DisplayEmitter, {
142
- key: suggestionQuery,
143
- payload: _ctx.tagging?.searchQueries[suggestionQuery].toolingDisplay ?? _ctx.emptyTaggingRequest,
144
- "event-metadata": {
145
- feature: "overview",
146
- displayOriginalQuery: _ctx.query || "overview-without-query",
147
- replaceable: false
148
- },
149
- "data-test": "ai-overview-query-display-emitter"
150
- }, {
151
- default: withCtx(() => [
152
- createElementVNode(
153
- "div",
154
- {
155
- class: normalizeClass(["x-ai-overview-suggestion", {
156
- "x-ai-overview-result-animation": _ctx.shouldAnimateSuggestion
157
- }]),
158
- "data-test": "ai-overview-suggestion",
159
- style: normalizeStyle({ animationDelay: `${suggestionIndex * 300}ms` })
160
- },
161
- [
162
- createVNode(_component_BaseEventButton, {
163
- class: "x-ai-overview-suggestion-query-btn",
164
- events: { UserAcceptedAQuery: suggestionQuery }
165
- }, {
166
- default: withCtx(() => [
167
- createTextVNode(
168
- toDisplayString(suggestionQuery) + " ",
169
- 1
170
- /* TEXT */
171
- ),
172
- createVNode(_component_ArrowRightIcon, { class: "x-ai-overview-suggestion-query-btn-icon" })
173
- ]),
174
- _: 2
175
- /* DYNAMIC */
176
- }, 1032, ["events"]),
177
- createVNode(_component_DisplayClickProvider, {
178
- "tooling-display-tagging": _ctx.tagging?.searchQueries[suggestionQuery].toolingDisplayClick,
179
- "tooling-add2-cart-tagging": _ctx.tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart,
180
- "result-feature": "overview"
181
- }, {
182
- default: withCtx(() => [
183
- renderSlot(_ctx.$slots, "sliding-panel", { results: queriesResults }, () => [
184
- createVNode(_component_SlidingPanel, {
185
- class: normalizeClass(_ctx.slidingPanelsClasses),
186
- "scroll-container-class": _ctx.slidingPanelContainersClasses,
187
- "button-class": _ctx.slidingPanelButtonsClasses,
188
- "reset-on-content-change": false
189
- }, {
190
- "sliding-panel-addons": withCtx(({ arrivedState }) => [
191
- renderSlot(_ctx.$slots, "sliding-panels-addons", { arrivedState })
192
- ]),
193
- "sliding-panel-left-button": withCtx(() => [
194
- renderSlot(_ctx.$slots, "sliding-panels-left-button")
195
- ]),
196
- "sliding-panel-right-button": withCtx(() => [
197
- renderSlot(_ctx.$slots, "sliding-panels-right-button")
198
- ]),
199
- default: withCtx(() => [
200
- createElementVNode("ul", _hoisted_10, [
201
- (openBlock(true), createElementBlock(
202
- Fragment,
203
- null,
204
- renderList(queriesResults, (result, resultIndex) => {
205
- return openBlock(), createElementBlock(
206
- "li",
207
- {
208
- key: result.id,
209
- "data-test": "ai-overview-suggestion-result",
210
- class: normalizeClass({
211
- "x-ai-overview-result-animation": _ctx.shouldAnimateSuggestion
212
- }),
213
- style: normalizeStyle({
214
- animationDelay: `${suggestionIndex * 300 + resultIndex * 300}ms`
215
- })
216
- },
217
- [
218
- renderSlot(_ctx.$slots, "result", { result })
219
- ],
220
- 6
221
- /* CLASS, STYLE */
222
- );
223
- }),
224
- 128
225
- /* KEYED_FRAGMENT */
226
- ))
227
- ])
228
- ]),
229
- _: 2
230
- /* DYNAMIC */
231
- }, 1032, ["class", "scroll-container-class", "button-class"])
232
- ])
233
- ]),
234
- _: 2
235
- /* DYNAMIC */
236
- }, 1032, ["tooling-display-tagging", "tooling-add2-cart-tagging"])
237
- ],
238
- 6
239
- /* CLASS, STYLE */
240
- )
241
- ]),
242
- _: 2
243
- /* DYNAMIC */
244
- }, 1032, ["payload", "event-metadata"]);
245
- }),
246
- 128
247
- /* KEYED_FRAGMENT */
248
- )),
249
- renderSlot(_ctx.$slots, "suggestions-extra-content")
250
- ]))
251
- ]),
252
- _: 3
253
- /* FORWARDED */
254
- }, 8, ["style"])
255
- ],
256
- 512
257
- /* NEED_PATCH */
258
- )) : createCommentVNode("v-if", true)
259
- ]),
260
- _: 3
261
- /* FORWARDED */
262
- });
263
- }
264
- var aiOverview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
265
-
266
- export { aiOverview as default };
267
- //# sourceMappingURL=ai-overview.vue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div\n v-if=\"!isNoResults\"\n ref=\"aiOverviewRef\"\n class=\"x-ai-overview\"\n data-test=\"ai-overview-wrapper\"\n >\n <div class=\"x-ai-overview-main\">\n <Fade mode=\"out-in\">\n <span\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-title-loading\"\n data-test=\"ai-overview-title-loading\"\n >\n <span class=\"x-ai-overview-title-loading-indicator\" />\n <span\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n >\n <slot name=\"title-loading\">\n {{ titleLoading }}\n </slot>\n </span>\n </span>\n <DisplayEmitter\n v-else\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-display-emitter\"\n >\n <span class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ !!title ? title : suggestionText }}\n </span>\n </DisplayEmitter>\n </Fade>\n <ChangeHeight>\n <div class=\"x-ai-overview-content-wrapper\">\n <span\n v-if=\"title\"\n class=\"x-ai-overview-content-title\"\n data-test=\"ai-overview-content-title\"\n >{{ suggestionText }}\n </span>\n <div\n :class=\"contentClasses\"\n data-test=\"ai-overview-content\"\n v-html=\"parsedResponseText\"\n />\n </div>\n </ChangeHeight>\n <slot name=\"extra-content\" />\n </div>\n <CollapseHeight\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <SpinnerIcon\n v-if=\"!suggestionsSearch.length\"\n class=\"x-ai-overview-suggestions-loading\"\n data-test=\"ai-overview-suggestions-loading\"\n />\n <div v-else class=\"x-ai-overview-suggestions\" data-test=\"ai-overview-suggestions-container\">\n <DisplayEmitter\n v-for=\"(\n { query: suggestionQuery, results: queriesResults }, suggestionIndex\n ) in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-query-display-emitter\"\n >\n <div\n class=\"x-ai-overview-suggestion\"\n data-test=\"ai-overview-suggestion\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{ animationDelay: `${suggestionIndex * 300}ms` }\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"overview\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelsClasses\"\n :scroll-container-class=\"slidingPanelContainersClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"(result, resultIndex) in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{\n animationDelay: `${suggestionIndex * 300 + resultIndex * 300}ms`,\n }\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n </CollapseHeight>\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { marked } from 'marked'\nimport { computed, defineComponent, onMounted, ref } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n CollapseHeight,\n DisplayClickProvider,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useState } from '../../../composables'\nimport { typing } from '../../../directives'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n directives: {\n typing,\n },\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n DisplayEmitter,\n DisplayClickProvider,\n },\n props: {\n /* The text displayed when the question ended loading */\n title: {\n type: String,\n },\n /* The text displayed when the question is loading. */\n titleLoading: {\n type: String,\n default: 'Generating with Empathy AI',\n },\n /* Auto expand the AI Overview when there are queries in AI and no-results in search. */\n autoExpandInSearchNoResults: {\n type: Boolean,\n default: true,\n },\n /* The classes added to the parsed response text container. */\n contentClasses: {\n type: String,\n },\n /* The classes added to each sliding panel for each query. */\n slidingPanelsClasses: {\n type: String,\n },\n /* The classes added to each sliding panel container of each query. */\n slidingPanelContainersClasses: {\n type: String,\n },\n /* The classes added to each sliding panel button of each query. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup() {\n const $x = use$x()\n const {\n suggestionText,\n responseText,\n suggestionsSearch,\n suggestionsStatus,\n tagging,\n isNoResults,\n queries,\n query,\n } = useState('ai')\n\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const aiOverviewRef = ref<HTMLDivElement | null>(null)\n const expanded = ref(false)\n const shouldAnimateSuggestion = ref(true)\n const parsedResponseText = computed(() => marked.parse(responseText.value))\n\n const suggestionsLoading = computed(\n () => suggestionsStatus.value !== 'success' && suggestionsStatus.value !== 'error',\n )\n\n $x.on('AiSuggestionsRequestUpdated', false).subscribe(() => {\n expanded.value = false\n shouldAnimateSuggestion.value = true\n })\n\n onMounted(() => {\n $x.emit('AiComponentMounted', undefined, { feature: 'overview' })\n })\n\n return {\n aiOverviewRef,\n emptyTaggingRequest,\n expanded,\n parsedResponseText,\n suggestionsLoading,\n suggestionsSearch,\n suggestionText,\n shouldAnimateSuggestion,\n query,\n tagging,\n isNoResults,\n queries,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-overview {\n --color: var(--x-ai-overview-color, #bbc9cf);\n --color-lighter: var(--x-ai-overview-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-overview-main {\n padding: 1rem;\n max-width: var(--x-ai-overview-main-max-width, none);\n margin: 0 auto;\n}\n\n.x-ai-overview-title {\n display: flex;\n font-size: 0.875rem;\n font-weight: 700;\n gap: 0.25rem;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading-indicator {\n width: 0.75rem;\n height: 0.75rem;\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n border-radius: 9999px;\n background-color: var(--color);\n}\n\n.x-ai-overview-title-loading-text {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n font-size: 0.75rem;\n}\n\n.x-ai-overview-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n}\n\n.x-ai-overview-content-wrapper {\n display: flex;\n flex-direction: column;\n text-align: left;\n line-height: 1.25rem;\n}\n\n.x-ai-overview-content-title {\n font-weight: 500;\n margin-bottom: 8px;\n}\n\n.x-ai-overview-gradient {\n border-radius: 1.5rem;\n cursor: pointer;\n content: none;\n position: absolute;\n width: 100%;\n height: 100%;\n bottom: 0;\n background-image: linear-gradient(to bottom, transparent 0%, var(--color-lighter) 100%);\n}\n\n.x-ai-overview-toggle-btn-wrapper {\n display: flex;\n justify-content: center;\n cursor: pointer;\n}\n\n.x-ai-overview-toggle-btn {\n border-color: var(--button-color-50, #283034);\n background-color: #ffffff;\n color: var(--button-color-50, #283034);\n border-radius: 9999px;\n width: 100%;\n margin: auto;\n padding-right: 1rem;\n padding-left: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border-style: solid;\n border-width: 1px;\n font-weight: 700;\n min-height: 2.5rem;\n gap: 0.5rem;\n font-size: 0.875rem;\n position: relative;\n}\n\n.x-ai-overview-toggle-btn:hover {\n border-color: var(--button-color-50, #283034);\n background-color: var(--button-color-50, #283034);\n color: #ffffff;\n}\n\n@media (min-width: 640px) {\n .x-ai-overview-toggle-btn {\n transition-property: all;\n transition-duration: 500ms;\n transform: translateY(50%);\n width: var(--expand-button-width, 200px);\n }\n}\n\n.x-ai-overview-toggle-btn-icon {\n transform: rotate(0deg);\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition-property: all;\n transition-duration: 300ms;\n}\n\n.x-ai-overview-toggle-btn-icon-expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-overview-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\n.x-ai-overview-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-overview-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-overview-suggestions-loading {\n width: 2.5rem;\n height: 2.5rem;\n margin: auto;\n animation: x-spin 1s linear infinite;\n}\n\n.x-ai-overview-suggestion {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.x-ai-overview-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n@keyframes x-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n\n<docs lang=\"mdx\">\n## AI Overview Examples\n\nThe `ai-overview` component provides an AI-generated summary and suggestions for queries.\n\n### Basic usage\n\n```vue\n<template>\n <AiOverview\n :title=\"'AI Overview'\"\n :title-loading=\"'Generating with Empathy AI'\"\n :expand-text=\"'Show more'\"\n :collapse-text=\"'Show less'\"\n :content-classes=\"'my-content-class'\"\n :sliding-panels-classes=\"'my-sliding-panel-class'\"\n :sliding-panel-containers-classes=\"'my-sliding-panel-container-class'\"\n :sliding-panel-buttons-classes=\"'my-sliding-panel-button-class'\"\n >\n <template #result=\"{ result }\">\n <ResultCard :result=\"result\" />\n </template>\n </AiOverview>\n</template>\n\n<script setup>\nimport AiOverview from '@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue'\nimport ResultCard from './ResultCard.vue'\n</script>\n```\n\n### Customizing slots\n\nYou can customize the loading title, extra content, and sliding panel slots:\n\n```vue\n<template>\n <AiOverview\n :title=\"'AI Overview'\"\n :title-loading=\"'Loading... Please wait'\"\n :expand-text=\"'Show more'\"\n :collapse-text=\"'Show less'\"\n >\n <template #title-loading>\n <span>Custom loading title...</span>\n </template>\n <template #extra-content>\n <div>Extra content below the main overview</div>\n </template>\n <template #sliding-panels-addons=\"{ arrivedState }\">\n <span v-if=\"arrivedState.left\">Left end reached</span>\n <span v-if=\"arrivedState.right\">Right end reached</span>\n </template>\n <template #result=\"{ result }\">\n <ResultCard :result=\"result\" />\n </template>\n </AiOverview>\n</template>\n\n<script setup>\nimport AiOverview from '@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue'\nimport ResultCard from './ResultCard.vue'\n</script>\n```\n</docs>\n"],"names":["_createBlock","_withCtx","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_normal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"ai-overview.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div\n v-if=\"!isNoResults\"\n ref=\"aiOverviewRef\"\n class=\"x-ai-overview\"\n data-test=\"ai-overview-wrapper\"\n >\n <div class=\"x-ai-overview-main\">\n <Fade mode=\"out-in\">\n <span\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-title-loading\"\n data-test=\"ai-overview-title-loading\"\n >\n <span class=\"x-ai-overview-title-loading-indicator\" />\n <span\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n >\n <slot name=\"title-loading\">\n {{ titleLoading }}\n </slot>\n </span>\n </span>\n <DisplayEmitter\n v-else\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-display-emitter\"\n >\n <span class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ !!title ? title : suggestionText }}\n </span>\n </DisplayEmitter>\n </Fade>\n <ChangeHeight>\n <div class=\"x-ai-overview-content-wrapper\">\n <span\n v-if=\"title\"\n class=\"x-ai-overview-content-title\"\n data-test=\"ai-overview-content-title\"\n >{{ suggestionText }}\n </span>\n <div\n :class=\"contentClasses\"\n data-test=\"ai-overview-content\"\n v-html=\"parsedResponseText\"\n />\n </div>\n </ChangeHeight>\n <slot name=\"extra-content\" />\n </div>\n <CollapseHeight\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <SpinnerIcon\n v-if=\"!suggestionsSearch.length\"\n class=\"x-ai-overview-suggestions-loading\"\n data-test=\"ai-overview-suggestions-loading\"\n />\n <div v-else class=\"x-ai-overview-suggestions\" data-test=\"ai-overview-suggestions-container\">\n <DisplayEmitter\n v-for=\"(\n { query: suggestionQuery, results: queriesResults }, suggestionIndex\n ) in suggestionsSearch\"\n :key=\"suggestionQuery\"\n :payload=\"tagging?.searchQueries[suggestionQuery].toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'overview',\n displayOriginalQuery: query || 'overview-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-overview-query-display-emitter\"\n >\n <div\n class=\"x-ai-overview-suggestion\"\n data-test=\"ai-overview-suggestion\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{ animationDelay: `${suggestionIndex * 300}ms` }\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: suggestionQuery }\"\n >\n {{ suggestionQuery }}\n <ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n\n <DisplayClickProvider\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestionQuery].toolingDisplayAdd2Cart\n \"\n result-feature=\"overview\"\n >\n <slot name=\"sliding-panel\" :results=\"queriesResults\">\n <SlidingPanel\n :class=\"slidingPanelsClasses\"\n :scroll-container-class=\"slidingPanelContainersClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"(result, resultIndex) in queriesResults\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n :class=\"{\n 'x-ai-overview-result-animation': shouldAnimateSuggestion,\n }\"\n :style=\"{\n animationDelay: `${suggestionIndex * 300 + resultIndex * 300}ms`,\n }\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </DisplayClickProvider>\n </div>\n </DisplayEmitter>\n <slot name=\"suggestions-extra-content\" />\n </div>\n </CollapseHeight>\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { marked } from 'marked'\nimport { computed, defineComponent, onMounted, ref } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n CollapseHeight,\n DisplayClickProvider,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useState } from '../../../composables'\nimport { typing } from '../../../directives'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n directives: {\n typing,\n },\n xModule: aiXModule.name,\n components: {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n SpinnerIcon,\n DisplayEmitter,\n DisplayClickProvider,\n },\n props: {\n /* The text displayed when the question ended loading */\n title: {\n type: String,\n },\n /* The text displayed when the question is loading. */\n titleLoading: {\n type: String,\n default: 'Generating with Empathy AI',\n },\n /* Auto expand the AI Overview when there are queries in AI and no-results in search. */\n autoExpandInSearchNoResults: {\n type: Boolean,\n default: true,\n },\n /* The classes added to the parsed response text container. */\n contentClasses: {\n type: String,\n },\n /* The classes added to each sliding panel for each query. */\n slidingPanelsClasses: {\n type: String,\n },\n /* The classes added to each sliding panel container of each query. */\n slidingPanelContainersClasses: {\n type: String,\n },\n /* The classes added to each sliding panel button of each query. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup() {\n const $x = use$x()\n const {\n suggestionText,\n responseText,\n suggestionsSearch,\n suggestionsStatus,\n tagging,\n isNoResults,\n queries,\n query,\n } = useState('ai')\n\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const aiOverviewRef = ref<HTMLDivElement | null>(null)\n const expanded = ref(false)\n const shouldAnimateSuggestion = ref(true)\n const parsedResponseText = computed(() => marked.parse(responseText.value))\n\n const suggestionsLoading = computed(\n () => suggestionsStatus.value !== 'success' && suggestionsStatus.value !== 'error',\n )\n\n $x.on('AiSuggestionsRequestUpdated', false).subscribe(() => {\n expanded.value = false\n shouldAnimateSuggestion.value = true\n })\n\n onMounted(() => {\n $x.emit('AiComponentMounted', undefined, { feature: 'overview' })\n })\n\n return {\n aiOverviewRef,\n emptyTaggingRequest,\n expanded,\n parsedResponseText,\n suggestionsLoading,\n suggestionsSearch,\n suggestionText,\n shouldAnimateSuggestion,\n query,\n tagging,\n isNoResults,\n queries,\n }\n },\n})\n</script>\n\n<style lang=\"css\">\n.x-ai-overview {\n --color: var(--x-ai-overview-color, #bbc9cf);\n --color-lighter: var(--x-ai-overview-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-overview-main {\n padding: 1rem;\n max-width: var(--x-ai-overview-main-max-width, none);\n margin: 0 auto;\n}\n\n.x-ai-overview-title {\n display: flex;\n font-size: 0.875rem;\n font-weight: 700;\n gap: 0.25rem;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n margin-bottom: 0.5rem;\n}\n\n.x-ai-overview-title-loading-indicator {\n width: 0.75rem;\n height: 0.75rem;\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n border-radius: 9999px;\n background-color: var(--color);\n}\n\n.x-ai-overview-title-loading-text {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n font-size: 0.75rem;\n}\n\n.x-ai-overview-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n}\n\n.x-ai-overview-content-wrapper {\n display: flex;\n flex-direction: column;\n text-align: left;\n line-height: 1.25rem;\n}\n\n.x-ai-overview-content-title {\n font-weight: 500;\n margin-bottom: 8px;\n}\n\n.x-ai-overview-gradient {\n border-radius: 1.5rem;\n cursor: pointer;\n content: none;\n position: absolute;\n width: 100%;\n height: 100%;\n bottom: 0;\n background-image: linear-gradient(to bottom, transparent 0%, var(--color-lighter) 100%);\n}\n\n.x-ai-overview-toggle-btn-wrapper {\n display: flex;\n justify-content: center;\n cursor: pointer;\n}\n\n.x-ai-overview-toggle-btn {\n border-color: var(--button-color-50, #283034);\n background-color: #ffffff;\n color: var(--button-color-50, #283034);\n border-radius: 9999px;\n width: 100%;\n margin: auto;\n padding-right: 1rem;\n padding-left: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n border-style: solid;\n border-width: 1px;\n font-weight: 700;\n min-height: 2.5rem;\n gap: 0.5rem;\n font-size: 0.875rem;\n position: relative;\n}\n\n.x-ai-overview-toggle-btn:hover {\n border-color: var(--button-color-50, #283034);\n background-color: var(--button-color-50, #283034);\n color: #ffffff;\n}\n\n@media (min-width: 640px) {\n .x-ai-overview-toggle-btn {\n transition-property: all;\n transition-duration: 500ms;\n transform: translateY(50%);\n width: var(--expand-button-width, 200px);\n }\n}\n\n.x-ai-overview-toggle-btn-icon {\n transform: rotate(0deg);\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition-property: all;\n transition-duration: 300ms;\n}\n\n.x-ai-overview-toggle-btn-icon-expanded {\n transform: rotate(180deg);\n}\n\n.x-ai-overview-suggestion-query-btn {\n border-color: transparent;\n background-color: transparent;\n margin-left: 1rem;\n margin-right: 1rem;\n font-weight: 700;\n width: fit-content;\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\n.x-ai-overview-suggestion-query-btn-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n}\n\n.x-ai-overview-suggestions {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-bottom: 1rem;\n}\n\n.x-ai-overview-suggestions-loading {\n width: 2.5rem;\n height: 2.5rem;\n margin: auto;\n animation: x-spin 1s linear infinite;\n}\n\n.x-ai-overview-suggestion {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.x-ai-overview-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n@keyframes x-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n</style>\n\n<docs lang=\"mdx\">\n## AI Overview Examples\n\nThe `ai-overview` component provides an AI-generated summary and suggestions for queries.\n\n### Basic usage\n\n```vue\n<template>\n <AiOverview\n :title=\"'AI Overview'\"\n :title-loading=\"'Generating with Empathy AI'\"\n :expand-text=\"'Show more'\"\n :collapse-text=\"'Show less'\"\n :content-classes=\"'my-content-class'\"\n :sliding-panels-classes=\"'my-sliding-panel-class'\"\n :sliding-panel-containers-classes=\"'my-sliding-panel-container-class'\"\n :sliding-panel-buttons-classes=\"'my-sliding-panel-button-class'\"\n >\n <template #result=\"{ result }\">\n <ResultCard :result=\"result\" />\n </template>\n </AiOverview>\n</template>\n\n<script setup>\nimport AiOverview from '@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue'\nimport ResultCard from './ResultCard.vue'\n</script>\n```\n\n### Customizing slots\n\nYou can customize the loading title, extra content, and sliding panel slots:\n\n```vue\n<template>\n <AiOverview\n :title=\"'AI Overview'\"\n :title-loading=\"'Loading... Please wait'\"\n :expand-text=\"'Show more'\"\n :collapse-text=\"'Show less'\"\n >\n <template #title-loading>\n <span>Custom loading title...</span>\n </template>\n <template #extra-content>\n <div>Extra content below the main overview</div>\n </template>\n <template #sliding-panels-addons=\"{ arrivedState }\">\n <span v-if=\"arrivedState.left\">Left end reached</span>\n <span v-if=\"arrivedState.right\">Right end reached</span>\n </template>\n <template #result=\"{ result }\">\n <ResultCard :result=\"result\" />\n </template>\n </AiOverview>\n</template>\n\n<script setup>\nimport AiOverview from '@empathyco/x-components/js/x-modules/ai/components/ai-overview.vue'\nimport ResultCard from './ResultCard.vue'\n</script>\n```\n</docs>\n"],"names":["DisplayEmitter","DisplayClickProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,gBAAe,eAAe,CAAC;AAC7B,IAAA,UAAU,EAAE;QACV,MAAM;AACP,KAAA;IACD,OAAO,EAAE,SAAS,CAAC,IAAI;AACvB,IAAA,UAAU,EAAE;QACV,UAAU;QACV,cAAc;QACd,eAAe;QACf,cAAc;QACd,YAAY;QACZ,IAAI;QACJ,YAAY;QACZ,WAAW;wBACXA,WAAc;8BACdC,WAAoB;AACrB,KAAA;AACD,IAAA,KAAK,EAAE;;AAEL,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;;AAED,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,4BAA4B;AACtC,SAAA;;AAED,QAAA,2BAA2B,EAAE;AAC3B,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;;AAED,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;;AAED,QAAA,oBAAoB,EAAE;AACpB,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;;AAED,QAAA,6BAA6B,EAAE;AAC7B,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;;AAED,QAAA,0BAA0B,EAAE;AAC1B,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;AACF,KAAA;IACD,KAAK,GAAA;AACH,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;QACjB,MAAM,EACJ,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,OAAO,EACP,KAAK,GACP,GAAI,QAAQ,CAAC,IAAI,CAAA;QAEjB,MAAM,mBAAmB,GAAmB,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAC,EAAE;AAElE,QAAA,MAAM,gBAAgB,GAAG,CAAwB,IAAI,CAAA;AACrD,QAAA,MAAM,QAAO,GAAI,GAAG,CAAC,KAAK,CAAA;AAC1B,QAAA,MAAM,uBAAsB,GAAI,GAAG,CAAC,IAAI,CAAA;AACxC,QAAA,MAAM,qBAAqB,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAE1E,QAAA,MAAM,kBAAiB,GAAI,QAAQ,CACjC,MAAM,iBAAiB,CAAC,KAAI,KAAM,SAAQ,IAAK,iBAAiB,CAAC,KAAI,KAAM,OAAO,CACpF;QAEA,EAAE,CAAC,EAAE,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,MAAI;AACxD,YAAA,QAAQ,CAAC,KAAI,GAAI,KAAI;AACrB,YAAA,uBAAuB,CAAC,KAAI,GAAI,IAAG;AACrC,QAAA,CAAC,CAAA;QAED,SAAS,CAAC,MAAI;AACZ,YAAA,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,UAAS,EAAG,CAAA;AAClE,QAAA,CAAC,CAAA;QAED,OAAO;YACL,aAAa;YACb,mBAAmB;YACnB,QAAQ;YACR,kBAAkB;YAClB,kBAAkB;YAClB,iBAAiB;YACjB,cAAc;YACd,uBAAuB;YACvB,KAAK;YACL,OAAO;YACP,WAAW;YACX,OAAO;SACT;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,7 +0,0 @@
1
- import injectCss from '../../../../tools/inject-css.js';
2
-
3
- var css = ".x-ai-overview{--color:var(--x-ai-overview-color,#bbc9cf);--color-lighter:var(--x-ai-overview-color-lighter,color-mix(in srgb,var(--color) 25%,#fff));background-color:var(--color-lighter);border-radius:1.5rem;position:relative}.x-ai-overview-main{margin:0 auto;max-width:var(--x-ai-overview-main-max-width,none);padding:1rem}.x-ai-overview-title{font-size:.875rem;font-weight:700;gap:.25rem}.x-ai-overview-title,.x-ai-overview-title-loading{align-items:center;display:flex;margin-bottom:.5rem}.x-ai-overview-title-loading{gap:.375rem}.x-ai-overview-title-loading-indicator{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;background-color:var(--color);border-radius:9999px;height:.75rem;width:.75rem}.x-ai-overview-title-loading-text{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;font-size:.75rem}.x-ai-overview-title-icon{aspect-ratio:1/1;color:var(--color);flex-shrink:0;height:1rem}.x-ai-overview-content-wrapper{display:flex;flex-direction:column;line-height:1.25rem;text-align:left}.x-ai-overview-content-title{font-weight:500;margin-bottom:8px}.x-ai-overview-gradient{background-image:linear-gradient(to bottom,transparent 0,var(--color-lighter) 100%);border-radius:1.5rem;bottom:0;content:none;cursor:pointer;height:100%;position:absolute;width:100%}.x-ai-overview-toggle-btn-wrapper{cursor:pointer;display:flex;justify-content:center}.x-ai-overview-toggle-btn{align-items:center;background-color:#fff;border-color:var(--button-color-50,#283034);border-radius:9999px;border-style:solid;border-width:1px;color:var(--button-color-50,#283034);display:flex;font-size:.875rem;font-weight:700;gap:.5rem;justify-content:center;margin:auto;min-height:2.5rem;padding-left:1rem;padding-right:1rem;position:relative;width:100%}.x-ai-overview-toggle-btn:hover{background-color:var(--button-color-50,#283034);border-color:var(--button-color-50,#283034);color:#fff}@media (min-width:640px){.x-ai-overview-toggle-btn{transform:translateY(50%);transition-duration:.5s;transition-property:all;width:var(--expand-button-width,200px)}}.x-ai-overview-toggle-btn-icon{aspect-ratio:1/1;height:1rem;transform:rotate(0deg);transition-duration:.3s;transition-property:all}.x-ai-overview-toggle-btn-icon-expanded{transform:rotate(180deg)}.x-ai-overview-suggestion-query-btn{align-items:center;background-color:transparent;border-color:transparent;display:flex;font-weight:700;gap:1rem;margin-left:1rem;margin-right:1rem;width:fit-content}.x-ai-overview-suggestion-query-btn-icon{aspect-ratio:1/1;height:1rem}.x-ai-overview-suggestions{display:flex;flex-direction:column;gap:.5rem;padding-bottom:1rem}.x-ai-overview-suggestions-loading{animation:x-spin 1s linear infinite;height:2.5rem;margin:auto;width:2.5rem}.x-ai-overview-suggestion{display:flex;flex-direction:column;gap:.5rem}.x-ai-overview-suggestion-results{display:flex;gap:1rem;padding-left:1rem;padding-right:1rem}@keyframes x-spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}";
4
- injectCss(css);
5
-
6
- export { css };
7
- //# sourceMappingURL=ai-overview.vue3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-overview.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}