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