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