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