@empathyco/x-components 6.0.0-alpha.135 → 6.0.0-alpha.137
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-components.aioverview.md +18 -6
- 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/js/x-modules/ai/wiring.js +1 -2
- package/js/x-modules/ai/wiring.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +83 -11
- package/report/x-components.api.md +20 -9
- package/types/x-modules/ai/components/ai-overview.vue.d.ts +31 -8
- package/types/x-modules/ai/components/ai-overview.vue.d.ts.map +1 -1
- package/types/x-modules/ai/wiring.d.ts +1 -2
- package/types/x-modules/ai/wiring.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.137 (2025-09-08)
|
|
7
|
+
|
|
8
|
+
* feat(AiOverview): minor component adjustments (#1867) ([554cd79](https://github.com/empathyco/x/commit/554cd79)), closes [#1867](https://github.com/empathyco/x/issues/1867)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 6.0.0-alpha.136 (2025-09-05)
|
|
15
|
+
|
|
16
|
+
* fix(ai): reset state handling (#1864) ([29aa62c](https://github.com/empathyco/x/commit/29aa62c)), closes [#1864](https://github.com/empathyco/x/issues/1864)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## 6.0.0-alpha.135 (2025-09-04)
|
|
7
23
|
|
|
8
24
|
* feat(ai): color customization (#1863) ([2445441](https://github.com/empathyco/x/commit/2445441)), closes [#1863](https://github.com/empathyco/x/issues/1863)
|
|
@@ -16,17 +16,24 @@ _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, import("@empathyco/x-types").Result[]>>;
|
|
34
|
+
suggestionsSearch: import("vue").ComputedRef<AiSuggestionSearch[]>;
|
|
35
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
36
|
+
toggleVisibility: () => void;
|
|
30
37
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
38
|
title: {
|
|
32
39
|
type: PropType<string>;
|
|
@@ -36,13 +43,18 @@ _default: import("vue").DefineComponent<{
|
|
|
36
43
|
type: PropType<string>;
|
|
37
44
|
default: string;
|
|
38
45
|
};
|
|
39
|
-
|
|
46
|
+
expandText: {
|
|
47
|
+
type: PropType<string>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
collapseText: {
|
|
40
51
|
type: PropType<string>;
|
|
41
52
|
default: string;
|
|
42
53
|
};
|
|
43
54
|
}>>, {
|
|
44
55
|
title: string;
|
|
45
56
|
titleLoading: string;
|
|
46
|
-
|
|
57
|
+
expandText: string;
|
|
58
|
+
collapseText: string;
|
|
47
59
|
}, {}>
|
|
48
60
|
```
|
|
@@ -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], (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,6B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AA,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;;;;;;;"}
|
|
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]\"\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 (acc: Record<string, AiSuggestionSearch['results']>, { query, results }) => {\n acc[query] = results\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;AAAA,EAAA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A;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 }) => {
|
|
171
|
+
acc[query] = results;
|
|
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]\"\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 (acc: Record<string, AiSuggestionSearch['results']>, { query, results }) => {\n acc[query] = results\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,IAAI,EAAE,MAA0B;AAChC,YAAA,OAAO,EAAE,WAAW;AACrB,SAAA;AAC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ectCss 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 };
|
|
@@ -39,13 +39,12 @@ const aiWiring = createWiring({
|
|
|
39
39
|
},
|
|
40
40
|
UserAcceptedAQuery: {
|
|
41
41
|
setAiQuery,
|
|
42
|
-
resetAiState,
|
|
43
42
|
},
|
|
44
43
|
UserClearedQuery: {
|
|
45
44
|
setAiQuery,
|
|
46
|
-
resetAiState,
|
|
47
45
|
},
|
|
48
46
|
AiSuggestionsRequestUpdated: {
|
|
47
|
+
resetAiState,
|
|
49
48
|
fetchAndSaveAiSuggestions,
|
|
50
49
|
},
|
|
51
50
|
AiSuggestionsSearchRequestUpdated: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** `ai` XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the ai state from URL data. */\nconst setUrlParams = wireDispatch('setUrlParams')\n/** Sets the ai state `params`. */\nconst setExtraParams = wireCommit('setParams')\n\n/** Sets the ai state `query`. */\nconst setAiQuery = wireCommit('setQuery')\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestions = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the ai suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearch = wireDispatch('fetchAndSaveAiSuggestionsSearch')\n\n/** Sets the ai state `relatedTags`.*/\nconst setAiRelatedTags = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiState = wireCommitWithoutPayload('resetAiState')\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n ExtraParamsChanged: {\n setExtraParams,\n },\n UserAcceptedAQuery: {\n setAiQuery,\n
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** `ai` XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the ai state from URL data. */\nconst setUrlParams = wireDispatch('setUrlParams')\n/** Sets the ai state `params`. */\nconst setExtraParams = wireCommit('setParams')\n\n/** Sets the ai state `query`. */\nconst setAiQuery = wireCommit('setQuery')\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestions = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the ai suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearch = wireDispatch('fetchAndSaveAiSuggestionsSearch')\n\n/** Sets the ai state `relatedTags`.*/\nconst setAiRelatedTags = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiState = wireCommitWithoutPayload('resetAiState')\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n ExtraParamsChanged: {\n setExtraParams,\n },\n UserAcceptedAQuery: {\n setAiQuery,\n },\n UserClearedQuery: {\n setAiQuery,\n },\n AiSuggestionsRequestUpdated: {\n resetAiState,\n fetchAndSaveAiSuggestions,\n },\n AiSuggestionsSearchRequestUpdated: {\n fetchAndSaveAiSuggestionsSearch,\n },\n SelectedRelatedTagsChanged: {\n setAiRelatedTags,\n },\n})\n"],"names":[],"mappings":";;;;;AAOA;AACA,MAAM,UAAU,GAAG,IAAI,CAAA;AACvB;AACA,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AACnD;AACA,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,UAAU,CAAC,CAAA;AAC/E;AACA,MAAM,YAAY,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAA;AAEvD;AACA,MAAM,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACjD;AACA,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;AAE9C;AACA,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;AAEzC;AACA,MAAM,yBAAyB,GAAG,YAAY,CAAC,2BAA2B,CAAC,CAAA;AAE3E;AACA,MAAM,+BAA+B,GAAG,YAAY,CAAC,iCAAiC,CAAC,CAAA;AAEvF;AACA,MAAM,gBAAgB,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAA;AAEvD;AACA,MAAM,YAAY,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAA;AAE7D;;;;AAIG;AACI,MAAM,QAAQ,GAAG,YAAY,CAAC;AACnC,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,cAAc;AACf,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,UAAU;AACX,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,UAAU;AACX,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,YAAY;QACZ,yBAAyB;AAC1B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,+BAA+B;AAChC,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,gBAAgB;AACjB,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.137",
|
|
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": "dd051b7ecbd6aa309c28a768f4efefac61cacee1"
|
|
146
146
|
}
|
|
@@ -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,43 @@
|
|
|
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, import(\"@empathyco/x-types\")."
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"kind": "Reference",
|
|
1602
|
+
"text": "Result",
|
|
1603
|
+
"canonicalReference": "@empathyco/x-components!Result:interface"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"kind": "Content",
|
|
1607
|
+
"text": "[]>>;\n suggestionsSearch: import(\"vue\")."
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
"kind": "Reference",
|
|
1611
|
+
"text": "ComputedRef",
|
|
1612
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
"kind": "Content",
|
|
1616
|
+
"text": "<"
|
|
1554
1617
|
},
|
|
1555
1618
|
{
|
|
1556
1619
|
"kind": "Reference",
|
|
@@ -1559,7 +1622,7 @@
|
|
|
1559
1622
|
},
|
|
1560
1623
|
{
|
|
1561
1624
|
"kind": "Content",
|
|
1562
|
-
"text": "[]>;\n
|
|
1625
|
+
"text": "[]>;\n suggestionText: import(\"vue\")."
|
|
1563
1626
|
},
|
|
1564
1627
|
{
|
|
1565
1628
|
"kind": "Reference",
|
|
@@ -1568,7 +1631,7 @@
|
|
|
1568
1631
|
},
|
|
1569
1632
|
{
|
|
1570
1633
|
"kind": "Content",
|
|
1571
|
-
"text": "<
|
|
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,24 @@ 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, Result[]>>;
|
|
243
|
+
suggestionsSearch: ComputedRef<AiSuggestionSearch[]>;
|
|
244
|
+
suggestionText: ComputedRef<string>;
|
|
245
|
+
toggleVisibility: () => void;
|
|
239
246
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
240
247
|
title: {
|
|
241
248
|
type: PropType<string>;
|
|
@@ -245,14 +252,19 @@ titleLoading: {
|
|
|
245
252
|
type: PropType<string>;
|
|
246
253
|
default: string;
|
|
247
254
|
};
|
|
248
|
-
|
|
255
|
+
expandText: {
|
|
256
|
+
type: PropType<string>;
|
|
257
|
+
default: string;
|
|
258
|
+
};
|
|
259
|
+
collapseText: {
|
|
249
260
|
type: PropType<string>;
|
|
250
261
|
default: string;
|
|
251
262
|
};
|
|
252
263
|
}>>, {
|
|
253
264
|
title: string;
|
|
254
265
|
titleLoading: string;
|
|
255
|
-
|
|
266
|
+
expandText: string;
|
|
267
|
+
collapseText: string;
|
|
256
268
|
}, {}>;
|
|
257
269
|
|
|
258
270
|
export { AIStarIcon }
|
|
@@ -285,13 +297,12 @@ export const aiWiring: {
|
|
|
285
297
|
};
|
|
286
298
|
UserAcceptedAQuery: {
|
|
287
299
|
setAiQuery: Wire<string>;
|
|
288
|
-
resetAiState: AnyWire;
|
|
289
300
|
};
|
|
290
301
|
UserClearedQuery: {
|
|
291
302
|
setAiQuery: Wire<string>;
|
|
292
|
-
resetAiState: AnyWire;
|
|
293
303
|
};
|
|
294
304
|
AiSuggestionsRequestUpdated: {
|
|
305
|
+
resetAiState: AnyWire;
|
|
295
306
|
fetchAndSaveAiSuggestions: Wire<AiSuggestionsRequest | null>;
|
|
296
307
|
};
|
|
297
308
|
AiSuggestionsSearchRequestUpdated: {
|
|
@@ -9177,8 +9188,8 @@ export type XStoreModuleOptions<StoreModule extends AnyXStoreModule> = StoreModu
|
|
|
9177
9188
|
// dist/types/components/filters/labels/base-price-filter-label.vue.d.ts:13:13 - (ae-forgotten-export) The symbol "RangeValue" needs to be exported by the entry point index.d.ts
|
|
9178
9189
|
// dist/types/components/filters/labels/base-rating-filter-label.vue.d.ts:16:9 - (ae-forgotten-export) The symbol "BooleanFilter" needs to be exported by the entry point index.d.ts
|
|
9179
9190
|
// dist/types/components/page-selector.vue.d.ts:65:5 - (ae-forgotten-export) The symbol "PageItem" needs to be exported by the entry point index.d.ts
|
|
9180
|
-
// dist/types/components/result/base-result-add-to-cart.vue.d.ts:18:9 - (ae-forgotten-export) The symbol "Result" needs to be exported by the entry point index.d.ts
|
|
9181
9191
|
// dist/types/components/suggestions/base-suggestion.vue.d.ts:31:9 - (ae-forgotten-export) The symbol "Suggestion" needs to be exported by the entry point index.d.ts
|
|
9192
|
+
// dist/types/x-modules/ai/components/ai-overview.vue.d.ts:46:5 - (ae-forgotten-export) The symbol "Result" needs to be exported by the entry point index.d.ts
|
|
9182
9193
|
// dist/types/x-modules/device/components/device-detector.vue.d.ts:21:9 - (ae-forgotten-export) The symbol "Device" needs to be exported by the entry point index.d.ts
|
|
9183
9194
|
// dist/types/x-modules/device/components/device-detector.vue.d.ts:21:9 - (ae-forgotten-export) The symbol "MaxWidth" needs to be exported by the entry point index.d.ts
|
|
9184
9195
|
// dist/types/x-modules/facets/components/facets/facets.vue.d.ts:56:5 - (ae-forgotten-export) The symbol "RenderFacet" needs to be exported by the entry point index.d.ts
|
|
@@ -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,33 @@ 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, import("@empathyco/x-types").Result[]>>;
|
|
47
|
+
suggestionsSearch: import("vue").ComputedRef<AiSuggestionSearch[]>;
|
|
48
|
+
suggestionText: import("vue").ComputedRef<string>;
|
|
49
|
+
toggleVisibility: () => void;
|
|
37
50
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
51
|
/**
|
|
39
52
|
* The text displayed when the question ended loading
|
|
@@ -54,18 +67,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
67
|
default: string;
|
|
55
68
|
};
|
|
56
69
|
/**
|
|
57
|
-
* The text displayed on the
|
|
70
|
+
* The text displayed on the toggle button when collapsed.
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
expandText: {
|
|
75
|
+
type: PropType<string>;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The text displayed on the toggle button when expanded.
|
|
58
80
|
*
|
|
59
81
|
* @public
|
|
60
82
|
*/
|
|
61
|
-
|
|
83
|
+
collapseText: {
|
|
62
84
|
type: PropType<string>;
|
|
63
85
|
default: string;
|
|
64
86
|
};
|
|
65
87
|
}>>, {
|
|
66
88
|
title: string;
|
|
67
89
|
titleLoading: string;
|
|
68
|
-
|
|
90
|
+
expandText: string;
|
|
91
|
+
collapseText: string;
|
|
69
92
|
}, {}>;
|
|
70
93
|
export default _default;
|
|
71
94
|
//# 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;;;;;;;;;;;;;;IAjClC;;;;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,wBA0FE"}
|
|
@@ -12,13 +12,12 @@ export declare const aiWiring: {
|
|
|
12
12
|
};
|
|
13
13
|
UserAcceptedAQuery: {
|
|
14
14
|
setAiQuery: import("../../wiring").Wire<string>;
|
|
15
|
-
resetAiState: import("../../wiring").AnyWire;
|
|
16
15
|
};
|
|
17
16
|
UserClearedQuery: {
|
|
18
17
|
setAiQuery: import("../../wiring").Wire<string>;
|
|
19
|
-
resetAiState: import("../../wiring").AnyWire;
|
|
20
18
|
};
|
|
21
19
|
AiSuggestionsRequestUpdated: {
|
|
20
|
+
resetAiState: import("../../wiring").AnyWire;
|
|
22
21
|
fetchAndSaveAiSuggestions: import("../../wiring").Wire<import("@empathyco/x-types").AiSuggestionsRequest | null>;
|
|
23
22
|
};
|
|
24
23
|
AiSuggestionsSearchRequestUpdated: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/ai/wiring.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAA"}
|