@opentiny/vue-search-box 2.29.0 → 2.30.0

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