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