@opentiny/tiny-robot 0.3.0-alpha.0 → 0.3.0-alpha.10
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 +44 -41
- package/dist/attachments/index.js +472 -548
- package/dist/base-popper/index.js +4 -0
- package/dist/bubble/index.js +3 -4
- package/dist/close.js +1 -1
- package/dist/container/index.js +9 -9
- package/dist/drag-overlay/index.js +57 -0
- package/dist/dropdown-menu/index.js +84 -63
- package/dist/feedback/index.js +39 -38
- package/dist/flow-layout-buttons/index.js +29 -26
- package/dist/history/index.js +36 -37
- package/dist/icon-button/index.js +18 -19
- package/dist/index.d.ts +950 -885
- package/dist/index.js +196 -74
- package/dist/index2.js +608 -574
- package/dist/index3.js +626 -3833
- package/dist/index4.js +136 -622
- package/dist/index5.js +251 -3173
- package/dist/index6.js +2072 -4539
- package/dist/index7.js +4749 -0
- package/dist/prompts/index.js +2 -3
- package/dist/question/index.js +83 -83
- package/dist/sender/index.js +1106 -1209
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +27 -27
- package/dist/suggestion-pills/index.js +140 -143
- package/dist/suggestion-popover/index.js +292 -146
- package/dist/tiny-robot-svgs.js +319 -271
- package/dist/useSlotRefs.js +36 -0
- package/package.json +3 -3
package/dist/bubble/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c0, useCssVars as L0, unref as P0, useSlots as O0, computed as au, createElementBlock as L, openBlock as S, normalizeClass as i0, createCommentVNode as _u, createElementVNode as Z, createBlock as yu, resolveDynamicComponent as o0, renderSlot as mu, toDisplayString as N0, ref as $0, watch as j0, Fragment as U0, renderList as Ou, mergeProps as Nu, createSlots as Z0, withCtx as H0 } from "vue";
|
|
2
2
|
import { t as V0 } from "../utils.js";
|
|
3
3
|
import { _ as a0 } from "../_plugin-vue_export-helper.js";
|
|
4
|
-
import {
|
|
4
|
+
import { u as G0 } from "../index3.js";
|
|
5
5
|
const $u = {};
|
|
6
6
|
function W0(u) {
|
|
7
7
|
let e = $u[u];
|
|
@@ -3182,9 +3182,8 @@ const Ir = {
|
|
|
3182
3182
|
ref: t
|
|
3183
3183
|
}, [
|
|
3184
3184
|
(S(!0), L(U0, null, Ou(e.items, (s, f) => (S(), yu(J, Nu({
|
|
3185
|
-
key: s.id || f
|
|
3186
|
-
|
|
3187
|
-
}, c(s)), Z0({ _: 2 }, [
|
|
3185
|
+
key: s.id || f
|
|
3186
|
+
}, { ref_for: !0 }, c(s)), Z0({ _: 2 }, [
|
|
3188
3187
|
Ou(o(s), (d, h) => ({
|
|
3189
3188
|
name: h,
|
|
3190
3189
|
fn: H0((b) => [
|
package/dist/close.js
CHANGED
package/dist/container/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as v, useCssVars as m, useModel as d, computed as _, createElementBlock as w, openBlock as g, createElementVNode as n, renderSlot as r, createVNode as c, unref as a } from "vue";
|
|
2
|
+
import { R as h, v as $, U 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
|
-
const z = { class: "tr-container" }, B = { class: "tr-container__header" },
|
|
5
|
+
const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k = { class: "tr-container__header-operations" }, y = { class: "tr-container__footer" }, E = /* @__PURE__ */ v({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
show: { type: Boolean, required: !0 },
|
|
@@ -12,7 +12,7 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, N =
|
|
|
12
12
|
},
|
|
13
13
|
emits: ["update:show", "update:fullscreen"],
|
|
14
14
|
setup(o) {
|
|
15
|
-
|
|
15
|
+
m((t) => ({
|
|
16
16
|
"1daf37f2": s.value ? "0" : "unset",
|
|
17
17
|
"0679141a": s.value ? "unset" : "var(--tr-container-width)",
|
|
18
18
|
"234493b2": l.value ? "var(--tr-z-index-fixed)" : "-1",
|
|
@@ -27,7 +27,7 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, N =
|
|
|
27
27
|
r(t.$slots, "title", {}, () => [
|
|
28
28
|
e[2] || (e[2] = n("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
|
|
29
29
|
]),
|
|
30
|
-
n("div",
|
|
30
|
+
n("div", k, [
|
|
31
31
|
r(t.$slots, "operations"),
|
|
32
32
|
c(a(u), {
|
|
33
33
|
size: "28",
|
|
@@ -44,17 +44,17 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, N =
|
|
|
44
44
|
])
|
|
45
45
|
]),
|
|
46
46
|
r(t.$slots, "default"),
|
|
47
|
-
n("div",
|
|
47
|
+
n("div", y, [
|
|
48
48
|
r(t.$slots, "footer")
|
|
49
49
|
])
|
|
50
50
|
]));
|
|
51
51
|
}
|
|
52
|
-
}), i = /* @__PURE__ */ b(
|
|
52
|
+
}), i = /* @__PURE__ */ b(E, [["__scopeId", "data-v-6a9b9126"]]);
|
|
53
53
|
i.name = "TrContainer";
|
|
54
|
-
const
|
|
54
|
+
const I = function(o) {
|
|
55
55
|
o.component(i.name, i);
|
|
56
56
|
};
|
|
57
|
-
i.install =
|
|
57
|
+
i.install = I;
|
|
58
58
|
export {
|
|
59
59
|
i 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,71 +1,92 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as M, mergeModels as f, useModel as B, computed as a, ref as x, watch as R, createBlock as E, openBlock as i, unref as T, withCtx as v, createElementVNode as b, createElementBlock as w, Fragment as D, renderList as H, toDisplayString as L, renderSlot as P } from "vue";
|
|
2
|
+
import { o as I, b as h } from "../index3.js";
|
|
3
|
+
import { B as S } from "../index4.js";
|
|
4
|
+
import { _ as $ } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const F = { class: "tr-dropdown-menu__list" }, N = ["onClick"], O = /* @__PURE__ */ M({
|
|
6
6
|
__name: "index",
|
|
7
|
-
props: {
|
|
7
|
+
props: /* @__PURE__ */ f({
|
|
8
|
+
appendTo: {},
|
|
8
9
|
items: {},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
show: { type: Boolean },
|
|
11
|
+
trigger: { default: "click" }
|
|
12
|
+
}, {
|
|
13
|
+
show: { type: Boolean, default: !1 },
|
|
14
|
+
showModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: /* @__PURE__ */ f(["item-click", "click-outside"], ["update:show"]),
|
|
17
|
+
setup(n, { expose: k, emit: _ }) {
|
|
18
|
+
const t = n, c = _, d = B(n, "show"), o = a({
|
|
19
|
+
get: () => t.trigger === "manual" ? t.show : d.value,
|
|
20
|
+
set: (e) => {
|
|
21
|
+
t.trigger !== "manual" && (d.value = e);
|
|
22
|
+
}
|
|
23
|
+
}), s = x(null), p = a(() => {
|
|
24
|
+
var e;
|
|
25
|
+
return (e = s.value) == null ? void 0 : e.triggerRef;
|
|
26
|
+
}), u = a(() => {
|
|
27
|
+
var e;
|
|
28
|
+
return (e = s.value) == null ? void 0 : e.popperRef;
|
|
26
29
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
if (t.trigger === "click" || t.trigger === "manual")
|
|
31
|
+
I(
|
|
32
|
+
u,
|
|
33
|
+
(e) => {
|
|
34
|
+
c("click-outside", e), o.value = !1;
|
|
35
|
+
},
|
|
36
|
+
{ ignore: [p] }
|
|
37
|
+
);
|
|
38
|
+
else if (t.trigger === "hover") {
|
|
39
|
+
const e = h(p, { delayEnter: 100, delayLeave: 300 }), m = h(u, { delayEnter: 100, delayLeave: 300 });
|
|
40
|
+
R(
|
|
41
|
+
() => [e.value, m.value],
|
|
42
|
+
([r, g]) => {
|
|
43
|
+
o.value = r || g;
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const y = () => {
|
|
48
|
+
t.trigger === "click" && (o.value = !o.value);
|
|
49
|
+
}, C = (e) => {
|
|
50
|
+
o.value = !1, c("item-click", e);
|
|
31
51
|
};
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
return k({
|
|
53
|
+
update: () => {
|
|
54
|
+
var e;
|
|
55
|
+
(e = s.value) == null || e.update();
|
|
56
|
+
}
|
|
57
|
+
}), (e, m) => (i(), E(T(S), {
|
|
58
|
+
show: o.value,
|
|
59
|
+
class: "tr-dropdown-menu",
|
|
60
|
+
ref_key: "basePopperRef",
|
|
61
|
+
ref: s,
|
|
62
|
+
placement: "top-left",
|
|
63
|
+
"append-to": t.appendTo,
|
|
64
|
+
offset: 8,
|
|
65
|
+
"transition-props": { name: "tr-dropdown-menu" },
|
|
66
|
+
"prevent-overflow": !0,
|
|
67
|
+
"trigger-events": { onClick: y }
|
|
68
|
+
}, {
|
|
69
|
+
trigger: v(() => [
|
|
70
|
+
P(e.$slots, "trigger", {}, void 0, !0)
|
|
71
|
+
]),
|
|
72
|
+
content: v(() => [
|
|
73
|
+
b("ul", F, [
|
|
74
|
+
(i(!0), w(D, null, H(t.items, (r) => (i(), w("li", {
|
|
75
|
+
class: "tr-dropdown-menu__list-item",
|
|
76
|
+
key: r.id,
|
|
77
|
+
onClick: (g) => C(r)
|
|
78
|
+
}, L(r.text), 9, N))), 128))
|
|
79
|
+
])
|
|
80
|
+
]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, ["show", "append-to", "trigger-events"]));
|
|
62
83
|
}
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
84
|
+
}), l = /* @__PURE__ */ $(O, [["__scopeId", "data-v-dc0b5233"]]);
|
|
85
|
+
l.name = "TrDropdownMenu";
|
|
86
|
+
const V = function(n) {
|
|
87
|
+
n.component(l.name, l);
|
|
67
88
|
};
|
|
68
|
-
|
|
89
|
+
l.install = V;
|
|
69
90
|
export {
|
|
70
|
-
|
|
91
|
+
l as default
|
|
71
92
|
};
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as X, ref as E, computed as
|
|
2
|
-
import {
|
|
3
|
-
import { B as G } from "../
|
|
1
|
+
import { defineComponent as X, ref as E, computed as z, onMounted as D, watch as K, createElementBlock as a, openBlock as t, createCommentVNode as k, Fragment as I, renderList as w, toDisplayString as y, createVNode as h, unref as l, nextTick as O, createElementVNode as p, createBlock as d, withCtx as f, createTextVNode as W, resolveDynamicComponent as C } from "vue";
|
|
2
|
+
import { V as S, W as N, $ as q, w as j, m as H, K as J } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { B as G } from "../index5.js";
|
|
4
4
|
import R, { ActionGroupItem as V } from "../action-group/index.js";
|
|
5
|
-
import
|
|
5
|
+
import Q from "../icon-button/index.js";
|
|
6
6
|
import { _ as P } from "../_plugin-vue_export-helper.js";
|
|
7
|
-
const
|
|
7
|
+
const U = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__ */ X({
|
|
8
8
|
__name: "SourceList",
|
|
9
9
|
props: {
|
|
10
10
|
sources: {},
|
|
@@ -12,7 +12,7 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
12
12
|
},
|
|
13
13
|
setup(b) {
|
|
14
14
|
const m = b, e = E(!1), g = E([]), c = E(null), L = () => {
|
|
15
|
-
|
|
15
|
+
O(() => {
|
|
16
16
|
const u = g.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);
|
|
@@ -20,20 +20,20 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
20
20
|
} else
|
|
21
21
|
c.value = null;
|
|
22
22
|
});
|
|
23
|
-
}, A =
|
|
24
|
-
|
|
25
|
-
const
|
|
23
|
+
}, A = z(() => m.sources.length - (c.value || 0));
|
|
24
|
+
D(L), K(() => m.sources, L);
|
|
25
|
+
const _ = (u, n) => {
|
|
26
26
|
u && (g.value[n] = u);
|
|
27
27
|
};
|
|
28
|
-
return (u, n) => (t(), a("div",
|
|
29
|
-
(t(!0), a(I, null,
|
|
28
|
+
return (u, n) => (t(), a("div", U, [
|
|
29
|
+
(t(!0), a(I, null, w(m.sources, (o, s) => (t(), a(I, { 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) =>
|
|
36
|
+
ref: (r) => _(r, s)
|
|
37
37
|
}, y(o.label), 9, Y)) : k("", !0),
|
|
38
38
|
c.value && !e.value && s === c.value ? (t(), a("span", {
|
|
39
39
|
key: 1,
|
|
@@ -46,7 +46,7 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
46
46
|
class: "pill collapse-pill",
|
|
47
47
|
onClick: n[1] || (n[1] = (o) => e.value = !1)
|
|
48
48
|
}, [
|
|
49
|
-
h(l(
|
|
49
|
+
h(l(S))
|
|
50
50
|
])) : k("", !0)
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
@@ -66,9 +66,9 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
66
66
|
emits: ["operation", "action"],
|
|
67
67
|
setup(b, { emit: m }) {
|
|
68
68
|
const e = b, g = {
|
|
69
|
-
copy:
|
|
70
|
-
refresh:
|
|
71
|
-
like:
|
|
69
|
+
copy: J,
|
|
70
|
+
refresh: H,
|
|
71
|
+
like: j,
|
|
72
72
|
dislike: q
|
|
73
73
|
}, c = m, L = (n) => {
|
|
74
74
|
var o, s, r;
|
|
@@ -76,15 +76,15 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
76
76
|
}, A = (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
|
+
}, _ = E(!1), u = () => {
|
|
80
|
+
_.value = !_.value;
|
|
81
81
|
};
|
|
82
82
|
return (n, o) => {
|
|
83
|
-
var s, r, v,
|
|
83
|
+
var s, r, v, T, B, F, M, $;
|
|
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(R), {
|
|
88
88
|
key: 0,
|
|
89
89
|
"max-num": e.operationsLimit,
|
|
90
90
|
"drop-down-show-label-only": !0,
|
|
@@ -99,14 +99,15 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
99
99
|
class: "tr-feedback__operations-more-btn"
|
|
100
100
|
}, {
|
|
101
101
|
default: f(() => [
|
|
102
|
-
o[0] || (o[0] =
|
|
102
|
+
o[0] || (o[0] = p("span", null, "更多", -1)),
|
|
103
103
|
h(l(N))
|
|
104
104
|
]),
|
|
105
|
-
_: 1
|
|
105
|
+
_: 1,
|
|
106
|
+
__: [0]
|
|
106
107
|
})
|
|
107
108
|
]),
|
|
108
109
|
default: f(() => [
|
|
109
|
-
(t(!0), a(I, null,
|
|
110
|
+
(t(!0), a(I, null, w(e.operations, (i) => (t(), d(l(V), {
|
|
110
111
|
key: i.name,
|
|
111
112
|
name: i.name,
|
|
112
113
|
label: i.label
|
|
@@ -118,7 +119,7 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
118
119
|
size: "mini"
|
|
119
120
|
}, {
|
|
120
121
|
default: f(() => [
|
|
121
|
-
|
|
122
|
+
W(y(i.label), 1)
|
|
122
123
|
]),
|
|
123
124
|
_: 2
|
|
124
125
|
}, 1024)
|
|
@@ -128,32 +129,32 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
128
129
|
]),
|
|
129
130
|
_: 1
|
|
130
131
|
}, 8, ["max-num"])) : (r = e.sources) != null && r.length ? (t(), a("div", ne, [
|
|
131
|
-
|
|
132
|
+
p("span", {
|
|
132
133
|
class: "tr-feedback__source",
|
|
133
134
|
onClick: u
|
|
134
135
|
}, [
|
|
135
|
-
|
|
136
|
-
(t(),
|
|
136
|
+
p("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
|
|
137
|
+
(t(), d(C(_.value ? l(S) : l(N))))
|
|
137
138
|
])
|
|
138
139
|
])) : k("", !0)
|
|
139
140
|
]),
|
|
140
|
-
|
|
141
|
+
p("div", le, [
|
|
141
142
|
h(l(R), {
|
|
142
143
|
"max-num": e.actionsLimit,
|
|
143
144
|
"show-tooltip": !0,
|
|
144
145
|
onItemClick: A
|
|
145
146
|
}, {
|
|
146
147
|
default: f(() => [
|
|
147
|
-
(t(!0), a(I, null,
|
|
148
|
+
(t(!0), a(I, null, w(e.actions, (i) => (t(), d(l(V), {
|
|
148
149
|
key: i.name,
|
|
149
150
|
name: i.name,
|
|
150
151
|
label: i.label
|
|
151
152
|
}, {
|
|
152
153
|
default: f(() => [
|
|
153
|
-
typeof i.icon == "string" ? (t(),
|
|
154
|
+
typeof i.icon == "string" ? (t(), d(l(Q), {
|
|
154
155
|
key: 0,
|
|
155
156
|
icon: g[i.icon]
|
|
156
|
-
}, null, 8, ["icon"])) : (t(),
|
|
157
|
+
}, null, 8, ["icon"])) : (t(), d(C(i.icon), { key: 1 }))
|
|
157
158
|
]),
|
|
158
159
|
_: 2
|
|
159
160
|
}, 1032, ["name", "label"]))), 128))
|
|
@@ -162,17 +163,17 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
162
163
|
}, 8, ["max-num"])
|
|
163
164
|
])
|
|
164
165
|
]),
|
|
165
|
-
(
|
|
166
|
+
(T = e.operations) != null && T.length && ((B = e.sources) != null && B.length) || _.value && e.sources ? (t(), a("div", ae, [
|
|
166
167
|
(F = e.operations) != null && F.length && ((M = e.sources) != null && M.length) ? (t(), a("div", re, [
|
|
167
|
-
|
|
168
|
+
p("span", {
|
|
168
169
|
class: "tr-feedback__source",
|
|
169
170
|
onClick: u
|
|
170
171
|
}, [
|
|
171
|
-
|
|
172
|
-
(t(),
|
|
172
|
+
p("span", null, y(($ = e.sources) == null ? void 0 : $.length) + "条来源", 1),
|
|
173
|
+
(t(), d(C(_.value ? l(S) : l(N))))
|
|
173
174
|
])
|
|
174
175
|
])) : k("", !0),
|
|
175
|
-
|
|
176
|
+
_.value && e.sources ? (t(), d(l(ee), {
|
|
176
177
|
key: 1,
|
|
177
178
|
sources: e.sources,
|
|
178
179
|
"lines-limit": e.sourcesLinesLimit
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 S, createCommentVNode as _, normalizeClass as x, createBlock as B, resolveDynamicComponent as b, toDisplayString as W, nextTick as H } from "vue";
|
|
2
|
+
import { W as X } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { e as j, o as J } from "../index3.js";
|
|
4
4
|
import { _ as K } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const P = ["onClick"], Q = {
|
|
6
6
|
key: 0,
|
|
@@ -18,7 +18,7 @@ const P = ["onClick"], Q = {
|
|
|
18
18
|
selectedModifiers: {}
|
|
19
19
|
}),
|
|
20
20
|
emits: /* @__PURE__ */ E(["item-click"], ["update:selected"]),
|
|
21
|
-
setup(d, { emit:
|
|
21
|
+
setup(d, { emit: D }) {
|
|
22
22
|
const n = d, u = G(d, "selected");
|
|
23
23
|
g(
|
|
24
24
|
() => n.items,
|
|
@@ -27,7 +27,7 @@ const P = ["onClick"], Q = {
|
|
|
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
33
|
s.value = null, m.value = !1, H(() => {
|
|
@@ -43,52 +43,55 @@ const P = ["onClick"], Q = {
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
g(() => n.items, L);
|
|
46
|
-
const { width:
|
|
47
|
-
g(
|
|
46
|
+
const { width: A } = j(y);
|
|
47
|
+
g(A, (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,
|
|
51
|
+
u.value = t, c.value = !1, F("item-click", t);
|
|
52
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 J(
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
|
|
57
|
+
return J(
|
|
58
|
+
k,
|
|
59
|
+
() => {
|
|
60
|
+
c.value = !1;
|
|
61
|
+
},
|
|
62
|
+
{ ignore: [k, w] }
|
|
63
|
+
), (t, o) => (l(), a("div", {
|
|
61
64
|
class: "tr-flow-layout",
|
|
62
65
|
ref_key: "containerRef",
|
|
63
66
|
ref: y
|
|
64
67
|
}, [
|
|
65
|
-
(l(!0), a(
|
|
68
|
+
(l(!0), a(I, null, S(n.items, (e, f) => (l(), a(I, {
|
|
66
69
|
key: e.id
|
|
67
70
|
}, [
|
|
68
71
|
s.value === null || f < s.value ? (l(), a("button", {
|
|
69
72
|
key: 0,
|
|
70
|
-
class:
|
|
73
|
+
class: x(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
|
|
71
74
|
ref_for: !0,
|
|
72
|
-
ref: (r) =>
|
|
75
|
+
ref: (r) => N(r, f),
|
|
73
76
|
onClick: (r) => R(e.id)
|
|
74
77
|
}, [
|
|
75
|
-
(l(),
|
|
76
|
-
e.label ? (l(), a("span", Q,
|
|
78
|
+
(l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
79
|
+
e.label ? (l(), a("span", Q, W(e.label), 1)) : _("", !0)
|
|
77
80
|
], 10, P)) : _("", !0)
|
|
78
81
|
], 64))), 128)),
|
|
79
|
-
|
|
82
|
+
C("div", U, [
|
|
80
83
|
m.value ? _("", !0) : (l(), a("button", {
|
|
81
84
|
key: 0,
|
|
82
|
-
class:
|
|
85
|
+
class: x(["tr-flow-layout__item", "icon-only", { selected: O.value }]),
|
|
83
86
|
ref_key: "moreButtonRef",
|
|
84
87
|
ref: w,
|
|
85
88
|
onClick: V,
|
|
86
89
|
onMouseenter: o[0] || (o[0] = (e) => v(!0)),
|
|
87
90
|
onMouseleave: o[1] || (o[1] = (e) => v(!1))
|
|
88
91
|
}, [
|
|
89
|
-
(l(),
|
|
92
|
+
(l(), B(b(n.moreIcon), { class: "tr-flow-layout__item-icon" }))
|
|
90
93
|
], 34)),
|
|
91
|
-
|
|
94
|
+
C("div", {
|
|
92
95
|
class: "tr-flow-layout__dropdown-container",
|
|
93
96
|
onMouseenter: o[2] || (o[2] = (e) => v(!0)),
|
|
94
97
|
onMouseleave: o[3] || (o[3] = (e) => v(!1))
|
|
@@ -99,20 +102,20 @@ const P = ["onClick"], Q = {
|
|
|
99
102
|
ref_key: "dropDownRef",
|
|
100
103
|
ref: k
|
|
101
104
|
}, [
|
|
102
|
-
(l(!0), a(
|
|
103
|
-
class:
|
|
105
|
+
(l(!0), a(I, null, S(z.value, (e) => (l(), a("button", {
|
|
106
|
+
class: x(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
|
|
104
107
|
key: e.id,
|
|
105
108
|
onClick: (f) => R(e.id)
|
|
106
109
|
}, [
|
|
107
|
-
(l(),
|
|
108
|
-
|
|
110
|
+
(l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
|
|
111
|
+
C("span", Z, W(e.label), 1)
|
|
109
112
|
], 10, Y))), 128))
|
|
110
113
|
], 512)) : _("", !0)
|
|
111
114
|
], 32)
|
|
112
115
|
])
|
|
113
116
|
], 512));
|
|
114
117
|
}
|
|
115
|
-
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-
|
|
118
|
+
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-f82cf3dc"]]);
|
|
116
119
|
p.name = "TrFlowLayout";
|
|
117
120
|
const te = function(d) {
|
|
118
121
|
d.component(p.name, p);
|