yc-agent-ui 1.2.0 → 1.2.1
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/es/components/dialog/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +2 -2
- package/es/components/dialog-form/src/index.vue.d.ts +2 -2
- package/es/components/display-item/index.d.ts +6 -6
- package/es/components/display-item/src/index.vue.d.ts +6 -6
- package/es/components/drawer-form/index.d.ts +14 -14
- package/es/components/drawer-form/src/index.vue.d.ts +6 -6
- package/es/components/form/index.d.ts +4 -4
- package/es/components/form/src/form-content.vue.d.ts +4 -4
- package/es/components/form/src/index.vue.d.ts +4 -4
- package/es/components/form-item/index.d.ts +6 -6
- package/es/components/form-item/src/index.vue.d.ts +4 -4
- package/es/components/page/index.d.ts +86 -86
- package/es/components/page/src/index.vue.d.ts +30 -30
- package/es/components/render/index.d.ts +1 -1
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +26 -26
- package/es/components/search/src/index.vue.d.ts +10 -10
- package/es/components/table/src/table-column.vue.d.ts +12 -12
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/mobile-frame.vue.d.ts +2 -0
- package/es/components/yc-ai-chat/src/sender.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +5 -0
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +2 -1
- package/es/components/yc-ai-chat/src/welcome.vue.d.ts +11 -1
- package/es/components/yc-plus-page/src/index.vue.d.ts +88 -88
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +96 -96
- package/es/index.css +9 -9
- package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +3 -2
- package/es/packages/components/yc-ai-chat/src/mobile-frame2.vue.mjs +34 -31
- package/es/packages/components/yc-ai-chat/src/presets.mjs +1 -1
- package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +16 -15
- package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +63 -35
- package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +42 -72
- package/es/packages/components/yc-ai-chat/src/welcome2.vue.mjs +22 -40
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +353 -368
- package/index.min.js +18 -18
- package/index.min.mjs +18 -18
- package/index.mjs +353 -368
- package/lib/components/dialog/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +2 -2
- package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
- package/lib/components/display-item/index.d.ts +6 -6
- package/lib/components/display-item/src/index.vue.d.ts +6 -6
- package/lib/components/drawer-form/index.d.ts +14 -14
- package/lib/components/drawer-form/src/index.vue.d.ts +6 -6
- package/lib/components/form/index.d.ts +4 -4
- package/lib/components/form/src/form-content.vue.d.ts +4 -4
- package/lib/components/form/src/index.vue.d.ts +4 -4
- package/lib/components/form-item/index.d.ts +6 -6
- package/lib/components/form-item/src/index.vue.d.ts +4 -4
- package/lib/components/page/index.d.ts +86 -86
- package/lib/components/page/src/index.vue.d.ts +30 -30
- package/lib/components/render/index.d.ts +1 -1
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +26 -26
- package/lib/components/search/src/index.vue.d.ts +10 -10
- package/lib/components/table/src/table-column.vue.d.ts +12 -12
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/mobile-frame.vue.d.ts +2 -0
- package/lib/components/yc-ai-chat/src/sender.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +5 -0
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +2 -1
- package/lib/components/yc-ai-chat/src/welcome.vue.d.ts +11 -1
- package/lib/components/yc-plus-page/src/index.vue.d.ts +88 -88
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +96 -96
- package/lib/index.css +12 -12
- package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +3 -2
- package/lib/packages/components/yc-ai-chat/src/mobile-frame2.vue.js +34 -31
- package/lib/packages/components/yc-ai-chat/src/presets.js +1 -1
- package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +16 -15
- package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +63 -35
- package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +41 -71
- package/lib/packages/components/yc-ai-chat/src/welcome2.vue.js +21 -39
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-yc-ai-chat.css +1 -1
- package/theme-chalk/src/yc-ai-chat.scss +11 -8
|
@@ -12,25 +12,30 @@ const _hoisted_4 = {
|
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "yc-chat-sidebar__search"
|
|
14
14
|
};
|
|
15
|
-
const _hoisted_5 =
|
|
16
|
-
const _hoisted_6 = {
|
|
15
|
+
const _hoisted_5 = ["placeholder"];
|
|
16
|
+
const _hoisted_6 = { class: "yc-chat-sidebar__body conversation-list" };
|
|
17
|
+
const _hoisted_7 = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
19
20
|
};
|
|
20
|
-
const
|
|
21
|
+
const _hoisted_8 = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
23
24
|
};
|
|
24
|
-
const
|
|
25
|
+
const _hoisted_9 = {
|
|
25
26
|
key: 2,
|
|
26
27
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
27
28
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
29
|
+
const _hoisted_10 = {
|
|
30
|
+
key: 3,
|
|
31
|
+
class: "yc-chat-sidebar__empty empty-hint"
|
|
32
|
+
};
|
|
33
|
+
const _hoisted_11 = { class: "yc-chat-sidebar__item-main" };
|
|
34
|
+
const _hoisted_12 = { class: "yc-chat-sidebar__item-title conversation-title" };
|
|
35
|
+
const _hoisted_13 = { class: "yc-chat-sidebar__item-time conversation-time" };
|
|
36
|
+
const _hoisted_14 = ["onClick"];
|
|
37
|
+
const _hoisted_15 = { class: "yc-chat-sidebar__more" };
|
|
38
|
+
const _hoisted_16 = ["disabled"];
|
|
34
39
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
40
|
...{
|
|
36
41
|
name: "YcChatSidebar"
|
|
@@ -42,8 +47,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
47
|
connected: { type: Boolean, default: false },
|
|
43
48
|
loading: { type: Boolean, default: false },
|
|
44
49
|
hasMore: { type: Boolean, default: false },
|
|
45
|
-
title: { default: "
|
|
46
|
-
createText: { default: "\
|
|
50
|
+
title: { default: "" },
|
|
51
|
+
createText: { default: "\u65B0\u5BF9\u8BDD" },
|
|
52
|
+
disconnectedText: { default: "" },
|
|
53
|
+
emptyText: { default: "\u6682\u65E0\u4F1A\u8BDD" },
|
|
54
|
+
noResultText: { default: "\u6CA1\u6709\u5339\u914D\u7ED3\u679C" },
|
|
55
|
+
searchPlaceholder: { default: "\u641C\u7D22" },
|
|
56
|
+
untitledText: { default: "\u65B0\u4F1A\u8BDD" }
|
|
47
57
|
},
|
|
48
58
|
emits: ["select", "create", "delete", "load-more"],
|
|
49
59
|
setup(__props, { emit: __emit }) {
|
|
@@ -54,14 +64,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
64
|
const query = keyword.value.trim().toLowerCase();
|
|
55
65
|
if (!query) return props.sessions;
|
|
56
66
|
return props.sessions.filter(
|
|
57
|
-
(item) => (item.title ||
|
|
67
|
+
(item) => (item.title || props.untitledText).toLowerCase().includes(query)
|
|
58
68
|
);
|
|
59
69
|
});
|
|
60
70
|
const conversationItems = computed(
|
|
61
71
|
() => filteredSessions.value.map((item) => ({
|
|
62
72
|
id: item.id,
|
|
63
73
|
key: item.id,
|
|
64
|
-
label: item.title ||
|
|
74
|
+
label: item.title || props.untitledText,
|
|
65
75
|
group: groupChatSessionByDate(item.updatedAt),
|
|
66
76
|
disabled: item.disabled,
|
|
67
77
|
timeText: formatChatSessionTime(item.updatedAt)
|
|
@@ -135,25 +145,43 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
145
|
-1
|
|
136
146
|
/* CACHED */
|
|
137
147
|
)),
|
|
138
|
-
withDirectives(createElementVNode(
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
class: "yc-chat-sidebar__search-input"
|
|
145
|
-
},
|
|
146
|
-
null,
|
|
147
|
-
512
|
|
148
|
-
/* NEED_PATCH */
|
|
149
|
-
), [
|
|
148
|
+
withDirectives(createElementVNode("input", {
|
|
149
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => keyword.value = $event),
|
|
150
|
+
type: "text",
|
|
151
|
+
placeholder: __props.searchPlaceholder,
|
|
152
|
+
class: "yc-chat-sidebar__search-input"
|
|
153
|
+
}, null, 8, _hoisted_5), [
|
|
150
154
|
[vModelText, keyword.value]
|
|
151
155
|
])
|
|
152
156
|
])) : createCommentVNode("v-if", true)
|
|
153
157
|
]),
|
|
154
|
-
createElementVNode("div",
|
|
155
|
-
!__props.connected
|
|
156
|
-
|
|
158
|
+
createElementVNode("div", _hoisted_6, [
|
|
159
|
+
!__props.connected && __props.disconnectedText ? (openBlock(), createElementBlock(
|
|
160
|
+
"div",
|
|
161
|
+
_hoisted_7,
|
|
162
|
+
toDisplayString(__props.disconnectedText),
|
|
163
|
+
1
|
|
164
|
+
/* TEXT */
|
|
165
|
+
)) : !__props.connected ? (openBlock(), createElementBlock(
|
|
166
|
+
"div",
|
|
167
|
+
_hoisted_8,
|
|
168
|
+
toDisplayString(__props.emptyText),
|
|
169
|
+
1
|
|
170
|
+
/* TEXT */
|
|
171
|
+
)) : !__props.sessions.length && !__props.loading ? (openBlock(), createElementBlock(
|
|
172
|
+
"div",
|
|
173
|
+
_hoisted_9,
|
|
174
|
+
toDisplayString(__props.emptyText),
|
|
175
|
+
1
|
|
176
|
+
/* TEXT */
|
|
177
|
+
)) : !conversationItems.value.length && keyword.value ? (openBlock(), createElementBlock(
|
|
178
|
+
"div",
|
|
179
|
+
_hoisted_10,
|
|
180
|
+
toDisplayString(__props.noResultText),
|
|
181
|
+
1
|
|
182
|
+
/* TEXT */
|
|
183
|
+
)) : (openBlock(), createBlock(unref(Conversations), {
|
|
184
|
+
key: 4,
|
|
157
185
|
items: conversationItems.value,
|
|
158
186
|
active: __props.activeId,
|
|
159
187
|
"row-key": "id",
|
|
@@ -170,17 +198,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
170
198
|
class: normalizeClass(["yc-chat-sidebar__item", { active: item.id === __props.activeId }])
|
|
171
199
|
},
|
|
172
200
|
[
|
|
173
|
-
createElementVNode("div",
|
|
201
|
+
createElementVNode("div", _hoisted_11, [
|
|
174
202
|
createElementVNode(
|
|
175
203
|
"div",
|
|
176
|
-
|
|
204
|
+
_hoisted_12,
|
|
177
205
|
toDisplayString(item.label),
|
|
178
206
|
1
|
|
179
207
|
/* TEXT */
|
|
180
208
|
),
|
|
181
209
|
createElementVNode(
|
|
182
210
|
"div",
|
|
183
|
-
|
|
211
|
+
_hoisted_13,
|
|
184
212
|
toDisplayString(item.timeText),
|
|
185
213
|
1
|
|
186
214
|
/* TEXT */
|
|
@@ -217,7 +245,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
245
|
-1
|
|
218
246
|
/* CACHED */
|
|
219
247
|
)
|
|
220
|
-
])], 8,
|
|
248
|
+
])], 8, _hoisted_14)
|
|
221
249
|
])
|
|
222
250
|
],
|
|
223
251
|
2
|
|
@@ -230,13 +258,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
230
258
|
__props.hasMore ? {
|
|
231
259
|
name: "load-more",
|
|
232
260
|
fn: withCtx(() => [
|
|
233
|
-
createElementVNode("div",
|
|
261
|
+
createElementVNode("div", _hoisted_15, [
|
|
234
262
|
createElementVNode("button", {
|
|
235
263
|
type: "button",
|
|
236
264
|
class: "yc-chat-sidebar__more-btn",
|
|
237
265
|
disabled: __props.loading,
|
|
238
266
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("load-more"))
|
|
239
|
-
}, toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A
|
|
267
|
+
}, toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_16)
|
|
240
268
|
])
|
|
241
269
|
]),
|
|
242
270
|
key: "0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode,
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, Fragment, renderList, toDisplayString, createVNode, withCtx, nextTick } from 'vue';
|
|
2
2
|
import _sfc_main$1 from './mobile-frame2.vue.mjs';
|
|
3
3
|
import { YC_MOBILE_DEVICE_PRESETS } from './presets.mjs';
|
|
4
4
|
|
|
@@ -14,38 +14,39 @@ const _hoisted_5 = {
|
|
|
14
14
|
class: "yc-chat-studio__context",
|
|
15
15
|
"data-testid": "studio-context-bar"
|
|
16
16
|
};
|
|
17
|
-
const _hoisted_6 = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
17
|
+
const _hoisted_6 = {
|
|
18
|
+
key: 2,
|
|
19
|
+
class: "yc-chat-studio__status-group"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_7 = { class: "yc-chat-studio__right" };
|
|
22
|
+
const _hoisted_8 = {
|
|
22
23
|
key: 0,
|
|
23
24
|
class: "yc-chat-studio__devices",
|
|
24
25
|
"aria-label": "\u79FB\u52A8\u7AEF\u673A\u578B\u9884\u8BBE"
|
|
25
26
|
};
|
|
26
|
-
const
|
|
27
|
-
const
|
|
27
|
+
const _hoisted_9 = ["data-testid", "onClick"];
|
|
28
|
+
const _hoisted_10 = {
|
|
28
29
|
class: "yc-chat-studio__segmented",
|
|
29
30
|
role: "tablist",
|
|
30
31
|
"aria-label": "\u7EC8\u7AEF\u9884\u89C8\u5207\u6362"
|
|
31
32
|
};
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
33
|
+
const _hoisted_11 = ["aria-selected"];
|
|
34
|
+
const _hoisted_12 = ["aria-selected"];
|
|
35
|
+
const _hoisted_13 = ["disabled"];
|
|
36
|
+
const _hoisted_14 = {
|
|
36
37
|
key: 1,
|
|
37
38
|
class: "yc-chat-studio__web-body chat-workspace"
|
|
38
39
|
};
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
40
|
+
const _hoisted_15 = { class: "yc-chat-studio__main conversation-panel" };
|
|
41
|
+
const _hoisted_16 = { class: "yc-chat-studio__stream-inner" };
|
|
42
|
+
const _hoisted_17 = { class: "yc-chat-studio__composer-dock" };
|
|
43
|
+
const _hoisted_18 = { class: "yc-chat-studio__composer-inner" };
|
|
44
|
+
const _hoisted_19 = {
|
|
44
45
|
key: 2,
|
|
45
46
|
class: "yc-chat-studio__mobile-stage",
|
|
46
47
|
"data-testid": "mobile-stage"
|
|
47
48
|
};
|
|
48
|
-
const
|
|
49
|
+
const _hoisted_20 = { class: "yc-chat-studio__mobile-canvas" };
|
|
49
50
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
50
51
|
...{
|
|
51
52
|
name: "YcChatStudio"
|
|
@@ -56,12 +57,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
57
|
deviceId: { default: "wecom" },
|
|
57
58
|
devices: { default: () => YC_MOBILE_DEVICE_PRESETS },
|
|
58
59
|
agentName: { default: "" },
|
|
59
|
-
bannerSubtitle: { default: "\u4F7F\u7528\u5F53\u524D\u5E94\u7528\u4E0E Agent \u505A\u5B9E\u65F6\u9A8C\u8BC1" },
|
|
60
60
|
status: { default: "idle" },
|
|
61
|
-
statusLabel: { default: "
|
|
61
|
+
statusLabel: { default: "" },
|
|
62
62
|
connected: { type: Boolean, default: false },
|
|
63
63
|
refreshing: { type: Boolean, default: false },
|
|
64
|
-
sessionCount: { default: 0 }
|
|
64
|
+
sessionCount: { default: 0 },
|
|
65
|
+
caption: { default: "" }
|
|
65
66
|
},
|
|
66
67
|
emits: ["update:viewport", "update:deviceId", "refresh", "create"],
|
|
67
68
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -151,44 +152,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
152
|
_ctx.$slots.toolbar ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
152
153
|
renderSlot(_ctx.$slots, "toolbar")
|
|
153
154
|
])) : createCommentVNode("v-if", true),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
class: normalizeClass(["yc-chat-studio__status-chip", `is-${__props.status}`])
|
|
159
|
-
},
|
|
160
|
-
[
|
|
161
|
-
createElementVNode(
|
|
162
|
-
"span",
|
|
163
|
-
{
|
|
164
|
-
class: normalizeClass(["status-dot", __props.status])
|
|
165
|
-
},
|
|
166
|
-
null,
|
|
167
|
-
2
|
|
168
|
-
/* CLASS */
|
|
169
|
-
),
|
|
170
|
-
createElementVNode(
|
|
171
|
-
"span",
|
|
172
|
-
_hoisted_7,
|
|
173
|
-
toDisplayString(__props.statusLabel),
|
|
174
|
-
1
|
|
175
|
-
/* TEXT */
|
|
176
|
-
)
|
|
177
|
-
],
|
|
178
|
-
2
|
|
179
|
-
/* CLASS */
|
|
180
|
-
),
|
|
181
|
-
createElementVNode(
|
|
182
|
-
"span",
|
|
183
|
-
_hoisted_8,
|
|
184
|
-
toDisplayString(__props.bannerSubtitle),
|
|
185
|
-
1
|
|
186
|
-
/* TEXT */
|
|
187
|
-
)
|
|
188
|
-
])
|
|
155
|
+
_ctx.$slots.status ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
156
|
+
renderSlot(_ctx.$slots, "status")
|
|
157
|
+
])) : createCommentVNode("v-if", true)
|
|
189
158
|
]),
|
|
190
|
-
createElementVNode("div",
|
|
191
|
-
__props.viewport === "mobile" ? (openBlock(), createElementBlock("div",
|
|
159
|
+
createElementVNode("div", _hoisted_7, [
|
|
160
|
+
__props.viewport === "mobile" ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
192
161
|
(openBlock(true), createElementBlock(
|
|
193
162
|
Fragment,
|
|
194
163
|
null,
|
|
@@ -199,13 +168,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
168
|
class: normalizeClass(["yc-chat-studio__device-pill", { "is-active": preset.id === activeDevice.value.id }]),
|
|
200
169
|
"data-testid": `device-preset-${preset.id}`,
|
|
201
170
|
onClick: ($event) => selectDevice(preset.id)
|
|
202
|
-
}, toDisplayString(preset.label), 11,
|
|
171
|
+
}, toDisplayString(preset.label), 11, _hoisted_9);
|
|
203
172
|
}),
|
|
204
173
|
128
|
|
205
174
|
/* KEYED_FRAGMENT */
|
|
206
175
|
))
|
|
207
176
|
])) : createCommentVNode("v-if", true),
|
|
208
|
-
createElementVNode("div",
|
|
177
|
+
createElementVNode("div", _hoisted_10, [
|
|
209
178
|
createElementVNode("button", {
|
|
210
179
|
type: "button",
|
|
211
180
|
role: "tab",
|
|
@@ -248,7 +217,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
248
217
|
-1
|
|
249
218
|
/* CACHED */
|
|
250
219
|
)
|
|
251
|
-
])], 10,
|
|
220
|
+
])], 10, _hoisted_11),
|
|
252
221
|
createElementVNode("button", {
|
|
253
222
|
type: "button",
|
|
254
223
|
role: "tab",
|
|
@@ -291,7 +260,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
260
|
-1
|
|
292
261
|
/* CACHED */
|
|
293
262
|
)
|
|
294
|
-
])], 10,
|
|
263
|
+
])], 10, _hoisted_12)
|
|
295
264
|
]),
|
|
296
265
|
createElementVNode("button", {
|
|
297
266
|
type: "button",
|
|
@@ -333,10 +302,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
333
302
|
-1
|
|
334
303
|
/* CACHED */
|
|
335
304
|
))
|
|
336
|
-
], 8,
|
|
305
|
+
], 8, _hoisted_13)
|
|
337
306
|
])
|
|
338
307
|
]),
|
|
339
|
-
__props.viewport === "web" ? (openBlock(), createElementBlock("div",
|
|
308
|
+
__props.viewport === "web" ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
340
309
|
createElementVNode(
|
|
341
310
|
"div",
|
|
342
311
|
{
|
|
@@ -348,7 +317,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
348
317
|
2
|
|
349
318
|
/* CLASS */
|
|
350
319
|
),
|
|
351
|
-
createElementVNode("section",
|
|
320
|
+
createElementVNode("section", _hoisted_15, [
|
|
352
321
|
createElementVNode(
|
|
353
322
|
"div",
|
|
354
323
|
{
|
|
@@ -357,30 +326,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
357
326
|
class: "yc-chat-studio__stream message-viewport"
|
|
358
327
|
},
|
|
359
328
|
[
|
|
360
|
-
createElementVNode("div",
|
|
329
|
+
createElementVNode("div", _hoisted_16, [
|
|
361
330
|
renderSlot(_ctx.$slots, "messages")
|
|
362
331
|
])
|
|
363
332
|
],
|
|
364
333
|
512
|
|
365
334
|
/* NEED_PATCH */
|
|
366
335
|
),
|
|
367
|
-
createElementVNode("div",
|
|
368
|
-
createElementVNode("div",
|
|
336
|
+
createElementVNode("div", _hoisted_17, [
|
|
337
|
+
createElementVNode("div", _hoisted_18, [
|
|
369
338
|
renderSlot(_ctx.$slots, "composer")
|
|
370
339
|
])
|
|
371
340
|
])
|
|
372
341
|
])
|
|
373
|
-
])) : (openBlock(), createElementBlock("div",
|
|
374
|
-
createElementVNode("div",
|
|
342
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
343
|
+
createElementVNode("div", _hoisted_20, [
|
|
375
344
|
createVNode(_sfc_main$1, {
|
|
376
345
|
ref_key: "mobileFrameRef",
|
|
377
346
|
ref: mobileFrameRef,
|
|
378
347
|
device: activeDevice.value,
|
|
379
|
-
"agent-name": __props.agentName
|
|
348
|
+
"agent-name": __props.agentName,
|
|
380
349
|
status: __props.status,
|
|
381
350
|
"status-label": __props.statusLabel,
|
|
382
351
|
connected: __props.connected,
|
|
383
352
|
"session-count": __props.sessionCount,
|
|
353
|
+
caption: __props.caption,
|
|
384
354
|
onCreate: _cache[4] || (_cache[4] = ($event) => emit("create")),
|
|
385
355
|
onRefresh: _cache[5] || (_cache[5] = ($event) => emit("refresh"))
|
|
386
356
|
}, {
|
|
@@ -407,7 +377,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
407
377
|
]),
|
|
408
378
|
_: 3
|
|
409
379
|
/* FORWARDED */
|
|
410
|
-
}, 8, ["device", "agent-name", "status", "status-label", "connected", "session-count"])
|
|
380
|
+
}, 8, ["device", "agent-name", "status", "status-label", "connected", "session-count", "caption"])
|
|
411
381
|
])
|
|
412
382
|
]))
|
|
413
383
|
],
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, unref
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createVNode, unref } from 'vue';
|
|
2
2
|
import { Welcome, Prompts } from 'vue-element-plus-x';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "yc-chat-welcome__inner" };
|
|
5
5
|
const _hoisted_2 = { class: "yc-chat-welcome__hero" };
|
|
6
6
|
const _hoisted_3 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "yc-chat-welcome__glyph"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = {
|
|
7
11
|
key: 0,
|
|
8
12
|
class: "yc-chat-welcome__prompts"
|
|
9
13
|
};
|
|
@@ -17,10 +21,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
21
|
loading: { type: Boolean, default: false },
|
|
18
22
|
agentName: { default: "" },
|
|
19
23
|
title: { default: "" },
|
|
20
|
-
description: { default: "
|
|
21
|
-
disconnectedTitle: { default: "
|
|
22
|
-
disconnectedDescription: { default: "
|
|
24
|
+
description: { default: "" },
|
|
25
|
+
disconnectedTitle: { default: "" },
|
|
26
|
+
disconnectedDescription: { default: "" },
|
|
23
27
|
prompts: { default: () => [] },
|
|
28
|
+
promptsTitle: { default: "" },
|
|
24
29
|
compact: { type: Boolean, default: false }
|
|
25
30
|
},
|
|
26
31
|
emits: ["prompt"],
|
|
@@ -28,12 +33,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
33
|
const props = __props;
|
|
29
34
|
const emit = __emit;
|
|
30
35
|
const resolvedTitle = computed(() => {
|
|
31
|
-
if (
|
|
32
|
-
if (props.
|
|
33
|
-
return props.
|
|
36
|
+
if (props.loading) return "\u52A0\u8F7D\u4E2D\u2026";
|
|
37
|
+
if (!props.connected) return props.disconnectedTitle || props.title;
|
|
38
|
+
return props.title || props.agentName;
|
|
34
39
|
});
|
|
35
40
|
const resolvedDescription = computed(() => {
|
|
36
|
-
if (
|
|
41
|
+
if (props.loading) return "";
|
|
42
|
+
if (!props.connected) return props.disconnectedDescription || props.description;
|
|
37
43
|
return props.description;
|
|
38
44
|
});
|
|
39
45
|
const promptItems = computed(
|
|
@@ -60,46 +66,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
66
|
[
|
|
61
67
|
createElementVNode("div", _hoisted_1, [
|
|
62
68
|
createElementVNode("div", _hoisted_2, [
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
class: "yc-chat-welcome__glyph",
|
|
67
|
-
"aria-hidden": "true"
|
|
68
|
-
},
|
|
69
|
-
[
|
|
70
|
-
createElementVNode("svg", {
|
|
71
|
-
viewBox: "0 0 24 24",
|
|
72
|
-
fill: "none"
|
|
73
|
-
}, [
|
|
74
|
-
createElementVNode("path", {
|
|
75
|
-
d: "M12 4L13.85 10.15L20 12L13.85 13.85L12 20L10.15 13.85L4 12L10.15 10.15L12 4Z",
|
|
76
|
-
fill: "currentColor"
|
|
77
|
-
}),
|
|
78
|
-
createElementVNode("circle", {
|
|
79
|
-
cx: "18.5",
|
|
80
|
-
cy: "6",
|
|
81
|
-
r: "1.5",
|
|
82
|
-
fill: "currentColor",
|
|
83
|
-
"fill-opacity": "0.55"
|
|
84
|
-
})
|
|
85
|
-
])
|
|
86
|
-
],
|
|
87
|
-
-1
|
|
88
|
-
/* CACHED */
|
|
89
|
-
)),
|
|
69
|
+
_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
70
|
+
renderSlot(_ctx.$slots, "logo")
|
|
71
|
+
])) : createCommentVNode("v-if", true),
|
|
90
72
|
createVNode(unref(Welcome), {
|
|
91
73
|
variant: "borderless",
|
|
92
|
-
title:
|
|
93
|
-
description:
|
|
74
|
+
title: resolvedTitle.value,
|
|
75
|
+
description: resolvedDescription.value
|
|
94
76
|
}, null, 8, ["title", "description"])
|
|
95
77
|
]),
|
|
96
|
-
__props.connected && !__props.loading && promptItems.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
78
|
+
__props.connected && !__props.loading && promptItems.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
97
79
|
createVNode(unref(Prompts), {
|
|
98
|
-
title:
|
|
80
|
+
title: __props.promptsTitle,
|
|
99
81
|
items: promptItems.value,
|
|
100
82
|
wrap: true,
|
|
101
83
|
onItemClick: handlePromptClick
|
|
102
|
-
}, null, 8, ["items"])
|
|
84
|
+
}, null, 8, ["title", "items"])
|
|
103
85
|
])) : createCommentVNode("v-if", true)
|
|
104
86
|
])
|
|
105
87
|
],
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.1";
|
package/es/version.mjs
CHANGED