@opentiny/vue-search-box-saas 2.27.1

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