@opentiny/vue-search-box 2.27.0 → 2.27.2

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