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