@opentiny/vue-search-box 3.28.4 → 3.29.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.
package/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import './index.css';
2
- import { defineComponent as ve, $prefix as $e, $props as ge, setup as Le } from "@opentiny/vue-common";
3
- import { TinyDropdownItem as Fe, TinyFormItem as Be, TinyCheckbox as nt, TinyCheckboxGroup as ot, TinyDatePicker as xe, TinyInput as Ae, TinyButton as ze, TinyLoading as lt, TinyTag as at, TinyDropdown as rt, TinyDropdownMenu as st, TinyTooltip as it, TinyForm as pt, TinyPopover as ut, TinySelect as ct, TinyOption as dt } from "@opentiny/vue";
4
- import { iconSearch as mt, iconClose as ft, iconHelpQuery as ht } from "@opentiny/vue-icon";
5
- import { resolveComponent as O, openBlock as y, createElementBlock as w, withDirectives as H, createVNode as M, withCtx as E, createElementVNode as D, toDisplayString as I, vShow as G, Fragment as x, renderList as U, createBlock as F, createCommentVNode as A, createTextVNode as K, resolveDirective as bt, normalizeClass as ce, withModifiers as Y, withKeys as Oe, renderSlot as ue, normalizeStyle as vt, mergeProps as he } from "vue";
6
- const gt = (e, t, n, l = "0") => {
7
- if (typeof e == "string" && typeof l == "string" && Ue(t)) {
8
- let c = e.length - t;
9
- if (c > 0)
10
- return n ? e.substr(0, t) : e.substr(c, t);
2
+ import { defineComponent as ke, $prefix as Ne, $props as we, setup as Pe } from "@opentiny/vue-common";
3
+ import { TinyDropdownItem as Ae, TinyFormItem as ze, TinyCheckbox as lt, TinyCheckboxGroup as at, TinyDatePicker as Ue, TinyInput as je, TinyButton as Ke, TinyLoading as st, TinyTag as rt, TinyDropdown as it, TinyDropdownMenu as pt, TinyTooltip as ut, TinyForm as ct, TinyPopover as dt, TinySelect as mt, TinyOption as ht } from "@opentiny/vue";
4
+ import { iconSearch as ft, iconClose as vt, iconHelpQuery as bt } from "@opentiny/vue-icon";
5
+ import { resolveComponent as x, openBlock as I, createElementBlock as M, withDirectives as Y, createVNode as D, withCtx as E, createElementVNode as S, toDisplayString as w, vShow as J, Fragment as H, renderList as z, createBlock as F, createCommentVNode as B, createTextVNode as G, resolveDirective as gt, normalizeClass as ve, normalizeStyle as oe, withModifiers as Z, withKeys as He, renderSlot as fe, mergeProps as Ie } from "vue";
6
+ const yt = (e, t, o, n = "0") => {
7
+ if (typeof e == "string" && typeof n == "string" && Ge(t)) {
8
+ let d = e.length - t;
9
+ if (d > 0)
10
+ return o ? e.substr(0, t) : e.substr(d, t);
11
11
  {
12
- const i = [];
13
- for (c = Math.abs(c) / l.length; c > 0; c--)
14
- i.push(l);
15
- const b = i.join("");
16
- return n ? e + b : b + e;
12
+ const c = [];
13
+ for (d = Math.abs(d) / n.length; d > 0; d--)
14
+ c.push(n);
15
+ const f = c.join("");
16
+ return o ? e + f : f + e;
17
17
  }
18
18
  }
19
- }, yt = Object.prototype.toString, Vt = Object.prototype.hasOwnProperty, kt = Vt.toString;
19
+ }, It = Object.prototype.toString, Vt = Object.prototype.hasOwnProperty, kt = Vt.toString;
20
20
  kt.call(Object);
21
- const It = {
21
+ const wt = {
22
22
  "[object Error]": "error",
23
23
  "[object Object]": "object",
24
24
  "[object RegExp]": "regExp",
@@ -29,13 +29,13 @@ const It = {
29
29
  "[object String]": "string",
30
30
  "[object Number]": "number",
31
31
  "[object Boolean]": "boolean"
32
- }, wt = (e) => e == null, Tt = (e) => wt(e) ? String(e) : It[yt.call(e)] || "object", Ue = (e) => typeof e == "number" && isFinite(e), St = (e) => Tt(e) === "date", je = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Dt = new RegExp(
32
+ }, Tt = (e) => e == null, St = (e) => Tt(e) ? String(e) : wt[It.call(e)] || "object", Ge = (e) => typeof e == "number" && isFinite(e), Mt = (e) => St(e) === "date", Ye = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ct = new RegExp(
33
33
  "^(\\d{4})(/|-)(((0)?[1-9])|(1[0-2]))((/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1])))?( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$"
34
- ), Ct = new RegExp(
34
+ ), Dt = new RegExp(
35
35
  "^(((0)?[1-9])|(1[0-2]))(/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1]))?(/|-)?(\\d{4})( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$"
36
- ), Mt = new RegExp(
36
+ ), Et = new RegExp(
37
37
  "^(\\d{4})-(((0)?[1-9])|(1[0-2]))-(((0)?[1-9])|([1-2][0-9])|(3[0-1]))T(((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?(Z|([+-])((0)?[0-9]|1[0-9]|20|21|22|23):?([0-5]?[0-9]))$"
38
- ), Et = {
38
+ ), $t = {
39
39
  "y{1,4}": /y{1,4}/,
40
40
  "M{1,2}": /M{1,2}/,
41
41
  "d{1,2}": /d{1,2}/,
@@ -45,7 +45,7 @@ const It = {
45
45
  "s{1,2}": /s{1,2}/,
46
46
  "S{1,3}": /S{1,3}/,
47
47
  "Z{1,1}": /Z{1,1}/
48
- }, ne = {
48
+ }, le = {
49
49
  YEAR: 9999,
50
50
  MONTH: 11,
51
51
  DATE: 31,
@@ -53,70 +53,70 @@ const It = {
53
53
  MINUTE: 59,
54
54
  SECOND: 59,
55
55
  MILLISECOND: 999
56
- }, $t = "-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00", Lt = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", _t = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", Rt = [].concat($t.split(","), Lt.split(","), _t.split(",")), Nt = (e) => {
56
+ }, Lt = "-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00", _t = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", Rt = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", Nt = [].concat(Lt.split(","), _t.split(","), Rt.split(",")), Pt = (e) => {
57
57
  const t = 0 - e.getTimezoneOffset() / 60;
58
- let n;
59
- return t === 0 ? n = "Z" : t > 0 ? n = "+" + (t > 10 ? t : "0" + t) + "00" : n = (t < -10 ? t : "-0" + -t) + "00", n;
60
- }, He = (e) => e % 400 === 0 || e % 4 === 0 && e % 100 !== 0, Ke = (e) => e > ne.MILLISECOND ? Number(String(e).substring(0, 3)) : e, _e = ({ year: e, month: t, date: n, hours: l, minutes: c, seconds: i, milliseconds: b }) => {
61
- let v = je[t];
62
- if (He(e) && t === 1 && (v += 1), n <= v)
63
- return new Date(e, t, n, l, c, i, Ke(b));
64
- }, Pt = (e) => {
58
+ let o;
59
+ return t === 0 ? o = "Z" : t > 0 ? o = "+" + (t > 10 ? t : "0" + t) + "00" : o = (t < -10 ? t : "-0" + -t) + "00", o;
60
+ }, qe = (e) => e % 400 === 0 || e % 4 === 0 && e % 100 !== 0, Ze = (e) => e > le.MILLISECOND ? Number(String(e).substring(0, 3)) : e, Oe = ({ year: e, month: t, date: o, hours: n, minutes: d, seconds: c, milliseconds: f }) => {
61
+ let b = Ye[t];
62
+ if (qe(e) && t === 1 && (b += 1), o <= b)
63
+ return new Date(e, t, o, n, d, c, Ze(f));
64
+ }, Ot = (e) => {
65
65
  if (e.length === 23) {
66
- const t = Number(e[1]), n = e[3] - 1, l = Number(e[9] || 1), c = e[15] || 0, i = e[17] || 0, b = e[20] || 0, v = e[22] || 0;
67
- return _e({
68
- date: l,
66
+ const t = Number(e[1]), o = e[3] - 1, n = Number(e[9] || 1), d = e[15] || 0, c = e[17] || 0, f = e[20] || 0, b = e[22] || 0;
67
+ return Oe({
68
+ date: n,
69
69
  year: t,
70
- hours: c,
71
- month: n,
72
- seconds: b,
73
- minutes: i,
74
- milliseconds: v
70
+ hours: d,
71
+ month: o,
72
+ seconds: f,
73
+ minutes: c,
74
+ milliseconds: b
75
75
  });
76
76
  }
77
- }, Ot = (e) => {
77
+ }, xt = (e) => {
78
78
  if (e.length === 22) {
79
- const t = Number(e[12]), n = e[1] - 1, l = Number(e[6] || 1), c = e[14] || 0, i = e[16] || 0, b = e[19] || 0, v = e[21] || 0;
80
- return _e({
79
+ const t = Number(e[12]), o = e[1] - 1, n = Number(e[6] || 1), d = e[14] || 0, c = e[16] || 0, f = e[19] || 0, b = e[21] || 0;
80
+ return Oe({
81
81
  year: t,
82
- month: n,
83
- date: l,
84
- hours: c,
85
- minutes: i,
86
- seconds: b,
87
- milliseconds: v
82
+ month: o,
83
+ date: n,
84
+ hours: d,
85
+ minutes: c,
86
+ seconds: f,
87
+ milliseconds: b
88
88
  });
89
89
  }
90
90
  }, Ft = (e) => {
91
91
  if (e.length !== 25)
92
92
  return;
93
- const t = Number(e[1]), n = e[2] - 1, l = Number(e[6]), c = new Date(t, n, l).getTimezoneOffset(), i = e[12] || 0, b = e[14] || 0, v = e[17] || 0, m = e[19] || 0;
94
- let p = e[20];
95
- const r = e[21], o = e[22] || 0, d = e[24] || 0;
96
- let u = je[n], s, a;
97
- if (He(t) && n === 1 && (u += 1), l <= u) {
98
- if (p === "Z")
99
- s = i - c / 60, a = b;
93
+ const t = Number(e[1]), o = e[2] - 1, n = Number(e[6]), d = new Date(t, o, n).getTimezoneOffset(), c = e[12] || 0, f = e[14] || 0, b = e[17] || 0, m = e[19] || 0;
94
+ let r = e[20];
95
+ const i = e[21], u = e[22] || 0, s = e[24] || 0;
96
+ let p = Ye[o], v, l;
97
+ if (qe(t) && o === 1 && (p += 1), n <= p) {
98
+ if (r === "Z")
99
+ v = c - d / 60, l = f;
100
100
  else {
101
- if (p.includes(":") || (p = p.substr(0, 3) + ":" + p.substr(3)), !Rt.includes(p))
101
+ if (r.includes(":") || (r = r.substr(0, 3) + ":" + r.substr(3)), !Nt.includes(r))
102
102
  return;
103
- s = r === "+" ? i - o - c / 60 : Number(i) + Number(o) - c / 60, a = r === "+" ? b - d : Number(b) + Number(d);
103
+ v = i === "+" ? c - u - d / 60 : Number(c) + Number(u) - d / 60, l = i === "+" ? f - s : Number(f) + Number(s);
104
104
  }
105
- return new Date(t, n, l, s, a, v, Ke(m));
105
+ return new Date(t, o, n, v, l, b, Ze(m));
106
106
  }
107
- }, Te = [
108
- [Dt, Pt],
107
+ }, Ce = [
109
108
  [Ct, Ot],
110
- [Mt, Ft]
109
+ [Dt, xt],
110
+ [Et, Ft]
111
111
  ], Bt = (e) => {
112
- for (let t = 0, n = Te.length; t < n; t++) {
113
- const l = Te[t][0].exec(e);
114
- if (l && l.length > 0)
115
- return Te[t][1](l);
112
+ for (let t = 0, o = Ce.length; t < o; t++) {
113
+ const n = Ce[t][0].exec(e);
114
+ if (n && n.length > 0)
115
+ return Ce[t][1](n);
116
116
  }
117
- }, xt = (e, t, n) => {
118
- if (n)
119
- switch (n) {
117
+ }, Ht = (e, t, o) => {
118
+ if (o)
119
+ switch (o) {
120
120
  case "yyyy":
121
121
  case "yy":
122
122
  e[0] = t;
@@ -148,57 +148,57 @@ const It = {
148
148
  break;
149
149
  }
150
150
  }, At = (e, t) => {
151
- const n = [0, -1, 0, 0, 0, 0];
151
+ const o = [0, -1, 0, 0, 0, 0];
152
152
  if (e.length !== t.length)
153
- return n;
154
- let l = 0, c = 0;
155
- for (let i = 0, b = e.length; i < b; i++) {
156
- const v = e.substr(i, 1), m = isNaN(Number(v)) || (v == null ? void 0 : v.trim()) === "";
157
- if (m && v === t.substr(i, 1) || i === b - 1) {
158
- let p, r;
153
+ return o;
154
+ let n = 0, d = 0;
155
+ for (let c = 0, f = e.length; c < f; c++) {
156
+ const b = e.substr(c, 1), m = isNaN(Number(b)) || (b == null ? void 0 : b.trim()) === "";
157
+ if (m && b === t.substr(c, 1) || c === f - 1) {
158
+ let r, i;
159
159
  if (m) {
160
- p = e.substring(l, i), l = i + 1;
161
- const o = t.indexOf(v, c);
162
- r = t.substring(c, o === -1 ? t.length : o), c = o + 1;
160
+ r = e.substring(n, c), n = c + 1;
161
+ const u = t.indexOf(b, d);
162
+ i = t.substring(d, u === -1 ? t.length : u), d = u + 1;
163
163
  } else
164
- p = e.substring(l, b), r = t.substring(c, b);
165
- (p.length === r.length || p) && xt(n, p, r);
164
+ r = e.substring(n, f), i = t.substring(d, f);
165
+ (r.length === i.length || r) && Ht(o, r, i);
166
166
  }
167
167
  }
168
- return n;
169
- }, se = (e, t, n) => isNaN(e) || e < t || e > n, zt = ({ year: e, month: t, date: n, hours: l, minutes: c, seconds: i, milliseconds: b }) => se(e, 0, ne.YEAR) || se(t, 0, ne.MONTH) || se(n, 0, ne.DATE) || se(l, 0, ne.HOUR) || se(c, 0, ne.MINUTE) || se(i, 0, ne.SECOND) || se(b, 0, ne.MILLISECOND), Ut = (e, t) => {
168
+ return o;
169
+ }, ue = (e, t, o) => isNaN(e) || e < t || e > o, zt = ({ year: e, month: t, date: o, hours: n, minutes: d, seconds: c, milliseconds: f }) => ue(e, 0, le.YEAR) || ue(t, 0, le.MONTH) || ue(o, 0, le.DATE) || ue(n, 0, le.HOUR) || ue(d, 0, le.MINUTE) || ue(c, 0, le.SECOND) || ue(f, 0, le.MILLISECOND), Ut = (e, t) => {
170
170
  if (typeof t == "string") {
171
- const n = At(e, t), l = Number(n[0]), c = Number(n[1]), i = Number(n[2] || 1), b = Number(n[3] || 0), v = Number(n[4] || 0), m = Number(n[5] || 0), p = Number(n[6] || 0);
171
+ const o = At(e, t), n = Number(o[0]), d = Number(o[1]), c = Number(o[2] || 1), f = Number(o[3] || 0), b = Number(o[4] || 0), m = Number(o[5] || 0), r = Number(o[6] || 0);
172
172
  return zt({
173
- year: l,
174
- month: c,
175
- date: i,
176
- hours: b,
177
- minutes: v,
173
+ year: n,
174
+ month: d,
175
+ date: c,
176
+ hours: f,
177
+ minutes: b,
178
178
  seconds: m,
179
- milliseconds: p
180
- }) ? void 0 : _e({
181
- year: l,
182
- date: i,
183
- month: c,
184
- minutes: v,
185
- hours: b,
186
- milliseconds: p,
179
+ milliseconds: r
180
+ }) ? void 0 : Oe({
181
+ year: n,
182
+ date: c,
183
+ month: d,
184
+ minutes: b,
185
+ hours: f,
186
+ milliseconds: r,
187
187
  seconds: m
188
188
  });
189
189
  } else
190
190
  return Bt(e);
191
- }, Ge = (e, t, n) => {
192
- let l;
193
- if (Ue(e) ? l = new Date(e) : typeof e == "string" && (l = Ut(e, t)), n) {
194
- const c = n && Ge(n) || new Date(1, 1, 1, 0, 0, 0);
195
- return l && l < c ? c : l;
191
+ }, Xe = (e, t, o) => {
192
+ let n;
193
+ if (Ge(e) ? n = new Date(e) : typeof e == "string" && (n = Ut(e, t)), o) {
194
+ const d = o && Xe(o) || new Date(1, 1, 1, 0, 0, 0);
195
+ return n && n < d ? d : n;
196
196
  }
197
- return l;
198
- }, De = function(e, t = "yyyy/MM/dd hh:mm:ss") {
199
- if (St(e)) {
197
+ return n;
198
+ }, Ee = function(e, t = "yyyy/MM/dd hh:mm:ss") {
199
+ if (Mt(e)) {
200
200
  if (typeof t == "string") {
201
- const n = {
201
+ const o = {
202
202
  "y{1,4}": e.getFullYear(),
203
203
  "M{1,2}": e.getMonth() + 1,
204
204
  "d{1,2}": e.getDate(),
@@ -207,517 +207,538 @@ const It = {
207
207
  "m{1,2}": e.getMinutes(),
208
208
  "s{1,2}": e.getSeconds(),
209
209
  "S{1,3}": e.getMilliseconds(),
210
- "Z{1,1}": Nt(e)
210
+ "Z{1,1}": Pt(e)
211
211
  };
212
- return Object.keys(n).forEach((l) => {
213
- const c = t.match(Et[l]);
214
- l && c && c.length && (t = t.replace(c[0], l === "Z{1,1}" ? n[l] : gt(n[l].toString(), c[0].length)));
212
+ return Object.keys(o).forEach((n) => {
213
+ const d = t.match($t[n]);
214
+ n && d && d.length && (t = t.replace(d[0], n === "Z{1,1}" ? o[n] : yt(o[n].toString(), d[0].length)));
215
215
  }), t;
216
216
  }
217
217
  } else if (typeof e == "string" && arguments.length >= 2) {
218
- let n = t;
219
- arguments.length === 2 ? t = void 0 : n = arguments[2];
220
- const l = Ge(e, t);
221
- return l ? De(l, n) : "";
218
+ let o = t;
219
+ arguments.length === 2 ? t = void 0 : o = arguments[2];
220
+ const n = Xe(e, t);
221
+ return n ? Ee(n, o) : "";
222
222
  }
223
- }, R = (e, t = !0) => {
223
+ }, _ = (e, t = !0) => {
224
224
  t ? e.visibleTimer = setTimeout(() => {
225
225
  e.visible = !0;
226
226
  }, 0) : (clearTimeout(e.visibleTimer), e.visibleTimer = null, e.visible = !1);
227
- }, fe = (e, t = !0) => {
227
+ }, ye = (e, t = !0) => {
228
228
  if (!e.instance)
229
229
  return;
230
230
  e.popoverVisible = t;
231
- const { dropdownRef: n } = e.instance;
232
- t && n.state.visible && (clearTimeout(Number(n.state.timeout)), n.state.timeout = null, n.state.visible = !1);
231
+ const { dropdownRef: o } = e.instance;
232
+ t && o.state.visible && (clearTimeout(Number(o.state.timeout)), o.state.timeout = null, o.state.visible = !1);
233
233
  }, jt = (e, t = 200) => {
234
- let n = null;
235
- const l = function(...c) {
236
- n && clearTimeout(n), n = setTimeout(() => {
237
- e.apply(this, c), n = null;
234
+ let o = null;
235
+ const n = function(...d) {
236
+ o && clearTimeout(o), o = setTimeout(() => {
237
+ e.apply(this, d), o = null;
238
238
  }, t);
239
239
  };
240
- return l.cancel = () => {
241
- n && (clearTimeout(n), n = null);
242
- }, l;
243
- }, te = (e) => parseFloat(e).toString() !== "NaN", oe = (e) => {
240
+ return n.cancel = () => {
241
+ o && (clearTimeout(o), o = null);
242
+ }, n;
243
+ }, ne = (e) => parseFloat(e).toString() !== "NaN", ae = (e) => {
244
244
  const t = Array.isArray(e) ? [] : {};
245
245
  if (e && typeof e == "object") {
246
- const n = Object.keys(e);
247
- if (n.length)
248
- n.forEach((l) => {
249
- e[l] && typeof e[l] == "object" ? t[l] = oe(e[l]) : t[l] = e[l];
246
+ const o = Object.keys(e);
247
+ if (o.length)
248
+ o.forEach((n) => {
249
+ e[n] && typeof e[n] == "object" ? t[n] = ae(e[n]) : t[n] = e[n];
250
250
  });
251
251
  else
252
252
  return e;
253
253
  }
254
254
  return t;
255
- }, ye = (e, t = ["mergeTag", "options", "idMapKey"]) => {
256
- const n = { ...e };
257
- return t.forEach((l) => {
258
- delete n[l];
259
- }), n;
260
- }, J = (e, t, n = "") => {
261
- const { valueMap: l, prevItem: c } = e, i = (c.label || n) + t;
262
- return l.has(i);
263
- }, Ve = (e) => {
255
+ }, Te = (e, t = ["mergeTag", "options", "idMapKey"]) => {
256
+ const o = { ...e };
257
+ return t.forEach((n) => {
258
+ delete o[n];
259
+ }), o;
260
+ }, ee = (e, t, o = "") => {
261
+ const { valueMap: n, prevItem: d } = e, c = (d.label || o) + t;
262
+ return n.has(c);
263
+ }, Se = (e) => {
264
264
  e.propItem = {}, e.inputValue = "";
265
- }, Q = ({ emit: e, state: t, nextTick: n, ...l }) => {
266
- fe(t, !1);
267
- const { tagList: c = null, index: i = -1, newTag: b = null, newValue: v = null, oldValue: m = null, isEdit: p } = l;
268
- if (p || Ve(t), !c && i === -1 && !v)
265
+ }, X = ({ emit: e, state: t, nextTick: o, ...n }) => {
266
+ ye(t, !1);
267
+ const { tagList: d = null, index: c = -1, newTag: f = null, newValue: b = null, oldValue: m = null, isEdit: r } = n;
268
+ if (r || Se(t), !d && c === -1 && !b)
269
269
  return;
270
- const r = m || oe(t.innerModelValue);
271
- let o = [];
272
- v ? o = [...v] : i !== -1 ? (o = [...t.innerModelValue], b ? o.splice(i, 1, b) : o.splice(i, 1)) : o = [...t.innerModelValue, ...c], t.innerModelValue = o, e("update:modelValue", oe(o)), e("change", oe(o), r);
273
- }, le = (e) => e, ae = (e, t, n) => {
274
- const l = t.idMapKey || e.idMapKey;
275
- return n && n[l] !== void 0 ? { [l]: n[l] } : null;
270
+ const i = m || ae(t.innerModelValue);
271
+ let u = [];
272
+ b ? u = [...b] : c !== -1 ? (u = [...t.innerModelValue], f ? u.splice(c, 1, f) : u.splice(c, 1)) : u = [...t.innerModelValue, ...d], t.innerModelValue = u, e("update:modelValue", ae(u)), e("change", ae(u), i);
273
+ }, se = (e) => e, re = (e, t, o) => {
274
+ const n = t.idMapKey || e.idMapKey;
275
+ return o && o[n] !== void 0 ? { [n]: o[n] } : null;
276
276
  };
277
- function Ht({ props: e, state: t, emit: n, nextTick: l }) {
278
- let c = oe(t.inputValue);
279
- const i = (p) => {
280
- if (p) {
281
- const r = t.recordItems.find((o) => o.label === p.label);
282
- if (r && r.options) {
283
- const o = r.options.find((d) => d.label === p.value);
284
- o && (o.isChecked = !1);
277
+ function Kt({ props: e, state: t, emit: o, nextTick: n }) {
278
+ let d = ae(t.inputValue);
279
+ const c = (r) => {
280
+ if (r) {
281
+ const i = t.recordItems.find((u) => u.label === r.label);
282
+ if (i && i.options) {
283
+ const u = i.options.find((s) => s.label === r.value);
284
+ u && (u.isChecked = !1);
285
285
  }
286
286
  }
287
287
  };
288
288
  return {
289
- deleteTag: (p) => {
290
- R(t, !1), i(p);
291
- const r = e.modelValue.filter((o) => o !== p);
292
- Q({ emit: n, state: t, nextTick: l, newValue: r });
289
+ deleteTag: (r) => {
290
+ _(t, !1), c(r);
291
+ const i = e.modelValue.filter((u) => u !== r);
292
+ X({ emit: o, state: t, nextTick: n, newValue: i });
293
293
  },
294
294
  clearTag: () => {
295
- R(t, !1), e.modelValue.forEach((p) => i(p)), t.propItem = {}, t.inputValue = "", Q({ emit: n, state: t, nextTick: l, newValue: [] }), n("clear");
295
+ _(t, !1), e.modelValue.forEach((r) => c(r)), t.propItem = {}, t.inputValue = "", X({ emit: o, state: t, nextTick: n, newValue: [] }), o("clear");
296
296
  },
297
297
  backspaceDeleteTag: () => {
298
- var p, r, o;
298
+ var r, i, u;
299
299
  if (!t.inputValue) {
300
300
  if (t.propItem.label) {
301
301
  t.propItem = {};
302
302
  return;
303
303
  }
304
- if (c === "" && t.inputValue === "") {
305
- R(t, !1);
306
- const d = e.modelValue.length - 1;
307
- i(e.modelValue[d]);
308
- const u = t.innerModelValue.slice(0, e.modelValue.length - 1);
309
- Q({ emit: n, state: t, nextTick: l, newValue: u });
304
+ if (d === "" && t.inputValue === "") {
305
+ _(t, !1);
306
+ const s = e.modelValue.length - 1;
307
+ c(e.modelValue[s]);
308
+ const p = t.innerModelValue.slice(0, e.modelValue.length - 1);
309
+ X({ emit: o, state: t, nextTick: n, newValue: p });
310
310
  }
311
- c = t.inputValue, (o = (r = (p = t == null ? void 0 : t.instance) == null ? void 0 : p.refs) == null ? void 0 : r.inputRef) != null && o.$el && t.instance.refs.inputRef.$el.click();
311
+ d = t.inputValue, (u = (i = (r = t == null ? void 0 : t.instance) == null ? void 0 : r.refs) == null ? void 0 : i.inputRef) != null && u.$el && t.instance.refs.inputRef.$el.click();
312
312
  }
313
313
  }
314
314
  };
315
315
  }
316
- const Kt = async (e, t, n) => {
317
- const { prevItem: l, inputEditValue: c } = t, { operators: i } = l, b = ye(l);
318
- let v = null, m = !0;
319
- if (await e.$refs.formRef.validateField(["inputEditValue"], (p) => {
320
- p && (m = !1);
316
+ const Gt = async (e, t, o) => {
317
+ const { prevItem: n, inputEditValue: d } = t, { operators: c } = n, f = Te(n);
318
+ let b = null, m = !0;
319
+ if (await e.$refs.formRef.validateField(["inputEditValue"], (r) => {
320
+ r && (m = !1);
321
321
  }), m) {
322
- let p = null;
323
- const r = t.operatorValue && i ? { operator: t.operatorValue } : null;
324
- let o = c;
325
- const d = {};
326
- if (Array.isArray(c))
327
- d.options = [], o = "", c.forEach((u) => {
328
- const s = t.currentEditValue.find((h) => h.label === u), a = (s == null ? void 0 : s.label) || u;
329
- if (o = o ? `${o} | ${a}` : a, s) {
330
- const h = ae(n, l, s);
331
- d.options.push({ label: a, ...h });
322
+ let r = null;
323
+ const i = t.operatorValue && c ? { operator: t.operatorValue } : null;
324
+ let u = d;
325
+ const s = {};
326
+ if (Array.isArray(d))
327
+ s.options = [], u = "", d.forEach((p) => {
328
+ const v = t.currentEditValue.find((h) => h.label === p), l = (v == null ? void 0 : v.label) || p;
329
+ if (u = u ? `${u} | ${l}` : l, v) {
330
+ const h = re(o, n, v);
331
+ s.options.push({ label: l, ...h });
332
332
  } else
333
- d.options.push({ label: a });
333
+ s.options.push({ label: l });
334
334
  });
335
335
  else if (Array.isArray(t.currentEditValue)) {
336
- const u = t.currentEditValue.find((s) => s.label === o);
337
- p = ae(n, l, u);
336
+ const p = t.currentEditValue.find((v) => v.label === u);
337
+ r = re(o, n, p);
338
338
  }
339
- v = le({ ...b, label: t.selectValue, ...r, value: o, ...p, ...d });
339
+ b = se({ ...f, label: t.selectValue, ...i, value: u, ...r, ...s });
340
340
  }
341
- return v;
342
- }, qe = async (e, t, n) => {
343
- const { prevItem: l } = t, c = `min${l.field}`, i = `max${l.field}`, b = t[c], v = t[i], m = [c, i];
344
- let p = !0, r = null;
345
- if (await e.$refs.formRef.validateField(m, (o) => {
346
- o && (p = !1);
347
- }), p) {
348
- const { field: o, label: d, unit: u, type: s, operators: a } = l, h = u ? `${d}(${u})` : d;
341
+ return b;
342
+ }, Qe = async (e, t, o) => {
343
+ const { prevItem: n } = t, d = `min${n.field}`, c = `max${n.field}`, f = t[d], b = t[c], m = [d, c];
344
+ let r = !0, i = null;
345
+ if (await e.$refs.formRef.validateField(m, (u) => {
346
+ u && (r = !1);
347
+ }), r) {
348
+ const { field: u, label: s, unit: p, type: v, operators: l } = n, h = p ? `${s}(${p})` : s;
349
349
  let g = "";
350
- b && v ? g = `${b}-${v}` : g = b ? `≥${b}` : `≤${v}`;
351
- const S = ae(n, l, l), _ = t.operatorValue && a ? { operator: t.operatorValue } : null;
352
- r = le({ type: s, field: o, label: h, value: g, ...S, start: b, end: v, ..._ });
350
+ f && b ? g = `${f}-${b}` : g = f ? `≥${f}` : `≤${b}`;
351
+ const T = re(o, n, n), $ = t.operatorValue && l ? { operator: t.operatorValue } : null;
352
+ i = se({ type: v, field: u, label: h, value: g, ...T, start: f, end: b, ...$ });
353
353
  }
354
- return r;
355
- }, Ce = async (e, t, n, l) => {
356
- const { prevItem: c, startDate: i, endDate: b, startDateTime: v, endDateTime: m } = t;
357
- let p = null, r = null, o = !0, d = null, u = null;
358
- if (l ? (p = v, r = m, u = ["startDateTime", "endDateTime"]) : (p = i, r = b, u = ["startDate", "endDate"]), await e.$refs.formRef.validateField(u, (s) => {
359
- s && (o = !1);
360
- }), o) {
361
- const { operators: s } = c, a = ye(c);
354
+ return i;
355
+ }, $e = async (e, t, o, n) => {
356
+ const { prevItem: d, startDate: c, endDate: f, startDateTime: b, endDateTime: m } = t;
357
+ let r = null, i = null, u = !0, s = null, p = null;
358
+ if (n ? (r = b, i = m, p = ["startDateTime", "endDateTime"]) : (r = c, i = f, p = ["startDate", "endDate"]), await e.$refs.formRef.validateField(p, (v) => {
359
+ v && (u = !1);
360
+ }), u) {
361
+ const { operators: v } = d, l = Te(d);
362
362
  let h = "";
363
- if (p && r) {
364
- if (p > r)
363
+ if (r && i) {
364
+ if (r > i)
365
365
  return;
366
- p === r ? h = p : h = `${p}-${r}`;
366
+ r === i ? h = r : h = `${r}-${i}`;
367
367
  } else
368
- h = p ? `≥${p}` : `≤${r}`;
369
- const g = ae(n, c, c), S = t.operatorValue && s ? { operator: t.operatorValue } : null;
370
- d = le({ ...a, value: h, start: p, end: r, ...g, ...S });
368
+ h = r ? `≥${r}` : `≤${i}`;
369
+ const g = re(o, d, d), T = t.operatorValue && v ? { operator: t.operatorValue } : null;
370
+ s = se({ ...l, value: h, start: r, end: i, ...g, ...T });
371
371
  }
372
- return d;
373
- }, Ze = (e, t, n) => {
374
- const { prevItem: l } = e, { field: c, start: i, end: b, min: v = l.min, max: m = l.max } = t, p = `min${c}`, r = `max${c}`;
375
- (e.curMinNumVar !== p || e.curMaxNumVar !== r) && (delete e[e.curMinNumVar], delete e[e.curMaxNumVar], delete e.formRules[e.curMinNumVar], delete e.formRules[e.curMaxNumVar], e.curMinNumVar = p, e.curMaxNumVar = r), e[e.curMinNumVar] = i, e[e.curMaxNumVar] = b;
376
- const { curMinNumVar: o, curMaxNumVar: d } = e, u = te(v), s = te(m);
377
- u || s ? (e.formRules[o] = {
378
- validator: (a, h, g) => {
379
- const S = te(h);
380
- !S && te(e[d]) || S && (u && !s && h >= v || !u && s && h <= m || h >= v && h <= m) ? g() : (e.numberShowMessage = !!(h || e[d]), g(new Error(n("tvp.tvpSearchbox.rangeMinErr", [v, m]))));
372
+ return s;
373
+ }, We = (e, t, o) => {
374
+ const { prevItem: n } = e, { field: d, start: c, end: f, min: b = n.min, max: m = n.max } = t, r = `min${d}`, i = `max${d}`;
375
+ (e.curMinNumVar !== r || e.curMaxNumVar !== i) && (delete e[e.curMinNumVar], delete e[e.curMaxNumVar], delete e.formRules[e.curMinNumVar], delete e.formRules[e.curMaxNumVar], e.curMinNumVar = r, e.curMaxNumVar = i), e[e.curMinNumVar] = c, e[e.curMaxNumVar] = f;
376
+ const { curMinNumVar: u, curMaxNumVar: s } = e, p = ne(b), v = ne(m);
377
+ p || v ? (e.formRules[u] = {
378
+ validator: (l, h, g) => {
379
+ const T = ne(h);
380
+ !T && ne(e[s]) || T && (p && !v && h >= b || !p && v && h <= m || h >= b && h <= m) ? g() : (e.numberShowMessage = !!(h || e[s]), g(new Error(o("tvp.tvpSearchbox.rangeMinErr", [b, m]))));
381
381
  }
382
- }, e.formRules[d] = {
383
- validator: (a, h, g) => {
384
- const S = te(e[o]), _ = S && v < e[o] ? Number(e[o]) : v, V = te(_), f = te(h);
385
- !f && S || f && (V && !s && h >= _ || !V && s && h <= m || h >= _ && h <= m) ? g() : g(!f && !S ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
382
+ }, e.formRules[s] = {
383
+ validator: (l, h, g) => {
384
+ const T = ne(e[u]), $ = T && b < e[u] ? Number(e[u]) : b, y = ne($), a = ne(h);
385
+ !a && T || a && (y && !v && h >= $ || !y && v && h <= m || h >= $ && h <= m) ? g() : g(!a && !T ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
386
386
  }
387
- }) : e.formRules[d] = {
388
- validator: (a, h, g) => {
389
- const S = e[o], _ = te(h), V = te(S);
390
- _ && !V || !_ && V || _ && V && h >= Number(S) ? g() : g(!_ && !V ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
387
+ }) : e.formRules[s] = {
388
+ validator: (l, h, g) => {
389
+ const T = e[u], $ = ne(h), y = ne(T);
390
+ $ && !y || !$ && y || $ && y && h >= Number(T) ? g() : g(!$ && !y ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
391
391
  }
392
392
  };
393
393
  };
394
- function Gt({ props: e, emit: t, state: n, t: l, format: c, nextTick: i, vm: b, cancelHandleInput: v }) {
395
- const m = b || n.instance, p = (V) => {
396
- var $, C, N;
397
- const { start: f, end: T, type: k } = V;
398
- if (n.backupList = V.options, k === "numRange")
399
- Ze(n, V, l);
394
+ function Yt({ props: e, emit: t, state: o, t: n, format: d, nextTick: c, vm: f, cancelHandleInput: b }) {
395
+ const m = f || o.instance, r = (y) => {
396
+ var L, C, P;
397
+ const { start: a, end: V, type: k } = y;
398
+ if (o.backupList = y.options, k === "numRange")
399
+ We(o, y, n);
400
400
  else if (k === "dateRange") {
401
- const { dateRangeFormat: L } = n;
402
- if (!n.startDate && f) {
403
- const P = c(f, L);
404
- n.startDate = n.endDate < P ? null : P;
401
+ const { dateRangeFormat: R } = o;
402
+ if (!o.startDate && a) {
403
+ const N = d(a, R);
404
+ o.startDate = o.endDate < N ? null : N;
405
405
  }
406
- if (!n.endDate && T) {
407
- const P = c(T, L);
408
- n.endDate = P < n.startDate ? null : P;
406
+ if (!o.endDate && V) {
407
+ const N = d(V, R);
408
+ o.endDate = N < o.startDate ? null : N;
409
409
  }
410
410
  } else if (k === "datetimeRange") {
411
- const { datetimeRangeFormat: L } = n;
412
- if (!n.startDateTime && f) {
413
- const P = c(f, L);
414
- n.startDateTime = n.endDateTime < P ? null : P;
411
+ const { datetimeRangeFormat: R } = o;
412
+ if (!o.startDateTime && a) {
413
+ const N = d(a, R);
414
+ o.startDateTime = o.endDateTime < N ? null : N;
415
415
  }
416
- if (!n.endDateTime && T) {
417
- const P = c(T, L);
418
- n.endDateTime = P < n.startDateTime ? null : P;
416
+ if (!o.endDateTime && V) {
417
+ const N = d(V, R);
418
+ o.endDateTime = N < o.startDateTime ? null : N;
419
419
  }
420
420
  } else
421
- n.backupList && k === "checkbox" && (n.filterList = n.backupList, n.checkboxGroup = [], ($ = n.backupList) == null || $.forEach((L) => {
422
- J(n, L.label) && n.checkboxGroup.push(`${V.label}${L.label}`), L.isFilter = !1;
421
+ o.backupList && k === "checkbox" && (o.filterList = o.backupList, o.checkboxGroup = [], (L = o.backupList) == null || L.forEach((R) => {
422
+ ee(o, R.label) && o.checkboxGroup.push(`${y.label}${R.label}`), R.isFilter = !1;
423
423
  }));
424
- k !== "checkbox" && ((C = n.backupList) != null && C.length) && ((N = n.backupList) == null || N.forEach((L) => {
425
- L.isFilter = !1, L.isChecked = J(n, L.label);
426
- })), n.currentOperators = null, !n.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(k) ? R(n, !1) : R(n);
427
- }, r = (V) => {
424
+ k !== "checkbox" && ((C = o.backupList) != null && C.length) && ((P = o.backupList) == null || P.forEach((R) => {
425
+ R.isFilter = !1, R.isChecked = ee(o, R.label);
426
+ })), o.currentOperators = null, !o.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(k) ? _(o, !1) : _(o);
427
+ }, i = (y) => {
428
428
  var C;
429
- const { field: f, label: T } = V;
430
- n.propItem = { ...n.propItem, label: T }, t("first-level-select", f);
429
+ const { field: a, label: V } = y;
430
+ o.propItem = { ...o.propItem, label: V }, t("first-level-select", a);
431
431
  const k = (C = m.$refs) == null ? void 0 : C.inputRef;
432
- n.prevItem = V, n.backupPrevItem = V;
433
- const { operators: $ } = V;
434
- $ != null && $.length ? (n.operatorValue = "", n.currentOperators = $, R(n)) : (n.operatorValue = ":", p(V)), n.inputValue = "", k.focus();
435
- }, o = (V) => {
436
- n.operatorValue = V, p(n.prevItem);
437
- }, d = (V, f, T, k) => {
438
- const { replace: $, operators: C, mergeTag: N } = V, L = ye(V), { indexMap: P } = n, B = P.get(T), z = ae(e, V, f), ee = n.operatorValue && C ? { operator: n.operatorValue } : null;
439
- let W = null;
440
- if (N) {
441
- const re = { label: k, ...z };
442
- if (B >= 0) {
443
- const ke = `${n.innerModelValue[B].value} | ${k}`, Ie = [...n.innerModelValue[B].options, re];
444
- W = le({ ...n.innerModelValue[B], value: ke, options: Ie });
432
+ if (o.prevItem = y, o.backupPrevItem = y, y.type === "noValue") {
433
+ o.operatorValue = ":", s(y, y, V, "");
434
+ return;
435
+ }
436
+ const { operators: L } = y;
437
+ L != null && L.length ? (o.operatorValue = "", o.currentOperators = L, _(o)) : (o.operatorValue = ":", r(y)), o.inputValue = "", k.focus();
438
+ }, u = (y) => {
439
+ o.operatorValue = y, r(o.prevItem);
440
+ }, s = (y, a, V, k) => {
441
+ const { replace: L, operators: C, mergeTag: P } = y, R = Te(y), { indexMap: N } = o, A = N.get(V), O = re(e, y, a), j = o.operatorValue && C ? { operator: o.operatorValue } : null;
442
+ let Q = null;
443
+ if (P) {
444
+ const W = { label: k, ...O };
445
+ if (A >= 0) {
446
+ const pe = `${o.innerModelValue[A].value} | ${k}`, de = [...o.innerModelValue[A].options, W];
447
+ Q = se({ ...o.innerModelValue[A], value: pe, options: de });
445
448
  } else
446
- W = le({ ...L, label: T, value: k, options: [re] });
449
+ Q = se({ ...R, label: V, value: k, options: [W] });
447
450
  } else
448
- W = le({ ...L, label: T, value: k, ...z, ...ee });
449
- if (J(n, k, T)) {
450
- Ve(n);
451
+ Q = se({ ...R, label: V, value: k, ...O, ...j });
452
+ if (ee(o, k, V)) {
453
+ Se(o);
451
454
  return;
452
455
  }
453
- R(n, !1);
454
- const Z = oe(n.innerModelValue);
455
- let X = [];
456
- if (($ || N) && B >= 0) {
457
- const re = [...n.innerModelValue];
458
- re.splice(B, 1), X = [...re, W];
456
+ _(o, !1);
457
+ const ce = ae(o.innerModelValue);
458
+ let ie = [];
459
+ if ((L || P) && A >= 0) {
460
+ const W = [...o.innerModelValue];
461
+ W.splice(A, 1), ie = [...W, Q];
459
462
  } else
460
- X = [...n.innerModelValue, W];
461
- Q({ emit: t, state: n, nextTick: i, newValue: X, oldValue: Z });
462
- }, u = (V) => {
463
- var f;
464
- (f = n.propItem) != null && f.label ? s({ label: V }) : S();
465
- }, s = (V, f = !1) => {
463
+ ie = [...o.innerModelValue, Q];
464
+ X({ emit: t, state: o, nextTick: c, newValue: ie, oldValue: ce });
465
+ }, p = (y) => {
466
+ var a;
467
+ (a = o.propItem) != null && a.label ? v({ label: y }) : T();
468
+ }, v = (y, a = !1) => {
466
469
  var C;
467
- R(n, !1), f && (n.prevItem = V, n.backupPrevItem = V);
468
- const { prevItem: T } = n, k = V.value || V.label, $ = (C = m.$refs) == null ? void 0 : C.inputRef;
469
- if (!J(n, k)) {
470
- const N = n.propItem.label || V.label;
471
- d(T, V, N, k);
470
+ _(o, !1), a && (o.prevItem = y, o.backupPrevItem = y);
471
+ const { prevItem: V } = o, k = y.value || y.label, L = (C = m.$refs) == null ? void 0 : C.inputRef;
472
+ if (!ee(o, k)) {
473
+ const P = o.propItem.label || y.label;
474
+ s(V, y, P, k);
472
475
  }
473
- $.focus();
474
- }, a = (V, f) => {
475
- if (V.label) {
476
- if (t("second-level-enter", f), !f.options || !f.options.length)
476
+ L.focus();
477
+ }, l = (y, a) => {
478
+ if (y.label) {
479
+ if (t("second-level-enter", a), !a.options || !a.options.length)
477
480
  return;
478
- const T = f.options[0];
479
- if (!T)
481
+ const V = a.options[0];
482
+ if (!V)
480
483
  return;
481
- if (!e.modelValue.find(($) => $.value === T.label)) {
482
- const $ = f.label, C = T.label;
483
- d(f, T, $, C);
484
+ if (!e.modelValue.find((L) => L.value === V.label)) {
485
+ const L = a.label, C = V.label;
486
+ s(a, V, L, C);
484
487
  return;
485
488
  }
486
489
  } else
487
- t("search", n.innerModelValue);
488
- }, h = (V, f, T) => {
489
- var $;
490
- const k = ($ = n.backupList) == null ? void 0 : $.find((C) => C.label === T);
491
- d(V, k, f.label, T);
492
- }, g = (V, f, T) => {
493
- var k, $;
494
- if (f.label) {
495
- const { regexp: C, replace: N, type: L, mergeTag: P } = T, B = L !== "checkbox" && N || L === "checkbox" && P ? [V] : V.split(e.splitInputValue);
496
- if (C)
497
- for (const z of B)
498
- C.test(z) && h(T, f, z);
499
- else
500
- for (const z of B)
501
- h(T, f, z);
490
+ t("search", o.innerModelValue);
491
+ }, h = (y, a, V) => {
492
+ var L;
493
+ const k = (L = o.backupList) == null ? void 0 : L.find((C) => C.label === V);
494
+ s(y, k, a.label, V);
495
+ }, g = (y, a, V) => {
496
+ var k, L;
497
+ if (a.label) {
498
+ const { regexp: C, replace: P, type: R, mergeTag: N } = V, A = R !== "checkbox" && P || R === "checkbox" && N ? [y] : y.split(e.splitInputValue);
499
+ if (C) {
500
+ const O = [];
501
+ for (const j of A)
502
+ C.test(j) ? h(V, a, j) : O.push(j);
503
+ O.length > 0 && t("validate-error", {
504
+ invalidValues: O,
505
+ field: V.field,
506
+ label: V.label,
507
+ regexp: C.toString()
508
+ });
509
+ } else
510
+ for (const O of A)
511
+ h(V, a, O);
502
512
  } else {
503
- const { items: C, defaultField: N } = e, L = C.find((Z) => {
504
- const { regexp: X } = Z;
505
- return X && X.test(n.inputValue);
506
- }) || (N ? C.find((Z) => Z.field === N) : n.allTypeAttri), { replace: P, type: B, mergeTag: z } = L, ee = B !== "checkbox" && P || B === "checkbox" && z ? [V] : V.split(e.splitInputValue);
507
- (k = L == null ? void 0 : L.options) != null && k.length && (n.backupList = [...L.options], ($ = n.backupList) == null || $.forEach((Z) => {
508
- const X = Z.value || Z.label;
509
- ee.includes(X) && (Z.isChecked = !0);
513
+ const { items: C, defaultField: P, defaultFieldReplace: R } = e, N = C.find((K) => {
514
+ const { regexp: te } = K;
515
+ return te && te.test(o.inputValue);
516
+ }), A = P ? C.find((K) => K.field === P) : o.allTypeAttri, O = N || A, j = !N && R ? { ...O, replace: !0 } : O, { replace: Q, type: ce, mergeTag: ie, regexp: W } = j, pe = ce !== "checkbox" && Q || ce === "checkbox" && ie ? [y] : y.split(e.splitInputValue);
517
+ (k = O == null ? void 0 : O.options) != null && k.length && (o.backupList = [...O.options], (L = o.backupList) == null || L.forEach((K) => {
518
+ const te = K.value || K.label;
519
+ pe.includes(te) && (K.isChecked = !0);
510
520
  }));
511
- const W = L.label;
512
- for (const Z of ee)
513
- d(L, {}, W, Z);
521
+ const de = O.label;
522
+ if (W) {
523
+ const K = [];
524
+ for (const te of pe)
525
+ W.test(te) ? s(j, {}, de, te) : K.push(te);
526
+ K.length > 0 && t("validate-error", {
527
+ invalidValues: K,
528
+ field: j.field,
529
+ label: j.label,
530
+ regexp: W.toString()
531
+ });
532
+ } else
533
+ for (const K of pe)
534
+ s(j, {}, de, K);
514
535
  }
515
- }, S = () => {
516
- const { inputValue: V, propItem: f, prevItem: T } = n;
517
- if (v && v(), R(n, !1), !V)
518
- a(f, T);
536
+ }, T = () => {
537
+ const { inputValue: y, propItem: a, prevItem: V } = o;
538
+ if (b && b(), _(o, !1), !y)
539
+ l(a, V);
519
540
  else {
520
541
  const { maxlength: k } = e;
521
- if (k && k < V.length) {
542
+ if (k && k < y.length) {
522
543
  t("exceed", k);
523
544
  return;
524
545
  }
525
- g(V, f, T);
546
+ g(y, a, V);
526
547
  }
527
548
  };
528
- return { selectPropItem: r, selectRadioItem: s, selectInputValue: u, createTag: S, helpClick: () => {
549
+ return { selectPropItem: i, selectRadioItem: v, selectInputValue: p, createTag: T, helpClick: () => {
529
550
  t("help");
530
- }, setOperator: o };
551
+ }, setOperator: u };
531
552
  }
532
- const qt = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Se = (e, t) => {
533
- const n = [];
534
- let l = 0, c;
535
- for (; (c = e.exec(t)) !== null; ) {
536
- const i = c.index, b = e.lastIndex;
537
- i > l && n.push(t.slice(l, i)), n.push(t.slice(i, b)), l = b;
553
+ const qt = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), De = (e, t) => {
554
+ const o = [];
555
+ let n = 0, d;
556
+ for (; (d = e.exec(t)) !== null; ) {
557
+ const c = d.index, f = e.lastIndex;
558
+ c > n && o.push(t.slice(n, c)), o.push(t.slice(c, f)), n = f;
538
559
  }
539
- return l < t.length && n.push(t.slice(l)), n;
560
+ return n < t.length && o.push(t.slice(n)), o;
540
561
  };
541
- function Zt({ props: e, state: t, emit: n, nextTick: l }) {
542
- const c = async (r) => {
543
- t.potentialOptions = await e.potentialOptions.getMatchList(r), R(t, !0);
544
- }, b = jt((r) => {
545
- var f, T, k, $;
546
- const { recordItems: o, propItem: d } = t, u = typeof r == "string" ? r : r && r.target && typeof r.target.value == "string" ? r.target.value : t.inputValue || "", s = (f = String(u)) == null ? void 0 : f.trim(), { maxlength: a } = e;
547
- if (a && a < s.length) {
548
- n("exceed", a);
562
+ function Zt({ props: e, state: t, emit: o, nextTick: n }) {
563
+ const d = async (i) => {
564
+ t.potentialOptions = await e.potentialOptions.getMatchList(i), _(t, !0);
565
+ }, f = jt((i) => {
566
+ var a, V, k, L;
567
+ const { recordItems: u, propItem: s } = t, p = typeof i == "string" ? i : i && i.target && typeof i.target.value == "string" ? i.target.value : t.inputValue || "", v = (a = String(p)) == null ? void 0 : a.trim(), { maxlength: l } = e;
568
+ if (l && l < v.length) {
569
+ o("exceed", l);
549
570
  return;
550
571
  }
551
- if (s.length === 0) {
552
- R(t);
572
+ if (v.length === 0) {
573
+ _(t);
553
574
  return;
554
575
  }
555
576
  Object.keys(t.matchItems).forEach((C) => {
556
577
  t.matchItems[C].attr = [], t.matchItems[C].attrValue = [];
557
578
  });
558
- const h = qt(s), g = new RegExp(h, "i"), S = d.label || !h ? null : o.find((C) => C.type === "map" && g.test(C.label));
559
- if (S) {
560
- t.propItem = { ...t.propItem, label: S.label }, t.inputValue = "", t.prevItem = S, t.backupPrevItem = S, t.backupList = S.options || [];
579
+ const h = qt(v), g = new RegExp(h, "i"), T = s.label || !h ? null : u.find((C) => C.type === "map" && g.test(C.label));
580
+ if (T) {
581
+ t.propItem = { ...t.propItem, label: T.label }, t.inputValue = "", t.prevItem = T, t.backupPrevItem = T, t.backupList = T.options || [];
561
582
  return;
562
583
  }
563
- t.filterList = (T = t.backupList) == null ? void 0 : T.filter((C) => g.test(C.label) ? (delete C.isFilter, J(t, C.label) && t.checkboxGroup.push(`${t.prevItem.label}${C.label}`), !0) : (C.isFilter = !0, !1));
564
- const _ = new RegExp(h, "ig"), V = s.toLowerCase();
584
+ t.filterList = (V = t.backupList) == null ? void 0 : V.filter((C) => g.test(C.label) ? (delete C.isFilter, ee(t, C.label) && t.checkboxGroup.push(`${t.prevItem.label}${C.label}`), !0) : (C.isFilter = !0, !1));
585
+ const $ = new RegExp(h, "ig"), y = v.toLowerCase();
565
586
  if (t.propItem.label) {
566
587
  (k = t.backupList) == null || k.forEach((C) => {
567
- C.hightlighStr = V;
568
- const N = C.label;
569
- g.test(N) ? (C.match = Se(_, N), C.isFilter = !1) : C.isFilter = !0;
570
- }), ($ = t.backupList) != null && $.length || s ? R(t) : R(t, !1);
588
+ C.hightlighStr = y;
589
+ const P = C.label;
590
+ g.test(P) ? (C.match = De($, P), C.isFilter = !1) : C.isFilter = !0;
591
+ }), (L = t.backupList) != null && L.length || v ? _(t) : _(t, !1);
571
592
  return;
572
593
  }
573
- for (const C of o) {
574
- const { options: N = [], groupKey: L = "0", ...P } = C, B = P.label;
575
- if (g.test(B)) {
576
- const z = Se(_, B);
577
- t.matchItems[L].attr.push({ ...C, match: z, hightlighStr: V });
594
+ for (const C of u) {
595
+ const { options: P = [], groupKey: R = "0", ...N } = C, A = N.label;
596
+ if (g.test(A)) {
597
+ const O = De($, A);
598
+ t.matchItems[R].attr.push({ ...C, match: O, hightlighStr: y });
578
599
  }
579
- for (const z of N) {
580
- const ee = t.propItem.label ? B : `${B}:${z.label}`;
581
- if (g.test(ee)) {
582
- const W = Se(_, ee);
583
- t.matchItems[L].attrValue.push({
584
- ...z,
585
- ...P,
586
- options: N,
587
- hightlighStr: V,
588
- value: z.label,
589
- match: W
600
+ for (const O of P) {
601
+ const j = t.propItem.label ? A : `${A}:${O.label}`;
602
+ if (g.test(j)) {
603
+ const Q = De($, j);
604
+ t.matchItems[R].attrValue.push({
605
+ ...O,
606
+ ...N,
607
+ options: P,
608
+ hightlighStr: y,
609
+ value: O.label,
610
+ match: Q
590
611
  });
591
612
  }
592
613
  }
593
614
  }
594
- h && e.potentialOptions && e.potentialOptions.getMatchList ? c(h) : R(t);
595
- }, 500), v = () => {
596
- b.cancel && b.cancel();
615
+ h && e.potentialOptions && e.potentialOptions.getMatchList ? d(h) : _(t);
616
+ }, 500), b = () => {
617
+ f.cancel && f.cancel();
597
618
  }, m = () => {
598
- var r;
599
- (r = t.backupList) == null || r.forEach((o) => o.isFilter && delete o.isFilter);
619
+ var i;
620
+ (i = t.backupList) == null || i.forEach((u) => u.isFilter && delete u.isFilter);
600
621
  };
601
622
  return {
602
- handleInput: b,
603
- selectFirstMap: (r, o) => {
604
- var a;
605
- const { options: d } = r, { prevItem: u, propItem: s } = t;
606
- if (d)
607
- R(t, !1), t.propItem = { ...t.propItem, value: `${r.label}=` }, t.isShowTagKey = !1, t.inputValue = "", t.backupList = r.options || [], m(), (a = t.backupList) == null || a.forEach((h) => {
608
- const g = s.value + h.label;
609
- h.isChecked = J(t, g);
623
+ handleInput: f,
624
+ selectFirstMap: (i, u) => {
625
+ var l;
626
+ const { options: s } = i, { prevItem: p, propItem: v } = t;
627
+ if (s)
628
+ _(t, !1), t.propItem = { ...t.propItem, value: `${i.label}=` }, t.isShowTagKey = !1, t.inputValue = "", t.backupList = i.options || [], m(), (l = t.backupList) == null || l.forEach((h) => {
629
+ const g = v.value + h.label;
630
+ h.isChecked = ee(t, g);
610
631
  });
611
632
  else {
612
- if (r.isChecked)
633
+ if (i.isChecked)
613
634
  return;
614
- R(t, !1), t.isShowTagKey = !0, m();
615
- const { field: h, type: g } = u, S = s.value + r.label, _ = ae(e, u, r), f = [le({ type: g, field: h, label: s.label, value: S, ..._ })];
616
- Q({ emit: n, state: t, nextTick: l, tagList: f });
635
+ _(t, !1), t.isShowTagKey = !0, m();
636
+ const { field: h, type: g } = p, T = v.value + i.label, $ = re(e, p, i), a = [se({ type: g, field: h, label: v.label, value: T, ...$ })];
637
+ X({ emit: o, state: t, nextTick: n, tagList: a });
617
638
  }
618
- o && R(t);
639
+ u && _(t);
619
640
  },
620
- cancelHandleInput: v
641
+ cancelHandleInput: b
621
642
  };
622
643
  }
623
- function Yt({ props: e, state: t, emit: n, nextTick: l }) {
644
+ function Xt({ props: e, state: t, emit: o, nextTick: n }) {
624
645
  return {
625
- selectCheckbox: (i) => {
626
- var r, o;
627
- R(t, !1);
628
- const { checkboxGroup: b, prevItem: v, propItem: m } = t, p = ye(v);
629
- if (i) {
630
- const d = [], u = oe(t.innerModelValue), { mergeTag: s, operators: a, label: h } = v;
631
- if (s) {
646
+ selectCheckbox: (c) => {
647
+ var i, u;
648
+ _(t, !1);
649
+ const { checkboxGroup: f, prevItem: b, propItem: m } = t, r = Te(b);
650
+ if (c) {
651
+ const s = [], p = ae(t.innerModelValue), { mergeTag: v, operators: l, label: h } = b;
652
+ if (v) {
632
653
  let g = "";
633
- const S = [], { indexMap: _ } = t, V = _.get(h);
634
- if (V !== void 0 && t.innerModelValue.splice(V, 1), (r = t.backupList) == null || r.forEach((f) => {
635
- const { label: T } = f, k = `${h}${T}`;
636
- if (b.includes(k)) {
637
- delete f.isFilter;
638
- const C = ae(e, v, f), N = { label: f.label, ...C };
639
- g += g ? ` | ${T}` : T, S.push(N);
654
+ const T = [], { indexMap: $ } = t, y = $.get(h);
655
+ if (y !== void 0 && t.innerModelValue.splice(y, 1), (i = t.backupList) == null || i.forEach((a) => {
656
+ const { label: V } = a, k = `${h}${V}`;
657
+ if (f.includes(k)) {
658
+ delete a.isFilter;
659
+ const C = re(e, b, a), P = { label: a.label, ...C };
660
+ g += g ? ` | ${V}` : V, T.push(P);
640
661
  }
641
- }), S.length > 0) {
642
- const f = { ...p, value: g, options: S };
643
- d.push(f);
662
+ }), T.length > 0) {
663
+ const a = { ...r, value: g, options: T };
664
+ s.push(a);
644
665
  }
645
666
  } else {
646
- const { valueMap: g } = t, S = [];
647
- if ((o = t.backupList) == null || o.forEach((_) => {
648
- const { label: V } = _, f = `${h}${V}`, T = b.includes(f);
649
- if (T && !J(t, V)) {
650
- const k = ae(e, v, _), $ = t.operatorValue && a ? { operator: t.operatorValue } : null, C = le({ ...p, label: m.label, value: V, ...k, ...$ });
651
- d.push(C), _.isChecked = !0;
652
- } else if (!T && J(t, V)) {
653
- _.isChecked = !1;
654
- const k = g.get(f);
655
- S.push(k);
667
+ const { valueMap: g } = t, T = [];
668
+ if ((u = t.backupList) == null || u.forEach(($) => {
669
+ const { label: y } = $, a = `${h}${y}`, V = f.includes(a);
670
+ if (V && !ee(t, y)) {
671
+ const k = re(e, b, $), L = t.operatorValue && l ? { operator: t.operatorValue } : null, C = se({ ...r, label: m.label, value: y, ...k, ...L });
672
+ s.push(C), $.isChecked = !0;
673
+ } else if (!V && ee(t, y)) {
674
+ $.isChecked = !1;
675
+ const k = g.get(a);
676
+ T.push(k);
656
677
  }
657
- }), S.length) {
658
- const _ = t.innerModelValue.filter((V, f) => V && !S.includes(f));
659
- Q({ emit: n, state: t, nextTick: l, newValue: _, oldValue: u });
678
+ }), T.length) {
679
+ const $ = t.innerModelValue.filter((y, a) => y && !T.includes(a));
680
+ X({ emit: o, state: t, nextTick: n, newValue: $, oldValue: p });
660
681
  return;
661
682
  }
662
683
  }
663
- Q({ emit: n, state: t, nextTick: l, tagList: d, oldValue: u });
684
+ X({ emit: o, state: t, nextTick: n, tagList: s, oldValue: p });
664
685
  } else
665
686
  t.propItem = { ...m, label: "" }, t.inputValue = "";
666
687
  }
667
688
  };
668
689
  }
669
- function Qt({ props: e, state: t, emit: n, nextTick: l, vm: c }) {
670
- const i = c || t.instance;
690
+ function Qt({ props: e, state: t, emit: o, nextTick: n, vm: d }) {
691
+ const c = d || t.instance;
671
692
  return {
672
- onConfirmDate: async (p, r = !1) => {
673
- if (!p) {
693
+ onConfirmDate: async (r, i = !1) => {
694
+ if (!r) {
674
695
  t.propItem = { label: "" };
675
696
  return;
676
697
  }
677
- const o = await Ce(i, t, e, r);
678
- if (o) {
679
- R(t, !1);
680
- const d = e.modelValue.filter((u) => u.type !== o.type || u.field !== o.field);
681
- d.push(o), Q({ emit: n, state: t, nextTick: l, newValue: d });
698
+ const u = await $e(c, t, e, i);
699
+ if (u) {
700
+ _(t, !1);
701
+ const s = e.modelValue.filter((p) => p.type !== u.type || p.field !== u.field);
702
+ s.push(u), X({ emit: o, state: t, nextTick: n, newValue: s });
682
703
  } else
683
- R(t);
704
+ _(t);
684
705
  },
685
- handleDateShow: () => R(t),
686
- pickerOptions: (p, r = "") => ({
687
- disabledDate(o) {
688
- const { maxTimeLength: d = 0, min: u, max: s } = t.prevItem, a = t[r], h = o.getTime();
689
- if (d > 0)
690
- if (u || s)
691
- if (r && a) {
692
- const g = new Date(a).getTime(), S = !u && s ? g - d : Math.max(u.getTime(), g - d);
693
- return h < S || h > g;
694
- } else if (!r && p) {
695
- const g = new Date(p).getTime(), S = u && !s ? g + d : Math.min(s.getTime(), g + d);
696
- return h < g || h > S;
706
+ handleDateShow: () => _(t),
707
+ pickerOptions: (r, i = "") => ({
708
+ disabledDate(u) {
709
+ const { maxTimeLength: s = 0, min: p, max: v } = t.prevItem, l = t[i], h = u.getTime();
710
+ if (s > 0)
711
+ if (p || v)
712
+ if (i && l) {
713
+ const g = new Date(l).getTime(), T = !p && v ? g - s : Math.max(p.getTime(), g - s);
714
+ return h < T || h > g;
715
+ } else if (!i && r) {
716
+ const g = new Date(r).getTime(), T = p && !v ? g + s : Math.min(v.getTime(), g + s);
717
+ return h < g || h > T;
697
718
  } else
698
- return u && h < u.getTime() || s && h > s.getTime();
699
- else if (r && a) {
700
- const g = new Date(a).getTime(), S = g - d;
701
- return h < S || h > g;
702
- } else if (!r && p) {
703
- const g = new Date(p).getTime(), S = g + d;
704
- return h < g || h > S;
719
+ return p && h < p.getTime() || v && h > v.getTime();
720
+ else if (i && l) {
721
+ const g = new Date(l).getTime(), T = g - s;
722
+ return h < T || h > g;
723
+ } else if (!i && r) {
724
+ const g = new Date(r).getTime(), T = g + s;
725
+ return h < g || h > T;
705
726
  } else
706
727
  return !1;
707
- else if (u || s)
708
- if (r && a) {
709
- const g = new Date(a).getTime();
710
- return u && h < u.getTime() || h > g;
711
- } else if (!r && p) {
712
- const g = new Date(p).getTime();
713
- return h < g || s && h > s.getTime();
728
+ else if (p || v)
729
+ if (i && l) {
730
+ const g = new Date(l).getTime();
731
+ return p && h < p.getTime() || h > g;
732
+ } else if (!i && r) {
733
+ const g = new Date(r).getTime();
734
+ return h < g || v && h > v.getTime();
714
735
  } else
715
- return h < u || h > s;
716
- else if (r && a) {
717
- const g = new Date(a).getTime();
736
+ return h < p || h > v;
737
+ else if (i && l) {
738
+ const g = new Date(l).getTime();
718
739
  return h > g;
719
- } else if (!r && p) {
720
- const g = new Date(p).getTime();
740
+ } else if (!i && r) {
741
+ const g = new Date(r).getTime();
721
742
  return h < g;
722
743
  } else
723
744
  return !1;
@@ -725,174 +746,174 @@ function Qt({ props: e, state: t, emit: n, nextTick: l, vm: c }) {
725
746
  })
726
747
  };
727
748
  }
728
- function Wt({ props: e, state: t, t: n, emit: l, nextTick: c, vm: i }) {
729
- const b = i || t.instance, v = async (r) => {
730
- if (!r) {
749
+ function Wt({ props: e, state: t, t: o, emit: n, nextTick: d, vm: c }) {
750
+ const f = c || t.instance, b = async (i) => {
751
+ if (!i) {
731
752
  t.propItem = { ...t.propItem, label: "" };
732
753
  return;
733
754
  }
734
- const o = await qe(b, t, e);
735
- if (o) {
736
- R(t, !1);
737
- const d = e.modelValue.filter((u) => u.type !== o.type || u.field !== o.field);
738
- d.push(o), Q({ emit: l, state: t, nextTick: c, newValue: d });
755
+ const u = await Qe(f, t, e);
756
+ if (u) {
757
+ _(t, !1);
758
+ const s = e.modelValue.filter((p) => p.type !== u.type || p.field !== u.field);
759
+ s.push(u), X({ emit: n, state: t, nextTick: d, newValue: s });
739
760
  } else
740
- R(t);
741
- }, m = (r, o, d) => {
742
- const { maxTimeLength: u = 0 } = r;
761
+ _(t);
762
+ }, m = (i, u, s) => {
763
+ const { maxTimeLength: p = 0 } = i;
743
764
  return {
744
- [o]: {
745
- validator: (s, a, h) => {
746
- u > 0 && !a ? h(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !a && !t[d] ? h(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : h();
765
+ [u]: {
766
+ validator: (v, l, h) => {
767
+ p > 0 && !l ? h(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !l && !t[s] ? h(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : h();
747
768
  }
748
769
  },
749
- [d]: {
750
- validator: (s, a, h) => {
751
- u > 0 && !a ? h(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !a && !t[o] ? h(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : h();
770
+ [s]: {
771
+ validator: (v, l, h) => {
772
+ p > 0 && !l ? h(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !l && !t[u] ? h(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : h();
752
773
  }
753
774
  }
754
775
  };
755
776
  };
756
777
  return {
757
778
  initFormRule: () => {
758
- let r = {}, o = {};
759
- e.items.forEach((d) => {
760
- d.type === "dateRange" && (r = m(d, "startDate", "endDate")), d.type === "datetimeRange" && (o = m(d, "startDateTime", "endDateTime"));
779
+ let i = {}, u = {};
780
+ e.items.forEach((s) => {
781
+ s.type === "dateRange" && (i = m(s, "startDate", "endDate")), s.type === "datetimeRange" && (u = m(s, "startDateTime", "endDateTime"));
761
782
  }), t.formRules = {
762
- ...r,
763
- ...o
783
+ ...i,
784
+ ...u
764
785
  }, e.editable && (t.formRules.inputEditValue = {
765
786
  required: !0,
766
- message: n("tvp.tvpSearchbox.notBeNull"),
787
+ message: o("tvp.tvpSearchbox.notBeNull"),
767
788
  trigger: ["change", "blur"]
768
789
  });
769
790
  },
770
- sizeChange: v
791
+ sizeChange: b
771
792
  };
772
793
  }
773
- function Jt({ props: e, state: t, t: n, nextTick: l, format: c, emit: i, vm: b }) {
774
- const v = (u) => {
775
- var T;
776
- const { operator: s, value: a, start: h, end: g } = u, { options: S, operators: _, type: V, mergeTag: f } = t.prevItem;
777
- if (V !== "custom") {
778
- if (V === "numRange")
779
- Ze(t, u, n);
780
- else if (V === "dateRange") {
794
+ function Jt({ props: e, state: t, t: o, nextTick: n, format: d, emit: c, vm: f }) {
795
+ const b = (p) => {
796
+ var V;
797
+ const { operator: v, value: l, start: h, end: g } = p, { options: T, operators: $, type: y, mergeTag: a } = t.prevItem;
798
+ if (y !== "custom") {
799
+ if (y === "numRange")
800
+ We(t, p, o);
801
+ else if (y === "dateRange") {
781
802
  const { dateRangeFormat: k } = t;
782
- t.startDate = c(h, k), t.endDate = c(g, k);
783
- } else if (V === "datetimeRange") {
803
+ t.startDate = d(h, k), t.endDate = d(g, k);
804
+ } else if (y === "datetimeRange") {
784
805
  const { datetimeRangeFormat: k } = t;
785
- t.startDateTime = c(h, k), t.endDateTime = c(g, k);
806
+ t.startDateTime = d(h, k), t.endDateTime = d(g, k);
786
807
  } else {
787
- if (f) {
788
- const k = ((T = u.options) == null ? void 0 : T.flatMap(($) => $.label)) || [];
808
+ if (a) {
809
+ const k = ((V = p.options) == null ? void 0 : V.flatMap((L) => L.label)) || [];
789
810
  t.inputEditValue = k, t.currentEditSelectTags = k;
790
811
  } else
791
- t.inputEditValue = Array.isArray(a) ? a.join(",") : a || "";
792
- t.currentEditValue = S;
812
+ t.inputEditValue = Array.isArray(l) ? l.join(",") : l || "";
813
+ t.currentEditValue = T;
793
814
  }
794
- t.operatorValue = s, t.currentOperators = _;
815
+ t.operatorValue = v, t.currentOperators = $;
795
816
  }
796
817
  }, m = async () => {
797
818
  var h, g;
798
819
  if (!((g = (h = t.instance) == null ? void 0 : h.$refs) != null && g.formRef))
799
820
  return;
800
- const { prevItem: u } = t;
801
- let s = [];
802
- if (u.type === "numRange" ? s = [t.curMinNumVar, t.curMaxNumVar] : u.type === "dateRange" ? s = ["startDate", "endDate"] : u.type === "datetimeRange" ? s = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(u.type) || (s = ["inputEditValue"]), (s == null ? void 0 : s.length) === 0) {
821
+ const { prevItem: p } = t;
822
+ let v = [];
823
+ if (p.type === "numRange" ? v = [t.curMinNumVar, t.curMaxNumVar] : p.type === "dateRange" ? v = ["startDate", "endDate"] : p.type === "datetimeRange" ? v = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(p.type) || (v = ["inputEditValue"]), (v == null ? void 0 : v.length) === 0) {
803
824
  t.hasFormError = !1;
804
825
  return;
805
826
  }
806
- let a = !1;
807
- await t.instance.$refs.formRef.validateField(s, (S) => {
808
- S && (a = !0);
809
- }), t.hasFormError = a;
827
+ let l = !1;
828
+ await t.instance.$refs.formRef.validateField(v, (T) => {
829
+ T && (l = !0);
830
+ }), t.hasFormError = l;
810
831
  };
811
832
  return {
812
- editTag: (u, s, a) => {
813
- if (!e.editable || u.type && u.type === "map")
833
+ editTag: (p, v, l) => {
834
+ if (!e.editable || p.type && p.type === "map")
814
835
  return;
815
- R(t, !1), t.popoverVisible = !1;
816
- const h = a.target.classList.contains("tiny-tag") ? a.target : a.srcElement.parentElement;
817
- l(() => {
836
+ _(t, !1), t.popoverVisible = !1;
837
+ const h = l.target.classList.contains("tiny-tag") ? l.target : l.srcElement.parentElement;
838
+ n(() => {
818
839
  const { popoverRef: g } = t.instance.$refs;
819
840
  g.state.referenceElm = h, g.state.popperElm && (g.state.popperElm.style.display = "none"), g.doDestroy(), t.popoverVisible = !0, m();
820
- }), t.prevItem = t.recordItems.find((g) => g.field === u.field), !t.prevItem && (t.prevItem = u), t.selectValue = u.label, t.currentModelValueIndex = s, i("tagClick", u), v(u);
841
+ }), t.prevItem = t.recordItems.find((g) => g.field === p.field), !t.prevItem && (t.prevItem = p), t.selectValue = p.label, t.currentModelValueIndex = v, c("tagClick", p), b(p);
821
842
  },
822
- confirmEditTag: async (u) => {
823
- if (!u) {
843
+ confirmEditTag: async (p) => {
844
+ if (!p) {
824
845
  t.popoverVisible = !1;
825
846
  return;
826
847
  }
827
- const { prevItem: s, currentModelValueIndex: a } = t;
848
+ const { prevItem: v, currentModelValueIndex: l } = t;
828
849
  let h = null;
829
- s.type === "numRange" ? h = await qe(t.instance, t, e) : s.type === "dateRange" ? h = await Ce(t.instance, t, e, !1) : s.type === "datetimeRange" ? h = await Ce(t.instance, t, e, !0) : h = await Kt(t.instance, t, e), h ? (R(t, !1), t.popoverVisible = !1, Q({ emit: i, state: t, nextTick: l, index: a, newTag: h, isEdit: !0 })) : t.popoverVisible = !0, t.currentEditValue = [];
850
+ v.type === "numRange" ? h = await Qe(t.instance, t, e) : v.type === "dateRange" ? h = await $e(t.instance, t, e, !1) : v.type === "datetimeRange" ? h = await $e(t.instance, t, e, !0) : h = await Gt(t.instance, t, e), h ? (_(t, !1), t.popoverVisible = !1, X({ emit: c, state: t, nextTick: n, index: l, newTag: h, isEdit: !0 })) : t.popoverVisible = !0, t.currentEditValue = [];
830
851
  },
831
- selectPropChange: (u, s) => {
832
- s || (t.prevItem = u, v(u), l(() => {
852
+ selectPropChange: (p, v) => {
853
+ v || (t.prevItem = p, b(p), n(() => {
833
854
  m();
834
855
  }));
835
856
  },
836
- selectItemIsDisable: (u) => {
837
- var a, h, g, S;
838
- if (u.type && u.type === "map")
857
+ selectItemIsDisable: (p) => {
858
+ var l, h, g, T;
859
+ if (p.type && p.type === "map")
839
860
  return !0;
840
- if ((a = t.prevItem) != null && a.operators || u.operators)
841
- return ((h = t.prevItem.operators) == null ? void 0 : h.length) !== ((g = u.operators) == null ? void 0 : g.length);
842
- const s = ["radio", "checkbox"];
843
- return t.prevItem.type && s.includes(t.prevItem.type) ? u.type ? !s.includes(u.type) : !1 : ((S = t.prevItem) == null ? void 0 : S.type) !== u.type;
861
+ if ((l = t.prevItem) != null && l.operators || p.operators)
862
+ return ((h = t.prevItem.operators) == null ? void 0 : h.length) !== ((g = p.operators) == null ? void 0 : g.length);
863
+ const v = ["radio", "checkbox"];
864
+ return t.prevItem.type && v.includes(t.prevItem.type) ? p.type ? !v.includes(p.type) : !1 : ((T = t.prevItem) == null ? void 0 : T.type) !== p.type;
844
865
  },
845
866
  checkFormValidation: m
846
867
  };
847
868
  }
848
- function Xt({ state: e, emit: t, nextTick: n }) {
849
- const l = (b) => {
850
- R(e, !1);
851
- const { prevItem: v, indexMap: m } = e, { replace: p, label: r } = v, o = [];
852
- if (p && m.has(r)) {
853
- const d = m.get(r), u = { ...v, ...b };
854
- Q({ emit: t, state: e, nextTick: n, newTag: u, index: d });
869
+ function eo({ state: e, emit: t, nextTick: o }) {
870
+ const n = (f) => {
871
+ _(e, !1);
872
+ const { prevItem: b, indexMap: m } = e, { replace: r, label: i } = b, u = [];
873
+ if (r && m.has(i)) {
874
+ const s = m.get(i), p = { ...b, ...f };
875
+ X({ emit: t, state: e, nextTick: o, newTag: p, index: s });
855
876
  return;
856
877
  } else
857
- !p && Array.isArray(b) ? b.forEach((d) => {
858
- J(e, d.value) || o.push({ ...v, ...d });
859
- }) : J(e, b.value) || o.push({ ...v, ...b });
860
- Q({ emit: t, state: e, nextTick: n, tagList: o });
878
+ !r && Array.isArray(f) ? f.forEach((s) => {
879
+ ee(e, s.value) || u.push({ ...b, ...s });
880
+ }) : ee(e, f.value) || u.push({ ...b, ...f });
881
+ X({ emit: t, state: e, nextTick: o, tagList: u });
861
882
  };
862
883
  return {
863
- handleConfirm: (b) => {
864
- if (!b) {
865
- Ve(e), R(e, !1);
884
+ handleConfirm: (f) => {
885
+ if (!f) {
886
+ Se(e), _(e, !1);
866
887
  return;
867
888
  }
868
- l(b);
889
+ n(f);
869
890
  },
870
- handleEditConfirm: (b) => {
871
- if (!b) {
872
- fe(e, !1);
891
+ handleEditConfirm: (f) => {
892
+ if (!f) {
893
+ ye(e, !1);
873
894
  return;
874
895
  }
875
- l(b);
896
+ n(f);
876
897
  }
877
898
  };
878
899
  }
879
- function en({ props: e, state: t }) {
900
+ function to({ props: e, state: t }) {
880
901
  return {
881
902
  initItems: () => {
882
- t.groupItems = {}, t.recordItems.forEach((v) => {
883
- var p;
884
- const { groupKey: m = "0" } = v;
885
- if (t.groupItems[m] ? t.groupItems[m].push({ ...v }) : (t.groupItems[m] = [{ ...v }], t.matchItems[m] = { attr: [], attrValue: [] }), t.prevItem && v.field === t.prevItem.field && v !== t.prevItem) {
886
- const { options: r, type: o } = v;
887
- t.prevItem = v, r != null && r.length && (t.backupList = r), o === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (p = t.backupList) == null || p.forEach((d) => {
888
- const { label: u } = d;
889
- J(t, u) && t.checkboxGroup.push(`${v.label}${u}`), d.isFilter = !1;
890
- })), R(t, v.field === t.prevItem.field && v !== t.prevItem);
903
+ t.groupItems = {}, t.recordItems.forEach((b) => {
904
+ var r;
905
+ const { groupKey: m = "0" } = b;
906
+ if (t.groupItems[m] ? t.groupItems[m].push({ ...b }) : (t.groupItems[m] = [{ ...b }], t.matchItems[m] = { attr: [], attrValue: [] }), t.prevItem && b.field === t.prevItem.field && b !== t.prevItem) {
907
+ const { options: i, type: u } = b;
908
+ t.prevItem = b, i != null && i.length && (t.backupList = i), u === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (r = t.backupList) == null || r.forEach((s) => {
909
+ const { label: p } = s;
910
+ ee(t, p) && t.checkboxGroup.push(`${b.label}${p}`), s.isFilter = !1;
911
+ })), _(t, b.field === t.prevItem.field && b !== t.prevItem);
891
912
  }
892
913
  });
893
914
  },
894
915
  watchOutsideClick: () => {
895
- e.editable && fe(t, !1), t.isMouseDown = !1, R(t, !1);
916
+ e.editable && ye(t, !1), t.isMouseDown = !1, _(t, !1);
896
917
  },
897
918
  watchMouseDown: () => {
898
919
  t.isMouseDown = !0;
@@ -900,14 +921,14 @@ function en({ props: e, state: t }) {
900
921
  watchMouseMove: () => {
901
922
  t.isMouseDown && (t.isMouseDown = !1);
902
923
  },
903
- handleClick: (v) => {
904
- var r;
905
- const { backupPrevItem: m, prevItem: p } = t;
906
- v.stopPropagation(), e.editable && (t.popoverVisible = !1, t.currentEditValue = [], t.propItem.label && m && m !== p && (t.prevItem = m)), t.hasBackupList && (((r = t.backupList) == null ? void 0 : r.length) === 0 || !t.backupList) && !t.inputValue || e.items.length === 0 ? R(t, !1) : R(t);
924
+ handleClick: (b) => {
925
+ var i;
926
+ const { backupPrevItem: m, prevItem: r } = t;
927
+ b.stopPropagation(), e.editable && (t.popoverVisible = !1, t.currentEditValue = [], t.propItem.label && m && m !== r && (t.prevItem = m)), t.hasBackupList && (((i = t.backupList) == null ? void 0 : i.length) === 0 || !t.backupList) && !t.inputValue || e.items.length === 0 ? _(t, !1) : _(t);
907
928
  }
908
929
  };
909
930
  }
910
- const Ye = {
931
+ const Je = {
911
932
  tvp: {
912
933
  tvpSearchbox: {
913
934
  defaultPlaceholder: "请选择属性筛选,或输入关键字",
@@ -948,7 +969,7 @@ const Ye = {
948
969
  initUse: "搜索"
949
970
  }
950
971
  }
951
- }, Qe = {
972
+ }, et = {
952
973
  tvp: {
953
974
  tvpSearchbox: {
954
975
  defaultPlaceholder: "Select attribute filtering or enter keywords",
@@ -989,93 +1010,93 @@ const Ye = {
989
1010
  initUse: "Search"
990
1011
  }
991
1012
  }
992
- }, me = "zh-CN", ie = {
993
- "zh-CN": Ye,
994
- "en-US": Qe
1013
+ }, ge = "zh-CN", me = {
1014
+ "zh-CN": Je,
1015
+ "en-US": et
995
1016
  };
996
- let j = null, Me = null;
997
- const tn = (e) => {
998
- j = e;
999
- }, nn = (e) => {
1000
- Me = e;
1001
- }, Re = () => {
1002
- var e, t, n, l, c;
1003
- if ((n = (t = (e = j == null ? void 0 : j.config) == null ? void 0 : e.globalProperties) == null ? void 0 : t.$i18n) != null && n.locale)
1004
- return j.config.globalProperties.$i18n.locale;
1005
- if ((l = j == null ? void 0 : j.$i18n) != null && l.locale)
1006
- return j.$i18n.locale;
1017
+ let U = null, Le = null;
1018
+ const _e = (e) => {
1019
+ U = e;
1020
+ }, oo = (e) => {
1021
+ Le = e;
1022
+ }, xe = () => {
1023
+ var e, t, o, n, d;
1024
+ if ((o = (t = (e = U == null ? void 0 : U.config) == null ? void 0 : e.globalProperties) == null ? void 0 : t.$i18n) != null && o.locale)
1025
+ return U.config.globalProperties.$i18n.locale;
1026
+ if ((n = U == null ? void 0 : U.$i18n) != null && n.locale)
1027
+ return U.$i18n.locale;
1007
1028
  if (typeof navigator < "u") {
1008
- const i = navigator.language || ((c = navigator.languages) == null ? void 0 : c[0]);
1009
- if (i)
1010
- return i.startsWith("zh") ? "zh-CN" : "en-US";
1029
+ const c = navigator.language || ((d = navigator.languages) == null ? void 0 : d[0]);
1030
+ if (c)
1031
+ return c.startsWith("zh") ? "zh-CN" : "en-US";
1011
1032
  }
1012
- return me;
1013
- }, Ee = (e) => ie[e] || ie[me], q = (e, t = {}) => {
1014
- var b, v;
1033
+ return ge;
1034
+ }, Re = (e) => me[e] || me[ge], q = (e, t = {}) => {
1035
+ var f, b;
1015
1036
  if (!e)
1016
1037
  return "";
1017
- if (typeof Me == "function")
1038
+ if (typeof Le == "function")
1018
1039
  try {
1019
- const m = Me(e, t);
1040
+ const m = Le(e, t);
1020
1041
  if (m && m !== e)
1021
1042
  return m;
1022
1043
  } catch (m) {
1023
1044
  console.warn("[TinySearchBox] globalT translation failed:", m);
1024
1045
  }
1025
- if ((v = (b = j == null ? void 0 : j.config) == null ? void 0 : b.globalProperties) != null && v.$t)
1046
+ if ((b = (f = U == null ? void 0 : U.config) == null ? void 0 : f.globalProperties) != null && b.$t)
1026
1047
  try {
1027
- const m = j.config.globalProperties.$t(e, t);
1048
+ const m = U.config.globalProperties.$t(e, t);
1028
1049
  if (m && m !== e)
1029
1050
  return m;
1030
1051
  } catch (m) {
1031
1052
  console.warn("[TinySearchBox] i18n translation failed:", m);
1032
1053
  }
1033
- if (j != null && j.$t)
1054
+ if (U != null && U.$t)
1034
1055
  try {
1035
- const m = j.$t(e, t);
1056
+ const m = U.$t(e, t);
1036
1057
  if (m && m !== e)
1037
1058
  return m;
1038
1059
  } catch (m) {
1039
1060
  console.warn("[TinySearchBox] i18n translation failed:", m);
1040
1061
  }
1041
- const n = Re(), l = Ee(n), c = e.split(".");
1042
- let i = l;
1043
- for (const m of c)
1044
- if (i && typeof i == "object" && m in i)
1045
- i = i[m];
1062
+ const o = xe(), n = Re(o), d = e.split(".");
1063
+ let c = n;
1064
+ for (const m of d)
1065
+ if (c && typeof c == "object" && m in c)
1066
+ c = c[m];
1046
1067
  else {
1047
- if (n !== me) {
1048
- i = Ee(me);
1049
- for (const r of c)
1050
- if (i && typeof i == "object" && r in i)
1051
- i = i[r];
1068
+ if (o !== ge) {
1069
+ c = Re(ge);
1070
+ for (const i of d)
1071
+ if (c && typeof c == "object" && i in c)
1072
+ c = c[i];
1052
1073
  else {
1053
- i = e;
1074
+ c = e;
1054
1075
  break;
1055
1076
  }
1056
1077
  } else
1057
- i = e;
1078
+ c = e;
1058
1079
  break;
1059
1080
  }
1060
- return typeof i == "string" && Object.keys(t).length > 0 ? i.replace(/\{(\w+)\}/g, (m, p) => t[p] !== void 0 ? t[p] : m) : typeof i == "string" ? i : e;
1061
- }, on = (e, t = {}) => e.map((n) => q(n, t)), ln = (e) => e in ie, an = () => Object.keys(ie), rn = (e, t) => {
1062
- ie[e] = t;
1063
- }, sn = (e) => {
1064
- e !== me && delete ie[e];
1065
- }, pn = {
1081
+ return typeof c == "string" && Object.keys(t).length > 0 ? c.replace(/\{(\w+)\}/g, (m, r) => t[r] !== void 0 ? t[r] : m) : typeof c == "string" ? c : e;
1082
+ }, no = (e, t = {}) => e.map((o) => q(o, t)), lo = (e) => e in me, ao = () => Object.keys(me), so = (e, t) => {
1083
+ me[e] = t;
1084
+ }, ro = (e) => {
1085
+ e !== ge && delete me[e];
1086
+ }, io = {
1066
1087
  t: q,
1067
- zhCN: Ye,
1068
- enUS: Qe,
1069
- tArray: on,
1070
- setGlobalT: nn,
1071
- setGlobalApp: tn,
1072
- getCurrentLocale: Re,
1073
- getLocaleMessages: Ee,
1074
- isLocaleSupported: ln,
1075
- getSupportedLocales: an,
1076
- addLocale: rn,
1077
- removeLocale: sn
1078
- }, un = [
1088
+ zhCN: Je,
1089
+ enUS: et,
1090
+ tArray: no,
1091
+ setGlobalT: oo,
1092
+ setGlobalApp: _e,
1093
+ getCurrentLocale: xe,
1094
+ getLocaleMessages: Re,
1095
+ isLocaleSupported: lo,
1096
+ getSupportedLocales: ao,
1097
+ addLocale: so,
1098
+ removeLocale: ro
1099
+ }, po = [
1079
1100
  "t",
1080
1101
  "state",
1081
1102
  "isShowClose",
@@ -1102,11 +1123,11 @@ const tn = (e) => {
1102
1123
  "handleEditConfirm",
1103
1124
  "showDropdown",
1104
1125
  "showPopover"
1105
- ], be = (e, t) => e.emptyPlaceholder || t("tvp.tvpSearchbox.addPlaceholder"), cn = ({ reactive: e, computed: t, api: n, i18n: l, watch: c, props: i, emit: b, vm: v }) => {
1126
+ ], Ve = (e, t) => e.emptyPlaceholder || t("tvp.tvpSearchbox.addPlaceholder"), uo = ({ reactive: e, computed: t, api: o, i18n: n, watch: d, props: c, emit: f, vm: b }) => {
1106
1127
  const m = e({
1107
- innerModelValue: [...i.modelValue],
1108
- placeholder: i.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : be(i, q),
1109
- emitter: b,
1128
+ innerModelValue: [...c.modelValue],
1129
+ placeholder: c.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : Ve(c, q),
1130
+ emitter: f,
1110
1131
  recordItems: [],
1111
1132
  groupItems: {},
1112
1133
  inputValue: "",
@@ -1116,7 +1137,7 @@ const tn = (e) => {
1116
1137
  filterList: [],
1117
1138
  checkboxGroup: [],
1118
1139
  prevItem: {},
1119
- backupPrevItem: "",
1140
+ backupPrevItem: null,
1120
1141
  formRules: null,
1121
1142
  validType: "text",
1122
1143
  numberShowMessage: !0,
@@ -1135,8 +1156,8 @@ const tn = (e) => {
1135
1156
  allTypeAttri: { label: q("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
1136
1157
  operatorValue: ":",
1137
1158
  inputEditValue: "",
1138
- currentOperators: "",
1139
- currentEditValue: "",
1159
+ currentOperators: null,
1160
+ currentEditValue: [],
1140
1161
  currentModelValueIndex: -1,
1141
1162
  curMinNumVar: "",
1142
1163
  curMaxNumVar: "",
@@ -1151,123 +1172,123 @@ const tn = (e) => {
1151
1172
  isIndeterminate: t(() => m.checkboxGroup.length > 0 && m.checkboxGroup.length !== m.filterList.length),
1152
1173
  checkAll: t({
1153
1174
  get: () => m.checkboxGroup.length && m.checkboxGroup.length === m.filterList.length,
1154
- set: (p) => {
1155
- p ? m.checkboxGroup = m.filterList.flatMap((r) => `${m.prevItem.label}${r.label}`) : m.checkboxGroup = [];
1175
+ set: (r) => {
1176
+ r ? m.checkboxGroup = m.filterList.flatMap((i) => `${m.prevItem.label}${i.label}`) : m.checkboxGroup = [];
1156
1177
  }
1157
1178
  })
1158
1179
  });
1159
1180
  return m;
1160
- }, dn = (e, { getCurrentInstance: t, onMounted: n, onBeforeUnmount: l, computed: c, reactive: i, watch: b }, { emit: v, nextTick: m, refs: p, vm: r, slots: o }) => {
1161
- const d = {}, u = e.emitter ? e.emitter.emit : v, s = cn({ reactive: i, computed: c, api: d, i18n: pn, watch: b, props: e, emit: u, vm: r });
1162
- return mn({ api: d, state: s, t: q, props: e, emit: u, nextTick: m, vm: r, computed: c }), fn({ watch: b, state: s, props: e, api: d, nextTick: m, vm: r }), s.instance = r, r && o && (r.slots = o), n(() => {
1163
- typeof document < "u" && (document.addEventListener("click", d.watchOutsideClick), document.addEventListener("mousedown", d.watchMouseDown), document.addEventListener("mousemove", d.watchMouseMove));
1164
- }), l(() => {
1165
- typeof document < "u" && (document.removeEventListener("click", d.watchOutsideClick), document.removeEventListener("mousedown", d.watchMouseDown), document.removeEventListener("mousemove", d.watchMouseMove), s.localeCheckInterval && (clearInterval(s.localeCheckInterval), s.localeCheckInterval = null));
1166
- }), d;
1167
- }, mn = ({ api: e, state: t, t: n, props: l, emit: c, nextTick: i, vm: b, computed: v }) => {
1168
- const { deleteTag: m, clearTag: p, backspaceDeleteTag: r } = Ht({ props: l, state: t, emit: c, nextTick: i }), { editTag: o, confirmEditTag: d, selectPropChange: u, selectItemIsDisable: s, checkFormValidation: a } = Jt({ props: l, state: t, t: n, nextTick: i, format: De, emit: c, vm: b }), { handleInput: h, selectFirstMap: g, cancelHandleInput: S } = Zt({ props: l, state: t, emit: c, nextTick: i }), { selectPropItem: _, selectRadioItem: V, selectInputValue: f, createTag: T, helpClick: k, setOperator: $ } = Gt({ props: l, emit: c, state: t, t: n, format: De, nextTick: i, vm: b, cancelHandleInput: S }), { selectCheckbox: C } = Yt({ props: l, state: t, emit: c, nextTick: i }), { onConfirmDate: N, handleDateShow: L, pickerOptions: P } = Qt({ props: l, state: t, emit: c, nextTick: i, vm: b }), { sizeChange: B, initFormRule: z } = Wt({ props: l, state: t, t: n, emit: c, nextTick: i, vm: b }), { handleConfirm: ee, handleEditConfirm: W } = Xt({ state: t, emit: c, nextTick: i }), { initItems: Z, watchOutsideClick: X, watchMouseDown: re, watchMouseMove: ke, handleClick: Ie } = en({ props: l, state: t }), We = v(() => l.modelValue.length || t.propItem.label || t.inputValue), Je = () => ({
1169
- selectInputValue: f,
1170
- selectPropItem: _,
1171
- selectRadioItem: V,
1172
- setOperator: $,
1181
+ }, co = (e, { getCurrentInstance: t, onMounted: o, onBeforeUnmount: n, computed: d, reactive: c, watch: f }, { emit: b, nextTick: m, refs: r, vm: i, slots: u }) => {
1182
+ const s = {}, p = e.emitter ? e.emitter.emit : b, v = uo({ reactive: c, computed: d, api: s, i18n: io, watch: f, props: e, emit: p, vm: i });
1183
+ return mo({ api: s, state: v, t: q, props: e, emit: p, nextTick: m, vm: i, computed: d }), ho({ watch: f, state: v, props: e, api: s, nextTick: m, vm: i }), v.instance = i, i && u && (i.slots = u), o(() => {
1184
+ typeof document < "u" && (document.addEventListener("click", s.watchOutsideClick), document.addEventListener("mousedown", s.watchMouseDown), document.addEventListener("mousemove", s.watchMouseMove));
1185
+ }), n(() => {
1186
+ typeof document < "u" && (document.removeEventListener("click", s.watchOutsideClick), document.removeEventListener("mousedown", s.watchMouseDown), document.removeEventListener("mousemove", s.watchMouseMove), v.localeCheckInterval && (clearInterval(v.localeCheckInterval), v.localeCheckInterval = null));
1187
+ }), s;
1188
+ }, mo = ({ api: e, state: t, t: o, props: n, emit: d, nextTick: c, vm: f, computed: b }) => {
1189
+ const { deleteTag: m, clearTag: r, backspaceDeleteTag: i } = Kt({ props: n, state: t, emit: d, nextTick: c }), { editTag: u, confirmEditTag: s, selectPropChange: p, selectItemIsDisable: v, checkFormValidation: l } = Jt({ props: n, state: t, t: o, nextTick: c, format: Ee, emit: d, vm: f }), { handleInput: h, selectFirstMap: g, cancelHandleInput: T } = Zt({ props: n, state: t, emit: d, nextTick: c }), { selectPropItem: $, selectRadioItem: y, selectInputValue: a, createTag: V, helpClick: k, setOperator: L } = Yt({ props: n, emit: d, state: t, t: o, format: Ee, nextTick: c, vm: f, cancelHandleInput: T }), { selectCheckbox: C } = Xt({ props: n, state: t, emit: d, nextTick: c }), { onConfirmDate: P, handleDateShow: R, pickerOptions: N } = Qt({ props: n, state: t, emit: d, nextTick: c, vm: f }), { sizeChange: A, initFormRule: O } = Wt({ props: n, state: t, t: o, emit: d, nextTick: c, vm: f }), { handleConfirm: j, handleEditConfirm: Q } = eo({ state: t, emit: d, nextTick: c }), { initItems: ce, watchOutsideClick: ie, watchMouseDown: W, watchMouseMove: pe, handleClick: de } = to({ props: n, state: t }), K = b(() => n.modelValue.length || t.propItem.label || t.inputValue), te = () => ({
1190
+ selectInputValue: a,
1191
+ selectPropItem: $,
1192
+ selectRadioItem: y,
1193
+ setOperator: L,
1173
1194
  selectCheckbox: C,
1174
- sizeChange: B,
1175
- onConfirmDate: N,
1195
+ sizeChange: A,
1196
+ onConfirmDate: P,
1176
1197
  selectFirstMap: g,
1177
- handleDateShow: L
1178
- }), we = (pe) => {
1179
- t.placeholder = pe;
1180
- }, Xe = () => be(l, n);
1181
- l.modelValue.length > 0 ? we(n("tvp.tvpSearchbox.addPlaceholder")) : we(Xe()), Object.assign(e, {
1182
- t: n,
1198
+ handleDateShow: R
1199
+ }), Me = (he) => {
1200
+ t.placeholder = he;
1201
+ }, tt = () => Ve(n, o);
1202
+ n.modelValue.length > 0 ? Me(o("tvp.tvpSearchbox.addPlaceholder")) : Me(tt()), Object.assign(e, {
1203
+ t: o,
1183
1204
  state: t,
1184
- isShowClose: We,
1205
+ isShowClose: K,
1185
1206
  deleteTag: m,
1186
- editTag: o,
1187
- backspaceDeleteTag: r,
1188
- createTag: T,
1189
- clearTag: p,
1207
+ editTag: u,
1208
+ backspaceDeleteTag: i,
1209
+ createTag: V,
1210
+ clearTag: r,
1190
1211
  helpClick: k,
1191
1212
  handleInput: h,
1192
- handleClick: Ie,
1193
- handleEvents: (pe, et, tt) => {
1194
- const Pe = Je();
1195
- typeof Pe[pe] == "function" ? Pe[pe](et, tt) : console.warn(`[TinySearchBox] Unknown event: ${pe}`);
1213
+ handleClick: de,
1214
+ handleEvents: (he, ot, nt) => {
1215
+ const Be = te();
1216
+ typeof Be[he] == "function" ? Be[he](ot, nt) : console.warn(`[TinySearchBox] Unknown event: ${he}`);
1196
1217
  },
1197
- pickerOptions: P,
1198
- resetInput: Ve,
1199
- selectItemIsDisable: s,
1200
- selectPropChange: u,
1201
- confirmEditTag: d,
1202
- handleConfirm: ee,
1203
- handleEditConfirm: W,
1204
- showDropdown: R,
1205
- showPopover: fe,
1206
- checkFormValidation: a,
1207
- setPlaceholder: we,
1208
- initItems: Z,
1209
- initFormRule: z,
1210
- watchOutsideClick: X,
1211
- watchMouseDown: re,
1212
- watchMouseMove: ke
1218
+ pickerOptions: N,
1219
+ resetInput: Se,
1220
+ selectItemIsDisable: v,
1221
+ selectPropChange: p,
1222
+ confirmEditTag: s,
1223
+ handleConfirm: j,
1224
+ handleEditConfirm: Q,
1225
+ showDropdown: _,
1226
+ showPopover: ye,
1227
+ checkFormValidation: l,
1228
+ setPlaceholder: Me,
1229
+ initItems: ce,
1230
+ initFormRule: O,
1231
+ watchOutsideClick: ie,
1232
+ watchMouseDown: W,
1233
+ watchMouseMove: pe
1213
1234
  });
1214
- }, fn = ({ watch: e, state: t, props: n, api: l, nextTick: c, vm: i }) => {
1215
- var r;
1216
- const b = () => {
1217
- var o;
1235
+ }, ho = ({ watch: e, state: t, props: o, api: n, nextTick: d, vm: c }) => {
1236
+ var u;
1237
+ const f = () => {
1238
+ var s;
1218
1239
  if (t.propItem.label) {
1219
- const { placeholder: d, type: u } = t.prevItem;
1220
- d ? l.setPlaceholder(d) : u === "map" ? l.setPlaceholder(q("tvp.tvpSearchbox.tagPlaceholder")) : (o = t.backupList) != null && o.length ? l.setPlaceholder(q("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: t.propItem.label })) : l.setPlaceholder(q("tvp.tvpSearchbox.addPlaceholder"));
1240
+ const { placeholder: p, type: v } = t.prevItem;
1241
+ p ? n.setPlaceholder(p) : v === "map" ? n.setPlaceholder(q("tvp.tvpSearchbox.tagPlaceholder")) : (s = t.backupList) != null && s.length ? n.setPlaceholder(q("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: t.propItem.label })) : n.setPlaceholder(q("tvp.tvpSearchbox.addPlaceholder"));
1221
1242
  } else {
1222
- const d = n.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : be(n, q);
1223
- l.setPlaceholder(d);
1243
+ const p = o.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : Ve(o, q);
1244
+ n.setPlaceholder(p);
1224
1245
  }
1225
- }, v = () => {
1226
- var o, d, u;
1227
- return (o = i == null ? void 0 : i.$i18n) != null && o.locale ? i.$i18n.locale : (u = (d = i == null ? void 0 : i.proxy) == null ? void 0 : d.$i18n) != null && u.locale ? i.proxy.$i18n.locale : Re();
1246
+ }, b = () => {
1247
+ var s, p, v;
1248
+ return (s = c == null ? void 0 : c.$i18n) != null && s.locale ? c.$i18n.locale : (v = (p = c == null ? void 0 : c.proxy) == null ? void 0 : p.$i18n) != null && v.locale ? c.proxy.$i18n.locale : xe();
1228
1249
  };
1229
- let m = v();
1230
- if (i != null && i.$i18n)
1250
+ let m = b(), r = !1;
1251
+ if (c != null && c.$i18n)
1231
1252
  try {
1232
- i.$watch(
1233
- () => i.$i18n.locale,
1234
- (o) => {
1235
- o !== m && (m = o, b());
1253
+ c.$watch(
1254
+ () => c.$i18n.locale,
1255
+ (s) => {
1256
+ s !== m && (m = s, f());
1236
1257
  },
1237
1258
  { immediate: !1 }
1238
- );
1239
- } catch (o) {
1240
- console.warn("[TinySearchBox] Unable to watch i18n.locale via vm.$watch:", o);
1259
+ ), r = !0;
1260
+ } catch (s) {
1261
+ console.warn("[TinySearchBox] Unable to watch i18n.locale via vm.$watch:", s);
1241
1262
  }
1242
- if ((r = i == null ? void 0 : i.proxy) != null && r.$i18n)
1263
+ if ((u = c == null ? void 0 : c.proxy) != null && u.$i18n)
1243
1264
  try {
1244
1265
  e(
1245
- () => i.proxy.$i18n.locale,
1246
- (o) => {
1247
- o !== m && (m = o, b());
1266
+ () => c.proxy.$i18n.locale,
1267
+ (s) => {
1268
+ s !== m && (m = s, f());
1248
1269
  },
1249
1270
  { immediate: !1 }
1250
- );
1251
- } catch (o) {
1252
- console.warn("[TinySearchBox] Unable to watch i18n.locale via watch:", o);
1271
+ ), r = !0;
1272
+ } catch (s) {
1273
+ console.warn("[TinySearchBox] Unable to watch i18n.locale via watch:", s);
1253
1274
  }
1254
- const p = () => {
1255
- const o = v();
1256
- o !== m && (m = o, b());
1275
+ const i = () => {
1276
+ const s = b();
1277
+ s !== m && (m = s, f());
1257
1278
  };
1258
- typeof window < "u" && (t.localeCheckInterval = setInterval(p, 200)), e(
1259
- () => n.modelValue,
1279
+ typeof window < "u" && !r && (t.localeCheckInterval = setInterval(i, 1e3)), e(
1280
+ () => o.modelValue,
1260
1281
  () => {
1261
- p();
1282
+ i();
1262
1283
  }
1263
1284
  ), e(
1264
- () => n.items,
1265
- (o) => {
1266
- const d = t.visible, u = t.prevItem && t.prevItem.field;
1267
- t.recordItems = oe(o), l.initItems(), l.initFormRule(), c(() => {
1268
- if (l.initItems(), l.initFormRule(), d && t.propItem.label) {
1269
- const s = t.recordItems.find((a) => a.field === u) || t.prevItem;
1270
- t.prevItem = s || {}, t.backupList = s && s.options ? [...s.options] : [], t.filterList = t.backupList ? [...t.backupList] : [], R(t);
1285
+ () => o.items,
1286
+ (s) => {
1287
+ const p = t.visible, v = t.prevItem && t.prevItem.field;
1288
+ t.recordItems = ae(s), n.initItems(), n.initFormRule(), d(() => {
1289
+ if (n.initItems(), n.initFormRule(), p && t.propItem.label) {
1290
+ const l = t.recordItems.find((h) => h.field === v) || t.prevItem;
1291
+ t.prevItem = l || {}, t.backupList = l && l.options ? [...l.options] : [], t.filterList = t.backupList ? [...t.backupList] : [], _(t);
1271
1292
  }
1272
1293
  });
1273
1294
  },
@@ -1277,64 +1298,64 @@ const tn = (e) => {
1277
1298
  }
1278
1299
  ), e(
1279
1300
  () => t.inputValue,
1280
- (o) => {
1281
- !o && !t.propItem.type && (t.visible = !1);
1301
+ (s) => {
1302
+ !s && !t.propItem.type && (t.visible = !1);
1282
1303
  },
1283
1304
  {
1284
1305
  immediate: !0
1285
1306
  }
1286
1307
  ), e(
1287
1308
  () => t.popoverVisible,
1288
- (o) => {
1289
- !o && !t.inputEditValue.length && (t.prevItem && t.prevItem.mergeTag ? t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags : [] : t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags.join(",") : t.currentEditSelectTags || ""), o || (t.hasFormError = !1);
1309
+ (s) => {
1310
+ !s && !t.inputEditValue.length && (t.prevItem && t.prevItem.mergeTag ? t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags : [] : t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags.join(",") : t.currentEditSelectTags || ""), s || (t.hasFormError = !1);
1290
1311
  },
1291
1312
  {
1292
1313
  immediate: !0
1293
1314
  }
1294
1315
  ), e(
1295
1316
  () => {
1296
- const o = {
1317
+ const s = {
1297
1318
  inputEditValue: t.inputEditValue,
1298
1319
  startDate: t.startDate,
1299
1320
  endDate: t.endDate,
1300
1321
  startDateTime: t.startDateTime,
1301
1322
  endDateTime: t.endDateTime
1302
1323
  };
1303
- return t.curMinNumVar && t.curMaxNumVar && (o[t.curMinNumVar] = t[t.curMinNumVar], o[t.curMaxNumVar] = t[t.curMaxNumVar]), o;
1324
+ return t.curMinNumVar && t.curMaxNumVar && (s[t.curMinNumVar] = t[t.curMinNumVar], s[t.curMaxNumVar] = t[t.curMaxNumVar]), s;
1304
1325
  },
1305
1326
  () => {
1306
- t.popoverVisible && c(() => {
1307
- l.checkFormValidation();
1327
+ t.popoverVisible && d(() => {
1328
+ n.checkFormValidation();
1308
1329
  });
1309
1330
  },
1310
1331
  { deep: !0 }
1311
1332
  ), e(
1312
1333
  () => t.propItem.label,
1313
- (o) => {
1314
- b();
1334
+ (s) => {
1335
+ f();
1315
1336
  }
1316
1337
  ), e(
1317
- () => n.modelValue,
1318
- (o) => {
1319
- if (o) {
1320
- if (t.indexMap.clear(), t.valueMap.clear(), o.forEach((d, u) => {
1321
- var a;
1322
- const s = `${d.label}${d.value}`;
1323
- t.indexMap.set(d.label, u), t.valueMap.set(s, u), ((a = d.options) == null ? void 0 : a.length) > 0 && d.options.forEach((h) => {
1324
- const g = `${d.label}${h.label}`;
1325
- t.valueMap.set(g, u);
1338
+ () => o.modelValue,
1339
+ (s) => {
1340
+ if (s) {
1341
+ if (t.indexMap.clear(), t.valueMap.clear(), s.forEach((p, v) => {
1342
+ var h;
1343
+ const l = `${p.label}${p.value}`;
1344
+ t.indexMap.set(p.label, v), t.valueMap.set(l, v), ((h = p.options) == null ? void 0 : h.length) > 0 && p.options.forEach((g) => {
1345
+ const T = `${p.label}${g.label}`;
1346
+ t.valueMap.set(T, v);
1326
1347
  });
1327
- }), fe(t, !1), o.length === 0 && l.setPlaceholder(be(n, q)), n.editable && !t.inputEditValue.length && o[0]) {
1328
- const d = o[0];
1329
- if ((t.recordItems.find((s) => s.field === d.field) || d).mergeTag && d.options) {
1330
- const s = d.options.flatMap((a) => a.label) || [];
1331
- t.inputEditValue = s, t.currentEditSelectTags = s;
1348
+ }), ye(t, !1), s.length === 0 && n.setPlaceholder(Ve(o, q)), o.editable && !t.inputEditValue.length && s[0]) {
1349
+ const p = s[0];
1350
+ if ((t.recordItems.find((l) => l.field === p.field) || p).mergeTag && p.options) {
1351
+ const l = p.options.flatMap((h) => h.label) || [];
1352
+ t.inputEditValue = l, t.currentEditSelectTags = l;
1332
1353
  } else {
1333
- const s = d.value;
1334
- t.inputEditValue = Array.isArray(s) ? s.join(",") : s || "";
1354
+ const l = p.value;
1355
+ t.inputEditValue = Array.isArray(l) ? l.join(",") : l || "";
1335
1356
  }
1336
1357
  }
1337
- t.innerModelValue = [...o];
1358
+ t.innerModelValue = [...s];
1338
1359
  }
1339
1360
  },
1340
1361
  {
@@ -1342,34 +1363,38 @@ const tn = (e) => {
1342
1363
  immediate: !0
1343
1364
  }
1344
1365
  );
1345
- }, Ne = (e, t) => {
1346
- const n = e.__vccOpts || e;
1347
- for (const [l, c] of t)
1348
- n[l] = c;
1349
- return n;
1350
- }, hn = (e, t, { emit: n }) => {
1351
- const l = e.handleEvents || e.events || ((v, m, p) => {
1352
- n("events", v, m, p);
1366
+ }, Fe = (e, t) => {
1367
+ const o = e.__vccOpts || e;
1368
+ for (const [n, d] of t)
1369
+ o[n] = d;
1370
+ return o;
1371
+ }, fo = (e, t, { emit: o }) => {
1372
+ const { computed: n } = t, d = e.handleEvents || e.events || ((r, i, u) => {
1373
+ o("events", r, i, u);
1353
1374
  });
1354
1375
  return {
1355
- selectInputValue: (v) => {
1356
- l("selectInputValue", v);
1376
+ isShowSearchOption: n(() => {
1377
+ const { inputValue: r, popoverVisible: i, currentOperators: u, propItem: s, prevItem: p } = e.state;
1378
+ return r.trim() && !i && !(u != null && u.length) && (!s.label || [void 0, "radio"].includes(p.type));
1379
+ }),
1380
+ selectInputValue: (r) => {
1381
+ d("selectInputValue", r);
1357
1382
  },
1358
- selectPropItem: (v) => {
1359
- l("selectPropItem", v);
1383
+ selectPropItem: (r) => {
1384
+ d("selectPropItem", r);
1360
1385
  },
1361
- selectRadioItem: (v, m) => {
1362
- l("selectRadioItem", v, m);
1386
+ selectRadioItem: (r, i) => {
1387
+ d("selectRadioItem", r, i);
1363
1388
  },
1364
1389
  t: q
1365
1390
  };
1366
- }, bn = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], vn = ve({
1367
- name: $e + "SearchBoxFirstLevelPanel",
1391
+ }, vo = ["isShowSearchOption", "selectInputValue", "selectPropItem", "selectRadioItem", "t"], bo = ke({
1392
+ name: Ne + "SearchBoxFirstLevelPanel",
1368
1393
  components: {
1369
- TinyDropdownItem: Fe
1394
+ TinyDropdownItem: Ae
1370
1395
  },
1371
1396
  props: {
1372
- ...ge,
1397
+ ...we,
1373
1398
  state: {
1374
1399
  type: Object,
1375
1400
  default: () => ({})
@@ -1389,160 +1414,220 @@ const tn = (e) => {
1389
1414
  },
1390
1415
  emits: ["events", "click"],
1391
1416
  setup(e, t) {
1392
- return Le({ props: e, context: t, renderless: hn, api: bn });
1417
+ return Pe({ props: e, context: t, renderless: fo, api: vo });
1393
1418
  }
1394
- }), gn = { tiny_mode: "pc" }, yn = { key: 0 }, Vn = { class: "tvp-search-box__filter-type" }, kn = {
1419
+ }), go = { tiny_mode: "pc" }, yo = { key: 0 }, Io = { class: "tvp-search-box__filter-type" }, Vo = {
1395
1420
  key: 0,
1396
1421
  class: "tvp-search-box__text-highlight"
1397
- }, In = { key: 1 }, wn = { class: "tvp-search-box__filter-type" }, Tn = {
1422
+ }, ko = { key: 1 }, wo = { class: "tvp-search-box__filter-type" }, To = {
1398
1423
  key: 0,
1399
1424
  class: "tvp-search-box__text-highlight"
1400
- }, Sn = { key: 1 }, Dn = { class: "tvp-search-box__filter-type" }, Cn = {
1425
+ }, So = { key: 1 }, Mo = { class: "tvp-search-box__filter-type" }, Co = {
1401
1426
  id: "potential-loading",
1402
1427
  class: "tvp-search-box__potential-box"
1403
- }, Mn = { key: 0 }, En = { class: "tvp-search-box__text-highlight" }, $n = { class: "tvp-search-box__first-panel" }, Ln = {
1428
+ }, Do = { key: 0 }, Eo = { class: "tvp-search-box__text-highlight" }, $o = { class: "tvp-search-box__first-panel" }, Lo = {
1404
1429
  key: 0,
1405
1430
  class: "tvp-search-box__filter-type"
1406
- }, _n = ["title"];
1407
- function Rn(e, t, n, l, c, i) {
1408
- var v, m;
1409
- const b = O("tiny-dropdown-item");
1410
- return y(), w("div", gn, [
1411
- H(M(b, {
1431
+ }, _o = ["title"];
1432
+ function Ro(e, t, o, n, d, c) {
1433
+ var b, m;
1434
+ const f = x("tiny-dropdown-item");
1435
+ return I(), M("div", go, [
1436
+ Y(D(f, {
1412
1437
  class: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
1413
1438
  "item-data": { label: e.state.inputValue },
1414
1439
  onItemClick: t[0] || (t[0] = () => e.selectInputValue(e.state.inputValue))
1415
1440
  }, {
1416
1441
  default: E(() => [
1417
- D("span", null, I(e.t("tvp.tvpSearchbox.initUse")) + """ + I(e.state.inputValue) + """, 1)
1442
+ S("span", null, w(e.t("tvp.tvpSearchbox.initUse")) + """ + w(e.state.inputValue) + """, 1)
1418
1443
  ]),
1419
1444
  _: 1
1420
1445
  }, 8, ["item-data"]), [
1421
- [G, e.state.inputValue.trim()]
1446
+ [J, e.isShowSearchOption]
1422
1447
  ]),
1423
- H(D("div", null, [
1424
- (y(!0), w(x, null, U(e.state.matchItems, (p, r) => (y(), w("div", { key: r }, [
1425
- p.attr.length ? (y(), w("div", yn, [
1426
- D("span", Vn, I(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1),
1427
- (y(!0), w(x, null, U(p.attr, (o, d) => (y(), F(b, {
1428
- key: o.label + d,
1448
+ Y(S("div", null, [
1449
+ (I(!0), M(H, null, z(e.state.matchItems, (r, i) => (I(), M("div", { key: i }, [
1450
+ r.attr.length ? (I(), M("div", yo, [
1451
+ S("span", Io, w(i === "0" ? e.t("tvp.tvpSearchbox.attributeType") : i), 1),
1452
+ (I(!0), M(H, null, z(r.attr, (u, s) => (I(), F(f, {
1453
+ key: u.label + s,
1429
1454
  class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1430
- "item-data": o,
1431
- onItemClick: () => e.selectPropItem(o)
1455
+ "item-data": u,
1456
+ onItemClick: () => e.selectPropItem(u)
1432
1457
  }, {
1433
1458
  default: E(() => [
1434
- D("span", null, [
1435
- (y(!0), w(x, null, U(o.match, (u) => (y(), w("span", { key: u }, [
1436
- u.toLowerCase() === o.hightlighStr ? (y(), w("span", kn, I(u), 1)) : (y(), w("span", In, I(u), 1))
1459
+ S("span", null, [
1460
+ (I(!0), M(H, null, z(u.match, (p) => (I(), M("span", { key: p }, [
1461
+ p.toLowerCase() === u.hightlighStr ? (I(), M("span", Vo, w(p), 1)) : (I(), M("span", ko, w(p), 1))
1437
1462
  ]))), 128))
1438
1463
  ])
1439
1464
  ]),
1440
1465
  _: 2
1441
1466
  }, 1032, ["item-data", "onItemClick"]))), 128))
1442
- ])) : A("", !0),
1443
- p.attrValue.length ? (y(), w(x, { key: 1 }, [
1444
- D("span", wn, I(e.t("tvp.tvpSearchbox.propertyValue", [r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r])), 1),
1445
- (y(!0), w(x, null, U(p.attrValue, (o, d) => (y(), F(b, {
1446
- key: o.label + d,
1447
- disabled: o.isChecked,
1467
+ ])) : B("", !0),
1468
+ r.attrValue.length ? (I(), M(H, { key: 1 }, [
1469
+ S("span", wo, w(e.t("tvp.tvpSearchbox.propertyValue", [i === "0" ? e.t("tvp.tvpSearchbox.attributeType") : i])), 1),
1470
+ (I(!0), M(H, null, z(r.attrValue, (u, s) => (I(), F(f, {
1471
+ key: u.label + s,
1472
+ disabled: u.isChecked,
1448
1473
  class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1449
- "item-data": o,
1450
- onItemClick: () => e.selectRadioItem(o, !0)
1474
+ "item-data": u,
1475
+ onItemClick: () => e.selectRadioItem(u, !0)
1451
1476
  }, {
1452
1477
  default: E(() => [
1453
- D("span", null, [
1454
- (y(!0), w(x, null, U(o.match, (u) => (y(), w("span", { key: u }, [
1455
- u.toLowerCase() === o.hightlighStr ? (y(), w("span", Tn, I(u), 1)) : (y(), w("span", Sn, I(u), 1))
1478
+ S("span", null, [
1479
+ (I(!0), M(H, null, z(u.match, (p) => (I(), M("span", { key: p }, [
1480
+ p.toLowerCase() === u.hightlighStr ? (I(), M("span", To, w(p), 1)) : (I(), M("span", So, w(p), 1))
1456
1481
  ]))), 128))
1457
1482
  ])
1458
1483
  ]),
1459
1484
  _: 2
1460
1485
  }, 1032, ["disabled", "item-data", "onItemClick"]))), 128))
1461
- ], 64)) : A("", !0)
1486
+ ], 64)) : B("", !0)
1462
1487
  ]))), 128)),
1463
- H(D("div", null, [
1464
- D("span", Dn, I(e.t("tvp.tvpSearchbox.matched")), 1),
1465
- D("div", Cn, [
1466
- e.state.potentialOptions ? (y(), w("div", Mn, [
1467
- (y(!0), w(x, null, U(e.state.potentialOptions, (p, r) => (y(), F(b, {
1468
- key: p.label + r,
1488
+ Y(S("div", null, [
1489
+ S("span", Mo, w(e.t("tvp.tvpSearchbox.matched")), 1),
1490
+ S("div", Co, [
1491
+ e.state.potentialOptions ? (I(), M("div", Do, [
1492
+ (I(!0), M(H, null, z(e.state.potentialOptions, (r, i) => (I(), F(f, {
1493
+ key: r.label + i,
1469
1494
  class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1470
- "item-data": p,
1471
- onItemClick: () => e.selectRadioItem(p, !0)
1495
+ "item-data": r,
1496
+ onItemClick: () => e.selectRadioItem(r, !0)
1472
1497
  }, {
1473
1498
  default: E(() => [
1474
- K(I(p.label) + ": ", 1),
1475
- D("span", En, I(p.value), 1)
1499
+ G(w(r.label) + ": ", 1),
1500
+ S("span", Eo, w(r.value), 1)
1476
1501
  ]),
1477
1502
  _: 2
1478
1503
  }, 1032, ["item-data", "onItemClick"]))), 128))
1479
- ])) : A("", !0)
1504
+ ])) : B("", !0)
1480
1505
  ])
1481
1506
  ], 512), [
1482
- [G, e.state.potentialOptions]
1507
+ [J, e.state.potentialOptions]
1483
1508
  ])
1484
1509
  ], 512), [
1485
- [G, !e.state.propItem.label && ((v = e.state.inputValue) == null ? void 0 : v.trim())]
1510
+ [J, !e.state.propItem.label && ((b = e.state.inputValue) == null ? void 0 : b.trim())]
1486
1511
  ]),
1487
- H(D("div", $n, [
1488
- (y(!0), w(x, null, U(e.state.groupItems, (p, r) => (y(), w("div", { key: r }, [
1489
- p.length ? (y(), w("span", Ln, I(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1)) : A("", !0),
1490
- (y(!0), w(x, null, U(p, (o, d) => (y(), F(b, {
1491
- key: (o.field || o.label) + d,
1512
+ Y(S("div", $o, [
1513
+ (I(!0), M(H, null, z(e.state.groupItems, (r, i) => (I(), M("div", { key: i }, [
1514
+ r.length ? (I(), M("span", Lo, w(i === "0" ? e.t("tvp.tvpSearchbox.attributeType") : i), 1)) : B("", !0),
1515
+ (I(!0), M(H, null, z(r, (u, s) => (I(), F(f, {
1516
+ key: (u.field || u.label) + s,
1492
1517
  class: "tvp-search-box__dropdown-item",
1493
- "item-data": o,
1494
- onItemClick: () => e.selectPropItem(o)
1518
+ "item-data": u,
1519
+ onItemClick: () => e.selectPropItem(u)
1495
1520
  }, {
1496
1521
  default: E(() => [
1497
- D("span", {
1498
- title: o.label
1499
- }, I(o.label), 9, _n)
1522
+ S("span", {
1523
+ title: u.label
1524
+ }, w(u.label), 9, _o)
1500
1525
  ]),
1501
1526
  _: 2
1502
1527
  }, 1032, ["item-data", "onItemClick"]))), 128))
1503
1528
  ]))), 128))
1504
1529
  ], 512), [
1505
- [G, e.state.visible && !e.state.propItem.label && !((m = e.state.inputValue) != null && m.trim())]
1530
+ [J, e.state.visible && !e.state.propItem.label && !((m = e.state.inputValue) != null && m.trim())]
1506
1531
  ])
1507
1532
  ]);
1508
1533
  }
1509
- const Nn = /* @__PURE__ */ Ne(vn, [["render", Rn]]), Pn = (e, t, { emit: n }) => {
1510
- const { computed: l } = t, c = e.handleEvents || e.events || ((s, a, h) => {
1511
- n("events", s, a, h);
1512
- }), i = (s) => {
1513
- c("setOperator", s);
1514
- }, b = (s) => {
1515
- c("selectRadioItem", s);
1516
- }, v = (s) => {
1517
- c("selectCheckbox", s);
1518
- }, m = (s) => {
1519
- c("sizeChange", s);
1520
- }, p = (s, a) => {
1521
- c("onConfirmDate", s, a);
1522
- }, r = (s, a) => {
1523
- c("selectFirstMap", s, a);
1524
- }, o = (s) => {
1525
- c("handleDateShow", s);
1526
- }, d = l(() => {
1527
- var s;
1528
- return e.state.hasBackupList && ((s = e.state.backupList) == null ? void 0 : s.length) === 0;
1529
- }), u = l(() => {
1530
- var s;
1531
- return (s = e.state.backupList) == null ? void 0 : s.find((a) => !a.isFilter);
1532
- });
1534
+ const No = /* @__PURE__ */ Fe(bo, [["render", Ro]]);
1535
+ function Po(e, t) {
1536
+ const { reactive: o, computed: n } = e, { getList: d, itemHeight: c = 32, bufferSize: f = 5, headerHeight: b = () => 0 } = t, m = o({
1537
+ scrollTop: 0,
1538
+ viewportHeight: 300
1539
+ }), r = n(() => (d() || []).length * c), i = n(() => {
1540
+ const l = Math.max(0, m.scrollTop - b());
1541
+ return Math.max(0, Math.floor(l / c) - f);
1542
+ }), u = n(() => {
1543
+ const l = d() || [], h = Math.ceil(m.viewportHeight / c);
1544
+ return Math.min(l.length, i.value + h + f * 2);
1545
+ }), s = n(() => i.value * c), p = n(() => (d() || []).slice(i.value, u.value));
1533
1546
  return {
1547
+ vsState: m,
1548
+ totalHeight: r,
1549
+ startIndex: i,
1550
+ endIndex: u,
1551
+ offsetY: s,
1552
+ visibleItems: p,
1553
+ handleScroll: (l) => {
1554
+ m.scrollTop = l.target.scrollTop, m.viewportHeight = l.target.clientHeight;
1555
+ }
1556
+ };
1557
+ }
1558
+ const Oo = (e, t, { emit: o, nextTick: n, refs: d }) => {
1559
+ const { computed: c, reactive: f, watch: b, onMounted: m } = t, r = e.handleEvents || e.events || ((a, V, k) => {
1560
+ o("events", a, V, k);
1561
+ }), i = (a) => {
1562
+ r("setOperator", a);
1563
+ }, u = (a) => {
1564
+ r("selectRadioItem", a);
1565
+ }, s = (a) => {
1566
+ r("selectCheckbox", a);
1567
+ }, p = (a) => {
1568
+ r("sizeChange", a);
1569
+ }, v = (a, V) => {
1570
+ r("onConfirmDate", a, V);
1571
+ }, l = (a, V) => {
1572
+ r("selectFirstMap", a, V);
1573
+ }, h = (a) => {
1574
+ r("handleDateShow", a);
1575
+ }, g = c(() => {
1576
+ var a;
1577
+ return e.state.hasBackupList && ((a = e.state.backupList) == null ? void 0 : a.length) === 0;
1578
+ }), T = c(() => {
1579
+ var a;
1580
+ return (a = e.state.backupList) == null ? void 0 : a.find((V) => !V.isFilter);
1581
+ }), $ = c(() => {
1582
+ const a = e.state.prevItem.type, V = e.state.backupList || [];
1583
+ return !a || a === "radio" ? e.state.inputValue ? V.filter((k) => !k.isFilter) : V : V.filter((k) => !k.isFilter);
1584
+ }), y = Po(
1585
+ { reactive: f, computed: c },
1586
+ {
1587
+ getList: () => $.value,
1588
+ itemHeight: 32,
1589
+ bufferSize: 5,
1590
+ headerHeight: () => {
1591
+ const a = e.state.prevItem.type;
1592
+ return a === "checkbox" || a === "map" ? 32 : 0;
1593
+ }
1594
+ }
1595
+ );
1596
+ return b(
1597
+ () => e.state.inputValue,
1598
+ () => {
1599
+ y.vsState.scrollTop = 0, n(() => {
1600
+ d.vsScrollEl && (d.vsScrollEl.scrollTop = 0);
1601
+ });
1602
+ }
1603
+ ), b(
1604
+ () => e.state.prevItem,
1605
+ () => {
1606
+ y.vsState.scrollTop = 0, n(() => {
1607
+ d.vsScrollEl && (d.vsScrollEl.scrollTop = 0, y.handleScroll({ target: d.vsScrollEl }));
1608
+ });
1609
+ },
1610
+ { deep: !0 }
1611
+ ), m(() => {
1612
+ d.vsScrollEl && y.handleScroll({ target: d.vsScrollEl });
1613
+ }), {
1534
1614
  setOperator: i,
1535
- selectRadioItem: b,
1536
- selectCheckbox: v,
1537
- sizeChange: m,
1538
- onConfirmDate: p,
1539
- selectFirstMap: r,
1540
- handleDateShow: o,
1541
- isLoading: d,
1542
- showCheckBoxList: u,
1615
+ selectRadioItem: u,
1616
+ selectCheckbox: s,
1617
+ sizeChange: p,
1618
+ onConfirmDate: v,
1619
+ selectFirstMap: l,
1620
+ handleDateShow: h,
1621
+ isLoading: g,
1622
+ showCheckBoxList: T,
1623
+ vsTotalHeight: y.totalHeight,
1624
+ vsStartIndex: y.startIndex,
1625
+ vsOffsetY: y.offsetY,
1626
+ vsVisibleItems: y.visibleItems,
1627
+ vsHandleScroll: y.handleScroll,
1543
1628
  t: q
1544
1629
  };
1545
- }, On = [
1630
+ }, xo = [
1546
1631
  "setOperator",
1547
1632
  "selectRadioItem",
1548
1633
  "selectCheckbox",
@@ -1552,24 +1637,29 @@ const Nn = /* @__PURE__ */ Ne(vn, [["render", Rn]]), Pn = (e, t, { emit: n }) =>
1552
1637
  "handleDateShow",
1553
1638
  "isLoading",
1554
1639
  "showCheckBoxList",
1640
+ "vsTotalHeight",
1641
+ "vsStartIndex",
1642
+ "vsOffsetY",
1643
+ "vsVisibleItems",
1644
+ "vsHandleScroll",
1555
1645
  "t"
1556
- ], Fn = ve({
1557
- name: $e + "SearchBoxSecondLevelPanel",
1646
+ ], Fo = ke({
1647
+ name: Ne + "SearchBoxSecondLevelPanel",
1558
1648
  emits: ["events", "click"],
1559
1649
  components: {
1560
- TinyFormItem: Be,
1561
- TinyDropdownItem: Fe,
1562
- TinyCheckbox: nt,
1563
- TinyCheckboxGroup: ot,
1564
- TinyDatePicker: xe,
1565
- TinyInput: Ae,
1566
- TinyButton: ze
1650
+ TinyFormItem: ze,
1651
+ TinyDropdownItem: Ae,
1652
+ TinyCheckbox: lt,
1653
+ TinyCheckboxGroup: at,
1654
+ TinyDatePicker: Ue,
1655
+ TinyInput: je,
1656
+ TinyButton: Ke
1567
1657
  },
1568
1658
  directives: {
1569
- loading: lt.directive
1659
+ loading: st.directive
1570
1660
  },
1571
1661
  props: {
1572
- ...ge,
1662
+ ...we,
1573
1663
  state: {
1574
1664
  type: Object,
1575
1665
  default: () => ({})
@@ -1586,100 +1676,123 @@ const Nn = /* @__PURE__ */ Ne(vn, [["render", Rn]]), Pn = (e, t, { emit: n }) =>
1586
1676
  handleEvents: {
1587
1677
  type: Function,
1588
1678
  default: null
1679
+ },
1680
+ panelMaxHeight: {
1681
+ type: String,
1682
+ default: "999px"
1589
1683
  }
1590
1684
  },
1591
1685
  setup(e, t) {
1592
- return Le({ props: e, context: t, renderless: Pn, api: On });
1686
+ return Pe({ props: e, context: t, renderless: Oo, api: xo });
1593
1687
  }
1594
- }), Bn = { tiny_mode: "pc" }, xn = { key: 0 }, An = { class: "tvp-search-box__filter-type" }, zn = ["title"], Un = {
1688
+ }), Bo = { tiny_mode: "pc" }, Ho = { key: 0 }, Ao = { class: "tvp-search-box__filter-type" }, zo = ["title"], Uo = {
1595
1689
  key: 0,
1596
1690
  class: "tvp-search-box__text-highlight"
1597
- }, jn = { key: 1 }, Hn = ["title"], Kn = { key: 0 }, Gn = { class: "tvp-search-box__checkbox-wrap" }, qn = { class: "tvp-search-box__checkbox-btn" }, Zn = {
1691
+ }, jo = { key: 1 }, Ko = ["title"], Go = { class: "tvp-search-box__checkbox-btn" }, Yo = {
1598
1692
  key: 3,
1599
1693
  class: "tvp-search-box__panel-box"
1600
- }, Yn = { class: "tvp-search-box__number" }, Qn = { class: "tvp-search-box__dropdown-title" }, Wn = { class: "tvp-search-box__dropdown-start" }, Jn = { class: "tvp-search-box__dropdown-end" }, Xn = { class: "tvp-search-box__bottom-btn" }, eo = {
1694
+ }, qo = { class: "tvp-search-box__number" }, Zo = { class: "tvp-search-box__dropdown-title" }, Xo = { class: "tvp-search-box__dropdown-start" }, Qo = { class: "tvp-search-box__dropdown-end" }, Wo = { class: "tvp-search-box__bottom-btn" }, Jo = {
1601
1695
  key: 4,
1602
1696
  class: "tvp-search-box__panel-box"
1603
- }, to = { class: "tvp-search-box__date-wrap" }, no = { class: "tvp-search-box__dropdown-title" }, oo = { class: "tvp-search-box__dropdown-start" }, lo = { class: "tvp-search-box__dropdown-end" }, ao = { class: "tvp-search-box__bottom-btn" }, ro = {
1697
+ }, en = { class: "tvp-search-box__date-wrap" }, tn = { class: "tvp-search-box__dropdown-title" }, on = { class: "tvp-search-box__dropdown-start" }, nn = { class: "tvp-search-box__dropdown-end" }, ln = { class: "tvp-search-box__bottom-btn" }, an = {
1604
1698
  key: 5,
1605
1699
  class: "tvp-search-box__panel-box"
1606
- }, so = { class: "tvp-search-box__date-wrap" }, io = { class: "tvp-search-box__dropdown-title" }, po = { class: "tvp-search-box__dropdown-start" }, uo = { class: "tvp-search-box__dropdown-end" }, co = { class: "tvp-search-box__bottom-btn" }, mo = { key: 6 }, fo = {
1700
+ }, sn = { class: "tvp-search-box__date-wrap" }, rn = { class: "tvp-search-box__dropdown-title" }, pn = { class: "tvp-search-box__dropdown-start" }, un = { class: "tvp-search-box__dropdown-end" }, cn = { class: "tvp-search-box__bottom-btn" }, dn = { key: 6 }, mn = {
1607
1701
  key: 0,
1608
1702
  class: "tvp-search-box__filter-type"
1609
- }, ho = {
1703
+ }, hn = {
1610
1704
  key: 1,
1611
1705
  class: "tvp-search-box__filter-type"
1612
- }, bo = ["title"];
1613
- function vo(e, t, n, l, c, i) {
1614
- var s;
1615
- const b = O("tiny-dropdown-item"), v = O("tiny-checkbox"), m = O("tiny-checkbox-group"), p = O("tiny-button"), r = O("tiny-input"), o = O("tiny-form-item"), d = O("tiny-date-picker"), u = bt("loading");
1616
- return y(), w("div", Bn, [
1617
- (s = e.state.currentOperators) != null && s.length ? (y(), w("div", xn, [
1618
- D("span", An, I(e.t("tvp.tvpSearchbox.operator")), 1),
1619
- (y(!0), w(x, null, U(e.state.currentOperators, (a, h) => H((y(), F(b, {
1620
- key: a + h,
1706
+ }, fn = ["title"];
1707
+ function vn(e, t, o, n, d, c) {
1708
+ var v;
1709
+ const f = x("tiny-dropdown-item"), b = x("tiny-checkbox"), m = x("tiny-checkbox-group"), r = x("tiny-button"), i = x("tiny-input"), u = x("tiny-form-item"), s = x("tiny-date-picker"), p = gt("loading");
1710
+ return I(), M("div", Bo, [
1711
+ (v = e.state.currentOperators) != null && v.length ? (I(), M("div", Ho, [
1712
+ S("span", Ao, w(e.t("tvp.tvpSearchbox.operator")), 1),
1713
+ (I(!0), M(H, null, z(e.state.currentOperators, (l, h) => Y((I(), F(f, {
1714
+ key: l + h,
1621
1715
  class: "tvp-search-box__dropdown-item",
1622
- "item-data": { label: a },
1623
- onItemClick: () => e.setOperator(a)
1716
+ "item-data": { label: l },
1717
+ onItemClick: () => e.setOperator(l)
1624
1718
  }, {
1625
1719
  default: E(() => [
1626
- K(I(a), 1)
1720
+ G(w(l), 1)
1627
1721
  ]),
1628
1722
  _: 2
1629
1723
  }, 1032, ["item-data", "onItemClick"])), [
1630
- [G, a.includes(e.state.inputValue)]
1724
+ [J, l.includes(e.state.inputValue)]
1631
1725
  ])), 128))
1632
- ])) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ? H((y(), w("div", {
1726
+ ])) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ? Y((I(), M("div", {
1633
1727
  key: 1,
1634
- class: ce(["tvp-search-box__radio-wrap", e.isLoading && "tvp-search-box__loading-box"])
1728
+ class: ve(["tvp-search-box__radio-wrap", "tvp-search-box__virtual-list", e.isLoading && "tvp-search-box__loading-box"]),
1729
+ style: oe({ maxHeight: e.panelMaxHeight }),
1730
+ ref: "vsScrollEl",
1731
+ onScroll: t[0] || (t[0] = (...l) => e.vsHandleScroll && e.vsHandleScroll(...l))
1635
1732
  }, [
1636
- (y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
1637
- key: h + (a.field || a.label),
1638
- disabled: a.isChecked,
1639
- class: "tvp-search-box__dropdown-item",
1640
- "item-data": a,
1641
- onItemClick: () => e.selectRadioItem(a)
1642
- }, {
1643
- default: E(() => [
1644
- a.match ? (y(), w("span", {
1645
- key: 0,
1646
- title: a.label
1647
- }, [
1648
- (y(!0), w(x, null, U(a.match, (g) => (y(), w("span", { key: g }, [
1649
- g.toLowerCase() === a.hightlighStr ? (y(), w("span", Un, I(g), 1)) : (y(), w("span", jn, I(g), 1))
1650
- ]))), 128))
1651
- ], 8, zn)) : (y(), w("span", {
1652
- key: 1,
1653
- title: a.label
1654
- }, I(a.label), 9, Hn))
1655
- ]),
1656
- _: 2
1657
- }, 1032, ["disabled", "item-data", "onItemClick"])), [
1658
- [G, !a.isFilter || !e.state.inputValue]
1659
- ])), 128))
1660
- ], 2)), [
1661
- [u, e.isLoading]
1662
- ]) : e.state.prevItem.type === "checkbox" ? H((y(), w("div", {
1733
+ S("div", {
1734
+ class: "tvp-search-box__virtual-phantom",
1735
+ style: oe({ height: e.vsTotalHeight + "px" })
1736
+ }, [
1737
+ S("div", {
1738
+ class: "tvp-search-box__virtual-content",
1739
+ style: oe({ transform: "translateY(" + e.vsOffsetY + "px)" })
1740
+ }, [
1741
+ (I(!0), M(H, null, z(e.vsVisibleItems, (l, h) => (I(), F(f, {
1742
+ key: e.vsStartIndex + h + (l.field || l.label),
1743
+ disabled: l.isChecked,
1744
+ class: "tvp-search-box__dropdown-item",
1745
+ "item-data": l,
1746
+ onItemClick: () => e.selectRadioItem(l)
1747
+ }, {
1748
+ default: E(() => [
1749
+ l.match ? (I(), M("span", {
1750
+ key: 0,
1751
+ title: l.label
1752
+ }, [
1753
+ (I(!0), M(H, null, z(l.match, (g, T) => (I(), M("span", { key: T }, [
1754
+ g.toLowerCase() === l.hightlighStr ? (I(), M("span", Uo, w(g), 1)) : (I(), M("span", jo, w(g), 1))
1755
+ ]))), 128))
1756
+ ], 8, zo)) : (I(), M("span", {
1757
+ key: 1,
1758
+ title: l.label
1759
+ }, w(l.label), 9, Ko))
1760
+ ]),
1761
+ _: 2
1762
+ }, 1032, ["disabled", "item-data", "onItemClick"]))), 128))
1763
+ ], 4)
1764
+ ], 4)
1765
+ ], 38)), [
1766
+ [p, e.isLoading]
1767
+ ]) : e.state.prevItem.type === "checkbox" ? Y((I(), M("div", {
1663
1768
  key: 2,
1664
- class: ce(e.isLoading && "tvp-search-box__loading-box")
1769
+ class: ve(e.isLoading && "tvp-search-box__loading-box")
1665
1770
  }, [
1666
- e.showCheckBoxList ? (y(), w("div", Kn, [
1667
- D("div", Gn, [
1668
- M(m, {
1771
+ e.showCheckBoxList ? (I(), M("div", {
1772
+ key: 0,
1773
+ class: "tvp-search-box__checkbox-wrap",
1774
+ style: oe({ maxHeight: e.panelMaxHeight })
1775
+ }, [
1776
+ S("div", {
1777
+ ref: "vsScrollEl",
1778
+ class: "tvp-search-box__virtual-list tvp-search-box__checkbox-scroll",
1779
+ onScroll: t[4] || (t[4] = (...l) => e.vsHandleScroll && e.vsHandleScroll(...l))
1780
+ }, [
1781
+ D(m, {
1669
1782
  modelValue: e.state.checkAll,
1670
- "onUpdate:modelValue": t[1] || (t[1] = (a) => e.state.checkAll = a),
1783
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => e.state.checkAll = l),
1671
1784
  class: "tvp-search-box__checkbox"
1672
1785
  }, {
1673
1786
  default: E(() => [
1674
- M(b, { class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item" }, {
1787
+ D(f, { class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item" }, {
1675
1788
  default: E(() => [
1676
- M(v, {
1789
+ D(b, {
1677
1790
  modelValue: e.state.checkAll,
1678
- "onUpdate:modelValue": t[0] || (t[0] = (a) => e.state.checkAll = a),
1791
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => e.state.checkAll = l),
1679
1792
  indeterminate: e.state.isIndeterminate
1680
1793
  }, {
1681
1794
  default: E(() => [
1682
- K(I(e.t("tvp.tvpSearchbox.selectAll")), 1)
1795
+ G(w(e.t("tvp.tvpSearchbox.selectAll")), 1)
1683
1796
  ]),
1684
1797
  _: 1
1685
1798
  }, 8, ["modelValue", "indeterminate"])
@@ -1689,87 +1802,95 @@ function vo(e, t, n, l, c, i) {
1689
1802
  ]),
1690
1803
  _: 1
1691
1804
  }, 8, ["modelValue"]),
1692
- M(m, {
1805
+ D(m, {
1693
1806
  modelValue: e.state.checkboxGroup,
1694
- "onUpdate:modelValue": t[2] || (t[2] = (a) => e.state.checkboxGroup = a),
1807
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => e.state.checkboxGroup = l),
1695
1808
  class: "tvp-search-box__checkbox"
1696
1809
  }, {
1697
1810
  default: E(() => [
1698
- (y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
1699
- key: (a.field || a.label) + h,
1700
- class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
1701
- }, {
1702
- default: E(() => [
1703
- M(v, {
1704
- label: e.state.prevItem.label + a.label,
1705
- title: a.label,
1706
- class: "tvp-search-box__checkbox-item-label"
1811
+ S("div", {
1812
+ class: "tvp-search-box__virtual-phantom",
1813
+ style: oe({ height: e.vsTotalHeight + "px" })
1814
+ }, [
1815
+ S("div", {
1816
+ class: "tvp-search-box__virtual-content",
1817
+ style: oe({ transform: "translateY(" + e.vsOffsetY + "px)" })
1818
+ }, [
1819
+ (I(!0), M(H, null, z(e.vsVisibleItems, (l, h) => (I(), F(f, {
1820
+ key: (l.field || l.label) + e.vsStartIndex + h,
1821
+ class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
1707
1822
  }, {
1708
1823
  default: E(() => [
1709
- K(I(a.label), 1)
1824
+ D(b, {
1825
+ label: e.state.prevItem.label + l.label,
1826
+ title: l.label,
1827
+ class: "tvp-search-box__checkbox-item-label"
1828
+ }, {
1829
+ default: E(() => [
1830
+ G(w(l.label), 1)
1831
+ ]),
1832
+ _: 2
1833
+ }, 1032, ["label", "title"])
1710
1834
  ]),
1711
1835
  _: 2
1712
- }, 1032, ["label", "title"])
1713
- ]),
1714
- _: 2
1715
- }, 1024)), [
1716
- [G, !a.isFilter]
1717
- ])), 128))
1836
+ }, 1024))), 128))
1837
+ ], 4)
1838
+ ], 4)
1718
1839
  ]),
1719
1840
  _: 1
1720
1841
  }, 8, ["modelValue"])
1721
- ]),
1722
- D("div", qn, [
1723
- M(p, {
1842
+ ], 544),
1843
+ S("div", Go, [
1844
+ D(r, {
1724
1845
  size: "mini",
1725
- onClick: t[3] || (t[3] = (a) => e.selectCheckbox(!1))
1846
+ onClick: t[5] || (t[5] = (l) => e.selectCheckbox(!1))
1726
1847
  }, {
1727
1848
  default: E(() => [
1728
- K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
1849
+ G(w(e.t("tvp.tvpSearchbox.cancel")), 1)
1729
1850
  ]),
1730
1851
  _: 1
1731
1852
  }),
1732
- M(p, {
1853
+ D(r, {
1733
1854
  size: "mini",
1734
- onClick: t[4] || (t[4] = (a) => e.selectCheckbox(!0))
1855
+ onClick: t[6] || (t[6] = (l) => e.selectCheckbox(!0))
1735
1856
  }, {
1736
1857
  default: E(() => [
1737
- K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
1858
+ G(w(e.t("tvp.tvpSearchbox.confirm")), 1)
1738
1859
  ]),
1739
1860
  _: 1
1740
1861
  })
1741
1862
  ])
1742
- ])) : A("", !0)
1863
+ ], 4)) : B("", !0)
1743
1864
  ], 2)), [
1744
- [u, e.isLoading]
1745
- ]) : e.state.prevItem.type === "numRange" ? (y(), w("div", Zn, [
1746
- D("div", Yn, [
1747
- D("div", Qn, I(e.t("tvp.tvpSearchbox.rangeNumberTitle")), 1),
1748
- D("div", Wn, I(e.t("tvp.tvpSearchbox.minValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
1749
- M(o, {
1865
+ [p, e.isLoading]
1866
+ ]) : e.state.prevItem.type === "numRange" ? (I(), M("div", Yo, [
1867
+ S("div", qo, [
1868
+ S("div", Zo, w(e.t("tvp.tvpSearchbox.rangeNumberTitle")), 1),
1869
+ S("div", Xo, w(e.t("tvp.tvpSearchbox.minValueText")) + w(e.state.prevItem.unit ? `(${e.state.prevItem.unit})` : ""), 1),
1870
+ D(u, {
1750
1871
  prop: e.state.curMinNumVar,
1751
1872
  class: "tvp-search-box__number-item",
1752
1873
  "show-message": e.state.numberShowMessage
1753
1874
  }, {
1754
1875
  default: E(() => [
1755
- M(r, {
1876
+ D(i, {
1756
1877
  modelValue: e.state[e.state.curMinNumVar],
1757
- "onUpdate:modelValue": t[5] || (t[5] = (a) => e.state[e.state.curMinNumVar] = a),
1878
+ "onUpdate:modelValue": t[7] || (t[7] = (l) => e.state[e.state.curMinNumVar] = l),
1758
1879
  type: "number",
1759
1880
  class: "tvp-search-box__number-input"
1760
1881
  }, null, 8, ["modelValue"])
1761
1882
  ]),
1762
1883
  _: 1
1763
1884
  }, 8, ["prop", "show-message"]),
1764
- D("div", Jn, I(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
1765
- M(o, {
1885
+ S("div", Qo, w(e.t("tvp.tvpSearchbox.maxValueText")) + w(e.state.prevItem.unit ? `(${e.state.prevItem.unit})` : ""), 1),
1886
+ D(u, {
1766
1887
  prop: e.state.curMaxNumVar,
1767
1888
  class: "tvp-search-box__number-item"
1768
1889
  }, {
1769
1890
  default: E(() => [
1770
- M(r, {
1891
+ D(i, {
1771
1892
  modelValue: e.state[e.state.curMaxNumVar],
1772
- "onUpdate:modelValue": t[6] || (t[6] = (a) => e.state[e.state.curMaxNumVar] = a),
1893
+ "onUpdate:modelValue": t[8] || (t[8] = (l) => e.state[e.state.curMaxNumVar] = l),
1773
1894
  type: "number",
1774
1895
  class: "tvp-search-box__number-input"
1775
1896
  }, null, 8, ["modelValue"])
@@ -1777,41 +1898,41 @@ function vo(e, t, n, l, c, i) {
1777
1898
  _: 1
1778
1899
  }, 8, ["prop"])
1779
1900
  ]),
1780
- D("div", Xn, [
1781
- M(p, {
1901
+ S("div", Wo, [
1902
+ D(r, {
1782
1903
  size: "mini",
1783
- onClick: t[7] || (t[7] = (a) => e.sizeChange(!1))
1904
+ onClick: t[9] || (t[9] = (l) => e.sizeChange(!1))
1784
1905
  }, {
1785
1906
  default: E(() => [
1786
- K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
1907
+ G(w(e.t("tvp.tvpSearchbox.cancel")), 1)
1787
1908
  ]),
1788
1909
  _: 1
1789
1910
  }),
1790
- M(p, {
1911
+ D(r, {
1791
1912
  size: "mini",
1792
- onClick: t[8] || (t[8] = Y((a) => e.sizeChange(!0), ["stop"]))
1913
+ onClick: t[10] || (t[10] = Z((l) => e.sizeChange(!0), ["stop"]))
1793
1914
  }, {
1794
1915
  default: E(() => [
1795
- K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
1916
+ G(w(e.t("tvp.tvpSearchbox.confirm")), 1)
1796
1917
  ]),
1797
1918
  _: 1
1798
1919
  })
1799
1920
  ])
1800
- ])) : e.state.prevItem.type === "dateRange" ? (y(), w("div", eo, [
1801
- D("div", to, [
1802
- D("div", no, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1921
+ ])) : e.state.prevItem.type === "dateRange" ? (I(), M("div", Jo, [
1922
+ S("div", en, [
1923
+ S("div", tn, w(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1803
1924
  value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1804
1925
  }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
1805
- D("div", oo, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1806
- M(o, {
1926
+ S("div", on, w(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1927
+ D(u, {
1807
1928
  prop: "startDate",
1808
1929
  "show-message": !!e.state.prevItem.maxTimeLength,
1809
1930
  class: "tvp-search-box__date-item"
1810
1931
  }, {
1811
1932
  default: E(() => [
1812
- M(d, {
1933
+ D(s, {
1813
1934
  modelValue: e.state.startDate,
1814
- "onUpdate:modelValue": t[9] || (t[9] = (a) => e.state.startDate = a),
1935
+ "onUpdate:modelValue": t[11] || (t[11] = (l) => e.state.startDate = l),
1815
1936
  format: e.state.prevItem.format || e.state.dateRangeFormat,
1816
1937
  "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1817
1938
  "picker-options": e.pickerOptions(e.state.startDate, "endDate"),
@@ -1821,15 +1942,15 @@ function vo(e, t, n, l, c, i) {
1821
1942
  ]),
1822
1943
  _: 1
1823
1944
  }, 8, ["show-message"]),
1824
- D("div", lo, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
1825
- M(o, {
1945
+ S("div", nn, w(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
1946
+ D(u, {
1826
1947
  prop: "endDate",
1827
1948
  class: "tvp-search-box__date-item"
1828
1949
  }, {
1829
1950
  default: E(() => [
1830
- M(d, {
1951
+ D(s, {
1831
1952
  modelValue: e.state.endDate,
1832
- "onUpdate:modelValue": t[10] || (t[10] = (a) => e.state.endDate = a),
1953
+ "onUpdate:modelValue": t[12] || (t[12] = (l) => e.state.endDate = l),
1833
1954
  format: e.state.prevItem.format || e.state.dateRangeFormat,
1834
1955
  "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1835
1956
  "picker-options": e.pickerOptions(e.state.startDate),
@@ -1841,41 +1962,41 @@ function vo(e, t, n, l, c, i) {
1841
1962
  _: 1
1842
1963
  })
1843
1964
  ]),
1844
- D("div", ao, [
1845
- M(p, {
1965
+ S("div", ln, [
1966
+ D(r, {
1846
1967
  size: "mini",
1847
- onClick: t[11] || (t[11] = (a) => e.onConfirmDate(!1))
1968
+ onClick: t[13] || (t[13] = (l) => e.onConfirmDate(!1))
1848
1969
  }, {
1849
1970
  default: E(() => [
1850
- K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
1971
+ G(w(e.t("tvp.tvpSearchbox.cancel")), 1)
1851
1972
  ]),
1852
1973
  _: 1
1853
1974
  }),
1854
- M(p, {
1975
+ D(r, {
1855
1976
  size: "mini",
1856
- onClick: t[12] || (t[12] = (a) => e.onConfirmDate(!0))
1977
+ onClick: t[14] || (t[14] = (l) => e.onConfirmDate(!0))
1857
1978
  }, {
1858
1979
  default: E(() => [
1859
- K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
1980
+ G(w(e.t("tvp.tvpSearchbox.confirm")), 1)
1860
1981
  ]),
1861
1982
  _: 1
1862
1983
  })
1863
1984
  ])
1864
- ])) : e.state.prevItem.type === "datetimeRange" ? (y(), w("div", ro, [
1865
- D("div", so, [
1866
- D("div", io, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1985
+ ])) : e.state.prevItem.type === "datetimeRange" ? (I(), M("div", an, [
1986
+ S("div", sn, [
1987
+ S("div", rn, w(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1867
1988
  value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1868
1989
  }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
1869
- D("div", po, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1870
- M(o, {
1990
+ S("div", pn, w(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1991
+ D(u, {
1871
1992
  prop: "startDateTime",
1872
1993
  "show-message": !!e.state.prevItem.maxTimeLength,
1873
1994
  class: "tvp-search-box__date-item"
1874
1995
  }, {
1875
1996
  default: E(() => [
1876
- M(d, {
1997
+ D(s, {
1877
1998
  modelValue: e.state.startDateTime,
1878
- "onUpdate:modelValue": t[13] || (t[13] = (a) => e.state.startDateTime = a),
1999
+ "onUpdate:modelValue": t[15] || (t[15] = (l) => e.state.startDateTime = l),
1879
2000
  type: "datetime",
1880
2001
  isutc8: !0,
1881
2002
  format: e.state.prevItem.format || e.state.datetimeRangeFormat,
@@ -1888,15 +2009,15 @@ function vo(e, t, n, l, c, i) {
1888
2009
  ]),
1889
2010
  _: 1
1890
2011
  }, 8, ["show-message"]),
1891
- D("div", uo, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
1892
- M(o, {
2012
+ S("div", un, w(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2013
+ D(u, {
1893
2014
  prop: "endDateTime",
1894
2015
  class: "tvp-search-box__date-item"
1895
2016
  }, {
1896
2017
  default: E(() => [
1897
- M(d, {
2018
+ D(s, {
1898
2019
  modelValue: e.state.endDateTime,
1899
- "onUpdate:modelValue": t[14] || (t[14] = (a) => e.state.endDateTime = a),
2020
+ "onUpdate:modelValue": t[16] || (t[16] = (l) => e.state.endDateTime = l),
1900
2021
  type: "datetime",
1901
2022
  isutc8: !0,
1902
2023
  format: e.state.prevItem.format || e.state.datetimeRangeFormat,
@@ -1910,57 +2031,71 @@ function vo(e, t, n, l, c, i) {
1910
2031
  _: 1
1911
2032
  })
1912
2033
  ]),
1913
- D("div", co, [
1914
- M(p, {
2034
+ S("div", cn, [
2035
+ D(r, {
1915
2036
  size: "mini",
1916
- onClick: t[15] || (t[15] = (a) => e.onConfirmDate(!1, !0))
2037
+ onClick: t[17] || (t[17] = (l) => e.onConfirmDate(!1, !0))
1917
2038
  }, {
1918
2039
  default: E(() => [
1919
- K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
2040
+ G(w(e.t("tvp.tvpSearchbox.cancel")), 1)
1920
2041
  ]),
1921
2042
  _: 1
1922
2043
  }),
1923
- M(p, {
2044
+ D(r, {
1924
2045
  size: "mini",
1925
- onClick: t[16] || (t[16] = (a) => e.onConfirmDate(!0, !0))
2046
+ onClick: t[18] || (t[18] = (l) => e.onConfirmDate(!0, !0))
1926
2047
  }, {
1927
2048
  default: E(() => [
1928
- K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
2049
+ G(w(e.t("tvp.tvpSearchbox.confirm")), 1)
1929
2050
  ]),
1930
2051
  _: 1
1931
2052
  })
1932
2053
  ])
1933
- ])) : e.state.prevItem.type === "map" ? H((y(), w("div", mo, [
1934
- e.state.isShowTagKey ? (y(), w("span", fo, I(e.t("tvp.tvpSearchbox.tagKey")), 1)) : (y(), w("span", ho, I(e.t("tvp.tvpSearchbox.tagValue")), 1)),
1935
- (y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
1936
- key: a.label + a.value + h,
1937
- disabled: a.isChecked,
1938
- class: "tvp-search-box__dropdown-item",
1939
- "item-data": a,
1940
- onItemClick: () => e.selectFirstMap(a, e.state.isShowTagKey)
1941
- }, {
1942
- default: E(() => [
1943
- D("span", {
1944
- title: a.label
1945
- }, I(a.label), 9, bo)
1946
- ]),
1947
- _: 2
1948
- }, 1032, ["disabled", "item-data", "onItemClick"])), [
1949
- [G, !a.isFilter]
1950
- ])), 128))
2054
+ ])) : e.state.prevItem.type === "map" ? Y((I(), M("div", dn, [
2055
+ S("div", {
2056
+ ref: "vsScrollEl",
2057
+ class: "tvp-search-box__virtual-list",
2058
+ style: oe({ maxHeight: e.panelMaxHeight }),
2059
+ onScroll: t[19] || (t[19] = (...l) => e.vsHandleScroll && e.vsHandleScroll(...l))
2060
+ }, [
2061
+ e.state.isShowTagKey ? (I(), M("span", mn, w(e.t("tvp.tvpSearchbox.tagKey")), 1)) : (I(), M("span", hn, w(e.t("tvp.tvpSearchbox.tagValue")), 1)),
2062
+ S("div", {
2063
+ class: "tvp-search-box__virtual-phantom",
2064
+ style: oe({ height: e.vsTotalHeight + "px" })
2065
+ }, [
2066
+ S("div", {
2067
+ class: "tvp-search-box__virtual-content",
2068
+ style: oe({ transform: "translateY(" + e.vsOffsetY + "px)" })
2069
+ }, [
2070
+ (I(!0), M(H, null, z(e.vsVisibleItems, (l, h) => (I(), F(f, {
2071
+ key: l.label + l.value + e.vsStartIndex + h,
2072
+ disabled: l.isChecked,
2073
+ class: "tvp-search-box__dropdown-item",
2074
+ "item-data": l,
2075
+ onItemClick: () => e.selectFirstMap(l, e.state.isShowTagKey)
2076
+ }, {
2077
+ default: E(() => [
2078
+ S("span", {
2079
+ title: l.label
2080
+ }, w(l.label), 9, fn)
2081
+ ]),
2082
+ _: 2
2083
+ }, 1032, ["disabled", "item-data", "onItemClick"]))), 128))
2084
+ ], 4)
2085
+ ], 4)
2086
+ ], 36)
1951
2087
  ])), [
1952
- [u, e.isLoading]
1953
- ]) : A("", !0)
2088
+ [p, e.isLoading]
2089
+ ]) : B("", !0)
1954
2090
  ]);
1955
2091
  }
1956
- const go = /* @__PURE__ */ Ne(Fn, [["render", vo]]);
1957
- const yo = ve({
2092
+ const bn = /* @__PURE__ */ Fe(Fo, [["render", vn]]), gn = ke({
1958
2093
  model: {
1959
2094
  prop: "modelValue",
1960
2095
  event: "update:modelValue"
1961
2096
  },
1962
2097
  props: {
1963
- ...ge,
2098
+ ...we,
1964
2099
  tiny_mode: {
1965
2100
  type: String,
1966
2101
  default: "pc"
@@ -1997,6 +2132,10 @@ const yo = ve({
1997
2132
  type: String,
1998
2133
  default: ""
1999
2134
  },
2135
+ defaultFieldReplace: {
2136
+ type: Boolean,
2137
+ default: !1
2138
+ },
2000
2139
  editable: {
2001
2140
  type: Boolean,
2002
2141
  default: !1
@@ -2023,81 +2162,81 @@ const yo = ve({
2023
2162
  default: ""
2024
2163
  }
2025
2164
  },
2026
- emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "second-level-enter", "clear", "tagClick", "help"],
2165
+ emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "second-level-enter", "clear", "tagClick", "help", "validate-error"],
2027
2166
  components: {
2028
- TinyTag: at,
2029
- TinyInput: Ae,
2030
- TinyDropdown: rt,
2031
- TinyDropdownMenu: st,
2032
- TinyButton: ze,
2033
- TinyTooltip: it,
2034
- TinyDatePicker: xe,
2035
- TinyForm: pt,
2036
- TinyFormItem: Be,
2037
- TinyPopover: ut,
2038
- TinySelect: ct,
2039
- TinyOption: dt,
2040
- TinySearchBoxFirstLevelPanel: Nn,
2041
- TinySearchBoxSecondLevelPanel: go,
2167
+ TinyTag: rt,
2168
+ TinyInput: je,
2169
+ TinyDropdown: it,
2170
+ TinyDropdownMenu: pt,
2171
+ TinyButton: Ke,
2172
+ TinyTooltip: ut,
2173
+ TinyDatePicker: Ue,
2174
+ TinyForm: ct,
2175
+ TinyFormItem: ze,
2176
+ TinyPopover: dt,
2177
+ TinySelect: mt,
2178
+ TinyOption: ht,
2179
+ TinySearchBoxFirstLevelPanel: No,
2180
+ TinySearchBoxSecondLevelPanel: bn,
2042
2181
  // 图标组件
2043
- TinyIconSearch: mt(),
2044
- TinyIconClose: ft(),
2045
- TinyIconHelpQuery: ht()
2182
+ TinyIconSearch: ft(),
2183
+ TinyIconClose: vt(),
2184
+ TinyIconHelpQuery: bt()
2046
2185
  },
2047
2186
  setup(e, t) {
2048
- return Le({ props: e, context: t, renderless: dn, api: un });
2187
+ return Pe({ props: e, context: t, renderless: co, api: po });
2049
2188
  }
2050
- }), Vo = { class: "tvp-search-box__tag-value" }, ko = {
2189
+ }), yn = { class: "tvp-search-box__tag-value" }, In = {
2051
2190
  key: 1,
2052
2191
  class: "tvp-search-box__placeholder"
2053
- }, Io = { class: "tvp-search-box__input-wrapper" }, wo = { class: "tvp-search-box__prop" }, To = { class: "tvp-search-box__input-separator" }, So = { class: "tvp-search-box__date-wrap" }, Do = { class: "tvp-search-box__dropdown-start" }, Co = {
2192
+ }, Vn = { class: "tvp-search-box__input-wrapper" }, kn = { class: "tvp-search-box__prop" }, wn = { class: "tvp-search-box__input-separator" }, Tn = { class: "tvp-search-box__date-wrap" }, Sn = { class: "tvp-search-box__dropdown-start" }, Mn = {
2054
2193
  key: 0,
2055
2194
  class: "tvp-search-box__dropdown-end"
2056
- }, Mo = {
2195
+ }, Cn = {
2057
2196
  key: 2,
2058
2197
  class: "tvp-search-box__dropdown-end"
2059
- }, Eo = {
2198
+ }, Dn = {
2060
2199
  key: 4,
2061
2200
  class: "tvp-search-box__number"
2062
- }, $o = { class: "tvp-search-box__dropdown-start" }, Lo = { class: "tvp-search-box__dropdown-end" }, _o = {
2201
+ }, En = { class: "tvp-search-box__dropdown-start" }, $n = { class: "tvp-search-box__dropdown-end" }, Ln = {
2063
2202
  key: 5,
2064
2203
  class: "tvp-search-box__date-wrap"
2065
- }, Ro = { class: "tvp-search-box__dropdown-title" }, No = { class: "tvp-search-box__dropdown-start" }, Po = { class: "tvp-search-box__dropdown-end" }, Oo = {
2204
+ }, _n = { class: "tvp-search-box__dropdown-title" }, Rn = { class: "tvp-search-box__dropdown-start" }, Nn = { class: "tvp-search-box__dropdown-end" }, Pn = {
2066
2205
  key: 6,
2067
2206
  class: "tvp-search-box__date-wrap"
2068
- }, Fo = { class: "tvp-search-box__dropdown-title" }, Bo = { class: "tvp-search-box__dropdown-start" }, xo = { class: "tvp-search-box__dropdown-end" }, Ao = { class: "tvp-search-box__bottom-btn" }, zo = {
2207
+ }, On = { class: "tvp-search-box__dropdown-title" }, xn = { class: "tvp-search-box__dropdown-start" }, Fn = { class: "tvp-search-box__dropdown-end" }, Bn = { class: "tvp-search-box__bottom-btn" }, Hn = {
2069
2208
  key: 1,
2070
2209
  class: "tvp-search-box__panel-box"
2071
2210
  };
2072
- function Uo(e, t, n, l, c, i) {
2073
- const b = O("tiny-icon-search"), v = O("tiny-tag"), m = O("tiny-icon-close"), p = O("tiny-icon-help-query"), r = O("tiny-tooltip"), o = O("tiny-input"), d = O("TinySearchBoxFirstLevelPanel"), u = O("TinySearchBoxSecondLevelPanel"), s = O("tiny-popover"), a = O("tiny-option"), h = O("tiny-select"), g = O("tiny-form-item"), S = O("tiny-date-picker"), _ = O("tiny-button"), V = O("tiny-form");
2074
- return y(), w("div", {
2075
- class: ce([
2211
+ function An(e, t, o, n, d, c) {
2212
+ const f = x("tiny-icon-search"), b = x("tiny-tag"), m = x("tiny-icon-close"), r = x("tiny-icon-help-query"), i = x("tiny-tooltip"), u = x("tiny-input"), s = x("TinySearchBoxFirstLevelPanel"), p = x("TinySearchBoxSecondLevelPanel"), v = x("tiny-popover"), l = x("tiny-option"), h = x("tiny-select"), g = x("tiny-form-item"), T = x("tiny-date-picker"), $ = x("tiny-button"), y = x("tiny-form");
2213
+ return I(), M("div", {
2214
+ class: ve([
2076
2215
  "tvp-search-box",
2077
2216
  e.size === "small" ? "tvp-search-box--small" : "",
2078
2217
  e.showPrefixIcon ? "" : "hide-prefix-icon"
2079
2218
  ]),
2080
- onClick: t[21] || (t[21] = Y((f) => e.showPopover(e.state, !1), ["stop"]))
2219
+ onClick: t[21] || (t[21] = Z((a) => e.showPopover(e.state, !1), ["stop"]))
2081
2220
  }, [
2082
- e.showPrefixIcon ? (y(), F(b, {
2221
+ e.showPrefixIcon ? (I(), F(f, {
2083
2222
  key: 0,
2084
2223
  class: "tvp-search-box__prefix"
2085
- })) : A("", !0),
2086
- (y(!0), w(x, null, U(e.modelValue, (f, T) => (y(), F(v, {
2087
- key: f.field + T,
2224
+ })) : B("", !0),
2225
+ (I(!0), M(H, null, z(e.modelValue, (a, V) => (I(), F(b, {
2226
+ key: a.field + V,
2088
2227
  closable: "",
2089
- class: ce(["tvp-search-box__tag", e.editable && f.type !== "map" ? "tvp-search-box__tag-editor" : ""]),
2090
- title: `${f.label} ${f.operator || ":"} ${f.value}`,
2091
- onClose: (k) => e.deleteTag(f),
2092
- onClick: Y((k) => e.editTag(f, T, k), ["stop"])
2228
+ class: ve(["tvp-search-box__tag", e.editable && a.type !== "map" ? "tvp-search-box__tag-editor" : ""]),
2229
+ title: `${a.label} ${a.operator || ":"} ${a.value}`,
2230
+ onClose: (k) => e.deleteTag(a),
2231
+ onClick: Z((k) => e.editTag(a, V, k), ["stop"])
2093
2232
  }, {
2094
2233
  default: E(() => [
2095
- D("span", Vo, I(f.label) + " " + I(f.operator || ":") + " " + I(f.value), 1)
2234
+ S("span", yn, w(a.label) + " " + w(a.operator || ":") + " " + w(a.value), 1)
2096
2235
  ]),
2097
2236
  _: 2
2098
2237
  }, 1032, ["class", "title", "onClose", "onClick"]))), 128)),
2099
- e.modelValue.length ? (y(), w("span", ko)) : A("", !0),
2100
- M(V, {
2238
+ e.modelValue.length ? (I(), M("span", In)) : B("", !0),
2239
+ D(y, {
2101
2240
  ref: "formRef",
2102
2241
  model: e.state,
2103
2242
  rules: e.state.formRules,
@@ -2108,19 +2247,19 @@ function Uo(e, t, n, l, c, i) {
2108
2247
  class: "tvp-search-box__form"
2109
2248
  }, {
2110
2249
  default: E(() => [
2111
- D("div", Io, [
2112
- D("section", wo, [
2113
- H(D("span", null, I(e.state.propItem.label) + " " + I(`${e.state.operatorValue ? e.state.operatorValue : ""} `), 513), [
2114
- [G, e.state.propItem.label]
2250
+ S("div", Vn, [
2251
+ S("section", kn, [
2252
+ Y(S("span", null, w(e.state.propItem.label) + " " + w(`${e.state.operatorValue ? e.state.operatorValue : ""} `), 513), [
2253
+ [J, e.state.propItem.label]
2115
2254
  ]),
2116
- H(D("span", null, I(e.state.propItem.value), 513), [
2117
- [G, e.state.propItem.value]
2255
+ Y(S("span", null, w(e.state.propItem.value), 513), [
2256
+ [J, e.state.propItem.value]
2118
2257
  ])
2119
2258
  ]),
2120
- M(s, {
2259
+ D(v, {
2121
2260
  ref: "dropdownRef",
2122
2261
  modelValue: e.state.visible,
2123
- "onUpdate:modelValue": t[5] || (t[5] = (f) => e.state.visible = f),
2262
+ "onUpdate:modelValue": t[5] || (t[5] = (a) => e.state.visible = a),
2124
2263
  trigger: "manual",
2125
2264
  placement: "bottom-start",
2126
2265
  class: "tvp-search-box__dropdown",
@@ -2129,58 +2268,58 @@ function Uo(e, t, n, l, c, i) {
2129
2268
  "append-to-body": e.appendToBody
2130
2269
  }, {
2131
2270
  reference: E(() => [
2132
- M(o, {
2271
+ D(u, {
2133
2272
  ref: "inputRef",
2134
2273
  modelValue: e.state.inputValue,
2135
- "onUpdate:modelValue": t[0] || (t[0] = (f) => e.state.inputValue = f),
2274
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => e.state.inputValue = a),
2136
2275
  class: "tvp-search-box__input",
2137
2276
  placeholder: e.state.placeholder,
2138
2277
  maxlength: e.maxlength && e.maxlength + 1,
2139
2278
  onKeydown: [
2140
- Oe(Y(e.backspaceDeleteTag, ["stop"]), ["delete"]),
2141
- Oe(Y(e.createTag, ["stop"]), ["enter"])
2279
+ He(Z(e.backspaceDeleteTag, ["stop"]), ["delete"]),
2280
+ He(Z(e.createTag, ["stop"]), ["enter"])
2142
2281
  ],
2143
2282
  onInput: e.handleInput,
2144
2283
  onClick: e.handleClick
2145
2284
  }, {
2146
2285
  suffix: E(() => {
2147
- var f, T, k, $, C, N, L, P;
2286
+ var a, V, k, L, C, P, R, N;
2148
2287
  return [
2149
- H(M(m, {
2288
+ Y(D(m, {
2150
2289
  class: "tvp-search-box__input-close",
2151
- onClick: Y(e.clearTag, ["stop"])
2290
+ onClick: Z(e.clearTag, ["stop"])
2152
2291
  }, null, 8, ["onClick"]), [
2153
- [G, e.isShowClose]
2292
+ [J, e.isShowClose]
2154
2293
  ]),
2155
- H(D("span", To, null, 512), [
2294
+ Y(S("span", wn, null, 512), [
2156
2295
  [
2157
- G,
2158
- e.isShowClose && (e.showHelp || ((T = (f = e.state.instance) == null ? void 0 : f.$slots) == null ? void 0 : T["suffix-icon"]) || (($ = (k = e.state.instance) == null ? void 0 : k.slots) == null ? void 0 : $["suffix-icon"]))
2296
+ J,
2297
+ e.isShowClose && (e.showHelp || ((V = (a = e.state.instance) == null ? void 0 : a.$slots) == null ? void 0 : V["suffix-icon"]) || ((L = (k = e.state.instance) == null ? void 0 : k.slots) == null ? void 0 : L["suffix-icon"]))
2159
2298
  ]
2160
2299
  ]),
2161
- (N = (C = e.state.instance) == null ? void 0 : C.$slots) != null && N["suffix-icon"] || (P = (L = e.state.instance) == null ? void 0 : L.slots) != null && P["suffix-icon"] ? (y(), w("span", {
2300
+ (P = (C = e.state.instance) == null ? void 0 : C.$slots) != null && P["suffix-icon"] || (N = (R = e.state.instance) == null ? void 0 : R.slots) != null && N["suffix-icon"] ? (I(), M("span", {
2162
2301
  key: 0,
2163
- class: ce(e.showHelp ? "tvp-search-box__suffix-icon-slot" : "tvp-search-box__suffix-icon-slot-no-help")
2302
+ class: ve(e.showHelp ? "tvp-search-box__suffix-icon-slot" : "tvp-search-box__suffix-icon-slot-no-help")
2164
2303
  }, [
2165
- ue(e.$slots, "suffix-icon")
2166
- ], 2)) : A("", !0),
2167
- e.showHelp ? (y(), F(r, {
2304
+ fe(e.$slots, "suffix-icon")
2305
+ ], 2)) : B("", !0),
2306
+ e.showHelp ? (I(), F(i, {
2168
2307
  key: 1,
2169
2308
  effect: "light",
2170
2309
  content: e.t("tvp.tvpSearchbox.help"),
2171
2310
  placement: "top"
2172
2311
  }, {
2173
2312
  default: E(() => [
2174
- M(p, {
2313
+ D(r, {
2175
2314
  class: "tvp-search-box__input-help",
2176
- onClick: Y(e.helpClick, ["stop"])
2315
+ onClick: Z(e.helpClick, ["stop"])
2177
2316
  }, null, 8, ["onClick"])
2178
2317
  ]),
2179
2318
  _: 1
2180
- }, 8, ["content"])) : A("", !0),
2181
- M(b, {
2319
+ }, 8, ["content"])) : B("", !0),
2320
+ D(f, {
2182
2321
  class: "tvp-search-box__input-search",
2183
- onClick: Y(e.createTag, ["stop"])
2322
+ onClick: Z(e.createTag, ["stop"])
2184
2323
  }, null, 8, ["onClick"])
2185
2324
  ];
2186
2325
  }),
@@ -2188,58 +2327,59 @@ function Uo(e, t, n, l, c, i) {
2188
2327
  }, 8, ["modelValue", "placeholder", "maxlength", "onKeydown", "onInput", "onClick"])
2189
2328
  ]),
2190
2329
  default: E(() => {
2191
- var f, T, k;
2330
+ var a, V, k;
2192
2331
  return [
2193
- D("div", {
2332
+ S("div", {
2194
2333
  class: "tvp-search-box__dropdown",
2195
- style: vt({ "max-height": e.panelMaxHeight }),
2196
- onMouseup: Y(() => {
2334
+ style: oe({ "max-height": e.panelMaxHeight }),
2335
+ onMouseup: Z(() => {
2197
2336
  }, ["stop"])
2198
2337
  }, [
2199
- H(D("div", null, [
2200
- (f = e.state.instance) != null && f.slots["first-panel"] ? ue(e.$slots, "first-panel", he({ key: 0 }, {
2338
+ Y(S("div", null, [
2339
+ (a = e.state.instance) != null && a.slots["first-panel"] ? fe(e.$slots, "first-panel", Ie({ key: 0 }, {
2201
2340
  state: e.state,
2202
2341
  handleEvents: e.handleEvents
2203
2342
  }, {
2204
- onClick: t[1] || (t[1] = Y(() => {
2343
+ onClick: t[1] || (t[1] = Z(() => {
2205
2344
  }, ["stop"]))
2206
- })) : (y(), F(d, {
2345
+ })) : (I(), F(s, {
2207
2346
  key: 1,
2208
2347
  state: e.state,
2209
2348
  handleEvents: e.handleEvents
2210
2349
  }, null, 8, ["state", "handleEvents"]))
2211
2350
  ], 512), [
2212
- [G, !e.state.propItem.label || ((T = e.state.inputValue) == null ? void 0 : T.trim())]
2351
+ [J, !e.state.propItem.label || ((V = e.state.inputValue) == null ? void 0 : V.trim())]
2213
2352
  ]),
2214
- H(D("div", null, [
2215
- (k = e.state.instance) != null && k.slots["second-panel"] ? ue(e.$slots, "second-panel", he({ key: 0 }, {
2353
+ Y(S("div", null, [
2354
+ (k = e.state.instance) != null && k.slots["second-panel"] ? fe(e.$slots, "second-panel", Ie({ key: 0 }, {
2216
2355
  state: e.state,
2217
2356
  pickerOptions: e.pickerOptions,
2218
2357
  handleEvents: e.handleEvents,
2219
2358
  back: () => e.resetInput(e.state)
2220
2359
  }, {
2221
- onClick: t[2] || (t[2] = Y(() => {
2360
+ onClick: t[2] || (t[2] = Z(() => {
2222
2361
  }, ["stop"]))
2223
- })) : e.state.prevItem.type !== "custom" ? (y(), F(u, {
2362
+ })) : e.state.prevItem.type !== "custom" ? (I(), F(p, {
2224
2363
  key: 1,
2225
2364
  state: e.state,
2226
2365
  "picker-options": e.pickerOptions,
2366
+ "panel-max-height": e.panelMaxHeight,
2227
2367
  onEvents: e.handleEvents
2228
- }, null, 8, ["state", "picker-options", "onEvents"])) : (y(), w("div", {
2368
+ }, null, 8, ["state", "picker-options", "panel-max-height", "onEvents"])) : (I(), M("div", {
2229
2369
  key: 2,
2230
2370
  class: "tvp-search-box__panel-box",
2231
- onClick: t[4] || (t[4] = ($) => e.showDropdown(e.state))
2371
+ onClick: t[4] || (t[4] = (L) => e.showDropdown(e.state))
2232
2372
  }, [
2233
- ue(e.$slots, e.state.prevItem.slotName, he({
2373
+ fe(e.$slots, e.state.prevItem.slotName, Ie({
2234
2374
  showDropdown: () => e.showDropdown(e.state),
2235
2375
  onConfirm: e.handleConfirm
2236
2376
  }, {
2237
- onClick: t[3] || (t[3] = Y(() => {
2377
+ onClick: t[3] || (t[3] = Z(() => {
2238
2378
  }, ["stop"]))
2239
2379
  }))
2240
2380
  ]))
2241
2381
  ], 512), [
2242
- [G, e.state.propItem.label]
2382
+ [J, e.state.propItem.label]
2243
2383
  ])
2244
2384
  ], 36)
2245
2385
  ];
@@ -2247,11 +2387,11 @@ function Uo(e, t, n, l, c, i) {
2247
2387
  _: 3
2248
2388
  }, 8, ["modelValue", "append-to-body"])
2249
2389
  ]),
2250
- e.editable ? (y(), F(s, {
2390
+ e.editable ? (I(), F(v, {
2251
2391
  key: 0,
2252
2392
  ref: "popoverRef",
2253
2393
  modelValue: e.state.popoverVisible,
2254
- "onUpdate:modelValue": t[20] || (t[20] = (f) => e.state.popoverVisible = f),
2394
+ "onUpdate:modelValue": t[20] || (t[20] = (a) => e.state.popoverVisible = a),
2255
2395
  placement: "bottom-start",
2256
2396
  "visible-arrow": !1,
2257
2397
  trigger: "manual",
@@ -2260,31 +2400,31 @@ function Uo(e, t, n, l, c, i) {
2260
2400
  "append-to-body": e.appendToBody
2261
2401
  }, {
2262
2402
  default: E(() => [
2263
- e.state.prevItem.type !== "custom" ? (y(), w(x, { key: 0 }, [
2264
- D("div", So, [
2265
- D("div", Do, I(e.t("tvp.tvpSearchbox.attributeType")), 1),
2266
- M(g, { class: "tvp-search-box__number-item" }, {
2403
+ e.state.prevItem.type !== "custom" ? (I(), M(H, { key: 0 }, [
2404
+ S("div", Tn, [
2405
+ S("div", Sn, w(e.t("tvp.tvpSearchbox.attributeType")), 1),
2406
+ D(g, { class: "tvp-search-box__number-item" }, {
2267
2407
  default: E(() => [
2268
- M(h, {
2408
+ D(h, {
2269
2409
  modelValue: e.state.selectValue,
2270
- "onUpdate:modelValue": t[7] || (t[7] = (f) => e.state.selectValue = f),
2410
+ "onUpdate:modelValue": t[7] || (t[7] = (a) => e.state.selectValue = a),
2271
2411
  searchable: "",
2272
2412
  disabled: e.state.prevItem.editAttrDisabled
2273
2413
  }, {
2274
2414
  default: E(() => [
2275
- (y(), F(a, {
2415
+ (I(), F(l, {
2276
2416
  key: e.state.allTypeAttri.label,
2277
2417
  label: e.t("tvp.tvpSearchbox.allProperty"),
2278
2418
  value: e.state.allTypeAttri.label,
2279
2419
  disabled: e.selectItemIsDisable(e.state.allTypeAttri),
2280
- onClick: t[6] || (t[6] = (f) => e.selectPropChange(e.state.allTypeAttri, e.selectItemIsDisable(e.state.allTypeAttri)))
2420
+ onClick: t[6] || (t[6] = (a) => e.selectPropChange(e.state.allTypeAttri, e.selectItemIsDisable(e.state.allTypeAttri)))
2281
2421
  }, null, 8, ["label", "value", "disabled"])),
2282
- (y(!0), w(x, null, U(e.state.recordItems, (f) => (y(), F(a, {
2283
- key: f.label,
2284
- label: f.label,
2285
- value: f.label,
2286
- disabled: e.selectItemIsDisable(f),
2287
- onClick: (T) => e.selectPropChange(f, e.selectItemIsDisable(f))
2422
+ (I(!0), M(H, null, z(e.state.recordItems, (a) => (I(), F(l, {
2423
+ key: a.label,
2424
+ label: a.label,
2425
+ value: a.label,
2426
+ disabled: e.selectItemIsDisable(a),
2427
+ onClick: (V) => e.selectPropChange(a, e.selectItemIsDisable(a))
2288
2428
  }, null, 8, ["label", "value", "disabled", "onClick"]))), 128))
2289
2429
  ]),
2290
2430
  _: 1
@@ -2292,57 +2432,57 @@ function Uo(e, t, n, l, c, i) {
2292
2432
  ]),
2293
2433
  _: 1
2294
2434
  }),
2295
- e.state.prevItem.operators ? (y(), w("div", Co, I(e.t("tvp.tvpSearchbox.operator")), 1)) : A("", !0),
2296
- e.state.prevItem.operators ? (y(), F(g, {
2435
+ e.state.prevItem.operators ? (I(), M("div", Mn, w(e.t("tvp.tvpSearchbox.operator")), 1)) : B("", !0),
2436
+ e.state.prevItem.operators ? (I(), F(g, {
2297
2437
  key: 1,
2298
2438
  class: "tvp-search-box__number-item"
2299
2439
  }, {
2300
2440
  default: E(() => [
2301
- M(h, {
2441
+ D(h, {
2302
2442
  modelValue: e.state.operatorValue,
2303
- "onUpdate:modelValue": t[8] || (t[8] = (f) => e.state.operatorValue = f)
2443
+ "onUpdate:modelValue": t[8] || (t[8] = (a) => e.state.operatorValue = a)
2304
2444
  }, {
2305
2445
  default: E(() => [
2306
- (y(!0), w(x, null, U(e.state.currentOperators, (f) => (y(), F(a, {
2307
- key: f,
2308
- label: f,
2309
- value: f
2446
+ (I(!0), M(H, null, z(e.state.currentOperators, (a) => (I(), F(l, {
2447
+ key: a,
2448
+ label: a,
2449
+ value: a
2310
2450
  }, null, 8, ["label", "value"]))), 128))
2311
2451
  ]),
2312
2452
  _: 1
2313
2453
  }, 8, ["modelValue"])
2314
2454
  ]),
2315
2455
  _: 1
2316
- })) : A("", !0),
2317
- e.state.prevItem.type !== "numRange" ? (y(), w("div", Mo, I(e.t("tvp.tvpSearchbox.tagValue")), 1)) : A("", !0),
2318
- ["numRange", "dateRange", "datetimeRange", "custom"].includes(e.state.prevItem.type) ? A("", !0) : (y(), F(g, {
2456
+ })) : B("", !0),
2457
+ e.state.prevItem.type !== "numRange" ? (I(), M("div", Cn, w(e.t("tvp.tvpSearchbox.tagValue")), 1)) : B("", !0),
2458
+ ["numRange", "dateRange", "datetimeRange", "custom"].includes(e.state.prevItem.type) ? B("", !0) : (I(), F(g, {
2319
2459
  key: 3,
2320
2460
  prop: "inputEditValue",
2321
2461
  class: "tvp-search-box__number-item"
2322
2462
  }, {
2323
2463
  default: E(() => {
2324
- var f, T;
2464
+ var a, V;
2325
2465
  return [
2326
- ((f = e.state.currentEditValue) == null ? void 0 : f.length) > 0 ? (y(), F(h, {
2466
+ ((a = e.state.currentEditValue) == null ? void 0 : a.length) > 0 ? (I(), F(h, {
2327
2467
  key: 0,
2328
2468
  modelValue: e.state.inputEditValue,
2329
2469
  "onUpdate:modelValue": t[9] || (t[9] = (k) => e.state.inputEditValue = k),
2330
2470
  class: "tvp-search-box-select",
2331
2471
  multiple: !!e.state.prevItem.mergeTag,
2332
- "allow-create": (T = e.state.prevItem) == null ? void 0 : T.allowCreate,
2472
+ "allow-create": (V = e.state.prevItem) == null ? void 0 : V.allowCreate,
2333
2473
  filterable: "",
2334
2474
  "default-first-option": "",
2335
2475
  clearable: ""
2336
2476
  }, {
2337
2477
  default: E(() => [
2338
- (y(!0), w(x, null, U(e.state.currentEditValue, (k) => (y(), F(a, {
2478
+ (I(!0), M(H, null, z(e.state.currentEditValue, (k) => (I(), F(l, {
2339
2479
  key: k.label,
2340
2480
  label: k.label,
2341
2481
  value: k.label
2342
2482
  }, null, 8, ["label", "value"]))), 128))
2343
2483
  ]),
2344
2484
  _: 1
2345
- }, 8, ["modelValue", "multiple", "allow-create"])) : (y(), F(o, {
2485
+ }, 8, ["modelValue", "multiple", "allow-create"])) : (I(), F(u, {
2346
2486
  key: 1,
2347
2487
  modelValue: e.state.inputEditValue,
2348
2488
  "onUpdate:modelValue": t[10] || (t[10] = (k) => e.state.inputEditValue = k),
@@ -2352,53 +2492,53 @@ function Uo(e, t, n, l, c, i) {
2352
2492
  }),
2353
2493
  _: 1
2354
2494
  })),
2355
- e.state.prevItem.type === "numRange" ? (y(), w("div", Eo, [
2356
- D("div", $o, I(e.t("tvp.tvpSearchbox.minValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
2357
- M(g, {
2495
+ e.state.prevItem.type === "numRange" ? (I(), M("div", Dn, [
2496
+ S("div", En, w(e.t("tvp.tvpSearchbox.minValueText")) + w(e.state.prevItem.unit ? `(${e.state.prevItem.unit})` : ""), 1),
2497
+ D(g, {
2358
2498
  prop: e.state.curMinNumVar,
2359
2499
  class: "tvp-search-box__number-item",
2360
2500
  "show-message": e.state.numberShowMessage
2361
2501
  }, {
2362
2502
  default: E(() => [
2363
- M(o, {
2503
+ D(u, {
2364
2504
  modelValue: e.state[e.state.curMinNumVar],
2365
- "onUpdate:modelValue": t[11] || (t[11] = (f) => e.state[e.state.curMinNumVar] = f),
2505
+ "onUpdate:modelValue": t[11] || (t[11] = (a) => e.state[e.state.curMinNumVar] = a),
2366
2506
  type: "number",
2367
2507
  class: "tvp-search-box__number-input"
2368
2508
  }, null, 8, ["modelValue"])
2369
2509
  ]),
2370
2510
  _: 1
2371
2511
  }, 8, ["prop", "show-message"]),
2372
- D("div", Lo, I(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
2373
- M(g, {
2512
+ S("div", $n, w(e.t("tvp.tvpSearchbox.maxValueText")) + w(e.state.prevItem.unit ? `(${e.state.prevItem.unit})` : ""), 1),
2513
+ D(g, {
2374
2514
  prop: e.state.curMaxNumVar,
2375
2515
  class: "tvp-search-box__number-item"
2376
2516
  }, {
2377
2517
  default: E(() => [
2378
- M(o, {
2518
+ D(u, {
2379
2519
  modelValue: e.state[e.state.curMaxNumVar],
2380
- "onUpdate:modelValue": t[12] || (t[12] = (f) => e.state[e.state.curMaxNumVar] = f),
2520
+ "onUpdate:modelValue": t[12] || (t[12] = (a) => e.state[e.state.curMaxNumVar] = a),
2381
2521
  type: "number",
2382
2522
  class: "tvp-search-box__number-input"
2383
2523
  }, null, 8, ["modelValue"])
2384
2524
  ]),
2385
2525
  _: 1
2386
2526
  }, 8, ["prop"])
2387
- ])) : A("", !0),
2388
- e.state.prevItem.type === "dateRange" ? (y(), w("div", _o, [
2389
- D("div", Ro, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2527
+ ])) : B("", !0),
2528
+ e.state.prevItem.type === "dateRange" ? (I(), M("div", Ln, [
2529
+ S("div", _n, w(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2390
2530
  value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2391
2531
  }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
2392
- D("div", No, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2393
- M(g, {
2532
+ S("div", Rn, w(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2533
+ D(g, {
2394
2534
  prop: "startDate",
2395
2535
  "show-message": !!e.state.prevItem.maxTimeLength,
2396
2536
  class: "tvp-search-box__date-item"
2397
2537
  }, {
2398
2538
  default: E(() => [
2399
- M(S, {
2539
+ D(T, {
2400
2540
  modelValue: e.state.startDate,
2401
- "onUpdate:modelValue": t[13] || (t[13] = (f) => e.state.startDate = f),
2541
+ "onUpdate:modelValue": t[13] || (t[13] = (a) => e.state.startDate = a),
2402
2542
  format: e.state.prevItem.format || e.state.dateRangeFormat,
2403
2543
  "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
2404
2544
  "picker-options": e.pickerOptions(e.state.startDate, "endDate"),
@@ -2407,15 +2547,15 @@ function Uo(e, t, n, l, c, i) {
2407
2547
  ]),
2408
2548
  _: 1
2409
2549
  }, 8, ["show-message"]),
2410
- D("div", Po, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2411
- M(g, {
2550
+ S("div", Nn, w(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2551
+ D(g, {
2412
2552
  prop: "endDate",
2413
2553
  class: "tvp-search-box__date-item"
2414
2554
  }, {
2415
2555
  default: E(() => [
2416
- M(S, {
2556
+ D(T, {
2417
2557
  modelValue: e.state.endDate,
2418
- "onUpdate:modelValue": t[14] || (t[14] = (f) => e.state.endDate = f),
2558
+ "onUpdate:modelValue": t[14] || (t[14] = (a) => e.state.endDate = a),
2419
2559
  format: e.state.prevItem.format || e.state.dateRangeFormat,
2420
2560
  "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
2421
2561
  "picker-options": e.pickerOptions(e.state.startDate),
@@ -2424,21 +2564,21 @@ function Uo(e, t, n, l, c, i) {
2424
2564
  ]),
2425
2565
  _: 1
2426
2566
  })
2427
- ])) : A("", !0),
2428
- e.state.prevItem.type === "datetimeRange" ? (y(), w("div", Oo, [
2429
- D("div", Fo, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2567
+ ])) : B("", !0),
2568
+ e.state.prevItem.type === "datetimeRange" ? (I(), M("div", Pn, [
2569
+ S("div", On, w(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2430
2570
  value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2431
2571
  }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
2432
- D("div", Bo, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2433
- M(g, {
2572
+ S("div", xn, w(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2573
+ D(g, {
2434
2574
  prop: "startDateTime",
2435
2575
  "show-message": !!e.state.prevItem.maxTimeLength,
2436
2576
  class: "tvp-search-box__date-item"
2437
2577
  }, {
2438
2578
  default: E(() => [
2439
- M(S, {
2579
+ D(T, {
2440
2580
  modelValue: e.state.startDateTime,
2441
- "onUpdate:modelValue": t[15] || (t[15] = (f) => e.state.startDateTime = f),
2581
+ "onUpdate:modelValue": t[15] || (t[15] = (a) => e.state.startDateTime = a),
2442
2582
  type: "datetime",
2443
2583
  isutc8: !0,
2444
2584
  format: e.state.prevItem.format || e.state.datetimeRangeFormat,
@@ -2449,15 +2589,15 @@ function Uo(e, t, n, l, c, i) {
2449
2589
  ]),
2450
2590
  _: 1
2451
2591
  }, 8, ["show-message"]),
2452
- D("div", xo, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2453
- M(g, {
2592
+ S("div", Fn, w(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2593
+ D(g, {
2454
2594
  prop: "endDateTime",
2455
2595
  class: "tvp-search-box__date-item"
2456
2596
  }, {
2457
2597
  default: E(() => [
2458
- M(S, {
2598
+ D(T, {
2459
2599
  modelValue: e.state.endDateTime,
2460
- "onUpdate:modelValue": t[16] || (t[16] = (f) => e.state.endDateTime = f),
2600
+ "onUpdate:modelValue": t[16] || (t[16] = (a) => e.state.endDateTime = a),
2461
2601
  type: "datetime",
2462
2602
  isutc8: !0,
2463
2603
  format: e.state.prevItem.format || e.state.datetimeRangeFormat,
@@ -2468,48 +2608,48 @@ function Uo(e, t, n, l, c, i) {
2468
2608
  ]),
2469
2609
  _: 1
2470
2610
  })
2471
- ])) : A("", !0)
2611
+ ])) : B("", !0)
2472
2612
  ]),
2473
- D("div", Ao, [
2474
- M(_, {
2613
+ S("div", Bn, [
2614
+ D($, {
2475
2615
  size: "mini",
2476
- onClick: t[17] || (t[17] = (f) => e.confirmEditTag(!1))
2616
+ onClick: t[17] || (t[17] = (a) => e.confirmEditTag(!1))
2477
2617
  }, {
2478
2618
  default: E(() => [
2479
- K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
2619
+ G(w(e.t("tvp.tvpSearchbox.cancel")), 1)
2480
2620
  ]),
2481
2621
  _: 1
2482
2622
  }),
2483
- M(_, {
2623
+ D($, {
2484
2624
  size: "mini",
2485
2625
  disabled: e.state.hasFormError,
2486
- onClick: t[18] || (t[18] = (f) => e.confirmEditTag(!0))
2626
+ onClick: t[18] || (t[18] = (a) => e.confirmEditTag(!0))
2487
2627
  }, {
2488
2628
  default: E(() => [
2489
- K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
2629
+ G(w(e.t("tvp.tvpSearchbox.confirm")), 1)
2490
2630
  ]),
2491
2631
  _: 1
2492
2632
  }, 8, ["disabled"])
2493
2633
  ])
2494
- ], 64)) : (y(), w("div", zo, [
2495
- ue(e.$slots, `${e.state.prevItem.slotName}-edit`, he({
2634
+ ], 64)) : e.state.popoverVisible ? (I(), M("div", Hn, [
2635
+ fe(e.$slots, `${e.state.prevItem.slotName}-edit`, Ie({
2496
2636
  showDropdown: () => e.showPopover(e.state),
2497
2637
  onConfirm: e.handleEditConfirm
2498
2638
  }, {
2499
- onClick: t[19] || (t[19] = Y(() => {
2639
+ onClick: t[19] || (t[19] = Z(() => {
2500
2640
  }, ["stop"]))
2501
2641
  }))
2502
- ]))
2642
+ ])) : B("", !0)
2503
2643
  ]),
2504
2644
  _: 3
2505
- }, 8, ["modelValue", "append-to-body"])) : A("", !0)
2645
+ }, 8, ["modelValue", "append-to-body"])) : B("", !0)
2506
2646
  ]),
2507
2647
  _: 3
2508
2648
  }, 8, ["model", "rules", "validate-type", "size"])
2509
2649
  ], 2);
2510
2650
  }
2511
- const jo = /* @__PURE__ */ Ne(yo, [["render", Uo]]), Ho = {
2512
- ...ge,
2651
+ const zn = /* @__PURE__ */ Fe(gn, [["render", An]]), Un = {
2652
+ ...we,
2513
2653
  tiny_mode: {
2514
2654
  type: String,
2515
2655
  default: "pc"
@@ -2554,6 +2694,10 @@ const jo = /* @__PURE__ */ Ne(yo, [["render", Uo]]), Ho = {
2554
2694
  type: String,
2555
2695
  default: ""
2556
2696
  },
2697
+ defaultFieldReplace: {
2698
+ type: Boolean,
2699
+ default: !1
2700
+ },
2557
2701
  /** 是否可编辑 */
2558
2702
  editable: {
2559
2703
  type: Boolean,
@@ -2594,23 +2738,29 @@ const jo = /* @__PURE__ */ Ne(yo, [["render", Uo]]), Ho = {
2594
2738
  type: Boolean,
2595
2739
  default: !1
2596
2740
  }
2597
- }, de = ve({
2598
- name: $e + "SearchBox",
2599
- props: Ho,
2600
- ...jo
2601
- }), Ko = "3.28.4";
2602
- de.install = function(e) {
2603
- e.component(de.name, de);
2741
+ }, be = ke({
2742
+ name: Ne + "SearchBox",
2743
+ props: Un,
2744
+ ...zn
2745
+ }), jn = "3.29.0";
2746
+ be.install = function(e) {
2747
+ const t = e;
2748
+ t && t.config && t.config.globalProperties && _e(t), t && t.mixin && !t.__TINY_SEARCH_BOX_I18N_MIXIN__ && (t.__TINY_SEARCH_BOX_I18N_MIXIN__ = !0, t.mixin({
2749
+ beforeCreate() {
2750
+ const o = this;
2751
+ o && (o.$i18n || o.$t || o.$root && (o.$root.$i18n || o.$root.$t)) && _e(o.$root || o);
2752
+ }
2753
+ })), t.component(be.name, be);
2604
2754
  };
2605
- de.version = Ko;
2606
- window && typeof window < "u" && window.Vue && de.install(window.Vue);
2755
+ be.version = jn;
2756
+ typeof window < "u" && window.Vue && be.install(window.Vue);
2607
2757
  export {
2608
- Nn as TinySearchBoxFirstLevelPanel,
2609
- go as TinySearchBoxSecondLevelPanel,
2610
- de as default,
2611
- Qe as enUS,
2612
- tn as setGlobalApp,
2758
+ No as TinySearchBoxFirstLevelPanel,
2759
+ bn as TinySearchBoxSecondLevelPanel,
2760
+ be as default,
2761
+ et as enUS,
2762
+ _e as setGlobalApp,
2613
2763
  q as t,
2614
- Ye as zhCN
2764
+ Je as zhCN
2615
2765
  };
2616
2766
  //# sourceMappingURL=index.js.map