yc-agent-ui 1.2.1 → 1.2.3
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 +29 -2
- package/es/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
- package/es/components/yc-ai-chat/src/type.d.ts +2 -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 +8 -8
- 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 +735 -150
- package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +452 -85
- 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 +5707 -1690
- package/index.min.js +41 -38
- package/index.min.mjs +38 -35
- package/index.mjs +5772 -1765
- 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 +29 -2
- package/lib/components/yc-ai-chat/src/studio.vue.d.ts +9 -0
- package/lib/components/yc-ai-chat/src/type.d.ts +2 -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 +12 -12
- 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 +734 -149
- package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +451 -84
- 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 +1281 -114
- package/theme-chalk/src/yc-data-table.scss +57 -42
- package/theme-chalk/src/yc-property-table.scss +35 -14
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var vueElementPlusX = require('vue-element-plus-x');
|
|
7
6
|
var presets = require('./presets.js');
|
|
8
7
|
|
|
9
8
|
const _hoisted_1 = {
|
|
@@ -12,34 +11,80 @@ const _hoisted_1 = {
|
|
|
12
11
|
};
|
|
13
12
|
const _hoisted_2 = { class: "yc-chat-sidebar__header rail-header" };
|
|
14
13
|
const _hoisted_3 = ["disabled"];
|
|
15
|
-
const _hoisted_4 = {
|
|
14
|
+
const _hoisted_4 = { class: "yc-chat-sidebar__create-icon" };
|
|
15
|
+
const _hoisted_5 = { class: "yc-chat-sidebar__create-label" };
|
|
16
|
+
const _hoisted_6 = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "yc-chat-sidebar__search"
|
|
18
19
|
};
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const _hoisted_7 = {
|
|
20
|
+
const _hoisted_7 = ["placeholder"];
|
|
21
|
+
const _hoisted_8 = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const _hoisted_9 = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const _hoisted_10 = {
|
|
30
30
|
key: 2,
|
|
31
31
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
32
32
|
};
|
|
33
|
-
const
|
|
33
|
+
const _hoisted_11 = {
|
|
34
34
|
key: 3,
|
|
35
35
|
class: "yc-chat-sidebar__empty empty-hint"
|
|
36
36
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
37
|
+
const _hoisted_12 = {
|
|
38
|
+
key: 4,
|
|
39
|
+
class: "yc-chat-sidebar__groups"
|
|
40
|
+
};
|
|
41
|
+
const _hoisted_13 = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "yc-chat-sidebar__archived-only-hint"
|
|
44
|
+
};
|
|
45
|
+
const _hoisted_14 = { class: "yc-chat-sidebar__group-label" };
|
|
46
|
+
const _hoisted_15 = { class: "yc-chat-sidebar__group-items" };
|
|
47
|
+
const _hoisted_16 = ["data-session-id", "title", "onClick"];
|
|
48
|
+
const _hoisted_17 = { class: "yc-chat-sidebar__item-title conversation-title" };
|
|
49
|
+
const _hoisted_18 = ["data-menu-trigger", "aria-expanded", "onClick"];
|
|
50
|
+
const _hoisted_19 = {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "yc-chat-sidebar__group yc-chat-sidebar__group--archived",
|
|
53
|
+
"data-testid": "archived-sessions-section"
|
|
54
|
+
};
|
|
55
|
+
const _hoisted_20 = ["aria-expanded"];
|
|
56
|
+
const _hoisted_21 = { class: "yc-chat-sidebar__archive-toggle-left" };
|
|
57
|
+
const _hoisted_22 = { class: "yc-chat-sidebar__archive-count" };
|
|
58
|
+
const _hoisted_23 = {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "yc-chat-sidebar__group-items"
|
|
61
|
+
};
|
|
62
|
+
const _hoisted_24 = ["data-session-id", "title", "onClick"];
|
|
63
|
+
const _hoisted_25 = { class: "yc-chat-sidebar__item-title conversation-title" };
|
|
64
|
+
const _hoisted_26 = ["data-menu-trigger", "aria-expanded", "onClick"];
|
|
65
|
+
const _hoisted_27 = {
|
|
66
|
+
key: 2,
|
|
67
|
+
class: "yc-chat-sidebar__more"
|
|
68
|
+
};
|
|
69
|
+
const _hoisted_28 = ["disabled"];
|
|
70
|
+
const _hoisted_29 = {
|
|
71
|
+
key: 0,
|
|
72
|
+
viewBox: "0 0 16 16",
|
|
73
|
+
fill: "none",
|
|
74
|
+
"aria-hidden": "true"
|
|
75
|
+
};
|
|
76
|
+
const _hoisted_30 = {
|
|
77
|
+
key: 1,
|
|
78
|
+
viewBox: "0 0 16 16",
|
|
79
|
+
fill: "none",
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
};
|
|
82
|
+
const _hoisted_31 = {
|
|
83
|
+
key: 2,
|
|
84
|
+
class: "yc-chat-sidebar__menu-divider",
|
|
85
|
+
role: "separator"
|
|
86
|
+
};
|
|
87
|
+
const _hoisted_32 = ["disabled"];
|
|
43
88
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
44
89
|
...{
|
|
45
90
|
name: "YcChatSidebar"
|
|
@@ -57,36 +102,162 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
102
|
emptyText: { default: "\u6682\u65E0\u4F1A\u8BDD" },
|
|
58
103
|
noResultText: { default: "\u6CA1\u6709\u5339\u914D\u7ED3\u679C" },
|
|
59
104
|
searchPlaceholder: { default: "\u641C\u7D22" },
|
|
60
|
-
untitledText: { default: "\u65B0\u4F1A\u8BDD" }
|
|
105
|
+
untitledText: { default: "\u65B0\u4F1A\u8BDD" },
|
|
106
|
+
archivedGroupTitle: { default: "\u5DF2\u5F52\u6863" },
|
|
107
|
+
showShare: { type: Boolean, default: true },
|
|
108
|
+
showArchive: { type: Boolean, default: true },
|
|
109
|
+
showDelete: { type: Boolean, default: true }
|
|
61
110
|
},
|
|
62
|
-
emits: ["select", "create", "delete", "load-more"],
|
|
111
|
+
emits: ["select", "create", "share", "archive", "unarchive", "delete", "action", "load-more"],
|
|
63
112
|
setup(__props, { emit: __emit }) {
|
|
64
113
|
const props = __props;
|
|
65
114
|
const emit = __emit;
|
|
66
115
|
const keyword = vue.ref("");
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
73
|
-
});
|
|
74
|
-
const conversationItems = vue.computed(
|
|
75
|
-
() => filteredSessions.value.map((item) => ({
|
|
116
|
+
const archivedExpanded = vue.ref(false);
|
|
117
|
+
const openMenuId = vue.ref("");
|
|
118
|
+
const menuRef = vue.ref(null);
|
|
119
|
+
const menuPosition = vue.ref({ top: 0, left: 0 });
|
|
120
|
+
const normalizedSessions = vue.computed(
|
|
121
|
+
() => props.sessions.map((item) => ({
|
|
76
122
|
id: item.id,
|
|
77
|
-
key: item.id,
|
|
78
123
|
label: item.title || props.untitledText,
|
|
79
124
|
group: presets.groupChatSessionByDate(item.updatedAt),
|
|
80
|
-
disabled: item.disabled,
|
|
81
|
-
|
|
125
|
+
disabled: Boolean(item.disabled),
|
|
126
|
+
archived: Boolean(item.archived),
|
|
127
|
+
timeText: item.updatedAt ? presets.formatChatSessionTime(item.updatedAt) : ""
|
|
82
128
|
}))
|
|
83
129
|
);
|
|
84
|
-
|
|
130
|
+
const filteredSessions = vue.computed(() => {
|
|
131
|
+
const query = keyword.value.trim().toLowerCase();
|
|
132
|
+
if (!query) return normalizedSessions.value;
|
|
133
|
+
return normalizedSessions.value.filter(
|
|
134
|
+
(item) => item.label.toLowerCase().includes(query)
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
const activeSessions = vue.computed(
|
|
138
|
+
() => filteredSessions.value.filter((item) => !item.archived)
|
|
139
|
+
);
|
|
140
|
+
const archivedSessions = vue.computed(
|
|
141
|
+
() => filteredSessions.value.filter((item) => item.archived)
|
|
142
|
+
);
|
|
143
|
+
const activeGroups = vue.computed(() => {
|
|
144
|
+
const groups = /* @__PURE__ */ new Map();
|
|
145
|
+
for (const item of activeSessions.value) {
|
|
146
|
+
const bucket = groups.get(item.group);
|
|
147
|
+
if (bucket) {
|
|
148
|
+
bucket.push(item);
|
|
149
|
+
} else {
|
|
150
|
+
groups.set(item.group, [item]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return Array.from(groups.entries()).map(([name, items]) => ({ name, items }));
|
|
154
|
+
});
|
|
155
|
+
const showArchivedList = vue.computed(
|
|
156
|
+
() => archivedExpanded.value || Boolean(keyword.value.trim()) || archivedSessions.value.some((item) => item.id === props.activeId)
|
|
157
|
+
);
|
|
158
|
+
const hasMenuActions = vue.computed(
|
|
159
|
+
() => props.showShare || props.showArchive || props.showDelete
|
|
160
|
+
);
|
|
161
|
+
const activeMenuSession = vue.computed(
|
|
162
|
+
() => {
|
|
163
|
+
var _a;
|
|
164
|
+
return (_a = normalizedSessions.value.find((item) => item.id === openMenuId.value)) != null ? _a : null;
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
const menuPositionStyle = vue.computed(() => ({
|
|
168
|
+
top: `${menuPosition.value.top}px`,
|
|
169
|
+
left: `${menuPosition.value.left}px`
|
|
170
|
+
}));
|
|
171
|
+
function closeMenu() {
|
|
172
|
+
if (!openMenuId.value) return;
|
|
173
|
+
openMenuId.value = "";
|
|
174
|
+
}
|
|
175
|
+
function positionMenuNearTrigger(triggerEl) {
|
|
85
176
|
var _a, _b;
|
|
86
|
-
const
|
|
177
|
+
const rect = triggerEl.getBoundingClientRect();
|
|
178
|
+
const menuWidth = ((_a = menuRef.value) == null ? void 0 : _a.offsetWidth) || 160;
|
|
179
|
+
const menuHeight = ((_b = menuRef.value) == null ? void 0 : _b.offsetHeight) || 148;
|
|
180
|
+
const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1280;
|
|
181
|
+
const viewportHeight = typeof window !== "undefined" ? window.innerHeight : 800;
|
|
182
|
+
let left = rect.right - menuWidth;
|
|
183
|
+
if (left + menuWidth > viewportWidth - 8) {
|
|
184
|
+
left = viewportWidth - menuWidth - 8;
|
|
185
|
+
}
|
|
186
|
+
if (left < 8) {
|
|
187
|
+
left = Math.min(rect.left, Math.max(8, viewportWidth - menuWidth - 8));
|
|
188
|
+
}
|
|
189
|
+
let top = rect.bottom + 4;
|
|
190
|
+
if (top + menuHeight > viewportHeight - 8 && rect.top - menuHeight - 4 >= 8) {
|
|
191
|
+
top = rect.top - menuHeight - 4;
|
|
192
|
+
}
|
|
193
|
+
menuPosition.value = { top: Math.round(top), left: Math.round(left) };
|
|
194
|
+
}
|
|
195
|
+
async function toggleMenu(item, event) {
|
|
196
|
+
if (!hasMenuActions.value) return;
|
|
197
|
+
if (openMenuId.value === item.id) {
|
|
198
|
+
closeMenu();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const triggerEl = event.currentTarget;
|
|
202
|
+
openMenuId.value = item.id;
|
|
203
|
+
if (triggerEl) {
|
|
204
|
+
positionMenuNearTrigger(triggerEl);
|
|
205
|
+
await vue.nextTick();
|
|
206
|
+
if (openMenuId.value === item.id) {
|
|
207
|
+
positionMenuNearTrigger(triggerEl);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function handleGlobalPointerDown(event) {
|
|
212
|
+
var _a;
|
|
213
|
+
if (!openMenuId.value) return;
|
|
214
|
+
const target = event.target;
|
|
215
|
+
if (target && ((_a = menuRef.value) == null ? void 0 : _a.contains(target))) return;
|
|
216
|
+
if (target instanceof Element && target.closest(`[data-menu-trigger="${openMenuId.value}"]`)) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
closeMenu();
|
|
220
|
+
}
|
|
221
|
+
function handleGlobalKeydown(event) {
|
|
222
|
+
if (event.key === "Escape" && openMenuId.value) {
|
|
223
|
+
closeMenu();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
vue.watch(openMenuId, (nextId) => {
|
|
227
|
+
if (typeof window === "undefined") return;
|
|
87
228
|
if (nextId) {
|
|
88
|
-
|
|
229
|
+
window.addEventListener("mousedown", handleGlobalPointerDown, true);
|
|
230
|
+
window.addEventListener("keydown", handleGlobalKeydown);
|
|
231
|
+
window.addEventListener("resize", closeMenu);
|
|
232
|
+
} else {
|
|
233
|
+
window.removeEventListener("mousedown", handleGlobalPointerDown, true);
|
|
234
|
+
window.removeEventListener("keydown", handleGlobalKeydown);
|
|
235
|
+
window.removeEventListener("resize", closeMenu);
|
|
89
236
|
}
|
|
237
|
+
});
|
|
238
|
+
vue.onBeforeUnmount(() => {
|
|
239
|
+
if (typeof window === "undefined") return;
|
|
240
|
+
window.removeEventListener("mousedown", handleGlobalPointerDown, true);
|
|
241
|
+
window.removeEventListener("keydown", handleGlobalKeydown);
|
|
242
|
+
window.removeEventListener("resize", closeMenu);
|
|
243
|
+
});
|
|
244
|
+
function handleSelect(item) {
|
|
245
|
+
if (item.disabled) return;
|
|
246
|
+
closeMenu();
|
|
247
|
+
emit("select", item.id);
|
|
248
|
+
}
|
|
249
|
+
function triggerAction(action, item) {
|
|
250
|
+
if (!item) return;
|
|
251
|
+
if (action === "delete" && item.disabled) return;
|
|
252
|
+
closeMenu();
|
|
253
|
+
if (action === "share") emit("share", item.id);
|
|
254
|
+
else if (action === "archive") emit("archive", item.id);
|
|
255
|
+
else if (action === "unarchive") emit("unarchive", item.id);
|
|
256
|
+
else if (action === "delete") emit("delete", item.id);
|
|
257
|
+
emit("action", { action, id: item.id });
|
|
258
|
+
}
|
|
259
|
+
function itemTooltip(item) {
|
|
260
|
+
return item.timeText ? `${item.label} \xB7 ${item.timeText}` : item.label;
|
|
90
261
|
}
|
|
91
262
|
return (_ctx, _cache) => {
|
|
92
263
|
return vue.openBlock(), vue.createElementBlock("aside", _hoisted_1, [
|
|
@@ -97,34 +268,38 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
268
|
disabled: !__props.connected,
|
|
98
269
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("create"))
|
|
99
270
|
}, [
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
271
|
+
vue.createElementVNode("span", _hoisted_4, [
|
|
272
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
273
|
+
_cache[11] || (_cache[11] = vue.createElementVNode(
|
|
274
|
+
"svg",
|
|
275
|
+
{
|
|
276
|
+
viewBox: "0 0 16 16",
|
|
277
|
+
fill: "none",
|
|
278
|
+
"aria-hidden": "true"
|
|
279
|
+
},
|
|
280
|
+
[
|
|
281
|
+
vue.createElementVNode("path", {
|
|
282
|
+
d: "M8 3.25V12.75M3.25 8H12.75",
|
|
283
|
+
stroke: "currentColor",
|
|
284
|
+
"stroke-width": "1.6",
|
|
285
|
+
"stroke-linecap": "round"
|
|
286
|
+
})
|
|
287
|
+
],
|
|
288
|
+
-1
|
|
289
|
+
/* CACHED */
|
|
290
|
+
))
|
|
291
|
+
])
|
|
292
|
+
]),
|
|
118
293
|
vue.createElementVNode(
|
|
119
294
|
"span",
|
|
120
|
-
|
|
295
|
+
_hoisted_5,
|
|
121
296
|
vue.toDisplayString(__props.createText),
|
|
122
297
|
1
|
|
123
298
|
/* TEXT */
|
|
124
299
|
)
|
|
125
300
|
], 8, _hoisted_3),
|
|
126
|
-
__props.connected && __props.sessions.length >
|
|
127
|
-
_cache[
|
|
301
|
+
__props.connected && (__props.sessions.length > 2 || keyword.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
302
|
+
_cache[13] || (_cache[13] = vue.createElementVNode(
|
|
128
303
|
"svg",
|
|
129
304
|
{
|
|
130
305
|
viewBox: "0 0 16 16",
|
|
@@ -154,127 +329,537 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
154
329
|
type: "text",
|
|
155
330
|
placeholder: __props.searchPlaceholder,
|
|
156
331
|
class: "yc-chat-sidebar__search-input"
|
|
157
|
-
}, null, 8,
|
|
332
|
+
}, null, 8, _hoisted_7), [
|
|
158
333
|
[vue.vModelText, keyword.value]
|
|
159
|
-
])
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
1
|
|
168
|
-
/* TEXT */
|
|
169
|
-
)) : !__props.connected ? (vue.openBlock(), vue.createElementBlock(
|
|
170
|
-
"div",
|
|
171
|
-
_hoisted_8,
|
|
172
|
-
vue.toDisplayString(__props.emptyText),
|
|
173
|
-
1
|
|
174
|
-
/* TEXT */
|
|
175
|
-
)) : !__props.sessions.length && !__props.loading ? (vue.openBlock(), vue.createElementBlock(
|
|
176
|
-
"div",
|
|
177
|
-
_hoisted_9,
|
|
178
|
-
vue.toDisplayString(__props.emptyText),
|
|
179
|
-
1
|
|
180
|
-
/* TEXT */
|
|
181
|
-
)) : !conversationItems.value.length && keyword.value ? (vue.openBlock(), vue.createElementBlock(
|
|
182
|
-
"div",
|
|
183
|
-
_hoisted_10,
|
|
184
|
-
vue.toDisplayString(__props.noResultText),
|
|
185
|
-
1
|
|
186
|
-
/* TEXT */
|
|
187
|
-
)) : (vue.openBlock(), vue.createBlock(vue.unref(vueElementPlusX.Conversations), {
|
|
188
|
-
key: 4,
|
|
189
|
-
items: conversationItems.value,
|
|
190
|
-
active: __props.activeId,
|
|
191
|
-
"row-key": "id",
|
|
192
|
-
"label-key": "label",
|
|
193
|
-
groupable: true,
|
|
194
|
-
"show-built-in-menu": false,
|
|
195
|
-
style: { width: "100%", backgroundColor: "transparent", padding: "4px 8px" },
|
|
196
|
-
onChange: handleChange
|
|
197
|
-
}, vue.createSlots({
|
|
198
|
-
label: vue.withCtx(({ item }) => [
|
|
334
|
+
]),
|
|
335
|
+
keyword.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
336
|
+
key: 0,
|
|
337
|
+
type: "button",
|
|
338
|
+
class: "yc-chat-sidebar__search-clear",
|
|
339
|
+
"aria-label": "\u6E05\u7A7A\u641C\u7D22",
|
|
340
|
+
onClick: _cache[2] || (_cache[2] = ($event) => keyword.value = "")
|
|
341
|
+
}, [..._cache[12] || (_cache[12] = [
|
|
199
342
|
vue.createElementVNode(
|
|
200
|
-
"
|
|
343
|
+
"svg",
|
|
201
344
|
{
|
|
202
|
-
|
|
345
|
+
viewBox: "0 0 14 14",
|
|
346
|
+
fill: "none",
|
|
347
|
+
"aria-hidden": "true"
|
|
203
348
|
},
|
|
204
349
|
[
|
|
205
|
-
vue.createElementVNode("
|
|
350
|
+
vue.createElementVNode("path", {
|
|
351
|
+
d: "M3.75 3.75L10.25 10.25M10.25 3.75L3.75 10.25",
|
|
352
|
+
stroke: "currentColor",
|
|
353
|
+
"stroke-width": "1.4",
|
|
354
|
+
"stroke-linecap": "round"
|
|
355
|
+
})
|
|
356
|
+
],
|
|
357
|
+
-1
|
|
358
|
+
/* CACHED */
|
|
359
|
+
)
|
|
360
|
+
])])) : vue.createCommentVNode("v-if", true)
|
|
361
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
362
|
+
]),
|
|
363
|
+
vue.createElementVNode(
|
|
364
|
+
"div",
|
|
365
|
+
{
|
|
366
|
+
class: "yc-chat-sidebar__body conversation-list",
|
|
367
|
+
onScrollPassive: closeMenu
|
|
368
|
+
},
|
|
369
|
+
[
|
|
370
|
+
!__props.connected && __props.disconnectedText ? (vue.openBlock(), vue.createElementBlock(
|
|
371
|
+
"div",
|
|
372
|
+
_hoisted_8,
|
|
373
|
+
vue.toDisplayString(__props.disconnectedText),
|
|
374
|
+
1
|
|
375
|
+
/* TEXT */
|
|
376
|
+
)) : !__props.connected ? (vue.openBlock(), vue.createElementBlock(
|
|
377
|
+
"div",
|
|
378
|
+
_hoisted_9,
|
|
379
|
+
vue.toDisplayString(__props.emptyText),
|
|
380
|
+
1
|
|
381
|
+
/* TEXT */
|
|
382
|
+
)) : !__props.sessions.length && !__props.loading ? (vue.openBlock(), vue.createElementBlock(
|
|
383
|
+
"div",
|
|
384
|
+
_hoisted_10,
|
|
385
|
+
vue.toDisplayString(__props.emptyText),
|
|
386
|
+
1
|
|
387
|
+
/* TEXT */
|
|
388
|
+
)) : !filteredSessions.value.length && keyword.value ? (vue.openBlock(), vue.createElementBlock(
|
|
389
|
+
"div",
|
|
390
|
+
_hoisted_11,
|
|
391
|
+
vue.toDisplayString(__props.noResultText),
|
|
392
|
+
1
|
|
393
|
+
/* TEXT */
|
|
394
|
+
)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
395
|
+
!activeGroups.value.length && archivedSessions.value.length && !keyword.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, " \u8FD1\u671F\u4F1A\u8BDD\u5DF2\u5168\u90E8\u5F52\u6863 ")) : vue.createCommentVNode("v-if", true),
|
|
396
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
397
|
+
vue.Fragment,
|
|
398
|
+
null,
|
|
399
|
+
vue.renderList(activeGroups.value, (group) => {
|
|
400
|
+
return vue.openBlock(), vue.createElementBlock("section", {
|
|
401
|
+
key: group.name,
|
|
402
|
+
class: "yc-chat-sidebar__group"
|
|
403
|
+
}, [
|
|
206
404
|
vue.createElementVNode(
|
|
207
405
|
"div",
|
|
208
|
-
|
|
209
|
-
vue.toDisplayString(
|
|
406
|
+
_hoisted_14,
|
|
407
|
+
vue.toDisplayString(group.name),
|
|
210
408
|
1
|
|
211
409
|
/* TEXT */
|
|
212
410
|
),
|
|
411
|
+
vue.createElementVNode("div", _hoisted_15, [
|
|
412
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
413
|
+
vue.Fragment,
|
|
414
|
+
null,
|
|
415
|
+
vue.renderList(group.items, (item) => {
|
|
416
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
417
|
+
key: item.id,
|
|
418
|
+
class: vue.normalizeClass(["yc-chat-sidebar__row el-conversations-item", {
|
|
419
|
+
active: item.id === __props.activeId,
|
|
420
|
+
"is-active": item.id === __props.activeId,
|
|
421
|
+
"is-menu-open": openMenuId.value === item.id,
|
|
422
|
+
"is-disabled": item.disabled
|
|
423
|
+
}]),
|
|
424
|
+
"data-session-id": item.id,
|
|
425
|
+
title: itemTooltip(item),
|
|
426
|
+
onClick: ($event) => handleSelect(item)
|
|
427
|
+
}, [
|
|
428
|
+
vue.createElementVNode(
|
|
429
|
+
"span",
|
|
430
|
+
_hoisted_17,
|
|
431
|
+
vue.toDisplayString(item.label),
|
|
432
|
+
1
|
|
433
|
+
/* TEXT */
|
|
434
|
+
),
|
|
435
|
+
hasMenuActions.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
436
|
+
key: 0,
|
|
437
|
+
class: "yc-chat-sidebar__item-actions",
|
|
438
|
+
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
439
|
+
}, ["stop"]))
|
|
440
|
+
}, [
|
|
441
|
+
vue.createElementVNode("button", {
|
|
442
|
+
type: "button",
|
|
443
|
+
class: vue.normalizeClass(["yc-chat-sidebar__more-trigger", { "is-open": openMenuId.value === item.id }]),
|
|
444
|
+
"data-menu-trigger": item.id,
|
|
445
|
+
"data-testid": "session-more-btn",
|
|
446
|
+
"aria-label": "\u66F4\u591A\u4F1A\u8BDD\u64CD\u4F5C",
|
|
447
|
+
"aria-haspopup": "menu",
|
|
448
|
+
"aria-expanded": openMenuId.value === item.id,
|
|
449
|
+
title: "\u66F4\u591A\u64CD\u4F5C",
|
|
450
|
+
onClick: vue.withModifiers(($event) => toggleMenu(item, $event), ["stop"])
|
|
451
|
+
}, [..._cache[14] || (_cache[14] = [
|
|
452
|
+
vue.createElementVNode(
|
|
453
|
+
"svg",
|
|
454
|
+
{
|
|
455
|
+
viewBox: "0 0 16 16",
|
|
456
|
+
fill: "none",
|
|
457
|
+
"aria-hidden": "true"
|
|
458
|
+
},
|
|
459
|
+
[
|
|
460
|
+
vue.createElementVNode("circle", {
|
|
461
|
+
cx: "3.25",
|
|
462
|
+
cy: "8",
|
|
463
|
+
r: "1.25",
|
|
464
|
+
fill: "currentColor"
|
|
465
|
+
}),
|
|
466
|
+
vue.createElementVNode("circle", {
|
|
467
|
+
cx: "8",
|
|
468
|
+
cy: "8",
|
|
469
|
+
r: "1.25",
|
|
470
|
+
fill: "currentColor"
|
|
471
|
+
}),
|
|
472
|
+
vue.createElementVNode("circle", {
|
|
473
|
+
cx: "12.75",
|
|
474
|
+
cy: "8",
|
|
475
|
+
r: "1.25",
|
|
476
|
+
fill: "currentColor"
|
|
477
|
+
})
|
|
478
|
+
],
|
|
479
|
+
-1
|
|
480
|
+
/* CACHED */
|
|
481
|
+
)
|
|
482
|
+
])], 10, _hoisted_18)
|
|
483
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
484
|
+
], 10, _hoisted_16);
|
|
485
|
+
}),
|
|
486
|
+
128
|
|
487
|
+
/* KEYED_FRAGMENT */
|
|
488
|
+
))
|
|
489
|
+
])
|
|
490
|
+
]);
|
|
491
|
+
}),
|
|
492
|
+
128
|
|
493
|
+
/* KEYED_FRAGMENT */
|
|
494
|
+
)),
|
|
495
|
+
archivedSessions.value.length ? (vue.openBlock(), vue.createElementBlock("section", _hoisted_19, [
|
|
496
|
+
vue.createElementVNode("button", {
|
|
497
|
+
type: "button",
|
|
498
|
+
class: "yc-chat-sidebar__archive-toggle",
|
|
499
|
+
"data-testid": "archived-sessions-toggle",
|
|
500
|
+
"aria-expanded": showArchivedList.value,
|
|
501
|
+
onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => archivedExpanded.value = !archivedExpanded.value, ["stop"]))
|
|
502
|
+
}, [
|
|
503
|
+
vue.createElementVNode("span", _hoisted_21, [
|
|
504
|
+
_cache[15] || (_cache[15] = vue.createElementVNode(
|
|
505
|
+
"svg",
|
|
506
|
+
{
|
|
507
|
+
viewBox: "0 0 16 16",
|
|
508
|
+
fill: "none",
|
|
509
|
+
"aria-hidden": "true"
|
|
510
|
+
},
|
|
511
|
+
[
|
|
512
|
+
vue.createElementVNode("rect", {
|
|
513
|
+
x: "2",
|
|
514
|
+
y: "2.75",
|
|
515
|
+
width: "12",
|
|
516
|
+
height: "3.25",
|
|
517
|
+
rx: "1",
|
|
518
|
+
stroke: "currentColor",
|
|
519
|
+
"stroke-width": "1.3"
|
|
520
|
+
}),
|
|
521
|
+
vue.createElementVNode("path", {
|
|
522
|
+
d: "M3.25 6V12.25C3.25 12.8 3.7 13.25 4.25 13.25H11.75C12.3 13.25 12.75 12.8 12.75 12.25V6M6.5 8.75H9.5",
|
|
523
|
+
stroke: "currentColor",
|
|
524
|
+
"stroke-width": "1.3",
|
|
525
|
+
"stroke-linecap": "round"
|
|
526
|
+
})
|
|
527
|
+
],
|
|
528
|
+
-1
|
|
529
|
+
/* CACHED */
|
|
530
|
+
)),
|
|
213
531
|
vue.createElementVNode(
|
|
214
|
-
"
|
|
215
|
-
|
|
216
|
-
vue.toDisplayString(
|
|
532
|
+
"span",
|
|
533
|
+
null,
|
|
534
|
+
vue.toDisplayString(__props.archivedGroupTitle),
|
|
535
|
+
1
|
|
536
|
+
/* TEXT */
|
|
537
|
+
),
|
|
538
|
+
vue.createElementVNode(
|
|
539
|
+
"span",
|
|
540
|
+
_hoisted_22,
|
|
541
|
+
vue.toDisplayString(archivedSessions.value.length),
|
|
217
542
|
1
|
|
218
543
|
/* TEXT */
|
|
219
544
|
)
|
|
220
545
|
]),
|
|
221
|
-
vue.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
546
|
+
(vue.openBlock(), vue.createElementBlock(
|
|
547
|
+
"svg",
|
|
548
|
+
{
|
|
549
|
+
class: vue.normalizeClass(["yc-chat-sidebar__archive-chevron", { "is-expanded": showArchivedList.value }]),
|
|
550
|
+
viewBox: "0 0 16 16",
|
|
551
|
+
fill: "none",
|
|
552
|
+
"aria-hidden": "true"
|
|
553
|
+
},
|
|
554
|
+
[..._cache[16] || (_cache[16] = [
|
|
555
|
+
vue.createElementVNode(
|
|
556
|
+
"path",
|
|
557
|
+
{
|
|
558
|
+
d: "M5.5 6.5L8 9L10.5 6.5",
|
|
559
|
+
stroke: "currentColor",
|
|
560
|
+
"stroke-width": "1.4",
|
|
561
|
+
"stroke-linecap": "round",
|
|
562
|
+
"stroke-linejoin": "round"
|
|
563
|
+
},
|
|
564
|
+
null,
|
|
565
|
+
-1
|
|
566
|
+
/* CACHED */
|
|
567
|
+
)
|
|
568
|
+
])],
|
|
569
|
+
2
|
|
570
|
+
/* CLASS */
|
|
571
|
+
))
|
|
572
|
+
], 8, _hoisted_20),
|
|
573
|
+
showArchivedList.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
|
|
574
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
575
|
+
vue.Fragment,
|
|
576
|
+
null,
|
|
577
|
+
vue.renderList(archivedSessions.value, (item) => {
|
|
578
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
579
|
+
key: item.id,
|
|
580
|
+
class: vue.normalizeClass(["yc-chat-sidebar__row yc-chat-sidebar__row--archived el-conversations-item", {
|
|
581
|
+
active: item.id === __props.activeId,
|
|
582
|
+
"is-active": item.id === __props.activeId,
|
|
583
|
+
"is-menu-open": openMenuId.value === item.id,
|
|
584
|
+
"is-disabled": item.disabled
|
|
585
|
+
}]),
|
|
586
|
+
"data-session-id": item.id,
|
|
587
|
+
title: itemTooltip(item),
|
|
588
|
+
onClick: ($event) => handleSelect(item)
|
|
589
|
+
}, [
|
|
590
|
+
vue.createElementVNode(
|
|
591
|
+
"span",
|
|
592
|
+
_hoisted_25,
|
|
593
|
+
vue.toDisplayString(item.label),
|
|
594
|
+
1
|
|
595
|
+
/* TEXT */
|
|
596
|
+
),
|
|
597
|
+
hasMenuActions.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
598
|
+
key: 0,
|
|
599
|
+
class: "yc-chat-sidebar__item-actions",
|
|
600
|
+
onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
|
|
601
|
+
}, ["stop"]))
|
|
602
|
+
}, [
|
|
603
|
+
vue.createElementVNode("button", {
|
|
604
|
+
type: "button",
|
|
605
|
+
class: vue.normalizeClass(["yc-chat-sidebar__more-trigger", { "is-open": openMenuId.value === item.id }]),
|
|
606
|
+
"data-menu-trigger": item.id,
|
|
607
|
+
"data-testid": "session-more-btn",
|
|
608
|
+
"aria-label": "\u66F4\u591A\u4F1A\u8BDD\u64CD\u4F5C",
|
|
609
|
+
"aria-haspopup": "menu",
|
|
610
|
+
"aria-expanded": openMenuId.value === item.id,
|
|
611
|
+
title: "\u66F4\u591A\u64CD\u4F5C",
|
|
612
|
+
onClick: vue.withModifiers(($event) => toggleMenu(item, $event), ["stop"])
|
|
613
|
+
}, [..._cache[17] || (_cache[17] = [
|
|
614
|
+
vue.createElementVNode(
|
|
615
|
+
"svg",
|
|
616
|
+
{
|
|
617
|
+
viewBox: "0 0 16 16",
|
|
618
|
+
fill: "none",
|
|
619
|
+
"aria-hidden": "true"
|
|
620
|
+
},
|
|
621
|
+
[
|
|
622
|
+
vue.createElementVNode("circle", {
|
|
623
|
+
cx: "3.25",
|
|
624
|
+
cy: "8",
|
|
625
|
+
r: "1.25",
|
|
626
|
+
fill: "currentColor"
|
|
627
|
+
}),
|
|
628
|
+
vue.createElementVNode("circle", {
|
|
629
|
+
cx: "8",
|
|
630
|
+
cy: "8",
|
|
631
|
+
r: "1.25",
|
|
632
|
+
fill: "currentColor"
|
|
633
|
+
}),
|
|
634
|
+
vue.createElementVNode("circle", {
|
|
635
|
+
cx: "12.75",
|
|
636
|
+
cy: "8",
|
|
637
|
+
r: "1.25",
|
|
638
|
+
fill: "currentColor"
|
|
639
|
+
})
|
|
640
|
+
],
|
|
641
|
+
-1
|
|
642
|
+
/* CACHED */
|
|
643
|
+
)
|
|
644
|
+
])], 10, _hoisted_26)
|
|
645
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
646
|
+
], 10, _hoisted_24);
|
|
647
|
+
}),
|
|
648
|
+
128
|
|
649
|
+
/* KEYED_FRAGMENT */
|
|
650
|
+
))
|
|
651
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
652
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
653
|
+
__props.hasMore ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
|
|
654
|
+
vue.createElementVNode("button", {
|
|
655
|
+
type: "button",
|
|
656
|
+
class: "yc-chat-sidebar__more-btn",
|
|
657
|
+
disabled: __props.loading,
|
|
658
|
+
onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => emit("load-more"), ["stop"]))
|
|
659
|
+
}, vue.toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_28)
|
|
660
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
661
|
+
]))
|
|
662
|
+
],
|
|
663
|
+
32
|
|
664
|
+
/* NEED_HYDRATION */
|
|
665
|
+
),
|
|
666
|
+
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
667
|
+
vue.createVNode(vue.Transition, { name: "yc-gemini-menu-pop" }, {
|
|
668
|
+
default: vue.withCtx(() => [
|
|
669
|
+
activeMenuSession.value ? (vue.openBlock(), vue.createElementBlock(
|
|
670
|
+
"div",
|
|
671
|
+
{
|
|
672
|
+
key: 0,
|
|
673
|
+
ref_key: "menuRef",
|
|
674
|
+
ref: menuRef,
|
|
675
|
+
class: "yc-chat-sidebar__dropdown",
|
|
676
|
+
style: vue.normalizeStyle(menuPositionStyle.value),
|
|
677
|
+
role: "menu",
|
|
678
|
+
"aria-label": "\u4F1A\u8BDD\u64CD\u4F5C\u83DC\u5355",
|
|
679
|
+
"data-testid": "session-action-menu",
|
|
680
|
+
onClick: _cache[10] || (_cache[10] = vue.withModifiers(() => {
|
|
681
|
+
}, ["stop"]))
|
|
682
|
+
},
|
|
683
|
+
[
|
|
684
|
+
__props.showShare ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
685
|
+
key: 0,
|
|
686
|
+
type: "button",
|
|
687
|
+
role: "menuitem",
|
|
688
|
+
class: "yc-chat-sidebar__menu-item",
|
|
689
|
+
"data-testid": "session-action-share",
|
|
690
|
+
onClick: _cache[7] || (_cache[7] = ($event) => triggerAction("share", activeMenuSession.value))
|
|
691
|
+
}, [..._cache[18] || (_cache[18] = [
|
|
692
|
+
vue.createElementVNode(
|
|
693
|
+
"svg",
|
|
694
|
+
{
|
|
695
|
+
viewBox: "0 0 16 16",
|
|
696
|
+
fill: "none",
|
|
697
|
+
"aria-hidden": "true"
|
|
698
|
+
},
|
|
699
|
+
[
|
|
700
|
+
vue.createElementVNode("circle", {
|
|
701
|
+
cx: "11.75",
|
|
702
|
+
cy: "3.5",
|
|
703
|
+
r: "1.75",
|
|
704
|
+
stroke: "currentColor",
|
|
705
|
+
"stroke-width": "1.35"
|
|
706
|
+
}),
|
|
707
|
+
vue.createElementVNode("circle", {
|
|
708
|
+
cx: "4.25",
|
|
709
|
+
cy: "8",
|
|
710
|
+
r: "1.75",
|
|
711
|
+
stroke: "currentColor",
|
|
712
|
+
"stroke-width": "1.35"
|
|
713
|
+
}),
|
|
714
|
+
vue.createElementVNode("circle", {
|
|
715
|
+
cx: "11.75",
|
|
716
|
+
cy: "12.5",
|
|
717
|
+
r: "1.75",
|
|
718
|
+
stroke: "currentColor",
|
|
719
|
+
"stroke-width": "1.35"
|
|
720
|
+
}),
|
|
721
|
+
vue.createElementVNode("path", {
|
|
722
|
+
d: "M5.8 7.1L10.2 4.4M5.8 8.9L10.2 11.6",
|
|
723
|
+
stroke: "currentColor",
|
|
724
|
+
"stroke-width": "1.35",
|
|
725
|
+
"stroke-linecap": "round"
|
|
726
|
+
})
|
|
727
|
+
],
|
|
728
|
+
-1
|
|
729
|
+
/* CACHED */
|
|
730
|
+
),
|
|
731
|
+
vue.createElementVNode(
|
|
732
|
+
"span",
|
|
733
|
+
null,
|
|
734
|
+
"\u5206\u4EAB",
|
|
735
|
+
-1
|
|
736
|
+
/* CACHED */
|
|
737
|
+
)
|
|
738
|
+
])])) : vue.createCommentVNode("v-if", true),
|
|
739
|
+
__props.showArchive ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
740
|
+
key: 1,
|
|
741
|
+
type: "button",
|
|
742
|
+
role: "menuitem",
|
|
743
|
+
class: "yc-chat-sidebar__menu-item",
|
|
744
|
+
"data-testid": "session-action-archive",
|
|
745
|
+
onClick: _cache[8] || (_cache[8] = ($event) => triggerAction(
|
|
746
|
+
activeMenuSession.value.archived ? "unarchive" : "archive",
|
|
747
|
+
activeMenuSession.value
|
|
748
|
+
))
|
|
225
749
|
}, [
|
|
226
|
-
vue.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
750
|
+
!activeMenuSession.value.archived ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_29, [..._cache[19] || (_cache[19] = [
|
|
751
|
+
vue.createElementVNode(
|
|
752
|
+
"rect",
|
|
753
|
+
{
|
|
754
|
+
x: "2",
|
|
755
|
+
y: "2.75",
|
|
756
|
+
width: "12",
|
|
757
|
+
height: "3.25",
|
|
758
|
+
rx: "1",
|
|
759
|
+
stroke: "currentColor",
|
|
760
|
+
"stroke-width": "1.35"
|
|
761
|
+
},
|
|
762
|
+
null,
|
|
763
|
+
-1
|
|
764
|
+
/* CACHED */
|
|
765
|
+
),
|
|
766
|
+
vue.createElementVNode(
|
|
767
|
+
"path",
|
|
768
|
+
{
|
|
769
|
+
d: "M3.25 6V12.25C3.25 12.8 3.7 13.25 4.25 13.25H11.75C12.3 13.25 12.75 12.8 12.75 12.25V6M8 7.75V11.25M6.5 9.85L8 11.35L9.5 9.85",
|
|
770
|
+
stroke: "currentColor",
|
|
771
|
+
"stroke-width": "1.35",
|
|
772
|
+
"stroke-linecap": "round",
|
|
773
|
+
"stroke-linejoin": "round"
|
|
774
|
+
},
|
|
775
|
+
null,
|
|
776
|
+
-1
|
|
777
|
+
/* CACHED */
|
|
778
|
+
)
|
|
779
|
+
])])) : (vue.openBlock(), vue.createElementBlock("svg", _hoisted_30, [..._cache[20] || (_cache[20] = [
|
|
233
780
|
vue.createElementVNode(
|
|
234
|
-
"
|
|
781
|
+
"rect",
|
|
235
782
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
783
|
+
x: "2",
|
|
784
|
+
y: "2.75",
|
|
785
|
+
width: "12",
|
|
786
|
+
height: "3.25",
|
|
787
|
+
rx: "1",
|
|
788
|
+
stroke: "currentColor",
|
|
789
|
+
"stroke-width": "1.35"
|
|
239
790
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
791
|
+
null,
|
|
792
|
+
-1
|
|
793
|
+
/* CACHED */
|
|
794
|
+
),
|
|
795
|
+
vue.createElementVNode(
|
|
796
|
+
"path",
|
|
797
|
+
{
|
|
798
|
+
d: "M3.25 6V12.25C3.25 12.8 3.7 13.25 4.25 13.25H11.75C12.3 13.25 12.75 12.8 12.75 12.25V6M8 11.25V7.75M6.5 9.15L8 7.65L9.5 9.15",
|
|
799
|
+
stroke: "currentColor",
|
|
800
|
+
"stroke-width": "1.35",
|
|
801
|
+
"stroke-linecap": "round",
|
|
802
|
+
"stroke-linejoin": "round"
|
|
803
|
+
},
|
|
804
|
+
null,
|
|
249
805
|
-1
|
|
250
806
|
/* CACHED */
|
|
251
807
|
)
|
|
252
|
-
])],
|
|
253
|
-
|
|
808
|
+
])])),
|
|
809
|
+
vue.createElementVNode(
|
|
810
|
+
"span",
|
|
811
|
+
null,
|
|
812
|
+
vue.toDisplayString(activeMenuSession.value.archived ? "\u53D6\u6D88\u5F52\u6863" : "\u5F52\u6863"),
|
|
813
|
+
1
|
|
814
|
+
/* TEXT */
|
|
815
|
+
)
|
|
816
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
817
|
+
__props.showDelete && (__props.showShare || __props.showArchive) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_31)) : vue.createCommentVNode("v-if", true),
|
|
818
|
+
__props.showDelete ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
819
|
+
key: 3,
|
|
820
|
+
type: "button",
|
|
821
|
+
role: "menuitem",
|
|
822
|
+
class: "yc-chat-sidebar__menu-item is-danger",
|
|
823
|
+
"data-testid": "session-action-delete",
|
|
824
|
+
disabled: activeMenuSession.value.disabled,
|
|
825
|
+
onClick: _cache[9] || (_cache[9] = ($event) => triggerAction("delete", activeMenuSession.value))
|
|
826
|
+
}, [..._cache[21] || (_cache[21] = [
|
|
827
|
+
vue.createElementVNode(
|
|
828
|
+
"svg",
|
|
829
|
+
{
|
|
830
|
+
viewBox: "0 0 16 16",
|
|
831
|
+
fill: "none",
|
|
832
|
+
"aria-hidden": "true"
|
|
833
|
+
},
|
|
834
|
+
[
|
|
835
|
+
vue.createElementVNode("path", {
|
|
836
|
+
d: "M3.25 4.5H12.75M6.25 4.5V3.25C6.25 2.84 6.59 2.5 7 2.5H9C9.41 2.5 9.75 2.84 9.75 3.25V4.5M4.85 4.5L5.3 12.35C5.34 13 5.88 13.5 6.53 13.5H9.47C10.12 13.5 10.66 13 10.7 12.35L11.15 4.5M6.75 7.25V10.75M9.25 7.25V10.75",
|
|
837
|
+
stroke: "currentColor",
|
|
838
|
+
"stroke-width": "1.35",
|
|
839
|
+
"stroke-linecap": "round",
|
|
840
|
+
"stroke-linejoin": "round"
|
|
841
|
+
})
|
|
842
|
+
],
|
|
843
|
+
-1
|
|
844
|
+
/* CACHED */
|
|
845
|
+
),
|
|
846
|
+
vue.createElementVNode(
|
|
847
|
+
"span",
|
|
848
|
+
null,
|
|
849
|
+
"\u5220\u9664",
|
|
850
|
+
-1
|
|
851
|
+
/* CACHED */
|
|
852
|
+
)
|
|
853
|
+
])], 8, _hoisted_32)) : vue.createCommentVNode("v-if", true)
|
|
254
854
|
],
|
|
255
|
-
|
|
256
|
-
/*
|
|
257
|
-
)
|
|
855
|
+
4
|
|
856
|
+
/* STYLE */
|
|
857
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
258
858
|
]),
|
|
259
|
-
_:
|
|
260
|
-
/*
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
name: "load-more",
|
|
264
|
-
fn: vue.withCtx(() => [
|
|
265
|
-
vue.createElementVNode("div", _hoisted_15, [
|
|
266
|
-
vue.createElementVNode("button", {
|
|
267
|
-
type: "button",
|
|
268
|
-
class: "yc-chat-sidebar__more-btn",
|
|
269
|
-
disabled: __props.loading,
|
|
270
|
-
onClick: _cache[3] || (_cache[3] = ($event) => emit("load-more"))
|
|
271
|
-
}, vue.toDisplayString(__props.loading ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u591A"), 9, _hoisted_16)
|
|
272
|
-
])
|
|
273
|
-
]),
|
|
274
|
-
key: "0"
|
|
275
|
-
} : void 0
|
|
276
|
-
]), 1032, ["items", "active"]))
|
|
277
|
-
])
|
|
859
|
+
_: 1
|
|
860
|
+
/* STABLE */
|
|
861
|
+
})
|
|
862
|
+
]))
|
|
278
863
|
]);
|
|
279
864
|
};
|
|
280
865
|
}
|