@opentiny/vue-search-box 3.27.1 → 3.28.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 +10 -2
- package/index.js +1013 -978
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.type.d.ts +190 -0
package/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { iconSearch as
|
|
16
|
-
import
|
|
17
|
-
import { resolveComponent as N, openBlock as y, createElementBlock as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
const
|
|
22
|
-
if (typeof e == "string" && typeof l == "string" &&
|
|
2
|
+
import { defineComponent as ve, $prefix as $e, $props as ge, setup as Le } from "@opentiny/vue-common";
|
|
3
|
+
import ot from "@opentiny/vue-tag";
|
|
4
|
+
import Fe from "@opentiny/vue-input";
|
|
5
|
+
import nt from "@opentiny/vue-dropdown";
|
|
6
|
+
import lt from "@opentiny/vue-dropdown-menu";
|
|
7
|
+
import Be from "@opentiny/vue-button";
|
|
8
|
+
import at from "@opentiny/vue-tooltip";
|
|
9
|
+
import xe from "@opentiny/vue-date-picker";
|
|
10
|
+
import rt from "@opentiny/vue-form";
|
|
11
|
+
import Ae from "@opentiny/vue-form-item";
|
|
12
|
+
import st from "@opentiny/vue-popover";
|
|
13
|
+
import it from "@opentiny/vue-select";
|
|
14
|
+
import pt from "@opentiny/vue-option";
|
|
15
|
+
import { iconSearch as ut, iconClose as ct, iconHelpQuery as dt } from "@opentiny/vue-icon";
|
|
16
|
+
import ze from "@opentiny/vue-dropdown-item";
|
|
17
|
+
import { resolveComponent as N, openBlock as y, createElementBlock as w, withDirectives as H, createVNode as C, withCtx as M, createElementVNode as D, toDisplayString as I, vShow as G, Fragment as x, renderList as U, createBlock as F, createCommentVNode as z, createTextVNode as K, resolveDirective as mt, normalizeClass as he, withModifiers as Y, withKeys as Oe, normalizeStyle as ft, renderSlot as me, mergeProps as fe } from "vue";
|
|
18
|
+
import ht from "@opentiny/vue-checkbox";
|
|
19
|
+
import bt from "@opentiny/vue-checkbox-group";
|
|
20
|
+
import vt from "@opentiny/vue-loading";
|
|
21
|
+
const gt = (e, t, o, l = "0") => {
|
|
22
|
+
if (typeof e == "string" && typeof l == "string" && Ue(t)) {
|
|
23
23
|
let c = e.length - t;
|
|
24
24
|
if (c > 0)
|
|
25
25
|
return o ? e.substr(0, t) : e.substr(c, t);
|
|
@@ -31,9 +31,9 @@ const ht = (e, t, o, l = "0") => {
|
|
|
31
31
|
return o ? e + b : b + e;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
const
|
|
34
|
+
}, yt = Object.prototype.toString, Vt = Object.prototype.hasOwnProperty, It = Vt.toString;
|
|
35
|
+
It.call(Object);
|
|
36
|
+
const kt = {
|
|
37
37
|
"[object Error]": "error",
|
|
38
38
|
"[object Object]": "object",
|
|
39
39
|
"[object RegExp]": "regExp",
|
|
@@ -44,13 +44,13 @@ const yt = {
|
|
|
44
44
|
"[object String]": "string",
|
|
45
45
|
"[object Number]": "number",
|
|
46
46
|
"[object Boolean]": "boolean"
|
|
47
|
-
},
|
|
47
|
+
}, wt = (e) => e == null, Tt = (e) => wt(e) ? String(e) : kt[yt.call(e)] || "object", Ue = (e) => typeof e == "number" && isFinite(e), St = (e) => Tt(e) === "date", je = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Dt = new RegExp(
|
|
48
48
|
"^(\\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}))?)?)?$"
|
|
49
|
-
),
|
|
49
|
+
), Ct = new RegExp(
|
|
50
50
|
"^(((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}))?)?)?$"
|
|
51
|
-
),
|
|
51
|
+
), Mt = new RegExp(
|
|
52
52
|
"^(\\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]))$"
|
|
53
|
-
),
|
|
53
|
+
), Et = {
|
|
54
54
|
"y{1,4}": /y{1,4}/,
|
|
55
55
|
"M{1,2}": /M{1,2}/,
|
|
56
56
|
"d{1,2}": /d{1,2}/,
|
|
@@ -68,18 +68,18 @@ const yt = {
|
|
|
68
68
|
MINUTE: 59,
|
|
69
69
|
SECOND: 59,
|
|
70
70
|
MILLISECOND: 999
|
|
71
|
-
},
|
|
71
|
+
}, $t = "-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00", Lt = "-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00", _t = "+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00", Rt = [].concat($t.split(","), Lt.split(","), _t.split(",")), Nt = (e) => {
|
|
72
72
|
const t = 0 - e.getTimezoneOffset() / 60;
|
|
73
73
|
let o;
|
|
74
74
|
return t === 0 ? o = "Z" : t > 0 ? o = "+" + (t > 10 ? t : "0" + t) + "00" : o = (t < -10 ? t : "-0" + -t) + "00", o;
|
|
75
|
-
},
|
|
76
|
-
let v =
|
|
77
|
-
if (
|
|
78
|
-
return new Date(e, t, o, l, c, i,
|
|
79
|
-
},
|
|
75
|
+
}, He = (e) => e % 400 === 0 || e % 4 === 0 && e % 100 !== 0, Ke = (e) => e > oe.MILLISECOND ? Number(String(e).substring(0, 3)) : e, _e = ({ year: e, month: t, date: o, hours: l, minutes: c, seconds: i, milliseconds: b }) => {
|
|
76
|
+
let v = je[t];
|
|
77
|
+
if (He(e) && t === 1 && (v += 1), o <= v)
|
|
78
|
+
return new Date(e, t, o, l, c, i, Ke(b));
|
|
79
|
+
}, Pt = (e) => {
|
|
80
80
|
if (e.length === 23) {
|
|
81
81
|
const t = Number(e[1]), o = e[3] - 1, l = Number(e[9] || 1), c = e[15] || 0, i = e[17] || 0, b = e[20] || 0, v = e[22] || 0;
|
|
82
|
-
return
|
|
82
|
+
return _e({
|
|
83
83
|
date: l,
|
|
84
84
|
year: t,
|
|
85
85
|
hours: c,
|
|
@@ -89,10 +89,10 @@ const yt = {
|
|
|
89
89
|
milliseconds: v
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, Ot = (e) => {
|
|
93
93
|
if (e.length === 22) {
|
|
94
94
|
const t = Number(e[12]), o = e[1] - 1, l = Number(e[6] || 1), c = e[14] || 0, i = e[16] || 0, b = e[19] || 0, v = e[21] || 0;
|
|
95
|
-
return
|
|
95
|
+
return _e({
|
|
96
96
|
year: t,
|
|
97
97
|
month: o,
|
|
98
98
|
date: l,
|
|
@@ -102,34 +102,34 @@ const yt = {
|
|
|
102
102
|
milliseconds: v
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
},
|
|
105
|
+
}, Ft = (e) => {
|
|
106
106
|
if (e.length !== 25)
|
|
107
107
|
return;
|
|
108
|
-
const t = Number(e[1]), o = e[2] - 1, l = Number(e[6]), c = new Date(t, o, l).getTimezoneOffset(), i = e[12] || 0, b = e[14] || 0, v = e[17] || 0,
|
|
108
|
+
const t = Number(e[1]), o = e[2] - 1, l = Number(e[6]), c = new Date(t, o, l).getTimezoneOffset(), i = e[12] || 0, b = e[14] || 0, v = e[17] || 0, m = e[19] || 0;
|
|
109
109
|
let p = e[20];
|
|
110
|
-
const r = e[21], n = e[22] || 0,
|
|
111
|
-
let
|
|
112
|
-
if (
|
|
110
|
+
const r = e[21], n = e[22] || 0, d = e[24] || 0;
|
|
111
|
+
let u = je[o], s, a;
|
|
112
|
+
if (He(t) && o === 1 && (u += 1), l <= u) {
|
|
113
113
|
if (p === "Z")
|
|
114
|
-
|
|
114
|
+
s = i - c / 60, a = b;
|
|
115
115
|
else {
|
|
116
|
-
if (p.includes(":") || (p = p.substr(0, 3) + ":" + p.substr(3)),
|
|
116
|
+
if (p.includes(":") || (p = p.substr(0, 3) + ":" + p.substr(3)), !Rt.includes(p))
|
|
117
117
|
return;
|
|
118
|
-
|
|
118
|
+
s = r === "+" ? i - n - c / 60 : Number(i) + Number(n) - c / 60, a = r === "+" ? b - d : Number(b) + Number(d);
|
|
119
119
|
}
|
|
120
|
-
return new Date(t, o, l,
|
|
120
|
+
return new Date(t, o, l, s, a, v, Ke(m));
|
|
121
121
|
}
|
|
122
|
-
},
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
],
|
|
127
|
-
for (let t = 0, o =
|
|
128
|
-
const l =
|
|
122
|
+
}, Te = [
|
|
123
|
+
[Dt, Pt],
|
|
124
|
+
[Ct, Ot],
|
|
125
|
+
[Mt, Ft]
|
|
126
|
+
], Bt = (e) => {
|
|
127
|
+
for (let t = 0, o = Te.length; t < o; t++) {
|
|
128
|
+
const l = Te[t][0].exec(e);
|
|
129
129
|
if (l && l.length > 0)
|
|
130
|
-
return
|
|
130
|
+
return Te[t][1](l);
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, xt = (e, t, o) => {
|
|
133
133
|
if (o)
|
|
134
134
|
switch (o) {
|
|
135
135
|
case "yyyy":
|
|
@@ -162,56 +162,56 @@ const yt = {
|
|
|
162
162
|
e[6] = t;
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
|
-
},
|
|
165
|
+
}, At = (e, t) => {
|
|
166
166
|
const o = [0, -1, 0, 0, 0, 0];
|
|
167
167
|
if (e.length !== t.length)
|
|
168
168
|
return o;
|
|
169
169
|
let l = 0, c = 0;
|
|
170
170
|
for (let i = 0, b = e.length; i < b; i++) {
|
|
171
|
-
const v = e.substr(i, 1),
|
|
172
|
-
if (
|
|
171
|
+
const v = e.substr(i, 1), m = isNaN(Number(v)) || (v == null ? void 0 : v.trim()) === "";
|
|
172
|
+
if (m && v === t.substr(i, 1) || i === b - 1) {
|
|
173
173
|
let p, r;
|
|
174
|
-
if (
|
|
174
|
+
if (m) {
|
|
175
175
|
p = e.substring(l, i), l = i + 1;
|
|
176
176
|
const n = t.indexOf(v, c);
|
|
177
177
|
r = t.substring(c, n === -1 ? t.length : n), c = n + 1;
|
|
178
178
|
} else
|
|
179
179
|
p = e.substring(l, b), r = t.substring(c, b);
|
|
180
|
-
(p.length === r.length || p) &&
|
|
180
|
+
(p.length === r.length || p) && xt(o, p, r);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
return o;
|
|
184
|
-
}, se = (e, t, o) => isNaN(e) || e < t || e > o,
|
|
184
|
+
}, se = (e, t, o) => isNaN(e) || e < t || e > o, zt = ({ year: e, month: t, date: o, hours: l, minutes: c, seconds: i, milliseconds: b }) => se(e, 0, oe.YEAR) || se(t, 0, oe.MONTH) || se(o, 0, oe.DATE) || se(l, 0, oe.HOUR) || se(c, 0, oe.MINUTE) || se(i, 0, oe.SECOND) || se(b, 0, oe.MILLISECOND), Ut = (e, t) => {
|
|
185
185
|
if (typeof t == "string") {
|
|
186
|
-
const o =
|
|
187
|
-
return
|
|
186
|
+
const o = At(e, t), l = Number(o[0]), c = Number(o[1]), i = Number(o[2] || 1), b = Number(o[3] || 0), v = Number(o[4] || 0), m = Number(o[5] || 0), p = Number(o[6] || 0);
|
|
187
|
+
return zt({
|
|
188
188
|
year: l,
|
|
189
189
|
month: c,
|
|
190
190
|
date: i,
|
|
191
191
|
hours: b,
|
|
192
192
|
minutes: v,
|
|
193
|
-
seconds:
|
|
193
|
+
seconds: m,
|
|
194
194
|
milliseconds: p
|
|
195
|
-
}) ? void 0 :
|
|
195
|
+
}) ? void 0 : _e({
|
|
196
196
|
year: l,
|
|
197
197
|
date: i,
|
|
198
198
|
month: c,
|
|
199
199
|
minutes: v,
|
|
200
200
|
hours: b,
|
|
201
201
|
milliseconds: p,
|
|
202
|
-
seconds:
|
|
202
|
+
seconds: m
|
|
203
203
|
});
|
|
204
204
|
} else
|
|
205
|
-
return
|
|
206
|
-
},
|
|
205
|
+
return Bt(e);
|
|
206
|
+
}, Ge = (e, t, o) => {
|
|
207
207
|
let l;
|
|
208
|
-
if (
|
|
209
|
-
const c = o &&
|
|
208
|
+
if (Ue(e) ? l = new Date(e) : typeof e == "string" && (l = Ut(e, t)), o) {
|
|
209
|
+
const c = o && Ge(o) || new Date(1, 1, 1, 0, 0, 0);
|
|
210
210
|
return l && l < c ? c : l;
|
|
211
211
|
}
|
|
212
212
|
return l;
|
|
213
|
-
},
|
|
214
|
-
if (
|
|
213
|
+
}, De = function(e, t = "yyyy/MM/dd hh:mm:ss") {
|
|
214
|
+
if (St(e)) {
|
|
215
215
|
if (typeof t == "string") {
|
|
216
216
|
const o = {
|
|
217
217
|
"y{1,4}": e.getFullYear(),
|
|
@@ -222,20 +222,20 @@ const yt = {
|
|
|
222
222
|
"m{1,2}": e.getMinutes(),
|
|
223
223
|
"s{1,2}": e.getSeconds(),
|
|
224
224
|
"S{1,3}": e.getMilliseconds(),
|
|
225
|
-
"Z{1,1}":
|
|
225
|
+
"Z{1,1}": Nt(e)
|
|
226
226
|
};
|
|
227
227
|
return Object.keys(o).forEach((l) => {
|
|
228
|
-
const c = t.match(
|
|
229
|
-
l && c && c.length && (t = t.replace(c[0], l === "Z{1,1}" ? o[l] :
|
|
228
|
+
const c = t.match(Et[l]);
|
|
229
|
+
l && c && c.length && (t = t.replace(c[0], l === "Z{1,1}" ? o[l] : gt(o[l].toString(), c[0].length)));
|
|
230
230
|
}), t;
|
|
231
231
|
}
|
|
232
232
|
} else if (typeof e == "string" && arguments.length >= 2) {
|
|
233
233
|
let o = t;
|
|
234
234
|
arguments.length === 2 ? t = void 0 : o = arguments[2];
|
|
235
|
-
const l =
|
|
236
|
-
return l ?
|
|
235
|
+
const l = Ge(e, t);
|
|
236
|
+
return l ? De(l, o) : "";
|
|
237
237
|
}
|
|
238
|
-
},
|
|
238
|
+
}, L = (e, t = !0) => {
|
|
239
239
|
t ? e.visibleTimer = setTimeout(() => {
|
|
240
240
|
e.visible = !0;
|
|
241
241
|
}, 0) : (clearTimeout(e.visibleTimer), e.visibleTimer = null, e.visible = !1);
|
|
@@ -245,7 +245,7 @@ const yt = {
|
|
|
245
245
|
e.popoverVisible = t;
|
|
246
246
|
const { dropdownRef: o } = e.instance;
|
|
247
247
|
t && o.state.visible && (clearTimeout(Number(o.state.timeout)), o.state.timeout = null, o.state.visible = !1);
|
|
248
|
-
},
|
|
248
|
+
}, jt = (e, t = 200) => {
|
|
249
249
|
let o = null;
|
|
250
250
|
const l = function(...c) {
|
|
251
251
|
o && clearTimeout(o), o = setTimeout(() => {
|
|
@@ -267,7 +267,7 @@ const yt = {
|
|
|
267
267
|
return e;
|
|
268
268
|
}
|
|
269
269
|
return t;
|
|
270
|
-
},
|
|
270
|
+
}, ye = (e, t = ["mergeTag", "options", "idMapKey"]) => {
|
|
271
271
|
const o = { ...e };
|
|
272
272
|
return t.forEach((l) => {
|
|
273
273
|
delete o[l];
|
|
@@ -275,39 +275,39 @@ const yt = {
|
|
|
275
275
|
}, J = (e, t, o = "") => {
|
|
276
276
|
const { valueMap: l, prevItem: c } = e, i = (c.label || o) + t;
|
|
277
277
|
return l.has(i);
|
|
278
|
-
},
|
|
278
|
+
}, Ve = (e) => {
|
|
279
279
|
e.propItem = {}, e.inputValue = "";
|
|
280
280
|
}, Q = ({ emit: e, state: t, nextTick: o, ...l }) => {
|
|
281
281
|
de(t, !1);
|
|
282
|
-
const { tagList: c = null, index: i = -1, newTag: b = null, newValue: v = null, oldValue:
|
|
283
|
-
if (p ||
|
|
282
|
+
const { tagList: c = null, index: i = -1, newTag: b = null, newValue: v = null, oldValue: m = null, isEdit: p } = l;
|
|
283
|
+
if (p || Ve(t), !c && i === -1 && !v)
|
|
284
284
|
return;
|
|
285
|
-
const r =
|
|
285
|
+
const r = m || ne(t.innerModelValue);
|
|
286
286
|
let n = [];
|
|
287
287
|
v ? n = [...v] : i !== -1 ? (n = [...t.innerModelValue], b ? n.splice(i, 1, b) : n.splice(i, 1)) : n = [...t.innerModelValue, ...c], t.innerModelValue = n, e("update:modelValue", ne(n)), e("change", ne(n), r);
|
|
288
288
|
}, le = (e) => e, ae = (e, t, o) => {
|
|
289
289
|
const l = t.idMapKey || e.idMapKey;
|
|
290
290
|
return o && o[l] !== void 0 ? { [l]: o[l] } : null;
|
|
291
291
|
};
|
|
292
|
-
function
|
|
292
|
+
function Ht({ props: e, state: t, emit: o, nextTick: l }) {
|
|
293
293
|
let c = ne(t.inputValue);
|
|
294
294
|
const i = (p) => {
|
|
295
295
|
if (p) {
|
|
296
296
|
const r = t.recordItems.find((n) => n.label === p.label);
|
|
297
297
|
if (r && r.options) {
|
|
298
|
-
const n = r.options.find((
|
|
298
|
+
const n = r.options.find((d) => d.label === p.value);
|
|
299
299
|
n && (n.isChecked = !1);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
};
|
|
303
303
|
return {
|
|
304
304
|
deleteTag: (p) => {
|
|
305
|
-
|
|
305
|
+
L(t, !1), i(p);
|
|
306
306
|
const r = e.modelValue.filter((n) => n !== p);
|
|
307
307
|
Q({ emit: o, state: t, nextTick: l, newValue: r });
|
|
308
308
|
},
|
|
309
309
|
clearTag: () => {
|
|
310
|
-
|
|
310
|
+
L(t, !1), e.modelValue.forEach((p) => i(p)), t.propItem = {}, t.inputValue = "", Q({ emit: o, state: t, nextTick: l, newValue: [] }), o("clear");
|
|
311
311
|
},
|
|
312
312
|
backspaceDeleteTag: () => {
|
|
313
313
|
var p, r, n;
|
|
@@ -317,231 +317,234 @@ function zt({ props: e, state: t, emit: o, nextTick: l }) {
|
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
if (c === "" && t.inputValue === "") {
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
i(e.modelValue[
|
|
323
|
-
const
|
|
324
|
-
Q({ emit: o, state: t, nextTick: l, newValue:
|
|
320
|
+
L(t, !1);
|
|
321
|
+
const d = e.modelValue.length - 1;
|
|
322
|
+
i(e.modelValue[d]);
|
|
323
|
+
const u = t.innerModelValue.slice(0, e.modelValue.length - 1);
|
|
324
|
+
Q({ emit: o, state: t, nextTick: l, newValue: u });
|
|
325
325
|
}
|
|
326
326
|
c = t.inputValue, (n = (r = (p = t == null ? void 0 : t.instance) == null ? void 0 : p.refs) == null ? void 0 : r.inputRef) != null && n.$el && t.instance.refs.inputRef.$el.click();
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
const
|
|
332
|
-
const { prevItem: l, inputEditValue: c } = t, { operators: i } = l, b =
|
|
333
|
-
let v = null,
|
|
331
|
+
const Kt = async (e, t, o) => {
|
|
332
|
+
const { prevItem: l, inputEditValue: c } = t, { operators: i } = l, b = ye(l);
|
|
333
|
+
let v = null, m = !0;
|
|
334
334
|
if (await e.$refs.formRef.validateField(["inputEditValue"], (p) => {
|
|
335
|
-
p && (
|
|
336
|
-
}),
|
|
335
|
+
p && (m = !1);
|
|
336
|
+
}), m) {
|
|
337
337
|
let p = null;
|
|
338
338
|
const r = t.operatorValue && i ? { operator: t.operatorValue } : null;
|
|
339
339
|
let n = c;
|
|
340
|
-
const
|
|
340
|
+
const d = {};
|
|
341
341
|
if (Array.isArray(c))
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
if (n = n ? `${n} | ${a}` : a,
|
|
345
|
-
const
|
|
346
|
-
|
|
342
|
+
d.options = [], n = "", c.forEach((u) => {
|
|
343
|
+
const s = t.currentEditValue.find((h) => h.label === u), a = (s == null ? void 0 : s.label) || u;
|
|
344
|
+
if (n = n ? `${n} | ${a}` : a, s) {
|
|
345
|
+
const h = ae(o, l, s);
|
|
346
|
+
d.options.push({ label: a, ...h });
|
|
347
347
|
} else
|
|
348
|
-
|
|
348
|
+
d.options.push({ label: a });
|
|
349
349
|
});
|
|
350
350
|
else if (Array.isArray(t.currentEditValue)) {
|
|
351
|
-
const
|
|
352
|
-
p = ae(o, l,
|
|
351
|
+
const u = t.currentEditValue.find((s) => s.label === n);
|
|
352
|
+
p = ae(o, l, u);
|
|
353
353
|
}
|
|
354
|
-
v = le({ ...b, label: t.selectValue, ...r, value: n, ...p, ...
|
|
354
|
+
v = le({ ...b, label: t.selectValue, ...r, value: n, ...p, ...d });
|
|
355
355
|
}
|
|
356
356
|
return v;
|
|
357
|
-
},
|
|
358
|
-
const { prevItem: l } = t, c = `min${l.field}`, i = `max${l.field}`, b = t[c], v = t[i],
|
|
357
|
+
}, qe = async (e, t, o) => {
|
|
358
|
+
const { prevItem: l } = t, c = `min${l.field}`, i = `max${l.field}`, b = t[c], v = t[i], m = [c, i];
|
|
359
359
|
let p = !0, r = null;
|
|
360
|
-
if (await e.$refs.formRef.validateField(
|
|
360
|
+
if (await e.$refs.formRef.validateField(m, (n) => {
|
|
361
361
|
n && (p = !1);
|
|
362
362
|
}), p) {
|
|
363
|
-
const { field: n, label:
|
|
363
|
+
const { field: n, label: d, unit: u, type: s, operators: a } = l, h = u ? `${d}(${u})` : d;
|
|
364
364
|
let g = "";
|
|
365
365
|
b && v ? g = `${b}-${v}` : g = b ? `≥${b}` : `≤${v}`;
|
|
366
|
-
const
|
|
367
|
-
r = le({ type:
|
|
366
|
+
const T = ae(o, l, l), $ = t.operatorValue && a ? { operator: t.operatorValue } : null;
|
|
367
|
+
r = le({ type: s, field: n, label: h, value: g, ...T, start: b, end: v, ...$ });
|
|
368
368
|
}
|
|
369
369
|
return r;
|
|
370
|
-
},
|
|
371
|
-
const { prevItem: c, startDate: i, endDate: b, startDateTime: v, endDateTime:
|
|
372
|
-
let p = null, r = null, n = !0,
|
|
373
|
-
if (l ? (p = v, r =
|
|
374
|
-
|
|
370
|
+
}, Ce = async (e, t, o, l) => {
|
|
371
|
+
const { prevItem: c, startDate: i, endDate: b, startDateTime: v, endDateTime: m } = t;
|
|
372
|
+
let p = null, r = null, n = !0, d = null, u = null;
|
|
373
|
+
if (l ? (p = v, r = m, u = ["startDateTime", "endDateTime"]) : (p = i, r = b, u = ["startDate", "endDate"]), await e.$refs.formRef.validateField(u, (s) => {
|
|
374
|
+
s && (n = !1);
|
|
375
375
|
}), n) {
|
|
376
|
-
const { operators:
|
|
377
|
-
let
|
|
376
|
+
const { operators: s } = c, a = ye(c);
|
|
377
|
+
let h = "";
|
|
378
378
|
if (p && r) {
|
|
379
379
|
if (p > r)
|
|
380
380
|
return;
|
|
381
|
-
p === r ?
|
|
381
|
+
p === r ? h = p : h = `${p}-${r}`;
|
|
382
382
|
} else
|
|
383
|
-
|
|
384
|
-
const g = ae(o, c, c),
|
|
385
|
-
|
|
383
|
+
h = p ? `≥${p}` : `≤${r}`;
|
|
384
|
+
const g = ae(o, c, c), T = t.operatorValue && s ? { operator: t.operatorValue } : null;
|
|
385
|
+
d = le({ ...a, value: h, start: p, end: r, ...g, ...T });
|
|
386
386
|
}
|
|
387
|
-
return
|
|
388
|
-
},
|
|
389
|
-
const { prevItem: l } = e, { field: c, start: i, end: b, min: v = l.min, max:
|
|
387
|
+
return d;
|
|
388
|
+
}, Ze = (e, t, o) => {
|
|
389
|
+
const { prevItem: l } = e, { field: c, start: i, end: b, min: v = l.min, max: m = l.max } = t, p = `min${c}`, r = `max${c}`;
|
|
390
390
|
(e.curMinNumVar !== p || e.curMaxNumVar !== r) && (delete e[e.curMinNumVar], delete e[e.curMaxNumVar], delete e.formRules[e.curMinNumVar], delete e.formRules[e.curMaxNumVar], e.curMinNumVar = p, e.curMaxNumVar = r), e[e.curMinNumVar] = i, e[e.curMaxNumVar] = b;
|
|
391
|
-
const { curMinNumVar: n, curMaxNumVar:
|
|
392
|
-
|
|
393
|
-
validator: (a,
|
|
394
|
-
const
|
|
395
|
-
!
|
|
391
|
+
const { curMinNumVar: n, curMaxNumVar: d } = e, u = te(v), s = te(m);
|
|
392
|
+
u || s ? (e.formRules[n] = {
|
|
393
|
+
validator: (a, h, g) => {
|
|
394
|
+
const T = te(h);
|
|
395
|
+
!T && te(e[d]) || T && (u && !s && h >= v || !u && s && h <= m || h >= v && h <= m) ? g() : (e.numberShowMessage = !!(h || e[d]), g(new Error(o("tvp.tvpSearchbox.rangeMinErr", [v, m]))));
|
|
396
396
|
}
|
|
397
|
-
}, e.formRules[
|
|
398
|
-
validator: (a,
|
|
399
|
-
const
|
|
400
|
-
!
|
|
397
|
+
}, e.formRules[d] = {
|
|
398
|
+
validator: (a, h, g) => {
|
|
399
|
+
const T = te(e[n]), $ = T && v < e[n] ? Number(e[n]) : v, V = te($), f = te(h);
|
|
400
|
+
!f && T || f && (V && !s && h >= $ || !V && s && h <= m || h >= $ && h <= m) ? g() : g(!f && !T ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
|
|
401
401
|
}
|
|
402
|
-
}) : e.formRules[
|
|
403
|
-
validator: (a,
|
|
404
|
-
const
|
|
405
|
-
|
|
402
|
+
}) : e.formRules[d] = {
|
|
403
|
+
validator: (a, h, g) => {
|
|
404
|
+
const T = e[n], $ = te(h), V = te(T);
|
|
405
|
+
$ && !V || !$ && V || $ && V && h >= Number(T) ? g() : g(!$ && !V ? new Error(o("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(o("tvp.tvpSearchbox.rangeMaxErr")));
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
};
|
|
409
|
-
function
|
|
410
|
-
const
|
|
411
|
-
var
|
|
412
|
-
const { start:
|
|
413
|
-
if (o.backupList = V.options,
|
|
414
|
-
|
|
415
|
-
else if (
|
|
409
|
+
function Gt({ props: e, emit: t, state: o, t: l, format: c, nextTick: i, vm: b, cancelHandleInput: v }) {
|
|
410
|
+
const m = b || o.instance, p = (V) => {
|
|
411
|
+
var _, E, P;
|
|
412
|
+
const { start: f, end: S, type: k } = V;
|
|
413
|
+
if (o.backupList = V.options, k === "numRange")
|
|
414
|
+
Ze(o, V, l);
|
|
415
|
+
else if (k === "dateRange") {
|
|
416
416
|
const { dateRangeFormat: R } = o;
|
|
417
|
-
if (!o.startDate &&
|
|
418
|
-
const O = c(
|
|
417
|
+
if (!o.startDate && f) {
|
|
418
|
+
const O = c(f, R);
|
|
419
419
|
o.startDate = o.endDate < O ? null : O;
|
|
420
420
|
}
|
|
421
|
-
if (!o.endDate &&
|
|
422
|
-
const O = c(
|
|
421
|
+
if (!o.endDate && S) {
|
|
422
|
+
const O = c(S, R);
|
|
423
423
|
o.endDate = O < o.startDate ? null : O;
|
|
424
424
|
}
|
|
425
|
-
} else if (
|
|
425
|
+
} else if (k === "datetimeRange") {
|
|
426
426
|
const { datetimeRangeFormat: R } = o;
|
|
427
|
-
if (!o.startDateTime &&
|
|
428
|
-
const O = c(
|
|
427
|
+
if (!o.startDateTime && f) {
|
|
428
|
+
const O = c(f, R);
|
|
429
429
|
o.startDateTime = o.endDateTime < O ? null : O;
|
|
430
430
|
}
|
|
431
|
-
if (!o.endDateTime &&
|
|
432
|
-
const O = c(
|
|
431
|
+
if (!o.endDateTime && S) {
|
|
432
|
+
const O = c(S, R);
|
|
433
433
|
o.endDateTime = O < o.startDateTime ? null : O;
|
|
434
434
|
}
|
|
435
435
|
} else
|
|
436
|
-
o.backupList &&
|
|
436
|
+
o.backupList && k === "checkbox" && (o.filterList = o.backupList, o.checkboxGroup = [], (_ = o.backupList) == null || _.forEach((R) => {
|
|
437
437
|
J(o, R.label) && o.checkboxGroup.push(`${V.label}${R.label}`), R.isFilter = !1;
|
|
438
438
|
}));
|
|
439
|
-
|
|
439
|
+
k !== "checkbox" && ((E = o.backupList) != null && E.length) && ((P = o.backupList) == null || P.forEach((R) => {
|
|
440
440
|
R.isFilter = !1, R.isChecked = J(o, R.label);
|
|
441
|
-
})), o.currentOperators = null, !o.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(
|
|
441
|
+
})), o.currentOperators = null, !o.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(k) ? L(o, !1) : L(o);
|
|
442
442
|
}, r = (V) => {
|
|
443
|
-
var
|
|
444
|
-
const { field:
|
|
445
|
-
o.propItem = { ...o.propItem, label:
|
|
446
|
-
const
|
|
443
|
+
var E;
|
|
444
|
+
const { field: f, label: S } = V;
|
|
445
|
+
o.propItem = { ...o.propItem, label: S }, t("first-level-select", f);
|
|
446
|
+
const k = (E = m.$refs) == null ? void 0 : E.inputRef;
|
|
447
447
|
o.prevItem = V, o.backupPrevItem = V;
|
|
448
|
-
const { operators:
|
|
449
|
-
|
|
448
|
+
const { operators: _ } = V;
|
|
449
|
+
_ != null && _.length ? (o.operatorValue = "", o.currentOperators = _, L(o)) : (o.operatorValue = ":", p(V)), o.inputValue = "", k.focus();
|
|
450
450
|
}, n = (V) => {
|
|
451
451
|
o.operatorValue = V, p(o.prevItem);
|
|
452
|
-
},
|
|
453
|
-
const { replace:
|
|
452
|
+
}, d = (V, f, S, k) => {
|
|
453
|
+
const { replace: _, operators: E, mergeTag: P } = V, R = ye(V), { indexMap: O } = o, B = O.get(S), A = ae(e, V, f), ee = o.operatorValue && E ? { operator: o.operatorValue } : null;
|
|
454
454
|
let W = null;
|
|
455
455
|
if (P) {
|
|
456
|
-
const re = { label:
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
W = le({ ...o.innerModelValue[
|
|
456
|
+
const re = { label: k, ...A };
|
|
457
|
+
if (B >= 0) {
|
|
458
|
+
const Ie = `${o.innerModelValue[B].value} | ${k}`, ke = [...o.innerModelValue[B].options, re];
|
|
459
|
+
W = le({ ...o.innerModelValue[B], value: Ie, options: ke });
|
|
460
460
|
} else
|
|
461
|
-
W = le({ ...R, label:
|
|
461
|
+
W = le({ ...R, label: S, value: k, options: [re] });
|
|
462
462
|
} else
|
|
463
|
-
W = le({ ...R, label:
|
|
464
|
-
if (J(o,
|
|
465
|
-
|
|
463
|
+
W = le({ ...R, label: S, value: k, ...A, ...ee });
|
|
464
|
+
if (J(o, k, S)) {
|
|
465
|
+
Ve(o);
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
|
|
469
|
-
const
|
|
468
|
+
L(o, !1);
|
|
469
|
+
const Z = ne(o.innerModelValue);
|
|
470
470
|
let X = [];
|
|
471
|
-
if ((
|
|
471
|
+
if ((_ || P) && B >= 0) {
|
|
472
472
|
const re = [...o.innerModelValue];
|
|
473
|
-
re.splice(
|
|
473
|
+
re.splice(B, 1), X = [...re, W];
|
|
474
474
|
} else
|
|
475
475
|
X = [...o.innerModelValue, W];
|
|
476
|
-
Q({ emit: t, state: o, newValue: X, oldValue:
|
|
477
|
-
},
|
|
478
|
-
var
|
|
479
|
-
(
|
|
480
|
-
},
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
const { prevItem:
|
|
484
|
-
if (!J(o,
|
|
476
|
+
Q({ emit: t, state: o, nextTick: i, newValue: X, oldValue: Z });
|
|
477
|
+
}, u = (V) => {
|
|
478
|
+
var f;
|
|
479
|
+
(f = o.propItem) != null && f.label ? s({ label: V }) : T();
|
|
480
|
+
}, s = (V, f = !1) => {
|
|
481
|
+
var E;
|
|
482
|
+
L(o, !1), f && (o.prevItem = V, o.backupPrevItem = V);
|
|
483
|
+
const { prevItem: S } = o, k = V.value || V.label, _ = (E = m.$refs) == null ? void 0 : E.inputRef;
|
|
484
|
+
if (!J(o, k)) {
|
|
485
485
|
const P = o.propItem.label || V.label;
|
|
486
|
-
|
|
486
|
+
d(S, V, P, k);
|
|
487
487
|
}
|
|
488
|
-
|
|
489
|
-
}, a = (V,
|
|
488
|
+
_.focus();
|
|
489
|
+
}, a = (V, f) => {
|
|
490
490
|
if (V.label) {
|
|
491
|
-
if (!
|
|
491
|
+
if (t("second-level-enter", f), !f.options || !f.options.length)
|
|
492
|
+
return;
|
|
493
|
+
const S = f.options[0];
|
|
494
|
+
if (!S)
|
|
492
495
|
return;
|
|
493
|
-
if (!e.modelValue.find((
|
|
494
|
-
const
|
|
495
|
-
f
|
|
496
|
+
if (!e.modelValue.find((_) => _.value === S.label)) {
|
|
497
|
+
const _ = f.label, E = S.label;
|
|
498
|
+
d(f, S, _, E);
|
|
496
499
|
return;
|
|
497
500
|
}
|
|
498
501
|
} else
|
|
499
502
|
t("search", o.innerModelValue);
|
|
500
|
-
},
|
|
501
|
-
var
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
}, g = (V,
|
|
505
|
-
var
|
|
506
|
-
if (
|
|
507
|
-
const { regexp:
|
|
508
|
-
if (
|
|
509
|
-
for (const A of
|
|
510
|
-
|
|
503
|
+
}, h = (V, f, S) => {
|
|
504
|
+
var _;
|
|
505
|
+
const k = (_ = o.backupList) == null ? void 0 : _.find((E) => E.label === S);
|
|
506
|
+
d(V, k, f.label, S);
|
|
507
|
+
}, g = (V, f, S) => {
|
|
508
|
+
var k, _;
|
|
509
|
+
if (f.label) {
|
|
510
|
+
const { regexp: E, replace: P, type: R, mergeTag: O } = S, B = R !== "checkbox" && P || R === "checkbox" && O ? [V] : V.split(e.splitInputValue);
|
|
511
|
+
if (E)
|
|
512
|
+
for (const A of B)
|
|
513
|
+
E.test(A) && h(S, f, A);
|
|
511
514
|
else
|
|
512
|
-
for (const A of
|
|
513
|
-
|
|
515
|
+
for (const A of B)
|
|
516
|
+
h(S, f, A);
|
|
514
517
|
} else {
|
|
515
|
-
const { items:
|
|
516
|
-
const { regexp: X } =
|
|
518
|
+
const { items: E, defaultField: P } = e, R = E.find((Z) => {
|
|
519
|
+
const { regexp: X } = Z;
|
|
517
520
|
return X && X.test(o.inputValue);
|
|
518
|
-
}) || (P ?
|
|
519
|
-
(
|
|
520
|
-
const X =
|
|
521
|
-
ee.includes(X) && (
|
|
521
|
+
}) || (P ? E.find((Z) => Z.field === P) : o.allTypeAttri), { replace: O, type: B, mergeTag: A } = R, ee = B !== "checkbox" && O || B === "checkbox" && A ? [V] : V.split(e.splitInputValue);
|
|
522
|
+
(k = R == null ? void 0 : R.options) != null && k.length && (o.backupList = [...R.options], (_ = o.backupList) == null || _.forEach((Z) => {
|
|
523
|
+
const X = Z.value || Z.label;
|
|
524
|
+
ee.includes(X) && (Z.isChecked = !0);
|
|
522
525
|
}));
|
|
523
526
|
const W = R.label;
|
|
524
|
-
for (const
|
|
525
|
-
|
|
527
|
+
for (const Z of ee)
|
|
528
|
+
d(R, {}, W, Z);
|
|
526
529
|
}
|
|
527
|
-
},
|
|
528
|
-
const { inputValue: V, propItem:
|
|
529
|
-
if (v && v(),
|
|
530
|
-
a(
|
|
530
|
+
}, T = () => {
|
|
531
|
+
const { inputValue: V, propItem: f, prevItem: S } = o;
|
|
532
|
+
if (v && v(), L(o, !1), !V)
|
|
533
|
+
a(f, S);
|
|
531
534
|
else {
|
|
532
|
-
const { maxlength:
|
|
533
|
-
if (
|
|
534
|
-
t("exceed",
|
|
535
|
+
const { maxlength: k } = e;
|
|
536
|
+
if (k && k < V.length) {
|
|
537
|
+
t("exceed", k);
|
|
535
538
|
return;
|
|
536
539
|
}
|
|
537
|
-
g(V,
|
|
540
|
+
g(V, f, S);
|
|
538
541
|
}
|
|
539
542
|
};
|
|
540
|
-
return { selectPropItem: r, selectRadioItem:
|
|
543
|
+
return { selectPropItem: r, selectRadioItem: s, selectInputValue: u, createTag: T, helpClick: () => {
|
|
541
544
|
t("help");
|
|
542
545
|
}, setOperator: n };
|
|
543
546
|
}
|
|
544
|
-
const
|
|
547
|
+
const qt = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Se = (e, t) => {
|
|
545
548
|
const o = [];
|
|
546
549
|
let l = 0, c;
|
|
547
550
|
for (; (c = e.exec(t)) !== null; ) {
|
|
@@ -550,48 +553,48 @@ const Ht = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Te = (e, t) => {
|
|
|
550
553
|
}
|
|
551
554
|
return l < t.length && o.push(t.slice(l)), o;
|
|
552
555
|
};
|
|
553
|
-
function
|
|
556
|
+
function Zt({ props: e, state: t, emit: o, nextTick: l }) {
|
|
554
557
|
const c = async (r) => {
|
|
555
|
-
t.potentialOptions = await e.potentialOptions.getMatchList(r),
|
|
556
|
-
}, b =
|
|
557
|
-
var
|
|
558
|
-
const { recordItems: n, propItem:
|
|
559
|
-
if (a && a <
|
|
558
|
+
t.potentialOptions = await e.potentialOptions.getMatchList(r), L(t, !0);
|
|
559
|
+
}, b = jt((r) => {
|
|
560
|
+
var f, S, k, _;
|
|
561
|
+
const { recordItems: n, propItem: d } = t, u = typeof r == "string" ? r : r && r.target && typeof r.target.value == "string" ? r.target.value : t.inputValue || "", s = (f = String(u)) == null ? void 0 : f.trim(), { maxlength: a } = e;
|
|
562
|
+
if (a && a < s.length) {
|
|
560
563
|
o("exceed", a);
|
|
561
564
|
return;
|
|
562
565
|
}
|
|
563
|
-
if (
|
|
564
|
-
|
|
566
|
+
if (s.length === 0) {
|
|
567
|
+
L(t);
|
|
565
568
|
return;
|
|
566
569
|
}
|
|
567
|
-
Object.keys(t.matchItems).forEach((
|
|
568
|
-
t.matchItems[
|
|
570
|
+
Object.keys(t.matchItems).forEach((E) => {
|
|
571
|
+
t.matchItems[E].attr = [], t.matchItems[E].attrValue = [];
|
|
569
572
|
});
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
t.propItem = { ...t.propItem, label:
|
|
573
|
+
const h = qt(s), g = new RegExp(h, "i"), T = d.label || !h ? null : n.find((E) => E.type === "map" && g.test(E.label));
|
|
574
|
+
if (T) {
|
|
575
|
+
t.propItem = { ...t.propItem, label: T.label }, t.inputValue = "", t.prevItem = T, t.backupPrevItem = T, t.backupList = T.options || [];
|
|
573
576
|
return;
|
|
574
577
|
}
|
|
575
|
-
t.filterList = (
|
|
576
|
-
const
|
|
578
|
+
t.filterList = (S = t.backupList) == null ? void 0 : S.filter((E) => g.test(E.label) ? (delete E.isFilter, J(t, E.label) && t.checkboxGroup.push(`${t.prevItem.label}${E.label}`), !0) : (E.isFilter = !0, !1));
|
|
579
|
+
const $ = new RegExp(h, "ig"), V = s.toLowerCase();
|
|
577
580
|
if (t.propItem.label) {
|
|
578
|
-
(
|
|
579
|
-
|
|
580
|
-
const P =
|
|
581
|
-
g.test(P) ? (
|
|
582
|
-
}), (
|
|
581
|
+
(k = t.backupList) == null || k.forEach((E) => {
|
|
582
|
+
E.hightlighStr = V;
|
|
583
|
+
const P = E.label;
|
|
584
|
+
g.test(P) ? (E.match = Se($, P), E.isFilter = !1) : E.isFilter = !0;
|
|
585
|
+
}), (_ = t.backupList) != null && _.length || s ? L(t) : L(t, !1);
|
|
583
586
|
return;
|
|
584
587
|
}
|
|
585
|
-
for (const
|
|
586
|
-
const { options: P = [], groupKey: R = "0", ...O } =
|
|
587
|
-
if (g.test(
|
|
588
|
-
const A =
|
|
589
|
-
t.matchItems[R].attr.push({ ...
|
|
588
|
+
for (const E of n) {
|
|
589
|
+
const { options: P = [], groupKey: R = "0", ...O } = E, B = O.label;
|
|
590
|
+
if (g.test(B)) {
|
|
591
|
+
const A = Se($, B);
|
|
592
|
+
t.matchItems[R].attr.push({ ...E, match: A, hightlighStr: V });
|
|
590
593
|
}
|
|
591
594
|
for (const A of P) {
|
|
592
|
-
const ee = t.propItem.label ?
|
|
595
|
+
const ee = t.propItem.label ? B : `${B}:${A.label}`;
|
|
593
596
|
if (g.test(ee)) {
|
|
594
|
-
const W =
|
|
597
|
+
const W = Se($, ee);
|
|
595
598
|
t.matchItems[R].attrValue.push({
|
|
596
599
|
...A,
|
|
597
600
|
...O,
|
|
@@ -603,10 +606,10 @@ function Kt({ props: e, state: t, emit: o, nextTick: l }) {
|
|
|
603
606
|
}
|
|
604
607
|
}
|
|
605
608
|
}
|
|
606
|
-
|
|
609
|
+
h && e.potentialOptions && e.potentialOptions.getMatchList ? c(h) : L(t);
|
|
607
610
|
}, 500), v = () => {
|
|
608
611
|
b.cancel && b.cancel();
|
|
609
|
-
},
|
|
612
|
+
}, m = () => {
|
|
610
613
|
var r;
|
|
611
614
|
(r = t.backupList) == null || r.forEach((n) => n.isFilter && delete n.isFilter);
|
|
612
615
|
};
|
|
@@ -614,71 +617,71 @@ function Kt({ props: e, state: t, emit: o, nextTick: l }) {
|
|
|
614
617
|
handleInput: b,
|
|
615
618
|
selectFirstMap: (r, n) => {
|
|
616
619
|
var a;
|
|
617
|
-
const { options:
|
|
618
|
-
if (
|
|
619
|
-
|
|
620
|
-
const g =
|
|
621
|
-
|
|
620
|
+
const { options: d } = r, { prevItem: u, propItem: s } = t;
|
|
621
|
+
if (d)
|
|
622
|
+
L(t, !1), t.propItem = { ...t.propItem, value: `${r.label}=` }, t.isShowTagKey = !1, t.inputValue = "", t.backupList = r.options || [], m(), (a = t.backupList) == null || a.forEach((h) => {
|
|
623
|
+
const g = s.value + h.label;
|
|
624
|
+
h.isChecked = J(t, g);
|
|
622
625
|
});
|
|
623
626
|
else {
|
|
624
627
|
if (r.isChecked)
|
|
625
628
|
return;
|
|
626
|
-
|
|
627
|
-
const { field:
|
|
628
|
-
Q({ emit: o, state: t, nextTick: l, tagList:
|
|
629
|
+
L(t, !1), t.isShowTagKey = !0, m();
|
|
630
|
+
const { field: h, type: g } = u, T = s.value + r.label, $ = ae(e, u, r), f = [le({ type: g, field: h, label: s.label, value: T, ...$ })];
|
|
631
|
+
Q({ emit: o, state: t, nextTick: l, tagList: f });
|
|
629
632
|
}
|
|
630
|
-
n &&
|
|
633
|
+
n && L(t);
|
|
631
634
|
},
|
|
632
635
|
cancelHandleInput: v
|
|
633
636
|
};
|
|
634
637
|
}
|
|
635
|
-
function
|
|
638
|
+
function Yt({ props: e, state: t, emit: o, nextTick: l }) {
|
|
636
639
|
return {
|
|
637
640
|
selectCheckbox: (i) => {
|
|
638
641
|
var r, n;
|
|
639
|
-
|
|
640
|
-
const { checkboxGroup: b, prevItem: v, propItem:
|
|
642
|
+
L(t, !1);
|
|
643
|
+
const { checkboxGroup: b, prevItem: v, propItem: m } = t, p = ye(v);
|
|
641
644
|
if (i) {
|
|
642
|
-
const
|
|
643
|
-
if (
|
|
645
|
+
const d = [], u = ne(t.innerModelValue), { mergeTag: s, operators: a, label: h } = v;
|
|
646
|
+
if (s) {
|
|
644
647
|
let g = "";
|
|
645
|
-
const
|
|
646
|
-
if (V !== void 0 && t.innerModelValue.splice(V, 1), (r = t.backupList) == null || r.forEach((
|
|
647
|
-
const { label:
|
|
648
|
-
if (b.includes(
|
|
649
|
-
delete
|
|
650
|
-
const
|
|
651
|
-
g += g ? ` | ${
|
|
648
|
+
const T = [], { indexMap: $ } = t, V = $.get(h);
|
|
649
|
+
if (V !== void 0 && t.innerModelValue.splice(V, 1), (r = t.backupList) == null || r.forEach((f) => {
|
|
650
|
+
const { label: S } = f, k = `${h}${S}`;
|
|
651
|
+
if (b.includes(k)) {
|
|
652
|
+
delete f.isFilter;
|
|
653
|
+
const E = ae(e, v, f), P = { label: f.label, ...E };
|
|
654
|
+
g += g ? ` | ${S}` : S, T.push(P);
|
|
652
655
|
}
|
|
653
|
-
}),
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
+
}), T.length > 0) {
|
|
657
|
+
const f = { ...p, value: g, options: T };
|
|
658
|
+
d.push(f);
|
|
656
659
|
}
|
|
657
660
|
} else {
|
|
658
|
-
const { valueMap: g } = t,
|
|
659
|
-
if ((n = t.backupList) == null || n.forEach((
|
|
660
|
-
const { label: V } =
|
|
661
|
-
if (
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
} else if (!
|
|
665
|
-
|
|
666
|
-
const
|
|
667
|
-
|
|
661
|
+
const { valueMap: g } = t, T = [];
|
|
662
|
+
if ((n = t.backupList) == null || n.forEach(($) => {
|
|
663
|
+
const { label: V } = $, f = `${h}${V}`, S = b.includes(f);
|
|
664
|
+
if (S && !J(t, V)) {
|
|
665
|
+
const k = ae(e, v, $), _ = t.operatorValue && a ? { operator: t.operatorValue } : null, E = le({ ...p, label: m.label, value: V, ...k, ..._ });
|
|
666
|
+
d.push(E), $.isChecked = !0;
|
|
667
|
+
} else if (!S && J(t, V)) {
|
|
668
|
+
$.isChecked = !1;
|
|
669
|
+
const k = g.get(f);
|
|
670
|
+
T.push(k);
|
|
668
671
|
}
|
|
669
|
-
}),
|
|
670
|
-
const
|
|
671
|
-
Q({ emit: o, state: t, nextTick: l, newValue:
|
|
672
|
+
}), T.length) {
|
|
673
|
+
const $ = t.innerModelValue.filter((V, f) => V && !T.includes(f));
|
|
674
|
+
Q({ emit: o, state: t, nextTick: l, newValue: $, oldValue: u });
|
|
672
675
|
return;
|
|
673
676
|
}
|
|
674
677
|
}
|
|
675
|
-
Q({ emit: o, state: t, nextTick: l, tagList:
|
|
678
|
+
Q({ emit: o, state: t, nextTick: l, tagList: d, oldValue: u });
|
|
676
679
|
} else
|
|
677
|
-
t.propItem = { ...
|
|
680
|
+
t.propItem = { ...m, label: "" }, t.inputValue = "";
|
|
678
681
|
}
|
|
679
682
|
};
|
|
680
683
|
}
|
|
681
|
-
function
|
|
684
|
+
function Qt({ props: e, state: t, emit: o, nextTick: l, vm: c }) {
|
|
682
685
|
const i = c || t.instance;
|
|
683
686
|
return {
|
|
684
687
|
onConfirmDate: async (p, r = !1) => {
|
|
@@ -686,81 +689,81 @@ function qt({ props: e, state: t, emit: o, nextTick: l, vm: c }) {
|
|
|
686
689
|
t.propItem = { label: "" };
|
|
687
690
|
return;
|
|
688
691
|
}
|
|
689
|
-
const n = await
|
|
692
|
+
const n = await Ce(i, t, e, r);
|
|
690
693
|
if (n) {
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
+
L(t, !1);
|
|
695
|
+
const d = e.modelValue.filter((u) => u.type !== n.type || u.field !== n.field);
|
|
696
|
+
d.push(n), Q({ emit: o, state: t, nextTick: l, newValue: d });
|
|
694
697
|
} else
|
|
695
|
-
|
|
698
|
+
L(t);
|
|
696
699
|
},
|
|
697
|
-
handleDateShow: () =>
|
|
700
|
+
handleDateShow: () => L(t),
|
|
698
701
|
pickerOptions: (p, r = "") => ({
|
|
699
702
|
disabledDate(n) {
|
|
700
|
-
const { maxTimeLength:
|
|
701
|
-
if (
|
|
702
|
-
if (
|
|
703
|
+
const { maxTimeLength: d = 0, min: u, max: s } = t.prevItem, a = t[r], h = n.getTime();
|
|
704
|
+
if (d > 0)
|
|
705
|
+
if (u || s)
|
|
703
706
|
if (r && a) {
|
|
704
|
-
const g = new Date(a).getTime(),
|
|
705
|
-
return
|
|
707
|
+
const g = new Date(a).getTime(), T = !u && s ? g - d : Math.max(u.getTime(), g - d);
|
|
708
|
+
return h < T || h > g;
|
|
706
709
|
} else if (!r && p) {
|
|
707
|
-
const g = new Date(p).getTime(),
|
|
708
|
-
return
|
|
710
|
+
const g = new Date(p).getTime(), T = u && !s ? g + d : Math.min(s.getTime(), g + d);
|
|
711
|
+
return h < g || h > T;
|
|
709
712
|
} else
|
|
710
|
-
return
|
|
713
|
+
return u && h < u.getTime() || s && h > s.getTime();
|
|
711
714
|
else if (r && a) {
|
|
712
|
-
const g = new Date(a).getTime(),
|
|
713
|
-
return
|
|
715
|
+
const g = new Date(a).getTime(), T = g - d;
|
|
716
|
+
return h < T || h > g;
|
|
714
717
|
} else if (!r && p) {
|
|
715
|
-
const g = new Date(p).getTime(),
|
|
716
|
-
return
|
|
718
|
+
const g = new Date(p).getTime(), T = g + d;
|
|
719
|
+
return h < g || h > T;
|
|
717
720
|
} else
|
|
718
721
|
return !1;
|
|
719
|
-
else if (
|
|
722
|
+
else if (u || s)
|
|
720
723
|
if (r && a) {
|
|
721
724
|
const g = new Date(a).getTime();
|
|
722
|
-
return
|
|
725
|
+
return u && h < u.getTime() || h > g;
|
|
723
726
|
} else if (!r && p) {
|
|
724
727
|
const g = new Date(p).getTime();
|
|
725
|
-
return
|
|
728
|
+
return h < g || s && h > s.getTime();
|
|
726
729
|
} else
|
|
727
|
-
return
|
|
730
|
+
return h < u || h > s;
|
|
728
731
|
else if (r && a) {
|
|
729
732
|
const g = new Date(a).getTime();
|
|
730
|
-
return
|
|
733
|
+
return h > g;
|
|
731
734
|
} else if (!r && p) {
|
|
732
735
|
const g = new Date(p).getTime();
|
|
733
|
-
return
|
|
736
|
+
return h < g;
|
|
734
737
|
} else
|
|
735
738
|
return !1;
|
|
736
739
|
}
|
|
737
740
|
})
|
|
738
741
|
};
|
|
739
742
|
}
|
|
740
|
-
function
|
|
743
|
+
function Wt({ props: e, state: t, t: o, emit: l, nextTick: c, vm: i }) {
|
|
741
744
|
const b = i || t.instance, v = async (r) => {
|
|
742
745
|
if (!r) {
|
|
743
746
|
t.propItem = { ...t.propItem, label: "" };
|
|
744
747
|
return;
|
|
745
748
|
}
|
|
746
|
-
const n = await
|
|
749
|
+
const n = await qe(b, t, e);
|
|
747
750
|
if (n) {
|
|
748
|
-
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
+
L(t, !1);
|
|
752
|
+
const d = e.modelValue.filter((u) => u.type !== n.type || u.field !== n.field);
|
|
753
|
+
d.push(n), Q({ emit: l, state: t, nextTick: c, newValue: d });
|
|
751
754
|
} else
|
|
752
|
-
|
|
753
|
-
},
|
|
754
|
-
const { maxTimeLength:
|
|
755
|
+
L(t);
|
|
756
|
+
}, m = (r, n, d) => {
|
|
757
|
+
const { maxTimeLength: u = 0 } = r;
|
|
755
758
|
return {
|
|
756
759
|
[n]: {
|
|
757
|
-
validator: (
|
|
758
|
-
|
|
760
|
+
validator: (s, a, h) => {
|
|
761
|
+
u > 0 && !a ? h(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !a && !t[d] ? h(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : h();
|
|
759
762
|
}
|
|
760
763
|
},
|
|
761
|
-
[
|
|
762
|
-
validator: (
|
|
763
|
-
|
|
764
|
+
[d]: {
|
|
765
|
+
validator: (s, a, h) => {
|
|
766
|
+
u > 0 && !a ? h(new Error(o("tvp.tvpSearchbox.notBeNull"))) : !a && !t[n] ? h(new Error(o("tvp.tvpSearchbox.rangeDateTitle"))) : h();
|
|
764
767
|
}
|
|
765
768
|
}
|
|
766
769
|
};
|
|
@@ -768,8 +771,8 @@ function Zt({ props: e, state: t, t: o, emit: l, nextTick: c, vm: i }) {
|
|
|
768
771
|
return {
|
|
769
772
|
initFormRule: () => {
|
|
770
773
|
let r = {}, n = {};
|
|
771
|
-
e.items.forEach((
|
|
772
|
-
|
|
774
|
+
e.items.forEach((d) => {
|
|
775
|
+
d.type === "dateRange" && (r = m(d, "startDate", "endDate")), d.type === "datetimeRange" && (n = m(d, "startDateTime", "endDateTime"));
|
|
773
776
|
}), t.formRules = {
|
|
774
777
|
...r,
|
|
775
778
|
...n
|
|
@@ -782,99 +785,99 @@ function Zt({ props: e, state: t, t: o, emit: l, nextTick: c, vm: i }) {
|
|
|
782
785
|
sizeChange: v
|
|
783
786
|
};
|
|
784
787
|
}
|
|
785
|
-
function
|
|
786
|
-
const v = (
|
|
787
|
-
var
|
|
788
|
-
const { operator:
|
|
788
|
+
function Jt({ props: e, state: t, t: o, nextTick: l, format: c, emit: i, vm: b }) {
|
|
789
|
+
const v = (u) => {
|
|
790
|
+
var S;
|
|
791
|
+
const { operator: s, value: a, start: h, end: g } = u, { options: T, operators: $, type: V, mergeTag: f } = t.prevItem;
|
|
789
792
|
if (V !== "custom") {
|
|
790
793
|
if (V === "numRange")
|
|
791
|
-
|
|
794
|
+
Ze(t, u, o);
|
|
792
795
|
else if (V === "dateRange") {
|
|
793
|
-
const { dateRangeFormat:
|
|
794
|
-
t.startDate = c(
|
|
796
|
+
const { dateRangeFormat: k } = t;
|
|
797
|
+
t.startDate = c(h, k), t.endDate = c(g, k);
|
|
795
798
|
} else if (V === "datetimeRange") {
|
|
796
|
-
const { datetimeRangeFormat:
|
|
797
|
-
t.startDateTime = c(
|
|
799
|
+
const { datetimeRangeFormat: k } = t;
|
|
800
|
+
t.startDateTime = c(h, k), t.endDateTime = c(g, k);
|
|
798
801
|
} else {
|
|
799
|
-
if (
|
|
800
|
-
const
|
|
801
|
-
t.inputEditValue =
|
|
802
|
+
if (f) {
|
|
803
|
+
const k = ((S = u.options) == null ? void 0 : S.flatMap((_) => _.label)) || [];
|
|
804
|
+
t.inputEditValue = k, t.currentEditSelectTags = k;
|
|
802
805
|
} else
|
|
803
806
|
t.inputEditValue = Array.isArray(a) ? a.join(",") : a || "";
|
|
804
|
-
t.currentEditValue =
|
|
807
|
+
t.currentEditValue = T;
|
|
805
808
|
}
|
|
806
|
-
t.operatorValue =
|
|
809
|
+
t.operatorValue = s, t.currentOperators = $;
|
|
807
810
|
}
|
|
808
|
-
},
|
|
809
|
-
var
|
|
810
|
-
if (!((g = (
|
|
811
|
+
}, m = async () => {
|
|
812
|
+
var h, g;
|
|
813
|
+
if (!((g = (h = t.instance) == null ? void 0 : h.$refs) != null && g.formRef))
|
|
811
814
|
return;
|
|
812
|
-
const { prevItem:
|
|
813
|
-
let
|
|
814
|
-
if (
|
|
815
|
+
const { prevItem: u } = t;
|
|
816
|
+
let s = [];
|
|
817
|
+
if (u.type === "numRange" ? s = [t.curMinNumVar, t.curMaxNumVar] : u.type === "dateRange" ? s = ["startDate", "endDate"] : u.type === "datetimeRange" ? s = ["startDateTime", "endDateTime"] : ["custom", "map"].includes(u.type) || (s = ["inputEditValue"]), (s == null ? void 0 : s.length) === 0) {
|
|
815
818
|
t.hasFormError = !1;
|
|
816
819
|
return;
|
|
817
820
|
}
|
|
818
821
|
let a = !1;
|
|
819
|
-
await t.instance.$refs.formRef.validateField(
|
|
820
|
-
|
|
822
|
+
await t.instance.$refs.formRef.validateField(s, (T) => {
|
|
823
|
+
T && (a = !0);
|
|
821
824
|
}), t.hasFormError = a;
|
|
822
825
|
};
|
|
823
826
|
return {
|
|
824
|
-
editTag: (
|
|
825
|
-
if (!e.editable ||
|
|
827
|
+
editTag: (u, s, a) => {
|
|
828
|
+
if (!e.editable || u.type && u.type === "map")
|
|
826
829
|
return;
|
|
827
|
-
|
|
828
|
-
const
|
|
830
|
+
L(t, !1), t.popoverVisible = !1;
|
|
831
|
+
const h = a.target.classList.contains("tiny-tag") ? a.target : a.srcElement.parentElement;
|
|
829
832
|
l(() => {
|
|
830
833
|
const { popoverRef: g } = t.instance.$refs;
|
|
831
|
-
g.state.referenceElm =
|
|
832
|
-
}), t.prevItem = t.recordItems.find((g) => g.field ===
|
|
834
|
+
g.state.referenceElm = h, g.state.popperElm && (g.state.popperElm.style.display = "none"), g.doDestroy(), t.popoverVisible = !0, m();
|
|
835
|
+
}), t.prevItem = t.recordItems.find((g) => g.field === u.field), !t.prevItem && (t.prevItem = u), t.selectValue = u.label, t.currentModelValueIndex = s, i("tagClick", u), v(u);
|
|
833
836
|
},
|
|
834
|
-
confirmEditTag: async (
|
|
835
|
-
if (!
|
|
837
|
+
confirmEditTag: async (u) => {
|
|
838
|
+
if (!u) {
|
|
836
839
|
t.popoverVisible = !1;
|
|
837
840
|
return;
|
|
838
841
|
}
|
|
839
|
-
const { prevItem:
|
|
840
|
-
let
|
|
841
|
-
|
|
842
|
+
const { prevItem: s, currentModelValueIndex: a } = t;
|
|
843
|
+
let h = null;
|
|
844
|
+
s.type === "numRange" ? h = await qe(t.instance, t, e) : s.type === "dateRange" ? h = await Ce(t.instance, t, e, !1) : s.type === "datetimeRange" ? h = await Ce(t.instance, t, e, !0) : h = await Kt(t.instance, t, e), h ? (L(t, !1), t.popoverVisible = !1, Q({ emit: i, state: t, nextTick: l, index: a, newTag: h, isEdit: !0 })) : t.popoverVisible = !0, t.currentEditValue = [];
|
|
842
845
|
},
|
|
843
|
-
selectPropChange: (
|
|
844
|
-
|
|
845
|
-
|
|
846
|
+
selectPropChange: (u, s) => {
|
|
847
|
+
s || (t.prevItem = u, v(u), l(() => {
|
|
848
|
+
m();
|
|
846
849
|
}));
|
|
847
850
|
},
|
|
848
|
-
selectItemIsDisable: (
|
|
849
|
-
var a,
|
|
850
|
-
if (
|
|
851
|
+
selectItemIsDisable: (u) => {
|
|
852
|
+
var a, h, g, T;
|
|
853
|
+
if (u.type && u.type === "map")
|
|
851
854
|
return !0;
|
|
852
|
-
if ((a = t.prevItem) != null && a.operators ||
|
|
853
|
-
return ((
|
|
854
|
-
const
|
|
855
|
-
return t.prevItem.type &&
|
|
855
|
+
if ((a = t.prevItem) != null && a.operators || u.operators)
|
|
856
|
+
return ((h = t.prevItem.operators) == null ? void 0 : h.length) !== ((g = u.operators) == null ? void 0 : g.length);
|
|
857
|
+
const s = ["radio", "checkbox"];
|
|
858
|
+
return t.prevItem.type && s.includes(t.prevItem.type) ? u.type ? !s.includes(u.type) : !1 : ((T = t.prevItem) == null ? void 0 : T.type) !== u.type;
|
|
856
859
|
},
|
|
857
|
-
checkFormValidation:
|
|
860
|
+
checkFormValidation: m
|
|
858
861
|
};
|
|
859
862
|
}
|
|
860
|
-
function
|
|
863
|
+
function Xt({ state: e, emit: t, nextTick: o }) {
|
|
861
864
|
const l = (b) => {
|
|
862
|
-
|
|
863
|
-
const { prevItem: v, indexMap:
|
|
864
|
-
if (p &&
|
|
865
|
-
const
|
|
866
|
-
Q({ emit: t, state: e, nextTick: o, newTag:
|
|
865
|
+
L(e, !1);
|
|
866
|
+
const { prevItem: v, indexMap: m } = e, { replace: p, label: r } = v, n = [];
|
|
867
|
+
if (p && m.has(r)) {
|
|
868
|
+
const d = m.get(r), u = { ...v, ...b };
|
|
869
|
+
Q({ emit: t, state: e, nextTick: o, newTag: u, index: d });
|
|
867
870
|
return;
|
|
868
871
|
} else
|
|
869
|
-
!p && Array.isArray(b) ? b.forEach((
|
|
870
|
-
J(e,
|
|
872
|
+
!p && Array.isArray(b) ? b.forEach((d) => {
|
|
873
|
+
J(e, d.value) || n.push({ ...v, ...d });
|
|
871
874
|
}) : J(e, b.value) || n.push({ ...v, ...b });
|
|
872
875
|
Q({ emit: t, state: e, nextTick: o, tagList: n });
|
|
873
876
|
};
|
|
874
877
|
return {
|
|
875
878
|
handleConfirm: (b) => {
|
|
876
879
|
if (!b) {
|
|
877
|
-
|
|
880
|
+
Ve(e), L(e, !1);
|
|
878
881
|
return;
|
|
879
882
|
}
|
|
880
883
|
l(b);
|
|
@@ -888,23 +891,23 @@ function Qt({ state: e, emit: t, nextTick: o }) {
|
|
|
888
891
|
}
|
|
889
892
|
};
|
|
890
893
|
}
|
|
891
|
-
function
|
|
894
|
+
function eo({ props: e, state: t }) {
|
|
892
895
|
return {
|
|
893
896
|
initItems: () => {
|
|
894
897
|
t.groupItems = {}, t.recordItems.forEach((v) => {
|
|
895
898
|
var p;
|
|
896
|
-
const { groupKey:
|
|
897
|
-
if (t.groupItems[
|
|
899
|
+
const { groupKey: m = "0" } = v;
|
|
900
|
+
if (t.groupItems[m] ? t.groupItems[m].push({ ...v }) : (t.groupItems[m] = [{ ...v }], t.matchItems[m] = { attr: [], attrValue: [] }), t.prevItem && v.field === t.prevItem.field && v !== t.prevItem) {
|
|
898
901
|
const { options: r, type: n } = v;
|
|
899
|
-
t.prevItem = v, r != null && r.length && (t.backupList = r), n === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (p = t.backupList) == null || p.forEach((
|
|
900
|
-
const { label:
|
|
901
|
-
J(t,
|
|
902
|
-
})),
|
|
902
|
+
t.prevItem = v, r != null && r.length && (t.backupList = r), n === "checkbox" && (t.filterList = t.backupList, t.checkboxGroup = [], (p = t.backupList) == null || p.forEach((d) => {
|
|
903
|
+
const { label: u } = d;
|
|
904
|
+
J(t, u) && t.checkboxGroup.push(`${v.label}${u}`), d.isFilter = !1;
|
|
905
|
+
})), L(t, v.field === t.prevItem.field && v !== t.prevItem);
|
|
903
906
|
}
|
|
904
907
|
});
|
|
905
908
|
},
|
|
906
909
|
watchOutsideClick: () => {
|
|
907
|
-
e.editable && de(t, !1), t.isMouseDown = !1,
|
|
910
|
+
e.editable && de(t, !1), t.isMouseDown = !1, L(t, !1);
|
|
908
911
|
},
|
|
909
912
|
watchMouseDown: () => {
|
|
910
913
|
t.isMouseDown = !0;
|
|
@@ -914,12 +917,12 @@ function Wt({ props: e, state: t }) {
|
|
|
914
917
|
},
|
|
915
918
|
handleClick: (v) => {
|
|
916
919
|
var r;
|
|
917
|
-
const { backupPrevItem:
|
|
918
|
-
v.stopPropagation(), e.editable && (t.popoverVisible = !1, t.currentEditValue = [], t.propItem.label &&
|
|
920
|
+
const { backupPrevItem: m, prevItem: p } = t;
|
|
921
|
+
v.stopPropagation(), e.editable && (t.popoverVisible = !1, t.currentEditValue = [], t.propItem.label && m && m !== p && (t.prevItem = m)), t.hasBackupList && (((r = t.backupList) == null ? void 0 : r.length) === 0 || !t.backupList) && !t.inputValue || e.items.length === 0 ? L(t, !1) : L(t);
|
|
919
922
|
}
|
|
920
923
|
};
|
|
921
924
|
}
|
|
922
|
-
const
|
|
925
|
+
const Ye = {
|
|
923
926
|
tvp: {
|
|
924
927
|
tvpSearchbox: {
|
|
925
928
|
defaultPlaceholder: "请选择属性筛选,或输入关键字",
|
|
@@ -960,7 +963,7 @@ const qe = {
|
|
|
960
963
|
initUse: "搜索"
|
|
961
964
|
}
|
|
962
965
|
}
|
|
963
|
-
},
|
|
966
|
+
}, Qe = {
|
|
964
967
|
tvp: {
|
|
965
968
|
tvpSearchbox: {
|
|
966
969
|
defaultPlaceholder: "Select attribute filtering or enter keywords",
|
|
@@ -1002,52 +1005,62 @@ const qe = {
|
|
|
1002
1005
|
}
|
|
1003
1006
|
}
|
|
1004
1007
|
}, ce = "zh-CN", ie = {
|
|
1005
|
-
"zh-CN":
|
|
1006
|
-
"en-US":
|
|
1008
|
+
"zh-CN": Ye,
|
|
1009
|
+
"en-US": Qe
|
|
1007
1010
|
};
|
|
1008
|
-
let
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
},
|
|
1011
|
+
let j = null, Me = null;
|
|
1012
|
+
const to = (e) => {
|
|
1013
|
+
j = e;
|
|
1014
|
+
}, oo = (e) => {
|
|
1015
|
+
Me = e;
|
|
1016
|
+
}, Re = () => {
|
|
1012
1017
|
var e, t, o, l, c;
|
|
1013
|
-
if ((o = (t = (e =
|
|
1014
|
-
return
|
|
1015
|
-
if ((l =
|
|
1016
|
-
return
|
|
1018
|
+
if ((o = (t = (e = j == null ? void 0 : j.config) == null ? void 0 : e.globalProperties) == null ? void 0 : t.$i18n) != null && o.locale)
|
|
1019
|
+
return j.config.globalProperties.$i18n.locale;
|
|
1020
|
+
if ((l = j == null ? void 0 : j.$i18n) != null && l.locale)
|
|
1021
|
+
return j.$i18n.locale;
|
|
1017
1022
|
if (typeof navigator < "u") {
|
|
1018
1023
|
const i = navigator.language || ((c = navigator.languages) == null ? void 0 : c[0]);
|
|
1019
1024
|
if (i)
|
|
1020
1025
|
return i.startsWith("zh") ? "zh-CN" : "en-US";
|
|
1021
1026
|
}
|
|
1022
1027
|
return ce;
|
|
1023
|
-
},
|
|
1028
|
+
}, Ee = (e) => ie[e] || ie[ce], q = (e, t = {}) => {
|
|
1024
1029
|
var b, v;
|
|
1025
1030
|
if (!e)
|
|
1026
1031
|
return "";
|
|
1027
|
-
if (
|
|
1032
|
+
if (typeof Me == "function")
|
|
1033
|
+
try {
|
|
1034
|
+
const m = Me(e, t);
|
|
1035
|
+
if (m && m !== e)
|
|
1036
|
+
return m;
|
|
1037
|
+
} catch (m) {
|
|
1038
|
+
console.warn("[TinySearchBox] globalT translation failed:", m);
|
|
1039
|
+
}
|
|
1040
|
+
if ((v = (b = j == null ? void 0 : j.config) == null ? void 0 : b.globalProperties) != null && v.$t)
|
|
1028
1041
|
try {
|
|
1029
|
-
const
|
|
1030
|
-
if (
|
|
1031
|
-
return
|
|
1032
|
-
} catch (
|
|
1033
|
-
console.warn("[TinySearchBox] i18n translation failed:",
|
|
1042
|
+
const m = j.config.globalProperties.$t(e, t);
|
|
1043
|
+
if (m && m !== e)
|
|
1044
|
+
return m;
|
|
1045
|
+
} catch (m) {
|
|
1046
|
+
console.warn("[TinySearchBox] i18n translation failed:", m);
|
|
1034
1047
|
}
|
|
1035
|
-
if (
|
|
1048
|
+
if (j != null && j.$t)
|
|
1036
1049
|
try {
|
|
1037
|
-
const
|
|
1038
|
-
if (
|
|
1039
|
-
return
|
|
1040
|
-
} catch (
|
|
1041
|
-
console.warn("[TinySearchBox] i18n translation failed:",
|
|
1050
|
+
const m = j.$t(e, t);
|
|
1051
|
+
if (m && m !== e)
|
|
1052
|
+
return m;
|
|
1053
|
+
} catch (m) {
|
|
1054
|
+
console.warn("[TinySearchBox] i18n translation failed:", m);
|
|
1042
1055
|
}
|
|
1043
|
-
const o =
|
|
1056
|
+
const o = Re(), l = Ee(o), c = e.split(".");
|
|
1044
1057
|
let i = l;
|
|
1045
|
-
for (const
|
|
1046
|
-
if (i && typeof i == "object" &&
|
|
1047
|
-
i = i[
|
|
1058
|
+
for (const m of c)
|
|
1059
|
+
if (i && typeof i == "object" && m in i)
|
|
1060
|
+
i = i[m];
|
|
1048
1061
|
else {
|
|
1049
1062
|
if (o !== ce) {
|
|
1050
|
-
i =
|
|
1063
|
+
i = Ee(ce);
|
|
1051
1064
|
for (const r of c)
|
|
1052
1065
|
if (i && typeof i == "object" && r in i)
|
|
1053
1066
|
i = i[r];
|
|
@@ -1059,24 +1072,25 @@ const Jt = (e) => {
|
|
|
1059
1072
|
i = e;
|
|
1060
1073
|
break;
|
|
1061
1074
|
}
|
|
1062
|
-
return typeof i == "string" && Object.keys(t).length > 0 ? i.replace(/\{(\w+)\}/g, (
|
|
1063
|
-
},
|
|
1075
|
+
return typeof i == "string" && Object.keys(t).length > 0 ? i.replace(/\{(\w+)\}/g, (m, p) => t[p] !== void 0 ? t[p] : m) : typeof i == "string" ? i : e;
|
|
1076
|
+
}, no = (e, t = {}) => e.map((o) => q(o, t)), lo = (e) => e in ie, ao = () => Object.keys(ie), ro = (e, t) => {
|
|
1064
1077
|
ie[e] = t;
|
|
1065
|
-
},
|
|
1078
|
+
}, so = (e) => {
|
|
1066
1079
|
e !== ce && delete ie[e];
|
|
1067
|
-
},
|
|
1068
|
-
t:
|
|
1069
|
-
zhCN:
|
|
1070
|
-
enUS:
|
|
1071
|
-
tArray:
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
+
}, io = {
|
|
1081
|
+
t: q,
|
|
1082
|
+
zhCN: Ye,
|
|
1083
|
+
enUS: Qe,
|
|
1084
|
+
tArray: no,
|
|
1085
|
+
setGlobalT: oo,
|
|
1086
|
+
setGlobalApp: to,
|
|
1087
|
+
getCurrentLocale: Re,
|
|
1088
|
+
getLocaleMessages: Ee,
|
|
1089
|
+
isLocaleSupported: lo,
|
|
1090
|
+
getSupportedLocales: ao,
|
|
1091
|
+
addLocale: ro,
|
|
1092
|
+
removeLocale: so
|
|
1093
|
+
}, po = [
|
|
1080
1094
|
"t",
|
|
1081
1095
|
"state",
|
|
1082
1096
|
"isShowClose",
|
|
@@ -1103,10 +1117,10 @@ const Jt = (e) => {
|
|
|
1103
1117
|
"handleEditConfirm",
|
|
1104
1118
|
"showDropdown",
|
|
1105
1119
|
"showPopover"
|
|
1106
|
-
],
|
|
1107
|
-
const
|
|
1120
|
+
], be = (e, t) => e.emptyPlaceholder || t("tvp.tvpSearchbox.addPlaceholder"), uo = ({ reactive: e, computed: t, api: o, i18n: l, watch: c, props: i, emit: b, vm: v }) => {
|
|
1121
|
+
const m = e({
|
|
1108
1122
|
innerModelValue: [...i.modelValue],
|
|
1109
|
-
placeholder: i.
|
|
1123
|
+
placeholder: i.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : be(i, q),
|
|
1110
1124
|
emitter: b,
|
|
1111
1125
|
recordItems: [],
|
|
1112
1126
|
groupItems: {},
|
|
@@ -1133,7 +1147,7 @@ const Jt = (e) => {
|
|
|
1133
1147
|
valueMap: /* @__PURE__ */ new Map(),
|
|
1134
1148
|
popoverVisible: !1,
|
|
1135
1149
|
selectValue: "",
|
|
1136
|
-
allTypeAttri: { label:
|
|
1150
|
+
allTypeAttri: { label: q("tvp.tvpSearchbox.rulekeyword1"), field: "tvpKeyword", type: "radio" },
|
|
1137
1151
|
operatorValue: ":",
|
|
1138
1152
|
inputEditValue: "",
|
|
1139
1153
|
currentOperators: "",
|
|
@@ -1148,90 +1162,92 @@ const Jt = (e) => {
|
|
|
1148
1162
|
visibleTimer: null,
|
|
1149
1163
|
hasFormError: !1,
|
|
1150
1164
|
// 表单校验错误状态
|
|
1151
|
-
hasBackupList: t(() =>
|
|
1152
|
-
isIndeterminate: t(() =>
|
|
1165
|
+
hasBackupList: t(() => m.propItem.label && [void 0, "radio", "checkbox", "map"].includes(m.prevItem.type)),
|
|
1166
|
+
isIndeterminate: t(() => m.checkboxGroup.length > 0 && m.checkboxGroup.length !== m.filterList.length),
|
|
1153
1167
|
checkAll: t({
|
|
1154
|
-
get: () =>
|
|
1168
|
+
get: () => m.checkboxGroup.length && m.checkboxGroup.length === m.filterList.length,
|
|
1155
1169
|
set: (p) => {
|
|
1156
|
-
p ?
|
|
1170
|
+
p ? m.checkboxGroup = m.filterList.flatMap((r) => `${m.prevItem.label}${r.label}`) : m.checkboxGroup = [];
|
|
1157
1171
|
}
|
|
1158
1172
|
})
|
|
1159
1173
|
});
|
|
1160
|
-
return
|
|
1161
|
-
},
|
|
1162
|
-
const
|
|
1163
|
-
return
|
|
1164
|
-
typeof document < "u" && (document.addEventListener("click",
|
|
1174
|
+
return m;
|
|
1175
|
+
}, co = (e, { getCurrentInstance: t, onMounted: o, onBeforeUnmount: l, computed: c, reactive: i, watch: b }, { emit: v, nextTick: m, refs: p, vm: r, slots: n }) => {
|
|
1176
|
+
const d = {}, u = e.emitter ? e.emitter.emit : v, s = uo({ reactive: i, computed: c, api: d, i18n: io, watch: b, props: e, emit: u, vm: r });
|
|
1177
|
+
return mo({ api: d, state: s, t: q, props: e, emit: u, nextTick: m, vm: r, computed: c }), fo({ watch: b, state: s, props: e, api: d, nextTick: m, vm: r }), s.instance = r, r && n && (r.slots = n), o(() => {
|
|
1178
|
+
typeof document < "u" && (document.addEventListener("click", d.watchOutsideClick), document.addEventListener("mousedown", d.watchMouseDown), document.addEventListener("mousemove", d.watchMouseMove));
|
|
1165
1179
|
}), l(() => {
|
|
1166
|
-
typeof document < "u" && (document.removeEventListener("click",
|
|
1167
|
-
}),
|
|
1168
|
-
},
|
|
1169
|
-
const { deleteTag:
|
|
1170
|
-
selectInputValue:
|
|
1171
|
-
selectPropItem:
|
|
1180
|
+
typeof document < "u" && (document.removeEventListener("click", d.watchOutsideClick), document.removeEventListener("mousedown", d.watchMouseDown), document.removeEventListener("mousemove", d.watchMouseMove), s.localeCheckInterval && (clearInterval(s.localeCheckInterval), s.localeCheckInterval = null));
|
|
1181
|
+
}), d;
|
|
1182
|
+
}, mo = ({ api: e, state: t, t: o, props: l, emit: c, nextTick: i, vm: b, computed: v }) => {
|
|
1183
|
+
const { deleteTag: m, clearTag: p, backspaceDeleteTag: r } = Ht({ props: l, state: t, emit: c, nextTick: i }), { editTag: n, confirmEditTag: d, selectPropChange: u, selectItemIsDisable: s, checkFormValidation: a } = Jt({ props: l, state: t, t: o, nextTick: i, format: De, emit: c, vm: b }), { handleInput: h, selectFirstMap: g, cancelHandleInput: T } = Zt({ props: l, state: t, emit: c, nextTick: i }), { selectPropItem: $, selectRadioItem: V, selectInputValue: f, createTag: S, helpClick: k, setOperator: _ } = Gt({ props: l, emit: c, state: t, t: o, format: De, nextTick: i, vm: b, cancelHandleInput: T }), { selectCheckbox: E } = Yt({ props: l, state: t, emit: c, nextTick: i }), { onConfirmDate: P, handleDateShow: R, pickerOptions: O } = Qt({ props: l, state: t, emit: c, nextTick: i, vm: b }), { sizeChange: B, initFormRule: A } = Wt({ props: l, state: t, t: o, emit: c, nextTick: i, vm: b }), { handleConfirm: ee, handleEditConfirm: W } = Xt({ state: t, emit: c, nextTick: i }), { initItems: Z, watchOutsideClick: X, watchMouseDown: re, watchMouseMove: Ie, handleClick: ke } = eo({ props: l, state: t }), We = v(() => l.modelValue.length || t.propItem.label || t.inputValue), Je = () => ({
|
|
1184
|
+
selectInputValue: f,
|
|
1185
|
+
selectPropItem: $,
|
|
1172
1186
|
selectRadioItem: V,
|
|
1173
|
-
setOperator:
|
|
1174
|
-
selectCheckbox:
|
|
1175
|
-
sizeChange:
|
|
1187
|
+
setOperator: _,
|
|
1188
|
+
selectCheckbox: E,
|
|
1189
|
+
sizeChange: B,
|
|
1176
1190
|
onConfirmDate: P,
|
|
1177
1191
|
selectFirstMap: g,
|
|
1178
1192
|
handleDateShow: R
|
|
1179
|
-
}),
|
|
1193
|
+
}), we = (pe) => {
|
|
1180
1194
|
t.placeholder = pe;
|
|
1181
|
-
};
|
|
1182
|
-
l.modelValue.length > 0
|
|
1195
|
+
}, Xe = () => be(l, o);
|
|
1196
|
+
l.modelValue.length > 0 ? we(o("tvp.tvpSearchbox.addPlaceholder")) : we(Xe()), Object.assign(e, {
|
|
1183
1197
|
t: o,
|
|
1184
1198
|
state: t,
|
|
1185
|
-
isShowClose:
|
|
1186
|
-
deleteTag:
|
|
1199
|
+
isShowClose: We,
|
|
1200
|
+
deleteTag: m,
|
|
1187
1201
|
editTag: n,
|
|
1188
1202
|
backspaceDeleteTag: r,
|
|
1189
|
-
createTag:
|
|
1203
|
+
createTag: S,
|
|
1190
1204
|
clearTag: p,
|
|
1191
|
-
helpClick:
|
|
1192
|
-
handleInput:
|
|
1205
|
+
helpClick: k,
|
|
1206
|
+
handleInput: h,
|
|
1193
1207
|
handleClick: ke,
|
|
1194
|
-
handleEvents: (pe,
|
|
1195
|
-
const
|
|
1196
|
-
typeof
|
|
1208
|
+
handleEvents: (pe, et, tt) => {
|
|
1209
|
+
const Pe = Je();
|
|
1210
|
+
typeof Pe[pe] == "function" ? Pe[pe](et, tt) : console.warn(`[TinySearchBox] Unknown event: ${pe}`);
|
|
1197
1211
|
},
|
|
1198
1212
|
pickerOptions: O,
|
|
1199
|
-
resetInput:
|
|
1200
|
-
selectItemIsDisable:
|
|
1201
|
-
selectPropChange:
|
|
1202
|
-
confirmEditTag:
|
|
1213
|
+
resetInput: Ve,
|
|
1214
|
+
selectItemIsDisable: s,
|
|
1215
|
+
selectPropChange: u,
|
|
1216
|
+
confirmEditTag: d,
|
|
1203
1217
|
handleConfirm: ee,
|
|
1204
1218
|
handleEditConfirm: W,
|
|
1205
|
-
showDropdown:
|
|
1219
|
+
showDropdown: L,
|
|
1206
1220
|
showPopover: de,
|
|
1207
1221
|
checkFormValidation: a,
|
|
1208
|
-
setPlaceholder:
|
|
1209
|
-
initItems:
|
|
1222
|
+
setPlaceholder: we,
|
|
1223
|
+
initItems: Z,
|
|
1210
1224
|
initFormRule: A,
|
|
1211
1225
|
watchOutsideClick: X,
|
|
1212
1226
|
watchMouseDown: re,
|
|
1213
|
-
watchMouseMove:
|
|
1227
|
+
watchMouseMove: Ie
|
|
1214
1228
|
});
|
|
1215
|
-
},
|
|
1229
|
+
}, fo = ({ watch: e, state: t, props: o, api: l, nextTick: c, vm: i }) => {
|
|
1216
1230
|
var r;
|
|
1217
1231
|
const b = () => {
|
|
1218
1232
|
var n;
|
|
1219
1233
|
if (t.propItem.label) {
|
|
1220
|
-
const { placeholder:
|
|
1221
|
-
|
|
1222
|
-
} else
|
|
1223
|
-
|
|
1234
|
+
const { placeholder: d, type: u } = t.prevItem;
|
|
1235
|
+
d ? l.setPlaceholder(d) : u === "map" ? l.setPlaceholder(q("tvp.tvpSearchbox.tagPlaceholder")) : (n = t.backupList) != null && n.length ? l.setPlaceholder(q("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: t.propItem.label })) : l.setPlaceholder(q("tvp.tvpSearchbox.addPlaceholder"));
|
|
1236
|
+
} else {
|
|
1237
|
+
const d = o.modelValue.length > 0 ? q("tvp.tvpSearchbox.addPlaceholder") : be(o, q);
|
|
1238
|
+
l.setPlaceholder(d);
|
|
1239
|
+
}
|
|
1224
1240
|
}, v = () => {
|
|
1225
|
-
var n,
|
|
1226
|
-
return (n = i == null ? void 0 : i.$i18n) != null && n.locale ? i.$i18n.locale : (
|
|
1241
|
+
var n, d, u;
|
|
1242
|
+
return (n = i == null ? void 0 : i.$i18n) != null && n.locale ? i.$i18n.locale : (u = (d = i == null ? void 0 : i.proxy) == null ? void 0 : d.$i18n) != null && u.locale ? i.proxy.$i18n.locale : Re();
|
|
1227
1243
|
};
|
|
1228
|
-
let
|
|
1244
|
+
let m = v();
|
|
1229
1245
|
if (i != null && i.$i18n)
|
|
1230
1246
|
try {
|
|
1231
1247
|
i.$watch(
|
|
1232
1248
|
() => i.$i18n.locale,
|
|
1233
1249
|
(n) => {
|
|
1234
|
-
n !==
|
|
1250
|
+
n !== m && (m = n, b());
|
|
1235
1251
|
},
|
|
1236
1252
|
{ immediate: !1 }
|
|
1237
1253
|
);
|
|
@@ -1243,7 +1259,7 @@ const Jt = (e) => {
|
|
|
1243
1259
|
e(
|
|
1244
1260
|
() => i.proxy.$i18n.locale,
|
|
1245
1261
|
(n) => {
|
|
1246
|
-
n !==
|
|
1262
|
+
n !== m && (m = n, b());
|
|
1247
1263
|
},
|
|
1248
1264
|
{ immediate: !1 }
|
|
1249
1265
|
);
|
|
@@ -1252,7 +1268,7 @@ const Jt = (e) => {
|
|
|
1252
1268
|
}
|
|
1253
1269
|
const p = () => {
|
|
1254
1270
|
const n = v();
|
|
1255
|
-
n !==
|
|
1271
|
+
n !== m && (m = n, b());
|
|
1256
1272
|
};
|
|
1257
1273
|
typeof window < "u" && (t.localeCheckInterval = setInterval(p, 200)), e(
|
|
1258
1274
|
() => o.modelValue,
|
|
@@ -1262,11 +1278,11 @@ const Jt = (e) => {
|
|
|
1262
1278
|
), e(
|
|
1263
1279
|
() => o.items,
|
|
1264
1280
|
(n) => {
|
|
1265
|
-
const
|
|
1281
|
+
const d = t.visible, u = t.prevItem && t.prevItem.field;
|
|
1266
1282
|
t.recordItems = ne(n), l.initItems(), l.initFormRule(), c(() => {
|
|
1267
|
-
if (l.initItems(), l.initFormRule(),
|
|
1268
|
-
const
|
|
1269
|
-
t.prevItem =
|
|
1283
|
+
if (l.initItems(), l.initFormRule(), d && t.propItem.label) {
|
|
1284
|
+
const s = t.recordItems.find((a) => a.field === u) || t.prevItem;
|
|
1285
|
+
t.prevItem = s || {}, t.backupList = s && s.options ? [...s.options] : [], t.filterList = t.backupList ? [...t.backupList] : [], L(t);
|
|
1270
1286
|
}
|
|
1271
1287
|
});
|
|
1272
1288
|
},
|
|
@@ -1316,21 +1332,21 @@ const Jt = (e) => {
|
|
|
1316
1332
|
() => o.modelValue,
|
|
1317
1333
|
(n) => {
|
|
1318
1334
|
if (n) {
|
|
1319
|
-
if (t.indexMap.clear(), t.valueMap.clear(), n.forEach((
|
|
1335
|
+
if (t.indexMap.clear(), t.valueMap.clear(), n.forEach((d, u) => {
|
|
1320
1336
|
var a;
|
|
1321
|
-
const
|
|
1322
|
-
t.indexMap.set(
|
|
1323
|
-
const g = `${
|
|
1324
|
-
t.valueMap.set(g,
|
|
1337
|
+
const s = `${d.label}${d.value}`;
|
|
1338
|
+
t.indexMap.set(d.label, u), t.valueMap.set(s, u), ((a = d.options) == null ? void 0 : a.length) > 0 && d.options.forEach((h) => {
|
|
1339
|
+
const g = `${d.label}${h.label}`;
|
|
1340
|
+
t.valueMap.set(g, u);
|
|
1325
1341
|
});
|
|
1326
|
-
}), de(t, !1), n.length === 0 && l.setPlaceholder(
|
|
1327
|
-
const
|
|
1328
|
-
if ((t.recordItems.find((
|
|
1329
|
-
const
|
|
1330
|
-
t.inputEditValue =
|
|
1342
|
+
}), de(t, !1), n.length === 0 && l.setPlaceholder(be(o, q)), o.editable && !t.inputEditValue.length && n[0]) {
|
|
1343
|
+
const d = n[0];
|
|
1344
|
+
if ((t.recordItems.find((s) => s.field === d.field) || d).mergeTag && d.options) {
|
|
1345
|
+
const s = d.options.flatMap((a) => a.label) || [];
|
|
1346
|
+
t.inputEditValue = s, t.currentEditSelectTags = s;
|
|
1331
1347
|
} else {
|
|
1332
|
-
const
|
|
1333
|
-
t.inputEditValue = Array.isArray(
|
|
1348
|
+
const s = d.value;
|
|
1349
|
+
t.inputEditValue = Array.isArray(s) ? s.join(",") : s || "";
|
|
1334
1350
|
}
|
|
1335
1351
|
}
|
|
1336
1352
|
t.innerModelValue = [...n];
|
|
@@ -1341,14 +1357,14 @@ const Jt = (e) => {
|
|
|
1341
1357
|
immediate: !0
|
|
1342
1358
|
}
|
|
1343
1359
|
);
|
|
1344
|
-
},
|
|
1360
|
+
}, Ne = (e, t) => {
|
|
1345
1361
|
const o = e.__vccOpts || e;
|
|
1346
1362
|
for (const [l, c] of t)
|
|
1347
1363
|
o[l] = c;
|
|
1348
1364
|
return o;
|
|
1349
|
-
},
|
|
1350
|
-
const l = e.handleEvents || e.events || ((v,
|
|
1351
|
-
o("events", v,
|
|
1365
|
+
}, ho = (e, t, { emit: o }) => {
|
|
1366
|
+
const l = e.handleEvents || e.events || ((v, m, p) => {
|
|
1367
|
+
o("events", v, m, p);
|
|
1352
1368
|
});
|
|
1353
1369
|
return {
|
|
1354
1370
|
selectInputValue: (v) => {
|
|
@@ -1357,18 +1373,18 @@ const Jt = (e) => {
|
|
|
1357
1373
|
selectPropItem: (v) => {
|
|
1358
1374
|
l("selectPropItem", v);
|
|
1359
1375
|
},
|
|
1360
|
-
selectRadioItem: (v,
|
|
1361
|
-
l("selectRadioItem", v,
|
|
1376
|
+
selectRadioItem: (v, m) => {
|
|
1377
|
+
l("selectRadioItem", v, m);
|
|
1362
1378
|
},
|
|
1363
|
-
t:
|
|
1379
|
+
t: q
|
|
1364
1380
|
};
|
|
1365
|
-
},
|
|
1366
|
-
name:
|
|
1381
|
+
}, bo = ["selectInputValue", "selectPropItem", "selectRadioItem", "t"], vo = ve({
|
|
1382
|
+
name: $e + "SearchBoxFirstLevelPanel",
|
|
1367
1383
|
components: {
|
|
1368
|
-
TinyDropdownItem:
|
|
1384
|
+
TinyDropdownItem: ze
|
|
1369
1385
|
},
|
|
1370
1386
|
props: {
|
|
1371
|
-
...
|
|
1387
|
+
...ge,
|
|
1372
1388
|
state: {
|
|
1373
1389
|
type: Object,
|
|
1374
1390
|
default: () => ({})
|
|
@@ -1388,94 +1404,94 @@ const Jt = (e) => {
|
|
|
1388
1404
|
},
|
|
1389
1405
|
emits: ["events"],
|
|
1390
1406
|
setup(e, t) {
|
|
1391
|
-
return
|
|
1407
|
+
return Le({ props: e, context: t, renderless: ho, api: bo });
|
|
1392
1408
|
}
|
|
1393
|
-
}),
|
|
1409
|
+
}), go = { tiny_mode: "pc" }, yo = { key: 0 }, Vo = { class: "tvp-search-box__filter-type" }, Io = {
|
|
1394
1410
|
key: 0,
|
|
1395
1411
|
class: "tvp-search-box__text-highlight"
|
|
1396
|
-
},
|
|
1412
|
+
}, ko = { key: 1 }, wo = { class: "tvp-search-box__filter-type" }, To = {
|
|
1397
1413
|
key: 0,
|
|
1398
1414
|
class: "tvp-search-box__text-highlight"
|
|
1399
|
-
},
|
|
1415
|
+
}, So = { key: 1 }, Do = { class: "tvp-search-box__filter-type" }, Co = {
|
|
1400
1416
|
id: "potential-loading",
|
|
1401
1417
|
class: "tvp-search-box__potential-box"
|
|
1402
|
-
},
|
|
1418
|
+
}, Mo = { key: 0 }, Eo = { class: "tvp-search-box__text-highlight" }, $o = { class: "tvp-search-box__first-panel" }, Lo = {
|
|
1403
1419
|
key: 0,
|
|
1404
1420
|
class: "tvp-search-box__filter-type"
|
|
1405
|
-
},
|
|
1406
|
-
function
|
|
1407
|
-
var v,
|
|
1421
|
+
}, _o = ["title"];
|
|
1422
|
+
function Ro(e, t, o, l, c, i) {
|
|
1423
|
+
var v, m;
|
|
1408
1424
|
const b = N("tiny-dropdown-item");
|
|
1409
|
-
return y(),
|
|
1410
|
-
|
|
1425
|
+
return y(), w("div", go, [
|
|
1426
|
+
H(C(b, {
|
|
1411
1427
|
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
|
|
1412
1428
|
"item-data": { label: e.state.inputValue },
|
|
1413
1429
|
onItemClick: t[0] || (t[0] = () => e.selectInputValue(e.state.inputValue))
|
|
1414
1430
|
}, {
|
|
1415
|
-
default:
|
|
1416
|
-
|
|
1431
|
+
default: M(() => [
|
|
1432
|
+
D("span", null, I(e.t("tvp.tvpSearchbox.initUse")) + """ + I(e.state.inputValue) + """, 1)
|
|
1417
1433
|
]),
|
|
1418
1434
|
_: 1
|
|
1419
1435
|
}, 8, ["item-data"]), [
|
|
1420
1436
|
[G, e.state.inputValue.trim()]
|
|
1421
1437
|
]),
|
|
1422
|
-
|
|
1423
|
-
(y(!0),
|
|
1424
|
-
p.attr.length ? (y(),
|
|
1425
|
-
|
|
1426
|
-
(y(!0),
|
|
1427
|
-
key: n.label +
|
|
1438
|
+
H(D("div", null, [
|
|
1439
|
+
(y(!0), w(x, null, U(e.state.matchItems, (p, r) => (y(), w("div", { key: r }, [
|
|
1440
|
+
p.attr.length ? (y(), w("div", yo, [
|
|
1441
|
+
D("span", Vo, I(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1),
|
|
1442
|
+
(y(!0), w(x, null, U(p.attr, (n, d) => (y(), F(b, {
|
|
1443
|
+
key: n.label + d,
|
|
1428
1444
|
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
1429
1445
|
"item-data": n,
|
|
1430
1446
|
onItemClick: () => e.selectPropItem(n)
|
|
1431
1447
|
}, {
|
|
1432
|
-
default:
|
|
1433
|
-
|
|
1434
|
-
(y(!0),
|
|
1435
|
-
|
|
1448
|
+
default: M(() => [
|
|
1449
|
+
D("span", null, [
|
|
1450
|
+
(y(!0), w(x, null, U(n.match, (u) => (y(), w("span", { key: u }, [
|
|
1451
|
+
u.toLowerCase() === n.hightlighStr ? (y(), w("span", Io, I(u), 1)) : (y(), w("span", ko, I(u), 1))
|
|
1436
1452
|
]))), 128))
|
|
1437
1453
|
])
|
|
1438
1454
|
]),
|
|
1439
1455
|
_: 2
|
|
1440
1456
|
}, 1032, ["item-data", "onItemClick"]))), 128))
|
|
1441
|
-
])) :
|
|
1442
|
-
p.attrValue.length ? (y(),
|
|
1443
|
-
|
|
1444
|
-
(y(!0),
|
|
1445
|
-
key: n.label +
|
|
1457
|
+
])) : z("", !0),
|
|
1458
|
+
p.attrValue.length ? (y(), w(x, { key: 1 }, [
|
|
1459
|
+
D("span", wo, I(e.t("tvp.tvpSearchbox.propertyValue", [r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r])), 1),
|
|
1460
|
+
(y(!0), w(x, null, U(p.attrValue, (n, d) => (y(), F(b, {
|
|
1461
|
+
key: n.label + d,
|
|
1446
1462
|
disabled: n.isChecked,
|
|
1447
1463
|
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
1448
1464
|
"item-data": n,
|
|
1449
1465
|
onItemClick: () => e.selectRadioItem(n, !0)
|
|
1450
1466
|
}, {
|
|
1451
|
-
default:
|
|
1452
|
-
|
|
1453
|
-
(y(!0),
|
|
1454
|
-
|
|
1467
|
+
default: M(() => [
|
|
1468
|
+
D("span", null, [
|
|
1469
|
+
(y(!0), w(x, null, U(n.match, (u) => (y(), w("span", { key: u }, [
|
|
1470
|
+
u.toLowerCase() === n.hightlighStr ? (y(), w("span", To, I(u), 1)) : (y(), w("span", So, I(u), 1))
|
|
1455
1471
|
]))), 128))
|
|
1456
1472
|
])
|
|
1457
1473
|
]),
|
|
1458
1474
|
_: 2
|
|
1459
1475
|
}, 1032, ["disabled", "item-data", "onItemClick"]))), 128))
|
|
1460
|
-
], 64)) :
|
|
1476
|
+
], 64)) : z("", !0)
|
|
1461
1477
|
]))), 128)),
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
e.state.potentialOptions ? (y(),
|
|
1466
|
-
(y(!0),
|
|
1478
|
+
H(D("div", null, [
|
|
1479
|
+
D("span", Do, I(e.t("tvp.tvpSearchbox.matched")), 1),
|
|
1480
|
+
D("div", Co, [
|
|
1481
|
+
e.state.potentialOptions ? (y(), w("div", Mo, [
|
|
1482
|
+
(y(!0), w(x, null, U(e.state.potentialOptions, (p, r) => (y(), F(b, {
|
|
1467
1483
|
key: p.label + r,
|
|
1468
1484
|
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
1469
1485
|
"item-data": p,
|
|
1470
1486
|
onItemClick: () => e.selectRadioItem(p, !0)
|
|
1471
1487
|
}, {
|
|
1472
|
-
default:
|
|
1473
|
-
K(
|
|
1474
|
-
|
|
1488
|
+
default: M(() => [
|
|
1489
|
+
K(I(p.label) + ": ", 1),
|
|
1490
|
+
D("span", Eo, I(p.value), 1)
|
|
1475
1491
|
]),
|
|
1476
1492
|
_: 2
|
|
1477
1493
|
}, 1032, ["item-data", "onItemClick"]))), 128))
|
|
1478
|
-
])) :
|
|
1494
|
+
])) : z("", !0)
|
|
1479
1495
|
])
|
|
1480
1496
|
], 512), [
|
|
1481
1497
|
[G, e.state.potentialOptions]
|
|
@@ -1483,65 +1499,65 @@ function Eo(e, t, o, l, c, i) {
|
|
|
1483
1499
|
], 512), [
|
|
1484
1500
|
[G, !e.state.propItem.label && ((v = e.state.inputValue) == null ? void 0 : v.trim())]
|
|
1485
1501
|
]),
|
|
1486
|
-
|
|
1487
|
-
(y(!0),
|
|
1488
|
-
p.length ? (y(),
|
|
1489
|
-
(y(!0),
|
|
1490
|
-
key: (n.field || n.label) +
|
|
1502
|
+
H(D("div", $o, [
|
|
1503
|
+
(y(!0), w(x, null, U(e.state.groupItems, (p, r) => (y(), w("div", { key: r }, [
|
|
1504
|
+
p.length ? (y(), w("span", Lo, I(r === "0" ? e.t("tvp.tvpSearchbox.attributeType") : r), 1)) : z("", !0),
|
|
1505
|
+
(y(!0), w(x, null, U(p, (n, d) => (y(), F(b, {
|
|
1506
|
+
key: (n.field || n.label) + d,
|
|
1491
1507
|
class: "tvp-search-box__dropdown-item",
|
|
1492
1508
|
"item-data": n,
|
|
1493
1509
|
onItemClick: () => e.selectPropItem(n)
|
|
1494
1510
|
}, {
|
|
1495
|
-
default:
|
|
1496
|
-
|
|
1511
|
+
default: M(() => [
|
|
1512
|
+
D("span", {
|
|
1497
1513
|
title: n.label
|
|
1498
|
-
},
|
|
1514
|
+
}, I(n.label), 9, _o)
|
|
1499
1515
|
]),
|
|
1500
1516
|
_: 2
|
|
1501
1517
|
}, 1032, ["item-data", "onItemClick"]))), 128))
|
|
1502
1518
|
]))), 128))
|
|
1503
1519
|
], 512), [
|
|
1504
|
-
[G, e.state.visible && !e.state.propItem.label && !((
|
|
1520
|
+
[G, e.state.visible && !e.state.propItem.label && !((m = e.state.inputValue) != null && m.trim())]
|
|
1505
1521
|
])
|
|
1506
1522
|
]);
|
|
1507
1523
|
}
|
|
1508
|
-
const
|
|
1509
|
-
const { computed: l } = t, c = e.handleEvents || e.events || ((
|
|
1510
|
-
o("events",
|
|
1511
|
-
}), i = (
|
|
1512
|
-
c("setOperator",
|
|
1513
|
-
}, b = (
|
|
1514
|
-
c("selectRadioItem",
|
|
1515
|
-
}, v = (
|
|
1516
|
-
c("selectCheckbox",
|
|
1517
|
-
},
|
|
1518
|
-
c("sizeChange",
|
|
1519
|
-
}, p = (
|
|
1520
|
-
c("onConfirmDate",
|
|
1521
|
-
}, r = (
|
|
1522
|
-
c("selectFirstMap",
|
|
1523
|
-
}, n = (
|
|
1524
|
-
c("handleDateShow",
|
|
1525
|
-
},
|
|
1526
|
-
var
|
|
1527
|
-
return e.state.hasBackupList && ((
|
|
1528
|
-
}),
|
|
1529
|
-
var
|
|
1530
|
-
return (
|
|
1524
|
+
const No = /* @__PURE__ */ Ne(vo, [["render", Ro]]), Po = (e, t, { emit: o }) => {
|
|
1525
|
+
const { computed: l } = t, c = e.handleEvents || e.events || ((s, a, h) => {
|
|
1526
|
+
o("events", s, a, h);
|
|
1527
|
+
}), i = (s) => {
|
|
1528
|
+
c("setOperator", s);
|
|
1529
|
+
}, b = (s) => {
|
|
1530
|
+
c("selectRadioItem", s);
|
|
1531
|
+
}, v = (s) => {
|
|
1532
|
+
c("selectCheckbox", s);
|
|
1533
|
+
}, m = (s) => {
|
|
1534
|
+
c("sizeChange", s);
|
|
1535
|
+
}, p = (s, a) => {
|
|
1536
|
+
c("onConfirmDate", s, a);
|
|
1537
|
+
}, r = (s, a) => {
|
|
1538
|
+
c("selectFirstMap", s, a);
|
|
1539
|
+
}, n = (s) => {
|
|
1540
|
+
c("handleDateShow", s);
|
|
1541
|
+
}, d = l(() => {
|
|
1542
|
+
var s;
|
|
1543
|
+
return e.state.hasBackupList && ((s = e.state.backupList) == null ? void 0 : s.length) === 0;
|
|
1544
|
+
}), u = l(() => {
|
|
1545
|
+
var s;
|
|
1546
|
+
return (s = e.state.backupList) == null ? void 0 : s.find((a) => !a.isFilter);
|
|
1531
1547
|
});
|
|
1532
1548
|
return {
|
|
1533
1549
|
setOperator: i,
|
|
1534
1550
|
selectRadioItem: b,
|
|
1535
1551
|
selectCheckbox: v,
|
|
1536
|
-
sizeChange:
|
|
1552
|
+
sizeChange: m,
|
|
1537
1553
|
onConfirmDate: p,
|
|
1538
1554
|
selectFirstMap: r,
|
|
1539
1555
|
handleDateShow: n,
|
|
1540
|
-
isLoading:
|
|
1541
|
-
showCheckBoxList:
|
|
1542
|
-
t:
|
|
1556
|
+
isLoading: d,
|
|
1557
|
+
showCheckBoxList: u,
|
|
1558
|
+
t: q
|
|
1543
1559
|
};
|
|
1544
|
-
},
|
|
1560
|
+
}, Oo = [
|
|
1545
1561
|
"setOperator",
|
|
1546
1562
|
"selectRadioItem",
|
|
1547
1563
|
"selectCheckbox",
|
|
@@ -1552,23 +1568,23 @@ const $o = /* @__PURE__ */ _e(mo, [["render", Eo]]), Lo = (e, t, { emit: o }) =>
|
|
|
1552
1568
|
"isLoading",
|
|
1553
1569
|
"showCheckBoxList",
|
|
1554
1570
|
"t"
|
|
1555
|
-
],
|
|
1556
|
-
name:
|
|
1571
|
+
], Fo = ve({
|
|
1572
|
+
name: $e + "SearchBoxSecondLevelPanel",
|
|
1557
1573
|
emits: ["events"],
|
|
1558
1574
|
components: {
|
|
1559
|
-
TinyFormItem:
|
|
1560
|
-
TinyDropdownItem:
|
|
1561
|
-
TinyCheckbox:
|
|
1562
|
-
TinyCheckboxGroup:
|
|
1563
|
-
TinyDatePicker:
|
|
1564
|
-
TinyInput:
|
|
1565
|
-
TinyButton:
|
|
1575
|
+
TinyFormItem: Ae,
|
|
1576
|
+
TinyDropdownItem: ze,
|
|
1577
|
+
TinyCheckbox: ht,
|
|
1578
|
+
TinyCheckboxGroup: bt,
|
|
1579
|
+
TinyDatePicker: xe,
|
|
1580
|
+
TinyInput: Fe,
|
|
1581
|
+
TinyButton: Be
|
|
1566
1582
|
},
|
|
1567
1583
|
directives: {
|
|
1568
|
-
loading:
|
|
1584
|
+
loading: vt.directive
|
|
1569
1585
|
},
|
|
1570
1586
|
props: {
|
|
1571
|
-
...
|
|
1587
|
+
...ge,
|
|
1572
1588
|
state: {
|
|
1573
1589
|
type: Object,
|
|
1574
1590
|
default: () => ({})
|
|
@@ -1588,97 +1604,97 @@ const $o = /* @__PURE__ */ _e(mo, [["render", Eo]]), Lo = (e, t, { emit: o }) =>
|
|
|
1588
1604
|
}
|
|
1589
1605
|
},
|
|
1590
1606
|
setup(e, t) {
|
|
1591
|
-
return
|
|
1607
|
+
return Le({ props: e, context: t, renderless: Po, api: Oo });
|
|
1592
1608
|
}
|
|
1593
|
-
}),
|
|
1609
|
+
}), Bo = { tiny_mode: "pc" }, xo = { key: 0 }, Ao = { class: "tvp-search-box__filter-type" }, zo = ["title"], Uo = {
|
|
1594
1610
|
key: 0,
|
|
1595
1611
|
class: "tvp-search-box__text-highlight"
|
|
1596
|
-
},
|
|
1612
|
+
}, jo = { key: 1 }, Ho = ["title"], Ko = { key: 0 }, Go = { class: "tvp-search-box__checkbox-wrap" }, qo = { class: "tvp-search-box__checkbox-btn" }, Zo = {
|
|
1597
1613
|
key: 3,
|
|
1598
1614
|
class: "tvp-search-box__panel-box"
|
|
1599
|
-
},
|
|
1615
|
+
}, Yo = { class: "tvp-search-box__number" }, Qo = { class: "tvp-search-box__dropdown-title" }, Wo = { class: "tvp-search-box__dropdown-start" }, Jo = { class: "tvp-search-box__dropdown-end" }, Xo = { class: "tvp-search-box__bottom-btn" }, en = {
|
|
1600
1616
|
key: 4,
|
|
1601
1617
|
class: "tvp-search-box__panel-box"
|
|
1602
|
-
},
|
|
1618
|
+
}, tn = { class: "tvp-search-box__date-wrap" }, on = { class: "tvp-search-box__dropdown-title" }, nn = { class: "tvp-search-box__dropdown-start" }, ln = { class: "tvp-search-box__dropdown-end" }, an = { class: "tvp-search-box__bottom-btn" }, rn = {
|
|
1603
1619
|
key: 5,
|
|
1604
1620
|
class: "tvp-search-box__panel-box"
|
|
1605
|
-
},
|
|
1621
|
+
}, sn = { class: "tvp-search-box__date-wrap" }, pn = { class: "tvp-search-box__dropdown-title" }, un = { class: "tvp-search-box__dropdown-start" }, cn = { class: "tvp-search-box__dropdown-end" }, dn = { class: "tvp-search-box__bottom-btn" }, mn = { key: 6 }, fn = {
|
|
1606
1622
|
key: 0,
|
|
1607
1623
|
class: "tvp-search-box__filter-type"
|
|
1608
|
-
},
|
|
1624
|
+
}, hn = {
|
|
1609
1625
|
key: 1,
|
|
1610
1626
|
class: "tvp-search-box__filter-type"
|
|
1611
|
-
},
|
|
1612
|
-
function
|
|
1613
|
-
var
|
|
1614
|
-
const b = N("tiny-dropdown-item"), v = N("tiny-checkbox"),
|
|
1615
|
-
return y(),
|
|
1616
|
-
(
|
|
1617
|
-
|
|
1618
|
-
(y(!0),
|
|
1619
|
-
key: a +
|
|
1627
|
+
}, bn = ["title"];
|
|
1628
|
+
function vn(e, t, o, l, c, i) {
|
|
1629
|
+
var s;
|
|
1630
|
+
const b = N("tiny-dropdown-item"), v = N("tiny-checkbox"), m = N("tiny-checkbox-group"), p = N("tiny-button"), r = N("tiny-input"), n = N("tiny-form-item"), d = N("tiny-date-picker"), u = mt("loading");
|
|
1631
|
+
return y(), w("div", Bo, [
|
|
1632
|
+
(s = e.state.currentOperators) != null && s.length ? (y(), w("div", xo, [
|
|
1633
|
+
D("span", Ao, I(e.t("tvp.tvpSearchbox.operator")), 1),
|
|
1634
|
+
(y(!0), w(x, null, U(e.state.currentOperators, (a, h) => H((y(), F(b, {
|
|
1635
|
+
key: a + h,
|
|
1620
1636
|
class: "tvp-search-box__dropdown-item",
|
|
1621
1637
|
"item-data": { label: a },
|
|
1622
1638
|
onItemClick: () => e.setOperator(a)
|
|
1623
1639
|
}, {
|
|
1624
|
-
default:
|
|
1625
|
-
K(
|
|
1640
|
+
default: M(() => [
|
|
1641
|
+
K(I(a), 1)
|
|
1626
1642
|
]),
|
|
1627
1643
|
_: 2
|
|
1628
1644
|
}, 1032, ["item-data", "onItemClick"])), [
|
|
1629
1645
|
[G, a.includes(e.state.inputValue)]
|
|
1630
1646
|
])), 128))
|
|
1631
|
-
])) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ?
|
|
1647
|
+
])) : !e.state.prevItem.type || e.state.prevItem.type === "radio" ? H((y(), w("div", {
|
|
1632
1648
|
key: 1,
|
|
1633
1649
|
class: he(["tvp-search-box__radio-wrap", e.isLoading && "tvp-search-box__loading-box"])
|
|
1634
1650
|
}, [
|
|
1635
|
-
(y(!0),
|
|
1636
|
-
key:
|
|
1651
|
+
(y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
|
|
1652
|
+
key: h + (a.field || a.label),
|
|
1637
1653
|
disabled: a.isChecked,
|
|
1638
1654
|
class: "tvp-search-box__dropdown-item",
|
|
1639
1655
|
"item-data": a,
|
|
1640
1656
|
onItemClick: () => e.selectRadioItem(a)
|
|
1641
1657
|
}, {
|
|
1642
|
-
default:
|
|
1643
|
-
a.match ? (y(),
|
|
1658
|
+
default: M(() => [
|
|
1659
|
+
a.match ? (y(), w("span", {
|
|
1644
1660
|
key: 0,
|
|
1645
1661
|
title: a.label
|
|
1646
1662
|
}, [
|
|
1647
|
-
(y(!0),
|
|
1648
|
-
g.toLowerCase() === a.hightlighStr ? (y(),
|
|
1663
|
+
(y(!0), w(x, null, U(a.match, (g) => (y(), w("span", { key: g }, [
|
|
1664
|
+
g.toLowerCase() === a.hightlighStr ? (y(), w("span", Uo, I(g), 1)) : (y(), w("span", jo, I(g), 1))
|
|
1649
1665
|
]))), 128))
|
|
1650
|
-
], 8,
|
|
1666
|
+
], 8, zo)) : (y(), w("span", {
|
|
1651
1667
|
key: 1,
|
|
1652
1668
|
title: a.label
|
|
1653
|
-
},
|
|
1669
|
+
}, I(a.label), 9, Ho))
|
|
1654
1670
|
]),
|
|
1655
1671
|
_: 2
|
|
1656
1672
|
}, 1032, ["disabled", "item-data", "onItemClick"])), [
|
|
1657
1673
|
[G, !a.isFilter || !e.state.inputValue]
|
|
1658
1674
|
])), 128))
|
|
1659
1675
|
], 2)), [
|
|
1660
|
-
[
|
|
1661
|
-
]) : e.state.prevItem.type === "checkbox" ?
|
|
1676
|
+
[u, e.isLoading]
|
|
1677
|
+
]) : e.state.prevItem.type === "checkbox" ? H((y(), w("div", {
|
|
1662
1678
|
key: 2,
|
|
1663
1679
|
class: he(e.isLoading && "tvp-search-box__loading-box")
|
|
1664
1680
|
}, [
|
|
1665
|
-
e.showCheckBoxList ? (y(),
|
|
1666
|
-
|
|
1667
|
-
|
|
1681
|
+
e.showCheckBoxList ? (y(), w("div", Ko, [
|
|
1682
|
+
D("div", Go, [
|
|
1683
|
+
C(m, {
|
|
1668
1684
|
modelValue: e.state.checkAll,
|
|
1669
1685
|
"onUpdate:modelValue": t[1] || (t[1] = (a) => e.state.checkAll = a),
|
|
1670
1686
|
class: "tvp-search-box__checkbox"
|
|
1671
1687
|
}, {
|
|
1672
|
-
default:
|
|
1673
|
-
|
|
1674
|
-
default:
|
|
1675
|
-
|
|
1688
|
+
default: M(() => [
|
|
1689
|
+
C(b, { class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item" }, {
|
|
1690
|
+
default: M(() => [
|
|
1691
|
+
C(v, {
|
|
1676
1692
|
modelValue: e.state.checkAll,
|
|
1677
1693
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.state.checkAll = a),
|
|
1678
1694
|
indeterminate: e.state.isIndeterminate
|
|
1679
1695
|
}, {
|
|
1680
|
-
default:
|
|
1681
|
-
K(
|
|
1696
|
+
default: M(() => [
|
|
1697
|
+
K(I(e.t("tvp.tvpSearchbox.selectAll")), 1)
|
|
1682
1698
|
]),
|
|
1683
1699
|
_: 1
|
|
1684
1700
|
}, 8, ["modelValue", "indeterminate"])
|
|
@@ -1688,24 +1704,24 @@ function mn(e, t, o, l, c, i) {
|
|
|
1688
1704
|
]),
|
|
1689
1705
|
_: 1
|
|
1690
1706
|
}, 8, ["modelValue"]),
|
|
1691
|
-
|
|
1707
|
+
C(m, {
|
|
1692
1708
|
modelValue: e.state.checkboxGroup,
|
|
1693
1709
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => e.state.checkboxGroup = a),
|
|
1694
1710
|
class: "tvp-search-box__checkbox"
|
|
1695
1711
|
}, {
|
|
1696
|
-
default:
|
|
1697
|
-
(y(!0),
|
|
1698
|
-
key: (a.field || a.label) +
|
|
1712
|
+
default: M(() => [
|
|
1713
|
+
(y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
|
|
1714
|
+
key: (a.field || a.label) + h,
|
|
1699
1715
|
class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
|
|
1700
1716
|
}, {
|
|
1701
|
-
default:
|
|
1702
|
-
|
|
1717
|
+
default: M(() => [
|
|
1718
|
+
C(v, {
|
|
1703
1719
|
label: e.state.prevItem.label + a.label,
|
|
1704
1720
|
title: a.label,
|
|
1705
1721
|
class: "tvp-search-box__checkbox-item-label"
|
|
1706
1722
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
K(
|
|
1723
|
+
default: M(() => [
|
|
1724
|
+
K(I(a.label), 1)
|
|
1709
1725
|
]),
|
|
1710
1726
|
_: 2
|
|
1711
1727
|
}, 1032, ["label", "title"])
|
|
@@ -1718,40 +1734,40 @@ function mn(e, t, o, l, c, i) {
|
|
|
1718
1734
|
_: 1
|
|
1719
1735
|
}, 8, ["modelValue"])
|
|
1720
1736
|
]),
|
|
1721
|
-
|
|
1722
|
-
|
|
1737
|
+
D("div", qo, [
|
|
1738
|
+
C(p, {
|
|
1723
1739
|
size: "mini",
|
|
1724
1740
|
onClick: t[3] || (t[3] = (a) => e.selectCheckbox(!1))
|
|
1725
1741
|
}, {
|
|
1726
|
-
default:
|
|
1727
|
-
K(
|
|
1742
|
+
default: M(() => [
|
|
1743
|
+
K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
|
|
1728
1744
|
]),
|
|
1729
1745
|
_: 1
|
|
1730
1746
|
}),
|
|
1731
|
-
|
|
1747
|
+
C(p, {
|
|
1732
1748
|
size: "mini",
|
|
1733
1749
|
onClick: t[4] || (t[4] = (a) => e.selectCheckbox(!0))
|
|
1734
1750
|
}, {
|
|
1735
|
-
default:
|
|
1736
|
-
K(
|
|
1751
|
+
default: M(() => [
|
|
1752
|
+
K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
|
|
1737
1753
|
]),
|
|
1738
1754
|
_: 1
|
|
1739
1755
|
})
|
|
1740
1756
|
])
|
|
1741
|
-
])) :
|
|
1757
|
+
])) : z("", !0)
|
|
1742
1758
|
], 2)), [
|
|
1743
|
-
[
|
|
1744
|
-
]) : e.state.prevItem.type === "numRange" ? (y(),
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1759
|
+
[u, e.isLoading]
|
|
1760
|
+
]) : e.state.prevItem.type === "numRange" ? (y(), w("div", Zo, [
|
|
1761
|
+
D("div", Yo, [
|
|
1762
|
+
D("div", Qo, I(e.t("tvp.tvpSearchbox.rangeNumberTitle")), 1),
|
|
1763
|
+
D("div", Wo, I(e.t("tvp.tvpSearchbox.minValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
|
|
1764
|
+
C(n, {
|
|
1749
1765
|
prop: e.state.curMinNumVar,
|
|
1750
1766
|
class: "tvp-search-box__number-item",
|
|
1751
1767
|
"show-message": e.state.numberShowMessage
|
|
1752
1768
|
}, {
|
|
1753
|
-
default:
|
|
1754
|
-
|
|
1769
|
+
default: M(() => [
|
|
1770
|
+
C(r, {
|
|
1755
1771
|
modelValue: e.state[e.state.curMinNumVar],
|
|
1756
1772
|
"onUpdate:modelValue": t[5] || (t[5] = (a) => e.state[e.state.curMinNumVar] = a),
|
|
1757
1773
|
type: "number",
|
|
@@ -1760,13 +1776,13 @@ function mn(e, t, o, l, c, i) {
|
|
|
1760
1776
|
]),
|
|
1761
1777
|
_: 1
|
|
1762
1778
|
}, 8, ["prop", "show-message"]),
|
|
1763
|
-
|
|
1764
|
-
|
|
1779
|
+
D("div", Jo, I(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
|
|
1780
|
+
C(n, {
|
|
1765
1781
|
prop: e.state.curMaxNumVar,
|
|
1766
1782
|
class: "tvp-search-box__number-item"
|
|
1767
1783
|
}, {
|
|
1768
|
-
default:
|
|
1769
|
-
|
|
1784
|
+
default: M(() => [
|
|
1785
|
+
C(r, {
|
|
1770
1786
|
modelValue: e.state[e.state.curMaxNumVar],
|
|
1771
1787
|
"onUpdate:modelValue": t[6] || (t[6] = (a) => e.state[e.state.curMaxNumVar] = a),
|
|
1772
1788
|
type: "number",
|
|
@@ -1776,39 +1792,39 @@ function mn(e, t, o, l, c, i) {
|
|
|
1776
1792
|
_: 1
|
|
1777
1793
|
}, 8, ["prop"])
|
|
1778
1794
|
]),
|
|
1779
|
-
|
|
1780
|
-
|
|
1795
|
+
D("div", Xo, [
|
|
1796
|
+
C(p, {
|
|
1781
1797
|
size: "mini",
|
|
1782
1798
|
onClick: t[7] || (t[7] = (a) => e.sizeChange(!1))
|
|
1783
1799
|
}, {
|
|
1784
|
-
default:
|
|
1785
|
-
K(
|
|
1800
|
+
default: M(() => [
|
|
1801
|
+
K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
|
|
1786
1802
|
]),
|
|
1787
1803
|
_: 1
|
|
1788
1804
|
}),
|
|
1789
|
-
|
|
1805
|
+
C(p, {
|
|
1790
1806
|
size: "mini",
|
|
1791
|
-
onClick: t[8] || (t[8] =
|
|
1807
|
+
onClick: t[8] || (t[8] = Y((a) => e.sizeChange(!0), ["stop"]))
|
|
1792
1808
|
}, {
|
|
1793
|
-
default:
|
|
1794
|
-
K(
|
|
1809
|
+
default: M(() => [
|
|
1810
|
+
K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
|
|
1795
1811
|
]),
|
|
1796
1812
|
_: 1
|
|
1797
1813
|
})
|
|
1798
1814
|
])
|
|
1799
|
-
])) : e.state.prevItem.type === "dateRange" ? (y(),
|
|
1800
|
-
|
|
1801
|
-
|
|
1815
|
+
])) : e.state.prevItem.type === "dateRange" ? (y(), w("div", en, [
|
|
1816
|
+
D("div", tn, [
|
|
1817
|
+
D("div", on, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
|
|
1802
1818
|
value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
|
|
1803
1819
|
}) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
|
|
1804
|
-
|
|
1805
|
-
|
|
1820
|
+
D("div", nn, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
|
|
1821
|
+
C(n, {
|
|
1806
1822
|
prop: "startDate",
|
|
1807
1823
|
"show-message": !!e.state.prevItem.maxTimeLength,
|
|
1808
1824
|
class: "tvp-search-box__date-item"
|
|
1809
1825
|
}, {
|
|
1810
|
-
default:
|
|
1811
|
-
|
|
1826
|
+
default: M(() => [
|
|
1827
|
+
C(d, {
|
|
1812
1828
|
modelValue: e.state.startDate,
|
|
1813
1829
|
"onUpdate:modelValue": t[9] || (t[9] = (a) => e.state.startDate = a),
|
|
1814
1830
|
format: e.state.prevItem.format || e.state.dateRangeFormat,
|
|
@@ -1820,13 +1836,13 @@ function mn(e, t, o, l, c, i) {
|
|
|
1820
1836
|
]),
|
|
1821
1837
|
_: 1
|
|
1822
1838
|
}, 8, ["show-message"]),
|
|
1823
|
-
|
|
1824
|
-
|
|
1839
|
+
D("div", ln, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
|
|
1840
|
+
C(n, {
|
|
1825
1841
|
prop: "endDate",
|
|
1826
1842
|
class: "tvp-search-box__date-item"
|
|
1827
1843
|
}, {
|
|
1828
|
-
default:
|
|
1829
|
-
|
|
1844
|
+
default: M(() => [
|
|
1845
|
+
C(d, {
|
|
1830
1846
|
modelValue: e.state.endDate,
|
|
1831
1847
|
"onUpdate:modelValue": t[10] || (t[10] = (a) => e.state.endDate = a),
|
|
1832
1848
|
format: e.state.prevItem.format || e.state.dateRangeFormat,
|
|
@@ -1840,39 +1856,39 @@ function mn(e, t, o, l, c, i) {
|
|
|
1840
1856
|
_: 1
|
|
1841
1857
|
})
|
|
1842
1858
|
]),
|
|
1843
|
-
|
|
1844
|
-
|
|
1859
|
+
D("div", an, [
|
|
1860
|
+
C(p, {
|
|
1845
1861
|
size: "mini",
|
|
1846
1862
|
onClick: t[11] || (t[11] = (a) => e.onConfirmDate(!1))
|
|
1847
1863
|
}, {
|
|
1848
|
-
default:
|
|
1849
|
-
K(
|
|
1864
|
+
default: M(() => [
|
|
1865
|
+
K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
|
|
1850
1866
|
]),
|
|
1851
1867
|
_: 1
|
|
1852
1868
|
}),
|
|
1853
|
-
|
|
1869
|
+
C(p, {
|
|
1854
1870
|
size: "mini",
|
|
1855
1871
|
onClick: t[12] || (t[12] = (a) => e.onConfirmDate(!0))
|
|
1856
1872
|
}, {
|
|
1857
|
-
default:
|
|
1858
|
-
K(
|
|
1873
|
+
default: M(() => [
|
|
1874
|
+
K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
|
|
1859
1875
|
]),
|
|
1860
1876
|
_: 1
|
|
1861
1877
|
})
|
|
1862
1878
|
])
|
|
1863
|
-
])) : e.state.prevItem.type === "datetimeRange" ? (y(),
|
|
1864
|
-
|
|
1865
|
-
|
|
1879
|
+
])) : e.state.prevItem.type === "datetimeRange" ? (y(), w("div", rn, [
|
|
1880
|
+
D("div", sn, [
|
|
1881
|
+
D("div", pn, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
|
|
1866
1882
|
value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
|
|
1867
1883
|
}) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
|
|
1868
|
-
|
|
1869
|
-
|
|
1884
|
+
D("div", un, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
|
|
1885
|
+
C(n, {
|
|
1870
1886
|
prop: "startDateTime",
|
|
1871
1887
|
"show-message": !!e.state.prevItem.maxTimeLength,
|
|
1872
1888
|
class: "tvp-search-box__date-item"
|
|
1873
1889
|
}, {
|
|
1874
|
-
default:
|
|
1875
|
-
|
|
1890
|
+
default: M(() => [
|
|
1891
|
+
C(d, {
|
|
1876
1892
|
modelValue: e.state.startDateTime,
|
|
1877
1893
|
"onUpdate:modelValue": t[13] || (t[13] = (a) => e.state.startDateTime = a),
|
|
1878
1894
|
type: "datetime",
|
|
@@ -1887,13 +1903,13 @@ function mn(e, t, o, l, c, i) {
|
|
|
1887
1903
|
]),
|
|
1888
1904
|
_: 1
|
|
1889
1905
|
}, 8, ["show-message"]),
|
|
1890
|
-
|
|
1891
|
-
|
|
1906
|
+
D("div", cn, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
|
|
1907
|
+
C(n, {
|
|
1892
1908
|
prop: "endDateTime",
|
|
1893
1909
|
class: "tvp-search-box__date-item"
|
|
1894
1910
|
}, {
|
|
1895
|
-
default:
|
|
1896
|
-
|
|
1911
|
+
default: M(() => [
|
|
1912
|
+
C(d, {
|
|
1897
1913
|
modelValue: e.state.endDateTime,
|
|
1898
1914
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e.state.endDateTime = a),
|
|
1899
1915
|
type: "datetime",
|
|
@@ -1909,57 +1925,57 @@ function mn(e, t, o, l, c, i) {
|
|
|
1909
1925
|
_: 1
|
|
1910
1926
|
})
|
|
1911
1927
|
]),
|
|
1912
|
-
|
|
1913
|
-
|
|
1928
|
+
D("div", dn, [
|
|
1929
|
+
C(p, {
|
|
1914
1930
|
size: "mini",
|
|
1915
1931
|
onClick: t[15] || (t[15] = (a) => e.onConfirmDate(!1, !0))
|
|
1916
1932
|
}, {
|
|
1917
|
-
default:
|
|
1918
|
-
K(
|
|
1933
|
+
default: M(() => [
|
|
1934
|
+
K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
|
|
1919
1935
|
]),
|
|
1920
1936
|
_: 1
|
|
1921
1937
|
}),
|
|
1922
|
-
|
|
1938
|
+
C(p, {
|
|
1923
1939
|
size: "mini",
|
|
1924
1940
|
onClick: t[16] || (t[16] = (a) => e.onConfirmDate(!0, !0))
|
|
1925
1941
|
}, {
|
|
1926
|
-
default:
|
|
1927
|
-
K(
|
|
1942
|
+
default: M(() => [
|
|
1943
|
+
K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
|
|
1928
1944
|
]),
|
|
1929
1945
|
_: 1
|
|
1930
1946
|
})
|
|
1931
1947
|
])
|
|
1932
|
-
])) : e.state.prevItem.type === "map" ?
|
|
1933
|
-
e.state.isShowTagKey ? (y(),
|
|
1934
|
-
(y(!0),
|
|
1935
|
-
key: a.label + a.value +
|
|
1948
|
+
])) : e.state.prevItem.type === "map" ? H((y(), w("div", mn, [
|
|
1949
|
+
e.state.isShowTagKey ? (y(), w("span", fn, I(e.t("tvp.tvpSearchbox.tagKey")), 1)) : (y(), w("span", hn, I(e.t("tvp.tvpSearchbox.tagValue")), 1)),
|
|
1950
|
+
(y(!0), w(x, null, U(e.state.backupList, (a, h) => H((y(), F(b, {
|
|
1951
|
+
key: a.label + a.value + h,
|
|
1936
1952
|
disabled: a.isChecked,
|
|
1937
1953
|
class: "tvp-search-box__dropdown-item",
|
|
1938
1954
|
"item-data": a,
|
|
1939
1955
|
onItemClick: () => e.selectFirstMap(a, e.state.isShowTagKey)
|
|
1940
1956
|
}, {
|
|
1941
|
-
default:
|
|
1942
|
-
|
|
1957
|
+
default: M(() => [
|
|
1958
|
+
D("span", {
|
|
1943
1959
|
title: a.label
|
|
1944
|
-
},
|
|
1960
|
+
}, I(a.label), 9, bn)
|
|
1945
1961
|
]),
|
|
1946
1962
|
_: 2
|
|
1947
1963
|
}, 1032, ["disabled", "item-data", "onItemClick"])), [
|
|
1948
1964
|
[G, !a.isFilter]
|
|
1949
1965
|
])), 128))
|
|
1950
1966
|
])), [
|
|
1951
|
-
[
|
|
1952
|
-
]) :
|
|
1967
|
+
[u, e.isLoading]
|
|
1968
|
+
]) : z("", !0)
|
|
1953
1969
|
]);
|
|
1954
1970
|
}
|
|
1955
|
-
const
|
|
1956
|
-
const
|
|
1971
|
+
const gn = /* @__PURE__ */ Ne(Fo, [["render", vn]]);
|
|
1972
|
+
const yn = ve({
|
|
1957
1973
|
model: {
|
|
1958
1974
|
prop: "modelValue",
|
|
1959
1975
|
event: "update:modelValue"
|
|
1960
1976
|
},
|
|
1961
1977
|
props: {
|
|
1962
|
-
...
|
|
1978
|
+
...ge,
|
|
1963
1979
|
tiny_mode: {
|
|
1964
1980
|
type: String,
|
|
1965
1981
|
default: "pc"
|
|
@@ -1984,6 +2000,10 @@ const hn = be({
|
|
|
1984
2000
|
type: Boolean,
|
|
1985
2001
|
default: !0
|
|
1986
2002
|
},
|
|
2003
|
+
showPrefixIcon: {
|
|
2004
|
+
type: Boolean,
|
|
2005
|
+
default: !0
|
|
2006
|
+
},
|
|
1987
2007
|
idMapKey: {
|
|
1988
2008
|
type: String,
|
|
1989
2009
|
default: "id"
|
|
@@ -2008,80 +2028,91 @@ const hn = be({
|
|
|
2008
2028
|
type: String,
|
|
2009
2029
|
default: ","
|
|
2010
2030
|
},
|
|
2031
|
+
appendToBody: {
|
|
2032
|
+
type: Boolean,
|
|
2033
|
+
default: !0
|
|
2034
|
+
},
|
|
2011
2035
|
// 尺寸
|
|
2012
2036
|
size: {
|
|
2013
2037
|
type: String,
|
|
2014
2038
|
default: ""
|
|
2015
2039
|
}
|
|
2016
2040
|
},
|
|
2017
|
-
emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "clear"],
|
|
2041
|
+
emits: ["update:modelValue", "change", "search", "exceed", "first-level-select", "second-level-enter", "clear"],
|
|
2018
2042
|
components: {
|
|
2019
|
-
TinyTag:
|
|
2020
|
-
TinyInput:
|
|
2021
|
-
TinyDropdown:
|
|
2022
|
-
TinyDropdownMenu:
|
|
2023
|
-
TinyButton:
|
|
2024
|
-
TinyTooltip:
|
|
2025
|
-
TinyDatePicker:
|
|
2026
|
-
TinyForm:
|
|
2027
|
-
TinyFormItem:
|
|
2028
|
-
TinyPopover:
|
|
2029
|
-
TinySelect:
|
|
2030
|
-
TinyOption:
|
|
2031
|
-
TinySearchBoxFirstLevelPanel:
|
|
2032
|
-
TinySearchBoxSecondLevelPanel:
|
|
2043
|
+
TinyTag: ot,
|
|
2044
|
+
TinyInput: Fe,
|
|
2045
|
+
TinyDropdown: nt,
|
|
2046
|
+
TinyDropdownMenu: lt,
|
|
2047
|
+
TinyButton: Be,
|
|
2048
|
+
TinyTooltip: at,
|
|
2049
|
+
TinyDatePicker: xe,
|
|
2050
|
+
TinyForm: rt,
|
|
2051
|
+
TinyFormItem: Ae,
|
|
2052
|
+
TinyPopover: st,
|
|
2053
|
+
TinySelect: it,
|
|
2054
|
+
TinyOption: pt,
|
|
2055
|
+
TinySearchBoxFirstLevelPanel: No,
|
|
2056
|
+
TinySearchBoxSecondLevelPanel: gn,
|
|
2033
2057
|
// 图标组件
|
|
2034
|
-
TinyIconSearch:
|
|
2035
|
-
TinyIconClose:
|
|
2036
|
-
TinyIconHelpQuery:
|
|
2058
|
+
TinyIconSearch: ut(),
|
|
2059
|
+
TinyIconClose: ct(),
|
|
2060
|
+
TinyIconHelpQuery: dt()
|
|
2037
2061
|
},
|
|
2038
2062
|
setup(e, t) {
|
|
2039
|
-
return
|
|
2063
|
+
return Le({ props: e, context: t, renderless: co, api: po });
|
|
2040
2064
|
}
|
|
2041
|
-
}),
|
|
2042
|
-
key:
|
|
2065
|
+
}), Vn = { class: "tvp-search-box__tag-value" }, In = {
|
|
2066
|
+
key: 1,
|
|
2043
2067
|
class: "tvp-search-box__placeholder"
|
|
2044
|
-
},
|
|
2068
|
+
}, kn = { class: "tvp-search-box__input-wrapper" }, wn = { class: "tvp-search-box__prop" }, Tn = { class: "tvp-search-box__input-separator" }, Sn = { class: "tvp-search-box__date-wrap" }, Dn = { class: "tvp-search-box__dropdown-start" }, Cn = {
|
|
2045
2069
|
key: 0,
|
|
2046
2070
|
class: "tvp-search-box__dropdown-end"
|
|
2047
|
-
},
|
|
2071
|
+
}, Mn = {
|
|
2048
2072
|
key: 2,
|
|
2049
2073
|
class: "tvp-search-box__dropdown-end"
|
|
2050
|
-
},
|
|
2074
|
+
}, En = {
|
|
2051
2075
|
key: 4,
|
|
2052
2076
|
class: "tvp-search-box__number"
|
|
2053
|
-
},
|
|
2077
|
+
}, $n = { class: "tvp-search-box__dropdown-start" }, Ln = { class: "tvp-search-box__dropdown-end" }, _n = {
|
|
2054
2078
|
key: 5,
|
|
2055
2079
|
class: "tvp-search-box__date-wrap"
|
|
2056
|
-
},
|
|
2080
|
+
}, Rn = { class: "tvp-search-box__dropdown-title" }, Nn = { class: "tvp-search-box__dropdown-start" }, Pn = { class: "tvp-search-box__dropdown-end" }, On = {
|
|
2057
2081
|
key: 6,
|
|
2058
2082
|
class: "tvp-search-box__date-wrap"
|
|
2059
|
-
},
|
|
2083
|
+
}, Fn = { class: "tvp-search-box__dropdown-title" }, Bn = { class: "tvp-search-box__dropdown-start" }, xn = { class: "tvp-search-box__dropdown-end" }, An = { class: "tvp-search-box__bottom-btn" }, zn = {
|
|
2060
2084
|
key: 1,
|
|
2061
2085
|
class: "tvp-search-box__panel-box"
|
|
2062
2086
|
};
|
|
2063
|
-
function
|
|
2064
|
-
const b = N("tiny-icon-search"), v = N("tiny-tag"),
|
|
2065
|
-
return y(),
|
|
2066
|
-
class: he([
|
|
2067
|
-
|
|
2087
|
+
function Un(e, t, o, l, c, i) {
|
|
2088
|
+
const b = N("tiny-icon-search"), v = N("tiny-tag"), m = N("tiny-icon-close"), p = N("tiny-icon-help-query"), r = N("tiny-tooltip"), n = N("tiny-input"), d = N("TinySearchBoxFirstLevelPanel"), u = N("TinySearchBoxSecondLevelPanel"), s = N("tiny-popover"), a = N("tiny-option"), h = N("tiny-select"), g = N("tiny-form-item"), T = N("tiny-date-picker"), $ = N("tiny-button"), V = N("tiny-form");
|
|
2089
|
+
return y(), w("div", {
|
|
2090
|
+
class: he([
|
|
2091
|
+
"tvp-search-box",
|
|
2092
|
+
e.size === "small" ? "tvp-search-box--small" : "",
|
|
2093
|
+
e.showPrefixIcon ? "" : "hide-prefix-icon"
|
|
2094
|
+
]),
|
|
2095
|
+
onClick: t[21] || (t[21] = Y((f) => e.showPopover(e.state, !1), ["stop"]))
|
|
2068
2096
|
}, [
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2097
|
+
e.showPrefixIcon ? (y(), F(b, {
|
|
2098
|
+
key: 0,
|
|
2099
|
+
class: "tvp-search-box__prefix"
|
|
2100
|
+
})) : z("", !0),
|
|
2101
|
+
(y(!0), w(x, null, U(e.modelValue, (f, S) => (y(), F(v, {
|
|
2102
|
+
key: f.field + S,
|
|
2072
2103
|
closable: "",
|
|
2073
|
-
class: he(["tvp-search-box__tag", e.editable &&
|
|
2074
|
-
title: `${
|
|
2075
|
-
onClose: (
|
|
2076
|
-
onClick:
|
|
2104
|
+
class: he(["tvp-search-box__tag", e.editable && f.type !== "map" ? "tvp-search-box__tag-editor" : ""]),
|
|
2105
|
+
title: `${f.label} ${f.operator || ":"} ${f.value}`,
|
|
2106
|
+
onClose: (k) => e.deleteTag(f),
|
|
2107
|
+
onClick: Y((k) => e.editTag(f, S, k), ["stop"])
|
|
2077
2108
|
}, {
|
|
2078
|
-
default:
|
|
2079
|
-
|
|
2109
|
+
default: M(() => [
|
|
2110
|
+
D("span", Vn, I(f.label) + " " + I(f.operator || ":") + " " + I(f.value), 1)
|
|
2080
2111
|
]),
|
|
2081
2112
|
_: 2
|
|
2082
2113
|
}, 1032, ["class", "title", "onClose", "onClick"]))), 128)),
|
|
2083
|
-
e.modelValue.length ? (y(),
|
|
2084
|
-
|
|
2114
|
+
e.modelValue.length ? (y(), w("span", In)) : z("", !0),
|
|
2115
|
+
C(V, {
|
|
2085
2116
|
ref: "formRef",
|
|
2086
2117
|
model: e.state,
|
|
2087
2118
|
rules: e.state.formRules,
|
|
@@ -2091,111 +2122,50 @@ function xn(e, t, o, l, c, i) {
|
|
|
2091
2122
|
"message-type": "block",
|
|
2092
2123
|
class: "tvp-search-box__form"
|
|
2093
2124
|
}, {
|
|
2094
|
-
default:
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2125
|
+
default: M(() => [
|
|
2126
|
+
D("div", kn, [
|
|
2127
|
+
D("section", wn, [
|
|
2128
|
+
H(D("span", null, I(e.state.propItem.label) + " " + I(`${e.state.operatorValue ? e.state.operatorValue : ""} `), 513), [
|
|
2098
2129
|
[G, e.state.propItem.label]
|
|
2099
2130
|
]),
|
|
2100
|
-
|
|
2131
|
+
H(D("span", null, I(e.state.propItem.value), 513), [
|
|
2101
2132
|
[G, e.state.propItem.value]
|
|
2102
2133
|
])
|
|
2103
2134
|
]),
|
|
2104
|
-
|
|
2135
|
+
C(s, {
|
|
2105
2136
|
ref: "dropdownRef",
|
|
2106
|
-
|
|
2107
|
-
"onUpdate:
|
|
2108
|
-
trigger: "
|
|
2137
|
+
modelValue: e.state.visible,
|
|
2138
|
+
"onUpdate:modelValue": t[5] || (t[5] = (f) => e.state.visible = f),
|
|
2139
|
+
trigger: "manual",
|
|
2140
|
+
placement: "bottom-start",
|
|
2109
2141
|
class: "tvp-search-box__dropdown",
|
|
2110
|
-
"
|
|
2111
|
-
|
|
2112
|
-
"
|
|
2113
|
-
"close-on-click-outside": !0
|
|
2142
|
+
"popper-class": "tvp-search-box__dropdown-menu",
|
|
2143
|
+
"visible-arrow": !1,
|
|
2144
|
+
"append-to-body": e.appendToBody
|
|
2114
2145
|
}, {
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
placement: "bottom-start",
|
|
2118
|
-
"popper-class": "tvp-search-box__dropdown-menu",
|
|
2119
|
-
style: ct({ "max-height": e.panelMaxHeight }),
|
|
2120
|
-
onMouseup: Z(() => {
|
|
2121
|
-
}, ["stop"])
|
|
2122
|
-
}, {
|
|
2123
|
-
default: C(() => {
|
|
2124
|
-
var h, $, w;
|
|
2125
|
-
return [
|
|
2126
|
-
j(M("div", null, [
|
|
2127
|
-
(h = e.state.instance) != null && h.slots["first-panel"] ? me(e.$slots, "first-panel", fe({ key: 0 }, {
|
|
2128
|
-
state: e.state,
|
|
2129
|
-
handleEvents: e.handleEvents
|
|
2130
|
-
}, {
|
|
2131
|
-
onClick: t[1] || (t[1] = Z(() => {
|
|
2132
|
-
}, ["stop"]))
|
|
2133
|
-
})) : (y(), F(f, {
|
|
2134
|
-
key: 1,
|
|
2135
|
-
state: e.state,
|
|
2136
|
-
handleEvents: e.handleEvents
|
|
2137
|
-
}, null, 8, ["state", "handleEvents"]))
|
|
2138
|
-
], 512), [
|
|
2139
|
-
[G, !e.state.propItem.label || (($ = e.state.inputValue) == null ? void 0 : $.trim())]
|
|
2140
|
-
]),
|
|
2141
|
-
j(M("div", null, [
|
|
2142
|
-
(w = e.state.instance) != null && w.slots["second-panel"] ? me(e.$slots, "second-panel", fe({ key: 0 }, {
|
|
2143
|
-
state: e.state,
|
|
2144
|
-
pickerOptions: e.pickerOptions,
|
|
2145
|
-
handleEvents: e.handleEvents,
|
|
2146
|
-
back: () => e.resetInput(e.state)
|
|
2147
|
-
}, {
|
|
2148
|
-
onClick: t[2] || (t[2] = Z(() => {
|
|
2149
|
-
}, ["stop"]))
|
|
2150
|
-
})) : e.state.prevItem.type !== "custom" ? (y(), F(s, {
|
|
2151
|
-
key: 1,
|
|
2152
|
-
state: e.state,
|
|
2153
|
-
"picker-options": e.pickerOptions,
|
|
2154
|
-
onEvents: e.handleEvents
|
|
2155
|
-
}, null, 8, ["state", "picker-options", "onEvents"])) : (y(), S("div", {
|
|
2156
|
-
key: 2,
|
|
2157
|
-
class: "tvp-search-box__panel-box",
|
|
2158
|
-
onClick: t[4] || (t[4] = (P) => e.showDropdown(e.state))
|
|
2159
|
-
}, [
|
|
2160
|
-
me(e.$slots, e.state.prevItem.slotName, fe({
|
|
2161
|
-
showDropdown: () => e.showDropdown(e.state),
|
|
2162
|
-
onConfirm: e.handleConfirm
|
|
2163
|
-
}, {
|
|
2164
|
-
onClick: t[3] || (t[3] = Z(() => {
|
|
2165
|
-
}, ["stop"]))
|
|
2166
|
-
}))
|
|
2167
|
-
]))
|
|
2168
|
-
], 512), [
|
|
2169
|
-
[G, e.state.propItem.label]
|
|
2170
|
-
])
|
|
2171
|
-
];
|
|
2172
|
-
}),
|
|
2173
|
-
_: 3
|
|
2174
|
-
}, 8, ["style"])
|
|
2175
|
-
]),
|
|
2176
|
-
default: C(() => [
|
|
2177
|
-
D(n, {
|
|
2146
|
+
reference: M(() => [
|
|
2147
|
+
C(n, {
|
|
2178
2148
|
ref: "inputRef",
|
|
2179
2149
|
modelValue: e.state.inputValue,
|
|
2180
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
2150
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => e.state.inputValue = f),
|
|
2181
2151
|
class: "tvp-search-box__input",
|
|
2182
2152
|
placeholder: e.state.placeholder,
|
|
2183
2153
|
maxlength: e.maxlength && e.maxlength + 1,
|
|
2184
2154
|
onKeydown: [
|
|
2185
|
-
|
|
2186
|
-
|
|
2155
|
+
Oe(Y(e.backspaceDeleteTag, ["stop"]), ["delete"]),
|
|
2156
|
+
Oe(Y(e.createTag, ["stop"]), ["enter"])
|
|
2187
2157
|
],
|
|
2188
2158
|
onInput: e.handleInput,
|
|
2189
2159
|
onClick: e.handleClick
|
|
2190
2160
|
}, {
|
|
2191
|
-
suffix:
|
|
2192
|
-
|
|
2161
|
+
suffix: M(() => [
|
|
2162
|
+
H(C(m, {
|
|
2193
2163
|
class: "tvp-search-box__input-close",
|
|
2194
|
-
onClick:
|
|
2164
|
+
onClick: Y(e.clearTag, ["stop"])
|
|
2195
2165
|
}, null, 8, ["onClick"]), [
|
|
2196
2166
|
[G, e.isShowClose]
|
|
2197
2167
|
]),
|
|
2198
|
-
|
|
2168
|
+
H(D("span", Tn, null, 512), [
|
|
2199
2169
|
[G, e.isShowClose]
|
|
2200
2170
|
]),
|
|
2201
2171
|
e.showHelp ? (y(), F(r, {
|
|
@@ -2204,65 +2174,120 @@ function xn(e, t, o, l, c, i) {
|
|
|
2204
2174
|
content: e.t("tvp.tvpSearchbox.help"),
|
|
2205
2175
|
placement: "top"
|
|
2206
2176
|
}, {
|
|
2207
|
-
default:
|
|
2208
|
-
|
|
2177
|
+
default: M(() => [
|
|
2178
|
+
C(p, {
|
|
2209
2179
|
class: "tvp-search-box__input-help",
|
|
2210
|
-
onClick:
|
|
2180
|
+
onClick: Y(e.helpClick, ["stop"])
|
|
2211
2181
|
}, null, 8, ["onClick"])
|
|
2212
2182
|
]),
|
|
2213
2183
|
_: 1
|
|
2214
|
-
}, 8, ["content"])) :
|
|
2215
|
-
|
|
2184
|
+
}, 8, ["content"])) : z("", !0),
|
|
2185
|
+
C(b, {
|
|
2216
2186
|
class: "tvp-search-box__input-search",
|
|
2217
|
-
onClick:
|
|
2187
|
+
onClick: Y(e.createTag, ["stop"])
|
|
2218
2188
|
}, null, 8, ["onClick"])
|
|
2219
2189
|
]),
|
|
2220
2190
|
_: 1
|
|
2221
2191
|
}, 8, ["modelValue", "placeholder", "maxlength", "onKeydown", "onInput", "onClick"])
|
|
2222
2192
|
]),
|
|
2193
|
+
default: M(() => {
|
|
2194
|
+
var f, S, k;
|
|
2195
|
+
return [
|
|
2196
|
+
D("div", {
|
|
2197
|
+
class: "tvp-search-box__dropdown",
|
|
2198
|
+
style: ft({ "max-height": e.panelMaxHeight }),
|
|
2199
|
+
onMouseup: Y(() => {
|
|
2200
|
+
}, ["stop"])
|
|
2201
|
+
}, [
|
|
2202
|
+
H(D("div", null, [
|
|
2203
|
+
(f = e.state.instance) != null && f.slots["first-panel"] ? me(e.$slots, "first-panel", fe({ key: 0 }, {
|
|
2204
|
+
state: e.state,
|
|
2205
|
+
handleEvents: e.handleEvents
|
|
2206
|
+
}, {
|
|
2207
|
+
onClick: t[1] || (t[1] = Y(() => {
|
|
2208
|
+
}, ["stop"]))
|
|
2209
|
+
})) : (y(), F(d, {
|
|
2210
|
+
key: 1,
|
|
2211
|
+
state: e.state,
|
|
2212
|
+
handleEvents: e.handleEvents
|
|
2213
|
+
}, null, 8, ["state", "handleEvents"]))
|
|
2214
|
+
], 512), [
|
|
2215
|
+
[G, !e.state.propItem.label || ((S = e.state.inputValue) == null ? void 0 : S.trim())]
|
|
2216
|
+
]),
|
|
2217
|
+
H(D("div", null, [
|
|
2218
|
+
(k = e.state.instance) != null && k.slots["second-panel"] ? me(e.$slots, "second-panel", fe({ key: 0 }, {
|
|
2219
|
+
state: e.state,
|
|
2220
|
+
pickerOptions: e.pickerOptions,
|
|
2221
|
+
handleEvents: e.handleEvents,
|
|
2222
|
+
back: () => e.resetInput(e.state)
|
|
2223
|
+
}, {
|
|
2224
|
+
onClick: t[2] || (t[2] = Y(() => {
|
|
2225
|
+
}, ["stop"]))
|
|
2226
|
+
})) : e.state.prevItem.type !== "custom" ? (y(), F(u, {
|
|
2227
|
+
key: 1,
|
|
2228
|
+
state: e.state,
|
|
2229
|
+
"picker-options": e.pickerOptions,
|
|
2230
|
+
onEvents: e.handleEvents
|
|
2231
|
+
}, null, 8, ["state", "picker-options", "onEvents"])) : (y(), w("div", {
|
|
2232
|
+
key: 2,
|
|
2233
|
+
class: "tvp-search-box__panel-box",
|
|
2234
|
+
onClick: t[4] || (t[4] = (_) => e.showDropdown(e.state))
|
|
2235
|
+
}, [
|
|
2236
|
+
me(e.$slots, e.state.prevItem.slotName, fe({
|
|
2237
|
+
showDropdown: () => e.showDropdown(e.state),
|
|
2238
|
+
onConfirm: e.handleConfirm
|
|
2239
|
+
}, {
|
|
2240
|
+
onClick: t[3] || (t[3] = Y(() => {
|
|
2241
|
+
}, ["stop"]))
|
|
2242
|
+
}))
|
|
2243
|
+
]))
|
|
2244
|
+
], 512), [
|
|
2245
|
+
[G, e.state.propItem.label]
|
|
2246
|
+
])
|
|
2247
|
+
], 36)
|
|
2248
|
+
];
|
|
2249
|
+
}),
|
|
2223
2250
|
_: 3
|
|
2224
|
-
}, 8, ["
|
|
2251
|
+
}, 8, ["modelValue", "append-to-body"])
|
|
2225
2252
|
]),
|
|
2226
|
-
e.editable ? (y(), F(
|
|
2253
|
+
e.editable ? (y(), F(s, {
|
|
2227
2254
|
key: 0,
|
|
2228
2255
|
ref: "popoverRef",
|
|
2229
2256
|
modelValue: e.state.popoverVisible,
|
|
2230
|
-
"onUpdate:modelValue": t[20] || (t[20] = (
|
|
2257
|
+
"onUpdate:modelValue": t[20] || (t[20] = (f) => e.state.popoverVisible = f),
|
|
2231
2258
|
placement: "bottom-start",
|
|
2232
2259
|
"visible-arrow": !1,
|
|
2233
2260
|
trigger: "manual",
|
|
2234
2261
|
"popper-class": "tvp-search-box__popover",
|
|
2235
|
-
class: "tvp-search-box__form-popover"
|
|
2262
|
+
class: "tvp-search-box__form-popover",
|
|
2263
|
+
"append-to-body": e.appendToBody
|
|
2236
2264
|
}, {
|
|
2237
|
-
default:
|
|
2238
|
-
e.state.prevItem.type !== "custom" ? (y(),
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
default:
|
|
2243
|
-
|
|
2265
|
+
default: M(() => [
|
|
2266
|
+
e.state.prevItem.type !== "custom" ? (y(), w(x, { key: 0 }, [
|
|
2267
|
+
D("div", Sn, [
|
|
2268
|
+
D("div", Dn, I(e.t("tvp.tvpSearchbox.attributeType")), 1),
|
|
2269
|
+
C(g, { class: "tvp-search-box__number-item" }, {
|
|
2270
|
+
default: M(() => [
|
|
2271
|
+
C(h, {
|
|
2244
2272
|
modelValue: e.state.selectValue,
|
|
2245
|
-
"onUpdate:modelValue": t[7] || (t[7] = (
|
|
2273
|
+
"onUpdate:modelValue": t[7] || (t[7] = (f) => e.state.selectValue = f),
|
|
2246
2274
|
searchable: "",
|
|
2247
2275
|
disabled: e.state.prevItem.editAttrDisabled
|
|
2248
2276
|
}, {
|
|
2249
|
-
default:
|
|
2250
|
-
(y(), F(
|
|
2277
|
+
default: M(() => [
|
|
2278
|
+
(y(), F(a, {
|
|
2251
2279
|
key: e.state.allTypeAttri.label,
|
|
2252
2280
|
label: e.t("tvp.tvpSearchbox.allProperty"),
|
|
2253
2281
|
value: e.state.allTypeAttri.label,
|
|
2254
2282
|
disabled: e.selectItemIsDisable(e.state.allTypeAttri),
|
|
2255
|
-
onClick: t[6] || (t[6] = (
|
|
2256
|
-
e.state.allTypeAttri,
|
|
2257
|
-
e.selectItemIsDisable(e.state.allTypeAttri)
|
|
2258
|
-
))
|
|
2283
|
+
onClick: t[6] || (t[6] = (f) => e.selectPropChange(e.state.allTypeAttri, e.selectItemIsDisable(e.state.allTypeAttri)))
|
|
2259
2284
|
}, null, 8, ["label", "value", "disabled"])),
|
|
2260
|
-
(y(!0),
|
|
2261
|
-
key:
|
|
2262
|
-
label:
|
|
2263
|
-
value:
|
|
2264
|
-
disabled: e.selectItemIsDisable(
|
|
2265
|
-
onClick: (
|
|
2285
|
+
(y(!0), w(x, null, U(e.state.recordItems, (f) => (y(), F(a, {
|
|
2286
|
+
key: f.label,
|
|
2287
|
+
label: f.label,
|
|
2288
|
+
value: f.label,
|
|
2289
|
+
disabled: e.selectItemIsDisable(f),
|
|
2290
|
+
onClick: (S) => e.selectPropChange(f, e.selectItemIsDisable(f))
|
|
2266
2291
|
}, null, 8, ["label", "value", "disabled", "onClick"]))), 128))
|
|
2267
2292
|
]),
|
|
2268
2293
|
_: 1
|
|
@@ -2270,113 +2295,113 @@ function xn(e, t, o, l, c, i) {
|
|
|
2270
2295
|
]),
|
|
2271
2296
|
_: 1
|
|
2272
2297
|
}),
|
|
2273
|
-
e.state.prevItem.operators ? (y(),
|
|
2274
|
-
e.state.prevItem.operators ? (y(), F(
|
|
2298
|
+
e.state.prevItem.operators ? (y(), w("div", Cn, I(e.t("tvp.tvpSearchbox.operator")), 1)) : z("", !0),
|
|
2299
|
+
e.state.prevItem.operators ? (y(), F(g, {
|
|
2275
2300
|
key: 1,
|
|
2276
2301
|
class: "tvp-search-box__number-item"
|
|
2277
2302
|
}, {
|
|
2278
|
-
default:
|
|
2279
|
-
|
|
2303
|
+
default: M(() => [
|
|
2304
|
+
C(h, {
|
|
2280
2305
|
modelValue: e.state.operatorValue,
|
|
2281
|
-
"onUpdate:modelValue": t[8] || (t[8] = (
|
|
2306
|
+
"onUpdate:modelValue": t[8] || (t[8] = (f) => e.state.operatorValue = f)
|
|
2282
2307
|
}, {
|
|
2283
|
-
default:
|
|
2284
|
-
(y(!0),
|
|
2285
|
-
key:
|
|
2286
|
-
label:
|
|
2287
|
-
value:
|
|
2308
|
+
default: M(() => [
|
|
2309
|
+
(y(!0), w(x, null, U(e.state.currentOperators, (f) => (y(), F(a, {
|
|
2310
|
+
key: f,
|
|
2311
|
+
label: f,
|
|
2312
|
+
value: f
|
|
2288
2313
|
}, null, 8, ["label", "value"]))), 128))
|
|
2289
2314
|
]),
|
|
2290
2315
|
_: 1
|
|
2291
2316
|
}, 8, ["modelValue"])
|
|
2292
2317
|
]),
|
|
2293
2318
|
_: 1
|
|
2294
|
-
})) :
|
|
2295
|
-
e.state.prevItem.type !== "numRange" ? (y(),
|
|
2296
|
-
["numRange", "dateRange", "datetimeRange", "custom"].includes(e.state.prevItem.type) ?
|
|
2319
|
+
})) : z("", !0),
|
|
2320
|
+
e.state.prevItem.type !== "numRange" ? (y(), w("div", Mn, I(e.t("tvp.tvpSearchbox.tagValue")), 1)) : z("", !0),
|
|
2321
|
+
["numRange", "dateRange", "datetimeRange", "custom"].includes(e.state.prevItem.type) ? z("", !0) : (y(), F(g, {
|
|
2297
2322
|
key: 3,
|
|
2298
2323
|
prop: "inputEditValue",
|
|
2299
2324
|
class: "tvp-search-box__number-item"
|
|
2300
2325
|
}, {
|
|
2301
|
-
default:
|
|
2302
|
-
var
|
|
2326
|
+
default: M(() => {
|
|
2327
|
+
var f, S;
|
|
2303
2328
|
return [
|
|
2304
|
-
((
|
|
2329
|
+
((f = e.state.currentEditValue) == null ? void 0 : f.length) > 0 ? (y(), F(h, {
|
|
2305
2330
|
key: 0,
|
|
2306
2331
|
modelValue: e.state.inputEditValue,
|
|
2307
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
2332
|
+
"onUpdate:modelValue": t[9] || (t[9] = (k) => e.state.inputEditValue = k),
|
|
2308
2333
|
class: "tvp-search-box-select",
|
|
2309
2334
|
multiple: !!e.state.prevItem.mergeTag,
|
|
2310
|
-
"allow-create": (
|
|
2335
|
+
"allow-create": (S = e.state.prevItem) == null ? void 0 : S.allowCreate,
|
|
2311
2336
|
filterable: "",
|
|
2312
2337
|
"default-first-option": "",
|
|
2313
2338
|
clearable: ""
|
|
2314
2339
|
}, {
|
|
2315
|
-
default:
|
|
2316
|
-
(y(!0),
|
|
2317
|
-
key:
|
|
2318
|
-
label:
|
|
2319
|
-
value:
|
|
2340
|
+
default: M(() => [
|
|
2341
|
+
(y(!0), w(x, null, U(e.state.currentEditValue, (k) => (y(), F(a, {
|
|
2342
|
+
key: k.label,
|
|
2343
|
+
label: k.label,
|
|
2344
|
+
value: k.label
|
|
2320
2345
|
}, null, 8, ["label", "value"]))), 128))
|
|
2321
2346
|
]),
|
|
2322
2347
|
_: 1
|
|
2323
2348
|
}, 8, ["modelValue", "multiple", "allow-create"])) : (y(), F(n, {
|
|
2324
2349
|
key: 1,
|
|
2325
2350
|
modelValue: e.state.inputEditValue,
|
|
2326
|
-
"onUpdate:modelValue": t[10] || (t[10] = (
|
|
2351
|
+
"onUpdate:modelValue": t[10] || (t[10] = (k) => e.state.inputEditValue = k),
|
|
2327
2352
|
clearable: ""
|
|
2328
2353
|
}, null, 8, ["modelValue"]))
|
|
2329
2354
|
];
|
|
2330
2355
|
}),
|
|
2331
2356
|
_: 1
|
|
2332
2357
|
})),
|
|
2333
|
-
e.state.prevItem.type === "numRange" ? (y(),
|
|
2334
|
-
|
|
2335
|
-
|
|
2358
|
+
e.state.prevItem.type === "numRange" ? (y(), w("div", En, [
|
|
2359
|
+
D("div", $n, I(e.t("tvp.tvpSearchbox.minValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
|
|
2360
|
+
C(g, {
|
|
2336
2361
|
prop: e.state.curMinNumVar,
|
|
2337
2362
|
class: "tvp-search-box__number-item",
|
|
2338
2363
|
"show-message": e.state.numberShowMessage
|
|
2339
2364
|
}, {
|
|
2340
|
-
default:
|
|
2341
|
-
|
|
2365
|
+
default: M(() => [
|
|
2366
|
+
C(n, {
|
|
2342
2367
|
modelValue: e.state[e.state.curMinNumVar],
|
|
2343
|
-
"onUpdate:modelValue": t[11] || (t[11] = (
|
|
2368
|
+
"onUpdate:modelValue": t[11] || (t[11] = (f) => e.state[e.state.curMinNumVar] = f),
|
|
2344
2369
|
type: "number",
|
|
2345
2370
|
class: "tvp-search-box__number-input"
|
|
2346
2371
|
}, null, 8, ["modelValue"])
|
|
2347
2372
|
]),
|
|
2348
2373
|
_: 1
|
|
2349
2374
|
}, 8, ["prop", "show-message"]),
|
|
2350
|
-
|
|
2351
|
-
|
|
2375
|
+
D("div", Ln, I(e.t("tvp.tvpSearchbox.maxValueText")) + "(" + I(e.state.prevItem.unit) + ") ", 1),
|
|
2376
|
+
C(g, {
|
|
2352
2377
|
prop: e.state.curMaxNumVar,
|
|
2353
2378
|
class: "tvp-search-box__number-item"
|
|
2354
2379
|
}, {
|
|
2355
|
-
default:
|
|
2356
|
-
|
|
2380
|
+
default: M(() => [
|
|
2381
|
+
C(n, {
|
|
2357
2382
|
modelValue: e.state[e.state.curMaxNumVar],
|
|
2358
|
-
"onUpdate:modelValue": t[12] || (t[12] = (
|
|
2383
|
+
"onUpdate:modelValue": t[12] || (t[12] = (f) => e.state[e.state.curMaxNumVar] = f),
|
|
2359
2384
|
type: "number",
|
|
2360
2385
|
class: "tvp-search-box__number-input"
|
|
2361
2386
|
}, null, 8, ["modelValue"])
|
|
2362
2387
|
]),
|
|
2363
2388
|
_: 1
|
|
2364
2389
|
}, 8, ["prop"])
|
|
2365
|
-
])) :
|
|
2366
|
-
e.state.prevItem.type === "dateRange" ? (y(),
|
|
2367
|
-
|
|
2390
|
+
])) : z("", !0),
|
|
2391
|
+
e.state.prevItem.type === "dateRange" ? (y(), w("div", _n, [
|
|
2392
|
+
D("div", Rn, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
|
|
2368
2393
|
value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
|
|
2369
2394
|
}) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
|
|
2370
|
-
|
|
2371
|
-
|
|
2395
|
+
D("div", Nn, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
|
|
2396
|
+
C(g, {
|
|
2372
2397
|
prop: "startDate",
|
|
2373
2398
|
"show-message": !!e.state.prevItem.maxTimeLength,
|
|
2374
2399
|
class: "tvp-search-box__date-item"
|
|
2375
2400
|
}, {
|
|
2376
|
-
default:
|
|
2377
|
-
|
|
2401
|
+
default: M(() => [
|
|
2402
|
+
C(T, {
|
|
2378
2403
|
modelValue: e.state.startDate,
|
|
2379
|
-
"onUpdate:modelValue": t[13] || (t[13] = (
|
|
2404
|
+
"onUpdate:modelValue": t[13] || (t[13] = (f) => e.state.startDate = f),
|
|
2380
2405
|
format: e.state.prevItem.format || e.state.dateRangeFormat,
|
|
2381
2406
|
"value-format": e.state.prevItem.format || e.state.dateRangeFormat,
|
|
2382
2407
|
"picker-options": e.pickerOptions(e.state.startDate, "endDate"),
|
|
@@ -2385,15 +2410,15 @@ function xn(e, t, o, l, c, i) {
|
|
|
2385
2410
|
]),
|
|
2386
2411
|
_: 1
|
|
2387
2412
|
}, 8, ["show-message"]),
|
|
2388
|
-
|
|
2389
|
-
|
|
2413
|
+
D("div", Pn, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
|
|
2414
|
+
C(g, {
|
|
2390
2415
|
prop: "endDate",
|
|
2391
2416
|
class: "tvp-search-box__date-item"
|
|
2392
2417
|
}, {
|
|
2393
|
-
default:
|
|
2394
|
-
|
|
2418
|
+
default: M(() => [
|
|
2419
|
+
C(T, {
|
|
2395
2420
|
modelValue: e.state.endDate,
|
|
2396
|
-
"onUpdate:modelValue": t[14] || (t[14] = (
|
|
2421
|
+
"onUpdate:modelValue": t[14] || (t[14] = (f) => e.state.endDate = f),
|
|
2397
2422
|
format: e.state.prevItem.format || e.state.dateRangeFormat,
|
|
2398
2423
|
"value-format": e.state.prevItem.format || e.state.dateRangeFormat,
|
|
2399
2424
|
"picker-options": e.pickerOptions(e.state.startDate),
|
|
@@ -2402,21 +2427,21 @@ function xn(e, t, o, l, c, i) {
|
|
|
2402
2427
|
]),
|
|
2403
2428
|
_: 1
|
|
2404
2429
|
})
|
|
2405
|
-
])) :
|
|
2406
|
-
e.state.prevItem.type === "datetimeRange" ? (y(),
|
|
2407
|
-
|
|
2430
|
+
])) : z("", !0),
|
|
2431
|
+
e.state.prevItem.type === "datetimeRange" ? (y(), w("div", On, [
|
|
2432
|
+
D("div", Fn, I(e.state.prevItem.maxTimeLength > 0 ? e.t("tvp.tvpSearchbox.timeLengthTitle", {
|
|
2408
2433
|
value: (e.state.prevItem.maxTimeLength / 864e5).toFixed(1)
|
|
2409
2434
|
}) : e.t("tvp.tvpSearchbox.rangeDateTitle")), 1),
|
|
2410
|
-
|
|
2411
|
-
|
|
2435
|
+
D("div", Bn, I(e.t("tvp.tvpSearchbox.rangeBeginLabel")), 1),
|
|
2436
|
+
C(g, {
|
|
2412
2437
|
prop: "startDateTime",
|
|
2413
2438
|
"show-message": !!e.state.prevItem.maxTimeLength,
|
|
2414
2439
|
class: "tvp-search-box__date-item"
|
|
2415
2440
|
}, {
|
|
2416
|
-
default:
|
|
2417
|
-
|
|
2441
|
+
default: M(() => [
|
|
2442
|
+
C(T, {
|
|
2418
2443
|
modelValue: e.state.startDateTime,
|
|
2419
|
-
"onUpdate:modelValue": t[15] || (t[15] = (
|
|
2444
|
+
"onUpdate:modelValue": t[15] || (t[15] = (f) => e.state.startDateTime = f),
|
|
2420
2445
|
type: "datetime",
|
|
2421
2446
|
isutc8: !0,
|
|
2422
2447
|
format: e.state.prevItem.format || e.state.datetimeRangeFormat,
|
|
@@ -2427,15 +2452,15 @@ function xn(e, t, o, l, c, i) {
|
|
|
2427
2452
|
]),
|
|
2428
2453
|
_: 1
|
|
2429
2454
|
}, 8, ["show-message"]),
|
|
2430
|
-
|
|
2431
|
-
|
|
2455
|
+
D("div", xn, I(e.t("tvp.tvpSearchbox.rangeEndLabel")), 1),
|
|
2456
|
+
C(g, {
|
|
2432
2457
|
prop: "endDateTime",
|
|
2433
2458
|
class: "tvp-search-box__date-item"
|
|
2434
2459
|
}, {
|
|
2435
|
-
default:
|
|
2436
|
-
|
|
2460
|
+
default: M(() => [
|
|
2461
|
+
C(T, {
|
|
2437
2462
|
modelValue: e.state.endDateTime,
|
|
2438
|
-
"onUpdate:modelValue": t[16] || (t[16] = (
|
|
2463
|
+
"onUpdate:modelValue": t[16] || (t[16] = (f) => e.state.endDateTime = f),
|
|
2439
2464
|
type: "datetime",
|
|
2440
2465
|
isutc8: !0,
|
|
2441
2466
|
format: e.state.prevItem.format || e.state.datetimeRangeFormat,
|
|
@@ -2446,48 +2471,48 @@ function xn(e, t, o, l, c, i) {
|
|
|
2446
2471
|
]),
|
|
2447
2472
|
_: 1
|
|
2448
2473
|
})
|
|
2449
|
-
])) :
|
|
2474
|
+
])) : z("", !0)
|
|
2450
2475
|
]),
|
|
2451
|
-
|
|
2452
|
-
|
|
2476
|
+
D("div", An, [
|
|
2477
|
+
C($, {
|
|
2453
2478
|
size: "mini",
|
|
2454
|
-
onClick: t[17] || (t[17] = (
|
|
2479
|
+
onClick: t[17] || (t[17] = (f) => e.confirmEditTag(!1))
|
|
2455
2480
|
}, {
|
|
2456
|
-
default:
|
|
2457
|
-
K(
|
|
2481
|
+
default: M(() => [
|
|
2482
|
+
K(I(e.t("tvp.tvpSearchbox.cancel")), 1)
|
|
2458
2483
|
]),
|
|
2459
2484
|
_: 1
|
|
2460
2485
|
}),
|
|
2461
|
-
|
|
2486
|
+
C($, {
|
|
2462
2487
|
size: "mini",
|
|
2463
2488
|
disabled: e.state.hasFormError,
|
|
2464
|
-
onClick: t[18] || (t[18] = (
|
|
2489
|
+
onClick: t[18] || (t[18] = (f) => e.confirmEditTag(!0))
|
|
2465
2490
|
}, {
|
|
2466
|
-
default:
|
|
2467
|
-
K(
|
|
2491
|
+
default: M(() => [
|
|
2492
|
+
K(I(e.t("tvp.tvpSearchbox.confirm")), 1)
|
|
2468
2493
|
]),
|
|
2469
2494
|
_: 1
|
|
2470
2495
|
}, 8, ["disabled"])
|
|
2471
2496
|
])
|
|
2472
|
-
], 64)) : (y(),
|
|
2497
|
+
], 64)) : (y(), w("div", zn, [
|
|
2473
2498
|
me(e.$slots, `${e.state.prevItem.slotName}-edit`, fe({
|
|
2474
2499
|
showDropdown: () => e.showPopover(e.state),
|
|
2475
2500
|
onConfirm: e.handleEditConfirm
|
|
2476
2501
|
}, {
|
|
2477
|
-
onClick: t[19] || (t[19] =
|
|
2502
|
+
onClick: t[19] || (t[19] = Y(() => {
|
|
2478
2503
|
}, ["stop"]))
|
|
2479
2504
|
}))
|
|
2480
2505
|
]))
|
|
2481
2506
|
]),
|
|
2482
2507
|
_: 3
|
|
2483
|
-
}, 8, ["modelValue"])) :
|
|
2508
|
+
}, 8, ["modelValue", "append-to-body"])) : z("", !0)
|
|
2484
2509
|
]),
|
|
2485
2510
|
_: 3
|
|
2486
2511
|
}, 8, ["model", "rules", "validate-type", "size"])
|
|
2487
2512
|
], 2);
|
|
2488
2513
|
}
|
|
2489
|
-
const
|
|
2490
|
-
...
|
|
2514
|
+
const jn = /* @__PURE__ */ Ne(yn, [["render", Un]]), Hn = {
|
|
2515
|
+
...ge,
|
|
2491
2516
|
tiny_mode: {
|
|
2492
2517
|
type: String,
|
|
2493
2518
|
default: "pc"
|
|
@@ -2517,6 +2542,11 @@ const Bn = /* @__PURE__ */ _e(hn, [["render", xn]]), An = {
|
|
|
2517
2542
|
type: Boolean,
|
|
2518
2543
|
default: !0
|
|
2519
2544
|
},
|
|
2545
|
+
/** 是否显示搜索框前面的搜索图标 */
|
|
2546
|
+
showPrefixIcon: {
|
|
2547
|
+
type: Boolean,
|
|
2548
|
+
default: !0
|
|
2549
|
+
},
|
|
2520
2550
|
/** ID映射键名 */
|
|
2521
2551
|
idMapKey: {
|
|
2522
2552
|
type: String,
|
|
@@ -2561,24 +2591,29 @@ const Bn = /* @__PURE__ */ _e(hn, [["render", xn]]), An = {
|
|
|
2561
2591
|
size: {
|
|
2562
2592
|
type: String,
|
|
2563
2593
|
default: ""
|
|
2594
|
+
},
|
|
2595
|
+
/** 将下拉面板/弹窗挂载到 body,解决父容器 overflow 场景遮挡问题 */
|
|
2596
|
+
appendToBody: {
|
|
2597
|
+
type: Boolean,
|
|
2598
|
+
default: !1
|
|
2564
2599
|
}
|
|
2565
|
-
}, ue =
|
|
2566
|
-
name:
|
|
2567
|
-
props:
|
|
2568
|
-
...
|
|
2569
|
-
}),
|
|
2600
|
+
}, ue = ve({
|
|
2601
|
+
name: $e + "SearchBox",
|
|
2602
|
+
props: Hn,
|
|
2603
|
+
...jn
|
|
2604
|
+
}), Kn = "3.28.0";
|
|
2570
2605
|
ue.install = function(e) {
|
|
2571
2606
|
e.component(ue.name, ue);
|
|
2572
2607
|
};
|
|
2573
|
-
ue.version =
|
|
2608
|
+
ue.version = Kn;
|
|
2574
2609
|
window && typeof window < "u" && window.Vue && ue.install(window.Vue);
|
|
2575
2610
|
export {
|
|
2576
|
-
|
|
2577
|
-
|
|
2611
|
+
No as TinySearchBoxFirstLevelPanel,
|
|
2612
|
+
gn as TinySearchBoxSecondLevelPanel,
|
|
2578
2613
|
ue as default,
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2614
|
+
Qe as enUS,
|
|
2615
|
+
to as setGlobalApp,
|
|
2616
|
+
q as t,
|
|
2617
|
+
Ye as zhCN
|
|
2583
2618
|
};
|
|
2584
2619
|
//# sourceMappingURL=index.js.map
|