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