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