@opentiny/tiny-robot 0.5.2-beta.0 → 1.0.0-beta.1
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/extension-manager/index.js +176 -178
- package/dist/index.d.ts +70 -73
- package/dist/index3.js +95 -92
- package/dist/model-selector/index.js +483 -477
- package/dist/sender/index.js +111 -111
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ref as B, computed as x, watch as D, reactive as se, toValue as X, cloneVNode as Se, Comment as Me, Text as Ee, Fragment as P, isVNode as Ie, Teleport as Ae, Suspense as Pe, nextTick as
|
|
3
|
-
import { IconMore as Oe, IconArrowDown as
|
|
1
|
+
import * as le from "vue";
|
|
2
|
+
import { ref as B, computed as x, watch as D, reactive as se, toValue as X, cloneVNode as Se, Comment as Me, Text as Ee, Fragment as P, isVNode as Ie, Teleport as Ae, Suspense as Pe, nextTick as me, defineComponent as N, onMounted as ve, toRef as Ve, useSlots as G, openBlock as d, createElementBlock as p, createBlock as A, resolveDynamicComponent as H, renderSlot as M, withDirectives as ae, createElementVNode as k, normalizeStyle as ie, vShow as Ne, createVNode as j, withCtx as O, renderList as U, normalizeClass as R, createCommentVNode as S, toDisplayString as I, unref as $, withModifiers as oe, createSlots as J, normalizeProps as pe, guardReactiveProps as fe, createTextVNode as re, mergeProps as Le, onBeforeUnmount as Be, useModel as ce, vModelSelect as Re, vModelText as Fe, mergeModels as De } from "vue";
|
|
3
|
+
import { IconMore as Oe, IconArrowDown as ge, IconClose as je } from "@opentiny/tiny-robot-svgs";
|
|
4
4
|
import { g as Q } from "../index4.js";
|
|
5
5
|
import { _ as L } from "../_plugin-vue_export-helper.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const e =
|
|
6
|
+
const de = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
function be() {
|
|
8
|
+
const e = le.useId;
|
|
9
9
|
if (e)
|
|
10
10
|
return e();
|
|
11
|
-
const a =
|
|
11
|
+
const a = le.getCurrentInstance();
|
|
12
12
|
if (!a)
|
|
13
13
|
return "";
|
|
14
|
-
const t = a.appContext, s =
|
|
15
|
-
return
|
|
14
|
+
const t = a.appContext, s = de.get(t) ?? 0;
|
|
15
|
+
return de.set(t, s + 1), `tr-${s}`;
|
|
16
16
|
}
|
|
17
17
|
const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__PURE__ */ Object.create(null), z = (e, a, t) => {
|
|
18
18
|
Object.defineProperty(e, a, {
|
|
@@ -25,8 +25,8 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
25
25
|
const a = K();
|
|
26
26
|
for (const [t, s] of Object.entries(e)) {
|
|
27
27
|
const r = K();
|
|
28
|
-
for (const [
|
|
29
|
-
(
|
|
28
|
+
for (const [c, l] of Object.entries(s ?? {}))
|
|
29
|
+
(c === "installed" || c === "available") && z(r, c, l);
|
|
30
30
|
z(a, t, r);
|
|
31
31
|
}
|
|
32
32
|
return a;
|
|
@@ -39,7 +39,7 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
39
39
|
const r = Y(e, a) && e[a] !== void 0 ? e[a] : K();
|
|
40
40
|
Y(e, a) || z(e, a, r), z(r, t, s);
|
|
41
41
|
}, Ke = (e, a, t) => Ue(e, a, t) ?? !0, ze = (e, a) => {
|
|
42
|
-
const t = B(e.defaultActiveTab), s = B(K()), r = x(() => e.tabs.map((m) => m.id)),
|
|
42
|
+
const t = B(e.defaultActiveTab), s = B(K()), r = x(() => e.tabs.map((m) => m.id)), c = x(() => r.value[0]);
|
|
43
43
|
D(
|
|
44
44
|
r,
|
|
45
45
|
(m) => {
|
|
@@ -62,7 +62,7 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
62
62
|
);
|
|
63
63
|
const v = x(() => {
|
|
64
64
|
const m = e.activeTab ?? t.value, f = e.tabs.find((i) => i.id === m);
|
|
65
|
-
return (f == null ? void 0 : f.id) ??
|
|
65
|
+
return (f == null ? void 0 : f.id) ?? c.value;
|
|
66
66
|
}), o = x(
|
|
67
67
|
() => v.value === void 0 ? void 0 : e.tabs.find((m) => m.id === v.value)
|
|
68
68
|
);
|
|
@@ -96,17 +96,17 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
96
96
|
He(g, m, f, i), s.value = g, a("section-toggle", { tabId: m, sectionKey: f, expanded: i });
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
}, We = () => /* @__PURE__ */ Object.create(null),
|
|
100
|
-
const a = se(We()), t =
|
|
99
|
+
}, We = () => /* @__PURE__ */ Object.create(null), ue = () => se({ selectedTag: "", searchValue: "" }), qe = (e) => {
|
|
100
|
+
const a = se(We()), t = ue();
|
|
101
101
|
return D(
|
|
102
102
|
() => X(e).map((r) => r.id),
|
|
103
103
|
(r) => {
|
|
104
|
-
const
|
|
104
|
+
const c = new Set(r);
|
|
105
105
|
for (const l of Object.keys(a))
|
|
106
|
-
|
|
106
|
+
c.has(l) || delete a[l];
|
|
107
107
|
},
|
|
108
108
|
{ immediate: !0 }
|
|
109
|
-
), { getFilterState: (r) => r === void 0 ? t : a[r] ?? (a[r] =
|
|
109
|
+
), { getFilterState: (r) => r === void 0 ? t : a[r] ?? (a[r] = ue()) };
|
|
110
110
|
}, Xe = () => se({ selectedTag: "", searchValue: "" }), Je = (e) => {
|
|
111
111
|
const a = /* @__PURE__ */ new Set(), t = [];
|
|
112
112
|
for (const s of e)
|
|
@@ -129,9 +129,9 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
129
129
|
set: (o) => {
|
|
130
130
|
t.value.searchValue = o;
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), c = x(() => Je(X(e.tags)));
|
|
133
133
|
D(
|
|
134
|
-
|
|
134
|
+
c,
|
|
135
135
|
(o) => {
|
|
136
136
|
s.value && !o.some((n) => n.value === s.value) && (s.value = "");
|
|
137
137
|
},
|
|
@@ -140,12 +140,12 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
140
140
|
const l = x(() => {
|
|
141
141
|
var y, w;
|
|
142
142
|
const o = r.value.trim().toLowerCase(), n = ((y = e.rules) == null ? void 0 : y.getItemTags) ?? Qe, u = ((w = e.rules) == null ? void 0 : w.search) ?? Ye;
|
|
143
|
-
return X(e.items).filter((
|
|
144
|
-
const m = !s.value || n(
|
|
143
|
+
return X(e.items).filter((C) => {
|
|
144
|
+
const m = !s.value || n(C).includes(s.value), f = !o || u(C, o);
|
|
145
145
|
return m && f;
|
|
146
146
|
});
|
|
147
147
|
}), v = x(() => ({
|
|
148
|
-
tags:
|
|
148
|
+
tags: c.value,
|
|
149
149
|
selectedTag: s.value,
|
|
150
150
|
searchValue: r.value,
|
|
151
151
|
"onUpdate:selectedTag": (o) => {
|
|
@@ -156,13 +156,13 @@ const Y = (e, a) => Object.prototype.hasOwnProperty.call(e, a), K = () => /* @__
|
|
|
156
156
|
}
|
|
157
157
|
}));
|
|
158
158
|
return { filteredItems: l, selectedTag: s, searchValue: r, controls: v };
|
|
159
|
-
},
|
|
159
|
+
}, he = (e) => e.flatMap((a) => a.type === Me ? [] : a.type === Ee && typeof a.children == "string" && a.children.trim() === "" ? [] : a.type !== P || !Array.isArray(a.children) ? [a] : he(a.children.filter(Ie))), et = (e) => e.type === Ae || e.type === Pe ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
160
160
|
function tt({ getSlot: e, componentName: a }) {
|
|
161
161
|
return {
|
|
162
162
|
renderAsChild: (s, r = {}) => {
|
|
163
163
|
var l;
|
|
164
|
-
const
|
|
165
|
-
return
|
|
164
|
+
const c = he(((l = e()) == null ? void 0 : l(s)) ?? []);
|
|
165
|
+
return c.length !== 1 || !et(c[0]) ? null : Se(c[0], r, !0);
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
}
|
|
@@ -172,7 +172,7 @@ const nt = ({
|
|
|
172
172
|
open: t,
|
|
173
173
|
placement: s
|
|
174
174
|
}) => {
|
|
175
|
-
const r = B(),
|
|
175
|
+
const r = B(), c = () => {
|
|
176
176
|
if (!t.value || !e.value || !a.value) return;
|
|
177
177
|
const l = e.value.getBoundingClientRect(), v = a.value.getBoundingClientRect(), o = 8, n = 8, u = Math.max(
|
|
178
178
|
o,
|
|
@@ -180,10 +180,10 @@ const nt = ({
|
|
|
180
180
|
), y = Math.max(
|
|
181
181
|
o,
|
|
182
182
|
document.documentElement.clientHeight - v.height - o
|
|
183
|
-
), w = Math.min(u, Math.max(o, l.right - v.width)),
|
|
183
|
+
), w = Math.min(u, Math.max(o, l.right - v.width)), C = l.bottom + n, m = l.top - v.height - n, f = C + v.height <= document.documentElement.clientHeight - o, i = m >= o;
|
|
184
184
|
let g = s.value;
|
|
185
185
|
g === "bottom-end" && !f && i ? g = "top-end" : g === "top-end" && !i && f && (g = "bottom-end");
|
|
186
|
-
const V = Math.min(y, Math.max(o, g === "bottom-end" ?
|
|
186
|
+
const V = Math.min(y, Math.max(o, g === "bottom-end" ? C : m));
|
|
187
187
|
r.value = {
|
|
188
188
|
x: w,
|
|
189
189
|
y: V,
|
|
@@ -193,10 +193,10 @@ const nt = ({
|
|
|
193
193
|
return D(
|
|
194
194
|
[t, s],
|
|
195
195
|
async ([l]) => {
|
|
196
|
-
l && (await
|
|
196
|
+
l && (await me(), c());
|
|
197
197
|
},
|
|
198
198
|
{ flush: "post" }
|
|
199
|
-
), Q("resize",
|
|
199
|
+
), Q("resize", c, { passive: !0 }), Q("scroll", c, {
|
|
200
200
|
capture: !0,
|
|
201
201
|
passive: !0
|
|
202
202
|
}), {
|
|
@@ -210,14 +210,14 @@ const nt = ({
|
|
|
210
210
|
placement: { default: "bottom-end" }
|
|
211
211
|
},
|
|
212
212
|
setup(e) {
|
|
213
|
-
const a = e, t = `tr-extension-card-popover-${
|
|
214
|
-
|
|
213
|
+
const a = e, t = `tr-extension-card-popover-${be()}`, s = B(null), r = B(null), c = B(!1), l = B(!1);
|
|
214
|
+
ve(() => {
|
|
215
215
|
l.value = typeof HTMLElement.prototype.showPopover == "function" && typeof HTMLElement.prototype.hidePopover == "function";
|
|
216
216
|
});
|
|
217
217
|
const { position: v } = nt({
|
|
218
218
|
triggerRef: s,
|
|
219
219
|
popoverRef: r,
|
|
220
|
-
open:
|
|
220
|
+
open: c,
|
|
221
221
|
placement: Ve(a, "placement")
|
|
222
222
|
}), o = x(() => {
|
|
223
223
|
if (v.value)
|
|
@@ -231,31 +231,31 @@ const nt = ({
|
|
|
231
231
|
}, y = () => {
|
|
232
232
|
var i;
|
|
233
233
|
if (!l.value) {
|
|
234
|
-
|
|
234
|
+
c.value = !1;
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
(i = r.value) != null && i.matches(":popover-open") && r.value.hidePopover();
|
|
238
238
|
}, w = () => {
|
|
239
239
|
if (!l.value) {
|
|
240
|
-
|
|
240
|
+
c.value = !c.value;
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
r.value && (r.value.matches(":popover-open") ? r.value.hidePopover() : r.value.showPopover());
|
|
244
244
|
};
|
|
245
245
|
Q("click", (i) => {
|
|
246
246
|
var g, h;
|
|
247
|
-
l.value || !
|
|
247
|
+
l.value || !c.value || !(i.target instanceof Node) || (g = s.value) != null && g.contains(i.target) || (h = r.value) != null && h.contains(i.target) || y();
|
|
248
248
|
}), Q("keydown", (i) => {
|
|
249
249
|
var g;
|
|
250
|
-
l.value || !
|
|
250
|
+
l.value || !c.value || i.key !== "Escape" || (y(), (g = s.value) == null || g.focus());
|
|
251
251
|
});
|
|
252
|
-
const { renderAsChild:
|
|
252
|
+
const { renderAsChild: C } = tt({
|
|
253
253
|
getSlot: () => n.trigger,
|
|
254
254
|
componentName: "ExtensionCardPopover"
|
|
255
|
-
}), m = () =>
|
|
255
|
+
}), m = () => C(
|
|
256
256
|
{
|
|
257
257
|
popoverId: t,
|
|
258
|
-
open:
|
|
258
|
+
open: c.value
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
ref: u,
|
|
@@ -265,25 +265,25 @@ const nt = ({
|
|
|
265
265
|
} : { onClick: w }
|
|
266
266
|
}
|
|
267
267
|
), f = (i) => {
|
|
268
|
-
|
|
268
|
+
c.value = i.newState === "open";
|
|
269
269
|
};
|
|
270
|
-
return (i, g) => (
|
|
271
|
-
e.asChild ? (
|
|
270
|
+
return (i, g) => (d(), p(P, null, [
|
|
271
|
+
e.asChild ? (d(), A(H(m()), { key: 0 })) : (d(), p("button", {
|
|
272
272
|
key: 1,
|
|
273
273
|
ref_key: "triggerRef",
|
|
274
274
|
ref: s,
|
|
275
275
|
type: "button",
|
|
276
276
|
class: "tr-extension-card-popover__trigger",
|
|
277
277
|
"aria-controls": t,
|
|
278
|
-
"aria-expanded":
|
|
278
|
+
"aria-expanded": c.value,
|
|
279
279
|
onClick: w
|
|
280
280
|
}, [
|
|
281
281
|
M(i.$slots, "trigger", {
|
|
282
282
|
popoverId: t,
|
|
283
|
-
open:
|
|
283
|
+
open: c.value
|
|
284
284
|
}, void 0, !0)
|
|
285
285
|
], 8, at)),
|
|
286
|
-
ae(
|
|
286
|
+
ae(k("div", {
|
|
287
287
|
id: t,
|
|
288
288
|
ref_key: "popoverRef",
|
|
289
289
|
ref: r,
|
|
@@ -294,7 +294,7 @@ const nt = ({
|
|
|
294
294
|
}, [
|
|
295
295
|
M(i.$slots, "content", { close: y }, void 0, !0)
|
|
296
296
|
], 44, ot), [
|
|
297
|
-
[Ne, l.value ||
|
|
297
|
+
[Ne, l.value || c.value]
|
|
298
298
|
])
|
|
299
299
|
], 64));
|
|
300
300
|
}
|
|
@@ -318,20 +318,20 @@ const nt = ({
|
|
|
318
318
|
},
|
|
319
319
|
emits: ["action"],
|
|
320
320
|
setup(e, { emit: a }) {
|
|
321
|
-
const t = e, s = a, r = x(() => t.showIcons && t.actions.some((l) => !!l.icon)),
|
|
321
|
+
const t = e, s = a, r = x(() => t.showIcons && t.actions.some((l) => !!l.icon)), c = (l, v) => {
|
|
322
322
|
l.disabled || (v(), s("action", {
|
|
323
323
|
id: l.id,
|
|
324
324
|
type: l.type,
|
|
325
325
|
...l.type === "switch" ? { checked: !l.checked } : {}
|
|
326
326
|
}));
|
|
327
327
|
};
|
|
328
|
-
return (l, v) => t.actions.length ? (
|
|
328
|
+
return (l, v) => t.actions.length ? (d(), p("div", rt, [
|
|
329
329
|
j(it, {
|
|
330
330
|
"as-child": "",
|
|
331
331
|
placement: t.placement
|
|
332
332
|
}, {
|
|
333
333
|
trigger: O(({ open: o }) => [
|
|
334
|
-
|
|
334
|
+
k("button", {
|
|
335
335
|
class: "tr-extension-card__icon-button",
|
|
336
336
|
type: "button",
|
|
337
337
|
title: t.label,
|
|
@@ -342,24 +342,24 @@ const nt = ({
|
|
|
342
342
|
], 8, lt)
|
|
343
343
|
]),
|
|
344
344
|
content: O(({ close: o }) => [
|
|
345
|
-
|
|
346
|
-
(
|
|
345
|
+
k("ul", ct, [
|
|
346
|
+
(d(!0), p(P, null, U(t.actions, (n) => (d(), p("li", {
|
|
347
347
|
key: n.id
|
|
348
348
|
}, [
|
|
349
|
-
|
|
349
|
+
k("button", {
|
|
350
350
|
class: R(["tr-extension-card__more-menu-item", { "is-danger": n.danger }]),
|
|
351
351
|
type: "button",
|
|
352
352
|
disabled: n.disabled,
|
|
353
353
|
"aria-pressed": n.type === "switch" ? n.checked : void 0,
|
|
354
|
-
onClick: (u) =>
|
|
354
|
+
onClick: (u) => c(n, o)
|
|
355
355
|
}, [
|
|
356
|
-
r.value ? (
|
|
357
|
-
n.icon ? (
|
|
356
|
+
r.value ? (d(), p("span", ut, [
|
|
357
|
+
n.icon ? (d(), A(H(n.icon), {
|
|
358
358
|
key: 0,
|
|
359
359
|
class: "tr-extension-card__more-menu-item-icon"
|
|
360
|
-
})) : (
|
|
360
|
+
})) : (d(), p("span", mt))
|
|
361
361
|
])) : S("", !0),
|
|
362
|
-
|
|
362
|
+
k("span", null, I(n.label), 1)
|
|
363
363
|
], 10, dt)
|
|
364
364
|
]))), 128))
|
|
365
365
|
])
|
|
@@ -368,7 +368,7 @@ const nt = ({
|
|
|
368
368
|
}, 8, ["placement"])
|
|
369
369
|
])) : S("", !0);
|
|
370
370
|
}
|
|
371
|
-
}), pt = /* @__PURE__ */ L(vt, [["__scopeId", "data-v-
|
|
371
|
+
}), pt = /* @__PURE__ */ L(vt, [["__scopeId", "data-v-8d00263e"]]), ft = { class: "tr-extension-card-primary-actions" }, gt = ["checked", "disabled", "aria-label", "onChange"], bt = ["aria-label", "disabled", "onClick"], ht = ["aria-label", "disabled", "onClick"], _t = /* @__PURE__ */ N({
|
|
372
372
|
__name: "ExtensionCardActions",
|
|
373
373
|
props: {
|
|
374
374
|
actions: { default: () => [] }
|
|
@@ -383,22 +383,22 @@ const nt = ({
|
|
|
383
383
|
type: v.type,
|
|
384
384
|
checked: u
|
|
385
385
|
});
|
|
386
|
-
},
|
|
386
|
+
}, c = (v) => {
|
|
387
387
|
v.disabled || s("action", { id: v.id, type: v.type });
|
|
388
388
|
}, l = (v, o) => {
|
|
389
389
|
if (v.disabled) return;
|
|
390
390
|
const n = { id: v.id, type: v.type };
|
|
391
391
|
o !== void 0 && (n.payload = o), s("action", n);
|
|
392
392
|
};
|
|
393
|
-
return (v, o) => (
|
|
394
|
-
(
|
|
393
|
+
return (v, o) => (d(), p("div", ft, [
|
|
394
|
+
(d(!0), p(P, null, U(t.actions, (n) => (d(), p(P, {
|
|
395
395
|
key: n.id
|
|
396
396
|
}, [
|
|
397
|
-
n.type === "switch" ? (
|
|
397
|
+
n.type === "switch" ? (d(), p("label", {
|
|
398
398
|
key: 0,
|
|
399
399
|
class: R(["tr-extension-card-primary-actions__switch", { "is-disabled": n.disabled, "is-danger": n.danger }])
|
|
400
400
|
}, [
|
|
401
|
-
|
|
401
|
+
k("input", {
|
|
402
402
|
type: "checkbox",
|
|
403
403
|
role: "switch",
|
|
404
404
|
checked: n.checked,
|
|
@@ -406,21 +406,21 @@ const nt = ({
|
|
|
406
406
|
"aria-label": n.label,
|
|
407
407
|
onChange: (u) => r(n, u)
|
|
408
408
|
}, null, 40, gt),
|
|
409
|
-
o[0] || (o[0] =
|
|
410
|
-
], 2)) : n.type === "button" ? (
|
|
409
|
+
o[0] || (o[0] = k("span", { class: "tr-extension-card-primary-actions__switch-track" }, null, -1))
|
|
410
|
+
], 2)) : n.type === "button" ? (d(), p("button", {
|
|
411
411
|
key: 1,
|
|
412
412
|
class: R(["tr-extension-card-primary-actions__button", { "is-danger": n.danger }]),
|
|
413
413
|
type: "button",
|
|
414
414
|
"aria-label": n.label,
|
|
415
415
|
disabled: n.disabled,
|
|
416
|
-
onClick: (u) =>
|
|
416
|
+
onClick: (u) => c(n)
|
|
417
417
|
}, [
|
|
418
|
-
n.icon ? (
|
|
418
|
+
n.icon ? (d(), A(H(n.icon), {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "tr-extension-card-primary-actions__button-icon"
|
|
421
421
|
})) : S("", !0),
|
|
422
|
-
|
|
423
|
-
], 10, bt)) : v.$slots["primary-action"] ? (
|
|
422
|
+
k("span", null, I(n.label), 1)
|
|
423
|
+
], 10, bt)) : v.$slots["primary-action"] ? (d(), p("span", {
|
|
424
424
|
key: 2,
|
|
425
425
|
class: R(["tr-extension-card-primary-actions__custom-action", { "is-disabled": n.disabled, "is-danger": n.danger }])
|
|
426
426
|
}, [
|
|
@@ -428,7 +428,7 @@ const nt = ({
|
|
|
428
428
|
action: n,
|
|
429
429
|
trigger: (u) => l(n, u)
|
|
430
430
|
}, void 0, !0)
|
|
431
|
-
], 2)) : (
|
|
431
|
+
], 2)) : (d(), p("button", {
|
|
432
432
|
key: 3,
|
|
433
433
|
class: R(["tr-extension-card-primary-actions__button", { "is-danger": n.danger }]),
|
|
434
434
|
type: "button",
|
|
@@ -436,16 +436,16 @@ const nt = ({
|
|
|
436
436
|
disabled: n.disabled,
|
|
437
437
|
onClick: (u) => l(n)
|
|
438
438
|
}, [
|
|
439
|
-
n.icon ? (
|
|
439
|
+
n.icon ? (d(), A(H(n.icon), {
|
|
440
440
|
key: 0,
|
|
441
441
|
class: "tr-extension-card-primary-actions__button-icon"
|
|
442
442
|
})) : S("", !0),
|
|
443
|
-
|
|
443
|
+
k("span", null, I(n.label), 1)
|
|
444
444
|
], 10, ht))
|
|
445
445
|
], 64))), 128))
|
|
446
446
|
]));
|
|
447
447
|
}
|
|
448
|
-
}), yt = /* @__PURE__ */ L(_t, [["__scopeId", "data-v-
|
|
448
|
+
}), yt = /* @__PURE__ */ L(_t, [["__scopeId", "data-v-7f997e75"]]), xt = { class: "tr-extension-card" }, kt = { class: "tr-extension-card__icon-region" }, Ct = ["src", "alt"], Tt = {
|
|
449
449
|
key: 2,
|
|
450
450
|
class: "tr-extension-card__icon tr-extension-card__icon--placeholder"
|
|
451
451
|
}, wt = { class: "tr-extension-card__content" }, $t = ["role", "tabindex", "title"], St = ["title"], Mt = ["aria-label", "aria-valuenow"], Et = /* @__PURE__ */ N({
|
|
@@ -464,41 +464,41 @@ const nt = ({
|
|
|
464
464
|
},
|
|
465
465
|
emits: ["name-click", "action"],
|
|
466
466
|
setup(e, { emit: a }) {
|
|
467
|
-
const t = e, s = G(), r = a,
|
|
467
|
+
const t = e, s = G(), r = a, c = x(() => t.actions.filter((f) => !f.hidden)), l = x(() => Math.max(0, Math.floor(t.primaryActionsLimit))), v = x(() => c.value.slice(0, l.value)), o = x(() => c.value.slice(l.value)), n = x(() => v.value.length > 0 || o.value.length > 0), u = x(() => t.progress === "indeterminate" || t.progress === void 0 ? t.progress : Math.min(100, Math.max(0, t.progress))), y = x(() => !!s["primary-action"]), w = (f) => {
|
|
468
468
|
r("action", f);
|
|
469
|
-
},
|
|
469
|
+
}, C = (f) => {
|
|
470
470
|
t.nameClickable && r("name-click", f);
|
|
471
471
|
}, m = (f) => {
|
|
472
472
|
!t.nameClickable || f.key !== "Enter" && f.key !== " " || (f.preventDefault(), r("name-click", f));
|
|
473
473
|
};
|
|
474
|
-
return (f, i) => (
|
|
475
|
-
|
|
476
|
-
typeof e.icon == "string" && e.icon ? (
|
|
474
|
+
return (f, i) => (d(), p("div", xt, [
|
|
475
|
+
k("div", kt, [
|
|
476
|
+
typeof e.icon == "string" && e.icon ? (d(), p("img", {
|
|
477
477
|
key: 0,
|
|
478
478
|
src: e.icon,
|
|
479
479
|
alt: e.name,
|
|
480
480
|
class: "tr-extension-card__icon"
|
|
481
|
-
}, null, 8, Ct)) : e.icon ? (
|
|
481
|
+
}, null, 8, Ct)) : e.icon ? (d(), A(H(e.icon), {
|
|
482
482
|
key: 1,
|
|
483
483
|
class: "tr-extension-card__icon"
|
|
484
|
-
})) : (
|
|
484
|
+
})) : (d(), p("div", Tt, I(e.name.slice(0, 1)), 1))
|
|
485
485
|
]),
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
k("div", wt, [
|
|
487
|
+
k("div", {
|
|
488
488
|
class: R(["tr-extension-card__name", { "is-clickable": e.nameClickable }]),
|
|
489
489
|
role: e.nameClickable ? "button" : void 0,
|
|
490
490
|
tabindex: e.nameClickable ? 0 : void 0,
|
|
491
491
|
title: e.name,
|
|
492
|
-
onClick:
|
|
492
|
+
onClick: C,
|
|
493
493
|
onKeydown: m
|
|
494
494
|
}, I(e.name), 43, $t),
|
|
495
|
-
e.description ? (
|
|
495
|
+
e.description ? (d(), p("div", {
|
|
496
496
|
key: 0,
|
|
497
497
|
class: "tr-extension-card__description",
|
|
498
498
|
title: e.description
|
|
499
499
|
}, I(e.description), 9, St)) : S("", !0)
|
|
500
500
|
]),
|
|
501
|
-
n.value ? (
|
|
501
|
+
n.value ? (d(), p("div", {
|
|
502
502
|
key: 0,
|
|
503
503
|
class: "tr-extension-card__actions",
|
|
504
504
|
onClick: i[1] || (i[1] = oe(() => {
|
|
@@ -506,7 +506,7 @@ const nt = ({
|
|
|
506
506
|
onKeydown: i[2] || (i[2] = oe(() => {
|
|
507
507
|
}, ["stop"]))
|
|
508
508
|
}, [
|
|
509
|
-
v.value.length ? (
|
|
509
|
+
v.value.length ? (d(), A(yt, {
|
|
510
510
|
key: 0,
|
|
511
511
|
actions: v.value,
|
|
512
512
|
onAction: i[0] || (i[0] = (g) => r("action", g))
|
|
@@ -514,12 +514,12 @@ const nt = ({
|
|
|
514
514
|
y.value ? {
|
|
515
515
|
name: "primary-action",
|
|
516
516
|
fn: O((g) => [
|
|
517
|
-
M(f.$slots, "primary-action", fe(
|
|
517
|
+
M(f.$slots, "primary-action", pe(fe(g)), void 0, !0)
|
|
518
518
|
]),
|
|
519
519
|
key: "0"
|
|
520
520
|
} : void 0
|
|
521
521
|
]), 1032, ["actions"])) : S("", !0),
|
|
522
|
-
o.value.length ? (
|
|
522
|
+
o.value.length ? (d(), A(pt, {
|
|
523
523
|
key: 1,
|
|
524
524
|
actions: o.value,
|
|
525
525
|
label: e.overflowMenuLabel,
|
|
@@ -528,7 +528,7 @@ const nt = ({
|
|
|
528
528
|
onAction: w
|
|
529
529
|
}, null, 8, ["actions", "label", "placement", "show-icons"])) : S("", !0)
|
|
530
530
|
], 32)) : S("", !0),
|
|
531
|
-
u.value !== void 0 ? (
|
|
531
|
+
u.value !== void 0 ? (d(), p("div", {
|
|
532
532
|
key: 1,
|
|
533
533
|
class: "tr-extension-card__progress",
|
|
534
534
|
role: "progressbar",
|
|
@@ -537,14 +537,14 @@ const nt = ({
|
|
|
537
537
|
"aria-valuemax": "100",
|
|
538
538
|
"aria-valuenow": u.value === "indeterminate" ? void 0 : u.value
|
|
539
539
|
}, [
|
|
540
|
-
|
|
540
|
+
k("span", {
|
|
541
541
|
class: R(["tr-extension-card__progress-bar", { "is-indeterminate": u.value === "indeterminate" }]),
|
|
542
542
|
style: ie(u.value === "indeterminate" ? void 0 : { width: `${u.value}%` })
|
|
543
543
|
}, null, 6)
|
|
544
544
|
], 8, Mt)) : S("", !0)
|
|
545
545
|
]));
|
|
546
546
|
}
|
|
547
|
-
}), W = /* @__PURE__ */ L(Et, [["__scopeId", "data-v-
|
|
547
|
+
}), W = /* @__PURE__ */ L(Et, [["__scopeId", "data-v-adf5e9c0"]]), It = { class: "tr-extension-card-grid" }, At = {
|
|
548
548
|
key: 0,
|
|
549
549
|
class: "tr-extension-card-grid__empty"
|
|
550
550
|
}, Pt = ["data-card-id"], Vt = /* @__PURE__ */ N({
|
|
@@ -560,7 +560,7 @@ const nt = ({
|
|
|
560
560
|
},
|
|
561
561
|
emits: ["action", "name-click"],
|
|
562
562
|
setup(e, { emit: a }) {
|
|
563
|
-
const t = e, s = G(), r = a,
|
|
563
|
+
const t = e, s = G(), r = a, c = (o) => {
|
|
564
564
|
const { id: n, ...u } = o;
|
|
565
565
|
return {
|
|
566
566
|
...u,
|
|
@@ -575,12 +575,12 @@ const nt = ({
|
|
|
575
575
|
}, v = (o, n) => {
|
|
576
576
|
r("name-click", { itemId: o, event: n });
|
|
577
577
|
};
|
|
578
|
-
return (o, n) => (
|
|
579
|
-
e.items.length === 0 ? (
|
|
578
|
+
return (o, n) => (d(), p("ul", It, [
|
|
579
|
+
e.items.length === 0 ? (d(), p("li", At, [
|
|
580
580
|
M(o.$slots, "empty", {}, () => [
|
|
581
581
|
re(I(e.emptyText), 1)
|
|
582
582
|
], !0)
|
|
583
|
-
])) : (
|
|
583
|
+
])) : (d(!0), p(P, { key: 1 }, U(e.items, (u, y) => (d(), p("li", {
|
|
584
584
|
key: u.id,
|
|
585
585
|
class: "tr-extension-card-grid__item",
|
|
586
586
|
"data-card-id": u.id
|
|
@@ -588,10 +588,10 @@ const nt = ({
|
|
|
588
588
|
$(s).item ? M(o.$slots, "item", {
|
|
589
589
|
item: u,
|
|
590
590
|
index: y
|
|
591
|
-
}, void 0, !0, 0) : (
|
|
591
|
+
}, void 0, !0, 0) : (d(), A(W, Le({
|
|
592
592
|
key: 1,
|
|
593
593
|
ref_for: !0
|
|
594
|
-
},
|
|
594
|
+
}, c(u), {
|
|
595
595
|
onAction: (w) => l(u.id, w),
|
|
596
596
|
onNameClick: (w) => v(u.id, w)
|
|
597
597
|
}), null, 16, ["onAction", "onNameClick"]))
|
|
@@ -614,27 +614,27 @@ const nt = ({
|
|
|
614
614
|
},
|
|
615
615
|
emits: ["section-toggle", "action", "name-click"],
|
|
616
616
|
setup(e, { emit: a }) {
|
|
617
|
-
const t = e, s = G(), r = a,
|
|
618
|
-
return (o, n) => (
|
|
617
|
+
const t = e, s = G(), r = a, c = () => r("section-toggle", !t.expanded), l = (o) => r("action", o), v = (o) => r("name-click", o);
|
|
618
|
+
return (o, n) => (d(), p("section", {
|
|
619
619
|
class: "extension-manager-section",
|
|
620
620
|
"data-tab-id": t.tabId,
|
|
621
621
|
"data-section-key": t.section.key
|
|
622
622
|
}, [
|
|
623
|
-
|
|
624
|
-
|
|
623
|
+
k("div", Lt, [
|
|
624
|
+
k("button", {
|
|
625
625
|
class: "extension-manager-section__title",
|
|
626
626
|
type: "button",
|
|
627
627
|
"aria-expanded": t.expanded,
|
|
628
|
-
onClick:
|
|
628
|
+
onClick: c
|
|
629
629
|
}, [
|
|
630
|
-
j($(
|
|
630
|
+
j($(ge), {
|
|
631
631
|
class: R(["extension-manager-section__arrow", { "is-expanded": t.expanded }])
|
|
632
632
|
}, null, 8, ["class"]),
|
|
633
|
-
|
|
633
|
+
k("span", null, I(t.section.title), 1)
|
|
634
634
|
], 8, Bt)
|
|
635
635
|
]),
|
|
636
|
-
t.expanded ? (
|
|
637
|
-
t.section.items.length > 0 ? (
|
|
636
|
+
t.expanded ? (d(), p("div", Rt, [
|
|
637
|
+
t.section.items.length > 0 ? (d(), A(q, {
|
|
638
638
|
key: 0,
|
|
639
639
|
items: t.section.items,
|
|
640
640
|
"primary-actions-limit": 1,
|
|
@@ -652,7 +652,7 @@ const nt = ({
|
|
|
652
652
|
]),
|
|
653
653
|
key: "0"
|
|
654
654
|
} : void 0
|
|
655
|
-
]), 1032, ["items"])) : (
|
|
655
|
+
]), 1032, ["items"])) : (d(), p("div", Ft, [
|
|
656
656
|
M(o.$slots, "empty", {}, () => [
|
|
657
657
|
n[0] || (n[0] = re("暂无内容", -1))
|
|
658
658
|
], !0)
|
|
@@ -674,7 +674,7 @@ const nt = ({
|
|
|
674
674
|
},
|
|
675
675
|
emits: ["select"],
|
|
676
676
|
setup(e, { emit: a }) {
|
|
677
|
-
const t = e, s = a, r = G(),
|
|
677
|
+
const t = e, s = a, r = G(), c = (i) => `${i.length}:${i}`, l = (i) => `${t.idPrefix}-tab-${c(i)}`, v = (i) => `${t.idPrefix}-tabpanel-${c(i)}`, o = /* @__PURE__ */ new Map(), n = B();
|
|
678
678
|
let u;
|
|
679
679
|
const y = () => {
|
|
680
680
|
const i = t.activeTabId ? o.get(t.activeTabId) : void 0;
|
|
@@ -690,11 +690,11 @@ const nt = ({
|
|
|
690
690
|
const h = o.get(i);
|
|
691
691
|
h && h !== g && (u == null || u.unobserve(h)), g ? (o.set(i, g), u == null || u.observe(g)) : o.delete(i);
|
|
692
692
|
};
|
|
693
|
-
D([() => t.activeTabId, () => t.tabs.map((i) => i.id)], y, { flush: "post" }),
|
|
693
|
+
D([() => t.activeTabId, () => t.tabs.map((i) => i.id)], y, { flush: "post" }), ve(() => {
|
|
694
694
|
typeof ResizeObserver < "u" && (u = new ResizeObserver(y), o.forEach((i) => u == null ? void 0 : u.observe(i))), y();
|
|
695
695
|
}), Be(() => u == null ? void 0 : u.disconnect());
|
|
696
|
-
const
|
|
697
|
-
|
|
696
|
+
const C = (i) => s("select", i), m = (i) => {
|
|
697
|
+
me(() => {
|
|
698
698
|
var g;
|
|
699
699
|
return (g = o.get(i)) == null ? void 0 : g.focus();
|
|
700
700
|
});
|
|
@@ -717,10 +717,10 @@ const nt = ({
|
|
|
717
717
|
return;
|
|
718
718
|
}
|
|
719
719
|
const V = t.tabs[h];
|
|
720
|
-
V && (g.preventDefault(),
|
|
720
|
+
V && (g.preventDefault(), C(V.id), m(V.id));
|
|
721
721
|
};
|
|
722
|
-
return (i, g) => (
|
|
723
|
-
(
|
|
722
|
+
return (i, g) => (d(), p("div", jt, [
|
|
723
|
+
(d(!0), p(P, null, U(t.tabs, (h, V) => (d(), p("button", {
|
|
724
724
|
key: h.id,
|
|
725
725
|
ref_for: !0,
|
|
726
726
|
ref: (F) => w(h.id, F),
|
|
@@ -731,10 +731,10 @@ const nt = ({
|
|
|
731
731
|
"aria-selected": h.id === t.activeTabId,
|
|
732
732
|
"aria-controls": h.id === t.activeTabId ? v(h.id) : void 0,
|
|
733
733
|
tabindex: h.id === t.activeTabId ? 0 : -1,
|
|
734
|
-
onClick: (F) =>
|
|
734
|
+
onClick: (F) => C(h.id),
|
|
735
735
|
onKeydown: (F) => f(V, F)
|
|
736
736
|
}, [
|
|
737
|
-
r.tab ? (
|
|
737
|
+
r.tab ? (d(), p("span", {
|
|
738
738
|
key: 0,
|
|
739
739
|
class: "extension-manager-tabs__slot",
|
|
740
740
|
onClick: g[0] || (g[0] = oe(() => {
|
|
@@ -743,13 +743,13 @@ const nt = ({
|
|
|
743
743
|
M(i.$slots, "tab", {
|
|
744
744
|
tab: h,
|
|
745
745
|
active: h.id === t.activeTabId,
|
|
746
|
-
select: () =>
|
|
746
|
+
select: () => C(h.id)
|
|
747
747
|
}, void 0, !0)
|
|
748
|
-
])) : (
|
|
748
|
+
])) : (d(), p(P, { key: 1 }, [
|
|
749
749
|
re(I(h.label), 1)
|
|
750
750
|
], 64))
|
|
751
751
|
], 40, Gt))), 128)),
|
|
752
|
-
n.value ? (
|
|
752
|
+
n.value ? (d(), p("span", {
|
|
753
753
|
key: 0,
|
|
754
754
|
class: "extension-manager-tabs__indicator",
|
|
755
755
|
style: ie(n.value),
|
|
@@ -757,16 +757,13 @@ const nt = ({
|
|
|
757
757
|
}, null, 4)) : S("", !0)
|
|
758
758
|
]));
|
|
759
759
|
}
|
|
760
|
-
}), Ht = /* @__PURE__ */ L(Ut, [["__scopeId", "data-v-
|
|
760
|
+
}), Ht = /* @__PURE__ */ L(Ut, [["__scopeId", "data-v-6a23a300"]]), Kt = {
|
|
761
761
|
class: "extension-filter-controls",
|
|
762
762
|
"data-testid": "extension-filter-controls"
|
|
763
763
|
}, zt = {
|
|
764
764
|
"data-testid": "filter-root",
|
|
765
765
|
class: "extension-filter-controls__fields"
|
|
766
|
-
}, Wt = {
|
|
767
|
-
key: 0,
|
|
768
|
-
class: "extension-filter-controls__select-wrapper"
|
|
769
|
-
}, qt = ["value"], Xt = { class: "extension-filter-controls__input-wrapper" }, Jt = /* @__PURE__ */ N({
|
|
766
|
+
}, Wt = { class: "extension-filter-controls__select-wrapper" }, qt = ["disabled"], Xt = ["value"], Jt = { class: "extension-filter-controls__input-wrapper" }, Qt = /* @__PURE__ */ N({
|
|
770
767
|
name: "ExtensionFilterControls",
|
|
771
768
|
__name: "ExtensionFilterControls",
|
|
772
769
|
props: /* @__PURE__ */ De({
|
|
@@ -779,47 +776,48 @@ const nt = ({
|
|
|
779
776
|
}),
|
|
780
777
|
emits: ["update:selectedTag", "update:searchValue"],
|
|
781
778
|
setup(e) {
|
|
782
|
-
const a = e, t =
|
|
783
|
-
return (r,
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
ae(
|
|
779
|
+
const a = e, t = ce(e, "selectedTag"), s = ce(e, "searchValue");
|
|
780
|
+
return (r, c) => (d(), p("div", Kt, [
|
|
781
|
+
k("div", zt, [
|
|
782
|
+
k("div", Wt, [
|
|
783
|
+
ae(k("select", {
|
|
787
784
|
"data-testid": "filter-tag",
|
|
788
785
|
class: "extension-filter-controls__select",
|
|
789
786
|
"aria-label": "标签",
|
|
790
|
-
|
|
787
|
+
disabled: a.tags.length === 0,
|
|
788
|
+
"onUpdate:modelValue": c[0] || (c[0] = (l) => t.value = l)
|
|
791
789
|
}, [
|
|
792
|
-
|
|
793
|
-
(
|
|
790
|
+
c[3] || (c[3] = k("option", { value: "" }, "全部标签", -1)),
|
|
791
|
+
(d(!0), p(P, null, U(a.tags, (l) => (d(), p("option", {
|
|
794
792
|
key: l.value,
|
|
795
793
|
value: l.value
|
|
796
|
-
}, I(l.label), 9,
|
|
797
|
-
],
|
|
794
|
+
}, I(l.label), 9, Xt))), 128))
|
|
795
|
+
], 8, qt), [
|
|
798
796
|
[Re, t.value]
|
|
799
797
|
]),
|
|
800
|
-
j($(
|
|
798
|
+
j($(ge), {
|
|
801
799
|
class: "extension-filter-controls__select-arrow",
|
|
802
800
|
"aria-hidden": "true"
|
|
803
801
|
})
|
|
804
|
-
])
|
|
805
|
-
|
|
806
|
-
ae(
|
|
802
|
+
]),
|
|
803
|
+
k("div", Jt, [
|
|
804
|
+
ae(k("input", {
|
|
807
805
|
"data-testid": "filter-search",
|
|
808
806
|
class: "extension-filter-controls__input",
|
|
809
807
|
type: "search",
|
|
810
808
|
"aria-label": "搜索扩展",
|
|
811
809
|
placeholder: "请输入关键字搜索",
|
|
812
|
-
"onUpdate:modelValue":
|
|
810
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => s.value = l)
|
|
813
811
|
}, null, 512), [
|
|
814
812
|
[Fe, s.value]
|
|
815
813
|
]),
|
|
816
|
-
s.value ? (
|
|
814
|
+
s.value ? (d(), p("button", {
|
|
817
815
|
key: 0,
|
|
818
816
|
"data-testid": "filter-search-clear",
|
|
819
817
|
class: "extension-filter-controls__clear",
|
|
820
818
|
type: "button",
|
|
821
819
|
"aria-label": "清空搜索",
|
|
822
|
-
onClick:
|
|
820
|
+
onClick: c[2] || (c[2] = (l) => s.value = "")
|
|
823
821
|
}, [
|
|
824
822
|
j($(je), {
|
|
825
823
|
class: "extension-filter-controls__clear-icon",
|
|
@@ -830,19 +828,19 @@ const nt = ({
|
|
|
830
828
|
])
|
|
831
829
|
]));
|
|
832
830
|
}
|
|
833
|
-
}),
|
|
831
|
+
}), Yt = /* @__PURE__ */ L(Qt, [["__scopeId", "data-v-21ca2283"]]), Zt = { class: "extension-manager" }, en = {
|
|
834
832
|
key: 0,
|
|
835
833
|
class: "extension-manager__header"
|
|
836
|
-
},
|
|
834
|
+
}, tn = {
|
|
837
835
|
key: 0,
|
|
838
836
|
class: "extension-manager__title"
|
|
839
|
-
},
|
|
837
|
+
}, nn = {
|
|
840
838
|
key: 1,
|
|
841
839
|
class: "extension-manager__header-actions"
|
|
842
|
-
},
|
|
843
|
-
key:
|
|
840
|
+
}, an = ["id", "aria-labelledby"], on = {
|
|
841
|
+
key: 2,
|
|
844
842
|
class: "extension-manager__empty"
|
|
845
|
-
},
|
|
843
|
+
}, sn = /* @__PURE__ */ N({
|
|
846
844
|
name: "ExtensionManager",
|
|
847
845
|
__name: "index",
|
|
848
846
|
props: {
|
|
@@ -854,10 +852,10 @@ const nt = ({
|
|
|
854
852
|
},
|
|
855
853
|
emits: ["update:active-tab", "tab-change", "section-toggle", "action", "name-click"],
|
|
856
854
|
setup(e, { emit: a }) {
|
|
857
|
-
const t = e, s = a, r = G(),
|
|
855
|
+
const t = e, s = a, r = G(), c = [
|
|
858
856
|
{ key: "installed", title: "已安装" },
|
|
859
857
|
{ key: "available", title: "可安装" }
|
|
860
|
-
], l = (b) => b.length + ":" + b, v = (b, T) => "extension-manager/section/" + l(b) + "/" + l(T), n = "extension-manager-" +
|
|
858
|
+
], l = (b) => b.length + ":" + b, v = (b, T) => "extension-manager/section/" + l(b) + "/" + l(T), n = "extension-manager-" + be(), u = (b) => n + "-tab-" + l(b), y = (b) => n + "-tabpanel-" + l(b), w = (b, T) => {
|
|
861
859
|
switch (b) {
|
|
862
860
|
case "update:active-tab":
|
|
863
861
|
s("update:active-tab", T);
|
|
@@ -869,32 +867,32 @@ const nt = ({
|
|
|
869
867
|
s("section-toggle", T);
|
|
870
868
|
break;
|
|
871
869
|
}
|
|
872
|
-
}, { activeTab:
|
|
870
|
+
}, { activeTab: C, activeTabId: m, selectTab: f, isSectionExpanded: i, toggleSection: g } = ze(
|
|
873
871
|
t,
|
|
874
872
|
w
|
|
875
873
|
), { getFilterState: h } = qe(() => t.tabs), V = (b) => [...new Set(b.flatMap((_) => _.tags ?? []))].map((_) => ({ value: _, label: _ })), F = Ze({
|
|
876
874
|
items: () => {
|
|
877
875
|
var b;
|
|
878
|
-
return ((b =
|
|
876
|
+
return ((b = C.value) == null ? void 0 : b.items) ?? [];
|
|
879
877
|
},
|
|
880
878
|
tags: () => {
|
|
881
879
|
var b;
|
|
882
|
-
return V(((b =
|
|
880
|
+
return V(((b = C.value) == null ? void 0 : b.items) ?? []);
|
|
883
881
|
},
|
|
884
882
|
state: () => h(m.value)
|
|
885
|
-
}),
|
|
883
|
+
}), _e = x(() => C.value !== void 0), ye = x(() => !!(t.title || r["header-actions"])), xe = (b) => {
|
|
886
884
|
const { installed: T, tags: _, ...E } = b;
|
|
887
885
|
return E;
|
|
888
886
|
}, ke = x(() => {
|
|
889
887
|
const b = F.filteredItems.value;
|
|
890
|
-
return
|
|
888
|
+
return c.map(({ key: T, title: _ }) => ({
|
|
891
889
|
key: T,
|
|
892
890
|
title: _,
|
|
893
891
|
items: b.filter((E) => (E.installed === !0 ? "installed" : "available") === T).map(xe)
|
|
894
892
|
}));
|
|
895
893
|
}), Ce = (b, T) => i(b, T), Te = (b, T) => {
|
|
896
894
|
var _;
|
|
897
|
-
((_ =
|
|
895
|
+
((_ = C.value) == null ? void 0 : _.id) === b && g(b, T);
|
|
898
896
|
}, we = (b, T, _) => {
|
|
899
897
|
s("action", {
|
|
900
898
|
tabId: b,
|
|
@@ -910,10 +908,10 @@ const nt = ({
|
|
|
910
908
|
event: _.event
|
|
911
909
|
});
|
|
912
910
|
};
|
|
913
|
-
return (b, T) => (
|
|
914
|
-
ye.value ? (
|
|
915
|
-
t.title ? (
|
|
916
|
-
r["header-actions"] ? (
|
|
911
|
+
return (b, T) => (d(), p("div", Zt, [
|
|
912
|
+
ye.value ? (d(), p("div", en, [
|
|
913
|
+
t.title ? (d(), p("div", tn, I(t.title), 1)) : S("", !0),
|
|
914
|
+
r["header-actions"] ? (d(), p("div", nn, [
|
|
917
915
|
M(b.$slots, "header-actions", {}, void 0, !0)
|
|
918
916
|
])) : S("", !0)
|
|
919
917
|
])) : S("", !0),
|
|
@@ -935,15 +933,15 @@ const nt = ({
|
|
|
935
933
|
key: "0"
|
|
936
934
|
} : void 0
|
|
937
935
|
]), 1032, ["tabs", "active-tab-id", "onSelect"]),
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
key:
|
|
936
|
+
j(Yt, pe(fe($(F).controls.value)), null, 16),
|
|
937
|
+
_e.value ? (d(), p("div", {
|
|
938
|
+
key: 1,
|
|
941
939
|
class: "extension-manager__sections",
|
|
942
940
|
role: "tabpanel",
|
|
943
941
|
id: y($(m)),
|
|
944
942
|
"aria-labelledby": u($(m))
|
|
945
943
|
}, [
|
|
946
|
-
(
|
|
944
|
+
(d(!0), p(P, null, U(ke.value, (_) => (d(), A(Ot, {
|
|
947
945
|
key: v($(m), _.key),
|
|
948
946
|
"tab-id": $(m),
|
|
949
947
|
section: _,
|
|
@@ -956,7 +954,7 @@ const nt = ({
|
|
|
956
954
|
name: "item",
|
|
957
955
|
fn: O(({ item: E, index: ne }) => [
|
|
958
956
|
M(b.$slots, "item", {
|
|
959
|
-
tab: $(
|
|
957
|
+
tab: $(C),
|
|
960
958
|
sectionKey: _.key,
|
|
961
959
|
item: E,
|
|
962
960
|
index: ne
|
|
@@ -968,7 +966,7 @@ const nt = ({
|
|
|
968
966
|
name: "empty",
|
|
969
967
|
fn: O(() => [
|
|
970
968
|
M(b.$slots, "empty", {
|
|
971
|
-
tab: $(
|
|
969
|
+
tab: $(C),
|
|
972
970
|
sectionKey: _.key,
|
|
973
971
|
title: _.title
|
|
974
972
|
}, void 0, !0)
|
|
@@ -976,31 +974,31 @@ const nt = ({
|
|
|
976
974
|
key: "1"
|
|
977
975
|
} : void 0
|
|
978
976
|
]), 1032, ["tab-id", "section", "expanded", "onSectionToggle", "onAction", "onNameClick"]))), 128))
|
|
979
|
-
], 8,
|
|
977
|
+
], 8, an)) : (d(), p("div", on, I(t.emptyText), 1))
|
|
980
978
|
]));
|
|
981
979
|
}
|
|
982
|
-
}), Z = /* @__PURE__ */ L(
|
|
980
|
+
}), Z = /* @__PURE__ */ L(sn, [["__scopeId", "data-v-f410c157"]]);
|
|
983
981
|
W.name = "TrExtensionCard";
|
|
984
|
-
const
|
|
982
|
+
const rn = function(e) {
|
|
985
983
|
e.component(W.name, W);
|
|
986
984
|
}, ee = W;
|
|
987
|
-
ee.install =
|
|
985
|
+
ee.install = rn;
|
|
988
986
|
q.name = "TrExtensionCardGrid";
|
|
989
|
-
const
|
|
987
|
+
const ln = function(e) {
|
|
990
988
|
e.component(q.name, q);
|
|
991
989
|
}, te = q;
|
|
992
|
-
te.install =
|
|
990
|
+
te.install = ln;
|
|
993
991
|
Z.name = "TrExtensionManager";
|
|
994
|
-
const
|
|
992
|
+
const cn = function(e) {
|
|
995
993
|
e.component(Z.name, Z), e.component(ee.name, ee), e.component(te.name, te);
|
|
996
|
-
},
|
|
997
|
-
install:
|
|
994
|
+
}, pn = Object.assign(Z, {
|
|
995
|
+
install: cn,
|
|
998
996
|
Card: ee,
|
|
999
997
|
CardGrid: te
|
|
1000
998
|
});
|
|
1001
999
|
export {
|
|
1002
1000
|
ee as ExtensionCard,
|
|
1003
1001
|
te as ExtensionCardGrid,
|
|
1004
|
-
|
|
1005
|
-
|
|
1002
|
+
pn as ExtensionManager,
|
|
1003
|
+
pn as default
|
|
1006
1004
|
};
|