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