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