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