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