yc-agent-ui 1.2.0 → 1.2.2
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/README.md +26 -5
- package/es/components/chart/src/chart-card.vue.d.ts +56 -10
- package/es/components/chart/src/chart-container.vue.d.ts +11 -1
- package/es/components/chart/src/theme.d.ts +1 -1
- package/es/components/dialog-form/index.d.ts +4 -4
- package/es/components/dialog-form/src/index.vue.d.ts +4 -4
- package/es/components/display-item/index.d.ts +15 -15
- package/es/components/display-item/src/index.vue.d.ts +13 -13
- package/es/components/drawer-form/index.d.ts +4 -4
- package/es/components/drawer-form/src/index.vue.d.ts +4 -4
- package/es/components/form/index.d.ts +8 -8
- package/es/components/form/src/form-content.vue.d.ts +8 -8
- package/es/components/form/src/index.vue.d.ts +8 -8
- package/es/components/form-item/index.d.ts +6 -6
- package/es/components/form-item/src/index.vue.d.ts +6 -6
- package/es/components/page/index.d.ts +172 -172
- package/es/components/page/src/index.vue.d.ts +60 -60
- package/es/components/search/index.d.ts +52 -52
- package/es/components/search/src/index.vue.d.ts +20 -20
- package/es/components/table/src/table-column.vue.d.ts +34 -34
- package/es/components/yc-ai-chat/index.d.ts +1 -0
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +2 -0
- package/es/components/yc-ai-chat/src/mobile-frame.vue.d.ts +2 -0
- package/es/components/yc-ai-chat/src/select.vue.d.ts +1 -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 +15 -1
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +5 -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 +176 -176
- package/es/hooks/usePlusFormReset.d.ts +48 -48
- package/es/index.css +9 -9
- package/es/index.mjs +1 -0
- package/es/packages/components/chart/src/chart-card2.vue.mjs +9 -2
- package/es/packages/components/chart/src/chart-container2.vue.mjs +13 -1
- package/es/packages/components/chart/src/theme.mjs +18 -10
- package/es/packages/components/data-table/capability.mjs +1 -1
- package/es/packages/components/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/index.mjs +1 -0
- package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +24 -15
- 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/select2.vue.mjs +9 -4
- package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +20 -17
- package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +89 -56
- package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +304 -119
- package/es/packages/components/yc-ai-chat/src/welcome2.vue.mjs +22 -40
- package/es/packages/components/yc-gradient-card/capability.mjs +8 -8
- package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +48 -24
- package/es/packages/registry/types.mjs +1 -1
- package/es/registry/types.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +4093 -824
- package/index.min.js +42 -39
- package/index.min.mjs +39 -36
- package/index.mjs +4169 -910
- package/lib/components/chart/src/chart-card.vue.d.ts +56 -10
- package/lib/components/chart/src/chart-container.vue.d.ts +11 -1
- package/lib/components/chart/src/theme.d.ts +1 -1
- package/lib/components/dialog-form/index.d.ts +4 -4
- package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
- package/lib/components/display-item/index.d.ts +15 -15
- package/lib/components/display-item/src/index.vue.d.ts +13 -13
- package/lib/components/drawer-form/index.d.ts +4 -4
- package/lib/components/drawer-form/src/index.vue.d.ts +4 -4
- package/lib/components/form/index.d.ts +8 -8
- package/lib/components/form/src/form-content.vue.d.ts +8 -8
- package/lib/components/form/src/index.vue.d.ts +8 -8
- package/lib/components/form-item/index.d.ts +6 -6
- package/lib/components/form-item/src/index.vue.d.ts +6 -6
- package/lib/components/page/index.d.ts +172 -172
- package/lib/components/page/src/index.vue.d.ts +60 -60
- package/lib/components/search/index.d.ts +52 -52
- package/lib/components/search/src/index.vue.d.ts +20 -20
- package/lib/components/table/src/table-column.vue.d.ts +34 -34
- package/lib/components/yc-ai-chat/index.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +2 -0
- package/lib/components/yc-ai-chat/src/mobile-frame.vue.d.ts +2 -0
- package/lib/components/yc-ai-chat/src/select.vue.d.ts +1 -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 +15 -1
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +5 -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 +176 -176
- package/lib/hooks/usePlusFormReset.d.ts +48 -48
- package/lib/index.css +11 -11
- package/lib/index.js +41 -0
- package/lib/packages/components/chart/src/chart-card2.vue.js +9 -2
- package/lib/packages/components/chart/src/chart-container2.vue.js +13 -1
- package/lib/packages/components/chart/src/theme.js +18 -10
- package/lib/packages/components/data-table/capability.js +1 -1
- package/lib/packages/components/index.js +41 -0
- package/lib/packages/components/yc-ai-chat/index.js +41 -0
- package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +24 -15
- 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/select2.vue.js +9 -4
- package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +20 -17
- package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +88 -55
- package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +303 -118
- package/lib/packages/components/yc-ai-chat/src/welcome2.vue.js +21 -39
- package/lib/packages/components/yc-gradient-card/capability.js +8 -8
- package/lib/packages/components/yc-input/src/stepper-input2.vue.js +47 -23
- package/lib/packages/registry/types.js +1 -1
- package/lib/registry/types.d.ts +1 -1
- 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-search.css +1 -1
- package/theme-chalk/plus-yc-ai-chat.css +1 -1
- package/theme-chalk/plus-yc-data-table.css +1 -1
- package/theme-chalk/plus-yc-property-table.css +1 -1
- package/theme-chalk/src/search.scss +93 -3
- package/theme-chalk/src/yc-ai-chat.scss +785 -18
- package/theme-chalk/src/yc-data-table.scss +57 -42
- package/theme-chalk/src/yc-property-table.scss +35 -14
|
@@ -10,7 +10,10 @@ const _hoisted_1 = {
|
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "yc-chat-studio__notices"
|
|
12
12
|
};
|
|
13
|
-
const _hoisted_2 = {
|
|
13
|
+
const _hoisted_2 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "yc-chat-studio__topbar conversation-banner"
|
|
16
|
+
};
|
|
14
17
|
const _hoisted_3 = { class: "yc-chat-studio__left" };
|
|
15
18
|
const _hoisted_4 = ["aria-label", "title"];
|
|
16
19
|
const _hoisted_5 = {
|
|
@@ -18,38 +21,63 @@ const _hoisted_5 = {
|
|
|
18
21
|
class: "yc-chat-studio__context",
|
|
19
22
|
"data-testid": "studio-context-bar"
|
|
20
23
|
};
|
|
21
|
-
const _hoisted_6 = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
const _hoisted_6 = {
|
|
25
|
+
key: 2,
|
|
26
|
+
class: "yc-chat-studio__status-group"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_7 = { class: "yc-chat-studio__right" };
|
|
29
|
+
const _hoisted_8 = {
|
|
26
30
|
key: 0,
|
|
27
31
|
class: "yc-chat-studio__devices",
|
|
28
32
|
"aria-label": "\u79FB\u52A8\u7AEF\u673A\u578B\u9884\u8BBE"
|
|
29
33
|
};
|
|
30
|
-
const
|
|
31
|
-
const
|
|
34
|
+
const _hoisted_9 = ["data-testid", "onClick"];
|
|
35
|
+
const _hoisted_10 = {
|
|
36
|
+
key: 1,
|
|
32
37
|
class: "yc-chat-studio__segmented",
|
|
33
38
|
role: "tablist",
|
|
34
39
|
"aria-label": "\u7EC8\u7AEF\u9884\u89C8\u5207\u6362"
|
|
35
40
|
};
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
key:
|
|
41
|
+
const _hoisted_11 = ["aria-selected"];
|
|
42
|
+
const _hoisted_12 = ["aria-selected"];
|
|
43
|
+
const _hoisted_13 = ["disabled"];
|
|
44
|
+
const _hoisted_14 = {
|
|
45
|
+
key: 2,
|
|
41
46
|
class: "yc-chat-studio__web-body chat-workspace"
|
|
42
47
|
};
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
key: 2,
|
|
48
|
+
const _hoisted_15 = { class: "yc-chat-studio__main conversation-panel" };
|
|
49
|
+
const _hoisted_16 = { class: "yc-chat-studio__stream-inner" };
|
|
50
|
+
const _hoisted_17 = { class: "yc-chat-studio__composer-dock" };
|
|
51
|
+
const _hoisted_18 = { class: "yc-chat-studio__composer-inner" };
|
|
52
|
+
const _hoisted_19 = {
|
|
49
53
|
class: "yc-chat-studio__mobile-stage",
|
|
50
54
|
"data-testid": "mobile-stage"
|
|
51
55
|
};
|
|
52
|
-
const
|
|
56
|
+
const _hoisted_20 = { class: "yc-chat-studio__mobile-canvas" };
|
|
57
|
+
const _hoisted_21 = {
|
|
58
|
+
class: "yc-chat-studio__mobile-native",
|
|
59
|
+
"data-testid": "mobile-native"
|
|
60
|
+
};
|
|
61
|
+
const _hoisted_22 = { class: "yc-chat-studio__mobile-header" };
|
|
62
|
+
const _hoisted_23 = {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: "yc-chat-studio__mobile-badge"
|
|
65
|
+
};
|
|
66
|
+
const _hoisted_24 = { class: "yc-chat-studio__mobile-title-wrap" };
|
|
67
|
+
const _hoisted_25 = { class: "yc-chat-studio__mobile-title" };
|
|
68
|
+
const _hoisted_26 = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "yc-chat-studio__mobile-sub"
|
|
71
|
+
};
|
|
72
|
+
const _hoisted_27 = { class: "yc-chat-studio__mobile-actions" };
|
|
73
|
+
const _hoisted_28 = ["disabled"];
|
|
74
|
+
const _hoisted_29 = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "yc-chat-studio__mobile-toolbar",
|
|
77
|
+
"data-testid": "studio-context-bar"
|
|
78
|
+
};
|
|
79
|
+
const _hoisted_30 = { class: "yc-chat-studio__mobile-composer" };
|
|
80
|
+
const _hoisted_31 = { class: "yc-chat-studio__mobile-drawer" };
|
|
53
81
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
54
82
|
...{
|
|
55
83
|
name: "YcChatStudio"
|
|
@@ -60,18 +88,25 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
88
|
deviceId: { default: "wecom" },
|
|
61
89
|
devices: { default: () => presets.YC_MOBILE_DEVICE_PRESETS },
|
|
62
90
|
agentName: { default: "" },
|
|
63
|
-
bannerSubtitle: { default: "\u4F7F\u7528\u5F53\u524D\u5E94\u7528\u4E0E Agent \u505A\u5B9E\u65F6\u9A8C\u8BC1" },
|
|
64
91
|
status: { default: "idle" },
|
|
65
|
-
statusLabel: { default: "
|
|
92
|
+
statusLabel: { default: "" },
|
|
66
93
|
connected: { type: Boolean, default: false },
|
|
67
94
|
refreshing: { type: Boolean, default: false },
|
|
68
|
-
sessionCount: { default: 0 }
|
|
95
|
+
sessionCount: { default: 0 },
|
|
96
|
+
caption: { default: "" },
|
|
97
|
+
accentColor: { default: "" },
|
|
98
|
+
showViewportSwitch: { type: Boolean, default: false },
|
|
99
|
+
deviceSimulator: { type: Boolean, default: false }
|
|
69
100
|
},
|
|
70
101
|
emits: ["update:viewport", "update:deviceId", "refresh", "create"],
|
|
71
102
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
72
103
|
const props = __props;
|
|
104
|
+
const accentStyle = vue.computed(
|
|
105
|
+
() => props.accentColor ? { "--yc-chat-accent": props.accentColor } : void 0
|
|
106
|
+
);
|
|
73
107
|
const emit = __emit;
|
|
74
108
|
const sidebarCollapsed = vue.ref(false);
|
|
109
|
+
const mobileDrawerOpen = vue.ref(false);
|
|
75
110
|
const webScrollRef = vue.ref(null);
|
|
76
111
|
const mobileScrollRef = vue.ref(null);
|
|
77
112
|
const mobileFrameRef = vue.ref(null);
|
|
@@ -98,6 +133,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
98
133
|
}
|
|
99
134
|
function closeMobileDrawer() {
|
|
100
135
|
var _a;
|
|
136
|
+
mobileDrawerOpen.value = false;
|
|
101
137
|
(_a = mobileFrameRef.value) == null ? void 0 : _a.closeDrawer();
|
|
102
138
|
}
|
|
103
139
|
__expose({
|
|
@@ -109,13 +145,15 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
145
|
return vue.openBlock(), vue.createElementBlock(
|
|
110
146
|
"div",
|
|
111
147
|
{
|
|
112
|
-
class: vue.normalizeClass(["yc-chat-studio tenant-chat-page", `is-${__props.viewport}
|
|
148
|
+
class: vue.normalizeClass(["yc-chat-studio tenant-chat-page", [`is-${__props.viewport}`, { "is-simulator": __props.viewport === "mobile" && __props.deviceSimulator }]]),
|
|
149
|
+
style: vue.normalizeStyle(accentStyle.value)
|
|
113
150
|
},
|
|
114
151
|
[
|
|
115
152
|
_ctx.$slots.notice ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
116
153
|
vue.renderSlot(_ctx.$slots, "notice")
|
|
117
154
|
])) : vue.createCommentVNode("v-if", true),
|
|
118
|
-
vue.
|
|
155
|
+
vue.createCommentVNode(" Web \u7AEF\uFF08\u6216\u663E\u5F0F\u5F00\u542F\u5916\u90E8\u6A21\u62DF\u5668\u65F6\uFF09\u9876\u90E8\u680F "),
|
|
156
|
+
__props.viewport === "web" || __props.deviceSimulator ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2, [
|
|
119
157
|
vue.createElementVNode("div", _hoisted_3, [
|
|
120
158
|
__props.viewport === "web" ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
121
159
|
key: 0,
|
|
@@ -124,7 +162,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
124
162
|
"aria-label": sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
|
|
125
163
|
title: sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
|
|
126
164
|
onClick: _cache[0] || (_cache[0] = ($event) => sidebarCollapsed.value = !sidebarCollapsed.value)
|
|
127
|
-
}, [..._cache[
|
|
165
|
+
}, [..._cache[8] || (_cache[8] = [
|
|
128
166
|
vue.createElementVNode(
|
|
129
167
|
"svg",
|
|
130
168
|
{
|
|
@@ -155,44 +193,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
155
193
|
_ctx.$slots.toolbar ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
156
194
|
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
157
195
|
])) : vue.createCommentVNode("v-if", true),
|
|
158
|
-
vue.
|
|
159
|
-
vue.
|
|
160
|
-
|
|
161
|
-
{
|
|
162
|
-
class: vue.normalizeClass(["yc-chat-studio__status-chip", `is-${__props.status}`])
|
|
163
|
-
},
|
|
164
|
-
[
|
|
165
|
-
vue.createElementVNode(
|
|
166
|
-
"span",
|
|
167
|
-
{
|
|
168
|
-
class: vue.normalizeClass(["status-dot", __props.status])
|
|
169
|
-
},
|
|
170
|
-
null,
|
|
171
|
-
2
|
|
172
|
-
/* CLASS */
|
|
173
|
-
),
|
|
174
|
-
vue.createElementVNode(
|
|
175
|
-
"span",
|
|
176
|
-
_hoisted_7,
|
|
177
|
-
vue.toDisplayString(__props.statusLabel),
|
|
178
|
-
1
|
|
179
|
-
/* TEXT */
|
|
180
|
-
)
|
|
181
|
-
],
|
|
182
|
-
2
|
|
183
|
-
/* CLASS */
|
|
184
|
-
),
|
|
185
|
-
vue.createElementVNode(
|
|
186
|
-
"span",
|
|
187
|
-
_hoisted_8,
|
|
188
|
-
vue.toDisplayString(__props.bannerSubtitle),
|
|
189
|
-
1
|
|
190
|
-
/* TEXT */
|
|
191
|
-
)
|
|
192
|
-
])
|
|
196
|
+
_ctx.$slots.status ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
197
|
+
vue.renderSlot(_ctx.$slots, "status")
|
|
198
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
193
199
|
]),
|
|
194
|
-
vue.createElementVNode("div",
|
|
195
|
-
__props.viewport === "mobile" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
200
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
201
|
+
__props.viewport === "mobile" && __props.deviceSimulator ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
196
202
|
(vue.openBlock(true), vue.createElementBlock(
|
|
197
203
|
vue.Fragment,
|
|
198
204
|
null,
|
|
@@ -203,13 +209,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
203
209
|
class: vue.normalizeClass(["yc-chat-studio__device-pill", { "is-active": preset.id === activeDevice.value.id }]),
|
|
204
210
|
"data-testid": `device-preset-${preset.id}`,
|
|
205
211
|
onClick: ($event) => selectDevice(preset.id)
|
|
206
|
-
}, vue.toDisplayString(preset.label), 11,
|
|
212
|
+
}, vue.toDisplayString(preset.label), 11, _hoisted_9);
|
|
207
213
|
}),
|
|
208
214
|
128
|
|
209
215
|
/* KEYED_FRAGMENT */
|
|
210
216
|
))
|
|
211
217
|
])) : vue.createCommentVNode("v-if", true),
|
|
212
|
-
vue.
|
|
218
|
+
__props.showViewportSwitch ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
213
219
|
vue.createElementVNode("button", {
|
|
214
220
|
type: "button",
|
|
215
221
|
role: "tab",
|
|
@@ -217,7 +223,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
217
223
|
"data-testid": "viewport-web",
|
|
218
224
|
class: vue.normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "web" }]),
|
|
219
225
|
onClick: _cache[1] || (_cache[1] = ($event) => switchViewport("web"))
|
|
220
|
-
}, [..._cache[
|
|
226
|
+
}, [..._cache[9] || (_cache[9] = [
|
|
221
227
|
vue.createElementVNode(
|
|
222
228
|
"svg",
|
|
223
229
|
{
|
|
@@ -252,7 +258,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
252
258
|
-1
|
|
253
259
|
/* CACHED */
|
|
254
260
|
)
|
|
255
|
-
])], 10,
|
|
261
|
+
])], 10, _hoisted_11),
|
|
256
262
|
vue.createElementVNode("button", {
|
|
257
263
|
type: "button",
|
|
258
264
|
role: "tab",
|
|
@@ -260,7 +266,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
260
266
|
"data-testid": "viewport-mobile",
|
|
261
267
|
class: vue.normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "mobile" }]),
|
|
262
268
|
onClick: _cache[2] || (_cache[2] = ($event) => switchViewport("mobile"))
|
|
263
|
-
}, [..._cache[
|
|
269
|
+
}, [..._cache[10] || (_cache[10] = [
|
|
264
270
|
vue.createElementVNode(
|
|
265
271
|
"svg",
|
|
266
272
|
{
|
|
@@ -295,8 +301,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
295
301
|
-1
|
|
296
302
|
/* CACHED */
|
|
297
303
|
)
|
|
298
|
-
])], 10,
|
|
299
|
-
]),
|
|
304
|
+
])], 10, _hoisted_12)
|
|
305
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
300
306
|
vue.createElementVNode("button", {
|
|
301
307
|
type: "button",
|
|
302
308
|
class: "yc-chat-studio__ghost-btn",
|
|
@@ -312,7 +318,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
312
318
|
class: vue.normalizeClass({ "is-spinning": __props.refreshing }),
|
|
313
319
|
"aria-hidden": "true"
|
|
314
320
|
},
|
|
315
|
-
[..._cache[
|
|
321
|
+
[..._cache[11] || (_cache[11] = [
|
|
316
322
|
vue.createElementVNode(
|
|
317
323
|
"path",
|
|
318
324
|
{
|
|
@@ -330,17 +336,18 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
330
336
|
2
|
|
331
337
|
/* CLASS */
|
|
332
338
|
)),
|
|
333
|
-
_cache[
|
|
339
|
+
_cache[12] || (_cache[12] = vue.createElementVNode(
|
|
334
340
|
"span",
|
|
335
341
|
null,
|
|
336
342
|
"\u5237\u65B0",
|
|
337
343
|
-1
|
|
338
344
|
/* CACHED */
|
|
339
345
|
))
|
|
340
|
-
], 8,
|
|
346
|
+
], 8, _hoisted_13)
|
|
341
347
|
])
|
|
342
|
-
]),
|
|
343
|
-
|
|
348
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
349
|
+
vue.createCommentVNode(" Web \u7AEF\uFF1A\u684C\u9762\u53CC\u680F\u5DE5\u4F5C\u53F0\uFF08\u5DE6\u4FA7\u5E38\u9A7B\u53EF\u6298\u53E0\u4FA7\u680F + \u53F3\u4FA7\u4E3B\u5BF9\u8BDD\u533A\uFF09 "),
|
|
350
|
+
__props.viewport === "web" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
344
351
|
vue.createElementVNode(
|
|
345
352
|
"div",
|
|
346
353
|
{
|
|
@@ -352,7 +359,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
352
359
|
2
|
|
353
360
|
/* CLASS */
|
|
354
361
|
),
|
|
355
|
-
vue.createElementVNode("section",
|
|
362
|
+
vue.createElementVNode("section", _hoisted_15, [
|
|
356
363
|
vue.createElementVNode(
|
|
357
364
|
"div",
|
|
358
365
|
{
|
|
@@ -361,62 +368,240 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
361
368
|
class: "yc-chat-studio__stream message-viewport"
|
|
362
369
|
},
|
|
363
370
|
[
|
|
364
|
-
vue.createElementVNode("div",
|
|
371
|
+
vue.createElementVNode("div", _hoisted_16, [
|
|
365
372
|
vue.renderSlot(_ctx.$slots, "messages")
|
|
366
373
|
])
|
|
367
374
|
],
|
|
368
375
|
512
|
|
369
376
|
/* NEED_PATCH */
|
|
370
377
|
),
|
|
371
|
-
vue.createElementVNode("div",
|
|
372
|
-
vue.createElementVNode("div",
|
|
378
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
379
|
+
vue.createElementVNode("div", _hoisted_18, [
|
|
373
380
|
vue.renderSlot(_ctx.$slots, "composer")
|
|
374
381
|
])
|
|
375
382
|
])
|
|
376
383
|
])
|
|
377
|
-
])) : (vue.openBlock(), vue.createElementBlock(
|
|
378
|
-
vue.
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
"
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
384
|
+
])) : __props.deviceSimulator ? (vue.openBlock(), vue.createElementBlock(
|
|
385
|
+
vue.Fragment,
|
|
386
|
+
{ key: 3 },
|
|
387
|
+
[
|
|
388
|
+
vue.createCommentVNode(" Mobile \u7AEF\uFF08\u6A21\u62DF\u5668\u6A21\u5F0F\uFF0C\u517C\u5BB9\u663E\u5F0F\u4F20 deviceSimulator=true\uFF09 "),
|
|
389
|
+
vue.createElementVNode("div", _hoisted_19, [
|
|
390
|
+
vue.createElementVNode("div", _hoisted_20, [
|
|
391
|
+
vue.createVNode(mobileFrame_vue_vue_type_script_setup_true_lang.default, {
|
|
392
|
+
ref_key: "mobileFrameRef",
|
|
393
|
+
ref: mobileFrameRef,
|
|
394
|
+
device: activeDevice.value,
|
|
395
|
+
"agent-name": __props.agentName,
|
|
396
|
+
status: __props.status,
|
|
397
|
+
"status-label": __props.statusLabel,
|
|
398
|
+
connected: __props.connected,
|
|
399
|
+
"session-count": __props.sessionCount,
|
|
400
|
+
caption: __props.caption,
|
|
401
|
+
onCreate: _cache[4] || (_cache[4] = ($event) => emit("create")),
|
|
402
|
+
onRefresh: _cache[5] || (_cache[5] = ($event) => emit("refresh"))
|
|
403
|
+
}, {
|
|
404
|
+
drawer: vue.withCtx(() => [
|
|
405
|
+
vue.renderSlot(_ctx.$slots, "sidebar")
|
|
406
|
+
]),
|
|
407
|
+
footer: vue.withCtx(() => [
|
|
408
|
+
vue.renderSlot(_ctx.$slots, "composer")
|
|
409
|
+
]),
|
|
410
|
+
default: vue.withCtx(() => [
|
|
411
|
+
vue.createElementVNode(
|
|
412
|
+
"div",
|
|
413
|
+
{
|
|
414
|
+
ref_key: "mobileScrollRef",
|
|
415
|
+
ref: mobileScrollRef,
|
|
416
|
+
class: "yc-chat-studio__mobile-stream message-viewport"
|
|
417
|
+
},
|
|
418
|
+
[
|
|
419
|
+
vue.renderSlot(_ctx.$slots, "messages")
|
|
420
|
+
],
|
|
421
|
+
512
|
|
422
|
+
/* NEED_PATCH */
|
|
423
|
+
)
|
|
424
|
+
]),
|
|
425
|
+
_: 3
|
|
426
|
+
/* FORWARDED */
|
|
427
|
+
}, 8, ["device", "agent-name", "status", "status-label", "connected", "session-count", "caption"])
|
|
428
|
+
])
|
|
429
|
+
])
|
|
430
|
+
],
|
|
431
|
+
2112
|
|
432
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
433
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
434
|
+
vue.Fragment,
|
|
435
|
+
{ key: 4 },
|
|
436
|
+
[
|
|
437
|
+
vue.createCommentVNode(" Mobile \u7AEF\uFF08\u539F\u751F H5 \u5F62\u6001\uFF1A\u9876\u90E8\u6C49\u5821\u62BD\u5C49\u5BFC\u822A + \u5168\u5BBD\u6D88\u606F\u6D41 + \u8D34\u5E95\u7D27\u51D1\u8F93\u5165\u533A\uFF09 "),
|
|
438
|
+
vue.createElementVNode("div", _hoisted_21, [
|
|
439
|
+
vue.createElementVNode("header", _hoisted_22, [
|
|
440
|
+
vue.createElementVNode("button", {
|
|
441
|
+
type: "button",
|
|
442
|
+
class: "yc-chat-studio__icon-btn",
|
|
443
|
+
"aria-label": "\u6253\u5F00\u4F1A\u8BDD\u62BD\u5C49",
|
|
444
|
+
"data-testid": "mobile-drawer-trigger",
|
|
445
|
+
onClick: _cache[6] || (_cache[6] = ($event) => mobileDrawerOpen.value = true)
|
|
446
|
+
}, [
|
|
447
|
+
_cache[13] || (_cache[13] = vue.createElementVNode(
|
|
448
|
+
"svg",
|
|
449
|
+
{
|
|
450
|
+
viewBox: "0 0 16 16",
|
|
451
|
+
fill: "none",
|
|
452
|
+
"aria-hidden": "true"
|
|
453
|
+
},
|
|
454
|
+
[
|
|
455
|
+
vue.createElementVNode("path", {
|
|
456
|
+
d: "M2.5 4.25H13.5M2.5 8H10.5M2.5 11.75H13.5",
|
|
457
|
+
stroke: "currentColor",
|
|
458
|
+
"stroke-width": "1.45",
|
|
459
|
+
"stroke-linecap": "round"
|
|
460
|
+
})
|
|
461
|
+
],
|
|
462
|
+
-1
|
|
463
|
+
/* CACHED */
|
|
464
|
+
)),
|
|
465
|
+
__props.sessionCount > 0 ? (vue.openBlock(), vue.createElementBlock(
|
|
466
|
+
"span",
|
|
467
|
+
_hoisted_23,
|
|
468
|
+
vue.toDisplayString(__props.sessionCount > 99 ? "99+" : __props.sessionCount),
|
|
469
|
+
1
|
|
470
|
+
/* TEXT */
|
|
471
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
472
|
+
]),
|
|
473
|
+
vue.createElementVNode("div", _hoisted_24, [
|
|
474
|
+
vue.createElementVNode(
|
|
475
|
+
"span",
|
|
476
|
+
_hoisted_25,
|
|
477
|
+
vue.toDisplayString(__props.agentName || "\u5BF9\u8BDD"),
|
|
478
|
+
1
|
|
479
|
+
/* TEXT */
|
|
480
|
+
),
|
|
481
|
+
__props.statusLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_26, [
|
|
482
|
+
vue.createElementVNode(
|
|
483
|
+
"span",
|
|
484
|
+
{
|
|
485
|
+
class: vue.normalizeClass(["yc-chat-studio__mobile-dot", `is-${__props.status}`])
|
|
486
|
+
},
|
|
487
|
+
null,
|
|
488
|
+
2
|
|
489
|
+
/* CLASS */
|
|
490
|
+
),
|
|
491
|
+
vue.createElementVNode(
|
|
492
|
+
"span",
|
|
493
|
+
null,
|
|
494
|
+
vue.toDisplayString(__props.statusLabel),
|
|
495
|
+
1
|
|
496
|
+
/* TEXT */
|
|
497
|
+
)
|
|
498
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
499
|
+
]),
|
|
500
|
+
vue.createElementVNode("div", _hoisted_27, [
|
|
501
|
+
vue.createElementVNode("button", {
|
|
502
|
+
type: "button",
|
|
503
|
+
class: "yc-chat-studio__icon-btn",
|
|
504
|
+
"aria-label": "\u65B0\u5EFA\u4F1A\u8BDD",
|
|
505
|
+
disabled: !__props.connected,
|
|
506
|
+
onClick: _cache[7] || (_cache[7] = ($event) => emit("create"))
|
|
507
|
+
}, [..._cache[14] || (_cache[14] = [
|
|
508
|
+
vue.createElementVNode(
|
|
509
|
+
"svg",
|
|
510
|
+
{
|
|
511
|
+
viewBox: "0 0 16 16",
|
|
512
|
+
fill: "none",
|
|
513
|
+
"aria-hidden": "true"
|
|
514
|
+
},
|
|
515
|
+
[
|
|
516
|
+
vue.createElementVNode("path", {
|
|
517
|
+
d: "M8 3.25V12.75M3.25 8H12.75",
|
|
518
|
+
stroke: "currentColor",
|
|
519
|
+
"stroke-width": "1.5",
|
|
520
|
+
"stroke-linecap": "round"
|
|
521
|
+
})
|
|
522
|
+
],
|
|
523
|
+
-1
|
|
524
|
+
/* CACHED */
|
|
525
|
+
)
|
|
526
|
+
])], 8, _hoisted_28)
|
|
527
|
+
])
|
|
393
528
|
]),
|
|
394
|
-
|
|
529
|
+
_ctx.$slots.toolbar ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
|
|
530
|
+
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
531
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
532
|
+
vue.createElementVNode(
|
|
533
|
+
"div",
|
|
534
|
+
{
|
|
535
|
+
ref_key: "mobileScrollRef",
|
|
536
|
+
ref: mobileScrollRef,
|
|
537
|
+
class: "yc-chat-studio__mobile-stream message-viewport"
|
|
538
|
+
},
|
|
539
|
+
[
|
|
540
|
+
vue.renderSlot(_ctx.$slots, "messages")
|
|
541
|
+
],
|
|
542
|
+
512
|
|
543
|
+
/* NEED_PATCH */
|
|
544
|
+
),
|
|
545
|
+
vue.createElementVNode("div", _hoisted_30, [
|
|
395
546
|
vue.renderSlot(_ctx.$slots, "composer")
|
|
396
547
|
]),
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
548
|
+
mobileDrawerOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
549
|
+
key: 1,
|
|
550
|
+
class: "yc-chat-studio__mobile-drawer-mask",
|
|
551
|
+
"data-testid": "mobile-drawer",
|
|
552
|
+
onClick: vue.withModifiers(closeMobileDrawer, ["self"])
|
|
553
|
+
}, [
|
|
554
|
+
vue.createElementVNode("aside", _hoisted_31, [
|
|
555
|
+
vue.createElementVNode("div", { class: "yc-chat-studio__mobile-drawer-top" }, [
|
|
556
|
+
_cache[16] || (_cache[16] = vue.createElementVNode(
|
|
557
|
+
"span",
|
|
558
|
+
null,
|
|
559
|
+
"\u5386\u53F2\u4F1A\u8BDD",
|
|
560
|
+
-1
|
|
561
|
+
/* CACHED */
|
|
562
|
+
)),
|
|
563
|
+
vue.createElementVNode("button", {
|
|
564
|
+
type: "button",
|
|
565
|
+
class: "yc-chat-studio__icon-btn",
|
|
566
|
+
"aria-label": "\u5173\u95ED\u4F1A\u8BDD\u62BD\u5C49",
|
|
567
|
+
onClick: closeMobileDrawer
|
|
568
|
+
}, [..._cache[15] || (_cache[15] = [
|
|
569
|
+
vue.createElementVNode(
|
|
570
|
+
"svg",
|
|
571
|
+
{
|
|
572
|
+
viewBox: "0 0 16 16",
|
|
573
|
+
fill: "none",
|
|
574
|
+
"aria-hidden": "true"
|
|
575
|
+
},
|
|
576
|
+
[
|
|
577
|
+
vue.createElementVNode("path", {
|
|
578
|
+
d: "M4 4L12 12M12 4L4 12",
|
|
579
|
+
stroke: "currentColor",
|
|
580
|
+
"stroke-width": "1.5",
|
|
581
|
+
"stroke-linecap": "round"
|
|
582
|
+
})
|
|
583
|
+
],
|
|
584
|
+
-1
|
|
585
|
+
/* CACHED */
|
|
586
|
+
)
|
|
587
|
+
])])
|
|
588
|
+
]),
|
|
589
|
+
vue.createElementVNode("div", {
|
|
590
|
+
class: "yc-chat-studio__mobile-drawer-body",
|
|
591
|
+
onClick: closeMobileDrawer
|
|
592
|
+
}, [
|
|
593
|
+
vue.renderSlot(_ctx.$slots, "sidebar")
|
|
594
|
+
])
|
|
595
|
+
])
|
|
596
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
597
|
+
])
|
|
598
|
+
],
|
|
599
|
+
2112
|
|
600
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
601
|
+
))
|
|
417
602
|
],
|
|
418
|
-
|
|
419
|
-
/* CLASS */
|
|
603
|
+
6
|
|
604
|
+
/* CLASS, STYLE */
|
|
420
605
|
);
|
|
421
606
|
};
|
|
422
607
|
}
|