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