@opentiny/tiny-robot 0.3.0-alpha.7 → 0.3.0-alpha.8
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/action-group/index.js +15 -15
- package/dist/attachments/index.js +526 -0
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +1949 -1229
- package/dist/container/index.js +12 -12
- package/dist/drag-overlay/index.js +57 -0
- package/dist/dropdown-menu/index.js +4 -4
- package/dist/feedback/index.js +55 -55
- package/dist/flow-layout-buttons/index.js +24 -24
- package/dist/history/index.js +46 -46
- package/dist/index.d.ts +975 -393
- package/dist/index.js +207 -63
- package/dist/index2.js +610 -593
- package/dist/index3.js +676 -134
- package/dist/index4.js +137 -306
- package/dist/index5.js +270 -591
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +29682 -0
- package/dist/question/index.js +28 -28
- package/dist/sender/index.js +709 -659
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +22 -22
- package/dist/suggestion-pills/index.js +25 -25
- package/dist/suggestion-popover/index.js +178 -177
- package/dist/tiny-robot-svgs.js +727 -178
- package/dist/useSlotRefs.js +12 -12
- package/package.json +9 -3
package/dist/container/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, useCssVars as v, useModel as d, computed as _, createElementBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as m, useCssVars as v, useModel as d, computed as _, createElementBlock as w, openBlock as g, createElementVNode as n, renderSlot as r, createVNode as c, unref as i } from "vue";
|
|
2
|
+
import { w as h, Z as $, a as C } from "../tiny-robot-svgs.js";
|
|
3
3
|
import u from "../icon-button/index.js";
|
|
4
4
|
import { _ as b } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k = { class: "tr-container__header-operations" }, y = { class: "tr-container__footer" }, E = /* @__PURE__ */ m({
|
|
@@ -18,8 +18,8 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k =
|
|
|
18
18
|
"234493b2": l.value ? "var(--tr-z-index-fixed)" : "-1",
|
|
19
19
|
"0c2ba509": l.value ? "1" : "0"
|
|
20
20
|
}));
|
|
21
|
-
const l = d(o, "show"), s = d(o, "fullscreen"), f = _(() => s.value ?
|
|
22
|
-
return (t, e) => (
|
|
21
|
+
const l = d(o, "show"), s = d(o, "fullscreen"), f = _(() => s.value ? h : $);
|
|
22
|
+
return (t, e) => (g(), w("div", z, [
|
|
23
23
|
e[3] || (e[3] = n("div", { class: "tr-container__dragging-bar-wrapper" }, [
|
|
24
24
|
n("div", { class: "tr-container__dragging-bar" })
|
|
25
25
|
], -1)),
|
|
@@ -29,16 +29,16 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k =
|
|
|
29
29
|
]),
|
|
30
30
|
n("div", k, [
|
|
31
31
|
r(t.$slots, "operations"),
|
|
32
|
-
c(
|
|
32
|
+
c(i(u), {
|
|
33
33
|
size: "28",
|
|
34
34
|
"svg-size": "20",
|
|
35
35
|
icon: f.value,
|
|
36
36
|
onClick: e[0] || (e[0] = (p) => t.$emit("update:fullscreen", !s.value))
|
|
37
37
|
}, null, 8, ["icon"]),
|
|
38
|
-
c(
|
|
38
|
+
c(i(u), {
|
|
39
39
|
size: "28",
|
|
40
40
|
"svg-size": "20",
|
|
41
|
-
icon:
|
|
41
|
+
icon: i(C),
|
|
42
42
|
onClick: e[1] || (e[1] = (p) => t.$emit("update:show", !1))
|
|
43
43
|
}, null, 8, ["icon"])
|
|
44
44
|
])
|
|
@@ -49,12 +49,12 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k =
|
|
|
49
49
|
])
|
|
50
50
|
]));
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
53
|
-
|
|
52
|
+
}), a = /* @__PURE__ */ b(E, [["__scopeId", "data-v-6a9b9126"]]);
|
|
53
|
+
a.name = "TrContainer";
|
|
54
54
|
const I = function(o) {
|
|
55
|
-
o.component(
|
|
55
|
+
o.component(a.name, a);
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
a.install = I;
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
a as default
|
|
60
60
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as o, createCommentVNode as h, normalizeStyle as _, normalizeClass as w, renderSlot as x, createElementVNode as l, toDisplayString as s, Fragment as D, renderList as B } from "vue";
|
|
2
|
+
import { a as M } from "../index3.js";
|
|
3
|
+
import { _ as Z } from "../_plugin-vue_export-helper.js";
|
|
4
|
+
const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs/%3e%3crect%20width='80.000000'%20height='80.000000'%20fill='%23FFFFFF'%20fill-opacity='0'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M6%2047.27L24.56%2029.06C25.73%2027.91%2027.6%2027.91%2028.77%2029.06L44.52%2044.51C45.69%2045.66%2047.56%2045.66%2048.72%2044.51L56.64%2036.75C57.8%2035.6%2059.67%2035.6%2060.84%2036.75L74%2049.67L74%2062C74%2064.76%2071.76%2067%2069%2067L11%2067C8.23%2067%206%2064.76%206%2062L6%2047.27Z'%20fill='%23F0F0F0'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d=''%20fill='%23808080'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cellipse%20cx='40.000000'%20cy='40.000000'%20rx='8.000001'%20ry='8.000002'%20fill='%231476FF'%20fill-opacity='1.000000'/%3e%3cpath%20d='M40%2035.5C40.27%2035.5%2040.5%2035.72%2040.5%2036L40.5%2039.49L44%2039.5C44.27%2039.5%2044.5%2039.72%2044.5%2040C44.5%2040.27%2044.27%2040.5%2044%2040.5L40.5%2040.5L40.5%2044C40.5%2044.27%2040.27%2044.5%2040%2044.5C39.72%2044.5%2039.5%2044.27%2039.5%2044L39.5%2040.5L36%2040.5C35.72%2040.5%2035.5%2040.27%2035.5%2040C35.5%2039.72%2035.72%2039.5%2036%2039.5L39.5%2039.5L39.5%2036C39.5%2035.72%2039.72%2035.5%2040%2035.5Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3ccircle%20cx='58.000000'%20cy='27.000000'%20r='5.000000'%20fill='%23DBDBDB'%20fill-opacity='1.000000'/%3e%3c/svg%3e", T = { class: "tr-drag-overlay__content" }, $ = { class: "tr-drag-overlay__text" }, S = { class: "tr-drag-overlay__title" }, E = { class: "tr-drag-overlay__description" }, z = /* @__PURE__ */ v({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
overlayTitle: {},
|
|
8
|
+
overlayDescription: {},
|
|
9
|
+
isDragging: { type: Boolean },
|
|
10
|
+
dragTarget: {},
|
|
11
|
+
fullscreen: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(r) {
|
|
14
|
+
const a = r, { top: d, left: c, width: p, height: C } = M(() => a.dragTarget), f = y(() => !a.isDragging || !a.dragTarget ? { display: "none" } : {
|
|
15
|
+
position: "fixed",
|
|
16
|
+
top: `${d.value}px`,
|
|
17
|
+
left: `${c.value}px`,
|
|
18
|
+
width: `${p.value}px`,
|
|
19
|
+
height: `${C.value}px`
|
|
20
|
+
});
|
|
21
|
+
return (e, n) => (t(), u(F, { name: "tr-fade" }, {
|
|
22
|
+
default: m(() => [
|
|
23
|
+
e.isDragging ? (t(), o("div", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: w(["tr-drag-overlay", { "tr-drag-overlay--fullscreen": e.fullscreen }]),
|
|
26
|
+
style: _(f.value)
|
|
27
|
+
}, [
|
|
28
|
+
x(e.$slots, "overlay", { isDragging: e.isDragging }, () => [
|
|
29
|
+
l("div", T, [
|
|
30
|
+
n[0] || (n[0] = l("div", { class: "tr-drag-overlay__icon" }, [
|
|
31
|
+
l("img", {
|
|
32
|
+
src: k,
|
|
33
|
+
alt: "上传文件"
|
|
34
|
+
})
|
|
35
|
+
], -1)),
|
|
36
|
+
l("div", $, [
|
|
37
|
+
l("div", S, s(e.overlayTitle), 1),
|
|
38
|
+
l("div", E, [
|
|
39
|
+
(t(!0), o(D, null, B(e.overlayDescription, (g, L) => (t(), o("span", { key: L }, s(g), 1))), 128))
|
|
40
|
+
])
|
|
41
|
+
])
|
|
42
|
+
])
|
|
43
|
+
], !0)
|
|
44
|
+
], 6)) : h("", !0)
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
}), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-92021e6b"]]);
|
|
50
|
+
i.name = "TrDragOverlay";
|
|
51
|
+
const N = function(r) {
|
|
52
|
+
r.component(i.name, i);
|
|
53
|
+
};
|
|
54
|
+
i.install = N;
|
|
55
|
+
export {
|
|
56
|
+
i as default
|
|
57
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as C, mergeModels as f, useModel as M, computed as i, ref as B, watch as R, createBlock as x, openBlock as a, unref as E, withCtx as v, createElementVNode as T, createElementBlock as w, Fragment as
|
|
2
|
-
import { o as P,
|
|
3
|
-
import { B as I } from "../
|
|
1
|
+
import { defineComponent as C, mergeModels as f, useModel as M, computed as i, ref as B, watch as R, createBlock as x, openBlock as a, unref as E, withCtx as v, createElementVNode as T, createElementBlock as w, Fragment as b, renderList as D, toDisplayString as H, renderSlot as L } from "vue";
|
|
2
|
+
import { o as P, b as h } from "../index3.js";
|
|
3
|
+
import { B as I } from "../index4.js";
|
|
4
4
|
import { _ as S } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const $ = { class: "tr-dropdown-menu__list" }, F = ["onClick"], N = /* @__PURE__ */ C({
|
|
6
6
|
__name: "index",
|
|
@@ -66,7 +66,7 @@ const $ = { class: "tr-dropdown-menu__list" }, F = ["onClick"], N = /* @__PURE__
|
|
|
66
66
|
]),
|
|
67
67
|
content: v(() => [
|
|
68
68
|
T("ul", $, [
|
|
69
|
-
(a(!0), w(
|
|
69
|
+
(a(!0), w(b, null, D(t.items, (r) => (a(), w("li", {
|
|
70
70
|
class: "tr-dropdown-menu__list-item",
|
|
71
71
|
key: r.id,
|
|
72
72
|
onClick: (g) => y(r)
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
2
|
-
import {
|
|
3
|
-
import { B as R } from "../
|
|
1
|
+
import { defineComponent as X, ref as A, computed as z, onMounted as D, watch as J, createElementBlock as a, openBlock as t, createCommentVNode as k, Fragment as E, renderList as T, toDisplayString as g, createVNode as b, unref as l, nextTick as O, createElementVNode as p, createBlock as d, withCtx as f, createTextVNode as q, resolveDynamicComponent as C } from "vue";
|
|
2
|
+
import { v as S, A as N, g as j, T as H, J as K, h as Q } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { B as R } from "../index5.js";
|
|
4
4
|
import $, { ActionGroupItem as V } from "../action-group/index.js";
|
|
5
|
-
import
|
|
5
|
+
import U from "../icon-button/index.js";
|
|
6
6
|
import { _ as P } from "../_plugin-vue_export-helper.js";
|
|
7
7
|
const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__ */ X({
|
|
8
8
|
__name: "SourceList",
|
|
@@ -10,43 +10,43 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
10
10
|
sources: {},
|
|
11
11
|
linesLimit: { default: Number.MAX_SAFE_INTEGER }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const m =
|
|
13
|
+
setup(h) {
|
|
14
|
+
const m = h, e = A(!1), y = A([]), c = A(null), L = () => {
|
|
15
15
|
O(() => {
|
|
16
|
-
const u =
|
|
16
|
+
const u = y.value.slice(0, m.sources.length).map((o) => (o == null ? void 0 : o.offsetTop) || 0), n = Array.from(new Set(u));
|
|
17
17
|
if (n.length > m.linesLimit) {
|
|
18
18
|
const o = n[m.linesLimit - 1], s = u.lastIndexOf(o);
|
|
19
19
|
c.value = s;
|
|
20
20
|
} else
|
|
21
21
|
c.value = null;
|
|
22
22
|
});
|
|
23
|
-
},
|
|
24
|
-
D(L),
|
|
25
|
-
const
|
|
26
|
-
u && (
|
|
23
|
+
}, x = z(() => m.sources.length - (c.value || 0));
|
|
24
|
+
D(L), J(() => m.sources, L);
|
|
25
|
+
const _ = (u, n) => {
|
|
26
|
+
u && (y.value[n] = u);
|
|
27
27
|
};
|
|
28
28
|
return (u, n) => (t(), a("div", W, [
|
|
29
|
-
(t(!0), a(
|
|
29
|
+
(t(!0), a(E, null, T(m.sources, (o, s) => (t(), a(E, { key: s }, [
|
|
30
30
|
!c.value || e.value || s < c.value ? (t(), a("a", {
|
|
31
31
|
key: 0,
|
|
32
32
|
class: "pill",
|
|
33
33
|
href: o.link,
|
|
34
34
|
target: "_blank",
|
|
35
35
|
ref_for: !0,
|
|
36
|
-
ref: (r) =>
|
|
37
|
-
},
|
|
36
|
+
ref: (r) => _(r, s)
|
|
37
|
+
}, g(o.label), 9, Y)) : k("", !0),
|
|
38
38
|
c.value && !e.value && s === c.value ? (t(), a("span", {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "pill",
|
|
41
41
|
onClick: n[0] || (n[0] = (r) => e.value = !0)
|
|
42
|
-
},
|
|
42
|
+
}, g(x.value) + "+ ", 1)) : k("", !0)
|
|
43
43
|
], 64))), 128)),
|
|
44
44
|
e.value ? (t(), a("span", {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "pill collapse-pill",
|
|
47
47
|
onClick: n[1] || (n[1] = (o) => e.value = !1)
|
|
48
48
|
}, [
|
|
49
|
-
|
|
49
|
+
b(l(S))
|
|
50
50
|
])) : k("", !0)
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
@@ -64,27 +64,27 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
64
64
|
sourcesLinesLimit: { default: Number.MAX_SAFE_INTEGER }
|
|
65
65
|
},
|
|
66
66
|
emits: ["operation", "action"],
|
|
67
|
-
setup(
|
|
68
|
-
const e =
|
|
69
|
-
copy:
|
|
70
|
-
refresh:
|
|
71
|
-
like:
|
|
72
|
-
dislike:
|
|
67
|
+
setup(h, { emit: m }) {
|
|
68
|
+
const e = h, y = {
|
|
69
|
+
copy: Q,
|
|
70
|
+
refresh: K,
|
|
71
|
+
like: H,
|
|
72
|
+
dislike: j
|
|
73
73
|
}, c = m, L = (n) => {
|
|
74
74
|
var o, s, r;
|
|
75
75
|
(r = (s = (o = e.operations) == null ? void 0 : o.find((v) => v.name === n)) == null ? void 0 : s.onClick) == null || r.call(s), c("operation", n);
|
|
76
|
-
},
|
|
76
|
+
}, x = (n) => {
|
|
77
77
|
var o, s, r;
|
|
78
78
|
(r = (s = (o = e.actions) == null ? void 0 : o.find((v) => v.name === n)) == null ? void 0 : s.onClick) == null || r.call(s), c("action", n);
|
|
79
|
-
},
|
|
80
|
-
|
|
79
|
+
}, _ = A(!1), u = () => {
|
|
80
|
+
_.value = !_.value;
|
|
81
81
|
};
|
|
82
82
|
return (n, o) => {
|
|
83
83
|
var s, r, v, w, B, F, M, G;
|
|
84
84
|
return t(), a("div", te, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(s = e.operations) != null && s.length ? (t(),
|
|
85
|
+
p("div", se, [
|
|
86
|
+
p("div", oe, [
|
|
87
|
+
(s = e.operations) != null && s.length ? (t(), d(l($), {
|
|
88
88
|
key: 0,
|
|
89
89
|
"max-num": e.operationsLimit,
|
|
90
90
|
"drop-down-show-label-only": !0,
|
|
@@ -92,34 +92,34 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
92
92
|
class: "tr-feedback__operations-left-action-group"
|
|
93
93
|
}, {
|
|
94
94
|
moreBtn: f(() => [
|
|
95
|
-
|
|
95
|
+
b(l(R), {
|
|
96
96
|
round: "",
|
|
97
97
|
size: "mini",
|
|
98
98
|
"reset-time": 0,
|
|
99
99
|
class: "tr-feedback__operations-more-btn"
|
|
100
100
|
}, {
|
|
101
101
|
default: f(() => [
|
|
102
|
-
o[0] || (o[0] =
|
|
103
|
-
|
|
102
|
+
o[0] || (o[0] = p("span", null, "更多", -1)),
|
|
103
|
+
b(l(N))
|
|
104
104
|
]),
|
|
105
105
|
_: 1,
|
|
106
106
|
__: [0]
|
|
107
107
|
})
|
|
108
108
|
]),
|
|
109
109
|
default: f(() => [
|
|
110
|
-
(t(!0), a(
|
|
110
|
+
(t(!0), a(E, null, T(e.operations, (i) => (t(), d(l(V), {
|
|
111
111
|
key: i.name,
|
|
112
112
|
name: i.name,
|
|
113
113
|
label: i.label
|
|
114
114
|
}, {
|
|
115
115
|
default: f(() => [
|
|
116
|
-
|
|
116
|
+
b(l(R), {
|
|
117
117
|
round: "",
|
|
118
118
|
"reset-time": 0,
|
|
119
119
|
size: "mini"
|
|
120
120
|
}, {
|
|
121
121
|
default: f(() => [
|
|
122
|
-
|
|
122
|
+
q(g(i.label), 1)
|
|
123
123
|
]),
|
|
124
124
|
_: 2
|
|
125
125
|
}, 1024)
|
|
@@ -129,32 +129,32 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
129
129
|
]),
|
|
130
130
|
_: 1
|
|
131
131
|
}, 8, ["max-num"])) : (r = e.sources) != null && r.length ? (t(), a("div", ne, [
|
|
132
|
-
|
|
132
|
+
p("span", {
|
|
133
133
|
class: "tr-feedback__source",
|
|
134
134
|
onClick: u
|
|
135
135
|
}, [
|
|
136
|
-
|
|
137
|
-
(t(),
|
|
136
|
+
p("span", null, g((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
|
|
137
|
+
(t(), d(C(_.value ? l(S) : l(N))))
|
|
138
138
|
])
|
|
139
139
|
])) : k("", !0)
|
|
140
140
|
]),
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
p("div", le, [
|
|
142
|
+
b(l($), {
|
|
143
143
|
"max-num": e.actionsLimit,
|
|
144
144
|
"show-tooltip": !0,
|
|
145
|
-
onItemClick:
|
|
145
|
+
onItemClick: x
|
|
146
146
|
}, {
|
|
147
147
|
default: f(() => [
|
|
148
|
-
(t(!0), a(
|
|
148
|
+
(t(!0), a(E, null, T(e.actions, (i) => (t(), d(l(V), {
|
|
149
149
|
key: i.name,
|
|
150
150
|
name: i.name,
|
|
151
151
|
label: i.label
|
|
152
152
|
}, {
|
|
153
153
|
default: f(() => [
|
|
154
|
-
typeof i.icon == "string" ? (t(),
|
|
154
|
+
typeof i.icon == "string" ? (t(), d(l(U), {
|
|
155
155
|
key: 0,
|
|
156
|
-
icon:
|
|
157
|
-
}, null, 8, ["icon"])) : (t(),
|
|
156
|
+
icon: y[i.icon]
|
|
157
|
+
}, null, 8, ["icon"])) : (t(), d(C(i.icon), { key: 1 }))
|
|
158
158
|
]),
|
|
159
159
|
_: 2
|
|
160
160
|
}, 1032, ["name", "label"]))), 128))
|
|
@@ -163,17 +163,17 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
163
163
|
}, 8, ["max-num"])
|
|
164
164
|
])
|
|
165
165
|
]),
|
|
166
|
-
(w = e.operations) != null && w.length && ((B = e.sources) != null && B.length) ||
|
|
166
|
+
(w = e.operations) != null && w.length && ((B = e.sources) != null && B.length) || _.value && e.sources ? (t(), a("div", ae, [
|
|
167
167
|
(F = e.operations) != null && F.length && ((M = e.sources) != null && M.length) ? (t(), a("div", re, [
|
|
168
|
-
|
|
168
|
+
p("span", {
|
|
169
169
|
class: "tr-feedback__source",
|
|
170
170
|
onClick: u
|
|
171
171
|
}, [
|
|
172
|
-
|
|
173
|
-
(t(),
|
|
172
|
+
p("span", null, g((G = e.sources) == null ? void 0 : G.length) + "条来源", 1),
|
|
173
|
+
(t(), d(C(_.value ? l(S) : l(N))))
|
|
174
174
|
])
|
|
175
175
|
])) : k("", !0),
|
|
176
|
-
|
|
176
|
+
_.value && e.sources ? (t(), d(l(ee), {
|
|
177
177
|
key: 1,
|
|
178
178
|
sources: e.sources,
|
|
179
179
|
"lines-limit": e.sourcesLinesLimit
|
|
@@ -182,12 +182,12 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
182
182
|
]);
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
}),
|
|
186
|
-
|
|
187
|
-
const ce = function(
|
|
188
|
-
|
|
185
|
+
}), I = /* @__PURE__ */ P(ie, [["__scopeId", "data-v-cc6ef316"]]);
|
|
186
|
+
I.name = "TrFeedback";
|
|
187
|
+
const ce = function(h) {
|
|
188
|
+
h.component(I.name, I);
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
I.install = ce;
|
|
191
191
|
export {
|
|
192
|
-
|
|
192
|
+
I as default
|
|
193
193
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as q, mergeModels as E, useModel as G, watch as g, ref as i, computed as $, createElementBlock as a, openBlock as l, createElementVNode as C, Fragment as I, renderList as A, createCommentVNode as _, normalizeClass as x, createBlock as B, resolveDynamicComponent as b, toDisplayString as S, nextTick as H } from "vue";
|
|
2
|
+
import { A as X } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { e as j, o as J } from "../index3.js";
|
|
4
|
+
import { _ as K } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const P = ["onClick"], Q = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "tr-flow-layout__item-label"
|
|
8
|
-
},
|
|
8
|
+
}, U = { class: "tr-flow-layout__dropdown-wrapper" }, Y = ["onClick"], Z = { class: "tr-flow-layout__item-label" }, ee = /* @__PURE__ */ q({
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: /* @__PURE__ */ E({
|
|
11
11
|
items: {},
|
|
12
12
|
selected: {},
|
|
13
13
|
linesLimit: { default: Number.MAX_SAFE_INTEGER },
|
|
14
|
-
moreIcon: { default:
|
|
14
|
+
moreIcon: { default: X },
|
|
15
15
|
showMoreTrigger: { default: "click" }
|
|
16
16
|
}, {
|
|
17
17
|
selected: {},
|
|
18
18
|
selectedModifiers: {}
|
|
19
19
|
}),
|
|
20
20
|
emits: /* @__PURE__ */ E(["item-click"], ["update:selected"]),
|
|
21
|
-
setup(d, { emit:
|
|
22
|
-
const n = d, u =
|
|
21
|
+
setup(d, { emit: D }) {
|
|
22
|
+
const n = d, u = G(d, "selected");
|
|
23
23
|
g(
|
|
24
24
|
() => n.items,
|
|
25
25
|
(t) => {
|
|
@@ -27,10 +27,10 @@ const K = ["onClick"], P = {
|
|
|
27
27
|
},
|
|
28
28
|
{ immediate: !0 }
|
|
29
29
|
);
|
|
30
|
-
const
|
|
30
|
+
const F = D, y = i(null), w = i(null), k = i(null), M = i([]), s = i(null), m = i(!1), c = i(!1), N = (t, o) => {
|
|
31
31
|
t && (M.value[o] = t);
|
|
32
32
|
}, L = () => {
|
|
33
|
-
s.value = null, m.value = !1,
|
|
33
|
+
s.value = null, m.value = !1, H(() => {
|
|
34
34
|
const t = y.value, o = w.value;
|
|
35
35
|
if (!t || !o)
|
|
36
36
|
return;
|
|
@@ -43,18 +43,18 @@ const K = ["onClick"], P = {
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
g(() => n.items, L);
|
|
46
|
-
const { width: W } =
|
|
46
|
+
const { width: W } = j(y);
|
|
47
47
|
g(W, (t) => {
|
|
48
48
|
t > 0 && L();
|
|
49
49
|
});
|
|
50
50
|
const z = $(() => s.value !== null ? n.items.slice(s.value) : []), O = $(() => s.value === null ? !1 : n.items.findIndex((o) => o.id === u.value) >= s.value), R = (t) => {
|
|
51
|
-
u.value = t, c.value = !1,
|
|
52
|
-
},
|
|
51
|
+
u.value = t, c.value = !1, F("item-click", t);
|
|
52
|
+
}, V = () => {
|
|
53
53
|
n.showMoreTrigger === "click" && (c.value = !c.value);
|
|
54
54
|
}, v = (t) => {
|
|
55
55
|
n.showMoreTrigger === "hover" && (c.value = t);
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return J(
|
|
58
58
|
k,
|
|
59
59
|
() => {
|
|
60
60
|
c.value = !1;
|
|
@@ -65,27 +65,27 @@ const K = ["onClick"], P = {
|
|
|
65
65
|
ref_key: "containerRef",
|
|
66
66
|
ref: y
|
|
67
67
|
}, [
|
|
68
|
-
(l(!0), a(I, null,
|
|
68
|
+
(l(!0), a(I, null, A(n.items, (e, f) => (l(), a(I, {
|
|
69
69
|
key: e.id
|
|
70
70
|
}, [
|
|
71
71
|
s.value === null || f < s.value ? (l(), a("button", {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: x(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
|
|
74
74
|
ref_for: !0,
|
|
75
|
-
ref: (r) =>
|
|
75
|
+
ref: (r) => N(r, f),
|
|
76
76
|
onClick: (r) => R(e.id)
|
|
77
77
|
}, [
|
|
78
78
|
(l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
79
|
-
e.label ? (l(), a("span",
|
|
80
|
-
], 10,
|
|
79
|
+
e.label ? (l(), a("span", Q, S(e.label), 1)) : _("", !0)
|
|
80
|
+
], 10, P)) : _("", !0)
|
|
81
81
|
], 64))), 128)),
|
|
82
|
-
C("div",
|
|
82
|
+
C("div", U, [
|
|
83
83
|
m.value ? _("", !0) : (l(), a("button", {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: x(["tr-flow-layout__item", "icon-only", { selected: O.value }]),
|
|
86
86
|
ref_key: "moreButtonRef",
|
|
87
87
|
ref: w,
|
|
88
|
-
onClick:
|
|
88
|
+
onClick: V,
|
|
89
89
|
onMouseenter: o[0] || (o[0] = (e) => v(!0)),
|
|
90
90
|
onMouseleave: o[1] || (o[1] = (e) => v(!1))
|
|
91
91
|
}, [
|
|
@@ -102,20 +102,20 @@ const K = ["onClick"], P = {
|
|
|
102
102
|
ref_key: "dropDownRef",
|
|
103
103
|
ref: k
|
|
104
104
|
}, [
|
|
105
|
-
(l(!0), a(I, null,
|
|
105
|
+
(l(!0), a(I, null, A(z.value, (e) => (l(), a("button", {
|
|
106
106
|
class: x(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
|
|
107
107
|
key: e.id,
|
|
108
108
|
onClick: (f) => R(e.id)
|
|
109
109
|
}, [
|
|
110
110
|
(l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
111
|
-
C("span", Z,
|
|
111
|
+
C("span", Z, S(e.label), 1)
|
|
112
112
|
], 10, Y))), 128))
|
|
113
113
|
], 512)) : _("", !0)
|
|
114
114
|
], 32)
|
|
115
115
|
])
|
|
116
116
|
], 512));
|
|
117
117
|
}
|
|
118
|
-
}), p = /* @__PURE__ */
|
|
118
|
+
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-f82cf3dc"]]);
|
|
119
119
|
p.name = "TrFlowLayout";
|
|
120
120
|
const te = function(d) {
|
|
121
121
|
d.component(p.name, p);
|