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