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