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