@opentiny/vue-search-box 2.32.0-alpha.3 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './index.css';
2
- import { defineComponent as fe, $prefix as Te, $props as ve, setup as ke, hooks as ue } from "@opentiny/vue-common";
2
+ import { defineComponent as de, $prefix as Ee, $props as fe, setup as ke, hooks as ce } from "@opentiny/vue-common";
3
3
  import { TinyDropdownItem as Ne, TinyCheckbox as Ue, TinyCheckboxGroup as Ye, TinyDatePicker as Re, TinyInput as Oe, TinyButton as Pe, TinyLoading as qe, TinyTag as We, TinyDropdown as Ze, TinyDropdownMenu as Xe, TinyTooltip as Qe, TinyPopover as Je, TinySelect as et, TinyOption as tt } from "@opentiny/vue";
4
4
  import { iconSearch as at, iconClose as nt, iconHelpQuery as rt } from "@opentiny/vue-icon";
5
5
  const st = (a, e, n, r = "0") => {
@@ -28,7 +28,7 @@ const ct = {
28
28
  "[object String]": "string",
29
29
  "[object Number]": "number",
30
30
  "[object Boolean]": "boolean"
31
- }, ut = (a) => a == null, pt = (a) => ut(a) ? String(a) : ct[ot.call(a)] || "object", Fe = (a) => typeof a == "number" && isFinite(a), dt = (a) => pt(a) === "date", He = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ft = new RegExp(
31
+ }, ut = (a) => a == null, pt = (a) => ut(a) ? String(a) : ct[ot.call(a)] || "object", Fe = (a) => typeof a == "number" && isFinite(a), dt = (a) => pt(a) === "date", Ae = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ft = new RegExp(
32
32
  "^(\\d{4})(/|-)(((0)?[1-9])|(1[0-2]))((/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1])))?( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$"
33
33
  ), vt = new RegExp(
34
34
  "^(((0)?[1-9])|(1[0-2]))(/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1]))?(/|-)?(\\d{4})( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$"
@@ -44,7 +44,7 @@ const ct = {
44
44
  "s{1,2}": /s{1,2}/,
45
45
  "S{1,3}": /S{1,3}/,
46
46
  "Z{1,1}": /Z{1,1}/
47
- }, Y = {
47
+ }, Z = {
48
48
  YEAR: 9999,
49
49
  MONTH: 11,
50
50
  DATE: 31,
@@ -56,14 +56,14 @@ const ct = {
56
56
  const e = 0 - a.getTimezoneOffset() / 60;
57
57
  let n;
58
58
  return e === 0 ? n = "Z" : e > 0 ? n = "+" + (e > 10 ? e : "0" + e) + "00" : n = (e < -10 ? e : "-0" + -e) + "00", n;
59
- }, Be = (a) => a % 400 === 0 || a % 4 === 0 && a % 100 !== 0, Ae = (a) => a > Y.MILLISECOND ? Number(String(a).substring(0, 3)) : a, Ee = ({ year: a, month: e, date: n, hours: r, minutes: o, seconds: t, milliseconds: d }) => {
60
- let s = He[e];
59
+ }, Be = (a) => a % 400 === 0 || a % 4 === 0 && a % 100 !== 0, He = (a) => a > Z.MILLISECOND ? Number(String(a).substring(0, 3)) : a, Te = ({ year: a, month: e, date: n, hours: r, minutes: o, seconds: t, milliseconds: d }) => {
60
+ let s = Ae[e];
61
61
  if (Be(a) && e === 1 && (s += 1), n <= s)
62
- return new Date(a, e, n, r, o, t, Ae(d));
63
- }, Vt = (a) => {
62
+ return new Date(a, e, n, r, o, t, He(d));
63
+ }, wt = (a) => {
64
64
  if (a.length === 23) {
65
65
  const e = Number(a[1]), n = a[3] - 1, r = Number(a[9] || 1), o = a[15] || 0, t = a[17] || 0, d = a[20] || 0, s = a[22] || 0;
66
- return Ee({
66
+ return Te({
67
67
  date: r,
68
68
  year: e,
69
69
  hours: o,
@@ -73,10 +73,10 @@ const ct = {
73
73
  milliseconds: s
74
74
  });
75
75
  }
76
- }, wt = (a) => {
76
+ }, Vt = (a) => {
77
77
  if (a.length === 22) {
78
78
  const e = Number(a[12]), n = a[1] - 1, r = Number(a[6] || 1), o = a[14] || 0, t = a[16] || 0, d = a[19] || 0, s = a[21] || 0;
79
- return Ee({
79
+ return Te({
80
80
  year: e,
81
81
  month: n,
82
82
  date: r,
@@ -92,22 +92,22 @@ const ct = {
92
92
  const e = Number(a[1]), n = a[2] - 1, r = Number(a[6]), o = new Date(e, n, r).getTimezoneOffset(), t = a[12] || 0, d = a[14] || 0, s = a[17] || 0, l = a[19] || 0;
93
93
  let p = a[20];
94
94
  const u = a[21], f = a[22] || 0, i = a[24] || 0;
95
- let c = He[n], m, b;
95
+ let c = Ae[n], m, h;
96
96
  if (Be(e) && n === 1 && (c += 1), r <= c) {
97
97
  if (p === "Z")
98
- m = t - o / 60, b = d;
98
+ m = t - o / 60, h = d;
99
99
  else {
100
100
  if (p.includes(":") || (p = p.substr(0, 3) + ":" + p.substr(3)), !xt.includes(p))
101
101
  return;
102
- m = u === "+" ? t - f - o / 60 : Number(t) + Number(f) - o / 60, b = u === "+" ? d - i : Number(d) + Number(i);
102
+ m = u === "+" ? t - f - o / 60 : Number(t) + Number(f) - o / 60, h = u === "+" ? d - i : Number(d) + Number(i);
103
103
  }
104
- return new Date(e, n, r, m, b, s, Ae(l));
104
+ return new Date(e, n, r, m, h, s, He(l));
105
105
  }
106
106
  }, ge = [
107
- [ft, Vt],
108
- [vt, wt],
107
+ [ft, wt],
108
+ [vt, Vt],
109
109
  [mt, It]
110
- ], Tt = (a) => {
110
+ ], Et = (a) => {
111
111
  for (let e = 0, n = ge.length; e < n; e++) {
112
112
  const r = ge[e][0].exec(a);
113
113
  if (r && r.length > 0)
@@ -146,7 +146,7 @@ const ct = {
146
146
  a[6] = e;
147
147
  break;
148
148
  }
149
- }, Et = (a, e) => {
149
+ }, Tt = (a, e) => {
150
150
  const n = [0, -1, 0, 0, 0, 0];
151
151
  if (a.length !== e.length)
152
152
  return n;
@@ -165,9 +165,9 @@ const ct = {
165
165
  }
166
166
  }
167
167
  return n;
168
- }, Q = (a, e, n) => isNaN(a) || a < e || a > n, Ct = ({ year: a, month: e, date: n, hours: r, minutes: o, seconds: t, milliseconds: d }) => Q(a, 0, Y.YEAR) || Q(e, 0, Y.MONTH) || Q(n, 0, Y.DATE) || Q(r, 0, Y.HOUR) || Q(o, 0, Y.MINUTE) || Q(t, 0, Y.SECOND) || Q(d, 0, Y.MILLISECOND), St = (a, e) => {
168
+ }, ee = (a, e, n) => isNaN(a) || a < e || a > n, Ct = ({ year: a, month: e, date: n, hours: r, minutes: o, seconds: t, milliseconds: d }) => ee(a, 0, Z.YEAR) || ee(e, 0, Z.MONTH) || ee(n, 0, Z.DATE) || ee(r, 0, Z.HOUR) || ee(o, 0, Z.MINUTE) || ee(t, 0, Z.SECOND) || ee(d, 0, Z.MILLISECOND), St = (a, e) => {
169
169
  if (typeof e == "string") {
170
- const n = Et(a, e), r = Number(n[0]), o = Number(n[1]), t = Number(n[2] || 1), d = Number(n[3] || 0), s = Number(n[4] || 0), l = Number(n[5] || 0), p = Number(n[6] || 0);
170
+ const n = Tt(a, e), r = Number(n[0]), o = Number(n[1]), t = Number(n[2] || 1), d = Number(n[3] || 0), s = Number(n[4] || 0), l = Number(n[5] || 0), p = Number(n[6] || 0);
171
171
  return Ct({
172
172
  year: r,
173
173
  month: o,
@@ -176,7 +176,7 @@ const ct = {
176
176
  minutes: s,
177
177
  seconds: l,
178
178
  milliseconds: p
179
- }) ? void 0 : Ee({
179
+ }) ? void 0 : Te({
180
180
  year: r,
181
181
  date: t,
182
182
  month: o,
@@ -186,11 +186,11 @@ const ct = {
186
186
  seconds: l
187
187
  });
188
188
  } else
189
- return Tt(a);
190
- }, pe = (a, e, n) => {
189
+ return Et(a);
190
+ }, ue = (a, e, n) => {
191
191
  let r;
192
192
  if (Fe(a) ? r = new Date(a) : typeof a == "string" && (r = St(a, e)), n) {
193
- const o = n && pe(n) || new Date(1, 1, 1, 0, 0, 0);
193
+ const o = n && ue(n) || new Date(1, 1, 1, 0, 0, 0);
194
194
  return r && r < o ? o : r;
195
195
  }
196
196
  return r;
@@ -216,10 +216,10 @@ const ct = {
216
216
  } else if (typeof a == "string" && arguments.length >= 2) {
217
217
  let n = e;
218
218
  arguments.length === 2 ? e = void 0 : n = arguments[2];
219
- const r = pe(a, e);
219
+ const r = ue(a, e);
220
220
  return r ? xe(r, n) : "";
221
221
  }
222
- }, C = (a, e = !0) => {
222
+ }, S = (a, e = !0) => {
223
223
  var n, r, o, t, d, s, l, p, u;
224
224
  if (clearTimeout(a.visibleTimer), a.visibleTimer = null, e)
225
225
  a.visible || (a.visibleTimer = setTimeout(() => {
@@ -235,7 +235,7 @@ const ct = {
235
235
  }
236
236
  a.visible = !1;
237
237
  }
238
- }, oe = (a, e = !0) => {
238
+ }, le = (a, e = !0) => {
239
239
  if (!a.instance)
240
240
  return;
241
241
  a.popoverVisible = e;
@@ -251,42 +251,42 @@ const ct = {
251
251
  return r.cancel = () => {
252
252
  n && (clearTimeout(n), n = null);
253
253
  }, r;
254
- }, j = (a) => parseFloat(a).toString() !== "NaN", G = (a) => {
254
+ }, G = (a) => parseFloat(a).toString() !== "NaN", U = (a) => {
255
255
  const e = Array.isArray(a) ? [] : {};
256
256
  if (a && typeof a == "object") {
257
257
  const n = Object.keys(a);
258
258
  if (n.length)
259
259
  n.forEach((r) => {
260
- a[r] && typeof a[r] == "object" ? e[r] = G(a[r]) : e[r] = a[r];
260
+ a[r] && typeof a[r] == "object" ? e[r] = U(a[r]) : e[r] = a[r];
261
261
  });
262
262
  else
263
263
  return a;
264
264
  }
265
265
  return e;
266
- }, me = (a, e = ["mergeTag", "options", "idMapKey"]) => {
266
+ }, ve = (a, e = ["mergeTag", "options", "idMapKey"]) => {
267
267
  const n = { ...a };
268
268
  return e.forEach((r) => {
269
269
  delete n[r];
270
270
  }), n;
271
- }, z = (a, e, n = "") => {
271
+ }, H = (a, e, n = "") => {
272
272
  const { valueMap: r, prevItem: o } = a, t = (o.label || n) + e;
273
273
  return r.has(t);
274
- }, he = (a) => {
274
+ }, me = (a) => {
275
275
  a.propItem = {}, a.inputValue = "", a.startDate = null, a.endDate = null, a.startDateTime = null, a.endDateTime = null;
276
- }, F = ({ emit: a, state: e, nextTick: n, ...r }) => {
277
- oe(e, !1);
276
+ }, B = ({ emit: a, state: e, nextTick: n, ...r }) => {
277
+ le(e, !1);
278
278
  const { tagList: o = null, index: t = -1, newTag: d = null, newValue: s = null, oldValue: l = null, isEdit: p } = r;
279
- if (p || he(e), !o && t === -1 && !s)
279
+ if (p || me(e), !o && t === -1 && !s)
280
280
  return;
281
- const u = l || G(e.innerModelValue);
281
+ const u = l || U(e.innerModelValue);
282
282
  let f = [];
283
- s ? f = [...s] : t !== -1 ? (f = [...e.innerModelValue], d ? f.splice(t, 1, d) : f.splice(t, 1)) : f = [...e.innerModelValue, ...o], e.innerModelValue = f, a("update:modelValue", G(f)), a("change", G(f), u);
284
- }, U = (a) => a, q = (a, e, n) => {
283
+ s ? f = [...s] : t !== -1 ? (f = [...e.innerModelValue], d ? f.splice(t, 1, d) : f.splice(t, 1)) : f = [...e.innerModelValue, ...o], e.innerModelValue = f, a("update:modelValue", U(f)), a("change", U(f), u);
284
+ }, Y = (a) => a, X = (a, e, n) => {
285
285
  const r = e.idMapKey || a.idMapKey;
286
286
  return n && n[r] !== void 0 ? { [r]: n[r] } : null;
287
287
  };
288
288
  function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
289
- let t = G(e.inputValue);
289
+ let t = U(e.inputValue);
290
290
  const d = (u) => {
291
291
  if (u) {
292
292
  const f = e.recordItems.find((i) => i.label === u.label);
@@ -300,15 +300,15 @@ function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
300
300
  deleteTag: (u) => {
301
301
  if (o(u))
302
302
  return;
303
- C(e, !1), d(u);
303
+ S(e, !1), d(u);
304
304
  const f = a.modelValue.filter((i) => i !== u);
305
- F({ emit: n, state: e, nextTick: r, newValue: f });
305
+ B({ emit: n, state: e, nextTick: r, newValue: f });
306
306
  },
307
307
  clearTag: () => {
308
308
  const u = a.modelValue.filter((i) => o(i)), f = u.length !== a.modelValue.length;
309
- C(e, !1), a.modelValue.forEach((i) => {
309
+ S(e, !1), a.modelValue.forEach((i) => {
310
310
  o(i) || d(i);
311
- }), F({ emit: n, state: e, nextTick: r, ...f ? { newValue: u } : {} }), n("clear");
311
+ }), B({ emit: n, state: e, nextTick: r, ...f ? { newValue: u } : {} }), n("clear");
312
312
  },
313
313
  backspaceDeleteTag: () => {
314
314
  var u, f, i;
@@ -321,20 +321,20 @@ function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
321
321
  const c = a.modelValue.length - 1, m = a.modelValue[c];
322
322
  if (m && o(m))
323
323
  return;
324
- C(e, !1), d(m);
325
- const b = e.innerModelValue.slice(0, a.modelValue.length - 1);
326
- F({ emit: n, state: e, nextTick: r, newValue: b });
324
+ S(e, !1), d(m);
325
+ const h = e.innerModelValue.slice(0, a.modelValue.length - 1);
326
+ B({ emit: n, state: e, nextTick: r, newValue: h });
327
327
  }
328
328
  t = e.inputValue, (i = (f = (u = e == null ? void 0 : e.instance) == null ? void 0 : u.refs) == null ? void 0 : f.inputRef) != null && i.$el && e.instance.refs.inputRef.$el.click();
329
329
  }
330
330
  }
331
331
  };
332
332
  }
333
- const re = (a, e, n) => {
333
+ const se = (a, e, n) => {
334
334
  var t, d;
335
- const r = (t = pe(a, n)) == null ? void 0 : t.getTime(), o = (d = pe(e, n)) == null ? void 0 : d.getTime();
335
+ const r = (t = ue(a, n)) == null ? void 0 : t.getTime(), o = (d = ue(e, n)) == null ? void 0 : d.getTime();
336
336
  return r == null || isNaN(r) || o == null || isNaN(o) ? NaN : r < o ? -1 : r > o ? 1 : 0;
337
- }, le = (a, e) => {
337
+ }, ie = (a, e) => {
338
338
  var o;
339
339
  const n = { ...a.formErrors };
340
340
  let r = !0;
@@ -357,253 +357,254 @@ const re = (a, e, n) => {
357
357
  n[r] = "";
358
358
  a.formErrors = n;
359
359
  }, Lt = async (a, e, n) => {
360
- const { prevItem: r, inputEditValue: o } = e, { operators: t } = r, d = me(r);
360
+ const { prevItem: r, inputEditValue: o } = e, { operators: t } = r, d = ve(r);
361
361
  let s = null;
362
- if (le(e, ["inputEditValue"])) {
362
+ if (ie(e, ["inputEditValue"])) {
363
363
  let p = null;
364
364
  const u = e.operatorValue && t ? { operator: e.operatorValue } : null;
365
365
  let f = o;
366
366
  const i = {};
367
367
  if (Array.isArray(o))
368
368
  i.options = [], f = "", o.forEach((c) => {
369
- const m = e.currentEditValue.find((h) => h.label === c), b = (m == null ? void 0 : m.label) || c;
370
- if (f = f ? `${f} | ${b}` : b, m) {
371
- const h = q(n, r, m);
372
- i.options.push({ label: b, ...h });
369
+ const m = e.currentEditValue.find((b) => b.label === c), h = (m == null ? void 0 : m.label) || c;
370
+ if (f = f ? `${f} | ${h}` : h, m) {
371
+ const b = X(n, r, m);
372
+ i.options.push({ label: h, ...b });
373
373
  } else
374
- i.options.push({ label: b });
374
+ i.options.push({ label: h });
375
375
  });
376
376
  else if (Array.isArray(e.currentEditValue)) {
377
377
  const c = e.currentEditValue.find((m) => m.label === f);
378
- p = q(n, r, c);
378
+ p = X(n, r, c);
379
379
  }
380
- s = U({ ...d, label: e.selectValue, ...u, value: f, ...p, ...i });
380
+ s = Y({ ...d, label: e.selectValue, ...u, value: f, ...p, ...i });
381
381
  }
382
382
  return s;
383
383
  }, ze = async (a, e, n) => {
384
- const { prevItem: r } = e, o = `min${r.field}`, t = `max${r.field}`, d = e[o], s = e[t], p = le(e, [o, t]);
384
+ const { prevItem: r } = e, o = `min${r.field}`, t = `max${r.field}`, d = e[o], s = e[t], p = ie(e, [o, t]);
385
385
  let u = null;
386
386
  if (p) {
387
- const { field: f, label: i, unit: c, type: m, operators: b } = r, h = c ? `${i}(${c})` : i;
388
- let V = "";
389
- d && s ? V = `${d}-${s}` : V = d ? `≥${d}` : `≤${s}`;
390
- const w = q(n, r, r), I = e.operatorValue && b ? { operator: e.operatorValue } : null;
391
- u = U({ type: m, field: f, label: h, value: V, ...w, start: d, end: s, ...I });
387
+ const { field: f, label: i, unit: c, type: m, operators: h } = r, b = c ? `${i}(${c})` : i;
388
+ let x = "";
389
+ d && s ? x = `${d}-${s}` : x = d ? `≥${d}` : `≤${s}`;
390
+ const w = X(n, r, r), E = e.operatorValue && h ? { operator: e.operatorValue } : null;
391
+ u = Y({ type: m, field: f, label: b, value: x, ...w, start: d, end: s, ...E });
392
392
  }
393
393
  return u;
394
394
  }, ye = async (a, e, n, r) => {
395
395
  const { prevItem: o, startDate: t, endDate: d, startDateTime: s, endDateTime: l } = e;
396
396
  let p = null, u = null, f = null, i = null;
397
- if (r ? (p = s, u = l, i = ["startDateTime", "endDateTime"]) : (p = t, u = d, i = ["startDate", "endDate"]), le(e, i)) {
398
- const { operators: m } = o, b = me(o);
399
- let h = "";
400
- const V = o.format || (r ? e.datetimeRangeFormat : e.dateRangeFormat);
397
+ if (r ? (p = s, u = l, i = ["startDateTime", "endDateTime"]) : (p = t, u = d, i = ["startDate", "endDate"]), ie(e, i)) {
398
+ const { operators: m } = o, h = ve(o);
399
+ let b = "";
400
+ const x = o.format || (r ? e.datetimeRangeFormat : e.dateRangeFormat);
401
401
  if (p && u) {
402
- if (re(p, u, V) > 0)
402
+ if (se(p, u, x) > 0)
403
403
  return;
404
- re(p, u, V) === 0 ? h = p : h = `${p}-${u}`;
404
+ se(p, u, x) === 0 ? b = p : b = `${p}-${u}`;
405
405
  } else
406
- h = p ? `≥${p}` : `≤${u}`;
407
- const w = q(n, o, o), I = e.operatorValue && m ? { operator: e.operatorValue } : null;
408
- f = U({ ...b, value: h, start: p, end: u, ...w, ...I });
406
+ b = p ? `≥${p}` : `≤${u}`;
407
+ const w = X(n, o, o), E = e.operatorValue && m ? { operator: e.operatorValue } : null;
408
+ f = Y({ ...h, value: b, start: p, end: u, ...w, ...E });
409
409
  }
410
410
  return f;
411
411
  }, Ke = (a, e, n) => {
412
412
  const { prevItem: r } = a, { field: o, start: t, end: d, min: s = r.min, max: l = r.max } = e, p = `min${o}`, u = `max${o}`;
413
413
  (a.curMinNumVar !== p || a.curMaxNumVar !== u) && (delete a[a.curMinNumVar], delete a[a.curMaxNumVar], delete a.formRules[a.curMinNumVar], delete a.formRules[a.curMaxNumVar], a.curMinNumVar = p, a.curMaxNumVar = u), a[a.curMinNumVar] = t, a[a.curMaxNumVar] = d;
414
- const { curMinNumVar: f, curMaxNumVar: i } = a, c = j(s), m = j(l);
414
+ const { curMinNumVar: f, curMaxNumVar: i } = a, c = G(s), m = G(l);
415
415
  c || m ? (a.formRules[f] = {
416
- validator: (b, h, V) => {
417
- const w = j(h);
418
- !w && j(a[i]) || w && (c && !m && h >= s || !c && m && h <= l || h >= s && h <= l) ? V() : (a.numberShowMessage = !!(h || a[i]), V(new Error(n("tvp.tvpSearchbox.rangeMinErr", [s, l]))));
416
+ validator: (h, b, x) => {
417
+ const w = G(b);
418
+ !w && G(a[i]) || w && (c && !m && b >= s || !c && m && b <= l || b >= s && b <= l) ? x() : (a.numberShowMessage = !!(b || a[i]), x(new Error(n("tvp.tvpSearchbox.rangeMinErr", [s, l]))));
419
419
  }
420
420
  }, a.formRules[i] = {
421
- validator: (b, h, V) => {
422
- const w = j(a[f]), I = w && s < a[f] ? Number(a[f]) : s, T = j(I), g = j(h);
423
- !g && w || g && (T && !m && h >= I || !T && m && h <= l || h >= I && h <= l) ? V() : V(!g && !w ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
421
+ validator: (h, b, x) => {
422
+ const w = G(a[f]), E = w && s < a[f] ? Number(a[f]) : s, I = G(E), V = G(b);
423
+ !V && w || V && (I && !m && b >= E || !I && m && b <= l || b >= E && b <= l) ? x() : x(!V && !w ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
424
424
  }
425
425
  }) : a.formRules[i] = {
426
- validator: (b, h, V) => {
427
- const w = a[f], I = j(h), T = j(w);
428
- I && !T || !I && T || I && T && h >= Number(w) ? V() : V(!I && !T ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
426
+ validator: (h, b, x) => {
427
+ const w = a[f], E = G(b), I = G(w);
428
+ E && !I || !E && I || E && I && b >= Number(w) ? x() : x(!E && !I ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
429
429
  }
430
430
  };
431
431
  };
432
432
  function Nt({ props: a, emit: e, state: n, t: r, format: o, nextTick: t, vm: d, cancelHandleInput: s, selectFirstMap: l }) {
433
433
  const p = d || n.instance, u = (g) => {
434
- var y, S, E;
435
- const { start: _, end: v, type: x } = g;
436
- if (n.backupList = g.options, x === "numRange")
434
+ var k, $, C;
435
+ const { start: _, end: v, type: y } = g;
436
+ if (n.backupList = g.options, y === "numRange")
437
437
  Ke(n, g, r);
438
- else if (x === "dateRange") {
439
- const { dateRangeFormat: k } = n;
438
+ else if (y === "dateRange") {
439
+ const { dateRangeFormat: T } = n;
440
440
  if (!n.startDate && _) {
441
- const D = o(_, k);
442
- n.startDate = n.endDate < D ? null : D;
441
+ const L = o(_, T);
442
+ n.startDate = n.endDate < L ? null : L;
443
443
  }
444
444
  if (!n.endDate && v) {
445
- const D = o(v, k);
446
- n.endDate = D < n.startDate ? null : D;
445
+ const L = o(v, T);
446
+ n.endDate = L < n.startDate ? null : L;
447
447
  }
448
- } else if (x === "datetimeRange") {
449
- const { datetimeRangeFormat: k } = n;
448
+ } else if (y === "datetimeRange") {
449
+ const { datetimeRangeFormat: T } = n;
450
450
  if (!n.startDateTime && _) {
451
- const D = o(_, k);
452
- n.startDateTime = n.endDateTime < D ? null : D;
451
+ const L = o(_, T);
452
+ n.startDateTime = n.endDateTime < L ? null : L;
453
453
  }
454
454
  if (!n.endDateTime && v) {
455
- const D = o(v, k);
456
- n.endDateTime = D < n.startDateTime ? null : D;
455
+ const L = o(v, T);
456
+ n.endDateTime = L < n.startDateTime ? null : L;
457
457
  }
458
458
  } else
459
- n.backupList && x === "checkbox" && (n.filterList = n.backupList, n.checkboxGroup = [], (y = n.backupList) == null || y.forEach((k) => {
460
- z(n, k.label) && n.checkboxGroup.push(`${g.label}${k.label}`), k.isFilter = !1;
459
+ n.backupList && y === "checkbox" && (n.filterList = n.backupList, n.checkboxGroup = [], (k = n.backupList) == null || k.forEach((T) => {
460
+ H(n, T.label) && n.checkboxGroup.push(`${g.label}${T.label}`), T.isFilter = !1;
461
461
  }));
462
- (x === "dateRange" || x === "datetimeRange") && t(() => {
462
+ (y === "dateRange" || y === "datetimeRange") && t(() => {
463
463
  $t(n, ["startDate", "endDate", "startDateTime", "endDateTime"]);
464
- }), x !== "checkbox" && ((S = n.backupList) != null && S.length) && ((E = n.backupList) == null || E.forEach((k) => {
465
- k.isFilter = !1, k.isChecked = z(n, k.label);
466
- })), n.currentOperators = null, !n.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(x) ? C(n, !1) : C(n);
464
+ }), y !== "checkbox" && (($ = n.backupList) != null && $.length) && ((C = n.backupList) == null || C.forEach((T) => {
465
+ T.isFilter = !1, T.isChecked = H(n, T.label);
466
+ })), n.currentOperators = null, !n.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(y) ? S(n, !1) : S(n);
467
467
  }, f = (g) => {
468
- var S;
468
+ var $;
469
469
  const { field: _, label: v } = g;
470
470
  n.propItem = { ...n.propItem, label: v }, e("first-level-select", _);
471
- const x = (S = p.$refs) == null ? void 0 : S.inputRef;
471
+ const y = ($ = p.$refs) == null ? void 0 : $.inputRef;
472
472
  n.prevItem = g, n.backupPrevItem = g;
473
- const { operators: y } = g;
474
- y != null && y.length ? (n.operatorValue = "", n.currentOperators = y, C(n)) : (n.operatorValue = ":", u(g)), n.inputValue = "", x.focus();
473
+ const { operators: k } = g;
474
+ k != null && k.length ? (n.operatorValue = "", n.currentOperators = k, S(n)) : (n.operatorValue = ":", u(g)), n.inputValue = "", y.focus();
475
475
  }, i = (g) => {
476
476
  n.operatorValue = g, u(n.prevItem);
477
- }, c = (g, _, v, x) => {
478
- const { replace: y, operators: S, mergeTag: E } = g, k = me(g), { indexMap: D } = n, $ = D.get(v), H = q(a, g, _), K = n.operatorValue && S ? { operator: n.operatorValue } : null;
479
- let M = null;
480
- if (E) {
481
- const B = { label: x, ...H };
482
- if ($ >= 0) {
483
- const te = `${n.innerModelValue[$].value} | ${x}`, Z = [...n.innerModelValue[$].options, B];
484
- M = U({ ...n.innerModelValue[$], value: te, options: Z });
477
+ }, c = (g, _, v, y) => {
478
+ const { replace: k, operators: $, mergeTag: C } = g, T = ve(g), { indexMap: L } = n, O = L.get(v), z = X(a, g, _), K = n.operatorValue && $ ? { operator: n.operatorValue } : null;
479
+ let A = null;
480
+ if (C) {
481
+ const N = { label: y, ...z };
482
+ if (O >= 0) {
483
+ const j = `${n.innerModelValue[O].value} | ${y}`, W = [...n.innerModelValue[O].options, N];
484
+ A = Y({ ...n.innerModelValue[O], value: j, options: W });
485
485
  } else
486
- M = U({ ...k, label: v, value: x, options: [B] });
486
+ A = Y({ ...T, label: v, value: y, options: [N] });
487
487
  } else
488
- M = U({ ...k, label: v, value: x, ...H, ...K });
489
- if (z(n, x, v)) {
490
- he(n);
488
+ A = Y({ ...T, label: v, value: y, ...z, ...K });
489
+ if (H(n, y, v)) {
490
+ me(n);
491
491
  return;
492
492
  }
493
- C(n, !1);
494
- const P = G(n.innerModelValue);
495
- let W = [];
496
- if ((y || E) && $ >= 0) {
497
- const B = [...n.innerModelValue];
498
- B.splice($, 1), W = [...B, M];
493
+ S(n, !1);
494
+ const q = U(n.innerModelValue);
495
+ let D = [];
496
+ if ((k || C) && O >= 0) {
497
+ const N = [...n.innerModelValue];
498
+ N.splice(O, 1), D = [...N, A];
499
499
  } else
500
- W = [...n.innerModelValue, M];
501
- F({ emit: e, state: n, nextTick: t, newValue: W, oldValue: P });
500
+ D = [...n.innerModelValue, A];
501
+ B({ emit: e, state: n, nextTick: t, newValue: D, oldValue: q });
502
502
  }, m = (g) => {
503
503
  var _, v;
504
504
  I(), (v = (_ = p.$refs) == null ? void 0 : _.inputRef) == null || v.focus();
505
- }, b = (g, _ = !1) => {
506
- var S;
507
- C(n, !1), _ && (n.prevItem = g, n.backupPrevItem = g);
508
- const { prevItem: v } = n, x = g.value || g.label, y = (S = p.$refs) == null ? void 0 : S.inputRef;
509
- if (!z(n, x)) {
510
- const E = n.propItem.label || g.label;
511
- c(v, g, E, x);
512
- }
513
- y.focus();
514
- }, h = (g, _) => {
515
- var v, x;
505
+ }, h = (g, _ = !1) => {
506
+ var $;
507
+ S(n, !1), _ && (n.prevItem = g, n.backupPrevItem = g);
508
+ const { prevItem: v } = n, y = g.value || g.label, k = ($ = p.$refs) == null ? void 0 : $.inputRef;
509
+ if (!H(n, y)) {
510
+ const C = n.propItem.label || g.label;
511
+ c(v, g, C, y);
512
+ }
513
+ k.focus();
514
+ }, b = (g, _) => {
515
+ var v, y;
516
516
  if (g.label) {
517
517
  if (e("second-level-enter", _), _.type === "map") {
518
518
  if (n.isShowTagKey) {
519
- const E = (v = _.options) == null ? void 0 : v[0];
520
- E && l(E, !0);
519
+ const C = (v = _.options) == null ? void 0 : v[0];
520
+ C && l(C, !0);
521
521
  } else {
522
- const E = (x = n.backupList) == null ? void 0 : x.find((k) => !k.isChecked);
523
- E && l(E, !1);
522
+ const C = (y = n.backupList) == null ? void 0 : y.find((T) => !T.isChecked);
523
+ C && l(C, !1);
524
524
  }
525
525
  return;
526
526
  }
527
527
  if (!_.options || !_.options.length)
528
528
  return;
529
- const y = _.options[0];
530
- if (!y)
529
+ const k = _.options[0];
530
+ if (!k)
531
531
  return;
532
- if (!a.modelValue.find((E) => E.value === y.label)) {
533
- const E = _.label, k = y.label;
534
- c(_, y, E, k);
532
+ if (!a.modelValue.find((C) => C.value === k.label)) {
533
+ const C = _.label, T = k.label;
534
+ c(_, k, C, T);
535
535
  return;
536
536
  }
537
537
  } else
538
538
  e("search", n.innerModelValue);
539
- }, V = (g, _, v) => {
540
- var y, S;
541
- const x = (y = n.backupList) == null ? void 0 : y.find((E) => (E.value || E.label) === v);
542
- g.type === "checkbox" && ((S = n.backupList) != null && S.length) && !x || c(g, x, _.label, v);
543
- }, w = (g, _, v) => {
544
- var x, y, S, E;
539
+ }, x = (g, _, v) => {
540
+ var k, $;
541
+ const y = (k = n.backupList) == null ? void 0 : k.find((C) => (C.value || C.label) === v);
542
+ g.type === "checkbox" && (($ = n.backupList) != null && $.length) && !y || c(g, y, _.label, v);
543
+ }, w = (g) => g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), E = (g, _, v) => {
544
+ var y, k, $, C, T, L;
545
545
  if (_.label) {
546
546
  if (v.type === "map") {
547
547
  n.isShowTagKey || c(v, void 0, _.label, n.propItem.value + g);
548
548
  return;
549
549
  }
550
- const { regexp: k, replace: D, type: $, mergeTag: H } = v, K = $ !== "checkbox" && D || $ === "checkbox" && H ? [g] : g.split(a.splitInputValue);
551
- if (k) {
552
- const M = [];
553
- for (const P of K)
554
- k.test(P) ? V(v, _, P) : M.push(P);
555
- M.length > 0 && e("validate-error", {
556
- invalidValues: M,
550
+ const { regexp: O, replace: z, type: K, mergeTag: A } = v;
551
+ if (Array.isArray(v.options) && v.options.length && !(K === "checkbox" && A)) {
552
+ const D = new RegExp(w(g.trim()), "i"), N = (y = n.backupList) == null ? void 0 : y.find((j) => D.test(j.label));
553
+ N ? h(N) : (k = n.backupList) == null || k.forEach((j) => {
554
+ j.isFilter = !0;
555
+ });
556
+ return;
557
+ }
558
+ const q = K !== "checkbox" && z || K === "checkbox" && A ? [g] : g.split(a.splitInputValue);
559
+ if (O) {
560
+ const D = [];
561
+ for (const N of q)
562
+ O.test(N) ? x(v, _, N) : D.push(N);
563
+ D.length > 0 && e("validate-error", {
564
+ invalidValues: D,
557
565
  field: v.field,
558
566
  label: v.label,
559
- regexp: k.toString()
567
+ regexp: O.toString()
560
568
  });
561
569
  } else
562
- for (const M of K)
563
- V(v, _, M);
570
+ for (const D of q)
571
+ x(v, _, D);
564
572
  } else {
565
- const { items: k, defaultField: D, defaultFieldReplace: $ } = a, H = k.find((L) => {
566
- const { regexp: R } = L;
567
- return R && R.test(n.inputValue);
568
- }), K = D ? k.find((L) => L.field === D) : n.allTypeAttri, M = H || K, P = !H && $ ? { ...M, replace: !0 } : M, { replace: W, type: B, mergeTag: te, regexp: Z } = P, ae = B !== "checkbox" && W || B === "checkbox" && te ? [g] : g.split(a.splitInputValue);
569
- (x = M == null ? void 0 : M.options) != null && x.length && (n.backupList = [...M.options], (y = n.backupList) == null || y.forEach((L) => {
570
- const R = L.value || L.label;
571
- ae.includes(R) && (L.isChecked = !0);
573
+ const { items: O, defaultField: z, defaultFieldReplace: K } = a, A = O.find((M) => {
574
+ const { regexp: R } = M;
575
+ return R && R.test(g);
576
+ }), q = z ? O.find((M) => M.field === z) : n.allTypeAttri, D = A || q, N = !A && K ? { ...D, replace: !0 } : D, { replace: j, type: W, mergeTag: he, regexp: Q } = N, ne = W !== "checkbox" && j || W === "checkbox" && he ? [g] : g.split(a.splitInputValue);
577
+ ($ = D == null ? void 0 : D.options) != null && $.length && (n.backupList = [...D.options], (C = n.backupList) == null || C.forEach((M) => {
578
+ M.isFilter = !1;
579
+ const R = M.value || M.label;
580
+ ne.includes(R) && (M.isChecked = !0);
572
581
  }));
573
- const ie = M.label;
574
- if (Z) {
575
- const L = [];
576
- for (const R of ae)
577
- if (Z.test(R)) {
578
- if (B === "checkbox" && ((S = M == null ? void 0 : M.options) != null && S.length) && !n.backupList.find((be) => (be.value || be.label) === R))
582
+ const be = D.label;
583
+ if (Q) {
584
+ const M = [];
585
+ for (const R of ne)
586
+ if (Q.test(R)) {
587
+ if (W === "checkbox" && ((T = D == null ? void 0 : D.options) != null && T.length) && !n.backupList.find((J) => (J.value || J.label) === R))
579
588
  continue;
580
- c(P, {}, ie, R);
589
+ c(N, {}, be, R);
581
590
  } else
582
- L.push(R);
583
- L.length > 0 && e("validate-error", {
584
- invalidValues: L,
585
- field: P.field,
586
- label: P.label,
587
- regexp: Z.toString()
591
+ M.push(R);
592
+ M.length > 0 && e("validate-error", {
593
+ invalidValues: M,
594
+ field: N.field,
595
+ label: N.label,
596
+ regexp: Q.toString()
588
597
  });
589
598
  } else
590
- for (const L of ae)
591
- B === "checkbox" && ((E = M == null ? void 0 : M.options) != null && E.length) && !n.backupList.find((R) => (R.value || R.label) === L) || c(P, {}, ie, L);
599
+ for (const M of ne)
600
+ W === "checkbox" && ((L = D == null ? void 0 : D.options) != null && L.length) && !n.backupList.find((R) => (R.value || R.label) === M) || c(N, {}, be, M);
592
601
  }
593
602
  }, I = () => {
594
- const { inputValue: g, propItem: _, prevItem: v } = n;
595
- if (s && s(), !g)
596
- h(_, v);
597
- else {
598
- const { maxlength: x } = a;
599
- if (x && x < g.length) {
600
- e("exceed", x);
601
- return;
602
- }
603
- w(g, _, v);
604
- }
603
+ var y;
604
+ const { propItem: g, prevItem: _ } = n, v = ((y = n.inputValue) == null ? void 0 : y.trim()) ?? "";
605
+ s && s(), v ? E(v, g, _) : b(g, _);
605
606
  };
606
- return { selectPropItem: f, selectRadioItem: b, selectInputValue: m, createTag: I, helpClick: () => {
607
+ return { selectPropItem: f, selectRadioItem: h, selectInputValue: m, createTag: I, helpClick: () => {
607
608
  e("help");
608
609
  }, setOperator: i };
609
610
  }
@@ -618,82 +619,80 @@ const Rt = (a) => a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), _e = (a, e) => {
618
619
  };
619
620
  function Ot({ props: a, state: e, emit: n, nextTick: r }) {
620
621
  const o = async (u) => {
621
- e.potentialOptions = await a.potentialOptions.getMatchList(u), C(e, !0);
622
+ e.potentialOptions = await a.potentialOptions.getMatchList(u), S(e, !0);
622
623
  }, d = Dt((u) => {
623
- var g, _, v, x;
624
- const { recordItems: f, propItem: i } = e, c = typeof u == "string" ? u : u && u.target && typeof u.target.value == "string" ? u.target.value : e.inputValue || "", m = (g = String(c)) == null ? void 0 : g.trim(), { maxlength: b } = a;
625
- if (b && b < m.length) {
626
- n("exceed", b);
627
- return;
628
- }
624
+ var I, V, g, _;
625
+ const { recordItems: f, propItem: i } = e, c = typeof u == "string" ? u : u && u.target && typeof u.target.value == "string" ? u.target.value : e.inputValue || "", m = (I = String(c)) == null ? void 0 : I.trim();
629
626
  if (m.length === 0) {
630
- l(), C(e);
627
+ l(), S(e);
631
628
  return;
632
629
  }
633
- Object.keys(e.matchItems).forEach((y) => {
634
- e.matchItems[y].attr = [], e.matchItems[y].attrValue = [];
630
+ Object.keys(e.matchItems).forEach((v) => {
631
+ e.matchItems[v].attr = [], e.matchItems[v].attrValue = [];
635
632
  });
636
- const h = Rt(m), V = new RegExp(h, "i"), w = i.label || !h ? null : f.find((y) => y.type === "map" && V.test(y.label));
637
- if (w) {
638
- e.propItem = { ...e.propItem, label: w.label }, e.inputValue = "", e.prevItem = w, e.backupPrevItem = w, e.backupList = w.options || [];
633
+ const h = Rt(m), b = new RegExp(h, "i"), x = i.label || !h ? null : f.find((v) => v.type === "map" && b.test(v.label));
634
+ if (x) {
635
+ e.propItem = { ...e.propItem, label: x.label }, e.inputValue = "", e.prevItem = x, e.backupPrevItem = x, e.backupList = x.options || [];
639
636
  return;
640
637
  }
641
- e.filterList = (_ = e.backupList) == null ? void 0 : _.filter((y) => V.test(y.label) ? (delete y.isFilter, z(e, y.label) && e.checkboxGroup.push(`${e.prevItem.label}${y.label}`), !0) : (y.isFilter = !0, !1));
642
- const I = new RegExp(h, "ig"), T = m.toLowerCase();
638
+ e.filterList = (V = e.backupList) == null ? void 0 : V.filter((v) => b.test(v.label) ? (v.isFilter = !1, H(e, v.label) && e.checkboxGroup.push(`${e.prevItem.label}${v.label}`), !0) : (v.isFilter = !0, !1));
639
+ const w = new RegExp(h, "ig"), E = m.toLowerCase();
643
640
  if (e.propItem.label) {
644
- (v = e.backupList) == null || v.forEach((y) => {
645
- y.hightlighStr = T;
646
- const S = y.label;
647
- V.test(S) ? (y.match = _e(I, S), y.isFilter = !1) : y.isFilter = !0;
648
- }), (x = e.backupList) != null && x.length || m ? C(e) : C(e, !1);
641
+ (g = e.backupList) == null || g.forEach((v) => {
642
+ v.hightlighStr = E;
643
+ const y = v.label;
644
+ b.test(y) ? (v.match = _e(w, y), v.isFilter = !1) : v.isFilter = !0;
645
+ }), (_ = e.backupList) != null && _.length || m ? S(e) : S(e, !1);
649
646
  return;
650
647
  }
651
- for (const y of f) {
652
- const { options: S = [], groupKey: E = "0", ...k } = y, D = k.label;
653
- if (V.test(D)) {
654
- const $ = _e(I, D);
655
- e.matchItems[E].attr.push({ ...y, match: $, hightlighStr: T });
648
+ for (const v of f) {
649
+ const { options: y = [], groupKey: k = "0", ...$ } = v, C = $.label;
650
+ if (b.test(C)) {
651
+ const T = _e(w, C);
652
+ e.matchItems[k].attr.push({ ...v, match: T, hightlighStr: E });
656
653
  }
657
- for (const $ of S) {
658
- const H = e.propItem.label ? D : `${D}:${$.label}`;
659
- if (V.test(H)) {
660
- const K = _e(I, H);
661
- e.matchItems[E].attrValue.push({
654
+ for (const T of y) {
655
+ const L = e.propItem.label ? C : `${C}:${T.label}`;
656
+ if (b.test(L)) {
657
+ const O = _e(w, L);
658
+ e.matchItems[k].attrValue.push({
659
+ ...T,
662
660
  ...$,
663
- ...k,
664
- options: S,
665
- hightlighStr: T,
666
- value: $.label,
667
- match: K
661
+ options: y,
662
+ hightlighStr: E,
663
+ value: T.label,
664
+ match: O
668
665
  });
669
666
  }
670
667
  }
671
668
  }
672
- h && a.potentialOptions && a.potentialOptions.getMatchList ? o(h) : C(e);
669
+ h && a.potentialOptions && a.potentialOptions.getMatchList ? o(h) : S(e);
673
670
  }, 500), s = () => {
674
671
  d.cancel && d.cancel();
675
672
  }, l = () => {
676
673
  var u;
677
- (u = e.backupList) == null || u.forEach((f) => f.isFilter && delete f.isFilter);
674
+ (u = e.backupList) == null || u.forEach((f) => {
675
+ f.isFilter = !1;
676
+ });
678
677
  };
679
678
  return {
680
679
  handleInput: d,
681
680
  selectFirstMap: (u, f) => {
682
- var b;
681
+ var h;
683
682
  const { options: i } = u, { prevItem: c, propItem: m } = e;
684
683
  if (i)
685
- C(e, !1), e.propItem = { ...e.propItem, value: `${u.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = u.options || [], l(), (b = e.backupList) == null || b.forEach((h) => {
686
- const V = e.propItem.value + h.label;
687
- h.isChecked = z(e, V);
684
+ S(e, !1), e.propItem = { ...e.propItem, value: `${u.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = u.options || [], l(), (h = e.backupList) == null || h.forEach((b) => {
685
+ const x = e.propItem.value + b.label;
686
+ b.isChecked = H(e, x);
688
687
  });
689
688
  else {
690
689
  if (u.isChecked)
691
690
  return;
692
- C(e, !1), e.isShowTagKey = !0, l();
693
- const { field: h, type: V } = c, w = m.value + u.label, I = q(a, c, u), g = [U({ type: V, field: h, label: m.label, value: w, ...I })];
694
- F({ emit: n, state: e, nextTick: r, tagList: g });
691
+ S(e, !1), e.isShowTagKey = !0, l();
692
+ const { field: b, type: x } = c, w = m.value + u.label, E = X(a, c, u), V = [Y({ type: x, field: b, label: m.label, value: w, ...E })];
693
+ B({ emit: n, state: e, nextTick: r, tagList: V });
695
694
  }
696
- f && C(e);
695
+ f && S(e);
697
696
  },
698
697
  cancelHandleInput: s
699
698
  };
@@ -702,49 +701,49 @@ function Pt({ props: a, state: e, emit: n, nextTick: r }) {
702
701
  return {
703
702
  selectCheckbox: (t) => {
704
703
  var u, f;
705
- C(e, !1);
706
- const { checkboxGroup: d, prevItem: s, propItem: l } = e, p = me(s);
704
+ S(e, !1);
705
+ const { checkboxGroup: d, prevItem: s, propItem: l } = e, p = ve(s);
707
706
  if (t) {
708
- const i = [], c = G(e.innerModelValue), { mergeTag: m, operators: b, label: h } = s;
707
+ const i = [], c = U(e.innerModelValue), { mergeTag: m, operators: h, label: b } = s;
709
708
  if (m) {
710
- let V = "";
711
- const w = [], { indexMap: I } = e, T = I.get(h);
712
- if (T !== void 0 && e.innerModelValue.splice(T, 1), (u = e.backupList) == null || u.forEach((g) => {
713
- const { label: _ } = g, v = `${h}${_}`;
714
- if (d.includes(v)) {
715
- delete g.isFilter;
716
- const y = q(a, s, g), S = { label: g.label, ...y };
717
- V += V ? ` | ${_}` : _, w.push(S);
709
+ let x = "";
710
+ const w = [], { indexMap: E } = e, I = E.get(b);
711
+ if (I !== void 0 && e.innerModelValue.splice(I, 1), (u = e.backupList) == null || u.forEach((V) => {
712
+ const { label: g } = V, _ = `${b}${g}`;
713
+ if (d.includes(_)) {
714
+ V.isFilter = !1;
715
+ const y = X(a, s, V), k = { label: V.label, ...y };
716
+ x += x ? ` | ${g}` : g, w.push(k);
718
717
  }
719
718
  }), w.length > 0) {
720
- const g = { ...p, value: V, options: w };
721
- i.push(g);
719
+ const V = { ...p, value: x, options: w };
720
+ i.push(V);
722
721
  }
723
722
  } else {
724
- const { valueMap: V } = e, w = [];
725
- if ((f = e.backupList) == null || f.forEach((I) => {
726
- const { label: T } = I, g = `${h}${T}`, _ = d.includes(g);
727
- if (_ && !z(e, T)) {
728
- const v = q(a, s, I), x = e.operatorValue && b ? { operator: e.operatorValue } : null, y = U({ ...p, label: l.label, value: T, ...v, ...x });
729
- i.push(y), I.isChecked = !0;
730
- } else if (!_ && z(e, T)) {
731
- I.isChecked = !1;
732
- const v = V.get(g);
733
- w.push(v);
723
+ const { valueMap: x } = e, w = [];
724
+ if ((f = e.backupList) == null || f.forEach((E) => {
725
+ const { label: I } = E, V = `${b}${I}`, g = d.includes(V);
726
+ if (g && !H(e, I)) {
727
+ const _ = X(a, s, E), v = e.operatorValue && h ? { operator: e.operatorValue } : null, y = Y({ ...p, label: l.label, value: I, ..._, ...v });
728
+ i.push(y), E.isChecked = !0;
729
+ } else if (!g && H(e, I)) {
730
+ E.isChecked = !1;
731
+ const _ = x.get(V);
732
+ w.push(_);
734
733
  }
735
734
  }), w.length) {
736
- const I = e.innerModelValue.filter((T, g) => T && !w.includes(g));
737
- F({ emit: n, state: e, nextTick: r, newValue: I, oldValue: c });
735
+ const E = e.innerModelValue.filter((I, V) => I && !w.includes(V));
736
+ B({ emit: n, state: e, nextTick: r, newValue: E, oldValue: c });
738
737
  return;
739
738
  }
740
739
  }
741
- F({ emit: n, state: e, nextTick: r, tagList: i, oldValue: c });
740
+ B({ emit: n, state: e, nextTick: r, tagList: i, oldValue: c });
742
741
  } else
743
742
  e.propItem = { ...l, label: "" }, e.inputValue = "";
744
743
  }
745
744
  };
746
745
  }
747
- const J = (a) => {
746
+ const te = (a) => {
748
747
  const e = new Date(a);
749
748
  return e.setHours(0, 0, 0, 0), e.getTime();
750
749
  };
@@ -756,46 +755,46 @@ function Ft({ props: a, state: e, emit: n, nextTick: r, vm: o }) {
756
755
  }
757
756
  const i = await ye(t, e, a, f);
758
757
  if (i) {
759
- C(e, !1);
758
+ S(e, !1);
760
759
  const c = a.modelValue.filter((m) => m.type !== i.type || m.field !== i.field);
761
- c.push(i), F({ emit: n, state: e, nextTick: r, newValue: c });
760
+ c.push(i), B({ emit: n, state: e, nextTick: r, newValue: c });
762
761
  } else
763
- C(e);
764
- }, s = () => C(e), l = (u, f, i) => {
765
- const { maxTimeLength: c = 0, min: m, max: b } = e.prevItem, h = e.prevItem.type === "datetimeRange", V = m ? typeof m == "number" ? m : m.getTime() : null, w = b ? typeof b == "number" ? b : b.getTime() : null, I = V == null ? null : h ? J(V) : V, T = e[i], g = u.getTime();
762
+ S(e);
763
+ }, s = () => S(e), l = (u, f, i) => {
764
+ const { maxTimeLength: c = 0, min: m, max: h } = e.prevItem, b = e.prevItem.type === "datetimeRange", x = m ? typeof m == "number" ? m : m.getTime() : null, w = h ? typeof h == "number" ? h : h.getTime() : null, E = x == null ? null : b ? te(x) : x, I = e[i], V = u.getTime();
766
765
  if (c > 0)
767
- if (m || b)
768
- if (i && T) {
769
- const _ = new Date(T).getTime(), v = !m && b ? _ - c : Math.max(V, _ - c), x = h ? J(v) : v;
770
- return g < x || g > _;
766
+ if (m || h)
767
+ if (i && I) {
768
+ const g = new Date(I).getTime(), _ = !m && h ? g - c : Math.max(x, g - c), v = b ? te(_) : _;
769
+ return V < v || V > g;
771
770
  } else if (!i && f) {
772
- const _ = new Date(f).getTime(), v = m && !b ? _ + c : Math.min(w, _ + c), x = h ? J(_) : _;
773
- return g < x || g > v;
771
+ const g = new Date(f).getTime(), _ = m && !h ? g + c : Math.min(w, g + c), v = b ? te(g) : g;
772
+ return V < v || V > _;
774
773
  } else
775
- return I && g < I || w && g > w;
776
- else if (i && T) {
777
- const _ = new Date(T).getTime(), v = _ - c, x = h ? J(v) : v;
778
- return g < x || g > _;
774
+ return E && V < E || w && V > w;
775
+ else if (i && I) {
776
+ const g = new Date(I).getTime(), _ = g - c, v = b ? te(_) : _;
777
+ return V < v || V > g;
779
778
  } else if (!i && f) {
780
- const _ = new Date(f).getTime(), v = _ + c, x = h ? J(_) : _;
781
- return g < x || g > v;
779
+ const g = new Date(f).getTime(), _ = g + c, v = b ? te(g) : g;
780
+ return V < v || V > _;
782
781
  } else
783
782
  return !1;
784
- else if (m || b)
785
- if (i && T) {
786
- const _ = new Date(T).getTime();
787
- return I && g < I || g > _;
783
+ else if (m || h)
784
+ if (i && I) {
785
+ const g = new Date(I).getTime();
786
+ return E && V < E || V > g;
788
787
  } else if (!i && f) {
789
- const _ = new Date(f).getTime(), v = h ? J(_) : _;
790
- return g < v || w && g > w;
788
+ const g = new Date(f).getTime(), _ = b ? te(g) : g;
789
+ return V < _ || w && V > w;
791
790
  } else
792
- return I && g < I || w && g > w;
793
- else if (i && T) {
794
- const _ = new Date(T).getTime();
795
- return g > _;
791
+ return E && V < E || w && V > w;
792
+ else if (i && I) {
793
+ const g = new Date(I).getTime();
794
+ return V > g;
796
795
  } else if (!i && f) {
797
- const _ = new Date(f).getTime(), v = h ? J(_) : _;
798
- return g < v;
796
+ const g = new Date(f).getTime(), _ = b ? te(g) : g;
797
+ return V < _;
799
798
  } else
800
799
  return !1;
801
800
  };
@@ -803,12 +802,12 @@ function Ft({ props: a, state: e, emit: n, nextTick: r, vm: o }) {
803
802
  onConfirmDate: d,
804
803
  handleDateShow: s,
805
804
  pickerOptions: (u, f = "") => {
806
- const i = (h) => l(h, u, f), c = e.prevItem.pickerOptions || {}, m = { ...c }, b = c.disabledDate;
807
- return m.disabledDate = typeof b == "function" ? (h) => i(h) || b(h) : i, m;
805
+ const i = (b) => l(b, u, f), c = e.prevItem.pickerOptions || {}, m = { ...c }, h = c.disabledDate;
806
+ return m.disabledDate = typeof h == "function" ? (b) => i(b) || h(b) : i, m;
808
807
  }
809
808
  };
810
809
  }
811
- function Ht({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
810
+ function At({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
812
811
  const d = t || e.instance, s = async (u) => {
813
812
  if (!u) {
814
813
  e.propItem = { ...e.propItem, label: "" };
@@ -816,22 +815,22 @@ function Ht({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
816
815
  }
817
816
  const f = await ze(d, e, a);
818
817
  if (f) {
819
- C(e, !1);
818
+ S(e, !1);
820
819
  const i = a.modelValue.filter((c) => c.type !== f.type || c.field !== f.field);
821
- i.push(f), F({ emit: r, state: e, nextTick: o, newValue: i });
820
+ i.push(f), B({ emit: r, state: e, nextTick: o, newValue: i });
822
821
  } else
823
- C(e);
822
+ S(e);
824
823
  }, l = (u, f, i) => {
825
824
  const { maxTimeLength: c = 0 } = u;
826
825
  return {
827
826
  [f]: {
828
- validator: (m, b, h) => {
829
- c > 0 && !b ? h(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !b && !e[i] ? h(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : h();
827
+ validator: (m, h, b) => {
828
+ c > 0 && !h ? b(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !h && !e[i] ? b(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : b();
830
829
  }
831
830
  },
832
831
  [i]: {
833
- validator: (m, b, h) => {
834
- c > 0 && !b ? h(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !b && !e[f] ? h(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : b && e[f] && re(b, e[f]) < 0 ? h(new Error(n("tvp.tvpSearchbox.rangeDateMaxErr"))) : h();
832
+ validator: (m, h, b) => {
833
+ c > 0 && !h ? b(new Error(n("tvp.tvpSearchbox.notBeNull"))) : !h && !e[f] ? b(new Error(n("tvp.tvpSearchbox.rangeDateTitle"))) : h && e[f] && se(h, e[f]) < 0 ? b(new Error(n("tvp.tvpSearchbox.rangeDateMaxErr"))) : b();
835
834
  }
836
835
  }
837
836
  };
@@ -848,7 +847,9 @@ function Ht({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
848
847
  required: !0,
849
848
  message: n("tvp.tvpSearchbox.notBeNull"),
850
849
  trigger: ["change", "blur"]
851
- }, e.formRules.mapEditKey = {
850
+ }, a.maxlength && (e.formRules.inputEditValue.validator = (i, c, m) => {
851
+ (Array.isArray(c) ? c : [c]).some((x) => typeof x == "string" && x.length > a.maxlength) ? m(new Error(n("tvp.tvpSearchbox.maxlengthErr", [a.maxlength]))) : m();
852
+ }), e.formRules.mapEditKey = {
852
853
  required: !0,
853
854
  message: n("tvp.tvpSearchbox.notBeNull"),
854
855
  trigger: ["change"]
@@ -863,11 +864,11 @@ function Ht({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
863
864
  }
864
865
  function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }) {
865
866
  const s = (i, c = !1) => {
866
- var _;
867
- const { operator: m, value: b, start: h, end: V } = i, { options: w, operators: I, type: T, mergeTag: g } = e.prevItem;
867
+ var g;
868
+ const { operator: m, value: h, start: b, end: x } = i, { options: w, operators: E, type: I, mergeTag: V } = e.prevItem;
868
869
  if (c) {
869
- const v = {
870
- inputEditValue: g ? [] : "",
870
+ const _ = {
871
+ inputEditValue: V ? [] : "",
871
872
  currentEditSelectTags: [],
872
873
  currentEditValue: [],
873
874
  startDate: null,
@@ -878,31 +879,31 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
878
879
  mapEditKey: "",
879
880
  mapEditValue: ""
880
881
  };
881
- e.curMinNumVar && (v[e.curMinNumVar] = ""), e.curMaxNumVar && (v[e.curMaxNumVar] = ""), Object.assign(e, v);
882
+ e.curMinNumVar && (_[e.curMinNumVar] = ""), e.curMaxNumVar && (_[e.curMaxNumVar] = ""), Object.assign(e, _);
882
883
  }
883
- if (T !== "custom") {
884
- if (T === "map") {
884
+ if (I !== "custom") {
885
+ if (I === "map") {
885
886
  if (!c) {
886
- const v = String(i.value || ""), x = v.indexOf("=");
887
- e.mapEditKey = x >= 0 ? v.substring(0, x) : "", e.mapEditValue = x >= 0 ? v.substring(x + 1) : "";
887
+ const _ = String(i.value || ""), v = _.indexOf("=");
888
+ e.mapEditKey = v >= 0 ? _.substring(0, v) : "", e.mapEditValue = v >= 0 ? _.substring(v + 1) : "";
888
889
  }
889
- } else if (T === "numRange")
890
+ } else if (I === "numRange")
890
891
  Ke(e, i, n);
891
- else if (T === "dateRange") {
892
- const { dateRangeFormat: v } = e;
893
- e.startDate = o(h, v), e.endDate = o(V, v);
894
- } else if (T === "datetimeRange") {
895
- const { datetimeRangeFormat: v } = e;
896
- e.startDateTime = o(h, v), e.endDateTime = o(V, v);
892
+ else if (I === "dateRange") {
893
+ const { dateRangeFormat: _ } = e;
894
+ e.startDate = o(b, _), e.endDate = o(x, _);
895
+ } else if (I === "datetimeRange") {
896
+ const { datetimeRangeFormat: _ } = e;
897
+ e.startDateTime = o(b, _), e.endDateTime = o(x, _);
897
898
  } else {
898
- if (g) {
899
- const v = c ? [] : ((_ = i.options) == null ? void 0 : _.flatMap((x) => x.label)) || [];
900
- e.inputEditValue = v, e.currentEditSelectTags = v;
899
+ if (V) {
900
+ const _ = c ? [] : ((g = i.options) == null ? void 0 : g.flatMap((v) => v.label)) || [];
901
+ e.inputEditValue = _, e.currentEditSelectTags = _;
901
902
  } else
902
- e.inputEditValue = c ? "" : Array.isArray(b) ? b.join(",") : b || "";
903
+ e.inputEditValue = c ? "" : Array.isArray(h) ? h.join(",") : h || "";
903
904
  e.currentEditValue = w;
904
905
  }
905
- e.operatorValue = m, e.currentOperators = I;
906
+ e.operatorValue = m, e.currentOperators = E;
906
907
  }
907
908
  }, l = () => {
908
909
  const { prevItem: i } = e;
@@ -911,18 +912,18 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
911
912
  e.hasFormError = !1;
912
913
  return;
913
914
  }
914
- e.hasFormError = !le(e, c);
915
+ e.hasFormError = !ie(e, c);
915
916
  };
916
917
  return {
917
918
  editTag: (i, c, m) => {
918
919
  if (!a.editable)
919
920
  return;
920
- C(e, !1), e.popoverVisible = !1;
921
- const b = m.target.classList.contains("tiny-tag") ? m.target : m.srcElement.parentElement;
921
+ S(e, !1), e.popoverVisible = !1;
922
+ const h = m.target.classList.contains("tiny-tag") ? m.target : m.srcElement.parentElement;
922
923
  r(() => {
923
- const { popoverRef: h } = e.instance.$refs;
924
- h.state.referenceElm = b, h.state.popperElm && (h.state.popperElm.style.display = "none"), h.doDestroy(), e.popoverVisible = !0, l();
925
- }), e.prevItem = e.recordItems.find((h) => h.field === i.field), !e.prevItem && (e.prevItem = i), e.selectValue = i.label, e.currentModelValueIndex = c, t("tag-click", i), s(i);
924
+ const { popoverRef: b } = e.instance.$refs;
925
+ b.state.referenceElm = h, b.state.popperElm && (b.state.popperElm.style.display = "none"), b.doDestroy(), e.popoverVisible = !0, l();
926
+ }), e.prevItem = e.recordItems.find((b) => b.field === i.field), !e.prevItem && (e.prevItem = i), e.selectValue = i.label, e.currentModelValueIndex = c, t("tag-click", i), s(i);
926
927
  },
927
928
  confirmEditTag: async (i) => {
928
929
  if (!i) {
@@ -930,28 +931,28 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
930
931
  return;
931
932
  }
932
933
  const { prevItem: c, currentModelValueIndex: m } = e;
933
- let b = null;
934
+ let h = null;
934
935
  if (c.type === "numRange")
935
- b = await ze(e.instance, e, a);
936
+ h = await ze(e.instance, e, a);
936
937
  else if (c.type === "dateRange")
937
- b = await ye(e.instance, e, a, !1);
938
+ h = await ye(e.instance, e, a, !1);
938
939
  else if (c.type === "datetimeRange")
939
- b = await ye(e.instance, e, a, !0);
940
+ h = await ye(e.instance, e, a, !0);
940
941
  else if (c.type === "map") {
941
- const { field: h, type: V, label: w } = c, { mapEditKey: I, mapEditValue: T } = e;
942
- I && T && (b = U({ type: V, field: h, label: w, value: `${I}=${T}` }));
942
+ const { field: b, type: x, label: w } = c, { mapEditKey: E, mapEditValue: I } = e;
943
+ E && I && (h = Y({ type: x, field: b, label: w, value: `${E}=${I}` }));
943
944
  } else
944
- b = await Lt(e.instance, e, a);
945
- if (b) {
946
- C(e, !1), e.popoverVisible = !1;
947
- const { replace: h, mergeTag: V } = c, w = e.indexMap.get(b.label);
948
- if ((h || V) && w !== void 0 && w !== m) {
949
- const I = G(e.innerModelValue);
950
- let T = e.innerModelValue.filter((_, v) => v !== w);
951
- const g = m > w ? m - 1 : m;
952
- T[g] = b, F({ emit: t, state: e, nextTick: r, newValue: T, oldValue: I, isEdit: !0 });
945
+ h = await Lt(e.instance, e, a);
946
+ if (h) {
947
+ S(e, !1), e.popoverVisible = !1;
948
+ const { replace: b, mergeTag: x } = c, w = e.indexMap.get(h.label);
949
+ if ((b || x) && w !== void 0 && w !== m) {
950
+ const E = U(e.innerModelValue);
951
+ let I = e.innerModelValue.filter((g, _) => _ !== w);
952
+ const V = m > w ? m - 1 : m;
953
+ I[V] = h, B({ emit: t, state: e, nextTick: r, newValue: I, oldValue: E, isEdit: !0 });
953
954
  } else
954
- F({ emit: t, state: e, nextTick: r, index: m, newTag: b, isEdit: !0 });
955
+ B({ emit: t, state: e, nextTick: r, index: m, newTag: h, isEdit: !0 });
955
956
  } else
956
957
  e.popoverVisible = !0;
957
958
  e.currentEditValue = [];
@@ -964,31 +965,31 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
964
965
  checkFormValidation: l
965
966
  };
966
967
  }
967
- function At({ state: a, emit: e, nextTick: n }) {
968
+ function Ht({ state: a, emit: e, nextTick: n }) {
968
969
  const r = (d) => {
969
- C(a, !1);
970
+ S(a, !1);
970
971
  const { prevItem: s, indexMap: l } = a, { replace: p, label: u } = s, f = [];
971
972
  if (p && l.has(u)) {
972
973
  const i = l.get(u), c = { ...s, ...d };
973
- F({ emit: e, state: a, nextTick: n, newTag: c, index: i });
974
+ B({ emit: e, state: a, nextTick: n, newTag: c, index: i });
974
975
  return;
975
976
  } else
976
977
  !p && Array.isArray(d) ? d.forEach((i) => {
977
- z(a, i.value) || f.push({ ...s, ...i });
978
- }) : z(a, d.value) || f.push({ ...s, ...d });
979
- F({ emit: e, state: a, nextTick: n, tagList: f });
978
+ H(a, i.value) || f.push({ ...s, ...i });
979
+ }) : H(a, d.value) || f.push({ ...s, ...d });
980
+ B({ emit: e, state: a, nextTick: n, tagList: f });
980
981
  };
981
982
  return {
982
983
  handleConfirm: (d) => {
983
984
  if (!d) {
984
- he(a), C(a, !1);
985
+ me(a), S(a, !1);
985
986
  return;
986
987
  }
987
988
  r(d);
988
989
  },
989
990
  handleEditConfirm: (d) => {
990
991
  if (!d) {
991
- oe(a, !1);
992
+ le(a, !1);
992
993
  return;
993
994
  }
994
995
  r(d);
@@ -999,19 +1000,21 @@ function zt({ props: a, state: e }) {
999
1000
  return {
1000
1001
  initItems: () => {
1001
1002
  e.groupItems = {}, e.recordItems.forEach((s) => {
1002
- var p;
1003
+ var p, u;
1003
1004
  const { groupKey: l = "0" } = s;
1004
- if (e.groupItems[l] ? e.groupItems[l].push({ ...s }) : (e.groupItems[l] = [{ ...s }], e.matchItems[l] = { attr: [], attrValue: [] }), e.prevItem && s.field === e.prevItem.field && s !== e.prevItem) {
1005
- const { options: u, type: f } = s;
1006
- e.prevItem = s, u != null && u.length && (e.backupList = u), f === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (p = e.backupList) == null || p.forEach((i) => {
1007
- const { label: c } = i;
1008
- z(e, c) && e.checkboxGroup.push(`${s.label}${c}`), i.isFilter = !1;
1009
- })), C(e, s.field === e.prevItem.field && s !== e.prevItem);
1005
+ if ((p = s.options) == null || p.forEach((f) => {
1006
+ f.isFilter = !1;
1007
+ }), e.groupItems[l] ? e.groupItems[l].push({ ...s }) : (e.groupItems[l] = [{ ...s }], e.matchItems[l] = { attr: [], attrValue: [] }), e.prevItem && s.field === e.prevItem.field && s !== e.prevItem) {
1008
+ const { options: f, type: i } = s;
1009
+ e.prevItem = s, f != null && f.length && (e.backupList = f), i === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (u = e.backupList) == null || u.forEach((c) => {
1010
+ const { label: m } = c;
1011
+ H(e, m) && e.checkboxGroup.push(`${s.label}${m}`), c.isFilter = !1;
1012
+ })), S(e, s.field === e.prevItem.field && s !== e.prevItem);
1010
1013
  }
1011
1014
  });
1012
1015
  },
1013
1016
  watchOutsideClick: () => {
1014
- a.editable && oe(e, !1), e.isMouseDown = !1, C(e, !1);
1017
+ a.editable && le(e, !1), e.isMouseDown = !1, S(e, !1);
1015
1018
  },
1016
1019
  watchMouseDown: () => {
1017
1020
  e.isMouseDown = !0;
@@ -1022,7 +1025,7 @@ function zt({ props: a, state: e }) {
1022
1025
  handleClick: (s) => {
1023
1026
  var u;
1024
1027
  const { backupPrevItem: l, prevItem: p } = e;
1025
- s.stopPropagation(), a.editable && (e.popoverVisible = !1, e.currentEditValue = [], e.propItem.label && l && l !== p && (e.prevItem = l)), e.hasBackupList && (((u = e.backupList) == null ? void 0 : u.length) === 0 || !e.backupList) && !e.inputValue || a.items.length === 0 ? C(e, !1) : C(e);
1028
+ s.stopPropagation(), a.editable && (e.popoverVisible = !1, e.currentEditValue = [], e.propItem.label && l && l !== p && (e.prevItem = l)), e.hasBackupList && (((u = e.backupList) == null ? void 0 : u.length) === 0 || !e.backupList) && !e.inputValue || a.items.length === 0 ? S(e, !1) : S(e);
1026
1029
  }
1027
1030
  };
1028
1031
  }
@@ -1057,6 +1060,8 @@ const je = {
1057
1060
  rangeEndLabel: "结束日期",
1058
1061
  rulekeyword1: "关键字",
1059
1062
  notBeNull: "值不能为空",
1063
+ maxlengthErr: "输入长度不能超过{0}个字符",
1064
+ noData: "暂无数据",
1060
1065
  selectAll: "全选",
1061
1066
  confirm: "确定",
1062
1067
  cancel: "取消",
@@ -1098,6 +1103,8 @@ const je = {
1098
1103
  rangeEndLabel: "End date",
1099
1104
  rulekeyword1: "Keywords",
1100
1105
  notBeNull: "The value cannot be empty",
1106
+ maxlengthErr: "The input length cannot exceed {0} characters",
1107
+ noData: "No data",
1101
1108
  selectAll: "Select All",
1102
1109
  confirm: "Confirm",
1103
1110
  cancel: "Cancel",
@@ -1108,50 +1115,50 @@ const je = {
1108
1115
  initUse: "Search"
1109
1116
  }
1110
1117
  }
1111
- }, se = "zh-CN", ee = {
1118
+ }, oe = "zh-CN", ae = {
1112
1119
  "zh-CN": je,
1113
1120
  "en-US": Ge
1114
1121
  };
1115
- let N = null, Ve = null;
1116
- const we = (a) => {
1117
- N = a;
1122
+ let P = null, we = null;
1123
+ const Ve = (a) => {
1124
+ P = a;
1118
1125
  }, Kt = (a) => {
1119
- Ve = a;
1126
+ we = a;
1120
1127
  }, Ce = () => {
1121
1128
  var a, e, n, r, o;
1122
- if ((n = (e = (a = N == null ? void 0 : N.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && n.locale)
1123
- return N.config.globalProperties.$i18n.locale;
1124
- if ((r = N == null ? void 0 : N.$i18n) != null && r.locale)
1125
- return N.$i18n.locale;
1129
+ if ((n = (e = (a = P == null ? void 0 : P.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && n.locale)
1130
+ return P.config.globalProperties.$i18n.locale;
1131
+ if ((r = P == null ? void 0 : P.$i18n) != null && r.locale)
1132
+ return P.$i18n.locale;
1126
1133
  if (typeof navigator < "u") {
1127
1134
  const t = navigator.language || ((o = navigator.languages) == null ? void 0 : o[0]);
1128
1135
  if (t)
1129
1136
  return t.startsWith("zh") ? "zh-CN" : "en-US";
1130
1137
  }
1131
- return se;
1132
- }, Ie = (a) => ee[a] || ee[se], O = (a, e = {}) => {
1138
+ return oe;
1139
+ }, Ie = (a) => ae[a] || ae[oe], F = (a, e = {}) => {
1133
1140
  var d, s;
1134
1141
  if (!a)
1135
1142
  return "";
1136
- if (typeof Ve == "function")
1143
+ if (typeof we == "function")
1137
1144
  try {
1138
- const l = Ve(a, e);
1145
+ const l = we(a, e);
1139
1146
  if (l && l !== a)
1140
1147
  return l;
1141
1148
  } catch (l) {
1142
1149
  console.warn("[TinySearchBox] globalT translation failed:", l);
1143
1150
  }
1144
- if ((s = (d = N == null ? void 0 : N.config) == null ? void 0 : d.globalProperties) != null && s.$t)
1151
+ if ((s = (d = P == null ? void 0 : P.config) == null ? void 0 : d.globalProperties) != null && s.$t)
1145
1152
  try {
1146
- const l = N.config.globalProperties.$t(a, e);
1153
+ const l = P.config.globalProperties.$t(a, e);
1147
1154
  if (l && l !== a)
1148
1155
  return l;
1149
1156
  } catch (l) {
1150
1157
  console.warn("[TinySearchBox] i18n translation failed:", l);
1151
1158
  }
1152
- if (N != null && N.$t)
1159
+ if (P != null && P.$t)
1153
1160
  try {
1154
- const l = N.$t(a, e);
1161
+ const l = P.$t(a, e);
1155
1162
  if (l && l !== a)
1156
1163
  return l;
1157
1164
  } catch (l) {
@@ -1163,8 +1170,8 @@ const we = (a) => {
1163
1170
  if (t && typeof t == "object" && l in t)
1164
1171
  t = t[l];
1165
1172
  else {
1166
- if (n !== se) {
1167
- t = Ie(se);
1173
+ if (n !== oe) {
1174
+ t = Ie(oe);
1168
1175
  for (const u of o)
1169
1176
  if (t && typeof t == "object" && u in t)
1170
1177
  t = t[u];
@@ -1177,17 +1184,17 @@ const we = (a) => {
1177
1184
  break;
1178
1185
  }
1179
1186
  return typeof t == "string" && Object.keys(e).length > 0 ? t.replace(/\{(\w+)\}/g, (l, p) => e[p] !== void 0 ? e[p] : l) : typeof t == "string" ? t : a;
1180
- }, jt = (a, e = {}) => a.map((n) => O(n, e)), Gt = (a) => a in ee, Ut = () => Object.keys(ee), Yt = (a, e) => {
1181
- ee[a] = e;
1187
+ }, jt = (a, e = {}) => a.map((n) => F(n, e)), Gt = (a) => a in ae, Ut = () => Object.keys(ae), Yt = (a, e) => {
1188
+ ae[a] = e;
1182
1189
  }, qt = (a) => {
1183
- a !== se && delete ee[a];
1190
+ a !== oe && delete ae[a];
1184
1191
  }, Wt = {
1185
- t: O,
1192
+ t: F,
1186
1193
  zhCN: je,
1187
1194
  enUS: Ge,
1188
1195
  tArray: jt,
1189
1196
  setGlobalT: Kt,
1190
- setGlobalApp: we,
1197
+ setGlobalApp: Ve,
1191
1198
  getCurrentLocale: Ce,
1192
1199
  getLocaleMessages: Ie,
1193
1200
  isLocaleSupported: Gt,
@@ -1222,10 +1229,10 @@ const we = (a) => {
1222
1229
  "handleEditConfirm",
1223
1230
  "showDropdown",
1224
1231
  "showPopover"
1225
- ], de = (a, e) => a.emptyPlaceholder || e("tvp.tvpSearchbox.addPlaceholder"), Xt = ({ reactive: a, computed: e, api: n, i18n: r, watch: o, props: t, emit: d, vm: s }) => {
1232
+ ], pe = (a, e) => a.emptyPlaceholder || e("tvp.tvpSearchbox.addPlaceholder"), Xt = ({ reactive: a, computed: e, api: n, i18n: r, watch: o, props: t, emit: d, vm: s }) => {
1226
1233
  const l = a({
1227
1234
  innerModelValue: [...t.modelValue],
1228
- placeholder: t.modelValue.length > 0 ? O("tvp.tvpSearchbox.addPlaceholder") : de(t, O),
1235
+ placeholder: t.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") : pe(t, F),
1229
1236
  emitter: d,
1230
1237
  recordItems: [],
1231
1238
  groupItems: {},
@@ -1252,7 +1259,7 @@ const we = (a) => {
1252
1259
  valueMap: /* @__PURE__ */ new Map(),
1253
1260
  popoverVisible: !1,
1254
1261
  selectValue: "",
1255
- allTypeAttri: { label: O("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
1262
+ allTypeAttri: { label: F("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
1256
1263
  operatorValue: ":",
1257
1264
  inputEditValue: "",
1258
1265
  currentOperators: null,
@@ -1297,68 +1304,68 @@ const we = (a) => {
1297
1304
  return l;
1298
1305
  }, Qt = (a, { getCurrentInstance: e, onMounted: n, onBeforeUnmount: r, computed: o, reactive: t, watch: d }, { emit: s, nextTick: l, refs: p, vm: u, slots: f }) => {
1299
1306
  const i = {}, c = a.emitter ? a.emitter.emit : s, m = Xt({ reactive: t, computed: o, api: i, i18n: Wt, watch: d, props: a, emit: c, vm: u });
1300
- return Jt({ api: i, state: m, t: O, props: a, emit: c, nextTick: l, vm: u, computed: o }), ea({ watch: d, state: m, props: a, api: i, nextTick: l, vm: u }), m.instance = u, u && f && (u.slots = f), n(() => {
1307
+ return Jt({ api: i, state: m, t: F, props: a, emit: c, nextTick: l, vm: u, computed: o }), ea({ watch: d, state: m, props: a, api: i, nextTick: l, vm: u }), m.instance = u, u && f && (u.slots = f), n(() => {
1301
1308
  typeof document < "u" && (document.addEventListener("click", i.watchOutsideClick), document.addEventListener("mousedown", i.watchMouseDown), document.addEventListener("mousemove", i.watchMouseMove));
1302
1309
  }), r(() => {
1303
1310
  typeof document < "u" && (document.removeEventListener("click", i.watchOutsideClick), document.removeEventListener("mousedown", i.watchMouseDown), document.removeEventListener("mousemove", i.watchMouseMove), m.localeCheckInterval && (clearInterval(m.localeCheckInterval), m.localeCheckInterval = null));
1304
1311
  }), i;
1305
1312
  }, Jt = ({ api: a, state: e, t: n, props: r, emit: o, nextTick: t, vm: d, computed: s }) => {
1306
- const l = (A) => {
1307
- if (!A)
1313
+ const l = (M) => {
1314
+ if (!M)
1308
1315
  return !1;
1309
- const X = e.recordItems.find((ce) => ce.field === A.field || ce.label === A.label);
1310
- return !!(X != null && X.disableDelete);
1311
- }, { deleteTag: p, clearTag: u, backspaceDeleteTag: f } = Mt({ props: r, state: e, emit: o, nextTick: t, isTagDisabled: l }), { editTag: i, confirmEditTag: c, selectPropChange: m, checkFormValidation: b } = Bt({ props: r, state: e, t: n, nextTick: t, format: xe, emit: o, vm: d }), { handleInput: h, selectFirstMap: V, cancelHandleInput: w } = Ot({ props: r, state: e, emit: o, nextTick: t }), { selectPropItem: I, selectRadioItem: T, selectInputValue: g, createTag: _, helpClick: v, setOperator: x } = Nt({ props: r, emit: o, state: e, t: n, format: xe, nextTick: t, vm: d, cancelHandleInput: w, selectFirstMap: V }), { selectCheckbox: y } = Pt({ props: r, state: e, emit: o, nextTick: t }), { onConfirmDate: S, handleDateShow: E, pickerOptions: k } = Ft({ props: r, state: e, emit: o, nextTick: t, vm: d }), { sizeChange: D, initFormRule: $ } = Ht({ props: r, state: e, t: n, emit: o, nextTick: t, vm: d }), { handleConfirm: H, handleEditConfirm: K } = At({ state: e, emit: o, nextTick: t }), { initItems: M, watchOutsideClick: P, watchMouseDown: W, watchMouseMove: B, handleClick: te } = zt({ props: r, state: e }), Z = s(() => r.modelValue.length || e.propItem.label || e.inputValue), ae = (A) => {
1312
- const X = A ? ["startDateTime", "endDateTime"] : ["startDate", "endDate"];
1316
+ const R = e.recordItems.find((J) => J.field === M.field || J.label === M.label);
1317
+ return !!(R != null && R.disableDelete);
1318
+ }, { deleteTag: p, clearTag: u, backspaceDeleteTag: f } = Mt({ props: r, state: e, emit: o, nextTick: t, isTagDisabled: l }), { editTag: i, confirmEditTag: c, selectPropChange: m, checkFormValidation: h } = Bt({ props: r, state: e, t: n, nextTick: t, format: xe, emit: o, vm: d }), { handleInput: b, selectFirstMap: x, cancelHandleInput: w } = Ot({ props: r, state: e, emit: o, nextTick: t }), { selectPropItem: E, selectRadioItem: I, selectInputValue: V, createTag: g, helpClick: _, setOperator: v } = Nt({ props: r, emit: o, state: e, t: n, format: xe, nextTick: t, vm: d, cancelHandleInput: w, selectFirstMap: x }), { selectCheckbox: y } = Pt({ props: r, state: e, emit: o, nextTick: t }), { onConfirmDate: k, handleDateShow: $, pickerOptions: C } = Ft({ props: r, state: e, emit: o, nextTick: t, vm: d }), { sizeChange: T, initFormRule: L } = At({ props: r, state: e, t: n, emit: o, nextTick: t, vm: d }), { handleConfirm: O, handleEditConfirm: z } = Ht({ state: e, emit: o, nextTick: t }), { initItems: K, watchOutsideClick: A, watchMouseDown: q, watchMouseMove: D, handleClick: N } = zt({ props: r, state: e }), j = s(() => r.modelValue.length || e.propItem.label || e.inputValue), W = (M) => {
1319
+ const R = M ? ["startDateTime", "endDateTime"] : ["startDate", "endDate"];
1313
1320
  t(() => {
1314
- le(e, X);
1321
+ ie(e, R);
1315
1322
  });
1316
- }, ie = () => ({
1317
- selectInputValue: g,
1318
- selectPropItem: I,
1319
- selectRadioItem: T,
1320
- setOperator: x,
1323
+ }, he = () => ({
1324
+ selectInputValue: V,
1325
+ selectPropItem: E,
1326
+ selectRadioItem: I,
1327
+ setOperator: v,
1321
1328
  selectCheckbox: y,
1322
- sizeChange: D,
1323
- onConfirmDate: S,
1324
- selectFirstMap: V,
1325
- handleDateShow: E,
1326
- validateDateRange: ae
1327
- }), L = (A) => {
1328
- e.placeholder = A;
1329
- }, R = () => de(r, n);
1330
- r.modelValue.length > 0 ? L(n("tvp.tvpSearchbox.addPlaceholder")) : L(R()), Object.assign(a, {
1329
+ sizeChange: T,
1330
+ onConfirmDate: k,
1331
+ selectFirstMap: x,
1332
+ handleDateShow: $,
1333
+ validateDateRange: W
1334
+ }), Q = (M) => {
1335
+ e.placeholder = M;
1336
+ }, ne = () => pe(r, n);
1337
+ r.modelValue.length > 0 ? Q(n("tvp.tvpSearchbox.addPlaceholder")) : Q(ne()), Object.assign(a, {
1331
1338
  t: n,
1332
1339
  state: e,
1333
- isShowClose: Z,
1340
+ isShowClose: j,
1334
1341
  isTagDisabled: l,
1335
1342
  deleteTag: p,
1336
1343
  editTag: i,
1337
1344
  backspaceDeleteTag: f,
1338
- createTag: _,
1345
+ createTag: g,
1339
1346
  clearTag: u,
1340
- helpClick: v,
1341
- handleInput: h,
1342
- handleClick: te,
1343
- handleEvents: (A, X, ce) => {
1344
- const De = ie();
1345
- typeof De[A] == "function" ? De[A](X, ce) : console.warn(`[TinySearchBox] Unknown event: ${A}`);
1346
- },
1347
- pickerOptions: k,
1348
- resetInput: he,
1347
+ helpClick: _,
1348
+ handleInput: b,
1349
+ handleClick: N,
1350
+ handleEvents: (M, R, J) => {
1351
+ const De = he();
1352
+ typeof De[M] == "function" ? De[M](R, J) : console.warn(`[TinySearchBox] Unknown event: ${M}`);
1353
+ },
1354
+ pickerOptions: C,
1355
+ resetInput: me,
1349
1356
  selectPropChange: m,
1350
1357
  confirmEditTag: c,
1351
- handleConfirm: H,
1352
- handleEditConfirm: K,
1353
- showDropdown: C,
1354
- showPopover: oe,
1355
- checkFormValidation: b,
1356
- setPlaceholder: L,
1357
- initItems: M,
1358
- initFormRule: $,
1359
- watchOutsideClick: P,
1360
- watchMouseDown: W,
1361
- watchMouseMove: B
1358
+ handleConfirm: O,
1359
+ handleEditConfirm: z,
1360
+ showDropdown: S,
1361
+ showPopover: le,
1362
+ checkFormValidation: h,
1363
+ setPlaceholder: Q,
1364
+ initItems: K,
1365
+ initFormRule: L,
1366
+ watchOutsideClick: A,
1367
+ watchMouseDown: q,
1368
+ watchMouseMove: D
1362
1369
  });
1363
1370
  }, ea = ({ watch: a, state: e, props: n, api: r, nextTick: o, vm: t }) => {
1364
1371
  var f;
@@ -1366,9 +1373,9 @@ const we = (a) => {
1366
1373
  var i;
1367
1374
  if (e.propItem.label) {
1368
1375
  const { placeholder: c, type: m } = e.prevItem;
1369
- c ? r.setPlaceholder(c) : m === "map" ? r.setPlaceholder(O("tvp.tvpSearchbox.tagPlaceholder")) : (i = e.backupList) != null && i.length ? r.setPlaceholder(O("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : r.setPlaceholder(O("tvp.tvpSearchbox.addPlaceholder"));
1376
+ c ? r.setPlaceholder(c) : m === "map" ? r.setPlaceholder(F("tvp.tvpSearchbox.tagPlaceholder")) : (i = e.backupList) != null && i.length ? r.setPlaceholder(F("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : r.setPlaceholder(F("tvp.tvpSearchbox.addPlaceholder"));
1370
1377
  } else {
1371
- const c = n.modelValue.length > 0 ? O("tvp.tvpSearchbox.addPlaceholder") : de(n, O);
1378
+ const c = n.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") : pe(n, F);
1372
1379
  r.setPlaceholder(c);
1373
1380
  }
1374
1381
  }, s = () => {
@@ -1414,14 +1421,22 @@ const we = (a) => {
1414
1421
  () => {
1415
1422
  r.initFormRule();
1416
1423
  }
1424
+ ), a(
1425
+ () => n.maxlength,
1426
+ () => {
1427
+ r.initFormRule();
1428
+ }
1417
1429
  ), a(
1418
1430
  () => n.items,
1419
1431
  (i) => {
1420
1432
  const c = e.visible, m = e.prevItem && e.prevItem.field;
1421
- e.recordItems = G(i), r.initItems(), r.initFormRule(), o(() => {
1433
+ e.recordItems = U(i), r.initItems(), r.initFormRule(), o(() => {
1434
+ var h;
1422
1435
  if (r.initItems(), r.initFormRule(), c && e.propItem.label) {
1423
- const b = e.recordItems.find((h) => h.field === m) || e.prevItem;
1424
- e.prevItem = b || {}, e.backupList = b && b.options ? [...b.options] : [], e.filterList = e.backupList ? [...e.backupList] : [], C(e);
1436
+ const b = e.recordItems.find((x) => x.field === m) || e.prevItem;
1437
+ e.prevItem = b || {}, e.backupList = b && b.options ? [...b.options] : [], (h = e.backupList) == null || h.forEach((x) => {
1438
+ x.isFilter = !1;
1439
+ }), e.filterList = e.backupList ? [...e.backupList] : [], S(e);
1425
1440
  }
1426
1441
  });
1427
1442
  },
@@ -1464,20 +1479,20 @@ const we = (a) => {
1464
1479
  (i) => {
1465
1480
  if (i) {
1466
1481
  if (e.indexMap.clear(), e.valueMap.clear(), i.forEach((c, m) => {
1467
- var h;
1468
- const b = `${c.label}${c.value}`;
1469
- e.indexMap.set(c.label, m), e.valueMap.set(b, m), ((h = c.options) == null ? void 0 : h.length) > 0 && c.options.forEach((V) => {
1470
- const w = `${c.label}${V.label}`;
1482
+ var b;
1483
+ const h = `${c.label}${c.value}`;
1484
+ e.indexMap.set(c.label, m), e.valueMap.set(h, m), ((b = c.options) == null ? void 0 : b.length) > 0 && c.options.forEach((x) => {
1485
+ const w = `${c.label}${x.label}`;
1471
1486
  e.valueMap.set(w, m);
1472
1487
  });
1473
- }), oe(e, !1), i.length === 0 && r.setPlaceholder(de(n, O)), n.editable && !e.inputEditValue.length && i[0]) {
1488
+ }), le(e, !1), i.length === 0 && r.setPlaceholder(pe(n, F)), n.editable && !e.inputEditValue.length && i[0]) {
1474
1489
  const c = i[0];
1475
- if ((e.recordItems.find((b) => b.field === c.field) || c).mergeTag && c.options) {
1476
- const b = c.options.flatMap((h) => h.label) || [];
1477
- e.inputEditValue = b, e.currentEditSelectTags = b;
1490
+ if ((e.recordItems.find((h) => h.field === c.field) || c).mergeTag && c.options) {
1491
+ const h = c.options.flatMap((b) => b.label) || [];
1492
+ e.inputEditValue = h, e.currentEditSelectTags = h;
1478
1493
  } else {
1479
- const b = c.value;
1480
- e.inputEditValue = Array.isArray(b) ? b.join(",") : b || "";
1494
+ const h = c.value;
1495
+ e.inputEditValue = Array.isArray(h) ? h.join(",") : h || "";
1481
1496
  }
1482
1497
  }
1483
1498
  e.innerModelValue = [...i];
@@ -1664,8 +1679,9 @@ const na = (a, e, { emit: n }) => {
1664
1679
  });
1665
1680
  return {
1666
1681
  isShowSearchOption: r(() => {
1667
- const { inputValue: p, popoverVisible: u, currentOperators: f, propItem: i, prevItem: c } = a.state;
1668
- return p.trim() && !u && !(f != null && f.length) && (!i.label || [void 0, null, "", "radio", "input"].includes(c.type));
1682
+ var h;
1683
+ const { inputValue: p, popoverVisible: u, currentOperators: f, propItem: i, prevItem: c } = a.state, m = !!i.label && !!((h = c == null ? void 0 : c.options) != null && h.length);
1684
+ return p.trim() && !u && !(f != null && f.length) && !m && (!i.label || [void 0, null, "", "radio", "input"].includes(c.type));
1669
1685
  }),
1670
1686
  selectInputValue: (p) => {
1671
1687
  o("selectInputValue", p);
@@ -1676,15 +1692,15 @@ const na = (a, e, { emit: n }) => {
1676
1692
  selectRadioItem: (p, u) => {
1677
1693
  o("selectRadioItem", p, u);
1678
1694
  },
1679
- t: O
1695
+ t: F
1680
1696
  };
1681
- }, ra = ["isShowSearchOption", "selectInputValue", "selectPropItem", "selectRadioItem", "t"], sa = fe({
1682
- name: Te + "SearchBoxFirstLevelPanel",
1697
+ }, ra = ["isShowSearchOption", "selectInputValue", "selectPropItem", "selectRadioItem", "t"], sa = de({
1698
+ name: Ee + "SearchBoxFirstLevelPanel",
1683
1699
  components: {
1684
1700
  TinyDropdownItem: Ne
1685
1701
  },
1686
1702
  props: {
1687
- ...ve,
1703
+ ...fe,
1688
1704
  state: {
1689
1705
  type: Object,
1690
1706
  default: () => ({})
@@ -1729,11 +1745,11 @@ function ca(a, e) {
1729
1745
  scrollTop: 0,
1730
1746
  viewportHeight: 300
1731
1747
  }), p = r(() => (o() || []).length * t), u = r(() => {
1732
- const b = Math.max(0, l.scrollTop - s());
1733
- return Math.max(0, Math.floor(b / t) - d);
1748
+ const h = Math.max(0, l.scrollTop - s());
1749
+ return Math.max(0, Math.floor(h / t) - d);
1734
1750
  }), f = r(() => {
1735
- const b = o() || [], h = Math.ceil(l.viewportHeight / t);
1736
- return Math.min(b.length, u.value + h + d * 2);
1751
+ const h = o() || [], b = Math.ceil(l.viewportHeight / t);
1752
+ return Math.min(h.length, u.value + b + d * 2);
1737
1753
  }), i = r(() => u.value * t), c = r(() => (o() || []).slice(u.value, f.value));
1738
1754
  return {
1739
1755
  vsState: l,
@@ -1742,8 +1758,8 @@ function ca(a, e) {
1742
1758
  endIndex: f,
1743
1759
  offsetY: i,
1744
1760
  visibleItems: c,
1745
- handleScroll: (b) => {
1746
- l.scrollTop = b.target.scrollTop, l.viewportHeight = b.target.clientHeight;
1761
+ handleScroll: (h) => {
1762
+ l.scrollTop = h.target.scrollTop, l.viewportHeight = h.target.clientHeight;
1747
1763
  }
1748
1764
  };
1749
1765
  }
@@ -1829,7 +1845,9 @@ var ua = function() {
1829
1845
  title: o.label
1830
1846
  }
1831
1847
  }, [e._v(e._s(o.label))])]);
1832
- }), 1)])]) : e.state.prevItem.type === "checkbox" ? r("div", {
1848
+ }), 1)]), e.showNoData ? r("div", {
1849
+ staticClass: "tvp-search-box__no-data"
1850
+ }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.noData")) + " ")]) : e._e()]) : e.state.prevItem.type === "checkbox" ? r("div", {
1833
1851
  directives: [{
1834
1852
  name: "loading",
1835
1853
  rawName: "v-loading",
@@ -1920,7 +1938,9 @@ var ua = function() {
1920
1938
  return e.selectCheckbox(!0);
1921
1939
  }
1922
1940
  }
1923
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e._e()]) : e.state.prevItem.type === "numRange" ? r("div", {
1941
+ }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e.showNoData ? r("div", {
1942
+ staticClass: "tvp-search-box__no-data"
1943
+ }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.noData")) + " ")]) : e._e()]) : e.state.prevItem.type === "numRange" ? r("div", {
1924
1944
  staticClass: "tvp-search-box__panel-box"
1925
1945
  }, [r("div", {
1926
1946
  staticClass: "tvp-search-box__number"
@@ -2211,8 +2231,8 @@ var ua = function() {
2211
2231
  }), 1)])])]) : e._e()]);
2212
2232
  }, pa = [];
2213
2233
  const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
2214
- const { computed: t, reactive: d, watch: s, onMounted: l } = e, p = a.handleEvents || a.events || ((v, x, y) => {
2215
- n("events", v, x, y);
2234
+ const { computed: t, reactive: d, watch: s, onMounted: l } = e, p = a.handleEvents || a.events || ((v, y, k) => {
2235
+ n("events", v, y, k);
2216
2236
  }), u = (v) => {
2217
2237
  p("setOperator", v);
2218
2238
  }, f = (v) => {
@@ -2221,38 +2241,38 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
2221
2241
  p("selectCheckbox", v);
2222
2242
  }, c = (v) => {
2223
2243
  p("sizeChange", v);
2224
- }, m = (v, x) => {
2225
- p("onConfirmDate", v, x);
2226
- }, b = (v, x) => {
2227
- p("selectFirstMap", v, x);
2228
- }, h = (v) => {
2244
+ }, m = (v, y) => {
2245
+ p("onConfirmDate", v, y);
2246
+ }, h = (v, y) => {
2247
+ p("selectFirstMap", v, y);
2248
+ }, b = (v) => {
2229
2249
  p("handleDateShow", v);
2230
- }, V = (v) => {
2250
+ }, x = (v) => {
2231
2251
  p("handleDateShow"), p("validateDateRange", v);
2232
2252
  }, w = t(() => {
2233
- const { prevItem: v, dateRangeFormat: x, datetimeRangeFormat: y } = a.state, S = v.type;
2234
- if (S === "dateRange") {
2235
- const { startDate: E, endDate: k } = a.state, D = v.format || x;
2236
- return !!(E && k && re(k, E, D) < 0);
2253
+ const { prevItem: v, dateRangeFormat: y, datetimeRangeFormat: k } = a.state, $ = v.type;
2254
+ if ($ === "dateRange") {
2255
+ const { startDate: C, endDate: T } = a.state, L = v.format || y;
2256
+ return !!(C && T && se(T, C, L) < 0);
2237
2257
  }
2238
- if (S === "datetimeRange") {
2239
- const { startDateTime: E, endDateTime: k } = a.state, D = v.format || y;
2240
- return !!(E && k && re(k, E, D) < 0);
2258
+ if ($ === "datetimeRange") {
2259
+ const { startDateTime: C, endDateTime: T } = a.state, L = v.format || k;
2260
+ return !!(C && T && se(T, C, L) < 0);
2241
2261
  }
2242
2262
  return !1;
2243
- }), I = t(() => {
2263
+ }), E = t(() => {
2244
2264
  var v;
2245
2265
  return a.state.hasBackupList && ((v = a.state.backupList) == null ? void 0 : v.length) === 0;
2246
- }), T = t(() => {
2266
+ }), I = t(() => {
2247
2267
  var v;
2248
- return (v = a.state.backupList) == null ? void 0 : v.find((x) => !x.isFilter);
2249
- }), g = t(() => {
2250
- const v = a.state.prevItem.type, x = a.state.backupList || [];
2251
- return !v || v === "radio" ? a.state.inputValue ? x.filter((y) => !y.isFilter) : x : x.filter((y) => !y.isFilter);
2252
- }), _ = ca(
2268
+ return (v = a.state.backupList) == null ? void 0 : v.find((y) => !y.isFilter);
2269
+ }), V = t(() => {
2270
+ const v = a.state.prevItem.type, y = a.state.backupList || [];
2271
+ return !v || v === "radio" ? a.state.inputValue ? y.filter((k) => !k.isFilter) : y : y.filter((k) => !k.isFilter);
2272
+ }), g = t(() => a.state.hasBackupList && !E.value && !V.value.length), _ = ca(
2253
2273
  { reactive: d, computed: t },
2254
2274
  {
2255
- getList: () => g.value,
2275
+ getList: () => V.value,
2256
2276
  itemHeight: 32,
2257
2277
  bufferSize: 5,
2258
2278
  headerHeight: () => {
@@ -2284,18 +2304,19 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
2284
2304
  selectCheckbox: i,
2285
2305
  sizeChange: c,
2286
2306
  onConfirmDate: m,
2287
- selectFirstMap: b,
2288
- handleDateShow: h,
2289
- onDateChange: V,
2307
+ selectFirstMap: h,
2308
+ handleDateShow: b,
2309
+ onDateChange: x,
2290
2310
  isDateRangeInvalid: w,
2291
- isLoading: I,
2292
- showCheckBoxList: T,
2311
+ isLoading: E,
2312
+ showCheckBoxList: I,
2313
+ showNoData: g,
2293
2314
  vsTotalHeight: _.totalHeight,
2294
2315
  vsStartIndex: _.startIndex,
2295
2316
  vsOffsetY: _.offsetY,
2296
2317
  vsVisibleItems: _.visibleItems,
2297
2318
  vsHandleScroll: _.handleScroll,
2298
- t: O
2319
+ t: F
2299
2320
  };
2300
2321
  }, fa = [
2301
2322
  "setOperator",
@@ -2309,14 +2330,15 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
2309
2330
  "isDateRangeInvalid",
2310
2331
  "isLoading",
2311
2332
  "showCheckBoxList",
2333
+ "showNoData",
2312
2334
  "vsTotalHeight",
2313
2335
  "vsStartIndex",
2314
2336
  "vsOffsetY",
2315
2337
  "vsVisibleItems",
2316
2338
  "vsHandleScroll",
2317
2339
  "t"
2318
- ], va = fe({
2319
- name: Te + "SearchBoxSecondLevelPanel",
2340
+ ], va = de({
2341
+ name: Ee + "SearchBoxSecondLevelPanel",
2320
2342
  emits: ["events", "click"],
2321
2343
  components: {
2322
2344
  TinyDropdownItem: Ne,
@@ -2330,7 +2352,7 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
2330
2352
  loading: qe.directive
2331
2353
  },
2332
2354
  props: {
2333
- ...ve,
2355
+ ...fe,
2334
2356
  state: {
2335
2357
  type: Object,
2336
2358
  default: () => ({})
@@ -2373,13 +2395,13 @@ function ha(a) {
2373
2395
  }
2374
2396
  const ba = /* @__PURE__ */ function() {
2375
2397
  return ma.exports;
2376
- }(), ga = fe({
2398
+ }(), ga = de({
2377
2399
  model: {
2378
2400
  prop: "modelValue",
2379
2401
  event: "update:modelValue"
2380
2402
  },
2381
2403
  props: {
2382
- ...ve,
2404
+ ...fe,
2383
2405
  tiny_mode: {
2384
2406
  type: String,
2385
2407
  default: "pc"
@@ -2446,7 +2468,7 @@ const ba = /* @__PURE__ */ function() {
2446
2468
  default: ""
2447
2469
  }
2448
2470
  },
2449
- emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "second-level-enter", "clear", "tag-click", "help", "validate-error"],
2471
+ emits: ["update:modelValue", "change", "search", "first-level-select", "second-level-enter", "clear", "tag-click", "help", "validate-error"],
2450
2472
  components: {
2451
2473
  TinyTag: We,
2452
2474
  TinyInput: Oe,
@@ -2467,15 +2489,15 @@ const ba = /* @__PURE__ */ function() {
2467
2489
  },
2468
2490
  setup(a, e) {
2469
2491
  var f, i;
2470
- const n = ue.getCurrentInstance(), r = n == null ? void 0 : n.parent, o = ((f = r == null ? void 0 : r.type) == null ? void 0 : f.name) === "AsyncComponentWrapper" && (r != null && r.parent) ? r.parent : r, t = (i = o == null ? void 0 : o.setupState) == null ? void 0 : i.state, d = ke({ props: a, context: e, renderless: Qt, api: Zt });
2492
+ const n = ce.getCurrentInstance(), r = n == null ? void 0 : n.parent, o = ((f = r == null ? void 0 : r.type) == null ? void 0 : f.name) === "AsyncComponentWrapper" && (r != null && r.parent) ? r.parent : r, t = (i = o == null ? void 0 : o.setupState) == null ? void 0 : i.state, d = ke({ props: a, context: e, renderless: Qt, api: Zt });
2471
2493
  o != null && o.setupState && t && (o.setupState.state = t), o != null && o.ctx && "state" in o.ctx && delete o.ctx.state;
2472
- const s = ue.inject("form", null), l = () => {
2494
+ const s = ce.inject("form", null), l = () => {
2473
2495
  var c;
2474
2496
  return a.size || ((c = s == null ? void 0 : s.state) == null ? void 0 : c.size) || (s == null ? void 0 : s.size) || "";
2475
2497
  }, p = () => {
2476
2498
  var c;
2477
2499
  return ((c = s == null ? void 0 : s.state) == null ? void 0 : c.disabled) ?? (s == null ? void 0 : s.disabled) ?? !1;
2478
- }, u = ue.reactive({
2500
+ }, u = ce.reactive({
2479
2501
  get size() {
2480
2502
  return l();
2481
2503
  },
@@ -2499,7 +2521,7 @@ const ba = /* @__PURE__ */ function() {
2499
2521
  return ((c = s == null ? void 0 : s.state) == null ? void 0 : c.rules) ?? (s == null ? void 0 : s.rules);
2500
2522
  }
2501
2523
  });
2502
- return ue.provide("form", {
2524
+ return ce.provide("form", {
2503
2525
  get size() {
2504
2526
  return l();
2505
2527
  },
@@ -2598,7 +2620,7 @@ var _a = function() {
2598
2620
  staticClass: "tvp-search-box__input",
2599
2621
  attrs: {
2600
2622
  placeholder: t.state.placeholder,
2601
- maxlength: t.maxlength && t.maxlength + 1
2623
+ maxlength: t.maxlength
2602
2624
  },
2603
2625
  on: {
2604
2626
  keydown: [function(l) {
@@ -2612,7 +2634,7 @@ var _a = function() {
2612
2634
  scopedSlots: t._u([{
2613
2635
  key: "suffix",
2614
2636
  fn: function() {
2615
- var l, p, u, f, i, c, m, b;
2637
+ var l, p, u, f, i, c, m, h;
2616
2638
  return [s("tiny-icon-close", {
2617
2639
  directives: [{
2618
2640
  name: "show",
@@ -2622,8 +2644,8 @@ var _a = function() {
2622
2644
  }],
2623
2645
  staticClass: "tvp-search-box__input-close",
2624
2646
  on: {
2625
- click: function(h) {
2626
- return h.stopPropagation(), t.clearTag.apply(null, arguments);
2647
+ click: function(b) {
2648
+ return b.stopPropagation(), t.clearTag.apply(null, arguments);
2627
2649
  }
2628
2650
  }
2629
2651
  }), s("span", {
@@ -2637,7 +2659,7 @@ var _a = function() {
2637
2659
  `
2638
2660
  }],
2639
2661
  staticClass: "tvp-search-box__input-separator"
2640
- }), (i = t.state.instance) !== null && i !== void 0 && (c = i.$slots) !== null && c !== void 0 && c["suffix-icon"] || (m = t.state.instance) !== null && m !== void 0 && (b = m.slots) !== null && b !== void 0 && b["suffix-icon"] ? s("span", {
2662
+ }), (i = t.state.instance) !== null && i !== void 0 && (c = i.$slots) !== null && c !== void 0 && c["suffix-icon"] || (m = t.state.instance) !== null && m !== void 0 && (h = m.slots) !== null && h !== void 0 && h["suffix-icon"] ? s("span", {
2641
2663
  class: t.showHelp ? "tvp-search-box__suffix-icon-slot" : "tvp-search-box__suffix-icon-slot-no-help"
2642
2664
  }, [t._t("suffix-icon")], 2) : t._e(), t.showHelp ? s("tiny-tooltip", {
2643
2665
  attrs: {
@@ -2648,15 +2670,15 @@ var _a = function() {
2648
2670
  }, [s("tiny-icon-help-query", {
2649
2671
  staticClass: "tvp-search-box__input-help",
2650
2672
  on: {
2651
- click: function(h) {
2652
- return h.stopPropagation(), t.helpClick.apply(null, arguments);
2673
+ click: function(b) {
2674
+ return b.stopPropagation(), t.helpClick.apply(null, arguments);
2653
2675
  }
2654
2676
  }
2655
2677
  })], 1) : t._e(), s("tiny-icon-search", {
2656
2678
  staticClass: "tvp-search-box__input-search",
2657
2679
  on: {
2658
- click: function(h) {
2659
- return h.stopPropagation(), t.createTag.apply(null, arguments);
2680
+ click: function(b) {
2681
+ return b.stopPropagation(), t.createTag.apply(null, arguments);
2660
2682
  }
2661
2683
  }
2662
2684
  })];
@@ -2767,6 +2789,7 @@ var _a = function() {
2767
2789
  staticClass: "tvp-search-box__number-item"
2768
2790
  }, [s("tiny-select", {
2769
2791
  attrs: {
2792
+ "is-drop-inherit-width": "",
2770
2793
  searchable: "",
2771
2794
  disabled: t.state.prevItem.editAttrDisabled || t.state.prevItem.disableDelete
2772
2795
  },
@@ -2806,6 +2829,9 @@ var _a = function() {
2806
2829
  }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.operator")) + " ")]) : t._e(), t.state.prevItem.operators ? s("div", {
2807
2830
  staticClass: "tvp-search-box__number-item"
2808
2831
  }, [s("tiny-select", {
2832
+ attrs: {
2833
+ "is-drop-inherit-width": ""
2834
+ },
2809
2835
  model: {
2810
2836
  value: t.state.operatorValue,
2811
2837
  callback: function(l) {
@@ -2829,14 +2855,21 @@ var _a = function() {
2829
2855
  "is-error": t.state.formErrors.inputEditValue
2830
2856
  }
2831
2857
  }, [((r = t.state.currentEditValue) === null || r === void 0 ? void 0 : r.length) > 0 ? s("tiny-select", {
2858
+ key: t.state.prevItem.field,
2832
2859
  staticClass: "tvp-search-box-select",
2833
2860
  attrs: {
2861
+ "is-drop-inherit-width": "",
2834
2862
  multiple: !!t.state.prevItem.mergeTag,
2835
2863
  "allow-create": (o = t.state.prevItem) === null || o === void 0 ? void 0 : o.allowCreate,
2836
2864
  filterable: "",
2837
2865
  "default-first-option": "",
2838
2866
  clearable: ""
2839
2867
  },
2868
+ on: {
2869
+ change: function(l) {
2870
+ return t.checkFormValidation();
2871
+ }
2872
+ },
2840
2873
  model: {
2841
2874
  value: t.state.inputEditValue,
2842
2875
  callback: function(l) {
@@ -2853,9 +2886,16 @@ var _a = function() {
2853
2886
  }
2854
2887
  });
2855
2888
  }), 1) : s("tiny-input", {
2889
+ key: t.state.prevItem.field,
2856
2890
  attrs: {
2891
+ maxlength: t.maxlength,
2857
2892
  clearable: ""
2858
2893
  },
2894
+ on: {
2895
+ change: function(l) {
2896
+ return t.checkFormValidation();
2897
+ }
2898
+ },
2859
2899
  model: {
2860
2900
  value: t.state.inputEditValue,
2861
2901
  callback: function(l) {
@@ -3041,6 +3081,7 @@ var _a = function() {
3041
3081
  }]
3042
3082
  }, [s("tiny-select", {
3043
3083
  attrs: {
3084
+ "is-drop-inherit-width": "",
3044
3085
  clearable: ""
3045
3086
  },
3046
3087
  on: {
@@ -3073,6 +3114,7 @@ var _a = function() {
3073
3114
  }]
3074
3115
  }, [s("tiny-select", {
3075
3116
  attrs: {
3117
+ "is-drop-inherit-width": "",
3076
3118
  clearable: ""
3077
3119
  },
3078
3120
  on: {
@@ -3133,19 +3175,19 @@ var ya = /* @__PURE__ */ Se(
3133
3175
  _a,
3134
3176
  xa,
3135
3177
  !1,
3136
- Va,
3178
+ wa,
3137
3179
  null,
3138
3180
  null,
3139
3181
  null
3140
3182
  );
3141
- function Va(a) {
3183
+ function wa(a) {
3142
3184
  for (let e in Le)
3143
3185
  this[e] = Le[e];
3144
3186
  }
3145
- const wa = /* @__PURE__ */ function() {
3187
+ const Va = /* @__PURE__ */ function() {
3146
3188
  return ya.exports;
3147
3189
  }(), Ia = {
3148
- ...ve,
3190
+ ...fe,
3149
3191
  tiny_mode: {
3150
3192
  type: String,
3151
3193
  default: "pc"
@@ -3234,29 +3276,29 @@ const wa = /* @__PURE__ */ function() {
3234
3276
  type: Boolean,
3235
3277
  default: !1
3236
3278
  }
3237
- }, ne = fe({
3238
- name: Te + "SearchBox",
3279
+ }, re = de({
3280
+ name: Ee + "SearchBox",
3239
3281
  props: Ia,
3240
- ...wa
3241
- }), Ta = "3.32.0-alpha.3";
3242
- ne.install = function(a) {
3282
+ ...Va
3283
+ }), Ea = "3.32.0";
3284
+ re.install = function(a) {
3243
3285
  const e = a;
3244
- e && e.config && e.config.globalProperties && we(e), e && e.mixin && !e.__TINY_SEARCH_BOX_I18N_MIXIN__ && (e.__TINY_SEARCH_BOX_I18N_MIXIN__ = !0, e.mixin({
3286
+ e && e.config && e.config.globalProperties && Ve(e), e && e.mixin && !e.__TINY_SEARCH_BOX_I18N_MIXIN__ && (e.__TINY_SEARCH_BOX_I18N_MIXIN__ = !0, e.mixin({
3245
3287
  beforeCreate() {
3246
3288
  const n = this;
3247
- n && (n.$i18n || n.$t || n.$root && (n.$root.$i18n || n.$root.$t)) && we(n.$root || n);
3289
+ n && (n.$i18n || n.$t || n.$root && (n.$root.$i18n || n.$root.$t)) && Ve(n.$root || n);
3248
3290
  }
3249
- })), e.component(ne.name, ne);
3291
+ })), e.component(re.name, re);
3250
3292
  };
3251
- ne.version = Ta;
3252
- typeof window < "u" && window.Vue && ne.install(window.Vue);
3293
+ re.version = Ea;
3294
+ typeof window < "u" && window.Vue && re.install(window.Vue);
3253
3295
  export {
3254
3296
  ia as TinySearchBoxFirstLevelPanel,
3255
3297
  ba as TinySearchBoxSecondLevelPanel,
3256
- ne as default,
3298
+ re as default,
3257
3299
  Ge as enUS,
3258
- we as setGlobalApp,
3259
- O as t,
3300
+ Ve as setGlobalApp,
3301
+ F as t,
3260
3302
  je as zhCN
3261
3303
  };
3262
3304
  //# sourceMappingURL=index.js.map