yc-agent-ui 1.2.1 → 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/index.d.ts +6 -6
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +6 -6
- package/es/components/dialog-form/src/index.vue.d.ts +6 -6
- package/es/components/display-item/index.d.ts +21 -21
- package/es/components/display-item/src/index.vue.d.ts +19 -19
- package/es/components/drawer-form/index.d.ts +18 -18
- package/es/components/drawer-form/src/index.vue.d.ts +10 -10
- package/es/components/form/index.d.ts +12 -12
- package/es/components/form/src/form-content.vue.d.ts +12 -12
- package/es/components/form/src/index.vue.d.ts +12 -12
- package/es/components/form-item/index.d.ts +12 -12
- package/es/components/form-item/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +258 -258
- package/es/components/page/src/index.vue.d.ts +90 -90
- 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 +78 -78
- package/es/components/search/src/index.vue.d.ts +30 -30
- package/es/components/table/src/table-column.vue.d.ts +46 -46
- package/es/components/yc-ai-chat/index.d.ts +1 -0
- package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/select.vue.d.ts +1 -0
- package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +10 -1
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +3 -0
- package/es/components/yc-plus-page/src/index.vue.d.ts +264 -264
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +144 -144
- 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 +21 -13
- package/es/packages/components/yc-ai-chat/src/select2.vue.mjs +9 -4
- package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +5 -3
- package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +50 -45
- package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +271 -56
- 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 +3925 -641
- package/index.min.js +42 -39
- package/index.min.mjs +39 -36
- package/index.mjs +4001 -727
- 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/index.d.ts +6 -6
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +6 -6
- package/lib/components/dialog-form/src/index.vue.d.ts +6 -6
- package/lib/components/display-item/index.d.ts +21 -21
- package/lib/components/display-item/src/index.vue.d.ts +19 -19
- package/lib/components/drawer-form/index.d.ts +18 -18
- package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
- package/lib/components/form/index.d.ts +12 -12
- package/lib/components/form/src/form-content.vue.d.ts +12 -12
- package/lib/components/form/src/index.vue.d.ts +12 -12
- package/lib/components/form-item/index.d.ts +12 -12
- package/lib/components/form-item/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +258 -258
- package/lib/components/page/src/index.vue.d.ts +90 -90
- 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 +78 -78
- package/lib/components/search/src/index.vue.d.ts +30 -30
- package/lib/components/table/src/table-column.vue.d.ts +46 -46
- package/lib/components/yc-ai-chat/index.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/select.vue.d.ts +1 -0
- package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +10 -1
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +3 -0
- package/lib/components/yc-plus-page/src/index.vue.d.ts +264 -264
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +144 -144
- package/lib/index.css +8 -8
- 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 +21 -13
- package/lib/packages/components/yc-ai-chat/src/select2.vue.js +9 -4
- package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +5 -3
- package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +49 -44
- package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +270 -55
- 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 +774 -10
- 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 = {
|
|
@@ -30,6 +33,7 @@ const _hoisted_8 = {
|
|
|
30
33
|
};
|
|
31
34
|
const _hoisted_9 = ["data-testid", "onClick"];
|
|
32
35
|
const _hoisted_10 = {
|
|
36
|
+
key: 1,
|
|
33
37
|
class: "yc-chat-studio__segmented",
|
|
34
38
|
role: "tablist",
|
|
35
39
|
"aria-label": "\u7EC8\u7AEF\u9884\u89C8\u5207\u6362"
|
|
@@ -38,7 +42,7 @@ const _hoisted_11 = ["aria-selected"];
|
|
|
38
42
|
const _hoisted_12 = ["aria-selected"];
|
|
39
43
|
const _hoisted_13 = ["disabled"];
|
|
40
44
|
const _hoisted_14 = {
|
|
41
|
-
key:
|
|
45
|
+
key: 2,
|
|
42
46
|
class: "yc-chat-studio__web-body chat-workspace"
|
|
43
47
|
};
|
|
44
48
|
const _hoisted_15 = { class: "yc-chat-studio__main conversation-panel" };
|
|
@@ -46,11 +50,34 @@ const _hoisted_16 = { class: "yc-chat-studio__stream-inner" };
|
|
|
46
50
|
const _hoisted_17 = { class: "yc-chat-studio__composer-dock" };
|
|
47
51
|
const _hoisted_18 = { class: "yc-chat-studio__composer-inner" };
|
|
48
52
|
const _hoisted_19 = {
|
|
49
|
-
key: 2,
|
|
50
53
|
class: "yc-chat-studio__mobile-stage",
|
|
51
54
|
"data-testid": "mobile-stage"
|
|
52
55
|
};
|
|
53
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" };
|
|
54
81
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
55
82
|
...{
|
|
56
83
|
name: "YcChatStudio"
|
|
@@ -66,13 +93,20 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
66
93
|
connected: { type: Boolean, default: false },
|
|
67
94
|
refreshing: { type: Boolean, default: false },
|
|
68
95
|
sessionCount: { default: 0 },
|
|
69
|
-
caption: { default: "" }
|
|
96
|
+
caption: { default: "" },
|
|
97
|
+
accentColor: { default: "" },
|
|
98
|
+
showViewportSwitch: { type: Boolean, default: false },
|
|
99
|
+
deviceSimulator: { type: Boolean, default: false }
|
|
70
100
|
},
|
|
71
101
|
emits: ["update:viewport", "update:deviceId", "refresh", "create"],
|
|
72
102
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73
103
|
const props = __props;
|
|
104
|
+
const accentStyle = vue.computed(
|
|
105
|
+
() => props.accentColor ? { "--yc-chat-accent": props.accentColor } : void 0
|
|
106
|
+
);
|
|
74
107
|
const emit = __emit;
|
|
75
108
|
const sidebarCollapsed = vue.ref(false);
|
|
109
|
+
const mobileDrawerOpen = vue.ref(false);
|
|
76
110
|
const webScrollRef = vue.ref(null);
|
|
77
111
|
const mobileScrollRef = vue.ref(null);
|
|
78
112
|
const mobileFrameRef = vue.ref(null);
|
|
@@ -99,6 +133,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
99
133
|
}
|
|
100
134
|
function closeMobileDrawer() {
|
|
101
135
|
var _a;
|
|
136
|
+
mobileDrawerOpen.value = false;
|
|
102
137
|
(_a = mobileFrameRef.value) == null ? void 0 : _a.closeDrawer();
|
|
103
138
|
}
|
|
104
139
|
__expose({
|
|
@@ -110,13 +145,15 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
110
145
|
return vue.openBlock(), vue.createElementBlock(
|
|
111
146
|
"div",
|
|
112
147
|
{
|
|
113
|
-
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)
|
|
114
150
|
},
|
|
115
151
|
[
|
|
116
152
|
_ctx.$slots.notice ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
117
153
|
vue.renderSlot(_ctx.$slots, "notice")
|
|
118
154
|
])) : vue.createCommentVNode("v-if", true),
|
|
119
|
-
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, [
|
|
120
157
|
vue.createElementVNode("div", _hoisted_3, [
|
|
121
158
|
__props.viewport === "web" ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
122
159
|
key: 0,
|
|
@@ -125,7 +162,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
125
162
|
"aria-label": sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
|
|
126
163
|
title: sidebarCollapsed.value ? "\u5C55\u5F00\u4F1A\u8BDD\u4FA7\u680F" : "\u6536\u8D77\u4F1A\u8BDD\u4FA7\u680F",
|
|
127
164
|
onClick: _cache[0] || (_cache[0] = ($event) => sidebarCollapsed.value = !sidebarCollapsed.value)
|
|
128
|
-
}, [..._cache[
|
|
165
|
+
}, [..._cache[8] || (_cache[8] = [
|
|
129
166
|
vue.createElementVNode(
|
|
130
167
|
"svg",
|
|
131
168
|
{
|
|
@@ -161,7 +198,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
161
198
|
])) : vue.createCommentVNode("v-if", true)
|
|
162
199
|
]),
|
|
163
200
|
vue.createElementVNode("div", _hoisted_7, [
|
|
164
|
-
__props.viewport === "mobile" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
201
|
+
__props.viewport === "mobile" && __props.deviceSimulator ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
165
202
|
(vue.openBlock(true), vue.createElementBlock(
|
|
166
203
|
vue.Fragment,
|
|
167
204
|
null,
|
|
@@ -178,7 +215,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
215
|
/* KEYED_FRAGMENT */
|
|
179
216
|
))
|
|
180
217
|
])) : vue.createCommentVNode("v-if", true),
|
|
181
|
-
vue.
|
|
218
|
+
__props.showViewportSwitch ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
182
219
|
vue.createElementVNode("button", {
|
|
183
220
|
type: "button",
|
|
184
221
|
role: "tab",
|
|
@@ -186,7 +223,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
186
223
|
"data-testid": "viewport-web",
|
|
187
224
|
class: vue.normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "web" }]),
|
|
188
225
|
onClick: _cache[1] || (_cache[1] = ($event) => switchViewport("web"))
|
|
189
|
-
}, [..._cache[
|
|
226
|
+
}, [..._cache[9] || (_cache[9] = [
|
|
190
227
|
vue.createElementVNode(
|
|
191
228
|
"svg",
|
|
192
229
|
{
|
|
@@ -229,7 +266,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
229
266
|
"data-testid": "viewport-mobile",
|
|
230
267
|
class: vue.normalizeClass(["yc-chat-studio__segment-btn", { "is-active": __props.viewport === "mobile" }]),
|
|
231
268
|
onClick: _cache[2] || (_cache[2] = ($event) => switchViewport("mobile"))
|
|
232
|
-
}, [..._cache[
|
|
269
|
+
}, [..._cache[10] || (_cache[10] = [
|
|
233
270
|
vue.createElementVNode(
|
|
234
271
|
"svg",
|
|
235
272
|
{
|
|
@@ -265,7 +302,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
265
302
|
/* CACHED */
|
|
266
303
|
)
|
|
267
304
|
])], 10, _hoisted_12)
|
|
268
|
-
]),
|
|
305
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
269
306
|
vue.createElementVNode("button", {
|
|
270
307
|
type: "button",
|
|
271
308
|
class: "yc-chat-studio__ghost-btn",
|
|
@@ -281,7 +318,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
281
318
|
class: vue.normalizeClass({ "is-spinning": __props.refreshing }),
|
|
282
319
|
"aria-hidden": "true"
|
|
283
320
|
},
|
|
284
|
-
[..._cache[
|
|
321
|
+
[..._cache[11] || (_cache[11] = [
|
|
285
322
|
vue.createElementVNode(
|
|
286
323
|
"path",
|
|
287
324
|
{
|
|
@@ -299,7 +336,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
299
336
|
2
|
|
300
337
|
/* CLASS */
|
|
301
338
|
)),
|
|
302
|
-
_cache[
|
|
339
|
+
_cache[12] || (_cache[12] = vue.createElementVNode(
|
|
303
340
|
"span",
|
|
304
341
|
null,
|
|
305
342
|
"\u5237\u65B0",
|
|
@@ -308,7 +345,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
308
345
|
))
|
|
309
346
|
], 8, _hoisted_13)
|
|
310
347
|
])
|
|
311
|
-
]),
|
|
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 "),
|
|
312
350
|
__props.viewport === "web" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
313
351
|
vue.createElementVNode(
|
|
314
352
|
"div",
|
|
@@ -343,50 +381,227 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
343
381
|
])
|
|
344
382
|
])
|
|
345
383
|
])
|
|
346
|
-
])) : (vue.openBlock(), vue.createElementBlock(
|
|
347
|
-
vue.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
"
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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
|
+
])
|
|
363
528
|
]),
|
|
364
|
-
|
|
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, [
|
|
365
546
|
vue.renderSlot(_ctx.$slots, "composer")
|
|
366
547
|
]),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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
|
+
))
|
|
387
602
|
],
|
|
388
|
-
|
|
389
|
-
/* CLASS */
|
|
603
|
+
6
|
|
604
|
+
/* CLASS, STYLE */
|
|
390
605
|
);
|
|
391
606
|
};
|
|
392
607
|
}
|
|
@@ -10,7 +10,7 @@ const capability = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "yc-gradient-card-01",
|
|
12
12
|
title: "\u65B9\u6848 01 \xB7 \u8212\u7F13\u89E3\u538B (\u73BB\u7483\u62DF\u6001)",
|
|
13
|
-
categories: ["\
|
|
13
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
14
14
|
component: index.YcGradientCard,
|
|
15
15
|
props: {
|
|
16
16
|
palette: "01",
|
|
@@ -25,7 +25,7 @@ const capability = {
|
|
|
25
25
|
{
|
|
26
26
|
id: "yc-gradient-card-02",
|
|
27
27
|
title: "\u65B9\u6848 02 \xB7 \u5FC3\u52A8\u6CBB\u6108 (\u67D4\u5149\u5149\u6655)",
|
|
28
|
-
categories: ["\
|
|
28
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
29
29
|
component: index.YcGradientCard,
|
|
30
30
|
props: {
|
|
31
31
|
palette: "02",
|
|
@@ -40,7 +40,7 @@ const capability = {
|
|
|
40
40
|
{
|
|
41
41
|
id: "yc-gradient-card-03",
|
|
42
42
|
title: "\u65B9\u6848 03 \xB7 \u751F\u673A\u76CE\u7136 (\u65E5\u5149\u6E10\u53D8)",
|
|
43
|
-
categories: ["\
|
|
43
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
44
44
|
component: index.YcGradientCard,
|
|
45
45
|
props: {
|
|
46
46
|
palette: "03",
|
|
@@ -55,7 +55,7 @@ const capability = {
|
|
|
55
55
|
{
|
|
56
56
|
id: "yc-gradient-card-04",
|
|
57
57
|
title: "\u65B9\u6848 04 \xB7 \u6D6A\u6F2B\u6CE1\u6CE1 (\u6D41\u5149\u6BDB\u73BB\u7483)",
|
|
58
|
-
categories: ["\
|
|
58
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
59
59
|
component: index.YcGradientCard,
|
|
60
60
|
props: {
|
|
61
61
|
palette: "04",
|
|
@@ -70,7 +70,7 @@ const capability = {
|
|
|
70
70
|
{
|
|
71
71
|
id: "yc-gradient-card-05",
|
|
72
72
|
title: "\u65B9\u6848 05 \xB7 \u590F\u65E5\u6E05\u51C9 (\u5FAE\u5149\u8FB9\u6846)",
|
|
73
|
-
categories: ["\
|
|
73
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
74
74
|
component: index.YcGradientCard,
|
|
75
75
|
props: {
|
|
76
76
|
palette: "05",
|
|
@@ -85,7 +85,7 @@ const capability = {
|
|
|
85
85
|
{
|
|
86
86
|
id: "yc-gradient-card-06",
|
|
87
87
|
title: "\u65B9\u6848 06 \xB7 \u6668\u5149\u62A4\u773C (\u7EB8\u8D28\u6E29\u6DA6)",
|
|
88
|
-
categories: ["\
|
|
88
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
89
89
|
component: index.YcGradientCard,
|
|
90
90
|
props: {
|
|
91
91
|
palette: "06",
|
|
@@ -100,7 +100,7 @@ const capability = {
|
|
|
100
100
|
{
|
|
101
101
|
id: "yc-gradient-card-07",
|
|
102
102
|
title: "\u65B9\u6848 07 \xB7 \u70DF\u96E8\u6C5F\u5357 (\u6C34\u58A8\u5929\u9752)",
|
|
103
|
-
categories: ["\
|
|
103
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
104
104
|
component: index.YcGradientCard,
|
|
105
105
|
props: {
|
|
106
106
|
palette: "07",
|
|
@@ -115,7 +115,7 @@ const capability = {
|
|
|
115
115
|
{
|
|
116
116
|
id: "yc-gradient-card-10",
|
|
117
117
|
title: "\u65B9\u6848 10 \xB7 \u5178\u96C5\u8F7B\u5962 (\u5C0A\u4EAB\u9EC4\u7D2B)",
|
|
118
|
-
categories: ["\
|
|
118
|
+
categories: ["\u6E10\u53D8\u914D\u8272"],
|
|
119
119
|
component: index.YcGradientCard,
|
|
120
120
|
props: {
|
|
121
121
|
palette: "10",
|
|
@@ -44,6 +44,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
const props = __props;
|
|
45
45
|
const emit = __emit;
|
|
46
46
|
const focused = vue.ref(false);
|
|
47
|
+
const draft = vue.ref("");
|
|
47
48
|
const normalize = (val) => {
|
|
48
49
|
let next = val;
|
|
49
50
|
if (props.min !== void 0 && next < props.min) next = props.min;
|
|
@@ -54,10 +55,18 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
54
55
|
const current = vue.computed(
|
|
55
56
|
() => props.modelValue === null || props.modelValue === void 0 || Number.isNaN(Number(props.modelValue)) ? null : Number(props.modelValue)
|
|
56
57
|
);
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
return props.precision > 0 ?
|
|
60
|
-
}
|
|
58
|
+
const formatSettled = (val) => {
|
|
59
|
+
if (val === null) return "";
|
|
60
|
+
return props.precision > 0 ? val.toFixed(props.precision) : String(val);
|
|
61
|
+
};
|
|
62
|
+
const displayText = vue.computed(() => focused.value ? draft.value : formatSettled(current.value));
|
|
63
|
+
vue.watch(
|
|
64
|
+
() => props.modelValue,
|
|
65
|
+
() => {
|
|
66
|
+
if (!focused.value) draft.value = formatSettled(current.value);
|
|
67
|
+
},
|
|
68
|
+
{ immediate: true }
|
|
69
|
+
);
|
|
61
70
|
const canDecrease = vue.computed(() => {
|
|
62
71
|
var _a;
|
|
63
72
|
return props.min === void 0 || ((_a = current.value) != null ? _a : 0) > props.min;
|
|
@@ -71,27 +80,42 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
80
|
if (props.disabled || props.readonly) return;
|
|
72
81
|
const base = (_b = (_a = current.value) != null ? _a : props.min) != null ? _b : 0;
|
|
73
82
|
const next = normalize(base + dir * props.step);
|
|
83
|
+
draft.value = formatSettled(next);
|
|
74
84
|
emit("update:modelValue", next);
|
|
75
85
|
emit("change", next);
|
|
76
86
|
};
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
const sanitizeDraft = (raw) => {
|
|
88
|
+
let next = raw.replace(/[^\d.-]/g, "");
|
|
89
|
+
const negative = next.startsWith("-");
|
|
90
|
+
next = next.replace(/-/g, "");
|
|
91
|
+
const dot = next.indexOf(".");
|
|
92
|
+
if (dot >= 0) {
|
|
93
|
+
next = next.slice(0, dot + 1) + next.slice(dot + 1).replace(/\./g, "");
|
|
82
94
|
}
|
|
95
|
+
return `${negative ? "-" : ""}${next}`;
|
|
96
|
+
};
|
|
97
|
+
const parseDraft = (raw) => {
|
|
98
|
+
if (!raw || raw === "-" || raw === "." || raw === "-.") return null;
|
|
83
99
|
const num = Number(raw);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
100
|
+
return Number.isFinite(num) ? num : null;
|
|
101
|
+
};
|
|
102
|
+
const onFocus = () => {
|
|
103
|
+
focused.value = true;
|
|
104
|
+
draft.value = current.value === null ? "" : String(current.value);
|
|
105
|
+
};
|
|
106
|
+
const onInput = (event) => {
|
|
107
|
+
const raw = sanitizeDraft(event.target.value);
|
|
108
|
+
draft.value = raw;
|
|
109
|
+
const parsed = parseDraft(raw);
|
|
110
|
+
emit("update:modelValue", parsed);
|
|
87
111
|
};
|
|
88
112
|
const onBlur = () => {
|
|
89
113
|
focused.value = false;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
114
|
+
const parsed = parseDraft(draft.value);
|
|
115
|
+
const settled = parsed === null ? null : normalize(parsed);
|
|
116
|
+
draft.value = formatSettled(settled);
|
|
117
|
+
emit("update:modelValue", settled);
|
|
118
|
+
emit("change", settled);
|
|
95
119
|
};
|
|
96
120
|
return (_ctx, _cache) => {
|
|
97
121
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -123,7 +147,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
123
147
|
disabled: __props.disabled || __props.readonly || !canDecrease.value,
|
|
124
148
|
"aria-label": "\u51CF\u5C11",
|
|
125
149
|
onClick: _cache[0] || (_cache[0] = ($event) => stepBy(-1))
|
|
126
|
-
}, [..._cache[
|
|
150
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
127
151
|
vue.createElementVNode(
|
|
128
152
|
"svg",
|
|
129
153
|
{
|
|
@@ -153,11 +177,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
153
177
|
disabled: __props.disabled,
|
|
154
178
|
readonly: __props.readonly,
|
|
155
179
|
onInput,
|
|
156
|
-
onFocus
|
|
180
|
+
onFocus,
|
|
157
181
|
onBlur,
|
|
158
182
|
onKeydown: [
|
|
159
|
-
_cache[
|
|
160
|
-
_cache[
|
|
183
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => stepBy(1), ["prevent"]), ["up"])),
|
|
184
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => stepBy(-1), ["prevent"]), ["down"]))
|
|
161
185
|
]
|
|
162
186
|
}, null, 40, _hoisted_5),
|
|
163
187
|
__props.unit ? (vue.openBlock(), vue.createElementBlock(
|
|
@@ -173,8 +197,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
173
197
|
class: "yc-stepper__btn is-plus",
|
|
174
198
|
disabled: __props.disabled || __props.readonly || !canIncrease.value,
|
|
175
199
|
"aria-label": "\u589E\u52A0",
|
|
176
|
-
onClick: _cache[
|
|
177
|
-
}, [..._cache[
|
|
200
|
+
onClick: _cache[3] || (_cache[3] = ($event) => stepBy(1))
|
|
201
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
178
202
|
vue.createElementVNode(
|
|
179
203
|
"svg",
|
|
180
204
|
{
|
|
@@ -6,7 +6,7 @@ const GALLERY_CATEGORY_ORDER = [
|
|
|
6
6
|
"\u6811\u4E0E\u5BFC\u822A",
|
|
7
7
|
"\u5361\u7247\u4E0E\u5C55\u793A",
|
|
8
8
|
"\u56FE\u8868\u770B\u677F",
|
|
9
|
-
"\
|
|
9
|
+
"\u6E10\u53D8\u914D\u8272",
|
|
10
10
|
"\u95EE\u5377\u4E0E\u8868\u5355",
|
|
11
11
|
"\u64CD\u4F5C\u4E0E\u53CD\u9988"
|
|
12
12
|
];
|