@opentiny/vue-search-box-saas 2.32.0-alpha.4 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +317 -304
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { TinyDropdownItem as
|
|
2
|
+
import { defineComponent as de, $prefix as Ee, $props as fe, setup as ke, hooks as ce } from "@opentiny/vue-common";
|
|
3
|
+
import { TinyDropdownItem as Ne, TinyCheckbox as Ue, TinyCheckboxGroup as Ye, TinyDatePicker as Re, TinyInput as Oe, TinyButton as Pe, TinyLoading as qe, TinyTag as We, TinyDropdown as Ze, TinyDropdownMenu as Xe, TinyTooltip as Qe, TinyPopover as Je, TinySelect as et, TinyOption as tt } from "@opentiny/vue";
|
|
4
4
|
import { iconSearch as at, iconClose as nt, iconHelpQuery as rt } from "@opentiny/vue-icon";
|
|
5
5
|
const st = (a, e, n, r = "0") => {
|
|
6
6
|
if (typeof a == "string" && typeof r == "string" && Fe(e)) {
|
|
@@ -165,7 +165,7 @@ const ct = {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
return n;
|
|
168
|
-
},
|
|
168
|
+
}, ee = (a, e, n) => isNaN(a) || a < e || a > n, Ct = ({ year: a, month: e, date: n, hours: r, minutes: o, seconds: t, milliseconds: d }) => ee(a, 0, Z.YEAR) || ee(e, 0, Z.MONTH) || ee(n, 0, Z.DATE) || ee(r, 0, Z.HOUR) || ee(o, 0, Z.MINUTE) || ee(t, 0, Z.SECOND) || ee(d, 0, Z.MILLISECOND), St = (a, e) => {
|
|
169
169
|
if (typeof e == "string") {
|
|
170
170
|
const n = Tt(a, e), r = Number(n[0]), o = Number(n[1]), t = Number(n[2] || 1), d = Number(n[3] || 0), s = Number(n[4] || 0), l = Number(n[5] || 0), p = Number(n[6] || 0);
|
|
171
171
|
return Ct({
|
|
@@ -187,10 +187,10 @@ const ct = {
|
|
|
187
187
|
});
|
|
188
188
|
} else
|
|
189
189
|
return Et(a);
|
|
190
|
-
},
|
|
190
|
+
}, ue = (a, e, n) => {
|
|
191
191
|
let r;
|
|
192
192
|
if (Fe(a) ? r = new Date(a) : typeof a == "string" && (r = St(a, e)), n) {
|
|
193
|
-
const o = n &&
|
|
193
|
+
const o = n && ue(n) || new Date(1, 1, 1, 0, 0, 0);
|
|
194
194
|
return r && r < o ? o : r;
|
|
195
195
|
}
|
|
196
196
|
return r;
|
|
@@ -216,7 +216,7 @@ const ct = {
|
|
|
216
216
|
} else if (typeof a == "string" && arguments.length >= 2) {
|
|
217
217
|
let n = e;
|
|
218
218
|
arguments.length === 2 ? e = void 0 : n = arguments[2];
|
|
219
|
-
const r =
|
|
219
|
+
const r = ue(a, e);
|
|
220
220
|
return r ? xe(r, n) : "";
|
|
221
221
|
}
|
|
222
222
|
}, S = (a, e = !0) => {
|
|
@@ -251,42 +251,42 @@ const ct = {
|
|
|
251
251
|
return r.cancel = () => {
|
|
252
252
|
n && (clearTimeout(n), n = null);
|
|
253
253
|
}, r;
|
|
254
|
-
},
|
|
254
|
+
}, G = (a) => parseFloat(a).toString() !== "NaN", U = (a) => {
|
|
255
255
|
const e = Array.isArray(a) ? [] : {};
|
|
256
256
|
if (a && typeof a == "object") {
|
|
257
257
|
const n = Object.keys(a);
|
|
258
258
|
if (n.length)
|
|
259
259
|
n.forEach((r) => {
|
|
260
|
-
a[r] && typeof a[r] == "object" ? e[r] =
|
|
260
|
+
a[r] && typeof a[r] == "object" ? e[r] = U(a[r]) : e[r] = a[r];
|
|
261
261
|
});
|
|
262
262
|
else
|
|
263
263
|
return a;
|
|
264
264
|
}
|
|
265
265
|
return e;
|
|
266
|
-
},
|
|
266
|
+
}, ve = (a, e = ["mergeTag", "options", "idMapKey"]) => {
|
|
267
267
|
const n = { ...a };
|
|
268
268
|
return e.forEach((r) => {
|
|
269
269
|
delete n[r];
|
|
270
270
|
}), n;
|
|
271
|
-
},
|
|
271
|
+
}, H = (a, e, n = "") => {
|
|
272
272
|
const { valueMap: r, prevItem: o } = a, t = (o.label || n) + e;
|
|
273
273
|
return r.has(t);
|
|
274
|
-
},
|
|
274
|
+
}, me = (a) => {
|
|
275
275
|
a.propItem = {}, a.inputValue = "", a.startDate = null, a.endDate = null, a.startDateTime = null, a.endDateTime = null;
|
|
276
|
-
},
|
|
276
|
+
}, B = ({ emit: a, state: e, nextTick: n, ...r }) => {
|
|
277
277
|
le(e, !1);
|
|
278
278
|
const { tagList: o = null, index: t = -1, newTag: d = null, newValue: s = null, oldValue: l = null, isEdit: p } = r;
|
|
279
|
-
if (p ||
|
|
279
|
+
if (p || me(e), !o && t === -1 && !s)
|
|
280
280
|
return;
|
|
281
|
-
const u = l ||
|
|
281
|
+
const u = l || U(e.innerModelValue);
|
|
282
282
|
let f = [];
|
|
283
|
-
s ? f = [...s] : t !== -1 ? (f = [...e.innerModelValue], d ? f.splice(t, 1, d) : f.splice(t, 1)) : f = [...e.innerModelValue, ...o], e.innerModelValue = f, a("update:modelValue",
|
|
284
|
-
},
|
|
283
|
+
s ? f = [...s] : t !== -1 ? (f = [...e.innerModelValue], d ? f.splice(t, 1, d) : f.splice(t, 1)) : f = [...e.innerModelValue, ...o], e.innerModelValue = f, a("update:modelValue", U(f)), a("change", U(f), u);
|
|
284
|
+
}, Y = (a) => a, X = (a, e, n) => {
|
|
285
285
|
const r = e.idMapKey || a.idMapKey;
|
|
286
286
|
return n && n[r] !== void 0 ? { [r]: n[r] } : null;
|
|
287
287
|
};
|
|
288
288
|
function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
|
|
289
|
-
let t =
|
|
289
|
+
let t = U(e.inputValue);
|
|
290
290
|
const d = (u) => {
|
|
291
291
|
if (u) {
|
|
292
292
|
const f = e.recordItems.find((i) => i.label === u.label);
|
|
@@ -302,13 +302,13 @@ function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
|
|
|
302
302
|
return;
|
|
303
303
|
S(e, !1), d(u);
|
|
304
304
|
const f = a.modelValue.filter((i) => i !== u);
|
|
305
|
-
|
|
305
|
+
B({ emit: n, state: e, nextTick: r, newValue: f });
|
|
306
306
|
},
|
|
307
307
|
clearTag: () => {
|
|
308
308
|
const u = a.modelValue.filter((i) => o(i)), f = u.length !== a.modelValue.length;
|
|
309
309
|
S(e, !1), a.modelValue.forEach((i) => {
|
|
310
310
|
o(i) || d(i);
|
|
311
|
-
}),
|
|
311
|
+
}), B({ emit: n, state: e, nextTick: r, ...f ? { newValue: u } : {} }), n("clear");
|
|
312
312
|
},
|
|
313
313
|
backspaceDeleteTag: () => {
|
|
314
314
|
var u, f, i;
|
|
@@ -323,7 +323,7 @@ function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
|
|
|
323
323
|
return;
|
|
324
324
|
S(e, !1), d(m);
|
|
325
325
|
const h = e.innerModelValue.slice(0, a.modelValue.length - 1);
|
|
326
|
-
|
|
326
|
+
B({ emit: n, state: e, nextTick: r, newValue: h });
|
|
327
327
|
}
|
|
328
328
|
t = e.inputValue, (i = (f = (u = e == null ? void 0 : e.instance) == null ? void 0 : u.refs) == null ? void 0 : f.inputRef) != null && i.$el && e.instance.refs.inputRef.$el.click();
|
|
329
329
|
}
|
|
@@ -332,7 +332,7 @@ function Mt({ props: a, state: e, emit: n, nextTick: r, isTagDisabled: o }) {
|
|
|
332
332
|
}
|
|
333
333
|
const se = (a, e, n) => {
|
|
334
334
|
var t, d;
|
|
335
|
-
const r = (t =
|
|
335
|
+
const r = (t = ue(a, n)) == null ? void 0 : t.getTime(), o = (d = ue(e, n)) == null ? void 0 : d.getTime();
|
|
336
336
|
return r == null || isNaN(r) || o == null || isNaN(o) ? NaN : r < o ? -1 : r > o ? 1 : 0;
|
|
337
337
|
}, ie = (a, e) => {
|
|
338
338
|
var o;
|
|
@@ -356,8 +356,8 @@ const se = (a, e, n) => {
|
|
|
356
356
|
for (const r of e)
|
|
357
357
|
n[r] = "";
|
|
358
358
|
a.formErrors = n;
|
|
359
|
-
},
|
|
360
|
-
const { prevItem: r, inputEditValue: o } = e, { operators: t } = r, d =
|
|
359
|
+
}, Lt = async (a, e, n) => {
|
|
360
|
+
const { prevItem: r, inputEditValue: o } = e, { operators: t } = r, d = ve(r);
|
|
361
361
|
let s = null;
|
|
362
362
|
if (ie(e, ["inputEditValue"])) {
|
|
363
363
|
let p = null;
|
|
@@ -377,7 +377,7 @@ const se = (a, e, n) => {
|
|
|
377
377
|
const c = e.currentEditValue.find((m) => m.label === f);
|
|
378
378
|
p = X(n, r, c);
|
|
379
379
|
}
|
|
380
|
-
s =
|
|
380
|
+
s = Y({ ...d, label: e.selectValue, ...u, value: f, ...p, ...i });
|
|
381
381
|
}
|
|
382
382
|
return s;
|
|
383
383
|
}, ze = async (a, e, n) => {
|
|
@@ -388,14 +388,14 @@ const se = (a, e, n) => {
|
|
|
388
388
|
let x = "";
|
|
389
389
|
d && s ? x = `${d}-${s}` : x = d ? `≥${d}` : `≤${s}`;
|
|
390
390
|
const w = X(n, r, r), E = e.operatorValue && h ? { operator: e.operatorValue } : null;
|
|
391
|
-
u =
|
|
391
|
+
u = Y({ type: m, field: f, label: b, value: x, ...w, start: d, end: s, ...E });
|
|
392
392
|
}
|
|
393
393
|
return u;
|
|
394
394
|
}, ye = async (a, e, n, r) => {
|
|
395
395
|
const { prevItem: o, startDate: t, endDate: d, startDateTime: s, endDateTime: l } = e;
|
|
396
396
|
let p = null, u = null, f = null, i = null;
|
|
397
397
|
if (r ? (p = s, u = l, i = ["startDateTime", "endDateTime"]) : (p = t, u = d, i = ["startDate", "endDate"]), ie(e, i)) {
|
|
398
|
-
const { operators: m } = o, h =
|
|
398
|
+
const { operators: m } = o, h = ve(o);
|
|
399
399
|
let b = "";
|
|
400
400
|
const x = o.format || (r ? e.datetimeRangeFormat : e.dateRangeFormat);
|
|
401
401
|
if (p && u) {
|
|
@@ -405,118 +405,118 @@ const se = (a, e, n) => {
|
|
|
405
405
|
} else
|
|
406
406
|
b = p ? `≥${p}` : `≤${u}`;
|
|
407
407
|
const w = X(n, o, o), E = e.operatorValue && m ? { operator: e.operatorValue } : null;
|
|
408
|
-
f =
|
|
408
|
+
f = Y({ ...h, value: b, start: p, end: u, ...w, ...E });
|
|
409
409
|
}
|
|
410
410
|
return f;
|
|
411
411
|
}, Ke = (a, e, n) => {
|
|
412
412
|
const { prevItem: r } = a, { field: o, start: t, end: d, min: s = r.min, max: l = r.max } = e, p = `min${o}`, u = `max${o}`;
|
|
413
413
|
(a.curMinNumVar !== p || a.curMaxNumVar !== u) && (delete a[a.curMinNumVar], delete a[a.curMaxNumVar], delete a.formRules[a.curMinNumVar], delete a.formRules[a.curMaxNumVar], a.curMinNumVar = p, a.curMaxNumVar = u), a[a.curMinNumVar] = t, a[a.curMaxNumVar] = d;
|
|
414
|
-
const { curMinNumVar: f, curMaxNumVar: i } = a, c =
|
|
414
|
+
const { curMinNumVar: f, curMaxNumVar: i } = a, c = G(s), m = G(l);
|
|
415
415
|
c || m ? (a.formRules[f] = {
|
|
416
416
|
validator: (h, b, x) => {
|
|
417
|
-
const w =
|
|
418
|
-
!w &&
|
|
417
|
+
const w = G(b);
|
|
418
|
+
!w && G(a[i]) || w && (c && !m && b >= s || !c && m && b <= l || b >= s && b <= l) ? x() : (a.numberShowMessage = !!(b || a[i]), x(new Error(n("tvp.tvpSearchbox.rangeMinErr", [s, l]))));
|
|
419
419
|
}
|
|
420
420
|
}, a.formRules[i] = {
|
|
421
421
|
validator: (h, b, x) => {
|
|
422
|
-
const w =
|
|
422
|
+
const w = G(a[f]), E = w && s < a[f] ? Number(a[f]) : s, I = G(E), V = G(b);
|
|
423
423
|
!V && w || V && (I && !m && b >= E || !I && m && b <= l || b >= E && b <= l) ? x() : x(!V && !w ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
|
|
424
424
|
}
|
|
425
425
|
}) : a.formRules[i] = {
|
|
426
426
|
validator: (h, b, x) => {
|
|
427
|
-
const w = a[f], E =
|
|
427
|
+
const w = a[f], E = G(b), I = G(w);
|
|
428
428
|
E && !I || !E && I || E && I && b >= Number(w) ? x() : x(!E && !I ? new Error(n("tvp.tvpSearchbox.rangeNumberTitle")) : new Error(n("tvp.tvpSearchbox.rangeMaxErr")));
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
};
|
|
432
|
-
function
|
|
433
|
-
const p = d || n.instance, u = (
|
|
434
|
-
var k,
|
|
435
|
-
const { start:
|
|
436
|
-
if (n.backupList =
|
|
437
|
-
Ke(n,
|
|
432
|
+
function Nt({ props: a, emit: e, state: n, t: r, format: o, nextTick: t, vm: d, cancelHandleInput: s, selectFirstMap: l }) {
|
|
433
|
+
const p = d || n.instance, u = (g) => {
|
|
434
|
+
var k, $, C;
|
|
435
|
+
const { start: _, end: v, type: y } = g;
|
|
436
|
+
if (n.backupList = g.options, y === "numRange")
|
|
437
|
+
Ke(n, g, r);
|
|
438
438
|
else if (y === "dateRange") {
|
|
439
439
|
const { dateRangeFormat: T } = n;
|
|
440
|
-
if (!n.startDate &&
|
|
441
|
-
const
|
|
442
|
-
n.startDate = n.endDate <
|
|
440
|
+
if (!n.startDate && _) {
|
|
441
|
+
const L = o(_, T);
|
|
442
|
+
n.startDate = n.endDate < L ? null : L;
|
|
443
443
|
}
|
|
444
444
|
if (!n.endDate && v) {
|
|
445
|
-
const
|
|
446
|
-
n.endDate =
|
|
445
|
+
const L = o(v, T);
|
|
446
|
+
n.endDate = L < n.startDate ? null : L;
|
|
447
447
|
}
|
|
448
448
|
} else if (y === "datetimeRange") {
|
|
449
449
|
const { datetimeRangeFormat: T } = n;
|
|
450
|
-
if (!n.startDateTime &&
|
|
451
|
-
const
|
|
452
|
-
n.startDateTime = n.endDateTime <
|
|
450
|
+
if (!n.startDateTime && _) {
|
|
451
|
+
const L = o(_, T);
|
|
452
|
+
n.startDateTime = n.endDateTime < L ? null : L;
|
|
453
453
|
}
|
|
454
454
|
if (!n.endDateTime && v) {
|
|
455
|
-
const
|
|
456
|
-
n.endDateTime =
|
|
455
|
+
const L = o(v, T);
|
|
456
|
+
n.endDateTime = L < n.startDateTime ? null : L;
|
|
457
457
|
}
|
|
458
458
|
} else
|
|
459
459
|
n.backupList && y === "checkbox" && (n.filterList = n.backupList, n.checkboxGroup = [], (k = n.backupList) == null || k.forEach((T) => {
|
|
460
|
-
|
|
460
|
+
H(n, T.label) && n.checkboxGroup.push(`${g.label}${T.label}`), T.isFilter = !1;
|
|
461
461
|
}));
|
|
462
462
|
(y === "dateRange" || y === "datetimeRange") && t(() => {
|
|
463
463
|
$t(n, ["startDate", "endDate", "startDateTime", "endDateTime"]);
|
|
464
|
-
}), y !== "checkbox" && ((
|
|
465
|
-
T.isFilter = !1, T.isChecked =
|
|
464
|
+
}), y !== "checkbox" && (($ = n.backupList) != null && $.length) && ((C = n.backupList) == null || C.forEach((T) => {
|
|
465
|
+
T.isFilter = !1, T.isChecked = H(n, T.label);
|
|
466
466
|
})), n.currentOperators = null, !n.backupList && !["dateRange", "datetimeRange", "numRange", "custom"].includes(y) ? S(n, !1) : S(n);
|
|
467
|
-
}, f = (
|
|
468
|
-
var
|
|
469
|
-
const { field:
|
|
470
|
-
n.propItem = { ...n.propItem, label: v }, e("first-level-select",
|
|
471
|
-
const y = (
|
|
472
|
-
n.prevItem =
|
|
473
|
-
const { operators: k } =
|
|
474
|
-
k != null && k.length ? (n.operatorValue = "", n.currentOperators = k, S(n)) : (n.operatorValue = ":", u(
|
|
475
|
-
}, i = (
|
|
476
|
-
n.operatorValue =
|
|
477
|
-
}, c = (
|
|
478
|
-
const { replace: k, operators:
|
|
479
|
-
let
|
|
467
|
+
}, f = (g) => {
|
|
468
|
+
var $;
|
|
469
|
+
const { field: _, label: v } = g;
|
|
470
|
+
n.propItem = { ...n.propItem, label: v }, e("first-level-select", _);
|
|
471
|
+
const y = ($ = p.$refs) == null ? void 0 : $.inputRef;
|
|
472
|
+
n.prevItem = g, n.backupPrevItem = g;
|
|
473
|
+
const { operators: k } = g;
|
|
474
|
+
k != null && k.length ? (n.operatorValue = "", n.currentOperators = k, S(n)) : (n.operatorValue = ":", u(g)), n.inputValue = "", y.focus();
|
|
475
|
+
}, i = (g) => {
|
|
476
|
+
n.operatorValue = g, u(n.prevItem);
|
|
477
|
+
}, c = (g, _, v, y) => {
|
|
478
|
+
const { replace: k, operators: $, mergeTag: C } = g, T = ve(g), { indexMap: L } = n, O = L.get(v), z = X(a, g, _), K = n.operatorValue && $ ? { operator: n.operatorValue } : null;
|
|
479
|
+
let A = null;
|
|
480
480
|
if (C) {
|
|
481
|
-
const
|
|
481
|
+
const N = { label: y, ...z };
|
|
482
482
|
if (O >= 0) {
|
|
483
|
-
const
|
|
484
|
-
|
|
483
|
+
const j = `${n.innerModelValue[O].value} | ${y}`, W = [...n.innerModelValue[O].options, N];
|
|
484
|
+
A = Y({ ...n.innerModelValue[O], value: j, options: W });
|
|
485
485
|
} else
|
|
486
|
-
|
|
486
|
+
A = Y({ ...T, label: v, value: y, options: [N] });
|
|
487
487
|
} else
|
|
488
|
-
|
|
489
|
-
if (
|
|
490
|
-
|
|
488
|
+
A = Y({ ...T, label: v, value: y, ...z, ...K });
|
|
489
|
+
if (H(n, y, v)) {
|
|
490
|
+
me(n);
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
493
|
S(n, !1);
|
|
494
|
-
const
|
|
495
|
-
let
|
|
494
|
+
const q = U(n.innerModelValue);
|
|
495
|
+
let D = [];
|
|
496
496
|
if ((k || C) && O >= 0) {
|
|
497
|
-
const
|
|
498
|
-
|
|
497
|
+
const N = [...n.innerModelValue];
|
|
498
|
+
N.splice(O, 1), D = [...N, A];
|
|
499
499
|
} else
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}, m = (
|
|
503
|
-
var
|
|
504
|
-
I(), (v = (
|
|
505
|
-
}, h = (
|
|
506
|
-
var
|
|
507
|
-
S(n, !1),
|
|
508
|
-
const { prevItem: v } = n, y =
|
|
509
|
-
if (!
|
|
510
|
-
const C = n.propItem.label ||
|
|
511
|
-
c(v,
|
|
500
|
+
D = [...n.innerModelValue, A];
|
|
501
|
+
B({ emit: e, state: n, nextTick: t, newValue: D, oldValue: q });
|
|
502
|
+
}, m = (g) => {
|
|
503
|
+
var _, v;
|
|
504
|
+
I(), (v = (_ = p.$refs) == null ? void 0 : _.inputRef) == null || v.focus();
|
|
505
|
+
}, h = (g, _ = !1) => {
|
|
506
|
+
var $;
|
|
507
|
+
S(n, !1), _ && (n.prevItem = g, n.backupPrevItem = g);
|
|
508
|
+
const { prevItem: v } = n, y = g.value || g.label, k = ($ = p.$refs) == null ? void 0 : $.inputRef;
|
|
509
|
+
if (!H(n, y)) {
|
|
510
|
+
const C = n.propItem.label || g.label;
|
|
511
|
+
c(v, g, C, y);
|
|
512
512
|
}
|
|
513
513
|
k.focus();
|
|
514
|
-
}, b = (
|
|
514
|
+
}, b = (g, _) => {
|
|
515
515
|
var v, y;
|
|
516
|
-
if (
|
|
517
|
-
if (e("second-level-enter",
|
|
516
|
+
if (g.label) {
|
|
517
|
+
if (e("second-level-enter", _), _.type === "map") {
|
|
518
518
|
if (n.isShowTagKey) {
|
|
519
|
-
const C = (v =
|
|
519
|
+
const C = (v = _.options) == null ? void 0 : v[0];
|
|
520
520
|
C && l(C, !0);
|
|
521
521
|
} else {
|
|
522
522
|
const C = (y = n.backupList) == null ? void 0 : y.find((T) => !T.isChecked);
|
|
@@ -524,81 +524,85 @@ function Lt({ props: a, emit: e, state: n, t: r, format: o, nextTick: t, vm: d,
|
|
|
524
524
|
}
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
527
|
-
if (!
|
|
527
|
+
if (!_.options || !_.options.length)
|
|
528
528
|
return;
|
|
529
|
-
const k =
|
|
529
|
+
const k = _.options[0];
|
|
530
530
|
if (!k)
|
|
531
531
|
return;
|
|
532
532
|
if (!a.modelValue.find((C) => C.value === k.label)) {
|
|
533
|
-
const C =
|
|
534
|
-
c(
|
|
533
|
+
const C = _.label, T = k.label;
|
|
534
|
+
c(_, k, C, T);
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
537
|
} else
|
|
538
538
|
e("search", n.innerModelValue);
|
|
539
|
-
}, x = (
|
|
540
|
-
var k,
|
|
539
|
+
}, x = (g, _, v) => {
|
|
540
|
+
var k, $;
|
|
541
541
|
const y = (k = n.backupList) == null ? void 0 : k.find((C) => (C.value || C.label) === v);
|
|
542
|
-
|
|
543
|
-
}, w = (
|
|
544
|
-
var y, k,
|
|
545
|
-
if (
|
|
542
|
+
g.type === "checkbox" && (($ = n.backupList) != null && $.length) && !y || c(g, y, _.label, v);
|
|
543
|
+
}, w = (g) => g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), E = (g, _, v) => {
|
|
544
|
+
var y, k, $, C, T, L;
|
|
545
|
+
if (_.label) {
|
|
546
546
|
if (v.type === "map") {
|
|
547
|
-
n.isShowTagKey || c(v, void 0,
|
|
547
|
+
n.isShowTagKey || c(v, void 0, _.label, n.propItem.value + g);
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
|
-
const { regexp:
|
|
551
|
-
if (Array.isArray(v.options) && v.options.length && !(K === "checkbox" &&
|
|
552
|
-
const
|
|
553
|
-
|
|
550
|
+
const { regexp: O, replace: z, type: K, mergeTag: A } = v;
|
|
551
|
+
if (Array.isArray(v.options) && v.options.length && !(K === "checkbox" && A)) {
|
|
552
|
+
const D = new RegExp(w(g.trim()), "i"), N = (y = n.backupList) == null ? void 0 : y.find((j) => D.test(j.label));
|
|
553
|
+
N ? h(N) : (k = n.backupList) == null || k.forEach((j) => {
|
|
554
|
+
j.isFilter = !0;
|
|
555
|
+
});
|
|
554
556
|
return;
|
|
555
557
|
}
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
const
|
|
559
|
-
for (const
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
invalidValues:
|
|
558
|
+
const q = K !== "checkbox" && z || K === "checkbox" && A ? [g] : g.split(a.splitInputValue);
|
|
559
|
+
if (O) {
|
|
560
|
+
const D = [];
|
|
561
|
+
for (const N of q)
|
|
562
|
+
O.test(N) ? x(v, _, N) : D.push(N);
|
|
563
|
+
D.length > 0 && e("validate-error", {
|
|
564
|
+
invalidValues: D,
|
|
563
565
|
field: v.field,
|
|
564
566
|
label: v.label,
|
|
565
|
-
regexp:
|
|
567
|
+
regexp: O.toString()
|
|
566
568
|
});
|
|
567
569
|
} else
|
|
568
|
-
for (const
|
|
569
|
-
x(v,
|
|
570
|
+
for (const D of q)
|
|
571
|
+
x(v, _, D);
|
|
570
572
|
} else {
|
|
571
|
-
const { items:
|
|
572
|
-
const { regexp:
|
|
573
|
-
return
|
|
574
|
-
}),
|
|
575
|
-
(
|
|
576
|
-
|
|
577
|
-
|
|
573
|
+
const { items: O, defaultField: z, defaultFieldReplace: K } = a, A = O.find((M) => {
|
|
574
|
+
const { regexp: R } = M;
|
|
575
|
+
return R && R.test(g);
|
|
576
|
+
}), q = z ? O.find((M) => M.field === z) : n.allTypeAttri, D = A || q, N = !A && K ? { ...D, replace: !0 } : D, { replace: j, type: W, mergeTag: he, regexp: Q } = N, ne = W !== "checkbox" && j || W === "checkbox" && he ? [g] : g.split(a.splitInputValue);
|
|
577
|
+
($ = D == null ? void 0 : D.options) != null && $.length && (n.backupList = [...D.options], (C = n.backupList) == null || C.forEach((M) => {
|
|
578
|
+
M.isFilter = !1;
|
|
579
|
+
const R = M.value || M.label;
|
|
580
|
+
ne.includes(R) && (M.isChecked = !0);
|
|
578
581
|
}));
|
|
579
|
-
const
|
|
580
|
-
if (
|
|
581
|
-
const
|
|
582
|
-
for (const
|
|
583
|
-
if (
|
|
584
|
-
if (W === "checkbox" && ((
|
|
582
|
+
const be = D.label;
|
|
583
|
+
if (Q) {
|
|
584
|
+
const M = [];
|
|
585
|
+
for (const R of ne)
|
|
586
|
+
if (Q.test(R)) {
|
|
587
|
+
if (W === "checkbox" && ((T = D == null ? void 0 : D.options) != null && T.length) && !n.backupList.find((J) => (J.value || J.label) === R))
|
|
585
588
|
continue;
|
|
586
|
-
c(
|
|
589
|
+
c(N, {}, be, R);
|
|
587
590
|
} else
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
invalidValues:
|
|
591
|
-
field:
|
|
592
|
-
label:
|
|
593
|
-
regexp:
|
|
591
|
+
M.push(R);
|
|
592
|
+
M.length > 0 && e("validate-error", {
|
|
593
|
+
invalidValues: M,
|
|
594
|
+
field: N.field,
|
|
595
|
+
label: N.label,
|
|
596
|
+
regexp: Q.toString()
|
|
594
597
|
});
|
|
595
598
|
} else
|
|
596
|
-
for (const
|
|
597
|
-
W === "checkbox" && ((
|
|
599
|
+
for (const M of ne)
|
|
600
|
+
W === "checkbox" && ((L = D == null ? void 0 : D.options) != null && L.length) && !n.backupList.find((R) => (R.value || R.label) === M) || c(N, {}, be, M);
|
|
598
601
|
}
|
|
599
602
|
}, I = () => {
|
|
600
|
-
|
|
601
|
-
|
|
603
|
+
var y;
|
|
604
|
+
const { propItem: g, prevItem: _ } = n, v = ((y = n.inputValue) == null ? void 0 : y.trim()) ?? "";
|
|
605
|
+
s && s(), v ? E(v, g, _) : b(g, _);
|
|
602
606
|
};
|
|
603
607
|
return { selectPropItem: f, selectRadioItem: h, selectInputValue: m, createTag: I, helpClick: () => {
|
|
604
608
|
e("help");
|
|
@@ -617,7 +621,7 @@ function Ot({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
617
621
|
const o = async (u) => {
|
|
618
622
|
e.potentialOptions = await a.potentialOptions.getMatchList(u), S(e, !0);
|
|
619
623
|
}, d = Dt((u) => {
|
|
620
|
-
var I, V,
|
|
624
|
+
var I, V, g, _;
|
|
621
625
|
const { recordItems: f, propItem: i } = e, c = typeof u == "string" ? u : u && u.target && typeof u.target.value == "string" ? u.target.value : e.inputValue || "", m = (I = String(c)) == null ? void 0 : I.trim();
|
|
622
626
|
if (m.length === 0) {
|
|
623
627
|
l(), S(e);
|
|
@@ -631,29 +635,29 @@ function Ot({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
631
635
|
e.propItem = { ...e.propItem, label: x.label }, e.inputValue = "", e.prevItem = x, e.backupPrevItem = x, e.backupList = x.options || [];
|
|
632
636
|
return;
|
|
633
637
|
}
|
|
634
|
-
e.filterList = (V = e.backupList) == null ? void 0 : V.filter((v) => b.test(v.label) ? (
|
|
638
|
+
e.filterList = (V = e.backupList) == null ? void 0 : V.filter((v) => b.test(v.label) ? (v.isFilter = !1, H(e, v.label) && e.checkboxGroup.push(`${e.prevItem.label}${v.label}`), !0) : (v.isFilter = !0, !1));
|
|
635
639
|
const w = new RegExp(h, "ig"), E = m.toLowerCase();
|
|
636
640
|
if (e.propItem.label) {
|
|
637
|
-
(
|
|
641
|
+
(g = e.backupList) == null || g.forEach((v) => {
|
|
638
642
|
v.hightlighStr = E;
|
|
639
643
|
const y = v.label;
|
|
640
644
|
b.test(y) ? (v.match = _e(w, y), v.isFilter = !1) : v.isFilter = !0;
|
|
641
|
-
}), (
|
|
645
|
+
}), (_ = e.backupList) != null && _.length || m ? S(e) : S(e, !1);
|
|
642
646
|
return;
|
|
643
647
|
}
|
|
644
648
|
for (const v of f) {
|
|
645
|
-
const { options: y = [], groupKey: k = "0",
|
|
649
|
+
const { options: y = [], groupKey: k = "0", ...$ } = v, C = $.label;
|
|
646
650
|
if (b.test(C)) {
|
|
647
651
|
const T = _e(w, C);
|
|
648
652
|
e.matchItems[k].attr.push({ ...v, match: T, hightlighStr: E });
|
|
649
653
|
}
|
|
650
654
|
for (const T of y) {
|
|
651
|
-
const
|
|
652
|
-
if (b.test(
|
|
653
|
-
const O = _e(w,
|
|
655
|
+
const L = e.propItem.label ? C : `${C}:${T.label}`;
|
|
656
|
+
if (b.test(L)) {
|
|
657
|
+
const O = _e(w, L);
|
|
654
658
|
e.matchItems[k].attrValue.push({
|
|
655
659
|
...T,
|
|
656
|
-
|
|
660
|
+
...$,
|
|
657
661
|
options: y,
|
|
658
662
|
hightlighStr: E,
|
|
659
663
|
value: T.label,
|
|
@@ -667,7 +671,9 @@ function Ot({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
667
671
|
d.cancel && d.cancel();
|
|
668
672
|
}, l = () => {
|
|
669
673
|
var u;
|
|
670
|
-
(u = e.backupList) == null || u.forEach((f) =>
|
|
674
|
+
(u = e.backupList) == null || u.forEach((f) => {
|
|
675
|
+
f.isFilter = !1;
|
|
676
|
+
});
|
|
671
677
|
};
|
|
672
678
|
return {
|
|
673
679
|
handleInput: d,
|
|
@@ -677,14 +683,14 @@ function Ot({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
677
683
|
if (i)
|
|
678
684
|
S(e, !1), e.propItem = { ...e.propItem, value: `${u.label}=` }, e.isShowTagKey = !1, e.inputValue = "", e.backupList = u.options || [], l(), (h = e.backupList) == null || h.forEach((b) => {
|
|
679
685
|
const x = e.propItem.value + b.label;
|
|
680
|
-
b.isChecked =
|
|
686
|
+
b.isChecked = H(e, x);
|
|
681
687
|
});
|
|
682
688
|
else {
|
|
683
689
|
if (u.isChecked)
|
|
684
690
|
return;
|
|
685
691
|
S(e, !1), e.isShowTagKey = !0, l();
|
|
686
|
-
const { field: b, type: x } = c, w = m.value + u.label, E = X(a, c, u), V = [
|
|
687
|
-
|
|
692
|
+
const { field: b, type: x } = c, w = m.value + u.label, E = X(a, c, u), V = [Y({ type: x, field: b, label: m.label, value: w, ...E })];
|
|
693
|
+
B({ emit: n, state: e, nextTick: r, tagList: V });
|
|
688
694
|
}
|
|
689
695
|
f && S(e);
|
|
690
696
|
},
|
|
@@ -696,18 +702,18 @@ function Pt({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
696
702
|
selectCheckbox: (t) => {
|
|
697
703
|
var u, f;
|
|
698
704
|
S(e, !1);
|
|
699
|
-
const { checkboxGroup: d, prevItem: s, propItem: l } = e, p =
|
|
705
|
+
const { checkboxGroup: d, prevItem: s, propItem: l } = e, p = ve(s);
|
|
700
706
|
if (t) {
|
|
701
|
-
const i = [], c =
|
|
707
|
+
const i = [], c = U(e.innerModelValue), { mergeTag: m, operators: h, label: b } = s;
|
|
702
708
|
if (m) {
|
|
703
709
|
let x = "";
|
|
704
710
|
const w = [], { indexMap: E } = e, I = E.get(b);
|
|
705
711
|
if (I !== void 0 && e.innerModelValue.splice(I, 1), (u = e.backupList) == null || u.forEach((V) => {
|
|
706
|
-
const { label:
|
|
707
|
-
if (d.includes(
|
|
708
|
-
|
|
712
|
+
const { label: g } = V, _ = `${b}${g}`;
|
|
713
|
+
if (d.includes(_)) {
|
|
714
|
+
V.isFilter = !1;
|
|
709
715
|
const y = X(a, s, V), k = { label: V.label, ...y };
|
|
710
|
-
x += x ? ` | ${
|
|
716
|
+
x += x ? ` | ${g}` : g, w.push(k);
|
|
711
717
|
}
|
|
712
718
|
}), w.length > 0) {
|
|
713
719
|
const V = { ...p, value: x, options: w };
|
|
@@ -716,28 +722,28 @@ function Pt({ props: a, state: e, emit: n, nextTick: r }) {
|
|
|
716
722
|
} else {
|
|
717
723
|
const { valueMap: x } = e, w = [];
|
|
718
724
|
if ((f = e.backupList) == null || f.forEach((E) => {
|
|
719
|
-
const { label: I } = E, V = `${b}${I}`,
|
|
720
|
-
if (
|
|
721
|
-
const
|
|
725
|
+
const { label: I } = E, V = `${b}${I}`, g = d.includes(V);
|
|
726
|
+
if (g && !H(e, I)) {
|
|
727
|
+
const _ = X(a, s, E), v = e.operatorValue && h ? { operator: e.operatorValue } : null, y = Y({ ...p, label: l.label, value: I, ..._, ...v });
|
|
722
728
|
i.push(y), E.isChecked = !0;
|
|
723
|
-
} else if (!
|
|
729
|
+
} else if (!g && H(e, I)) {
|
|
724
730
|
E.isChecked = !1;
|
|
725
|
-
const
|
|
726
|
-
w.push(
|
|
731
|
+
const _ = x.get(V);
|
|
732
|
+
w.push(_);
|
|
727
733
|
}
|
|
728
734
|
}), w.length) {
|
|
729
735
|
const E = e.innerModelValue.filter((I, V) => I && !w.includes(V));
|
|
730
|
-
|
|
736
|
+
B({ emit: n, state: e, nextTick: r, newValue: E, oldValue: c });
|
|
731
737
|
return;
|
|
732
738
|
}
|
|
733
739
|
}
|
|
734
|
-
|
|
740
|
+
B({ emit: n, state: e, nextTick: r, tagList: i, oldValue: c });
|
|
735
741
|
} else
|
|
736
742
|
e.propItem = { ...l, label: "" }, e.inputValue = "";
|
|
737
743
|
}
|
|
738
744
|
};
|
|
739
745
|
}
|
|
740
|
-
const
|
|
746
|
+
const te = (a) => {
|
|
741
747
|
const e = new Date(a);
|
|
742
748
|
return e.setHours(0, 0, 0, 0), e.getTime();
|
|
743
749
|
};
|
|
@@ -751,44 +757,44 @@ function Ft({ props: a, state: e, emit: n, nextTick: r, vm: o }) {
|
|
|
751
757
|
if (i) {
|
|
752
758
|
S(e, !1);
|
|
753
759
|
const c = a.modelValue.filter((m) => m.type !== i.type || m.field !== i.field);
|
|
754
|
-
c.push(i),
|
|
760
|
+
c.push(i), B({ emit: n, state: e, nextTick: r, newValue: c });
|
|
755
761
|
} else
|
|
756
762
|
S(e);
|
|
757
763
|
}, s = () => S(e), l = (u, f, i) => {
|
|
758
|
-
const { maxTimeLength: c = 0, min: m, max: h } = e.prevItem, b = e.prevItem.type === "datetimeRange", x = m ? typeof m == "number" ? m : m.getTime() : null, w = h ? typeof h == "number" ? h : h.getTime() : null, E = x == null ? null : b ?
|
|
764
|
+
const { maxTimeLength: c = 0, min: m, max: h } = e.prevItem, b = e.prevItem.type === "datetimeRange", x = m ? typeof m == "number" ? m : m.getTime() : null, w = h ? typeof h == "number" ? h : h.getTime() : null, E = x == null ? null : b ? te(x) : x, I = e[i], V = u.getTime();
|
|
759
765
|
if (c > 0)
|
|
760
766
|
if (m || h)
|
|
761
767
|
if (i && I) {
|
|
762
|
-
const
|
|
763
|
-
return V < v || V > _;
|
|
764
|
-
} else if (!i && f) {
|
|
765
|
-
const _ = new Date(f).getTime(), g = m && !h ? _ + c : Math.min(w, _ + c), v = b ? ee(_) : _;
|
|
768
|
+
const g = new Date(I).getTime(), _ = !m && h ? g - c : Math.max(x, g - c), v = b ? te(_) : _;
|
|
766
769
|
return V < v || V > g;
|
|
770
|
+
} else if (!i && f) {
|
|
771
|
+
const g = new Date(f).getTime(), _ = m && !h ? g + c : Math.min(w, g + c), v = b ? te(g) : g;
|
|
772
|
+
return V < v || V > _;
|
|
767
773
|
} else
|
|
768
774
|
return E && V < E || w && V > w;
|
|
769
775
|
else if (i && I) {
|
|
770
|
-
const
|
|
771
|
-
return V < v || V > _;
|
|
772
|
-
} else if (!i && f) {
|
|
773
|
-
const _ = new Date(f).getTime(), g = _ + c, v = b ? ee(_) : _;
|
|
776
|
+
const g = new Date(I).getTime(), _ = g - c, v = b ? te(_) : _;
|
|
774
777
|
return V < v || V > g;
|
|
778
|
+
} else if (!i && f) {
|
|
779
|
+
const g = new Date(f).getTime(), _ = g + c, v = b ? te(g) : g;
|
|
780
|
+
return V < v || V > _;
|
|
775
781
|
} else
|
|
776
782
|
return !1;
|
|
777
783
|
else if (m || h)
|
|
778
784
|
if (i && I) {
|
|
779
|
-
const
|
|
780
|
-
return E && V < E || V >
|
|
785
|
+
const g = new Date(I).getTime();
|
|
786
|
+
return E && V < E || V > g;
|
|
781
787
|
} else if (!i && f) {
|
|
782
|
-
const
|
|
783
|
-
return V <
|
|
788
|
+
const g = new Date(f).getTime(), _ = b ? te(g) : g;
|
|
789
|
+
return V < _ || w && V > w;
|
|
784
790
|
} else
|
|
785
791
|
return E && V < E || w && V > w;
|
|
786
792
|
else if (i && I) {
|
|
787
|
-
const
|
|
788
|
-
return V >
|
|
793
|
+
const g = new Date(I).getTime();
|
|
794
|
+
return V > g;
|
|
789
795
|
} else if (!i && f) {
|
|
790
|
-
const
|
|
791
|
-
return V <
|
|
796
|
+
const g = new Date(f).getTime(), _ = b ? te(g) : g;
|
|
797
|
+
return V < _;
|
|
792
798
|
} else
|
|
793
799
|
return !1;
|
|
794
800
|
};
|
|
@@ -811,7 +817,7 @@ function At({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
|
|
|
811
817
|
if (f) {
|
|
812
818
|
S(e, !1);
|
|
813
819
|
const i = a.modelValue.filter((c) => c.type !== f.type || c.field !== f.field);
|
|
814
|
-
i.push(f),
|
|
820
|
+
i.push(f), B({ emit: r, state: e, nextTick: o, newValue: i });
|
|
815
821
|
} else
|
|
816
822
|
S(e);
|
|
817
823
|
}, l = (u, f, i) => {
|
|
@@ -858,10 +864,10 @@ function At({ props: a, state: e, t: n, emit: r, nextTick: o, vm: t }) {
|
|
|
858
864
|
}
|
|
859
865
|
function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }) {
|
|
860
866
|
const s = (i, c = !1) => {
|
|
861
|
-
var
|
|
867
|
+
var g;
|
|
862
868
|
const { operator: m, value: h, start: b, end: x } = i, { options: w, operators: E, type: I, mergeTag: V } = e.prevItem;
|
|
863
869
|
if (c) {
|
|
864
|
-
const
|
|
870
|
+
const _ = {
|
|
865
871
|
inputEditValue: V ? [] : "",
|
|
866
872
|
currentEditSelectTags: [],
|
|
867
873
|
currentEditValue: [],
|
|
@@ -873,26 +879,26 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
|
|
|
873
879
|
mapEditKey: "",
|
|
874
880
|
mapEditValue: ""
|
|
875
881
|
};
|
|
876
|
-
e.curMinNumVar && (
|
|
882
|
+
e.curMinNumVar && (_[e.curMinNumVar] = ""), e.curMaxNumVar && (_[e.curMaxNumVar] = ""), Object.assign(e, _);
|
|
877
883
|
}
|
|
878
884
|
if (I !== "custom") {
|
|
879
885
|
if (I === "map") {
|
|
880
886
|
if (!c) {
|
|
881
|
-
const
|
|
882
|
-
e.mapEditKey = v >= 0 ?
|
|
887
|
+
const _ = String(i.value || ""), v = _.indexOf("=");
|
|
888
|
+
e.mapEditKey = v >= 0 ? _.substring(0, v) : "", e.mapEditValue = v >= 0 ? _.substring(v + 1) : "";
|
|
883
889
|
}
|
|
884
890
|
} else if (I === "numRange")
|
|
885
891
|
Ke(e, i, n);
|
|
886
892
|
else if (I === "dateRange") {
|
|
887
|
-
const { dateRangeFormat:
|
|
888
|
-
e.startDate = o(b,
|
|
893
|
+
const { dateRangeFormat: _ } = e;
|
|
894
|
+
e.startDate = o(b, _), e.endDate = o(x, _);
|
|
889
895
|
} else if (I === "datetimeRange") {
|
|
890
|
-
const { datetimeRangeFormat:
|
|
891
|
-
e.startDateTime = o(b,
|
|
896
|
+
const { datetimeRangeFormat: _ } = e;
|
|
897
|
+
e.startDateTime = o(b, _), e.endDateTime = o(x, _);
|
|
892
898
|
} else {
|
|
893
899
|
if (V) {
|
|
894
|
-
const
|
|
895
|
-
e.inputEditValue =
|
|
900
|
+
const _ = c ? [] : ((g = i.options) == null ? void 0 : g.flatMap((v) => v.label)) || [];
|
|
901
|
+
e.inputEditValue = _, e.currentEditSelectTags = _;
|
|
896
902
|
} else
|
|
897
903
|
e.inputEditValue = c ? "" : Array.isArray(h) ? h.join(",") : h || "";
|
|
898
904
|
e.currentEditValue = w;
|
|
@@ -934,19 +940,19 @@ function Bt({ props: a, state: e, t: n, nextTick: r, format: o, emit: t, vm: d }
|
|
|
934
940
|
h = await ye(e.instance, e, a, !0);
|
|
935
941
|
else if (c.type === "map") {
|
|
936
942
|
const { field: b, type: x, label: w } = c, { mapEditKey: E, mapEditValue: I } = e;
|
|
937
|
-
E && I && (h =
|
|
943
|
+
E && I && (h = Y({ type: x, field: b, label: w, value: `${E}=${I}` }));
|
|
938
944
|
} else
|
|
939
|
-
h = await
|
|
945
|
+
h = await Lt(e.instance, e, a);
|
|
940
946
|
if (h) {
|
|
941
947
|
S(e, !1), e.popoverVisible = !1;
|
|
942
948
|
const { replace: b, mergeTag: x } = c, w = e.indexMap.get(h.label);
|
|
943
949
|
if ((b || x) && w !== void 0 && w !== m) {
|
|
944
|
-
const E =
|
|
945
|
-
let I = e.innerModelValue.filter((
|
|
950
|
+
const E = U(e.innerModelValue);
|
|
951
|
+
let I = e.innerModelValue.filter((g, _) => _ !== w);
|
|
946
952
|
const V = m > w ? m - 1 : m;
|
|
947
|
-
I[V] = h,
|
|
953
|
+
I[V] = h, B({ emit: t, state: e, nextTick: r, newValue: I, oldValue: E, isEdit: !0 });
|
|
948
954
|
} else
|
|
949
|
-
|
|
955
|
+
B({ emit: t, state: e, nextTick: r, index: m, newTag: h, isEdit: !0 });
|
|
950
956
|
} else
|
|
951
957
|
e.popoverVisible = !0;
|
|
952
958
|
e.currentEditValue = [];
|
|
@@ -965,18 +971,18 @@ function Ht({ state: a, emit: e, nextTick: n }) {
|
|
|
965
971
|
const { prevItem: s, indexMap: l } = a, { replace: p, label: u } = s, f = [];
|
|
966
972
|
if (p && l.has(u)) {
|
|
967
973
|
const i = l.get(u), c = { ...s, ...d };
|
|
968
|
-
|
|
974
|
+
B({ emit: e, state: a, nextTick: n, newTag: c, index: i });
|
|
969
975
|
return;
|
|
970
976
|
} else
|
|
971
977
|
!p && Array.isArray(d) ? d.forEach((i) => {
|
|
972
|
-
|
|
973
|
-
}) :
|
|
974
|
-
|
|
978
|
+
H(a, i.value) || f.push({ ...s, ...i });
|
|
979
|
+
}) : H(a, d.value) || f.push({ ...s, ...d });
|
|
980
|
+
B({ emit: e, state: a, nextTick: n, tagList: f });
|
|
975
981
|
};
|
|
976
982
|
return {
|
|
977
983
|
handleConfirm: (d) => {
|
|
978
984
|
if (!d) {
|
|
979
|
-
|
|
985
|
+
me(a), S(a, !1);
|
|
980
986
|
return;
|
|
981
987
|
}
|
|
982
988
|
r(d);
|
|
@@ -994,13 +1000,15 @@ function zt({ props: a, state: e }) {
|
|
|
994
1000
|
return {
|
|
995
1001
|
initItems: () => {
|
|
996
1002
|
e.groupItems = {}, e.recordItems.forEach((s) => {
|
|
997
|
-
var p;
|
|
1003
|
+
var p, u;
|
|
998
1004
|
const { groupKey: l = "0" } = s;
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1005
|
+
if ((p = s.options) == null || p.forEach((f) => {
|
|
1006
|
+
f.isFilter = !1;
|
|
1007
|
+
}), e.groupItems[l] ? e.groupItems[l].push({ ...s }) : (e.groupItems[l] = [{ ...s }], e.matchItems[l] = { attr: [], attrValue: [] }), e.prevItem && s.field === e.prevItem.field && s !== e.prevItem) {
|
|
1008
|
+
const { options: f, type: i } = s;
|
|
1009
|
+
e.prevItem = s, f != null && f.length && (e.backupList = f), i === "checkbox" && (e.filterList = e.backupList, e.checkboxGroup = [], (u = e.backupList) == null || u.forEach((c) => {
|
|
1010
|
+
const { label: m } = c;
|
|
1011
|
+
H(e, m) && e.checkboxGroup.push(`${s.label}${m}`), c.isFilter = !1;
|
|
1004
1012
|
})), S(e, s.field === e.prevItem.field && s !== e.prevItem);
|
|
1005
1013
|
}
|
|
1006
1014
|
});
|
|
@@ -1107,28 +1115,28 @@ const je = {
|
|
|
1107
1115
|
initUse: "Search"
|
|
1108
1116
|
}
|
|
1109
1117
|
}
|
|
1110
|
-
}, oe = "zh-CN",
|
|
1118
|
+
}, oe = "zh-CN", ae = {
|
|
1111
1119
|
"zh-CN": je,
|
|
1112
1120
|
"en-US": Ge
|
|
1113
1121
|
};
|
|
1114
|
-
let
|
|
1122
|
+
let P = null, we = null;
|
|
1115
1123
|
const Ve = (a) => {
|
|
1116
|
-
|
|
1124
|
+
P = a;
|
|
1117
1125
|
}, Kt = (a) => {
|
|
1118
1126
|
we = a;
|
|
1119
1127
|
}, Ce = () => {
|
|
1120
1128
|
var a, e, n, r, o;
|
|
1121
|
-
if ((n = (e = (a =
|
|
1122
|
-
return
|
|
1123
|
-
if ((r =
|
|
1124
|
-
return
|
|
1129
|
+
if ((n = (e = (a = P == null ? void 0 : P.config) == null ? void 0 : a.globalProperties) == null ? void 0 : e.$i18n) != null && n.locale)
|
|
1130
|
+
return P.config.globalProperties.$i18n.locale;
|
|
1131
|
+
if ((r = P == null ? void 0 : P.$i18n) != null && r.locale)
|
|
1132
|
+
return P.$i18n.locale;
|
|
1125
1133
|
if (typeof navigator < "u") {
|
|
1126
1134
|
const t = navigator.language || ((o = navigator.languages) == null ? void 0 : o[0]);
|
|
1127
1135
|
if (t)
|
|
1128
1136
|
return t.startsWith("zh") ? "zh-CN" : "en-US";
|
|
1129
1137
|
}
|
|
1130
1138
|
return oe;
|
|
1131
|
-
}, Ie = (a) =>
|
|
1139
|
+
}, Ie = (a) => ae[a] || ae[oe], F = (a, e = {}) => {
|
|
1132
1140
|
var d, s;
|
|
1133
1141
|
if (!a)
|
|
1134
1142
|
return "";
|
|
@@ -1140,17 +1148,17 @@ const Ve = (a) => {
|
|
|
1140
1148
|
} catch (l) {
|
|
1141
1149
|
console.warn("[TinySearchBox] globalT translation failed:", l);
|
|
1142
1150
|
}
|
|
1143
|
-
if ((s = (d =
|
|
1151
|
+
if ((s = (d = P == null ? void 0 : P.config) == null ? void 0 : d.globalProperties) != null && s.$t)
|
|
1144
1152
|
try {
|
|
1145
|
-
const l =
|
|
1153
|
+
const l = P.config.globalProperties.$t(a, e);
|
|
1146
1154
|
if (l && l !== a)
|
|
1147
1155
|
return l;
|
|
1148
1156
|
} catch (l) {
|
|
1149
1157
|
console.warn("[TinySearchBox] i18n translation failed:", l);
|
|
1150
1158
|
}
|
|
1151
|
-
if (
|
|
1159
|
+
if (P != null && P.$t)
|
|
1152
1160
|
try {
|
|
1153
|
-
const l =
|
|
1161
|
+
const l = P.$t(a, e);
|
|
1154
1162
|
if (l && l !== a)
|
|
1155
1163
|
return l;
|
|
1156
1164
|
} catch (l) {
|
|
@@ -1176,10 +1184,10 @@ const Ve = (a) => {
|
|
|
1176
1184
|
break;
|
|
1177
1185
|
}
|
|
1178
1186
|
return typeof t == "string" && Object.keys(e).length > 0 ? t.replace(/\{(\w+)\}/g, (l, p) => e[p] !== void 0 ? e[p] : l) : typeof t == "string" ? t : a;
|
|
1179
|
-
}, jt = (a, e = {}) => a.map((n) => F(n, e)), Gt = (a) => a in
|
|
1180
|
-
|
|
1187
|
+
}, jt = (a, e = {}) => a.map((n) => F(n, e)), Gt = (a) => a in ae, Ut = () => Object.keys(ae), Yt = (a, e) => {
|
|
1188
|
+
ae[a] = e;
|
|
1181
1189
|
}, qt = (a) => {
|
|
1182
|
-
a !== oe && delete
|
|
1190
|
+
a !== oe && delete ae[a];
|
|
1183
1191
|
}, Wt = {
|
|
1184
1192
|
t: F,
|
|
1185
1193
|
zhCN: je,
|
|
@@ -1221,10 +1229,10 @@ const Ve = (a) => {
|
|
|
1221
1229
|
"handleEditConfirm",
|
|
1222
1230
|
"showDropdown",
|
|
1223
1231
|
"showPopover"
|
|
1224
|
-
],
|
|
1232
|
+
], pe = (a, e) => a.emptyPlaceholder || e("tvp.tvpSearchbox.addPlaceholder"), Xt = ({ reactive: a, computed: e, api: n, i18n: r, watch: o, props: t, emit: d, vm: s }) => {
|
|
1225
1233
|
const l = a({
|
|
1226
1234
|
innerModelValue: [...t.modelValue],
|
|
1227
|
-
placeholder: t.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") :
|
|
1235
|
+
placeholder: t.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") : pe(t, F),
|
|
1228
1236
|
emitter: d,
|
|
1229
1237
|
recordItems: [],
|
|
1230
1238
|
groupItems: {},
|
|
@@ -1302,17 +1310,17 @@ const Ve = (a) => {
|
|
|
1302
1310
|
typeof document < "u" && (document.removeEventListener("click", i.watchOutsideClick), document.removeEventListener("mousedown", i.watchMouseDown), document.removeEventListener("mousemove", i.watchMouseMove), m.localeCheckInterval && (clearInterval(m.localeCheckInterval), m.localeCheckInterval = null));
|
|
1303
1311
|
}), i;
|
|
1304
1312
|
}, Jt = ({ api: a, state: e, t: n, props: r, emit: o, nextTick: t, vm: d, computed: s }) => {
|
|
1305
|
-
const l = (
|
|
1306
|
-
if (!
|
|
1313
|
+
const l = (M) => {
|
|
1314
|
+
if (!M)
|
|
1307
1315
|
return !1;
|
|
1308
|
-
const
|
|
1309
|
-
return !!(
|
|
1310
|
-
}, { deleteTag: p, clearTag: u, backspaceDeleteTag: f } = Mt({ props: r, state: e, emit: o, nextTick: t, isTagDisabled: l }), { editTag: i, confirmEditTag: c, selectPropChange: m, checkFormValidation: h } = Bt({ props: r, state: e, t: n, nextTick: t, format: xe, emit: o, vm: d }), { handleInput: b, selectFirstMap: x, cancelHandleInput: w } = Ot({ props: r, state: e, emit: o, nextTick: t }), { selectPropItem: E, selectRadioItem: I, selectInputValue: V, createTag:
|
|
1311
|
-
const
|
|
1316
|
+
const R = e.recordItems.find((J) => J.field === M.field || J.label === M.label);
|
|
1317
|
+
return !!(R != null && R.disableDelete);
|
|
1318
|
+
}, { deleteTag: p, clearTag: u, backspaceDeleteTag: f } = Mt({ props: r, state: e, emit: o, nextTick: t, isTagDisabled: l }), { editTag: i, confirmEditTag: c, selectPropChange: m, checkFormValidation: h } = Bt({ props: r, state: e, t: n, nextTick: t, format: xe, emit: o, vm: d }), { handleInput: b, selectFirstMap: x, cancelHandleInput: w } = Ot({ props: r, state: e, emit: o, nextTick: t }), { selectPropItem: E, selectRadioItem: I, selectInputValue: V, createTag: g, helpClick: _, setOperator: v } = Nt({ props: r, emit: o, state: e, t: n, format: xe, nextTick: t, vm: d, cancelHandleInput: w, selectFirstMap: x }), { selectCheckbox: y } = Pt({ props: r, state: e, emit: o, nextTick: t }), { onConfirmDate: k, handleDateShow: $, pickerOptions: C } = Ft({ props: r, state: e, emit: o, nextTick: t, vm: d }), { sizeChange: T, initFormRule: L } = At({ props: r, state: e, t: n, emit: o, nextTick: t, vm: d }), { handleConfirm: O, handleEditConfirm: z } = Ht({ state: e, emit: o, nextTick: t }), { initItems: K, watchOutsideClick: A, watchMouseDown: q, watchMouseMove: D, handleClick: N } = zt({ props: r, state: e }), j = s(() => r.modelValue.length || e.propItem.label || e.inputValue), W = (M) => {
|
|
1319
|
+
const R = M ? ["startDateTime", "endDateTime"] : ["startDate", "endDate"];
|
|
1312
1320
|
t(() => {
|
|
1313
|
-
ie(e,
|
|
1321
|
+
ie(e, R);
|
|
1314
1322
|
});
|
|
1315
|
-
},
|
|
1323
|
+
}, he = () => ({
|
|
1316
1324
|
selectInputValue: V,
|
|
1317
1325
|
selectPropItem: E,
|
|
1318
1326
|
selectRadioItem: I,
|
|
@@ -1321,43 +1329,43 @@ const Ve = (a) => {
|
|
|
1321
1329
|
sizeChange: T,
|
|
1322
1330
|
onConfirmDate: k,
|
|
1323
1331
|
selectFirstMap: x,
|
|
1324
|
-
handleDateShow:
|
|
1325
|
-
validateDateRange:
|
|
1326
|
-
}), Q = (
|
|
1327
|
-
e.placeholder =
|
|
1328
|
-
},
|
|
1329
|
-
r.modelValue.length > 0 ? Q(n("tvp.tvpSearchbox.addPlaceholder")) : Q(
|
|
1332
|
+
handleDateShow: $,
|
|
1333
|
+
validateDateRange: W
|
|
1334
|
+
}), Q = (M) => {
|
|
1335
|
+
e.placeholder = M;
|
|
1336
|
+
}, ne = () => pe(r, n);
|
|
1337
|
+
r.modelValue.length > 0 ? Q(n("tvp.tvpSearchbox.addPlaceholder")) : Q(ne()), Object.assign(a, {
|
|
1330
1338
|
t: n,
|
|
1331
1339
|
state: e,
|
|
1332
|
-
isShowClose:
|
|
1340
|
+
isShowClose: j,
|
|
1333
1341
|
isTagDisabled: l,
|
|
1334
1342
|
deleteTag: p,
|
|
1335
1343
|
editTag: i,
|
|
1336
1344
|
backspaceDeleteTag: f,
|
|
1337
|
-
createTag:
|
|
1345
|
+
createTag: g,
|
|
1338
1346
|
clearTag: u,
|
|
1339
|
-
helpClick:
|
|
1347
|
+
helpClick: _,
|
|
1340
1348
|
handleInput: b,
|
|
1341
|
-
handleClick:
|
|
1342
|
-
handleEvents: (
|
|
1343
|
-
const De =
|
|
1344
|
-
typeof De[
|
|
1349
|
+
handleClick: N,
|
|
1350
|
+
handleEvents: (M, R, J) => {
|
|
1351
|
+
const De = he();
|
|
1352
|
+
typeof De[M] == "function" ? De[M](R, J) : console.warn(`[TinySearchBox] Unknown event: ${M}`);
|
|
1345
1353
|
},
|
|
1346
1354
|
pickerOptions: C,
|
|
1347
|
-
resetInput:
|
|
1355
|
+
resetInput: me,
|
|
1348
1356
|
selectPropChange: m,
|
|
1349
1357
|
confirmEditTag: c,
|
|
1350
1358
|
handleConfirm: O,
|
|
1351
|
-
handleEditConfirm:
|
|
1359
|
+
handleEditConfirm: z,
|
|
1352
1360
|
showDropdown: S,
|
|
1353
1361
|
showPopover: le,
|
|
1354
1362
|
checkFormValidation: h,
|
|
1355
1363
|
setPlaceholder: Q,
|
|
1356
|
-
initItems:
|
|
1357
|
-
initFormRule:
|
|
1358
|
-
watchOutsideClick:
|
|
1359
|
-
watchMouseDown:
|
|
1360
|
-
watchMouseMove:
|
|
1364
|
+
initItems: K,
|
|
1365
|
+
initFormRule: L,
|
|
1366
|
+
watchOutsideClick: A,
|
|
1367
|
+
watchMouseDown: q,
|
|
1368
|
+
watchMouseMove: D
|
|
1361
1369
|
});
|
|
1362
1370
|
}, ea = ({ watch: a, state: e, props: n, api: r, nextTick: o, vm: t }) => {
|
|
1363
1371
|
var f;
|
|
@@ -1367,7 +1375,7 @@ const Ve = (a) => {
|
|
|
1367
1375
|
const { placeholder: c, type: m } = e.prevItem;
|
|
1368
1376
|
c ? r.setPlaceholder(c) : m === "map" ? r.setPlaceholder(F("tvp.tvpSearchbox.tagPlaceholder")) : (i = e.backupList) != null && i.length ? r.setPlaceholder(F("tvp.tvpSearchbox.dynamicPlaceholder", { newValue: e.propItem.label })) : r.setPlaceholder(F("tvp.tvpSearchbox.addPlaceholder"));
|
|
1369
1377
|
} else {
|
|
1370
|
-
const c = n.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") :
|
|
1378
|
+
const c = n.modelValue.length > 0 ? F("tvp.tvpSearchbox.addPlaceholder") : pe(n, F);
|
|
1371
1379
|
r.setPlaceholder(c);
|
|
1372
1380
|
}
|
|
1373
1381
|
}, s = () => {
|
|
@@ -1413,14 +1421,22 @@ const Ve = (a) => {
|
|
|
1413
1421
|
() => {
|
|
1414
1422
|
r.initFormRule();
|
|
1415
1423
|
}
|
|
1424
|
+
), a(
|
|
1425
|
+
() => n.maxlength,
|
|
1426
|
+
() => {
|
|
1427
|
+
r.initFormRule();
|
|
1428
|
+
}
|
|
1416
1429
|
), a(
|
|
1417
1430
|
() => n.items,
|
|
1418
1431
|
(i) => {
|
|
1419
1432
|
const c = e.visible, m = e.prevItem && e.prevItem.field;
|
|
1420
|
-
e.recordItems =
|
|
1433
|
+
e.recordItems = U(i), r.initItems(), r.initFormRule(), o(() => {
|
|
1434
|
+
var h;
|
|
1421
1435
|
if (r.initItems(), r.initFormRule(), c && e.propItem.label) {
|
|
1422
|
-
const
|
|
1423
|
-
e.prevItem =
|
|
1436
|
+
const b = e.recordItems.find((x) => x.field === m) || e.prevItem;
|
|
1437
|
+
e.prevItem = b || {}, e.backupList = b && b.options ? [...b.options] : [], (h = e.backupList) == null || h.forEach((x) => {
|
|
1438
|
+
x.isFilter = !1;
|
|
1439
|
+
}), e.filterList = e.backupList ? [...e.backupList] : [], S(e);
|
|
1424
1440
|
}
|
|
1425
1441
|
});
|
|
1426
1442
|
},
|
|
@@ -1469,7 +1485,7 @@ const Ve = (a) => {
|
|
|
1469
1485
|
const w = `${c.label}${x.label}`;
|
|
1470
1486
|
e.valueMap.set(w, m);
|
|
1471
1487
|
});
|
|
1472
|
-
}), le(e, !1), i.length === 0 && r.setPlaceholder(
|
|
1488
|
+
}), le(e, !1), i.length === 0 && r.setPlaceholder(pe(n, F)), n.editable && !e.inputEditValue.length && i[0]) {
|
|
1473
1489
|
const c = i[0];
|
|
1474
1490
|
if ((e.recordItems.find((h) => h.field === c.field) || c).mergeTag && c.options) {
|
|
1475
1491
|
const h = c.options.flatMap((b) => b.label) || [];
|
|
@@ -1678,13 +1694,13 @@ const na = (a, e, { emit: n }) => {
|
|
|
1678
1694
|
},
|
|
1679
1695
|
t: F
|
|
1680
1696
|
};
|
|
1681
|
-
}, ra = ["isShowSearchOption", "selectInputValue", "selectPropItem", "selectRadioItem", "t"], sa =
|
|
1697
|
+
}, ra = ["isShowSearchOption", "selectInputValue", "selectPropItem", "selectRadioItem", "t"], sa = de({
|
|
1682
1698
|
name: Ee + "SearchBoxFirstLevelPanel",
|
|
1683
1699
|
components: {
|
|
1684
|
-
TinyDropdownItem:
|
|
1700
|
+
TinyDropdownItem: Ne
|
|
1685
1701
|
},
|
|
1686
1702
|
props: {
|
|
1687
|
-
...
|
|
1703
|
+
...fe,
|
|
1688
1704
|
state: {
|
|
1689
1705
|
type: Object,
|
|
1690
1706
|
default: () => ({})
|
|
@@ -2234,14 +2250,14 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2234
2250
|
}, x = (v) => {
|
|
2235
2251
|
p("handleDateShow"), p("validateDateRange", v);
|
|
2236
2252
|
}, w = t(() => {
|
|
2237
|
-
const { prevItem: v, dateRangeFormat: y, datetimeRangeFormat: k } = a.state,
|
|
2238
|
-
if (
|
|
2239
|
-
const { startDate: C, endDate: T } = a.state,
|
|
2240
|
-
return !!(C && T && se(T, C,
|
|
2253
|
+
const { prevItem: v, dateRangeFormat: y, datetimeRangeFormat: k } = a.state, $ = v.type;
|
|
2254
|
+
if ($ === "dateRange") {
|
|
2255
|
+
const { startDate: C, endDate: T } = a.state, L = v.format || y;
|
|
2256
|
+
return !!(C && T && se(T, C, L) < 0);
|
|
2241
2257
|
}
|
|
2242
|
-
if (
|
|
2243
|
-
const { startDateTime: C, endDateTime: T } = a.state,
|
|
2244
|
-
return !!(C && T && se(T, C,
|
|
2258
|
+
if ($ === "datetimeRange") {
|
|
2259
|
+
const { startDateTime: C, endDateTime: T } = a.state, L = v.format || k;
|
|
2260
|
+
return !!(C && T && se(T, C, L) < 0);
|
|
2245
2261
|
}
|
|
2246
2262
|
return !1;
|
|
2247
2263
|
}), E = t(() => {
|
|
@@ -2253,10 +2269,7 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2253
2269
|
}), V = t(() => {
|
|
2254
2270
|
const v = a.state.prevItem.type, y = a.state.backupList || [];
|
|
2255
2271
|
return !v || v === "radio" ? a.state.inputValue ? y.filter((k) => !k.isFilter) : y : y.filter((k) => !k.isFilter);
|
|
2256
|
-
}),
|
|
2257
|
-
const { backupList: v } = a.state;
|
|
2258
|
-
return Array.isArray(v) && !E.value && !V.value.length;
|
|
2259
|
-
}), g = ca(
|
|
2272
|
+
}), g = t(() => a.state.hasBackupList && !E.value && !V.value.length), _ = ca(
|
|
2260
2273
|
{ reactive: d, computed: t },
|
|
2261
2274
|
{
|
|
2262
2275
|
getList: () => V.value,
|
|
@@ -2271,20 +2284,20 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2271
2284
|
return s(
|
|
2272
2285
|
() => a.state.inputValue,
|
|
2273
2286
|
() => {
|
|
2274
|
-
|
|
2287
|
+
_.vsState.scrollTop = 0, r(() => {
|
|
2275
2288
|
o.vsScrollEl && (o.vsScrollEl.scrollTop = 0);
|
|
2276
2289
|
});
|
|
2277
2290
|
}
|
|
2278
2291
|
), s(
|
|
2279
2292
|
() => a.state.prevItem,
|
|
2280
2293
|
() => {
|
|
2281
|
-
|
|
2282
|
-
o.vsScrollEl && (o.vsScrollEl.scrollTop = 0,
|
|
2294
|
+
_.vsState.scrollTop = 0, r(() => {
|
|
2295
|
+
o.vsScrollEl && (o.vsScrollEl.scrollTop = 0, _.handleScroll({ target: o.vsScrollEl }));
|
|
2283
2296
|
});
|
|
2284
2297
|
},
|
|
2285
2298
|
{ deep: !0 }
|
|
2286
2299
|
), l(() => {
|
|
2287
|
-
o.vsScrollEl &&
|
|
2300
|
+
o.vsScrollEl && _.handleScroll({ target: o.vsScrollEl });
|
|
2288
2301
|
}), {
|
|
2289
2302
|
setOperator: u,
|
|
2290
2303
|
selectRadioItem: f,
|
|
@@ -2297,12 +2310,12 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2297
2310
|
isDateRangeInvalid: w,
|
|
2298
2311
|
isLoading: E,
|
|
2299
2312
|
showCheckBoxList: I,
|
|
2300
|
-
showNoData:
|
|
2301
|
-
vsTotalHeight:
|
|
2302
|
-
vsStartIndex:
|
|
2303
|
-
vsOffsetY:
|
|
2304
|
-
vsVisibleItems:
|
|
2305
|
-
vsHandleScroll:
|
|
2313
|
+
showNoData: g,
|
|
2314
|
+
vsTotalHeight: _.totalHeight,
|
|
2315
|
+
vsStartIndex: _.startIndex,
|
|
2316
|
+
vsOffsetY: _.offsetY,
|
|
2317
|
+
vsVisibleItems: _.visibleItems,
|
|
2318
|
+
vsHandleScroll: _.handleScroll,
|
|
2306
2319
|
t: F
|
|
2307
2320
|
};
|
|
2308
2321
|
}, fa = [
|
|
@@ -2324,11 +2337,11 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2324
2337
|
"vsVisibleItems",
|
|
2325
2338
|
"vsHandleScroll",
|
|
2326
2339
|
"t"
|
|
2327
|
-
], va =
|
|
2340
|
+
], va = de({
|
|
2328
2341
|
name: Ee + "SearchBoxSecondLevelPanel",
|
|
2329
2342
|
emits: ["events", "click"],
|
|
2330
2343
|
components: {
|
|
2331
|
-
TinyDropdownItem:
|
|
2344
|
+
TinyDropdownItem: Ne,
|
|
2332
2345
|
TinyCheckbox: Ue,
|
|
2333
2346
|
TinyCheckboxGroup: Ye,
|
|
2334
2347
|
TinyDatePicker: Re,
|
|
@@ -2339,7 +2352,7 @@ const da = (a, e, { emit: n, nextTick: r, refs: o }) => {
|
|
|
2339
2352
|
loading: qe.directive
|
|
2340
2353
|
},
|
|
2341
2354
|
props: {
|
|
2342
|
-
...
|
|
2355
|
+
...fe,
|
|
2343
2356
|
state: {
|
|
2344
2357
|
type: Object,
|
|
2345
2358
|
default: () => ({})
|
|
@@ -2382,13 +2395,13 @@ function ha(a) {
|
|
|
2382
2395
|
}
|
|
2383
2396
|
const ba = /* @__PURE__ */ function() {
|
|
2384
2397
|
return ma.exports;
|
|
2385
|
-
}(), ga =
|
|
2398
|
+
}(), ga = de({
|
|
2386
2399
|
model: {
|
|
2387
2400
|
prop: "modelValue",
|
|
2388
2401
|
event: "update:modelValue"
|
|
2389
2402
|
},
|
|
2390
2403
|
props: {
|
|
2391
|
-
...
|
|
2404
|
+
...fe,
|
|
2392
2405
|
tiny_mode: {
|
|
2393
2406
|
type: String,
|
|
2394
2407
|
default: "pc"
|
|
@@ -2476,15 +2489,15 @@ const ba = /* @__PURE__ */ function() {
|
|
|
2476
2489
|
},
|
|
2477
2490
|
setup(a, e) {
|
|
2478
2491
|
var f, i;
|
|
2479
|
-
const n =
|
|
2492
|
+
const n = ce.getCurrentInstance(), r = n == null ? void 0 : n.parent, o = ((f = r == null ? void 0 : r.type) == null ? void 0 : f.name) === "AsyncComponentWrapper" && (r != null && r.parent) ? r.parent : r, t = (i = o == null ? void 0 : o.setupState) == null ? void 0 : i.state, d = ke({ props: a, context: e, renderless: Qt, api: Zt });
|
|
2480
2493
|
o != null && o.setupState && t && (o.setupState.state = t), o != null && o.ctx && "state" in o.ctx && delete o.ctx.state;
|
|
2481
|
-
const s =
|
|
2494
|
+
const s = ce.inject("form", null), l = () => {
|
|
2482
2495
|
var c;
|
|
2483
2496
|
return a.size || ((c = s == null ? void 0 : s.state) == null ? void 0 : c.size) || (s == null ? void 0 : s.size) || "";
|
|
2484
2497
|
}, p = () => {
|
|
2485
2498
|
var c;
|
|
2486
2499
|
return ((c = s == null ? void 0 : s.state) == null ? void 0 : c.disabled) ?? (s == null ? void 0 : s.disabled) ?? !1;
|
|
2487
|
-
}, u =
|
|
2500
|
+
}, u = ce.reactive({
|
|
2488
2501
|
get size() {
|
|
2489
2502
|
return l();
|
|
2490
2503
|
},
|
|
@@ -2508,7 +2521,7 @@ const ba = /* @__PURE__ */ function() {
|
|
|
2508
2521
|
return ((c = s == null ? void 0 : s.state) == null ? void 0 : c.rules) ?? (s == null ? void 0 : s.rules);
|
|
2509
2522
|
}
|
|
2510
2523
|
});
|
|
2511
|
-
return
|
|
2524
|
+
return ce.provide("form", {
|
|
2512
2525
|
get size() {
|
|
2513
2526
|
return l();
|
|
2514
2527
|
},
|
|
@@ -3156,7 +3169,7 @@ var _a = function() {
|
|
|
3156
3169
|
onConfirm: t.handleEditConfirm
|
|
3157
3170
|
})], 2) : t._e()], 2)] : t._e()], 2)], 2);
|
|
3158
3171
|
}, xa = [];
|
|
3159
|
-
const
|
|
3172
|
+
const Le = {};
|
|
3160
3173
|
var ya = /* @__PURE__ */ Se(
|
|
3161
3174
|
ga,
|
|
3162
3175
|
_a,
|
|
@@ -3168,13 +3181,13 @@ var ya = /* @__PURE__ */ Se(
|
|
|
3168
3181
|
null
|
|
3169
3182
|
);
|
|
3170
3183
|
function wa(a) {
|
|
3171
|
-
for (let e in
|
|
3172
|
-
this[e] =
|
|
3184
|
+
for (let e in Le)
|
|
3185
|
+
this[e] = Le[e];
|
|
3173
3186
|
}
|
|
3174
3187
|
const Va = /* @__PURE__ */ function() {
|
|
3175
3188
|
return ya.exports;
|
|
3176
3189
|
}(), Ia = {
|
|
3177
|
-
...
|
|
3190
|
+
...fe,
|
|
3178
3191
|
tiny_mode: {
|
|
3179
3192
|
type: String,
|
|
3180
3193
|
default: "pc"
|
|
@@ -3263,11 +3276,11 @@ const Va = /* @__PURE__ */ function() {
|
|
|
3263
3276
|
type: Boolean,
|
|
3264
3277
|
default: !1
|
|
3265
3278
|
}
|
|
3266
|
-
}, re =
|
|
3279
|
+
}, re = de({
|
|
3267
3280
|
name: Ee + "SearchBox",
|
|
3268
3281
|
props: Ia,
|
|
3269
3282
|
...Va
|
|
3270
|
-
}), Ea = "3.32.0
|
|
3283
|
+
}), Ea = "3.32.0";
|
|
3271
3284
|
re.install = function(a) {
|
|
3272
3285
|
const e = a;
|
|
3273
3286
|
e && e.config && e.config.globalProperties && Ve(e), e && e.mixin && !e.__TINY_SEARCH_BOX_I18N_MIXIN__ && (e.__TINY_SEARCH_BOX_I18N_MIXIN__ = !0, e.mixin({
|