@opentiny/tiny-robot 0.3.0-alpha.8 → 0.3.0-rc.0

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.
@@ -1,8 +1,8 @@
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
- import u from "../icon-button/index.js";
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__ */ m({
1
+ import { defineComponent as v, useCssVars as m, useModel as c, computed as _, createElementBlock as w, openBlock as g, createElementVNode as o, renderSlot as r, createVNode as u, unref as l } from "vue";
2
+ import { IconCancelFullScreen as h, IconFullScreen as C, IconClose as $ } from "@opentiny/tiny-robot-svgs";
3
+ import d from "../icon-button/index.js";
4
+ import { _ as I } from "../_plugin-vue_export-helper.js";
5
+ const b = { class: "tr-container" }, z = { class: "tr-container__header" }, B = { class: "tr-container__header-operations" }, S = { class: "tr-container__footer" }, k = /* @__PURE__ */ v({
6
6
  __name: "index",
7
7
  props: {
8
8
  show: { type: Boolean, required: !0 },
@@ -11,50 +11,50 @@ const z = { class: "tr-container" }, B = { class: "tr-container__header" }, k =
11
11
  fullscreenModifiers: {}
12
12
  },
13
13
  emits: ["update:show", "update:fullscreen"],
14
- setup(o) {
15
- v((t) => ({
16
- "1daf37f2": s.value ? "0" : "unset",
17
- "0679141a": s.value ? "unset" : "var(--tr-container-width)",
18
- "234493b2": l.value ? "var(--tr-z-index-fixed)" : "-1",
19
- "0c2ba509": l.value ? "1" : "0"
14
+ setup(t) {
15
+ m((n) => ({
16
+ "12c6880d": s.value ? "0" : "unset",
17
+ dbe5f3c0: s.value ? "unset" : "var(--tr-container-width)",
18
+ "676af261": a.value ? "var(--tr-z-index-fixed)" : "-1",
19
+ "19e9bbe2": a.value ? "1" : "0"
20
20
  }));
21
- const l = d(o, "show"), s = d(o, "fullscreen"), f = _(() => s.value ? h : $);
22
- return (t, e) => (g(), w("div", z, [
23
- e[3] || (e[3] = n("div", { class: "tr-container__dragging-bar-wrapper" }, [
24
- n("div", { class: "tr-container__dragging-bar" })
21
+ const a = c(t, "show"), s = c(t, "fullscreen"), f = _(() => s.value ? h : C);
22
+ return (n, e) => (g(), w("div", b, [
23
+ e[3] || (e[3] = o("div", { class: "tr-container__dragging-bar-wrapper" }, [
24
+ o("div", { class: "tr-container__dragging-bar" })
25
25
  ], -1)),
26
- n("div", B, [
27
- r(t.$slots, "title", {}, () => [
28
- e[2] || (e[2] = n("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
29
- ]),
30
- n("div", k, [
31
- r(t.$slots, "operations"),
32
- c(i(u), {
26
+ o("div", z, [
27
+ r(n.$slots, "title", {}, () => [
28
+ e[2] || (e[2] = o("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
29
+ ], !0),
30
+ o("div", B, [
31
+ r(n.$slots, "operations", {}, void 0, !0),
32
+ u(l(d), {
33
33
  size: "28",
34
34
  "svg-size": "20",
35
35
  icon: f.value,
36
- onClick: e[0] || (e[0] = (p) => t.$emit("update:fullscreen", !s.value))
36
+ onClick: e[0] || (e[0] = (p) => n.$emit("update:fullscreen", !s.value))
37
37
  }, null, 8, ["icon"]),
38
- c(i(u), {
38
+ u(l(d), {
39
39
  size: "28",
40
40
  "svg-size": "20",
41
- icon: i(C),
42
- onClick: e[1] || (e[1] = (p) => t.$emit("update:show", !1))
41
+ icon: l($),
42
+ onClick: e[1] || (e[1] = (p) => n.$emit("update:show", !1))
43
43
  }, null, 8, ["icon"])
44
44
  ])
45
45
  ]),
46
- r(t.$slots, "default"),
47
- n("div", y, [
48
- r(t.$slots, "footer")
46
+ r(n.$slots, "default", {}, void 0, !0),
47
+ o("div", S, [
48
+ r(n.$slots, "footer", {}, void 0, !0)
49
49
  ])
50
50
  ]));
51
51
  }
52
- }), a = /* @__PURE__ */ b(E, [["__scopeId", "data-v-6a9b9126"]]);
53
- a.name = "TrContainer";
54
- const I = function(o) {
55
- o.component(a.name, a);
52
+ }), i = /* @__PURE__ */ I(k, [["__scopeId", "data-v-3fa99833"]]);
53
+ i.name = "TrContainer";
54
+ const y = function(t) {
55
+ t.component(i.name, i);
56
56
  };
57
- a.install = I;
57
+ i.install = y;
58
58
  export {
59
- a as default
59
+ i as default
60
60
  };
@@ -1,5 +1,5 @@
1
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";
2
+ import { a as M } from "../index2.js";
3
3
  import { _ as Z } from "../_plugin-vue_export-helper.js";
4
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
5
  __name: "index",
@@ -1,10 +1,80 @@
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
- import { _ as S } from "../_plugin-vue_export-helper.js";
5
- const $ = { class: "tr-dropdown-menu__list" }, F = ["onClick"], N = /* @__PURE__ */ C({
1
+ import { ref as k, onUnmounted as T, watch as C, defineComponent as E, mergeModels as y, useModel as H, computed as p, createBlock as I, openBlock as w, unref as X, withCtx as _, createElementVNode as j, createElementBlock as b, Fragment as D, renderList as L, toDisplayString as Y, renderSlot as O } from "vue";
2
+ import { w as S, b as M, o as $ } from "../index2.js";
3
+ import { B as A } from "../index3.js";
4
+ import { u as F } from "../utils.js";
5
+ import { _ as G } from "../_plugin-vue_export-helper.js";
6
+ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.bottom, N = (o, t, g = !1) => {
7
+ if (t.length < 3) return !1;
8
+ const l = o.x, d = o.y;
9
+ let f = !1;
10
+ const r = (s, c, a, n, i, e) => {
11
+ const m = (i - a) * (c - n) - (e - n) * (s - a);
12
+ if (Math.abs(m) > 1e-10) return !1;
13
+ const u = Math.min(a, i), h = Math.max(a, i), x = Math.min(n, e), B = Math.max(n, e);
14
+ return s >= u && s <= h && c >= x && c <= B;
15
+ };
16
+ for (let s = 0, c = t.length - 1; s < t.length; c = s++) {
17
+ const a = t[s].x, n = t[s].y, i = t[c].x, e = t[c].y;
18
+ if (g && r(l, d, a, n, i, e))
19
+ return !0;
20
+ if (n > d && e <= d || e > d && n <= d) {
21
+ const u = (i - a) * (d - n) / (e - n) + a;
22
+ l < u && (f = !f);
23
+ }
24
+ }
25
+ return f;
26
+ }, U = (o, t) => t.bottom < o.top ? [
27
+ { x: o.left, y: o.top },
28
+ { x: o.right, y: o.top },
29
+ { x: t.right, y: t.bottom },
30
+ { x: t.left, y: t.bottom }
31
+ ] : t.top > o.bottom ? [
32
+ { x: o.left, y: o.bottom },
33
+ { x: o.right, y: o.bottom },
34
+ { x: t.right, y: t.top },
35
+ { x: t.left, y: t.top }
36
+ ] : [], { x: V, y: q } = F(), z = (o, t, g) => {
37
+ const { delayEnter: l = 0, delayLeave: d = 0 } = g || {}, f = k(!1), r = k("outside");
38
+ let s = null;
39
+ const c = () => {
40
+ s && (clearTimeout(s), s = null);
41
+ };
42
+ T(() => {
43
+ c();
44
+ });
45
+ const a = (n) => {
46
+ const i = n ? l : d;
47
+ c(), i ? s = setTimeout(() => f.value = n, i) : f.value = n;
48
+ };
49
+ return C(
50
+ r,
51
+ (n) => {
52
+ ["trigger", "popper", "polygon"].includes(n) ? a(!0) : a(!1);
53
+ },
54
+ { immediate: !0 }
55
+ ), S(
56
+ [V, q],
57
+ ([n, i]) => {
58
+ const e = M(o), m = M(t), u = e == null ? void 0 : e.getBoundingClientRect(), h = m == null ? void 0 : m.getBoundingClientRect();
59
+ if (u && P({ x: n, y: i }, u)) {
60
+ r.value = "trigger";
61
+ return;
62
+ }
63
+ if (h && P({ x: n, y: i }, h)) {
64
+ r.value = "popper";
65
+ return;
66
+ }
67
+ if (!u || !h || u.width === 0 || u.height === 0 || h.width === 0 || h.height === 0) {
68
+ r.value = "outside";
69
+ return;
70
+ }
71
+ N({ x: n, y: i }, U(u, h), !0) ? r.value = "polygon" : r.value = "outside";
72
+ },
73
+ { throttle: 10 }
74
+ ), f;
75
+ }, J = { class: "tr-dropdown-menu__list" }, K = ["onClick"], Q = /* @__PURE__ */ E({
6
76
  __name: "index",
7
- props: /* @__PURE__ */ f({
77
+ props: /* @__PURE__ */ y({
8
78
  appendTo: {},
9
79
  items: {},
10
80
  show: { type: Boolean },
@@ -13,75 +83,77 @@ const $ = { class: "tr-dropdown-menu__list" }, F = ["onClick"], N = /* @__PURE__
13
83
  show: { type: Boolean, default: !1 },
14
84
  showModifiers: {}
15
85
  }),
16
- emits: /* @__PURE__ */ f(["item-click", "click-outside"], ["update:show"]),
17
- setup(n, { emit: k }) {
18
- const t = n, c = k, d = M(n, "show"), o = i({
19
- get: () => t.trigger === "manual" ? t.show : d.value,
86
+ emits: /* @__PURE__ */ y(["item-click", "click-outside"], ["update:show"]),
87
+ setup(o, { expose: t, emit: g }) {
88
+ const l = o, d = g, f = H(o, "show"), r = p({
89
+ get: () => l.trigger === "manual" ? l.show : f.value,
20
90
  set: (e) => {
21
- t.trigger !== "manual" && (d.value = e);
91
+ l.trigger !== "manual" && (f.value = e);
22
92
  }
23
- }), l = B(null), p = i(() => {
93
+ }), s = k(null), c = p(() => {
24
94
  var e;
25
- return (e = l.value) == null ? void 0 : e.triggerRef;
26
- }), u = i(() => {
95
+ return (e = s.value) == null ? void 0 : e.triggerRef;
96
+ }), a = p(() => {
27
97
  var e;
28
- return (e = l.value) == null ? void 0 : e.popperRef;
98
+ return (e = s.value) == null ? void 0 : e.popperRef;
29
99
  });
30
- if (t.trigger === "click" || t.trigger === "manual")
31
- P(
32
- u,
100
+ if (l.trigger === "click" || l.trigger === "manual")
101
+ $(
102
+ a,
33
103
  (e) => {
34
- c("click-outside", e), o.value = !1;
104
+ d("click-outside", e), r.value = !1;
35
105
  },
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
- }
106
+ { ignore: [c] }
45
107
  );
108
+ else if (l.trigger === "hover") {
109
+ const e = z(c, a, { delayEnter: 100, delayLeave: 100 });
110
+ C(e, (m) => {
111
+ r.value = m;
112
+ });
46
113
  }
47
- const _ = () => {
48
- t.trigger === "click" && (o.value = !o.value);
49
- }, y = (e) => {
50
- o.value = !1, c("item-click", e);
114
+ const n = () => {
115
+ l.trigger === "click" && (r.value = !r.value);
116
+ }, i = (e) => {
117
+ r.value = !1, d("item-click", e);
51
118
  };
52
- return (e, m) => (a(), x(E(I), {
53
- show: o.value,
119
+ return t({
120
+ update: () => {
121
+ var e;
122
+ (e = s.value) == null || e.update();
123
+ }
124
+ }), (e, m) => (w(), I(X(A), {
125
+ show: r.value,
54
126
  class: "tr-dropdown-menu",
55
127
  ref_key: "basePopperRef",
56
- ref: l,
128
+ ref: s,
57
129
  placement: "top-left",
58
- "append-to": t.appendTo,
130
+ "append-to": l.appendTo,
59
131
  offset: 8,
60
132
  "transition-props": { name: "tr-dropdown-menu" },
61
133
  "prevent-overflow": !0,
62
- "trigger-events": { onClick: _ }
134
+ "trigger-events": { onClick: n }
63
135
  }, {
64
- trigger: v(() => [
65
- L(e.$slots, "trigger", {}, void 0, !0)
136
+ trigger: _(() => [
137
+ O(e.$slots, "trigger", {}, void 0, !0)
66
138
  ]),
67
- content: v(() => [
68
- T("ul", $, [
69
- (a(!0), w(b, null, D(t.items, (r) => (a(), w("li", {
139
+ content: _(() => [
140
+ j("ul", J, [
141
+ (w(!0), b(D, null, L(l.items, (u) => (w(), b("li", {
70
142
  class: "tr-dropdown-menu__list-item",
71
- key: r.id,
72
- onClick: (g) => y(r)
73
- }, H(r.text), 9, F))), 128))
143
+ key: u.id,
144
+ onClick: (h) => i(u)
145
+ }, Y(u.text), 9, K))), 128))
74
146
  ])
75
147
  ]),
76
148
  _: 3
77
149
  }, 8, ["show", "append-to", "trigger-events"]));
78
150
  }
79
- }), s = /* @__PURE__ */ S(N, [["__scopeId", "data-v-cb0454c9"]]);
80
- s.name = "TrDropdownMenu";
81
- const O = function(n) {
82
- n.component(s.name, s);
151
+ }), v = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-8d480727"]]);
152
+ v.name = "TrDropdownMenu";
153
+ const W = function(o) {
154
+ o.component(v.name, v);
83
155
  };
84
- s.install = O;
156
+ v.install = W;
85
157
  export {
86
- s as default
158
+ v as default
87
159
  };
@@ -1,59 +1,59 @@
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
- import $, { ActionGroupItem as V } from "../action-group/index.js";
5
- import U from "../icon-button/index.js";
6
- import { _ as P } from "../_plugin-vue_export-helper.js";
7
- const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__ */ X({
1
+ import { defineComponent as V, ref as g, computed as P, onMounted as z, watch as O, createElementBlock as r, openBlock as t, createCommentVNode as k, Fragment as A, renderList as w, toDisplayString as y, createVNode as b, unref as l, nextTick as q, createElementVNode as _, createBlock as d, withCtx as f, createTextVNode as U, resolveDynamicComponent as x } from "vue";
2
+ import { IconArrowUp as T, IconArrowDown as N, IconDislike as j, IconLike as H, IconRefresh as J, IconCopy as K } from "@opentiny/tiny-robot-svgs";
3
+ import { TinyButton as G } from "@opentiny/vue";
4
+ import $, { ActionGroupItem as D } from "../action-group/index.js";
5
+ import Q from "../icon-button/index.js";
6
+ import { _ as X } from "../_plugin-vue_export-helper.js";
7
+ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__ */ V({
8
8
  __name: "SourceList",
9
9
  props: {
10
10
  sources: {},
11
11
  linesLimit: { default: Number.MAX_SAFE_INTEGER }
12
12
  },
13
13
  setup(h) {
14
- const m = h, e = A(!1), y = A([]), c = A(null), L = () => {
15
- O(() => {
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));
14
+ const m = h, e = g(!1), I = g([]), c = g(null), L = () => {
15
+ q(() => {
16
+ const u = I.value.slice(0, m.sources.length).map((s) => (s == null ? void 0 : s.offsetTop) || 0), n = Array.from(new Set(u));
17
17
  if (n.length > m.linesLimit) {
18
- const o = n[m.linesLimit - 1], s = u.lastIndexOf(o);
19
- c.value = s;
18
+ const s = n[m.linesLimit - 1], o = u.lastIndexOf(s);
19
+ c.value = o;
20
20
  } else
21
21
  c.value = null;
22
22
  });
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);
23
+ }, E = P(() => m.sources.length - (c.value || 0));
24
+ z(L), O(() => m.sources, L);
25
+ const p = (u, n) => {
26
+ u && (I.value[n] = u);
27
27
  };
28
- return (u, n) => (t(), a("div", W, [
29
- (t(!0), a(E, null, T(m.sources, (o, s) => (t(), a(E, { key: s }, [
30
- !c.value || e.value || s < c.value ? (t(), a("a", {
28
+ return (u, n) => (t(), r("div", W, [
29
+ (t(!0), r(A, null, w(m.sources, (s, o) => (t(), r(A, { key: o }, [
30
+ !c.value || e.value || o < c.value ? (t(), r("a", {
31
31
  key: 0,
32
32
  class: "pill",
33
- href: o.link,
33
+ href: s.link,
34
34
  target: "_blank",
35
35
  ref_for: !0,
36
- ref: (r) => _(r, s)
37
- }, g(o.label), 9, Y)) : k("", !0),
38
- c.value && !e.value && s === c.value ? (t(), a("span", {
36
+ ref: (a) => p(a, o)
37
+ }, y(s.label), 9, Y)) : k("", !0),
38
+ c.value && !e.value && o === c.value ? (t(), r("span", {
39
39
  key: 1,
40
40
  class: "pill",
41
- onClick: n[0] || (n[0] = (r) => e.value = !0)
42
- }, g(x.value) + "+ ", 1)) : k("", !0)
41
+ onClick: n[0] || (n[0] = (a) => e.value = !0)
42
+ }, y(E.value) + "+ ", 1)) : k("", !0)
43
43
  ], 64))), 128)),
44
- e.value ? (t(), a("span", {
44
+ e.value ? (t(), r("span", {
45
45
  key: 0,
46
46
  class: "pill collapse-pill",
47
- onClick: n[1] || (n[1] = (o) => e.value = !1)
47
+ onClick: n[1] || (n[1] = (s) => e.value = !1)
48
48
  }, [
49
- b(l(S))
49
+ b(l(T))
50
50
  ])) : k("", !0)
51
51
  ]));
52
52
  }
53
- }), ee = /* @__PURE__ */ P(Z, [["__scopeId", "data-v-c5fbb560"]]), te = { class: "tr-feedback" }, se = { class: "tr-feedback__operations" }, oe = { class: "tr-feedback__operations-left" }, ne = { key: 1 }, le = { class: "tr-feedback__operations-right" }, ae = {
53
+ }), ee = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-c5fbb560"]]), te = { class: "tr-feedback" }, oe = { class: "tr-feedback__operations" }, se = { class: "tr-feedback__operations-left" }, ne = { key: 1 }, le = { class: "tr-feedback__operations-right" }, re = {
54
54
  key: 0,
55
55
  class: "tr-feedback__footer"
56
- }, re = { key: 0 }, ie = /* @__PURE__ */ X({
56
+ }, ae = { key: 0 }, ie = /* @__PURE__ */ V({
57
57
  __name: "index",
58
58
  props: {
59
59
  operations: {},
@@ -65,26 +65,26 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
65
65
  },
66
66
  emits: ["operation", "action"],
67
67
  setup(h, { emit: m }) {
68
- const e = h, y = {
69
- copy: Q,
70
- refresh: K,
68
+ const e = h, I = {
69
+ copy: K,
70
+ refresh: J,
71
71
  like: H,
72
72
  dislike: j
73
73
  }, c = m, L = (n) => {
74
- var o, s, r;
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
- }, x = (n) => {
77
- var o, s, r;
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
- }, _ = A(!1), u = () => {
80
- _.value = !_.value;
74
+ var s, o, a;
75
+ (a = (o = (s = e.operations) == null ? void 0 : s.find((v) => v.name === n)) == null ? void 0 : o.onClick) == null || a.call(o), c("operation", n);
76
+ }, E = (n) => {
77
+ var s, o, a;
78
+ (a = (o = (s = e.actions) == null ? void 0 : s.find((v) => v.name === n)) == null ? void 0 : o.onClick) == null || a.call(o), c("action", n);
79
+ }, p = g(!1), u = () => {
80
+ p.value = !p.value;
81
81
  };
82
- return (n, o) => {
83
- var s, r, v, w, B, F, M, G;
84
- return t(), a("div", te, [
85
- p("div", se, [
86
- p("div", oe, [
87
- (s = e.operations) != null && s.length ? (t(), d(l($), {
82
+ return (n, s) => {
83
+ var o, a, v, S, F, M, R, B;
84
+ return t(), r("div", te, [
85
+ _("div", oe, [
86
+ _("div", se, [
87
+ (o = e.operations) != null && o.length ? (t(), d(l($), {
88
88
  key: 0,
89
89
  "max-num": e.operationsLimit,
90
90
  "drop-down-show-label-only": !0,
@@ -92,14 +92,14 @@ 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
- b(l(R), {
95
+ b(l(G), {
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] = p("span", null, "更多", -1)),
102
+ s[0] || (s[0] = _("span", null, "更多", -1)),
103
103
  b(l(N))
104
104
  ]),
105
105
  _: 1,
@@ -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(E, null, T(e.operations, (i) => (t(), d(l(V), {
110
+ (t(!0), r(A, null, w(e.operations, (i) => (t(), d(l(D), {
111
111
  key: i.name,
112
112
  name: i.name,
113
113
  label: i.label
114
114
  }, {
115
115
  default: f(() => [
116
- b(l(R), {
116
+ b(l(G), {
117
117
  round: "",
118
118
  "reset-time": 0,
119
119
  size: "mini"
120
120
  }, {
121
121
  default: f(() => [
122
- q(g(i.label), 1)
122
+ U(y(i.label), 1)
123
123
  ]),
124
124
  _: 2
125
125
  }, 1024)
@@ -128,33 +128,33 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
128
128
  }, 1032, ["name", "label"]))), 128))
129
129
  ]),
130
130
  _: 1
131
- }, 8, ["max-num"])) : (r = e.sources) != null && r.length ? (t(), a("div", ne, [
132
- p("span", {
131
+ }, 8, ["max-num"])) : (a = e.sources) != null && a.length ? (t(), r("div", ne, [
132
+ _("span", {
133
133
  class: "tr-feedback__source",
134
134
  onClick: u
135
135
  }, [
136
- p("span", null, g((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
137
- (t(), d(C(_.value ? l(S) : l(N))))
136
+ _("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
137
+ (t(), d(x(p.value ? l(T) : l(N))))
138
138
  ])
139
139
  ])) : k("", !0)
140
140
  ]),
141
- p("div", le, [
141
+ _("div", le, [
142
142
  b(l($), {
143
143
  "max-num": e.actionsLimit,
144
144
  "show-tooltip": !0,
145
- onItemClick: x
145
+ onItemClick: E
146
146
  }, {
147
147
  default: f(() => [
148
- (t(!0), a(E, null, T(e.actions, (i) => (t(), d(l(V), {
148
+ (t(!0), r(A, null, w(e.actions, (i) => (t(), d(l(D), {
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(U), {
154
+ typeof i.icon == "string" ? (t(), d(l(Q), {
155
155
  key: 0,
156
- icon: y[i.icon]
157
- }, null, 8, ["icon"])) : (t(), d(C(i.icon), { key: 1 }))
156
+ icon: I[i.icon]
157
+ }, null, 8, ["icon"])) : (t(), d(x(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) || _.value && e.sources ? (t(), a("div", ae, [
167
- (F = e.operations) != null && F.length && ((M = e.sources) != null && M.length) ? (t(), a("div", re, [
168
- p("span", {
166
+ (S = e.operations) != null && S.length && ((F = e.sources) != null && F.length) || p.value && e.sources ? (t(), r("div", re, [
167
+ (M = e.operations) != null && M.length && ((R = e.sources) != null && R.length) ? (t(), r("div", ae, [
168
+ _("span", {
169
169
  class: "tr-feedback__source",
170
170
  onClick: u
171
171
  }, [
172
- p("span", null, g((G = e.sources) == null ? void 0 : G.length) + "条来源", 1),
173
- (t(), d(C(_.value ? l(S) : l(N))))
172
+ _("span", null, y((B = e.sources) == null ? void 0 : B.length) + "条来源", 1),
173
+ (t(), d(x(p.value ? l(T) : l(N))))
174
174
  ])
175
175
  ])) : k("", !0),
176
- _.value && e.sources ? (t(), d(l(ee), {
176
+ p.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
- }), I = /* @__PURE__ */ P(ie, [["__scopeId", "data-v-cc6ef316"]]);
186
- I.name = "TrFeedback";
185
+ }), C = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-affa572f"]]);
186
+ C.name = "TrFeedback";
187
187
  const ce = function(h) {
188
- h.component(I.name, I);
188
+ h.component(C.name, C);
189
189
  };
190
- I.install = ce;
190
+ C.install = ce;
191
191
  export {
192
- I as default
192
+ C as default
193
193
  };