@opentiny/vue-search-box 2.27.0 → 2.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,23 @@
1
+ import './index.css';
1
2
  import { defineComponent as X, $prefix as pe, $props as J, setup as ue } from "@opentiny/vue-common";
2
- import Pe from "@opentiny/vue-tag";
3
+ import Oe from "@opentiny/vue-tag";
3
4
  import _e from "@opentiny/vue-input";
4
- import Oe from "@opentiny/vue-dropdown";
5
- import Fe from "@opentiny/vue-dropdown-menu";
5
+ import Fe from "@opentiny/vue-dropdown";
6
+ import Ae from "@opentiny/vue-dropdown-menu";
6
7
  import ye from "@opentiny/vue-button";
7
- import Ae from "@opentiny/vue-tooltip";
8
+ import Be from "@opentiny/vue-tooltip";
8
9
  import xe from "@opentiny/vue-date-picker";
9
- import Be from "@opentiny/vue-form";
10
+ import ze from "@opentiny/vue-form";
10
11
  import we from "@opentiny/vue-form-item";
11
- import ze from "@opentiny/vue-popover";
12
- import je from "@opentiny/vue-select";
13
- import He from "@opentiny/vue-option";
14
- import { iconSearch as Ge, iconClose as Ke, iconHelpQuery as Ue } from "@opentiny/vue-icon";
12
+ import je from "@opentiny/vue-popover";
13
+ import He from "@opentiny/vue-select";
14
+ import Ge from "@opentiny/vue-option";
15
+ import { iconSearch as Ke, iconClose as Ue, iconHelpQuery as qe } from "@opentiny/vue-icon";
15
16
  import Ie from "@opentiny/vue-dropdown-item";
16
- import qe from "@opentiny/vue-checkbox";
17
- import Ze from "@opentiny/vue-checkbox-group";
18
- import Ye from "@opentiny/vue-loading";
19
- const We = (a, e, t, s = "0") => {
17
+ import Ze from "@opentiny/vue-checkbox";
18
+ import Ye from "@opentiny/vue-checkbox-group";
19
+ import We from "@opentiny/vue-loading";
20
+ const Qe = (a, e, t, s = "0") => {
20
21
  if (typeof a == "string" && typeof s == "string" && ke(e)) {
21
22
  let n = a.length - e;
22
23
  if (n > 0)
@@ -25,13 +26,13 @@ const We = (a, e, t, s = "0") => {
25
26
  const r = [];
26
27
  for (n = Math.abs(n) / s.length; n > 0; n--)
27
28
  r.push(s);
28
- const p = r.join("");
29
- return t ? a + p : p + a;
29
+ const c = r.join("");
30
+ return t ? a + c : c + a;
30
31
  }
31
32
  }
32
- }, Qe = Object.prototype.toString, Xe = Object.prototype.hasOwnProperty, Je = Xe.toString;
33
- Je.call(Object);
34
- const et = {
33
+ }, Xe = Object.prototype.toString, Je = Object.prototype.hasOwnProperty, et = Je.toString;
34
+ et.call(Object);
35
+ const tt = {
35
36
  "[object Error]": "error",
36
37
  "[object Object]": "object",
37
38
  "[object RegExp]": "regExp",
@@ -42,13 +43,13 @@ const et = {
42
43
  "[object String]": "string",
43
44
  "[object Number]": "number",
44
45
  "[object Boolean]": "boolean"
45
- }, tt = (a) => a == null, at = (a) => tt(a) ? String(a) : et[Qe.call(a)] || "object", ke = (a) => typeof a == "number" && isFinite(a), nt = (a) => at(a) === "date", Ce = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], st = new RegExp(
46
+ }, at = (a) => a == null, nt = (a) => at(a) ? String(a) : tt[Xe.call(a)] || "object", ke = (a) => typeof a == "number" && isFinite(a), rt = (a) => nt(a) === "date", Ve = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], st = new RegExp(
46
47
  "^(\\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}))?)?)?$"
47
- ), rt = new RegExp(
48
- "^(((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}))?)?)?$"
49
48
  ), ot = new RegExp(
49
+ "^(((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}))?)?)?$"
50
+ ), lt = new RegExp(
50
51
  "^(\\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]))$"
51
- ), lt = {
52
+ ), it = {
52
53
  "y{1,4}": /y{1,4}/,
53
54
  "M{1,2}": /M{1,2}/,
54
55
  "d{1,2}": /d{1,2}/,
@@ -66,68 +67,68 @@ const et = {
66
67
  MINUTE: 59,
67
68
  SECOND: 59,
68
69
  MILLISECOND: 999
69
- }, it = "-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", ct = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", pt = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", ut = [].concat(it.split(","), ct.split(","), pt.split(",")), dt = (a) => {
70
+ }, ct = "-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", pt = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", ut = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", dt = [].concat(ct.split(","), pt.split(","), ut.split(",")), mt = (a) => {
70
71
  const e = 0 - a.getTimezoneOffset() / 60;
71
72
  let t;
72
73
  return e === 0 ? t = "Z" : e > 0 ? t = "+" + (e > 10 ? e : "0" + e) + "00" : t = (e < -10 ? e : "-0" + -e) + "00", t;
73
- }, Ve = (a) => a % 400 === 0 || a % 4 === 0 && a % 100 !== 0, Te = (a) => a > z.MILLISECOND ? Number(String(a).substring(0, 3)) : a, de = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: p }) => {
74
- let c = Ce[e];
75
- if (Ve(a) && e === 1 && (c += 1), t <= c)
76
- return new Date(a, e, t, s, n, r, Te(p));
77
- }, mt = (a) => {
74
+ }, Te = (a) => a % 400 === 0 || a % 4 === 0 && a % 100 !== 0, Ce = (a) => a > z.MILLISECOND ? Number(String(a).substring(0, 3)) : a, de = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: c }) => {
75
+ let i = Ve[e];
76
+ if (Te(a) && e === 1 && (i += 1), t <= i)
77
+ return new Date(a, e, t, s, n, r, Ce(c));
78
+ }, ft = (a) => {
78
79
  if (a.length === 23) {
79
- const e = Number(a[1]), t = a[3] - 1, s = Number(a[9] || 1), n = a[15] || 0, r = a[17] || 0, p = a[20] || 0, c = a[22] || 0;
80
+ const e = Number(a[1]), t = a[3] - 1, s = Number(a[9] || 1), n = a[15] || 0, r = a[17] || 0, c = a[20] || 0, i = a[22] || 0;
80
81
  return de({
81
82
  date: s,
82
83
  year: e,
83
84
  hours: n,
84
85
  month: t,
85
- seconds: p,
86
+ seconds: c,
86
87
  minutes: r,
87
- milliseconds: c
88
+ milliseconds: i
88
89
  });
89
90
  }
90
- }, ft = (a) => {
91
+ }, ht = (a) => {
91
92
  if (a.length === 22) {
92
- const e = Number(a[12]), t = a[1] - 1, s = Number(a[6] || 1), n = a[14] || 0, r = a[16] || 0, p = a[19] || 0, c = a[21] || 0;
93
+ const e = Number(a[12]), t = a[1] - 1, s = Number(a[6] || 1), n = a[14] || 0, r = a[16] || 0, c = a[19] || 0, i = a[21] || 0;
93
94
  return de({
94
95
  year: e,
95
96
  month: t,
96
97
  date: s,
97
98
  hours: n,
98
99
  minutes: r,
99
- seconds: p,
100
- milliseconds: c
100
+ seconds: c,
101
+ milliseconds: i
101
102
  });
102
103
  }
103
- }, ht = (a) => {
104
+ }, vt = (a) => {
104
105
  if (a.length !== 25)
105
106
  return;
106
- const e = Number(a[1]), t = a[2] - 1, s = Number(a[6]), n = new Date(e, t, s).getTimezoneOffset(), r = a[12] || 0, p = a[14] || 0, c = a[17] || 0, i = a[19] || 0;
107
- let m = a[20];
108
- const u = a[21], o = a[22] || 0, l = a[24] || 0;
109
- let f = Ce[t], d, v;
110
- if (Ve(e) && t === 1 && (f += 1), s <= f) {
111
- if (m === "Z")
112
- d = r - n / 60, v = p;
107
+ const e = Number(a[1]), t = a[2] - 1, s = Number(a[6]), n = new Date(e, t, s).getTimezoneOffset(), r = a[12] || 0, c = a[14] || 0, i = a[17] || 0, l = a[19] || 0;
108
+ let u = a[20];
109
+ const m = a[21], o = a[22] || 0, f = a[24] || 0;
110
+ let d = Ve[t], p, b;
111
+ if (Te(e) && t === 1 && (d += 1), s <= d) {
112
+ if (u === "Z")
113
+ p = r - n / 60, b = c;
113
114
  else {
114
- if (m.includes(":") || (m = m.substr(0, 3) + ":" + m.substr(3)), !ut.includes(m))
115
+ if (u.includes(":") || (u = u.substr(0, 3) + ":" + u.substr(3)), !dt.includes(u))
115
116
  return;
116
- d = u === "+" ? r - o - n / 60 : Number(r) + Number(o) - n / 60, v = u === "+" ? p - l : Number(p) + Number(l);
117
+ p = m === "+" ? r - o - n / 60 : Number(r) + Number(o) - n / 60, b = m === "+" ? c - f : Number(c) + Number(f);
117
118
  }
118
- return new Date(e, t, s, d, v, c, Te(i));
119
+ return new Date(e, t, s, p, b, i, Ce(l));
119
120
  }
120
- }, re = [
121
- [st, mt],
122
- [rt, ft],
123
- [ot, ht]
124
- ], vt = (a) => {
125
- for (let e = 0, t = re.length; e < t; e++) {
126
- const s = re[e][0].exec(a);
121
+ }, se = [
122
+ [st, ft],
123
+ [ot, ht],
124
+ [lt, vt]
125
+ ], bt = (a) => {
126
+ for (let e = 0, t = se.length; e < t; e++) {
127
+ const s = se[e][0].exec(a);
127
128
  if (s && s.length > 0)
128
- return re[e][1](s);
129
+ return se[e][1](s);
129
130
  }
130
- }, bt = (a, e, t) => {
131
+ }, gt = (a, e, t) => {
131
132
  if (t)
132
133
  switch (t) {
133
134
  case "yyyy":
@@ -160,56 +161,56 @@ const et = {
160
161
  a[6] = e;
161
162
  break;
162
163
  }
163
- }, gt = (a, e) => {
164
+ }, _t = (a, e) => {
164
165
  const t = [0, -1, 0, 0, 0, 0];
165
166
  if (a.length !== e.length)
166
167
  return t;
167
168
  let s = 0, n = 0;
168
- for (let r = 0, p = a.length; r < p; r++) {
169
- const c = a.substr(r, 1), i = isNaN(Number(c)) || c.trim() === "";
170
- if (i && c === e.substr(r, 1) || r === p - 1) {
171
- let m, u;
172
- if (i) {
173
- m = a.substring(s, r), s = r + 1;
174
- const o = e.indexOf(c, n);
175
- u = e.substring(n, o === -1 ? e.length : o), n = o + 1;
169
+ for (let r = 0, c = a.length; r < c; r++) {
170
+ const i = a.substr(r, 1), l = isNaN(Number(i)) || (i == null ? void 0 : i.trim()) === "";
171
+ if (l && i === e.substr(r, 1) || r === c - 1) {
172
+ let u, m;
173
+ if (l) {
174
+ u = a.substring(s, r), s = r + 1;
175
+ const o = e.indexOf(i, n);
176
+ m = e.substring(n, o === -1 ? e.length : o), n = o + 1;
176
177
  } else
177
- m = a.substring(s, p), u = e.substring(n, p);
178
- (m.length === u.length || m) && bt(t, m, u);
178
+ u = a.substring(s, c), m = e.substring(n, c);
179
+ (u.length === m.length || u) && gt(t, u, m);
179
180
  }
180
181
  }
181
182
  return t;
182
- }, U = (a, e, t) => isNaN(a) || a < e || a > t, _t = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: p }) => U(a, 0, z.YEAR) || U(e, 0, z.MONTH) || U(t, 0, z.DATE) || U(s, 0, z.HOUR) || U(n, 0, z.MINUTE) || U(r, 0, z.SECOND) || U(p, 0, z.MILLISECOND), yt = (a, e) => {
183
+ }, U = (a, e, t) => isNaN(a) || a < e || a > t, yt = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: c }) => U(a, 0, z.YEAR) || U(e, 0, z.MONTH) || U(t, 0, z.DATE) || U(s, 0, z.HOUR) || U(n, 0, z.MINUTE) || U(r, 0, z.SECOND) || U(c, 0, z.MILLISECOND), xt = (a, e) => {
183
184
  if (typeof e == "string") {
184
- const t = gt(a, e), s = Number(t[0]), n = Number(t[1]), r = Number(t[2] || 1), p = Number(t[3] || 0), c = Number(t[4] || 0), i = Number(t[5] || 0), m = Number(t[6] || 0);
185
- return _t({
185
+ const t = _t(a, e), s = Number(t[0]), n = Number(t[1]), r = Number(t[2] || 1), c = Number(t[3] || 0), i = Number(t[4] || 0), l = Number(t[5] || 0), u = Number(t[6] || 0);
186
+ return yt({
186
187
  year: s,
187
188
  month: n,
188
189
  date: r,
189
- hours: p,
190
- minutes: c,
191
- seconds: i,
192
- milliseconds: m
190
+ hours: c,
191
+ minutes: i,
192
+ seconds: l,
193
+ milliseconds: u
193
194
  }) ? void 0 : de({
194
195
  year: s,
195
196
  date: r,
196
197
  month: n,
197
- minutes: c,
198
- hours: p,
199
- milliseconds: m,
200
- seconds: i
198
+ minutes: i,
199
+ hours: c,
200
+ milliseconds: u,
201
+ seconds: l
201
202
  });
202
203
  } else
203
- return vt(a);
204
+ return bt(a);
204
205
  }, Se = (a, e, t) => {
205
206
  let s;
206
- if (ke(a) ? s = new Date(a) : typeof a == "string" && (s = yt(a, e)), t) {
207
+ if (ke(a) ? s = new Date(a) : typeof a == "string" && (s = xt(a, e)), t) {
207
208
  const n = t && Se(t) || new Date(1, 1, 1, 0, 0, 0);
208
209
  return s && s < n ? n : s;
209
210
  }
210
211
  return s;
211
212
  }, le = function(a, e = "yyyy/MM/dd hh:mm:ss") {
212
- if (nt(a)) {
213
+ if (rt(a)) {
213
214
  if (typeof e == "string") {
214
215
  const t = {
215
216
  "y{1,4}": a.getFullYear(),
@@ -220,11 +221,11 @@ const et = {
220
221
  "m{1,2}": a.getMinutes(),
221
222
  "s{1,2}": a.getSeconds(),
222
223
  "S{1,3}": a.getMilliseconds(),
223
- "Z{1,1}": dt(a)
224
+ "Z{1,1}": mt(a)
224
225
  };
225
226
  return Object.keys(t).forEach((s) => {
226
- const n = e.match(lt[s]);
227
- s && n && n.length && (e = e.replace(n[0], s === "Z{1,1}" ? t[s] : We(t[s].toString(), n[0].length)));
227
+ const n = e.match(it[s]);
228
+ s && n && n.length && (e = e.replace(n[0], s === "Z{1,1}" ? t[s] : Qe(t[s].toString(), n[0].length)));
228
229
  }), e;
229
230
  }
230
231
  } else if (typeof a == "string" && arguments.length >= 2) {
@@ -233,7 +234,7 @@ const et = {
233
234
  const s = Se(a, e);
234
235
  return s ? le(s, t) : "";
235
236
  }
236
- }, C = (a, e = !0) => {
237
+ }, k = (a, e = !0) => {
237
238
  e ? a.visibleTimer = setTimeout(() => {
238
239
  a.visible = !0;
239
240
  }, 0) : (clearTimeout(a.visibleTimer), a.visibleTimer = null, a.visible = !1);
@@ -243,7 +244,7 @@ const et = {
243
244
  a.popoverVisible = e;
244
245
  const { dropdownRef: t } = a.instance;
245
246
  e && t.state.visible && (clearTimeout(Number(t.state.timeout)), t.state.timeout = null, t.state.visible = !1);
246
- }, xt = (a, e = 200) => {
247
+ }, wt = (a, e = 200) => {
247
248
  let t = null;
248
249
  const s = function(...n) {
249
250
  t && clearTimeout(t), t = setTimeout(() => {
@@ -253,7 +254,7 @@ const et = {
253
254
  return s.cancel = () => {
254
255
  t && (clearTimeout(t), t = null);
255
256
  }, s;
256
- }, A = (a) => parseFloat(a).toString() !== "NaN", j = (a) => {
257
+ }, B = (a) => parseFloat(a).toString() !== "NaN", j = (a) => {
257
258
  const e = Array.isArray(a) ? [] : {};
258
259
  if (a && typeof a == "object") {
259
260
  const t = Object.keys(a);
@@ -270,506 +271,506 @@ const et = {
270
271
  return e.forEach((s) => {
271
272
  delete t[s];
272
273
  }), t;
273
- }, P = (a, e, t = "") => {
274
+ }, O = (a, e, t = "") => {
274
275
  const { valueMap: s, prevItem: n } = a, r = (n.label || t) + e;
275
276
  return s.has(r);
276
277
  }, te = (a) => {
277
278
  a.propItem = {}, a.inputValue = "";
278
279
  }, R = ({ emit: a, state: e, nextTick: t, ...s }) => {
279
280
  Q(e, !1);
280
- const { tagList: n = null, index: r = -1, newTag: p = null, newValue: c = null, oldValue: i = null, isEdit: m } = s;
281
- if (m || te(e), !n && r === -1 && !c)
281
+ const { tagList: n = null, index: r = -1, newTag: c = null, newValue: i = null, oldValue: l = null, isEdit: u } = s;
282
+ if (u || te(e), !n && r === -1 && !i)
282
283
  return;
283
- const u = i || j(e.innerModelValue);
284
+ const m = l || j(e.innerModelValue);
284
285
  let o = [];
285
- c ? o = [...c] : r !== -1 ? (o = [...e.innerModelValue], p ? o.splice(r, 1, p) : o.splice(r, 1)) : o = [...e.innerModelValue, ...n], e.innerModelValue = o, a("update:modelValue", j(o)), a("change", j(o), u);
286
+ i ? o = [...i] : r !== -1 ? (o = [...e.innerModelValue], c ? o.splice(r, 1, c) : o.splice(r, 1)) : o = [...e.innerModelValue, ...n], e.innerModelValue = o, a("update:modelValue", j(o)), a("change", j(o), m);
286
287
  }, H = (a) => a, G = (a, e, t) => {
287
288
  const s = e.idMapKey || a.idMapKey;
288
289
  return t && t[s] !== void 0 ? { [s]: t[s] } : null;
289
290
  };
290
- function wt({ props: a, state: e, emit: t, nextTick: s }) {
291
+ function It({ props: a, state: e, emit: t, nextTick: s }) {
291
292
  let n = j(e.inputValue);
292
- const r = (m) => {
293
- if (m) {
294
- const u = e.recordItems.find((o) => o.label === m.label);
295
- if (u && u.options) {
296
- const o = u.options.find((l) => l.label === m.value);
293
+ const r = (u) => {
294
+ if (u) {
295
+ const m = e.recordItems.find((o) => o.label === u.label);
296
+ if (m && m.options) {
297
+ const o = m.options.find((f) => f.label === u.value);
297
298
  o && (o.isChecked = !1);
298
299
  }
299
300
  }
300
301
  };
301
302
  return {
302
- deleteTag: (m) => {
303
- C(e, !1), r(m);
304
- const u = a.modelValue.filter((o) => o !== m);
305
- R({ emit: t, state: e, nextTick: s, newValue: u });
303
+ deleteTag: (u) => {
304
+ k(e, !1), r(u);
305
+ const m = a.modelValue.filter((o) => o !== u);
306
+ R({ emit: t, state: e, nextTick: s, newValue: m });
306
307
  },
307
308
  clearTag: () => {
308
- C(e, !1), a.modelValue.forEach((m) => r(m)), e.propItem = {}, e.inputValue = "", R({ emit: t, state: e, nextTick: s, newValue: [] }), t("clear");
309
+ k(e, !1), a.modelValue.forEach((u) => r(u)), e.propItem = {}, e.inputValue = "", R({ emit: t, state: e, nextTick: s, newValue: [] }), t("clear");
309
310
  },
310
311
  backspaceDeleteTag: () => {
311
- var m, u, o;
312
+ var u, m, o;
312
313
  if (!e.inputValue) {
313
314
  if (e.propItem.label) {
314
315
  e.propItem = {};
315
316
  return;
316
317
  }
317
318
  if (n === "" && e.inputValue === "") {
318
- C(e, !1);
319
- const l = a.modelValue.length - 1;
320
- r(a.modelValue[l]);
321
- const f = e.innerModelValue.slice(0, a.modelValue.length - 1);
322
- R({ emit: t, state: e, nextTick: s, newValue: f });
319
+ k(e, !1);
320
+ const f = a.modelValue.length - 1;
321
+ r(a.modelValue[f]);
322
+ const d = e.innerModelValue.slice(0, a.modelValue.length - 1);
323
+ R({ emit: t, state: e, nextTick: s, newValue: d });
323
324
  }
324
- n = e.inputValue, (o = (u = (m = e == null ? void 0 : e.instance) == null ? void 0 : m.refs) == null ? void 0 : u.inputRef) != null && o.$el && e.instance.refs.inputRef.$el.click();
325
+ n = e.inputValue, (o = (m = (u = e == null ? void 0 : e.instance) == null ? void 0 : u.refs) == null ? void 0 : m.inputRef) != null && o.$el && e.instance.refs.inputRef.$el.click();
325
326
  }
326
327
  }
327
328
  };
328
329
  }
329
- const It = async (a, e, t) => {
330
- const { prevItem: s, inputEditValue: n } = e, { operators: r } = s, p = ee(s);
331
- let c = null, i = !0;
332
- if (await a.$refs.formRef.validateField(["inputEditValue"], (m) => {
333
- m && (i = !1);
334
- }), i) {
335
- let m = null;
336
- const u = e.operatorValue && r ? { operator: e.operatorValue } : null;
330
+ const kt = async (a, e, t) => {
331
+ const { prevItem: s, inputEditValue: n } = e, { operators: r } = s, c = ee(s);
332
+ let i = null, l = !0;
333
+ if (await a.$refs.formRef.validateField(["inputEditValue"], (u) => {
334
+ u && (l = !1);
335
+ }), l) {
336
+ let u = null;
337
+ const m = e.operatorValue && r ? { operator: e.operatorValue } : null;
337
338
  let o = n;
338
- const l = {};
339
+ const f = {};
339
340
  if (Array.isArray(n))
340
- l.options = [], o = "", n.forEach((f) => {
341
- const d = e.currentEditValue.find((h) => h.label === f), v = (d == null ? void 0 : d.label) || f;
342
- if (o = o ? `${o} | ${v}` : v, d) {
343
- const h = G(t, s, d);
344
- l.options.push({ label: v, ...h });
341
+ f.options = [], o = "", n.forEach((d) => {
342
+ const p = e.currentEditValue.find((h) => h.label === d), b = (p == null ? void 0 : p.label) || d;
343
+ if (o = o ? `${o} | ${b}` : b, p) {
344
+ const h = G(t, s, p);
345
+ f.options.push({ label: b, ...h });
345
346
  } else
346
- l.options.push({ label: v });
347
+ f.options.push({ label: b });
347
348
  });
348
349
  else if (Array.isArray(e.currentEditValue)) {
349
- const f = e.currentEditValue.find((d) => d.label === o);
350
- m = G(t, s, f);
350
+ const d = e.currentEditValue.find((p) => p.label === o);
351
+ u = G(t, s, d);
351
352
  }
352
- c = H({ ...p, label: e.selectValue, ...u, value: o, ...m, ...l });
353
+ i = H({ ...c, label: e.selectValue, ...m, value: o, ...u, ...f });
353
354
  }
354
- return c;
355
+ return i;
355
356
  }, De = async (a, e, t) => {
356
- const { prevItem: s } = e, n = `min${s.field}`, r = `max${s.field}`, p = e[n], c = e[r], i = [n, r];
357
- let m = !0, u = null;
358
- if (await a.$refs.formRef.validateField(i, (o) => {
359
- o && (m = !1);
360
- }), m) {
361
- const { field: o, label: l, unit: f, type: d, operators: v } = s, h = f ? `${l}(${f})` : l;
362
- let b = "";
363
- p && c ? b = `${p}-${c}` : b = p ? `≥${p}` : `≤${c}`;
364
- const w = G(t, s, s), k = e.operatorValue && v ? { operator: e.operatorValue } : null;
365
- u = H({ type: d, field: o, label: h, value: b, ...w, start: p, end: c, ...k });
357
+ const { prevItem: s } = e, n = `min${s.field}`, r = `max${s.field}`, c = e[n], i = e[r], l = [n, r];
358
+ let u = !0, m = null;
359
+ if (await a.$refs.formRef.validateField(l, (o) => {
360
+ o && (u = !1);
361
+ }), u) {
362
+ const { field: o, label: f, unit: d, type: p, operators: b } = s, h = d ? `${f}(${d})` : f;
363
+ let v = "";
364
+ c && i ? v = `${c}-${i}` : v = c ? `≥${c}` : `≤${i}`;
365
+ const x = G(t, s, s), T = e.operatorValue && b ? { operator: e.operatorValue } : null;
366
+ m = H({ type: p, field: o, label: h, value: v, ...x, start: c, end: i, ...T });
366
367
  }
367
- return u;
368
+ return m;
368
369
  }, ie = async (a, e, t, s) => {
369
- const { prevItem: n, startDate: r, endDate: p, startDateTime: c, endDateTime: i } = e;
370
- let m = null, u = null, o = !0, l = null, f = null;
371
- if (s ? (m = c, u = i, f = ["startDateTime", "endDateTime"]) : (m = r, u = p, f = ["startDate", "endDate"]), await a.$refs.formRef.validateField(f, (d) => {
372
- d && (o = !1);
370
+ const { prevItem: n, startDate: r, endDate: c, startDateTime: i, endDateTime: l } = e;
371
+ let u = null, m = null, o = !0, f = null, d = null;
372
+ if (s ? (u = i, m = l, d = ["startDateTime", "endDateTime"]) : (u = r, m = c, d = ["startDate", "endDate"]), await a.$refs.formRef.validateField(d, (p) => {
373
+ p && (o = !1);
373
374
  }), o) {
374
- const { operators: d } = n, v = ee(n);
375
+ const { operators: p } = n, b = ee(n);
375
376
  let h = "";
376
- if (m && u) {
377
- if (m > u)
377
+ if (u && m) {
378
+ if (u > m)
378
379
  return;
379
- m === u ? h = m : h = `${m}-${u}`;
380
+ u === m ? h = u : h = `${u}-${m}`;
380
381
  } else
381
- h = m ? `≥${m}` : `≤${u}`;
382
- const b = G(t, n, n), w = e.operatorValue && d ? { operator: e.operatorValue } : null;
383
- l = H({ ...v, value: h, start: m, end: u, ...b, ...w });
382
+ h = u ? `≥${u}` : `≤${m}`;
383
+ const v = G(t, n, n), x = e.operatorValue && p ? { operator: e.operatorValue } : null;
384
+ f = H({ ...b, value: h, start: u, end: m, ...v, ...x });
384
385
  }
385
- return l;
386
+ return f;
386
387
  }, Me = (a, e, t) => {
387
- const { prevItem: s } = a, { field: n, start: r, end: p, min: c = s.min, max: i = s.max } = e, m = `min${n}`, u = `max${n}`;
388
- (a.curMinNumVar !== m || a.curMaxNumVar !== u) && (delete a[a.curMinNumVar], delete a[a.curMaxNumVar], delete a.formRules[a.curMinNumVar], delete a.formRules[a.curMaxNumVar], a.curMinNumVar = m, a.curMaxNumVar = u), a[a.curMinNumVar] = r, a[a.curMaxNumVar] = p;
389
- const { curMinNumVar: o, curMaxNumVar: l } = a, f = A(c), d = A(i);
390
- f || d ? (a.formRules[o] = {
391
- validator: (v, h, b) => {
392
- const w = A(h);
393
- !w && A(a[l]) || w && (f && !d && h >= c || !f && d && h <= i || h >= c && h <= i) ? b() : (a.numberShowMessage = !!(h || a[l]), b(new Error(t("tvp.tvpSearchbox.rangeMinErr", [c, i]))));
394
- }
395
- }, a.formRules[l] = {
396
- validator: (v, h, b) => {
397
- const w = A(a[o]), k = w && c < a[o] ? Number(a[o]) : c, g = A(k), _ = A(h);
398
- !_ && w || _ && (g && !d && h >= k || !g && d && h <= i || h >= k && h <= i) ? b() : b(!_ && !w ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
399
- }
400
- }) : a.formRules[l] = {
401
- validator: (v, h, b) => {
402
- const w = a[o], k = A(h), g = A(w);
403
- k && !g || !k && g || k && g && h >= Number(w) ? b() : b(!k && !g ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
388
+ const { prevItem: s } = a, { field: n, start: r, end: c, min: i = s.min, max: l = s.max } = e, u = `min${n}`, m = `max${n}`;
389
+ (a.curMinNumVar !== u || a.curMaxNumVar !== m) && (delete a[a.curMinNumVar], delete a[a.curMaxNumVar], delete a.formRules[a.curMinNumVar], delete a.formRules[a.curMaxNumVar], a.curMinNumVar = u, a.curMaxNumVar = m), a[a.curMinNumVar] = r, a[a.curMaxNumVar] = c;
390
+ const { curMinNumVar: o, curMaxNumVar: f } = a, d = B(i), p = B(l);
391
+ d || p ? (a.formRules[o] = {
392
+ validator: (b, h, v) => {
393
+ const x = B(h);
394
+ !x && B(a[f]) || x && (d && !p && h >= i || !d && p && h <= l || h >= i && h <= l) ? v() : (a.numberShowMessage = !!(h || a[f]), v(new Error(t("tvp.tvpSearchbox.rangeMinErr", [i, l]))));
395
+ }
396
+ }, a.formRules[f] = {
397
+ validator: (b, h, v) => {
398
+ const x = B(a[o]), T = x && i < a[o] ? Number(a[o]) : i, g = B(T), _ = B(h);
399
+ !_ && x || _ && (g && !p && h >= T || !g && p && h <= l || h >= T && h <= l) ? v() : v(!_ && !x ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
400
+ }
401
+ }) : a.formRules[f] = {
402
+ validator: (b, h, v) => {
403
+ const x = a[o], T = B(h), g = B(x);
404
+ T && !g || !T && g || T && g && h >= Number(x) ? v() : v(!T && !g ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
404
405
  }
405
406
  };
406
407
  };
407
- function kt({ props: a, emit: e, state: t, t: s, format: n, nextTick: r, vm: p, cancelHandleInput: c }) {
408
- const i = p || t.instance, m = (g) => {
409
- var x, T, M;
410
- const { start: _, end: y, type: I } = g;
411
- if (t.backupList = g.options, I === "numRange")
408
+ function Vt({ props: a, emit: e, state: t, t: s, format: n, nextTick: r, vm: c, cancelHandleInput: i }) {
409
+ const l = c || t.instance, u = (g) => {
410
+ var C, w, S;
411
+ const { start: _, end: I, type: y } = g;
412
+ if (t.backupList = g.options, y === "numRange")
412
413
  Me(t, g, s);
413
- else if (I === "dateRange") {
414
+ else if (y === "dateRange") {
414
415
  const { dateRangeFormat: V } = t;
415
416
  if (!t.startDate && _) {
416
- const S = n(_, V);
417
- t.startDate = t.endDate < S ? null : S;
417
+ const D = n(_, V);
418
+ t.startDate = t.endDate < D ? null : D;
418
419
  }
419
- if (!t.endDate && y) {
420
- const S = n(y, V);
421
- t.endDate = S < t.startDate ? null : S;
420
+ if (!t.endDate && I) {
421
+ const D = n(I, V);
422
+ t.endDate = D < t.startDate ? null : D;
422
423
  }
423
- } else if (I === "datetimeRange") {
424
+ } else if (y === "datetimeRange") {
424
425
  const { datetimeRangeFormat: V } = t;
425
426
  if (!t.startDateTime && _) {
426
- const S = n(_, V);
427
- t.startDateTime = t.endDateTime < S ? null : S;
427
+ const D = n(_, V);
428
+ t.startDateTime = t.endDateTime < D ? null : D;
428
429
  }
429
- if (!t.endDateTime && y) {
430
- const S = n(y, V);
431
- t.endDateTime = S < t.startDateTime ? null : S;
430
+ if (!t.endDateTime && I) {
431
+ const D = n(I, V);
432
+ t.endDateTime = D < t.startDateTime ? null : D;
432
433
  }
433
434
  } else
434
- t.backupList && I === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (x = t.backupList) == null || x.forEach((V) => {
435
- P(t, V.label) && t.checkboxGroup.push(`${g.label}${V.label}`), V.isFilter = !1;
435
+ t.backupList && y === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (C = t.backupList) == null || C.forEach((V) => {
436
+ O(t, V.label) && t.checkboxGroup.push(`${g.label}${V.label}`), V.isFilter = !1;
436
437
  }));
437
- I !== "checkbox" && ((T = t.backupList) != null && T.length) && ((M = t.backupList) == null || M.forEach((V) => {
438
- V.isFilter = !1, V.isChecked = P(t, V.label);
439
- })), t.currentOperators = null, !t.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(I) ? C(t, !1) : C(t);
440
- }, u = (g) => {
441
- var T;
442
- const { field: _, label: y } = g;
443
- t.propItem = { ...t.propItem, label: y }, e("first-level-select", _);
444
- const I = (T = i.$refs) == null ? void 0 : T.inputRef;
438
+ y !== "checkbox" && ((w = t.backupList) != null && w.length) && ((S = t.backupList) == null || S.forEach((V) => {
439
+ V.isFilter = !1, V.isChecked = O(t, V.label);
440
+ })), t.currentOperators = null, !t.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(y) ? k(t, !1) : k(t);
441
+ }, m = (g) => {
442
+ var w;
443
+ const { field: _, label: I } = g;
444
+ t.propItem = { ...t.propItem, label: I }, e("first-level-select", _);
445
+ const y = (w = l.$refs) == null ? void 0 : w.inputRef;
445
446
  t.prevItem = g, t.backupPrevItem = g;
446
- const { operators: x } = g;
447
- x != null && x.length ? (t.operatorValue = "", t.currentOperators = x, C(t)) : (t.operatorValue = ":", m(g)), t.inputValue = "", I.focus();
447
+ const { operators: C } = g;
448
+ C != null && C.length ? (t.operatorValue = "", t.currentOperators = C, k(t)) : (t.operatorValue = ":", u(g)), t.inputValue = "", y.focus();
448
449
  }, o = (g) => {
449
- t.operatorValue = g, m(t.prevItem);
450
- }, l = (g, _, y, I) => {
451
- const { replace: x, operators: T, mergeTag: M } = g, V = ee(g), { indexMap: S } = t, D = S.get(y), L = G(a, g, _), B = t.operatorValue && T ? { operator: t.operatorValue } : null;
452
- let F = null;
453
- if (M) {
454
- const K = { label: I, ...L };
455
- if (D >= 0) {
456
- const ae = `${t.innerModelValue[D].value} | ${I}`, ne = [...t.innerModelValue[D].options, K];
457
- F = H({ ...t.innerModelValue[D], value: ae, options: ne });
450
+ t.operatorValue = g, u(t.prevItem);
451
+ }, f = (g, _, I, y) => {
452
+ const { replace: C, operators: w, mergeTag: S } = g, V = ee(g), { indexMap: D } = t, M = D.get(I), E = G(a, g, _), A = t.operatorValue && w ? { operator: t.operatorValue } : null;
453
+ let P = null;
454
+ if (S) {
455
+ const K = { label: y, ...E };
456
+ if (M >= 0) {
457
+ const ae = `${t.innerModelValue[M].value} | ${y}`, ne = [...t.innerModelValue[M].options, K];
458
+ P = H({ ...t.innerModelValue[M], value: ae, options: ne });
458
459
  } else
459
- F = H({ ...V, label: y, value: I, options: [K] });
460
+ P = H({ ...V, label: I, value: y, options: [K] });
460
461
  } else
461
- F = H({ ...V, label: y, value: I, ...L, ...B });
462
- if (P(t, I, y)) {
462
+ P = H({ ...V, label: I, value: y, ...E, ...A });
463
+ if (O(t, y, I)) {
463
464
  te(t);
464
465
  return;
465
466
  }
466
- C(t, !1);
467
- const $ = j(t.innerModelValue);
468
- let O = [];
469
- if ((x || M) && D >= 0) {
467
+ k(t, !1);
468
+ const L = j(t.innerModelValue);
469
+ let F = [];
470
+ if ((C || S) && M >= 0) {
470
471
  const K = [...t.innerModelValue];
471
- K.splice(D, 1), O = [...K, F];
472
+ K.splice(M, 1), F = [...K, P];
472
473
  } else
473
- O = [...t.innerModelValue, F];
474
- R({ emit: e, state: t, newValue: O, oldValue: $ });
475
- }, f = (g) => {
474
+ F = [...t.innerModelValue, P];
475
+ R({ emit: e, state: t, newValue: F, oldValue: L });
476
+ }, d = (g) => {
476
477
  var _;
477
- (_ = t.propItem) != null && _.label ? d({ label: g }) : w();
478
- }, d = (g, _ = !1) => {
479
- var T;
480
- C(t, !1), _ && (t.prevItem = g, t.backupPrevItem = g);
481
- const { prevItem: y } = t, I = g.value || g.label, x = (T = i.$refs) == null ? void 0 : T.inputRef;
482
- if (!P(t, I)) {
483
- const M = t.propItem.label || g.label;
484
- l(y, g, M, I);
485
- }
486
- x.focus();
487
- }, v = (g, _) => {
478
+ (_ = t.propItem) != null && _.label ? p({ label: g }) : x();
479
+ }, p = (g, _ = !1) => {
480
+ var w;
481
+ k(t, !1), _ && (t.prevItem = g, t.backupPrevItem = g);
482
+ const { prevItem: I } = t, y = g.value || g.label, C = (w = l.$refs) == null ? void 0 : w.inputRef;
483
+ if (!O(t, y)) {
484
+ const S = t.propItem.label || g.label;
485
+ f(I, g, S, y);
486
+ }
487
+ C.focus();
488
+ }, b = (g, _) => {
488
489
  if (g.label) {
489
490
  if (!_.options)
490
491
  return;
491
- if (!a.modelValue.find((I) => I.value === _.options[0].label)) {
492
- const I = _.label, x = _.options && _.options[0].label;
493
- l(_, _.options[0], I, x);
492
+ if (!a.modelValue.find((y) => y.value === _.options[0].label)) {
493
+ const y = _.label, C = _.options && _.options[0].label;
494
+ f(_, _.options[0], y, C);
494
495
  return;
495
496
  }
496
497
  } else
497
498
  e("search", t.innerModelValue);
498
- }, h = (g, _, y) => {
499
- var x;
500
- const I = (x = t.backupList) == null ? void 0 : x.find((T) => T.label === y);
501
- l(g, I, _.label, y);
502
- }, b = (g, _, y) => {
503
- var I, x;
499
+ }, h = (g, _, I) => {
500
+ var C;
501
+ const y = (C = t.backupList) == null ? void 0 : C.find((w) => w.label === I);
502
+ f(g, y, _.label, I);
503
+ }, v = (g, _, I) => {
504
+ var y, C;
504
505
  if (_.label) {
505
- const { regexp: T, replace: M, type: V, mergeTag: S } = y, D = V !== "checkbox" && M || V === "checkbox" && S ? [g] : g.split(a.splitInputValue);
506
- if (T)
507
- for (const L of D)
508
- T.test(L) && h(y, _, L);
506
+ const { regexp: w, replace: S, type: V, mergeTag: D } = I, M = V !== "checkbox" && S || V === "checkbox" && D ? [g] : g.split(a.splitInputValue);
507
+ if (w)
508
+ for (const E of M)
509
+ w.test(E) && h(I, _, E);
509
510
  else
510
- for (const L of D)
511
- h(y, _, L);
511
+ for (const E of M)
512
+ h(I, _, E);
512
513
  } else {
513
- const { items: T, defaultField: M } = a, V = T.find(($) => {
514
- const { regexp: O } = $;
515
- return O && O.test(t.inputValue);
516
- }) || (M ? T.find(($) => $.field === M) : t.allTypeAttri), { replace: S, type: D, mergeTag: L } = V, B = D !== "checkbox" && S || D === "checkbox" && L ? [g] : g.split(a.splitInputValue);
517
- (I = V == null ? void 0 : V.options) != null && I.length && (t.backupList = [...V.options], (x = t.backupList) == null || x.forEach(($) => {
518
- const O = $.value || $.label;
519
- B.includes(O) && ($.isChecked = !0);
514
+ const { items: w, defaultField: S } = a, V = w.find((L) => {
515
+ const { regexp: F } = L;
516
+ return F && F.test(t.inputValue);
517
+ }) || (S ? w.find((L) => L.field === S) : t.allTypeAttri), { replace: D, type: M, mergeTag: E } = V, A = M !== "checkbox" && D || M === "checkbox" && E ? [g] : g.split(a.splitInputValue);
518
+ (y = V == null ? void 0 : V.options) != null && y.length && (t.backupList = [...V.options], (C = t.backupList) == null || C.forEach((L) => {
519
+ const F = L.value || L.label;
520
+ A.includes(F) && (L.isChecked = !0);
520
521
  }));
521
- const F = V.label;
522
- for (const $ of B)
523
- l(V, {}, F, $);
524
- }
525
- }, w = () => {
526
- const { inputValue: g, propItem: _, prevItem: y } = t;
527
- if (c && c(), C(t, !1), !g)
528
- v(_, y);
522
+ const P = V.label;
523
+ for (const L of A)
524
+ f(V, {}, P, L);
525
+ }
526
+ }, x = () => {
527
+ const { inputValue: g, propItem: _, prevItem: I } = t;
528
+ if (i && i(), k(t, !1), !g)
529
+ b(_, I);
529
530
  else {
530
- const { maxlength: I } = a;
531
- if (I && I < g.length) {
532
- e("exceed", I);
531
+ const { maxlength: y } = a;
532
+ if (y && y < g.length) {
533
+ e("exceed", y);
533
534
  return;
534
535
  }
535
- b(g, _, y);
536
+ v(g, _, I);
536
537
  }
537
538
  };
538
- return { selectPropItem: u, selectRadioItem: d, selectInputValue: f, createTag: w, helpClick: () => {
539
+ return { selectPropItem: m, selectRadioItem: p, selectInputValue: d, createTag: x, helpClick: () => {
539
540
  e("help");
540
541
  }, setOperator: o };
541
542
  }
542
- const Ct = (a) => a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), oe = (a, e) => {
543
+ const Tt = (a) => a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), oe = (a, e) => {
543
544
  const t = [];
544
545
  let s = 0, n;
545
546
  for (; (n = a.exec(e)) !== null; ) {
546
- const r = n.index, p = a.lastIndex;
547
- r > s && t.push(e.slice(s, r)), t.push(e.slice(r, p)), s = p;
547
+ const r = n.index, c = a.lastIndex;
548
+ r > s && t.push(e.slice(s, r)), t.push(e.slice(r, c)), s = c;
548
549
  }
549
550
  return s < e.length && t.push(e.slice(s)), t;
550
551
  };
551
- function Vt({ props: a, state: e, emit: t, nextTick: s }) {
552
- const n = async (u) => {
553
- e.potentialOptions = await a.potentialOptions.getMatchList(u), C(e, !0);
554
- }, p = xt((u) => {
555
- var _, y, I;
556
- const { recordItems: o, propItem: l } = e, f = typeof u == "string" ? u : u && u.target && typeof u.target.value == "string" ? u.target.value : e.inputValue || "", d = String(f).trim(), { maxlength: v } = a;
557
- if (v && v < d.length) {
558
- t("exceed", v);
552
+ function Ct({ props: a, state: e, emit: t, nextTick: s }) {
553
+ const n = async (m) => {
554
+ e.potentialOptions = await a.potentialOptions.getMatchList(m), k(e, !0);
555
+ }, c = wt((m) => {
556
+ var _, I, y, C;
557
+ const { recordItems: o, propItem: f } = e, d = typeof m == "string" ? m : m && m.target && typeof m.target.value == "string" ? m.target.value : e.inputValue || "", p = (_ = String(d)) == null ? void 0 : _.trim(), { maxlength: b } = a;
558
+ if (b && b < p.length) {
559
+ t("exceed", b);
559
560
  return;
560
561
  }
561
- if (d.length === 0) {
562
- C(e);
562
+ if (p.length === 0) {
563
+ k(e);
563
564
  return;
564
565
  }
565
- Object.keys(e.matchItems).forEach((x) => {
566
- e.matchItems[x].attr = [], e.matchItems[x].attrValue = [];
566
+ Object.keys(e.matchItems).forEach((w) => {
567
+ e.matchItems[w].attr = [], e.matchItems[w].attrValue = [];
567
568
  });
568
- const h = Ct(d), b = new RegExp(h, "i"), w = l.label || !h ? null : o.find((x) => x.type === "map" && b.test(x.label));
569
- if (w) {
570
- e.propItem = { ...e.propItem, label: w.label }, e.inputValue = "", e.prevItem = w, e.backupPrevItem = w, e.backupList = w.options || [];
569
+ const h = Tt(p), v = new RegExp(h, "i"), x = f.label || !h ? null : o.find((w) => w.type === "map" && v.test(w.label));
570
+ if (x) {
571
+ e.propItem = { ...e.propItem, label: x.label }, e.inputValue = "", e.prevItem = x, e.backupPrevItem = x, e.backupList = x.options || [];
571
572
  return;
572
573
  }
573
- e.filterList = (_ = e.backupList) == null ? void 0 : _.filter((x) => b.test(x.label) ? (delete x.isFilter, P(e, x.label) && e.checkboxGroup.push(`${e.prevItem.label}${x.label}`), !0) : (x.isFilter = !0, !1));
574
- const k = new RegExp(h, "ig"), g = d.toLowerCase();
574
+ e.filterList = (I = e.backupList) == null ? void 0 : I.filter((w) => v.test(w.label) ? (delete w.isFilter, O(e, w.label) && e.checkboxGroup.push(`${e.prevItem.label}${w.label}`), !0) : (w.isFilter = !0, !1));
575
+ const T = new RegExp(h, "ig"), g = p.toLowerCase();
575
576
  if (e.propItem.label) {
576
- (y = e.backupList) == null || y.forEach((x) => {
577
- x.hightlighStr = g;
578
- const T = x.label;
579
- b.test(T) ? (x.match = oe(k, T), x.isFilter = !1) : x.isFilter = !0;
580
- }), (I = e.backupList) != null && I.length || d ? C(e) : C(e, !1);
577
+ (y = e.backupList) == null || y.forEach((w) => {
578
+ w.hightlighStr = g;
579
+ const S = w.label;
580
+ v.test(S) ? (w.match = oe(T, S), w.isFilter = !1) : w.isFilter = !0;
581
+ }), (C = e.backupList) != null && C.length || p ? k(e) : k(e, !1);
581
582
  return;
582
583
  }
583
- for (const x of o) {
584
- const { options: T = [], groupKey: M = "0", ...V } = x, S = V.label;
585
- if (b.test(S)) {
586
- const D = oe(k, S);
587
- e.matchItems[M].attr.push({ ...x, match: D, hightlighStr: g });
584
+ for (const w of o) {
585
+ const { options: S = [], groupKey: V = "0", ...D } = w, M = D.label;
586
+ if (v.test(M)) {
587
+ const E = oe(T, M);
588
+ e.matchItems[V].attr.push({ ...w, match: E, hightlighStr: g });
588
589
  }
589
- for (const D of T) {
590
- const L = e.propItem.label ? S : `${S}:${D.label}`;
591
- if (b.test(L)) {
592
- const B = oe(k, L);
593
- e.matchItems[M].attrValue.push({
590
+ for (const E of S) {
591
+ const A = e.propItem.label ? M : `${M}:${E.label}`;
592
+ if (v.test(A)) {
593
+ const P = oe(T, A);
594
+ e.matchItems[V].attrValue.push({
595
+ ...E,
594
596
  ...D,
595
- ...V,
596
- options: T,
597
+ options: S,
597
598
  hightlighStr: g,
598
- value: D.label,
599
- match: B
599
+ value: E.label,
600
+ match: P
600
601
  });
601
602
  }
602
603
  }
603
604
  }
604
- h && a.potentialOptions && a.potentialOptions.getMatchList ? n(h) : C(e);
605
- }, 500), c = () => {
606
- p.cancel && p.cancel();
607
- }, i = () => {
608
- var u;
609
- (u = e.backupList) == null || u.forEach((o) => o.isFilter && delete o.isFilter);
605
+ h && a.potentialOptions && a.potentialOptions.getMatchList ? n(h) : k(e);
606
+ }, 500), i = () => {
607
+ c.cancel && c.cancel();
608
+ }, l = () => {
609
+ var m;
610
+ (m = e.backupList) == null || m.forEach((o) => o.isFilter && delete o.isFilter);
610
611
  };
611
612
  return {
612
- handleInput: p,
613
- selectFirstMap: (u, o) => {
614
- var v;
615
- const { options: l } = u, { prevItem: f, propItem: d } = e;
616
- if (l)
617
- C(e, !1), e.propItem = { ...e.propItem, value: `${u.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = u.options || [], i(), (v = e.backupList) == null || v.forEach((h) => {
618
- const b = d.value + h.label;
619
- h.isChecked = P(e, b);
613
+ handleInput: c,
614
+ selectFirstMap: (m, o) => {
615
+ var b;
616
+ const { options: f } = m, { prevItem: d, propItem: p } = e;
617
+ if (f)
618
+ k(e, !1), e.propItem = { ...e.propItem, value: `${m.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = m.options || [], l(), (b = e.backupList) == null || b.forEach((h) => {
619
+ const v = p.value + h.label;
620
+ h.isChecked = O(e, v);
620
621
  });
621
622
  else {
622
- if (u.isChecked)
623
+ if (m.isChecked)
623
624
  return;
624
- C(e, !1), e.isShowTagKey = !0, i();
625
- const { field: h, type: b } = f, w = d.value + u.label, k = G(a, f, u), _ = [H({ type: b, field: h, label: d.label, value: w, ...k })];
625
+ k(e, !1), e.isShowTagKey = !0, l();
626
+ const { field: h, type: v } = d, x = p.value + m.label, T = G(a, d, m), _ = [H({ type: v, field: h, label: p.label, value: x, ...T })];
626
627
  R({ emit: t, state: e, nextTick: s, tagList: _ });
627
628
  }
628
- o && C(e);
629
+ o && k(e);
629
630
  },
630
- cancelHandleInput: c
631
+ cancelHandleInput: i
631
632
  };
632
633
  }
633
- function Tt({ props: a, state: e, emit: t, nextTick: s }) {
634
+ function St({ props: a, state: e, emit: t, nextTick: s }) {
634
635
  return {
635
636
  selectCheckbox: (r) => {
636
- var u, o;
637
- C(e, !1);
638
- const { checkboxGroup: p, prevItem: c, propItem: i } = e, m = ee(c);
637
+ var m, o;
638
+ k(e, !1);
639
+ const { checkboxGroup: c, prevItem: i, propItem: l } = e, u = ee(i);
639
640
  if (r) {
640
- const l = [], f = j(e.innerModelValue), { mergeTag: d, operators: v, label: h } = c;
641
- if (d) {
642
- let b = "";
643
- const w = [], { indexMap: k } = e, g = k.get(h);
644
- if (g !== void 0 && e.innerModelValue.splice(g, 1), (u = e.backupList) == null || u.forEach((_) => {
645
- const { label: y } = _, I = `${h}${y}`;
646
- if (p.includes(I)) {
641
+ const f = [], d = j(e.innerModelValue), { mergeTag: p, operators: b, label: h } = i;
642
+ if (p) {
643
+ let v = "";
644
+ const x = [], { indexMap: T } = e, g = T.get(h);
645
+ if (g !== void 0 && e.innerModelValue.splice(g, 1), (m = e.backupList) == null || m.forEach((_) => {
646
+ const { label: I } = _, y = `${h}${I}`;
647
+ if (c.includes(y)) {
647
648
  delete _.isFilter;
648
- const T = G(a, c, _), M = { label: _.label, ...T };
649
- b += b ? ` | ${y}` : y, w.push(M);
649
+ const w = G(a, i, _), S = { label: _.label, ...w };
650
+ v += v ? ` | ${I}` : I, x.push(S);
650
651
  }
651
- }), w.length > 0) {
652
- const _ = { ...m, value: b, options: w };
653
- l.push(_);
652
+ }), x.length > 0) {
653
+ const _ = { ...u, value: v, options: x };
654
+ f.push(_);
654
655
  }
655
656
  } else {
656
- const { valueMap: b } = e, w = [];
657
- if ((o = e.backupList) == null || o.forEach((k) => {
658
- const { label: g } = k, _ = `${h}${g}`, y = p.includes(_);
659
- if (y && !P(e, g)) {
660
- const I = G(a, c, k), x = e.operatorValue && v ? { operator: e.operatorValue } : null, T = H({ ...m, label: i.label, value: g, ...I, ...x });
661
- l.push(T), k.isChecked = !0;
662
- } else if (!y && P(e, g)) {
663
- k.isChecked = !1;
664
- const I = b.get(_);
665
- w.push(I);
657
+ const { valueMap: v } = e, x = [];
658
+ if ((o = e.backupList) == null || o.forEach((T) => {
659
+ const { label: g } = T, _ = `${h}${g}`, I = c.includes(_);
660
+ if (I && !O(e, g)) {
661
+ const y = G(a, i, T), C = e.operatorValue && b ? { operator: e.operatorValue } : null, w = H({ ...u, label: l.label, value: g, ...y, ...C });
662
+ f.push(w), T.isChecked = !0;
663
+ } else if (!I && O(e, g)) {
664
+ T.isChecked = !1;
665
+ const y = v.get(_);
666
+ x.push(y);
666
667
  }
667
- }), w.length) {
668
- const k = e.innerModelValue.filter((g, _) => g && !w.includes(_));
669
- R({ emit: t, state: e, nextTick: s, newValue: k, oldValue: f });
668
+ }), x.length) {
669
+ const T = e.innerModelValue.filter((g, _) => g && !x.includes(_));
670
+ R({ emit: t, state: e, nextTick: s, newValue: T, oldValue: d });
670
671
  return;
671
672
  }
672
673
  }
673
- R({ emit: t, state: e, nextTick: s, tagList: l, oldValue: f });
674
+ R({ emit: t, state: e, nextTick: s, tagList: f, oldValue: d });
674
675
  } else
675
- e.propItem = { ...i, label: "" }, e.inputValue = "";
676
+ e.propItem = { ...l, label: "" }, e.inputValue = "";
676
677
  }
677
678
  };
678
679
  }
679
- function St({ props: a, state: e, emit: t, nextTick: s, vm: n }) {
680
+ function Dt({ props: a, state: e, emit: t, nextTick: s, vm: n }) {
680
681
  const r = n || e.instance;
681
682
  return {
682
- onConfirmDate: async (m, u = !1) => {
683
- if (!m) {
683
+ onConfirmDate: async (u, m = !1) => {
684
+ if (!u) {
684
685
  e.propItem = { label: "" };
685
686
  return;
686
687
  }
687
- const o = await ie(r, e, a, u);
688
+ const o = await ie(r, e, a, m);
688
689
  if (o) {
689
- C(e, !1);
690
- const l = a.modelValue.filter((f) => f.type !== o.type || f.field !== o.field);
691
- l.push(o), R({ emit: t, state: e, nextTick: s, newValue: l });
690
+ k(e, !1);
691
+ const f = a.modelValue.filter((d) => d.type !== o.type || d.field !== o.field);
692
+ f.push(o), R({ emit: t, state: e, nextTick: s, newValue: f });
692
693
  } else
693
- C(e);
694
+ k(e);
694
695
  },
695
- handleDateShow: () => C(e),
696
- pickerOptions: (m, u = "") => ({
696
+ handleDateShow: () => k(e),
697
+ pickerOptions: (u, m = "") => ({
697
698
  disabledDate(o) {
698
- const { maxTimeLength: l = 0, min: f, max: d } = e.prevItem, v = e[u], h = o.getTime();
699
- if (l > 0)
700
- if (f || d)
701
- if (u && v) {
702
- const b = new Date(v).getTime(), w = !f && d ? b - l : Math.max(f.getTime(), b - l);
703
- return h < w || h > b;
704
- } else if (!u && m) {
705
- const b = new Date(m).getTime(), w = f && !d ? b + l : Math.min(d.getTime(), b + l);
706
- return h < b || h > w;
699
+ const { maxTimeLength: f = 0, min: d, max: p } = e.prevItem, b = e[m], h = o.getTime();
700
+ if (f > 0)
701
+ if (d || p)
702
+ if (m && b) {
703
+ const v = new Date(b).getTime(), x = !d && p ? v - f : Math.max(d.getTime(), v - f);
704
+ return h < x || h > v;
705
+ } else if (!m && u) {
706
+ const v = new Date(u).getTime(), x = d && !p ? v + f : Math.min(p.getTime(), v + f);
707
+ return h < v || h > x;
707
708
  } else
708
- return f && h < f.getTime() || d && h > d.getTime();
709
- else if (u && v) {
710
- const b = new Date(v).getTime(), w = b - l;
711
- return h < w || h > b;
712
- } else if (!u && m) {
713
- const b = new Date(m).getTime(), w = b + l;
714
- return h < b || h > w;
709
+ return d && h < d.getTime() || p && h > p.getTime();
710
+ else if (m && b) {
711
+ const v = new Date(b).getTime(), x = v - f;
712
+ return h < x || h > v;
713
+ } else if (!m && u) {
714
+ const v = new Date(u).getTime(), x = v + f;
715
+ return h < v || h > x;
715
716
  } else
716
717
  return !1;
717
- else if (f || d)
718
- if (u && v) {
719
- const b = new Date(v).getTime();
720
- return f && h < f.getTime() || h > b;
721
- } else if (!u && m) {
722
- const b = new Date(m).getTime();
723
- return h < b || d && h > d.getTime();
718
+ else if (d || p)
719
+ if (m && b) {
720
+ const v = new Date(b).getTime();
721
+ return d && h < d.getTime() || h > v;
722
+ } else if (!m && u) {
723
+ const v = new Date(u).getTime();
724
+ return h < v || p && h > p.getTime();
724
725
  } else
725
- return h < f || h > d;
726
- else if (u && v) {
727
- const b = new Date(v).getTime();
728
- return h > b;
729
- } else if (!u && m) {
730
- const b = new Date(m).getTime();
731
- return h < b;
726
+ return h < d || h > p;
727
+ else if (m && b) {
728
+ const v = new Date(b).getTime();
729
+ return h > v;
730
+ } else if (!m && u) {
731
+ const v = new Date(u).getTime();
732
+ return h < v;
732
733
  } else
733
734
  return !1;
734
735
  }
735
736
  })
736
737
  };
737
738
  }
738
- function Dt({ props: a, state: e, t, emit: s, nextTick: n, vm: r }) {
739
- const p = r || e.instance, c = async (u) => {
740
- if (!u) {
739
+ function Mt({ props: a, state: e, t, emit: s, nextTick: n, vm: r }) {
740
+ const c = r || e.instance, i = async (m) => {
741
+ if (!m) {
741
742
  e.propItem = { ...e.propItem, label: "" };
742
743
  return;
743
744
  }
744
- const o = await De(p, e, a);
745
+ const o = await De(c, e, a);
745
746
  if (o) {
746
- C(e, !1);
747
- const l = a.modelValue.filter((f) => f.type !== o.type || f.field !== o.field);
748
- l.push(o), R({ emit: s, state: e, nextTick: n, newValue: l });
747
+ k(e, !1);
748
+ const f = a.modelValue.filter((d) => d.type !== o.type || d.field !== o.field);
749
+ f.push(o), R({ emit: s, state: e, nextTick: n, newValue: f });
749
750
  } else
750
- C(e);
751
- }, i = (u, o, l) => {
752
- const { maxTimeLength: f = 0 } = u;
751
+ k(e);
752
+ }, l = (m, o, f) => {
753
+ const { maxTimeLength: d = 0 } = m;
753
754
  return {
754
755
  [o]: {
755
- validator: (d, v, h) => {
756
- f > 0 && !v ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !v && !e[l] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
756
+ validator: (p, b, h) => {
757
+ d > 0 && !b ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !b && !e[f] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
757
758
  }
758
759
  },
759
- [l]: {
760
- validator: (d, v, h) => {
761
- f > 0 && !v ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !v && !e[o] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
760
+ [f]: {
761
+ validator: (p, b, h) => {
762
+ d > 0 && !b ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !b && !e[o] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
762
763
  }
763
764
  }
764
765
  };
765
766
  };
766
767
  return {
767
768
  initFormRule: () => {
768
- let u = {}, o = {};
769
- a.items.forEach((l) => {
770
- l.type === "dateRange" && (u = i(l, "startDate", "endDate")), l.type === "datetimeRange" && (o = i(l, "startDateTime", "endDateTime"));
769
+ let m = {}, o = {};
770
+ a.items.forEach((f) => {
771
+ f.type === "dateRange" && (m = l(f, "startDate", "endDate")), f.type === "datetimeRange" && (o = l(f, "startDateTime", "endDateTime"));
771
772
  }), e.formRules = {
772
- ...u,
773
+ ...m,
773
774
  ...o
774
775
  }, a.editable && (e.formRules.inputEditValue = {
775
776
  required: !0,
@@ -777,115 +778,132 @@ function Dt({ props: a, state: e, t, emit: s, nextTick: n, vm: r }) {
777
778
  trigger: ["change", "blur"]
778
779
  });
779
780
  },
780
- sizeChange: c
781
+ sizeChange: i
781
782
  };
782
783
  }
783
- function Mt({ props: a, state: e, t, nextTick: s, format: n, emit: r, vm: p }) {
784
- const c = (l) => {
785
- var _;
786
- const { operator: f, value: d, start: v, end: h } = l, { options: b, operators: w, type: k, mergeTag: g } = e.prevItem;
787
- if (k !== "custom") {
788
- if (k === "numRange")
789
- Me(e, l, t);
790
- else if (k === "dateRange") {
784
+ function Et({ props: a, state: e, t, nextTick: s, format: n, emit: r, vm: c }) {
785
+ const i = (d) => {
786
+ var I;
787
+ const { operator: p, value: b, start: h, end: v } = d, { options: x, operators: T, type: g, mergeTag: _ } = e.prevItem;
788
+ if (g !== "custom") {
789
+ if (g === "numRange")
790
+ Me(e, d, t);
791
+ else if (g === "dateRange") {
791
792
  const { dateRangeFormat: y } = e;
792
- e.startDate = n(v, y), e.endDate = n(h, y);
793
- } else if (k === "datetimeRange") {
793
+ e.startDate = n(h, y), e.endDate = n(v, y);
794
+ } else if (g === "datetimeRange") {
794
795
  const { datetimeRangeFormat: y } = e;
795
- e.startDateTime = n(v, y), e.endDateTime = n(h, y);
796
+ e.startDateTime = n(h, y), e.endDateTime = n(v, y);
796
797
  } else {
797
- if (g) {
798
- const y = ((_ = l.options) == null ? void 0 : _.flatMap((I) => I.label)) || [];
798
+ if (_) {
799
+ const y = ((I = d.options) == null ? void 0 : I.flatMap((C) => C.label)) || [];
799
800
  e.inputEditValue = y, e.currentEditSelectTags = y;
800
801
  } else
801
- e.inputEditValue = Array.isArray(d) ? d.join(",") : d || "";
802
- e.currentEditValue = b;
802
+ e.inputEditValue = Array.isArray(b) ? b.join(",") : b || "";
803
+ e.currentEditValue = x;
803
804
  }
804
- e.operatorValue = f, e.currentOperators = w;
805
+ e.operatorValue = p, e.currentOperators = T;
805
806
  }
807
+ }, l = async () => {
808
+ var h, v;
809
+ if (!((v = (h = e.instance) == null ? void 0 : h.$refs) != null && v.formRef))
810
+ return;
811
+ const { prevItem: d } = e;
812
+ let p = [];
813
+ if (d.type === "numRange" ? p = [e.curMinNumVar, e.curMaxNumVar] : d.type === "dateRange" ? p = ["startDate", "endDate"] : d.type === "datetimeRange" ? p = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(d.type) || (p = ["inputEditValue"]), (p == null ? void 0 : p.length) === 0) {
814
+ e.hasFormError = !1;
815
+ return;
816
+ }
817
+ let b = !1;
818
+ await e.instance.$refs.formRef.validateField(p, (x) => {
819
+ x && (b = !0);
820
+ }), e.hasFormError = b;
806
821
  };
807
822
  return {
808
- editTag: (l, f, d) => {
809
- if (!a.editable || l.type && l.type === "map")
823
+ editTag: (d, p, b) => {
824
+ if (!a.editable || d.type && d.type === "map")
810
825
  return;
811
- C(e, !1), e.popoverVisible = !1;
812
- const v = d.target.classList.contains("tiny-tag") ? d.target : d.srcElement.parentElement;
826
+ k(e, !1), e.popoverVisible = !1;
827
+ const h = b.target.classList.contains("tiny-tag") ? b.target : b.srcElement.parentElement;
813
828
  s(() => {
814
- const { popoverRef: h } = e.instance.$refs;
815
- h.state.referenceElm = v, h.state.popperElm && (h.state.popperElm.style.display = "none"), h.doDestroy(), e.popoverVisible = !0;
816
- }), e.prevItem = e.recordItems.find((h) => h.field === l.field), !e.prevItem && (e.prevItem = l), e.selectValue = l.label, e.currentModelValueIndex = f, r("tagClick", l), c(l);
829
+ const { popoverRef: v } = e.instance.$refs;
830
+ v.state.referenceElm = h, v.state.popperElm && (v.state.popperElm.style.display = "none"), v.doDestroy(), e.popoverVisible = !0, l();
831
+ }), e.prevItem = e.recordItems.find((v) => v.field === d.field), !e.prevItem && (e.prevItem = d), e.selectValue = d.label, e.currentModelValueIndex = p, r("tagClick", d), i(d);
817
832
  },
818
- confirmEditTag: async (l) => {
819
- if (!l) {
833
+ confirmEditTag: async (d) => {
834
+ if (!d) {
820
835
  e.popoverVisible = !1;
821
836
  return;
822
837
  }
823
- const { prevItem: f, currentModelValueIndex: d } = e;
824
- let v = null;
825
- f.type === "numRange" ? v = await De(e.instance, e, a) : f.type === "dateRange" ? v = await ie(e.instance, e, a, !1) : f.type === "datetimeRange" ? v = await ie(e.instance, e, a, !0) : v = await It(e.instance, e, a), v ? (C(e, !1), e.popoverVisible = !1, R({ emit: r, state: e, nextTick: s, index: d, newTag: v, isEdit: !0 })) : e.popoverVisible = !0, e.currentEditValue = [];
838
+ const { prevItem: p, currentModelValueIndex: b } = e;
839
+ let h = null;
840
+ p.type === "numRange" ? h = await De(e.instance, e, a) : p.type === "dateRange" ? h = await ie(e.instance, e, a, !1) : p.type === "datetimeRange" ? h = await ie(e.instance, e, a, !0) : h = await kt(e.instance, e, a), h ? (k(e, !1), e.popoverVisible = !1, R({ emit: r, state: e, nextTick: s, index: b, newTag: h, isEdit: !0 })) : e.popoverVisible = !0, e.currentEditValue = [];
826
841
  },
827
- selectPropChange: (l, f) => {
828
- f || (e.prevItem = l, c(l));
842
+ selectPropChange: (d, p) => {
843
+ p || (e.prevItem = d, i(d), s(() => {
844
+ l();
845
+ }));
829
846
  },
830
- selectItemIsDisable: (l) => {
831
- var d, v, h, b;
832
- if (l.type && l.type === "map")
847
+ selectItemIsDisable: (d) => {
848
+ var b, h, v, x;
849
+ if (d.type && d.type === "map")
833
850
  return !0;
834
- if ((d = e.prevItem) != null && d.operators || l.operators)
835
- return ((v = e.prevItem.operators) == null ? void 0 : v.length) !== ((h = l.operators) == null ? void 0 : h.length);
836
- const f = ["radio", "checkbox"];
837
- return e.prevItem.type && f.includes(e.prevItem.type) ? l.type ? !f.includes(l.type) : !1 : ((b = e.prevItem) == null ? void 0 : b.type) !== l.type;
838
- }
851
+ if ((b = e.prevItem) != null && b.operators || d.operators)
852
+ return ((h = e.prevItem.operators) == null ? void 0 : h.length) !== ((v = d.operators) == null ? void 0 : v.length);
853
+ const p = ["radio", "checkbox"];
854
+ return e.prevItem.type && p.includes(e.prevItem.type) ? d.type ? !p.includes(d.type) : !1 : ((x = e.prevItem) == null ? void 0 : x.type) !== d.type;
855
+ },
856
+ checkFormValidation: l
839
857
  };
840
858
  }
841
- function Et({ state: a, emit: e, nextTick: t }) {
842
- const s = (p) => {
843
- C(a, !1);
844
- const { prevItem: c, indexMap: i } = a, { replace: m, label: u } = c, o = [];
845
- if (m && i.has(u)) {
846
- const l = i.get(u), f = { ...c, ...p };
847
- R({ emit: e, state: a, nextTick: t, newTag: f, index: l });
859
+ function $t({ state: a, emit: e, nextTick: t }) {
860
+ const s = (c) => {
861
+ k(a, !1);
862
+ const { prevItem: i, indexMap: l } = a, { replace: u, label: m } = i, o = [];
863
+ if (u && l.has(m)) {
864
+ const f = l.get(m), d = { ...i, ...c };
865
+ R({ emit: e, state: a, nextTick: t, newTag: d, index: f });
848
866
  return;
849
867
  } else
850
- !m && Array.isArray(p) ? p.forEach((l) => {
851
- P(a, l.value) || o.push({ ...c, ...l });
852
- }) : P(a, p.value) || o.push({ ...c, ...p });
868
+ !u && Array.isArray(c) ? c.forEach((f) => {
869
+ O(a, f.value) || o.push({ ...i, ...f });
870
+ }) : O(a, c.value) || o.push({ ...i, ...c });
853
871
  R({ emit: e, state: a, nextTick: t, tagList: o });
854
872
  };
855
873
  return {
856
- handleConfirm: (p) => {
857
- if (!p) {
858
- te(a), C(a, !1);
874
+ handleConfirm: (c) => {
875
+ if (!c) {
876
+ te(a), k(a, !1);
859
877
  return;
860
878
  }
861
- s(p);
879
+ s(c);
862
880
  },
863
- handleEditConfirm: (p) => {
864
- if (!p) {
881
+ handleEditConfirm: (c) => {
882
+ if (!c) {
865
883
  Q(a, !1);
866
884
  return;
867
885
  }
868
- s(p);
886
+ s(c);
869
887
  }
870
888
  };
871
889
  }
872
890
  function Lt({ props: a, state: e }) {
873
891
  return {
874
892
  initItems: () => {
875
- e.groupItems = {}, e.recordItems.forEach((c) => {
876
- var m;
877
- const { groupKey: i = "0" } = c;
878
- if (e.groupItems[i] ? e.groupItems[i].push({ ...c }) : (e.groupItems[i] = [{ ...c }], e.matchItems[i] = { attr: [], attrValue: [] }), e.prevItem && c.field === e.prevItem.field && c !== e.prevItem) {
879
- const { options: u, type: o } = c;
880
- e.prevItem = c, u != null && u.length && (e.backupList = u), o === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (m = e.backupList) == null || m.forEach((l) => {
881
- const { label: f } = l;
882
- P(e, f) && e.checkboxGroup.push(`${c.label}${f}`), l.isFilter = !1;
883
- })), C(e, c.field === e.prevItem.field && c !== e.prevItem);
893
+ e.groupItems = {}, e.recordItems.forEach((i) => {
894
+ var u;
895
+ const { groupKey: l = "0" } = i;
896
+ if (e.groupItems[l] ? e.groupItems[l].push({ ...i }) : (e.groupItems[l] = [{ ...i }], e.matchItems[l] = { attr: [], attrValue: [] }), e.prevItem && i.field === e.prevItem.field && i !== e.prevItem) {
897
+ const { options: m, type: o } = i;
898
+ e.prevItem = i, m != null && m.length && (e.backupList = m), o === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (u = e.backupList) == null || u.forEach((f) => {
899
+ const { label: d } = f;
900
+ O(e, d) && e.checkboxGroup.push(`${i.label}${d}`), f.isFilter = !1;
901
+ })), k(e, i.field === e.prevItem.field && i !== e.prevItem);
884
902
  }
885
903
  });
886
904
  },
887
905
  watchOutsideClick: () => {
888
- a.editable && Q(e, !1), e.isMouseDown = !1, C(e, !1);
906
+ a.editable && Q(e, !1), e.isMouseDown = !1, k(e, !1);
889
907
  },
890
908
  watchMouseDown: () => {
891
909
  e.isMouseDown = !0;
@@ -893,10 +911,10 @@ function Lt({ props: a, state: e }) {
893
911
  watchMouseMove: () => {
894
912
  e.isMouseDown && (e.isMouseDown = !1);
895
913
  },
896
- handleClick: (c) => {
897
- var u;
898
- const { backupPrevItem: i, prevItem: m } = e;
899
- c.stopPropagation(), a.editable && (e.popoverVisible = !1, e.currentEditValue = [], e.propItem.label && i && i !== m && (e.prevItem = i)), e.hasBackupList && (((u = e.backupList) == null ? void 0 : u.length) === 0 || !e.backupList) && !e.inputValue || a.items.length === 0 ? C(e, !1) : C(e);
914
+ handleClick: (i) => {
915
+ var m;
916
+ const { backupPrevItem: l, prevItem: u } = e;
917
+ i.stopPropagation(), a.editable && (e.popoverVisible = !1, e.currentEditValue = [], e.propItem.label && l && l !== u && (e.prevItem = l)), e.hasBackupList && (((m = e.backupList) == null ? void 0 : m.length) === 0 || !e.backupList) && !e.inputValue || a.items.length === 0 ? k(e, !1) : k(e);
900
918
  }
901
919
  };
902
920
  }
@@ -941,7 +959,7 @@ const Ee = {
941
959
  initUse: "搜索"
942
960
  }
943
961
  }
944
- }, Le = {
962
+ }, $e = {
945
963
  tvp: {
946
964
  tvpSearchbox: {
947
965
  defaultPlaceholder: "Select attribute filtering or enter keywords",
@@ -984,17 +1002,17 @@ const Ee = {
984
1002
  }
985
1003
  }, W = "zh-CN", q = {
986
1004
  "zh-CN": Ee,
987
- "en-US": Le
1005
+ "en-US": $e
988
1006
  };
989
- let E = null;
990
- const $t = (a) => {
991
- E = a;
1007
+ let $ = null;
1008
+ const Nt = (a) => {
1009
+ $ = a;
992
1010
  }, me = () => {
993
1011
  var a, e, t, s, n;
994
- if ((t = (e = (a = E == null ? void 0 : E.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && t.locale)
995
- return E.config.globalProperties.$i18n.locale;
996
- if ((s = E == null ? void 0 : E.$i18n) != null && s.locale)
997
- return E.$i18n.locale;
1012
+ if ((t = (e = (a = $ == null ? void 0 : $.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && t.locale)
1013
+ return $.config.globalProperties.$i18n.locale;
1014
+ if ((s = $ == null ? void 0 : $.$i18n) != null && s.locale)
1015
+ return $.$i18n.locale;
998
1016
  if (typeof navigator < "u") {
999
1017
  const r = navigator.language || ((n = navigator.languages) == null ? void 0 : n[0]);
1000
1018
  if (r)
@@ -1002,36 +1020,36 @@ const $t = (a) => {
1002
1020
  }
1003
1021
  return W;
1004
1022
  }, ce = (a) => q[a] || q[W], N = (a, e = {}) => {
1005
- var p, c;
1023
+ var c, i;
1006
1024
  if (!a)
1007
1025
  return "";
1008
- if ((c = (p = E == null ? void 0 : E.config) == null ? void 0 : p.globalProperties) != null && c.$t)
1026
+ if ((i = (c = $ == null ? void 0 : $.config) == null ? void 0 : c.globalProperties) != null && i.$t)
1009
1027
  try {
1010
- const i = E.config.globalProperties.$t(a, e);
1011
- if (i && i !== a)
1012
- return i;
1013
- } catch (i) {
1014
- console.warn("[TinySearchBox] i18n translation failed:", i);
1028
+ const l = $.config.globalProperties.$t(a, e);
1029
+ if (l && l !== a)
1030
+ return l;
1031
+ } catch (l) {
1032
+ console.warn("[TinySearchBox] i18n translation failed:", l);
1015
1033
  }
1016
- if (E != null && E.$t)
1034
+ if ($ != null && $.$t)
1017
1035
  try {
1018
- const i = E.$t(a, e);
1019
- if (i && i !== a)
1020
- return i;
1021
- } catch (i) {
1022
- console.warn("[TinySearchBox] i18n translation failed:", i);
1036
+ const l = $.$t(a, e);
1037
+ if (l && l !== a)
1038
+ return l;
1039
+ } catch (l) {
1040
+ console.warn("[TinySearchBox] i18n translation failed:", l);
1023
1041
  }
1024
1042
  const t = me(), s = ce(t), n = a.split(".");
1025
1043
  let r = s;
1026
- for (const i of n)
1027
- if (r && typeof r == "object" && i in r)
1028
- r = r[i];
1044
+ for (const l of n)
1045
+ if (r && typeof r == "object" && l in r)
1046
+ r = r[l];
1029
1047
  else {
1030
1048
  if (t !== W) {
1031
1049
  r = ce(W);
1032
- for (const u of n)
1033
- if (r && typeof r == "object" && u in r)
1034
- r = r[u];
1050
+ for (const m of n)
1051
+ if (r && typeof r == "object" && m in r)
1052
+ r = r[m];
1035
1053
  else {
1036
1054
  r = a;
1037
1055
  break;
@@ -1040,24 +1058,24 @@ const $t = (a) => {
1040
1058
  r = a;
1041
1059
  break;
1042
1060
  }
1043
- return typeof r == "string" && Object.keys(e).length > 0 ? r.replace(/\{(\w+)\}/g, (i, m) => e[m] !== void 0 ? e[m] : i) : typeof r == "string" ? r : a;
1044
- }, Nt = (a, e = {}) => a.map((t) => N(t, e)), Rt = (a) => a in q, Pt = () => Object.keys(q), Ot = (a, e) => {
1061
+ return typeof r == "string" && Object.keys(e).length > 0 ? r.replace(/\{(\w+)\}/g, (l, u) => e[u] !== void 0 ? e[u] : l) : typeof r == "string" ? r : a;
1062
+ }, Rt = (a, e = {}) => a.map((t) => N(t, e)), Pt = (a) => a in q, Ot = () => Object.keys(q), Ft = (a, e) => {
1045
1063
  q[a] = e;
1046
- }, Ft = (a) => {
1064
+ }, At = (a) => {
1047
1065
  a !== W && delete q[a];
1048
- }, At = {
1066
+ }, Bt = {
1049
1067
  t: N,
1050
1068
  zhCN: Ee,
1051
- enUS: Le,
1052
- tArray: Nt,
1053
- setGlobalApp: $t,
1069
+ enUS: $e,
1070
+ tArray: Rt,
1071
+ setGlobalApp: Nt,
1054
1072
  getCurrentLocale: me,
1055
1073
  getLocaleMessages: ce,
1056
- isLocaleSupported: Rt,
1057
- getSupportedLocales: Pt,
1058
- addLocale: Ot,
1059
- removeLocale: Ft
1060
- }, Bt = [
1074
+ isLocaleSupported: Pt,
1075
+ getSupportedLocales: Ot,
1076
+ addLocale: Ft,
1077
+ removeLocale: At
1078
+ }, zt = [
1061
1079
  "t",
1062
1080
  "state",
1063
1081
  "isShowClose",
@@ -1084,11 +1102,11 @@ const $t = (a) => {
1084
1102
  "handleEditConfirm",
1085
1103
  "showDropdown",
1086
1104
  "showPopover"
1087
- ], zt = ({ reactive: a, computed: e, api: t, i18n: s, watch: n, props: r, emit: p, vm: c }) => {
1088
- const i = a({
1105
+ ], jt = ({ reactive: a, computed: e, api: t, i18n: s, watch: n, props: r, emit: c, vm: i }) => {
1106
+ const l = a({
1089
1107
  innerModelValue: [...r.modelValue],
1090
1108
  placeholder: r.emptyPlaceholder || N("tvp.tvpSearchbox.addPlaceholder"),
1091
- emitter: p,
1109
+ emitter: c,
1092
1110
  recordItems: [],
1093
1111
  groupItems: {},
1094
1112
  inputValue: "",
@@ -1127,124 +1145,127 @@ const $t = (a) => {
1127
1145
  currentEditSelectTags: [],
1128
1146
  visible: !1,
1129
1147
  visibleTimer: null,
1130
- hasBackupList: e(() => i.propItem.label && [void 0, "radio", "checkbox", "map"].includes(i.prevItem.type)),
1131
- isIndeterminate: e(() => i.checkboxGroup.length > 0 && i.checkboxGroup.length !== i.filterList.length),
1148
+ hasFormError: !1,
1149
+ // 表单校验错误状态
1150
+ hasBackupList: e(() => l.propItem.label && [void 0, "radio", "checkbox", "map"].includes(l.prevItem.type)),
1151
+ isIndeterminate: e(() => l.checkboxGroup.length > 0 && l.checkboxGroup.length !== l.filterList.length),
1132
1152
  checkAll: e({
1133
- get: () => i.checkboxGroup.length && i.checkboxGroup.length === i.filterList.length,
1134
- set: (m) => {
1135
- m ? i.checkboxGroup = i.filterList.flatMap((u) => `${i.prevItem.label}${u.label}`) : i.checkboxGroup = [];
1153
+ get: () => l.checkboxGroup.length && l.checkboxGroup.length === l.filterList.length,
1154
+ set: (u) => {
1155
+ u ? l.checkboxGroup = l.filterList.flatMap((m) => `${l.prevItem.label}${m.label}`) : l.checkboxGroup = [];
1136
1156
  }
1137
1157
  })
1138
1158
  });
1139
- return i;
1140
- }, jt = (a, { getCurrentInstance: e, onMounted: t, onBeforeUnmount: s, computed: n, reactive: r, watch: p }, { emit: c, nextTick: i, refs: m, vm: u }) => {
1141
- const o = {}, l = a.emitter ? a.emitter.emit : c, f = zt({ reactive: r, computed: n, api: o, i18n: At, watch: p, props: a, emit: l, vm: u });
1142
- return Ht({ api: o, state: f, t: N, props: a, emit: l, nextTick: i, vm: u, computed: n }), Gt({ watch: p, state: f, props: a, api: o, nextTick: i, vm: u }), f.instance = u, t(() => {
1159
+ return l;
1160
+ }, Ht = (a, { getCurrentInstance: e, onMounted: t, onBeforeUnmount: s, computed: n, reactive: r, watch: c }, { emit: i, nextTick: l, refs: u, vm: m }) => {
1161
+ const o = {}, f = a.emitter ? a.emitter.emit : i, d = jt({ reactive: r, computed: n, api: o, i18n: Bt, watch: c, props: a, emit: f, vm: m });
1162
+ return Gt({ api: o, state: d, t: N, props: a, emit: f, nextTick: l, vm: m, computed: n }), Kt({ watch: c, state: d, props: a, api: o, nextTick: l, vm: m }), d.instance = m, t(() => {
1143
1163
  typeof document < "u" && (document.addEventListener("click", o.watchOutsideClick), document.addEventListener("mousedown", o.watchMouseDown), document.addEventListener("mousemove", o.watchMouseMove));
1144
1164
  }), s(() => {
1145
- typeof document < "u" && (document.removeEventListener("click", o.watchOutsideClick), document.removeEventListener("mousedown", o.watchMouseDown), document.removeEventListener("mousemove", o.watchMouseMove), f.localeCheckInterval && (clearInterval(f.localeCheckInterval), f.localeCheckInterval = null));
1165
+ typeof document < "u" && (document.removeEventListener("click", o.watchOutsideClick), document.removeEventListener("mousedown", o.watchMouseDown), document.removeEventListener("mousemove", o.watchMouseMove), d.localeCheckInterval && (clearInterval(d.localeCheckInterval), d.localeCheckInterval = null));
1146
1166
  }), o;
1147
- }, Ht = ({ api: a, state: e, t, props: s, emit: n, nextTick: r, vm: p, computed: c }) => {
1148
- const { deleteTag: i, clearTag: m, backspaceDeleteTag: u } = wt({ props: s, state: e, emit: n, nextTick: r }), { editTag: o, confirmEditTag: l, selectPropChange: f, selectItemIsDisable: d } = Mt({ props: s, state: e, t, nextTick: r, format: le, emit: n, vm: p }), { handleInput: v, selectFirstMap: h, cancelHandleInput: b } = Vt({ props: s, state: e, emit: n, nextTick: r }), { selectPropItem: w, selectRadioItem: k, selectInputValue: g, createTag: _, helpClick: y, setOperator: I } = kt({ props: s, emit: n, state: e, t, format: le, nextTick: r, vm: p, cancelHandleInput: b }), { selectCheckbox: x } = Tt({ props: s, state: e, emit: n, nextTick: r }), { onConfirmDate: T, handleDateShow: M, pickerOptions: V } = St({ props: s, state: e, emit: n, nextTick: r, vm: p }), { sizeChange: S, initFormRule: D } = Dt({ props: s, state: e, t, emit: n, nextTick: r, vm: p }), { handleConfirm: L, handleEditConfirm: B } = Et({ state: e, emit: n, nextTick: r }), { initItems: F, watchOutsideClick: $, watchMouseDown: O, watchMouseMove: K, handleClick: ae } = Lt({ props: s, state: e }), ne = c(() => s.modelValue.length || e.propItem.label || e.inputValue), $e = () => ({
1149
- selectInputValue: g,
1150
- selectPropItem: w,
1151
- selectRadioItem: k,
1152
- setOperator: I,
1153
- selectCheckbox: x,
1154
- sizeChange: S,
1155
- onConfirmDate: T,
1156
- selectFirstMap: h,
1157
- handleDateShow: M
1158
- }), se = (Z) => {
1167
+ }, Gt = ({ api: a, state: e, t, props: s, emit: n, nextTick: r, vm: c, computed: i }) => {
1168
+ const { deleteTag: l, clearTag: u, backspaceDeleteTag: m } = It({ props: s, state: e, emit: n, nextTick: r }), { editTag: o, confirmEditTag: f, selectPropChange: d, selectItemIsDisable: p, checkFormValidation: b } = Et({ props: s, state: e, t, nextTick: r, format: le, emit: n, vm: c }), { handleInput: h, selectFirstMap: v, cancelHandleInput: x } = Ct({ props: s, state: e, emit: n, nextTick: r }), { selectPropItem: T, selectRadioItem: g, selectInputValue: _, createTag: I, helpClick: y, setOperator: C } = Vt({ props: s, emit: n, state: e, t, format: le, nextTick: r, vm: c, cancelHandleInput: x }), { selectCheckbox: w } = St({ props: s, state: e, emit: n, nextTick: r }), { onConfirmDate: S, handleDateShow: V, pickerOptions: D } = Dt({ props: s, state: e, emit: n, nextTick: r, vm: c }), { sizeChange: M, initFormRule: E } = Mt({ props: s, state: e, t, emit: n, nextTick: r, vm: c }), { handleConfirm: A, handleEditConfirm: P } = $t({ state: e, emit: n, nextTick: r }), { initItems: L, watchOutsideClick: F, watchMouseDown: K, watchMouseMove: ae, handleClick: ne } = Lt({ props: s, state: e }), Le = i(() => s.modelValue.length || e.propItem.label || e.inputValue), Ne = () => ({
1169
+ selectInputValue: _,
1170
+ selectPropItem: T,
1171
+ selectRadioItem: g,
1172
+ setOperator: C,
1173
+ selectCheckbox: w,
1174
+ sizeChange: M,
1175
+ onConfirmDate: S,
1176
+ selectFirstMap: v,
1177
+ handleDateShow: V
1178
+ }), re = (Z) => {
1159
1179
  e.placeholder = Z;
1160
1180
  };
1161
- s.modelValue.length > 0, se(t("tvp.tvpSearchbox.addPlaceholder")), Object.assign(a, {
1181
+ s.modelValue.length > 0, re(t("tvp.tvpSearchbox.addPlaceholder")), Object.assign(a, {
1162
1182
  t,
1163
1183
  state: e,
1164
- isShowClose: ne,
1165
- deleteTag: i,
1184
+ isShowClose: Le,
1185
+ deleteTag: l,
1166
1186
  editTag: o,
1167
- backspaceDeleteTag: u,
1168
- createTag: _,
1169
- clearTag: m,
1187
+ backspaceDeleteTag: m,
1188
+ createTag: I,
1189
+ clearTag: u,
1170
1190
  helpClick: y,
1171
- handleInput: v,
1172
- handleClick: ae,
1173
- handleEvents: (Z, Ne, Re) => {
1174
- const he = $e();
1175
- typeof he[Z] == "function" ? he[Z](Ne, Re) : console.warn(`[TinySearchBox] Unknown event: ${Z}`);
1191
+ handleInput: h,
1192
+ handleClick: ne,
1193
+ handleEvents: (Z, Re, Pe) => {
1194
+ const he = Ne();
1195
+ typeof he[Z] == "function" ? he[Z](Re, Pe) : console.warn(`[TinySearchBox] Unknown event: ${Z}`);
1176
1196
  },
1177
- pickerOptions: V,
1197
+ pickerOptions: D,
1178
1198
  resetInput: te,
1179
- selectItemIsDisable: d,
1180
- selectPropChange: f,
1181
- confirmEditTag: l,
1182
- handleConfirm: L,
1183
- handleEditConfirm: B,
1184
- showDropdown: C,
1199
+ selectItemIsDisable: p,
1200
+ selectPropChange: d,
1201
+ confirmEditTag: f,
1202
+ handleConfirm: A,
1203
+ handleEditConfirm: P,
1204
+ showDropdown: k,
1185
1205
  showPopover: Q,
1186
- setPlaceholder: se,
1187
- initItems: F,
1188
- initFormRule: D,
1189
- watchOutsideClick: $,
1190
- watchMouseDown: O,
1191
- watchMouseMove: K
1206
+ checkFormValidation: b,
1207
+ setPlaceholder: re,
1208
+ initItems: L,
1209
+ initFormRule: E,
1210
+ watchOutsideClick: F,
1211
+ watchMouseDown: K,
1212
+ watchMouseMove: ae
1192
1213
  });
1193
- }, Gt = ({ watch: a, state: e, props: t, api: s, nextTick: n, vm: r }) => {
1194
- var u;
1195
- const p = () => {
1214
+ }, Kt = ({ watch: a, state: e, props: t, api: s, nextTick: n, vm: r }) => {
1215
+ var m;
1216
+ const c = () => {
1196
1217
  var o;
1197
1218
  if (e.propItem.label) {
1198
- const { placeholder: l, type: f } = e.prevItem;
1199
- l ? s.setPlaceholder(l) : f === "map" ? s.setPlaceholder(N("tvp.tvpSearchbox.tagPlaceholder")) : (o = e.backupList) != null && o.length ? s.setPlaceholder(N("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder"));
1219
+ const { placeholder: f, type: d } = e.prevItem;
1220
+ f ? s.setPlaceholder(f) : d === "map" ? s.setPlaceholder(N("tvp.tvpSearchbox.tagPlaceholder")) : (o = e.backupList) != null && o.length ? s.setPlaceholder(N("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder"));
1200
1221
  } else
1201
1222
  s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder"));
1202
- }, c = () => {
1203
- var o, l, f;
1204
- return (o = r == null ? void 0 : r.$i18n) != null && o.locale ? r.$i18n.locale : (f = (l = r == null ? void 0 : r.proxy) == null ? void 0 : l.$i18n) != null && f.locale ? r.proxy.$i18n.locale : me();
1223
+ }, i = () => {
1224
+ var o, f, d;
1225
+ return (o = r == null ? void 0 : r.$i18n) != null && o.locale ? r.$i18n.locale : (d = (f = r == null ? void 0 : r.proxy) == null ? void 0 : f.$i18n) != null && d.locale ? r.proxy.$i18n.locale : me();
1205
1226
  };
1206
- let i = c();
1227
+ let l = i();
1207
1228
  if (r != null && r.$i18n)
1208
1229
  try {
1209
1230
  r.$watch(
1210
1231
  () => r.$i18n.locale,
1211
1232
  (o) => {
1212
- o !== i && (i = o, p());
1233
+ o !== l && (l = o, c());
1213
1234
  },
1214
1235
  { immediate: !1 }
1215
1236
  );
1216
1237
  } catch (o) {
1217
1238
  console.warn("[TinySearchBox] Unable to watch i18n.locale via vm.$watch:", o);
1218
1239
  }
1219
- if ((u = r == null ? void 0 : r.proxy) != null && u.$i18n)
1240
+ if ((m = r == null ? void 0 : r.proxy) != null && m.$i18n)
1220
1241
  try {
1221
1242
  a(
1222
1243
  () => r.proxy.$i18n.locale,
1223
1244
  (o) => {
1224
- o !== i && (i = o, p());
1245
+ o !== l && (l = o, c());
1225
1246
  },
1226
1247
  { immediate: !1 }
1227
1248
  );
1228
1249
  } catch (o) {
1229
1250
  console.warn("[TinySearchBox] Unable to watch i18n.locale via watch:", o);
1230
1251
  }
1231
- const m = () => {
1232
- const o = c();
1233
- o !== i && (i = o, p());
1252
+ const u = () => {
1253
+ const o = i();
1254
+ o !== l && (l = o, c());
1234
1255
  };
1235
- typeof window < "u" && (e.localeCheckInterval = setInterval(m, 200)), a(
1256
+ typeof window < "u" && (e.localeCheckInterval = setInterval(u, 200)), a(
1236
1257
  () => t.modelValue,
1237
1258
  () => {
1238
- m();
1259
+ u();
1239
1260
  }
1240
1261
  ), a(
1241
1262
  () => t.items,
1242
1263
  (o) => {
1243
- const l = e.visible, f = e.prevItem && e.prevItem.field;
1264
+ const f = e.visible, d = e.prevItem && e.prevItem.field;
1244
1265
  e.recordItems = j(o), s.initItems(), s.initFormRule(), n(() => {
1245
- if (s.initItems(), s.initFormRule(), l && e.propItem.label) {
1246
- const d = e.recordItems.find((v) => v.field === f) || e.prevItem;
1247
- e.prevItem = d || {}, e.backupList = d && d.options ? [...d.options] : [], e.filterList = e.backupList ? [...e.backupList] : [], C(e);
1266
+ if (s.initItems(), s.initFormRule(), f && e.propItem.label) {
1267
+ const p = e.recordItems.find((b) => b.field === d) || e.prevItem;
1268
+ e.prevItem = p || {}, e.backupList = p && p.options ? [...p.options] : [], e.filterList = e.backupList ? [...e.backupList] : [], k(e);
1248
1269
  }
1249
1270
  });
1250
1271
  },
@@ -1263,35 +1284,52 @@ const $t = (a) => {
1263
1284
  ), a(
1264
1285
  () => e.popoverVisible,
1265
1286
  (o) => {
1266
- !o && !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 || "");
1287
+ !o && !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 || ""), o || (e.hasFormError = !1);
1267
1288
  },
1268
1289
  {
1269
1290
  immediate: !0
1270
1291
  }
1292
+ ), a(
1293
+ () => {
1294
+ const o = {
1295
+ inputEditValue: e.inputEditValue,
1296
+ startDate: e.startDate,
1297
+ endDate: e.endDate,
1298
+ startDateTime: e.startDateTime,
1299
+ endDateTime: e.endDateTime
1300
+ };
1301
+ return e.curMinNumVar && e.curMaxNumVar && (o[e.curMinNumVar] = e[e.curMinNumVar], o[e.curMaxNumVar] = e[e.curMaxNumVar]), o;
1302
+ },
1303
+ () => {
1304
+ e.popoverVisible && n(() => {
1305
+ s.checkFormValidation();
1306
+ });
1307
+ },
1308
+ { deep: !0 }
1271
1309
  ), a(
1272
1310
  () => e.propItem.label,
1273
1311
  (o) => {
1274
- p();
1312
+ c();
1275
1313
  }
1276
1314
  ), a(
1277
1315
  () => t.modelValue,
1278
1316
  (o) => {
1279
1317
  if (o) {
1280
- if (e.indexMap.clear(), e.valueMap.clear(), o.forEach((l, f) => {
1281
- var v;
1282
- const d = `${l.label}${l.value}`;
1283
- e.indexMap.set(l.label, f), e.valueMap.set(d, f), ((v = l.options) == null ? void 0 : v.length) > 0 && l.options.forEach((h) => {
1284
- const b = `${l.label}${h.label}`;
1285
- e.valueMap.set(b, f);
1318
+ if (e.indexMap.clear(), e.valueMap.clear(), o.forEach((f, d) => {
1319
+ var b;
1320
+ const p = `${f.label}${f.value}`;
1321
+ e.indexMap.set(f.label, d), e.valueMap.set(p, d), ((b = f.options) == null ? void 0 : b.length) > 0 && f.options.forEach((h) => {
1322
+ const v = `${f.label}${h.label}`;
1323
+ e.valueMap.set(v, d);
1286
1324
  });
1287
1325
  }), Q(e, !1), o.length === 0 && s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder")), t.editable && !e.inputEditValue.length && o[0]) {
1288
- const l = o[0];
1289
- if ((e.recordItems.find((d) => d.field === l.field) || l).mergeTag && l.options) {
1290
- const d = l.options.flatMap((v) => v.label) || [];
1291
- e.inputEditValue = d, e.currentEditSelectTags = d;
1326
+ const f = o[0];
1327
+ if ((e.recordItems.find((p) => p.field === f.field) || f).mergeTag && f.options) {
1328
+ const p = f.options.flatMap((b) => b.label) || [];
1329
+ e.inputEditValue = p, e.currentEditSelectTags = p;
1292
1330
  } else {
1293
- const d = l.value;
1294
- e.inputEditValue = Array.isArray(d) ? d.join(",") : d || "";
1331
+ const p = f.value;
1332
+ e.inputEditValue = Array.isArray(p) ? p.join(",") : p || "";
1295
1333
  }
1296
1334
  }
1297
1335
  e.innerModelValue = [...o];
@@ -1303,192 +1341,192 @@ const $t = (a) => {
1303
1341
  }
1304
1342
  );
1305
1343
  };
1306
- var Kt = function() {
1307
- var a = this, e = a.$createElement, t = a._self._c || e;
1308
- return t("div", {
1344
+ var Ut = function() {
1345
+ var a, e, t = this, s = t.$createElement, n = t._self._c || s;
1346
+ return n("div", {
1309
1347
  attrs: {
1310
1348
  tiny_mode: "pc"
1311
1349
  }
1312
- }, [t("tiny-dropdown-item", {
1350
+ }, [n("tiny-dropdown-item", {
1313
1351
  directives: [{
1314
1352
  name: "show",
1315
1353
  rawName: "v-show",
1316
- value: a.state.inputValue.trim(),
1354
+ value: t.state.inputValue.trim(),
1317
1355
  expression: "state.inputValue.trim()"
1318
1356
  }],
1319
1357
  staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
1320
1358
  attrs: {
1321
1359
  "item-data": {
1322
- label: a.state.inputValue
1360
+ label: t.state.inputValue
1323
1361
  }
1324
1362
  },
1325
1363
  on: {
1326
1364
  "item-click": function() {
1327
- return a.selectInputValue(a.state.inputValue);
1365
+ return t.selectInputValue(t.state.inputValue);
1328
1366
  }
1329
1367
  }
1330
- }, [t("span", [a._v(" " + a._s(a.t("tvp.tvpSearchbox.initUse")) + """ + a._s(a.state.inputValue) + """)])]), t("div", {
1368
+ }, [n("span", [t._v(" " + t._s(t.t("tvp.tvpSearchbox.initUse")) + """ + t._s(t.state.inputValue) + """)])]), n("div", {
1331
1369
  directives: [{
1332
1370
  name: "show",
1333
1371
  rawName: "v-show",
1334
- value: !a.state.propItem.label && a.state.inputValue.trim(),
1335
- expression: "!state.propItem.label && state.inputValue.trim()"
1372
+ value: !t.state.propItem.label && ((a = t.state.inputValue) === null || a === void 0 ? void 0 : a.trim()),
1373
+ expression: "!state.propItem.label && state.inputValue?.trim()"
1336
1374
  }]
1337
- }, [a._l(a.state.matchItems, function(s, n) {
1338
- return t("div", {
1339
- key: n
1340
- }, [s.attr.length ? t("div", [t("span", {
1375
+ }, [t._l(t.state.matchItems, function(r, c) {
1376
+ return n("div", {
1377
+ key: c
1378
+ }, [r.attr.length ? n("div", [n("span", {
1341
1379
  staticClass: "tvp-search-box__filter-type"
1342
- }, [a._v(a._s(n === "0" ? a.t("tvp.tvpSearchbox.attributeType") : n))]), a._l(s.attr, function(r, p) {
1343
- return t("tiny-dropdown-item", {
1344
- key: r.label + p,
1380
+ }, [t._v(t._s(c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c))]), t._l(r.attr, function(i, l) {
1381
+ return n("tiny-dropdown-item", {
1382
+ key: i.label + l,
1345
1383
  staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1346
1384
  attrs: {
1347
- "item-data": r
1385
+ "item-data": i
1348
1386
  },
1349
1387
  on: {
1350
1388
  "item-click": function() {
1351
- return a.selectPropItem(r);
1389
+ return t.selectPropItem(i);
1352
1390
  }
1353
1391
  }
1354
- }, [t("span", a._l(r.match, function(c) {
1355
- return t("span", {
1356
- key: c
1357
- }, [c.toLowerCase() === r.hightlighStr ? t("span", {
1392
+ }, [n("span", t._l(i.match, function(u) {
1393
+ return n("span", {
1394
+ key: u
1395
+ }, [u.toLowerCase() === i.hightlighStr ? n("span", {
1358
1396
  staticClass: "tvp-search-box__text-highlight"
1359
- }, [a._v(a._s(c))]) : t("span", [a._v(a._s(c))])]);
1397
+ }, [t._v(t._s(u))]) : n("span", [t._v(t._s(u))])]);
1360
1398
  }), 0)]);
1361
- })], 2) : a._e(), s.attrValue.length ? [t("span", {
1399
+ })], 2) : t._e(), r.attrValue.length ? [n("span", {
1362
1400
  staticClass: "tvp-search-box__filter-type"
1363
- }, [a._v(a._s(a.t("tvp.tvpSearchbox.propertyValue", [n === "0" ? a.t("tvp.tvpSearchbox.attributeType") : n])))]), a._l(s.attrValue, function(r, p) {
1364
- return t("tiny-dropdown-item", {
1365
- key: r.label + p,
1401
+ }, [t._v(t._s(t.t("tvp.tvpSearchbox.propertyValue", [c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c])))]), t._l(r.attrValue, function(i, l) {
1402
+ return n("tiny-dropdown-item", {
1403
+ key: i.label + l,
1366
1404
  staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1367
1405
  attrs: {
1368
- disabled: r.isChecked,
1369
- "item-data": r
1406
+ disabled: i.isChecked,
1407
+ "item-data": i
1370
1408
  },
1371
1409
  on: {
1372
1410
  "item-click": function() {
1373
- return a.selectRadioItem(r, !0);
1411
+ return t.selectRadioItem(i, !0);
1374
1412
  }
1375
1413
  }
1376
- }, [t("span", a._l(r.match, function(c) {
1377
- return t("span", {
1378
- key: c
1379
- }, [c.toLowerCase() === r.hightlighStr ? t("span", {
1414
+ }, [n("span", t._l(i.match, function(u) {
1415
+ return n("span", {
1416
+ key: u
1417
+ }, [u.toLowerCase() === i.hightlighStr ? n("span", {
1380
1418
  staticClass: "tvp-search-box__text-highlight"
1381
- }, [a._v(a._s(c))]) : t("span", [a._v(a._s(c))])]);
1419
+ }, [t._v(t._s(u))]) : n("span", [t._v(t._s(u))])]);
1382
1420
  }), 0)]);
1383
- })] : a._e()], 2);
1384
- }), t("div", {
1421
+ })] : t._e()], 2);
1422
+ }), n("div", {
1385
1423
  directives: [{
1386
1424
  name: "show",
1387
1425
  rawName: "v-show",
1388
- value: a.state.potentialOptions,
1426
+ value: t.state.potentialOptions,
1389
1427
  expression: "state.potentialOptions"
1390
1428
  }]
1391
- }, [t("span", {
1429
+ }, [n("span", {
1392
1430
  staticClass: "tvp-search-box__filter-type"
1393
- }, [a._v(a._s(a.t("tvp.tvpSearchbox.matched")))]), t("div", {
1431
+ }, [t._v(t._s(t.t("tvp.tvpSearchbox.matched")))]), n("div", {
1394
1432
  staticClass: "tvp-search-box__potential-box",
1395
1433
  attrs: {
1396
1434
  id: "potential-loading"
1397
1435
  }
1398
- }, [a.state.potentialOptions ? t("div", a._l(a.state.potentialOptions, function(s, n) {
1399
- return t("tiny-dropdown-item", {
1400
- key: s.label + n,
1436
+ }, [t.state.potentialOptions ? n("div", t._l(t.state.potentialOptions, function(r, c) {
1437
+ return n("tiny-dropdown-item", {
1438
+ key: r.label + c,
1401
1439
  staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1402
1440
  attrs: {
1403
- "item-data": s
1441
+ "item-data": r
1404
1442
  },
1405
1443
  on: {
1406
1444
  "item-click": function() {
1407
- return a.selectRadioItem(s, !0);
1445
+ return t.selectRadioItem(r, !0);
1408
1446
  }
1409
1447
  }
1410
- }, [a._v(" " + a._s(s.label) + ": "), t("span", {
1448
+ }, [t._v(" " + t._s(r.label) + ": "), n("span", {
1411
1449
  staticClass: "tvp-search-box__text-highlight"
1412
- }, [a._v(a._s(s.value))])]);
1413
- }), 1) : a._e()])])], 2), t("div", {
1450
+ }, [t._v(t._s(r.value))])]);
1451
+ }), 1) : t._e()])])], 2), n("div", {
1414
1452
  directives: [{
1415
1453
  name: "show",
1416
1454
  rawName: "v-show",
1417
- value: a.state.visible && !a.state.propItem.label && !a.state.inputValue.trim(),
1418
- expression: "state.visible && !state.propItem.label && !state.inputValue.trim()"
1455
+ value: t.state.visible && !t.state.propItem.label && !((e = t.state.inputValue) !== null && e !== void 0 && e.trim()),
1456
+ expression: "state.visible && !state.propItem.label && !state.inputValue?.trim()"
1419
1457
  }],
1420
1458
  staticClass: "tvp-search-box__first-panel"
1421
- }, a._l(a.state.groupItems, function(s, n) {
1422
- return t("div", {
1423
- key: n
1424
- }, [s.length ? t("span", {
1459
+ }, t._l(t.state.groupItems, function(r, c) {
1460
+ return n("div", {
1461
+ key: c
1462
+ }, [r.length ? n("span", {
1425
1463
  staticClass: "tvp-search-box__filter-type"
1426
- }, [a._v(a._s(n === "0" ? a.t("tvp.tvpSearchbox.attributeType") : n))]) : a._e(), a._l(s, function(r, p) {
1427
- return t("tiny-dropdown-item", {
1428
- key: (r.field || r.label) + p,
1464
+ }, [t._v(t._s(c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c))]) : t._e(), t._l(r, function(i, l) {
1465
+ return n("tiny-dropdown-item", {
1466
+ key: (i.field || i.label) + l,
1429
1467
  staticClass: "tvp-search-box__dropdown-item",
1430
1468
  attrs: {
1431
- "item-data": r
1469
+ "item-data": i
1432
1470
  },
1433
1471
  on: {
1434
1472
  "item-click": function() {
1435
- return a.selectPropItem(r);
1473
+ return t.selectPropItem(i);
1436
1474
  }
1437
1475
  }
1438
- }, [t("span", {
1476
+ }, [n("span", {
1439
1477
  attrs: {
1440
- title: r.label
1478
+ title: i.label
1441
1479
  }
1442
- }, [a._v(a._s(r.label))])]);
1480
+ }, [t._v(t._s(i.label))])]);
1443
1481
  })], 2);
1444
1482
  }), 0)], 1);
1445
- }, Ut = [];
1446
- function fe(a, e, t, s, n, r, p, c) {
1447
- var i = typeof a == "function" ? a.options : a;
1448
- e && (i.render = e, i.staticRenderFns = t, i._compiled = !0), s && (i.functional = !0), r && (i._scopeId = "data-v-" + r);
1449
- var m;
1450
- if (p ? (m = function(l) {
1451
- l = l || // cached call
1483
+ }, qt = [];
1484
+ function fe(a, e, t, s, n, r, c, i) {
1485
+ var l = typeof a == "function" ? a.options : a;
1486
+ e && (l.render = e, l.staticRenderFns = t, l._compiled = !0), s && (l.functional = !0), r && (l._scopeId = "data-v-" + r);
1487
+ var u;
1488
+ if (c ? (u = function(f) {
1489
+ f = f || // cached call
1452
1490
  this.$vnode && this.$vnode.ssrContext || // stateful
1453
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !l && typeof __VUE_SSR_CONTEXT__ < "u" && (l = __VUE_SSR_CONTEXT__), n && n.call(this, l), l && l._registeredComponents && l._registeredComponents.add(p);
1454
- }, i._ssrRegister = m) : n && (m = c ? function() {
1491
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), n && n.call(this, f), f && f._registeredComponents && f._registeredComponents.add(c);
1492
+ }, l._ssrRegister = u) : n && (u = i ? function() {
1455
1493
  n.call(
1456
1494
  this,
1457
- (i.functional ? this.parent : this).$root.$options.shadowRoot
1495
+ (l.functional ? this.parent : this).$root.$options.shadowRoot
1458
1496
  );
1459
- } : n), m)
1460
- if (i.functional) {
1461
- i._injectStyles = m;
1462
- var u = i.render;
1463
- i.render = function(f, d) {
1464
- return m.call(d), u(f, d);
1497
+ } : n), u)
1498
+ if (l.functional) {
1499
+ l._injectStyles = u;
1500
+ var m = l.render;
1501
+ l.render = function(d, p) {
1502
+ return u.call(p), m(d, p);
1465
1503
  };
1466
1504
  } else {
1467
- var o = i.beforeCreate;
1468
- i.beforeCreate = o ? [].concat(o, m) : [m];
1505
+ var o = l.beforeCreate;
1506
+ l.beforeCreate = o ? [].concat(o, u) : [u];
1469
1507
  }
1470
1508
  return {
1471
1509
  exports: a,
1472
- options: i
1510
+ options: l
1473
1511
  };
1474
1512
  }
1475
- const qt = (a, e, { emit: t }) => {
1476
- const s = a.handleEvents || a.events || ((c, i, m) => {
1477
- t("events", c, i, m);
1513
+ const Zt = (a, e, { emit: t }) => {
1514
+ const s = a.handleEvents || a.events || ((i, l, u) => {
1515
+ t("events", i, l, u);
1478
1516
  });
1479
1517
  return {
1480
- selectInputValue: (c) => {
1481
- s("selectInputValue", c);
1518
+ selectInputValue: (i) => {
1519
+ s("selectInputValue", i);
1482
1520
  },
1483
- selectPropItem: (c) => {
1484
- s("selectPropItem", c);
1521
+ selectPropItem: (i) => {
1522
+ s("selectPropItem", i);
1485
1523
  },
1486
- selectRadioItem: (c, i) => {
1487
- s("selectRadioItem", c, i);
1524
+ selectRadioItem: (i, l) => {
1525
+ s("selectRadioItem", i, l);
1488
1526
  },
1489
1527
  t: N
1490
1528
  };
1491
- }, Zt = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], Yt = X({
1529
+ }, Yt = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], Wt = X({
1492
1530
  name: pe + "SearchBoxFirstLevelPanel",
1493
1531
  components: {
1494
1532
  TinyDropdownItem: Ie
@@ -1514,27 +1552,27 @@ const qt = (a, e, { emit: t }) => {
1514
1552
  },
1515
1553
  emits: ["events"],
1516
1554
  setup(a, e) {
1517
- return ue({ props: a, context: e, renderless: qt, api: Zt });
1555
+ return ue({ props: a, context: e, renderless: Zt, api: Yt });
1518
1556
  }
1519
1557
  }), ve = {};
1520
- var Wt = /* @__PURE__ */ fe(
1521
- Yt,
1522
- Kt,
1558
+ var Qt = /* @__PURE__ */ fe(
1559
+ Wt,
1523
1560
  Ut,
1561
+ qt,
1524
1562
  !1,
1525
- Qt,
1563
+ Xt,
1526
1564
  null,
1527
1565
  null,
1528
1566
  null
1529
1567
  );
1530
- function Qt(a) {
1568
+ function Xt(a) {
1531
1569
  for (let e in ve)
1532
1570
  this[e] = ve[e];
1533
1571
  }
1534
- const Xt = /* @__PURE__ */ function() {
1535
- return Wt.exports;
1572
+ const Jt = /* @__PURE__ */ function() {
1573
+ return Qt.exports;
1536
1574
  }();
1537
- var Jt = function() {
1575
+ var ea = function() {
1538
1576
  var a, e = this, t = e.$createElement, s = e._self._c || t;
1539
1577
  return s("div", {
1540
1578
  attrs: {
@@ -1594,12 +1632,12 @@ var Jt = function() {
1594
1632
  attrs: {
1595
1633
  title: n.label
1596
1634
  }
1597
- }, e._l(n.match, function(p) {
1635
+ }, e._l(n.match, function(c) {
1598
1636
  return s("span", {
1599
- key: p
1600
- }, [p.toLowerCase() === n.hightlighStr ? s("span", {
1637
+ key: c
1638
+ }, [c.toLowerCase() === n.hightlighStr ? s("span", {
1601
1639
  staticClass: "tvp-search-box__text-highlight"
1602
- }, [e._v(e._s(p))]) : s("span", [e._v(e._s(p))])]);
1640
+ }, [e._v(e._s(c))]) : s("span", [e._v(e._s(c))])]);
1603
1641
  }), 0) : s("span", {
1604
1642
  attrs: {
1605
1643
  title: n.label
@@ -1945,44 +1983,44 @@ var Jt = function() {
1945
1983
  }
1946
1984
  }, [e._v(e._s(n.label))])]);
1947
1985
  })], 2) : e._e()]);
1948
- }, ea = [];
1949
- const ta = (a, e, { emit: t }) => {
1950
- const { computed: s } = e, n = a.handleEvents || a.events || ((d, v, h) => {
1951
- t("events", d, v, h);
1952
- }), r = (d) => {
1953
- n("setOperator", d);
1954
- }, p = (d) => {
1955
- n("selectRadioItem", d);
1956
- }, c = (d) => {
1957
- n("selectCheckbox", d);
1958
- }, i = (d) => {
1959
- n("sizeChange", d);
1960
- }, m = (d, v) => {
1961
- n("onConfirmDate", d, v);
1962
- }, u = (d, v) => {
1963
- n("selectFirstMap", d, v);
1964
- }, o = (d) => {
1965
- n("handleDateShow", d);
1966
- }, l = s(() => {
1967
- var d;
1968
- return a.state.hasBackupList && ((d = a.state.backupList) == null ? void 0 : d.length) === 0;
1969
- }), f = s(() => {
1970
- var d;
1971
- return (d = a.state.backupList) == null ? void 0 : d.find((v) => !v.isFilter);
1986
+ }, ta = [];
1987
+ const aa = (a, e, { emit: t }) => {
1988
+ const { computed: s } = e, n = a.handleEvents || a.events || ((p, b, h) => {
1989
+ t("events", p, b, h);
1990
+ }), r = (p) => {
1991
+ n("setOperator", p);
1992
+ }, c = (p) => {
1993
+ n("selectRadioItem", p);
1994
+ }, i = (p) => {
1995
+ n("selectCheckbox", p);
1996
+ }, l = (p) => {
1997
+ n("sizeChange", p);
1998
+ }, u = (p, b) => {
1999
+ n("onConfirmDate", p, b);
2000
+ }, m = (p, b) => {
2001
+ n("selectFirstMap", p, b);
2002
+ }, o = (p) => {
2003
+ n("handleDateShow", p);
2004
+ }, f = s(() => {
2005
+ var p;
2006
+ return a.state.hasBackupList && ((p = a.state.backupList) == null ? void 0 : p.length) === 0;
2007
+ }), d = s(() => {
2008
+ var p;
2009
+ return (p = a.state.backupList) == null ? void 0 : p.find((b) => !b.isFilter);
1972
2010
  });
1973
2011
  return {
1974
2012
  setOperator: r,
1975
- selectRadioItem: p,
1976
- selectCheckbox: c,
1977
- sizeChange: i,
1978
- onConfirmDate: m,
1979
- selectFirstMap: u,
2013
+ selectRadioItem: c,
2014
+ selectCheckbox: i,
2015
+ sizeChange: l,
2016
+ onConfirmDate: u,
2017
+ selectFirstMap: m,
1980
2018
  handleDateShow: o,
1981
- isLoading: l,
1982
- showCheckBoxList: f,
2019
+ isLoading: f,
2020
+ showCheckBoxList: d,
1983
2021
  t: N
1984
2022
  };
1985
- }, aa = [
2023
+ }, na = [
1986
2024
  "setOperator",
1987
2025
  "selectRadioItem",
1988
2026
  "selectCheckbox",
@@ -1993,20 +2031,20 @@ const ta = (a, e, { emit: t }) => {
1993
2031
  "isLoading",
1994
2032
  "showCheckBoxList",
1995
2033
  "t"
1996
- ], na = X({
2034
+ ], ra = X({
1997
2035
  name: pe + "SearchBoxSecondLevelPanel",
1998
2036
  emits: ["events"],
1999
2037
  components: {
2000
2038
  TinyFormItem: we,
2001
2039
  TinyDropdownItem: Ie,
2002
- TinyCheckbox: qe,
2003
- TinyCheckboxGroup: Ze,
2040
+ TinyCheckbox: Ze,
2041
+ TinyCheckboxGroup: Ye,
2004
2042
  TinyDatePicker: xe,
2005
2043
  TinyInput: _e,
2006
2044
  TinyButton: ye
2007
2045
  },
2008
2046
  directives: {
2009
- loading: Ye.directive
2047
+ loading: We.directive
2010
2048
  },
2011
2049
  props: {
2012
2050
  ...J,
@@ -2029,27 +2067,27 @@ const ta = (a, e, { emit: t }) => {
2029
2067
  }
2030
2068
  },
2031
2069
  setup(a, e) {
2032
- return ue({ props: a, context: e, renderless: ta, api: aa });
2070
+ return ue({ props: a, context: e, renderless: aa, api: na });
2033
2071
  }
2034
2072
  }), be = {};
2035
2073
  var sa = /* @__PURE__ */ fe(
2036
- na,
2037
- Jt,
2074
+ ra,
2038
2075
  ea,
2076
+ ta,
2039
2077
  !1,
2040
- ra,
2078
+ oa,
2041
2079
  null,
2042
2080
  null,
2043
2081
  null
2044
2082
  );
2045
- function ra(a) {
2083
+ function oa(a) {
2046
2084
  for (let e in be)
2047
2085
  this[e] = be[e];
2048
2086
  }
2049
- const oa = /* @__PURE__ */ function() {
2087
+ const la = /* @__PURE__ */ function() {
2050
2088
  return sa.exports;
2051
2089
  }();
2052
- const la = X({
2090
+ const ia = X({
2053
2091
  model: {
2054
2092
  prop: "modelValue",
2055
2093
  event: "update:modelValue"
@@ -2110,39 +2148,32 @@ const la = X({
2110
2148
  default: ""
2111
2149
  }
2112
2150
  },
2113
- emits: [
2114
- "update:modelValue",
2115
- "change",
2116
- "search",
2117
- "exceed",
2118
- "first-level-select",
2119
- "clear"
2120
- ],
2151
+ emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "clear"],
2121
2152
  components: {
2122
- TinyTag: Pe,
2153
+ TinyTag: Oe,
2123
2154
  TinyInput: _e,
2124
- TinyDropdown: Oe,
2125
- TinyDropdownMenu: Fe,
2155
+ TinyDropdown: Fe,
2156
+ TinyDropdownMenu: Ae,
2126
2157
  TinyButton: ye,
2127
- TinyTooltip: Ae,
2158
+ TinyTooltip: Be,
2128
2159
  TinyDatePicker: xe,
2129
- TinyForm: Be,
2160
+ TinyForm: ze,
2130
2161
  TinyFormItem: we,
2131
- TinyPopover: ze,
2132
- TinySelect: je,
2133
- TinyOption: He,
2134
- TinySearchBoxFirstLevelPanel: Xt,
2135
- TinySearchBoxSecondLevelPanel: oa,
2162
+ TinyPopover: je,
2163
+ TinySelect: He,
2164
+ TinyOption: Ge,
2165
+ TinySearchBoxFirstLevelPanel: Jt,
2166
+ TinySearchBoxSecondLevelPanel: la,
2136
2167
  // 图标组件
2137
- TinyIconSearch: Ge(),
2138
- TinyIconClose: Ke(),
2139
- TinyIconHelpQuery: Ue()
2168
+ TinyIconSearch: Ke(),
2169
+ TinyIconClose: Ue(),
2170
+ TinyIconHelpQuery: qe()
2140
2171
  },
2141
2172
  setup(a, e) {
2142
- return ue({ props: a, context: e, renderless: jt, api: Bt });
2173
+ return ue({ props: a, context: e, renderless: Ht, api: zt });
2143
2174
  }
2144
2175
  });
2145
- var ia = function() {
2176
+ var ca = function() {
2146
2177
  var a, e, t = this, s = t.$createElement, n = t._self._c || s;
2147
2178
  return n("div", {
2148
2179
  class: ["tvp-search-box", t.size === "small" ? "tvp-search-box--small" : ""],
@@ -2153,9 +2184,9 @@ var ia = function() {
2153
2184
  }
2154
2185
  }, [n("tiny-icon-search", {
2155
2186
  staticClass: "tvp-search-box__prefix"
2156
- }), t._l(t.modelValue, function(r, p) {
2187
+ }), t._l(t.modelValue, function(r, c) {
2157
2188
  return n("tiny-tag", {
2158
- key: r.field + p,
2189
+ key: r.field + c,
2159
2190
  staticClass: "tvp-search-box__tag",
2160
2191
  class: t.editable && r.type !== "map" ? "tvp-search-box__tag-editor" : "",
2161
2192
  attrs: {
@@ -2163,11 +2194,11 @@ var ia = function() {
2163
2194
  title: `${r.label} ${r.operator || ":"} ${r.value}`
2164
2195
  },
2165
2196
  on: {
2166
- close: function(c) {
2197
+ close: function(i) {
2167
2198
  return t.deleteTag(r);
2168
2199
  },
2169
- click: function(c) {
2170
- return c.stopPropagation(), t.editTag(r, p, c);
2200
+ click: function(i) {
2201
+ return i.stopPropagation(), t.editTag(r, c, i);
2171
2202
  }
2172
2203
  }
2173
2204
  }, [n("span", {
@@ -2217,7 +2248,7 @@ var ia = function() {
2217
2248
  scopedSlots: t._u([{
2218
2249
  key: "dropdown",
2219
2250
  fn: function() {
2220
- var r, p;
2251
+ var r, c, i;
2221
2252
  return [n("tiny-dropdown-menu", {
2222
2253
  style: {
2223
2254
  "max-height": t.panelMaxHeight
@@ -2227,8 +2258,8 @@ var ia = function() {
2227
2258
  "popper-class": "tvp-search-box__dropdown-menu"
2228
2259
  },
2229
2260
  on: {
2230
- mouseup: function(c) {
2231
- return c.stopPropagation(), (function() {
2261
+ mouseup: function(l) {
2262
+ return l.stopPropagation(), (function() {
2232
2263
  }).apply(null, arguments);
2233
2264
  }
2234
2265
  }
@@ -2236,10 +2267,10 @@ var ia = function() {
2236
2267
  directives: [{
2237
2268
  name: "show",
2238
2269
  rawName: "v-show",
2239
- value: !t.state.propItem.label || t.state.inputValue.trim(),
2240
- expression: "!state.propItem.label || state.inputValue.trim()"
2270
+ value: !t.state.propItem.label || ((r = t.state.inputValue) === null || r === void 0 ? void 0 : r.trim()),
2271
+ expression: "!state.propItem.label || state.inputValue?.trim()"
2241
2272
  }]
2242
- }, [(r = t.state.instance) !== null && r !== void 0 && r.slots["first-panel"] ? t._t("first-panel", null, null, {
2273
+ }, [(c = t.state.instance) !== null && c !== void 0 && c.slots["first-panel"] ? t._t("first-panel", null, null, {
2243
2274
  state: t.state,
2244
2275
  handleEvents: t.handleEvents
2245
2276
  }) : n("TinySearchBoxFirstLevelPanel", {
@@ -2254,7 +2285,7 @@ var ia = function() {
2254
2285
  value: t.state.propItem.label,
2255
2286
  expression: "state.propItem.label"
2256
2287
  }]
2257
- }, [(p = t.state.instance) !== null && p !== void 0 && p.slots["second-panel"] ? t._t("second-panel", null, null, {
2288
+ }, [(i = t.state.instance) !== null && i !== void 0 && i.slots["second-panel"] ? t._t("second-panel", null, null, {
2258
2289
  state: t.state,
2259
2290
  pickerOptions: t.pickerOptions,
2260
2291
  handleEvents: t.handleEvents,
@@ -2272,7 +2303,7 @@ var ia = function() {
2272
2303
  }) : n("div", {
2273
2304
  staticClass: "tvp-search-box__panel-box",
2274
2305
  on: {
2275
- click: function(c) {
2306
+ click: function(l) {
2276
2307
  return t.showDropdown(t.state);
2277
2308
  }
2278
2309
  }
@@ -2418,7 +2449,7 @@ var ia = function() {
2418
2449
  disabled: t.selectItemIsDisable(r)
2419
2450
  },
2420
2451
  on: {
2421
- click: function(p) {
2452
+ click: function(c) {
2422
2453
  t.selectPropChange(r, t.selectItemIsDisable(r));
2423
2454
  }
2424
2455
  }
@@ -2641,7 +2672,8 @@ var ia = function() {
2641
2672
  }
2642
2673
  }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.cancel")) + " ")]), n("tiny-button", {
2643
2674
  attrs: {
2644
- size: "mini"
2675
+ size: "mini",
2676
+ disabled: t.state.hasFormError
2645
2677
  },
2646
2678
  on: {
2647
2679
  click: function(r) {
@@ -2656,25 +2688,25 @@ var ia = function() {
2656
2688
  },
2657
2689
  onConfirm: t.handleEditConfirm
2658
2690
  })], 2)], 2)] : t._e()], 2)], 2);
2659
- }, ca = [];
2691
+ }, pa = [];
2660
2692
  const ge = {};
2661
- var pa = /* @__PURE__ */ fe(
2662
- la,
2693
+ var ua = /* @__PURE__ */ fe(
2663
2694
  ia,
2664
2695
  ca,
2696
+ pa,
2665
2697
  !1,
2666
- ua,
2698
+ da,
2667
2699
  null,
2668
2700
  null,
2669
2701
  null
2670
2702
  );
2671
- function ua(a) {
2703
+ function da(a) {
2672
2704
  for (let e in ge)
2673
2705
  this[e] = ge[e];
2674
2706
  }
2675
- const da = /* @__PURE__ */ function() {
2676
- return pa.exports;
2677
- }(), ma = {
2707
+ const ma = /* @__PURE__ */ function() {
2708
+ return ua.exports;
2709
+ }(), fa = {
2678
2710
  ...J,
2679
2711
  tiny_mode: {
2680
2712
  type: String,
@@ -2752,21 +2784,21 @@ const da = /* @__PURE__ */ function() {
2752
2784
  }
2753
2785
  }, Y = X({
2754
2786
  name: pe + "SearchBox",
2755
- props: ma,
2756
- ...da
2757
- }), fa = "3.27.0";
2787
+ props: fa,
2788
+ ...ma
2789
+ }), ha = "3.27.1";
2758
2790
  Y.install = function(a) {
2759
2791
  a.component(Y.name, Y);
2760
2792
  };
2761
- Y.version = fa;
2793
+ Y.version = ha;
2762
2794
  window && typeof window < "u" && window.Vue && Y.install(window.Vue);
2763
2795
  export {
2764
- Xt as TinySearchBoxFirstLevelPanel,
2765
- oa as TinySearchBoxSecondLevelPanel,
2796
+ Jt as TinySearchBoxFirstLevelPanel,
2797
+ la as TinySearchBoxSecondLevelPanel,
2766
2798
  Y as default,
2767
- Le as enUS,
2768
- $t as setGlobalApp,
2799
+ $e as enUS,
2800
+ Nt as setGlobalApp,
2769
2801
  N as t,
2770
2802
  Ee as zhCN
2771
2803
  };
2772
- //# sourceMappingURL=index.es.js.map
2804
+ //# sourceMappingURL=index.js.map