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