@opentiny/tiny-robot 0.5.2-alpha.8 → 0.5.2-beta.0
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/dist/anchor/index.js +32 -32
- package/dist/container/index.js +16 -15
- package/dist/dropdown-menu/index.js +141 -97
- package/dist/extension-manager/index.js +1006 -0
- package/dist/floating-ui.dom.js +970 -0
- package/dist/index.d.ts +745 -176
- package/dist/index.js +103 -89
- package/dist/index3.js +92 -95
- package/dist/index4.js +2 -2
- package/dist/index6.js +408 -399
- package/dist/index7.js +271 -180
- package/dist/index8.js +87 -102
- package/dist/layout/index.js +1 -1
- package/dist/model-selector/index.js +1003 -0
- package/dist/sender/index.js +1127 -2060
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +37 -36
- package/dist/useSlotRefs.js +1 -1
- package/dist/useTeleportTarget.js +25 -0
- package/dist/utils.js +1 -1
- package/package.json +4 -4
package/dist/index7.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import { IconEmptySearch as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { o as
|
|
5
|
-
import { t as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
|
|
1
|
+
import { onMounted as me, onBeforeUnmount as pe, ref as R, defineComponent as Y, openBlock as a, createElementBlock as v, createElementVNode as T, createVNode as B, unref as i, toDisplayString as z, useModel as ee, computed as E, normalizeStyle as ve, Fragment as N, renderList as J, createBlock as Q, resolveDynamicComponent as re, mergeModels as te, nextTick as F, shallowRef as ue, watch as ae, normalizeClass as j, createCommentVNode as P, renderSlot as ne, withDirectives as oe, withKeys as O, isRef as ye, withModifiers as se, vModelText as ge, vShow as he } from "vue";
|
|
2
|
+
import { IconEmptySearch as _e, IconEditPen as ke, IconDelete as Ce, IconCheck as we, IconClose as Ie, IconMore as Le } from "@opentiny/tiny-robot-svgs";
|
|
3
|
+
import { _ as Z } from "./_plugin-vue_export-helper.js";
|
|
4
|
+
import { o as ce, d as Ee, c as xe, b as Re } from "./index4.js";
|
|
5
|
+
import { t as V } from "./utils.js";
|
|
6
|
+
const q = R(!1);
|
|
7
|
+
let U = 0, A;
|
|
8
|
+
function Te() {
|
|
9
|
+
const u = window.matchMedia("(hover: none) and (pointer: coarse)"), h = () => {
|
|
10
|
+
q.value = u.matches;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
h(), u.addEventListener("change", h);
|
|
13
|
+
const c = (r) => {
|
|
14
|
+
q.value = r.pointerType !== "mouse";
|
|
15
15
|
};
|
|
16
|
-
return window.addEventListener("pointerdown",
|
|
17
|
-
|
|
16
|
+
return window.addEventListener("pointerdown", c, !0), () => {
|
|
17
|
+
u.removeEventListener("change", h), window.removeEventListener("pointerdown", c, !0);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
20
|
+
function be() {
|
|
21
|
+
A == null || A(), A = void 0;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Me() {
|
|
24
24
|
return typeof window > "u" ? {
|
|
25
|
-
isTouchDevice:
|
|
26
|
-
} : (
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
|
|
25
|
+
isTouchDevice: q
|
|
26
|
+
} : (me(() => {
|
|
27
|
+
U++, U === 1 && (A = Te());
|
|
28
|
+
}), pe(() => {
|
|
29
|
+
U = Math.max(0, U - 1), U === 0 && be();
|
|
30
30
|
}), {
|
|
31
|
-
isTouchDevice:
|
|
31
|
+
isTouchDevice: q
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const De = { class: "tr-history__empty" }, $e = { class: "tr-history__empty-icon" }, Oe = { class: "tr-history__empty-text" }, Ge = /* @__PURE__ */ Y({
|
|
35
35
|
__name: "Empty",
|
|
36
36
|
props: {
|
|
37
37
|
text: { default: "暂无内容" }
|
|
38
38
|
},
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
setup(u) {
|
|
40
|
+
const h = u;
|
|
41
|
+
return (c, r) => (a(), v("div", De, [
|
|
42
|
+
T("span", $e, [
|
|
43
|
+
B(i(_e))
|
|
44
44
|
]),
|
|
45
|
-
|
|
45
|
+
T("span", Oe, z(h.text), 1)
|
|
46
46
|
]));
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), He = /* @__PURE__ */ Z(Ge, [["__scopeId", "data-v-d0340c39"]]), Se = ["onClick"], le = 4, Ue = /* @__PURE__ */ Y({
|
|
49
49
|
__name: "MenuList",
|
|
50
|
-
props: /* @__PURE__ */
|
|
50
|
+
props: /* @__PURE__ */ te({
|
|
51
51
|
items: {},
|
|
52
52
|
menuListGap: { default: 8 }
|
|
53
53
|
}, {
|
|
@@ -56,85 +56,132 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
|
|
|
56
56
|
data: { default: null },
|
|
57
57
|
dataModifiers: {}
|
|
58
58
|
}),
|
|
59
|
-
emits: /* @__PURE__ */
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
emits: /* @__PURE__ */ te(["item-click"], ["update:trigger", "update:data"]),
|
|
60
|
+
setup(u, { expose: h, emit: c }) {
|
|
61
|
+
const r = ee(u, "trigger"), k = ee(u, "data"), _ = u, b = c, C = R(null);
|
|
62
|
+
ce(
|
|
63
|
+
C,
|
|
64
64
|
() => {
|
|
65
|
-
|
|
65
|
+
r.value = null, k.value = null;
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
ignore: [
|
|
68
|
+
ignore: [r]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
const { top:
|
|
72
|
-
const
|
|
73
|
-
left: `min(${
|
|
74
|
-
},
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
|
|
71
|
+
const { top: M, bottom: w, left: G } = Ee(r), { width: x, height: H } = xe(C, void 0, { box: "border-box" }), { height: I } = Re(), D = E(() => {
|
|
72
|
+
const n = {
|
|
73
|
+
left: `min(${V(G.value)}, calc(100% - ${V(x.value + le)}))`
|
|
74
|
+
}, p = w.value + _.menuListGap;
|
|
75
|
+
return p + H.value + le > I.value ? n.bottom = `calc(100% - ${V(M.value - _.menuListGap)})` : n.top = V(p), n;
|
|
76
|
+
}), o = (n) => {
|
|
77
|
+
b("item-click", n), r.value = null, k.value = null;
|
|
78
|
+
}, f = () => {
|
|
79
|
+
var n;
|
|
80
|
+
return Array.from(((n = C.value) == null ? void 0 : n.querySelectorAll('[role="menuitem"]')) || []);
|
|
81
|
+
}, W = () => {
|
|
82
|
+
var n;
|
|
83
|
+
return (n = f()[0]) == null ? void 0 : n.focus();
|
|
84
|
+
}, g = () => {
|
|
85
|
+
var n;
|
|
86
|
+
return (n = f().at(-1)) == null ? void 0 : n.focus();
|
|
87
|
+
}, S = () => {
|
|
88
|
+
const n = r.value;
|
|
89
|
+
r.value = null, k.value = null, F(() => n == null ? void 0 : n.focus());
|
|
90
|
+
}, m = (n) => {
|
|
91
|
+
var $, K;
|
|
92
|
+
if (n.key === "Tab") {
|
|
93
|
+
r.value = null, k.value = null;
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const p = f(), y = p.indexOf(document.activeElement);
|
|
97
|
+
if (n.key === "Escape") {
|
|
98
|
+
n.preventDefault(), S();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (n.key === "Enter" || n.key === " ") {
|
|
102
|
+
n.preventDefault(), ($ = p[y]) == null || $.click();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(n.key) || p.length === 0) return;
|
|
106
|
+
n.preventDefault();
|
|
107
|
+
let L = y;
|
|
108
|
+
n.key === "Home" && (L = 0), n.key === "End" && (L = p.length - 1), n.key === "ArrowDown" && (L = y < p.length - 1 ? y + 1 : 0), n.key === "ArrowUp" && (L = y > 0 ? y - 1 : p.length - 1), (K = p[L]) == null || K.focus();
|
|
78
109
|
};
|
|
79
|
-
return (
|
|
110
|
+
return h({ focusFirstItem: W, focusLastItem: g }), (n, p) => (a(), v("ul", {
|
|
80
111
|
class: "tr-history__menu-list",
|
|
81
112
|
ref_key: "menuRef",
|
|
82
|
-
ref:
|
|
83
|
-
style:
|
|
113
|
+
ref: C,
|
|
114
|
+
style: ve(D.value),
|
|
115
|
+
role: "menu",
|
|
116
|
+
onKeydown: m
|
|
84
117
|
}, [
|
|
85
|
-
(
|
|
118
|
+
(a(!0), v(N, null, J(_.items, (y) => (a(), v("li", {
|
|
86
119
|
class: "tr-history__menu-list__item",
|
|
87
|
-
key:
|
|
88
|
-
|
|
120
|
+
key: y.id,
|
|
121
|
+
role: "menuitem",
|
|
122
|
+
tabindex: "-1",
|
|
123
|
+
onClick: (L) => o(y)
|
|
89
124
|
}, [
|
|
90
|
-
(
|
|
91
|
-
|
|
92
|
-
], 8,
|
|
93
|
-
],
|
|
125
|
+
(a(), Q(re(y.icon))),
|
|
126
|
+
T("span", null, z(y.text), 1)
|
|
127
|
+
], 8, Se))), 128))
|
|
128
|
+
], 36));
|
|
94
129
|
}
|
|
95
|
-
}),
|
|
96
|
-
renameControlOnClickOutside:
|
|
97
|
-
onItemTitleChange:
|
|
130
|
+
}), Be = /* @__PURE__ */ Z(Ue, [["__scopeId", "data-v-e4a482e7"]]), Ae = ({
|
|
131
|
+
renameControlOnClickOutside: u,
|
|
132
|
+
onItemTitleChange: h,
|
|
133
|
+
resolveItem: c
|
|
98
134
|
}) => {
|
|
99
|
-
const
|
|
135
|
+
const r = ue(void 0), k = E(() => {
|
|
136
|
+
const o = r.value;
|
|
137
|
+
if (o)
|
|
138
|
+
return c ? c(o) : o;
|
|
139
|
+
}), _ = R(null), b = E(() => {
|
|
100
140
|
var o;
|
|
101
|
-
return (o =
|
|
102
|
-
}), C =
|
|
141
|
+
return (o = _.value) == null ? void 0 : o.at(0);
|
|
142
|
+
}), C = R(null), M = E(() => {
|
|
103
143
|
var o;
|
|
104
144
|
return (o = C.value) == null ? void 0 : o.at(0);
|
|
105
|
-
}),
|
|
145
|
+
}), w = R(null), G = E(() => {
|
|
106
146
|
var o;
|
|
107
|
-
return (o =
|
|
108
|
-
}),
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
147
|
+
return (o = w.value) == null ? void 0 : o.at(0);
|
|
148
|
+
}), x = R(""), H = (o) => {
|
|
149
|
+
r.value = o, x.value = o.title, F(() => {
|
|
150
|
+
const f = b.value;
|
|
151
|
+
f && (f.focus(), f.select());
|
|
112
152
|
});
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
153
|
+
}, I = () => {
|
|
154
|
+
r.value = void 0, x.value = "";
|
|
155
|
+
}, D = () => {
|
|
156
|
+
const o = k.value;
|
|
157
|
+
o && h(x.value, o), I();
|
|
117
158
|
};
|
|
118
|
-
return (
|
|
119
|
-
|
|
159
|
+
return ae(
|
|
160
|
+
k,
|
|
161
|
+
(o, f) => {
|
|
162
|
+
f && !o && I();
|
|
163
|
+
},
|
|
164
|
+
{ flush: "sync" }
|
|
165
|
+
), (u === "confirm" || u === "cancel") && ce(
|
|
166
|
+
b,
|
|
120
167
|
() => {
|
|
121
|
-
|
|
168
|
+
u === "confirm" ? D() : I();
|
|
122
169
|
},
|
|
123
|
-
{ ignore: [
|
|
170
|
+
{ ignore: [M, G] }
|
|
124
171
|
), {
|
|
125
|
-
editingItem:
|
|
126
|
-
editorRefList:
|
|
172
|
+
editingItem: k,
|
|
173
|
+
editorRefList: _,
|
|
127
174
|
editorConfirmRefList: C,
|
|
128
|
-
editorCancelRefList:
|
|
129
|
-
editorValue:
|
|
130
|
-
handleEdit:
|
|
131
|
-
handleEditCancel:
|
|
132
|
-
handleEditConfirm:
|
|
175
|
+
editorCancelRefList: w,
|
|
176
|
+
editorValue: x,
|
|
177
|
+
handleEdit: H,
|
|
178
|
+
handleEditCancel: I,
|
|
179
|
+
handleEditConfirm: D
|
|
133
180
|
};
|
|
134
|
-
},
|
|
181
|
+
}, ie = Symbol("NO_GROUP"), Ke = {
|
|
135
182
|
key: 0,
|
|
136
183
|
class: "tr-history__group-title"
|
|
137
|
-
},
|
|
184
|
+
}, Pe = { class: "tr-history__group-items" }, Ve = ["onClick"], Ne = ["title"], ze = ["aria-label", "aria-expanded", "onClick", "onKeydown"], Fe = /* @__PURE__ */ Y({
|
|
138
185
|
__name: "index",
|
|
139
186
|
props: {
|
|
140
187
|
data: {},
|
|
@@ -142,157 +189,201 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
|
|
|
142
189
|
showRenameControls: { type: Boolean, default: !1 },
|
|
143
190
|
renameControlOnClickOutside: { default: "confirm" },
|
|
144
191
|
menuItems: { default: () => [
|
|
145
|
-
{ id: "rename", text: "重命名", icon:
|
|
146
|
-
{ id: "delete", text: "删除", icon:
|
|
192
|
+
{ id: "rename", text: "重命名", icon: ke },
|
|
193
|
+
{ id: "delete", text: "删除", icon: Ce }
|
|
147
194
|
] },
|
|
148
195
|
menuListGap: { default: 8 }
|
|
149
196
|
},
|
|
150
197
|
emits: ["item-click", "item-title-change", "item-action"],
|
|
151
|
-
setup(
|
|
152
|
-
const
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
const
|
|
158
|
-
return
|
|
159
|
-
}),
|
|
160
|
-
editingItem:
|
|
161
|
-
editorRefList:
|
|
162
|
-
editorConfirmRefList:
|
|
163
|
-
editorCancelRefList:
|
|
164
|
-
editorValue:
|
|
165
|
-
handleEdit:
|
|
198
|
+
setup(u, { emit: h }) {
|
|
199
|
+
const c = u, r = h, k = (e) => {
|
|
200
|
+
var l;
|
|
201
|
+
const t = typeof ((l = e[0]) == null ? void 0 : l.group);
|
|
202
|
+
return t === "string" || t === "symbol";
|
|
203
|
+
}, _ = E(() => {
|
|
204
|
+
const e = c.data;
|
|
205
|
+
return k(e) ? e : [{ group: ie, items: e }];
|
|
206
|
+
}), b = E(() => _.value.length === 0 || _.value.every((e) => e.items.length === 0)), C = E(() => _.value.flatMap((e) => e.items)), M = (e) => e.id ? C.value.find((t) => t.id === e.id) : C.value.find((t) => t === e), {
|
|
207
|
+
editingItem: w,
|
|
208
|
+
editorRefList: G,
|
|
209
|
+
editorConfirmRefList: x,
|
|
210
|
+
editorCancelRefList: H,
|
|
211
|
+
editorValue: I,
|
|
212
|
+
handleEdit: D,
|
|
166
213
|
handleEditCancel: o,
|
|
167
|
-
handleEditConfirm:
|
|
168
|
-
} =
|
|
169
|
-
renameControlOnClickOutside:
|
|
170
|
-
onItemTitleChange: (
|
|
171
|
-
|
|
214
|
+
handleEditConfirm: f
|
|
215
|
+
} = Ae({
|
|
216
|
+
renameControlOnClickOutside: c.renameControlOnClickOutside,
|
|
217
|
+
onItemTitleChange: (e, t) => {
|
|
218
|
+
r("item-title-change", e, t);
|
|
219
|
+
},
|
|
220
|
+
resolveItem: M
|
|
221
|
+
}), { isTouchDevice: W } = Me(), g = R(null), S = ue(null), m = E({
|
|
222
|
+
get: () => {
|
|
223
|
+
const e = S.value;
|
|
224
|
+
return e ? M(e) ?? null : null;
|
|
225
|
+
},
|
|
226
|
+
set: (e) => {
|
|
227
|
+
S.value = e;
|
|
172
228
|
}
|
|
173
|
-
}),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
229
|
+
}), n = R(null), p = (e) => {
|
|
230
|
+
F(() => {
|
|
231
|
+
var t, l;
|
|
232
|
+
e === "first" ? (t = n.value) == null || t.focusFirstItem() : (l = n.value) == null || l.focusLastItem();
|
|
233
|
+
});
|
|
234
|
+
}, y = (e, t) => {
|
|
235
|
+
if (e.currentTarget instanceof HTMLButtonElement) {
|
|
236
|
+
if (m.value === t) {
|
|
237
|
+
g.value = null, m.value = null;
|
|
177
238
|
return;
|
|
178
239
|
}
|
|
179
|
-
g.value =
|
|
240
|
+
g.value = e.currentTarget, m.value = t, e.detail === 0 && p("first");
|
|
180
241
|
} else
|
|
181
|
-
g.value = null,
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
|
|
242
|
+
g.value = null, m.value = null;
|
|
243
|
+
}, L = (e, t, l) => {
|
|
244
|
+
e.preventDefault(), e.stopPropagation(), e.currentTarget instanceof HTMLButtonElement && (g.value = e.currentTarget, m.value = t, p(l));
|
|
245
|
+
}, $ = () => {
|
|
246
|
+
g.value = null, m.value = null;
|
|
247
|
+
};
|
|
248
|
+
ae(
|
|
249
|
+
m,
|
|
250
|
+
(e) => {
|
|
251
|
+
!e && S.value && $();
|
|
252
|
+
},
|
|
253
|
+
{ flush: "sync" }
|
|
254
|
+
);
|
|
255
|
+
const K = (e) => {
|
|
256
|
+
g.value && (e.preventDefault(), e.stopPropagation(), $());
|
|
257
|
+
}, de = (e) => {
|
|
258
|
+
const t = m.value, l = g.value;
|
|
259
|
+
t && (e.id === "rename" ? D(t) : F(() => l == null ? void 0 : l.focus()), r("item-action", e, t));
|
|
185
260
|
};
|
|
186
|
-
return (
|
|
187
|
-
class:
|
|
261
|
+
return (e, t) => (a(), v("div", {
|
|
262
|
+
class: j(["tr-history", { "touch-device": i(W) }])
|
|
188
263
|
}, [
|
|
189
|
-
|
|
190
|
-
(
|
|
264
|
+
b.value ? (a(), Q(He, { key: 1 })) : (a(), v(N, { key: 0 }, [
|
|
265
|
+
(a(!0), v(N, null, J(_.value, (l) => (a(), v("div", {
|
|
191
266
|
class: "tr-history__group",
|
|
192
|
-
key:
|
|
267
|
+
key: l.group
|
|
193
268
|
}, [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
(
|
|
197
|
-
class:
|
|
198
|
-
selected:
|
|
199
|
-
editing:
|
|
200
|
-
active:
|
|
269
|
+
l.group !== i(ie) ? (a(), v("div", Ke, z(l.group), 1)) : P("", !0),
|
|
270
|
+
T("div", Pe, [
|
|
271
|
+
(a(!0), v(N, null, J(l.items, (s, fe) => (a(), v("div", {
|
|
272
|
+
class: j(["tr-history__item", {
|
|
273
|
+
selected: s.id && s.id === c.selected,
|
|
274
|
+
editing: i(w) === s,
|
|
275
|
+
active: m.value === s
|
|
201
276
|
}]),
|
|
202
|
-
key:
|
|
203
|
-
onClick: (d) =>
|
|
277
|
+
key: s.id || fe,
|
|
278
|
+
onClick: (d) => r("item-click", s)
|
|
204
279
|
}, [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
280
|
+
ne(e.$slots, "item-prefix", { item: s }, void 0, !0),
|
|
281
|
+
s.icon ? (a(), Q(re(s.icon), { key: 0 })) : P("", !0),
|
|
282
|
+
i(w) === s ? oe((a(), v("input", {
|
|
208
283
|
key: 1,
|
|
209
284
|
class: "tr-history__item-editor",
|
|
210
285
|
type: "text",
|
|
211
|
-
onClick:
|
|
286
|
+
onClick: t[0] || (t[0] = se(() => {
|
|
212
287
|
}, ["stop"])),
|
|
213
288
|
ref_for: !0,
|
|
214
289
|
ref_key: "editorRefList",
|
|
215
|
-
ref:
|
|
216
|
-
"onUpdate:modelValue":
|
|
290
|
+
ref: G,
|
|
291
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => ye(I) ? I.value = d : null),
|
|
217
292
|
onKeydown: [
|
|
218
|
-
|
|
293
|
+
t[2] || (t[2] = O(
|
|
219
294
|
//@ts-ignore
|
|
220
|
-
(...d) =>
|
|
295
|
+
(...d) => i(f) && i(f)(...d),
|
|
221
296
|
["enter"]
|
|
222
297
|
)),
|
|
223
|
-
|
|
298
|
+
t[3] || (t[3] = O(
|
|
224
299
|
//@ts-ignore
|
|
225
|
-
(...d) =>
|
|
300
|
+
(...d) => i(o) && i(o)(...d),
|
|
226
301
|
["escape"]
|
|
227
302
|
))
|
|
228
303
|
]
|
|
229
304
|
}, null, 544)), [
|
|
230
|
-
[
|
|
231
|
-
]) :
|
|
232
|
-
|
|
305
|
+
[ge, i(I)]
|
|
306
|
+
]) : ne(e.$slots, "item-title", { item: s }, () => [
|
|
307
|
+
T("span", {
|
|
233
308
|
class: "text",
|
|
234
|
-
title:
|
|
235
|
-
},
|
|
309
|
+
title: s.title
|
|
310
|
+
}, z(s.title), 9, Ne)
|
|
236
311
|
], !0, 2),
|
|
237
|
-
|
|
312
|
+
T("span", {
|
|
238
313
|
class: "tr-history__item-actions",
|
|
239
|
-
onClick:
|
|
314
|
+
onClick: t[6] || (t[6] = se(() => {
|
|
240
315
|
}, ["stop"]))
|
|
241
316
|
}, [
|
|
242
|
-
|
|
317
|
+
c.showRenameControls && i(w) === s ? (a(), v("button", {
|
|
243
318
|
key: 0,
|
|
244
319
|
class: "editor-confirm",
|
|
245
320
|
ref_for: !0,
|
|
246
321
|
ref_key: "editorConfirmRefList",
|
|
247
|
-
ref:
|
|
248
|
-
|
|
249
|
-
|
|
322
|
+
ref: x,
|
|
323
|
+
type: "button",
|
|
324
|
+
"aria-label": "确认重命名",
|
|
325
|
+
onClick: t[4] || (t[4] = //@ts-ignore
|
|
326
|
+
(...d) => i(f) && i(f)(...d))
|
|
250
327
|
}, [
|
|
251
|
-
|
|
252
|
-
], 512)) :
|
|
253
|
-
|
|
328
|
+
B(i(we))
|
|
329
|
+
], 512)) : P("", !0),
|
|
330
|
+
c.showRenameControls && i(w) === s ? (a(), v("button", {
|
|
254
331
|
key: 1,
|
|
255
332
|
class: "editor-cancel",
|
|
256
333
|
ref_for: !0,
|
|
257
334
|
ref_key: "editorCancelRefList",
|
|
258
|
-
ref:
|
|
259
|
-
|
|
260
|
-
|
|
335
|
+
ref: H,
|
|
336
|
+
type: "button",
|
|
337
|
+
"aria-label": "取消重命名",
|
|
338
|
+
onClick: t[5] || (t[5] = //@ts-ignore
|
|
339
|
+
(...d) => i(o) && i(o)(...d))
|
|
261
340
|
}, [
|
|
262
|
-
|
|
263
|
-
], 512)) :
|
|
264
|
-
|
|
265
|
-
class:
|
|
266
|
-
|
|
341
|
+
B(i(Ie))
|
|
342
|
+
], 512)) : P("", !0),
|
|
343
|
+
T("button", {
|
|
344
|
+
class: j(["menu", { hidden: i(w) === s }]),
|
|
345
|
+
type: "button",
|
|
346
|
+
"aria-label": `${s.title} 更多操作`,
|
|
347
|
+
"aria-haspopup": "menu",
|
|
348
|
+
"aria-expanded": m.value === s,
|
|
349
|
+
onClick: (d) => y(d, s),
|
|
350
|
+
onKeydown: [
|
|
351
|
+
O((d) => L(d, s, "first"), ["down"]),
|
|
352
|
+
O((d) => L(d, s, "last"), ["up"]),
|
|
353
|
+
O(K, ["escape"]),
|
|
354
|
+
O($, ["tab"])
|
|
355
|
+
]
|
|
267
356
|
}, [
|
|
268
|
-
|
|
269
|
-
],
|
|
357
|
+
B(i(Le))
|
|
358
|
+
], 42, ze)
|
|
270
359
|
])
|
|
271
|
-
], 10,
|
|
360
|
+
], 10, Ve))), 128))
|
|
272
361
|
])
|
|
273
362
|
]))), 128)),
|
|
274
|
-
|
|
363
|
+
oe(B(Be, {
|
|
364
|
+
ref_key: "menuListRef",
|
|
365
|
+
ref: n,
|
|
275
366
|
trigger: g.value,
|
|
276
|
-
"onUpdate:trigger":
|
|
277
|
-
data:
|
|
278
|
-
"onUpdate:data":
|
|
279
|
-
items:
|
|
280
|
-
"menu-list-gap":
|
|
281
|
-
onItemClick:
|
|
367
|
+
"onUpdate:trigger": t[7] || (t[7] = (l) => g.value = l),
|
|
368
|
+
data: m.value,
|
|
369
|
+
"onUpdate:data": t[8] || (t[8] = (l) => m.value = l),
|
|
370
|
+
items: c.menuItems,
|
|
371
|
+
"menu-list-gap": c.menuListGap,
|
|
372
|
+
onItemClick: de
|
|
282
373
|
}, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
|
|
283
|
-
[
|
|
374
|
+
[he, g.value]
|
|
284
375
|
])
|
|
285
376
|
], 64))
|
|
286
377
|
], 2));
|
|
287
378
|
}
|
|
288
|
-
}),
|
|
289
|
-
|
|
379
|
+
}), X = /* @__PURE__ */ Z(Fe, [["__scopeId", "data-v-85a4fc3d"]]), qe = function(u) {
|
|
380
|
+
u.component(X.name, X);
|
|
290
381
|
};
|
|
291
|
-
Object.assign(
|
|
382
|
+
Object.assign(X, {
|
|
292
383
|
name: "TrHistory",
|
|
293
|
-
install:
|
|
384
|
+
install: qe
|
|
294
385
|
});
|
|
295
386
|
export {
|
|
296
|
-
|
|
297
|
-
|
|
387
|
+
X as H,
|
|
388
|
+
Me as u
|
|
298
389
|
};
|