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