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