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