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