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