@opentiny/tiny-robot 0.3.0-alpha.1 → 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 +43 -40
- package/dist/attachments/index.js +526 -0
- package/dist/base-popper/index.js +4 -0
- package/dist/bubble/index.js +1229 -2003
- package/dist/close.js +1 -1
- package/dist/container/index.js +4 -4
- package/dist/drag-overlay/index.js +57 -0
- package/dist/dropdown-menu/index.js +84 -64
- package/dist/feedback/index.js +39 -39
- package/dist/flow-layout-buttons/index.js +23 -20
- package/dist/history/index.js +37 -37
- package/dist/icon-button/index.js +18 -19
- package/dist/index.d.ts +952 -910
- package/dist/index.js +196 -77
- package/dist/index2.js +609 -524
- package/dist/index3.js +671 -290
- package/dist/index4.js +136 -622
- package/dist/index5.js +226 -2068
- package/dist/index6.js +2069 -4665
- package/dist/index7.js +4749 -0
- package/dist/question/index.js +84 -84
- package/dist/sender/index.js +1091 -1186
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +92 -92
- package/dist/suggestion-pills/index.js +131 -155
- package/dist/suggestion-popover/index.js +255 -225
- package/dist/tiny-robot-svgs.js +559 -234
- package/dist/useSlotRefs.js +36 -0
- package/dist/utils.js +4 -15
- package/package.json +3 -4
- package/dist/loading.js +0 -4
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" }, k = { class: "tr-container__header-operations" }, y = { class: "tr-container__footer" }, E = /* @__PURE__ */
|
|
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" }, k =
|
|
|
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",
|
|
@@ -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,72 +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
|
-
|
|
62
|
-
|
|
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"]));
|
|
63
83
|
}
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
84
|
+
}), l = /* @__PURE__ */ $(O, [["__scopeId", "data-v-dc0b5233"]]);
|
|
85
|
+
l.name = "TrDropdownMenu";
|
|
86
|
+
const V = function(n) {
|
|
87
|
+
n.component(l.name, l);
|
|
68
88
|
};
|
|
69
|
-
|
|
89
|
+
l.install = V;
|
|
70
90
|
export {
|
|
71
|
-
|
|
91
|
+
l as default
|
|
72
92
|
};
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
2
|
-
import {
|
|
3
|
-
import { B as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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
|
+
import R, { ActionGroupItem as V } from "../action-group/index.js";
|
|
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: {},
|
|
11
11
|
linesLimit: { default: Number.MAX_SAFE_INTEGER }
|
|
12
12
|
},
|
|
13
13
|
setup(b) {
|
|
14
|
-
const m = b, e =
|
|
15
|
-
|
|
14
|
+
const m = b, e = E(!1), g = E([]), c = E(null), L = () => {
|
|
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,13 +20,13 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
20
20
|
} else
|
|
21
21
|
c.value = null;
|
|
22
22
|
});
|
|
23
|
-
},
|
|
24
|
-
D(L),
|
|
23
|
+
}, A = z(() => m.sources.length - (c.value || 0));
|
|
24
|
+
D(L), K(() => m.sources, L);
|
|
25
25
|
const _ = (u, n) => {
|
|
26
26
|
u && (g.value[n] = u);
|
|
27
27
|
};
|
|
28
|
-
return (u, n) => (t(), a("div",
|
|
29
|
-
(t(!0), a(
|
|
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",
|
|
@@ -39,14 +39,14 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "pill",
|
|
41
41
|
onClick: n[0] || (n[0] = (r) => e.value = !0)
|
|
42
|
-
}, y(
|
|
42
|
+
}, y(A.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
|
-
h(l(
|
|
49
|
+
h(l(S))
|
|
50
50
|
])) : k("", !0)
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
@@ -66,25 +66,25 @@ 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:
|
|
72
|
-
dislike:
|
|
69
|
+
copy: J,
|
|
70
|
+
refresh: H,
|
|
71
|
+
like: j,
|
|
72
|
+
dislike: q
|
|
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
|
+
}, 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
|
-
}, _ =
|
|
79
|
+
}, _ = E(!1), u = () => {
|
|
80
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
85
|
p("div", se, [
|
|
86
86
|
p("div", oe, [
|
|
87
|
-
(s = e.operations) != null && s.length ? (t(), d(l(
|
|
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,
|
|
@@ -92,7 +92,7 @@ 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
|
-
h(l(
|
|
95
|
+
h(l(G), {
|
|
96
96
|
round: "",
|
|
97
97
|
size: "mini",
|
|
98
98
|
"reset-time": 0,
|
|
@@ -107,19 +107,19 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
107
107
|
})
|
|
108
108
|
]),
|
|
109
109
|
default: f(() => [
|
|
110
|
-
(t(!0), a(
|
|
110
|
+
(t(!0), a(I, null, w(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
|
-
h(l(
|
|
116
|
+
h(l(G), {
|
|
117
117
|
round: "",
|
|
118
118
|
"reset-time": 0,
|
|
119
119
|
size: "mini"
|
|
120
120
|
}, {
|
|
121
121
|
default: f(() => [
|
|
122
|
-
|
|
122
|
+
W(y(i.label), 1)
|
|
123
123
|
]),
|
|
124
124
|
_: 2
|
|
125
125
|
}, 1024)
|
|
@@ -134,24 +134,24 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
134
134
|
onClick: u
|
|
135
135
|
}, [
|
|
136
136
|
p("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
|
|
137
|
-
(t(), d(C(_.value ? l(
|
|
137
|
+
(t(), d(C(_.value ? l(S) : l(N))))
|
|
138
138
|
])
|
|
139
139
|
])) : k("", !0)
|
|
140
140
|
]),
|
|
141
141
|
p("div", le, [
|
|
142
|
-
h(l(
|
|
142
|
+
h(l(R), {
|
|
143
143
|
"max-num": e.actionsLimit,
|
|
144
144
|
"show-tooltip": !0,
|
|
145
|
-
onItemClick:
|
|
145
|
+
onItemClick: A
|
|
146
146
|
}, {
|
|
147
147
|
default: f(() => [
|
|
148
|
-
(t(!0), a(
|
|
148
|
+
(t(!0), a(I, null, w(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(), d(l(
|
|
154
|
+
typeof i.icon == "string" ? (t(), d(l(Q), {
|
|
155
155
|
key: 0,
|
|
156
156
|
icon: g[i.icon]
|
|
157
157
|
}, null, 8, ["icon"])) : (t(), d(C(i.icon), { key: 1 }))
|
|
@@ -163,14 +163,14 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
163
163
|
}, 8, ["max-num"])
|
|
164
164
|
])
|
|
165
165
|
]),
|
|
166
|
-
(
|
|
166
|
+
(T = e.operations) != null && T.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
|
-
p("span", null, y((
|
|
173
|
-
(t(), d(C(_.value ? l(
|
|
172
|
+
p("span", null, y(($ = e.sources) == null ? void 0 : $.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), {
|
|
@@ -182,12 +182,12 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
182
182
|
]);
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
}),
|
|
186
|
-
|
|
185
|
+
}), x = /* @__PURE__ */ P(ie, [["__scopeId", "data-v-cc6ef316"]]);
|
|
186
|
+
x.name = "TrFeedback";
|
|
187
187
|
const ce = function(b) {
|
|
188
|
-
b.component(
|
|
188
|
+
b.component(x.name, x);
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
x.install = ce;
|
|
191
191
|
export {
|
|
192
|
-
|
|
192
|
+
x as default
|
|
193
193
|
};
|
|
@@ -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 C, Fragment as I, renderList 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,
|
|
@@ -43,8 +43,8 @@ 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) => {
|
|
@@ -54,39 +54,42 @@ const P = ["onClick"], Q = {
|
|
|
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(I, null,
|
|
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
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",
|
|
@@ -99,20 +102,20 @@ const P = ["onClick"], Q = {
|
|
|
99
102
|
ref_key: "dropDownRef",
|
|
100
103
|
ref: k
|
|
101
104
|
}, [
|
|
102
|
-
(l(!0), a(I, null,
|
|
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
|
-
C("span", Z,
|
|
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);
|