@nhdropshipping/y-components 1.0.19 → 1.0.21
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/dist/components/ypopover.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +216 -210
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as be, computed as O, createElementBlock as u, openBlock as i, normalizeClass as E, createElementVNode as l, renderSlot as
|
|
1
|
+
import { defineComponent as be, computed as O, createElementBlock as u, openBlock as i, normalizeClass as E, createElementVNode as l, renderSlot as ue, Fragment as re, renderList as he, createCommentVNode as R, toDisplayString as ne, ref as z, watch as le, normalizeStyle as pe, nextTick as ie, onMounted as Se, onUnmounted as Te, resolveComponent as Ve, createVNode as ce, Transition as Ce, withCtx as ve, createTextVNode as De, createBlock as Be, withKeys as xe, withModifiers as Q, withDirectives as Ee, vModelText as tt, Teleport as Ae, vShow as He, provide as nt, reactive as lt, TransitionGroup as ot, resolveDynamicComponent as at, onBeforeUnmount as st, render as Ze } from "vue";
|
|
2
2
|
const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "content" }, ut = {
|
|
3
3
|
key: 1,
|
|
4
4
|
class: "y-btn-group",
|
|
@@ -57,7 +57,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
57
57
|
n("group-click", k.value, S);
|
|
58
58
|
}
|
|
59
59
|
return (k, S) => p.value ? (i(), u("div", ut, [
|
|
60
|
-
(i(!0), u(
|
|
60
|
+
(i(!0), u(re, null, he(e.groupItems, (m, x) => {
|
|
61
61
|
var f;
|
|
62
62
|
return i(), u("button", {
|
|
63
63
|
key: m.value ?? x,
|
|
@@ -109,7 +109,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
109
109
|
onClick: g
|
|
110
110
|
}, [
|
|
111
111
|
l("span", rt, [
|
|
112
|
-
|
|
112
|
+
ue(k.$slots, "default", {}, void 0, !0)
|
|
113
113
|
])
|
|
114
114
|
], 10, it));
|
|
115
115
|
}
|
|
@@ -232,7 +232,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
232
232
|
return t.data;
|
|
233
233
|
const D = t.searchKeyword.toLowerCase();
|
|
234
234
|
return t.data.filter((_) => t.searchFields.some((K) => {
|
|
235
|
-
const B =
|
|
235
|
+
const B = de(_, K);
|
|
236
236
|
return String(B).toLowerCase().includes(D);
|
|
237
237
|
}));
|
|
238
238
|
}), H = O(() => (t.pagination, I.value)), P = O(() => {
|
|
@@ -257,7 +257,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
return D;
|
|
260
|
-
}),
|
|
260
|
+
}), Z = O(() => {
|
|
261
261
|
const D = [];
|
|
262
262
|
let _ = 0;
|
|
263
263
|
const K = [];
|
|
@@ -295,7 +295,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
295
295
|
function ee(D, _) {
|
|
296
296
|
return typeof t.rowKey == "function" ? t.rowKey(D) : D[t.rowKey] || _;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function de(D, _) {
|
|
299
299
|
return _.split(".").reduce((K, B) => K == null ? void 0 : K[B], D);
|
|
300
300
|
}
|
|
301
301
|
function we(D, _ = !1) {
|
|
@@ -308,13 +308,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
308
308
|
const F = ye(_, "left"), N = G.value[F] || 0;
|
|
309
309
|
B.left = `${N}px`, B.zIndex = K ? `${10 + F}` : `${5 + F}`;
|
|
310
310
|
} else if (D.fixed === "right") {
|
|
311
|
-
const F = ye(_, "right"), N =
|
|
311
|
+
const F = ye(_, "right"), N = Z.value[F] || 0;
|
|
312
312
|
K ? B.right = `${N - 3}px` : B.right = `${N}px`, B.zIndex = K ? `${10 + F}` : `${5 + F}`;
|
|
313
313
|
}
|
|
314
314
|
return B;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
const K =
|
|
316
|
+
function fe(D, _) {
|
|
317
|
+
const K = de(D, _.key);
|
|
318
318
|
return _.formatter ? _.formatter(K, D) : K || "";
|
|
319
319
|
}
|
|
320
320
|
function Y(D) {
|
|
@@ -352,7 +352,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
352
352
|
h.value !== _ && (h.value = _);
|
|
353
353
|
});
|
|
354
354
|
function s() {
|
|
355
|
-
k.value &&
|
|
355
|
+
k.value && ie(() => {
|
|
356
356
|
const D = k.value.getBoundingClientRect(), _ = window.innerHeight, K = D.top, B = k.value.querySelector(".table-header"), F = B ? B.offsetHeight : 40, N = k.value.querySelector(".ypagination"), te = N ? N.offsetHeight : 60, a = k.value.querySelector(".bulk-bar"), c = a ? a.offsetHeight : 0, M = F + te + c + 20, W = _ - K - M, oe = Math.max(200, W), se = k.value.querySelector(".table-body-wrap .table");
|
|
357
357
|
se && (se.offsetHeight > W ? L.value = `${oe}px` : L.value = "none");
|
|
358
358
|
});
|
|
@@ -369,7 +369,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
369
369
|
}));
|
|
370
370
|
}
|
|
371
371
|
function V() {
|
|
372
|
-
|
|
372
|
+
ie(() => {
|
|
373
373
|
if (!m.value) return;
|
|
374
374
|
const D = m.value, _ = D.scrollHeight, K = D.clientHeight, B = D.scrollTop, F = _ > K + 1;
|
|
375
375
|
if (j.value.show = F, !F) return;
|
|
@@ -379,17 +379,17 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
379
379
|
j.value.thumbTop = Math.min(M, Math.floor(B / W * M));
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function J(D) {
|
|
383
383
|
if (!U || !m.value || !C.value) return;
|
|
384
384
|
D.preventDefault();
|
|
385
385
|
const _ = C.value.clientHeight, K = Math.max(0, _ - j.value.thumbHeight), B = m.value, F = B.scrollHeight, N = B.clientHeight, te = Math.max(1, F - N), c = (D.clientY - A) / Math.max(1, K) * te;
|
|
386
386
|
B.scrollTop = Math.min(te, Math.max(0, $ + c)), V();
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
U = !1, window.removeEventListener("mousemove",
|
|
388
|
+
function X() {
|
|
389
|
+
U = !1, window.removeEventListener("mousemove", J), window.removeEventListener("mouseup", X);
|
|
390
390
|
}
|
|
391
391
|
function Me() {
|
|
392
|
-
|
|
392
|
+
ie(() => {
|
|
393
393
|
var K;
|
|
394
394
|
if (f.value.length === t.columns.length && f.value.every((B) => !!B))
|
|
395
395
|
return;
|
|
@@ -423,39 +423,39 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
423
423
|
s(), _e();
|
|
424
424
|
}
|
|
425
425
|
le(() => t.data, () => {
|
|
426
|
-
|
|
426
|
+
ie(() => {
|
|
427
427
|
s(), y(), _e();
|
|
428
428
|
});
|
|
429
429
|
}, { deep: !0 }), le([g, h], () => {
|
|
430
|
-
|
|
430
|
+
ie(() => {
|
|
431
431
|
s(), y(), _e();
|
|
432
432
|
});
|
|
433
433
|
}), le(() => t.columns, () => {
|
|
434
|
-
f.value = [],
|
|
434
|
+
f.value = [], ie(() => {
|
|
435
435
|
Me(), y(), _e();
|
|
436
436
|
});
|
|
437
437
|
}, { deep: !0 }), le(() => p.value, () => {
|
|
438
|
-
|
|
438
|
+
ie(() => {
|
|
439
439
|
s(), _e();
|
|
440
440
|
});
|
|
441
441
|
}, { deep: !0 }), le(() => t.loading, () => {
|
|
442
|
-
|
|
442
|
+
ie(() => {
|
|
443
443
|
_e();
|
|
444
444
|
});
|
|
445
445
|
}), Se(() => {
|
|
446
446
|
var D, _;
|
|
447
|
-
|
|
447
|
+
ie(() => {
|
|
448
448
|
s(), Me(), _e(), V();
|
|
449
449
|
}), window.addEventListener("resize", Re), window.addEventListener("scroll", Re, !0), (D = m.value) == null || D.addEventListener("scroll", () => {
|
|
450
450
|
y(), V(), _e();
|
|
451
451
|
}, { passive: !0 }), (_ = S.value) == null || _.addEventListener("scroll", () => {
|
|
452
452
|
w();
|
|
453
|
-
}, { passive: !0 }),
|
|
453
|
+
}, { passive: !0 }), ie(() => y()), m.value && typeof ResizeObserver < "u" && (Ke = new ResizeObserver(() => {
|
|
454
454
|
_e();
|
|
455
455
|
}), Ke.observe(m.value));
|
|
456
456
|
}), Te(() => {
|
|
457
457
|
var D, _;
|
|
458
|
-
window.removeEventListener("resize", Re), window.removeEventListener("scroll", Re, !0), (D = m.value) == null || D.removeEventListener("scroll", y), (_ = S.value) == null || _.removeEventListener("scroll", w), window.removeEventListener("mousemove",
|
|
458
|
+
window.removeEventListener("resize", Re), window.removeEventListener("scroll", Re, !0), (D = m.value) == null || D.removeEventListener("scroll", y), (_ = S.value) == null || _.removeEventListener("scroll", w), window.removeEventListener("mousemove", J), window.removeEventListener("mouseup", X), Ke && (Ke.disconnect(), Ke = null);
|
|
459
459
|
});
|
|
460
460
|
let ze = -1;
|
|
461
461
|
function _e() {
|
|
@@ -477,16 +477,16 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
477
477
|
ref_key: "tableContainer",
|
|
478
478
|
ref: k
|
|
479
479
|
}, [
|
|
480
|
-
|
|
480
|
+
ce(Ce, { name: "bulk-slide" }, {
|
|
481
481
|
default: ve(() => [
|
|
482
482
|
p.value.length && e.showBulkActions ? (i(), u("div", mt, [
|
|
483
483
|
l("div", wt, "已选择 " + ne(p.value.length) + " 项", 1),
|
|
484
484
|
l("div", bt, [
|
|
485
|
-
|
|
485
|
+
ue(D.$slots, "bulk-actions", {
|
|
486
486
|
selectedItems: p.value,
|
|
487
487
|
clearSelection: v
|
|
488
488
|
}, () => [
|
|
489
|
-
|
|
489
|
+
ce(K, {
|
|
490
490
|
size: "small",
|
|
491
491
|
class: "btn",
|
|
492
492
|
onClick: v
|
|
@@ -511,7 +511,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
511
511
|
l("table", xt, [
|
|
512
512
|
l("colgroup", null, [
|
|
513
513
|
e.selectable ? (i(), u("col", Ct)) : R("", !0),
|
|
514
|
-
(i(!0), u(
|
|
514
|
+
(i(!0), u(re, null, he(e.columns, (F, N) => (i(), u("col", {
|
|
515
515
|
key: F.key,
|
|
516
516
|
style: pe({ width: f.value[N] || void 0, minWidth: f.value[N] || "80px" })
|
|
517
517
|
}, null, 4))), 128))
|
|
@@ -525,7 +525,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
525
525
|
onChange: q
|
|
526
526
|
}, null, 40, $t)
|
|
527
527
|
])) : R("", !0),
|
|
528
|
-
(i(!0), u(
|
|
528
|
+
(i(!0), u(re, null, he(e.columns, (F, N) => (i(), u("th", {
|
|
529
529
|
key: F.key,
|
|
530
530
|
class: E(we(F, !0)),
|
|
531
531
|
style: pe(me(F, N, !0))
|
|
@@ -545,7 +545,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
545
545
|
l("div", { class: "loading-text" }, "加载中...", -1)
|
|
546
546
|
])])) : R("", !0),
|
|
547
547
|
!H.value.length && !e.loading ? (i(), u("div", St, [
|
|
548
|
-
|
|
548
|
+
ue(D.$slots, "empty", {}, () => [
|
|
549
549
|
De(ne(e.emptyText), 1)
|
|
550
550
|
], !0)
|
|
551
551
|
])) : R("", !0),
|
|
@@ -556,13 +556,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
556
556
|
}, [
|
|
557
557
|
l("colgroup", null, [
|
|
558
558
|
e.selectable ? (i(), u("col", Mt)) : R("", !0),
|
|
559
|
-
(i(!0), u(
|
|
559
|
+
(i(!0), u(re, null, he(e.columns, (F, N) => (i(), u("col", {
|
|
560
560
|
key: F.key,
|
|
561
561
|
style: pe({ width: f.value[N] || void 0, minWidth: f.value[N] || "80px" })
|
|
562
562
|
}, null, 4))), 128))
|
|
563
563
|
]),
|
|
564
564
|
l("tbody", null, [
|
|
565
|
-
(i(!0), u(
|
|
565
|
+
(i(!0), u(re, null, he(H.value, (F, N) => (i(), u("tr", {
|
|
566
566
|
key: ee(F, N)
|
|
567
567
|
}, [
|
|
568
568
|
e.selectable ? (i(), u("td", Lt, [
|
|
@@ -573,17 +573,17 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
573
573
|
onChange: (te) => Y(ee(F, N))
|
|
574
574
|
}, null, 40, It)
|
|
575
575
|
])) : R("", !0),
|
|
576
|
-
(i(!0), u(
|
|
576
|
+
(i(!0), u(re, null, he(e.columns, (te, a) => (i(), u("td", {
|
|
577
577
|
key: te.key,
|
|
578
578
|
class: E(we(te)),
|
|
579
579
|
style: pe(me(te, a, !1))
|
|
580
580
|
}, [
|
|
581
|
-
|
|
581
|
+
ue(D.$slots, `cell-${te.key}`, {
|
|
582
582
|
item: F,
|
|
583
|
-
value:
|
|
583
|
+
value: de(F, te.key),
|
|
584
584
|
index: N
|
|
585
585
|
}, () => [
|
|
586
|
-
De(ne(
|
|
586
|
+
De(ne(fe(F, te)), 1)
|
|
587
587
|
], !0)
|
|
588
588
|
], 6))), 128))
|
|
589
589
|
]))), 128))
|
|
@@ -640,11 +640,11 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
640
640
|
return o.left = `${r.left}px`, o.width = `${y}px`, m.value ? (o.bottom = `${window.innerHeight - r.top + 4}px`, o.top = "auto") : o.top = `${r.bottom + 4}px`, o;
|
|
641
641
|
});
|
|
642
642
|
function $() {
|
|
643
|
-
!g.value || !L.value ||
|
|
643
|
+
!g.value || !L.value || ie(() => {
|
|
644
644
|
const o = L.value;
|
|
645
645
|
if (!o) return;
|
|
646
|
-
const s = o.getBoundingClientRect(), r = window.innerHeight, y = 200, w = s.bottom + y + 4, V = s.top - y - 4,
|
|
647
|
-
m.value = !
|
|
646
|
+
const s = o.getBoundingClientRect(), r = window.innerHeight, y = 200, w = s.bottom + y + 4, V = s.top - y - 4, J = w <= r - 20, X = V >= 20;
|
|
647
|
+
m.value = !J && X;
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
650
|
function T(o) {
|
|
@@ -662,18 +662,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
662
662
|
function G(o) {
|
|
663
663
|
return typeof o == "object" && o !== null ? o[t.disabledKey] === !0 : !1;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Z() {
|
|
666
666
|
t.disabled || (g.value ? ee() : ye());
|
|
667
667
|
}
|
|
668
668
|
function ye() {
|
|
669
|
-
t.disabled || (g.value = !0,
|
|
669
|
+
t.disabled || (g.value = !0, ie(() => {
|
|
670
670
|
$(), Y(), t.filterable && x.value && (x.value.focus(), f.value = "");
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
function ee() {
|
|
674
674
|
g.value = !1, h.value = -1, m.value = !1, t.filterable && (f.value = "");
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function de(o, s) {
|
|
677
677
|
if (G(o)) return;
|
|
678
678
|
const r = T(o);
|
|
679
679
|
n("update:modelValue", r), n("change", r, o), ee();
|
|
@@ -696,10 +696,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
696
696
|
s = (s + o + r) % r, y++;
|
|
697
697
|
h.value = y >= r ? -1 : s, q();
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function fe() {
|
|
700
700
|
if (h.value < 0) return;
|
|
701
701
|
const o = U.value[h.value];
|
|
702
|
-
!o || G(o) ||
|
|
702
|
+
!o || G(o) || de(o, h.value);
|
|
703
703
|
}
|
|
704
704
|
function Y() {
|
|
705
705
|
if (!p.value) return;
|
|
@@ -739,13 +739,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
739
739
|
"yselect__trigger--disabled": e.disabled,
|
|
740
740
|
"yselect__trigger--error": e.error
|
|
741
741
|
}]),
|
|
742
|
-
onMousedown: Z
|
|
742
|
+
onMousedown: Q(Z, ["prevent", "stop"]),
|
|
743
743
|
onKeydown: [
|
|
744
|
-
xe(Z
|
|
745
|
-
xe(Z
|
|
744
|
+
xe(Q(Z, ["prevent"]), ["enter"]),
|
|
745
|
+
xe(Q(Z, ["prevent"]), ["space"]),
|
|
746
746
|
xe(ee, ["escape"]),
|
|
747
|
-
xe(
|
|
748
|
-
xe(
|
|
747
|
+
xe(Q(ye, ["prevent"]), ["arrow-down"]),
|
|
748
|
+
xe(Q(ye, ["prevent"]), ["arrow-up"])
|
|
749
749
|
],
|
|
750
750
|
tabindex: "0",
|
|
751
751
|
role: "combobox",
|
|
@@ -756,13 +756,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
756
756
|
key: 0,
|
|
757
757
|
class: E(["yselect__value", { yselect__placeholder: !j.value }])
|
|
758
758
|
}, [
|
|
759
|
-
|
|
759
|
+
ue(o.$slots, "value", {
|
|
760
760
|
value: C.value,
|
|
761
761
|
label: j.value
|
|
762
762
|
}, () => {
|
|
763
763
|
var r;
|
|
764
764
|
return [
|
|
765
|
-
C.value ? (i(), u(
|
|
765
|
+
C.value ? (i(), u(re, { key: 0 }, [
|
|
766
766
|
(r = C.value) != null && r.flagImg ? (i(), u("img", {
|
|
767
767
|
key: 0,
|
|
768
768
|
class: "yselect__flag",
|
|
@@ -770,7 +770,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
770
770
|
alt: "flag"
|
|
771
771
|
}, null, 8, zt)) : R("", !0),
|
|
772
772
|
De(" " + ne(j.value), 1)
|
|
773
|
-
], 64)) : (i(), u(
|
|
773
|
+
], 64)) : (i(), u(re, { key: 1 }, [
|
|
774
774
|
De(ne(e.placeholder), 1)
|
|
775
775
|
], 64))
|
|
776
776
|
];
|
|
@@ -784,13 +784,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
784
784
|
placeholder: j.value || e.placeholder,
|
|
785
785
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => f.value = r),
|
|
786
786
|
onKeydown: [
|
|
787
|
-
s[1] || (s[1] =
|
|
787
|
+
s[1] || (s[1] = Q(() => {
|
|
788
788
|
}, ["stop"])),
|
|
789
|
-
s[2] || (s[2] = xe(
|
|
790
|
-
s[3] || (s[3] = xe(
|
|
791
|
-
s[4] || (s[4] = xe(
|
|
792
|
-
xe(
|
|
793
|
-
xe(
|
|
789
|
+
s[2] || (s[2] = xe(Q((r) => me(1), ["prevent"]), ["arrow-down"])),
|
|
790
|
+
s[3] || (s[3] = xe(Q((r) => me(-1), ["prevent"]), ["arrow-up"])),
|
|
791
|
+
s[4] || (s[4] = xe(Q((r) => fe(), ["prevent"]), ["enter"])),
|
|
792
|
+
xe(Q(ee, ["prevent"]), ["esc"]),
|
|
793
|
+
xe(Q(we, ["prevent"]), ["delete"])
|
|
794
794
|
]
|
|
795
795
|
}, null, 40, Kt)), [
|
|
796
796
|
[tt, f.value]
|
|
@@ -799,7 +799,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
799
799
|
key: 2,
|
|
800
800
|
class: "yselect__clear",
|
|
801
801
|
title: "清空",
|
|
802
|
-
onClick:
|
|
802
|
+
onClick: Q(we, ["stop"])
|
|
803
803
|
}, [...s[8] || (s[8] = [
|
|
804
804
|
l("svg", {
|
|
805
805
|
width: "12",
|
|
@@ -834,7 +834,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
834
834
|
], -1)
|
|
835
835
|
])], 2)
|
|
836
836
|
], 42, Tt),
|
|
837
|
-
|
|
837
|
+
ce(Ce, { name: "yselect-dropdown" }, {
|
|
838
838
|
default: ve(() => [
|
|
839
839
|
(i(), Be(Ae, { to: "body" }, [
|
|
840
840
|
g.value ? (i(), u("div", {
|
|
@@ -843,9 +843,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
843
843
|
ref: S,
|
|
844
844
|
class: E(["yselect__dropdown yselect__dropdown--portal", { "yselect__dropdown--top": m.value }]),
|
|
845
845
|
style: pe(A.value),
|
|
846
|
-
onMousedown: s[6] || (s[6] =
|
|
846
|
+
onMousedown: s[6] || (s[6] = Q(() => {
|
|
847
847
|
}, ["stop"])),
|
|
848
|
-
onClick: s[7] || (s[7] =
|
|
848
|
+
onClick: s[7] || (s[7] = Q(() => {
|
|
849
849
|
}, ["stop"]))
|
|
850
850
|
}, [
|
|
851
851
|
l("div", {
|
|
@@ -853,18 +853,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
853
853
|
ref_key: "optionsContainer",
|
|
854
854
|
ref: p
|
|
855
855
|
}, [
|
|
856
|
-
(i(!0), u(
|
|
856
|
+
(i(!0), u(re, null, he(U.value, (r, y) => (i(), u("div", {
|
|
857
857
|
key: H(r, y),
|
|
858
858
|
class: E(["yselect__option", {
|
|
859
859
|
"yselect__option--selected": P(r),
|
|
860
860
|
"yselect__option--disabled": G(r),
|
|
861
861
|
"yselect__option--hover": h.value === y
|
|
862
862
|
}]),
|
|
863
|
-
onClick: (w) =>
|
|
863
|
+
onClick: (w) => de(r),
|
|
864
864
|
onMouseenter: (w) => h.value = y,
|
|
865
865
|
onMouseleave: s[5] || (s[5] = (w) => h.value = -1)
|
|
866
866
|
}, [
|
|
867
|
-
|
|
867
|
+
ue(o.$slots, "option", {
|
|
868
868
|
option: r,
|
|
869
869
|
index: y,
|
|
870
870
|
selected: P(r)
|
|
@@ -925,7 +925,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
925
925
|
const f = Ve("YButton"), C = Ve("YSelect");
|
|
926
926
|
return i(), u("div", At, [
|
|
927
927
|
l("div", Ft, [
|
|
928
|
-
|
|
928
|
+
ce(f, {
|
|
929
929
|
size: "small",
|
|
930
930
|
variant: "secondary",
|
|
931
931
|
disabled: p.value === 1 || e.loading,
|
|
@@ -936,7 +936,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
936
936
|
])]),
|
|
937
937
|
_: 1
|
|
938
938
|
}, 8, ["disabled"]),
|
|
939
|
-
|
|
939
|
+
ce(f, {
|
|
940
940
|
class: "ml-1",
|
|
941
941
|
variant: "secondary",
|
|
942
942
|
size: "small",
|
|
@@ -947,7 +947,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
947
947
|
onGroupClick: S
|
|
948
948
|
}, null, 8, ["groupItems"]),
|
|
949
949
|
l("div", Wt, [
|
|
950
|
-
|
|
950
|
+
ce(C, {
|
|
951
951
|
modelValue: g.value,
|
|
952
952
|
"onUpdate:modelValue": x[1] || (x[1] = (j) => g.value = j),
|
|
953
953
|
options: h.value,
|
|
@@ -1103,7 +1103,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1103
1103
|
])]))
|
|
1104
1104
|
])) : R("", !0),
|
|
1105
1105
|
l("span", tn, [
|
|
1106
|
-
|
|
1106
|
+
ue(g.$slots, "default", {}, () => [
|
|
1107
1107
|
De(ne(e.label), 1)
|
|
1108
1108
|
], !0)
|
|
1109
1109
|
])
|
|
@@ -1171,18 +1171,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1171
1171
|
class: "y-dialog-mask",
|
|
1172
1172
|
onClick: L
|
|
1173
1173
|
}),
|
|
1174
|
-
|
|
1174
|
+
ce(Ce, { name: "dialog-zoom-fade" }, {
|
|
1175
1175
|
default: ve(() => [
|
|
1176
1176
|
Ee(l("div", {
|
|
1177
1177
|
ref_key: "panelRef",
|
|
1178
1178
|
ref: h,
|
|
1179
1179
|
class: E(["y-dialog-panel", [e.center ? "is-center" : ""]]),
|
|
1180
1180
|
style: pe(p.value),
|
|
1181
|
-
onKeydown: xe(
|
|
1181
|
+
onKeydown: xe(Q(S, ["prevent", "stop"]), ["esc"]),
|
|
1182
1182
|
tabindex: "-1"
|
|
1183
1183
|
}, [
|
|
1184
1184
|
e.showHeader ? (i(), u("div", sn, [
|
|
1185
|
-
|
|
1185
|
+
ue(x.$slots, "header", {}, () => [
|
|
1186
1186
|
l("div", rn, ne(e.title), 1)
|
|
1187
1187
|
], !0),
|
|
1188
1188
|
e.closable ? (i(), u("button", {
|
|
@@ -1194,10 +1194,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1194
1194
|
}, " ✕ ")) : R("", !0)
|
|
1195
1195
|
])) : R("", !0),
|
|
1196
1196
|
l("div", un, [
|
|
1197
|
-
|
|
1197
|
+
ue(x.$slots, "default", {}, void 0, !0)
|
|
1198
1198
|
]),
|
|
1199
1199
|
x.$slots.footer ? (i(), u("div", cn, [
|
|
1200
|
-
|
|
1200
|
+
ue(x.$slots, "footer", {}, void 0, !0)
|
|
1201
1201
|
])) : R("", !0)
|
|
1202
1202
|
], 46, an), [
|
|
1203
1203
|
[He, g.value]
|
|
@@ -1246,9 +1246,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1246
1246
|
return n.placement.startsWith("top") || n.placement.startsWith("bottom") ? Y.left = "50%" : Y.top = "50%", Y;
|
|
1247
1247
|
});
|
|
1248
1248
|
function A() {
|
|
1249
|
-
var
|
|
1249
|
+
var J, X;
|
|
1250
1250
|
if (!S.value) return { top: 0, left: 0 };
|
|
1251
|
-
const { width: Y, height: q, top: v, left: d } = S.value, o = ((
|
|
1251
|
+
const { width: Y, height: q, top: v, left: d } = S.value, o = ((J = L.value) == null ? void 0 : J.offsetWidth) || 200, s = ((X = L.value) == null ? void 0 : X.offsetHeight) || 100;
|
|
1252
1252
|
let r = 0, y = 0;
|
|
1253
1253
|
switch (n.placement) {
|
|
1254
1254
|
case "top":
|
|
@@ -1297,9 +1297,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1297
1297
|
}, n.openDelay) : T());
|
|
1298
1298
|
}
|
|
1299
1299
|
function T() {
|
|
1300
|
-
g("before-show"), k.value = !0, g("update:modelValue", !0), g("show"),
|
|
1301
|
-
|
|
1302
|
-
|
|
1300
|
+
g("before-show"), k.value = !0, g("update:modelValue", !0), g("show"), ie(() => {
|
|
1301
|
+
ie(() => {
|
|
1302
|
+
Z();
|
|
1303
1303
|
});
|
|
1304
1304
|
});
|
|
1305
1305
|
}
|
|
@@ -1345,7 +1345,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1345
1345
|
}
|
|
1346
1346
|
x.value = v;
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function Z() {
|
|
1349
1349
|
p.value && (S.value = p.value.getBoundingClientRect(), L.value && (m.value = L.value.getBoundingClientRect(), G(), k.value && requestAnimationFrame(() => {
|
|
1350
1350
|
L.value && (m.value = L.value.getBoundingClientRect(), G());
|
|
1351
1351
|
})));
|
|
@@ -1356,7 +1356,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1356
1356
|
function ee() {
|
|
1357
1357
|
n.disabled || n.trigger !== "hover" || (P(), $());
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1359
|
+
function de() {
|
|
1360
1360
|
n.disabled || n.trigger !== "hover" || I();
|
|
1361
1361
|
}
|
|
1362
1362
|
function we() {
|
|
@@ -1365,7 +1365,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1365
1365
|
function me() {
|
|
1366
1366
|
n.disabled || n.trigger !== "hover" || I();
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function fe(Y) {
|
|
1369
1369
|
if (!n.closeOnClickOutside || !k.value) return;
|
|
1370
1370
|
const q = Y.target;
|
|
1371
1371
|
h.value && !h.value.contains(q) && L.value && !L.value.contains(q) && I();
|
|
@@ -1373,15 +1373,21 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1373
1373
|
return le(() => n.modelValue, (Y) => {
|
|
1374
1374
|
Y !== k.value && (Y ? $() : I());
|
|
1375
1375
|
}), le(k, (Y) => {
|
|
1376
|
-
Y ? (document.addEventListener("click",
|
|
1376
|
+
Y ? (document.addEventListener("click", fe), window.addEventListener("resize", Z), window.addEventListener("scroll", Z, !0), ie(() => {
|
|
1377
|
+
Z(), requestAnimationFrame(() => {
|
|
1378
|
+
Z();
|
|
1379
|
+
}), setTimeout(() => {
|
|
1380
|
+
Z();
|
|
1381
|
+
}, 0);
|
|
1382
|
+
})) : (document.removeEventListener("click", fe), window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0));
|
|
1377
1383
|
}), Se(() => {
|
|
1378
1384
|
n.modelValue && $();
|
|
1379
1385
|
}), Te(() => {
|
|
1380
|
-
P(), document.removeEventListener("click",
|
|
1386
|
+
P(), document.removeEventListener("click", fe), window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0);
|
|
1381
1387
|
}), b({
|
|
1382
1388
|
show: $,
|
|
1383
1389
|
hide: I,
|
|
1384
|
-
updatePosition:
|
|
1390
|
+
updatePosition: Z
|
|
1385
1391
|
}), (Y, q) => (i(), u("div", {
|
|
1386
1392
|
class: "ypopover",
|
|
1387
1393
|
ref_key: "popoverRef",
|
|
@@ -1392,12 +1398,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1392
1398
|
ref: p,
|
|
1393
1399
|
onClick: ye,
|
|
1394
1400
|
onMouseenter: ee,
|
|
1395
|
-
onMouseleave:
|
|
1401
|
+
onMouseleave: de
|
|
1396
1402
|
}, [
|
|
1397
|
-
|
|
1403
|
+
ue(Y.$slots, "reference", {}, void 0, !0)
|
|
1398
1404
|
], 544),
|
|
1399
1405
|
(i(), Be(Ae, { to: "body" }, [
|
|
1400
|
-
|
|
1406
|
+
ce(Ce, { name: "ypopover-fade" }, {
|
|
1401
1407
|
default: ve(() => [
|
|
1402
1408
|
k.value ? (i(), u("div", {
|
|
1403
1409
|
key: 0,
|
|
@@ -1411,7 +1417,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1411
1417
|
}
|
|
1412
1418
|
]]),
|
|
1413
1419
|
style: pe(j.value),
|
|
1414
|
-
onClick: q[0] || (q[0] =
|
|
1420
|
+
onClick: q[0] || (q[0] = Q(() => {
|
|
1415
1421
|
}, ["stop"])),
|
|
1416
1422
|
onMouseenter: we,
|
|
1417
1423
|
onMouseleave: me
|
|
@@ -1422,7 +1428,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1422
1428
|
style: pe(U.value)
|
|
1423
1429
|
}, null, 6)) : R("", !0),
|
|
1424
1430
|
l("div", vn, [
|
|
1425
|
-
|
|
1431
|
+
ue(Y.$slots, "default", {}, void 0, !0)
|
|
1426
1432
|
])
|
|
1427
1433
|
], 38)) : R("", !0)
|
|
1428
1434
|
]),
|
|
@@ -1431,7 +1437,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1431
1437
|
]))
|
|
1432
1438
|
], 512));
|
|
1433
1439
|
}
|
|
1434
|
-
}), pn = /* @__PURE__ */ ke(hn, [["__scopeId", "data-v-
|
|
1440
|
+
}), pn = /* @__PURE__ */ ke(hn, [["__scopeId", "data-v-be755399"]]), yn = { class: "relative" }, gn = ["value", "placeholder"], mn = { class: "nh-time-suffix" }, wn = { class: "nh-time-shortcuts" }, bn = { class: "nh-time-shortcuts-list" }, kn = ["onClick", "onKeydown", "onMouseenter"], xn = { class: "nh-time-custom" }, Cn = { class: "nh-time-custom-header" }, Dn = { class: "nh-time-selection-status" }, $n = {
|
|
1435
1441
|
key: 0,
|
|
1436
1442
|
class: "status-text"
|
|
1437
1443
|
}, _n = {
|
|
@@ -1539,7 +1545,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1539
1545
|
} : t.format === "timestamp" ? {
|
|
1540
1546
|
startDate: H(a.startDate),
|
|
1541
1547
|
endDate: H(a.endDate)
|
|
1542
|
-
} : a,
|
|
1548
|
+
} : a, Z = (a, c) => `${String(c + 1).padStart(2, "0")}/${a}`, ye = (a, c) => a.getFullYear() === c.getFullYear() && a.getMonth() === c.getMonth() && a.getDate() === c.getDate(), ee = (a, c, M) => !c || !M ? !1 : a >= c && a <= M, de = (a) => {
|
|
1543
1549
|
const c = P(a);
|
|
1544
1550
|
if (!(c != null && c.startDate) || !(c != null && c.endDate))
|
|
1545
1551
|
return -1;
|
|
@@ -1616,7 +1622,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1616
1622
|
}, me = (a) => {
|
|
1617
1623
|
const c = G(a);
|
|
1618
1624
|
n("update:modelValue", c), n("change", c);
|
|
1619
|
-
},
|
|
1625
|
+
}, fe = () => {
|
|
1620
1626
|
if (!k.value || !S.value) return;
|
|
1621
1627
|
const a = k.value.getBoundingClientRect(), c = S.value.getBoundingClientRect(), M = window.innerWidth, ae = window.innerHeight - a.bottom, oe = a.top, se = c.height || 400;
|
|
1622
1628
|
ae < se && oe > se ? m.value.top = !1 : m.value.top = !0;
|
|
@@ -1625,22 +1631,22 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1625
1631
|
}, Y = () => {
|
|
1626
1632
|
if (g.value = !g.value, g.value) {
|
|
1627
1633
|
const a = P(t.modelValue);
|
|
1628
|
-
if (A.value = (a == null ? void 0 : a.startDate) || null, $.value = (a == null ? void 0 : a.endDate) || null, p.value =
|
|
1634
|
+
if (A.value = (a == null ? void 0 : a.startDate) || null, $.value = (a == null ? void 0 : a.endDate) || null, p.value = de(t.modelValue), h.value = -1, a != null && a.startDate && (x.value.year = a.startDate.getFullYear(), x.value.month = a.startDate.getMonth()), a != null && a.endDate)
|
|
1629
1635
|
f.value.year = a.endDate.getFullYear(), f.value.month = a.endDate.getMonth();
|
|
1630
1636
|
else {
|
|
1631
1637
|
const c = new Date(x.value.year, x.value.month + 1);
|
|
1632
1638
|
f.value.year = c.getFullYear(), f.value.month = c.getMonth();
|
|
1633
1639
|
}
|
|
1634
|
-
C(),
|
|
1635
|
-
|
|
1640
|
+
C(), ie(() => {
|
|
1641
|
+
fe();
|
|
1636
1642
|
});
|
|
1637
1643
|
}
|
|
1638
1644
|
}, q = (a) => {
|
|
1639
1645
|
const c = a.target, M = k.value, W = S.value;
|
|
1640
1646
|
M && W && !M.contains(c) && !W.contains(c) && (g.value = !1, h.value = -1);
|
|
1641
1647
|
}, v = (a) => {
|
|
1642
|
-
a.key === "Enter" || a.key === " " ? (a.preventDefault(), Y()) : a.key === "ArrowDown" && (a.preventDefault(), g.value = !0,
|
|
1643
|
-
|
|
1648
|
+
a.key === "Enter" || a.key === " " ? (a.preventDefault(), Y()) : a.key === "ArrowDown" && (a.preventDefault(), g.value = !0, ie(() => {
|
|
1649
|
+
fe(), y();
|
|
1644
1650
|
}));
|
|
1645
1651
|
}, d = (a) => {
|
|
1646
1652
|
var c;
|
|
@@ -1661,7 +1667,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1661
1667
|
}, V = (a) => {
|
|
1662
1668
|
const c = a.getValue();
|
|
1663
1669
|
t.includeTime && c.startDate && c.endDate && (c.startDate.setHours(0, 0, 0, 0), c.endDate.setHours(23, 59, 59, 999)), me(c), p.value = t.shortcuts.findIndex((M) => M.label === a.label), h.value = -1, g.value = !1;
|
|
1664
|
-
},
|
|
1670
|
+
}, J = (a, c) => {
|
|
1665
1671
|
if (!a || a.isDisabled) return;
|
|
1666
1672
|
let M;
|
|
1667
1673
|
if (t.includeTime ? (M = new Date(a.date), c === "start" || !A.value ? M.setHours(0, 0, 0, 0) : M.setHours(23, 59, 59, 999)) : M = new Date(a.date.getFullYear(), a.date.getMonth(), a.date.getDate()), !A.value && !$.value)
|
|
@@ -1683,17 +1689,17 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1683
1689
|
};
|
|
1684
1690
|
} else
|
|
1685
1691
|
L.value = null;
|
|
1686
|
-
},
|
|
1692
|
+
}, X = (a, c) => {
|
|
1687
1693
|
if (!a) return ["nh-date-table-td"];
|
|
1688
1694
|
const M = ["nh-date-table-td"];
|
|
1689
1695
|
return a.isCurrentMonth || M.push("is-prev-month"), a.isToday && M.push("is-today"), a.isDisabled && M.push("is-disabled"), A.value && ye(a.date, A.value) && M.push("is-selected", "is-start"), $.value && ye(a.date, $.value) && M.push("is-selected", "is-end"), A.value && $.value && ee(a.date, A.value, $.value) && M.push("is-in-range"), M;
|
|
1690
1696
|
}, Me = () => {
|
|
1691
|
-
L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999), me(L.value), p.value =
|
|
1697
|
+
L.value && (t.includeTime && L.value.endDate && L.value.endDate.setHours(23, 59, 59, 999), me(L.value), p.value = de(L.value), g.value = !1);
|
|
1692
1698
|
}, Re = () => {
|
|
1693
1699
|
me({ startDate: null, endDate: null }), F(), h.value = -1, g.value = !1;
|
|
1694
1700
|
}, ze = () => {
|
|
1695
|
-
g.value &&
|
|
1696
|
-
|
|
1701
|
+
g.value && ie(() => {
|
|
1702
|
+
fe();
|
|
1697
1703
|
});
|
|
1698
1704
|
}, _e = O(() => we(x.value.year, x.value.month)), Ke = O(() => we(f.value.year, f.value.month)), D = O(() => {
|
|
1699
1705
|
const a = P(t.modelValue);
|
|
@@ -1729,7 +1735,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1729
1735
|
const M = new Date(x.value.year, x.value.month + 1);
|
|
1730
1736
|
f.value.year = M.getFullYear(), f.value.month = M.getMonth();
|
|
1731
1737
|
}
|
|
1732
|
-
(c != null && c.startDate || c != null && c.endDate) && C(), g.value || (p.value =
|
|
1738
|
+
(c != null && c.startDate || c != null && c.endDate) && C(), g.value || (p.value = de(a));
|
|
1733
1739
|
}, { immediate: !0, deep: !0 }), le([x, f], () => {
|
|
1734
1740
|
const a = new Date(x.value.year, x.value.month).getTime(), c = new Date(f.value.year, f.value.month).getTime();
|
|
1735
1741
|
if (a === c) {
|
|
@@ -1737,7 +1743,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1737
1743
|
f.value.year = M.getFullYear(), f.value.month = M.getMonth();
|
|
1738
1744
|
}
|
|
1739
1745
|
}, { deep: !0 }), Se(() => {
|
|
1740
|
-
document.addEventListener("click", q), window.addEventListener("resize", ze), window.addEventListener("scroll", ze), p.value =
|
|
1746
|
+
document.addEventListener("click", q), window.addEventListener("resize", ze), window.addEventListener("scroll", ze), p.value = de(t.modelValue);
|
|
1741
1747
|
const a = P(t.modelValue);
|
|
1742
1748
|
if (a != null && a.startDate && (x.value.year = a.startDate.getFullYear(), x.value.month = a.startDate.getMonth()), a != null && a.endDate)
|
|
1743
1749
|
f.value.year = a.endDate.getFullYear(), f.value.month = a.endDate.getMonth();
|
|
@@ -1783,7 +1789,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1783
1789
|
l("span", mn, [
|
|
1784
1790
|
e.clearable && K.value ? (i(), u("i", {
|
|
1785
1791
|
key: 0,
|
|
1786
|
-
onClick:
|
|
1792
|
+
onClick: Q(N, ["stop"]),
|
|
1787
1793
|
class: "nh-time-clear"
|
|
1788
1794
|
}, [...c[4] || (c[4] = [
|
|
1789
1795
|
l("svg", {
|
|
@@ -1825,7 +1831,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1825
1831
|
])], 2)
|
|
1826
1832
|
])
|
|
1827
1833
|
], 34),
|
|
1828
|
-
|
|
1834
|
+
ce(Ce, { name: "el-zoom-in-top" }, {
|
|
1829
1835
|
default: ve(() => [
|
|
1830
1836
|
g.value ? (i(), u("div", {
|
|
1831
1837
|
key: 0,
|
|
@@ -1837,7 +1843,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1837
1843
|
l("div", wn, [
|
|
1838
1844
|
c[7] || (c[7] = l("div", { class: "nh-time-shortcuts-title" }, "快捷选项", -1)),
|
|
1839
1845
|
l("ul", bn, [
|
|
1840
|
-
(i(!0), u(
|
|
1846
|
+
(i(!0), u(re, null, he(e.shortcuts, (W, ae) => (i(), u("li", {
|
|
1841
1847
|
key: W.label,
|
|
1842
1848
|
onClick: (oe) => V(W),
|
|
1843
1849
|
onKeydown: (oe) => o(oe, ae),
|
|
@@ -1881,7 +1887,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1881
1887
|
})
|
|
1882
1888
|
], -1)
|
|
1883
1889
|
])]),
|
|
1884
|
-
l("span", En, ne(
|
|
1890
|
+
l("span", En, ne(Z(x.value.year, x.value.month)), 1),
|
|
1885
1891
|
l("button", {
|
|
1886
1892
|
onClick: c[1] || (c[1] = (W) => te("start", 1)),
|
|
1887
1893
|
class: "nh-date-picker-btn nh-date-picker-next-btn",
|
|
@@ -1903,20 +1909,20 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1903
1909
|
l("table", zn, [
|
|
1904
1910
|
l("thead", null, [
|
|
1905
1911
|
l("tr", null, [
|
|
1906
|
-
(i(), u(
|
|
1912
|
+
(i(), u(re, null, he(U, (W) => l("th", {
|
|
1907
1913
|
key: W,
|
|
1908
1914
|
class: "nh-date-table-th"
|
|
1909
1915
|
}, ne(W), 1)), 64))
|
|
1910
1916
|
])
|
|
1911
1917
|
]),
|
|
1912
1918
|
l("tbody", null, [
|
|
1913
|
-
(i(!0), u(
|
|
1919
|
+
(i(!0), u(re, null, he(_e.value, (W, ae) => (i(), u("tr", {
|
|
1914
1920
|
key: `start-week-${ae}`
|
|
1915
1921
|
}, [
|
|
1916
|
-
(i(!0), u(
|
|
1922
|
+
(i(!0), u(re, null, he(W, (oe, se) => (i(), u("td", {
|
|
1917
1923
|
key: `start-day-${ae}-${se}`,
|
|
1918
|
-
class: E(
|
|
1919
|
-
onClick: ($e) =>
|
|
1924
|
+
class: E(X(oe)),
|
|
1925
|
+
onClick: ($e) => J(oe, "start")
|
|
1920
1926
|
}, [
|
|
1921
1927
|
l("div", Hn, [
|
|
1922
1928
|
oe ? (i(), u("span", Rn, ne(oe.day), 1)) : R("", !0)
|
|
@@ -1947,7 +1953,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1947
1953
|
})
|
|
1948
1954
|
], -1)
|
|
1949
1955
|
])]),
|
|
1950
|
-
l("span", Wn, ne(
|
|
1956
|
+
l("span", Wn, ne(Z(f.value.year, f.value.month)), 1),
|
|
1951
1957
|
l("button", {
|
|
1952
1958
|
onClick: c[3] || (c[3] = (W) => te("end", 1)),
|
|
1953
1959
|
class: "nh-date-picker-btn nh-date-picker-next-btn",
|
|
@@ -1969,20 +1975,20 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
1969
1975
|
l("table", Pn, [
|
|
1970
1976
|
l("thead", null, [
|
|
1971
1977
|
l("tr", null, [
|
|
1972
|
-
(i(), u(
|
|
1978
|
+
(i(), u(re, null, he(U, (W) => l("th", {
|
|
1973
1979
|
key: W,
|
|
1974
1980
|
class: "nh-date-table-th"
|
|
1975
1981
|
}, ne(W), 1)), 64))
|
|
1976
1982
|
])
|
|
1977
1983
|
]),
|
|
1978
1984
|
l("tbody", null, [
|
|
1979
|
-
(i(!0), u(
|
|
1985
|
+
(i(!0), u(re, null, he(Ke.value, (W, ae) => (i(), u("tr", {
|
|
1980
1986
|
key: `end-week-${ae}`
|
|
1981
1987
|
}, [
|
|
1982
|
-
(i(!0), u(
|
|
1988
|
+
(i(!0), u(re, null, he(W, (oe, se) => (i(), u("td", {
|
|
1983
1989
|
key: `end-day-${ae}-${se}`,
|
|
1984
|
-
class: E(
|
|
1985
|
-
onClick: ($e) =>
|
|
1990
|
+
class: E(X(oe)),
|
|
1991
|
+
onClick: ($e) => J(oe, "end")
|
|
1986
1992
|
}, [
|
|
1987
1993
|
l("div", On, [
|
|
1988
1994
|
oe ? (i(), u("span", jn, ne(oe.day), 1)) : R("", !0)
|
|
@@ -2007,7 +2013,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2007
2013
|
])]),
|
|
2008
2014
|
_: 1
|
|
2009
2015
|
}, 8, ["size"])) : R("", !0),
|
|
2010
|
-
|
|
2016
|
+
ce(M, {
|
|
2011
2017
|
onClick: Me,
|
|
2012
2018
|
disabled: !B.value,
|
|
2013
2019
|
variant: "primary",
|
|
@@ -2075,8 +2081,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2075
2081
|
disabled: e.disabled || e.loading,
|
|
2076
2082
|
onClick: L,
|
|
2077
2083
|
onKeydown: [
|
|
2078
|
-
xe(
|
|
2079
|
-
xe(
|
|
2084
|
+
xe(Q(L, ["prevent"]), ["enter"]),
|
|
2085
|
+
xe(Q(L, ["prevent"]), ["space"])
|
|
2080
2086
|
]
|
|
2081
2087
|
}, [
|
|
2082
2088
|
S[0] || (S[0] = l("span", { class: "yswitch__track" }, null, -1)),
|
|
@@ -2112,7 +2118,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2112
2118
|
n.className,
|
|
2113
2119
|
"overflow-hidden"
|
|
2114
2120
|
].filter(Boolean).join(" ")), I = O(() => [
|
|
2115
|
-
|
|
2121
|
+
Z(),
|
|
2116
2122
|
ee()
|
|
2117
2123
|
].filter(Boolean).join(" ")), H = O(() => [
|
|
2118
2124
|
"w-full h-full bg-white",
|
|
@@ -2120,18 +2126,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2120
2126
|
ee(),
|
|
2121
2127
|
n.preview ? "cursor-pointer hover:opacity-90 transition-opacity duration-200" : ""
|
|
2122
2128
|
].filter(Boolean).join(" ")), P = O(() => [
|
|
2123
|
-
|
|
2129
|
+
Z(),
|
|
2124
2130
|
ee()
|
|
2125
2131
|
].filter(Boolean).join(" ")), G = O(() => {
|
|
2126
2132
|
const w = {};
|
|
2127
2133
|
return n.width && (w.width = typeof n.width == "number" ? `${n.width}px` : n.width), n.height && (w.height = typeof n.height == "number" ? `${n.height}px` : n.height), w;
|
|
2128
|
-
}),
|
|
2134
|
+
}), Z = () => n.width && n.height ? "" : "w-full h-full", ye = () => ({
|
|
2129
2135
|
cover: "object-cover",
|
|
2130
2136
|
contain: "object-contain",
|
|
2131
2137
|
fill: "object-fill",
|
|
2132
2138
|
none: "object-none",
|
|
2133
2139
|
"scale-down": "object-scale-down"
|
|
2134
|
-
})[n.fit] || "object-cover", ee = () => typeof n.radius == "number" ? `rounded-${n.radius}` : typeof n.radius == "string" ? n.radius.includes("px") ? "" : `rounded-${n.radius}` : "",
|
|
2140
|
+
})[n.fit] || "object-cover", ee = () => typeof n.radius == "number" ? `rounded-${n.radius}` : typeof n.radius == "string" ? n.radius.includes("px") ? "" : `rounded-${n.radius}` : "", de = () => {
|
|
2135
2141
|
const w = document.createElement("div");
|
|
2136
2142
|
w.style.cssText = "width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(w);
|
|
2137
2143
|
const V = w.offsetWidth - w.clientWidth;
|
|
@@ -2141,31 +2147,31 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2141
2147
|
overflow: document.body.style.overflow || "",
|
|
2142
2148
|
paddingRight: document.body.style.paddingRight || ""
|
|
2143
2149
|
}, document.body.scrollHeight > window.innerHeight) {
|
|
2144
|
-
const V =
|
|
2150
|
+
const V = de();
|
|
2145
2151
|
document.body.style.paddingRight = `${V}px`;
|
|
2146
2152
|
}
|
|
2147
2153
|
document.body.style.overflow = "hidden";
|
|
2148
2154
|
}, me = () => {
|
|
2149
2155
|
document.body.style.overflow = $.value.overflow, document.body.style.paddingRight = $.value.paddingRight;
|
|
2150
2156
|
};
|
|
2151
|
-
let
|
|
2157
|
+
let fe = null;
|
|
2152
2158
|
const Y = () => {
|
|
2153
|
-
!n.lazy || !h.value || (
|
|
2159
|
+
!n.lazy || !h.value || (fe = new IntersectionObserver(
|
|
2154
2160
|
(w) => {
|
|
2155
2161
|
w.forEach((V) => {
|
|
2156
|
-
V.isIntersecting && (x.value = !0, C.value = n.src,
|
|
2162
|
+
V.isIntersecting && (x.value = !0, C.value = n.src, fe == null || fe.unobserve(V.target));
|
|
2157
2163
|
});
|
|
2158
2164
|
},
|
|
2159
2165
|
{
|
|
2160
2166
|
rootMargin: "50px"
|
|
2161
2167
|
}
|
|
2162
|
-
),
|
|
2168
|
+
), fe.observe(h.value));
|
|
2163
2169
|
}, q = (w) => {
|
|
2164
2170
|
k.value = !0, S.value = !1, m.value = !1, g("load", w);
|
|
2165
2171
|
}, v = (w) => {
|
|
2166
2172
|
m.value = !0, S.value = !1, k.value = !1, g("error", w);
|
|
2167
2173
|
}, d = () => {
|
|
2168
|
-
m.value = !1, S.value = !0, k.value = !1,
|
|
2174
|
+
m.value = !1, S.value = !0, k.value = !1, ie(() => {
|
|
2169
2175
|
p.value && (p.value.src = n.src);
|
|
2170
2176
|
});
|
|
2171
2177
|
}, o = () => {
|
|
@@ -2173,7 +2179,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2173
2179
|
U.value = 1;
|
|
2174
2180
|
const w = new Image();
|
|
2175
2181
|
w.onload = () => {
|
|
2176
|
-
j.value = n.src,
|
|
2182
|
+
j.value = n.src, ie(() => {
|
|
2177
2183
|
f.value = !0, we(), g("preview", n.src);
|
|
2178
2184
|
});
|
|
2179
2185
|
}, w.onerror = () => {
|
|
@@ -2185,13 +2191,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2185
2191
|
}, 300);
|
|
2186
2192
|
}, r = (w) => {
|
|
2187
2193
|
const V = w.deltaY < 0 ? 1 : -1;
|
|
2188
|
-
let
|
|
2189
|
-
|
|
2194
|
+
let X = U.value + V * 0.1;
|
|
2195
|
+
X = Math.max(0.5, Math.min(2, X)), U.value = X;
|
|
2190
2196
|
};
|
|
2191
2197
|
return Se(() => {
|
|
2192
2198
|
n.lazy ? Y() : x.value = !0, x.value && (S.value = !0), A.value = !0;
|
|
2193
2199
|
}), Te(() => {
|
|
2194
|
-
|
|
2200
|
+
fe && fe.disconnect(), f.value && me();
|
|
2195
2201
|
}), le(() => C.value, () => {
|
|
2196
2202
|
n.src && x.value && (S.value = !0, m.value = !1, k.value = !1);
|
|
2197
2203
|
}), le(() => n.src, (w) => {
|
|
@@ -2260,14 +2266,14 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2260
2266
|
key: 3,
|
|
2261
2267
|
to: "body"
|
|
2262
2268
|
}, [
|
|
2263
|
-
|
|
2269
|
+
ce(Ce, { name: "fade" }, {
|
|
2264
2270
|
default: ve(() => [
|
|
2265
2271
|
f.value ? (i(), u("div", {
|
|
2266
2272
|
key: 0,
|
|
2267
2273
|
class: "fixed inset-0 bg-black/75 flex items-center justify-center",
|
|
2268
2274
|
style: { "z-index": "99999" },
|
|
2269
|
-
onClick:
|
|
2270
|
-
onWheel:
|
|
2275
|
+
onClick: Q(s, ["self"]),
|
|
2276
|
+
onWheel: Q(r, ["prevent"])
|
|
2271
2277
|
}, [
|
|
2272
2278
|
l("div", {
|
|
2273
2279
|
class: E(["relative max-w-4xl max-h-full p-4 transform transition-transform duration-300", { "scale-100": f.value, "scale-95": !f.value }])
|
|
@@ -2279,7 +2285,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2279
2285
|
alt: e.alt,
|
|
2280
2286
|
class: "max-w-full max-h-full object-contain rounded shadow-2xl transition-transform duration-200",
|
|
2281
2287
|
style: pe({ transform: `scale(${U.value})` }),
|
|
2282
|
-
onClick: V[0] || (V[0] =
|
|
2288
|
+
onClick: V[0] || (V[0] = Q(() => {
|
|
2283
2289
|
}, ["stop"]))
|
|
2284
2290
|
}, null, 12, tl)
|
|
2285
2291
|
], 2)
|
|
@@ -2310,7 +2316,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2310
2316
|
maxWidth: f
|
|
2311
2317
|
};
|
|
2312
2318
|
}), L = () => {
|
|
2313
|
-
console.log("显示下拉菜单", t.value), !b.disabled && (g && (clearTimeout(g), g = null), t.value = !0, console.log("设置 visible 为 true", t.value),
|
|
2319
|
+
console.log("显示下拉菜单", t.value), !b.disabled && (g && (clearTimeout(g), g = null), t.value = !0, console.log("设置 visible 为 true", t.value), ie(() => {
|
|
2314
2320
|
S();
|
|
2315
2321
|
}));
|
|
2316
2322
|
}, k = () => {
|
|
@@ -2360,7 +2366,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2360
2366
|
}), le(
|
|
2361
2367
|
() => b.menuWidth,
|
|
2362
2368
|
() => {
|
|
2363
|
-
t.value &&
|
|
2369
|
+
t.value && ie(() => {
|
|
2364
2370
|
S();
|
|
2365
2371
|
});
|
|
2366
2372
|
}
|
|
@@ -2374,11 +2380,11 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2374
2380
|
onMouseenter: L,
|
|
2375
2381
|
onMouseleave: k
|
|
2376
2382
|
}, [
|
|
2377
|
-
|
|
2383
|
+
ue(f.$slots, "trigger", {}, () => [
|
|
2378
2384
|
C[0] || (C[0] = l("button", { class: "y-dropdown__button" }, " 下拉菜单 ", -1))
|
|
2379
2385
|
], !0)
|
|
2380
2386
|
], 32),
|
|
2381
|
-
|
|
2387
|
+
ce(Ce, {
|
|
2382
2388
|
name: "dropdown-fade",
|
|
2383
2389
|
appear: ""
|
|
2384
2390
|
}, {
|
|
@@ -2389,7 +2395,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2389
2395
|
onMouseenter: L,
|
|
2390
2396
|
onMouseleave: k
|
|
2391
2397
|
}, [
|
|
2392
|
-
|
|
2398
|
+
ue(f.$slots, "default", {}, () => [
|
|
2393
2399
|
C[1] || (C[1] = l("div", { class: "y-dropdown__item" }, "选项 1", -1)),
|
|
2394
2400
|
C[2] || (C[2] = l("div", { class: "y-dropdown__item" }, "选项 2", -1)),
|
|
2395
2401
|
C[3] || (C[3] = l("div", { class: "y-dropdown__item" }, "选项 3", -1))
|
|
@@ -2463,7 +2469,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2463
2469
|
class: "y-drawer-mask",
|
|
2464
2470
|
onClick: S
|
|
2465
2471
|
}),
|
|
2466
|
-
|
|
2472
|
+
ce(Ce, { name: p.value }, {
|
|
2467
2473
|
default: ve(() => [
|
|
2468
2474
|
Ee(l("div", {
|
|
2469
2475
|
ref_key: "panelRef",
|
|
@@ -2473,7 +2479,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2473
2479
|
L.value
|
|
2474
2480
|
]]),
|
|
2475
2481
|
style: pe(k.value),
|
|
2476
|
-
onKeydown: xe(
|
|
2482
|
+
onKeydown: xe(Q(x, ["prevent", "stop"]), ["esc"]),
|
|
2477
2483
|
tabindex: "-1"
|
|
2478
2484
|
}, [
|
|
2479
2485
|
e.showHeader ? (i(), u("div", rl, [
|
|
@@ -2487,10 +2493,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2487
2493
|
}, " ✕ ")) : R("", !0)
|
|
2488
2494
|
])) : R("", !0),
|
|
2489
2495
|
l("div", cl, [
|
|
2490
|
-
|
|
2496
|
+
ue(C.$slots, "default", {}, void 0, !0)
|
|
2491
2497
|
]),
|
|
2492
2498
|
C.$slots.footer ? (i(), u("div", dl, [
|
|
2493
|
-
|
|
2499
|
+
ue(C.$slots, "footer", {}, void 0, !0)
|
|
2494
2500
|
])) : R("", !0)
|
|
2495
2501
|
], 46, il), [
|
|
2496
2502
|
[He, g.value]
|
|
@@ -2731,9 +2737,9 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2731
2737
|
const d = k(v), s = !p.value.checkedKeys.has(d), r = new Set(p.value.expandedKeys);
|
|
2732
2738
|
s ? p.value.checkedKeys.add(d) : p.value.checkedKeys.delete(d);
|
|
2733
2739
|
function y(w, V) {
|
|
2734
|
-
w.forEach((
|
|
2735
|
-
const
|
|
2736
|
-
V ? p.value.checkedKeys.add(
|
|
2740
|
+
w.forEach((J) => {
|
|
2741
|
+
const X = k(J);
|
|
2742
|
+
V ? p.value.checkedKeys.add(X) : p.value.checkedKeys.delete(X), f(J) && y(C(J), V);
|
|
2737
2743
|
});
|
|
2738
2744
|
}
|
|
2739
2745
|
y(C(v), s), s && G(), ye(), p.value.expandedKeys = r, g("check-change", v, s, !1), g("check", v, s, !1), g("checked-keys-change", Array.from(p.value.checkedKeys));
|
|
@@ -2743,7 +2749,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2743
2749
|
`已启用从第${L.value}级开始不默认展开的限制(不主动收起已展开节点)`
|
|
2744
2750
|
);
|
|
2745
2751
|
}
|
|
2746
|
-
function
|
|
2752
|
+
function Z(v) {
|
|
2747
2753
|
const d = k(v);
|
|
2748
2754
|
p.value.expandedKeys.has(d) ? (p.value.expandedKeys.delete(d), g("node-collapse", v, v, null)) : (p.value.expandedKeys.add(d), g("node-expand", v, v, null));
|
|
2749
2755
|
}
|
|
@@ -2757,8 +2763,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2757
2763
|
d(h.value);
|
|
2758
2764
|
function o(s) {
|
|
2759
2765
|
if (f(s)) {
|
|
2760
|
-
const r = C(s), y = k(s), w = r.filter((
|
|
2761
|
-
(
|
|
2766
|
+
const r = C(s), y = k(s), w = r.filter((J) => $(J)), V = r.filter(
|
|
2767
|
+
(J) => T(J)
|
|
2762
2768
|
);
|
|
2763
2769
|
w.length === r.length && V.length === 0 || w.length > 0 || V.length > 0 ? p.value.checkedKeys.add(y) : p.value.checkedKeys.delete(y);
|
|
2764
2770
|
}
|
|
@@ -2774,12 +2780,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2774
2780
|
return;
|
|
2775
2781
|
}
|
|
2776
2782
|
if (n.expandOnClickNode && f(v)) {
|
|
2777
|
-
|
|
2783
|
+
Z(v);
|
|
2778
2784
|
return;
|
|
2779
2785
|
}
|
|
2780
2786
|
p.value.currentNode = v, p.value.currentKey = k(v), n.showCheckbox && P(v), g("node-click", v, d, o);
|
|
2781
2787
|
}
|
|
2782
|
-
function
|
|
2788
|
+
function de(v, d, o, s) {
|
|
2783
2789
|
n.disabled || g("node-contextmenu", v, d, o, s);
|
|
2784
2790
|
}
|
|
2785
2791
|
le(
|
|
@@ -2788,18 +2794,18 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2788
2794
|
if (v) {
|
|
2789
2795
|
const d = L.value;
|
|
2790
2796
|
if (d) {
|
|
2791
|
-
let o = function(w, V,
|
|
2792
|
-
for (const
|
|
2793
|
-
if (k(
|
|
2794
|
-
if (f(
|
|
2795
|
-
const Me = o(w, C(
|
|
2797
|
+
let o = function(w, V, J = 1) {
|
|
2798
|
+
for (const X of V) {
|
|
2799
|
+
if (k(X) === w) return J;
|
|
2800
|
+
if (f(X)) {
|
|
2801
|
+
const Me = o(w, C(X), J + 1);
|
|
2796
2802
|
if (Me > 0) return Me;
|
|
2797
2803
|
}
|
|
2798
2804
|
}
|
|
2799
2805
|
return 0;
|
|
2800
|
-
}, s = function(w, V,
|
|
2801
|
-
w.forEach((
|
|
2802
|
-
V <
|
|
2806
|
+
}, s = function(w, V, J) {
|
|
2807
|
+
w.forEach((X) => {
|
|
2808
|
+
V < J && f(X) ? (y.add(k(X)), s(C(X), V + 1, J)) : V < J && f(X);
|
|
2803
2809
|
});
|
|
2804
2810
|
};
|
|
2805
2811
|
const r = (v || []).filter((w) => {
|
|
@@ -2836,8 +2842,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2836
2842
|
if (n.defaultCheckedKeys && n.defaultCheckedKeys.length > 0) {
|
|
2837
2843
|
let v = function(r, y = []) {
|
|
2838
2844
|
r.forEach((w) => {
|
|
2839
|
-
const V = k(w),
|
|
2840
|
-
d.has(V) && y.forEach((
|
|
2845
|
+
const V = k(w), J = [...y, V];
|
|
2846
|
+
d.has(V) && y.forEach((X) => o.add(X)), f(w) && v(C(w), J);
|
|
2841
2847
|
});
|
|
2842
2848
|
};
|
|
2843
2849
|
const d = new Set(n.defaultCheckedKeys), o = /* @__PURE__ */ new Set();
|
|
@@ -2859,14 +2865,14 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2859
2865
|
},
|
|
2860
2866
|
{ immediate: !0 }
|
|
2861
2867
|
);
|
|
2862
|
-
function
|
|
2868
|
+
function fe(v) {
|
|
2863
2869
|
try {
|
|
2864
2870
|
let d = function(r, y, w = []) {
|
|
2865
2871
|
for (const V of r) {
|
|
2866
|
-
const
|
|
2867
|
-
if (
|
|
2872
|
+
const J = k(V), X = [...w, J];
|
|
2873
|
+
if (J === y) return X;
|
|
2868
2874
|
if (f(V)) {
|
|
2869
|
-
const Me = d(C(V), y,
|
|
2875
|
+
const Me = d(C(V), y, X);
|
|
2870
2876
|
if (Me) return Me;
|
|
2871
2877
|
}
|
|
2872
2878
|
}
|
|
@@ -2890,7 +2896,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2890
2896
|
function q() {
|
|
2891
2897
|
p.value.currentNode = null, p.value.currentKey = null;
|
|
2892
2898
|
}
|
|
2893
|
-
return b({ highlightAndExpandByIds:
|
|
2899
|
+
return b({ highlightAndExpandByIds: fe, clearHighlights: Y, clearCurrentNode: q }), le(
|
|
2894
2900
|
() => n.defaultSelectedKeys,
|
|
2895
2901
|
(v) => {
|
|
2896
2902
|
v && (p.value.selectedKeys = new Set(v));
|
|
@@ -2900,7 +2906,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2900
2906
|
class: E(["ytree", [`ytree--${e.size}`, { "ytree--disabled": e.disabled }]])
|
|
2901
2907
|
}, [
|
|
2902
2908
|
l("div", hl, [
|
|
2903
|
-
(i(!0), u(
|
|
2909
|
+
(i(!0), u(re, null, he(h.value, (o) => (i(), u("div", {
|
|
2904
2910
|
key: k(o),
|
|
2905
2911
|
class: E(["ytree-node", { "ytree-node--current": I(o), "ytree-node--highlight": H(o) }])
|
|
2906
2912
|
}, [
|
|
@@ -2909,12 +2915,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2909
2915
|
style: { paddingLeft: "8px" },
|
|
2910
2916
|
"data-level": j(o, o),
|
|
2911
2917
|
onClick: (s) => ee(o, o, null, o),
|
|
2912
|
-
onContextmenu: (s) =>
|
|
2918
|
+
onContextmenu: (s) => de(s, o, o, null)
|
|
2913
2919
|
}, [
|
|
2914
2920
|
f(o) ? (i(), u("span", {
|
|
2915
2921
|
key: 0,
|
|
2916
2922
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(o) }]),
|
|
2917
|
-
onClick:
|
|
2923
|
+
onClick: Q((s) => Z(o), ["stop"])
|
|
2918
2924
|
}, [...d[0] || (d[0] = [
|
|
2919
2925
|
l("svg", {
|
|
2920
2926
|
width: "12",
|
|
@@ -2937,7 +2943,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2937
2943
|
"is-checked": $(o),
|
|
2938
2944
|
"is-indeterminate": T(o)
|
|
2939
2945
|
}]),
|
|
2940
|
-
onClick:
|
|
2946
|
+
onClick: Q((s) => P(o), ["stop"])
|
|
2941
2947
|
}, [
|
|
2942
2948
|
$(o) ? (i(), u("svg", wl, [...d[1] || (d[1] = [
|
|
2943
2949
|
l("path", {
|
|
@@ -2969,7 +2975,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2969
2975
|
class: E(["ytree-node__label", { "is-employee": m(o) }])
|
|
2970
2976
|
}, ne(S(o)), 3),
|
|
2971
2977
|
l("div", xl, [
|
|
2972
|
-
|
|
2978
|
+
ue(v.$slots, "node-content", {
|
|
2973
2979
|
node: o,
|
|
2974
2980
|
isCurrent: I(o),
|
|
2975
2981
|
isExpanded: A(o),
|
|
@@ -2977,10 +2983,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2977
2983
|
}, void 0, !0)
|
|
2978
2984
|
])
|
|
2979
2985
|
], 42, pl),
|
|
2980
|
-
|
|
2986
|
+
ce(Ce, { name: "ytree-node" }, {
|
|
2981
2987
|
default: ve(() => [
|
|
2982
2988
|
f(o) && A(o) ? (i(), u("div", Cl, [
|
|
2983
|
-
(i(!0), u(
|
|
2989
|
+
(i(!0), u(re, null, he(C(o), (s) => (i(), u("div", {
|
|
2984
2990
|
key: k(s),
|
|
2985
2991
|
class: E(["ytree-node", { "ytree-node--current": I(s), "ytree-node--highlight": H(s) }])
|
|
2986
2992
|
}, [
|
|
@@ -2989,12 +2995,12 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
2989
2995
|
style: { paddingLeft: "22px" },
|
|
2990
2996
|
"data-level": j(o, s),
|
|
2991
2997
|
onClick: (r) => ee(s, s, null, o),
|
|
2992
|
-
onContextmenu: (r) =>
|
|
2998
|
+
onContextmenu: (r) => de(r, s, s, null)
|
|
2993
2999
|
}, [
|
|
2994
3000
|
f(s) ? (i(), u("span", {
|
|
2995
3001
|
key: 0,
|
|
2996
3002
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(s) }]),
|
|
2997
|
-
onClick:
|
|
3003
|
+
onClick: Q((r) => Z(s), ["stop"])
|
|
2998
3004
|
}, [...d[3] || (d[3] = [
|
|
2999
3005
|
l("svg", {
|
|
3000
3006
|
width: "12",
|
|
@@ -3017,7 +3023,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3017
3023
|
"is-checked": $(s),
|
|
3018
3024
|
"is-indeterminate": T(s)
|
|
3019
3025
|
}]),
|
|
3020
|
-
onClick:
|
|
3026
|
+
onClick: Q((r) => P(s), ["stop"])
|
|
3021
3027
|
}, [
|
|
3022
3028
|
$(s) ? (i(), u("svg", Ml, [...d[4] || (d[4] = [
|
|
3023
3029
|
l("path", {
|
|
@@ -3049,7 +3055,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3049
3055
|
class: E(["ytree-node__label", { "is-employee": m(s) }])
|
|
3050
3056
|
}, ne(S(s)), 3),
|
|
3051
3057
|
l("div", Bl, [
|
|
3052
|
-
|
|
3058
|
+
ue(v.$slots, "node-content", {
|
|
3053
3059
|
node: s,
|
|
3054
3060
|
isCurrent: I(s),
|
|
3055
3061
|
isExpanded: A(s),
|
|
@@ -3057,10 +3063,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3057
3063
|
}, void 0, !0)
|
|
3058
3064
|
])
|
|
3059
3065
|
], 42, Dl),
|
|
3060
|
-
|
|
3066
|
+
ce(Ce, { name: "ytree-node" }, {
|
|
3061
3067
|
default: ve(() => [
|
|
3062
3068
|
f(s) && A(s) ? (i(), u("div", El, [
|
|
3063
|
-
(i(!0), u(
|
|
3069
|
+
(i(!0), u(re, null, he(C(s), (r) => (i(), u("div", {
|
|
3064
3070
|
key: k(r),
|
|
3065
3071
|
class: E(["ytree-node", {
|
|
3066
3072
|
"ytree-node--current": I(r),
|
|
@@ -3072,7 +3078,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3072
3078
|
style: { paddingLeft: "38px" },
|
|
3073
3079
|
"data-level": j(o, r),
|
|
3074
3080
|
onClick: (y) => ee(r, r, null, o),
|
|
3075
|
-
onContextmenu: (y) =>
|
|
3081
|
+
onContextmenu: (y) => de(
|
|
3076
3082
|
y,
|
|
3077
3083
|
r,
|
|
3078
3084
|
r,
|
|
@@ -3082,7 +3088,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3082
3088
|
f(r) ? (i(), u("span", {
|
|
3083
3089
|
key: 0,
|
|
3084
3090
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(r) }]),
|
|
3085
|
-
onClick:
|
|
3091
|
+
onClick: Q((y) => Z(r), ["stop"])
|
|
3086
3092
|
}, [...d[6] || (d[6] = [
|
|
3087
3093
|
l("svg", {
|
|
3088
3094
|
width: "12",
|
|
@@ -3105,7 +3111,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3105
3111
|
"is-checked": $(r),
|
|
3106
3112
|
"is-indeterminate": T(r)
|
|
3107
3113
|
}]),
|
|
3108
|
-
onClick:
|
|
3114
|
+
onClick: Q((y) => P(r), ["stop"])
|
|
3109
3115
|
}, [
|
|
3110
3116
|
$(r) ? (i(), u("svg", Rl, [...d[7] || (d[7] = [
|
|
3111
3117
|
l("path", {
|
|
@@ -3137,7 +3143,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3137
3143
|
class: E(["ytree-node__label", { "is-employee": m(r) }])
|
|
3138
3144
|
}, ne(S(r)), 3),
|
|
3139
3145
|
l("div", Fl, [
|
|
3140
|
-
|
|
3146
|
+
ue(v.$slots, "node-content", {
|
|
3141
3147
|
node: r,
|
|
3142
3148
|
isCurrent: I(r),
|
|
3143
3149
|
isExpanded: A(r),
|
|
@@ -3145,10 +3151,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3145
3151
|
}, void 0, !0)
|
|
3146
3152
|
])
|
|
3147
3153
|
], 42, Tl),
|
|
3148
|
-
|
|
3154
|
+
ce(Ce, { name: "ytree-node" }, {
|
|
3149
3155
|
default: ve(() => [
|
|
3150
3156
|
f(r) && A(r) ? (i(), u("div", Wl, [
|
|
3151
|
-
(i(!0), u(
|
|
3157
|
+
(i(!0), u(re, null, he(C(r), (y) => (i(), u("div", {
|
|
3152
3158
|
key: k(y),
|
|
3153
3159
|
class: E(["ytree-node", {
|
|
3154
3160
|
"ytree-node--current": I(y),
|
|
@@ -3167,7 +3173,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3167
3173
|
null,
|
|
3168
3174
|
o
|
|
3169
3175
|
),
|
|
3170
|
-
onContextmenu: (w) =>
|
|
3176
|
+
onContextmenu: (w) => de(
|
|
3171
3177
|
w,
|
|
3172
3178
|
y,
|
|
3173
3179
|
y,
|
|
@@ -3179,7 +3185,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3179
3185
|
class: E(["ytree-node__expand-icon", {
|
|
3180
3186
|
"is-expanded": A(y)
|
|
3181
3187
|
}]),
|
|
3182
|
-
onClick:
|
|
3188
|
+
onClick: Q((w) => Z(y), ["stop"])
|
|
3183
3189
|
}, [...d[9] || (d[9] = [
|
|
3184
3190
|
l("svg", {
|
|
3185
3191
|
width: "12",
|
|
@@ -3202,7 +3208,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3202
3208
|
"is-checked": $(y),
|
|
3203
3209
|
"is-indeterminate": T(y)
|
|
3204
3210
|
}]),
|
|
3205
|
-
onClick:
|
|
3211
|
+
onClick: Q((w) => P(y), ["stop"])
|
|
3206
3212
|
}, [
|
|
3207
3213
|
$(y) ? (i(), u("svg", jl, [...d[10] || (d[10] = [
|
|
3208
3214
|
l("path", {
|
|
@@ -3236,7 +3242,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3236
3242
|
}])
|
|
3237
3243
|
}, ne(S(y)), 3),
|
|
3238
3244
|
l("div", Zl, [
|
|
3239
|
-
|
|
3245
|
+
ue(v.$slots, "node-content", {
|
|
3240
3246
|
node: y,
|
|
3241
3247
|
isCurrent: I(y),
|
|
3242
3248
|
isExpanded: A(y),
|
|
@@ -3244,10 +3250,10 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3244
3250
|
}, void 0, !0)
|
|
3245
3251
|
])
|
|
3246
3252
|
], 42, Yl),
|
|
3247
|
-
|
|
3253
|
+
ce(Ce, { name: "ytree-node" }, {
|
|
3248
3254
|
default: ve(() => [
|
|
3249
3255
|
f(y) && A(y) ? (i(), u("div", Ql, [
|
|
3250
|
-
(i(!0), u(
|
|
3256
|
+
(i(!0), u(re, null, he(C(
|
|
3251
3257
|
y
|
|
3252
3258
|
), (w) => (i(), u("div", {
|
|
3253
3259
|
key: k(w),
|
|
@@ -3267,7 +3273,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3267
3273
|
null,
|
|
3268
3274
|
o
|
|
3269
3275
|
),
|
|
3270
|
-
onContextmenu: (V) =>
|
|
3276
|
+
onContextmenu: (V) => de(
|
|
3271
3277
|
V,
|
|
3272
3278
|
w,
|
|
3273
3279
|
w,
|
|
@@ -3279,7 +3285,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3279
3285
|
class: E(["ytree-node__expand-icon", {
|
|
3280
3286
|
"is-expanded": A(w)
|
|
3281
3287
|
}]),
|
|
3282
|
-
onClick:
|
|
3288
|
+
onClick: Q((V) => Z(w), ["stop"])
|
|
3283
3289
|
}, [...d[12] || (d[12] = [
|
|
3284
3290
|
l("svg", {
|
|
3285
3291
|
width: "12",
|
|
@@ -3304,7 +3310,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3304
3310
|
w
|
|
3305
3311
|
)
|
|
3306
3312
|
}]),
|
|
3307
|
-
onClick:
|
|
3313
|
+
onClick: Q((V) => P(w), ["stop"])
|
|
3308
3314
|
}, [
|
|
3309
3315
|
$(w) ? (i(), u("svg", to, [...d[13] || (d[13] = [
|
|
3310
3316
|
l("path", {
|
|
@@ -3340,7 +3346,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3340
3346
|
}])
|
|
3341
3347
|
}, ne(S(w)), 3),
|
|
3342
3348
|
l("div", oo, [
|
|
3343
|
-
|
|
3349
|
+
ue(v.$slots, "node-content", {
|
|
3344
3350
|
node: w,
|
|
3345
3351
|
isCurrent: I(w),
|
|
3346
3352
|
isExpanded: A(w),
|
|
@@ -3427,8 +3433,8 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3427
3433
|
const H = $[I], P = t.fields.find((G) => G.key === I);
|
|
3428
3434
|
if (P)
|
|
3429
3435
|
if (P.type === "daterange" && typeof H == "object") {
|
|
3430
|
-
const G = P.startKey || `${I}Start`,
|
|
3431
|
-
H.startDate && H.endDate && H.startDate !== 0 && H.endDate !== 0 && (P.format === "timestamp" ? (T[G] = new Date(H.startDate).getTime(), T[
|
|
3436
|
+
const G = P.startKey || `${I}Start`, Z = P.endKey || `${I}End`;
|
|
3437
|
+
H.startDate && H.endDate && H.startDate !== 0 && H.endDate !== 0 && (P.format === "timestamp" ? (T[G] = new Date(H.startDate).getTime(), T[Z] = new Date(H.endDate).getTime()) : (T[G] = H.startDate, T[Z] = H.endDate));
|
|
3432
3438
|
} else P.type === "date" && H && H !== 0 && P.format === "timestamp" ? T[I] = new Date(H).getTime() : T[I] = H;
|
|
3433
3439
|
else
|
|
3434
3440
|
T[I] = H;
|
|
@@ -3455,13 +3461,13 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3455
3461
|
l("div", co, [
|
|
3456
3462
|
l("div", fo, [
|
|
3457
3463
|
l("div", vo, [
|
|
3458
|
-
|
|
3464
|
+
ce(ot, {
|
|
3459
3465
|
name: "qf",
|
|
3460
3466
|
tag: "div",
|
|
3461
3467
|
class: "query-encapsulation__fields-group"
|
|
3462
3468
|
}, {
|
|
3463
3469
|
default: ve(() => [
|
|
3464
|
-
(i(!0), u(
|
|
3470
|
+
(i(!0), u(re, null, he(L.value, (I) => (i(), u("div", {
|
|
3465
3471
|
key: I.key,
|
|
3466
3472
|
class: "query-encapsulation__field-item"
|
|
3467
3473
|
}, [
|
|
@@ -3487,7 +3493,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3487
3493
|
_: 1
|
|
3488
3494
|
}),
|
|
3489
3495
|
k.value ? (i(), u("div", yo, [
|
|
3490
|
-
|
|
3496
|
+
ce(Fe, {
|
|
3491
3497
|
variant: "secondary",
|
|
3492
3498
|
size: "small",
|
|
3493
3499
|
onClick: C
|
|
@@ -3503,7 +3509,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3503
3509
|
])) : R("", !0),
|
|
3504
3510
|
l("div", go, [
|
|
3505
3511
|
l("div", mo, [
|
|
3506
|
-
|
|
3512
|
+
ce(Fe, {
|
|
3507
3513
|
variant: "primary",
|
|
3508
3514
|
size: "small",
|
|
3509
3515
|
onClick: x,
|
|
@@ -3514,7 +3520,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3514
3520
|
])]),
|
|
3515
3521
|
_: 1
|
|
3516
3522
|
}, 8, ["loading"]),
|
|
3517
|
-
|
|
3523
|
+
ce(Fe, {
|
|
3518
3524
|
variant: "secondary",
|
|
3519
3525
|
size: "small",
|
|
3520
3526
|
onClick: f,
|
|
@@ -3525,7 +3531,7 @@ const it = ["type", "disabled", "aria-busy", "aria-disabled"], rt = { class: "co
|
|
|
3525
3531
|
])]),
|
|
3526
3532
|
_: 1
|
|
3527
3533
|
}, 8, ["loading"]),
|
|
3528
|
-
|
|
3534
|
+
ue($.$slots, "extra-actions", {}, void 0, !0)
|
|
3529
3535
|
])
|
|
3530
3536
|
])
|
|
3531
3537
|
])
|
|
@@ -3665,7 +3671,7 @@ function Ne(e) {
|
|
|
3665
3671
|
var h;
|
|
3666
3672
|
const b = Mo++, t = document.createElement("div");
|
|
3667
3673
|
document.body.appendChild(t);
|
|
3668
|
-
const n =
|
|
3674
|
+
const n = ce(So, {
|
|
3669
3675
|
id: b,
|
|
3670
3676
|
type: e.type || "success",
|
|
3671
3677
|
message: e.message,
|