@opentiny/tiny-robot 0.3.0-alpha.2 → 0.3.0-alpha.3

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,5 +1,5 @@
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 a } from "vue";
2
- import { l as h, w as $, s as C } from "../tiny-robot-svgs.js";
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 { r as h, a as $, f 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({
@@ -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(a(u), {
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(a(u), {
38
+ c(i(u), {
39
39
  size: "28",
40
40
  "svg-size": "20",
41
- icon: a(C),
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
- }), i = /* @__PURE__ */ b(E, [["__scopeId", "data-v-6a9b9126"]]);
53
- i.name = "TrContainer";
52
+ }), a = /* @__PURE__ */ b(E, [["__scopeId", "data-v-6a9b9126"]]);
53
+ a.name = "TrContainer";
54
54
  const I = function(o) {
55
- o.component(i.name, i);
55
+ o.component(a.name, a);
56
56
  };
57
- i.install = I;
57
+ a.install = I;
58
58
  export {
59
- i as default
59
+ a as default
60
60
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as X, ref as A, computed as z, onMounted as D, watch as O, createElementBlock as a, openBlock as t, createCommentVNode as k, Fragment as E, renderList as S, toDisplayString as y, createVNode as h, unref as l, nextTick as q, createElementVNode as p, createBlock as d, withCtx as f, createTextVNode as j, resolveDynamicComponent as C } from "vue";
2
- import { f as T, A as N, c as H, a as J, b as K, v as Q } from "../tiny-robot-svgs.js";
1
+ import { defineComponent as X, ref as E, computed as z, onMounted as D, watch as O, createElementBlock as a, openBlock as t, createCommentVNode as k, Fragment as I, renderList as S, toDisplayString as y, createVNode as b, unref as l, nextTick as q, createElementVNode as _, createBlock as p, withCtx as f, createTextVNode as j, resolveDynamicComponent as C } from "vue";
2
+ import { l as T, n as N, c as H, h as J, y as K, d as Q } from "../tiny-robot-svgs.js";
3
3
  import { B as R } from "../index3.js";
4
4
  import $, { ActionGroupItem as V } from "../action-group/index.js";
5
5
  import U from "../icon-button/index.js";
@@ -10,8 +10,8 @@ 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(b) {
14
- const m = b, e = A(!1), g = A([]), c = A(null), L = () => {
13
+ setup(h) {
14
+ const m = h, e = E(!1), g = E([]), c = E(null), L = () => {
15
15
  q(() => {
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) {
@@ -20,33 +20,33 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
20
20
  } else
21
21
  c.value = null;
22
22
  });
23
- }, x = z(() => m.sources.length - (c.value || 0));
23
+ }, A = z(() => m.sources.length - (c.value || 0));
24
24
  D(L), O(() => m.sources, L);
25
- const _ = (u, n) => {
25
+ const d = (u, n) => {
26
26
  u && (g.value[n] = u);
27
27
  };
28
28
  return (u, n) => (t(), a("div", W, [
29
- (t(!0), a(E, null, S(m.sources, (o, s) => (t(), a(E, { key: s }, [
29
+ (t(!0), a(I, null, S(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) => _(r, s)
36
+ ref: (r) => d(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,
40
40
  class: "pill",
41
41
  onClick: n[0] || (n[0] = (r) => e.value = !0)
42
- }, y(x.value) + "+ ", 1)) : k("", !0)
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(T))
49
+ b(l(T))
50
50
  ])) : k("", !0)
51
51
  ]));
52
52
  }
@@ -64,8 +64,8 @@ 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(b, { emit: m }) {
68
- const e = b, g = {
67
+ setup(h, { emit: m }) {
68
+ const e = h, g = {
69
69
  copy: Q,
70
70
  refresh: K,
71
71
  like: J,
@@ -73,18 +73,18 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
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
- }, x = (n) => {
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
- }, _ = A(!1), u = () => {
80
- _.value = !_.value;
79
+ }, d = E(!1), u = () => {
80
+ d.value = !d.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
- p("div", se, [
86
- p("div", oe, [
87
- (s = e.operations) != null && s.length ? (t(), d(l($), {
85
+ _("div", se, [
86
+ _("div", oe, [
87
+ (s = e.operations) != null && s.length ? (t(), p(l($), {
88
88
  key: 0,
89
89
  "max-num": e.operationsLimit,
90
90
  "drop-down-show-label-only": !0,
@@ -92,28 +92,28 @@ 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(R), {
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] = p("span", null, "更多", -1)),
103
- h(l(N))
102
+ o[0] || (o[0] = _("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(E, null, S(e.operations, (i) => (t(), d(l(V), {
110
+ (t(!0), a(I, null, S(e.operations, (i) => (t(), p(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(R), {
116
+ b(l(R), {
117
117
  round: "",
118
118
  "reset-time": 0,
119
119
  size: "mini"
@@ -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
- p("span", {
132
+ _("span", {
133
133
  class: "tr-feedback__source",
134
134
  onClick: u
135
135
  }, [
136
- p("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
137
- (t(), d(C(_.value ? l(T) : l(N))))
136
+ _("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
137
+ (t(), p(C(d.value ? l(T) : l(N))))
138
138
  ])
139
139
  ])) : k("", !0)
140
140
  ]),
141
- p("div", le, [
142
- h(l($), {
141
+ _("div", le, [
142
+ b(l($), {
143
143
  "max-num": e.actionsLimit,
144
144
  "show-tooltip": !0,
145
- onItemClick: x
145
+ onItemClick: A
146
146
  }, {
147
147
  default: f(() => [
148
- (t(!0), a(E, null, S(e.actions, (i) => (t(), d(l(V), {
148
+ (t(!0), a(I, null, S(e.actions, (i) => (t(), p(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(U), {
154
+ typeof i.icon == "string" ? (t(), p(l(U), {
155
155
  key: 0,
156
156
  icon: g[i.icon]
157
- }, null, 8, ["icon"])) : (t(), d(C(i.icon), { key: 1 }))
157
+ }, null, 8, ["icon"])) : (t(), p(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) || _.value && e.sources ? (t(), a("div", ae, [
166
+ (w = e.operations) != null && w.length && ((B = e.sources) != null && B.length) || d.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
- p("span", {
168
+ _("span", {
169
169
  class: "tr-feedback__source",
170
170
  onClick: u
171
171
  }, [
172
- p("span", null, y((G = e.sources) == null ? void 0 : G.length) + "条来源", 1),
173
- (t(), d(C(_.value ? l(T) : l(N))))
172
+ _("span", null, y((G = e.sources) == null ? void 0 : G.length) + "条来源", 1),
173
+ (t(), p(C(d.value ? l(T) : l(N))))
174
174
  ])
175
175
  ])) : k("", !0),
176
- _.value && e.sources ? (t(), d(l(ee), {
176
+ d.value && e.sources ? (t(), p(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";
187
- const ce = function(b) {
188
- b.component(I.name, I);
185
+ }), x = /* @__PURE__ */ P(ie, [["__scopeId", "data-v-cc6ef316"]]);
186
+ x.name = "TrFeedback";
187
+ const ce = function(h) {
188
+ h.component(x.name, x);
189
189
  };
190
- I.install = ce;
190
+ x.install = ce;
191
191
  export {
192
- I as default
192
+ x as default
193
193
  };
@@ -1,5 +1,5 @@
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 b, createBlock as x, resolveDynamicComponent as B, toDisplayString as S, nextTick as H } from "vue";
2
- import { A as X } from "../tiny-robot-svgs.js";
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 b, createBlock as x, resolveDynamicComponent as B, toDisplayString as D, nextTick as H } from "vue";
2
+ import { n as X } from "../tiny-robot-svgs.js";
3
3
  import { b as j, o as J } from "../index2.js";
4
4
  import { _ as K } from "../_plugin-vue_export-helper.js";
5
5
  const P = ["onClick"], Q = {
@@ -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: D }) {
21
+ setup(d, { emit: F }) {
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 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) => {
30
+ const N = F, y = i(null), w = i(null), k = i(null), M = i([]), s = i(null), m = i(!1), c = i(!1), A = (t, o) => {
31
31
  t && (M.value[o] = t);
32
32
  }, L = () => {
33
33
  s.value = null, m.value = !1, H(() => {
@@ -48,7 +48,7 @@ const P = ["onClick"], Q = {
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, F("item-click", t);
51
+ u.value = t, c.value = !1, N("item-click", t);
52
52
  }, V = () => {
53
53
  n.showMoreTrigger === "click" && (c.value = !c.value);
54
54
  }, v = (t) => {
@@ -62,18 +62,18 @@ const P = ["onClick"], Q = {
62
62
  ref_key: "containerRef",
63
63
  ref: y
64
64
  }, [
65
- (l(!0), a(I, null, A(n.items, (e, f) => (l(), a(I, {
65
+ (l(!0), a(I, null, S(n.items, (e, f) => (l(), a(I, {
66
66
  key: e.id
67
67
  }, [
68
68
  s.value === null || f < s.value ? (l(), a("button", {
69
69
  key: 0,
70
70
  class: b(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
71
71
  ref_for: !0,
72
- ref: (r) => N(r, f),
72
+ ref: (r) => A(r, f),
73
73
  onClick: (r) => R(e.id)
74
74
  }, [
75
75
  (l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
76
- e.label ? (l(), a("span", Q, S(e.label), 1)) : _("", !0)
76
+ e.label ? (l(), a("span", Q, D(e.label), 1)) : _("", !0)
77
77
  ], 10, P)) : _("", !0)
78
78
  ], 64))), 128)),
79
79
  C("div", U, [
@@ -99,13 +99,13 @@ const P = ["onClick"], Q = {
99
99
  ref_key: "dropDownRef",
100
100
  ref: k
101
101
  }, [
102
- (l(!0), a(I, null, A(z.value, (e) => (l(), a("button", {
102
+ (l(!0), a(I, null, S(z.value, (e) => (l(), a("button", {
103
103
  class: b(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
104
104
  key: e.id,
105
105
  onClick: (f) => R(e.id)
106
106
  }, [
107
107
  (l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
108
- C("span", Z, S(e.label), 1)
108
+ C("span", Z, D(e.label), 1)
109
109
  ], 10, Y))), 128))
110
110
  ], 512)) : _("", !0)
111
111
  ], 32)
@@ -1,10 +1,10 @@
1
- import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as X, normalizeClass as D, createElementVNode as p, toDisplayString as k, createVNode as h, unref as e, ref as G, watchEffect as Y, nextTick as Z, mergeModels as N, useCssVars as q, computed as m, useModel as P, createCommentVNode as E, Fragment as T, renderList as $, createBlock as R, withDirectives as ee, mergeProps as te, withCtx as H, withModifiers as S, vModelText as re } from "vue";
2
- import { u as oe, m as se, p as ae, o as ne, s as ie } from "../tiny-robot-svgs.js";
1
+ import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as X, normalizeClass as D, createElementVNode as p, toDisplayString as k, createVNode as m, unref as e, ref as G, watchEffect as Y, nextTick as Z, mergeModels as N, useCssVars as q, computed as h, useModel as P, createCommentVNode as E, Fragment as T, renderList as $, createBlock as R, withDirectives as ee, mergeProps as te, withCtx as H, withModifiers as S, vModelText as re } from "vue";
2
+ import { w as oe, b as se, p as ae, A as ne, f as ie } from "../tiny-robot-svgs.js";
3
3
  import { I as le } from "../index5.js";
4
4
  import { T as U } from "../index4.js";
5
5
  import B from "../icon-button/index.js";
6
6
  import { o as ce } from "../index2.js";
7
- import { _ as M } from "../_plugin-vue_export-helper.js";
7
+ import { _ as A } from "../_plugin-vue_export-helper.js";
8
8
  const ue = /* @__PURE__ */ V({
9
9
  __name: "item-tag",
10
10
  props: {
@@ -21,7 +21,7 @@ const ue = /* @__PURE__ */ V({
21
21
  p("span", null, k(t.text), 1)
22
22
  ], 6));
23
23
  }
24
- }), de = /* @__PURE__ */ M(ue, [["__scopeId", "data-v-346767bb"]]), _e = { class: "tr-history__empty" }, pe = { class: "tr-history__empty-icon" }, me = { class: "tr-history__empty-text" }, he = /* @__PURE__ */ V({
24
+ }), de = /* @__PURE__ */ A(ue, [["__scopeId", "data-v-346767bb"]]), _e = { class: "tr-history__empty" }, pe = { class: "tr-history__empty-icon" }, he = { class: "tr-history__empty-text" }, me = /* @__PURE__ */ V({
25
25
  __name: "search-empty",
26
26
  props: {
27
27
  text: { default: "暂无内容" }
@@ -30,25 +30,25 @@ const ue = /* @__PURE__ */ V({
30
30
  const t = i;
31
31
  return (a, _) => (n(), u("div", _e, [
32
32
  p("span", pe, [
33
- h(e(oe))
33
+ m(e(oe))
34
34
  ]),
35
- p("span", me, k(t.text), 1)
35
+ p("span", he, k(t.text), 1)
36
36
  ]));
37
37
  }
38
- }), ve = /* @__PURE__ */ M(he, [["__scopeId", "data-v-b21f5bc0"]]), ye = (i) => {
38
+ }), fe = /* @__PURE__ */ A(me, [["__scopeId", "data-v-b21f5bc0"]]), ve = (i) => {
39
39
  const t = G(), a = (l) => {
40
40
  t.value = {
41
41
  id: l.id,
42
42
  title: l.title,
43
43
  rawData: l
44
44
  };
45
- }, _ = G(null), v = (l) => {
45
+ }, _ = G(null), f = (l) => {
46
46
  l && Z(() => {
47
47
  _.value = l, _.value.focus();
48
48
  });
49
49
  };
50
50
  let r;
51
- const y = () => {
51
+ const v = () => {
52
52
  if (t.value) {
53
53
  if (t.value.title !== t.value.rawData.title) {
54
54
  const { title: l, rawData: I } = t.value;
@@ -60,19 +60,19 @@ const ue = /* @__PURE__ */ V({
60
60
  }, g = () => {
61
61
  t.value = void 0, r == null || r(), r = void 0;
62
62
  }, b = (l) => {
63
- l.key === "Enter" ? y() : l.key === "Escape" && g();
63
+ l.key === "Enter" ? v() : l.key === "Escape" && g();
64
64
  };
65
65
  return Y(() => {
66
66
  _.value && (r == null || r(), r = ce(_, () => {
67
- y();
67
+ v();
68
68
  }));
69
69
  }), {
70
70
  editingItem: t,
71
71
  handleEdit: a,
72
- handleEditorInputRef: v,
72
+ handleEditorInputRef: f,
73
73
  handleKeyDown: b
74
74
  };
75
- }, fe = { class: "tr-history" }, ke = { class: "tr-history__tabs" }, ge = ["onClick"], be = {
75
+ }, ye = { class: "tr-history" }, ke = { class: "tr-history__tabs" }, ge = ["onClick"], be = {
76
76
  key: 0,
77
77
  class: "tr-history__search"
78
78
  }, xe = { class: "tr-history__content" }, Ce = {
@@ -102,36 +102,36 @@ const ue = /* @__PURE__ */ V({
102
102
  d4b77bae: b.value ? "1px solid rgb(240, 240, 240)" : "none",
103
103
  "659130e6": b.value ? "2px solid rgb(25, 25, 25)" : "none"
104
104
  }));
105
- const a = i, _ = P(i, "activeTab"), v = P(i, "searchQuery"), r = t, y = m(() => Array.isArray(a.tabs) ? a.tabs : [{ title: a.tabTitle, id: "0" }]), g = m(() => _.value || y.value[0].id), b = m(() => y.value.length > 1), l = (c) => {
105
+ const a = i, _ = P(i, "activeTab"), f = P(i, "searchQuery"), r = t, v = h(() => Array.isArray(a.tabs) ? a.tabs : [{ title: a.tabTitle, id: "0" }]), g = h(() => _.value || v.value[0].id), b = h(() => v.value.length > 1), l = (c) => {
106
106
  var s;
107
107
  const o = typeof ((s = c[0]) == null ? void 0 : s.group);
108
108
  return o === "string" || o === "symbol";
109
- }, I = m(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"), O = m(() => {
109
+ }, I = h(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"), M = h(() => {
110
110
  const c = I.value;
111
111
  return l(c) ? c : [{ group: w, items: c }];
112
- }), x = m(() => a.searchBar ? O.value.map((o) => ({
112
+ }), x = h(() => a.searchBar ? M.value.map((o) => ({
113
113
  ...o,
114
- items: o.items.filter((s) => a.searchFn(v.value || "", s))
115
- })).filter((o) => o.items.length > 0) : O.value), L = m(() => x.value.length === 0 ? !1 : x.value[0].group === w ? x.value[0].items.length > 0 : !0), z = (c) => {
114
+ items: o.items.filter((s) => a.searchFn(f.value || "", s))
115
+ })).filter((o) => o.items.length > 0) : M.value), L = h(() => x.value.length === 0 ? !1 : x.value[0].group === w ? x.value[0].items.length > 0 : !0), z = (c) => {
116
116
  var o;
117
117
  c.id !== ((o = C.value) == null ? void 0 : o.id) && r("item-click", c);
118
118
  }, W = () => {
119
119
  r("close");
120
120
  }, F = (c) => {
121
121
  r("item-delete", c);
122
- }, { editingItem: C, handleEdit: j, handleEditorInputRef: J, handleKeyDown: Q } = ye(r);
123
- return (c, o) => (n(), u("div", fe, [
122
+ }, { editingItem: C, handleEdit: j, handleEditorInputRef: J, handleKeyDown: O } = ve(r);
123
+ return (c, o) => (n(), u("div", ye, [
124
124
  p("div", ke, [
125
- (n(!0), u(T, null, $(y.value, (s) => (n(), u("div", {
125
+ (n(!0), u(T, null, $(v.value, (s) => (n(), u("div", {
126
126
  key: s.id,
127
127
  class: D(["tr-history__tab", { active: g.value === s.id }]),
128
128
  onClick: (d) => _.value = s.id
129
129
  }, k(s.title), 11, ge))), 128))
130
130
  ]),
131
131
  a.searchBar ? (n(), u("div", be, [
132
- h(e(le), {
133
- modelValue: v.value,
134
- "onUpdate:modelValue": o[0] || (o[0] = (s) => v.value = s),
132
+ m(e(le), {
133
+ modelValue: f.value,
134
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => f.value = s),
135
135
  placeholder: a.searchPlaceholder || "搜索对话名称",
136
136
  "prefix-icon": e(se),
137
137
  clearable: ""
@@ -146,43 +146,43 @@ const ue = /* @__PURE__ */ V({
146
146
  p("span", null, k(s.group), 1)
147
147
  ])) : E("", !0),
148
148
  (n(!0), u(T, null, $(s.items, (d) => {
149
- var A;
149
+ var Q;
150
150
  return n(), u("div", {
151
151
  key: `${d.id}-${d.title}`,
152
152
  class: D(["tr-history__item", { selected: a.selected === d.id }]),
153
- onClick: (f) => z(d)
153
+ onClick: (y) => z(d)
154
154
  }, [
155
- ((A = e(C)) == null ? void 0 : A.id) !== d.id ? (n(), u(T, { key: 0 }, [
155
+ ((Q = e(C)) == null ? void 0 : Q.id) !== d.id ? (n(), u(T, { key: 0 }, [
156
156
  p("span", Ie, k(d.title), 1),
157
157
  d.tag ? (n(), R(e(de), te({
158
158
  key: 0,
159
159
  class: "tr-history__item-tag"
160
160
  }, { ref_for: !0 }, d.tag), null, 16)) : E("", !0),
161
161
  p("div", we, [
162
- h(e(U), {
162
+ m(e(U), {
163
163
  content: "编辑",
164
164
  effect: "dark",
165
165
  placement: "top",
166
166
  "open-delay": 500
167
167
  }, {
168
168
  default: H(() => [
169
- h(e(B), {
169
+ m(e(B), {
170
170
  icon: e(ae),
171
- onClick: S((f) => e(j)(d), ["stop"])
171
+ onClick: S((y) => e(j)(d), ["stop"])
172
172
  }, null, 8, ["icon", "onClick"])
173
173
  ]),
174
174
  _: 2
175
175
  }, 1024),
176
- h(e(U), {
176
+ m(e(U), {
177
177
  content: "删除",
178
178
  effect: "dark",
179
179
  placement: "top",
180
180
  "open-delay": 500
181
181
  }, {
182
182
  default: H(() => [
183
- h(e(B), {
183
+ m(e(B), {
184
184
  icon: e(ne),
185
- onClick: S((f) => F(d), ["stop"])
185
+ onClick: S((y) => F(d), ["stop"])
186
186
  }, null, 8, ["icon", "onClick"])
187
187
  ]),
188
188
  _: 2
@@ -190,24 +190,24 @@ const ue = /* @__PURE__ */ V({
190
190
  ])
191
191
  ], 64)) : ee((n(), u("input", {
192
192
  key: 1,
193
- "onUpdate:modelValue": o[1] || (o[1] = (f) => e(C).title = f),
193
+ "onUpdate:modelValue": o[1] || (o[1] = (y) => e(C).title = y),
194
194
  class: "tr-history__item-edit",
195
195
  ref_for: !0,
196
196
  ref: e(J),
197
197
  onKeydown: o[2] || (o[2] = //@ts-ignore
198
- (...f) => e(Q) && e(Q)(...f))
198
+ (...y) => e(O) && e(O)(...y))
199
199
  }, null, 544)), [
200
200
  [re, e(C).title]
201
201
  ])
202
202
  ], 10, Te);
203
203
  }), 128))
204
- ]))), 128)) : (n(), R(e(ve), {
204
+ ]))), 128)) : (n(), R(e(fe), {
205
205
  key: 1,
206
- text: v.value ? "暂无搜索结果" : "暂无内容"
206
+ text: f.value ? "暂无搜索结果" : "暂无内容"
207
207
  }, null, 8, ["text"]))
208
208
  ]),
209
209
  p("div", Ee, [
210
- h(e(B), {
210
+ m(e(B), {
211
211
  icon: e(ie),
212
212
  rounded: "",
213
213
  onClick: W
@@ -215,7 +215,7 @@ const ue = /* @__PURE__ */ V({
215
215
  ])
216
216
  ]));
217
217
  }
218
- }), K = /* @__PURE__ */ M($e, [["__scopeId", "data-v-8aa5fd59"]]), Be = function(i) {
218
+ }), K = /* @__PURE__ */ A($e, [["__scopeId", "data-v-8aa5fd59"]]), Be = function(i) {
219
219
  i.component("TrHistory", K);
220
220
  }, Ne = {
221
221
  ...K,