@empathyco/x-components 6.0.0-alpha.136 → 6.0.0-alpha.138
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 +16 -0
- package/docs/API-reference/api/x-adapter-platform.platformaisuggestionsearch.md +1 -0
- package/docs/API-reference/api/x-adapter-platform.platformaisuggestionsearch.numfound.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformaisuggestionssearchresponse.items.md +1 -0
- package/docs/API-reference/api/x-adapter-platform.platformaisuggestionssearchresponse.md +1 -1
- package/docs/API-reference/api/x-components.aioverview.md +21 -6
- package/docs/API-reference/api/x-types.aisuggestionsearch.md +1 -0
- package/docs/API-reference/api/x-types.aisuggestionsearch.numfound.md +11 -0
- package/docs/API-reference/api/x-types.aisuggestionssearchresponse.md +1 -1
- package/docs/API-reference/api/x-types.aisuggestionssearchresponse.suggestions.md +1 -4
- package/docs/API-reference/components/ai/x-components.ai-overview.md +12 -9
- package/js/x-modules/ai/components/ai-overview.vue.js +75 -50
- package/js/x-modules/ai/components/ai-overview.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-overview.vue2.js +29 -10
- package/js/x-modules/ai/components/ai-overview.vue2.js.map +1 -1
- package/js/x-modules/ai/components/ai-overview.vue3.js +1 -1
- package/package.json +4 -4
- package/report/x-adapter-platform.api.json +28 -1
- package/report/x-components.api.json +83 -11
- package/report/x-components.api.md +21 -6
- package/report/x-types.api.json +31 -8
- package/types/x-modules/ai/components/ai-overview.vue.d.ts +34 -8
- package/types/x-modules/ai/components/ai-overview.vue.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,22 @@
|
|
|
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.138 (2025-09-09)
|
|
7
|
+
|
|
8
|
+
* feat(ai): add numFound property to the response of suggestionSearch ([d0118ae](https://github.com/empathyco/x/commit/d0118ae))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.0.0-alpha.137 (2025-09-08)
|
|
15
|
+
|
|
16
|
+
* feat(AiOverview): minor component adjustments (#1867) ([554cd79](https://github.com/empathyco/x/commit/554cd79)), closes [#1867](https://github.com/empathyco/x/issues/1867)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## 6.0.0-alpha.136 (2025-09-05)
|
|
7
23
|
|
|
8
24
|
* fix(ai): reset state handling (#1864) ([29aa62c](https://github.com/empathyco/x/commit/29aa62c)), closes [#1864](https://github.com/empathyco/x/issues/1864)
|
|
@@ -16,6 +16,7 @@ export interface PlatformAiSuggestionSearch
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| [numFound](./x-adapter-platform.platformaisuggestionsearch.numfound.md) | | number | |
|
|
19
20
|
| [query](./x-adapter-platform.platformaisuggestionsearch.query.md) | | string | |
|
|
20
21
|
| [results](./x-adapter-platform.platformaisuggestionsearch.results.md) | | [PlatformResult](./x-adapter-platform.platformresult.md)<!-- -->\[\] | |
|
|
21
22
|
|
|
@@ -0,0 +1,11 @@
|
|
|
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) > [PlatformAiSuggestionSearch](./x-adapter-platform.platformaisuggestionsearch.md) > [numFound](./x-adapter-platform.platformaisuggestionsearch.numfound.md)
|
|
4
|
+
|
|
5
|
+
## PlatformAiSuggestionSearch.numFound property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
numFound: number;
|
|
11
|
+
```
|
|
@@ -16,5 +16,5 @@ export interface PlatformAiSuggestionsSearchResponse
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| [items](./x-adapter-platform.platformaisuggestionssearchresponse.items.md) | | { query: string; results: [PlatformResult](./x-adapter-platform.platformresult.md)<!-- -->\[\]; }\[\] | |
|
|
19
|
+
| [items](./x-adapter-platform.platformaisuggestionssearchresponse.items.md) | | { query: string; results: [PlatformResult](./x-adapter-platform.platformresult.md)<!-- -->\[\]; numFound: number; }\[\] | |
|
|
20
20
|
|
|
@@ -16,17 +16,27 @@ _default: import("vue").DefineComponent<{
|
|
|
16
16
|
type: PropType<string>;
|
|
17
17
|
default: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
expandText: {
|
|
20
|
+
type: PropType<string>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
collapseText: {
|
|
20
24
|
type: PropType<string>;
|
|
21
25
|
default: string;
|
|
22
26
|
};
|
|
23
27
|
}, {
|
|
24
|
-
|
|
28
|
+
buttonText: import("vue").ComputedRef<string>;
|
|
25
29
|
expanded: import("vue").Ref<boolean>;
|
|
30
|
+
queries: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionQuery[]>;
|
|
26
31
|
responseText: import("vue").ComputedRef<string>;
|
|
27
|
-
suggestionText: import("vue").ComputedRef<string>;
|
|
28
|
-
suggestionsSearch: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionSearch[]>;
|
|
29
32
|
suggestionsLoading: import("vue").ComputedRef<boolean>;
|
|
33
|
+
queriesResults: import("vue").ComputedRef<Record<string, {
|
|
34
|
+
results: AiSuggestionSearch["results"];
|
|
35
|
+
numFound: number;
|
|
36
|
+
}>>;
|
|
37
|
+
suggestionsSearch: import("vue").ComputedRef<AiSuggestionSearch[]>;
|
|
38
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
39
|
+
toggleVisibility: () => void;
|
|
30
40
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
41
|
title: {
|
|
32
42
|
type: PropType<string>;
|
|
@@ -36,13 +46,18 @@ _default: import("vue").DefineComponent<{
|
|
|
36
46
|
type: PropType<string>;
|
|
37
47
|
default: string;
|
|
38
48
|
};
|
|
39
|
-
|
|
49
|
+
expandText: {
|
|
50
|
+
type: PropType<string>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
collapseText: {
|
|
40
54
|
type: PropType<string>;
|
|
41
55
|
default: string;
|
|
42
56
|
};
|
|
43
57
|
}>>, {
|
|
44
58
|
title: string;
|
|
45
59
|
titleLoading: string;
|
|
46
|
-
|
|
60
|
+
expandText: string;
|
|
61
|
+
collapseText: string;
|
|
47
62
|
}, {}>
|
|
48
63
|
```
|
|
@@ -16,6 +16,7 @@ export interface AiSuggestionSearch
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| [numFound](./x-types.aisuggestionsearch.numfound.md) | | number | |
|
|
19
20
|
| [query](./x-types.aisuggestionsearch.query.md) | | string | |
|
|
20
21
|
| [results](./x-types.aisuggestionsearch.results.md) | | [Result](./x-types.result.md)<!-- -->\[\] | |
|
|
21
22
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-types](./x-types.md) > [AiSuggestionSearch](./x-types.aisuggestionsearch.md) > [numFound](./x-types.aisuggestionsearch.numfound.md)
|
|
4
|
+
|
|
5
|
+
## AiSuggestionSearch.numFound property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
numFound: number;
|
|
11
|
+
```
|
|
@@ -16,5 +16,5 @@ export interface AiSuggestionsSearchResponse
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| [suggestions](./x-types.aisuggestionssearchresponse.suggestions.md) | |
|
|
19
|
+
| [suggestions](./x-types.aisuggestionssearchresponse.suggestions.md) | | [AiSuggestionSearch](./x-types.aisuggestionsearch.md)<!-- -->\[\] | |
|
|
20
20
|
|
|
@@ -8,15 +8,18 @@ title: AiOverview
|
|
|
8
8
|
|
|
9
9
|
## Props
|
|
10
10
|
|
|
11
|
-
| Name | Description
|
|
12
|
-
| ------------------------- |
|
|
13
|
-
| <code>title</code> | The text displayed when the question ended loading
|
|
14
|
-
| <code>titleLoading</code> | The text displayed when the question is loading.
|
|
15
|
-
| <code>
|
|
11
|
+
| Name | Description | Type | Default |
|
|
12
|
+
| ------------------------- | ------------------------------------------------------- | ------------------- | ----------------------------------------- |
|
|
13
|
+
| <code>title</code> | The text displayed when the question ended loading | <code>string</code> | <code>'Empathy AI Overview'</code> |
|
|
14
|
+
| <code>titleLoading</code> | The text displayed when the question is loading. | <code>string</code> | <code>'Generating with Empathy AI'</code> |
|
|
15
|
+
| <code>expandText</code> | The text displayed on the toggle button when collapsed. | <code>string</code> | <code>'Show more'</code> |
|
|
16
|
+
| <code>collapseText</code> | The text displayed on the toggle button when expanded. | <code>string</code> | <code>'Show less'</code> |
|
|
16
17
|
|
|
17
18
|
## Slots
|
|
18
19
|
|
|
19
|
-
| Name
|
|
20
|
-
|
|
|
21
|
-
| <code>default</code>
|
|
22
|
-
| <code>
|
|
20
|
+
| Name | Description | Bindings<br />(name - type - description) |
|
|
21
|
+
| -------------------------- | ---------------------------- | ----------------------------------------- |
|
|
22
|
+
| <code>default</code> | suggestions-search content | <br /> |
|
|
23
|
+
| <code>query-results</code> | suggestion query result list | |
|
|
24
|
+
| <code>result</code> | (required) result card | |
|
|
25
|
+
| <code>toggle-button</code> | toggle button | <br /><br /> |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from './ai-overview.vue2.js';
|
|
2
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, withDirectives, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeStyle, renderSlot, vShow,
|
|
2
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, withDirectives, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeStyle, renderSlot, createCommentVNode, vShow, normalizeProps, guardReactiveProps, normalizeClass } from 'vue';
|
|
3
3
|
import './ai-overview.vue3.js';
|
|
4
4
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@ const _hoisted_8 = {
|
|
|
39
39
|
const _hoisted_9 = { "data-test": "ai-overview-suggestions-container" };
|
|
40
40
|
const _hoisted_10 = { class: "x-ai-overview-suggestions" };
|
|
41
41
|
const _hoisted_11 = { class: "x-ai-overview-suggestion-results" };
|
|
42
|
-
const _hoisted_12 = { class: "x-ai-overview-
|
|
42
|
+
const _hoisted_12 = { class: "x-ai-overview-toggle-wrapper" };
|
|
43
43
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
44
44
|
const _component_AIStarIcon = resolveComponent("AIStarIcon");
|
|
45
45
|
const _component_Fade = resolveComponent("Fade");
|
|
@@ -113,7 +113,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
113
113
|
/* STABLE */
|
|
114
114
|
})
|
|
115
115
|
]),
|
|
116
|
-
_ctx.
|
|
116
|
+
_ctx.queries.length ? (openBlock(), createBlock(_component_CollapseHeight, {
|
|
117
117
|
key: 0,
|
|
118
118
|
style: normalizeStyle({
|
|
119
119
|
"--x-collapse-height-transition-duration": `${300 * _ctx.suggestionsSearch.length}ms`
|
|
@@ -125,12 +125,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
125
125
|
"div",
|
|
126
126
|
_hoisted_9,
|
|
127
127
|
[
|
|
128
|
-
renderSlot(_ctx.$slots, "default", {
|
|
128
|
+
renderSlot(_ctx.$slots, "default", {
|
|
129
|
+
suggestionsSearch: _ctx.suggestionsSearch,
|
|
130
|
+
queries: _ctx.queries
|
|
131
|
+
}, () => [
|
|
129
132
|
createElementVNode("div", _hoisted_10, [
|
|
130
133
|
(openBlock(true), createElementBlock(
|
|
131
134
|
Fragment,
|
|
132
135
|
null,
|
|
133
|
-
renderList(_ctx.
|
|
136
|
+
renderList(_ctx.queries, ({ query }) => {
|
|
134
137
|
return openBlock(), createElementBlock("div", {
|
|
135
138
|
key: query,
|
|
136
139
|
class: "x-ai-overview-suggestion"
|
|
@@ -150,34 +153,41 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
150
153
|
_: 2
|
|
151
154
|
/* DYNAMIC */
|
|
152
155
|
}, 1032, ["events"]),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
])
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
156
|
+
renderSlot(_ctx.$slots, "query-results", {
|
|
157
|
+
queryResults: _ctx.queriesResults[query]
|
|
158
|
+
}, () => [
|
|
159
|
+
_ctx.queriesResults[query] ? (openBlock(), createBlock(
|
|
160
|
+
_component_SlidingPanel,
|
|
161
|
+
{
|
|
162
|
+
key: 0,
|
|
163
|
+
"reset-on-content-change": false
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
default: withCtx(() => [
|
|
167
|
+
createElementVNode("ul", _hoisted_11, [
|
|
168
|
+
(openBlock(true), createElementBlock(
|
|
169
|
+
Fragment,
|
|
170
|
+
null,
|
|
171
|
+
renderList(_ctx.queriesResults[query].results, (result) => {
|
|
172
|
+
return openBlock(), createElementBlock("li", {
|
|
173
|
+
key: result.id,
|
|
174
|
+
"data-test": "ai-overview-suggestion-result"
|
|
175
|
+
}, [
|
|
176
|
+
renderSlot(_ctx.$slots, "result", { result })
|
|
177
|
+
]);
|
|
178
|
+
}),
|
|
179
|
+
128
|
|
180
|
+
/* KEYED_FRAGMENT */
|
|
181
|
+
))
|
|
182
|
+
])
|
|
183
|
+
]),
|
|
184
|
+
_: 2
|
|
185
|
+
/* DYNAMIC */
|
|
186
|
+
},
|
|
187
|
+
1024
|
|
188
|
+
/* DYNAMIC_SLOTS */
|
|
189
|
+
)) : createCommentVNode("v-if", true)
|
|
190
|
+
])
|
|
181
191
|
]);
|
|
182
192
|
}),
|
|
183
193
|
128
|
|
@@ -199,30 +209,45 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
199
209
|
"div",
|
|
200
210
|
null,
|
|
201
211
|
[
|
|
202
|
-
createElementVNode(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
withDirectives(createElementVNode(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
class: "x-ai-overview-gradient",
|
|
216
|
+
"data-test": "ai-overview-gradient",
|
|
217
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleVisibility && _ctx.toggleVisibility(...args))
|
|
218
|
+
},
|
|
219
|
+
null,
|
|
220
|
+
512
|
|
221
|
+
/* NEED_PATCH */
|
|
222
|
+
), [
|
|
223
|
+
[vShow, !_ctx.expanded]
|
|
224
|
+
]),
|
|
207
225
|
createElementVNode("div", _hoisted_12, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
renderSlot(_ctx.$slots, "toggle-button", normalizeProps(guardReactiveProps({ expanded: _ctx.expanded, toggleVisibility: _ctx.toggleVisibility, buttonText: _ctx.buttonText })), () => [
|
|
227
|
+
createElementVNode("button", {
|
|
228
|
+
class: "x-ai-overview-toggle-btn",
|
|
229
|
+
"data-test": "ai-overview-toggle-button",
|
|
230
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.toggleVisibility && _ctx.toggleVisibility(...args))
|
|
231
|
+
}, [
|
|
232
|
+
createTextVNode(
|
|
233
|
+
toDisplayString(_ctx.buttonText) + " ",
|
|
234
|
+
1
|
|
235
|
+
/* TEXT */
|
|
236
|
+
),
|
|
237
|
+
createVNode(_component_ChevronDownIcon, {
|
|
238
|
+
class: normalizeClass([
|
|
239
|
+
"x-ai-overview-toggle-btn-icon",
|
|
240
|
+
_ctx.expanded ? "x-ai-overview-toggle-btn-icon-expanded" : "x-ai-overview-toggle-btn-icon-collapsed"
|
|
241
|
+
])
|
|
242
|
+
}, null, 8, ["class"])
|
|
243
|
+
])
|
|
219
244
|
])
|
|
220
245
|
])
|
|
221
246
|
],
|
|
222
247
|
512
|
|
223
248
|
/* NEED_PATCH */
|
|
224
249
|
), [
|
|
225
|
-
[vShow, _ctx.
|
|
250
|
+
[vShow, _ctx.queries.length]
|
|
226
251
|
])
|
|
227
252
|
]);
|
|
228
253
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div class=\"x-ai-overview\">\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 v-typing=\"{ text: titleLoading, speed: 50 }\"\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n />\n </span>\n <span v-else class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ title }}\n </span>\n </Fade>\n <ChangeHeight>\n <div\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-loading-content\"\n data-test=\"ai-overview-loading-content\"\n >\n <span v-for=\"i in 4\" :key=\"i\" data-test=\"ai-overview-loading-item\" />\n </div>\n <div v-else class=\"x-ai-overview-content\" data-test=\"ai-overview-content\">\n <span>{{ suggestionText }}</span>\n <p>{{ responseText }}</p>\n </div>\n </ChangeHeight>\n </div>\n <CollapseHeight\n v-if=\"suggestionsSearch.length\"\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\" data-test=\"ai-overview-suggestions-container\">\n <!-- @slot suggestions-search content -->\n <slot :suggestions-search=\"suggestionsSearch\">\n <div class=\"x-ai-overview-suggestions\">\n <div\n v-for=\"{ query, results } in suggestionsSearch\"\n :key=\"query\"\n class=\"x-ai-overview-suggestion\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: query }\"\n >\n {{ query }}<ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n <SlidingPanel :reset-on-content-change=\"false\">\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"result in results\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </div>\n </div>\n </slot>\n </div>\n </CollapseHeight>\n <div v-show=\"suggestionsSearch.length && !expanded\">\n <div class=\"x-ai-overview-gradient\" data-test=\"ai-overview-gradient\" @click=\"open\" />\n <div class=\"x-ai-overview-expand-wrapper\">\n <button\n class=\"x-ai-overview-expand-btn\"\n data-test=\"ai-overview-expand-button\"\n @click=\"open\"\n >\n {{ buttonText }}\n <ChevronDownIcon class=\"x-ai-overview-expand-btn-icon\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue'\nimport { defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n Fade,\n SlidingPanel,\n} from '../../../components'\nimport { useGetter, 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 ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n },\n props: {\n /**\n * The text displayed when the question ended loading\n *\n * @public\n */\n title: {\n type: String as PropType<string>,\n default: 'Empathy AI Overview',\n },\n /**\n * The text displayed when the question is loading.\n *\n * @public\n */\n titleLoading: {\n type: String as PropType<string>,\n default: 'Generating with Empathy AI',\n },\n /**\n * The text displayed on the expand button.\n *\n * @public\n */\n buttonText: {\n type: String as PropType<string>,\n default: 'Show more',\n },\n },\n setup() {\n const { query } = useGetter('ai')\n const { suggestionText, responseText, suggestionsSearch, suggestionsLoading } = useState('ai')\n\n const expanded = ref(false)\n\n function open() {\n expanded.value = true\n }\n\n watch(query, () => (expanded.value = false))\n\n return {\n open,\n expanded,\n responseText,\n suggestionText,\n suggestionsSearch,\n suggestionsLoading,\n }\n },\n})\n</script>\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 --color-lightest: var(\n --x-ai-overview-color-lightest,\n color-mix(in srgb, var(--color) 75%, white)\n );\n\n @apply x-relative x-rounded-3xl x-bg-[var(--color-lighter)];\n}\n\n.x-ai-overview-main {\n @apply x-p-16 x-rounded-lg;\n}\n\n.x-ai-overview-title-loading {\n @apply x-flex x-items-center x-gap-1.5 x-mb-8;\n}\n.x-ai-overview-title-loading-indicator {\n @apply x-size-3 x-animate-pulse x-rounded-full x-bg-[var(--color)];\n}\n.x-ai-overview-title-loading-text {\n @apply x-animate-pulse x-text-xs;\n}\n\n.x-ai-overview-title {\n @apply x-flex x-text-sm x-font-bold x-gap-4 x-items-center x-mb-8;\n}\n.x-ai-overview-title-icon {\n @apply x-icon x-text-[var(--color)];\n}\n\n.x-ai-overview-loading-content {\n @apply x-flex x-w-full x-flex-col x-gap-4 x-animate-pulse;\n}\n.x-ai-overview-loading-content > span:first-child {\n @apply x-h-16 x-w-full x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(2) {\n @apply x-h-16 x-w-3/4 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color-lightest)] x-to-100% x-to-[var(--color)] x-opacity-50;\n}\n.x-ai-overview-loading-content > span:nth-child(3) {\n @apply x-h-16 x-w-11/12 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(4) {\n @apply x-h-16 x-w-1/2 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)] x-opacity-75;\n}\n\n.x-ai-overview-content {\n @apply x-flex x-flex-col x-text-left x-leading-5 x-gap-2;\n}\n.x-ai-overview-content span {\n @apply x-font-medium;\n}\n\n.x-ai-overview-gradient {\n @apply x-cursor-pointer x-content-none x-absolute x-w-full x-h-80 x-bottom-5 x-bg-gradient-to-b x-from-0% x-from-transparent x-to-100% x-to-[var(--color-lighter)];\n}\n\n.x-ai-overview-expand-wrapper {\n @apply x-flex x-relative x-z-[1];\n}\n.x-ai-overview-expand-btn {\n @apply x-button x-button-outlined x-rounded-full x-w-full;\n}\n.x-ai-overview-expand-btn-icon {\n @apply x-icon;\n}\n.x-ai-overview-suggestion-query-btn {\n @apply x-button-tight x-mx-16 x-font-bold x-text-gray-900 x-w-fit x-min-h-fit x-flex x-gap-16 x-items-center;\n}\n.x-ai-overview-suggestion-query-btn-icon {\n @apply x-icon-md;\n}\n.x-ai-overview-suggestions {\n @apply x-flex x-flex-col x-gap-16 x-pb-16;\n}\n.x-ai-overview-suggestion {\n @apply x-flex x-flex-col x-gap-8;\n}\n.x-ai-overview-suggestion-results {\n @apply x-flex x-gap-16 x-px-16;\n}\n</style>\n"],"names":["_createElementVNode","_openBlock","_createElementBlock","_createVNode","_withDirectives","_createTextVNode","_toDisplayString","_Fragment","_renderList","_createBlock","_normalizeStyle","_withCtx","_renderSlot","_createCommentVNode"],"mappings":";;;;;AACO,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,eAAe,EAAA,CAAA;AACnB,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,oBAAoB,EAAA,CAAA;;AAFnC,EAAA,GAAA,EAAA,CAAA;AAAA,EAMU,KAAM,EAAA,6BAAA;AAAA,EACN,WAAU,EAAA,2BAAA;;AAEV,MAAA,UAAA,mBAAAA,kBAAA;AAAA,EAAsD,MAAA;AAAA,EAAA,EAAhD,OAAM,uCAAuC,EAAA;AAAA,EAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAAA;AAAA,CAAA,CAAA;;EAGjD,KAAM,EAAA,kCAAA;AAAA,EACN,WAAU,EAAA,gCAAA;;;AAbtB,EAAA,GAAA,EAAA,CAAA;AAAA,EAgBqB,KAAM,EAAA,qBAAA;AAAA,EAAsB,WAAU,EAAA,mBAAA;;;AAhB3D,EAAA,GAAA,EAAA,CAAA;AAAA,EAuBU,KAAM,EAAA,+BAAA;AAAA,EACN,WAAU,EAAA,6BAAA;;;AAxBpB,EAAA,GA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AA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,IAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,WAAA,EAAA;AA/ElB,YAAAK,eAAA;AAAA,cAAAC,eAAA,CAiFa,eAAU,CAAG,GAAA,GAAA;AAAA,cAChB,CAAA;AAAA;AAAA,aAAA;AAAA,YAAyDH,WAAA,CAAA,0BAAA,EAAA,EAAxC,OAAM,+BAA+B,EAAA,CAAA;AAAA,WAAA,CAAA;;;;;;cAT/C,IAAkB,CAAA,iBAAA,CAAA,MAAA,IAAM,CAAK,IAAQ,CAAA,QAAA,CAAA;AAAA,KAAA,CAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div class=\"x-ai-overview\">\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 v-typing=\"{ text: titleLoading, speed: 50 }\"\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n />\n </span>\n <span v-else class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ title }}\n </span>\n </Fade>\n <ChangeHeight>\n <div\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-loading-content\"\n data-test=\"ai-overview-loading-content\"\n >\n <span v-for=\"i in 4\" :key=\"i\" data-test=\"ai-overview-loading-item\" />\n </div>\n <div v-else class=\"x-ai-overview-content\" data-test=\"ai-overview-content\">\n <span>{{ suggestionText }}</span>\n <p>{{ responseText }}</p>\n </div>\n </ChangeHeight>\n </div>\n <CollapseHeight\n v-if=\"queries.length\"\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\" data-test=\"ai-overview-suggestions-container\">\n <!-- @slot suggestions-search content -->\n <slot :suggestions-search=\"suggestionsSearch\" :queries=\"queries\">\n <div class=\"x-ai-overview-suggestions\">\n <div v-for=\"{ query } in queries\" :key=\"query\" class=\"x-ai-overview-suggestion\">\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: query }\"\n >\n {{ query }}<ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n <!-- @slot suggestion query result list -->\n <slot name=\"query-results\" :query-results=\"queriesResults[query]\">\n <SlidingPanel v-if=\"queriesResults[query]\" :reset-on-content-change=\"false\">\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"result in queriesResults[query].results\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </div>\n </div>\n </slot>\n </div>\n </CollapseHeight>\n <div v-show=\"queries.length\">\n <div\n v-show=\"!expanded\"\n class=\"x-ai-overview-gradient\"\n data-test=\"ai-overview-gradient\"\n @click=\"toggleVisibility\"\n />\n <div class=\"x-ai-overview-toggle-wrapper\">\n <!-- @slot toggle button -->\n <slot name=\"toggle-button\" v-bind=\"{ expanded, toggleVisibility, buttonText }\">\n <button\n class=\"x-ai-overview-toggle-btn\"\n data-test=\"ai-overview-toggle-button\"\n @click=\"toggleVisibility\"\n >\n {{ buttonText }}\n <ChevronDownIcon\n class=\"x-ai-overview-toggle-btn-icon\"\n :class=\"\n expanded\n ? 'x-ai-overview-toggle-btn-icon-expanded'\n : 'x-ai-overview-toggle-btn-icon-collapsed'\n \"\n />\n </button>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n Fade,\n SlidingPanel,\n} from '../../../components'\nimport { useGetter, 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 ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n },\n props: {\n /**\n * The text displayed when the question ended loading\n *\n * @public\n */\n title: {\n type: String as PropType<string>,\n default: 'Empathy AI Overview',\n },\n /**\n * The text displayed when the question is loading.\n *\n * @public\n */\n titleLoading: {\n type: String as PropType<string>,\n default: 'Generating with Empathy AI',\n },\n /**\n * The text displayed on the toggle button when collapsed.\n *\n * @public\n */\n expandText: {\n type: String as PropType<string>,\n default: 'Show more',\n },\n /**\n * The text displayed on the toggle button when expanded.\n *\n * @public\n */\n collapseText: {\n type: String as PropType<string>,\n default: 'Show less',\n },\n },\n setup(props) {\n const { query } = useGetter('ai')\n const { suggestionText, responseText, queries, suggestionsSearch, suggestionsLoading } =\n useState('ai')\n\n const expanded = ref(false)\n\n const queriesResults = computed(() => {\n return suggestionsSearch.value.reduce(\n (\n acc: Record<string, { results: AiSuggestionSearch['results']; numFound: number }>,\n { query, results, numFound },\n ) => {\n acc[query] = { results, numFound }\n return acc\n },\n {},\n )\n })\n\n const buttonText = computed(() => (expanded.value ? props.collapseText : props.expandText))\n\n function toggleVisibility() {\n expanded.value = !expanded.value\n }\n\n watch(query, () => (expanded.value = false))\n\n return {\n buttonText,\n expanded,\n queries,\n responseText,\n suggestionsLoading,\n queriesResults,\n suggestionsSearch,\n suggestionText,\n toggleVisibility,\n }\n },\n})\n</script>\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 --color-lightest: var(\n --x-ai-overview-color-lightest,\n color-mix(in srgb, var(--color) 75%, white)\n );\n\n @apply x-relative x-rounded-3xl x-bg-[var(--color-lighter)];\n}\n\n.x-ai-overview-main {\n @apply x-p-16 x-rounded-lg;\n}\n\n.x-ai-overview-title-loading {\n @apply x-flex x-items-center x-gap-1.5 x-mb-8;\n}\n.x-ai-overview-title-loading-indicator {\n @apply x-size-3 x-animate-pulse x-rounded-full x-bg-[var(--color)];\n}\n.x-ai-overview-title-loading-text {\n @apply x-animate-pulse x-text-xs;\n}\n\n.x-ai-overview-title {\n @apply x-flex x-text-sm x-font-bold x-gap-4 x-items-center x-mb-8;\n}\n.x-ai-overview-title-icon {\n @apply x-icon x-text-[var(--color)];\n}\n\n.x-ai-overview-loading-content {\n @apply x-flex x-w-full x-flex-col x-gap-4 x-animate-pulse;\n}\n.x-ai-overview-loading-content > span:first-child {\n @apply x-h-16 x-w-full x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(2) {\n @apply x-h-16 x-w-3/4 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color-lightest)] x-to-100% x-to-[var(--color)] x-opacity-50;\n}\n.x-ai-overview-loading-content > span:nth-child(3) {\n @apply x-h-16 x-w-11/12 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(4) {\n @apply x-h-16 x-w-1/2 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)] x-opacity-75;\n}\n\n.x-ai-overview-content {\n @apply x-flex x-flex-col x-text-left x-leading-5 x-gap-2;\n}\n.x-ai-overview-content span {\n @apply x-font-medium;\n}\n\n.x-ai-overview-gradient {\n @apply x-cursor-pointer x-content-none x-absolute x-w-full x-h-80 x-bottom-5 x-bg-gradient-to-b x-from-0% x-from-transparent x-to-100% x-to-[var(--color-lighter)];\n}\n\n.x-ai-overview-toggle-wrapper {\n @apply x-flex x-relative x-z-[1];\n}\n.x-ai-overview-toggle-btn {\n @apply x-button x-button-outlined x-rounded-full x-w-full;\n}\n.x-ai-overview-toggle-btn-icon {\n @apply x-icon x-transition-all x-duration-300;\n}\n.x-ai-overview-toggle-btn-icon-expanded {\n @apply x-rotate-0;\n}\n.x-ai-overview-toggle-btn-icon-collapsed {\n @apply x-rotate-180;\n}\n.x-ai-overview-suggestion-query-btn {\n @apply x-button-tight x-mx-16 x-font-bold x-text-gray-900 x-w-fit x-min-h-fit x-flex x-gap-16 x-items-center;\n}\n.x-ai-overview-suggestion-query-btn-icon {\n @apply x-icon-md;\n}\n.x-ai-overview-suggestions {\n @apply x-flex x-flex-col x-gap-16 x-pb-16;\n}\n.x-ai-overview-suggestion {\n @apply x-flex x-flex-col x-gap-8;\n}\n.x-ai-overview-suggestion-results {\n @apply x-flex x-gap-16 x-px-16;\n}\n</style>\n"],"names":["_createElementVNode","_openBlock","_createElementBlock","_createVNode","_withDirectives","_createTextVNode","_toDisplayString","_Fragment","_renderList","_createBlock","_normalizeStyle","_withCtx","_renderSlot","_createCommentVNode","_normalizeProps","_guardReactiveProps","_normalizeClass","_vShow"],"mappings":";;;;;AACO,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,eAAe,EAAA,CAAA;AACnB,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,oBAAoB,EAAA,CAAA;;AAFnC,EAAA,GAAA,EAAA,CAAA;AAAA,EAMU,KAAM,EAAA,6BAAA;AAAA,EACN,WAAU,EAAA,2BAAA;;AAEV,MAAA,UAAA,mBAAAA,kBAAA;AAAA,EAAsD,MAAA;AAAA,EAAA,EAAhD,OAAM,uCAAuC,EAAA;AAAA,EAAA,IAAA;A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CAAG,GAAA,GAAA;AAAA,gBAChB,CAAA;AAAA;AAAA,eAAA;AAAA,cAOEH,WAAA,CAAA,0BAAA,EAAA;AAAA,gBANA,KAzFd,EAAAa,cAAA,CAAA;AAAA,kBAyFoB,+BAAA;AAAA,kBACmB,IAAA,CAAA,QAAA,GAAA,wCAAA,GAAA,yCAAA;;;;;;;;;;AAlBtB,MAAA,CAAAC,KAAA,EAAA,IAAA,CAAA,OAAA,CAAQ,MAAM,CAAA;AAAA,KAAA,CAAA;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue';
|
|
2
2
|
import '../../../components/animations/animate-clip-path/animate-clip-path.style.scss.js';
|
|
3
3
|
import '../../../components/animations/animate-scale/animate-scale.style.scss.js';
|
|
4
4
|
import '../../../components/animations/animate-translate/animate-translate.style.scss.js';
|
|
@@ -144,30 +144,49 @@ var _sfc_main = defineComponent({
|
|
|
144
144
|
default: 'Generating with Empathy AI',
|
|
145
145
|
},
|
|
146
146
|
/**
|
|
147
|
-
* The text displayed on the
|
|
147
|
+
* The text displayed on the toggle button when collapsed.
|
|
148
148
|
*
|
|
149
149
|
* @public
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
expandText: {
|
|
152
152
|
type: String,
|
|
153
153
|
default: 'Show more',
|
|
154
154
|
},
|
|
155
|
+
/**
|
|
156
|
+
* The text displayed on the toggle button when expanded.
|
|
157
|
+
*
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
collapseText: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: 'Show less',
|
|
163
|
+
},
|
|
155
164
|
},
|
|
156
|
-
setup() {
|
|
165
|
+
setup(props) {
|
|
157
166
|
const { query } = useGetter('ai');
|
|
158
|
-
const { suggestionText, responseText, suggestionsSearch, suggestionsLoading } = useState('ai');
|
|
167
|
+
const { suggestionText, responseText, queries, suggestionsSearch, suggestionsLoading } = useState('ai');
|
|
159
168
|
const expanded = ref(false);
|
|
160
|
-
|
|
161
|
-
|
|
169
|
+
const queriesResults = computed(() => {
|
|
170
|
+
return suggestionsSearch.value.reduce((acc, { query, results, numFound }) => {
|
|
171
|
+
acc[query] = { results, numFound };
|
|
172
|
+
return acc;
|
|
173
|
+
}, {});
|
|
174
|
+
});
|
|
175
|
+
const buttonText = computed(() => (expanded.value ? props.collapseText : props.expandText));
|
|
176
|
+
function toggleVisibility() {
|
|
177
|
+
expanded.value = !expanded.value;
|
|
162
178
|
}
|
|
163
179
|
watch(query, () => (expanded.value = false));
|
|
164
180
|
return {
|
|
165
|
-
|
|
181
|
+
buttonText,
|
|
166
182
|
expanded,
|
|
183
|
+
queries,
|
|
167
184
|
responseText,
|
|
168
|
-
suggestionText,
|
|
169
|
-
suggestionsSearch,
|
|
170
185
|
suggestionsLoading,
|
|
186
|
+
queriesResults,
|
|
187
|
+
suggestionsSearch,
|
|
188
|
+
suggestionText,
|
|
189
|
+
toggleVisibility,
|
|
171
190
|
};
|
|
172
191
|
},
|
|
173
192
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-overview.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div class=\"x-ai-overview\">\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 v-typing=\"{ text: titleLoading, speed: 50 }\"\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n />\n </span>\n <span v-else class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ title }}\n </span>\n </Fade>\n <ChangeHeight>\n <div\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-loading-content\"\n data-test=\"ai-overview-loading-content\"\n >\n <span v-for=\"i in 4\" :key=\"i\" data-test=\"ai-overview-loading-item\" />\n </div>\n <div v-else class=\"x-ai-overview-content\" data-test=\"ai-overview-content\">\n <span>{{ suggestionText }}</span>\n <p>{{ responseText }}</p>\n </div>\n </ChangeHeight>\n </div>\n <CollapseHeight\n v-if=\"suggestionsSearch.length\"\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\" data-test=\"ai-overview-suggestions-container\">\n <!-- @slot suggestions-search content -->\n <slot :suggestions-search=\"suggestionsSearch\">\n <div class=\"x-ai-overview-suggestions\">\n <div\n v-for=\"{ query, results } in suggestionsSearch\"\n :key=\"query\"\n class=\"x-ai-overview-suggestion\"\n >\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: query }\"\n >\n {{ query }}<ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n <SlidingPanel :reset-on-content-change=\"false\">\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"result in results\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </div>\n </div>\n </slot>\n </div>\n </CollapseHeight>\n <div v-show=\"suggestionsSearch.length && !expanded\">\n <div class=\"x-ai-overview-gradient\" data-test=\"ai-overview-gradient\" @click=\"open\" />\n <div class=\"x-ai-overview-expand-wrapper\">\n <button\n class=\"x-ai-overview-expand-btn\"\n data-test=\"ai-overview-expand-button\"\n @click=\"open\"\n >\n {{ buttonText }}\n <ChevronDownIcon class=\"x-ai-overview-expand-btn-icon\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue'\nimport { defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n Fade,\n SlidingPanel,\n} from '../../../components'\nimport { useGetter, 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 ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n },\n props: {\n /**\n * The text displayed when the question ended loading\n *\n * @public\n */\n title: {\n type: String as PropType<string>,\n default: 'Empathy AI Overview',\n },\n /**\n * The text displayed when the question is loading.\n *\n * @public\n */\n titleLoading: {\n type: String as PropType<string>,\n default: 'Generating with Empathy AI',\n },\n /**\n * The text displayed on the expand button.\n *\n * @public\n */\n buttonText: {\n type: String as PropType<string>,\n default: 'Show more',\n },\n },\n setup() {\n const { query } = useGetter('ai')\n const { suggestionText, responseText, suggestionsSearch, suggestionsLoading } = useState('ai')\n\n const expanded = ref(false)\n\n function open() {\n expanded.value = true\n }\n\n watch(query, () => (expanded.value = false))\n\n return {\n open,\n expanded,\n responseText,\n suggestionText,\n suggestionsSearch,\n suggestionsLoading,\n }\n },\n})\n</script>\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 --color-lightest: var(\n --x-ai-overview-color-lightest,\n color-mix(in srgb, var(--color) 75%, white)\n );\n\n @apply x-relative x-rounded-3xl x-bg-[var(--color-lighter)];\n}\n\n.x-ai-overview-main {\n @apply x-p-16 x-rounded-lg;\n}\n\n.x-ai-overview-title-loading {\n @apply x-flex x-items-center x-gap-1.5 x-mb-8;\n}\n.x-ai-overview-title-loading-indicator {\n @apply x-size-3 x-animate-pulse x-rounded-full x-bg-[var(--color)];\n}\n.x-ai-overview-title-loading-text {\n @apply x-animate-pulse x-text-xs;\n}\n\n.x-ai-overview-title {\n @apply x-flex x-text-sm x-font-bold x-gap-4 x-items-center x-mb-8;\n}\n.x-ai-overview-title-icon {\n @apply x-icon x-text-[var(--color)];\n}\n\n.x-ai-overview-loading-content {\n @apply x-flex x-w-full x-flex-col x-gap-4 x-animate-pulse;\n}\n.x-ai-overview-loading-content > span:first-child {\n @apply x-h-16 x-w-full x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(2) {\n @apply x-h-16 x-w-3/4 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color-lightest)] x-to-100% x-to-[var(--color)] x-opacity-50;\n}\n.x-ai-overview-loading-content > span:nth-child(3) {\n @apply x-h-16 x-w-11/12 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(4) {\n @apply x-h-16 x-w-1/2 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)] x-opacity-75;\n}\n\n.x-ai-overview-content {\n @apply x-flex x-flex-col x-text-left x-leading-5 x-gap-2;\n}\n.x-ai-overview-content span {\n @apply x-font-medium;\n}\n\n.x-ai-overview-gradient {\n @apply x-cursor-pointer x-content-none x-absolute x-w-full x-h-80 x-bottom-5 x-bg-gradient-to-b x-from-0% x-from-transparent x-to-100% x-to-[var(--color-lighter)];\n}\n\n.x-ai-overview-expand-wrapper {\n @apply x-flex x-relative x-z-[1];\n}\n.x-ai-overview-expand-btn {\n @apply x-button x-button-outlined x-rounded-full x-w-full;\n}\n.x-ai-overview-expand-btn-icon {\n @apply x-icon;\n}\n.x-ai-overview-suggestion-query-btn {\n @apply x-button-tight x-mx-16 x-font-bold x-text-gray-900 x-w-fit x-min-h-fit x-flex x-gap-16 x-items-center;\n}\n.x-ai-overview-suggestion-query-btn-icon {\n @apply x-icon-md;\n}\n.x-ai-overview-suggestions {\n @apply x-flex x-flex-col x-gap-16 x-pb-16;\n}\n.x-ai-overview-suggestion {\n @apply x-flex x-flex-col x-gap-8;\n}\n.x-ai-overview-suggestion-results {\n @apply x-flex x-gap-16 x-px-16;\n}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,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,eAAe;QACf,cAAc;QACd,YAAY;QACZ,IAAI;QACJ,YAAY;AACb,KAAA;AACD,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,qBAAqB;AAC/B,SAAA;AACD;;;;AAIE;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,4BAA4B;AACtC,SAAA;AACD;;;;AAIE;AACF,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,WAAW;AACrB,SAAA;AACF,KAAA;IACD,KAAK,GAAA;QACH,MAAM,EAAE,KAAI,EAAI,GAAE,SAAS,CAAC,IAAI,CAAA,CAAA;AAChC,QAAA,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAqB,GAAE,QAAQ,CAAC,IAAI,CAAA,CAAA;AAE7F,QAAA,MAAM,QAAS,GAAE,GAAG,CAAC,KAAK,CAAA,CAAA;AAE1B,QAAA,SAAS,IAAI,GAAA;AACX,YAAA,QAAQ,CAAC,KAAI,GAAI,IAAG,CAAA;SACtB;AAEA,QAAA,KAAK,CAAC,KAAK,EAAE,OAAO,QAAQ,CAAC,KAAI,GAAI,KAAK,CAAC,CAAA,CAAA;QAE3C,OAAO;YACL,IAAI;YACJ,QAAQ;YACR,YAAY;YACZ,cAAc;YACd,iBAAiB;YACjB,kBAAkB;SACpB,CAAA;KACD;AACF,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"ai-overview.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div class=\"x-ai-overview\">\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 v-typing=\"{ text: titleLoading, speed: 50 }\"\n class=\"x-ai-overview-title-loading-text\"\n data-test=\"ai-overview-title-loading-text\"\n />\n </span>\n <span v-else class=\"x-ai-overview-title\" data-test=\"ai-overview-title\">\n <AIStarIcon class=\"x-ai-overview-title-icon\" />{{ title }}\n </span>\n </Fade>\n <ChangeHeight>\n <div\n v-if=\"suggestionsLoading\"\n class=\"x-ai-overview-loading-content\"\n data-test=\"ai-overview-loading-content\"\n >\n <span v-for=\"i in 4\" :key=\"i\" data-test=\"ai-overview-loading-item\" />\n </div>\n <div v-else class=\"x-ai-overview-content\" data-test=\"ai-overview-content\">\n <span>{{ suggestionText }}</span>\n <p>{{ responseText }}</p>\n </div>\n </ChangeHeight>\n </div>\n <CollapseHeight\n v-if=\"queries.length\"\n :style=\"{\n '--x-collapse-height-transition-duration': `${300 * suggestionsSearch.length}ms`,\n }\"\n data-test=\"ai-overview-collapse-height-suggestions\"\n >\n <div v-show=\"expanded\" data-test=\"ai-overview-suggestions-container\">\n <!-- @slot suggestions-search content -->\n <slot :suggestions-search=\"suggestionsSearch\" :queries=\"queries\">\n <div class=\"x-ai-overview-suggestions\">\n <div v-for=\"{ query } in queries\" :key=\"query\" class=\"x-ai-overview-suggestion\">\n <BaseEventButton\n class=\"x-ai-overview-suggestion-query-btn\"\n :events=\"{ UserAcceptedAQuery: query }\"\n >\n {{ query }}<ArrowRightIcon class=\"x-ai-overview-suggestion-query-btn-icon\" />\n </BaseEventButton>\n <!-- @slot suggestion query result list -->\n <slot name=\"query-results\" :query-results=\"queriesResults[query]\">\n <SlidingPanel v-if=\"queriesResults[query]\" :reset-on-content-change=\"false\">\n <ul class=\"x-ai-overview-suggestion-results\">\n <li\n v-for=\"result in queriesResults[query].results\"\n :key=\"result.id\"\n data-test=\"ai-overview-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </ul>\n </SlidingPanel>\n </slot>\n </div>\n </div>\n </slot>\n </div>\n </CollapseHeight>\n <div v-show=\"queries.length\">\n <div\n v-show=\"!expanded\"\n class=\"x-ai-overview-gradient\"\n data-test=\"ai-overview-gradient\"\n @click=\"toggleVisibility\"\n />\n <div class=\"x-ai-overview-toggle-wrapper\">\n <!-- @slot toggle button -->\n <slot name=\"toggle-button\" v-bind=\"{ expanded, toggleVisibility, buttonText }\">\n <button\n class=\"x-ai-overview-toggle-btn\"\n data-test=\"ai-overview-toggle-button\"\n @click=\"toggleVisibility\"\n >\n {{ buttonText }}\n <ChevronDownIcon\n class=\"x-ai-overview-toggle-btn-icon\"\n :class=\"\n expanded\n ? 'x-ai-overview-toggle-btn-icon-expanded'\n : 'x-ai-overview-toggle-btn-icon-collapsed'\n \"\n />\n </button>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { AiSuggestionSearch } from '@empathyco/x-types'\nimport type { PropType } from 'vue'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ArrowRightIcon,\n BaseEventButton,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n Fade,\n SlidingPanel,\n} from '../../../components'\nimport { useGetter, 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 ChevronDownIcon,\n CollapseHeight,\n ChangeHeight,\n Fade,\n SlidingPanel,\n },\n props: {\n /**\n * The text displayed when the question ended loading\n *\n * @public\n */\n title: {\n type: String as PropType<string>,\n default: 'Empathy AI Overview',\n },\n /**\n * The text displayed when the question is loading.\n *\n * @public\n */\n titleLoading: {\n type: String as PropType<string>,\n default: 'Generating with Empathy AI',\n },\n /**\n * The text displayed on the toggle button when collapsed.\n *\n * @public\n */\n expandText: {\n type: String as PropType<string>,\n default: 'Show more',\n },\n /**\n * The text displayed on the toggle button when expanded.\n *\n * @public\n */\n collapseText: {\n type: String as PropType<string>,\n default: 'Show less',\n },\n },\n setup(props) {\n const { query } = useGetter('ai')\n const { suggestionText, responseText, queries, suggestionsSearch, suggestionsLoading } =\n useState('ai')\n\n const expanded = ref(false)\n\n const queriesResults = computed(() => {\n return suggestionsSearch.value.reduce(\n (\n acc: Record<string, { results: AiSuggestionSearch['results']; numFound: number }>,\n { query, results, numFound },\n ) => {\n acc[query] = { results, numFound }\n return acc\n },\n {},\n )\n })\n\n const buttonText = computed(() => (expanded.value ? props.collapseText : props.expandText))\n\n function toggleVisibility() {\n expanded.value = !expanded.value\n }\n\n watch(query, () => (expanded.value = false))\n\n return {\n buttonText,\n expanded,\n queries,\n responseText,\n suggestionsLoading,\n queriesResults,\n suggestionsSearch,\n suggestionText,\n toggleVisibility,\n }\n },\n})\n</script>\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 --color-lightest: var(\n --x-ai-overview-color-lightest,\n color-mix(in srgb, var(--color) 75%, white)\n );\n\n @apply x-relative x-rounded-3xl x-bg-[var(--color-lighter)];\n}\n\n.x-ai-overview-main {\n @apply x-p-16 x-rounded-lg;\n}\n\n.x-ai-overview-title-loading {\n @apply x-flex x-items-center x-gap-1.5 x-mb-8;\n}\n.x-ai-overview-title-loading-indicator {\n @apply x-size-3 x-animate-pulse x-rounded-full x-bg-[var(--color)];\n}\n.x-ai-overview-title-loading-text {\n @apply x-animate-pulse x-text-xs;\n}\n\n.x-ai-overview-title {\n @apply x-flex x-text-sm x-font-bold x-gap-4 x-items-center x-mb-8;\n}\n.x-ai-overview-title-icon {\n @apply x-icon x-text-[var(--color)];\n}\n\n.x-ai-overview-loading-content {\n @apply x-flex x-w-full x-flex-col x-gap-4 x-animate-pulse;\n}\n.x-ai-overview-loading-content > span:first-child {\n @apply x-h-16 x-w-full x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(2) {\n @apply x-h-16 x-w-3/4 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color-lightest)] x-to-100% x-to-[var(--color)] x-opacity-50;\n}\n.x-ai-overview-loading-content > span:nth-child(3) {\n @apply x-h-16 x-w-11/12 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)];\n}\n.x-ai-overview-loading-content > span:nth-child(4) {\n @apply x-h-16 x-w-1/2 x-rounded-full x-bg-gradient-to-r x-from-0% x-from-[var(--color)] x-to-100% x-to-[var(--color-lightest)] x-opacity-75;\n}\n\n.x-ai-overview-content {\n @apply x-flex x-flex-col x-text-left x-leading-5 x-gap-2;\n}\n.x-ai-overview-content span {\n @apply x-font-medium;\n}\n\n.x-ai-overview-gradient {\n @apply x-cursor-pointer x-content-none x-absolute x-w-full x-h-80 x-bottom-5 x-bg-gradient-to-b x-from-0% x-from-transparent x-to-100% x-to-[var(--color-lighter)];\n}\n\n.x-ai-overview-toggle-wrapper {\n @apply x-flex x-relative x-z-[1];\n}\n.x-ai-overview-toggle-btn {\n @apply x-button x-button-outlined x-rounded-full x-w-full;\n}\n.x-ai-overview-toggle-btn-icon {\n @apply x-icon x-transition-all x-duration-300;\n}\n.x-ai-overview-toggle-btn-icon-expanded {\n @apply x-rotate-0;\n}\n.x-ai-overview-toggle-btn-icon-collapsed {\n @apply x-rotate-180;\n}\n.x-ai-overview-suggestion-query-btn {\n @apply x-button-tight x-mx-16 x-font-bold x-text-gray-900 x-w-fit x-min-h-fit x-flex x-gap-16 x-items-center;\n}\n.x-ai-overview-suggestion-query-btn-icon {\n @apply x-icon-md;\n}\n.x-ai-overview-suggestions {\n @apply x-flex x-flex-col x-gap-16 x-pb-16;\n}\n.x-ai-overview-suggestion {\n @apply x-flex x-flex-col x-gap-8;\n}\n.x-ai-overview-suggestion-results {\n @apply x-flex x-gap-16 x-px-16;\n}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,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,eAAe;QACf,cAAc;QACd,YAAY;QACZ,IAAI;QACJ,YAAY;AACb,KAAA;AACD,IAAA,KAAK,EAAE;AACL;;;;AAIE;AACF,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,qBAAqB;AAC/B,SAAA;AACD;;;;AAIE;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,4BAA4B;AACtC,SAAA;AACD;;;;AAIE;AACF,QAAA,UAAU,EAAE;AACV,YAAA,IAA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AgB;SAClB,CAAA;KACD;AACF,CAAA,CAAA;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import injectCss from '../../../../tools/inject-css.js';
|
|
2
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));--color-lightest:var(\n --x-ai-overview-color-lightest,color-mix(in srgb,var(--color) 75%,#fff)\n );background-color:var(--color-lighter);border-radius:1.5rem;position:relative}.x-ai-overview-main{border-radius:.5rem;padding:16px}.x-ai-overview-title-loading{align-items:center;display:flex;gap:.375rem;margin-bottom:8px}.x-ai-overview-title-loading-indicator{animation:x-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:x-pulse 2s cubic-bezier(.4,0,.6,1) infinite;font-size:12px}.x-ai-overview-title{align-items:center;display:flex;font-size:14px;font-weight:700;gap:4px;margin-bottom:8px}.x-ai-overview-title-icon{vector-effect:non-scaling-stroke;--enableIconOffset:var(--OFF);--fontSize:14px;align-items:center;aspect-ratio:1/1;color:var(--color);display:flex;flex:0 0 auto;font-family:font-awesome;font-size:var(--enableIconOffset) var(--fontSize);height:16px;justify-content:center;margin-top:var(--enableIconOffset,calc(var(--iconVerticalOffset)*-1));transform:var(--enableIconOffset,translateY(var(--iconVerticalOffset,0)));width:auto}.x-ai-overview-loading-content{display:flex;width:100%}@keyframes x-pulse{50%{opacity:.5}}.x-ai-overview-loading-content{animation:x-pulse 2s cubic-bezier(.4,0,.6,1) infinite;flex-direction:column;gap:4px}.x-ai-overview-loading-content>span:first-child{--tw-gradient-from:var(--color) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lightest) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px;width:100%}.x-ai-overview-loading-content>span:nth-child(2){--tw-gradient-from:var(--color-lightest) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px;opacity:.5;width:75%}.x-ai-overview-loading-content>span:nth-child(3){width:91.666667%}.x-ai-overview-loading-content>span:nth-child(3),.x-ai-overview-loading-content>span:nth-child(4){--tw-gradient-from:var(--color) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lightest) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px}.x-ai-overview-loading-content>span:nth-child(4){opacity:.75;width:50%}.x-ai-overview-content{display:flex;flex-direction:column;gap:2px;line-height:1.25rem;text-align:left}.x-ai-overview-content span{font-weight:500}.x-ai-overview-gradient{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lighter) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;--tw-content:none;background-image:linear-gradient(to bottom,var(--tw-gradient-stops));bottom:1.25rem;content:var(--tw-content);cursor:pointer;height:80px;position:absolute;width:100%}.x-ai-overview-
|
|
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));--color-lightest:var(\n --x-ai-overview-color-lightest,color-mix(in srgb,var(--color) 75%,#fff)\n );background-color:var(--color-lighter);border-radius:1.5rem;position:relative}.x-ai-overview-main{border-radius:.5rem;padding:16px}.x-ai-overview-title-loading{align-items:center;display:flex;gap:.375rem;margin-bottom:8px}.x-ai-overview-title-loading-indicator{animation:x-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:x-pulse 2s cubic-bezier(.4,0,.6,1) infinite;font-size:12px}.x-ai-overview-title{align-items:center;display:flex;font-size:14px;font-weight:700;gap:4px;margin-bottom:8px}.x-ai-overview-title-icon{vector-effect:non-scaling-stroke;--enableIconOffset:var(--OFF);--fontSize:14px;align-items:center;aspect-ratio:1/1;color:var(--color);display:flex;flex:0 0 auto;font-family:font-awesome;font-size:var(--enableIconOffset) var(--fontSize);height:16px;justify-content:center;margin-top:var(--enableIconOffset,calc(var(--iconVerticalOffset)*-1));transform:var(--enableIconOffset,translateY(var(--iconVerticalOffset,0)));width:auto}.x-ai-overview-loading-content{display:flex;width:100%}@keyframes x-pulse{50%{opacity:.5}}.x-ai-overview-loading-content{animation:x-pulse 2s cubic-bezier(.4,0,.6,1) infinite;flex-direction:column;gap:4px}.x-ai-overview-loading-content>span:first-child{--tw-gradient-from:var(--color) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lightest) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px;width:100%}.x-ai-overview-loading-content>span:nth-child(2){--tw-gradient-from:var(--color-lightest) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px;opacity:.5;width:75%}.x-ai-overview-loading-content>span:nth-child(3){width:91.666667%}.x-ai-overview-loading-content>span:nth-child(3),.x-ai-overview-loading-content>span:nth-child(4){--tw-gradient-from:var(--color) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lightest) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));border-radius:9999px;height:16px}.x-ai-overview-loading-content>span:nth-child(4){opacity:.75;width:50%}.x-ai-overview-content{display:flex;flex-direction:column;gap:2px;line-height:1.25rem;text-align:left}.x-ai-overview-content span{font-weight:500}.x-ai-overview-gradient{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to);--tw-gradient-from-position:0%;--tw-gradient-to:var(--color-lighter) var(--tw-gradient-to-position);--tw-gradient-to-position:100%;--tw-content:none;background-image:linear-gradient(to bottom,var(--tw-gradient-stops));bottom:1.25rem;content:var(--tw-content);cursor:pointer;height:80px;position:absolute;width:100%}.x-ai-overview-toggle-wrapper{display:flex;position:relative;z-index:1}.x-ai-overview-toggle-btn{align-content:center;align-items:center;background-color:var(--button-color-50,#283034);border-style:solid;border-width:1px;box-sizing:border-box;color:#fff;cursor:pointer;display:flex;flex-flow:row nowrap;font-family:Inter,sans-serif;font-weight:700;justify-content:center;letter-spacing:0;line-height:1.4}.x-ai-overview-toggle-btn:active,.x-ai-overview-toggle-btn:hover{background-color:var(--button-color-75,#000);border-color:var(--button-color-75,#000)}[dir=ltr] .x-ai-overview-toggle-btn{padding-left:16px}[dir=ltr] .x-ai-overview-toggle-btn,[dir=rtl] .x-ai-overview-toggle-btn{padding-right:16px}[dir=rtl] .x-ai-overview-toggle-btn{padding-left:16px}.x-ai-overview-toggle-btn{font-size:14px;gap:8px;min-height:40px}.x-ai-overview-toggle-btn.x-selected{background-color:var(--button-color-75,#000);border-color:var(--button-color-75,#000)}.x-ai-overview-toggle-btn.x-selected:active,.x-ai-overview-toggle-btn.x-selected:hover{background-color:var(--button-color-50,#283034);border-color:var(--button-color-50,#283034)}.x-ai-overview-toggle-btn{--button-disabled-border-color:#dbe2e5;background-color:#fff;border-color:var(--button-color-50,#283034);color:var(--button-color-50,#283034)}.x-ai-overview-toggle-btn.x-selected,.x-ai-overview-toggle-btn:active,.x-ai-overview-toggle-btn:hover{background-color:var(--button-color-50,#283034);border-color:var(--button-color-50,#283034);color:#fff}.x-ai-overview-toggle-btn.x-selected:active,.x-ai-overview-toggle-btn.x-selected:hover{background-color:#fff;color:var(--button-color-50,#283034)}.x-ai-overview-toggle-btn:disabled{cursor:not-allowed}.x-ai-overview-toggle-btn:disabled,.x-ai-overview-toggle-btn:disabled.x-selected{background-color:var(--button-disabled-background-color,#eef1f2);border-color:var(--button-disabled-border-color,#eef1f2);color:#dbe2e5}.x-button-group:not([class*=gap])>.x-ai-overview-toggle-btn+.x-button{border-left:unset}.x-ai-overview-toggle-btn{border-radius:9999px;width:100%}.x-ai-overview-toggle-btn-icon{vector-effect:non-scaling-stroke;--enableIconOffset:var(--OFF);--fontSize:14px;align-items:center;aspect-ratio:1/1;display:flex;flex:0 0 auto;font-family:font-awesome;font-size:var(--enableIconOffset) var(--fontSize);height:16px;justify-content:center;margin-top:var(--enableIconOffset,calc(var(--iconVerticalOffset)*-1));transform:var(--enableIconOffset,translateY(var(--iconVerticalOffset,0)));transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:auto}.x-ai-overview-toggle-btn-icon-expanded{--tw-rotate:0deg}.x-ai-overview-toggle-btn-icon-collapsed,.x-ai-overview-toggle-btn-icon-expanded{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.x-ai-overview-toggle-btn-icon-collapsed{--tw-rotate:180deg}.x-ai-overview-suggestion-query-btn{--button-disabled-border-color:transparent;--button-disabled-background-color:transparent;background-color:transparent;border-color:transparent;color:var(--button-color-50,#283034)}.x-ai-overview-suggestion-query-btn:active,.x-ai-overview-suggestion-query-btn:hover{background-color:transparent;border-color:transparent;color:var(--button-color-75,#000)}[dir=ltr] .x-ai-overview-suggestion-query-btn{padding-left:0}[dir=ltr] .x-ai-overview-suggestion-query-btn,[dir=rtl] .x-ai-overview-suggestion-query-btn{padding-right:0}[dir=rtl] .x-ai-overview-suggestion-query-btn{padding-left:0}.x-ai-overview-suggestion-query-btn.x-selected{background-color:transparent;border-color:transparent;color:var(--button-color-75,#000)}.x-ai-overview-suggestion-query-btn.x-selected:active,.x-ai-overview-suggestion-query-btn.x-selected:hover{background-color:transparent;border-color:transparent;color:var(--button-color-50,#283034)}.x-ai-overview-suggestion-query-btn{--tw-text-opacity:1;align-items:center;color:rgb(17 24 39/var(--tw-text-opacity));display:flex;font-weight:700;gap:16px;margin-left:16px;margin-right:16px;min-height:fit-content;width:fit-content}.x-ai-overview-suggestion-query-btn-icon{--fontSize:14px;height:16px}.x-ai-overview-suggestions{display:flex;flex-direction:column;gap:16px;padding-bottom:16px}.x-ai-overview-suggestion{display:flex;flex-direction:column;gap:8px}.x-ai-overview-suggestion-results{display:flex;gap:16px;padding-left:16px;padding-right:16px}";
|
|
4
4
|
injectCss(css);
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
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.138",
|
|
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.32",
|
|
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.25",
|
|
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": "fa64b8c62b318fcdc5c6468f06415332acde0db0"
|
|
146
146
|
}
|
|
@@ -3504,6 +3504,33 @@
|
|
|
3504
3504
|
"name": "PlatformAiSuggestionSearch",
|
|
3505
3505
|
"preserveMemberOrder": false,
|
|
3506
3506
|
"members": [
|
|
3507
|
+
{
|
|
3508
|
+
"kind": "PropertySignature",
|
|
3509
|
+
"canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearch#numFound:member",
|
|
3510
|
+
"docComment": "",
|
|
3511
|
+
"excerptTokens": [
|
|
3512
|
+
{
|
|
3513
|
+
"kind": "Content",
|
|
3514
|
+
"text": "numFound: "
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"kind": "Content",
|
|
3518
|
+
"text": "number"
|
|
3519
|
+
},
|
|
3520
|
+
{
|
|
3521
|
+
"kind": "Content",
|
|
3522
|
+
"text": ";"
|
|
3523
|
+
}
|
|
3524
|
+
],
|
|
3525
|
+
"isReadonly": false,
|
|
3526
|
+
"isOptional": false,
|
|
3527
|
+
"releaseTag": "Public",
|
|
3528
|
+
"name": "numFound",
|
|
3529
|
+
"propertyTypeTokenRange": {
|
|
3530
|
+
"startIndex": 1,
|
|
3531
|
+
"endIndex": 2
|
|
3532
|
+
}
|
|
3533
|
+
},
|
|
3507
3534
|
{
|
|
3508
3535
|
"kind": "PropertySignature",
|
|
3509
3536
|
"canonicalReference": "@empathyco/x-adapter-platform!PlatformAiSuggestionSearch#query:member",
|
|
@@ -3736,7 +3763,7 @@
|
|
|
3736
3763
|
},
|
|
3737
3764
|
{
|
|
3738
3765
|
"kind": "Content",
|
|
3739
|
-
"text": "[];\n }[]"
|
|
3766
|
+
"text": "[];\n numFound: number;\n }[]"
|
|
3740
3767
|
},
|
|
3741
3768
|
{
|
|
3742
3769
|
"kind": "Content",
|
|
@@ -1505,7 +1505,7 @@
|
|
|
1505
1505
|
},
|
|
1506
1506
|
{
|
|
1507
1507
|
"kind": "Content",
|
|
1508
|
-
"text": "<string>;\n default: string;\n };\n
|
|
1508
|
+
"text": "<string>;\n default: string;\n };\n expandText: {\n type: "
|
|
1509
1509
|
},
|
|
1510
1510
|
{
|
|
1511
1511
|
"kind": "Reference",
|
|
@@ -1514,7 +1514,25 @@
|
|
|
1514
1514
|
},
|
|
1515
1515
|
{
|
|
1516
1516
|
"kind": "Content",
|
|
1517
|
-
"text": "<string>;\n default: string;\n };\n
|
|
1517
|
+
"text": "<string>;\n default: string;\n };\n collapseText: {\n type: "
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"kind": "Reference",
|
|
1521
|
+
"text": "PropType",
|
|
1522
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"kind": "Content",
|
|
1526
|
+
"text": "<string>;\n default: string;\n };\n}, {\n buttonText: import(\"vue\")."
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"kind": "Reference",
|
|
1530
|
+
"text": "ComputedRef",
|
|
1531
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"kind": "Content",
|
|
1535
|
+
"text": "<string>;\n expanded: import(\"vue\")."
|
|
1518
1536
|
},
|
|
1519
1537
|
{
|
|
1520
1538
|
"kind": "Reference",
|
|
@@ -1523,7 +1541,7 @@
|
|
|
1523
1541
|
},
|
|
1524
1542
|
{
|
|
1525
1543
|
"kind": "Content",
|
|
1526
|
-
"text": "<boolean>;\n
|
|
1544
|
+
"text": "<boolean>;\n queries: import(\"vue\")."
|
|
1527
1545
|
},
|
|
1528
1546
|
{
|
|
1529
1547
|
"kind": "Reference",
|
|
@@ -1532,7 +1550,16 @@
|
|
|
1532
1550
|
},
|
|
1533
1551
|
{
|
|
1534
1552
|
"kind": "Content",
|
|
1535
|
-
"text": "<
|
|
1553
|
+
"text": "<import(\"@empathyco/x-types\")."
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"kind": "Reference",
|
|
1557
|
+
"text": "AiSuggestionQuery",
|
|
1558
|
+
"canonicalReference": "@empathyco/x-components!AiSuggestionQuery:interface"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"kind": "Content",
|
|
1562
|
+
"text": "[]>;\n responseText: import(\"vue\")."
|
|
1536
1563
|
},
|
|
1537
1564
|
{
|
|
1538
1565
|
"kind": "Reference",
|
|
@@ -1541,7 +1568,7 @@
|
|
|
1541
1568
|
},
|
|
1542
1569
|
{
|
|
1543
1570
|
"kind": "Content",
|
|
1544
|
-
"text": "<string>;\n
|
|
1571
|
+
"text": "<string>;\n suggestionsLoading: import(\"vue\")."
|
|
1545
1572
|
},
|
|
1546
1573
|
{
|
|
1547
1574
|
"kind": "Reference",
|
|
@@ -1550,7 +1577,25 @@
|
|
|
1550
1577
|
},
|
|
1551
1578
|
{
|
|
1552
1579
|
"kind": "Content",
|
|
1553
|
-
"text": "<import(\"
|
|
1580
|
+
"text": "<boolean>;\n queriesResults: import(\"vue\")."
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
"kind": "Reference",
|
|
1584
|
+
"text": "ComputedRef",
|
|
1585
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"kind": "Content",
|
|
1589
|
+
"text": "<"
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
"kind": "Reference",
|
|
1593
|
+
"text": "Record",
|
|
1594
|
+
"canonicalReference": "!Record:type"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
"kind": "Content",
|
|
1598
|
+
"text": "<string, {\n results: "
|
|
1554
1599
|
},
|
|
1555
1600
|
{
|
|
1556
1601
|
"kind": "Reference",
|
|
@@ -1559,7 +1604,7 @@
|
|
|
1559
1604
|
},
|
|
1560
1605
|
{
|
|
1561
1606
|
"kind": "Content",
|
|
1562
|
-
"text": "[]
|
|
1607
|
+
"text": "[\"results\"];\n numFound: number;\n }>>;\n suggestionsSearch: import(\"vue\")."
|
|
1563
1608
|
},
|
|
1564
1609
|
{
|
|
1565
1610
|
"kind": "Reference",
|
|
@@ -1568,7 +1613,25 @@
|
|
|
1568
1613
|
},
|
|
1569
1614
|
{
|
|
1570
1615
|
"kind": "Content",
|
|
1571
|
-
"text": "<
|
|
1616
|
+
"text": "<"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"kind": "Reference",
|
|
1620
|
+
"text": "AiSuggestionSearch",
|
|
1621
|
+
"canonicalReference": "@empathyco/x-components!AiSuggestionSearch:interface"
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
"kind": "Content",
|
|
1625
|
+
"text": "[]>;\n suggestionText: import(\"vue\")."
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"kind": "Reference",
|
|
1629
|
+
"text": "ComputedRef",
|
|
1630
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
"kind": "Content",
|
|
1634
|
+
"text": "<string>;\n toggleVisibility: () => void;\n}, unknown, {}, {}, import(\"vue\")."
|
|
1572
1635
|
},
|
|
1573
1636
|
{
|
|
1574
1637
|
"kind": "Reference",
|
|
@@ -1631,7 +1694,7 @@
|
|
|
1631
1694
|
},
|
|
1632
1695
|
{
|
|
1633
1696
|
"kind": "Content",
|
|
1634
|
-
"text": "<string>;\n default: string;\n };\n
|
|
1697
|
+
"text": "<string>;\n default: string;\n };\n expandText: {\n type: "
|
|
1635
1698
|
},
|
|
1636
1699
|
{
|
|
1637
1700
|
"kind": "Reference",
|
|
@@ -1640,7 +1703,16 @@
|
|
|
1640
1703
|
},
|
|
1641
1704
|
{
|
|
1642
1705
|
"kind": "Content",
|
|
1643
|
-
"text": "<string>;\n default: string;\n };\n
|
|
1706
|
+
"text": "<string>;\n default: string;\n };\n collapseText: {\n type: "
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"kind": "Reference",
|
|
1710
|
+
"text": "PropType",
|
|
1711
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"kind": "Content",
|
|
1715
|
+
"text": "<string>;\n default: string;\n };\n}>>, {\n title: string;\n titleLoading: string;\n expandText: string;\n collapseText: string;\n}, {}>"
|
|
1644
1716
|
}
|
|
1645
1717
|
],
|
|
1646
1718
|
"fileUrlPath": "dist/types/x-modules/ai/components/ai-overview.vue.d.ts",
|
|
@@ -1649,7 +1721,7 @@
|
|
|
1649
1721
|
"name": "AiOverview",
|
|
1650
1722
|
"variableTypeTokenRange": {
|
|
1651
1723
|
"startIndex": 1,
|
|
1652
|
-
"endIndex":
|
|
1724
|
+
"endIndex": 54
|
|
1653
1725
|
}
|
|
1654
1726
|
},
|
|
1655
1727
|
{
|
|
@@ -225,17 +225,27 @@ titleLoading: {
|
|
|
225
225
|
type: PropType<string>;
|
|
226
226
|
default: string;
|
|
227
227
|
};
|
|
228
|
-
|
|
228
|
+
expandText: {
|
|
229
|
+
type: PropType<string>;
|
|
230
|
+
default: string;
|
|
231
|
+
};
|
|
232
|
+
collapseText: {
|
|
229
233
|
type: PropType<string>;
|
|
230
234
|
default: string;
|
|
231
235
|
};
|
|
232
236
|
}, {
|
|
233
|
-
|
|
237
|
+
buttonText: ComputedRef<string>;
|
|
234
238
|
expanded: Ref<boolean>;
|
|
239
|
+
queries: ComputedRef<AiSuggestionQuery[]>;
|
|
235
240
|
responseText: ComputedRef<string>;
|
|
236
|
-
suggestionText: ComputedRef<string>;
|
|
237
|
-
suggestionsSearch: ComputedRef<AiSuggestionSearch[]>;
|
|
238
241
|
suggestionsLoading: ComputedRef<boolean>;
|
|
242
|
+
queriesResults: ComputedRef<Record<string, {
|
|
243
|
+
results: AiSuggestionSearch["results"];
|
|
244
|
+
numFound: number;
|
|
245
|
+
}>>;
|
|
246
|
+
suggestionsSearch: ComputedRef<AiSuggestionSearch[]>;
|
|
247
|
+
suggestionText: ComputedRef<string>;
|
|
248
|
+
toggleVisibility: () => void;
|
|
239
249
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
240
250
|
title: {
|
|
241
251
|
type: PropType<string>;
|
|
@@ -245,14 +255,19 @@ titleLoading: {
|
|
|
245
255
|
type: PropType<string>;
|
|
246
256
|
default: string;
|
|
247
257
|
};
|
|
248
|
-
|
|
258
|
+
expandText: {
|
|
259
|
+
type: PropType<string>;
|
|
260
|
+
default: string;
|
|
261
|
+
};
|
|
262
|
+
collapseText: {
|
|
249
263
|
type: PropType<string>;
|
|
250
264
|
default: string;
|
|
251
265
|
};
|
|
252
266
|
}>>, {
|
|
253
267
|
title: string;
|
|
254
268
|
titleLoading: string;
|
|
255
|
-
|
|
269
|
+
expandText: string;
|
|
270
|
+
collapseText: string;
|
|
256
271
|
}, {}>;
|
|
257
272
|
|
|
258
273
|
export { AIStarIcon }
|
package/report/x-types.api.json
CHANGED
|
@@ -737,6 +737,33 @@
|
|
|
737
737
|
"name": "AiSuggestionSearch",
|
|
738
738
|
"preserveMemberOrder": false,
|
|
739
739
|
"members": [
|
|
740
|
+
{
|
|
741
|
+
"kind": "PropertySignature",
|
|
742
|
+
"canonicalReference": "@empathyco/x-types!AiSuggestionSearch#numFound:member",
|
|
743
|
+
"docComment": "",
|
|
744
|
+
"excerptTokens": [
|
|
745
|
+
{
|
|
746
|
+
"kind": "Content",
|
|
747
|
+
"text": "numFound: "
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"kind": "Content",
|
|
751
|
+
"text": "number"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"kind": "Content",
|
|
755
|
+
"text": ";"
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
"isReadonly": false,
|
|
759
|
+
"isOptional": false,
|
|
760
|
+
"releaseTag": "Public",
|
|
761
|
+
"name": "numFound",
|
|
762
|
+
"propertyTypeTokenRange": {
|
|
763
|
+
"startIndex": 1,
|
|
764
|
+
"endIndex": 2
|
|
765
|
+
}
|
|
766
|
+
},
|
|
740
767
|
{
|
|
741
768
|
"kind": "PropertySignature",
|
|
742
769
|
"canonicalReference": "@empathyco/x-types!AiSuggestionSearch#query:member",
|
|
@@ -941,18 +968,14 @@
|
|
|
941
968
|
"kind": "Content",
|
|
942
969
|
"text": "suggestions: "
|
|
943
970
|
},
|
|
944
|
-
{
|
|
945
|
-
"kind": "Content",
|
|
946
|
-
"text": "{\n query: string;\n results: "
|
|
947
|
-
},
|
|
948
971
|
{
|
|
949
972
|
"kind": "Reference",
|
|
950
|
-
"text": "
|
|
951
|
-
"canonicalReference": "@empathyco/x-types!
|
|
973
|
+
"text": "AiSuggestionSearch",
|
|
974
|
+
"canonicalReference": "@empathyco/x-types!AiSuggestionSearch:interface"
|
|
952
975
|
},
|
|
953
976
|
{
|
|
954
977
|
"kind": "Content",
|
|
955
|
-
"text": "[]
|
|
978
|
+
"text": "[]"
|
|
956
979
|
},
|
|
957
980
|
{
|
|
958
981
|
"kind": "Content",
|
|
@@ -965,7 +988,7 @@
|
|
|
965
988
|
"name": "suggestions",
|
|
966
989
|
"propertyTypeTokenRange": {
|
|
967
990
|
"startIndex": 1,
|
|
968
|
-
"endIndex":
|
|
991
|
+
"endIndex": 3
|
|
969
992
|
}
|
|
970
993
|
}
|
|
971
994
|
],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AiSuggestionSearch } from '@empathyco/x-types';
|
|
1
2
|
import type { PropType } from 'vue';
|
|
2
3
|
declare const _default: import("vue").DefineComponent<{
|
|
3
4
|
/**
|
|
@@ -19,21 +20,36 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
20
|
default: string;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
|
-
* The text displayed on the
|
|
23
|
+
* The text displayed on the toggle button when collapsed.
|
|
23
24
|
*
|
|
24
25
|
* @public
|
|
25
26
|
*/
|
|
26
|
-
|
|
27
|
+
expandText: {
|
|
28
|
+
type: PropType<string>;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The text displayed on the toggle button when expanded.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
collapseText: {
|
|
27
37
|
type: PropType<string>;
|
|
28
38
|
default: string;
|
|
29
39
|
};
|
|
30
40
|
}, {
|
|
31
|
-
|
|
41
|
+
buttonText: import("vue").ComputedRef<string>;
|
|
32
42
|
expanded: import("vue").Ref<boolean>;
|
|
43
|
+
queries: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionQuery[]>;
|
|
33
44
|
responseText: import("vue").ComputedRef<string>;
|
|
34
|
-
suggestionText: import("vue").ComputedRef<string>;
|
|
35
|
-
suggestionsSearch: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionSearch[]>;
|
|
36
45
|
suggestionsLoading: import("vue").ComputedRef<boolean>;
|
|
46
|
+
queriesResults: import("vue").ComputedRef<Record<string, {
|
|
47
|
+
results: AiSuggestionSearch["results"];
|
|
48
|
+
numFound: number;
|
|
49
|
+
}>>;
|
|
50
|
+
suggestionsSearch: import("vue").ComputedRef<AiSuggestionSearch[]>;
|
|
51
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
52
|
+
toggleVisibility: () => void;
|
|
37
53
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
54
|
/**
|
|
39
55
|
* The text displayed when the question ended loading
|
|
@@ -54,18 +70,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
70
|
default: string;
|
|
55
71
|
};
|
|
56
72
|
/**
|
|
57
|
-
* The text displayed on the
|
|
73
|
+
* The text displayed on the toggle button when collapsed.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
expandText: {
|
|
78
|
+
type: PropType<string>;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* The text displayed on the toggle button when expanded.
|
|
58
83
|
*
|
|
59
84
|
* @public
|
|
60
85
|
*/
|
|
61
|
-
|
|
86
|
+
collapseText: {
|
|
62
87
|
type: PropType<string>;
|
|
63
88
|
default: string;
|
|
64
89
|
};
|
|
65
90
|
}>>, {
|
|
66
91
|
title: string;
|
|
67
92
|
titleLoading: string;
|
|
68
|
-
|
|
93
|
+
expandText: string;
|
|
94
|
+
collapseText: string;
|
|
69
95
|
}, {}>;
|
|
70
96
|
export default _default;
|
|
71
97
|
//# sourceMappingURL=ai-overview.vue?vue&type=script&lang.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-overview.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;;IAgC/B;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"ai-overview.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;;IAgC/B;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;;iBAcG,kBAAkB,CAAC,SAAS,CAAC;kBAAY,MAAM;;;;;;IA/CpF;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;IAGlC;;;;OAIG;;cAEe,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;AAjDtC,wBA6FE"}
|
|
@@ -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;;;;;;;;;;;iCAoCg0Y,CAAC;sCAAqD,CAAC;8BAA6C,CAAC;;;;;;;;;;;;;IA7On9Y;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;;;;AAxCP,wBAiPE"}
|