@opentiny/vue-search-box-saas 2.27.1 → 3.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,38 +1,39 @@
1
1
  import './index.css';
2
- import { defineComponent as X, $prefix as pe, $props as J, setup as ue } from "@opentiny/vue-common";
3
- import Oe from "@opentiny/vue-tag";
4
- import _e from "@opentiny/vue-input";
5
- import Fe from "@opentiny/vue-dropdown";
6
- import Ae from "@opentiny/vue-dropdown-menu";
7
- import ye from "@opentiny/vue-button";
8
- import Be from "@opentiny/vue-tooltip";
9
- import xe from "@opentiny/vue-date-picker";
10
- import ze from "@opentiny/vue-form";
11
- import we from "@opentiny/vue-form-item";
12
- import je from "@opentiny/vue-popover";
13
- import He from "@opentiny/vue-select";
14
- import Ge from "@opentiny/vue-option";
15
- import { iconSearch as Ke, iconClose as Ue, iconHelpQuery as qe } from "@opentiny/vue-icon";
16
- import Ie from "@opentiny/vue-dropdown-item";
17
- import Ze from "@opentiny/vue-checkbox";
18
- import Ye from "@opentiny/vue-checkbox-group";
19
- import We from "@opentiny/vue-loading";
20
- const Qe = (a, e, t, s = "0") => {
21
- if (typeof a == "string" && typeof s == "string" && ke(e)) {
22
- let n = a.length - e;
23
- if (n > 0)
24
- return t ? a.substr(0, e) : a.substr(n, e);
2
+ import { defineComponent as be, $prefix as Me, $props as ve, setup as Ee } from "@opentiny/vue-common";
3
+ import Xe from "@opentiny/vue-tag";
4
+ import Pe from "@opentiny/vue-input";
5
+ import et from "@opentiny/vue-dropdown";
6
+ import tt from "@opentiny/vue-dropdown-menu";
7
+ import Oe from "@opentiny/vue-button";
8
+ import ot from "@opentiny/vue-tooltip";
9
+ import Fe from "@opentiny/vue-date-picker";
10
+ import nt from "@opentiny/vue-form";
11
+ import xe from "@opentiny/vue-form-item";
12
+ import lt from "@opentiny/vue-popover";
13
+ import at from "@opentiny/vue-select";
14
+ import rt from "@opentiny/vue-option";
15
+ import { iconSearch as st, iconClose as it, iconHelpQuery as pt } from "@opentiny/vue-icon";
16
+ import Be from "@opentiny/vue-dropdown-item";
17
+ import { resolveComponent as N, openBlock as y, createElementBlock as S, withDirectives as j, createVNode as D, withCtx as C, createElementVNode as M, toDisplayString as k, vShow as G, Fragment as B, renderList as z, createBlock as F, createCommentVNode as H, createTextVNode as K, resolveDirective as ut, normalizeClass as he, withModifiers as Z, normalizeStyle as ct, renderSlot as me, mergeProps as fe, withKeys as Ne } from "vue";
18
+ import dt from "@opentiny/vue-checkbox";
19
+ import mt from "@opentiny/vue-checkbox-group";
20
+ import ft from "@opentiny/vue-loading";
21
+ const ht = (e, t, o, l = "0") => {
22
+ if (typeof e == "string" && typeof l == "string" && Ae(t)) {
23
+ let c = e.length - t;
24
+ if (c > 0)
25
+ return o ? e.substr(0, t) : e.substr(c, t);
25
26
  {
26
- const r = [];
27
- for (n = Math.abs(n) / s.length; n > 0; n--)
28
- r.push(s);
29
- const c = r.join("");
30
- return t ? a + c : c + a;
27
+ const i = [];
28
+ for (c = Math.abs(c) / l.length; c > 0; c--)
29
+ i.push(l);
30
+ const b = i.join("");
31
+ return o ? e + b : b + e;
31
32
  }
32
33
  }
33
- }, Xe = Object.prototype.toString, Je = Object.prototype.hasOwnProperty, et = Je.toString;
34
- et.call(Object);
35
- const tt = {
34
+ }, bt = Object.prototype.toString, vt = Object.prototype.hasOwnProperty, gt = vt.toString;
35
+ gt.call(Object);
36
+ const yt = {
36
37
  "[object Error]": "error",
37
38
  "[object Object]": "object",
38
39
  "[object RegExp]": "regExp",
@@ -43,13 +44,13 @@ const tt = {
43
44
  "[object String]": "string",
44
45
  "[object Number]": "number",
45
46
  "[object Boolean]": "boolean"
46
- }, at = (a) => a == null, nt = (a) => at(a) ? String(a) : tt[Xe.call(a)] || "object", ke = (a) => typeof a == "number" && isFinite(a), rt = (a) => nt(a) === "date", Ve = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], st = new RegExp(
47
+ }, Vt = (e) => e == null, kt = (e) => Vt(e) ? String(e) : yt[bt.call(e)] || "object", Ae = (e) => typeof e == "number" && isFinite(e), It = (e) => kt(e) === "date", ze = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], wt = new RegExp(
47
48
  "^(\\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}))?)?)?$"
48
- ), ot = new RegExp(
49
+ ), Tt = new RegExp(
49
50
  "^(((0)?[1-9])|(1[0-2]))(/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1]))?(/|-)?(\\d{4})( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$"
50
- ), lt = new RegExp(
51
+ ), St = new RegExp(
51
52
  "^(\\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]))$"
52
- ), it = {
53
+ ), Dt = {
53
54
  "y{1,4}": /y{1,4}/,
54
55
  "M{1,2}": /M{1,2}/,
55
56
  "d{1,2}": /d{1,2}/,
@@ -59,7 +60,7 @@ const tt = {
59
60
  "s{1,2}": /s{1,2}/,
60
61
  "S{1,3}": /S{1,3}/,
61
62
  "Z{1,1}": /Z{1,1}/
62
- }, z = {
63
+ }, oe = {
63
64
  YEAR: 9999,
64
65
  MONTH: 11,
65
66
  DATE: 31,
@@ -67,858 +68,858 @@ const tt = {
67
68
  MINUTE: 59,
68
69
  SECOND: 59,
69
70
  MILLISECOND: 999
70
- }, ct = "-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00", pt = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", ut = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", dt = [].concat(ct.split(","), pt.split(","), ut.split(",")), mt = (a) => {
71
- const e = 0 - a.getTimezoneOffset() / 60;
72
- let t;
73
- return e === 0 ? t = "Z" : e > 0 ? t = "+" + (e > 10 ? e : "0" + e) + "00" : t = (e < -10 ? e : "-0" + -e) + "00", t;
74
- }, Te = (a) => a % 400 === 0 || a % 4 === 0 && a % 100 !== 0, Ce = (a) => a > z.MILLISECOND ? Number(String(a).substring(0, 3)) : a, de = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: c }) => {
75
- let i = Ve[e];
76
- if (Te(a) && e === 1 && (i += 1), t <= i)
77
- return new Date(a, e, t, s, n, r, Ce(c));
78
- }, ft = (a) => {
79
- if (a.length === 23) {
80
- const e = Number(a[1]), t = a[3] - 1, s = Number(a[9] || 1), n = a[15] || 0, r = a[17] || 0, c = a[20] || 0, i = a[22] || 0;
81
- return de({
82
- date: s,
83
- year: e,
84
- hours: n,
85
- month: t,
86
- seconds: c,
87
- minutes: r,
88
- milliseconds: i
71
+ }, Ct = "-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00", Mt = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", Et = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", $t = [].concat(Ct.split(","), Mt.split(","), Et.split(",")), Lt = (e) => {
72
+ const t = 0 - e.getTimezoneOffset() / 60;
73
+ let o;
74
+ return t === 0 ? o = "Z" : t > 0 ? o = "+" + (t > 10 ? t : "0" + t) + "00" : o = (t < -10 ? t : "-0" + -t) + "00", o;
75
+ }, Ue = (e) => e % 400 === 0 || e % 4 === 0 && e % 100 !== 0, je = (e) => e > oe.MILLISECOND ? Number(String(e).substring(0, 3)) : e, $e = ({ year: e, month: t, date: o, hours: l, minutes: c, seconds: i, milliseconds: b }) => {
76
+ let v = ze[t];
77
+ if (Ue(e) && t === 1 && (v += 1), o <= v)
78
+ return new Date(e, t, o, l, c, i, je(b));
79
+ }, _t = (e) => {
80
+ if (e.length === 23) {
81
+ const t = Number(e[1]), o = e[3] - 1, l = Number(e[9] || 1), c = e[15] || 0, i = e[17] || 0, b = e[20] || 0, v = e[22] || 0;
82
+ return $e({
83
+ date: l,
84
+ year: t,
85
+ hours: c,
86
+ month: o,
87
+ seconds: b,
88
+ minutes: i,
89
+ milliseconds: v
89
90
  });
90
91
  }
91
- }, ht = (a) => {
92
- if (a.length === 22) {
93
- const e = Number(a[12]), t = a[1] - 1, s = Number(a[6] || 1), n = a[14] || 0, r = a[16] || 0, c = a[19] || 0, i = a[21] || 0;
94
- return de({
95
- year: e,
96
- month: t,
97
- date: s,
98
- hours: n,
99
- minutes: r,
100
- seconds: c,
101
- milliseconds: i
92
+ }, Rt = (e) => {
93
+ if (e.length === 22) {
94
+ const t = Number(e[12]), o = e[1] - 1, l = Number(e[6] || 1), c = e[14] || 0, i = e[16] || 0, b = e[19] || 0, v = e[21] || 0;
95
+ return $e({
96
+ year: t,
97
+ month: o,
98
+ date: l,
99
+ hours: c,
100
+ minutes: i,
101
+ seconds: b,
102
+ milliseconds: v
102
103
  });
103
104
  }
104
- }, vt = (a) => {
105
- if (a.length !== 25)
105
+ }, Nt = (e) => {
106
+ if (e.length !== 25)
106
107
  return;
107
- const e = Number(a[1]), t = a[2] - 1, s = Number(a[6]), n = new Date(e, t, s).getTimezoneOffset(), r = a[12] || 0, c = a[14] || 0, i = a[17] || 0, l = a[19] || 0;
108
- let u = a[20];
109
- const m = a[21], o = a[22] || 0, f = a[24] || 0;
110
- let d = Ve[t], p, b;
111
- if (Te(e) && t === 1 && (d += 1), s <= d) {
112
- if (u === "Z")
113
- p = r - n / 60, b = c;
108
+ const t = Number(e[1]), o = e[2] - 1, l = Number(e[6]), c = new Date(t, o, l).getTimezoneOffset(), i = e[12] || 0, b = e[14] || 0, v = e[17] || 0, d = e[19] || 0;
109
+ let p = e[20];
110
+ const r = e[21], n = e[22] || 0, f = e[24] || 0;
111
+ let s = ze[o], u, a;
112
+ if (Ue(t) && o === 1 && (s += 1), l <= s) {
113
+ if (p === "Z")
114
+ u = i - c / 60, a = b;
114
115
  else {
115
- if (u.includes(":") || (u = u.substr(0, 3) + ":" + u.substr(3)), !dt.includes(u))
116
+ if (p.includes(":") || (p = p.substr(0, 3) + ":" + p.substr(3)), !$t.includes(p))
116
117
  return;
117
- p = m === "+" ? r - o - n / 60 : Number(r) + Number(o) - n / 60, b = m === "+" ? c - f : Number(c) + Number(f);
118
+ u = r === "+" ? i - n - c / 60 : Number(i) + Number(n) - c / 60, a = r === "+" ? b - f : Number(b) + Number(f);
118
119
  }
119
- return new Date(e, t, s, p, b, i, Ce(l));
120
+ return new Date(t, o, l, u, a, v, je(d));
120
121
  }
121
- }, se = [
122
- [st, ft],
123
- [ot, ht],
124
- [lt, vt]
125
- ], bt = (a) => {
126
- for (let e = 0, t = se.length; e < t; e++) {
127
- const s = se[e][0].exec(a);
128
- if (s && s.length > 0)
129
- return se[e][1](s);
122
+ }, we = [
123
+ [wt, _t],
124
+ [Tt, Rt],
125
+ [St, Nt]
126
+ ], Pt = (e) => {
127
+ for (let t = 0, o = we.length; t < o; t++) {
128
+ const l = we[t][0].exec(e);
129
+ if (l && l.length > 0)
130
+ return we[t][1](l);
130
131
  }
131
- }, gt = (a, e, t) => {
132
- if (t)
133
- switch (t) {
132
+ }, Ot = (e, t, o) => {
133
+ if (o)
134
+ switch (o) {
134
135
  case "yyyy":
135
136
  case "yy":
136
- a[0] = e;
137
+ e[0] = t;
137
138
  break;
138
139
  case "M":
139
140
  case "MM":
140
- a[1] = e - 1;
141
+ e[1] = t - 1;
141
142
  break;
142
143
  case "d":
143
144
  case "dd":
144
- a[2] = e;
145
+ e[2] = t;
145
146
  break;
146
147
  case "h":
147
148
  case "hh":
148
- a[3] = e;
149
+ e[3] = t;
149
150
  break;
150
151
  case "m":
151
152
  case "mm":
152
- a[4] = e;
153
+ e[4] = t;
153
154
  break;
154
155
  case "s":
155
156
  case "ss":
156
- a[5] = e;
157
+ e[5] = t;
157
158
  break;
158
159
  case "S":
159
160
  case "SS":
160
161
  case "SSS":
161
- a[6] = e;
162
+ e[6] = t;
162
163
  break;
163
164
  }
164
- }, _t = (a, e) => {
165
- const t = [0, -1, 0, 0, 0, 0];
166
- if (a.length !== e.length)
167
- return t;
168
- let s = 0, n = 0;
169
- for (let r = 0, c = a.length; r < c; r++) {
170
- const i = a.substr(r, 1), l = isNaN(Number(i)) || (i == null ? void 0 : i.trim()) === "";
171
- if (l && i === e.substr(r, 1) || r === c - 1) {
172
- let u, m;
173
- if (l) {
174
- u = a.substring(s, r), s = r + 1;
175
- const o = e.indexOf(i, n);
176
- m = e.substring(n, o === -1 ? e.length : o), n = o + 1;
165
+ }, Ft = (e, t) => {
166
+ const o = [0, -1, 0, 0, 0, 0];
167
+ if (e.length !== t.length)
168
+ return o;
169
+ let l = 0, c = 0;
170
+ for (let i = 0, b = e.length; i < b; i++) {
171
+ const v = e.substr(i, 1), d = isNaN(Number(v)) || (v == null ? void 0 : v.trim()) === "";
172
+ if (d && v === t.substr(i, 1) || i === b - 1) {
173
+ let p, r;
174
+ if (d) {
175
+ p = e.substring(l, i), l = i + 1;
176
+ const n = t.indexOf(v, c);
177
+ r = t.substring(c, n === -1 ? t.length : n), c = n + 1;
177
178
  } else
178
- u = a.substring(s, c), m = e.substring(n, c);
179
- (u.length === m.length || u) && gt(t, u, m);
179
+ p = e.substring(l, b), r = t.substring(c, b);
180
+ (p.length === r.length || p) && Ot(o, p, r);
180
181
  }
181
182
  }
182
- return t;
183
- }, U = (a, e, t) => isNaN(a) || a < e || a > t, yt = ({ year: a, month: e, date: t, hours: s, minutes: n, seconds: r, milliseconds: c }) => U(a, 0, z.YEAR) || U(e, 0, z.MONTH) || U(t, 0, z.DATE) || U(s, 0, z.HOUR) || U(n, 0, z.MINUTE) || U(r, 0, z.SECOND) || U(c, 0, z.MILLISECOND), xt = (a, e) => {
184
- if (typeof e == "string") {
185
- const t = _t(a, e), s = Number(t[0]), n = Number(t[1]), r = Number(t[2] || 1), c = Number(t[3] || 0), i = Number(t[4] || 0), l = Number(t[5] || 0), u = Number(t[6] || 0);
186
- return yt({
187
- year: s,
188
- month: n,
189
- date: r,
190
- hours: c,
191
- minutes: i,
192
- seconds: l,
193
- milliseconds: u
194
- }) ? void 0 : de({
195
- year: s,
196
- date: r,
197
- month: n,
198
- minutes: i,
199
- hours: c,
200
- milliseconds: u,
201
- seconds: l
183
+ return o;
184
+ }, se = (e, t, o) => isNaN(e) || e < t || e > o, xt = ({ year: e, month: t, date: o, hours: l, minutes: c, seconds: i, milliseconds: b }) => se(e, 0, oe.YEAR) || se(t, 0, oe.MONTH) || se(o, 0, oe.DATE) || se(l, 0, oe.HOUR) || se(c, 0, oe.MINUTE) || se(i, 0, oe.SECOND) || se(b, 0, oe.MILLISECOND), Bt = (e, t) => {
185
+ if (typeof t == "string") {
186
+ const o = Ft(e, t), l = Number(o[0]), c = Number(o[1]), i = Number(o[2] || 1), b = Number(o[3] || 0), v = Number(o[4] || 0), d = Number(o[5] || 0), p = Number(o[6] || 0);
187
+ return xt({
188
+ year: l,
189
+ month: c,
190
+ date: i,
191
+ hours: b,
192
+ minutes: v,
193
+ seconds: d,
194
+ milliseconds: p
195
+ }) ? void 0 : $e({
196
+ year: l,
197
+ date: i,
198
+ month: c,
199
+ minutes: v,
200
+ hours: b,
201
+ milliseconds: p,
202
+ seconds: d
202
203
  });
203
204
  } else
204
- return bt(a);
205
- }, Se = (a, e, t) => {
206
- let s;
207
- if (ke(a) ? s = new Date(a) : typeof a == "string" && (s = xt(a, e)), t) {
208
- const n = t && Se(t) || new Date(1, 1, 1, 0, 0, 0);
209
- return s && s < n ? n : s;
205
+ return Pt(e);
206
+ }, He = (e, t, o) => {
207
+ let l;
208
+ if (Ae(e) ? l = new Date(e) : typeof e == "string" && (l = Bt(e, t)), o) {
209
+ const c = o && He(o) || new Date(1, 1, 1, 0, 0, 0);
210
+ return l && l < c ? c : l;
210
211
  }
211
- return s;
212
- }, le = function(a, e = "yyyy/MM/dd hh:mm:ss") {
213
- if (rt(a)) {
214
- if (typeof e == "string") {
215
- const t = {
216
- "y{1,4}": a.getFullYear(),
217
- "M{1,2}": a.getMonth() + 1,
218
- "d{1,2}": a.getDate(),
219
- "h{1,2}": a.getHours(),
220
- "H{1,2}": a.getHours(),
221
- "m{1,2}": a.getMinutes(),
222
- "s{1,2}": a.getSeconds(),
223
- "S{1,3}": a.getMilliseconds(),
224
- "Z{1,1}": mt(a)
212
+ return l;
213
+ }, Se = function(e, t = "yyyy/MM/dd hh:mm:ss") {
214
+ if (It(e)) {
215
+ if (typeof t == "string") {
216
+ const o = {
217
+ "y{1,4}": e.getFullYear(),
218
+ "M{1,2}": e.getMonth() + 1,
219
+ "d{1,2}": e.getDate(),
220
+ "h{1,2}": e.getHours(),
221
+ "H{1,2}": e.getHours(),
222
+ "m{1,2}": e.getMinutes(),
223
+ "s{1,2}": e.getSeconds(),
224
+ "S{1,3}": e.getMilliseconds(),
225
+ "Z{1,1}": Lt(e)
225
226
  };
226
- return Object.keys(t).forEach((s) => {
227
- const n = e.match(it[s]);
228
- s && n && n.length && (e = e.replace(n[0], s === "Z{1,1}" ? t[s] : Qe(t[s].toString(), n[0].length)));
229
- }), e;
230
- }
231
- } else if (typeof a == "string" && arguments.length >= 2) {
232
- let t = e;
233
- arguments.length === 2 ? e = void 0 : t = arguments[2];
234
- const s = Se(a, e);
235
- return s ? le(s, t) : "";
227
+ return Object.keys(o).forEach((l) => {
228
+ const c = t.match(Dt[l]);
229
+ l && c && c.length && (t = t.replace(c[0], l === "Z{1,1}" ? o[l] : ht(o[l].toString(), c[0].length)));
230
+ }), t;
231
+ }
232
+ } else if (typeof e == "string" && arguments.length >= 2) {
233
+ let o = t;
234
+ arguments.length === 2 ? t = void 0 : o = arguments[2];
235
+ const l = He(e, t);
236
+ return l ? Se(l, o) : "";
236
237
  }
237
- }, k = (a, e = !0) => {
238
- e ? a.visibleTimer = setTimeout(() => {
239
- a.visible = !0;
240
- }, 0) : (clearTimeout(a.visibleTimer), a.visibleTimer = null, a.visible = !1);
241
- }, Q = (a, e = !0) => {
242
- if (!a.instance)
238
+ }, _ = (e, t = !0) => {
239
+ t ? e.visibleTimer = setTimeout(() => {
240
+ e.visible = !0;
241
+ }, 0) : (clearTimeout(e.visibleTimer), e.visibleTimer = null, e.visible = !1);
242
+ }, de = (e, t = !0) => {
243
+ if (!e.instance)
243
244
  return;
244
- a.popoverVisible = e;
245
- const { dropdownRef: t } = a.instance;
246
- e && t.state.visible && (clearTimeout(Number(t.state.timeout)), t.state.timeout = null, t.state.visible = !1);
247
- }, wt = (a, e = 200) => {
248
- let t = null;
249
- const s = function(...n) {
250
- t && clearTimeout(t), t = setTimeout(() => {
251
- a.apply(this, n), t = null;
252
- }, e);
245
+ e.popoverVisible = t;
246
+ const { dropdownRef: o } = e.instance;
247
+ t && o.state.visible && (clearTimeout(Number(o.state.timeout)), o.state.timeout = null, o.state.visible = !1);
248
+ }, At = (e, t = 200) => {
249
+ let o = null;
250
+ const l = function(...c) {
251
+ o && clearTimeout(o), o = setTimeout(() => {
252
+ e.apply(this, c), o = null;
253
+ }, t);
253
254
  };
254
- return s.cancel = () => {
255
- t && (clearTimeout(t), t = null);
256
- }, s;
257
- }, B = (a) => parseFloat(a).toString() !== "NaN", j = (a) => {
258
- const e = Array.isArray(a) ? [] : {};
259
- if (a && typeof a == "object") {
260
- const t = Object.keys(a);
261
- if (t.length)
262
- t.forEach((s) => {
263
- a[s] && typeof a[s] == "object" ? e[s] = j(a[s]) : e[s] = a[s];
255
+ return l.cancel = () => {
256
+ o && (clearTimeout(o), o = null);
257
+ }, l;
258
+ }, te = (e) => parseFloat(e).toString() !== "NaN", ne = (e) => {
259
+ const t = Array.isArray(e) ? [] : {};
260
+ if (e && typeof e == "object") {
261
+ const o = Object.keys(e);
262
+ if (o.length)
263
+ o.forEach((l) => {
264
+ e[l] && typeof e[l] == "object" ? t[l] = ne(e[l]) : t[l] = e[l];
264
265
  });
265
266
  else
266
- return a;
267
+ return e;
267
268
  }
268
- return e;
269
- }, ee = (a, e = ["mergeTag", "options", "idMapKey"]) => {
270
- const t = { ...a };
271
- return e.forEach((s) => {
272
- delete t[s];
273
- }), t;
274
- }, O = (a, e, t = "") => {
275
- const { valueMap: s, prevItem: n } = a, r = (n.label || t) + e;
276
- return s.has(r);
277
- }, te = (a) => {
278
- a.propItem = {}, a.inputValue = "";
279
- }, R = ({ emit: a, state: e, nextTick: t, ...s }) => {
280
- Q(e, !1);
281
- const { tagList: n = null, index: r = -1, newTag: c = null, newValue: i = null, oldValue: l = null, isEdit: u } = s;
282
- if (u || te(e), !n && r === -1 && !i)
269
+ return t;
270
+ }, ge = (e, t = ["mergeTag", "options", "idMapKey"]) => {
271
+ const o = { ...e };
272
+ return t.forEach((l) => {
273
+ delete o[l];
274
+ }), o;
275
+ }, J = (e, t, o = "") => {
276
+ const { valueMap: l, prevItem: c } = e, i = (c.label || o) + t;
277
+ return l.has(i);
278
+ }, ye = (e) => {
279
+ e.propItem = {}, e.inputValue = "";
280
+ }, Q = ({ emit: e, state: t, nextTick: o, ...l }) => {
281
+ de(t, !1);
282
+ const { tagList: c = null, index: i = -1, newTag: b = null, newValue: v = null, oldValue: d = null, isEdit: p } = l;
283
+ if (p || ye(t), !c && i === -1 && !v)
283
284
  return;
284
- const m = l || j(e.innerModelValue);
285
- let o = [];
286
- i ? o = [...i] : r !== -1 ? (o = [...e.innerModelValue], c ? o.splice(r, 1, c) : o.splice(r, 1)) : o = [...e.innerModelValue, ...n], e.innerModelValue = o, a("update:modelValue", j(o)), a("change", j(o), m);
287
- }, H = (a) => a, G = (a, e, t) => {
288
- const s = e.idMapKey || a.idMapKey;
289
- return t && t[s] !== void 0 ? { [s]: t[s] } : null;
285
+ const r = d || ne(t.innerModelValue);
286
+ let n = [];
287
+ v ? n = [...v] : i !== -1 ? (n = [...t.innerModelValue], b ? n.splice(i, 1, b) : n.splice(i, 1)) : n = [...t.innerModelValue, ...c], t.innerModelValue = n, e("update:modelValue", ne(n)), e("change", ne(n), r);
288
+ }, le = (e) => e, ae = (e, t, o) => {
289
+ const l = t.idMapKey || e.idMapKey;
290
+ return o && o[l] !== void 0 ? { [l]: o[l] } : null;
290
291
  };
291
- function It({ props: a, state: e, emit: t, nextTick: s }) {
292
- let n = j(e.inputValue);
293
- const r = (u) => {
294
- if (u) {
295
- const m = e.recordItems.find((o) => o.label === u.label);
296
- if (m && m.options) {
297
- const o = m.options.find((f) => f.label === u.value);
298
- o && (o.isChecked = !1);
292
+ function zt({ props: e, state: t, emit: o, nextTick: l }) {
293
+ let c = ne(t.inputValue);
294
+ const i = (p) => {
295
+ if (p) {
296
+ const r = t.recordItems.find((n) => n.label === p.label);
297
+ if (r && r.options) {
298
+ const n = r.options.find((f) => f.label === p.value);
299
+ n && (n.isChecked = !1);
299
300
  }
300
301
  }
301
302
  };
302
303
  return {
303
- deleteTag: (u) => {
304
- k(e, !1), r(u);
305
- const m = a.modelValue.filter((o) => o !== u);
306
- R({ emit: t, state: e, nextTick: s, newValue: m });
304
+ deleteTag: (p) => {
305
+ _(t, !1), i(p);
306
+ const r = e.modelValue.filter((n) => n !== p);
307
+ Q({ emit: o, state: t, nextTick: l, newValue: r });
307
308
  },
308
309
  clearTag: () => {
309
- k(e, !1), a.modelValue.forEach((u) => r(u)), e.propItem = {}, e.inputValue = "", R({ emit: t, state: e, nextTick: s, newValue: [] }), t("clear");
310
+ _(t, !1), e.modelValue.forEach((p) => i(p)), t.propItem = {}, t.inputValue = "", Q({ emit: o, state: t, nextTick: l, newValue: [] }), o("clear");
310
311
  },
311
312
  backspaceDeleteTag: () => {
312
- var u, m, o;
313
- if (!e.inputValue) {
314
- if (e.propItem.label) {
315
- e.propItem = {};
313
+ var p, r, n;
314
+ if (!t.inputValue) {
315
+ if (t.propItem.label) {
316
+ t.propItem = {};
316
317
  return;
317
318
  }
318
- if (n === "" && e.inputValue === "") {
319
- k(e, !1);
320
- const f = a.modelValue.length - 1;
321
- r(a.modelValue[f]);
322
- const d = e.innerModelValue.slice(0, a.modelValue.length - 1);
323
- R({ emit: t, state: e, nextTick: s, newValue: d });
319
+ if (c === "" && t.inputValue === "") {
320
+ _(t, !1);
321
+ const f = e.modelValue.length - 1;
322
+ i(e.modelValue[f]);
323
+ const s = t.innerModelValue.slice(0, e.modelValue.length - 1);
324
+ Q({ emit: o, state: t, nextTick: l, newValue: s });
324
325
  }
325
- n = e.inputValue, (o = (m = (u = e == null ? void 0 : e.instance) == null ? void 0 : u.refs) == null ? void 0 : m.inputRef) != null && o.$el && e.instance.refs.inputRef.$el.click();
326
+ c = t.inputValue, (n = (r = (p = t == null ? void 0 : t.instance) == null ? void 0 : p.refs) == null ? void 0 : r.inputRef) != null && n.$el && t.instance.refs.inputRef.$el.click();
326
327
  }
327
328
  }
328
329
  };
329
330
  }
330
- const kt = async (a, e, t) => {
331
- const { prevItem: s, inputEditValue: n } = e, { operators: r } = s, c = ee(s);
332
- let i = null, l = !0;
333
- if (await a.$refs.formRef.validateField(["inputEditValue"], (u) => {
334
- u && (l = !1);
335
- }), l) {
336
- let u = null;
337
- const m = e.operatorValue && r ? { operator: e.operatorValue } : null;
338
- let o = n;
331
+ const Ut = async (e, t, o) => {
332
+ const { prevItem: l, inputEditValue: c } = t, { operators: i } = l, b = ge(l);
333
+ let v = null, d = !0;
334
+ if (await e.$refs.formRef.validateField(["inputEditValue"], (p) => {
335
+ p && (d = !1);
336
+ }), d) {
337
+ let p = null;
338
+ const r = t.operatorValue && i ? { operator: t.operatorValue } : null;
339
+ let n = c;
339
340
  const f = {};
340
- if (Array.isArray(n))
341
- f.options = [], o = "", n.forEach((d) => {
342
- const p = e.currentEditValue.find((h) => h.label === d), b = (p == null ? void 0 : p.label) || d;
343
- if (o = o ? `${o} | ${b}` : b, p) {
344
- const h = G(t, s, p);
345
- f.options.push({ label: b, ...h });
341
+ if (Array.isArray(c))
342
+ f.options = [], n = "", c.forEach((s) => {
343
+ const u = t.currentEditValue.find((m) => m.label === s), a = (u == null ? void 0 : u.label) || s;
344
+ if (n = n ? `${n} | ${a}` : a, u) {
345
+ const m = ae(o, l, u);
346
+ f.options.push({ label: a, ...m });
346
347
  } else
347
- f.options.push({ label: b });
348
+ f.options.push({ label: a });
348
349
  });
349
- else if (Array.isArray(e.currentEditValue)) {
350
- const d = e.currentEditValue.find((p) => p.label === o);
351
- u = G(t, s, d);
350
+ else if (Array.isArray(t.currentEditValue)) {
351
+ const s = t.currentEditValue.find((u) => u.label === n);
352
+ p = ae(o, l, s);
352
353
  }
353
- i = H({ ...c, label: e.selectValue, ...m, value: o, ...u, ...f });
354
+ v = le({ ...b, label: t.selectValue, ...r, value: n, ...p, ...f });
354
355
  }
355
- return i;
356
- }, De = async (a, e, t) => {
357
- const { prevItem: s } = e, n = `min${s.field}`, r = `max${s.field}`, c = e[n], i = e[r], l = [n, r];
358
- let u = !0, m = null;
359
- if (await a.$refs.formRef.validateField(l, (o) => {
360
- o && (u = !1);
361
- }), u) {
362
- const { field: o, label: f, unit: d, type: p, operators: b } = s, h = d ? `${f}(${d})` : f;
363
- let v = "";
364
- c && i ? v = `${c}-${i}` : v = c ? `≥${c}` : `≤${i}`;
365
- const x = G(t, s, s), T = e.operatorValue && b ? { operator: e.operatorValue } : null;
366
- m = H({ type: p, field: o, label: h, value: v, ...x, start: c, end: i, ...T });
356
+ return v;
357
+ }, Ke = async (e, t, o) => {
358
+ const { prevItem: l } = t, c = `min${l.field}`, i = `max${l.field}`, b = t[c], v = t[i], d = [c, i];
359
+ let p = !0, r = null;
360
+ if (await e.$refs.formRef.validateField(d, (n) => {
361
+ n && (p = !1);
362
+ }), p) {
363
+ const { field: n, label: f, unit: s, type: u, operators: a } = l, m = s ? `${f}(${s})` : f;
364
+ let g = "";
365
+ b && v ? g = `${b}-${v}` : g = b ? `≥${b}` : `≤${v}`;
366
+ const I = ae(o, l, l), L = t.operatorValue && a ? { operator: t.operatorValue } : null;
367
+ r = le({ type: u, field: n, label: m, value: g, ...I, start: b, end: v, ...L });
367
368
  }
368
- return m;
369
- }, ie = async (a, e, t, s) => {
370
- const { prevItem: n, startDate: r, endDate: c, startDateTime: i, endDateTime: l } = e;
371
- let u = null, m = null, o = !0, f = null, d = null;
372
- if (s ? (u = i, m = l, d = ["startDateTime", "endDateTime"]) : (u = r, m = c, d = ["startDate", "endDate"]), await a.$refs.formRef.validateField(d, (p) => {
373
- p && (o = !1);
374
- }), o) {
375
- const { operators: p } = n, b = ee(n);
376
- let h = "";
377
- if (u && m) {
378
- if (u > m)
369
+ return r;
370
+ }, De = async (e, t, o, l) => {
371
+ const { prevItem: c, startDate: i, endDate: b, startDateTime: v, endDateTime: d } = t;
372
+ let p = null, r = null, n = !0, f = null, s = null;
373
+ if (l ? (p = v, r = d, s = ["startDateTime", "endDateTime"]) : (p = i, r = b, s = ["startDate", "endDate"]), await e.$refs.formRef.validateField(s, (u) => {
374
+ u && (n = !1);
375
+ }), n) {
376
+ const { operators: u } = c, a = ge(c);
377
+ let m = "";
378
+ if (p && r) {
379
+ if (p > r)
379
380
  return;
380
- u === m ? h = u : h = `${u}-${m}`;
381
+ p === r ? m = p : m = `${p}-${r}`;
381
382
  } else
382
- h = u ? `≥${u}` : `≤${m}`;
383
- const v = G(t, n, n), x = e.operatorValue && p ? { operator: e.operatorValue } : null;
384
- f = H({ ...b, value: h, start: u, end: m, ...v, ...x });
383
+ m = p ? `≥${p}` : `≤${r}`;
384
+ const g = ae(o, c, c), I = t.operatorValue && u ? { operator: t.operatorValue } : null;
385
+ f = le({ ...a, value: m, start: p, end: r, ...g, ...I });
385
386
  }
386
387
  return f;
387
- }, Me = (a, e, t) => {
388
- const { prevItem: s } = a, { field: n, start: r, end: c, min: i = s.min, max: l = s.max } = e, u = `min${n}`, m = `max${n}`;
389
- (a.curMinNumVar !== u || a.curMaxNumVar !== m) && (delete a[a.curMinNumVar], delete a[a.curMaxNumVar], delete a.formRules[a.curMinNumVar], delete a.formRules[a.curMaxNumVar], a.curMinNumVar = u, a.curMaxNumVar = m), a[a.curMinNumVar] = r, a[a.curMaxNumVar] = c;
390
- const { curMinNumVar: o, curMaxNumVar: f } = a, d = B(i), p = B(l);
391
- d || p ? (a.formRules[o] = {
392
- validator: (b, h, v) => {
393
- const x = B(h);
394
- !x && B(a[f]) || x && (d && !p && h >= i || !d && p && h <= l || h >= i && h <= l) ? v() : (a.numberShowMessage = !!(h || a[f]), v(new Error(t("tvp.tvpSearchbox.rangeMinErr", [i, l]))));
395
- }
396
- }, a.formRules[f] = {
397
- validator: (b, h, v) => {
398
- const x = B(a[o]), T = x && i < a[o] ? Number(a[o]) : i, g = B(T), _ = B(h);
399
- !_ && x || _ && (g && !p && h >= T || !g && p && h <= l || h >= T && h <= l) ? v() : v(!_ && !x ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
400
- }
401
- }) : a.formRules[f] = {
402
- validator: (b, h, v) => {
403
- const x = a[o], T = B(h), g = B(x);
404
- T && !g || !T && g || T && g && h >= Number(x) ? v() : v(!T && !g ? new Error(t("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(t("tvp.tvpSearchbox.rangeMaxErr")));
388
+ }, Ge = (e, t, o) => {
389
+ const { prevItem: l } = e, { field: c, start: i, end: b, min: v = l.min, max: d = l.max } = t, p = `min${c}`, r = `max${c}`;
390
+ (e.curMinNumVar !== p || e.curMaxNumVar !== r) && (delete e[e.curMinNumVar], delete e[e.curMaxNumVar], delete e.formRules[e.curMinNumVar], delete e.formRules[e.curMaxNumVar], e.curMinNumVar = p, e.curMaxNumVar = r), e[e.curMinNumVar] = i, e[e.curMaxNumVar] = b;
391
+ const { curMinNumVar: n, curMaxNumVar: f } = e, s = te(v), u = te(d);
392
+ s || u ? (e.formRules[n] = {
393
+ validator: (a, m, g) => {
394
+ const I = te(m);
395
+ !I && te(e[f]) || I && (s && !u && m >= v || !s && u && m <= d || m >= v && m <= d) ? g() : (e.numberShowMessage = !!(m || e[f]), g(new Error(o("tvp.tvpSearchbox.rangeMinErr", [v, d]))));
396
+ }
397
+ }, e.formRules[f] = {
398
+ validator: (a, m, g) => {
399
+ const I = te(e[n]), L = I && v < e[n] ? Number(e[n]) : v, V = te(L), T = te(m);
400
+ !T && I || T && (V && !u && m >= L || !V && u && m <= d || m >= L && m <= d) ? g() : g(!T && !I ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
401
+ }
402
+ }) : e.formRules[f] = {
403
+ validator: (a, m, g) => {
404
+ const I = e[n], L = te(m), V = te(I);
405
+ L && !V || !L && V || L && V && m >= Number(I) ? g() : g(!L && !V ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
405
406
  }
406
407
  };
407
408
  };
408
- function Vt({ props: a, emit: e, state: t, t: s, format: n, nextTick: r, vm: c, cancelHandleInput: i }) {
409
- const l = c || t.instance, u = (g) => {
410
- var C, w, S;
411
- const { start: _, end: I, type: y } = g;
412
- if (t.backupList = g.options, y === "numRange")
413
- Me(t, g, s);
414
- else if (y === "dateRange") {
415
- const { dateRangeFormat: V } = t;
416
- if (!t.startDate && _) {
417
- const D = n(_, V);
418
- t.startDate = t.endDate < D ? null : D;
409
+ function jt({ props: e, emit: t, state: o, t: l, format: c, nextTick: i, vm: b, cancelHandleInput: v }) {
410
+ const d = b || o.instance, p = (V) => {
411
+ var $, w, P;
412
+ const { start: T, end: E, type: h } = V;
413
+ if (o.backupList = V.options, h === "numRange")
414
+ Ge(o, V, l);
415
+ else if (h === "dateRange") {
416
+ const { dateRangeFormat: R } = o;
417
+ if (!o.startDate && T) {
418
+ const O = c(T, R);
419
+ o.startDate = o.endDate < O ? null : O;
419
420
  }
420
- if (!t.endDate && I) {
421
- const D = n(I, V);
422
- t.endDate = D < t.startDate ? null : D;
421
+ if (!o.endDate && E) {
422
+ const O = c(E, R);
423
+ o.endDate = O < o.startDate ? null : O;
423
424
  }
424
- } else if (y === "datetimeRange") {
425
- const { datetimeRangeFormat: V } = t;
426
- if (!t.startDateTime && _) {
427
- const D = n(_, V);
428
- t.startDateTime = t.endDateTime < D ? null : D;
425
+ } else if (h === "datetimeRange") {
426
+ const { datetimeRangeFormat: R } = o;
427
+ if (!o.startDateTime && T) {
428
+ const O = c(T, R);
429
+ o.startDateTime = o.endDateTime < O ? null : O;
429
430
  }
430
- if (!t.endDateTime && I) {
431
- const D = n(I, V);
432
- t.endDateTime = D < t.startDateTime ? null : D;
431
+ if (!o.endDateTime && E) {
432
+ const O = c(E, R);
433
+ o.endDateTime = O < o.startDateTime ? null : O;
433
434
  }
434
435
  } else
435
- t.backupList && y === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (C = t.backupList) == null || C.forEach((V) => {
436
- O(t, V.label) && t.checkboxGroup.push(`${g.label}${V.label}`), V.isFilter = !1;
436
+ o.backupList && h === "checkbox" && (o.filterList = o.backupList, o.checkboxGroup = [], ($ = o.backupList) == null || $.forEach((R) => {
437
+ J(o, R.label) && o.checkboxGroup.push(`${V.label}${R.label}`), R.isFilter = !1;
437
438
  }));
438
- y !== "checkbox" && ((w = t.backupList) != null && w.length) && ((S = t.backupList) == null || S.forEach((V) => {
439
- V.isFilter = !1, V.isChecked = O(t, V.label);
440
- })), t.currentOperators = null, !t.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(y) ? k(t, !1) : k(t);
441
- }, m = (g) => {
439
+ h !== "checkbox" && ((w = o.backupList) != null && w.length) && ((P = o.backupList) == null || P.forEach((R) => {
440
+ R.isFilter = !1, R.isChecked = J(o, R.label);
441
+ })), o.currentOperators = null, !o.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(h) ? _(o, !1) : _(o);
442
+ }, r = (V) => {
442
443
  var w;
443
- const { field: _, label: I } = g;
444
- t.propItem = { ...t.propItem, label: I }, e("first-level-select", _);
445
- const y = (w = l.$refs) == null ? void 0 : w.inputRef;
446
- t.prevItem = g, t.backupPrevItem = g;
447
- const { operators: C } = g;
448
- C != null && C.length ? (t.operatorValue = "", t.currentOperators = C, k(t)) : (t.operatorValue = ":", u(g)), t.inputValue = "", y.focus();
449
- }, o = (g) => {
450
- t.operatorValue = g, u(t.prevItem);
451
- }, f = (g, _, I, y) => {
452
- const { replace: C, operators: w, mergeTag: S } = g, V = ee(g), { indexMap: D } = t, M = D.get(I), E = G(a, g, _), A = t.operatorValue && w ? { operator: t.operatorValue } : null;
453
- let P = null;
454
- if (S) {
455
- const K = { label: y, ...E };
456
- if (M >= 0) {
457
- const ae = `${t.innerModelValue[M].value} | ${y}`, ne = [...t.innerModelValue[M].options, K];
458
- P = H({ ...t.innerModelValue[M], value: ae, options: ne });
444
+ const { field: T, label: E } = V;
445
+ o.propItem = { ...o.propItem, label: E }, t("first-level-select", T);
446
+ const h = (w = d.$refs) == null ? void 0 : w.inputRef;
447
+ o.prevItem = V, o.backupPrevItem = V;
448
+ const { operators: $ } = V;
449
+ $ != null && $.length ? (o.operatorValue = "", o.currentOperators = $, _(o)) : (o.operatorValue = ":", p(V)), o.inputValue = "", h.focus();
450
+ }, n = (V) => {
451
+ o.operatorValue = V, p(o.prevItem);
452
+ }, f = (V, T, E, h) => {
453
+ const { replace: $, operators: w, mergeTag: P } = V, R = ge(V), { indexMap: O } = o, x = O.get(E), A = ae(e, V, T), ee = o.operatorValue && w ? { operator: o.operatorValue } : null;
454
+ let W = null;
455
+ if (P) {
456
+ const re = { label: h, ...A };
457
+ if (x >= 0) {
458
+ const Ve = `${o.innerModelValue[x].value} | ${h}`, ke = [...o.innerModelValue[x].options, re];
459
+ W = le({ ...o.innerModelValue[x], value: Ve, options: ke });
459
460
  } else
460
- P = H({ ...V, label: I, value: y, options: [K] });
461
+ W = le({ ...R, label: E, value: h, options: [re] });
461
462
  } else
462
- P = H({ ...V, label: I, value: y, ...E, ...A });
463
- if (O(t, y, I)) {
464
- te(t);
463
+ W = le({ ...R, label: E, value: h, ...A, ...ee });
464
+ if (J(o, h, E)) {
465
+ ye(o);
465
466
  return;
466
467
  }
467
- k(t, !1);
468
- const L = j(t.innerModelValue);
469
- let F = [];
470
- if ((C || S) && M >= 0) {
471
- const K = [...t.innerModelValue];
472
- K.splice(M, 1), F = [...K, P];
468
+ _(o, !1);
469
+ const q = ne(o.innerModelValue);
470
+ let X = [];
471
+ if (($ || P) && x >= 0) {
472
+ const re = [...o.innerModelValue];
473
+ re.splice(x, 1), X = [...re, W];
473
474
  } else
474
- F = [...t.innerModelValue, P];
475
- R({ emit: e, state: t, newValue: F, oldValue: L });
476
- }, d = (g) => {
477
- var _;
478
- (_ = t.propItem) != null && _.label ? p({ label: g }) : x();
479
- }, p = (g, _ = !1) => {
475
+ X = [...o.innerModelValue, W];
476
+ Q({ emit: t, state: o, newValue: X, oldValue: q });
477
+ }, s = (V) => {
478
+ var T;
479
+ (T = o.propItem) != null && T.label ? u({ label: V }) : I();
480
+ }, u = (V, T = !1) => {
480
481
  var w;
481
- k(t, !1), _ && (t.prevItem = g, t.backupPrevItem = g);
482
- const { prevItem: I } = t, y = g.value || g.label, C = (w = l.$refs) == null ? void 0 : w.inputRef;
483
- if (!O(t, y)) {
484
- const S = t.propItem.label || g.label;
485
- f(I, g, S, y);
486
- }
487
- C.focus();
488
- }, b = (g, _) => {
489
- if (g.label) {
490
- if (!_.options)
482
+ _(o, !1), T && (o.prevItem = V, o.backupPrevItem = V);
483
+ const { prevItem: E } = o, h = V.value || V.label, $ = (w = d.$refs) == null ? void 0 : w.inputRef;
484
+ if (!J(o, h)) {
485
+ const P = o.propItem.label || V.label;
486
+ f(E, V, P, h);
487
+ }
488
+ $.focus();
489
+ }, a = (V, T) => {
490
+ if (V.label) {
491
+ if (!T.options)
491
492
  return;
492
- if (!a.modelValue.find((y) => y.value === _.options[0].label)) {
493
- const y = _.label, C = _.options && _.options[0].label;
494
- f(_, _.options[0], y, C);
493
+ if (!e.modelValue.find((h) => h.value === T.options[0].label)) {
494
+ const h = T.label, $ = T.options && T.options[0].label;
495
+ f(T, T.options[0], h, $);
495
496
  return;
496
497
  }
497
498
  } else
498
- e("search", t.innerModelValue);
499
- }, h = (g, _, I) => {
500
- var C;
501
- const y = (C = t.backupList) == null ? void 0 : C.find((w) => w.label === I);
502
- f(g, y, _.label, I);
503
- }, v = (g, _, I) => {
504
- var y, C;
505
- if (_.label) {
506
- const { regexp: w, replace: S, type: V, mergeTag: D } = I, M = V !== "checkbox" && S || V === "checkbox" && D ? [g] : g.split(a.splitInputValue);
499
+ t("search", o.innerModelValue);
500
+ }, m = (V, T, E) => {
501
+ var $;
502
+ const h = ($ = o.backupList) == null ? void 0 : $.find((w) => w.label === E);
503
+ f(V, h, T.label, E);
504
+ }, g = (V, T, E) => {
505
+ var h, $;
506
+ if (T.label) {
507
+ const { regexp: w, replace: P, type: R, mergeTag: O } = E, x = R !== "checkbox" && P || R === "checkbox" && O ? [V] : V.split(e.splitInputValue);
507
508
  if (w)
508
- for (const E of M)
509
- w.test(E) && h(I, _, E);
509
+ for (const A of x)
510
+ w.test(A) && m(E, T, A);
510
511
  else
511
- for (const E of M)
512
- h(I, _, E);
512
+ for (const A of x)
513
+ m(E, T, A);
513
514
  } else {
514
- const { items: w, defaultField: S } = a, V = w.find((L) => {
515
- const { regexp: F } = L;
516
- return F && F.test(t.inputValue);
517
- }) || (S ? w.find((L) => L.field === S) : t.allTypeAttri), { replace: D, type: M, mergeTag: E } = V, A = M !== "checkbox" && D || M === "checkbox" && E ? [g] : g.split(a.splitInputValue);
518
- (y = V == null ? void 0 : V.options) != null && y.length && (t.backupList = [...V.options], (C = t.backupList) == null || C.forEach((L) => {
519
- const F = L.value || L.label;
520
- A.includes(F) && (L.isChecked = !0);
515
+ const { items: w, defaultField: P } = e, R = w.find((q) => {
516
+ const { regexp: X } = q;
517
+ return X && X.test(o.inputValue);
518
+ }) || (P ? w.find((q) => q.field === P) : o.allTypeAttri), { replace: O, type: x, mergeTag: A } = R, ee = x !== "checkbox" && O || x === "checkbox" && A ? [V] : V.split(e.splitInputValue);
519
+ (h = R == null ? void 0 : R.options) != null && h.length && (o.backupList = [...R.options], ($ = o.backupList) == null || $.forEach((q) => {
520
+ const X = q.value || q.label;
521
+ ee.includes(X) && (q.isChecked = !0);
521
522
  }));
522
- const P = V.label;
523
- for (const L of A)
524
- f(V, {}, P, L);
525
- }
526
- }, x = () => {
527
- const { inputValue: g, propItem: _, prevItem: I } = t;
528
- if (i && i(), k(t, !1), !g)
529
- b(_, I);
523
+ const W = R.label;
524
+ for (const q of ee)
525
+ f(R, {}, W, q);
526
+ }
527
+ }, I = () => {
528
+ const { inputValue: V, propItem: T, prevItem: E } = o;
529
+ if (v && v(), _(o, !1), !V)
530
+ a(T, E);
530
531
  else {
531
- const { maxlength: y } = a;
532
- if (y && y < g.length) {
533
- e("exceed", y);
532
+ const { maxlength: h } = e;
533
+ if (h && h < V.length) {
534
+ t("exceed", h);
534
535
  return;
535
536
  }
536
- v(g, _, I);
537
+ g(V, T, E);
537
538
  }
538
539
  };
539
- return { selectPropItem: m, selectRadioItem: p, selectInputValue: d, createTag: x, helpClick: () => {
540
- e("help");
541
- }, setOperator: o };
540
+ return { selectPropItem: r, selectRadioItem: u, selectInputValue: s, createTag: I, helpClick: () => {
541
+ t("help");
542
+ }, setOperator: n };
542
543
  }
543
- const Tt = (a) => a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), oe = (a, e) => {
544
- const t = [];
545
- let s = 0, n;
546
- for (; (n = a.exec(e)) !== null; ) {
547
- const r = n.index, c = a.lastIndex;
548
- r > s && t.push(e.slice(s, r)), t.push(e.slice(r, c)), s = c;
544
+ const Ht = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Te = (e, t) => {
545
+ const o = [];
546
+ let l = 0, c;
547
+ for (; (c = e.exec(t)) !== null; ) {
548
+ const i = c.index, b = e.lastIndex;
549
+ i > l && o.push(t.slice(l, i)), o.push(t.slice(i, b)), l = b;
549
550
  }
550
- return s < e.length && t.push(e.slice(s)), t;
551
+ return l < t.length && o.push(t.slice(l)), o;
551
552
  };
552
- function Ct({ props: a, state: e, emit: t, nextTick: s }) {
553
- const n = async (m) => {
554
- e.potentialOptions = await a.potentialOptions.getMatchList(m), k(e, !0);
555
- }, c = wt((m) => {
556
- var _, I, y, C;
557
- const { recordItems: o, propItem: f } = e, d = typeof m == "string" ? m : m && m.target && typeof m.target.value == "string" ? m.target.value : e.inputValue || "", p = (_ = String(d)) == null ? void 0 : _.trim(), { maxlength: b } = a;
558
- if (b && b < p.length) {
559
- t("exceed", b);
553
+ function Kt({ props: e, state: t, emit: o, nextTick: l }) {
554
+ const c = async (r) => {
555
+ t.potentialOptions = await e.potentialOptions.getMatchList(r), _(t, !0);
556
+ }, b = At((r) => {
557
+ var T, E, h, $;
558
+ const { recordItems: n, propItem: f } = t, s = typeof r == "string" ? r : r && r.target && typeof r.target.value == "string" ? r.target.value : t.inputValue || "", u = (T = String(s)) == null ? void 0 : T.trim(), { maxlength: a } = e;
559
+ if (a && a < u.length) {
560
+ o("exceed", a);
560
561
  return;
561
562
  }
562
- if (p.length === 0) {
563
- k(e);
563
+ if (u.length === 0) {
564
+ _(t);
564
565
  return;
565
566
  }
566
- Object.keys(e.matchItems).forEach((w) => {
567
- e.matchItems[w].attr = [], e.matchItems[w].attrValue = [];
567
+ Object.keys(t.matchItems).forEach((w) => {
568
+ t.matchItems[w].attr = [], t.matchItems[w].attrValue = [];
568
569
  });
569
- const h = Tt(p), v = new RegExp(h, "i"), x = f.label || !h ? null : o.find((w) => w.type === "map" && v.test(w.label));
570
- if (x) {
571
- e.propItem = { ...e.propItem, label: x.label }, e.inputValue = "", e.prevItem = x, e.backupPrevItem = x, e.backupList = x.options || [];
570
+ const m = Ht(u), g = new RegExp(m, "i"), I = f.label || !m ? null : n.find((w) => w.type === "map" && g.test(w.label));
571
+ if (I) {
572
+ t.propItem = { ...t.propItem, label: I.label }, t.inputValue = "", t.prevItem = I, t.backupPrevItem = I, t.backupList = I.options || [];
572
573
  return;
573
574
  }
574
- e.filterList = (I = e.backupList) == null ? void 0 : I.filter((w) => v.test(w.label) ? (delete w.isFilter, O(e, w.label) && e.checkboxGroup.push(`${e.prevItem.label}${w.label}`), !0) : (w.isFilter = !0, !1));
575
- const T = new RegExp(h, "ig"), g = p.toLowerCase();
576
- if (e.propItem.label) {
577
- (y = e.backupList) == null || y.forEach((w) => {
578
- w.hightlighStr = g;
579
- const S = w.label;
580
- v.test(S) ? (w.match = oe(T, S), w.isFilter = !1) : w.isFilter = !0;
581
- }), (C = e.backupList) != null && C.length || p ? k(e) : k(e, !1);
575
+ t.filterList = (E = t.backupList) == null ? void 0 : E.filter((w) => g.test(w.label) ? (delete w.isFilter, J(t, w.label) && t.checkboxGroup.push(`${t.prevItem.label}${w.label}`), !0) : (w.isFilter = !0, !1));
576
+ const L = new RegExp(m, "ig"), V = u.toLowerCase();
577
+ if (t.propItem.label) {
578
+ (h = t.backupList) == null || h.forEach((w) => {
579
+ w.hightlighStr = V;
580
+ const P = w.label;
581
+ g.test(P) ? (w.match = Te(L, P), w.isFilter = !1) : w.isFilter = !0;
582
+ }), ($ = t.backupList) != null && $.length || u ? _(t) : _(t, !1);
582
583
  return;
583
584
  }
584
- for (const w of o) {
585
- const { options: S = [], groupKey: V = "0", ...D } = w, M = D.label;
586
- if (v.test(M)) {
587
- const E = oe(T, M);
588
- e.matchItems[V].attr.push({ ...w, match: E, hightlighStr: g });
585
+ for (const w of n) {
586
+ const { options: P = [], groupKey: R = "0", ...O } = w, x = O.label;
587
+ if (g.test(x)) {
588
+ const A = Te(L, x);
589
+ t.matchItems[R].attr.push({ ...w, match: A, hightlighStr: V });
589
590
  }
590
- for (const E of S) {
591
- const A = e.propItem.label ? M : `${M}:${E.label}`;
592
- if (v.test(A)) {
593
- const P = oe(T, A);
594
- e.matchItems[V].attrValue.push({
595
- ...E,
596
- ...D,
597
- options: S,
598
- hightlighStr: g,
599
- value: E.label,
600
- match: P
591
+ for (const A of P) {
592
+ const ee = t.propItem.label ? x : `${x}:${A.label}`;
593
+ if (g.test(ee)) {
594
+ const W = Te(L, ee);
595
+ t.matchItems[R].attrValue.push({
596
+ ...A,
597
+ ...O,
598
+ options: P,
599
+ hightlighStr: V,
600
+ value: A.label,
601
+ match: W
601
602
  });
602
603
  }
603
604
  }
604
605
  }
605
- h && a.potentialOptions && a.potentialOptions.getMatchList ? n(h) : k(e);
606
- }, 500), i = () => {
607
- c.cancel && c.cancel();
608
- }, l = () => {
609
- var m;
610
- (m = e.backupList) == null || m.forEach((o) => o.isFilter && delete o.isFilter);
606
+ m && e.potentialOptions && e.potentialOptions.getMatchList ? c(m) : _(t);
607
+ }, 500), v = () => {
608
+ b.cancel && b.cancel();
609
+ }, d = () => {
610
+ var r;
611
+ (r = t.backupList) == null || r.forEach((n) => n.isFilter && delete n.isFilter);
611
612
  };
612
613
  return {
613
- handleInput: c,
614
- selectFirstMap: (m, o) => {
615
- var b;
616
- const { options: f } = m, { prevItem: d, propItem: p } = e;
614
+ handleInput: b,
615
+ selectFirstMap: (r, n) => {
616
+ var a;
617
+ const { options: f } = r, { prevItem: s, propItem: u } = t;
617
618
  if (f)
618
- k(e, !1), e.propItem = { ...e.propItem, value: `${m.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = m.options || [], l(), (b = e.backupList) == null || b.forEach((h) => {
619
- const v = p.value + h.label;
620
- h.isChecked = O(e, v);
619
+ _(t, !1), t.propItem = { ...t.propItem, value: `${r.label}=` }, t.isShowTagKey = !1, t.inputValue = "", t.backupList = r.options || [], d(), (a = t.backupList) == null || a.forEach((m) => {
620
+ const g = u.value + m.label;
621
+ m.isChecked = J(t, g);
621
622
  });
622
623
  else {
623
- if (m.isChecked)
624
+ if (r.isChecked)
624
625
  return;
625
- k(e, !1), e.isShowTagKey = !0, l();
626
- const { field: h, type: v } = d, x = p.value + m.label, T = G(a, d, m), _ = [H({ type: v, field: h, label: p.label, value: x, ...T })];
627
- R({ emit: t, state: e, nextTick: s, tagList: _ });
626
+ _(t, !1), t.isShowTagKey = !0, d();
627
+ const { field: m, type: g } = s, I = u.value + r.label, L = ae(e, s, r), T = [le({ type: g, field: m, label: u.label, value: I, ...L })];
628
+ Q({ emit: o, state: t, nextTick: l, tagList: T });
628
629
  }
629
- o && k(e);
630
+ n && _(t);
630
631
  },
631
- cancelHandleInput: i
632
+ cancelHandleInput: v
632
633
  };
633
634
  }
634
- function St({ props: a, state: e, emit: t, nextTick: s }) {
635
+ function Gt({ props: e, state: t, emit: o, nextTick: l }) {
635
636
  return {
636
- selectCheckbox: (r) => {
637
- var m, o;
638
- k(e, !1);
639
- const { checkboxGroup: c, prevItem: i, propItem: l } = e, u = ee(i);
640
- if (r) {
641
- const f = [], d = j(e.innerModelValue), { mergeTag: p, operators: b, label: h } = i;
642
- if (p) {
643
- let v = "";
644
- const x = [], { indexMap: T } = e, g = T.get(h);
645
- if (g !== void 0 && e.innerModelValue.splice(g, 1), (m = e.backupList) == null || m.forEach((_) => {
646
- const { label: I } = _, y = `${h}${I}`;
647
- if (c.includes(y)) {
648
- delete _.isFilter;
649
- const w = G(a, i, _), S = { label: _.label, ...w };
650
- v += v ? ` | ${I}` : I, x.push(S);
637
+ selectCheckbox: (i) => {
638
+ var r, n;
639
+ _(t, !1);
640
+ const { checkboxGroup: b, prevItem: v, propItem: d } = t, p = ge(v);
641
+ if (i) {
642
+ const f = [], s = ne(t.innerModelValue), { mergeTag: u, operators: a, label: m } = v;
643
+ if (u) {
644
+ let g = "";
645
+ const I = [], { indexMap: L } = t, V = L.get(m);
646
+ if (V !== void 0 && t.innerModelValue.splice(V, 1), (r = t.backupList) == null || r.forEach((T) => {
647
+ const { label: E } = T, h = `${m}${E}`;
648
+ if (b.includes(h)) {
649
+ delete T.isFilter;
650
+ const w = ae(e, v, T), P = { label: T.label, ...w };
651
+ g += g ? ` | ${E}` : E, I.push(P);
651
652
  }
652
- }), x.length > 0) {
653
- const _ = { ...u, value: v, options: x };
654
- f.push(_);
653
+ }), I.length > 0) {
654
+ const T = { ...p, value: g, options: I };
655
+ f.push(T);
655
656
  }
656
657
  } else {
657
- const { valueMap: v } = e, x = [];
658
- if ((o = e.backupList) == null || o.forEach((T) => {
659
- const { label: g } = T, _ = `${h}${g}`, I = c.includes(_);
660
- if (I && !O(e, g)) {
661
- const y = G(a, i, T), C = e.operatorValue && b ? { operator: e.operatorValue } : null, w = H({ ...u, label: l.label, value: g, ...y, ...C });
662
- f.push(w), T.isChecked = !0;
663
- } else if (!I && O(e, g)) {
664
- T.isChecked = !1;
665
- const y = v.get(_);
666
- x.push(y);
658
+ const { valueMap: g } = t, I = [];
659
+ if ((n = t.backupList) == null || n.forEach((L) => {
660
+ const { label: V } = L, T = `${m}${V}`, E = b.includes(T);
661
+ if (E && !J(t, V)) {
662
+ const h = ae(e, v, L), $ = t.operatorValue && a ? { operator: t.operatorValue } : null, w = le({ ...p, label: d.label, value: V, ...h, ...$ });
663
+ f.push(w), L.isChecked = !0;
664
+ } else if (!E && J(t, V)) {
665
+ L.isChecked = !1;
666
+ const h = g.get(T);
667
+ I.push(h);
667
668
  }
668
- }), x.length) {
669
- const T = e.innerModelValue.filter((g, _) => g && !x.includes(_));
670
- R({ emit: t, state: e, nextTick: s, newValue: T, oldValue: d });
669
+ }), I.length) {
670
+ const L = t.innerModelValue.filter((V, T) => V && !I.includes(T));
671
+ Q({ emit: o, state: t, nextTick: l, newValue: L, oldValue: s });
671
672
  return;
672
673
  }
673
674
  }
674
- R({ emit: t, state: e, nextTick: s, tagList: f, oldValue: d });
675
+ Q({ emit: o, state: t, nextTick: l, tagList: f, oldValue: s });
675
676
  } else
676
- e.propItem = { ...l, label: "" }, e.inputValue = "";
677
+ t.propItem = { ...d, label: "" }, t.inputValue = "";
677
678
  }
678
679
  };
679
680
  }
680
- function Dt({ props: a, state: e, emit: t, nextTick: s, vm: n }) {
681
- const r = n || e.instance;
681
+ function qt({ props: e, state: t, emit: o, nextTick: l, vm: c }) {
682
+ const i = c || t.instance;
682
683
  return {
683
- onConfirmDate: async (u, m = !1) => {
684
- if (!u) {
685
- e.propItem = { label: "" };
684
+ onConfirmDate: async (p, r = !1) => {
685
+ if (!p) {
686
+ t.propItem = { label: "" };
686
687
  return;
687
688
  }
688
- const o = await ie(r, e, a, m);
689
- if (o) {
690
- k(e, !1);
691
- const f = a.modelValue.filter((d) => d.type !== o.type || d.field !== o.field);
692
- f.push(o), R({ emit: t, state: e, nextTick: s, newValue: f });
689
+ const n = await De(i, t, e, r);
690
+ if (n) {
691
+ _(t, !1);
692
+ const f = e.modelValue.filter((s) => s.type !== n.type || s.field !== n.field);
693
+ f.push(n), Q({ emit: o, state: t, nextTick: l, newValue: f });
693
694
  } else
694
- k(e);
695
+ _(t);
695
696
  },
696
- handleDateShow: () => k(e),
697
- pickerOptions: (u, m = "") => ({
698
- disabledDate(o) {
699
- const { maxTimeLength: f = 0, min: d, max: p } = e.prevItem, b = e[m], h = o.getTime();
697
+ handleDateShow: () => _(t),
698
+ pickerOptions: (p, r = "") => ({
699
+ disabledDate(n) {
700
+ const { maxTimeLength: f = 0, min: s, max: u } = t.prevItem, a = t[r], m = n.getTime();
700
701
  if (f > 0)
701
- if (d || p)
702
- if (m && b) {
703
- const v = new Date(b).getTime(), x = !d && p ? v - f : Math.max(d.getTime(), v - f);
704
- return h < x || h > v;
705
- } else if (!m && u) {
706
- const v = new Date(u).getTime(), x = d && !p ? v + f : Math.min(p.getTime(), v + f);
707
- return h < v || h > x;
702
+ if (s || u)
703
+ if (r && a) {
704
+ const g = new Date(a).getTime(), I = !s && u ? g - f : Math.max(s.getTime(), g - f);
705
+ return m < I || m > g;
706
+ } else if (!r && p) {
707
+ const g = new Date(p).getTime(), I = s && !u ? g + f : Math.min(u.getTime(), g + f);
708
+ return m < g || m > I;
708
709
  } else
709
- return d && h < d.getTime() || p && h > p.getTime();
710
- else if (m && b) {
711
- const v = new Date(b).getTime(), x = v - f;
712
- return h < x || h > v;
713
- } else if (!m && u) {
714
- const v = new Date(u).getTime(), x = v + f;
715
- return h < v || h > x;
710
+ return s && m < s.getTime() || u && m > u.getTime();
711
+ else if (r && a) {
712
+ const g = new Date(a).getTime(), I = g - f;
713
+ return m < I || m > g;
714
+ } else if (!r && p) {
715
+ const g = new Date(p).getTime(), I = g + f;
716
+ return m < g || m > I;
716
717
  } else
717
718
  return !1;
718
- else if (d || p)
719
- if (m && b) {
720
- const v = new Date(b).getTime();
721
- return d && h < d.getTime() || h > v;
722
- } else if (!m && u) {
723
- const v = new Date(u).getTime();
724
- return h < v || p && h > p.getTime();
719
+ else if (s || u)
720
+ if (r && a) {
721
+ const g = new Date(a).getTime();
722
+ return s && m < s.getTime() || m > g;
723
+ } else if (!r && p) {
724
+ const g = new Date(p).getTime();
725
+ return m < g || u && m > u.getTime();
725
726
  } else
726
- return h < d || h > p;
727
- else if (m && b) {
728
- const v = new Date(b).getTime();
729
- return h > v;
730
- } else if (!m && u) {
731
- const v = new Date(u).getTime();
732
- return h < v;
727
+ return m < s || m > u;
728
+ else if (r && a) {
729
+ const g = new Date(a).getTime();
730
+ return m > g;
731
+ } else if (!r && p) {
732
+ const g = new Date(p).getTime();
733
+ return m < g;
733
734
  } else
734
735
  return !1;
735
736
  }
736
737
  })
737
738
  };
738
739
  }
739
- function Mt({ props: a, state: e, t, emit: s, nextTick: n, vm: r }) {
740
- const c = r || e.instance, i = async (m) => {
741
- if (!m) {
742
- e.propItem = { ...e.propItem, label: "" };
740
+ function Zt({ props: e, state: t, t: o, emit: l, nextTick: c, vm: i }) {
741
+ const b = i || t.instance, v = async (r) => {
742
+ if (!r) {
743
+ t.propItem = { ...t.propItem, label: "" };
743
744
  return;
744
745
  }
745
- const o = await De(c, e, a);
746
- if (o) {
747
- k(e, !1);
748
- const f = a.modelValue.filter((d) => d.type !== o.type || d.field !== o.field);
749
- f.push(o), R({ emit: s, state: e, nextTick: n, newValue: f });
746
+ const n = await Ke(b, t, e);
747
+ if (n) {
748
+ _(t, !1);
749
+ const f = e.modelValue.filter((s) => s.type !== n.type || s.field !== n.field);
750
+ f.push(n), Q({ emit: l, state: t, nextTick: c, newValue: f });
750
751
  } else
751
- k(e);
752
- }, l = (m, o, f) => {
753
- const { maxTimeLength: d = 0 } = m;
752
+ _(t);
753
+ }, d = (r, n, f) => {
754
+ const { maxTimeLength: s = 0 } = r;
754
755
  return {
755
- [o]: {
756
- validator: (p, b, h) => {
757
- d > 0 && !b ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !b && !e[f] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
756
+ [n]: {
757
+ validator: (u, a, m) => {
758
+ s > 0 && !a ? m(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !a && !t[f] ? m(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : m();
758
759
  }
759
760
  },
760
761
  [f]: {
761
- validator: (p, b, h) => {
762
- d > 0 && !b ? h(new Error(t("tvp.tvpSearchbox.notBeNull"))) : !b && !e[o] ? h(new Error(t("tvp.tvpSearchbox.rangeDateTitle"))) : h();
762
+ validator: (u, a, m) => {
763
+ s > 0 && !a ? m(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !a && !t[n] ? m(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : m();
763
764
  }
764
765
  }
765
766
  };
766
767
  };
767
768
  return {
768
769
  initFormRule: () => {
769
- let m = {}, o = {};
770
- a.items.forEach((f) => {
771
- f.type === "dateRange" && (m = l(f, "startDate", "endDate")), f.type === "datetimeRange" && (o = l(f, "startDateTime", "endDateTime"));
772
- }), e.formRules = {
773
- ...m,
774
- ...o
775
- }, a.editable && (e.formRules.inputEditValue = {
770
+ let r = {}, n = {};
771
+ e.items.forEach((f) => {
772
+ f.type === "dateRange" && (r = d(f, "startDate", "endDate")), f.type === "datetimeRange" && (n = d(f, "startDateTime", "endDateTime"));
773
+ }), t.formRules = {
774
+ ...r,
775
+ ...n
776
+ }, e.editable && (t.formRules.inputEditValue = {
776
777
  required: !0,
777
- message: t("tvp.tvpSearchbox.notBeNull"),
778
+ message: o("tvp.tvpSearchbox.notBeNull"),
778
779
  trigger: ["change", "blur"]
779
780
  });
780
781
  },
781
- sizeChange: i
782
+ sizeChange: v
782
783
  };
783
784
  }
784
- function Et({ props: a, state: e, t, nextTick: s, format: n, emit: r, vm: c }) {
785
- const i = (d) => {
786
- var I;
787
- const { operator: p, value: b, start: h, end: v } = d, { options: x, operators: T, type: g, mergeTag: _ } = e.prevItem;
788
- if (g !== "custom") {
789
- if (g === "numRange")
790
- Me(e, d, t);
791
- else if (g === "dateRange") {
792
- const { dateRangeFormat: y } = e;
793
- e.startDate = n(h, y), e.endDate = n(v, y);
794
- } else if (g === "datetimeRange") {
795
- const { datetimeRangeFormat: y } = e;
796
- e.startDateTime = n(h, y), e.endDateTime = n(v, y);
785
+ function Yt({ props: e, state: t, t: o, nextTick: l, format: c, emit: i, vm: b }) {
786
+ const v = (s) => {
787
+ var E;
788
+ const { operator: u, value: a, start: m, end: g } = s, { options: I, operators: L, type: V, mergeTag: T } = t.prevItem;
789
+ if (V !== "custom") {
790
+ if (V === "numRange")
791
+ Ge(t, s, o);
792
+ else if (V === "dateRange") {
793
+ const { dateRangeFormat: h } = t;
794
+ t.startDate = c(m, h), t.endDate = c(g, h);
795
+ } else if (V === "datetimeRange") {
796
+ const { datetimeRangeFormat: h } = t;
797
+ t.startDateTime = c(m, h), t.endDateTime = c(g, h);
797
798
  } else {
798
- if (_) {
799
- const y = ((I = d.options) == null ? void 0 : I.flatMap((C) => C.label)) || [];
800
- e.inputEditValue = y, e.currentEditSelectTags = y;
799
+ if (T) {
800
+ const h = ((E = s.options) == null ? void 0 : E.flatMap(($) => $.label)) || [];
801
+ t.inputEditValue = h, t.currentEditSelectTags = h;
801
802
  } else
802
- e.inputEditValue = Array.isArray(b) ? b.join(",") : b || "";
803
- e.currentEditValue = x;
803
+ t.inputEditValue = Array.isArray(a) ? a.join(",") : a || "";
804
+ t.currentEditValue = I;
804
805
  }
805
- e.operatorValue = p, e.currentOperators = T;
806
+ t.operatorValue = u, t.currentOperators = L;
806
807
  }
807
- }, l = async () => {
808
- var h, v;
809
- if (!((v = (h = e.instance) == null ? void 0 : h.$refs) != null && v.formRef))
808
+ }, d = async () => {
809
+ var m, g;
810
+ if (!((g = (m = t.instance) == null ? void 0 : m.$refs) != null && g.formRef))
810
811
  return;
811
- const { prevItem: d } = e;
812
- let p = [];
813
- if (d.type === "numRange" ? p = [e.curMinNumVar, e.curMaxNumVar] : d.type === "dateRange" ? p = ["startDate", "endDate"] : d.type === "datetimeRange" ? p = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(d.type) || (p = ["inputEditValue"]), (p == null ? void 0 : p.length) === 0) {
814
- e.hasFormError = !1;
812
+ const { prevItem: s } = t;
813
+ let u = [];
814
+ if (s.type === "numRange" ? u = [t.curMinNumVar, t.curMaxNumVar] : s.type === "dateRange" ? u = ["startDate", "endDate"] : s.type === "datetimeRange" ? u = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(s.type) || (u = ["inputEditValue"]), (u == null ? void 0 : u.length) === 0) {
815
+ t.hasFormError = !1;
815
816
  return;
816
817
  }
817
- let b = !1;
818
- await e.instance.$refs.formRef.validateField(p, (x) => {
819
- x && (b = !0);
820
- }), e.hasFormError = b;
818
+ let a = !1;
819
+ await t.instance.$refs.formRef.validateField(u, (I) => {
820
+ I && (a = !0);
821
+ }), t.hasFormError = a;
821
822
  };
822
823
  return {
823
- editTag: (d, p, b) => {
824
- if (!a.editable || d.type && d.type === "map")
824
+ editTag: (s, u, a) => {
825
+ if (!e.editable || s.type && s.type === "map")
825
826
  return;
826
- k(e, !1), e.popoverVisible = !1;
827
- const h = b.target.classList.contains("tiny-tag") ? b.target : b.srcElement.parentElement;
828
- s(() => {
829
- const { popoverRef: v } = e.instance.$refs;
830
- v.state.referenceElm = h, v.state.popperElm && (v.state.popperElm.style.display = "none"), v.doDestroy(), e.popoverVisible = !0, l();
831
- }), e.prevItem = e.recordItems.find((v) => v.field === d.field), !e.prevItem && (e.prevItem = d), e.selectValue = d.label, e.currentModelValueIndex = p, r("tagClick", d), i(d);
832
- },
833
- confirmEditTag: async (d) => {
834
- if (!d) {
835
- e.popoverVisible = !1;
827
+ _(t, !1), t.popoverVisible = !1;
828
+ const m = a.target.classList.contains("tiny-tag") ? a.target : a.srcElement.parentElement;
829
+ l(() => {
830
+ const { popoverRef: g } = t.instance.$refs;
831
+ g.state.referenceElm = m, g.state.popperElm && (g.state.popperElm.style.display = "none"), g.doDestroy(), t.popoverVisible = !0, d();
832
+ }), t.prevItem = t.recordItems.find((g) => g.field === s.field), !t.prevItem && (t.prevItem = s), t.selectValue = s.label, t.currentModelValueIndex = u, i("tagClick", s), v(s);
833
+ },
834
+ confirmEditTag: async (s) => {
835
+ if (!s) {
836
+ t.popoverVisible = !1;
836
837
  return;
837
838
  }
838
- const { prevItem: p, currentModelValueIndex: b } = e;
839
- let h = null;
840
- p.type === "numRange" ? h = await De(e.instance, e, a) : p.type === "dateRange" ? h = await ie(e.instance, e, a, !1) : p.type === "datetimeRange" ? h = await ie(e.instance, e, a, !0) : h = await kt(e.instance, e, a), h ? (k(e, !1), e.popoverVisible = !1, R({ emit: r, state: e, nextTick: s, index: b, newTag: h, isEdit: !0 })) : e.popoverVisible = !0, e.currentEditValue = [];
839
+ const { prevItem: u, currentModelValueIndex: a } = t;
840
+ let m = null;
841
+ u.type === "numRange" ? m = await Ke(t.instance, t, e) : u.type === "dateRange" ? m = await De(t.instance, t, e, !1) : u.type === "datetimeRange" ? m = await De(t.instance, t, e, !0) : m = await Ut(t.instance, t, e), m ? (_(t, !1), t.popoverVisible = !1, Q({ emit: i, state: t, nextTick: l, index: a, newTag: m, isEdit: !0 })) : t.popoverVisible = !0, t.currentEditValue = [];
841
842
  },
842
- selectPropChange: (d, p) => {
843
- p || (e.prevItem = d, i(d), s(() => {
844
- l();
843
+ selectPropChange: (s, u) => {
844
+ u || (t.prevItem = s, v(s), l(() => {
845
+ d();
845
846
  }));
846
847
  },
847
- selectItemIsDisable: (d) => {
848
- var b, h, v, x;
849
- if (d.type && d.type === "map")
848
+ selectItemIsDisable: (s) => {
849
+ var a, m, g, I;
850
+ if (s.type && s.type === "map")
850
851
  return !0;
851
- if ((b = e.prevItem) != null && b.operators || d.operators)
852
- return ((h = e.prevItem.operators) == null ? void 0 : h.length) !== ((v = d.operators) == null ? void 0 : v.length);
853
- const p = ["radio", "checkbox"];
854
- return e.prevItem.type && p.includes(e.prevItem.type) ? d.type ? !p.includes(d.type) : !1 : ((x = e.prevItem) == null ? void 0 : x.type) !== d.type;
852
+ if ((a = t.prevItem) != null && a.operators || s.operators)
853
+ return ((m = t.prevItem.operators) == null ? void 0 : m.length) !== ((g = s.operators) == null ? void 0 : g.length);
854
+ const u = ["radio", "checkbox"];
855
+ return t.prevItem.type && u.includes(t.prevItem.type) ? s.type ? !u.includes(s.type) : !1 : ((I = t.prevItem) == null ? void 0 : I.type) !== s.type;
855
856
  },
856
- checkFormValidation: l
857
+ checkFormValidation: d
857
858
  };
858
859
  }
859
- function $t({ state: a, emit: e, nextTick: t }) {
860
- const s = (c) => {
861
- k(a, !1);
862
- const { prevItem: i, indexMap: l } = a, { replace: u, label: m } = i, o = [];
863
- if (u && l.has(m)) {
864
- const f = l.get(m), d = { ...i, ...c };
865
- R({ emit: e, state: a, nextTick: t, newTag: d, index: f });
860
+ function Qt({ state: e, emit: t, nextTick: o }) {
861
+ const l = (b) => {
862
+ _(e, !1);
863
+ const { prevItem: v, indexMap: d } = e, { replace: p, label: r } = v, n = [];
864
+ if (p && d.has(r)) {
865
+ const f = d.get(r), s = { ...v, ...b };
866
+ Q({ emit: t, state: e, nextTick: o, newTag: s, index: f });
866
867
  return;
867
868
  } else
868
- !u && Array.isArray(c) ? c.forEach((f) => {
869
- O(a, f.value) || o.push({ ...i, ...f });
870
- }) : O(a, c.value) || o.push({ ...i, ...c });
871
- R({ emit: e, state: a, nextTick: t, tagList: o });
869
+ !p && Array.isArray(b) ? b.forEach((f) => {
870
+ J(e, f.value) || n.push({ ...v, ...f });
871
+ }) : J(e, b.value) || n.push({ ...v, ...b });
872
+ Q({ emit: t, state: e, nextTick: o, tagList: n });
872
873
  };
873
874
  return {
874
- handleConfirm: (c) => {
875
- if (!c) {
876
- te(a), k(a, !1);
875
+ handleConfirm: (b) => {
876
+ if (!b) {
877
+ ye(e), _(e, !1);
877
878
  return;
878
879
  }
879
- s(c);
880
+ l(b);
880
881
  },
881
- handleEditConfirm: (c) => {
882
- if (!c) {
883
- Q(a, !1);
882
+ handleEditConfirm: (b) => {
883
+ if (!b) {
884
+ de(e, !1);
884
885
  return;
885
886
  }
886
- s(c);
887
+ l(b);
887
888
  }
888
889
  };
889
890
  }
890
- function Lt({ props: a, state: e }) {
891
+ function Wt({ props: e, state: t }) {
891
892
  return {
892
893
  initItems: () => {
893
- e.groupItems = {}, e.recordItems.forEach((i) => {
894
- var u;
895
- const { groupKey: l = "0" } = i;
896
- if (e.groupItems[l] ? e.groupItems[l].push({ ...i }) : (e.groupItems[l] = [{ ...i }], e.matchItems[l] = { attr: [], attrValue: [] }), e.prevItem && i.field === e.prevItem.field && i !== e.prevItem) {
897
- const { options: m, type: o } = i;
898
- e.prevItem = i, m != null && m.length && (e.backupList = m), o === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (u = e.backupList) == null || u.forEach((f) => {
899
- const { label: d } = f;
900
- O(e, d) && e.checkboxGroup.push(`${i.label}${d}`), f.isFilter = !1;
901
- })), k(e, i.field === e.prevItem.field && i !== e.prevItem);
894
+ t.groupItems = {}, t.recordItems.forEach((v) => {
895
+ var p;
896
+ const { groupKey: d = "0" } = v;
897
+ if (t.groupItems[d] ? t.groupItems[d].push({ ...v }) : (t.groupItems[d] = [{ ...v }], t.matchItems[d] = { attr: [], attrValue: [] }), t.prevItem && v.field === t.prevItem.field && v !== t.prevItem) {
898
+ const { options: r, type: n } = v;
899
+ t.prevItem = v, r != null && r.length && (t.backupList = r), n === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (p = t.backupList) == null || p.forEach((f) => {
900
+ const { label: s } = f;
901
+ J(t, s) && t.checkboxGroup.push(`${v.label}${s}`), f.isFilter = !1;
902
+ })), _(t, v.field === t.prevItem.field && v !== t.prevItem);
902
903
  }
903
904
  });
904
905
  },
905
906
  watchOutsideClick: () => {
906
- a.editable && Q(e, !1), e.isMouseDown = !1, k(e, !1);
907
+ e.editable && de(t, !1), t.isMouseDown = !1, _(t, !1);
907
908
  },
908
909
  watchMouseDown: () => {
909
- e.isMouseDown = !0;
910
+ t.isMouseDown = !0;
910
911
  },
911
912
  watchMouseMove: () => {
912
- e.isMouseDown && (e.isMouseDown = !1);
913
+ t.isMouseDown && (t.isMouseDown = !1);
913
914
  },
914
- handleClick: (i) => {
915
- var m;
916
- const { backupPrevItem: l, prevItem: u } = e;
917
- i.stopPropagation(), a.editable && (e.popoverVisible = !1, e.currentEditValue = [], e.propItem.label && l && l !== u && (e.prevItem = l)), e.hasBackupList && (((m = e.backupList) == null ? void 0 : m.length) === 0 || !e.backupList) && !e.inputValue || a.items.length === 0 ? k(e, !1) : k(e);
915
+ handleClick: (v) => {
916
+ var r;
917
+ const { backupPrevItem: d, prevItem: p } = t;
918
+ v.stopPropagation(), e.editable && (t.popoverVisible = !1, t.currentEditValue = [], t.propItem.label && d && d !== p && (t.prevItem = d)), t.hasBackupList && (((r = t.backupList) == null ? void 0 : r.length) === 0 || !t.backupList) && !t.inputValue || e.items.length === 0 ? _(t, !1) : _(t);
918
919
  }
919
920
  };
920
921
  }
921
- const Ee = {
922
+ const qe = {
922
923
  tvp: {
923
924
  tvpSearchbox: {
924
925
  defaultPlaceholder: "请选择属性筛选,或输入关键字",
@@ -959,7 +960,7 @@ const Ee = {
959
960
  initUse: "搜索"
960
961
  }
961
962
  }
962
- }, $e = {
963
+ }, Ze = {
963
964
  tvp: {
964
965
  tvpSearchbox: {
965
966
  defaultPlaceholder: "Select attribute filtering or enter keywords",
@@ -1000,82 +1001,82 @@ const Ee = {
1000
1001
  initUse: "Search"
1001
1002
  }
1002
1003
  }
1003
- }, W = "zh-CN", q = {
1004
- "zh-CN": Ee,
1005
- "en-US": $e
1004
+ }, ce = "zh-CN", ie = {
1005
+ "zh-CN": qe,
1006
+ "en-US": Ze
1006
1007
  };
1007
- let $ = null;
1008
- const Nt = (a) => {
1009
- $ = a;
1010
- }, me = () => {
1011
- var a, e, t, s, n;
1012
- if ((t = (e = (a = $ == null ? void 0 : $.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && t.locale)
1013
- return $.config.globalProperties.$i18n.locale;
1014
- if ((s = $ == null ? void 0 : $.$i18n) != null && s.locale)
1015
- return $.$i18n.locale;
1008
+ let U = null;
1009
+ const Jt = (e) => {
1010
+ U = e;
1011
+ }, Le = () => {
1012
+ var e, t, o, l, c;
1013
+ if ((o = (t = (e = U == null ? void 0 : U.config) == null ? void 0 : e.globalProperties) == null ? void 0 : t.$i18n) != null && o.locale)
1014
+ return U.config.globalProperties.$i18n.locale;
1015
+ if ((l = U == null ? void 0 : U.$i18n) != null && l.locale)
1016
+ return U.$i18n.locale;
1016
1017
  if (typeof navigator < "u") {
1017
- const r = navigator.language || ((n = navigator.languages) == null ? void 0 : n[0]);
1018
- if (r)
1019
- return r.startsWith("zh") ? "zh-CN" : "en-US";
1018
+ const i = navigator.language || ((c = navigator.languages) == null ? void 0 : c[0]);
1019
+ if (i)
1020
+ return i.startsWith("zh") ? "zh-CN" : "en-US";
1020
1021
  }
1021
- return W;
1022
- }, ce = (a) => q[a] || q[W], N = (a, e = {}) => {
1023
- var c, i;
1024
- if (!a)
1022
+ return ce;
1023
+ }, Ce = (e) => ie[e] || ie[ce], Y = (e, t = {}) => {
1024
+ var b, v;
1025
+ if (!e)
1025
1026
  return "";
1026
- if ((i = (c = $ == null ? void 0 : $.config) == null ? void 0 : c.globalProperties) != null && i.$t)
1027
+ if ((v = (b = U == null ? void 0 : U.config) == null ? void 0 : b.globalProperties) != null && v.$t)
1027
1028
  try {
1028
- const l = $.config.globalProperties.$t(a, e);
1029
- if (l && l !== a)
1030
- return l;
1031
- } catch (l) {
1032
- console.warn("[TinySearchBox] i18n translation failed:", l);
1029
+ const d = U.config.globalProperties.$t(e, t);
1030
+ if (d && d !== e)
1031
+ return d;
1032
+ } catch (d) {
1033
+ console.warn("[TinySearchBox] i18n translation failed:", d);
1033
1034
  }
1034
- if ($ != null && $.$t)
1035
+ if (U != null && U.$t)
1035
1036
  try {
1036
- const l = $.$t(a, e);
1037
- if (l && l !== a)
1038
- return l;
1039
- } catch (l) {
1040
- console.warn("[TinySearchBox] i18n translation failed:", l);
1041
- }
1042
- const t = me(), s = ce(t), n = a.split(".");
1043
- let r = s;
1044
- for (const l of n)
1045
- if (r && typeof r == "object" && l in r)
1046
- r = r[l];
1037
+ const d = U.$t(e, t);
1038
+ if (d && d !== e)
1039
+ return d;
1040
+ } catch (d) {
1041
+ console.warn("[TinySearchBox] i18n translation failed:", d);
1042
+ }
1043
+ const o = Le(), l = Ce(o), c = e.split(".");
1044
+ let i = l;
1045
+ for (const d of c)
1046
+ if (i && typeof i == "object" && d in i)
1047
+ i = i[d];
1047
1048
  else {
1048
- if (t !== W) {
1049
- r = ce(W);
1050
- for (const m of n)
1051
- if (r && typeof r == "object" && m in r)
1052
- r = r[m];
1049
+ if (o !== ce) {
1050
+ i = Ce(ce);
1051
+ for (const r of c)
1052
+ if (i && typeof i == "object" && r in i)
1053
+ i = i[r];
1053
1054
  else {
1054
- r = a;
1055
+ i = e;
1055
1056
  break;
1056
1057
  }
1057
1058
  } else
1058
- r = a;
1059
+ i = e;
1059
1060
  break;
1060
1061
  }
1061
- return typeof r == "string" && Object.keys(e).length > 0 ? r.replace(/\{(\w+)\}/g, (l, u) => e[u] !== void 0 ? e[u] : l) : typeof r == "string" ? r : a;
1062
- }, Rt = (a, e = {}) => a.map((t) => N(t, e)), Pt = (a) => a in q, Ot = () => Object.keys(q), Ft = (a, e) => {
1063
- q[a] = e;
1064
- }, At = (a) => {
1065
- a !== W && delete q[a];
1066
- }, Bt = {
1067
- t: N,
1068
- zhCN: Ee,
1069
- enUS: $e,
1070
- tArray: Rt,
1071
- setGlobalApp: Nt,
1072
- getCurrentLocale: me,
1073
- getLocaleMessages: ce,
1074
- isLocaleSupported: Pt,
1075
- getSupportedLocales: Ot,
1076
- addLocale: Ft,
1077
- removeLocale: At
1078
- }, zt = [
1062
+ return typeof i == "string" && Object.keys(t).length > 0 ? i.replace(/\{(\w+)\}/g, (d, p) => t[p] !== void 0 ? t[p] : d) : typeof i == "string" ? i : e;
1063
+ }, Xt = (e, t = {}) => e.map((o) => Y(o, t)), eo = (e) => e in ie, to = () => Object.keys(ie), oo = (e, t) => {
1064
+ ie[e] = t;
1065
+ }, no = (e) => {
1066
+ e !== ce && delete ie[e];
1067
+ }, lo = {
1068
+ t: Y,
1069
+ zhCN: qe,
1070
+ enUS: Ze,
1071
+ tArray: Xt,
1072
+ setGlobalApp: Jt,
1073
+ getCurrentLocale: Le,
1074
+ getLocaleMessages: Ce,
1075
+ isLocaleSupported: eo,
1076
+ getSupportedLocales: to,
1077
+ addLocale: oo,
1078
+ removeLocale: no
1079
+ }, ao = [
1079
1080
  "t",
1080
1081
  "state",
1081
1082
  "isShowClose",
@@ -1102,11 +1103,11 @@ const Nt = (a) => {
1102
1103
  "handleEditConfirm",
1103
1104
  "showDropdown",
1104
1105
  "showPopover"
1105
- ], jt = ({ reactive: a, computed: e, api: t, i18n: s, watch: n, props: r, emit: c, vm: i }) => {
1106
- const l = a({
1107
- innerModelValue: [...r.modelValue],
1108
- placeholder: r.emptyPlaceholder || N("tvp.tvpSearchbox.addPlaceholder"),
1109
- emitter: c,
1106
+ ], ro = ({ reactive: e, computed: t, api: o, i18n: l, watch: c, props: i, emit: b, vm: v }) => {
1107
+ const d = e({
1108
+ innerModelValue: [...i.modelValue],
1109
+ placeholder: i.emptyPlaceholder || Y("tvp.tvpSearchbox.addPlaceholder"),
1110
+ emitter: b,
1110
1111
  recordItems: [],
1111
1112
  groupItems: {},
1112
1113
  inputValue: "",
@@ -1132,7 +1133,7 @@ const Nt = (a) => {
1132
1133
  valueMap: /* @__PURE__ */ new Map(),
1133
1134
  popoverVisible: !1,
1134
1135
  selectValue: "",
1135
- allTypeAttri: { label: N("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
1136
+ allTypeAttri: { label: Y("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
1136
1137
  operatorValue: ":",
1137
1138
  inputEditValue: "",
1138
1139
  currentOperators: "",
@@ -1147,125 +1148,125 @@ const Nt = (a) => {
1147
1148
  visibleTimer: null,
1148
1149
  hasFormError: !1,
1149
1150
  // 表单校验错误状态
1150
- hasBackupList: e(() => l.propItem.label && [void 0, "radio", "checkbox", "map"].includes(l.prevItem.type)),
1151
- isIndeterminate: e(() => l.checkboxGroup.length > 0 && l.checkboxGroup.length !== l.filterList.length),
1152
- checkAll: e({
1153
- get: () => l.checkboxGroup.length && l.checkboxGroup.length === l.filterList.length,
1154
- set: (u) => {
1155
- u ? l.checkboxGroup = l.filterList.flatMap((m) => `${l.prevItem.label}${m.label}`) : l.checkboxGroup = [];
1151
+ hasBackupList: t(() => d.propItem.label && [void 0, "radio", "checkbox", "map"].includes(d.prevItem.type)),
1152
+ isIndeterminate: t(() => d.checkboxGroup.length > 0 && d.checkboxGroup.length !== d.filterList.length),
1153
+ checkAll: t({
1154
+ get: () => d.checkboxGroup.length && d.checkboxGroup.length === d.filterList.length,
1155
+ set: (p) => {
1156
+ p ? d.checkboxGroup = d.filterList.flatMap((r) => `${d.prevItem.label}${r.label}`) : d.checkboxGroup = [];
1156
1157
  }
1157
1158
  })
1158
1159
  });
1159
- return l;
1160
- }, Ht = (a, { getCurrentInstance: e, onMounted: t, onBeforeUnmount: s, computed: n, reactive: r, watch: c }, { emit: i, nextTick: l, refs: u, vm: m }) => {
1161
- const o = {}, f = a.emitter ? a.emitter.emit : i, d = jt({ reactive: r, computed: n, api: o, i18n: Bt, watch: c, props: a, emit: f, vm: m });
1162
- return Gt({ api: o, state: d, t: N, props: a, emit: f, nextTick: l, vm: m, computed: n }), Kt({ watch: c, state: d, props: a, api: o, nextTick: l, vm: m }), d.instance = m, t(() => {
1163
- typeof document < "u" && (document.addEventListener("click", o.watchOutsideClick), document.addEventListener("mousedown", o.watchMouseDown), document.addEventListener("mousemove", o.watchMouseMove));
1164
- }), s(() => {
1165
- typeof document < "u" && (document.removeEventListener("click", o.watchOutsideClick), document.removeEventListener("mousedown", o.watchMouseDown), document.removeEventListener("mousemove", o.watchMouseMove), d.localeCheckInterval && (clearInterval(d.localeCheckInterval), d.localeCheckInterval = null));
1166
- }), o;
1167
- }, Gt = ({ api: a, state: e, t, props: s, emit: n, nextTick: r, vm: c, computed: i }) => {
1168
- const { deleteTag: l, clearTag: u, backspaceDeleteTag: m } = It({ props: s, state: e, emit: n, nextTick: r }), { editTag: o, confirmEditTag: f, selectPropChange: d, selectItemIsDisable: p, checkFormValidation: b } = Et({ props: s, state: e, t, nextTick: r, format: le, emit: n, vm: c }), { handleInput: h, selectFirstMap: v, cancelHandleInput: x } = Ct({ props: s, state: e, emit: n, nextTick: r }), { selectPropItem: T, selectRadioItem: g, selectInputValue: _, createTag: I, helpClick: y, setOperator: C } = Vt({ props: s, emit: n, state: e, t, format: le, nextTick: r, vm: c, cancelHandleInput: x }), { selectCheckbox: w } = St({ props: s, state: e, emit: n, nextTick: r }), { onConfirmDate: S, handleDateShow: V, pickerOptions: D } = Dt({ props: s, state: e, emit: n, nextTick: r, vm: c }), { sizeChange: M, initFormRule: E } = Mt({ props: s, state: e, t, emit: n, nextTick: r, vm: c }), { handleConfirm: A, handleEditConfirm: P } = $t({ state: e, emit: n, nextTick: r }), { initItems: L, watchOutsideClick: F, watchMouseDown: K, watchMouseMove: ae, handleClick: ne } = Lt({ props: s, state: e }), Le = i(() => s.modelValue.length || e.propItem.label || e.inputValue), Ne = () => ({
1169
- selectInputValue: _,
1170
- selectPropItem: T,
1171
- selectRadioItem: g,
1172
- setOperator: C,
1160
+ return d;
1161
+ }, so = (e, { getCurrentInstance: t, onMounted: o, onBeforeUnmount: l, computed: c, reactive: i, watch: b }, { emit: v, nextTick: d, refs: p, vm: r }) => {
1162
+ const n = {}, f = e.emitter ? e.emitter.emit : v, s = ro({ reactive: i, computed: c, api: n, i18n: lo, watch: b, props: e, emit: f, vm: r });
1163
+ return io({ api: n, state: s, t: Y, props: e, emit: f, nextTick: d, vm: r, computed: c }), po({ watch: b, state: s, props: e, api: n, nextTick: d, vm: r }), s.instance = r, o(() => {
1164
+ typeof document < "u" && (document.addEventListener("click", n.watchOutsideClick), document.addEventListener("mousedown", n.watchMouseDown), document.addEventListener("mousemove", n.watchMouseMove));
1165
+ }), l(() => {
1166
+ typeof document < "u" && (document.removeEventListener("click", n.watchOutsideClick), document.removeEventListener("mousedown", n.watchMouseDown), document.removeEventListener("mousemove", n.watchMouseMove), s.localeCheckInterval && (clearInterval(s.localeCheckInterval), s.localeCheckInterval = null));
1167
+ }), n;
1168
+ }, io = ({ api: e, state: t, t: o, props: l, emit: c, nextTick: i, vm: b, computed: v }) => {
1169
+ const { deleteTag: d, clearTag: p, backspaceDeleteTag: r } = zt({ props: l, state: t, emit: c, nextTick: i }), { editTag: n, confirmEditTag: f, selectPropChange: s, selectItemIsDisable: u, checkFormValidation: a } = Yt({ props: l, state: t, t: o, nextTick: i, format: Se, emit: c, vm: b }), { handleInput: m, selectFirstMap: g, cancelHandleInput: I } = Kt({ props: l, state: t, emit: c, nextTick: i }), { selectPropItem: L, selectRadioItem: V, selectInputValue: T, createTag: E, helpClick: h, setOperator: $ } = jt({ props: l, emit: c, state: t, t: o, format: Se, nextTick: i, vm: b, cancelHandleInput: I }), { selectCheckbox: w } = Gt({ props: l, state: t, emit: c, nextTick: i }), { onConfirmDate: P, handleDateShow: R, pickerOptions: O } = qt({ props: l, state: t, emit: c, nextTick: i, vm: b }), { sizeChange: x, initFormRule: A } = Zt({ props: l, state: t, t: o, emit: c, nextTick: i, vm: b }), { handleConfirm: ee, handleEditConfirm: W } = Qt({ state: t, emit: c, nextTick: i }), { initItems: q, watchOutsideClick: X, watchMouseDown: re, watchMouseMove: Ve, handleClick: ke } = Wt({ props: l, state: t }), Ye = v(() => l.modelValue.length || t.propItem.label || t.inputValue), Qe = () => ({
1170
+ selectInputValue: T,
1171
+ selectPropItem: L,
1172
+ selectRadioItem: V,
1173
+ setOperator: $,
1173
1174
  selectCheckbox: w,
1174
- sizeChange: M,
1175
- onConfirmDate: S,
1176
- selectFirstMap: v,
1177
- handleDateShow: V
1178
- }), re = (Z) => {
1179
- e.placeholder = Z;
1175
+ sizeChange: x,
1176
+ onConfirmDate: P,
1177
+ selectFirstMap: g,
1178
+ handleDateShow: R
1179
+ }), Ie = (pe) => {
1180
+ t.placeholder = pe;
1180
1181
  };
1181
- s.modelValue.length > 0, re(t("tvp.tvpSearchbox.addPlaceholder")), Object.assign(a, {
1182
- t,
1183
- state: e,
1184
- isShowClose: Le,
1185
- deleteTag: l,
1186
- editTag: o,
1187
- backspaceDeleteTag: m,
1188
- createTag: I,
1189
- clearTag: u,
1190
- helpClick: y,
1191
- handleInput: h,
1192
- handleClick: ne,
1193
- handleEvents: (Z, Re, Pe) => {
1194
- const he = Ne();
1195
- typeof he[Z] == "function" ? he[Z](Re, Pe) : console.warn(`[TinySearchBox] Unknown event: ${Z}`);
1196
- },
1197
- pickerOptions: D,
1198
- resetInput: te,
1199
- selectItemIsDisable: p,
1200
- selectPropChange: d,
1182
+ l.modelValue.length > 0, Ie(o("tvp.tvpSearchbox.addPlaceholder")), Object.assign(e, {
1183
+ t: o,
1184
+ state: t,
1185
+ isShowClose: Ye,
1186
+ deleteTag: d,
1187
+ editTag: n,
1188
+ backspaceDeleteTag: r,
1189
+ createTag: E,
1190
+ clearTag: p,
1191
+ helpClick: h,
1192
+ handleInput: m,
1193
+ handleClick: ke,
1194
+ handleEvents: (pe, We, Je) => {
1195
+ const Re = Qe();
1196
+ typeof Re[pe] == "function" ? Re[pe](We, Je) : console.warn(`[TinySearchBox] Unknown event: ${pe}`);
1197
+ },
1198
+ pickerOptions: O,
1199
+ resetInput: ye,
1200
+ selectItemIsDisable: u,
1201
+ selectPropChange: s,
1201
1202
  confirmEditTag: f,
1202
- handleConfirm: A,
1203
- handleEditConfirm: P,
1204
- showDropdown: k,
1205
- showPopover: Q,
1206
- checkFormValidation: b,
1207
- setPlaceholder: re,
1208
- initItems: L,
1209
- initFormRule: E,
1210
- watchOutsideClick: F,
1211
- watchMouseDown: K,
1212
- watchMouseMove: ae
1203
+ handleConfirm: ee,
1204
+ handleEditConfirm: W,
1205
+ showDropdown: _,
1206
+ showPopover: de,
1207
+ checkFormValidation: a,
1208
+ setPlaceholder: Ie,
1209
+ initItems: q,
1210
+ initFormRule: A,
1211
+ watchOutsideClick: X,
1212
+ watchMouseDown: re,
1213
+ watchMouseMove: Ve
1213
1214
  });
1214
- }, Kt = ({ watch: a, state: e, props: t, api: s, nextTick: n, vm: r }) => {
1215
- var m;
1216
- const c = () => {
1217
- var o;
1218
- if (e.propItem.label) {
1219
- const { placeholder: f, type: d } = e.prevItem;
1220
- f ? s.setPlaceholder(f) : d === "map" ? s.setPlaceholder(N("tvp.tvpSearchbox.tagPlaceholder")) : (o = e.backupList) != null && o.length ? s.setPlaceholder(N("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder"));
1215
+ }, po = ({ watch: e, state: t, props: o, api: l, nextTick: c, vm: i }) => {
1216
+ var r;
1217
+ const b = () => {
1218
+ var n;
1219
+ if (t.propItem.label) {
1220
+ const { placeholder: f, type: s } = t.prevItem;
1221
+ f ? l.setPlaceholder(f) : s === "map" ? l.setPlaceholder(Y("tvp.tvpSearchbox.tagPlaceholder")) : (n = t.backupList) != null && n.length ? l.setPlaceholder(Y("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: t.propItem.label })) : l.setPlaceholder(Y("tvp.tvpSearchbox.addPlaceholder"));
1221
1222
  } else
1222
- s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder"));
1223
- }, i = () => {
1224
- var o, f, d;
1225
- return (o = r == null ? void 0 : r.$i18n) != null && o.locale ? r.$i18n.locale : (d = (f = r == null ? void 0 : r.proxy) == null ? void 0 : f.$i18n) != null && d.locale ? r.proxy.$i18n.locale : me();
1223
+ l.setPlaceholder(Y("tvp.tvpSearchbox.addPlaceholder"));
1224
+ }, v = () => {
1225
+ var n, f, s;
1226
+ return (n = i == null ? void 0 : i.$i18n) != null && n.locale ? i.$i18n.locale : (s = (f = i == null ? void 0 : i.proxy) == null ? void 0 : f.$i18n) != null && s.locale ? i.proxy.$i18n.locale : Le();
1226
1227
  };
1227
- let l = i();
1228
- if (r != null && r.$i18n)
1228
+ let d = v();
1229
+ if (i != null && i.$i18n)
1229
1230
  try {
1230
- r.$watch(
1231
- () => r.$i18n.locale,
1232
- (o) => {
1233
- o !== l && (l = o, c());
1231
+ i.$watch(
1232
+ () => i.$i18n.locale,
1233
+ (n) => {
1234
+ n !== d && (d = n, b());
1234
1235
  },
1235
1236
  { immediate: !1 }
1236
1237
  );
1237
- } catch (o) {
1238
- console.warn("[TinySearchBox] Unable to watch i18n.locale via vm.$watch:", o);
1238
+ } catch (n) {
1239
+ console.warn("[TinySearchBox] Unable to watch i18n.locale via vm.$watch:", n);
1239
1240
  }
1240
- if ((m = r == null ? void 0 : r.proxy) != null && m.$i18n)
1241
+ if ((r = i == null ? void 0 : i.proxy) != null && r.$i18n)
1241
1242
  try {
1242
- a(
1243
- () => r.proxy.$i18n.locale,
1244
- (o) => {
1245
- o !== l && (l = o, c());
1243
+ e(
1244
+ () => i.proxy.$i18n.locale,
1245
+ (n) => {
1246
+ n !== d && (d = n, b());
1246
1247
  },
1247
1248
  { immediate: !1 }
1248
1249
  );
1249
- } catch (o) {
1250
- console.warn("[TinySearchBox] Unable to watch i18n.locale via watch:", o);
1250
+ } catch (n) {
1251
+ console.warn("[TinySearchBox] Unable to watch i18n.locale via watch:", n);
1251
1252
  }
1252
- const u = () => {
1253
- const o = i();
1254
- o !== l && (l = o, c());
1253
+ const p = () => {
1254
+ const n = v();
1255
+ n !== d && (d = n, b());
1255
1256
  };
1256
- typeof window < "u" && (e.localeCheckInterval = setInterval(u, 200)), a(
1257
- () => t.modelValue,
1257
+ typeof window < "u" && (t.localeCheckInterval = setInterval(p, 200)), e(
1258
+ () => o.modelValue,
1258
1259
  () => {
1259
- u();
1260
- }
1261
- ), a(
1262
- () => t.items,
1263
- (o) => {
1264
- const f = e.visible, d = e.prevItem && e.prevItem.field;
1265
- e.recordItems = j(o), s.initItems(), s.initFormRule(), n(() => {
1266
- if (s.initItems(), s.initFormRule(), f && e.propItem.label) {
1267
- const p = e.recordItems.find((b) => b.field === d) || e.prevItem;
1268
- e.prevItem = p || {}, e.backupList = p && p.options ? [...p.options] : [], e.filterList = e.backupList ? [...e.backupList] : [], k(e);
1260
+ p();
1261
+ }
1262
+ ), e(
1263
+ () => o.items,
1264
+ (n) => {
1265
+ const f = t.visible, s = t.prevItem && t.prevItem.field;
1266
+ t.recordItems = ne(n), l.initItems(), l.initFormRule(), c(() => {
1267
+ if (l.initItems(), l.initFormRule(), f && t.propItem.label) {
1268
+ const u = t.recordItems.find((a) => a.field === s) || t.prevItem;
1269
+ t.prevItem = u || {}, t.backupList = u && u.options ? [...u.options] : [], t.filterList = t.backupList ? [...t.backupList] : [], _(t);
1269
1270
  }
1270
1271
  });
1271
1272
  },
@@ -1273,66 +1274,66 @@ const Nt = (a) => {
1273
1274
  deep: !0,
1274
1275
  immediate: !0
1275
1276
  }
1276
- ), a(
1277
- () => e.inputValue,
1278
- (o) => {
1279
- !o && !e.propItem.type && (e.visible = !1);
1277
+ ), e(
1278
+ () => t.inputValue,
1279
+ (n) => {
1280
+ !n && !t.propItem.type && (t.visible = !1);
1280
1281
  },
1281
1282
  {
1282
1283
  immediate: !0
1283
1284
  }
1284
- ), a(
1285
- () => e.popoverVisible,
1286
- (o) => {
1287
- !o && !e.inputEditValue.length && (e.prevItem && e.prevItem.mergeTag ? e.inputEditValue = Array.isArray(e.currentEditSelectTags) ? e.currentEditSelectTags : [] : e.inputEditValue = Array.isArray(e.currentEditSelectTags) ? e.currentEditSelectTags.join(",") : e.currentEditSelectTags || ""), o || (e.hasFormError = !1);
1285
+ ), e(
1286
+ () => t.popoverVisible,
1287
+ (n) => {
1288
+ !n && !t.inputEditValue.length && (t.prevItem && t.prevItem.mergeTag ? t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags : [] : t.inputEditValue = Array.isArray(t.currentEditSelectTags) ? t.currentEditSelectTags.join(",") : t.currentEditSelectTags || ""), n || (t.hasFormError = !1);
1288
1289
  },
1289
1290
  {
1290
1291
  immediate: !0
1291
1292
  }
1292
- ), a(
1293
+ ), e(
1293
1294
  () => {
1294
- const o = {
1295
- inputEditValue: e.inputEditValue,
1296
- startDate: e.startDate,
1297
- endDate: e.endDate,
1298
- startDateTime: e.startDateTime,
1299
- endDateTime: e.endDateTime
1295
+ const n = {
1296
+ inputEditValue: t.inputEditValue,
1297
+ startDate: t.startDate,
1298
+ endDate: t.endDate,
1299
+ startDateTime: t.startDateTime,
1300
+ endDateTime: t.endDateTime
1300
1301
  };
1301
- return e.curMinNumVar && e.curMaxNumVar && (o[e.curMinNumVar] = e[e.curMinNumVar], o[e.curMaxNumVar] = e[e.curMaxNumVar]), o;
1302
+ return t.curMinNumVar && t.curMaxNumVar && (n[t.curMinNumVar] = t[t.curMinNumVar], n[t.curMaxNumVar] = t[t.curMaxNumVar]), n;
1302
1303
  },
1303
1304
  () => {
1304
- e.popoverVisible && n(() => {
1305
- s.checkFormValidation();
1305
+ t.popoverVisible && c(() => {
1306
+ l.checkFormValidation();
1306
1307
  });
1307
1308
  },
1308
1309
  { deep: !0 }
1309
- ), a(
1310
- () => e.propItem.label,
1311
- (o) => {
1312
- c();
1313
- }
1314
- ), a(
1315
- () => t.modelValue,
1316
- (o) => {
1317
- if (o) {
1318
- if (e.indexMap.clear(), e.valueMap.clear(), o.forEach((f, d) => {
1319
- var b;
1320
- const p = `${f.label}${f.value}`;
1321
- e.indexMap.set(f.label, d), e.valueMap.set(p, d), ((b = f.options) == null ? void 0 : b.length) > 0 && f.options.forEach((h) => {
1322
- const v = `${f.label}${h.label}`;
1323
- e.valueMap.set(v, d);
1310
+ ), e(
1311
+ () => t.propItem.label,
1312
+ (n) => {
1313
+ b();
1314
+ }
1315
+ ), e(
1316
+ () => o.modelValue,
1317
+ (n) => {
1318
+ if (n) {
1319
+ if (t.indexMap.clear(), t.valueMap.clear(), n.forEach((f, s) => {
1320
+ var a;
1321
+ const u = `${f.label}${f.value}`;
1322
+ t.indexMap.set(f.label, s), t.valueMap.set(u, s), ((a = f.options) == null ? void 0 : a.length) > 0 && f.options.forEach((m) => {
1323
+ const g = `${f.label}${m.label}`;
1324
+ t.valueMap.set(g, s);
1324
1325
  });
1325
- }), Q(e, !1), o.length === 0 && s.setPlaceholder(N("tvp.tvpSearchbox.addPlaceholder")), t.editable && !e.inputEditValue.length && o[0]) {
1326
- const f = o[0];
1327
- if ((e.recordItems.find((p) => p.field === f.field) || f).mergeTag && f.options) {
1328
- const p = f.options.flatMap((b) => b.label) || [];
1329
- e.inputEditValue = p, e.currentEditSelectTags = p;
1326
+ }), de(t, !1), n.length === 0 && l.setPlaceholder(Y("tvp.tvpSearchbox.addPlaceholder")), o.editable && !t.inputEditValue.length && n[0]) {
1327
+ const f = n[0];
1328
+ if ((t.recordItems.find((u) => u.field === f.field) || f).mergeTag && f.options) {
1329
+ const u = f.options.flatMap((a) => a.label) || [];
1330
+ t.inputEditValue = u, t.currentEditSelectTags = u;
1330
1331
  } else {
1331
- const p = f.value;
1332
- e.inputEditValue = Array.isArray(p) ? p.join(",") : p || "";
1332
+ const u = f.value;
1333
+ t.inputEditValue = Array.isArray(u) ? u.join(",") : u || "";
1333
1334
  }
1334
1335
  }
1335
- e.innerModelValue = [...o];
1336
+ t.innerModelValue = [...n];
1336
1337
  }
1337
1338
  },
1338
1339
  {
@@ -1340,199 +1341,34 @@ const Nt = (a) => {
1340
1341
  immediate: !0
1341
1342
  }
1342
1343
  );
1343
- };
1344
- var Ut = function() {
1345
- var a, e, t = this, s = t.$createElement, n = t._self._c || s;
1346
- return n("div", {
1347
- attrs: {
1348
- tiny_mode: "pc"
1349
- }
1350
- }, [n("tiny-dropdown-item", {
1351
- directives: [{
1352
- name: "show",
1353
- rawName: "v-show",
1354
- value: t.state.inputValue.trim(),
1355
- expression: "state.inputValue.trim()"
1356
- }],
1357
- staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
1358
- attrs: {
1359
- "item-data": {
1360
- label: t.state.inputValue
1361
- }
1362
- },
1363
- on: {
1364
- "item-click": function() {
1365
- return t.selectInputValue(t.state.inputValue);
1366
- }
1367
- }
1368
- }, [n("span", [t._v(" " + t._s(t.t("tvp.tvpSearchbox.initUse")) + """ + t._s(t.state.inputValue) + """)])]), n("div", {
1369
- directives: [{
1370
- name: "show",
1371
- rawName: "v-show",
1372
- value: !t.state.propItem.label && ((a = t.state.inputValue) === null || a === void 0 ? void 0 : a.trim()),
1373
- expression: "!state.propItem.label && state.inputValue?.trim()"
1374
- }]
1375
- }, [t._l(t.state.matchItems, function(r, c) {
1376
- return n("div", {
1377
- key: c
1378
- }, [r.attr.length ? n("div", [n("span", {
1379
- staticClass: "tvp-search-box__filter-type"
1380
- }, [t._v(t._s(c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c))]), t._l(r.attr, function(i, l) {
1381
- return n("tiny-dropdown-item", {
1382
- key: i.label + l,
1383
- staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1384
- attrs: {
1385
- "item-data": i
1386
- },
1387
- on: {
1388
- "item-click": function() {
1389
- return t.selectPropItem(i);
1390
- }
1391
- }
1392
- }, [n("span", t._l(i.match, function(u) {
1393
- return n("span", {
1394
- key: u
1395
- }, [u.toLowerCase() === i.hightlighStr ? n("span", {
1396
- staticClass: "tvp-search-box__text-highlight"
1397
- }, [t._v(t._s(u))]) : n("span", [t._v(t._s(u))])]);
1398
- }), 0)]);
1399
- })], 2) : t._e(), r.attrValue.length ? [n("span", {
1400
- staticClass: "tvp-search-box__filter-type"
1401
- }, [t._v(t._s(t.t("tvp.tvpSearchbox.propertyValue", [c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c])))]), t._l(r.attrValue, function(i, l) {
1402
- return n("tiny-dropdown-item", {
1403
- key: i.label + l,
1404
- staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1405
- attrs: {
1406
- disabled: i.isChecked,
1407
- "item-data": i
1408
- },
1409
- on: {
1410
- "item-click": function() {
1411
- return t.selectRadioItem(i, !0);
1412
- }
1413
- }
1414
- }, [n("span", t._l(i.match, function(u) {
1415
- return n("span", {
1416
- key: u
1417
- }, [u.toLowerCase() === i.hightlighStr ? n("span", {
1418
- staticClass: "tvp-search-box__text-highlight"
1419
- }, [t._v(t._s(u))]) : n("span", [t._v(t._s(u))])]);
1420
- }), 0)]);
1421
- })] : t._e()], 2);
1422
- }), n("div", {
1423
- directives: [{
1424
- name: "show",
1425
- rawName: "v-show",
1426
- value: t.state.potentialOptions,
1427
- expression: "state.potentialOptions"
1428
- }]
1429
- }, [n("span", {
1430
- staticClass: "tvp-search-box__filter-type"
1431
- }, [t._v(t._s(t.t("tvp.tvpSearchbox.matched")))]), n("div", {
1432
- staticClass: "tvp-search-box__potential-box",
1433
- attrs: {
1434
- id: "potential-loading"
1435
- }
1436
- }, [t.state.potentialOptions ? n("div", t._l(t.state.potentialOptions, function(r, c) {
1437
- return n("tiny-dropdown-item", {
1438
- key: r.label + c,
1439
- staticClass: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1440
- attrs: {
1441
- "item-data": r
1442
- },
1443
- on: {
1444
- "item-click": function() {
1445
- return t.selectRadioItem(r, !0);
1446
- }
1447
- }
1448
- }, [t._v(" " + t._s(r.label) + ": "), n("span", {
1449
- staticClass: "tvp-search-box__text-highlight"
1450
- }, [t._v(t._s(r.value))])]);
1451
- }), 1) : t._e()])])], 2), n("div", {
1452
- directives: [{
1453
- name: "show",
1454
- rawName: "v-show",
1455
- value: t.state.visible && !t.state.propItem.label && !((e = t.state.inputValue) !== null && e !== void 0 && e.trim()),
1456
- expression: "state.visible && !state.propItem.label && !state.inputValue?.trim()"
1457
- }],
1458
- staticClass: "tvp-search-box__first-panel"
1459
- }, t._l(t.state.groupItems, function(r, c) {
1460
- return n("div", {
1461
- key: c
1462
- }, [r.length ? n("span", {
1463
- staticClass: "tvp-search-box__filter-type"
1464
- }, [t._v(t._s(c === "0" ? t.t("tvp.tvpSearchbox.attributeType") : c))]) : t._e(), t._l(r, function(i, l) {
1465
- return n("tiny-dropdown-item", {
1466
- key: (i.field || i.label) + l,
1467
- staticClass: "tvp-search-box__dropdown-item",
1468
- attrs: {
1469
- "item-data": i
1470
- },
1471
- on: {
1472
- "item-click": function() {
1473
- return t.selectPropItem(i);
1474
- }
1475
- }
1476
- }, [n("span", {
1477
- attrs: {
1478
- title: i.label
1479
- }
1480
- }, [t._v(t._s(i.label))])]);
1481
- })], 2);
1482
- }), 0)], 1);
1483
- }, qt = [];
1484
- function fe(a, e, t, s, n, r, c, i) {
1485
- var l = typeof a == "function" ? a.options : a;
1486
- e && (l.render = e, l.staticRenderFns = t, l._compiled = !0), s && (l.functional = !0), r && (l._scopeId = "data-v-" + r);
1487
- var u;
1488
- if (c ? (u = function(f) {
1489
- f = f || // cached call
1490
- this.$vnode && this.$vnode.ssrContext || // stateful
1491
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), n && n.call(this, f), f && f._registeredComponents && f._registeredComponents.add(c);
1492
- }, l._ssrRegister = u) : n && (u = i ? function() {
1493
- n.call(
1494
- this,
1495
- (l.functional ? this.parent : this).$root.$options.shadowRoot
1496
- );
1497
- } : n), u)
1498
- if (l.functional) {
1499
- l._injectStyles = u;
1500
- var m = l.render;
1501
- l.render = function(d, p) {
1502
- return u.call(p), m(d, p);
1503
- };
1504
- } else {
1505
- var o = l.beforeCreate;
1506
- l.beforeCreate = o ? [].concat(o, u) : [u];
1507
- }
1508
- return {
1509
- exports: a,
1510
- options: l
1511
- };
1512
- }
1513
- const Zt = (a, e, { emit: t }) => {
1514
- const s = a.handleEvents || a.events || ((i, l, u) => {
1515
- t("events", i, l, u);
1344
+ }, _e = (e, t) => {
1345
+ const o = e.__vccOpts || e;
1346
+ for (const [l, c] of t)
1347
+ o[l] = c;
1348
+ return o;
1349
+ }, uo = (e, t, { emit: o }) => {
1350
+ const l = e.handleEvents || e.events || ((v, d, p) => {
1351
+ o("events", v, d, p);
1516
1352
  });
1517
1353
  return {
1518
- selectInputValue: (i) => {
1519
- s("selectInputValue", i);
1354
+ selectInputValue: (v) => {
1355
+ l("selectInputValue", v);
1520
1356
  },
1521
- selectPropItem: (i) => {
1522
- s("selectPropItem", i);
1357
+ selectPropItem: (v) => {
1358
+ l("selectPropItem", v);
1523
1359
  },
1524
- selectRadioItem: (i, l) => {
1525
- s("selectRadioItem", i, l);
1360
+ selectRadioItem: (v, d) => {
1361
+ l("selectRadioItem", v, d);
1526
1362
  },
1527
- t: N
1363
+ t: Y
1528
1364
  };
1529
- }, Yt = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], Wt = X({
1530
- name: pe + "SearchBoxFirstLevelPanel",
1365
+ }, co = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], mo = be({
1366
+ name: Me + "SearchBoxFirstLevelPanel",
1531
1367
  components: {
1532
- TinyDropdownItem: Ie
1368
+ TinyDropdownItem: Be
1533
1369
  },
1534
1370
  props: {
1535
- ...J,
1371
+ ...ve,
1536
1372
  state: {
1537
1373
  type: Object,
1538
1374
  default: () => ({})
@@ -1551,476 +1387,161 @@ const Zt = (a, e, { emit: t }) => {
1551
1387
  }
1552
1388
  },
1553
1389
  emits: ["events"],
1554
- setup(a, e) {
1555
- return ue({ props: a, context: e, renderless: Zt, api: Yt });
1390
+ setup(e, t) {
1391
+ return Ee({ props: e, context: t, renderless: uo, api: co });
1556
1392
  }
1557
- }), ve = {};
1558
- var Qt = /* @__PURE__ */ fe(
1559
- Wt,
1560
- Ut,
1561
- qt,
1562
- !1,
1563
- Xt,
1564
- null,
1565
- null,
1566
- null
1567
- );
1568
- function Xt(a) {
1569
- for (let e in ve)
1570
- this[e] = ve[e];
1393
+ }), fo = { tiny_mode: "pc" }, ho = { key: 0 }, bo = { class: "tvp-search-box__filter-type" }, vo = {
1394
+ key: 0,
1395
+ class: "tvp-search-box__text-highlight"
1396
+ }, go = { key: 1 }, yo = { class: "tvp-search-box__filter-type" }, Vo = {
1397
+ key: 0,
1398
+ class: "tvp-search-box__text-highlight"
1399
+ }, ko = { key: 1 }, Io = { class: "tvp-search-box__filter-type" }, wo = {
1400
+ id: "potential-loading",
1401
+ class: "tvp-search-box__potential-box"
1402
+ }, To = { key: 0 }, So = { class: "tvp-search-box__text-highlight" }, Do = { class: "tvp-search-box__first-panel" }, Co = {
1403
+ key: 0,
1404
+ class: "tvp-search-box__filter-type"
1405
+ }, Mo = ["title"];
1406
+ function Eo(e, t, o, l, c, i) {
1407
+ var v, d;
1408
+ const b = N("tiny-dropdown-item");
1409
+ return y(), S("div", fo, [
1410
+ j(D(b, {
1411
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
1412
+ "item-data": { label: e.state.inputValue },
1413
+ onItemClick: t[0] || (t[0] = () => e.selectInputValue(e.state.inputValue))
1414
+ }, {
1415
+ default: C(() => [
1416
+ M("span", null, k(e.t("tvp.tvpSearchbox.initUse")) + """ + k(e.state.inputValue) + """, 1)
1417
+ ]),
1418
+ _: 1
1419
+ }, 8, ["item-data"]), [
1420
+ [G, e.state.inputValue.trim()]
1421
+ ]),
1422
+ j(M("div", null, [
1423
+ (y(!0), S(B, null, z(e.state.matchItems, (p, r) => (y(), S("div", { key: r }, [
1424
+ p.attr.length ? (y(), S("div", ho, [
1425
+ M("span", bo, k(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1),
1426
+ (y(!0), S(B, null, z(p.attr, (n, f) => (y(), F(b, {
1427
+ key: n.label + f,
1428
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1429
+ "item-data": n,
1430
+ onItemClick: () => e.selectPropItem(n)
1431
+ }, {
1432
+ default: C(() => [
1433
+ M("span", null, [
1434
+ (y(!0), S(B, null, z(n.match, (s) => (y(), S("span", { key: s }, [
1435
+ s.toLowerCase() === n.hightlighStr ? (y(), S("span", vo, k(s), 1)) : (y(), S("span", go, k(s), 1))
1436
+ ]))), 128))
1437
+ ])
1438
+ ]),
1439
+ _: 2
1440
+ }, 1032, ["item-data", "onItemClick"]))), 128))
1441
+ ])) : H("", !0),
1442
+ p.attrValue.length ? (y(), S(B, { key: 1 }, [
1443
+ M("span", yo, k(e.t("tvp.tvpSearchbox.propertyValue", [r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r])), 1),
1444
+ (y(!0), S(B, null, z(p.attrValue, (n, f) => (y(), F(b, {
1445
+ key: n.label + f,
1446
+ disabled: n.isChecked,
1447
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1448
+ "item-data": n,
1449
+ onItemClick: () => e.selectRadioItem(n, !0)
1450
+ }, {
1451
+ default: C(() => [
1452
+ M("span", null, [
1453
+ (y(!0), S(B, null, z(n.match, (s) => (y(), S("span", { key: s }, [
1454
+ s.toLowerCase() === n.hightlighStr ? (y(), S("span", Vo, k(s), 1)) : (y(), S("span", ko, k(s), 1))
1455
+ ]))), 128))
1456
+ ])
1457
+ ]),
1458
+ _: 2
1459
+ }, 1032, ["disabled", "item-data", "onItemClick"]))), 128))
1460
+ ], 64)) : H("", !0)
1461
+ ]))), 128)),
1462
+ j(M("div", null, [
1463
+ M("span", Io, k(e.t("tvp.tvpSearchbox.matched")), 1),
1464
+ M("div", wo, [
1465
+ e.state.potentialOptions ? (y(), S("div", To, [
1466
+ (y(!0), S(B, null, z(e.state.potentialOptions, (p, r) => (y(), F(b, {
1467
+ key: p.label + r,
1468
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
1469
+ "item-data": p,
1470
+ onItemClick: () => e.selectRadioItem(p, !0)
1471
+ }, {
1472
+ default: C(() => [
1473
+ K(k(p.label) + ": ", 1),
1474
+ M("span", So, k(p.value), 1)
1475
+ ]),
1476
+ _: 2
1477
+ }, 1032, ["item-data", "onItemClick"]))), 128))
1478
+ ])) : H("", !0)
1479
+ ])
1480
+ ], 512), [
1481
+ [G, e.state.potentialOptions]
1482
+ ])
1483
+ ], 512), [
1484
+ [G, !e.state.propItem.label && ((v = e.state.inputValue) == null ? void 0 : v.trim())]
1485
+ ]),
1486
+ j(M("div", Do, [
1487
+ (y(!0), S(B, null, z(e.state.groupItems, (p, r) => (y(), S("div", { key: r }, [
1488
+ p.length ? (y(), S("span", Co, k(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1)) : H("", !0),
1489
+ (y(!0), S(B, null, z(p, (n, f) => (y(), F(b, {
1490
+ key: (n.field || n.label) + f,
1491
+ class: "tvp-search-box__dropdown-item",
1492
+ "item-data": n,
1493
+ onItemClick: () => e.selectPropItem(n)
1494
+ }, {
1495
+ default: C(() => [
1496
+ M("span", {
1497
+ title: n.label
1498
+ }, k(n.label), 9, Mo)
1499
+ ]),
1500
+ _: 2
1501
+ }, 1032, ["item-data", "onItemClick"]))), 128))
1502
+ ]))), 128))
1503
+ ], 512), [
1504
+ [G, e.state.visible && !e.state.propItem.label && !((d = e.state.inputValue) != null && d.trim())]
1505
+ ])
1506
+ ]);
1571
1507
  }
1572
- const Jt = /* @__PURE__ */ function() {
1573
- return Qt.exports;
1574
- }();
1575
- var ea = function() {
1576
- var a, e = this, t = e.$createElement, s = e._self._c || t;
1577
- return s("div", {
1578
- attrs: {
1579
- tiny_mode: "pc"
1580
- }
1581
- }, [(a = e.state.currentOperators) !== null && a !== void 0 && a.length ? s("div", [s("span", {
1582
- staticClass: "tvp-search-box__filter-type"
1583
- }, [e._v(e._s(e.t("tvp.tvpSearchbox.operator")))]), e._l(e.state.currentOperators, function(n, r) {
1584
- return s("tiny-dropdown-item", {
1585
- directives: [{
1586
- name: "show",
1587
- rawName: "v-show",
1588
- value: n.includes(e.state.inputValue),
1589
- expression: "item.includes(state.inputValue)"
1590
- }],
1591
- key: n + r,
1592
- staticClass: "tvp-search-box__dropdown-item",
1593
- attrs: {
1594
- "item-data": {
1595
- label: n
1596
- }
1597
- },
1598
- on: {
1599
- "item-click": function() {
1600
- return e.setOperator(n);
1601
- }
1602
- }
1603
- }, [e._v(" " + e._s(n) + " ")]);
1604
- })], 2) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ? s("div", {
1605
- directives: [{
1606
- name: "loading",
1607
- rawName: "v-loading",
1608
- value: e.isLoading,
1609
- expression: "isLoading"
1610
- }],
1611
- class: ["tvp-search-box__radio-wrap", e.isLoading && "tvp-search-box__loading-box"]
1612
- }, e._l(e.state.backupList, function(n, r) {
1613
- return s("tiny-dropdown-item", {
1614
- directives: [{
1615
- name: "show",
1616
- rawName: "v-show",
1617
- value: !n.isFilter || !e.state.inputValue,
1618
- expression: "!item.isFilter || !state.inputValue"
1619
- }],
1620
- key: r + (n.field || n.label),
1621
- staticClass: "tvp-search-box__dropdown-item",
1622
- attrs: {
1623
- disabled: n.isChecked,
1624
- "item-data": n
1625
- },
1626
- on: {
1627
- "item-click": function() {
1628
- return e.selectRadioItem(n);
1629
- }
1630
- }
1631
- }, [n.match ? s("span", {
1632
- attrs: {
1633
- title: n.label
1634
- }
1635
- }, e._l(n.match, function(c) {
1636
- return s("span", {
1637
- key: c
1638
- }, [c.toLowerCase() === n.hightlighStr ? s("span", {
1639
- staticClass: "tvp-search-box__text-highlight"
1640
- }, [e._v(e._s(c))]) : s("span", [e._v(e._s(c))])]);
1641
- }), 0) : s("span", {
1642
- attrs: {
1643
- title: n.label
1644
- }
1645
- }, [e._v(e._s(n.label))])]);
1646
- }), 1) : e.state.prevItem.type === "checkbox" ? s("div", {
1647
- directives: [{
1648
- name: "loading",
1649
- rawName: "v-loading",
1650
- value: e.isLoading,
1651
- expression: "isLoading"
1652
- }],
1653
- class: e.isLoading && "tvp-search-box__loading-box"
1654
- }, [e.showCheckBoxList ? s("div", [s("div", {
1655
- staticClass: "tvp-search-box__checkbox-wrap"
1656
- }, [s("tiny-checkbox-group", {
1657
- staticClass: "tvp-search-box__checkbox",
1658
- model: {
1659
- value: e.state.checkAll,
1660
- callback: function(n) {
1661
- e.$set(e.state, "checkAll", n);
1662
- },
1663
- expression: "state.checkAll"
1664
- }
1665
- }, [s("tiny-dropdown-item", {
1666
- staticClass: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
1667
- }, [s("tiny-checkbox", {
1668
- attrs: {
1669
- indeterminate: e.state.isIndeterminate
1670
- },
1671
- model: {
1672
- value: e.state.checkAll,
1673
- callback: function(n) {
1674
- e.$set(e.state, "checkAll", n);
1675
- },
1676
- expression: "state.checkAll"
1677
- }
1678
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.selectAll")) + " ")])], 1)], 1), s("tiny-checkbox-group", {
1679
- staticClass: "tvp-search-box__checkbox",
1680
- model: {
1681
- value: e.state.checkboxGroup,
1682
- callback: function(n) {
1683
- e.$set(e.state, "checkboxGroup", n);
1684
- },
1685
- expression: "state.checkboxGroup"
1686
- }
1687
- }, e._l(e.state.backupList, function(n, r) {
1688
- return s("tiny-dropdown-item", {
1689
- directives: [{
1690
- name: "show",
1691
- rawName: "v-show",
1692
- value: !n.isFilter,
1693
- expression: "!item.isFilter"
1694
- }],
1695
- key: (n.field || n.label) + r,
1696
- staticClass: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
1697
- }, [s("tiny-checkbox", {
1698
- staticClass: "tvp-search-box__checkbox-item-label",
1699
- attrs: {
1700
- label: e.state.prevItem.label + n.label,
1701
- title: n.label
1702
- }
1703
- }, [e._v(" " + e._s(n.label) + " ")])], 1);
1704
- }), 1)], 1), s("div", {
1705
- staticClass: "tvp-search-box__checkbox-btn"
1706
- }, [s("tiny-button", {
1707
- attrs: {
1708
- size: "mini"
1709
- },
1710
- on: {
1711
- click: function(n) {
1712
- return e.selectCheckbox(!1);
1713
- }
1714
- }
1715
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.cancel")) + " ")]), s("tiny-button", {
1716
- attrs: {
1717
- size: "mini"
1718
- },
1719
- on: {
1720
- click: function(n) {
1721
- return e.selectCheckbox(!0);
1722
- }
1723
- }
1724
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e._e()]) : e.state.prevItem.type === "numRange" ? s("div", {
1725
- staticClass: "tvp-search-box__panel-box"
1726
- }, [s("div", {
1727
- staticClass: "tvp-search-box__number"
1728
- }, [s("div", {
1729
- staticClass: "tvp-search-box__dropdown-title"
1730
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.rangeNumberTitle")) + " ")]), s("div", {
1731
- staticClass: "tvp-search-box__dropdown-start"
1732
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.minValueText")) + "(" + e._s(e.state.prevItem.unit) + ") ")]), s("tiny-form-item", {
1733
- staticClass: "tvp-search-box__number-item",
1734
- attrs: {
1735
- prop: e.state.curMinNumVar,
1736
- "show-message": e.state.numberShowMessage
1737
- }
1738
- }, [s("tiny-input", {
1739
- staticClass: "tvp-search-box__number-input",
1740
- attrs: {
1741
- type: "number"
1742
- },
1743
- model: {
1744
- value: e.state[e.state.curMinNumVar],
1745
- callback: function(n) {
1746
- e.$set(e.state, e.state.curMinNumVar, n);
1747
- },
1748
- expression: "state[state.curMinNumVar]"
1749
- }
1750
- })], 1), s("div", {
1751
- staticClass: "tvp-search-box__dropdown-end"
1752
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + e._s(e.state.prevItem.unit) + ") ")]), s("tiny-form-item", {
1753
- staticClass: "tvp-search-box__number-item",
1754
- attrs: {
1755
- prop: e.state.curMaxNumVar
1756
- }
1757
- }, [s("tiny-input", {
1758
- staticClass: "tvp-search-box__number-input",
1759
- attrs: {
1760
- type: "number"
1761
- },
1762
- model: {
1763
- value: e.state[e.state.curMaxNumVar],
1764
- callback: function(n) {
1765
- e.$set(e.state, e.state.curMaxNumVar, n);
1766
- },
1767
- expression: "state[state.curMaxNumVar]"
1768
- }
1769
- })], 1)], 1), s("div", {
1770
- staticClass: "tvp-search-box__bottom-btn"
1771
- }, [s("tiny-button", {
1772
- attrs: {
1773
- size: "mini"
1774
- },
1775
- on: {
1776
- click: function(n) {
1777
- return e.sizeChange(!1);
1778
- }
1779
- }
1780
- }, [e._v(e._s(e.t("tvp.tvpSearchbox.cancel")))]), s("tiny-button", {
1781
- attrs: {
1782
- size: "mini"
1783
- },
1784
- on: {
1785
- click: function(n) {
1786
- return n.stopPropagation(), e.sizeChange(!0);
1787
- }
1788
- }
1789
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e.state.prevItem.type === "dateRange" ? s("div", {
1790
- staticClass: "tvp-search-box__panel-box"
1791
- }, [s("div", {
1792
- staticClass: "tvp-search-box__date-wrap"
1793
- }, [s("div", {
1794
- staticClass: "tvp-search-box__dropdown-title"
1795
- }, [e._v(" " + e._s(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1796
- value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1797
- }) : e.t("tvp.tvpSearchbox.rangeDateTitle")) + " ")]), s("div", {
1798
- staticClass: "tvp-search-box__dropdown-start"
1799
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.rangeBeginLabel")) + " ")]), s("tiny-form-item", {
1800
- staticClass: "tvp-search-box__date-item",
1801
- attrs: {
1802
- prop: "startDate",
1803
- "show-message": !!e.state.prevItem.maxTimeLength
1804
- }
1805
- }, [s("tiny-date-picker", {
1806
- staticClass: "tvp-search-box__date-picker",
1807
- attrs: {
1808
- format: e.state.prevItem.format || e.state.dateRangeFormat,
1809
- "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1810
- "picker-options": e.pickerOptions(e.state.startDate, "endDate")
1811
- },
1812
- on: {
1813
- "visible-change": e.handleDateShow
1814
- },
1815
- model: {
1816
- value: e.state.startDate,
1817
- callback: function(n) {
1818
- e.$set(e.state, "startDate", n);
1819
- },
1820
- expression: "state.startDate"
1821
- }
1822
- })], 1), s("div", {
1823
- staticClass: "tvp-search-box__dropdown-end"
1824
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.rangeEndLabel")) + " ")]), s("tiny-form-item", {
1825
- staticClass: "tvp-search-box__date-item",
1826
- attrs: {
1827
- prop: "endDate"
1828
- }
1829
- }, [s("tiny-date-picker", {
1830
- staticClass: "tvp-search-box__date-picker",
1831
- attrs: {
1832
- format: e.state.prevItem.format || e.state.dateRangeFormat,
1833
- "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1834
- "picker-options": e.pickerOptions(e.state.startDate)
1835
- },
1836
- on: {
1837
- change: e.handleDateShow,
1838
- blur: e.handleDateShow
1839
- },
1840
- model: {
1841
- value: e.state.endDate,
1842
- callback: function(n) {
1843
- e.$set(e.state, "endDate", n);
1844
- },
1845
- expression: "state.endDate"
1846
- }
1847
- })], 1)], 1), s("div", {
1848
- staticClass: "tvp-search-box__bottom-btn"
1849
- }, [s("tiny-button", {
1850
- attrs: {
1851
- size: "mini"
1852
- },
1853
- on: {
1854
- click: function(n) {
1855
- return e.onConfirmDate(!1);
1856
- }
1857
- }
1858
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.cancel")) + " ")]), s("tiny-button", {
1859
- attrs: {
1860
- size: "mini"
1861
- },
1862
- on: {
1863
- click: function(n) {
1864
- return e.onConfirmDate(!0);
1865
- }
1866
- }
1867
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e.state.prevItem.type === "datetimeRange" ? s("div", {
1868
- staticClass: "tvp-search-box__panel-box"
1869
- }, [s("div", {
1870
- staticClass: "tvp-search-box__date-wrap"
1871
- }, [s("div", {
1872
- staticClass: "tvp-search-box__dropdown-title"
1873
- }, [e._v(" " + e._s(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1874
- value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1875
- }) : e.t("tvp.tvpSearchbox.rangeDateTitle")) + " ")]), s("div", {
1876
- staticClass: "tvp-search-box__dropdown-start"
1877
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.rangeBeginLabel")) + " ")]), s("tiny-form-item", {
1878
- staticClass: "tvp-search-box__date-item",
1879
- attrs: {
1880
- prop: "startDateTime",
1881
- "show-message": !!e.state.prevItem.maxTimeLength
1882
- }
1883
- }, [s("tiny-date-picker", {
1884
- staticClass: "tvp-search-box__date-picker",
1885
- attrs: {
1886
- type: "datetime",
1887
- isutc8: !0,
1888
- format: e.state.prevItem.format || e.state.datetimeRangeFormat,
1889
- "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
1890
- "picker-options": e.pickerOptions(e.state.startDateTime, "endDateTime")
1891
- },
1892
- on: {
1893
- change: e.handleDateShow,
1894
- blur: e.handleDateShow
1895
- },
1896
- model: {
1897
- value: e.state.startDateTime,
1898
- callback: function(n) {
1899
- e.$set(e.state, "startDateTime", n);
1900
- },
1901
- expression: "state.startDateTime"
1902
- }
1903
- })], 1), s("div", {
1904
- staticClass: "tvp-search-box__dropdown-end"
1905
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.rangeEndLabel")) + " ")]), s("tiny-form-item", {
1906
- staticClass: "tvp-search-box__date-item",
1907
- attrs: {
1908
- prop: "endDateTime"
1909
- }
1910
- }, [s("tiny-date-picker", {
1911
- staticClass: "tvp-search-box__date-picker",
1912
- attrs: {
1913
- type: "datetime",
1914
- isutc8: !0,
1915
- format: e.state.prevItem.format || e.state.datetimeRangeFormat,
1916
- "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
1917
- "picker-options": e.pickerOptions(e.state.startDateTime)
1918
- },
1919
- on: {
1920
- change: e.handleDateShow,
1921
- blur: e.handleDateShow
1922
- },
1923
- model: {
1924
- value: e.state.endDateTime,
1925
- callback: function(n) {
1926
- e.$set(e.state, "endDateTime", n);
1927
- },
1928
- expression: "state.endDateTime"
1929
- }
1930
- })], 1)], 1), s("div", {
1931
- staticClass: "tvp-search-box__bottom-btn"
1932
- }, [s("tiny-button", {
1933
- attrs: {
1934
- size: "mini"
1935
- },
1936
- on: {
1937
- click: function(n) {
1938
- return e.onConfirmDate(!1, !0);
1939
- }
1940
- }
1941
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.cancel")) + " ")]), s("tiny-button", {
1942
- attrs: {
1943
- size: "mini"
1944
- },
1945
- on: {
1946
- click: function(n) {
1947
- return e.onConfirmDate(!0, !0);
1948
- }
1949
- }
1950
- }, [e._v(" " + e._s(e.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)]) : e.state.prevItem.type === "map" ? s("div", {
1951
- directives: [{
1952
- name: "loading",
1953
- rawName: "v-loading",
1954
- value: e.isLoading,
1955
- expression: "isLoading"
1956
- }]
1957
- }, [e.state.isShowTagKey ? s("span", {
1958
- staticClass: "tvp-search-box__filter-type"
1959
- }, [e._v(e._s(e.t("tvp.tvpSearchbox.tagKey")))]) : s("span", {
1960
- staticClass: "tvp-search-box__filter-type"
1961
- }, [e._v(e._s(e.t("tvp.tvpSearchbox.tagValue")))]), e._l(e.state.backupList, function(n, r) {
1962
- return s("tiny-dropdown-item", {
1963
- directives: [{
1964
- name: "show",
1965
- rawName: "v-show",
1966
- value: !n.isFilter,
1967
- expression: "!item.isFilter"
1968
- }],
1969
- key: n.label + n.value + r,
1970
- staticClass: "tvp-search-box__dropdown-item",
1971
- attrs: {
1972
- disabled: n.isChecked,
1973
- "item-data": n
1974
- },
1975
- on: {
1976
- "item-click": function() {
1977
- return e.selectFirstMap(n, e.state.isShowTagKey);
1978
- }
1979
- }
1980
- }, [s("span", {
1981
- attrs: {
1982
- title: n.label
1983
- }
1984
- }, [e._v(e._s(n.label))])]);
1985
- })], 2) : e._e()]);
1986
- }, ta = [];
1987
- const aa = (a, e, { emit: t }) => {
1988
- const { computed: s } = e, n = a.handleEvents || a.events || ((p, b, h) => {
1989
- t("events", p, b, h);
1990
- }), r = (p) => {
1991
- n("setOperator", p);
1992
- }, c = (p) => {
1993
- n("selectRadioItem", p);
1994
- }, i = (p) => {
1995
- n("selectCheckbox", p);
1996
- }, l = (p) => {
1997
- n("sizeChange", p);
1998
- }, u = (p, b) => {
1999
- n("onConfirmDate", p, b);
2000
- }, m = (p, b) => {
2001
- n("selectFirstMap", p, b);
2002
- }, o = (p) => {
2003
- n("handleDateShow", p);
2004
- }, f = s(() => {
2005
- var p;
2006
- return a.state.hasBackupList && ((p = a.state.backupList) == null ? void 0 : p.length) === 0;
2007
- }), d = s(() => {
2008
- var p;
2009
- return (p = a.state.backupList) == null ? void 0 : p.find((b) => !b.isFilter);
1508
+ const $o = /* @__PURE__ */ _e(mo, [["render", Eo]]), Lo = (e, t, { emit: o }) => {
1509
+ const { computed: l } = t, c = e.handleEvents || e.events || ((u, a, m) => {
1510
+ o("events", u, a, m);
1511
+ }), i = (u) => {
1512
+ c("setOperator", u);
1513
+ }, b = (u) => {
1514
+ c("selectRadioItem", u);
1515
+ }, v = (u) => {
1516
+ c("selectCheckbox", u);
1517
+ }, d = (u) => {
1518
+ c("sizeChange", u);
1519
+ }, p = (u, a) => {
1520
+ c("onConfirmDate", u, a);
1521
+ }, r = (u, a) => {
1522
+ c("selectFirstMap", u, a);
1523
+ }, n = (u) => {
1524
+ c("handleDateShow", u);
1525
+ }, f = l(() => {
1526
+ var u;
1527
+ return e.state.hasBackupList && ((u = e.state.backupList) == null ? void 0 : u.length) === 0;
1528
+ }), s = l(() => {
1529
+ var u;
1530
+ return (u = e.state.backupList) == null ? void 0 : u.find((a) => !a.isFilter);
2010
1531
  });
2011
1532
  return {
2012
- setOperator: r,
2013
- selectRadioItem: c,
2014
- selectCheckbox: i,
2015
- sizeChange: l,
2016
- onConfirmDate: u,
2017
- selectFirstMap: m,
2018
- handleDateShow: o,
1533
+ setOperator: i,
1534
+ selectRadioItem: b,
1535
+ selectCheckbox: v,
1536
+ sizeChange: d,
1537
+ onConfirmDate: p,
1538
+ selectFirstMap: r,
1539
+ handleDateShow: n,
2019
1540
  isLoading: f,
2020
- showCheckBoxList: d,
2021
- t: N
1541
+ showCheckBoxList: s,
1542
+ t: Y
2022
1543
  };
2023
- }, na = [
1544
+ }, _o = [
2024
1545
  "setOperator",
2025
1546
  "selectRadioItem",
2026
1547
  "selectCheckbox",
@@ -2031,23 +1552,23 @@ const aa = (a, e, { emit: t }) => {
2031
1552
  "isLoading",
2032
1553
  "showCheckBoxList",
2033
1554
  "t"
2034
- ], ra = X({
2035
- name: pe + "SearchBoxSecondLevelPanel",
1555
+ ], Ro = be({
1556
+ name: Me + "SearchBoxSecondLevelPanel",
2036
1557
  emits: ["events"],
2037
1558
  components: {
2038
- TinyFormItem: we,
2039
- TinyDropdownItem: Ie,
2040
- TinyCheckbox: Ze,
2041
- TinyCheckboxGroup: Ye,
2042
- TinyDatePicker: xe,
2043
- TinyInput: _e,
2044
- TinyButton: ye
1559
+ TinyFormItem: xe,
1560
+ TinyDropdownItem: Be,
1561
+ TinyCheckbox: dt,
1562
+ TinyCheckboxGroup: mt,
1563
+ TinyDatePicker: Fe,
1564
+ TinyInput: Pe,
1565
+ TinyButton: Oe
2045
1566
  },
2046
1567
  directives: {
2047
- loading: We.directive
1568
+ loading: ft.directive
2048
1569
  },
2049
1570
  props: {
2050
- ...J,
1571
+ ...ve,
2051
1572
  state: {
2052
1573
  type: Object,
2053
1574
  default: () => ({})
@@ -2066,34 +1587,379 @@ const aa = (a, e, { emit: t }) => {
2066
1587
  default: null
2067
1588
  }
2068
1589
  },
2069
- setup(a, e) {
2070
- return ue({ props: a, context: e, renderless: aa, api: na });
1590
+ setup(e, t) {
1591
+ return Ee({ props: e, context: t, renderless: Lo, api: _o });
2071
1592
  }
2072
- }), be = {};
2073
- var sa = /* @__PURE__ */ fe(
2074
- ra,
2075
- ea,
2076
- ta,
2077
- !1,
2078
- oa,
2079
- null,
2080
- null,
2081
- null
2082
- );
2083
- function oa(a) {
2084
- for (let e in be)
2085
- this[e] = be[e];
1593
+ }), No = { tiny_mode: "pc" }, Po = { key: 0 }, Oo = { class: "tvp-search-box__filter-type" }, Fo = ["title"], xo = {
1594
+ key: 0,
1595
+ class: "tvp-search-box__text-highlight"
1596
+ }, Bo = { key: 1 }, Ao = ["title"], zo = { key: 0 }, Uo = { class: "tvp-search-box__checkbox-wrap" }, jo = { class: "tvp-search-box__checkbox-btn" }, Ho = {
1597
+ key: 3,
1598
+ class: "tvp-search-box__panel-box"
1599
+ }, Ko = { class: "tvp-search-box__number" }, Go = { class: "tvp-search-box__dropdown-title" }, qo = { class: "tvp-search-box__dropdown-start" }, Zo = { class: "tvp-search-box__dropdown-end" }, Yo = { class: "tvp-search-box__bottom-btn" }, Qo = {
1600
+ key: 4,
1601
+ class: "tvp-search-box__panel-box"
1602
+ }, Wo = { class: "tvp-search-box__date-wrap" }, Jo = { class: "tvp-search-box__dropdown-title" }, Xo = { class: "tvp-search-box__dropdown-start" }, en = { class: "tvp-search-box__dropdown-end" }, tn = { class: "tvp-search-box__bottom-btn" }, on = {
1603
+ key: 5,
1604
+ class: "tvp-search-box__panel-box"
1605
+ }, nn = { class: "tvp-search-box__date-wrap" }, ln = { class: "tvp-search-box__dropdown-title" }, an = { class: "tvp-search-box__dropdown-start" }, rn = { class: "tvp-search-box__dropdown-end" }, sn = { class: "tvp-search-box__bottom-btn" }, pn = { key: 6 }, un = {
1606
+ key: 0,
1607
+ class: "tvp-search-box__filter-type"
1608
+ }, cn = {
1609
+ key: 1,
1610
+ class: "tvp-search-box__filter-type"
1611
+ }, dn = ["title"];
1612
+ function mn(e, t, o, l, c, i) {
1613
+ var u;
1614
+ const b = N("tiny-dropdown-item"), v = N("tiny-checkbox"), d = N("tiny-checkbox-group"), p = N("tiny-button"), r = N("tiny-input"), n = N("tiny-form-item"), f = N("tiny-date-picker"), s = ut("loading");
1615
+ return y(), S("div", No, [
1616
+ (u = e.state.currentOperators) != null && u.length ? (y(), S("div", Po, [
1617
+ M("span", Oo, k(e.t("tvp.tvpSearchbox.operator")), 1),
1618
+ (y(!0), S(B, null, z(e.state.currentOperators, (a, m) => j((y(), F(b, {
1619
+ key: a + m,
1620
+ class: "tvp-search-box__dropdown-item",
1621
+ "item-data": { label: a },
1622
+ onItemClick: () => e.setOperator(a)
1623
+ }, {
1624
+ default: C(() => [
1625
+ K(k(a), 1)
1626
+ ]),
1627
+ _: 2
1628
+ }, 1032, ["item-data", "onItemClick"])), [
1629
+ [G, a.includes(e.state.inputValue)]
1630
+ ])), 128))
1631
+ ])) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ? j((y(), S("div", {
1632
+ key: 1,
1633
+ class: he(["tvp-search-box__radio-wrap", e.isLoading && "tvp-search-box__loading-box"])
1634
+ }, [
1635
+ (y(!0), S(B, null, z(e.state.backupList, (a, m) => j((y(), F(b, {
1636
+ key: m + (a.field || a.label),
1637
+ disabled: a.isChecked,
1638
+ class: "tvp-search-box__dropdown-item",
1639
+ "item-data": a,
1640
+ onItemClick: () => e.selectRadioItem(a)
1641
+ }, {
1642
+ default: C(() => [
1643
+ a.match ? (y(), S("span", {
1644
+ key: 0,
1645
+ title: a.label
1646
+ }, [
1647
+ (y(!0), S(B, null, z(a.match, (g) => (y(), S("span", { key: g }, [
1648
+ g.toLowerCase() === a.hightlighStr ? (y(), S("span", xo, k(g), 1)) : (y(), S("span", Bo, k(g), 1))
1649
+ ]))), 128))
1650
+ ], 8, Fo)) : (y(), S("span", {
1651
+ key: 1,
1652
+ title: a.label
1653
+ }, k(a.label), 9, Ao))
1654
+ ]),
1655
+ _: 2
1656
+ }, 1032, ["disabled", "item-data", "onItemClick"])), [
1657
+ [G, !a.isFilter || !e.state.inputValue]
1658
+ ])), 128))
1659
+ ], 2)), [
1660
+ [s, e.isLoading]
1661
+ ]) : e.state.prevItem.type === "checkbox" ? j((y(), S("div", {
1662
+ key: 2,
1663
+ class: he(e.isLoading && "tvp-search-box__loading-box")
1664
+ }, [
1665
+ e.showCheckBoxList ? (y(), S("div", zo, [
1666
+ M("div", Uo, [
1667
+ D(d, {
1668
+ modelValue: e.state.checkAll,
1669
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => e.state.checkAll = a),
1670
+ class: "tvp-search-box__checkbox"
1671
+ }, {
1672
+ default: C(() => [
1673
+ D(b, { class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item" }, {
1674
+ default: C(() => [
1675
+ D(v, {
1676
+ modelValue: e.state.checkAll,
1677
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => e.state.checkAll = a),
1678
+ indeterminate: e.state.isIndeterminate
1679
+ }, {
1680
+ default: C(() => [
1681
+ K(k(e.t("tvp.tvpSearchbox.selectAll")), 1)
1682
+ ]),
1683
+ _: 1
1684
+ }, 8, ["modelValue", "indeterminate"])
1685
+ ]),
1686
+ _: 1
1687
+ })
1688
+ ]),
1689
+ _: 1
1690
+ }, 8, ["modelValue"]),
1691
+ D(d, {
1692
+ modelValue: e.state.checkboxGroup,
1693
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => e.state.checkboxGroup = a),
1694
+ class: "tvp-search-box__checkbox"
1695
+ }, {
1696
+ default: C(() => [
1697
+ (y(!0), S(B, null, z(e.state.backupList, (a, m) => j((y(), F(b, {
1698
+ key: (a.field || a.label) + m,
1699
+ class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
1700
+ }, {
1701
+ default: C(() => [
1702
+ D(v, {
1703
+ label: e.state.prevItem.label + a.label,
1704
+ title: a.label,
1705
+ class: "tvp-search-box__checkbox-item-label"
1706
+ }, {
1707
+ default: C(() => [
1708
+ K(k(a.label), 1)
1709
+ ]),
1710
+ _: 2
1711
+ }, 1032, ["label", "title"])
1712
+ ]),
1713
+ _: 2
1714
+ }, 1024)), [
1715
+ [G, !a.isFilter]
1716
+ ])), 128))
1717
+ ]),
1718
+ _: 1
1719
+ }, 8, ["modelValue"])
1720
+ ]),
1721
+ M("div", jo, [
1722
+ D(p, {
1723
+ size: "mini",
1724
+ onClick: t[3] || (t[3] = (a) => e.selectCheckbox(!1))
1725
+ }, {
1726
+ default: C(() => [
1727
+ K(k(e.t("tvp.tvpSearchbox.cancel")), 1)
1728
+ ]),
1729
+ _: 1
1730
+ }),
1731
+ D(p, {
1732
+ size: "mini",
1733
+ onClick: t[4] || (t[4] = (a) => e.selectCheckbox(!0))
1734
+ }, {
1735
+ default: C(() => [
1736
+ K(k(e.t("tvp.tvpSearchbox.confirm")), 1)
1737
+ ]),
1738
+ _: 1
1739
+ })
1740
+ ])
1741
+ ])) : H("", !0)
1742
+ ], 2)), [
1743
+ [s, e.isLoading]
1744
+ ]) : e.state.prevItem.type === "numRange" ? (y(), S("div", Ho, [
1745
+ M("div", Ko, [
1746
+ M("div", Go, k(e.t("tvp.tvpSearchbox.rangeNumberTitle")), 1),
1747
+ M("div", qo, k(e.t("tvp.tvpSearchbox.minValueText")) + "(" + k(e.state.prevItem.unit) + ") ", 1),
1748
+ D(n, {
1749
+ prop: e.state.curMinNumVar,
1750
+ class: "tvp-search-box__number-item",
1751
+ "show-message": e.state.numberShowMessage
1752
+ }, {
1753
+ default: C(() => [
1754
+ D(r, {
1755
+ modelValue: e.state[e.state.curMinNumVar],
1756
+ "onUpdate:modelValue": t[5] || (t[5] = (a) => e.state[e.state.curMinNumVar] = a),
1757
+ type: "number",
1758
+ class: "tvp-search-box__number-input"
1759
+ }, null, 8, ["modelValue"])
1760
+ ]),
1761
+ _: 1
1762
+ }, 8, ["prop", "show-message"]),
1763
+ M("div", Zo, k(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + k(e.state.prevItem.unit) + ") ", 1),
1764
+ D(n, {
1765
+ prop: e.state.curMaxNumVar,
1766
+ class: "tvp-search-box__number-item"
1767
+ }, {
1768
+ default: C(() => [
1769
+ D(r, {
1770
+ modelValue: e.state[e.state.curMaxNumVar],
1771
+ "onUpdate:modelValue": t[6] || (t[6] = (a) => e.state[e.state.curMaxNumVar] = a),
1772
+ type: "number",
1773
+ class: "tvp-search-box__number-input"
1774
+ }, null, 8, ["modelValue"])
1775
+ ]),
1776
+ _: 1
1777
+ }, 8, ["prop"])
1778
+ ]),
1779
+ M("div", Yo, [
1780
+ D(p, {
1781
+ size: "mini",
1782
+ onClick: t[7] || (t[7] = (a) => e.sizeChange(!1))
1783
+ }, {
1784
+ default: C(() => [
1785
+ K(k(e.t("tvp.tvpSearchbox.cancel")), 1)
1786
+ ]),
1787
+ _: 1
1788
+ }),
1789
+ D(p, {
1790
+ size: "mini",
1791
+ onClick: t[8] || (t[8] = Z((a) => e.sizeChange(!0), ["stop"]))
1792
+ }, {
1793
+ default: C(() => [
1794
+ K(k(e.t("tvp.tvpSearchbox.confirm")), 1)
1795
+ ]),
1796
+ _: 1
1797
+ })
1798
+ ])
1799
+ ])) : e.state.prevItem.type === "dateRange" ? (y(), S("div", Qo, [
1800
+ M("div", Wo, [
1801
+ M("div", Jo, k(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1802
+ value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1803
+ }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
1804
+ M("div", Xo, k(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1805
+ D(n, {
1806
+ prop: "startDate",
1807
+ "show-message": !!e.state.prevItem.maxTimeLength,
1808
+ class: "tvp-search-box__date-item"
1809
+ }, {
1810
+ default: C(() => [
1811
+ D(f, {
1812
+ modelValue: e.state.startDate,
1813
+ "onUpdate:modelValue": t[9] || (t[9] = (a) => e.state.startDate = a),
1814
+ format: e.state.prevItem.format || e.state.dateRangeFormat,
1815
+ "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1816
+ "picker-options": e.pickerOptions(e.state.startDate, "endDate"),
1817
+ class: "tvp-search-box__date-picker",
1818
+ onVisibleChange: e.handleDateShow
1819
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options", "onVisibleChange"])
1820
+ ]),
1821
+ _: 1
1822
+ }, 8, ["show-message"]),
1823
+ M("div", en, k(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
1824
+ D(n, {
1825
+ prop: "endDate",
1826
+ class: "tvp-search-box__date-item"
1827
+ }, {
1828
+ default: C(() => [
1829
+ D(f, {
1830
+ modelValue: e.state.endDate,
1831
+ "onUpdate:modelValue": t[10] || (t[10] = (a) => e.state.endDate = a),
1832
+ format: e.state.prevItem.format || e.state.dateRangeFormat,
1833
+ "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
1834
+ "picker-options": e.pickerOptions(e.state.startDate),
1835
+ class: "tvp-search-box__date-picker",
1836
+ onChange: e.handleDateShow,
1837
+ onBlur: e.handleDateShow
1838
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options", "onChange", "onBlur"])
1839
+ ]),
1840
+ _: 1
1841
+ })
1842
+ ]),
1843
+ M("div", tn, [
1844
+ D(p, {
1845
+ size: "mini",
1846
+ onClick: t[11] || (t[11] = (a) => e.onConfirmDate(!1))
1847
+ }, {
1848
+ default: C(() => [
1849
+ K(k(e.t("tvp.tvpSearchbox.cancel")), 1)
1850
+ ]),
1851
+ _: 1
1852
+ }),
1853
+ D(p, {
1854
+ size: "mini",
1855
+ onClick: t[12] || (t[12] = (a) => e.onConfirmDate(!0))
1856
+ }, {
1857
+ default: C(() => [
1858
+ K(k(e.t("tvp.tvpSearchbox.confirm")), 1)
1859
+ ]),
1860
+ _: 1
1861
+ })
1862
+ ])
1863
+ ])) : e.state.prevItem.type === "datetimeRange" ? (y(), S("div", on, [
1864
+ M("div", nn, [
1865
+ M("div", ln, k(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
1866
+ value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
1867
+ }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
1868
+ M("div", an, k(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
1869
+ D(n, {
1870
+ prop: "startDateTime",
1871
+ "show-message": !!e.state.prevItem.maxTimeLength,
1872
+ class: "tvp-search-box__date-item"
1873
+ }, {
1874
+ default: C(() => [
1875
+ D(f, {
1876
+ modelValue: e.state.startDateTime,
1877
+ "onUpdate:modelValue": t[13] || (t[13] = (a) => e.state.startDateTime = a),
1878
+ type: "datetime",
1879
+ isutc8: !0,
1880
+ format: e.state.prevItem.format || e.state.datetimeRangeFormat,
1881
+ "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
1882
+ "picker-options": e.pickerOptions(e.state.startDateTime, "endDateTime"),
1883
+ class: "tvp-search-box__date-picker",
1884
+ onChange: e.handleDateShow,
1885
+ onBlur: e.handleDateShow
1886
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options", "onChange", "onBlur"])
1887
+ ]),
1888
+ _: 1
1889
+ }, 8, ["show-message"]),
1890
+ M("div", rn, k(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
1891
+ D(n, {
1892
+ prop: "endDateTime",
1893
+ class: "tvp-search-box__date-item"
1894
+ }, {
1895
+ default: C(() => [
1896
+ D(f, {
1897
+ modelValue: e.state.endDateTime,
1898
+ "onUpdate:modelValue": t[14] || (t[14] = (a) => e.state.endDateTime = a),
1899
+ type: "datetime",
1900
+ isutc8: !0,
1901
+ format: e.state.prevItem.format || e.state.datetimeRangeFormat,
1902
+ "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
1903
+ "picker-options": e.pickerOptions(e.state.startDateTime),
1904
+ class: "tvp-search-box__date-picker",
1905
+ onChange: e.handleDateShow,
1906
+ onBlur: e.handleDateShow
1907
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options", "onChange", "onBlur"])
1908
+ ]),
1909
+ _: 1
1910
+ })
1911
+ ]),
1912
+ M("div", sn, [
1913
+ D(p, {
1914
+ size: "mini",
1915
+ onClick: t[15] || (t[15] = (a) => e.onConfirmDate(!1, !0))
1916
+ }, {
1917
+ default: C(() => [
1918
+ K(k(e.t("tvp.tvpSearchbox.cancel")), 1)
1919
+ ]),
1920
+ _: 1
1921
+ }),
1922
+ D(p, {
1923
+ size: "mini",
1924
+ onClick: t[16] || (t[16] = (a) => e.onConfirmDate(!0, !0))
1925
+ }, {
1926
+ default: C(() => [
1927
+ K(k(e.t("tvp.tvpSearchbox.confirm")), 1)
1928
+ ]),
1929
+ _: 1
1930
+ })
1931
+ ])
1932
+ ])) : e.state.prevItem.type === "map" ? j((y(), S("div", pn, [
1933
+ e.state.isShowTagKey ? (y(), S("span", un, k(e.t("tvp.tvpSearchbox.tagKey")), 1)) : (y(), S("span", cn, k(e.t("tvp.tvpSearchbox.tagValue")), 1)),
1934
+ (y(!0), S(B, null, z(e.state.backupList, (a, m) => j((y(), F(b, {
1935
+ key: a.label + a.value + m,
1936
+ disabled: a.isChecked,
1937
+ class: "tvp-search-box__dropdown-item",
1938
+ "item-data": a,
1939
+ onItemClick: () => e.selectFirstMap(a, e.state.isShowTagKey)
1940
+ }, {
1941
+ default: C(() => [
1942
+ M("span", {
1943
+ title: a.label
1944
+ }, k(a.label), 9, dn)
1945
+ ]),
1946
+ _: 2
1947
+ }, 1032, ["disabled", "item-data", "onItemClick"])), [
1948
+ [G, !a.isFilter]
1949
+ ])), 128))
1950
+ ])), [
1951
+ [s, e.isLoading]
1952
+ ]) : H("", !0)
1953
+ ]);
2086
1954
  }
2087
- const la = /* @__PURE__ */ function() {
2088
- return sa.exports;
2089
- }();
2090
- const ia = X({
1955
+ const fn = /* @__PURE__ */ _e(Ro, [["render", mn]]);
1956
+ const hn = be({
2091
1957
  model: {
2092
1958
  prop: "modelValue",
2093
1959
  event: "update:modelValue"
2094
1960
  },
2095
1961
  props: {
2096
- ...J,
1962
+ ...ve,
2097
1963
  tiny_mode: {
2098
1964
  type: String,
2099
1965
  default: "pc"
@@ -2150,564 +2016,478 @@ const ia = X({
2150
2016
  },
2151
2017
  emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "clear"],
2152
2018
  components: {
2153
- TinyTag: Oe,
2154
- TinyInput: _e,
2155
- TinyDropdown: Fe,
2156
- TinyDropdownMenu: Ae,
2157
- TinyButton: ye,
2158
- TinyTooltip: Be,
2159
- TinyDatePicker: xe,
2160
- TinyForm: ze,
2161
- TinyFormItem: we,
2162
- TinyPopover: je,
2163
- TinySelect: He,
2164
- TinyOption: Ge,
2165
- TinySearchBoxFirstLevelPanel: Jt,
2166
- TinySearchBoxSecondLevelPanel: la,
2019
+ TinyTag: Xe,
2020
+ TinyInput: Pe,
2021
+ TinyDropdown: et,
2022
+ TinyDropdownMenu: tt,
2023
+ TinyButton: Oe,
2024
+ TinyTooltip: ot,
2025
+ TinyDatePicker: Fe,
2026
+ TinyForm: nt,
2027
+ TinyFormItem: xe,
2028
+ TinyPopover: lt,
2029
+ TinySelect: at,
2030
+ TinyOption: rt,
2031
+ TinySearchBoxFirstLevelPanel: $o,
2032
+ TinySearchBoxSecondLevelPanel: fn,
2167
2033
  // 图标组件
2168
- TinyIconSearch: Ke(),
2169
- TinyIconClose: Ue(),
2170
- TinyIconHelpQuery: qe()
2034
+ TinyIconSearch: st(),
2035
+ TinyIconClose: it(),
2036
+ TinyIconHelpQuery: pt()
2171
2037
  },
2172
- setup(a, e) {
2173
- return ue({ props: a, context: e, renderless: Ht, api: zt });
2038
+ setup(e, t) {
2039
+ return Ee({ props: e, context: t, renderless: so, api: ao });
2174
2040
  }
2175
- });
2176
- var ca = function() {
2177
- var a, e, t = this, s = t.$createElement, n = t._self._c || s;
2178
- return n("div", {
2179
- class: ["tvp-search-box", t.size === "small" ? "tvp-search-box--small" : ""],
2180
- on: {
2181
- click: function(r) {
2182
- return r.stopPropagation(), t.showPopover(t.state, !1);
2183
- }
2184
- }
2185
- }, [n("tiny-icon-search", {
2186
- staticClass: "tvp-search-box__prefix"
2187
- }), t._l(t.modelValue, function(r, c) {
2188
- return n("tiny-tag", {
2189
- key: r.field + c,
2190
- staticClass: "tvp-search-box__tag",
2191
- class: t.editable && r.type !== "map" ? "tvp-search-box__tag-editor" : "",
2192
- attrs: {
2193
- closable: "",
2194
- title: `${r.label} ${r.operator || ":"} ${r.value}`
2195
- },
2196
- on: {
2197
- close: function(i) {
2198
- return t.deleteTag(r);
2199
- },
2200
- click: function(i) {
2201
- return i.stopPropagation(), t.editTag(r, c, i);
2202
- }
2203
- }
2204
- }, [n("span", {
2205
- staticClass: "tvp-search-box__tag-value"
2206
- }, [t._v(t._s(r.label) + " " + t._s(r.operator || ":") + " " + t._s(r.value) + " ")])]);
2207
- }), t.modelValue.length ? n("span", {
2208
- staticClass: "tvp-search-box__placeholder"
2209
- }) : t._e(), n("tiny-form", {
2210
- ref: "formRef",
2211
- staticClass: "tvp-search-box__form",
2212
- attrs: {
2213
- model: t.state,
2214
- rules: t.state.formRules,
2215
- "validate-type": t.state.validType,
2216
- size: t.size === "small" ? "small" : "",
2041
+ }), bn = { class: "tvp-search-box__tag-value" }, vn = {
2042
+ key: 0,
2043
+ class: "tvp-search-box__placeholder"
2044
+ }, gn = { class: "tvp-search-box__input-wrapper" }, yn = { class: "tvp-search-box__prop" }, Vn = { class: "tvp-search-box__input-separator" }, kn = { class: "tvp-search-box__date-wrap" }, In = { class: "tvp-search-box__dropdown-start" }, wn = {
2045
+ key: 0,
2046
+ class: "tvp-search-box__dropdown-end"
2047
+ }, Tn = {
2048
+ key: 2,
2049
+ class: "tvp-search-box__dropdown-end"
2050
+ }, Sn = {
2051
+ key: 4,
2052
+ class: "tvp-search-box__number"
2053
+ }, Dn = { class: "tvp-search-box__dropdown-start" }, Cn = { class: "tvp-search-box__dropdown-end" }, Mn = {
2054
+ key: 5,
2055
+ class: "tvp-search-box__date-wrap"
2056
+ }, En = { class: "tvp-search-box__dropdown-title" }, $n = { class: "tvp-search-box__dropdown-start" }, Ln = { class: "tvp-search-box__dropdown-end" }, _n = {
2057
+ key: 6,
2058
+ class: "tvp-search-box__date-wrap"
2059
+ }, Rn = { class: "tvp-search-box__dropdown-title" }, Nn = { class: "tvp-search-box__dropdown-start" }, Pn = { class: "tvp-search-box__dropdown-end" }, On = { class: "tvp-search-box__bottom-btn" }, Fn = {
2060
+ key: 1,
2061
+ class: "tvp-search-box__panel-box"
2062
+ };
2063
+ function xn(e, t, o, l, c, i) {
2064
+ const b = N("tiny-icon-search"), v = N("tiny-tag"), d = N("tiny-icon-close"), p = N("tiny-icon-help-query"), r = N("tiny-tooltip"), n = N("tiny-input"), f = N("TinySearchBoxFirstLevelPanel"), s = N("TinySearchBoxSecondLevelPanel"), u = N("tiny-dropdown-menu"), a = N("tiny-dropdown"), m = N("tiny-option"), g = N("tiny-select"), I = N("tiny-form-item"), L = N("tiny-date-picker"), V = N("tiny-button"), T = N("tiny-popover"), E = N("tiny-form");
2065
+ return y(), S("div", {
2066
+ class: he(["tvp-search-box", e.size === "small" ? "tvp-search-box--small" : ""]),
2067
+ onClick: t[21] || (t[21] = Z((h) => e.showPopover(e.state, !1), ["stop"]))
2068
+ }, [
2069
+ D(b, { class: "tvp-search-box__prefix" }),
2070
+ (y(!0), S(B, null, z(e.modelValue, (h, $) => (y(), F(v, {
2071
+ key: h.field + $,
2072
+ closable: "",
2073
+ class: he(["tvp-search-box__tag", e.editable && h.type !== "map" ? "tvp-search-box__tag-editor" : ""]),
2074
+ title: `${h.label} ${h.operator || ":"} ${h.value}`,
2075
+ onClose: (w) => e.deleteTag(h),
2076
+ onClick: Z((w) => e.editTag(h, $, w), ["stop"])
2077
+ }, {
2078
+ default: C(() => [
2079
+ M("span", bn, k(h.label) + " " + k(h.operator || ":") + " " + k(h.value), 1)
2080
+ ]),
2081
+ _: 2
2082
+ }, 1032, ["class", "title", "onClose", "onClick"]))), 128)),
2083
+ e.modelValue.length ? (y(), S("span", vn)) : H("", !0),
2084
+ D(E, {
2085
+ ref: "formRef",
2086
+ model: e.state,
2087
+ rules: e.state.formRules,
2088
+ "validate-type": e.state.validType,
2089
+ size: e.size === "small" ? "small" : "",
2217
2090
  "label-width": "0px",
2218
- "message-type": "block"
2219
- }
2220
- }, [n("div", {
2221
- staticClass: "tvp-search-box__input-wrapper"
2222
- }, [n("section", {
2223
- staticClass: "tvp-search-box__prop"
2224
- }, [n("span", {
2225
- directives: [{
2226
- name: "show",
2227
- rawName: "v-show",
2228
- value: t.state.propItem.label,
2229
- expression: "state.propItem.label"
2230
- }]
2231
- }, [t._v(t._s(t.state.propItem.label) + " " + t._s(`${t.state.operatorValue ? t.state.operatorValue : ""} `))]), n("span", {
2232
- directives: [{
2233
- name: "show",
2234
- rawName: "v-show",
2235
- value: t.state.propItem.value,
2236
- expression: "state.propItem.value"
2237
- }]
2238
- }, [t._v(t._s(t.state.propItem.value))])]), n("tiny-dropdown", {
2239
- ref: "dropdownRef",
2240
- staticClass: "tvp-search-box__dropdown",
2241
- attrs: {
2242
- trigger: "click",
2243
- "show-icon": !1,
2244
- size: t.size === "small" ? "small" : "",
2245
- "lazy-show-popper": "",
2246
- "close-on-click-outside": !0
2247
- },
2248
- scopedSlots: t._u([{
2249
- key: "dropdown",
2250
- fn: function() {
2251
- var r, c, i;
2252
- return [n("tiny-dropdown-menu", {
2253
- style: {
2254
- "max-height": t.panelMaxHeight
2255
- },
2256
- attrs: {
2257
- placement: "bottom-start",
2258
- "popper-class": "tvp-search-box__dropdown-menu"
2259
- },
2260
- on: {
2261
- mouseup: function(l) {
2262
- return l.stopPropagation(), (function() {
2263
- }).apply(null, arguments);
2264
- }
2265
- }
2266
- }, [n("div", {
2267
- directives: [{
2268
- name: "show",
2269
- rawName: "v-show",
2270
- value: !t.state.propItem.label || ((r = t.state.inputValue) === null || r === void 0 ? void 0 : r.trim()),
2271
- expression: "!state.propItem.label || state.inputValue?.trim()"
2272
- }]
2273
- }, [(c = t.state.instance) !== null && c !== void 0 && c.slots["first-panel"] ? t._t("first-panel", null, null, {
2274
- state: t.state,
2275
- handleEvents: t.handleEvents
2276
- }) : n("TinySearchBoxFirstLevelPanel", {
2277
- attrs: {
2278
- state: t.state,
2279
- handleEvents: t.handleEvents
2280
- }
2281
- })], 2), n("div", {
2282
- directives: [{
2283
- name: "show",
2284
- rawName: "v-show",
2285
- value: t.state.propItem.label,
2286
- expression: "state.propItem.label"
2287
- }]
2288
- }, [(i = t.state.instance) !== null && i !== void 0 && i.slots["second-panel"] ? t._t("second-panel", null, null, {
2289
- state: t.state,
2290
- pickerOptions: t.pickerOptions,
2291
- handleEvents: t.handleEvents,
2292
- back: function() {
2293
- return t.resetInput(t.state);
2294
- }
2295
- }) : t.state.prevItem.type !== "custom" ? n("TinySearchBoxSecondLevelPanel", {
2296
- attrs: {
2297
- state: t.state,
2298
- "picker-options": t.pickerOptions
2299
- },
2300
- on: {
2301
- events: t.handleEvents
2302
- }
2303
- }) : n("div", {
2304
- staticClass: "tvp-search-box__panel-box",
2305
- on: {
2306
- click: function(l) {
2307
- return t.showDropdown(t.state);
2308
- }
2309
- }
2310
- }, [t._t(t.state.prevItem.slotName, null, null, {
2311
- showDropdown: function() {
2312
- return t.showDropdown(t.state);
2313
- },
2314
- onConfirm: t.handleConfirm
2315
- })], 2)], 2)])];
2316
- },
2317
- proxy: !0
2318
- }], null, !0),
2319
- model: {
2320
- value: t.state.visible,
2321
- callback: function(r) {
2322
- t.$set(t.state, "visible", r);
2323
- },
2324
- expression: "state.visible"
2325
- }
2326
- }, [n("tiny-input", {
2327
- ref: "inputRef",
2328
- staticClass: "tvp-search-box__input",
2329
- attrs: {
2330
- placeholder: t.state.placeholder,
2331
- maxlength: t.maxlength && t.maxlength + 1
2332
- },
2333
- on: {
2334
- keydown: [function(r) {
2335
- return !r.type.indexOf("key") && t._k(r.keyCode, "delete", [8, 46], r.key, ["Backspace", "Delete", "Del"]) ? null : (r.stopPropagation(), t.backspaceDeleteTag.apply(null, arguments));
2336
- }, function(r) {
2337
- return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.stopPropagation(), t.createTag.apply(null, arguments));
2338
- }],
2339
- input: t.handleInput,
2340
- click: t.handleClick
2341
- },
2342
- scopedSlots: t._u([{
2343
- key: "suffix",
2344
- fn: function() {
2345
- return [n("tiny-icon-close", {
2346
- directives: [{
2347
- name: "show",
2348
- rawName: "v-show",
2349
- value: t.isShowClose,
2350
- expression: "isShowClose"
2351
- }],
2352
- staticClass: "tvp-search-box__input-close",
2353
- on: {
2354
- click: function(r) {
2355
- return r.stopPropagation(), t.clearTag.apply(null, arguments);
2356
- }
2357
- }
2358
- }), n("span", {
2359
- directives: [{
2360
- name: "show",
2361
- rawName: "v-show",
2362
- value: t.isShowClose,
2363
- expression: "isShowClose"
2364
- }],
2365
- staticClass: "tvp-search-box__input-separator"
2366
- }), t.showHelp ? n("tiny-tooltip", {
2367
- attrs: {
2368
- effect: "light",
2369
- content: t.t("tvp.tvpSearchbox.help"),
2370
- placement: "top"
2371
- }
2372
- }, [n("tiny-icon-help-query", {
2373
- staticClass: "tvp-search-box__input-help",
2374
- on: {
2375
- click: function(r) {
2376
- return r.stopPropagation(), t.helpClick.apply(null, arguments);
2377
- }
2378
- }
2379
- })], 1) : t._e(), n("tiny-icon-search", {
2380
- staticClass: "tvp-search-box__input-search",
2381
- on: {
2382
- click: function(r) {
2383
- return r.stopPropagation(), t.createTag.apply(null, arguments);
2384
- }
2385
- }
2386
- })];
2387
- },
2388
- proxy: !0
2389
- }]),
2390
- model: {
2391
- value: t.state.inputValue,
2392
- callback: function(r) {
2393
- t.$set(t.state, "inputValue", r);
2394
- },
2395
- expression: "state.inputValue"
2396
- }
2397
- })], 1)], 1), t.editable ? [n("tiny-popover", {
2398
- ref: "popoverRef",
2399
- staticClass: "tvp-search-box__form-popover",
2400
- attrs: {
2401
- placement: "bottom-start",
2402
- "visible-arrow": !1,
2403
- trigger: "manual",
2404
- "popper-class": "tvp-search-box__popover"
2405
- },
2406
- model: {
2407
- value: t.state.popoverVisible,
2408
- callback: function(r) {
2409
- t.$set(t.state, "popoverVisible", r);
2410
- },
2411
- expression: "state.popoverVisible"
2412
- }
2413
- }, [t.state.prevItem.type !== "custom" ? [n("div", {
2414
- staticClass: "tvp-search-box__date-wrap"
2415
- }, [n("div", {
2416
- staticClass: "tvp-search-box__dropdown-start"
2417
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.attributeType")) + " ")]), n("tiny-form-item", {
2418
- staticClass: "tvp-search-box__number-item"
2419
- }, [n("tiny-select", {
2420
- attrs: {
2421
- searchable: "",
2422
- disabled: t.state.prevItem.editAttrDisabled
2423
- },
2424
- model: {
2425
- value: t.state.selectValue,
2426
- callback: function(r) {
2427
- t.$set(t.state, "selectValue", r);
2428
- },
2429
- expression: "state.selectValue"
2430
- }
2431
- }, [n("tiny-option", {
2432
- key: t.state.allTypeAttri.label,
2433
- attrs: {
2434
- label: t.t("tvp.tvpSearchbox.allProperty"),
2435
- value: t.state.allTypeAttri.label,
2436
- disabled: t.selectItemIsDisable(t.state.allTypeAttri)
2437
- },
2438
- on: {
2439
- click: function(r) {
2440
- t.selectPropChange(t.state.allTypeAttri, t.selectItemIsDisable(t.state.allTypeAttri));
2441
- }
2442
- }
2443
- }), t._l(t.state.recordItems, function(r) {
2444
- return n("tiny-option", {
2445
- key: r.label,
2446
- attrs: {
2447
- label: r.label,
2448
- value: r.label,
2449
- disabled: t.selectItemIsDisable(r)
2450
- },
2451
- on: {
2452
- click: function(c) {
2453
- t.selectPropChange(r, t.selectItemIsDisable(r));
2454
- }
2455
- }
2456
- });
2457
- })], 2)], 1), t.state.prevItem.operators ? n("div", {
2458
- staticClass: "tvp-search-box__dropdown-end"
2459
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.operator")) + " ")]) : t._e(), t.state.prevItem.operators ? n("tiny-form-item", {
2460
- staticClass: "tvp-search-box__number-item"
2461
- }, [n("tiny-select", {
2462
- model: {
2463
- value: t.state.operatorValue,
2464
- callback: function(r) {
2465
- t.$set(t.state, "operatorValue", r);
2466
- },
2467
- expression: "state.operatorValue"
2468
- }
2469
- }, t._l(t.state.currentOperators, function(r) {
2470
- return n("tiny-option", {
2471
- key: r,
2472
- attrs: {
2473
- label: r,
2474
- value: r
2475
- }
2476
- });
2477
- }), 1)], 1) : t._e(), t.state.prevItem.type !== "numRange" ? n("div", {
2478
- staticClass: "tvp-search-box__dropdown-end"
2479
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.tagValue")) + " ")]) : t._e(), ["numRange", "dateRange", "datetimeRange", "custom"].includes(t.state.prevItem.type) ? t._e() : n("tiny-form-item", {
2480
- staticClass: "tvp-search-box__number-item",
2481
- attrs: {
2482
- prop: "inputEditValue"
2483
- }
2484
- }, [((a = t.state.currentEditValue) === null || a === void 0 ? void 0 : a.length) > 0 ? n("tiny-select", {
2485
- staticClass: "tvp-search-box-select",
2486
- attrs: {
2487
- multiple: !!t.state.prevItem.mergeTag,
2488
- "allow-create": (e = t.state.prevItem) === null || e === void 0 ? void 0 : e.allowCreate,
2489
- filterable: "",
2490
- "default-first-option": "",
2491
- clearable: ""
2492
- },
2493
- model: {
2494
- value: t.state.inputEditValue,
2495
- callback: function(r) {
2496
- t.$set(t.state, "inputEditValue", r);
2497
- },
2498
- expression: "state.inputEditValue"
2499
- }
2500
- }, t._l(t.state.currentEditValue, function(r) {
2501
- return n("tiny-option", {
2502
- key: r.label,
2503
- attrs: {
2504
- label: r.label,
2505
- value: r.label
2506
- }
2507
- });
2508
- }), 1) : n("tiny-input", {
2509
- attrs: {
2510
- clearable: ""
2511
- },
2512
- model: {
2513
- value: t.state.inputEditValue,
2514
- callback: function(r) {
2515
- t.$set(t.state, "inputEditValue", r);
2516
- },
2517
- expression: "state.inputEditValue"
2518
- }
2519
- })], 1), t.state.prevItem.type === "numRange" ? n("div", {
2520
- staticClass: "tvp-search-box__number"
2521
- }, [n("div", {
2522
- staticClass: "tvp-search-box__dropdown-start"
2523
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.minValueText")) + "(" + t._s(t.state.prevItem.unit) + ") ")]), n("tiny-form-item", {
2524
- staticClass: "tvp-search-box__number-item",
2525
- attrs: {
2526
- prop: t.state.curMinNumVar,
2527
- "show-message": t.state.numberShowMessage
2528
- }
2529
- }, [n("tiny-input", {
2530
- staticClass: "tvp-search-box__number-input",
2531
- attrs: {
2532
- type: "number"
2533
- },
2534
- model: {
2535
- value: t.state[t.state.curMinNumVar],
2536
- callback: function(r) {
2537
- t.$set(t.state, t.state.curMinNumVar, r);
2538
- },
2539
- expression: "state[state.curMinNumVar]"
2540
- }
2541
- })], 1), n("div", {
2542
- staticClass: "tvp-search-box__dropdown-end"
2543
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.maxValueText")) + "(" + t._s(t.state.prevItem.unit) + ") ")]), n("tiny-form-item", {
2544
- staticClass: "tvp-search-box__number-item",
2545
- attrs: {
2546
- prop: t.state.curMaxNumVar
2547
- }
2548
- }, [n("tiny-input", {
2549
- staticClass: "tvp-search-box__number-input",
2550
- attrs: {
2551
- type: "number"
2552
- },
2553
- model: {
2554
- value: t.state[t.state.curMaxNumVar],
2555
- callback: function(r) {
2556
- t.$set(t.state, t.state.curMaxNumVar, r);
2557
- },
2558
- expression: "state[state.curMaxNumVar]"
2559
- }
2560
- })], 1)], 1) : t._e(), t.state.prevItem.type === "dateRange" ? n("div", {
2561
- staticClass: "tvp-search-box__date-wrap"
2562
- }, [n("div", {
2563
- staticClass: "tvp-search-box__dropdown-title"
2564
- }, [t._v(" " + t._s(t.state.prevItem.maxTimeLength > 0 ? t.t("tvp.tvpSearchbox.timeLengthTitle", {
2565
- value: (t.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2566
- }) : t.t("tvp.tvpSearchbox.rangeDateTitle")) + " ")]), n("div", {
2567
- staticClass: "tvp-search-box__dropdown-start"
2568
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.rangeBeginLabel")) + " ")]), n("tiny-form-item", {
2569
- staticClass: "tvp-search-box__date-item",
2570
- attrs: {
2571
- prop: "startDate",
2572
- "show-message": !!t.state.prevItem.maxTimeLength
2573
- }
2574
- }, [n("tiny-date-picker", {
2575
- staticClass: "tvp-search-box__date-picker",
2576
- attrs: {
2577
- format: t.state.prevItem.format || t.state.dateRangeFormat,
2578
- "value-format": t.state.prevItem.format || t.state.dateRangeFormat,
2579
- "picker-options": t.pickerOptions(t.state.startDate, "endDate")
2580
- },
2581
- model: {
2582
- value: t.state.startDate,
2583
- callback: function(r) {
2584
- t.$set(t.state, "startDate", r);
2585
- },
2586
- expression: "state.startDate"
2587
- }
2588
- })], 1), n("div", {
2589
- staticClass: "tvp-search-box__dropdown-end"
2590
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.rangeEndLabel")) + " ")]), n("tiny-form-item", {
2591
- staticClass: "tvp-search-box__date-item",
2592
- attrs: {
2593
- prop: "endDate"
2594
- }
2595
- }, [n("tiny-date-picker", {
2596
- staticClass: "tvp-search-box__date-picker",
2597
- attrs: {
2598
- format: t.state.prevItem.format || t.state.dateRangeFormat,
2599
- "value-format": t.state.prevItem.format || t.state.dateRangeFormat,
2600
- "picker-options": t.pickerOptions(t.state.startDate)
2601
- },
2602
- model: {
2603
- value: t.state.endDate,
2604
- callback: function(r) {
2605
- t.$set(t.state, "endDate", r);
2606
- },
2607
- expression: "state.endDate"
2608
- }
2609
- })], 1)], 1) : t._e(), t.state.prevItem.type === "datetimeRange" ? n("div", {
2610
- staticClass: "tvp-search-box__date-wrap"
2611
- }, [n("div", {
2612
- staticClass: "tvp-search-box__dropdown-title"
2613
- }, [t._v(" " + t._s(t.state.prevItem.maxTimeLength > 0 ? t.t("tvp.tvpSearchbox.timeLengthTitle", {
2614
- value: (t.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2615
- }) : t.t("tvp.tvpSearchbox.rangeDateTitle")) + " ")]), n("div", {
2616
- staticClass: "tvp-search-box__dropdown-start"
2617
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.rangeBeginLabel")) + " ")]), n("tiny-form-item", {
2618
- staticClass: "tvp-search-box__date-item",
2619
- attrs: {
2620
- prop: "startDateTime",
2621
- "show-message": !!t.state.prevItem.maxTimeLength
2622
- }
2623
- }, [n("tiny-date-picker", {
2624
- staticClass: "tvp-search-box__date-picker",
2625
- attrs: {
2626
- type: "datetime",
2627
- isutc8: !0,
2628
- format: t.state.prevItem.format || t.state.datetimeRangeFormat,
2629
- "value-format": t.state.prevItem.format || t.state.datetimeRangeFormat,
2630
- "picker-options": t.pickerOptions(t.state.startDateTime, "endDateTime")
2631
- },
2632
- model: {
2633
- value: t.state.startDateTime,
2634
- callback: function(r) {
2635
- t.$set(t.state, "startDateTime", r);
2636
- },
2637
- expression: "state.startDateTime"
2638
- }
2639
- })], 1), n("div", {
2640
- staticClass: "tvp-search-box__dropdown-end"
2641
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.rangeEndLabel")) + " ")]), n("tiny-form-item", {
2642
- staticClass: "tvp-search-box__date-item",
2643
- attrs: {
2644
- prop: "endDateTime"
2645
- }
2646
- }, [n("tiny-date-picker", {
2647
- staticClass: "tvp-search-box__date-picker",
2648
- attrs: {
2649
- type: "datetime",
2650
- isutc8: !0,
2651
- format: t.state.prevItem.format || t.state.datetimeRangeFormat,
2652
- "value-format": t.state.prevItem.format || t.state.datetimeRangeFormat,
2653
- "picker-options": t.pickerOptions(t.state.startDateTime)
2654
- },
2655
- model: {
2656
- value: t.state.endDateTime,
2657
- callback: function(r) {
2658
- t.$set(t.state, "endDateTime", r);
2659
- },
2660
- expression: "state.endDateTime"
2661
- }
2662
- })], 1)], 1) : t._e()], 1), n("div", {
2663
- staticClass: "tvp-search-box__bottom-btn"
2664
- }, [n("tiny-button", {
2665
- attrs: {
2666
- size: "mini"
2667
- },
2668
- on: {
2669
- click: function(r) {
2670
- return t.confirmEditTag(!1);
2671
- }
2672
- }
2673
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.cancel")) + " ")]), n("tiny-button", {
2674
- attrs: {
2675
- size: "mini",
2676
- disabled: t.state.hasFormError
2677
- },
2678
- on: {
2679
- click: function(r) {
2680
- return t.confirmEditTag(!0);
2681
- }
2682
- }
2683
- }, [t._v(" " + t._s(t.t("tvp.tvpSearchbox.confirm")) + " ")])], 1)] : n("div", {
2684
- staticClass: "tvp-search-box__panel-box"
2685
- }, [t._t(`${t.state.prevItem.slotName}-edit`, null, null, {
2686
- showDropdown: function() {
2687
- return t.showPopover(t.state);
2688
- },
2689
- onConfirm: t.handleEditConfirm
2690
- })], 2)], 2)] : t._e()], 2)], 2);
2691
- }, pa = [];
2692
- const ge = {};
2693
- var ua = /* @__PURE__ */ fe(
2694
- ia,
2695
- ca,
2696
- pa,
2697
- !1,
2698
- da,
2699
- null,
2700
- null,
2701
- null
2702
- );
2703
- function da(a) {
2704
- for (let e in ge)
2705
- this[e] = ge[e];
2091
+ "message-type": "block",
2092
+ class: "tvp-search-box__form"
2093
+ }, {
2094
+ default: C(() => [
2095
+ M("div", gn, [
2096
+ M("section", yn, [
2097
+ j(M("span", null, k(e.state.propItem.label) + " " + k(`${e.state.operatorValue ? e.state.operatorValue : ""} `), 513), [
2098
+ [G, e.state.propItem.label]
2099
+ ]),
2100
+ j(M("span", null, k(e.state.propItem.value), 513), [
2101
+ [G, e.state.propItem.value]
2102
+ ])
2103
+ ]),
2104
+ D(a, {
2105
+ ref: "dropdownRef",
2106
+ visible: e.state.visible,
2107
+ "onUpdate:visible": t[5] || (t[5] = (h) => e.state.visible = h),
2108
+ trigger: "click",
2109
+ class: "tvp-search-box__dropdown",
2110
+ "show-icon": !1,
2111
+ size: e.size === "small" ? "small" : "",
2112
+ "lazy-show-popper": "",
2113
+ "close-on-click-outside": !0
2114
+ }, {
2115
+ dropdown: C(() => [
2116
+ D(u, {
2117
+ placement: "bottom-start",
2118
+ "popper-class": "tvp-search-box__dropdown-menu",
2119
+ style: ct({ "max-height": e.panelMaxHeight }),
2120
+ onMouseup: Z(() => {
2121
+ }, ["stop"])
2122
+ }, {
2123
+ default: C(() => {
2124
+ var h, $, w;
2125
+ return [
2126
+ j(M("div", null, [
2127
+ (h = e.state.instance) != null && h.slots["first-panel"] ? me(e.$slots, "first-panel", fe({ key: 0 }, {
2128
+ state: e.state,
2129
+ handleEvents: e.handleEvents
2130
+ }, {
2131
+ onClick: t[1] || (t[1] = Z(() => {
2132
+ }, ["stop"]))
2133
+ })) : (y(), F(f, {
2134
+ key: 1,
2135
+ state: e.state,
2136
+ handleEvents: e.handleEvents
2137
+ }, null, 8, ["state", "handleEvents"]))
2138
+ ], 512), [
2139
+ [G, !e.state.propItem.label || (($ = e.state.inputValue) == null ? void 0 : $.trim())]
2140
+ ]),
2141
+ j(M("div", null, [
2142
+ (w = e.state.instance) != null && w.slots["second-panel"] ? me(e.$slots, "second-panel", fe({ key: 0 }, {
2143
+ state: e.state,
2144
+ pickerOptions: e.pickerOptions,
2145
+ handleEvents: e.handleEvents,
2146
+ back: () => e.resetInput(e.state)
2147
+ }, {
2148
+ onClick: t[2] || (t[2] = Z(() => {
2149
+ }, ["stop"]))
2150
+ })) : e.state.prevItem.type !== "custom" ? (y(), F(s, {
2151
+ key: 1,
2152
+ state: e.state,
2153
+ "picker-options": e.pickerOptions,
2154
+ onEvents: e.handleEvents
2155
+ }, null, 8, ["state", "picker-options", "onEvents"])) : (y(), S("div", {
2156
+ key: 2,
2157
+ class: "tvp-search-box__panel-box",
2158
+ onClick: t[4] || (t[4] = (P) => e.showDropdown(e.state))
2159
+ }, [
2160
+ me(e.$slots, e.state.prevItem.slotName, fe({
2161
+ showDropdown: () => e.showDropdown(e.state),
2162
+ onConfirm: e.handleConfirm
2163
+ }, {
2164
+ onClick: t[3] || (t[3] = Z(() => {
2165
+ }, ["stop"]))
2166
+ }))
2167
+ ]))
2168
+ ], 512), [
2169
+ [G, e.state.propItem.label]
2170
+ ])
2171
+ ];
2172
+ }),
2173
+ _: 3
2174
+ }, 8, ["style"])
2175
+ ]),
2176
+ default: C(() => [
2177
+ D(n, {
2178
+ ref: "inputRef",
2179
+ modelValue: e.state.inputValue,
2180
+ "onUpdate:modelValue": t[0] || (t[0] = (h) => e.state.inputValue = h),
2181
+ class: "tvp-search-box__input",
2182
+ placeholder: e.state.placeholder,
2183
+ maxlength: e.maxlength && e.maxlength + 1,
2184
+ onKeydown: [
2185
+ Ne(Z(e.backspaceDeleteTag, ["stop"]), ["delete"]),
2186
+ Ne(Z(e.createTag, ["stop"]), ["enter"])
2187
+ ],
2188
+ onInput: e.handleInput,
2189
+ onClick: e.handleClick
2190
+ }, {
2191
+ suffix: C(() => [
2192
+ j(D(d, {
2193
+ class: "tvp-search-box__input-close",
2194
+ onClick: Z(e.clearTag, ["stop"])
2195
+ }, null, 8, ["onClick"]), [
2196
+ [G, e.isShowClose]
2197
+ ]),
2198
+ j(M("span", Vn, null, 512), [
2199
+ [G, e.isShowClose]
2200
+ ]),
2201
+ e.showHelp ? (y(), F(r, {
2202
+ key: 0,
2203
+ effect: "light",
2204
+ content: e.t("tvp.tvpSearchbox.help"),
2205
+ placement: "top"
2206
+ }, {
2207
+ default: C(() => [
2208
+ D(p, {
2209
+ class: "tvp-search-box__input-help",
2210
+ onClick: Z(e.helpClick, ["stop"])
2211
+ }, null, 8, ["onClick"])
2212
+ ]),
2213
+ _: 1
2214
+ }, 8, ["content"])) : H("", !0),
2215
+ D(b, {
2216
+ class: "tvp-search-box__input-search",
2217
+ onClick: Z(e.createTag, ["stop"])
2218
+ }, null, 8, ["onClick"])
2219
+ ]),
2220
+ _: 1
2221
+ }, 8, ["modelValue", "placeholder", "maxlength", "onKeydown", "onInput", "onClick"])
2222
+ ]),
2223
+ _: 3
2224
+ }, 8, ["visible", "size"])
2225
+ ]),
2226
+ e.editable ? (y(), F(T, {
2227
+ key: 0,
2228
+ ref: "popoverRef",
2229
+ modelValue: e.state.popoverVisible,
2230
+ "onUpdate:modelValue": t[20] || (t[20] = (h) => e.state.popoverVisible = h),
2231
+ placement: "bottom-start",
2232
+ "visible-arrow": !1,
2233
+ trigger: "manual",
2234
+ "popper-class": "tvp-search-box__popover",
2235
+ class: "tvp-search-box__form-popover"
2236
+ }, {
2237
+ default: C(() => [
2238
+ e.state.prevItem.type !== "custom" ? (y(), S(B, { key: 0 }, [
2239
+ M("div", kn, [
2240
+ M("div", In, k(e.t("tvp.tvpSearchbox.attributeType")), 1),
2241
+ D(I, { class: "tvp-search-box__number-item" }, {
2242
+ default: C(() => [
2243
+ D(g, {
2244
+ modelValue: e.state.selectValue,
2245
+ "onUpdate:modelValue": t[7] || (t[7] = (h) => e.state.selectValue = h),
2246
+ searchable: "",
2247
+ disabled: e.state.prevItem.editAttrDisabled
2248
+ }, {
2249
+ default: C(() => [
2250
+ (y(), F(m, {
2251
+ key: e.state.allTypeAttri.label,
2252
+ label: e.t("tvp.tvpSearchbox.allProperty"),
2253
+ value: e.state.allTypeAttri.label,
2254
+ disabled: e.selectItemIsDisable(e.state.allTypeAttri),
2255
+ onClick: t[6] || (t[6] = (h) => e.selectPropChange(
2256
+ e.state.allTypeAttri,
2257
+ e.selectItemIsDisable(e.state.allTypeAttri)
2258
+ ))
2259
+ }, null, 8, ["label", "value", "disabled"])),
2260
+ (y(!0), S(B, null, z(e.state.recordItems, (h) => (y(), F(m, {
2261
+ key: h.label,
2262
+ label: h.label,
2263
+ value: h.label,
2264
+ disabled: e.selectItemIsDisable(h),
2265
+ onClick: ($) => e.selectPropChange(h, e.selectItemIsDisable(h))
2266
+ }, null, 8, ["label", "value", "disabled", "onClick"]))), 128))
2267
+ ]),
2268
+ _: 1
2269
+ }, 8, ["modelValue", "disabled"])
2270
+ ]),
2271
+ _: 1
2272
+ }),
2273
+ e.state.prevItem.operators ? (y(), S("div", wn, k(e.t("tvp.tvpSearchbox.operator")), 1)) : H("", !0),
2274
+ e.state.prevItem.operators ? (y(), F(I, {
2275
+ key: 1,
2276
+ class: "tvp-search-box__number-item"
2277
+ }, {
2278
+ default: C(() => [
2279
+ D(g, {
2280
+ modelValue: e.state.operatorValue,
2281
+ "onUpdate:modelValue": t[8] || (t[8] = (h) => e.state.operatorValue = h)
2282
+ }, {
2283
+ default: C(() => [
2284
+ (y(!0), S(B, null, z(e.state.currentOperators, (h) => (y(), F(m, {
2285
+ key: h,
2286
+ label: h,
2287
+ value: h
2288
+ }, null, 8, ["label", "value"]))), 128))
2289
+ ]),
2290
+ _: 1
2291
+ }, 8, ["modelValue"])
2292
+ ]),
2293
+ _: 1
2294
+ })) : H("", !0),
2295
+ e.state.prevItem.type !== "numRange" ? (y(), S("div", Tn, k(e.t("tvp.tvpSearchbox.tagValue")), 1)) : H("", !0),
2296
+ ["numRange", "dateRange", "datetimeRange", "custom"].includes(e.state.prevItem.type) ? H("", !0) : (y(), F(I, {
2297
+ key: 3,
2298
+ prop: "inputEditValue",
2299
+ class: "tvp-search-box__number-item"
2300
+ }, {
2301
+ default: C(() => {
2302
+ var h, $;
2303
+ return [
2304
+ ((h = e.state.currentEditValue) == null ? void 0 : h.length) > 0 ? (y(), F(g, {
2305
+ key: 0,
2306
+ modelValue: e.state.inputEditValue,
2307
+ "onUpdate:modelValue": t[9] || (t[9] = (w) => e.state.inputEditValue = w),
2308
+ class: "tvp-search-box-select",
2309
+ multiple: !!e.state.prevItem.mergeTag,
2310
+ "allow-create": ($ = e.state.prevItem) == null ? void 0 : $.allowCreate,
2311
+ filterable: "",
2312
+ "default-first-option": "",
2313
+ clearable: ""
2314
+ }, {
2315
+ default: C(() => [
2316
+ (y(!0), S(B, null, z(e.state.currentEditValue, (w) => (y(), F(m, {
2317
+ key: w.label,
2318
+ label: w.label,
2319
+ value: w.label
2320
+ }, null, 8, ["label", "value"]))), 128))
2321
+ ]),
2322
+ _: 1
2323
+ }, 8, ["modelValue", "multiple", "allow-create"])) : (y(), F(n, {
2324
+ key: 1,
2325
+ modelValue: e.state.inputEditValue,
2326
+ "onUpdate:modelValue": t[10] || (t[10] = (w) => e.state.inputEditValue = w),
2327
+ clearable: ""
2328
+ }, null, 8, ["modelValue"]))
2329
+ ];
2330
+ }),
2331
+ _: 1
2332
+ })),
2333
+ e.state.prevItem.type === "numRange" ? (y(), S("div", Sn, [
2334
+ M("div", Dn, k(e.t("tvp.tvpSearchbox.minValueText")) + "(" + k(e.state.prevItem.unit) + ") ", 1),
2335
+ D(I, {
2336
+ prop: e.state.curMinNumVar,
2337
+ class: "tvp-search-box__number-item",
2338
+ "show-message": e.state.numberShowMessage
2339
+ }, {
2340
+ default: C(() => [
2341
+ D(n, {
2342
+ modelValue: e.state[e.state.curMinNumVar],
2343
+ "onUpdate:modelValue": t[11] || (t[11] = (h) => e.state[e.state.curMinNumVar] = h),
2344
+ type: "number",
2345
+ class: "tvp-search-box__number-input"
2346
+ }, null, 8, ["modelValue"])
2347
+ ]),
2348
+ _: 1
2349
+ }, 8, ["prop", "show-message"]),
2350
+ M("div", Cn, k(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + k(e.state.prevItem.unit) + ") ", 1),
2351
+ D(I, {
2352
+ prop: e.state.curMaxNumVar,
2353
+ class: "tvp-search-box__number-item"
2354
+ }, {
2355
+ default: C(() => [
2356
+ D(n, {
2357
+ modelValue: e.state[e.state.curMaxNumVar],
2358
+ "onUpdate:modelValue": t[12] || (t[12] = (h) => e.state[e.state.curMaxNumVar] = h),
2359
+ type: "number",
2360
+ class: "tvp-search-box__number-input"
2361
+ }, null, 8, ["modelValue"])
2362
+ ]),
2363
+ _: 1
2364
+ }, 8, ["prop"])
2365
+ ])) : H("", !0),
2366
+ e.state.prevItem.type === "dateRange" ? (y(), S("div", Mn, [
2367
+ M("div", En, k(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2368
+ value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2369
+ }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
2370
+ M("div", $n, k(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2371
+ D(I, {
2372
+ prop: "startDate",
2373
+ "show-message": !!e.state.prevItem.maxTimeLength,
2374
+ class: "tvp-search-box__date-item"
2375
+ }, {
2376
+ default: C(() => [
2377
+ D(L, {
2378
+ modelValue: e.state.startDate,
2379
+ "onUpdate:modelValue": t[13] || (t[13] = (h) => e.state.startDate = h),
2380
+ format: e.state.prevItem.format || e.state.dateRangeFormat,
2381
+ "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
2382
+ "picker-options": e.pickerOptions(e.state.startDate, "endDate"),
2383
+ class: "tvp-search-box__date-picker"
2384
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
2385
+ ]),
2386
+ _: 1
2387
+ }, 8, ["show-message"]),
2388
+ M("div", Ln, k(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2389
+ D(I, {
2390
+ prop: "endDate",
2391
+ class: "tvp-search-box__date-item"
2392
+ }, {
2393
+ default: C(() => [
2394
+ D(L, {
2395
+ modelValue: e.state.endDate,
2396
+ "onUpdate:modelValue": t[14] || (t[14] = (h) => e.state.endDate = h),
2397
+ format: e.state.prevItem.format || e.state.dateRangeFormat,
2398
+ "value-format": e.state.prevItem.format || e.state.dateRangeFormat,
2399
+ "picker-options": e.pickerOptions(e.state.startDate),
2400
+ class: "tvp-search-box__date-picker"
2401
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
2402
+ ]),
2403
+ _: 1
2404
+ })
2405
+ ])) : H("", !0),
2406
+ e.state.prevItem.type === "datetimeRange" ? (y(), S("div", _n, [
2407
+ M("div", Rn, k(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
2408
+ value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
2409
+ }) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
2410
+ M("div", Nn, k(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
2411
+ D(I, {
2412
+ prop: "startDateTime",
2413
+ "show-message": !!e.state.prevItem.maxTimeLength,
2414
+ class: "tvp-search-box__date-item"
2415
+ }, {
2416
+ default: C(() => [
2417
+ D(L, {
2418
+ modelValue: e.state.startDateTime,
2419
+ "onUpdate:modelValue": t[15] || (t[15] = (h) => e.state.startDateTime = h),
2420
+ type: "datetime",
2421
+ isutc8: !0,
2422
+ format: e.state.prevItem.format || e.state.datetimeRangeFormat,
2423
+ "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
2424
+ "picker-options": e.pickerOptions(e.state.startDateTime, "endDateTime"),
2425
+ class: "tvp-search-box__date-picker"
2426
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
2427
+ ]),
2428
+ _: 1
2429
+ }, 8, ["show-message"]),
2430
+ M("div", Pn, k(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
2431
+ D(I, {
2432
+ prop: "endDateTime",
2433
+ class: "tvp-search-box__date-item"
2434
+ }, {
2435
+ default: C(() => [
2436
+ D(L, {
2437
+ modelValue: e.state.endDateTime,
2438
+ "onUpdate:modelValue": t[16] || (t[16] = (h) => e.state.endDateTime = h),
2439
+ type: "datetime",
2440
+ isutc8: !0,
2441
+ format: e.state.prevItem.format || e.state.datetimeRangeFormat,
2442
+ "value-format": e.state.prevItem.format || e.state.datetimeRangeFormat,
2443
+ "picker-options": e.pickerOptions(e.state.startDateTime),
2444
+ class: "tvp-search-box__date-picker"
2445
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
2446
+ ]),
2447
+ _: 1
2448
+ })
2449
+ ])) : H("", !0)
2450
+ ]),
2451
+ M("div", On, [
2452
+ D(V, {
2453
+ size: "mini",
2454
+ onClick: t[17] || (t[17] = (h) => e.confirmEditTag(!1))
2455
+ }, {
2456
+ default: C(() => [
2457
+ K(k(e.t("tvp.tvpSearchbox.cancel")), 1)
2458
+ ]),
2459
+ _: 1
2460
+ }),
2461
+ D(V, {
2462
+ size: "mini",
2463
+ disabled: e.state.hasFormError,
2464
+ onClick: t[18] || (t[18] = (h) => e.confirmEditTag(!0))
2465
+ }, {
2466
+ default: C(() => [
2467
+ K(k(e.t("tvp.tvpSearchbox.confirm")), 1)
2468
+ ]),
2469
+ _: 1
2470
+ }, 8, ["disabled"])
2471
+ ])
2472
+ ], 64)) : (y(), S("div", Fn, [
2473
+ me(e.$slots, `${e.state.prevItem.slotName}-edit`, fe({
2474
+ showDropdown: () => e.showPopover(e.state),
2475
+ onConfirm: e.handleEditConfirm
2476
+ }, {
2477
+ onClick: t[19] || (t[19] = Z(() => {
2478
+ }, ["stop"]))
2479
+ }))
2480
+ ]))
2481
+ ]),
2482
+ _: 3
2483
+ }, 8, ["modelValue"])) : H("", !0)
2484
+ ]),
2485
+ _: 3
2486
+ }, 8, ["model", "rules", "validate-type", "size"])
2487
+ ], 2);
2706
2488
  }
2707
- const ma = /* @__PURE__ */ function() {
2708
- return ua.exports;
2709
- }(), fa = {
2710
- ...J,
2489
+ const Bn = /* @__PURE__ */ _e(hn, [["render", xn]]), An = {
2490
+ ...ve,
2711
2491
  tiny_mode: {
2712
2492
  type: String,
2713
2493
  default: "pc"
@@ -2782,23 +2562,23 @@ const ma = /* @__PURE__ */ function() {
2782
2562
  type: String,
2783
2563
  default: ""
2784
2564
  }
2785
- }, Y = X({
2786
- name: pe + "SearchBox",
2787
- props: fa,
2788
- ...ma
2789
- }), ha = "3.27.1";
2790
- Y.install = function(a) {
2791
- a.component(Y.name, Y);
2565
+ }, ue = be({
2566
+ name: Me + "SearchBox",
2567
+ props: An,
2568
+ ...Bn
2569
+ }), zn = "3.27.1";
2570
+ ue.install = function(e) {
2571
+ e.component(ue.name, ue);
2792
2572
  };
2793
- Y.version = ha;
2794
- window && typeof window < "u" && window.Vue && Y.install(window.Vue);
2573
+ ue.version = zn;
2574
+ window && typeof window < "u" && window.Vue && ue.install(window.Vue);
2795
2575
  export {
2796
- Jt as TinySearchBoxFirstLevelPanel,
2797
- la as TinySearchBoxSecondLevelPanel,
2798
- Y as default,
2799
- $e as enUS,
2800
- Nt as setGlobalApp,
2801
- N as t,
2802
- Ee as zhCN
2576
+ $o as TinySearchBoxFirstLevelPanel,
2577
+ fn as TinySearchBoxSecondLevelPanel,
2578
+ ue as default,
2579
+ Ze as enUS,
2580
+ Jt as setGlobalApp,
2581
+ Y as t,
2582
+ qe as zhCN
2803
2583
  };
2804
2584
  //# sourceMappingURL=index.js.map