@codemonster-ru/vueforge 0.83.0 → 0.85.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/dist/index.ts.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, ref as G, computed as f, watch as ve, resolveComponent as nt, openBlock as c, createElementBlock as b, normalizeClass as ee, renderSlot as
|
|
1
|
+
import { defineComponent as ne, ref as G, computed as f, watch as ve, resolveComponent as nt, openBlock as c, createElementBlock as b, normalizeClass as ee, renderSlot as q, Fragment as fe, createTextVNode as me, toDisplayString as j, createBlock as be, withCtx as Ce, createCommentVNode as Q, resolveDynamicComponent as Ye, normalizeStyle as ke, createElementVNode as B, renderList as he, unref as We, createVNode as Ge, nextTick as $e, inject as qe, provide as Qe, withKeys as pe, withModifiers as ie, onBeforeUnmount as we, withDirectives as ze, vShow as Se, onMounted as Ve, useSlots as Xe, Teleport as Le, reactive as Dt, createSlots as bt, useAttrs as Mt, mergeProps as st, Transition as Rt, normalizeProps as Pt, guardReactiveProps as Et } from "vue";
|
|
2
2
|
import { useRoute as Ot, useRouter as At } from "vue-router";
|
|
3
3
|
import { CmIcon as Ne } from "@codemonster-ru/vueiconify";
|
|
4
4
|
const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
@@ -42,7 +42,7 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
42
42
|
onClick: $,
|
|
43
43
|
onKeydown: l
|
|
44
44
|
}, [
|
|
45
|
-
_.$slots.default ?
|
|
45
|
+
_.$slots.default ? q(_.$slots, "default", { key: 0 }) : (c(), b(fe, { key: 1 }, [
|
|
46
46
|
me(j(_.label), 1)
|
|
47
47
|
], 64))
|
|
48
48
|
], 42, Ht)) : (c(), be(y, {
|
|
@@ -59,7 +59,7 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
59
59
|
onKeydown: l
|
|
60
60
|
}, {
|
|
61
61
|
default: Ce(() => [
|
|
62
|
-
_.$slots.default ?
|
|
62
|
+
_.$slots.default ? q(_.$slots, "default", { key: 0 }) : (c(), b(fe, { key: 1 }, [
|
|
63
63
|
me(j(_.label), 1)
|
|
64
64
|
], 64))
|
|
65
65
|
]),
|
|
@@ -88,16 +88,16 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
88
88
|
function Xt(n, o) {
|
|
89
89
|
return c(), b("div", Nt, [
|
|
90
90
|
n.$slots.default ? (c(), b("div", Gt, [
|
|
91
|
-
|
|
91
|
+
q(n.$slots, "default")
|
|
92
92
|
])) : Q("", !0),
|
|
93
93
|
n.$slots.header ? (c(), b("div", jt, [
|
|
94
|
-
|
|
94
|
+
q(n.$slots, "header")
|
|
95
95
|
])) : Q("", !0),
|
|
96
96
|
n.$slots.body ? (c(), b("div", Yt, [
|
|
97
|
-
|
|
97
|
+
q(n.$slots, "body")
|
|
98
98
|
])) : Q("", !0),
|
|
99
99
|
n.$slots.footer ? (c(), b("div", qt, [
|
|
100
|
-
|
|
100
|
+
q(n.$slots, "footer")
|
|
101
101
|
])) : Q("", !0)
|
|
102
102
|
]);
|
|
103
103
|
}
|
|
@@ -120,7 +120,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
120
120
|
style: ke(e.value)
|
|
121
121
|
}, {
|
|
122
122
|
default: Ce(() => [
|
|
123
|
-
|
|
123
|
+
q(t.$slots, "default")
|
|
124
124
|
]),
|
|
125
125
|
_: 3
|
|
126
126
|
}, 8, ["class", "style"]));
|
|
@@ -144,7 +144,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
144
144
|
style: ke(e.value)
|
|
145
145
|
}, {
|
|
146
146
|
default: Ce(() => [
|
|
147
|
-
|
|
147
|
+
q(t.$slots, "default")
|
|
148
148
|
]),
|
|
149
149
|
_: 3
|
|
150
150
|
}, 8, ["class", "style"]));
|
|
@@ -189,7 +189,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
189
189
|
style: ke(e.value)
|
|
190
190
|
}, {
|
|
191
191
|
default: Ce(() => [
|
|
192
|
-
|
|
192
|
+
q(t.$slots, "default")
|
|
193
193
|
]),
|
|
194
194
|
_: 3
|
|
195
195
|
}, 8, ["style"]));
|
|
@@ -226,7 +226,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
226
226
|
style: ke(e.value)
|
|
227
227
|
}, {
|
|
228
228
|
default: Ce(() => [
|
|
229
|
-
|
|
229
|
+
q(t.$slots, "default")
|
|
230
230
|
]),
|
|
231
231
|
_: 3
|
|
232
232
|
}, 8, ["style"]));
|
|
@@ -255,7 +255,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
255
255
|
style: ke(a.value)
|
|
256
256
|
}, {
|
|
257
257
|
default: Ce(() => [
|
|
258
|
-
|
|
258
|
+
q(e.$slots, "default")
|
|
259
259
|
]),
|
|
260
260
|
_: 3
|
|
261
261
|
}, 8, ["style"]));
|
|
@@ -284,7 +284,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
284
284
|
style: ke(a.value)
|
|
285
285
|
}, {
|
|
286
286
|
default: Ce(() => [
|
|
287
|
-
|
|
287
|
+
q(e.$slots, "default")
|
|
288
288
|
]),
|
|
289
289
|
_: 3
|
|
290
290
|
}, 8, ["style"]));
|
|
@@ -354,7 +354,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
354
354
|
class: "vf-menu__item",
|
|
355
355
|
role: "none"
|
|
356
356
|
}, [
|
|
357
|
-
y.$slots[i(g, w)] ?
|
|
357
|
+
y.$slots[i(g, w)] ? q(y.$slots, i(g, w), {
|
|
358
358
|
key: 0,
|
|
359
359
|
item: { ...g, class: "vf-menu__link" }
|
|
360
360
|
}) : g.separator ? (c(), b("hr", Zt)) : g.items && g.items.length ? (c(), b(fe, { key: 2 }, [
|
|
@@ -462,7 +462,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
462
462
|
key: 2,
|
|
463
463
|
class: ee(p.value)
|
|
464
464
|
}, [
|
|
465
|
-
|
|
465
|
+
q(m.$slots, "default")
|
|
466
466
|
], 2)) : m.label ? (c(), b("span", {
|
|
467
467
|
key: 3,
|
|
468
468
|
class: ee(p.value)
|
|
@@ -485,7 +485,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
485
485
|
key: 1,
|
|
486
486
|
class: ee(p.value)
|
|
487
487
|
}, [
|
|
488
|
-
|
|
488
|
+
q(m.$slots, "default")
|
|
489
489
|
], 2)) : m.label ? (c(), b("span", {
|
|
490
490
|
key: 2,
|
|
491
491
|
class: ee(p.value)
|
|
@@ -522,7 +522,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
522
522
|
role: "group",
|
|
523
523
|
"aria-disabled": t.disabled ? "true" : void 0
|
|
524
524
|
}, [
|
|
525
|
-
|
|
525
|
+
q(t.$slots, "default")
|
|
526
526
|
], 10, ta));
|
|
527
527
|
}
|
|
528
528
|
}), aa = {
|
|
@@ -555,7 +555,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
555
555
|
class: ee(t.value)
|
|
556
556
|
}, [
|
|
557
557
|
u.$slots.prefix ? (c(), b("span", aa, [
|
|
558
|
-
|
|
558
|
+
q(u.$slots, "prefix")
|
|
559
559
|
])) : Q("", !0),
|
|
560
560
|
B("input", {
|
|
561
561
|
class: "vf-input__control",
|
|
@@ -570,7 +570,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
570
570
|
onBlur: r
|
|
571
571
|
}, null, 40, oa),
|
|
572
572
|
u.$slots.suffix ? (c(), b("span", ra, [
|
|
573
|
-
|
|
573
|
+
q(u.$slots, "suffix")
|
|
574
574
|
])) : Q("", !0)
|
|
575
575
|
], 2));
|
|
576
576
|
}
|
|
@@ -591,7 +591,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
591
591
|
role: "group",
|
|
592
592
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
593
593
|
}, [
|
|
594
|
-
|
|
594
|
+
q(e.$slots, "default")
|
|
595
595
|
], 10, la));
|
|
596
596
|
}
|
|
597
597
|
}), fc = /* @__PURE__ */ ne({
|
|
@@ -602,7 +602,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
602
602
|
setup(n) {
|
|
603
603
|
return (o, a) => (c(), be(Ye(o.as), { class: "vf-input-group__addon" }, {
|
|
604
604
|
default: Ce(() => [
|
|
605
|
-
|
|
605
|
+
q(o.$slots, "default")
|
|
606
606
|
]),
|
|
607
607
|
_: 3
|
|
608
608
|
}));
|
|
@@ -833,8 +833,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
833
833
|
return [];
|
|
834
834
|
if (F.query.length < t.minQueryLength)
|
|
835
835
|
return [];
|
|
836
|
-
const
|
|
837
|
-
return m.value.filter((Z) => Z.trigger === F.trigger).filter((Z) => Z.label.toLowerCase().includes(
|
|
836
|
+
const H = F.query.toLowerCase();
|
|
837
|
+
return m.value.filter((Z) => Z.trigger === F.trigger).filter((Z) => Z.label.toLowerCase().includes(H)).slice(0, Math.max(1, t.maxSuggestions));
|
|
838
838
|
}), l = f(() => $.value), _ = f(() => {
|
|
839
839
|
const F = [
|
|
840
840
|
"vf-mention-input",
|
|
@@ -852,8 +852,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
852
852
|
}
|
|
853
853
|
d.value = !0, r.value < 0 && (r.value = z());
|
|
854
854
|
}
|
|
855
|
-
}, z = () => l.value.findIndex((F) => !F.disabled), C = (F,
|
|
856
|
-
const Z = F.slice(0,
|
|
855
|
+
}, z = () => l.value.findIndex((F) => !F.disabled), C = (F, H) => {
|
|
856
|
+
const Z = F.slice(0, H);
|
|
857
857
|
let x = -1, W = "";
|
|
858
858
|
for (const P of t.triggers) {
|
|
859
859
|
const K = Z.lastIndexOf(P);
|
|
@@ -866,31 +866,31 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
866
866
|
trigger: W,
|
|
867
867
|
query: h,
|
|
868
868
|
start: x,
|
|
869
|
-
end:
|
|
869
|
+
end: H
|
|
870
870
|
};
|
|
871
871
|
}, g = (F) => {
|
|
872
|
-
const
|
|
872
|
+
const H = F.selectionStart ?? F.value.length, Z = C(F.value, H);
|
|
873
873
|
if (v.value = Z, Z) {
|
|
874
874
|
e("search", { trigger: Z.trigger, query: Z.query }), y();
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
877
|
k();
|
|
878
878
|
}, w = (F) => {
|
|
879
|
-
const
|
|
880
|
-
e("update:modelValue",
|
|
879
|
+
const H = F.target;
|
|
880
|
+
e("update:modelValue", H.value), e("input", F), g(H);
|
|
881
881
|
}, L = (F) => e("change", F), R = (F) => e("focus", F), I = (F) => {
|
|
882
882
|
e("blur", F), window.setTimeout(() => {
|
|
883
|
-
var
|
|
884
|
-
(
|
|
883
|
+
var H;
|
|
884
|
+
(H = i.value) != null && H.contains(document.activeElement) || k();
|
|
885
885
|
}, 0);
|
|
886
886
|
}, O = (F) => {
|
|
887
887
|
if (!d.value || !l.value.length)
|
|
888
888
|
return;
|
|
889
|
-
let
|
|
890
|
-
(
|
|
889
|
+
let H = r.value;
|
|
890
|
+
(H < 0 || H >= l.value.length) && (H = F > 0 ? -1 : l.value.length);
|
|
891
891
|
for (let Z = 0; Z < l.value.length; Z += 1)
|
|
892
|
-
if (
|
|
893
|
-
r.value =
|
|
892
|
+
if (H = (H + F + l.value.length) % l.value.length, !l.value[H].disabled) {
|
|
893
|
+
r.value = H;
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
896
|
}, E = () => {
|
|
@@ -908,7 +908,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
908
908
|
}, D = (F) => {
|
|
909
909
|
if (F.disabled || !v.value || !s.value)
|
|
910
910
|
return;
|
|
911
|
-
const
|
|
911
|
+
const H = t.modelValue ?? "", Z = v.value, x = H.slice(0, Z.start), W = H.slice(Z.end), h = String(F.value ?? F.label), P = `${Z.trigger}${h}${t.appendSpace ? " " : ""}`, K = `${x}${P}${W}`, A = x.length + P.length;
|
|
912
912
|
e("update:modelValue", K), e("select", F), e("insert", {
|
|
913
913
|
trigger: Z.trigger,
|
|
914
914
|
query: Z.query,
|
|
@@ -916,8 +916,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
916
916
|
text: P,
|
|
917
917
|
range: [Z.start, Z.end]
|
|
918
918
|
}), k(), requestAnimationFrame(() => {
|
|
919
|
-
var V,
|
|
920
|
-
(V = s.value) == null || V.focus(), (
|
|
919
|
+
var V, Y;
|
|
920
|
+
(V = s.value) == null || V.focus(), (Y = s.value) == null || Y.setSelectionRange(A, A);
|
|
921
921
|
});
|
|
922
922
|
}, M = () => {
|
|
923
923
|
if (!d.value)
|
|
@@ -925,20 +925,20 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
925
925
|
const F = l.value[r.value];
|
|
926
926
|
F && D(F);
|
|
927
927
|
}, S = (F) => {
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
928
|
+
const H = F.key;
|
|
929
|
+
if (H === "ArrowDown") {
|
|
930
930
|
F.preventDefault(), E();
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
if (
|
|
933
|
+
if (H === "ArrowUp") {
|
|
934
934
|
F.preventDefault(), T();
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
937
|
-
if (
|
|
937
|
+
if (H === "Enter") {
|
|
938
938
|
F.preventDefault(), M();
|
|
939
939
|
return;
|
|
940
940
|
}
|
|
941
|
-
|
|
941
|
+
H === "Escape" && (F.preventDefault(), k());
|
|
942
942
|
};
|
|
943
943
|
return ve(
|
|
944
944
|
() => t.modelValue,
|
|
@@ -951,7 +951,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
951
951
|
return;
|
|
952
952
|
}
|
|
953
953
|
(r.value < 0 || r.value >= l.value.length) && (r.value = z());
|
|
954
|
-
}), (F,
|
|
954
|
+
}), (F, H) => (c(), b("div", {
|
|
955
955
|
ref_key: "root",
|
|
956
956
|
ref: i,
|
|
957
957
|
class: ee(_.value)
|
|
@@ -986,7 +986,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
986
986
|
type: "button",
|
|
987
987
|
role: "option",
|
|
988
988
|
disabled: Z.disabled,
|
|
989
|
-
onMousedown:
|
|
989
|
+
onMousedown: H[0] || (H[0] = ie(() => {
|
|
990
990
|
}, ["prevent"])),
|
|
991
991
|
onClick: (W) => D(Z)
|
|
992
992
|
}, [
|
|
@@ -1062,7 +1062,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1062
1062
|
}, [
|
|
1063
1063
|
B("div", ya, [
|
|
1064
1064
|
y.$slots.prefix ? (c(), b("span", _a, [
|
|
1065
|
-
|
|
1065
|
+
q(y.$slots, "prefix")
|
|
1066
1066
|
])) : Q("", !0),
|
|
1067
1067
|
B("input", {
|
|
1068
1068
|
class: "vf-password-input__control",
|
|
@@ -1089,7 +1089,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1089
1089
|
onClick: k
|
|
1090
1090
|
}, j(t.value ? y.hideText : y.revealText), 9, Ca)) : Q("", !0),
|
|
1091
1091
|
y.$slots.suffix ? (c(), b("span", wa, [
|
|
1092
|
-
|
|
1092
|
+
q(y.$slots, "suffix")
|
|
1093
1093
|
])) : Q("", !0)
|
|
1094
1094
|
]),
|
|
1095
1095
|
y.showStrength && y.modelValue ? (c(), b("div", $a, [
|
|
@@ -1239,49 +1239,49 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1239
1239
|
},
|
|
1240
1240
|
emits: ["update:modelValue", "change", "open", "close"],
|
|
1241
1241
|
setup(n, { emit: o }) {
|
|
1242
|
-
const a = o, e = n, t = G(null), i = G(!1), s = G("#3b82f6"), d = G(100), r = (S, F,
|
|
1242
|
+
const a = o, e = n, t = G(null), i = G(!1), s = G("#3b82f6"), d = G(100), r = (S, F, H) => Math.min(H, Math.max(F, S)), u = (S) => r(Math.round(S), 0, 255).toString(16).padStart(2, "0"), v = (S) => {
|
|
1243
1243
|
const F = S.trim().replace(/^#/, "");
|
|
1244
1244
|
if (![3, 4, 6, 8].includes(F.length))
|
|
1245
1245
|
return null;
|
|
1246
|
-
let
|
|
1247
|
-
if ((F.length === 3 || F.length === 4) && (
|
|
1246
|
+
let H = F;
|
|
1247
|
+
if ((F.length === 3 || F.length === 4) && (H = F.split("").map((P) => `${P}${P}`).join("")), !/^[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/.test(H))
|
|
1248
1248
|
return null;
|
|
1249
|
-
const Z = Number.parseInt(
|
|
1249
|
+
const Z = Number.parseInt(H.slice(0, 2), 16), x = Number.parseInt(H.slice(2, 4), 16), W = Number.parseInt(H.slice(4, 6), 16), h = H.length === 8 ? Number.parseInt(H.slice(6, 8), 16) / 255 : 1;
|
|
1250
1250
|
return { r: Z, g: x, b: W, a: h, valid: !0, preview: `rgba(${Z}, ${x}, ${W}, ${h})` };
|
|
1251
1251
|
}, p = (S) => {
|
|
1252
1252
|
const F = S.trim().match(/^rgba?\((.*)\)$/i);
|
|
1253
1253
|
if (!F)
|
|
1254
1254
|
return null;
|
|
1255
|
-
const
|
|
1256
|
-
if (
|
|
1255
|
+
const H = F[1].split(",").map((Y) => Y.trim());
|
|
1256
|
+
if (H.length !== 3 && H.length !== 4)
|
|
1257
1257
|
return null;
|
|
1258
|
-
const Z = Number(
|
|
1258
|
+
const Z = Number(H[0]), x = Number(H[1]), W = Number(H[2]), h = H.length === 4 ? Number(H[3]) : 1;
|
|
1259
1259
|
if (![Z, x, W, h].every(Number.isFinite))
|
|
1260
1260
|
return null;
|
|
1261
|
-
const P = r(Z, 0, 255), K = r(x, 0, 255),
|
|
1262
|
-
return { r: P, g: K, b:
|
|
1263
|
-
}, m = (S, F,
|
|
1264
|
-
const Z = (S % 360 + 360) % 360, x = r(F, 0, 100) / 100, W = r(
|
|
1265
|
-
let
|
|
1266
|
-
return Z < 60 ? (
|
|
1267
|
-
r: Math.round((
|
|
1261
|
+
const P = r(Z, 0, 255), K = r(x, 0, 255), A = r(W, 0, 255), V = r(h, 0, 1);
|
|
1262
|
+
return { r: P, g: K, b: A, a: V, valid: !0, preview: `rgba(${P}, ${K}, ${A}, ${V})` };
|
|
1263
|
+
}, m = (S, F, H) => {
|
|
1264
|
+
const Z = (S % 360 + 360) % 360, x = r(F, 0, 100) / 100, W = r(H, 0, 100) / 100, h = (1 - Math.abs(2 * W - 1)) * x, P = h * (1 - Math.abs(Z / 60 % 2 - 1)), K = W - h / 2;
|
|
1265
|
+
let A = 0, V = 0, Y = 0;
|
|
1266
|
+
return Z < 60 ? (A = h, V = P) : Z < 120 ? (A = P, V = h) : Z < 180 ? (V = h, Y = P) : Z < 240 ? (V = P, Y = h) : Z < 300 ? (A = P, Y = h) : (A = h, Y = P), {
|
|
1267
|
+
r: Math.round((A + K) * 255),
|
|
1268
1268
|
g: Math.round((V + K) * 255),
|
|
1269
|
-
b: Math.round((
|
|
1269
|
+
b: Math.round((Y + K) * 255)
|
|
1270
1270
|
};
|
|
1271
|
-
}, $ = (S, F,
|
|
1272
|
-
const Z = S / 255, x = F / 255, W =
|
|
1273
|
-
let
|
|
1274
|
-
K !== 0 && (h === Z ?
|
|
1275
|
-
const V = (h + P) / 2,
|
|
1276
|
-
return { h: Math.round(
|
|
1271
|
+
}, $ = (S, F, H) => {
|
|
1272
|
+
const Z = S / 255, x = F / 255, W = H / 255, h = Math.max(Z, x, W), P = Math.min(Z, x, W), K = h - P;
|
|
1273
|
+
let A = 0;
|
|
1274
|
+
K !== 0 && (h === Z ? A = (x - W) / K % 6 : h === x ? A = (W - Z) / K + 2 : A = (Z - x) / K + 4, A *= 60), A < 0 && (A += 360);
|
|
1275
|
+
const V = (h + P) / 2, Y = K === 0 ? 0 : K / (1 - Math.abs(2 * V - 1));
|
|
1276
|
+
return { h: Math.round(A), s: Math.round(Y * 100), l: Math.round(V * 100) };
|
|
1277
1277
|
}, l = (S) => {
|
|
1278
1278
|
const F = S.trim().match(/^hsla?\((.*)\)$/i);
|
|
1279
1279
|
if (!F)
|
|
1280
1280
|
return null;
|
|
1281
|
-
const
|
|
1282
|
-
if (
|
|
1281
|
+
const H = F[1].split(",").map((A) => A.trim().replace("%", ""));
|
|
1282
|
+
if (H.length !== 3 && H.length !== 4)
|
|
1283
1283
|
return null;
|
|
1284
|
-
const Z = Number(
|
|
1284
|
+
const Z = Number(H[0]), x = Number(H[1]), W = Number(H[2]), h = H.length === 4 ? Number(H[3]) : 1;
|
|
1285
1285
|
if (![Z, x, W, h].every(Number.isFinite))
|
|
1286
1286
|
return null;
|
|
1287
1287
|
const P = m(Z, x, W), K = r(h, 0, 1);
|
|
@@ -1289,14 +1289,14 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1289
1289
|
}, _ = (S) => {
|
|
1290
1290
|
const F = v(S) ?? p(S) ?? l(S);
|
|
1291
1291
|
return F || { r: 59, g: 130, b: 246, a: 1, valid: !1, preview: "rgba(59, 130, 246, 1)" };
|
|
1292
|
-
}, k = (S, F,
|
|
1292
|
+
}, k = (S, F, H, Z) => {
|
|
1293
1293
|
if (e.format === "rgb")
|
|
1294
|
-
return e.alpha ? `rgba(${S}, ${F}, ${
|
|
1294
|
+
return e.alpha ? `rgba(${S}, ${F}, ${H}, ${Z.toFixed(2)})` : `rgb(${S}, ${F}, ${H})`;
|
|
1295
1295
|
if (e.format === "hsl") {
|
|
1296
|
-
const W = $(S, F,
|
|
1296
|
+
const W = $(S, F, H);
|
|
1297
1297
|
return e.alpha ? `hsla(${W.h}, ${W.s}%, ${W.l}%, ${Z.toFixed(2)})` : `hsl(${W.h}, ${W.s}%, ${W.l}%)`;
|
|
1298
1298
|
}
|
|
1299
|
-
const x = `#${u(S)}${u(F)}${u(
|
|
1299
|
+
const x = `#${u(S)}${u(F)}${u(H)}`;
|
|
1300
1300
|
return e.alpha ? `${x}${u(Z * 255)}` : x;
|
|
1301
1301
|
}, y = (S) => {
|
|
1302
1302
|
const F = _(S);
|
|
@@ -1319,8 +1319,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1319
1319
|
const S = ["vf-color-picker", `vf-color-picker_${e.variant}`];
|
|
1320
1320
|
return e.size !== "normal" && S.push(`vf-color-picker_${e.size}`), e.disabled && S.push("vf-color-picker_disabled"), S;
|
|
1321
1321
|
}), w = () => {
|
|
1322
|
-
const S = _(s.value), F = e.alpha ? d.value / 100 : 1,
|
|
1323
|
-
a("update:modelValue",
|
|
1322
|
+
const S = _(s.value), F = e.alpha ? d.value / 100 : 1, H = k(S.r, S.g, S.b, F);
|
|
1323
|
+
a("update:modelValue", H), a("change", H);
|
|
1324
1324
|
}, L = (S) => {
|
|
1325
1325
|
const F = S.target;
|
|
1326
1326
|
s.value = F.value, w();
|
|
@@ -1328,12 +1328,12 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1328
1328
|
const F = S.target;
|
|
1329
1329
|
d.value = r(Number(F.value), 0, 100), w();
|
|
1330
1330
|
}, I = (S) => {
|
|
1331
|
-
const F = S.target,
|
|
1332
|
-
if (!
|
|
1331
|
+
const F = S.target, H = _(F.value);
|
|
1332
|
+
if (!H.valid) {
|
|
1333
1333
|
F.value = C.value;
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
|
-
s.value = `#${u(
|
|
1336
|
+
s.value = `#${u(H.r)}${u(H.g)}${u(H.b)}`, e.alpha && (d.value = Math.round(H.a * 100)), w();
|
|
1337
1337
|
}, O = (S) => {
|
|
1338
1338
|
if (e.disabled || e.readonly)
|
|
1339
1339
|
return;
|
|
@@ -1403,12 +1403,12 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1403
1403
|
}, null, 40, Oa)
|
|
1404
1404
|
]),
|
|
1405
1405
|
S.presets.length ? (c(), b("div", Aa, [
|
|
1406
|
-
(c(!0), b(fe, null, he(S.presets, (
|
|
1407
|
-
key: `${
|
|
1406
|
+
(c(!0), b(fe, null, he(S.presets, (H, Z) => (c(), b("button", {
|
|
1407
|
+
key: `${H}-${Z}`,
|
|
1408
1408
|
class: "vf-color-picker__preset",
|
|
1409
1409
|
type: "button",
|
|
1410
|
-
style: ke({ backgroundColor: _(
|
|
1411
|
-
onClick: (x) => O(
|
|
1410
|
+
style: ke({ backgroundColor: _(H).preview }),
|
|
1411
|
+
onClick: (x) => O(H)
|
|
1412
1412
|
}, null, 12, Ha))), 128))
|
|
1413
1413
|
])) : Q("", !0)
|
|
1414
1414
|
])) : Q("", !0)
|
|
@@ -1499,7 +1499,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1499
1499
|
class: ee(k.value)
|
|
1500
1500
|
}, [
|
|
1501
1501
|
w.$slots.prefix ? (c(), b("span", Wa, [
|
|
1502
|
-
|
|
1502
|
+
q(w.$slots, "prefix")
|
|
1503
1503
|
])) : Q("", !0),
|
|
1504
1504
|
B("input", {
|
|
1505
1505
|
ref: "control",
|
|
@@ -1515,7 +1515,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1515
1515
|
onBlur: g
|
|
1516
1516
|
}, null, 40, Ka),
|
|
1517
1517
|
w.$slots.suffix ? (c(), b("span", Na, [
|
|
1518
|
-
|
|
1518
|
+
q(w.$slots, "suffix")
|
|
1519
1519
|
])) : Q("", !0)
|
|
1520
1520
|
], 2));
|
|
1521
1521
|
}
|
|
@@ -1577,7 +1577,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1577
1577
|
class: ee(p.value)
|
|
1578
1578
|
}, [
|
|
1579
1579
|
C.$slots.prefix ? (c(), b("span", Ga, [
|
|
1580
|
-
|
|
1580
|
+
q(C.$slots, "prefix")
|
|
1581
1581
|
])) : Q("", !0),
|
|
1582
1582
|
B("input", {
|
|
1583
1583
|
class: "vf-number-input__control",
|
|
@@ -1612,7 +1612,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1612
1612
|
}, " - ", 8, Xa)
|
|
1613
1613
|
])) : Q("", !0),
|
|
1614
1614
|
C.$slots.suffix ? (c(), b("span", Ua, [
|
|
1615
|
-
|
|
1615
|
+
q(C.$slots, "suffix")
|
|
1616
1616
|
])) : Q("", !0)
|
|
1617
1617
|
], 2));
|
|
1618
1618
|
}
|
|
@@ -1622,6 +1622,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1622
1622
|
modelValue: { default: void 0 },
|
|
1623
1623
|
initialValues: { default: void 0 },
|
|
1624
1624
|
validate: { type: Function, default: void 0 },
|
|
1625
|
+
submit: { type: Function, default: void 0 },
|
|
1626
|
+
mapSubmitError: { type: Function, default: void 0 },
|
|
1625
1627
|
validateOn: { default: "submit" },
|
|
1626
1628
|
disabled: { type: Boolean, default: !1 },
|
|
1627
1629
|
novalidate: { type: Boolean, default: !0 },
|
|
@@ -1629,7 +1631,17 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1629
1631
|
ariaLabel: { default: void 0 },
|
|
1630
1632
|
ariaLabelledby: { default: void 0 }
|
|
1631
1633
|
},
|
|
1632
|
-
emits: [
|
|
1634
|
+
emits: [
|
|
1635
|
+
"update:modelValue",
|
|
1636
|
+
"change",
|
|
1637
|
+
"blur",
|
|
1638
|
+
"validate",
|
|
1639
|
+
"submit",
|
|
1640
|
+
"submitSuccess",
|
|
1641
|
+
"submitError",
|
|
1642
|
+
"invalidSubmit",
|
|
1643
|
+
"reset"
|
|
1644
|
+
],
|
|
1633
1645
|
setup(n, { emit: o }) {
|
|
1634
1646
|
const a = n, e = o, t = G(null), i = G(D(S(a.initialValues, a.modelValue))), s = G(D(i.value)), d = G({}), r = G({}), u = G(!1);
|
|
1635
1647
|
ve(
|
|
@@ -1682,7 +1694,17 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1682
1694
|
e("invalidSubmit", D(r.value), K, h);
|
|
1683
1695
|
return;
|
|
1684
1696
|
}
|
|
1685
|
-
e("submit", K, h)
|
|
1697
|
+
if (e("submit", K, h), !a.submit) {
|
|
1698
|
+
e("submitSuccess", K, void 0, h);
|
|
1699
|
+
return;
|
|
1700
|
+
}
|
|
1701
|
+
try {
|
|
1702
|
+
const A = await a.submit(K);
|
|
1703
|
+
e("submitSuccess", K, A, h);
|
|
1704
|
+
} catch (A) {
|
|
1705
|
+
const V = a.mapSubmitError ? a.mapSubmitError(A, K) : "Submit failed", Y = F(V);
|
|
1706
|
+
r.value = Y, e("submitError", A, D(Y), K, h), e("invalidSubmit", D(Y), K, h);
|
|
1707
|
+
}
|
|
1686
1708
|
} finally {
|
|
1687
1709
|
u.value = !1;
|
|
1688
1710
|
}
|
|
@@ -1694,19 +1716,19 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1694
1716
|
}, R = (h) => {
|
|
1695
1717
|
h.preventDefault(), w(h);
|
|
1696
1718
|
}, I = async (h) => {
|
|
1697
|
-
const P =
|
|
1719
|
+
const P = H(h.target);
|
|
1698
1720
|
if (!P)
|
|
1699
1721
|
return;
|
|
1700
|
-
const K = P.name.trim(),
|
|
1701
|
-
l(K,
|
|
1722
|
+
const K = P.name.trim(), A = Z(P);
|
|
1723
|
+
l(K, A), z("input") && await C("input");
|
|
1702
1724
|
}, O = async (h) => {
|
|
1703
|
-
const P =
|
|
1725
|
+
const P = H(h.target);
|
|
1704
1726
|
if (!P)
|
|
1705
1727
|
return;
|
|
1706
|
-
const K = P.name.trim(),
|
|
1707
|
-
l(K,
|
|
1728
|
+
const K = P.name.trim(), A = Z(P);
|
|
1729
|
+
l(K, A), z("change") && await C("change");
|
|
1708
1730
|
}, E = async (h) => {
|
|
1709
|
-
const P =
|
|
1731
|
+
const P = H(h.target);
|
|
1710
1732
|
if (!P)
|
|
1711
1733
|
return;
|
|
1712
1734
|
const K = P.name.trim();
|
|
@@ -1738,8 +1760,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1738
1760
|
return !0;
|
|
1739
1761
|
}
|
|
1740
1762
|
if (T(h) && T(P)) {
|
|
1741
|
-
const K = Object.keys(h),
|
|
1742
|
-
if (K.length !==
|
|
1763
|
+
const K = Object.keys(h), A = Object.keys(P);
|
|
1764
|
+
if (K.length !== A.length)
|
|
1743
1765
|
return !1;
|
|
1744
1766
|
for (const V of K)
|
|
1745
1767
|
if (!M(h[V], P[V]))
|
|
@@ -1752,8 +1774,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1752
1774
|
const P = {};
|
|
1753
1775
|
for (const K of h)
|
|
1754
1776
|
if (!(!K || !T(K)))
|
|
1755
|
-
for (const
|
|
1756
|
-
P[
|
|
1777
|
+
for (const A in K)
|
|
1778
|
+
P[A] = D(K[A]);
|
|
1757
1779
|
return P;
|
|
1758
1780
|
}
|
|
1759
1781
|
function F(h) {
|
|
@@ -1767,12 +1789,12 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1767
1789
|
return {};
|
|
1768
1790
|
const P = {};
|
|
1769
1791
|
for (const K in h) {
|
|
1770
|
-
const
|
|
1771
|
-
typeof
|
|
1792
|
+
const A = h[K];
|
|
1793
|
+
typeof A == "string" && A && (P[K] = A);
|
|
1772
1794
|
}
|
|
1773
1795
|
return P;
|
|
1774
1796
|
}
|
|
1775
|
-
function
|
|
1797
|
+
function H(h) {
|
|
1776
1798
|
var P;
|
|
1777
1799
|
return h && (h instanceof HTMLInputElement || h instanceof HTMLSelectElement || h instanceof HTMLTextAreaElement) && ((P = h.name) == null ? void 0 : P.trim()) ? h : null;
|
|
1778
1800
|
}
|
|
@@ -1785,16 +1807,16 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1785
1807
|
if (!P)
|
|
1786
1808
|
return h.checked;
|
|
1787
1809
|
const K = Array.from(P.querySelectorAll('input[type="checkbox"]')).filter(
|
|
1788
|
-
(
|
|
1810
|
+
(A) => A.name === h.name
|
|
1789
1811
|
);
|
|
1790
|
-
return K.length > 1 || h.value !== "on" ? K.filter((
|
|
1812
|
+
return K.length > 1 || h.value !== "on" ? K.filter((A) => A.checked).map((A) => A.value) : h.checked;
|
|
1791
1813
|
}
|
|
1792
1814
|
function W(h) {
|
|
1793
1815
|
const P = t.value;
|
|
1794
1816
|
if (!P)
|
|
1795
1817
|
return h.value;
|
|
1796
1818
|
const K = Array.from(P.querySelectorAll('input[type="radio"]')).find(
|
|
1797
|
-
(
|
|
1819
|
+
(A) => A.name === h.name && A.checked
|
|
1798
1820
|
);
|
|
1799
1821
|
return K == null ? void 0 : K.value;
|
|
1800
1822
|
}
|
|
@@ -1812,7 +1834,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1812
1834
|
onChange: O,
|
|
1813
1835
|
onFocusout: E
|
|
1814
1836
|
}, [
|
|
1815
|
-
|
|
1837
|
+
q(h.$slots, "default", {
|
|
1816
1838
|
values: s.value,
|
|
1817
1839
|
errors: r.value,
|
|
1818
1840
|
touched: d.value,
|
|
@@ -1859,17 +1881,19 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1859
1881
|
class: "vf-form-field__label",
|
|
1860
1882
|
for: t.value
|
|
1861
1883
|
}, [
|
|
1862
|
-
|
|
1884
|
+
q(m.$slots, "label", {}, () => [
|
|
1863
1885
|
me(j(m.label), 1)
|
|
1864
1886
|
]),
|
|
1865
1887
|
m.required ? (c(), b("span", Ja, "*")) : Q("", !0)
|
|
1866
1888
|
], 8, Za)) : Q("", !0),
|
|
1867
1889
|
B("div", eo, [
|
|
1868
|
-
|
|
1890
|
+
q(m.$slots, "default", {
|
|
1869
1891
|
id: t.value,
|
|
1870
1892
|
describedBy: v.value,
|
|
1871
1893
|
invalid: u.value,
|
|
1872
|
-
required: m.required
|
|
1894
|
+
required: m.required,
|
|
1895
|
+
ariaInvalid: u.value ? "true" : void 0,
|
|
1896
|
+
ariaRequired: m.required ? "true" : void 0
|
|
1873
1897
|
})
|
|
1874
1898
|
]),
|
|
1875
1899
|
r.value ? (c(), b("p", {
|
|
@@ -1877,7 +1901,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1877
1901
|
id: i.value,
|
|
1878
1902
|
class: "vf-form-field__hint"
|
|
1879
1903
|
}, [
|
|
1880
|
-
|
|
1904
|
+
q(m.$slots, "hint", {}, () => [
|
|
1881
1905
|
me(j(m.hint), 1)
|
|
1882
1906
|
])
|
|
1883
1907
|
], 8, to)) : Q("", !0),
|
|
@@ -1887,7 +1911,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1887
1911
|
class: "vf-form-field__error",
|
|
1888
1912
|
role: "alert"
|
|
1889
1913
|
}, [
|
|
1890
|
-
|
|
1914
|
+
q(m.$slots, "error", {}, () => [
|
|
1891
1915
|
me(j(m.error), 1)
|
|
1892
1916
|
])
|
|
1893
1917
|
], 8, ao)) : Q("", !0)
|
|
@@ -2487,19 +2511,19 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2487
2511
|
let w = C, L = g;
|
|
2488
2512
|
const R = _ ? Math.abs(k) : 0, I = R, O = R;
|
|
2489
2513
|
if (Ke(e, s) && typeof window < "u") {
|
|
2490
|
-
const T = I, D = window.innerWidth - s.clientWidth - I, M = D < T ? T : D, S = O, F = window.innerHeight - s.clientHeight - O,
|
|
2491
|
-
w < T ? w = T : w > M && (w = M), L < S ? L = S : L >
|
|
2492
|
-
const Z = I, x = window.innerWidth - s.clientWidth - I, W = O, h = window.innerHeight - s.clientHeight - O, P = l ? Z + y : Z, K = l ? x + y : x,
|
|
2493
|
-
return v.x < P ? v.x = P : v.x > K && (v.x = K), v.y <
|
|
2514
|
+
const T = I, D = window.innerWidth - s.clientWidth - I, M = D < T ? T : D, S = O, F = window.innerHeight - s.clientHeight - O, H = F < S ? S : F;
|
|
2515
|
+
w < T ? w = T : w > M && (w = M), L < S ? L = S : L > H && (L = H), l ? (v.x = o + (w - C), v.y = a + (L - g)) : (v.x = w, v.y = L);
|
|
2516
|
+
const Z = I, x = window.innerWidth - s.clientWidth - I, W = O, h = window.innerHeight - s.clientHeight - O, P = l ? Z + y : Z, K = l ? x + y : x, A = l ? W + z : W, V = l ? h + z : h;
|
|
2517
|
+
return v.x < P ? v.x = P : v.x > K && (v.x = K), v.y < A ? v.y = A : v.y > V && (v.y = V), v;
|
|
2494
2518
|
}
|
|
2495
2519
|
const E = Oe(s);
|
|
2496
2520
|
if (E !== null) {
|
|
2497
|
-
const T = Fe(r, s, e), D = T.left, M = T.left + T.width, S = T.top, F = T.top + T.height,
|
|
2498
|
-
M <= K ? w =
|
|
2521
|
+
const T = Fe(r, s, e), D = T.left, M = T.left + T.width, S = T.top, F = T.top + T.height, H = E.scrollLeft + I, Z = et(E) - s.clientWidth - I, x = Z < H ? H : Z, W = E.scrollTop + O, h = tt(E) - s.clientHeight - O, P = h < W ? W : h, K = E.scrollLeft, A = et(E), V = E.scrollTop, Y = tt(E);
|
|
2522
|
+
M <= K ? w = H : D >= A && (w = x), F <= V ? L = W : S >= Y && (L = P), L < W ? L = W : L > P && (L = P), w < H ? w = H : w > x && (w = x);
|
|
2499
2523
|
}
|
|
2500
2524
|
if (l ? (v.x = o + (w - C), v.y = a + (L - g)) : (v.x = w, v.y = L), E !== null) {
|
|
2501
|
-
const T = E.scrollLeft + I, D = et(E) - s.clientWidth - I, M = E.scrollTop + O, S = tt(E) - s.clientHeight - O, F = l ? T + y : T,
|
|
2502
|
-
v.x < F ? v.x = F : v.x >
|
|
2525
|
+
const T = E.scrollLeft + I, D = et(E) - s.clientWidth - I, M = E.scrollTop + O, S = tt(E) - s.clientHeight - O, F = l ? T + y : T, H = l ? D + y : D, Z = l ? M + z : M, x = l ? S + z : S;
|
|
2526
|
+
v.x < F ? v.x = F : v.x > H && (v.x = H), v.y < Z ? v.y = Z : v.y > x && (v.y = x);
|
|
2503
2527
|
}
|
|
2504
2528
|
return v;
|
|
2505
2529
|
}
|
|
@@ -2752,7 +2776,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2752
2776
|
return;
|
|
2753
2777
|
const E = s.value, T = d.value, D = async () => {
|
|
2754
2778
|
const {
|
|
2755
|
-
x:
|
|
2779
|
+
x: H,
|
|
2756
2780
|
y: Z,
|
|
2757
2781
|
placement: x
|
|
2758
2782
|
} = await Me(E, T, {
|
|
@@ -2760,7 +2784,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2760
2784
|
strategy: "fixed",
|
|
2761
2785
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
2762
2786
|
});
|
|
2763
|
-
v.value = x ?? u.value, T.style.minWidth = `${E.getBoundingClientRect().width}px`, T.style.left = `${
|
|
2787
|
+
v.value = x ?? u.value, T.style.minWidth = `${E.getBoundingClientRect().width}px`, T.style.left = `${H}px`, T.style.top = `${Z}px`;
|
|
2764
2788
|
}, M = async () => {
|
|
2765
2789
|
await D();
|
|
2766
2790
|
}, S = De(E, () => {
|
|
@@ -2897,7 +2921,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2897
2921
|
}
|
|
2898
2922
|
let K = v.value;
|
|
2899
2923
|
(K < 0 || K >= P.length) && (K = h > 0 ? -1 : P.length);
|
|
2900
|
-
for (let
|
|
2924
|
+
for (let A = 0; A < P.length; A += 1)
|
|
2901
2925
|
if (K = (K + h + P.length) % P.length, !P[K].disabled) {
|
|
2902
2926
|
v.value = K;
|
|
2903
2927
|
return;
|
|
@@ -2928,7 +2952,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2928
2952
|
return;
|
|
2929
2953
|
}
|
|
2930
2954
|
R(1);
|
|
2931
|
-
},
|
|
2955
|
+
}, H = () => {
|
|
2932
2956
|
if (!r.value) {
|
|
2933
2957
|
I();
|
|
2934
2958
|
return;
|
|
@@ -2961,17 +2985,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2961
2985
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
2962
2986
|
});
|
|
2963
2987
|
m.value = U ?? p.value, P.style.minWidth = `${h.getBoundingClientRect().width}px`, P.style.left = `${ae}px`, P.style.top = `${se}px`;
|
|
2964
|
-
},
|
|
2988
|
+
}, A = async () => {
|
|
2965
2989
|
await K();
|
|
2966
2990
|
}, V = De(h, () => {
|
|
2967
|
-
|
|
2968
|
-
}),
|
|
2969
|
-
|
|
2991
|
+
A();
|
|
2992
|
+
}), Y = () => {
|
|
2993
|
+
A();
|
|
2970
2994
|
};
|
|
2971
|
-
document.addEventListener("scroll",
|
|
2972
|
-
update:
|
|
2995
|
+
document.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y, !1), l = {
|
|
2996
|
+
update: A,
|
|
2973
2997
|
destroy: () => {
|
|
2974
|
-
V(), document.removeEventListener("scroll",
|
|
2998
|
+
V(), document.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y, !1);
|
|
2975
2999
|
}
|
|
2976
3000
|
}, l.update();
|
|
2977
3001
|
};
|
|
@@ -3026,7 +3050,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3026
3050
|
onClick: I,
|
|
3027
3051
|
onKeydown: [
|
|
3028
3052
|
pe(ie(F, ["prevent"]), ["down"]),
|
|
3029
|
-
pe(ie(
|
|
3053
|
+
pe(ie(H, ["prevent"]), ["up"]),
|
|
3030
3054
|
pe(ie(Z, ["prevent"]), ["enter"]),
|
|
3031
3055
|
pe(ie(O, ["prevent"]), ["esc"]),
|
|
3032
3056
|
pe(O, ["tab"])
|
|
@@ -3051,13 +3075,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3051
3075
|
role: "listbox",
|
|
3052
3076
|
"data-placement": m.value
|
|
3053
3077
|
}, [
|
|
3054
|
-
h.loading ? (c(), b("div", Ko, j(h.loadingText), 1)) : y.value.length > 0 ? (c(!0), b(fe, { key: 1 }, he(y.value, (K,
|
|
3055
|
-
id: g(
|
|
3078
|
+
h.loading ? (c(), b("div", Ko, j(h.loadingText), 1)) : y.value.length > 0 ? (c(!0), b(fe, { key: 1 }, he(y.value, (K, A) => (c(), b("button", {
|
|
3079
|
+
id: g(A),
|
|
3056
3080
|
key: K.value,
|
|
3057
3081
|
class: ee(["vf-autocomplete__option", {
|
|
3058
3082
|
"is-active": w(K),
|
|
3059
3083
|
"is-disabled": K.disabled,
|
|
3060
|
-
"is-highlighted":
|
|
3084
|
+
"is-highlighted": A === v.value
|
|
3061
3085
|
}]),
|
|
3062
3086
|
type: "button",
|
|
3063
3087
|
role: "option",
|
|
@@ -3145,7 +3169,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3145
3169
|
return;
|
|
3146
3170
|
}
|
|
3147
3171
|
M();
|
|
3148
|
-
},
|
|
3172
|
+
}, H = () => {
|
|
3149
3173
|
const U = u.value.trim();
|
|
3150
3174
|
return !U || !w.value ? !1 : (t.allowCreate && !C.value && e("create", U), T(U), E(U), S(), !0);
|
|
3151
3175
|
}, Z = () => {
|
|
@@ -3164,7 +3188,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3164
3188
|
}, K = (U) => {
|
|
3165
3189
|
var X;
|
|
3166
3190
|
e("blur", U), t.strict && u.value.trim() !== ((X = k.value) == null ? void 0 : X.label) && Z();
|
|
3167
|
-
},
|
|
3191
|
+
}, A = () => {
|
|
3168
3192
|
if (!r.value) {
|
|
3169
3193
|
M();
|
|
3170
3194
|
return;
|
|
@@ -3176,7 +3200,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3176
3200
|
return;
|
|
3177
3201
|
}
|
|
3178
3202
|
D(-1);
|
|
3179
|
-
},
|
|
3203
|
+
}, Y = () => {
|
|
3180
3204
|
if (!r.value) {
|
|
3181
3205
|
M();
|
|
3182
3206
|
return;
|
|
@@ -3186,7 +3210,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3186
3210
|
x(U);
|
|
3187
3211
|
return;
|
|
3188
3212
|
}
|
|
3189
|
-
|
|
3213
|
+
H() || t.strict && Z();
|
|
3190
3214
|
}, ae = (U) => {
|
|
3191
3215
|
var re;
|
|
3192
3216
|
if (!r.value || !i.value)
|
|
@@ -3277,9 +3301,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3277
3301
|
onBlur: K,
|
|
3278
3302
|
onClick: M,
|
|
3279
3303
|
onKeydown: [
|
|
3280
|
-
pe(ie(
|
|
3304
|
+
pe(ie(A, ["prevent"]), ["down"]),
|
|
3281
3305
|
pe(ie(V, ["prevent"]), ["up"]),
|
|
3282
|
-
pe(ie(
|
|
3306
|
+
pe(ie(Y, ["prevent"]), ["enter"]),
|
|
3283
3307
|
pe(ie(S, ["prevent"]), ["esc"]),
|
|
3284
3308
|
pe(S, ["tab"])
|
|
3285
3309
|
]
|
|
@@ -3379,7 +3403,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3379
3403
|
if (!t.filter)
|
|
3380
3404
|
return k.value;
|
|
3381
3405
|
const V = v.value.trim().toLowerCase();
|
|
3382
|
-
return V ? k.value.filter((
|
|
3406
|
+
return V ? k.value.filter((Y) => Y.label.toLowerCase().includes(V)) : k.value;
|
|
3383
3407
|
}), C = f(() => k.value.filter((V) => y.value.includes(V.value))), g = f(() => C.value.length === 0 ? t.placeholder : C.value.map((V) => V.label).join(", ")), w = f(() => {
|
|
3384
3408
|
const V = ["vf-multiselect", `vf-multiselect_${t.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
3385
3409
|
return t.size !== "normal" && V.push(`vf-multiselect_${t.size}`), t.disabled && V.push("vf-multiselect_disabled"), V.filter(Boolean);
|
|
@@ -3388,7 +3412,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3388
3412
|
}, E = (V) => {
|
|
3389
3413
|
if (!(V.disabled || t.readonly)) {
|
|
3390
3414
|
if (I(V)) {
|
|
3391
|
-
O(y.value.filter((
|
|
3415
|
+
O(y.value.filter((Y) => Y !== V.value));
|
|
3392
3416
|
return;
|
|
3393
3417
|
}
|
|
3394
3418
|
O([...y.value, V.value]);
|
|
@@ -3396,15 +3420,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3396
3420
|
}, T = () => {
|
|
3397
3421
|
t.readonly || O([]);
|
|
3398
3422
|
}, D = (V) => {
|
|
3399
|
-
const
|
|
3400
|
-
if (!
|
|
3423
|
+
const Y = z.value;
|
|
3424
|
+
if (!Y.length) {
|
|
3401
3425
|
p.value = -1;
|
|
3402
3426
|
return;
|
|
3403
3427
|
}
|
|
3404
3428
|
let ae = p.value;
|
|
3405
|
-
(ae < 0 || ae >=
|
|
3406
|
-
for (let se = 0; se <
|
|
3407
|
-
if (ae = (ae + V +
|
|
3429
|
+
(ae < 0 || ae >= Y.length) && (ae = V > 0 ? -1 : Y.length);
|
|
3430
|
+
for (let se = 0; se < Y.length; se += 1)
|
|
3431
|
+
if (ae = (ae + V + Y.length) % Y.length, !Y[ae].disabled) {
|
|
3408
3432
|
p.value = ae;
|
|
3409
3433
|
return;
|
|
3410
3434
|
}
|
|
@@ -3420,7 +3444,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3420
3444
|
return;
|
|
3421
3445
|
}
|
|
3422
3446
|
M();
|
|
3423
|
-
},
|
|
3447
|
+
}, H = () => {
|
|
3424
3448
|
if (!u.value) {
|
|
3425
3449
|
M();
|
|
3426
3450
|
return;
|
|
@@ -3440,28 +3464,28 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3440
3464
|
const V = z.value[p.value];
|
|
3441
3465
|
V && !V.disabled && E(V);
|
|
3442
3466
|
}, W = (V) => {
|
|
3443
|
-
const
|
|
3444
|
-
v.value =
|
|
3467
|
+
const Y = V.target;
|
|
3468
|
+
v.value = Y.value, e("search", Y.value), p.value = R();
|
|
3445
3469
|
}, h = (V) => e("focus", V), P = (V) => e("blur", V), K = (V) => {
|
|
3446
3470
|
var ae;
|
|
3447
3471
|
if (!u.value || !i.value)
|
|
3448
3472
|
return;
|
|
3449
|
-
const
|
|
3450
|
-
i.value.contains(
|
|
3451
|
-
},
|
|
3473
|
+
const Y = V.target;
|
|
3474
|
+
i.value.contains(Y) || (ae = d.value) != null && ae.contains(Y) || S();
|
|
3475
|
+
}, A = () => {
|
|
3452
3476
|
if (!s.value || !d.value)
|
|
3453
3477
|
return;
|
|
3454
|
-
const V = s.value,
|
|
3478
|
+
const V = s.value, Y = d.value, ae = async () => {
|
|
3455
3479
|
const {
|
|
3456
3480
|
x: re,
|
|
3457
3481
|
y: de,
|
|
3458
3482
|
placement: ye
|
|
3459
|
-
} = await Me(V,
|
|
3483
|
+
} = await Me(V, Y, {
|
|
3460
3484
|
placement: m.value,
|
|
3461
3485
|
strategy: "fixed",
|
|
3462
3486
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
3463
3487
|
});
|
|
3464
|
-
$.value = ye ?? m.value,
|
|
3488
|
+
$.value = ye ?? m.value, Y.style.minWidth = `${V.getBoundingClientRect().width}px`, Y.style.left = `${re}px`, Y.style.top = `${de}px`;
|
|
3465
3489
|
}, se = async () => {
|
|
3466
3490
|
await ae();
|
|
3467
3491
|
}, U = De(V, () => {
|
|
@@ -3487,14 +3511,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3487
3511
|
_ && (_.destroy(), _ = null);
|
|
3488
3512
|
return;
|
|
3489
3513
|
}
|
|
3490
|
-
await $e(), _ ||
|
|
3514
|
+
await $e(), _ || A(), _ == null || _.update();
|
|
3491
3515
|
}), ve(z, () => {
|
|
3492
3516
|
p.value >= z.value.length && (p.value = R());
|
|
3493
3517
|
}), Ve(() => {
|
|
3494
3518
|
document.addEventListener("click", K);
|
|
3495
3519
|
}), we(() => {
|
|
3496
3520
|
document.removeEventListener("click", K), _ == null || _.destroy(), _ = null;
|
|
3497
|
-
}), (V,
|
|
3521
|
+
}), (V, Y) => (c(), b("div", {
|
|
3498
3522
|
ref_key: "root",
|
|
3499
3523
|
ref: i,
|
|
3500
3524
|
class: ee(w.value)
|
|
@@ -3510,7 +3534,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3510
3534
|
"aria-haspopup": "listbox",
|
|
3511
3535
|
onClick: F,
|
|
3512
3536
|
onKeydown: [
|
|
3513
|
-
pe(ie(
|
|
3537
|
+
pe(ie(H, ["prevent"]), ["down"]),
|
|
3514
3538
|
pe(ie(Z, ["prevent"]), ["up"]),
|
|
3515
3539
|
pe(ie(x, ["prevent"]), ["enter"]),
|
|
3516
3540
|
pe(ie(S, ["prevent"]), ["esc"])
|
|
@@ -3521,7 +3545,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3521
3545
|
B("span", {
|
|
3522
3546
|
class: ee(["vf-multiselect__label", { "vf-multiselect__label_placeholder": y.value.length === 0 }])
|
|
3523
3547
|
}, j(g.value), 3),
|
|
3524
|
-
|
|
3548
|
+
Y[0] || (Y[0] = B("span", {
|
|
3525
3549
|
class: "vf-multiselect__chevron",
|
|
3526
3550
|
"aria-hidden": "true"
|
|
3527
3551
|
}, "▾", -1))
|
|
@@ -3553,7 +3577,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3553
3577
|
placeholder: V.searchPlaceholder,
|
|
3554
3578
|
onInput: W,
|
|
3555
3579
|
onKeydown: [
|
|
3556
|
-
pe(ie(
|
|
3580
|
+
pe(ie(H, ["prevent"]), ["down"]),
|
|
3557
3581
|
pe(ie(Z, ["prevent"]), ["up"]),
|
|
3558
3582
|
pe(ie(x, ["prevent"]), ["enter"]),
|
|
3559
3583
|
pe(ie(S, ["prevent"]), ["esc"])
|
|
@@ -3653,7 +3677,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3653
3677
|
return;
|
|
3654
3678
|
const oe = _.value.filter((le, ge) => ge !== te);
|
|
3655
3679
|
O(oe), e("remove", N);
|
|
3656
|
-
},
|
|
3680
|
+
}, H = () => {
|
|
3657
3681
|
t.readonly || _.value.length !== 0 && (O([]), e("remove", [..._.value]));
|
|
3658
3682
|
}, Z = (te) => {
|
|
3659
3683
|
const N = z.value;
|
|
@@ -3685,11 +3709,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3685
3709
|
}, K = (te) => {
|
|
3686
3710
|
const N = te.target;
|
|
3687
3711
|
r.value = N.value, e("search", N.value), x(), v.value = R();
|
|
3688
|
-
},
|
|
3712
|
+
}, A = (te) => {
|
|
3689
3713
|
e("focus", te), x();
|
|
3690
3714
|
}, V = (te) => {
|
|
3691
3715
|
e("blur", te);
|
|
3692
|
-
},
|
|
3716
|
+
}, Y = () => {
|
|
3693
3717
|
if (!u.value) {
|
|
3694
3718
|
x();
|
|
3695
3719
|
return;
|
|
@@ -3803,10 +3827,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3803
3827
|
"aria-controls": $,
|
|
3804
3828
|
"aria-activedescendant": g.value,
|
|
3805
3829
|
onInput: K,
|
|
3806
|
-
onFocus:
|
|
3830
|
+
onFocus: A,
|
|
3807
3831
|
onBlur: V,
|
|
3808
3832
|
onKeydown: [
|
|
3809
|
-
pe(ie(
|
|
3833
|
+
pe(ie(Y, ["prevent"]), ["down"]),
|
|
3810
3834
|
pe(ie(ae, ["prevent"]), ["up"]),
|
|
3811
3835
|
pe(ie(se, ["prevent"]), ["enter"]),
|
|
3812
3836
|
pe(ie(W, ["prevent"]), ["esc"]),
|
|
@@ -3821,7 +3845,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3821
3845
|
class: "vf-tag-input__clear",
|
|
3822
3846
|
type: "button",
|
|
3823
3847
|
"aria-label": "Clear tags",
|
|
3824
|
-
onClick: ie(
|
|
3848
|
+
onClick: ie(H, ["stop"])
|
|
3825
3849
|
}, " ✕ ")) : Q("", !0),
|
|
3826
3850
|
B("button", {
|
|
3827
3851
|
class: "vf-tag-input__chevron",
|
|
@@ -3885,9 +3909,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3885
3909
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3886
3910
|
setup(n, { emit: o }) {
|
|
3887
3911
|
let a = 0;
|
|
3888
|
-
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(!1), u = G("bottom"), v = G("bottom"), p = `vf-datepicker-panel-${++a}`, m = G(x(
|
|
3912
|
+
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(!1), u = G("bottom"), v = G("bottom"), p = `vf-datepicker-panel-${++a}`, m = G(x(H(t.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
3889
3913
|
let $ = null;
|
|
3890
|
-
const l = f(() =>
|
|
3914
|
+
const l = f(() => H(t.modelValue)), _ = f(() => H(t.min)), k = f(() => H(t.max)), y = f(() => l.value ? l.value.toLocaleDateString(t.locale, {
|
|
3891
3915
|
year: "numeric",
|
|
3892
3916
|
month: "short",
|
|
3893
3917
|
day: "numeric"
|
|
@@ -3895,13 +3919,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3895
3919
|
year: "numeric",
|
|
3896
3920
|
month: "long"
|
|
3897
3921
|
})), C = f(() => {
|
|
3898
|
-
const V = new Intl.DateTimeFormat(t.locale, { weekday: "short" }),
|
|
3922
|
+
const V = new Intl.DateTimeFormat(t.locale, { weekday: "short" }), Y = new Date(2026, 0, 4);
|
|
3899
3923
|
return Array.from({ length: 7 }, (ae, se) => {
|
|
3900
|
-
const U = (se + t.firstDayOfWeek) % 7, X = new Date(
|
|
3901
|
-
return X.setDate(
|
|
3924
|
+
const U = (se + t.firstDayOfWeek) % 7, X = new Date(Y);
|
|
3925
|
+
return X.setDate(Y.getDate() + U), V.format(X);
|
|
3902
3926
|
});
|
|
3903
3927
|
}), g = f(() => {
|
|
3904
|
-
const V = P(m.value, t.firstDayOfWeek),
|
|
3928
|
+
const V = P(m.value, t.firstDayOfWeek), Y = l.value ? K(l.value) : null, ae = K(/* @__PURE__ */ new Date());
|
|
3905
3929
|
return Array.from({ length: 42 }, (se, U) => {
|
|
3906
3930
|
const X = h(V, U), re = K(X);
|
|
3907
3931
|
return {
|
|
@@ -3910,8 +3934,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3910
3934
|
date: X,
|
|
3911
3935
|
day: X.getDate(),
|
|
3912
3936
|
inCurrentMonth: X.getMonth() === m.value.getMonth(),
|
|
3913
|
-
isDisabled:
|
|
3914
|
-
isSelected:
|
|
3937
|
+
isDisabled: A(X, _.value, k.value),
|
|
3938
|
+
isSelected: Y === re,
|
|
3915
3939
|
isToday: re === ae
|
|
3916
3940
|
};
|
|
3917
3941
|
});
|
|
@@ -3933,30 +3957,30 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3933
3957
|
}, D = () => {
|
|
3934
3958
|
m.value = W(m.value, 1);
|
|
3935
3959
|
}, M = (V) => {
|
|
3936
|
-
if (t.readonly ||
|
|
3960
|
+
if (t.readonly || A(V, _.value, k.value))
|
|
3937
3961
|
return;
|
|
3938
|
-
const
|
|
3939
|
-
e("update:modelValue",
|
|
3962
|
+
const Y = K(V);
|
|
3963
|
+
e("update:modelValue", Y), e("change", Y), O();
|
|
3940
3964
|
}, S = (V) => {
|
|
3941
3965
|
var ae;
|
|
3942
3966
|
if (!r.value || !i.value)
|
|
3943
3967
|
return;
|
|
3944
|
-
const
|
|
3945
|
-
i.value.contains(
|
|
3968
|
+
const Y = V.target;
|
|
3969
|
+
i.value.contains(Y) || (ae = d.value) != null && ae.contains(Y) || O();
|
|
3946
3970
|
}, F = () => {
|
|
3947
3971
|
if (!s.value || !d.value)
|
|
3948
3972
|
return;
|
|
3949
|
-
const V = s.value,
|
|
3973
|
+
const V = s.value, Y = d.value, ae = async () => {
|
|
3950
3974
|
const {
|
|
3951
3975
|
x: re,
|
|
3952
3976
|
y: de,
|
|
3953
3977
|
placement: ye
|
|
3954
|
-
} = await Me(V,
|
|
3978
|
+
} = await Me(V, Y, {
|
|
3955
3979
|
placement: u.value,
|
|
3956
3980
|
strategy: "fixed",
|
|
3957
3981
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
3958
3982
|
});
|
|
3959
|
-
v.value = ye ?? u.value,
|
|
3983
|
+
v.value = ye ?? u.value, Y.style.left = `${re}px`, Y.style.top = `${de}px`;
|
|
3960
3984
|
}, se = async () => {
|
|
3961
3985
|
await ae();
|
|
3962
3986
|
}, U = De(V, () => {
|
|
@@ -3974,8 +3998,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3974
3998
|
ve(
|
|
3975
3999
|
() => t.modelValue,
|
|
3976
4000
|
(V) => {
|
|
3977
|
-
const
|
|
3978
|
-
|
|
4001
|
+
const Y = H(V);
|
|
4002
|
+
Y && (m.value = x(Y));
|
|
3979
4003
|
},
|
|
3980
4004
|
{ immediate: !0 }
|
|
3981
4005
|
), ve(
|
|
@@ -3994,13 +4018,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3994
4018
|
}), we(() => {
|
|
3995
4019
|
document.removeEventListener("click", S), $ == null || $.destroy(), $ = null;
|
|
3996
4020
|
});
|
|
3997
|
-
function
|
|
4021
|
+
function H(V) {
|
|
3998
4022
|
if (!V)
|
|
3999
4023
|
return null;
|
|
4000
|
-
const
|
|
4001
|
-
if (!
|
|
4024
|
+
const Y = V.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
4025
|
+
if (!Y)
|
|
4002
4026
|
return null;
|
|
4003
|
-
const ae = Number(
|
|
4027
|
+
const ae = Number(Y[1]), se = Number(Y[2]) - 1, U = Number(Y[3]), X = new Date(ae, se, U);
|
|
4004
4028
|
return X.getFullYear() !== ae || X.getMonth() !== se || X.getDate() !== U ? null : Z(X);
|
|
4005
4029
|
}
|
|
4006
4030
|
function Z(V) {
|
|
@@ -4009,25 +4033,25 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4009
4033
|
function x(V) {
|
|
4010
4034
|
return new Date(V.getFullYear(), V.getMonth(), 1);
|
|
4011
4035
|
}
|
|
4012
|
-
function W(V,
|
|
4013
|
-
return new Date(V.getFullYear(), V.getMonth() +
|
|
4036
|
+
function W(V, Y) {
|
|
4037
|
+
return new Date(V.getFullYear(), V.getMonth() + Y, 1);
|
|
4014
4038
|
}
|
|
4015
|
-
function h(V,
|
|
4016
|
-
return new Date(V.getFullYear(), V.getMonth(), V.getDate() +
|
|
4039
|
+
function h(V, Y) {
|
|
4040
|
+
return new Date(V.getFullYear(), V.getMonth(), V.getDate() + Y);
|
|
4017
4041
|
}
|
|
4018
|
-
function P(V,
|
|
4019
|
-
const ae = x(V), U = (ae.getDay() -
|
|
4042
|
+
function P(V, Y) {
|
|
4043
|
+
const ae = x(V), U = (ae.getDay() - Y + 7) % 7;
|
|
4020
4044
|
return h(ae, -U);
|
|
4021
4045
|
}
|
|
4022
4046
|
function K(V) {
|
|
4023
|
-
const
|
|
4024
|
-
return `${
|
|
4047
|
+
const Y = V.getFullYear(), ae = `${V.getMonth() + 1}`.padStart(2, "0"), se = `${V.getDate()}`.padStart(2, "0");
|
|
4048
|
+
return `${Y}-${ae}-${se}`;
|
|
4025
4049
|
}
|
|
4026
|
-
function
|
|
4050
|
+
function A(V, Y, ae) {
|
|
4027
4051
|
const se = Z(V).getTime();
|
|
4028
|
-
return !!(
|
|
4052
|
+
return !!(Y && se < Y.getTime() || ae && se > ae.getTime());
|
|
4029
4053
|
}
|
|
4030
|
-
return (V,
|
|
4054
|
+
return (V, Y) => (c(), b("div", {
|
|
4031
4055
|
ref_key: "root",
|
|
4032
4056
|
ref: i,
|
|
4033
4057
|
class: ee(w.value)
|
|
@@ -4053,7 +4077,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4053
4077
|
B("span", {
|
|
4054
4078
|
class: ee(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !l.value }])
|
|
4055
4079
|
}, j(y.value || V.placeholder), 3),
|
|
4056
|
-
|
|
4080
|
+
Y[0] || (Y[0] = B("span", {
|
|
4057
4081
|
class: "vf-datepicker__chevron",
|
|
4058
4082
|
"aria-hidden": "true"
|
|
4059
4083
|
}, "▾", -1))
|
|
@@ -4135,7 +4159,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4135
4159
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4136
4160
|
setup(n, { emit: o }) {
|
|
4137
4161
|
let a = 0;
|
|
4138
|
-
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(!1), u = G("bottom"), v = G("bottom"), p = `vf-daterangepicker-panel-${++a}`, m = G(
|
|
4162
|
+
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(!1), u = G("bottom"), v = G("bottom"), p = `vf-daterangepicker-panel-${++a}`, m = G(A(/* @__PURE__ */ new Date()));
|
|
4139
4163
|
let $ = null;
|
|
4140
4164
|
const l = f(() => P(t.min)), _ = f(() => P(t.max)), k = f(() => h(t.modelValue)), y = f(() => k.value[0]), z = f(() => k.value[1]), C = f(() => !y.value && !z.value), g = f(() => {
|
|
4141
4165
|
if (C.value)
|
|
@@ -4158,7 +4182,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4158
4182
|
}), R = f(() => {
|
|
4159
4183
|
const X = ae(m.value, t.firstDayOfWeek), re = se(/* @__PURE__ */ new Date()), de = y.value ? K(y.value).getTime() : null, ye = z.value ? K(z.value).getTime() : null, te = y.value ? se(y.value) : null, N = z.value ? se(z.value) : null;
|
|
4160
4184
|
return Array.from({ length: 42 }, (oe, le) => {
|
|
4161
|
-
const ge =
|
|
4185
|
+
const ge = Y(X, le), J = se(ge), ue = K(ge).getTime(), ce = de !== null && ye !== null ? ue >= de && ue <= ye : !1, _e = te === J, Be = N === J;
|
|
4162
4186
|
return {
|
|
4163
4187
|
key: `${J}-${le}`,
|
|
4164
4188
|
iso: J,
|
|
@@ -4194,7 +4218,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4194
4218
|
m.value = V(m.value, -1);
|
|
4195
4219
|
}, F = () => {
|
|
4196
4220
|
m.value = V(m.value, 1);
|
|
4197
|
-
},
|
|
4221
|
+
}, H = (X, re) => {
|
|
4198
4222
|
const de = X ? se(X) : null, ye = re ? se(re) : null;
|
|
4199
4223
|
e("update:modelValue", [de, ye]), e("change", [de, ye]);
|
|
4200
4224
|
}, Z = (X) => {
|
|
@@ -4202,11 +4226,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4202
4226
|
return;
|
|
4203
4227
|
const re = y.value, de = z.value;
|
|
4204
4228
|
if (!re || re && de) {
|
|
4205
|
-
|
|
4229
|
+
H(X, null);
|
|
4206
4230
|
return;
|
|
4207
4231
|
}
|
|
4208
4232
|
const ye = K(re).getTime();
|
|
4209
|
-
K(X).getTime() < ye ?
|
|
4233
|
+
K(X).getTime() < ye ? H(X, re) : H(re, X), D();
|
|
4210
4234
|
}, x = (X) => {
|
|
4211
4235
|
var de;
|
|
4212
4236
|
if (!r.value || !i.value)
|
|
@@ -4245,7 +4269,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4245
4269
|
() => t.modelValue,
|
|
4246
4270
|
(X) => {
|
|
4247
4271
|
const [re, de] = h(X), ye = re ?? de ?? /* @__PURE__ */ new Date();
|
|
4248
|
-
m.value =
|
|
4272
|
+
m.value = A(ye);
|
|
4249
4273
|
},
|
|
4250
4274
|
{ immediate: !0 }
|
|
4251
4275
|
), ve(
|
|
@@ -4282,18 +4306,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4282
4306
|
function K(X) {
|
|
4283
4307
|
return new Date(X.getFullYear(), X.getMonth(), X.getDate());
|
|
4284
4308
|
}
|
|
4285
|
-
function
|
|
4309
|
+
function A(X) {
|
|
4286
4310
|
return new Date(X.getFullYear(), X.getMonth(), 1);
|
|
4287
4311
|
}
|
|
4288
4312
|
function V(X, re) {
|
|
4289
4313
|
return new Date(X.getFullYear(), X.getMonth() + re, 1);
|
|
4290
4314
|
}
|
|
4291
|
-
function
|
|
4315
|
+
function Y(X, re) {
|
|
4292
4316
|
return new Date(X.getFullYear(), X.getMonth(), X.getDate() + re);
|
|
4293
4317
|
}
|
|
4294
4318
|
function ae(X, re) {
|
|
4295
|
-
const de =
|
|
4296
|
-
return
|
|
4319
|
+
const de = A(X), te = (de.getDay() - re + 7) % 7;
|
|
4320
|
+
return Y(de, -te);
|
|
4297
4321
|
}
|
|
4298
4322
|
function se(X) {
|
|
4299
4323
|
const re = X.getFullYear(), de = `${X.getMonth() + 1}`.padStart(2, "0"), ye = `${X.getDate()}`.padStart(2, "0");
|
|
@@ -4407,14 +4431,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4407
4431
|
let a = 0;
|
|
4408
4432
|
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(!1), u = G("bottom"), v = G("bottom"), p = `vf-timepicker-panel-${++a}`;
|
|
4409
4433
|
let m = null;
|
|
4410
|
-
const $ = f(() => S(t.min)), l = f(() => S(t.max)), _ = f(() => S(t.modelValue)), k = f(() => _.value === null ? "" :
|
|
4434
|
+
const $ = f(() => S(t.min)), l = f(() => S(t.max)), _ = f(() => S(t.modelValue)), k = f(() => _.value === null ? "" : H(_.value, t.format)), y = f(() => !t.step || t.step <= 0 ? 30 : Math.min(Math.max(Math.round(t.step), 1), 1440)), z = f(() => {
|
|
4411
4435
|
const x = [], W = y.value, h = $.value, P = l.value;
|
|
4412
4436
|
for (let K = 0; K < 1440; K += W) {
|
|
4413
|
-
const
|
|
4437
|
+
const A = F(K);
|
|
4414
4438
|
x.push({
|
|
4415
|
-
value:
|
|
4439
|
+
value: A,
|
|
4416
4440
|
minutes: K,
|
|
4417
|
-
label:
|
|
4441
|
+
label: H(K, t.format),
|
|
4418
4442
|
isSelected: _.value === K,
|
|
4419
4443
|
isDisabled: Z(K, h, P)
|
|
4420
4444
|
});
|
|
@@ -4453,7 +4477,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4453
4477
|
const x = s.value, W = d.value, h = async () => {
|
|
4454
4478
|
const {
|
|
4455
4479
|
x: V,
|
|
4456
|
-
y:
|
|
4480
|
+
y: Y,
|
|
4457
4481
|
placement: ae
|
|
4458
4482
|
} = await Me(x, W, {
|
|
4459
4483
|
placement: u.value,
|
|
@@ -4462,18 +4486,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4462
4486
|
});
|
|
4463
4487
|
v.value = ae ?? u.value;
|
|
4464
4488
|
const se = x.getBoundingClientRect().width;
|
|
4465
|
-
W.style.minWidth = `${se}px`, W.style.width = `${se}px`, W.style.left = `${V}px`, W.style.top = `${
|
|
4489
|
+
W.style.minWidth = `${se}px`, W.style.width = `${se}px`, W.style.left = `${V}px`, W.style.top = `${Y}px`;
|
|
4466
4490
|
}, P = async () => {
|
|
4467
4491
|
await h();
|
|
4468
4492
|
}, K = De(x, () => {
|
|
4469
4493
|
P();
|
|
4470
|
-
}),
|
|
4494
|
+
}), A = () => {
|
|
4471
4495
|
P();
|
|
4472
4496
|
};
|
|
4473
|
-
document.addEventListener("scroll",
|
|
4497
|
+
document.addEventListener("scroll", A, !0), window.addEventListener("resize", A, !1), m = {
|
|
4474
4498
|
update: P,
|
|
4475
4499
|
destroy: () => {
|
|
4476
|
-
K(), document.removeEventListener("scroll",
|
|
4500
|
+
K(), document.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A, !1);
|
|
4477
4501
|
}
|
|
4478
4502
|
}, m.update();
|
|
4479
4503
|
}, M = () => {
|
|
@@ -4511,7 +4535,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4511
4535
|
const W = Math.floor(x / 60), h = x % 60;
|
|
4512
4536
|
return `${String(W).padStart(2, "0")}:${String(h).padStart(2, "0")}`;
|
|
4513
4537
|
}
|
|
4514
|
-
function
|
|
4538
|
+
function H(x, W) {
|
|
4515
4539
|
if (W === "12h") {
|
|
4516
4540
|
const h = Math.floor(x / 60), P = x % 60, K = h >= 12 ? "PM" : "AM";
|
|
4517
4541
|
return `${h % 12 || 12}:${String(P).padStart(2, "0")} ${K}`;
|
|
@@ -4679,11 +4703,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4679
4703
|
l.value = ue ? ue.minutes : null;
|
|
4680
4704
|
}, F = () => {
|
|
4681
4705
|
t.disabled || t.readonly || (M(), $.value || ($.value = se(/* @__PURE__ */ new Date()), m.value = U($.value)), S($.value), r.value = !0, u.value = "bottom", v.value = "bottom");
|
|
4682
|
-
},
|
|
4706
|
+
}, H = () => {
|
|
4683
4707
|
r.value = !1, u.value = "bottom", v.value = "bottom";
|
|
4684
4708
|
}, Z = () => {
|
|
4685
4709
|
if (r.value) {
|
|
4686
|
-
|
|
4710
|
+
H();
|
|
4687
4711
|
return;
|
|
4688
4712
|
}
|
|
4689
4713
|
F();
|
|
@@ -4694,14 +4718,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4694
4718
|
}, h = (J) => {
|
|
4695
4719
|
t.readonly || le(J, z.value, C.value) || ($.value = se(J), S($.value), D());
|
|
4696
4720
|
}, P = (J) => {
|
|
4697
|
-
t.readonly || !$.value || ge($.value, J, z.value, C.value) || (l.value = J, D(),
|
|
4721
|
+
t.readonly || !$.value || ge($.value, J, z.value, C.value) || (l.value = J, D(), H());
|
|
4698
4722
|
}, K = (J) => {
|
|
4699
4723
|
var ce;
|
|
4700
4724
|
if (!r.value || !i.value)
|
|
4701
4725
|
return;
|
|
4702
4726
|
const ue = J.target;
|
|
4703
|
-
i.value.contains(ue) || (ce = d.value) != null && ce.contains(ue) ||
|
|
4704
|
-
},
|
|
4727
|
+
i.value.contains(ue) || (ce = d.value) != null && ce.contains(ue) || H();
|
|
4728
|
+
}, A = () => {
|
|
4705
4729
|
if (!s.value || !d.value)
|
|
4706
4730
|
return;
|
|
4707
4731
|
const J = s.value, ue = d.value, ce = async () => {
|
|
@@ -4748,7 +4772,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4748
4772
|
_ && (_.destroy(), _ = null);
|
|
4749
4773
|
return;
|
|
4750
4774
|
}
|
|
4751
|
-
await $e(), _ ||
|
|
4775
|
+
await $e(), _ || A(), _ == null || _.update();
|
|
4752
4776
|
}), Ve(() => {
|
|
4753
4777
|
document.addEventListener("click", K);
|
|
4754
4778
|
}), we(() => {
|
|
@@ -4763,7 +4787,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4763
4787
|
const ce = Number(ue[1]), _e = Number(ue[2]) - 1, Be = Number(ue[3]), xe = new Date(ce, _e, Be);
|
|
4764
4788
|
return xe.getFullYear() !== ce || xe.getMonth() !== _e || xe.getDate() !== Be ? null : se(xe);
|
|
4765
4789
|
}
|
|
4766
|
-
function
|
|
4790
|
+
function Y(J) {
|
|
4767
4791
|
if (!J)
|
|
4768
4792
|
return null;
|
|
4769
4793
|
const ue = J.match(/^(\d{2}):(\d{2})$/);
|
|
@@ -4778,7 +4802,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4778
4802
|
const ue = J.match(/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})$/);
|
|
4779
4803
|
if (!ue)
|
|
4780
4804
|
return null;
|
|
4781
|
-
const ce = V(ue[1]), _e =
|
|
4805
|
+
const ce = V(ue[1]), _e = Y(ue[2]);
|
|
4782
4806
|
return !ce || _e === null ? null : { date: ce, minutes: _e };
|
|
4783
4807
|
}
|
|
4784
4808
|
function se(J) {
|
|
@@ -4843,7 +4867,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4843
4867
|
onKeydown: [
|
|
4844
4868
|
pe(ie(F, ["prevent"]), ["down"]),
|
|
4845
4869
|
pe(ie(Z, ["prevent"]), ["enter"]),
|
|
4846
|
-
pe(ie(
|
|
4870
|
+
pe(ie(H, ["prevent"]), ["esc"])
|
|
4847
4871
|
],
|
|
4848
4872
|
onFocus: E,
|
|
4849
4873
|
onBlur: T
|
|
@@ -4864,7 +4888,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4864
4888
|
class: "vf-datetimepicker__panel",
|
|
4865
4889
|
role: "dialog",
|
|
4866
4890
|
"data-placement": v.value,
|
|
4867
|
-
onKeydown: pe(ie(
|
|
4891
|
+
onKeydown: pe(ie(H, ["prevent"]), ["esc"])
|
|
4868
4892
|
}, [
|
|
4869
4893
|
B("div", Mr, [
|
|
4870
4894
|
B("div", Rr, [
|
|
@@ -5185,7 +5209,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5185
5209
|
}, null, 40, Jr),
|
|
5186
5210
|
d[0] || (d[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
5187
5211
|
s.label || s.$slots.default ? (c(), b("span", el, [
|
|
5188
|
-
|
|
5212
|
+
q(s.$slots, "default", {}, () => [
|
|
5189
5213
|
me(j(s.label), 1)
|
|
5190
5214
|
])
|
|
5191
5215
|
])) : Q("", !0)
|
|
@@ -5223,7 +5247,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5223
5247
|
"aria-label": d.ariaLabel || void 0,
|
|
5224
5248
|
"aria-labelledby": d.ariaLabelledby || void 0
|
|
5225
5249
|
}, [
|
|
5226
|
-
|
|
5250
|
+
q(d.$slots, "default")
|
|
5227
5251
|
], 10, tl));
|
|
5228
5252
|
}
|
|
5229
5253
|
}), al = ["name", "value", "checked", "disabled"], ol = {
|
|
@@ -5261,7 +5285,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5261
5285
|
}, null, 40, al),
|
|
5262
5286
|
$[0] || ($[0] = B("span", { class: "vf-radio__circle" }, null, -1)),
|
|
5263
5287
|
m.label || m.$slots.default ? (c(), b("span", ol, [
|
|
5264
|
-
|
|
5288
|
+
q(m.$slots, "default", {}, () => [
|
|
5265
5289
|
me(j(m.label), 1)
|
|
5266
5290
|
])
|
|
5267
5291
|
])) : Q("", !0)
|
|
@@ -5381,10 +5405,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5381
5405
|
"aria-labelledby": l.ariaLabelledby || void 0,
|
|
5382
5406
|
onKeydown: p
|
|
5383
5407
|
}, [
|
|
5384
|
-
|
|
5408
|
+
q(l.$slots, "tabs")
|
|
5385
5409
|
], 40, nl),
|
|
5386
5410
|
B("div", sl, [
|
|
5387
|
-
|
|
5411
|
+
q(l.$slots, "panels")
|
|
5388
5412
|
])
|
|
5389
5413
|
], 2));
|
|
5390
5414
|
}
|
|
@@ -5411,7 +5435,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5411
5435
|
tabindex: u.value,
|
|
5412
5436
|
onClick: v
|
|
5413
5437
|
}, [
|
|
5414
|
-
|
|
5438
|
+
q(p.$slots, "default", {}, () => [
|
|
5415
5439
|
me(j(p.label), 1)
|
|
5416
5440
|
])
|
|
5417
5441
|
], 10, il));
|
|
@@ -5430,7 +5454,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5430
5454
|
tabindex: "0",
|
|
5431
5455
|
"aria-labelledby": t.value
|
|
5432
5456
|
}, [
|
|
5433
|
-
|
|
5457
|
+
q(s.$slots, "default")
|
|
5434
5458
|
], 8, dl)), [
|
|
5435
5459
|
[Se, e.value]
|
|
5436
5460
|
]);
|
|
@@ -5477,7 +5501,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5477
5501
|
"aria-label": p.ariaLabel || void 0,
|
|
5478
5502
|
"aria-labelledby": p.ariaLabelledby || void 0
|
|
5479
5503
|
}, [
|
|
5480
|
-
|
|
5504
|
+
q(p.$slots, "default")
|
|
5481
5505
|
], 10, ul));
|
|
5482
5506
|
}
|
|
5483
5507
|
}), cl = ["id", "disabled", "aria-expanded", "aria-controls"], vl = { class: "vf-accordion__title" }, fl = ["id", "aria-labelledby", "aria-hidden"], pl = { class: "vf-accordion__panel-inner" }, jc = /* @__PURE__ */ ne({
|
|
@@ -5513,7 +5537,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5513
5537
|
onClick: u
|
|
5514
5538
|
}, [
|
|
5515
5539
|
B("span", vl, [
|
|
5516
|
-
|
|
5540
|
+
q(v.$slots, "title", {}, () => [
|
|
5517
5541
|
me(j(v.title), 1)
|
|
5518
5542
|
])
|
|
5519
5543
|
]),
|
|
@@ -5531,7 +5555,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5531
5555
|
"aria-hidden": e.value ? void 0 : "true"
|
|
5532
5556
|
}, [
|
|
5533
5557
|
B("div", pl, [
|
|
5534
|
-
|
|
5558
|
+
q(v.$slots, "default")
|
|
5535
5559
|
])
|
|
5536
5560
|
], 10, fl)) : Q("", !0)
|
|
5537
5561
|
], 2));
|
|
@@ -5582,7 +5606,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5582
5606
|
B("div", gl, [
|
|
5583
5607
|
r.title ? (c(), b("div", bl, j(r.title), 1)) : Q("", !0),
|
|
5584
5608
|
r.message || r.$slots.default ? (c(), b("div", hl, [
|
|
5585
|
-
|
|
5609
|
+
q(r.$slots, "default", {}, () => [
|
|
5586
5610
|
me(j(r.message), 1)
|
|
5587
5611
|
])
|
|
5588
5612
|
])) : Q("", !0)
|
|
@@ -5593,7 +5617,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5593
5617
|
type: "button",
|
|
5594
5618
|
onClick: d
|
|
5595
5619
|
}, [
|
|
5596
|
-
|
|
5620
|
+
q(r.$slots, "close", {}, () => [
|
|
5597
5621
|
u[0] || (u[0] = me("×"))
|
|
5598
5622
|
])
|
|
5599
5623
|
])) : Q("", !0)
|
|
@@ -5614,7 +5638,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5614
5638
|
role: "region",
|
|
5615
5639
|
"aria-live": "polite"
|
|
5616
5640
|
}, [
|
|
5617
|
-
|
|
5641
|
+
q(e.$slots, "default")
|
|
5618
5642
|
], 2)
|
|
5619
5643
|
]));
|
|
5620
5644
|
}
|
|
@@ -5660,24 +5684,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5660
5684
|
"data-severity": r.severity
|
|
5661
5685
|
}, [
|
|
5662
5686
|
r.$slots.icon || r.icon ? (c(), b("div", _l, [
|
|
5663
|
-
|
|
5687
|
+
q(r.$slots, "icon", {}, () => [
|
|
5664
5688
|
me(j(r.icon), 1)
|
|
5665
5689
|
])
|
|
5666
5690
|
])) : Q("", !0),
|
|
5667
5691
|
B("div", kl, [
|
|
5668
5692
|
r.title || r.$slots.title ? (c(), b("div", Cl, [
|
|
5669
|
-
|
|
5693
|
+
q(r.$slots, "title", {}, () => [
|
|
5670
5694
|
me(j(r.title), 1)
|
|
5671
5695
|
])
|
|
5672
5696
|
])) : Q("", !0),
|
|
5673
5697
|
r.message || r.$slots.default ? (c(), b("div", wl, [
|
|
5674
|
-
|
|
5698
|
+
q(r.$slots, "default", {}, () => [
|
|
5675
5699
|
me(j(r.message), 1)
|
|
5676
5700
|
])
|
|
5677
5701
|
])) : Q("", !0)
|
|
5678
5702
|
]),
|
|
5679
5703
|
r.$slots.actions ? (c(), b("div", $l, [
|
|
5680
|
-
|
|
5704
|
+
q(r.$slots, "actions")
|
|
5681
5705
|
])) : Q("", !0),
|
|
5682
5706
|
r.closable ? (c(), b("button", {
|
|
5683
5707
|
key: 2,
|
|
@@ -5686,7 +5710,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5686
5710
|
"aria-label": "Close",
|
|
5687
5711
|
onClick: d
|
|
5688
5712
|
}, [
|
|
5689
|
-
|
|
5713
|
+
q(r.$slots, "close", {}, () => [
|
|
5690
5714
|
u[0] || (u[0] = me("×"))
|
|
5691
5715
|
])
|
|
5692
5716
|
])) : Q("", !0)
|
|
@@ -5727,24 +5751,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5727
5751
|
"aria-live": "polite"
|
|
5728
5752
|
}, [
|
|
5729
5753
|
e.$slots.icon || e.icon ? (c(), b("div", zl, [
|
|
5730
|
-
|
|
5754
|
+
q(e.$slots, "icon", {}, () => [
|
|
5731
5755
|
me(j(e.icon), 1)
|
|
5732
5756
|
])
|
|
5733
5757
|
])) : Q("", !0),
|
|
5734
5758
|
B("div", Sl, [
|
|
5735
5759
|
e.title || e.$slots.title ? (c(), b("div", Bl, [
|
|
5736
|
-
|
|
5760
|
+
q(e.$slots, "title", {}, () => [
|
|
5737
5761
|
me(j(e.title), 1)
|
|
5738
5762
|
])
|
|
5739
5763
|
])) : Q("", !0),
|
|
5740
5764
|
e.description || e.$slots.default ? (c(), b("div", xl, [
|
|
5741
|
-
|
|
5765
|
+
q(e.$slots, "default", {}, () => [
|
|
5742
5766
|
me(j(e.description), 1)
|
|
5743
5767
|
])
|
|
5744
5768
|
])) : Q("", !0)
|
|
5745
5769
|
]),
|
|
5746
5770
|
e.$slots.actions ? (c(), b("div", Ll, [
|
|
5747
|
-
|
|
5771
|
+
q(e.$slots, "actions")
|
|
5748
5772
|
])) : Q("", !0)
|
|
5749
5773
|
], 2));
|
|
5750
5774
|
}
|
|
@@ -5781,7 +5805,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5781
5805
|
B("span", { class: "vf-switch__thumb" })
|
|
5782
5806
|
], -1)),
|
|
5783
5807
|
s.label || s.$slots.default ? (c(), b("span", Fl, [
|
|
5784
|
-
|
|
5808
|
+
q(s.$slots, "default", {}, () => [
|
|
5785
5809
|
me(j(s.label), 1)
|
|
5786
5810
|
])
|
|
5787
5811
|
])) : Q("", !0)
|
|
@@ -5810,7 +5834,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5810
5834
|
pe(ie(v, ["prevent"]), ["space"])
|
|
5811
5835
|
]
|
|
5812
5836
|
}, [
|
|
5813
|
-
|
|
5837
|
+
q(p.$slots, "button")
|
|
5814
5838
|
], 40, Il),
|
|
5815
5839
|
ze(Ge(Ut, {
|
|
5816
5840
|
id: s,
|
|
@@ -5824,31 +5848,31 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5824
5848
|
p.$slots.default ? {
|
|
5825
5849
|
name: "default",
|
|
5826
5850
|
fn: Ce(() => [
|
|
5827
|
-
|
|
5851
|
+
q(p.$slots, "default")
|
|
5828
5852
|
]),
|
|
5829
5853
|
key: "0"
|
|
5830
5854
|
} : void 0,
|
|
5831
5855
|
p.$slots.header || p.$slots.popoverHeader ? {
|
|
5832
5856
|
name: "header",
|
|
5833
5857
|
fn: Ce(() => [
|
|
5834
|
-
|
|
5835
|
-
p.$slots.header ? Q("", !0) :
|
|
5858
|
+
q(p.$slots, "header"),
|
|
5859
|
+
p.$slots.header ? Q("", !0) : q(p.$slots, "popoverHeader", { key: 0 })
|
|
5836
5860
|
]),
|
|
5837
5861
|
key: "1"
|
|
5838
5862
|
} : void 0,
|
|
5839
5863
|
p.$slots.body || p.$slots.popoverBody ? {
|
|
5840
5864
|
name: "body",
|
|
5841
5865
|
fn: Ce(() => [
|
|
5842
|
-
|
|
5843
|
-
p.$slots.body ? Q("", !0) :
|
|
5866
|
+
q(p.$slots, "body"),
|
|
5867
|
+
p.$slots.body ? Q("", !0) : q(p.$slots, "popoverBody", { key: 0 })
|
|
5844
5868
|
]),
|
|
5845
5869
|
key: "2"
|
|
5846
5870
|
} : void 0,
|
|
5847
5871
|
p.$slots.footer || p.$slots.popoverFooter ? {
|
|
5848
5872
|
name: "footer",
|
|
5849
5873
|
fn: Ce(() => [
|
|
5850
|
-
|
|
5851
|
-
p.$slots.footer ? Q("", !0) :
|
|
5874
|
+
q(p.$slots, "footer"),
|
|
5875
|
+
p.$slots.footer ? Q("", !0) : q(p.$slots, "popoverFooter", { key: 0 })
|
|
5852
5876
|
]),
|
|
5853
5877
|
key: "3"
|
|
5854
5878
|
} : void 0
|
|
@@ -5948,12 +5972,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5948
5972
|
id: m,
|
|
5949
5973
|
class: "vf-modal__header-content"
|
|
5950
5974
|
}, [
|
|
5951
|
-
|
|
5975
|
+
q(E.$slots, "header", {}, () => [
|
|
5952
5976
|
E.title ? (c(), b("h3", Rl, j(E.title), 1)) : Q("", !0)
|
|
5953
5977
|
])
|
|
5954
5978
|
])
|
|
5955
5979
|
])) : Q("", !0),
|
|
5956
|
-
E.showClose ?
|
|
5980
|
+
E.showClose ? q(E.$slots, "close", {
|
|
5957
5981
|
key: 1,
|
|
5958
5982
|
close: z
|
|
5959
5983
|
}, () => [
|
|
@@ -5969,11 +5993,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5969
5993
|
id: $,
|
|
5970
5994
|
class: "vf-modal__body"
|
|
5971
5995
|
}, [
|
|
5972
|
-
|
|
5973
|
-
E.$slots.body ? Q("", !0) :
|
|
5996
|
+
q(E.$slots, "body"),
|
|
5997
|
+
E.$slots.body ? Q("", !0) : q(E.$slots, "default", { key: 0 })
|
|
5974
5998
|
])) : Q("", !0),
|
|
5975
5999
|
E.$slots.footer ? (c(), b("div", Pl, [
|
|
5976
|
-
|
|
6000
|
+
q(E.$slots, "footer")
|
|
5977
6001
|
])) : Q("", !0)
|
|
5978
6002
|
], 40, Dl)
|
|
5979
6003
|
], 16), [
|
|
@@ -6044,14 +6068,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6044
6068
|
}, {
|
|
6045
6069
|
body: Ce(() => [
|
|
6046
6070
|
B("div", Ol, [
|
|
6047
|
-
|
|
6071
|
+
q(m.$slots, "default", {}, () => [
|
|
6048
6072
|
me(j(m.message), 1)
|
|
6049
6073
|
])
|
|
6050
6074
|
])
|
|
6051
6075
|
]),
|
|
6052
6076
|
footer: Ce(() => [
|
|
6053
6077
|
B("div", Al, [
|
|
6054
|
-
|
|
6078
|
+
q(m.$slots, "actions", {
|
|
6055
6079
|
confirm: p,
|
|
6056
6080
|
cancel: v
|
|
6057
6081
|
}, () => [
|
|
@@ -6131,12 +6155,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6131
6155
|
const T = L();
|
|
6132
6156
|
T.length ? T[0].focus() : (D = u.value) == null || D.focus();
|
|
6133
6157
|
}, I = (T) => {
|
|
6134
|
-
var
|
|
6158
|
+
var H;
|
|
6135
6159
|
if (T.key !== "Tab")
|
|
6136
6160
|
return;
|
|
6137
6161
|
const D = L();
|
|
6138
6162
|
if (!D.length) {
|
|
6139
|
-
T.preventDefault(), (
|
|
6163
|
+
T.preventDefault(), (H = u.value) == null || H.focus();
|
|
6140
6164
|
return;
|
|
6141
6165
|
}
|
|
6142
6166
|
const M = D[0], S = D[D.length - 1], F = document.activeElement;
|
|
@@ -6190,12 +6214,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6190
6214
|
id: p,
|
|
6191
6215
|
class: "vf-drawer__header-content"
|
|
6192
6216
|
}, [
|
|
6193
|
-
|
|
6217
|
+
q(T.$slots, "header", {}, () => [
|
|
6194
6218
|
T.title ? (c(), b("h3", Kl, j(T.title), 1)) : Q("", !0)
|
|
6195
6219
|
])
|
|
6196
6220
|
])
|
|
6197
6221
|
])) : Q("", !0),
|
|
6198
|
-
T.showClose ?
|
|
6222
|
+
T.showClose ? q(T.$slots, "close", {
|
|
6199
6223
|
key: 1,
|
|
6200
6224
|
close: C
|
|
6201
6225
|
}, () => [
|
|
@@ -6211,11 +6235,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6211
6235
|
id: m,
|
|
6212
6236
|
class: "vf-drawer__body"
|
|
6213
6237
|
}, [
|
|
6214
|
-
|
|
6215
|
-
T.$slots.body ? Q("", !0) :
|
|
6238
|
+
q(T.$slots, "body"),
|
|
6239
|
+
T.$slots.body ? Q("", !0) : q(T.$slots, "default", { key: 0 })
|
|
6216
6240
|
])) : Q("", !0),
|
|
6217
6241
|
T.$slots.footer ? (c(), b("div", Nl, [
|
|
6218
|
-
|
|
6242
|
+
q(T.$slots, "footer")
|
|
6219
6243
|
])) : Q("", !0)
|
|
6220
6244
|
], 40, Hl)
|
|
6221
6245
|
], 6), [
|
|
@@ -6290,14 +6314,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6290
6314
|
const O = d.value, E = r.value, T = async () => {
|
|
6291
6315
|
const {
|
|
6292
6316
|
x: F,
|
|
6293
|
-
y:
|
|
6317
|
+
y: H,
|
|
6294
6318
|
placement: Z
|
|
6295
6319
|
} = await Me(O, E, {
|
|
6296
6320
|
placement: v.value,
|
|
6297
6321
|
strategy: "fixed",
|
|
6298
6322
|
middleware: [Ie(t.offset), Te({ placements: R(v.value) })]
|
|
6299
6323
|
});
|
|
6300
|
-
p.value = Z ?? v.value, t.matchTriggerWidth && (E.style.minWidth = `${O.getBoundingClientRect().width}px`), E.style.left = `${F}px`, E.style.top = `${
|
|
6324
|
+
p.value = Z ?? v.value, t.matchTriggerWidth && (E.style.minWidth = `${O.getBoundingClientRect().width}px`), E.style.left = `${F}px`, E.style.top = `${H}px`;
|
|
6301
6325
|
}, D = async () => {
|
|
6302
6326
|
await T();
|
|
6303
6327
|
}, M = De(O, () => {
|
|
@@ -6353,7 +6377,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6353
6377
|
pe(ie(C, ["prevent"]), ["space"])
|
|
6354
6378
|
]
|
|
6355
6379
|
}, [
|
|
6356
|
-
|
|
6380
|
+
q(O.$slots, "trigger")
|
|
6357
6381
|
], 40, Gl),
|
|
6358
6382
|
(c(), be(Le, { to: "body" }, [
|
|
6359
6383
|
ze(B("div", {
|
|
@@ -6365,7 +6389,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6365
6389
|
"data-placement": p.value,
|
|
6366
6390
|
onClick: g
|
|
6367
6391
|
}, [
|
|
6368
|
-
|
|
6392
|
+
q(O.$slots, "default", {}, () => [
|
|
6369
6393
|
t.items.length ? (c(), be(ht, {
|
|
6370
6394
|
key: 0,
|
|
6371
6395
|
items: t.items
|
|
@@ -6443,7 +6467,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6443
6467
|
onClick: m
|
|
6444
6468
|
}, {
|
|
6445
6469
|
default: Ce(() => [
|
|
6446
|
-
|
|
6470
|
+
q(l.$slots, "default")
|
|
6447
6471
|
]),
|
|
6448
6472
|
_: 3
|
|
6449
6473
|
}, 8, ["label", "icon", "type", "size", "variant", "severity", "loading", "disabled"])) : (c(), be(Ze, {
|
|
@@ -6492,7 +6516,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6492
6516
|
l.$slots.menu ? {
|
|
6493
6517
|
name: "default",
|
|
6494
6518
|
fn: Ce(() => [
|
|
6495
|
-
|
|
6519
|
+
q(l.$slots, "menu")
|
|
6496
6520
|
]),
|
|
6497
6521
|
key: "0"
|
|
6498
6522
|
} : void 0
|
|
@@ -6579,7 +6603,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6579
6603
|
onContextmenu: ie(z, ["prevent"]),
|
|
6580
6604
|
onKeydown: C
|
|
6581
6605
|
}, [
|
|
6582
|
-
|
|
6606
|
+
q(I.$slots, "default")
|
|
6583
6607
|
], 34),
|
|
6584
6608
|
(c(), be(Le, { to: "body" }, [
|
|
6585
6609
|
ze(B("div", {
|
|
@@ -6591,7 +6615,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6591
6615
|
style: ke(u.value),
|
|
6592
6616
|
onClick: g
|
|
6593
6617
|
}, [
|
|
6594
|
-
|
|
6618
|
+
q(I.$slots, "menu", {}, () => [
|
|
6595
6619
|
t.items.length ? (c(), be(ht, {
|
|
6596
6620
|
key: 0,
|
|
6597
6621
|
items: t.items
|
|
@@ -6656,10 +6680,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6656
6680
|
var S;
|
|
6657
6681
|
const M = /* @__PURE__ */ new Map();
|
|
6658
6682
|
for (const F of m.value) {
|
|
6659
|
-
const
|
|
6660
|
-
M.has(
|
|
6683
|
+
const H = F.group ?? "";
|
|
6684
|
+
M.has(H) || M.set(H, []), (S = M.get(H)) == null || S.push(F);
|
|
6661
6685
|
}
|
|
6662
|
-
return Array.from(M.entries()).map(([F,
|
|
6686
|
+
return Array.from(M.entries()).map(([F, H]) => ({ name: F, items: H }));
|
|
6663
6687
|
}), l = f(() => m.value.filter((M) => !M.disabled)), _ = async () => {
|
|
6664
6688
|
var M;
|
|
6665
6689
|
await $e(), (M = s.value) == null || M.focus();
|
|
@@ -6692,8 +6716,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6692
6716
|
u.value = -1;
|
|
6693
6717
|
return;
|
|
6694
6718
|
}
|
|
6695
|
-
const S = l.value.findIndex((Z) => Z._index === u.value),
|
|
6696
|
-
u.value = l.value[
|
|
6719
|
+
const S = l.value.findIndex((Z) => Z._index === u.value), H = ((S >= 0 ? S : M > 0 ? -1 : 0) + M + l.value.length) % l.value.length;
|
|
6720
|
+
u.value = l.value[H]._index;
|
|
6697
6721
|
}, I = (M) => {
|
|
6698
6722
|
if (u.value < 0)
|
|
6699
6723
|
return;
|
|
@@ -6778,23 +6802,23 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6778
6802
|
"data-group": F.name
|
|
6779
6803
|
}, [
|
|
6780
6804
|
F.name ? (c(), b("div", en, j(F.name), 1)) : Q("", !0),
|
|
6781
|
-
(c(!0), b(fe, null, he(F.items, (
|
|
6782
|
-
key:
|
|
6805
|
+
(c(!0), b(fe, null, he(F.items, (H) => (c(), b("button", {
|
|
6806
|
+
key: H._key,
|
|
6783
6807
|
class: ee(["vf-command-palette__item", {
|
|
6784
|
-
"is-active":
|
|
6785
|
-
"is-disabled":
|
|
6808
|
+
"is-active": H._index === u.value,
|
|
6809
|
+
"is-disabled": H.disabled
|
|
6786
6810
|
}]),
|
|
6787
6811
|
type: "button",
|
|
6788
6812
|
role: "option",
|
|
6789
|
-
"aria-selected":
|
|
6790
|
-
disabled:
|
|
6791
|
-
onClick: (Z) => L(
|
|
6813
|
+
"aria-selected": H._index === u.value,
|
|
6814
|
+
disabled: H.disabled,
|
|
6815
|
+
onClick: (Z) => L(H, Z)
|
|
6792
6816
|
}, [
|
|
6793
6817
|
B("div", an, [
|
|
6794
|
-
B("span", on, j(
|
|
6795
|
-
|
|
6818
|
+
B("span", on, j(H.label), 1),
|
|
6819
|
+
H.shortcut ? (c(), b("span", rn, j(H.shortcut), 1)) : Q("", !0)
|
|
6796
6820
|
]),
|
|
6797
|
-
|
|
6821
|
+
H.description ? (c(), b("span", ln, j(H.description), 1)) : Q("", !0)
|
|
6798
6822
|
], 10, tn))), 128))
|
|
6799
6823
|
], 8, Jl))), 128)) : (c(), b("div", nn, j(M.emptyText), 1))
|
|
6800
6824
|
])
|
|
@@ -6945,7 +6969,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6945
6969
|
class: ee(["vf-notification-center__item", { "is-unread": !g.read }]),
|
|
6946
6970
|
"data-severity": g.severity || "neutral"
|
|
6947
6971
|
}, [
|
|
6948
|
-
|
|
6972
|
+
q(z.$slots, "item", {
|
|
6949
6973
|
item: g,
|
|
6950
6974
|
index: w,
|
|
6951
6975
|
toggleRead: () => _(g.id)
|
|
@@ -6970,7 +6994,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6970
6994
|
}, j(g.read ? z.unreadLabel : z.readLabel), 9, Bn)
|
|
6971
6995
|
], 10, _n))), 128))
|
|
6972
6996
|
])) : (c(), b("p", xn, [
|
|
6973
|
-
|
|
6997
|
+
q(z.$slots, "empty", {}, () => [
|
|
6974
6998
|
me(j(z.emptyText), 1)
|
|
6975
6999
|
])
|
|
6976
7000
|
]))
|
|
@@ -7048,7 +7072,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7048
7072
|
class: "vf-app-shell__sidebar",
|
|
7049
7073
|
"aria-hidden": d.value && !r.value ? "true" : "false"
|
|
7050
7074
|
}, [
|
|
7051
|
-
|
|
7075
|
+
q(_.$slots, "sidebar", {
|
|
7052
7076
|
mobile: d.value,
|
|
7053
7077
|
collapsed: s.value
|
|
7054
7078
|
})
|
|
@@ -7069,7 +7093,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7069
7093
|
onClick: m
|
|
7070
7094
|
}, j(_.toggleIcon), 9, Tn)) : Q("", !0),
|
|
7071
7095
|
B("div", In, [
|
|
7072
|
-
|
|
7096
|
+
q(_.$slots, "header", {
|
|
7073
7097
|
mobile: d.value,
|
|
7074
7098
|
collapsed: s.value,
|
|
7075
7099
|
mobileSidebarOpen: r.value,
|
|
@@ -7081,10 +7105,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7081
7105
|
class: "vf-app-shell__main",
|
|
7082
7106
|
"aria-label": _.mainAriaLabel
|
|
7083
7107
|
}, [
|
|
7084
|
-
|
|
7108
|
+
q(_.$slots, "default")
|
|
7085
7109
|
], 8, Dn),
|
|
7086
7110
|
i.value ? (c(), b("footer", Mn, [
|
|
7087
|
-
|
|
7111
|
+
q(_.$slots, "footer", {
|
|
7088
7112
|
mobile: d.value,
|
|
7089
7113
|
collapsed: s.value
|
|
7090
7114
|
})
|
|
@@ -7169,7 +7193,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7169
7193
|
"data-column-id": String(C.id)
|
|
7170
7194
|
}, [
|
|
7171
7195
|
B("header", On, [
|
|
7172
|
-
|
|
7196
|
+
q(y.$slots, "column-header", {
|
|
7173
7197
|
column: C,
|
|
7174
7198
|
items: u(C.id)
|
|
7175
7199
|
}, () => [
|
|
@@ -7199,7 +7223,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7199
7223
|
}, ["prevent"])),
|
|
7200
7224
|
onDrop: ie((L) => _(C.id, w, L), ["prevent", "stop"])
|
|
7201
7225
|
}, [
|
|
7202
|
-
|
|
7226
|
+
q(y.$slots, "card", {
|
|
7203
7227
|
item: g,
|
|
7204
7228
|
column: C,
|
|
7205
7229
|
index: w
|
|
@@ -7221,13 +7245,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7221
7245
|
})
|
|
7222
7246
|
], 42, Kn))), 128)),
|
|
7223
7247
|
u(C.id).length ? Q("", !0) : (c(), b("li", Xn, [
|
|
7224
|
-
|
|
7248
|
+
q(y.$slots, "empty-column", { column: C }, () => [
|
|
7225
7249
|
me(j(y.emptyColumnText), 1)
|
|
7226
7250
|
])
|
|
7227
7251
|
]))
|
|
7228
7252
|
], 40, Wn),
|
|
7229
7253
|
B("footer", Un, [
|
|
7230
|
-
|
|
7254
|
+
q(y.$slots, "column-footer", {
|
|
7231
7255
|
column: C,
|
|
7232
7256
|
items: u(C.id)
|
|
7233
7257
|
})
|
|
@@ -7310,7 +7334,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7310
7334
|
onFocus: u,
|
|
7311
7335
|
onBlur: v
|
|
7312
7336
|
}, [
|
|
7313
|
-
|
|
7337
|
+
q($.$slots, "default")
|
|
7314
7338
|
], 544),
|
|
7315
7339
|
(c(), be(Le, { to: "body" }, [
|
|
7316
7340
|
ze(B("div", {
|
|
@@ -7322,7 +7346,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7322
7346
|
"data-placement": s.value
|
|
7323
7347
|
}, [
|
|
7324
7348
|
B("span", Zn, [
|
|
7325
|
-
|
|
7349
|
+
q($.$slots, "content", {}, () => [
|
|
7326
7350
|
me(j($.text), 1)
|
|
7327
7351
|
])
|
|
7328
7352
|
]),
|
|
@@ -7400,7 +7424,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7400
7424
|
}, F = () => {
|
|
7401
7425
|
var h;
|
|
7402
7426
|
return ((h = p.value) == null ? void 0 : h.offset) ?? e.offset;
|
|
7403
|
-
},
|
|
7427
|
+
}, H = async () => {
|
|
7404
7428
|
const {
|
|
7405
7429
|
x: h,
|
|
7406
7430
|
y: P,
|
|
@@ -7412,7 +7436,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7412
7436
|
});
|
|
7413
7437
|
s.value = K ?? S(), M.style.left = `${h}px`, M.style.top = `${P}px`;
|
|
7414
7438
|
}, Z = async () => {
|
|
7415
|
-
y(), await
|
|
7439
|
+
y(), await H();
|
|
7416
7440
|
}, x = De(D, () => {
|
|
7417
7441
|
Z();
|
|
7418
7442
|
}), W = () => {
|
|
@@ -7484,30 +7508,30 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7484
7508
|
"data-placement": s.value
|
|
7485
7509
|
}, [
|
|
7486
7510
|
(S = p.value) != null && S.title || D.$slots.title ? (c(), b("div", as, [
|
|
7487
|
-
|
|
7511
|
+
q(D.$slots, "title", {
|
|
7488
7512
|
step: p.value,
|
|
7489
7513
|
index: i.value
|
|
7490
7514
|
}, () => {
|
|
7491
|
-
var
|
|
7515
|
+
var H;
|
|
7492
7516
|
return [
|
|
7493
|
-
me(j((
|
|
7517
|
+
me(j((H = p.value) == null ? void 0 : H.title), 1)
|
|
7494
7518
|
];
|
|
7495
7519
|
})
|
|
7496
7520
|
])) : Q("", !0),
|
|
7497
7521
|
(F = p.value) != null && F.content || D.$slots.default ? (c(), b("div", os, [
|
|
7498
|
-
|
|
7522
|
+
q(D.$slots, "default", {
|
|
7499
7523
|
step: p.value,
|
|
7500
7524
|
index: i.value
|
|
7501
7525
|
}, () => {
|
|
7502
|
-
var
|
|
7526
|
+
var H;
|
|
7503
7527
|
return [
|
|
7504
|
-
me(j((
|
|
7528
|
+
me(j((H = p.value) == null ? void 0 : H.content), 1)
|
|
7505
7529
|
];
|
|
7506
7530
|
})
|
|
7507
7531
|
])) : Q("", !0),
|
|
7508
7532
|
D.showProgress ? (c(), b("div", rs, j(i.value + 1) + " / " + j(v.value), 1)) : Q("", !0),
|
|
7509
7533
|
B("div", ls, [
|
|
7510
|
-
|
|
7534
|
+
q(D.$slots, "actions", {
|
|
7511
7535
|
step: p.value,
|
|
7512
7536
|
index: i.value,
|
|
7513
7537
|
isFirst: m.value,
|
|
@@ -7642,7 +7666,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7642
7666
|
]))
|
|
7643
7667
|
])),
|
|
7644
7668
|
r.value || d.value ? (c(), b("span", cs, [
|
|
7645
|
-
|
|
7669
|
+
q($.$slots, "default", {}, () => [
|
|
7646
7670
|
me(j(r.value), 1)
|
|
7647
7671
|
])
|
|
7648
7672
|
])) : Q("", !0)
|
|
@@ -7666,7 +7690,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7666
7690
|
role: "status",
|
|
7667
7691
|
"aria-label": e.ariaLabel || void 0
|
|
7668
7692
|
}, [
|
|
7669
|
-
|
|
7693
|
+
q(e.$slots, "default", {}, () => [
|
|
7670
7694
|
me(j(e.label), 1)
|
|
7671
7695
|
])
|
|
7672
7696
|
], 10, vs));
|
|
@@ -7703,12 +7727,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7703
7727
|
"aria-label": s.ariaLabel || void 0
|
|
7704
7728
|
}, [
|
|
7705
7729
|
s.$slots.icon || s.icon ? (c(), b("span", ps, [
|
|
7706
|
-
|
|
7730
|
+
q(s.$slots, "icon", {}, () => [
|
|
7707
7731
|
Ge(We(Ne), { icon: s.icon }, null, 8, ["icon"])
|
|
7708
7732
|
])
|
|
7709
7733
|
])) : Q("", !0),
|
|
7710
7734
|
B("span", ms, [
|
|
7711
|
-
|
|
7735
|
+
q(s.$slots, "default", {}, () => [
|
|
7712
7736
|
me(j(s.label), 1)
|
|
7713
7737
|
])
|
|
7714
7738
|
]),
|
|
@@ -7720,7 +7744,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7720
7744
|
"aria-label": s.closeLabel || "Remove",
|
|
7721
7745
|
onClick: i
|
|
7722
7746
|
}, [
|
|
7723
|
-
|
|
7747
|
+
q(s.$slots, "close", {}, () => [
|
|
7724
7748
|
d[0] || (d[0] = me("×"))
|
|
7725
7749
|
])
|
|
7726
7750
|
], 8, gs)) : Q("", !0)
|
|
@@ -7844,7 +7868,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7844
7868
|
"aria-label": s.value
|
|
7845
7869
|
}, [
|
|
7846
7870
|
B("div", ws, [
|
|
7847
|
-
|
|
7871
|
+
q(u.$slots, "default", {}, () => [
|
|
7848
7872
|
i.value ? (c(), b("img", {
|
|
7849
7873
|
key: 0,
|
|
7850
7874
|
class: "vf-avatar__image",
|
|
@@ -7888,7 +7912,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7888
7912
|
"aria-hidden": "true"
|
|
7889
7913
|
}, null, -1)),
|
|
7890
7914
|
t.value || e.value ? (c(), b("span", xs, [
|
|
7891
|
-
|
|
7915
|
+
q(s.$slots, "default", {}, () => [
|
|
7892
7916
|
me(j(t.value), 1)
|
|
7893
7917
|
])
|
|
7894
7918
|
])) : Q("", !0)
|
|
@@ -8051,7 +8075,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8051
8075
|
const ge = Array.isArray(v.value) ? [...v.value] : [], J = ge.indexOf(le);
|
|
8052
8076
|
J >= 0 ? ge.splice(J, 1) : ge.push(le), D(ge);
|
|
8053
8077
|
}
|
|
8054
|
-
},
|
|
8078
|
+
}, H = () => {
|
|
8055
8079
|
if (e.selectionMode !== "multiple")
|
|
8056
8080
|
return;
|
|
8057
8081
|
if (g.value) {
|
|
@@ -8071,13 +8095,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8071
8095
|
}, h = (N) => p.value !== N.field ? "↕" : m.value === "asc" ? "↑" : "↓", P = (N) => p.value !== N.field ? "" : "is-active", K = (N) => {
|
|
8072
8096
|
if (L(N))
|
|
8073
8097
|
return p.value !== N.field ? "none" : m.value === "asc" ? "ascending" : "descending";
|
|
8074
|
-
},
|
|
8098
|
+
}, A = (N) => {
|
|
8075
8099
|
const oe = [];
|
|
8076
8100
|
return e.striped && N % 2 === 1 && oe.push("vf-datatable__row_striped"), oe;
|
|
8077
8101
|
}, V = (N) => {
|
|
8078
8102
|
const oe = [];
|
|
8079
8103
|
return N.align && oe.push(`vf-datatable__cell_${N.align}`), L(N) && oe.push("vf-datatable__header_sortable"), N.sticky && oe.push(`vf-datatable__cell_sticky-${N.sticky}`), oe;
|
|
8080
|
-
},
|
|
8104
|
+
}, Y = (N) => {
|
|
8081
8105
|
const oe = [];
|
|
8082
8106
|
return N.align && oe.push(`vf-datatable__cell_${N.align}`), N.sticky && oe.push(`vf-datatable__cell_sticky-${N.sticky}`), oe;
|
|
8083
8107
|
}, ae = (N) => {
|
|
@@ -8125,7 +8149,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8125
8149
|
class: ee(E.value)
|
|
8126
8150
|
}, [
|
|
8127
8151
|
w.value ? (c(), b("div", Ls, [
|
|
8128
|
-
|
|
8152
|
+
q(N.$slots, "bulk-actions", {
|
|
8129
8153
|
selectedKeys: z.value,
|
|
8130
8154
|
selectedRows: C.value,
|
|
8131
8155
|
clearSelection: ye,
|
|
@@ -8161,7 +8185,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8161
8185
|
class: "vf-datatable__selection-control",
|
|
8162
8186
|
checked: g.value,
|
|
8163
8187
|
"aria-label": N.selectAllAriaLabel,
|
|
8164
|
-
onChange:
|
|
8188
|
+
onChange: H
|
|
8165
8189
|
}, null, 40, Ps)) : Q("", !0)
|
|
8166
8190
|
])) : Q("", !0),
|
|
8167
8191
|
(c(!0), b(fe, null, he(N.columns, (le) => (c(), b("th", {
|
|
@@ -8178,7 +8202,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8178
8202
|
onClick: (ge) => W(le)
|
|
8179
8203
|
}, [
|
|
8180
8204
|
B("span", As, [
|
|
8181
|
-
N.$slots[`header-${le.field}`] ?
|
|
8205
|
+
N.$slots[`header-${le.field}`] ? q(N.$slots, `header-${le.field}`, {
|
|
8182
8206
|
key: 0,
|
|
8183
8207
|
column: le
|
|
8184
8208
|
}) : (c(), b(fe, { key: 1 }, [
|
|
@@ -8189,7 +8213,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8189
8213
|
class: ee(["vf-datatable__sort-icon", P(le)])
|
|
8190
8214
|
}, j(h(le)), 3)
|
|
8191
8215
|
], 8, Os)) : (c(), b("span", Hs, [
|
|
8192
|
-
N.$slots[`header-${le.field}`] ?
|
|
8216
|
+
N.$slots[`header-${le.field}`] ? q(N.$slots, `header-${le.field}`, {
|
|
8193
8217
|
key: 0,
|
|
8194
8218
|
column: le
|
|
8195
8219
|
}) : (c(), b(fe, { key: 1 }, [
|
|
@@ -8205,13 +8229,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8205
8229
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
8206
8230
|
colspan: y.value
|
|
8207
8231
|
}, [
|
|
8208
|
-
|
|
8232
|
+
q(N.$slots, "loading", {}, () => [
|
|
8209
8233
|
me(j(N.loadingText), 1)
|
|
8210
8234
|
])
|
|
8211
8235
|
], 8, Ns)
|
|
8212
8236
|
])) : I.value.length ? (c(!0), b(fe, { key: 2 }, he(I.value, (le, ge) => (c(), b("tr", {
|
|
8213
8237
|
key: T(le, ge),
|
|
8214
|
-
class: ee(["vf-datatable__row",
|
|
8238
|
+
class: ee(["vf-datatable__row", A(ge)]),
|
|
8215
8239
|
onClick: (J) => se(le, ge, J)
|
|
8216
8240
|
}, [
|
|
8217
8241
|
k.value ? (c(), b("td", qs, [
|
|
@@ -8228,10 +8252,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8228
8252
|
])) : Q("", !0),
|
|
8229
8253
|
(c(!0), b(fe, null, he(N.columns, (J) => (c(), b("td", {
|
|
8230
8254
|
key: J.field,
|
|
8231
|
-
class: ee(["vf-datatable__cell",
|
|
8255
|
+
class: ee(["vf-datatable__cell", Y(J)]),
|
|
8232
8256
|
style: ke(ae(J))
|
|
8233
8257
|
}, [
|
|
8234
|
-
N.$slots[`cell-${J.field}`] ?
|
|
8258
|
+
N.$slots[`cell-${J.field}`] ? q(N.$slots, `cell-${J.field}`, {
|
|
8235
8259
|
key: 0,
|
|
8236
8260
|
row: le,
|
|
8237
8261
|
column: J,
|
|
@@ -8246,7 +8270,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8246
8270
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
8247
8271
|
colspan: y.value
|
|
8248
8272
|
}, [
|
|
8249
|
-
|
|
8273
|
+
q(N.$slots, "empty", {}, () => [
|
|
8250
8274
|
me(j(N.emptyText), 1)
|
|
8251
8275
|
])
|
|
8252
8276
|
], 8, js)
|
|
@@ -8288,8 +8312,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8288
8312
|
const W = x.toString();
|
|
8289
8313
|
return W.includes(".") ? W.split(".")[1].length : 0;
|
|
8290
8314
|
}, u = (x) => Math.min(s.value, Math.max(i.value, x)), v = (x) => {
|
|
8291
|
-
const W = Number(x), h = i.value, P = Number.isFinite(W) ? W : h, K = u(P),
|
|
8292
|
-
return Number.parseFloat(
|
|
8315
|
+
const W = Number(x), h = i.value, P = Number.isFinite(W) ? W : h, K = u(P), A = d.value, V = r(A), Y = Math.round((K - i.value) / A) * A + i.value;
|
|
8316
|
+
return Number.parseFloat(Y.toFixed(V));
|
|
8293
8317
|
}, p = f(() => {
|
|
8294
8318
|
if (!t.value) {
|
|
8295
8319
|
const P = v(e.modelValue ?? i.value);
|
|
@@ -8322,8 +8346,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8322
8346
|
if (e.disabled)
|
|
8323
8347
|
return;
|
|
8324
8348
|
const K = v(Number(x));
|
|
8325
|
-
let [
|
|
8326
|
-
W === "start" ?
|
|
8349
|
+
let [A, V] = p.value;
|
|
8350
|
+
W === "start" ? A = Math.min(K, V) : V = Math.max(K, A), a("update:modelValue", [A, V]), a(P, h);
|
|
8327
8351
|
}, R = (x) => {
|
|
8328
8352
|
const W = x.target;
|
|
8329
8353
|
if (t.value) {
|
|
@@ -8344,7 +8368,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8344
8368
|
}, E = (x) => {
|
|
8345
8369
|
const W = x.target;
|
|
8346
8370
|
L(W.value, "end", x, "change");
|
|
8347
|
-
}, T = (x) => a("focus", x), D = (x) => a("blur", x), M = f(() => e.marks ?? []), S = (x) => ({ left: `${l(u(x))}%` }), F = f(() => t.value ? `${p.value[0]} - ${p.value[1]}` : `${m.value}`),
|
|
8371
|
+
}, T = (x) => a("focus", x), D = (x) => a("blur", x), M = f(() => e.marks ?? []), S = (x) => ({ left: `${l(u(x))}%` }), F = f(() => t.value ? `${p.value[0]} - ${p.value[1]}` : `${m.value}`), H = f(() => t.value ? e.ariaLabelStart : e.ariaLabel), Z = f(() => t.value ? e.ariaLabelEnd : e.ariaLabel);
|
|
8348
8372
|
return (x, W) => (c(), b("div", {
|
|
8349
8373
|
class: ee(z.value),
|
|
8350
8374
|
style: ke(y.value)
|
|
@@ -8361,7 +8385,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8361
8385
|
step: d.value,
|
|
8362
8386
|
value: m.value,
|
|
8363
8387
|
disabled: x.disabled,
|
|
8364
|
-
"aria-label":
|
|
8388
|
+
"aria-label": H.value,
|
|
8365
8389
|
style: ke(C.value),
|
|
8366
8390
|
onInput: R,
|
|
8367
8391
|
onChange: O,
|
|
@@ -8416,22 +8440,22 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8416
8440
|
}, $ = (x) => {
|
|
8417
8441
|
if (!x.length)
|
|
8418
8442
|
return [];
|
|
8419
|
-
const W = x.reduce((V,
|
|
8443
|
+
const W = x.reduce((V, Y) => V + Y, 0);
|
|
8420
8444
|
if (W <= 0) {
|
|
8421
8445
|
const V = 100 / x.length;
|
|
8422
8446
|
return x.map(
|
|
8423
|
-
(
|
|
8447
|
+
(Y, ae) => ae === x.length - 1 ? m(100 - V * (x.length - 1)) : V
|
|
8424
8448
|
);
|
|
8425
8449
|
}
|
|
8426
|
-
const P = x.map((V) => V / W * 100).map((V) => m(V)), K = m(100 - P.reduce((V,
|
|
8427
|
-
return P[
|
|
8450
|
+
const P = x.map((V) => V / W * 100).map((V) => m(V)), K = m(100 - P.reduce((V, Y) => V + Y, 0)), A = P.length - 1;
|
|
8451
|
+
return P[A] = m(P[A] + K), P;
|
|
8428
8452
|
}, l = (x, W) => {
|
|
8429
8453
|
if (!x.length)
|
|
8430
8454
|
return [];
|
|
8431
8455
|
const P = W.reduce((ae, se) => ae + se, 0) >= 100 ? $(W) : W.map((ae) => Math.max(ae, 0)), K = x.map((ae, se) => Math.max(ae, P[se] ?? 0));
|
|
8432
|
-
let
|
|
8433
|
-
if (
|
|
8434
|
-
let ae =
|
|
8456
|
+
let A = K.reduce((ae, se) => ae + se, 0);
|
|
8457
|
+
if (A > 100) {
|
|
8458
|
+
let ae = A - 100, se = 0;
|
|
8435
8459
|
for (; ae > 1e-4 && se < 50; ) {
|
|
8436
8460
|
const U = K.map((re, de) => ({ index: de, slack: re - (P[de] ?? 0) })).filter((re) => re.slack > 1e-4);
|
|
8437
8461
|
if (!U.length)
|
|
@@ -8448,25 +8472,25 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8448
8472
|
K[re.index] = K[re.index] - ae * de;
|
|
8449
8473
|
}), ae = 0, ++se;
|
|
8450
8474
|
}
|
|
8451
|
-
} else if (
|
|
8452
|
-
const se = (100 -
|
|
8475
|
+
} else if (A < 100) {
|
|
8476
|
+
const se = (100 - A) / K.length;
|
|
8453
8477
|
for (let U = 0; U < K.length; ++U)
|
|
8454
8478
|
K[U] += se;
|
|
8455
8479
|
}
|
|
8456
|
-
const V = K.map((ae) => m(ae)),
|
|
8457
|
-
return V[V.length - 1] = m(V[V.length - 1] +
|
|
8480
|
+
const V = K.map((ae) => m(ae)), Y = m(100 - V.reduce((ae, se) => ae + se, 0));
|
|
8481
|
+
return V[V.length - 1] = m(V[V.length - 1] + Y), V;
|
|
8458
8482
|
}, _ = (x) => {
|
|
8459
8483
|
if (!x)
|
|
8460
8484
|
return [];
|
|
8461
8485
|
const W = a.modelValue;
|
|
8462
8486
|
if (W.length === x && W.every(v))
|
|
8463
8487
|
return $(W);
|
|
8464
|
-
const h = s.value.map((
|
|
8488
|
+
const h = s.value.map((Y) => Y.size), P = h.filter(v);
|
|
8465
8489
|
if (!P.length)
|
|
8466
8490
|
return $(Array.from({ length: x }, () => 1));
|
|
8467
|
-
const K = P.reduce((
|
|
8468
|
-
if (K < 100 &&
|
|
8469
|
-
const ae = (100 - K) /
|
|
8491
|
+
const K = P.reduce((Y, ae) => Y + ae, 0), A = h.length - P.length, V = h.map((Y) => v(Y) ? Y : 0);
|
|
8492
|
+
if (K < 100 && A > 0) {
|
|
8493
|
+
const ae = (100 - K) / A;
|
|
8470
8494
|
for (let se = 0; se < V.length; ++se)
|
|
8471
8495
|
v(h[se]) || (V[se] = ae);
|
|
8472
8496
|
return $(V);
|
|
@@ -8510,7 +8534,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8510
8534
|
const P = [...d.value];
|
|
8511
8535
|
if (!P[x] || !P[x + 1])
|
|
8512
8536
|
return;
|
|
8513
|
-
const K = k(),
|
|
8537
|
+
const K = k(), A = P[x] + P[x + 1], V = K[x] ?? 0, Y = K[x + 1] ?? 0, ae = p(P[x] + W, V, A - Y), se = A - ae;
|
|
8514
8538
|
P[x] = m(ae), P[x + 1] = m(se);
|
|
8515
8539
|
const U = l($(P), K);
|
|
8516
8540
|
d.value = U, h && e("update:modelValue", [...U]);
|
|
@@ -8534,18 +8558,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8534
8558
|
const h = a.direction === "horizontal", P = h ? "ArrowLeft" : "ArrowUp", K = h ? "ArrowRight" : "ArrowDown";
|
|
8535
8559
|
if ([P, K, "Home", "End"].includes(x.key)) {
|
|
8536
8560
|
if (x.preventDefault(), x.key === "Home") {
|
|
8537
|
-
const
|
|
8538
|
-
O(W,
|
|
8561
|
+
const A = k(), V = d.value[W] ?? 0, Y = A[W] ?? 0;
|
|
8562
|
+
O(W, Y - V);
|
|
8539
8563
|
} else if (x.key === "End") {
|
|
8540
|
-
const
|
|
8541
|
-
O(W, ae -
|
|
8564
|
+
const A = k(), V = (d.value[W] ?? 0) + (d.value[W + 1] ?? 0), Y = d.value[W] ?? 0, ae = V - (A[W + 1] ?? 0);
|
|
8565
|
+
O(W, ae - Y);
|
|
8542
8566
|
} else {
|
|
8543
|
-
const
|
|
8567
|
+
const A = x.shiftKey ? 5 : 2, V = x.key === K ? A : -A;
|
|
8544
8568
|
O(W, V);
|
|
8545
8569
|
}
|
|
8546
8570
|
e("change", [...d.value]);
|
|
8547
8571
|
}
|
|
8548
|
-
},
|
|
8572
|
+
}, H = (x) => {
|
|
8549
8573
|
const W = `vf-splitter-panel-${++t}`;
|
|
8550
8574
|
return s.value.push({
|
|
8551
8575
|
id: W,
|
|
@@ -8558,7 +8582,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8558
8582
|
return Qe(zt, {
|
|
8559
8583
|
direction: f(() => a.direction),
|
|
8560
8584
|
disabled: f(() => a.disabled),
|
|
8561
|
-
registerPanel:
|
|
8585
|
+
registerPanel: H,
|
|
8562
8586
|
unregisterPanel: Z,
|
|
8563
8587
|
getPanelStyle: L
|
|
8564
8588
|
}), ve(
|
|
@@ -8580,7 +8604,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8580
8604
|
ref: i,
|
|
8581
8605
|
class: ee(z.value)
|
|
8582
8606
|
}, [
|
|
8583
|
-
|
|
8607
|
+
q(x.$slots, "default"),
|
|
8584
8608
|
(c(!0), b(fe, null, he(C.value, (h, P) => (c(), b("div", {
|
|
8585
8609
|
key: `gutter-${P}`,
|
|
8586
8610
|
class: ee(["vf-splitter__gutter", { "is-dragging": r.value === P }]),
|
|
@@ -8622,7 +8646,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8622
8646
|
class: ee(t.value),
|
|
8623
8647
|
style: ke(i.value)
|
|
8624
8648
|
}, [
|
|
8625
|
-
|
|
8649
|
+
q(s.$slots, "default")
|
|
8626
8650
|
], 6));
|
|
8627
8651
|
}
|
|
8628
8652
|
}), oi = ["aria-label", "aria-labelledby"], ri = { class: "vf-stepper__list" }, li = { class: "vf-stepper__indicator-wrap" }, ni = { class: "vf-stepper__indicator" }, si = {
|
|
@@ -8690,7 +8714,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8690
8714
|
default: Ce(() => [
|
|
8691
8715
|
B("span", li, [
|
|
8692
8716
|
B("span", ni, [
|
|
8693
|
-
|
|
8717
|
+
q(g.$slots, "indicator", {
|
|
8694
8718
|
step: L,
|
|
8695
8719
|
index: R,
|
|
8696
8720
|
status: r(L, R),
|
|
@@ -8705,7 +8729,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8705
8729
|
R < t.value.length - 1 ? (c(), b("span", si)) : Q("", !0)
|
|
8706
8730
|
]),
|
|
8707
8731
|
B("span", ii, [
|
|
8708
|
-
|
|
8732
|
+
q(g.$slots, "step", {
|
|
8709
8733
|
step: L,
|
|
8710
8734
|
index: R,
|
|
8711
8735
|
status: r(L, R),
|
|
@@ -8771,7 +8795,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8771
8795
|
var S;
|
|
8772
8796
|
if (r.value.length) {
|
|
8773
8797
|
if (e.modelValue !== void 0) {
|
|
8774
|
-
const F = r.value.find((
|
|
8798
|
+
const F = r.value.find((H) => H.value === e.modelValue && !H.disabled);
|
|
8775
8799
|
if (F)
|
|
8776
8800
|
return F.value;
|
|
8777
8801
|
}
|
|
@@ -8783,17 +8807,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8783
8807
|
const F = r.value[S];
|
|
8784
8808
|
if (!F)
|
|
8785
8809
|
return !0;
|
|
8786
|
-
const
|
|
8810
|
+
const H = F.value, Z = F.validate ? await F.validate(H, S) : !0, x = e.validateStep ? await e.validateStep(F, S, H) : !0, W = (V) => V == null || V === !0 ? "" : V === !1 ? "Step is invalid" : String(V), h = W(Z), P = W(x), K = h || P;
|
|
8787
8811
|
if (K)
|
|
8788
8812
|
return d.value = {
|
|
8789
8813
|
...d.value,
|
|
8790
|
-
[String(
|
|
8814
|
+
[String(H)]: K
|
|
8791
8815
|
}, a("invalidStep", K, F, S), !1;
|
|
8792
|
-
const
|
|
8793
|
-
return delete
|
|
8816
|
+
const A = { ...d.value };
|
|
8817
|
+
return delete A[String(H)], d.value = A, !0;
|
|
8794
8818
|
}, O = async (S, F) => {
|
|
8795
|
-
const
|
|
8796
|
-
!
|
|
8819
|
+
const H = r.value[S];
|
|
8820
|
+
!H || w(H, S) || u.value >= 0 && S > u.value && !await I(u.value) || R(H.value, F);
|
|
8797
8821
|
}, E = async () => {
|
|
8798
8822
|
u.value <= 0 || await O(u.value - 1, "prev");
|
|
8799
8823
|
}, T = async () => {
|
|
@@ -8831,41 +8855,41 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8831
8855
|
}, [
|
|
8832
8856
|
B("nav", vi, [
|
|
8833
8857
|
B("ol", fi, [
|
|
8834
|
-
(c(!0), b(fe, null, he(r.value, (
|
|
8835
|
-
key: String(
|
|
8836
|
-
class: ee(["vf-wizard__item", g(
|
|
8858
|
+
(c(!0), b(fe, null, he(r.value, (H, Z) => (c(), b("li", {
|
|
8859
|
+
key: String(H.value),
|
|
8860
|
+
class: ee(["vf-wizard__item", g(H, Z)])
|
|
8837
8861
|
}, [
|
|
8838
8862
|
B("button", {
|
|
8839
|
-
id: _(
|
|
8863
|
+
id: _(H.value),
|
|
8840
8864
|
class: "vf-wizard__step",
|
|
8841
8865
|
type: "button",
|
|
8842
8866
|
role: "tab",
|
|
8843
|
-
"aria-selected": y(
|
|
8844
|
-
"aria-controls": k(
|
|
8845
|
-
disabled: w(
|
|
8867
|
+
"aria-selected": y(H.value) ? "true" : "false",
|
|
8868
|
+
"aria-controls": k(H.value),
|
|
8869
|
+
disabled: w(H, Z),
|
|
8846
8870
|
onClick: (x) => M(Z)
|
|
8847
8871
|
}, [
|
|
8848
8872
|
B("span", mi, [
|
|
8849
|
-
|
|
8850
|
-
step:
|
|
8873
|
+
q(S.$slots, "indicator", {
|
|
8874
|
+
step: H,
|
|
8851
8875
|
index: Z
|
|
8852
8876
|
}, () => [
|
|
8853
8877
|
me(j(Z + 1), 1)
|
|
8854
8878
|
])
|
|
8855
8879
|
]),
|
|
8856
8880
|
B("span", gi, [
|
|
8857
|
-
B("span", bi, j(
|
|
8858
|
-
|
|
8881
|
+
B("span", bi, j(H.title || `Step ${Z + 1}`), 1),
|
|
8882
|
+
H.description ? (c(), b("span", hi, j(H.description), 1)) : Q("", !0)
|
|
8859
8883
|
])
|
|
8860
8884
|
], 8, pi)
|
|
8861
8885
|
], 2))), 128))
|
|
8862
8886
|
])
|
|
8863
8887
|
]),
|
|
8864
8888
|
B("div", yi, [
|
|
8865
|
-
|
|
8889
|
+
q(S.$slots, "default")
|
|
8866
8890
|
]),
|
|
8867
8891
|
B("div", _i, [
|
|
8868
|
-
|
|
8892
|
+
q(S.$slots, "actions", {
|
|
8869
8893
|
step: v.value,
|
|
8870
8894
|
index: u.value,
|
|
8871
8895
|
isFirst: p.value,
|
|
@@ -8906,7 +8930,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8906
8930
|
"aria-labelledby": i.value,
|
|
8907
8931
|
"aria-hidden": e.value ? "false" : "true"
|
|
8908
8932
|
}, [
|
|
8909
|
-
|
|
8933
|
+
q(s.$slots, "default")
|
|
8910
8934
|
], 8, Ci)), [
|
|
8911
8935
|
[Se, e.value]
|
|
8912
8936
|
]);
|
|
@@ -8952,7 +8976,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8952
8976
|
}, [
|
|
8953
8977
|
B("div", Si, [
|
|
8954
8978
|
B("span", Bi, [
|
|
8955
|
-
|
|
8979
|
+
q(i.$slots, "marker", {
|
|
8956
8980
|
item: d,
|
|
8957
8981
|
index: r
|
|
8958
8982
|
}, () => [
|
|
@@ -8965,7 +8989,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8965
8989
|
r < a.value.length - 1 ? (c(), b("span", Li)) : Q("", !0)
|
|
8966
8990
|
]),
|
|
8967
8991
|
B("div", Vi, [
|
|
8968
|
-
|
|
8992
|
+
q(i.$slots, "item", {
|
|
8969
8993
|
item: d,
|
|
8970
8994
|
index: r
|
|
8971
8995
|
}, () => [
|
|
@@ -9026,12 +9050,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9026
9050
|
t.value = r.value;
|
|
9027
9051
|
return;
|
|
9028
9052
|
}
|
|
9029
|
-
let
|
|
9053
|
+
let H = 0, Z = S, x = Number.POSITIVE_INFINITY;
|
|
9030
9054
|
D.forEach((h, P) => {
|
|
9031
|
-
const K = h.getBoundingClientRect(),
|
|
9032
|
-
V < x && (x = V,
|
|
9055
|
+
const K = h.getBoundingClientRect(), A = K.left + K.width / 2, V = Math.abs(M - A);
|
|
9056
|
+
V < x && (x = V, H = P, Z = K);
|
|
9033
9057
|
});
|
|
9034
|
-
let W =
|
|
9058
|
+
let W = H + 1;
|
|
9035
9059
|
if (e.allowHalf) {
|
|
9036
9060
|
const h = Z.left + Z.width / 2;
|
|
9037
9061
|
W = M < h ? W - 0.5 : W;
|
|
@@ -9101,7 +9125,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9101
9125
|
onKeydown: (S) => g(M, S)
|
|
9102
9126
|
}, [
|
|
9103
9127
|
B("span", Ri, [
|
|
9104
|
-
|
|
9128
|
+
q(T.$slots, "icon", {}, () => [
|
|
9105
9129
|
D[0] || (D[0] = B("svg", {
|
|
9106
9130
|
viewBox: "0 0 24 24",
|
|
9107
9131
|
"aria-hidden": "true",
|
|
@@ -9119,7 +9143,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9119
9143
|
style: ke({ width: R(M) })
|
|
9120
9144
|
}, [
|
|
9121
9145
|
B("span", Pi, [
|
|
9122
|
-
|
|
9146
|
+
q(T.$slots, "active-icon", {}, () => [
|
|
9123
9147
|
D[1] || (D[1] = B("svg", {
|
|
9124
9148
|
viewBox: "0 0 24 24",
|
|
9125
9149
|
"aria-hidden": "true",
|
|
@@ -9258,7 +9282,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9258
9282
|
onClick: ie($, ["stop"])
|
|
9259
9283
|
}, j(i.value ? "-" : "+"), 11, Ai)) : (c(), b("span", Hi)),
|
|
9260
9284
|
B("span", Wi, [
|
|
9261
|
-
|
|
9285
|
+
q(l.$slots, "label", {
|
|
9262
9286
|
node: l.node,
|
|
9263
9287
|
level: l.level,
|
|
9264
9288
|
selected: t.value,
|
|
@@ -9286,7 +9310,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9286
9310
|
"on-toggle": l.onToggle
|
|
9287
9311
|
}, {
|
|
9288
9312
|
label: Ce((z) => [
|
|
9289
|
-
|
|
9313
|
+
q(l.$slots, "label", st({ ref_for: !0 }, z))
|
|
9290
9314
|
]),
|
|
9291
9315
|
_: 2
|
|
9292
9316
|
}, 1032, ["node", "level", "size", "variant", "disabled", "expand-on-click", "selectable", "is-selected", "is-expanded", "is-disabled", "on-select", "on-toggle"]))), 128))
|
|
@@ -9356,7 +9380,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9356
9380
|
"on-toggle": $
|
|
9357
9381
|
}, {
|
|
9358
9382
|
label: Ce((y) => [
|
|
9359
|
-
|
|
9383
|
+
q(l.$slots, "label", st({ ref_for: !0 }, y))
|
|
9360
9384
|
]),
|
|
9361
9385
|
_: 2
|
|
9362
9386
|
}, 1032, ["node", "size", "variant", "disabled", "expand-on-click", "selectable"]))), 128))
|
|
@@ -9407,94 +9431,94 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9407
9431
|
let a = 0;
|
|
9408
9432
|
const e = o, t = n, i = G(null), s = G(null), d = G(null), r = G(null), u = G(!1), v = G(""), p = G("bottom"), m = G("bottom"), $ = `vf-treeselect-panel-${++a}`;
|
|
9409
9433
|
let l = null;
|
|
9410
|
-
const _ = (
|
|
9411
|
-
const V = [],
|
|
9434
|
+
const _ = (A) => Array.isArray(A) ? A : A == null ? [] : [A], k = (A) => {
|
|
9435
|
+
const V = [], Y = (ae) => {
|
|
9412
9436
|
ae.forEach((se) => {
|
|
9413
9437
|
var U;
|
|
9414
|
-
V.push(se), (U = se.children) != null && U.length &&
|
|
9438
|
+
V.push(se), (U = se.children) != null && U.length && Y(se.children);
|
|
9415
9439
|
});
|
|
9416
9440
|
};
|
|
9417
|
-
return
|
|
9441
|
+
return Y(A), V;
|
|
9418
9442
|
}, y = f(() => _(t.modelValue)), z = f(() => y.value.length > 0), C = f(() => {
|
|
9419
|
-
const
|
|
9443
|
+
const A = /* @__PURE__ */ new Map();
|
|
9420
9444
|
return k(t.items).forEach((V) => {
|
|
9421
|
-
|
|
9422
|
-
}),
|
|
9445
|
+
A.set(V.key, V.label);
|
|
9446
|
+
}), A;
|
|
9423
9447
|
}), g = f(() => {
|
|
9424
|
-
const
|
|
9425
|
-
return
|
|
9426
|
-
}), w = (
|
|
9448
|
+
const A = y.value.map((V) => C.value.get(V)).filter((V) => !!V);
|
|
9449
|
+
return A.length ? t.multiple ? A.join(", ") : A[0] : "";
|
|
9450
|
+
}), w = (A, V) => A.label.toLowerCase().includes(V), L = (A, V) => {
|
|
9427
9451
|
if (!V)
|
|
9428
|
-
return
|
|
9429
|
-
const
|
|
9430
|
-
return
|
|
9452
|
+
return A;
|
|
9453
|
+
const Y = [];
|
|
9454
|
+
return A.forEach((ae) => {
|
|
9431
9455
|
var U;
|
|
9432
9456
|
const se = (U = ae.children) != null && U.length ? L(ae.children, V) : [];
|
|
9433
|
-
(w(ae, V) || se.length) &&
|
|
9457
|
+
(w(ae, V) || se.length) && Y.push({
|
|
9434
9458
|
...ae,
|
|
9435
9459
|
children: se
|
|
9436
9460
|
});
|
|
9437
|
-
}),
|
|
9461
|
+
}), Y;
|
|
9438
9462
|
}, R = f(() => {
|
|
9439
9463
|
if (!t.filter)
|
|
9440
9464
|
return t.items;
|
|
9441
|
-
const
|
|
9442
|
-
return
|
|
9465
|
+
const A = v.value.trim().toLowerCase();
|
|
9466
|
+
return A ? L(t.items, A) : t.items;
|
|
9443
9467
|
}), I = f(() => {
|
|
9444
|
-
const
|
|
9445
|
-
return t.size !== "normal" &&
|
|
9468
|
+
const A = ["vf-treeselect", `vf-treeselect_${t.variant}`, u.value ? "vf-treeselect_open" : ""];
|
|
9469
|
+
return t.size !== "normal" && A.push(`vf-treeselect_${t.size}`), t.disabled && A.push("vf-treeselect_disabled"), A.filter(Boolean);
|
|
9446
9470
|
}), O = () => {
|
|
9447
9471
|
u.value = !1, p.value = "bottom", m.value = "bottom", v.value = "";
|
|
9448
9472
|
}, E = async () => {
|
|
9449
|
-
var
|
|
9450
|
-
t.disabled || (u.value = !0, p.value = "bottom", m.value = "bottom", t.filter && (await $e(), (
|
|
9473
|
+
var A;
|
|
9474
|
+
t.disabled || (u.value = !0, p.value = "bottom", m.value = "bottom", t.filter && (await $e(), (A = r.value) == null || A.focus()));
|
|
9451
9475
|
}, T = () => {
|
|
9452
9476
|
if (u.value) {
|
|
9453
9477
|
O();
|
|
9454
9478
|
return;
|
|
9455
9479
|
}
|
|
9456
9480
|
E();
|
|
9457
|
-
}, D = (
|
|
9458
|
-
t.readonly || (e("update:modelValue",
|
|
9459
|
-
}, M = (
|
|
9460
|
-
t.readonly || e("change",
|
|
9461
|
-
}, S = (
|
|
9462
|
-
e("update:expandedKeys",
|
|
9463
|
-
}, F = (
|
|
9464
|
-
e("toggle",
|
|
9465
|
-
},
|
|
9466
|
-
e("nodeClick",
|
|
9481
|
+
}, D = (A) => {
|
|
9482
|
+
t.readonly || (e("update:modelValue", A), t.multiple || O());
|
|
9483
|
+
}, M = (A, V, Y) => {
|
|
9484
|
+
t.readonly || e("change", A, V, Y);
|
|
9485
|
+
}, S = (A) => {
|
|
9486
|
+
e("update:expandedKeys", A);
|
|
9487
|
+
}, F = (A, V, Y, ae) => {
|
|
9488
|
+
e("toggle", A, V, Y, ae);
|
|
9489
|
+
}, H = (A, V) => {
|
|
9490
|
+
e("nodeClick", A, V);
|
|
9467
9491
|
}, Z = () => {
|
|
9468
9492
|
if (t.readonly)
|
|
9469
9493
|
return;
|
|
9470
|
-
const
|
|
9471
|
-
e("update:modelValue",
|
|
9472
|
-
}, x = (
|
|
9473
|
-
const V =
|
|
9494
|
+
const A = t.multiple ? [] : void 0;
|
|
9495
|
+
e("update:modelValue", A), e("change", A);
|
|
9496
|
+
}, x = (A) => {
|
|
9497
|
+
const V = A.target;
|
|
9474
9498
|
v.value = V.value, e("search", V.value);
|
|
9475
|
-
}, W = (
|
|
9476
|
-
var
|
|
9499
|
+
}, W = (A) => e("focus", A), h = (A) => e("blur", A), P = (A) => {
|
|
9500
|
+
var Y;
|
|
9477
9501
|
if (!u.value || !i.value)
|
|
9478
9502
|
return;
|
|
9479
|
-
const V =
|
|
9480
|
-
i.value.contains(V) || (
|
|
9503
|
+
const V = A.target;
|
|
9504
|
+
i.value.contains(V) || (Y = d.value) != null && Y.contains(V) || O();
|
|
9481
9505
|
}, K = () => {
|
|
9482
9506
|
if (!s.value || !d.value)
|
|
9483
9507
|
return;
|
|
9484
|
-
const
|
|
9508
|
+
const A = s.value, V = d.value, Y = async () => {
|
|
9485
9509
|
const {
|
|
9486
9510
|
x: X,
|
|
9487
9511
|
y: re,
|
|
9488
9512
|
placement: de
|
|
9489
|
-
} = await Me(
|
|
9513
|
+
} = await Me(A, V, {
|
|
9490
9514
|
placement: p.value,
|
|
9491
9515
|
strategy: "fixed",
|
|
9492
9516
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
9493
9517
|
});
|
|
9494
|
-
m.value = de ?? p.value, V.style.minWidth = `${
|
|
9518
|
+
m.value = de ?? p.value, V.style.minWidth = `${A.getBoundingClientRect().width}px`, V.style.left = `${X}px`, V.style.top = `${re}px`;
|
|
9495
9519
|
}, ae = async () => {
|
|
9496
|
-
await
|
|
9497
|
-
}, se = De(
|
|
9520
|
+
await Y();
|
|
9521
|
+
}, se = De(A, () => {
|
|
9498
9522
|
ae();
|
|
9499
9523
|
}), U = () => {
|
|
9500
9524
|
ae();
|
|
@@ -9506,8 +9530,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9506
9530
|
}
|
|
9507
9531
|
}, l.update();
|
|
9508
9532
|
};
|
|
9509
|
-
return ve(u, async (
|
|
9510
|
-
if (!
|
|
9533
|
+
return ve(u, async (A) => {
|
|
9534
|
+
if (!A) {
|
|
9511
9535
|
l && (l.destroy(), l = null);
|
|
9512
9536
|
return;
|
|
9513
9537
|
}
|
|
@@ -9522,7 +9546,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9522
9546
|
document.addEventListener("click", P);
|
|
9523
9547
|
}), we(() => {
|
|
9524
9548
|
document.removeEventListener("click", P), l == null || l.destroy(), l = null;
|
|
9525
|
-
}), (
|
|
9549
|
+
}), (A, V) => (c(), b("div", {
|
|
9526
9550
|
ref_key: "root",
|
|
9527
9551
|
ref: i,
|
|
9528
9552
|
class: ee(I.value)
|
|
@@ -9532,7 +9556,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9532
9556
|
ref: s,
|
|
9533
9557
|
class: "vf-treeselect__control",
|
|
9534
9558
|
type: "button",
|
|
9535
|
-
disabled:
|
|
9559
|
+
disabled: A.disabled,
|
|
9536
9560
|
"aria-expanded": u.value,
|
|
9537
9561
|
"aria-controls": $,
|
|
9538
9562
|
"aria-haspopup": "tree",
|
|
@@ -9547,13 +9571,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9547
9571
|
}, [
|
|
9548
9572
|
B("span", {
|
|
9549
9573
|
class: ee(["vf-treeselect__label", { "vf-treeselect__label_placeholder": !g.value }])
|
|
9550
|
-
}, j(g.value ||
|
|
9574
|
+
}, j(g.value || A.placeholder), 3),
|
|
9551
9575
|
V[0] || (V[0] = B("span", {
|
|
9552
9576
|
class: "vf-treeselect__chevron",
|
|
9553
9577
|
"aria-hidden": "true"
|
|
9554
9578
|
}, "▾", -1))
|
|
9555
9579
|
], 40, qi),
|
|
9556
|
-
|
|
9580
|
+
A.clearable && z.value && !A.disabled && !A.readonly ? (c(), b("button", {
|
|
9557
9581
|
key: 0,
|
|
9558
9582
|
class: "vf-treeselect__clear",
|
|
9559
9583
|
type: "button",
|
|
@@ -9568,41 +9592,41 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9568
9592
|
class: "vf-treeselect__panel",
|
|
9569
9593
|
"data-placement": m.value
|
|
9570
9594
|
}, [
|
|
9571
|
-
|
|
9595
|
+
A.filter ? (c(), b("div", Ui, [
|
|
9572
9596
|
B("input", {
|
|
9573
9597
|
ref_key: "searchInput",
|
|
9574
9598
|
ref: r,
|
|
9575
9599
|
class: "vf-treeselect__search-control",
|
|
9576
9600
|
type: "text",
|
|
9577
9601
|
value: v.value,
|
|
9578
|
-
placeholder:
|
|
9602
|
+
placeholder: A.searchPlaceholder,
|
|
9579
9603
|
onInput: x,
|
|
9580
9604
|
onKeydown: pe(ie(O, ["prevent"]), ["esc"])
|
|
9581
9605
|
}, null, 40, Qi)
|
|
9582
9606
|
])) : Q("", !0),
|
|
9583
|
-
|
|
9607
|
+
A.loading ? (c(), b("div", Zi, j(A.loadingText), 1)) : R.value.length > 0 ? (c(), be(Yi, {
|
|
9584
9608
|
key: 2,
|
|
9585
9609
|
class: "vf-treeselect__tree",
|
|
9586
9610
|
items: R.value,
|
|
9587
|
-
"model-value":
|
|
9588
|
-
"expanded-keys":
|
|
9589
|
-
multiple:
|
|
9590
|
-
selectable:
|
|
9591
|
-
"expand-on-click":
|
|
9592
|
-
disabled:
|
|
9593
|
-
size:
|
|
9594
|
-
variant:
|
|
9611
|
+
"model-value": A.modelValue,
|
|
9612
|
+
"expanded-keys": A.expandedKeys,
|
|
9613
|
+
multiple: A.multiple,
|
|
9614
|
+
selectable: A.selectable,
|
|
9615
|
+
"expand-on-click": A.expandOnClick,
|
|
9616
|
+
disabled: A.disabled,
|
|
9617
|
+
size: A.size,
|
|
9618
|
+
variant: A.variant,
|
|
9595
9619
|
"onUpdate:modelValue": D,
|
|
9596
9620
|
onChange: M,
|
|
9597
9621
|
"onUpdate:expandedKeys": S,
|
|
9598
9622
|
onToggle: F,
|
|
9599
|
-
onNodeClick:
|
|
9623
|
+
onNodeClick: H
|
|
9600
9624
|
}, {
|
|
9601
|
-
label: Ce((
|
|
9602
|
-
|
|
9625
|
+
label: Ce((Y) => [
|
|
9626
|
+
q(A.$slots, "label", Pt(Et(Y)))
|
|
9603
9627
|
]),
|
|
9604
9628
|
_: 3
|
|
9605
|
-
}, 8, ["items", "model-value", "expanded-keys", "multiple", "selectable", "expand-on-click", "disabled", "size", "variant"])) : (c(), b("div", Ji, j(
|
|
9629
|
+
}, 8, ["items", "model-value", "expanded-keys", "multiple", "selectable", "expand-on-click", "disabled", "size", "variant"])) : (c(), b("div", Ji, j(A.emptyText), 1))
|
|
9606
9630
|
], 8, Xi), [
|
|
9607
9631
|
[Se, u.value]
|
|
9608
9632
|
])
|
|
@@ -9638,7 +9662,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9638
9662
|
B("li", {
|
|
9639
9663
|
class: ee(["vf-breadcrumbs__item", { "is-current": t(r, u), "is-disabled": r.disabled }])
|
|
9640
9664
|
}, [
|
|
9641
|
-
|
|
9665
|
+
q(s.$slots, "item", {
|
|
9642
9666
|
item: r,
|
|
9643
9667
|
index: u,
|
|
9644
9668
|
isLast: u === a.value.length - 1,
|
|
@@ -9659,7 +9683,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9659
9683
|
])
|
|
9660
9684
|
], 2),
|
|
9661
9685
|
u < a.value.length - 1 ? (c(), b("li", od, [
|
|
9662
|
-
|
|
9686
|
+
q(s.$slots, "separator", { separator: s.separator }, () => [
|
|
9663
9687
|
me(j(s.separator), 1)
|
|
9664
9688
|
])
|
|
9665
9689
|
])) : Q("", !0)
|
|
@@ -9692,7 +9716,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9692
9716
|
"aria-label": i.ariaLabel
|
|
9693
9717
|
}, [
|
|
9694
9718
|
e.value ? (c(), b("span", ld, [
|
|
9695
|
-
|
|
9719
|
+
q(i.$slots, "default", {}, () => [
|
|
9696
9720
|
me(j(i.label), 1)
|
|
9697
9721
|
])
|
|
9698
9722
|
])) : Q("", !0)
|
|
@@ -9735,17 +9759,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9735
9759
|
class: ee(d.value)
|
|
9736
9760
|
}, [
|
|
9737
9761
|
r.$slots.breadcrumbs ? (c(), b("div", nd, [
|
|
9738
|
-
|
|
9762
|
+
q(r.$slots, "breadcrumbs")
|
|
9739
9763
|
])) : Q("", !0),
|
|
9740
9764
|
B("div", sd, [
|
|
9741
9765
|
B("div", id, [
|
|
9742
9766
|
e.value ? (c(), b("h1", dd, [
|
|
9743
|
-
|
|
9767
|
+
q(r.$slots, "title", {}, () => [
|
|
9744
9768
|
me(j(r.title), 1)
|
|
9745
9769
|
])
|
|
9746
9770
|
])) : Q("", !0),
|
|
9747
9771
|
t.value ? (c(), b("p", ud, [
|
|
9748
|
-
|
|
9772
|
+
q(r.$slots, "subtitle", {}, () => [
|
|
9749
9773
|
me(j(r.subtitle), 1)
|
|
9750
9774
|
])
|
|
9751
9775
|
])) : Q("", !0),
|
|
@@ -9755,10 +9779,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9755
9779
|
role: "group",
|
|
9756
9780
|
"aria-label": r.metaAriaLabel || void 0
|
|
9757
9781
|
}, [
|
|
9758
|
-
|
|
9782
|
+
q(r.$slots, "meta")
|
|
9759
9783
|
], 8, cd)) : Q("", !0),
|
|
9760
9784
|
r.$slots.default ? (c(), b("div", vd, [
|
|
9761
|
-
|
|
9785
|
+
q(r.$slots, "default")
|
|
9762
9786
|
])) : Q("", !0)
|
|
9763
9787
|
]),
|
|
9764
9788
|
r.$slots.actions ? (c(), b("div", {
|
|
@@ -9767,7 +9791,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9767
9791
|
role: "group",
|
|
9768
9792
|
"aria-label": r.actionsAriaLabel || void 0
|
|
9769
9793
|
}, [
|
|
9770
|
-
|
|
9794
|
+
q(r.$slots, "actions")
|
|
9771
9795
|
], 8, fd)) : Q("", !0)
|
|
9772
9796
|
])
|
|
9773
9797
|
], 2));
|
|
@@ -9870,7 +9894,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9870
9894
|
style: ke(I.value),
|
|
9871
9895
|
role: "listitem"
|
|
9872
9896
|
}, [
|
|
9873
|
-
|
|
9897
|
+
q(M.$slots, "default", {
|
|
9874
9898
|
item: F.item,
|
|
9875
9899
|
index: F.index
|
|
9876
9900
|
}, () => [
|
|
@@ -9879,21 +9903,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9879
9903
|
], 4))), 128))
|
|
9880
9904
|
], 4)
|
|
9881
9905
|
], 4)) : (c(), b("div", gd, [
|
|
9882
|
-
(c(!0), b(fe, null, he(r.value, (F,
|
|
9883
|
-
key: O(F,
|
|
9906
|
+
(c(!0), b(fe, null, he(r.value, (F, H) => (c(), b("div", {
|
|
9907
|
+
key: O(F, H),
|
|
9884
9908
|
class: "vf-virtual-scroller__item",
|
|
9885
9909
|
style: ke(I.value),
|
|
9886
9910
|
role: "listitem"
|
|
9887
9911
|
}, [
|
|
9888
|
-
|
|
9912
|
+
q(M.$slots, "default", {
|
|
9889
9913
|
item: F,
|
|
9890
|
-
index:
|
|
9914
|
+
index: H
|
|
9891
9915
|
}, () => [
|
|
9892
9916
|
me(j(F), 1)
|
|
9893
9917
|
])
|
|
9894
9918
|
], 4))), 128))
|
|
9895
9919
|
])) : (c(), b("div", md, [
|
|
9896
|
-
|
|
9920
|
+
q(M.$slots, "empty", {}, () => [
|
|
9897
9921
|
me(j(M.emptyText), 1)
|
|
9898
9922
|
])
|
|
9899
9923
|
]))
|