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