@opentiny/vue-search-box 2.30.0 → 2.32.0-alpha.1

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