@empathyco/x-components 6.0.0-alpha.133 → 6.0.0-alpha.135
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 +18 -0
- package/docs/API-reference/api/x-components.aigetters.md +0 -1
- package/docs/API-reference/api/x-components.aioverview.md +3 -3
- package/js/x-modules/ai/components/ai-overview.vue.js +180 -186
- package/js/x-modules/ai/components/ai-overview.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-overview.vue2.js +5 -5
- 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/js/x-modules/ai/store/module.js +0 -1
- package/js/x-modules/ai/store/module.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +11 -38
- package/report/x-components.api.md +3 -4
- package/types/x-modules/ai/components/ai-overview.vue.d.ts +3 -3
- package/types/x-modules/ai/store/module.d.ts.map +1 -1
- package/types/x-modules/ai/store/types.d.ts +0 -2
- package/types/x-modules/ai/store/types.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.aigetters.loading.md +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.135 (2025-09-04)
|
|
7
|
+
|
|
8
|
+
* feat(ai): color customization (#1863) ([2445441](https://github.com/empathyco/x/commit/2445441)), closes [#1863](https://github.com/empathyco/x/issues/1863)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.0.0-alpha.134 (2025-09-04)
|
|
15
|
+
|
|
16
|
+
* chore: minor adjustment ([ae27549](https://github.com/empathyco/x/commit/ae27549))
|
|
17
|
+
* chore(ai-store): remove unused getter ([1ea4ff3](https://github.com/empathyco/x/commit/1ea4ff3))
|
|
18
|
+
* feat(AiOverview): adjust style ([db7653f](https://github.com/empathyco/x/commit/db7653f))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 6.0.0-alpha.133 (2025-09-04)
|
|
7
25
|
|
|
8
26
|
* feat(AiOverview): component implementation (#1861) ([17b6535](https://github.com/empathyco/x/commit/17b6535)), closes [#1861](https://github.com/empathyco/x/issues/1861)
|
|
@@ -16,7 +16,6 @@ export interface AiGetters
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| [loading](./x-components.aigetters.loading.md) | | boolean | The combination of the suggestions stream loading and the suggestions search response loading. |
|
|
20
19
|
| [query](./x-components.aigetters.query.md) | | string | The combination of the query and the selected related tags. |
|
|
21
20
|
| [suggestionsRequest](./x-components.aigetters.suggestionsrequest.md) | | AiSuggestionsRequest \| null | Request object to retrieve the streaming response using the ai suggestions adapter, or null if there is no valid query to conform a valid request. |
|
|
22
21
|
| [suggestionsSearchRequest](./x-components.aigetters.suggestionssearchrequest.md) | | AiSuggestionsSearchRequest \| null | Request object to retrieve the suggestions search based on queries or null if there is no valid queries to conform a valid request. |
|
|
@@ -21,12 +21,12 @@ _default: import("vue").DefineComponent<{
|
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
}, {
|
|
24
|
-
expanded: import("vue").Ref<boolean>;
|
|
25
24
|
open: () => void;
|
|
26
|
-
|
|
27
|
-
suggestionText: import("vue").ComputedRef<string>;
|
|
25
|
+
expanded: import("vue").Ref<boolean>;
|
|
28
26
|
responseText: import("vue").ComputedRef<string>;
|
|
27
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
29
28
|
suggestionsSearch: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionSearch[]>;
|
|
29
|
+
suggestionsLoading: import("vue").ComputedRef<boolean>;
|
|
30
30
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
31
|
title: {
|
|
32
32
|
type: PropType<string>;
|
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
import _sfc_main from './ai-overview.vue2.js';
|
|
2
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock,
|
|
2
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, withDirectives, createTextVNode, toDisplayString, Fragment, renderList, createBlock, normalizeStyle, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
3
3
|
import './ai-overview.vue3.js';
|
|
4
4
|
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1 = { class: "x-ai-overview
|
|
7
|
-
const _hoisted_2 = {
|
|
6
|
+
const _hoisted_1 = { class: "x-ai-overview" };
|
|
7
|
+
const _hoisted_2 = { class: "x-ai-overview-main" };
|
|
8
|
+
const _hoisted_3 = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "x-ai-overview-title-loading",
|
|
10
11
|
"data-test": "ai-overview-title-loading"
|
|
11
12
|
};
|
|
12
|
-
const
|
|
13
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
|
|
13
14
|
"span",
|
|
14
15
|
{ class: "x-ai-overview-title-loading-indicator" },
|
|
15
16
|
null,
|
|
16
17
|
-1
|
|
17
18
|
/* HOISTED */
|
|
18
19
|
);
|
|
19
|
-
const
|
|
20
|
+
const _hoisted_5 = {
|
|
20
21
|
class: "x-ai-overview-title-loading-text",
|
|
21
22
|
"data-test": "ai-overview-title-loading-text"
|
|
22
23
|
};
|
|
23
|
-
const
|
|
24
|
+
const _hoisted_6 = {
|
|
24
25
|
key: 1,
|
|
25
26
|
class: "x-ai-overview-title",
|
|
26
27
|
"data-test": "ai-overview-title"
|
|
27
28
|
};
|
|
28
|
-
const
|
|
29
|
+
const _hoisted_7 = {
|
|
29
30
|
key: 0,
|
|
30
31
|
class: "x-ai-overview-loading-content",
|
|
31
32
|
"data-test": "ai-overview-loading-content"
|
|
32
33
|
};
|
|
33
|
-
const
|
|
34
|
+
const _hoisted_8 = {
|
|
34
35
|
key: 1,
|
|
35
36
|
class: "x-ai-overview-content",
|
|
36
37
|
"data-test": "ai-overview-content"
|
|
37
38
|
};
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
39
|
+
const _hoisted_9 = { "data-test": "ai-overview-suggestions-container" };
|
|
40
|
+
const _hoisted_10 = { class: "x-ai-overview-suggestions" };
|
|
41
|
+
const _hoisted_11 = { class: "x-ai-overview-suggestion-results" };
|
|
42
|
+
const _hoisted_12 = { class: "x-ai-overview-expand-wrapper" };
|
|
42
43
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
43
44
|
const _component_AIStarIcon = resolveComponent("AIStarIcon");
|
|
44
45
|
const _component_Fade = resolveComponent("Fade");
|
|
@@ -49,188 +50,181 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
49
50
|
const _component_CollapseHeight = resolveComponent("CollapseHeight");
|
|
50
51
|
const _component_ChevronDownIcon = resolveComponent("ChevronDownIcon");
|
|
51
52
|
const _directive_typing = resolveDirective("typing");
|
|
52
|
-
return openBlock(), createElementBlock(
|
|
53
|
-
"div",
|
|
54
|
-
|
|
55
|
-
class: normalizeClass(["x-ai-overview", { "x-ai-overview--expanded": _ctx.expanded, "x-ai-overview--loading": _ctx.loading }]),
|
|
56
|
-
"data-test": "ai-overview-container"
|
|
57
|
-
},
|
|
58
|
-
[
|
|
59
|
-
createElementVNode("div", _hoisted_1, [
|
|
60
|
-
createVNode(_component_Fade, { mode: "out-in" }, {
|
|
61
|
-
default: withCtx(() => [
|
|
62
|
-
_ctx.loading ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
63
|
-
_hoisted_3,
|
|
64
|
-
withDirectives(createElementVNode(
|
|
65
|
-
"span",
|
|
66
|
-
_hoisted_4,
|
|
67
|
-
null,
|
|
68
|
-
512
|
|
69
|
-
/* NEED_PATCH */
|
|
70
|
-
), [
|
|
71
|
-
[_directive_typing, { text: _ctx.titleLoading, speed: 50 }]
|
|
72
|
-
])
|
|
73
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_5, [
|
|
74
|
-
createVNode(_component_AIStarIcon, { class: "x-ai-overview-title-icon" }),
|
|
75
|
-
createTextVNode(
|
|
76
|
-
toDisplayString(_ctx.title),
|
|
77
|
-
1
|
|
78
|
-
/* TEXT */
|
|
79
|
-
)
|
|
80
|
-
]))
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
/* STABLE */
|
|
84
|
-
}),
|
|
85
|
-
createVNode(_component_ChangeHeight, null, {
|
|
86
|
-
default: withCtx(() => [
|
|
87
|
-
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
88
|
-
(openBlock(), createElementBlock(
|
|
89
|
-
Fragment,
|
|
90
|
-
null,
|
|
91
|
-
renderList(4, (i) => {
|
|
92
|
-
return createElementVNode("span", {
|
|
93
|
-
key: i,
|
|
94
|
-
"data-test": "ai-overview-loading-item"
|
|
95
|
-
});
|
|
96
|
-
}),
|
|
97
|
-
64
|
|
98
|
-
/* STABLE_FRAGMENT */
|
|
99
|
-
))
|
|
100
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
101
|
-
createElementVNode(
|
|
102
|
-
"span",
|
|
103
|
-
null,
|
|
104
|
-
toDisplayString(_ctx.suggestionText),
|
|
105
|
-
1
|
|
106
|
-
/* TEXT */
|
|
107
|
-
),
|
|
108
|
-
createElementVNode(
|
|
109
|
-
"p",
|
|
110
|
-
null,
|
|
111
|
-
toDisplayString(_ctx.responseText),
|
|
112
|
-
1
|
|
113
|
-
/* TEXT */
|
|
114
|
-
)
|
|
115
|
-
]))
|
|
116
|
-
]),
|
|
117
|
-
_: 1
|
|
118
|
-
/* STABLE */
|
|
119
|
-
})
|
|
120
|
-
]),
|
|
121
|
-
_ctx.suggestionsSearch.length ? (openBlock(), createBlock(_component_CollapseHeight, {
|
|
122
|
-
key: 0,
|
|
123
|
-
style: normalizeStyle({
|
|
124
|
-
"--x-collapse-height-transition-duration": `${300 * _ctx.suggestionsSearch.length}ms`
|
|
125
|
-
}),
|
|
126
|
-
"data-test": "ai-overview-collapse-height-suggestions"
|
|
127
|
-
}, {
|
|
53
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
54
|
+
createElementVNode("div", _hoisted_2, [
|
|
55
|
+
createVNode(_component_Fade, { mode: "out-in" }, {
|
|
128
56
|
default: withCtx(() => [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
57
|
+
_ctx.suggestionsLoading ? (openBlock(), createElementBlock("span", _hoisted_3, [
|
|
58
|
+
_hoisted_4,
|
|
59
|
+
withDirectives(createElementVNode(
|
|
60
|
+
"span",
|
|
61
|
+
_hoisted_5,
|
|
62
|
+
null,
|
|
63
|
+
512
|
|
64
|
+
/* NEED_PATCH */
|
|
65
|
+
), [
|
|
66
|
+
[_directive_typing, { text: _ctx.titleLoading, speed: 50 }]
|
|
67
|
+
])
|
|
68
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
69
|
+
createVNode(_component_AIStarIcon, { class: "x-ai-overview-title-icon" }),
|
|
70
|
+
createTextVNode(
|
|
71
|
+
toDisplayString(_ctx.title),
|
|
72
|
+
1
|
|
73
|
+
/* TEXT */
|
|
74
|
+
)
|
|
75
|
+
]))
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
/* STABLE */
|
|
79
|
+
}),
|
|
80
|
+
createVNode(_component_ChangeHeight, null, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
_ctx.suggestionsLoading ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
83
|
+
(openBlock(), createElementBlock(
|
|
84
|
+
Fragment,
|
|
85
|
+
null,
|
|
86
|
+
renderList(4, (i) => {
|
|
87
|
+
return createElementVNode("span", {
|
|
88
|
+
key: i,
|
|
89
|
+
"data-test": "ai-overview-loading-item"
|
|
90
|
+
});
|
|
91
|
+
}),
|
|
92
|
+
64
|
|
93
|
+
/* STABLE_FRAGMENT */
|
|
94
|
+
))
|
|
95
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
96
|
+
createElementVNode(
|
|
97
|
+
"span",
|
|
98
|
+
null,
|
|
99
|
+
toDisplayString(_ctx.suggestionText),
|
|
100
|
+
1
|
|
101
|
+
/* TEXT */
|
|
102
|
+
),
|
|
103
|
+
createElementVNode(
|
|
104
|
+
"p",
|
|
105
|
+
null,
|
|
106
|
+
toDisplayString(_ctx.responseText),
|
|
107
|
+
1
|
|
108
|
+
/* TEXT */
|
|
109
|
+
)
|
|
110
|
+
]))
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
/* STABLE */
|
|
114
|
+
})
|
|
115
|
+
]),
|
|
116
|
+
_ctx.suggestionsSearch.length ? (openBlock(), createBlock(_component_CollapseHeight, {
|
|
117
|
+
key: 0,
|
|
118
|
+
style: normalizeStyle({
|
|
119
|
+
"--x-collapse-height-transition-duration": `${300 * _ctx.suggestionsSearch.length}ms`
|
|
120
|
+
}),
|
|
121
|
+
"data-test": "ai-overview-collapse-height-suggestions"
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
withDirectives(createElementVNode(
|
|
125
|
+
"div",
|
|
126
|
+
_hoisted_9,
|
|
127
|
+
[
|
|
128
|
+
renderSlot(_ctx.$slots, "default", { suggestionsSearch: _ctx.suggestionsSearch }, () => [
|
|
129
|
+
createElementVNode("div", _hoisted_10, [
|
|
130
|
+
(openBlock(true), createElementBlock(
|
|
131
|
+
Fragment,
|
|
132
|
+
null,
|
|
133
|
+
renderList(_ctx.suggestionsSearch, ({ query, results }) => {
|
|
134
|
+
return openBlock(), createElementBlock("div", {
|
|
135
|
+
key: query,
|
|
136
|
+
class: "x-ai-overview-suggestion"
|
|
137
|
+
}, [
|
|
138
|
+
createVNode(_component_BaseEventButton, {
|
|
139
|
+
class: "x-ai-overview-suggestion-query-btn",
|
|
140
|
+
events: { UserAcceptedAQuery: query }
|
|
141
|
+
}, {
|
|
142
|
+
default: withCtx(() => [
|
|
143
|
+
createTextVNode(
|
|
144
|
+
toDisplayString(query),
|
|
145
|
+
1
|
|
146
|
+
/* TEXT */
|
|
147
|
+
),
|
|
148
|
+
createVNode(_component_ArrowRightIcon, { class: "x-ai-overview-suggestion-query-btn-icon" })
|
|
149
|
+
]),
|
|
150
|
+
_: 2
|
|
151
|
+
/* DYNAMIC */
|
|
152
|
+
}, 1032, ["events"]),
|
|
153
|
+
createVNode(
|
|
154
|
+
_component_SlidingPanel,
|
|
155
|
+
{ "reset-on-content-change": false },
|
|
156
|
+
{
|
|
147
157
|
default: withCtx(() => [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
158
|
+
createElementVNode("ul", _hoisted_11, [
|
|
159
|
+
(openBlock(true), createElementBlock(
|
|
160
|
+
Fragment,
|
|
161
|
+
null,
|
|
162
|
+
renderList(results, (result) => {
|
|
163
|
+
return openBlock(), createElementBlock("li", {
|
|
164
|
+
key: result.id,
|
|
165
|
+
"data-test": "ai-overview-suggestion-result"
|
|
166
|
+
}, [
|
|
167
|
+
renderSlot(_ctx.$slots, "result", { result })
|
|
168
|
+
]);
|
|
169
|
+
}),
|
|
170
|
+
128
|
|
171
|
+
/* KEYED_FRAGMENT */
|
|
172
|
+
))
|
|
173
|
+
])
|
|
154
174
|
]),
|
|
155
175
|
_: 2
|
|
156
176
|
/* DYNAMIC */
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
null,
|
|
167
|
-
renderList(results, (result) => {
|
|
168
|
-
return openBlock(), createElementBlock("li", {
|
|
169
|
-
key: result.id,
|
|
170
|
-
"data-test": "ai-overview-suggestion-result"
|
|
171
|
-
}, [
|
|
172
|
-
renderSlot(_ctx.$slots, "result", { result })
|
|
173
|
-
]);
|
|
174
|
-
}),
|
|
175
|
-
128
|
|
176
|
-
/* KEYED_FRAGMENT */
|
|
177
|
-
))
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
_: 2
|
|
181
|
-
/* DYNAMIC */
|
|
182
|
-
},
|
|
183
|
-
1024
|
|
184
|
-
/* DYNAMIC_SLOTS */
|
|
185
|
-
)
|
|
186
|
-
]);
|
|
187
|
-
}),
|
|
188
|
-
128
|
|
189
|
-
/* KEYED_FRAGMENT */
|
|
190
|
-
))
|
|
191
|
-
])
|
|
177
|
+
},
|
|
178
|
+
1024
|
|
179
|
+
/* DYNAMIC_SLOTS */
|
|
180
|
+
)
|
|
181
|
+
]);
|
|
182
|
+
}),
|
|
183
|
+
128
|
|
184
|
+
/* KEYED_FRAGMENT */
|
|
185
|
+
))
|
|
192
186
|
])
|
|
193
|
-
],
|
|
194
|
-
512
|
|
195
|
-
/* NEED_PATCH */
|
|
196
|
-
), [
|
|
197
|
-
[vShow, _ctx.expanded]
|
|
198
|
-
])
|
|
199
|
-
]),
|
|
200
|
-
_: 3
|
|
201
|
-
/* FORWARDED */
|
|
202
|
-
}, 8, ["style"])) : createCommentVNode("v-if", true),
|
|
203
|
-
!_ctx.loading && !_ctx.expanded ? (openBlock(), createElementBlock(
|
|
204
|
-
Fragment,
|
|
205
|
-
{ key: 1 },
|
|
206
|
-
[
|
|
207
|
-
createElementVNode("div", {
|
|
208
|
-
class: "x-ai-overview-gradient",
|
|
209
|
-
"data-test": "ai-overview-gradient",
|
|
210
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.open && _ctx.open(...args))
|
|
211
|
-
}),
|
|
212
|
-
createElementVNode("div", _hoisted_11, [
|
|
213
|
-
createElementVNode("button", {
|
|
214
|
-
class: "x-ai-overview-expand-btn",
|
|
215
|
-
"data-test": "ai-overview-expand-button",
|
|
216
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.open && _ctx.open(...args))
|
|
217
|
-
}, [
|
|
218
|
-
createTextVNode(
|
|
219
|
-
toDisplayString(_ctx.buttonText) + " ",
|
|
220
|
-
1
|
|
221
|
-
/* TEXT */
|
|
222
|
-
),
|
|
223
|
-
createVNode(_component_ChevronDownIcon, { class: "x-ai-overview-expand-btn-icon" })
|
|
224
187
|
])
|
|
188
|
+
],
|
|
189
|
+
512
|
|
190
|
+
/* NEED_PATCH */
|
|
191
|
+
), [
|
|
192
|
+
[vShow, _ctx.expanded]
|
|
193
|
+
])
|
|
194
|
+
]),
|
|
195
|
+
_: 3
|
|
196
|
+
/* FORWARDED */
|
|
197
|
+
}, 8, ["style"])) : createCommentVNode("v-if", true),
|
|
198
|
+
withDirectives(createElementVNode(
|
|
199
|
+
"div",
|
|
200
|
+
null,
|
|
201
|
+
[
|
|
202
|
+
createElementVNode("div", {
|
|
203
|
+
class: "x-ai-overview-gradient",
|
|
204
|
+
"data-test": "ai-overview-gradient",
|
|
205
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.open && _ctx.open(...args))
|
|
206
|
+
}),
|
|
207
|
+
createElementVNode("div", _hoisted_12, [
|
|
208
|
+
createElementVNode("button", {
|
|
209
|
+
class: "x-ai-overview-expand-btn",
|
|
210
|
+
"data-test": "ai-overview-expand-button",
|
|
211
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.open && _ctx.open(...args))
|
|
212
|
+
}, [
|
|
213
|
+
createTextVNode(
|
|
214
|
+
toDisplayString(_ctx.buttonText) + " ",
|
|
215
|
+
1
|
|
216
|
+
/* TEXT */
|
|
217
|
+
),
|
|
218
|
+
createVNode(_component_ChevronDownIcon, { class: "x-ai-overview-expand-btn-icon" })
|
|
225
219
|
])
|
|
226
|
-
]
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
);
|
|
220
|
+
])
|
|
221
|
+
],
|
|
222
|
+
512
|
|
223
|
+
/* NEED_PATCH */
|
|
224
|
+
), [
|
|
225
|
+
[vShow, _ctx.suggestionsSearch.length && !_ctx.expanded]
|
|
226
|
+
])
|
|
227
|
+
]);
|
|
234
228
|
}
|
|
235
229
|
var aiOverview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
236
230
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-overview.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div\n class=\"x-ai-overview\"\n :class=\"{ 'x-ai-overview--expanded': expanded, 'x-ai-overview--loading': loading }\"\n data-test=\"ai-overview-container\"\n >\n <div class=\"x-ai-overview-main\">\n <Fade mode=\"out-in\">\n <span\n v-if=\"loading\"\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=\"loading\"\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 <template v-if=\"!loading && !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 </template>\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, loading } = useGetter('ai')\n const { suggestionText, responseText, suggestionsSearch } = 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 expanded,\n open,\n loading,\n suggestionText,\n responseText,\n suggestionsSearch,\n }\n },\n})\n</script>\n<style lang=\"css\">\n.x-ai-overview {\n @apply x-relative x-rounded-lg x-bg-lead-25;\n}\n\n.x-ai-overview:not(.x-ai-overview--loading, .x-ai-overview--expanded) {\n @apply x-rounded-b-3xl;\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-lead-50;\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-lead-50;\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-lead-50 x-to-100% x-to-lead-75;\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-lead-75 x-to-100% x-to-lead-50 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-lead-50 x-to-100% x-to-lead-75;\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-lead-50 x-to-100% x-to-lead-75 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-lead-25;\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;\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","_normalizeClass","_createVNode","_withDirectives","_createTextVNode","_toDisplayString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,WAAA,CAAA,0BAAA,EAAA,EAAxC,OAAM,+BAA+B,EAAA,CAAA;AAAA,aAAA,CAAA;;;;;AAtFhE,OAAA,IAAAU,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,KAAA;;;;;;;;;"}
|
|
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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KAAA,EAAA;AAAA,UAAhF,KAAM,EAAA,wBAAA;AAAA,UAAyB,WAAU,EAAA,sBAAA;AAAA,UAAwB,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAA,IAAA,CAAA,IAAA,IAAA,IAAA,CAAA,IAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,SAAA,CAAA;AAC7E,QAAAA,kBAAA,CASM,OATN,WASM,EAAA;AAAA,UARJA,kBAOS,CAAA,QAAA,EAAA;AAAA,YANP,KAAM,EAAA,0BAAA;AAAA,YACN,WAAU,EAAA,2BAAA;AAAA,YACT,SAAK,MAAE,CAAA,CAAA,CAAA,KAAA,MAAA,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;;;;;;;"}
|
|
@@ -154,20 +154,20 @@ var _sfc_main = defineComponent({
|
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
setup() {
|
|
157
|
-
const { query
|
|
158
|
-
const { suggestionText, responseText, suggestionsSearch } = useState('ai');
|
|
157
|
+
const { query } = useGetter('ai');
|
|
158
|
+
const { suggestionText, responseText, suggestionsSearch, suggestionsLoading } = useState('ai');
|
|
159
159
|
const expanded = ref(false);
|
|
160
160
|
function open() {
|
|
161
161
|
expanded.value = true;
|
|
162
162
|
}
|
|
163
163
|
watch(query, () => (expanded.value = false));
|
|
164
164
|
return {
|
|
165
|
-
expanded,
|
|
166
165
|
open,
|
|
167
|
-
|
|
168
|
-
suggestionText,
|
|
166
|
+
expanded,
|
|
169
167
|
responseText,
|
|
168
|
+
suggestionText,
|
|
170
169
|
suggestionsSearch,
|
|
170
|
+
suggestionsLoading,
|
|
171
171
|
};
|
|
172
172
|
},
|
|
173
173
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-overview.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-overview.vue"],"sourcesContent":["<template>\n <div
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
import injectCss from '../../../../tools/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".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-expand-wrapper{display:flex;position:relative;z-index:1}.x-ai-overview-expand-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-expand-btn:active,.x-ai-overview-expand-btn:hover{background-color:var(--button-color-75,#000);border-color:var(--button-color-75,#000)}[dir=ltr] .x-ai-overview-expand-btn{padding-left:16px}[dir=ltr] .x-ai-overview-expand-btn,[dir=rtl] .x-ai-overview-expand-btn{padding-right:16px}[dir=rtl] .x-ai-overview-expand-btn{padding-left:16px}.x-ai-overview-expand-btn{font-size:14px;gap:8px;min-height:40px}.x-ai-overview-expand-btn.x-selected{background-color:var(--button-color-75,#000);border-color:var(--button-color-75,#000)}.x-ai-overview-expand-btn.x-selected:active,.x-ai-overview-expand-btn.x-selected:hover{background-color:var(--button-color-50,#283034);border-color:var(--button-color-50,#283034)}.x-ai-overview-expand-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-expand-btn.x-selected,.x-ai-overview-expand-btn:active,.x-ai-overview-expand-btn:hover{background-color:var(--button-color-50,#283034);border-color:var(--button-color-50,#283034);color:#fff}.x-ai-overview-expand-btn.x-selected:active,.x-ai-overview-expand-btn.x-selected:hover{background-color:#fff;color:var(--button-color-50,#283034)}.x-ai-overview-expand-btn:disabled{cursor:not-allowed}.x-ai-overview-expand-btn:disabled,.x-ai-overview-expand-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-expand-btn+.x-button{border-left:unset}.x-ai-overview-expand-btn{border-radius:9999px;width:100%}.x-ai-overview-expand-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)));width:auto}.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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch } from '@empathyco/x-types'\nimport type { QueryState } from '../../../store'\nimport type { AiXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiQuery as query,\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n query: '',\n config: {},\n params: {},\n relatedTags: [],\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/ai/store/module.ts"],"sourcesContent":["import type { AiSuggestionQuery, AiSuggestionSearch } from '@empathyco/x-types'\nimport type { QueryState } from '../../../store'\nimport type { AiXStoreModule } from './types'\nimport { mergeConfig, setConfig } from '../../../store/utils/config-store.utils'\nimport { fetchAndSaveAiSuggestionsSearch } from './actions/fetch-and-save-ai-suggestions-search.action'\nimport { fetchAndSaveAiSuggestions } from './actions/fetch-and-save-ai-suggestions.action'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport {\n aiQuery as query,\n aiSuggestionsRequest as suggestionsRequest,\n aiSuggestionsSearchRequest as suggestionsSearchRequest,\n} from './getters'\n/**\n * {@link XStoreModule} For the ai module.\n *\n * @internal\n */\nexport const aiXStoreModule: AiXStoreModule = {\n state: () => ({\n ...resettableAiState(),\n query: '',\n config: {},\n params: {},\n relatedTags: [],\n }),\n getters: {\n suggestionsRequest,\n suggestionsSearchRequest,\n query,\n },\n mutations: {\n /* Streamed fields */\n setResponseText: (state, responseText: string) => {\n state.responseText = state.responseText.concat(responseText)\n },\n setSuggestionText: (state, suggestionText: string) => {\n state.suggestionText = state.suggestionText.concat(suggestionText)\n },\n setQueries: (state, queries: AiSuggestionQuery[]) => {\n state.queries = state.queries.concat(queries)\n },\n setTaggings: (state, taggings) => {\n state.taggings = taggings\n },\n /* END Streamed fields */\n setSuggestionsSearch: (state, suggestionsSearch: AiSuggestionSearch[]) => {\n state.suggestionsSearch = suggestionsSearch\n },\n setSuggestionsLoading: (state, value) => {\n state.suggestionsLoading = value\n },\n setSuggestionsSearchLoading: (state, value) => {\n state.suggestionsSearchLoading = value\n },\n setConfig,\n mergeConfig,\n setQuery: (state: QueryState, query: string) => {\n state.query = query\n },\n setParams(state, params) {\n state.params = params\n },\n resetAiState(state) {\n Object.assign(state, resettableAiState())\n },\n setAiRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n },\n actions: {\n fetchAndSaveAiSuggestions,\n fetchAndSaveAiSuggestionsSearch,\n setUrlParams,\n },\n}\n\n/**\n * Function to return the \"resettable\" part of the state. This will be used in the `resetState`\n * mutation to reset to the initial state.\n *\n * @returns The \"resettable\" part of the {@link AiState}.\n *\n * @internal\n */\nfunction resettableAiState() {\n return {\n responseText: '',\n suggestionText: '',\n queries: [],\n taggings: [],\n suggestionsSearch: [],\n suggestionsLoading: false,\n suggestionsSearchLoading: false,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAYA;;;;AAIG;AACU,MAAA,cAAc,GAAmB;AAC5C,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,GAAG,iBAAiB,EAAE;AACtB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,WAAW,EAAE,EAAE;KAChB,CAAC;AACF,IAAA,OAAO,EAAE;QACP,kBAAkB;QAClB,wBAAwB;QACxB,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;;AAET,QAAA,eAAe,EAAE,CAAC,KAAK,EAAE,YAAoB,KAAI;YAC/C,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;SAC7D;AACD,QAAA,iBAAiB,EAAE,CAAC,KAAK,EAAE,cAAsB,KAAI;YACnD,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,CAA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,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,iBAAiB,EAAE,EAAE;AACrB,QAAA,kBAAkB,EAAE,KAAK;AACzB,QAAA,wBAAwB,EAAE,KAAK;KAChC,CAAA;AACH;;;;"}
|
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.135",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"access": "public",
|
|
143
143
|
"directory": "dist"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "3ad7a05674b7655ba544d16f0271857269bb727d"
|
|
146
146
|
}
|
|
@@ -1000,33 +1000,6 @@
|
|
|
1000
1000
|
"name": "AiGetters",
|
|
1001
1001
|
"preserveMemberOrder": false,
|
|
1002
1002
|
"members": [
|
|
1003
|
-
{
|
|
1004
|
-
"kind": "PropertySignature",
|
|
1005
|
-
"canonicalReference": "@empathyco/x-components!AiGetters#loading:member",
|
|
1006
|
-
"docComment": "/**\n * The combination of the suggestions stream loading and the suggestions search response loading.\n */\n",
|
|
1007
|
-
"excerptTokens": [
|
|
1008
|
-
{
|
|
1009
|
-
"kind": "Content",
|
|
1010
|
-
"text": "loading: "
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
"kind": "Content",
|
|
1014
|
-
"text": "boolean"
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
"kind": "Content",
|
|
1018
|
-
"text": ";"
|
|
1019
|
-
}
|
|
1020
|
-
],
|
|
1021
|
-
"isReadonly": false,
|
|
1022
|
-
"isOptional": false,
|
|
1023
|
-
"releaseTag": "Public",
|
|
1024
|
-
"name": "loading",
|
|
1025
|
-
"propertyTypeTokenRange": {
|
|
1026
|
-
"startIndex": 1,
|
|
1027
|
-
"endIndex": 2
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
1003
|
{
|
|
1031
1004
|
"kind": "PropertySignature",
|
|
1032
1005
|
"canonicalReference": "@empathyco/x-components!AiGetters#query:member",
|
|
@@ -1541,7 +1514,7 @@
|
|
|
1541
1514
|
},
|
|
1542
1515
|
{
|
|
1543
1516
|
"kind": "Content",
|
|
1544
|
-
"text": "<string>;\n default: string;\n };\n}, {\n expanded: import(\"vue\")."
|
|
1517
|
+
"text": "<string>;\n default: string;\n };\n}, {\n open: () => void;\n expanded: import(\"vue\")."
|
|
1545
1518
|
},
|
|
1546
1519
|
{
|
|
1547
1520
|
"kind": "Reference",
|
|
@@ -1550,7 +1523,7 @@
|
|
|
1550
1523
|
},
|
|
1551
1524
|
{
|
|
1552
1525
|
"kind": "Content",
|
|
1553
|
-
"text": "<boolean>;\n
|
|
1526
|
+
"text": "<boolean>;\n responseText: import(\"vue\")."
|
|
1554
1527
|
},
|
|
1555
1528
|
{
|
|
1556
1529
|
"kind": "Reference",
|
|
@@ -1559,7 +1532,7 @@
|
|
|
1559
1532
|
},
|
|
1560
1533
|
{
|
|
1561
1534
|
"kind": "Content",
|
|
1562
|
-
"text": "<
|
|
1535
|
+
"text": "<string>;\n suggestionText: import(\"vue\")."
|
|
1563
1536
|
},
|
|
1564
1537
|
{
|
|
1565
1538
|
"kind": "Reference",
|
|
@@ -1568,7 +1541,7 @@
|
|
|
1568
1541
|
},
|
|
1569
1542
|
{
|
|
1570
1543
|
"kind": "Content",
|
|
1571
|
-
"text": "<string>;\n
|
|
1544
|
+
"text": "<string>;\n suggestionsSearch: import(\"vue\")."
|
|
1572
1545
|
},
|
|
1573
1546
|
{
|
|
1574
1547
|
"kind": "Reference",
|
|
@@ -1577,25 +1550,25 @@
|
|
|
1577
1550
|
},
|
|
1578
1551
|
{
|
|
1579
1552
|
"kind": "Content",
|
|
1580
|
-
"text": "<
|
|
1553
|
+
"text": "<import(\"@empathyco/x-types\")."
|
|
1581
1554
|
},
|
|
1582
1555
|
{
|
|
1583
1556
|
"kind": "Reference",
|
|
1584
|
-
"text": "
|
|
1585
|
-
"canonicalReference": "@
|
|
1557
|
+
"text": "AiSuggestionSearch",
|
|
1558
|
+
"canonicalReference": "@empathyco/x-components!AiSuggestionSearch:interface"
|
|
1586
1559
|
},
|
|
1587
1560
|
{
|
|
1588
1561
|
"kind": "Content",
|
|
1589
|
-
"text": "
|
|
1562
|
+
"text": "[]>;\n suggestionsLoading: import(\"vue\")."
|
|
1590
1563
|
},
|
|
1591
1564
|
{
|
|
1592
1565
|
"kind": "Reference",
|
|
1593
|
-
"text": "
|
|
1594
|
-
"canonicalReference": "@
|
|
1566
|
+
"text": "ComputedRef",
|
|
1567
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
1595
1568
|
},
|
|
1596
1569
|
{
|
|
1597
1570
|
"kind": "Content",
|
|
1598
|
-
"text": "
|
|
1571
|
+
"text": "<boolean>;\n}, unknown, {}, {}, import(\"vue\")."
|
|
1599
1572
|
},
|
|
1600
1573
|
{
|
|
1601
1574
|
"kind": "Reference",
|
|
@@ -192,7 +192,6 @@ export const aiEmitters: {
|
|
|
192
192
|
|
|
193
193
|
// @public
|
|
194
194
|
export interface AiGetters {
|
|
195
|
-
loading: boolean;
|
|
196
195
|
query: string;
|
|
197
196
|
suggestionsRequest: AiSuggestionsRequest | null;
|
|
198
197
|
suggestionsSearchRequest: AiSuggestionsSearchRequest | null;
|
|
@@ -231,12 +230,12 @@ type: PropType<string>;
|
|
|
231
230
|
default: string;
|
|
232
231
|
};
|
|
233
232
|
}, {
|
|
234
|
-
expanded: Ref<boolean>;
|
|
235
233
|
open: () => void;
|
|
236
|
-
|
|
237
|
-
suggestionText: ComputedRef<string>;
|
|
234
|
+
expanded: Ref<boolean>;
|
|
238
235
|
responseText: ComputedRef<string>;
|
|
236
|
+
suggestionText: ComputedRef<string>;
|
|
239
237
|
suggestionsSearch: ComputedRef<AiSuggestionSearch[]>;
|
|
238
|
+
suggestionsLoading: ComputedRef<boolean>;
|
|
240
239
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
241
240
|
title: {
|
|
242
241
|
type: PropType<string>;
|
|
@@ -28,12 +28,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
30
|
}, {
|
|
31
|
-
expanded: import("vue").Ref<boolean>;
|
|
32
31
|
open: () => void;
|
|
33
|
-
|
|
34
|
-
suggestionText: import("vue").ComputedRef<string>;
|
|
32
|
+
expanded: import("vue").Ref<boolean>;
|
|
35
33
|
responseText: import("vue").ComputedRef<string>;
|
|
34
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
36
35
|
suggestionsSearch: import("vue").ComputedRef<import("@empathyco/x-types").AiSuggestionSearch[]>;
|
|
36
|
+
suggestionsLoading: import("vue").ComputedRef<boolean>;
|
|
37
37
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
38
|
/**
|
|
39
39
|
* The text displayed when the question ended loading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAU7C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAU7C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,cAyD5B,CAAA"}
|
|
@@ -44,8 +44,6 @@ export interface AiGetters {
|
|
|
44
44
|
suggestionsSearchRequest: AiSuggestionsSearchRequest | null;
|
|
45
45
|
/** The combination of the query and the selected related tags. */
|
|
46
46
|
query: string;
|
|
47
|
-
/** The combination of the suggestions stream loading and the suggestions search response loading. */
|
|
48
|
-
loading: boolean;
|
|
49
47
|
}
|
|
50
48
|
/**
|
|
51
49
|
* Ai module mutations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/ai/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,UAAU,EACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,CAAA;IAEjC,iDAAiD;IACjD,kBAAkB,EAAE,OAAO,CAAA;IAC3B,wDAAwD;IACxD,wBAAwB,EAAE,OAAO,CAAA;IAEjC,wEAAwE;IACxE,iBAAiB,EAAE,kBAAkB,EAAE,CAAA;IAGvC,MAAM,EAAE,QAAQ,CAAA;IAEhB,8CAA8C;IAC9C,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IACxB;;;;OAIG;IACH,yBAAyB,EAAE,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAA;IAEzE;;;;OAIG;IACH,+BAA+B,EAAE,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAA;IAErF;;;;OAIG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;CAC7C;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;AAErF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [AiGetters](./x-components.aigetters.md) > [loading](./x-components.aigetters.loading.md)
|
|
4
|
-
|
|
5
|
-
## AiGetters.loading property
|
|
6
|
-
|
|
7
|
-
The combination of the suggestions stream loading and the suggestions search response loading.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
loading: boolean;
|
|
13
|
-
```
|