@codemonster-ru/vueforge 0.83.0 → 0.84.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.d.ts +1 -1
- package/dist/index.ts.mjs +507 -485
- package/dist/index.ts.umd.js +2 -2
- package/dist/package/components/form.vue.d.ts +10 -0
- package/package.json +1 -1
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,13 +1881,13 @@ 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,
|
|
@@ -1877,7 +1899,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1877
1899
|
id: i.value,
|
|
1878
1900
|
class: "vf-form-field__hint"
|
|
1879
1901
|
}, [
|
|
1880
|
-
|
|
1902
|
+
q(m.$slots, "hint", {}, () => [
|
|
1881
1903
|
me(j(m.hint), 1)
|
|
1882
1904
|
])
|
|
1883
1905
|
], 8, to)) : Q("", !0),
|
|
@@ -1887,7 +1909,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1887
1909
|
class: "vf-form-field__error",
|
|
1888
1910
|
role: "alert"
|
|
1889
1911
|
}, [
|
|
1890
|
-
|
|
1912
|
+
q(m.$slots, "error", {}, () => [
|
|
1891
1913
|
me(j(m.error), 1)
|
|
1892
1914
|
])
|
|
1893
1915
|
], 8, ao)) : Q("", !0)
|
|
@@ -2487,19 +2509,19 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2487
2509
|
let w = C, L = g;
|
|
2488
2510
|
const R = _ ? Math.abs(k) : 0, I = R, O = R;
|
|
2489
2511
|
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 <
|
|
2512
|
+
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;
|
|
2513
|
+
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);
|
|
2514
|
+
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;
|
|
2515
|
+
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
2516
|
}
|
|
2495
2517
|
const E = Oe(s);
|
|
2496
2518
|
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 =
|
|
2519
|
+
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);
|
|
2520
|
+
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
2521
|
}
|
|
2500
2522
|
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 >
|
|
2523
|
+
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;
|
|
2524
|
+
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
2525
|
}
|
|
2504
2526
|
return v;
|
|
2505
2527
|
}
|
|
@@ -2752,7 +2774,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2752
2774
|
return;
|
|
2753
2775
|
const E = s.value, T = d.value, D = async () => {
|
|
2754
2776
|
const {
|
|
2755
|
-
x:
|
|
2777
|
+
x: H,
|
|
2756
2778
|
y: Z,
|
|
2757
2779
|
placement: x
|
|
2758
2780
|
} = await Me(E, T, {
|
|
@@ -2760,7 +2782,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2760
2782
|
strategy: "fixed",
|
|
2761
2783
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
2762
2784
|
});
|
|
2763
|
-
v.value = x ?? u.value, T.style.minWidth = `${E.getBoundingClientRect().width}px`, T.style.left = `${
|
|
2785
|
+
v.value = x ?? u.value, T.style.minWidth = `${E.getBoundingClientRect().width}px`, T.style.left = `${H}px`, T.style.top = `${Z}px`;
|
|
2764
2786
|
}, M = async () => {
|
|
2765
2787
|
await D();
|
|
2766
2788
|
}, S = De(E, () => {
|
|
@@ -2897,7 +2919,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2897
2919
|
}
|
|
2898
2920
|
let K = v.value;
|
|
2899
2921
|
(K < 0 || K >= P.length) && (K = h > 0 ? -1 : P.length);
|
|
2900
|
-
for (let
|
|
2922
|
+
for (let A = 0; A < P.length; A += 1)
|
|
2901
2923
|
if (K = (K + h + P.length) % P.length, !P[K].disabled) {
|
|
2902
2924
|
v.value = K;
|
|
2903
2925
|
return;
|
|
@@ -2928,7 +2950,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2928
2950
|
return;
|
|
2929
2951
|
}
|
|
2930
2952
|
R(1);
|
|
2931
|
-
},
|
|
2953
|
+
}, H = () => {
|
|
2932
2954
|
if (!r.value) {
|
|
2933
2955
|
I();
|
|
2934
2956
|
return;
|
|
@@ -2961,17 +2983,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2961
2983
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
2962
2984
|
});
|
|
2963
2985
|
m.value = U ?? p.value, P.style.minWidth = `${h.getBoundingClientRect().width}px`, P.style.left = `${ae}px`, P.style.top = `${se}px`;
|
|
2964
|
-
},
|
|
2986
|
+
}, A = async () => {
|
|
2965
2987
|
await K();
|
|
2966
2988
|
}, V = De(h, () => {
|
|
2967
|
-
|
|
2968
|
-
}),
|
|
2969
|
-
|
|
2989
|
+
A();
|
|
2990
|
+
}), Y = () => {
|
|
2991
|
+
A();
|
|
2970
2992
|
};
|
|
2971
|
-
document.addEventListener("scroll",
|
|
2972
|
-
update:
|
|
2993
|
+
document.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y, !1), l = {
|
|
2994
|
+
update: A,
|
|
2973
2995
|
destroy: () => {
|
|
2974
|
-
V(), document.removeEventListener("scroll",
|
|
2996
|
+
V(), document.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y, !1);
|
|
2975
2997
|
}
|
|
2976
2998
|
}, l.update();
|
|
2977
2999
|
};
|
|
@@ -3026,7 +3048,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3026
3048
|
onClick: I,
|
|
3027
3049
|
onKeydown: [
|
|
3028
3050
|
pe(ie(F, ["prevent"]), ["down"]),
|
|
3029
|
-
pe(ie(
|
|
3051
|
+
pe(ie(H, ["prevent"]), ["up"]),
|
|
3030
3052
|
pe(ie(Z, ["prevent"]), ["enter"]),
|
|
3031
3053
|
pe(ie(O, ["prevent"]), ["esc"]),
|
|
3032
3054
|
pe(O, ["tab"])
|
|
@@ -3051,13 +3073,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3051
3073
|
role: "listbox",
|
|
3052
3074
|
"data-placement": m.value
|
|
3053
3075
|
}, [
|
|
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(
|
|
3076
|
+
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", {
|
|
3077
|
+
id: g(A),
|
|
3056
3078
|
key: K.value,
|
|
3057
3079
|
class: ee(["vf-autocomplete__option", {
|
|
3058
3080
|
"is-active": w(K),
|
|
3059
3081
|
"is-disabled": K.disabled,
|
|
3060
|
-
"is-highlighted":
|
|
3082
|
+
"is-highlighted": A === v.value
|
|
3061
3083
|
}]),
|
|
3062
3084
|
type: "button",
|
|
3063
3085
|
role: "option",
|
|
@@ -3145,7 +3167,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3145
3167
|
return;
|
|
3146
3168
|
}
|
|
3147
3169
|
M();
|
|
3148
|
-
},
|
|
3170
|
+
}, H = () => {
|
|
3149
3171
|
const U = u.value.trim();
|
|
3150
3172
|
return !U || !w.value ? !1 : (t.allowCreate && !C.value && e("create", U), T(U), E(U), S(), !0);
|
|
3151
3173
|
}, Z = () => {
|
|
@@ -3164,7 +3186,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3164
3186
|
}, K = (U) => {
|
|
3165
3187
|
var X;
|
|
3166
3188
|
e("blur", U), t.strict && u.value.trim() !== ((X = k.value) == null ? void 0 : X.label) && Z();
|
|
3167
|
-
},
|
|
3189
|
+
}, A = () => {
|
|
3168
3190
|
if (!r.value) {
|
|
3169
3191
|
M();
|
|
3170
3192
|
return;
|
|
@@ -3176,7 +3198,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3176
3198
|
return;
|
|
3177
3199
|
}
|
|
3178
3200
|
D(-1);
|
|
3179
|
-
},
|
|
3201
|
+
}, Y = () => {
|
|
3180
3202
|
if (!r.value) {
|
|
3181
3203
|
M();
|
|
3182
3204
|
return;
|
|
@@ -3186,7 +3208,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3186
3208
|
x(U);
|
|
3187
3209
|
return;
|
|
3188
3210
|
}
|
|
3189
|
-
|
|
3211
|
+
H() || t.strict && Z();
|
|
3190
3212
|
}, ae = (U) => {
|
|
3191
3213
|
var re;
|
|
3192
3214
|
if (!r.value || !i.value)
|
|
@@ -3277,9 +3299,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3277
3299
|
onBlur: K,
|
|
3278
3300
|
onClick: M,
|
|
3279
3301
|
onKeydown: [
|
|
3280
|
-
pe(ie(
|
|
3302
|
+
pe(ie(A, ["prevent"]), ["down"]),
|
|
3281
3303
|
pe(ie(V, ["prevent"]), ["up"]),
|
|
3282
|
-
pe(ie(
|
|
3304
|
+
pe(ie(Y, ["prevent"]), ["enter"]),
|
|
3283
3305
|
pe(ie(S, ["prevent"]), ["esc"]),
|
|
3284
3306
|
pe(S, ["tab"])
|
|
3285
3307
|
]
|
|
@@ -3379,7 +3401,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3379
3401
|
if (!t.filter)
|
|
3380
3402
|
return k.value;
|
|
3381
3403
|
const V = v.value.trim().toLowerCase();
|
|
3382
|
-
return V ? k.value.filter((
|
|
3404
|
+
return V ? k.value.filter((Y) => Y.label.toLowerCase().includes(V)) : k.value;
|
|
3383
3405
|
}), 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
3406
|
const V = ["vf-multiselect", `vf-multiselect_${t.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
3385
3407
|
return t.size !== "normal" && V.push(`vf-multiselect_${t.size}`), t.disabled && V.push("vf-multiselect_disabled"), V.filter(Boolean);
|
|
@@ -3388,7 +3410,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3388
3410
|
}, E = (V) => {
|
|
3389
3411
|
if (!(V.disabled || t.readonly)) {
|
|
3390
3412
|
if (I(V)) {
|
|
3391
|
-
O(y.value.filter((
|
|
3413
|
+
O(y.value.filter((Y) => Y !== V.value));
|
|
3392
3414
|
return;
|
|
3393
3415
|
}
|
|
3394
3416
|
O([...y.value, V.value]);
|
|
@@ -3396,15 +3418,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3396
3418
|
}, T = () => {
|
|
3397
3419
|
t.readonly || O([]);
|
|
3398
3420
|
}, D = (V) => {
|
|
3399
|
-
const
|
|
3400
|
-
if (!
|
|
3421
|
+
const Y = z.value;
|
|
3422
|
+
if (!Y.length) {
|
|
3401
3423
|
p.value = -1;
|
|
3402
3424
|
return;
|
|
3403
3425
|
}
|
|
3404
3426
|
let ae = p.value;
|
|
3405
|
-
(ae < 0 || ae >=
|
|
3406
|
-
for (let se = 0; se <
|
|
3407
|
-
if (ae = (ae + V +
|
|
3427
|
+
(ae < 0 || ae >= Y.length) && (ae = V > 0 ? -1 : Y.length);
|
|
3428
|
+
for (let se = 0; se < Y.length; se += 1)
|
|
3429
|
+
if (ae = (ae + V + Y.length) % Y.length, !Y[ae].disabled) {
|
|
3408
3430
|
p.value = ae;
|
|
3409
3431
|
return;
|
|
3410
3432
|
}
|
|
@@ -3420,7 +3442,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3420
3442
|
return;
|
|
3421
3443
|
}
|
|
3422
3444
|
M();
|
|
3423
|
-
},
|
|
3445
|
+
}, H = () => {
|
|
3424
3446
|
if (!u.value) {
|
|
3425
3447
|
M();
|
|
3426
3448
|
return;
|
|
@@ -3440,28 +3462,28 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3440
3462
|
const V = z.value[p.value];
|
|
3441
3463
|
V && !V.disabled && E(V);
|
|
3442
3464
|
}, W = (V) => {
|
|
3443
|
-
const
|
|
3444
|
-
v.value =
|
|
3465
|
+
const Y = V.target;
|
|
3466
|
+
v.value = Y.value, e("search", Y.value), p.value = R();
|
|
3445
3467
|
}, h = (V) => e("focus", V), P = (V) => e("blur", V), K = (V) => {
|
|
3446
3468
|
var ae;
|
|
3447
3469
|
if (!u.value || !i.value)
|
|
3448
3470
|
return;
|
|
3449
|
-
const
|
|
3450
|
-
i.value.contains(
|
|
3451
|
-
},
|
|
3471
|
+
const Y = V.target;
|
|
3472
|
+
i.value.contains(Y) || (ae = d.value) != null && ae.contains(Y) || S();
|
|
3473
|
+
}, A = () => {
|
|
3452
3474
|
if (!s.value || !d.value)
|
|
3453
3475
|
return;
|
|
3454
|
-
const V = s.value,
|
|
3476
|
+
const V = s.value, Y = d.value, ae = async () => {
|
|
3455
3477
|
const {
|
|
3456
3478
|
x: re,
|
|
3457
3479
|
y: de,
|
|
3458
3480
|
placement: ye
|
|
3459
|
-
} = await Me(V,
|
|
3481
|
+
} = await Me(V, Y, {
|
|
3460
3482
|
placement: m.value,
|
|
3461
3483
|
strategy: "fixed",
|
|
3462
3484
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
3463
3485
|
});
|
|
3464
|
-
$.value = ye ?? m.value,
|
|
3486
|
+
$.value = ye ?? m.value, Y.style.minWidth = `${V.getBoundingClientRect().width}px`, Y.style.left = `${re}px`, Y.style.top = `${de}px`;
|
|
3465
3487
|
}, se = async () => {
|
|
3466
3488
|
await ae();
|
|
3467
3489
|
}, U = De(V, () => {
|
|
@@ -3487,14 +3509,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3487
3509
|
_ && (_.destroy(), _ = null);
|
|
3488
3510
|
return;
|
|
3489
3511
|
}
|
|
3490
|
-
await $e(), _ ||
|
|
3512
|
+
await $e(), _ || A(), _ == null || _.update();
|
|
3491
3513
|
}), ve(z, () => {
|
|
3492
3514
|
p.value >= z.value.length && (p.value = R());
|
|
3493
3515
|
}), Ve(() => {
|
|
3494
3516
|
document.addEventListener("click", K);
|
|
3495
3517
|
}), we(() => {
|
|
3496
3518
|
document.removeEventListener("click", K), _ == null || _.destroy(), _ = null;
|
|
3497
|
-
}), (V,
|
|
3519
|
+
}), (V, Y) => (c(), b("div", {
|
|
3498
3520
|
ref_key: "root",
|
|
3499
3521
|
ref: i,
|
|
3500
3522
|
class: ee(w.value)
|
|
@@ -3510,7 +3532,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3510
3532
|
"aria-haspopup": "listbox",
|
|
3511
3533
|
onClick: F,
|
|
3512
3534
|
onKeydown: [
|
|
3513
|
-
pe(ie(
|
|
3535
|
+
pe(ie(H, ["prevent"]), ["down"]),
|
|
3514
3536
|
pe(ie(Z, ["prevent"]), ["up"]),
|
|
3515
3537
|
pe(ie(x, ["prevent"]), ["enter"]),
|
|
3516
3538
|
pe(ie(S, ["prevent"]), ["esc"])
|
|
@@ -3521,7 +3543,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3521
3543
|
B("span", {
|
|
3522
3544
|
class: ee(["vf-multiselect__label", { "vf-multiselect__label_placeholder": y.value.length === 0 }])
|
|
3523
3545
|
}, j(g.value), 3),
|
|
3524
|
-
|
|
3546
|
+
Y[0] || (Y[0] = B("span", {
|
|
3525
3547
|
class: "vf-multiselect__chevron",
|
|
3526
3548
|
"aria-hidden": "true"
|
|
3527
3549
|
}, "▾", -1))
|
|
@@ -3553,7 +3575,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3553
3575
|
placeholder: V.searchPlaceholder,
|
|
3554
3576
|
onInput: W,
|
|
3555
3577
|
onKeydown: [
|
|
3556
|
-
pe(ie(
|
|
3578
|
+
pe(ie(H, ["prevent"]), ["down"]),
|
|
3557
3579
|
pe(ie(Z, ["prevent"]), ["up"]),
|
|
3558
3580
|
pe(ie(x, ["prevent"]), ["enter"]),
|
|
3559
3581
|
pe(ie(S, ["prevent"]), ["esc"])
|
|
@@ -3653,7 +3675,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3653
3675
|
return;
|
|
3654
3676
|
const oe = _.value.filter((le, ge) => ge !== te);
|
|
3655
3677
|
O(oe), e("remove", N);
|
|
3656
|
-
},
|
|
3678
|
+
}, H = () => {
|
|
3657
3679
|
t.readonly || _.value.length !== 0 && (O([]), e("remove", [..._.value]));
|
|
3658
3680
|
}, Z = (te) => {
|
|
3659
3681
|
const N = z.value;
|
|
@@ -3685,11 +3707,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3685
3707
|
}, K = (te) => {
|
|
3686
3708
|
const N = te.target;
|
|
3687
3709
|
r.value = N.value, e("search", N.value), x(), v.value = R();
|
|
3688
|
-
},
|
|
3710
|
+
}, A = (te) => {
|
|
3689
3711
|
e("focus", te), x();
|
|
3690
3712
|
}, V = (te) => {
|
|
3691
3713
|
e("blur", te);
|
|
3692
|
-
},
|
|
3714
|
+
}, Y = () => {
|
|
3693
3715
|
if (!u.value) {
|
|
3694
3716
|
x();
|
|
3695
3717
|
return;
|
|
@@ -3803,10 +3825,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3803
3825
|
"aria-controls": $,
|
|
3804
3826
|
"aria-activedescendant": g.value,
|
|
3805
3827
|
onInput: K,
|
|
3806
|
-
onFocus:
|
|
3828
|
+
onFocus: A,
|
|
3807
3829
|
onBlur: V,
|
|
3808
3830
|
onKeydown: [
|
|
3809
|
-
pe(ie(
|
|
3831
|
+
pe(ie(Y, ["prevent"]), ["down"]),
|
|
3810
3832
|
pe(ie(ae, ["prevent"]), ["up"]),
|
|
3811
3833
|
pe(ie(se, ["prevent"]), ["enter"]),
|
|
3812
3834
|
pe(ie(W, ["prevent"]), ["esc"]),
|
|
@@ -3821,7 +3843,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3821
3843
|
class: "vf-tag-input__clear",
|
|
3822
3844
|
type: "button",
|
|
3823
3845
|
"aria-label": "Clear tags",
|
|
3824
|
-
onClick: ie(
|
|
3846
|
+
onClick: ie(H, ["stop"])
|
|
3825
3847
|
}, " ✕ ")) : Q("", !0),
|
|
3826
3848
|
B("button", {
|
|
3827
3849
|
class: "vf-tag-input__chevron",
|
|
@@ -3885,9 +3907,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3885
3907
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3886
3908
|
setup(n, { emit: o }) {
|
|
3887
3909
|
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(
|
|
3910
|
+
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
3911
|
let $ = null;
|
|
3890
|
-
const l = f(() =>
|
|
3912
|
+
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
3913
|
year: "numeric",
|
|
3892
3914
|
month: "short",
|
|
3893
3915
|
day: "numeric"
|
|
@@ -3895,13 +3917,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3895
3917
|
year: "numeric",
|
|
3896
3918
|
month: "long"
|
|
3897
3919
|
})), C = f(() => {
|
|
3898
|
-
const V = new Intl.DateTimeFormat(t.locale, { weekday: "short" }),
|
|
3920
|
+
const V = new Intl.DateTimeFormat(t.locale, { weekday: "short" }), Y = new Date(2026, 0, 4);
|
|
3899
3921
|
return Array.from({ length: 7 }, (ae, se) => {
|
|
3900
|
-
const U = (se + t.firstDayOfWeek) % 7, X = new Date(
|
|
3901
|
-
return X.setDate(
|
|
3922
|
+
const U = (se + t.firstDayOfWeek) % 7, X = new Date(Y);
|
|
3923
|
+
return X.setDate(Y.getDate() + U), V.format(X);
|
|
3902
3924
|
});
|
|
3903
3925
|
}), g = f(() => {
|
|
3904
|
-
const V = P(m.value, t.firstDayOfWeek),
|
|
3926
|
+
const V = P(m.value, t.firstDayOfWeek), Y = l.value ? K(l.value) : null, ae = K(/* @__PURE__ */ new Date());
|
|
3905
3927
|
return Array.from({ length: 42 }, (se, U) => {
|
|
3906
3928
|
const X = h(V, U), re = K(X);
|
|
3907
3929
|
return {
|
|
@@ -3910,8 +3932,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3910
3932
|
date: X,
|
|
3911
3933
|
day: X.getDate(),
|
|
3912
3934
|
inCurrentMonth: X.getMonth() === m.value.getMonth(),
|
|
3913
|
-
isDisabled:
|
|
3914
|
-
isSelected:
|
|
3935
|
+
isDisabled: A(X, _.value, k.value),
|
|
3936
|
+
isSelected: Y === re,
|
|
3915
3937
|
isToday: re === ae
|
|
3916
3938
|
};
|
|
3917
3939
|
});
|
|
@@ -3933,30 +3955,30 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3933
3955
|
}, D = () => {
|
|
3934
3956
|
m.value = W(m.value, 1);
|
|
3935
3957
|
}, M = (V) => {
|
|
3936
|
-
if (t.readonly ||
|
|
3958
|
+
if (t.readonly || A(V, _.value, k.value))
|
|
3937
3959
|
return;
|
|
3938
|
-
const
|
|
3939
|
-
e("update:modelValue",
|
|
3960
|
+
const Y = K(V);
|
|
3961
|
+
e("update:modelValue", Y), e("change", Y), O();
|
|
3940
3962
|
}, S = (V) => {
|
|
3941
3963
|
var ae;
|
|
3942
3964
|
if (!r.value || !i.value)
|
|
3943
3965
|
return;
|
|
3944
|
-
const
|
|
3945
|
-
i.value.contains(
|
|
3966
|
+
const Y = V.target;
|
|
3967
|
+
i.value.contains(Y) || (ae = d.value) != null && ae.contains(Y) || O();
|
|
3946
3968
|
}, F = () => {
|
|
3947
3969
|
if (!s.value || !d.value)
|
|
3948
3970
|
return;
|
|
3949
|
-
const V = s.value,
|
|
3971
|
+
const V = s.value, Y = d.value, ae = async () => {
|
|
3950
3972
|
const {
|
|
3951
3973
|
x: re,
|
|
3952
3974
|
y: de,
|
|
3953
3975
|
placement: ye
|
|
3954
|
-
} = await Me(V,
|
|
3976
|
+
} = await Me(V, Y, {
|
|
3955
3977
|
placement: u.value,
|
|
3956
3978
|
strategy: "fixed",
|
|
3957
3979
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
3958
3980
|
});
|
|
3959
|
-
v.value = ye ?? u.value,
|
|
3981
|
+
v.value = ye ?? u.value, Y.style.left = `${re}px`, Y.style.top = `${de}px`;
|
|
3960
3982
|
}, se = async () => {
|
|
3961
3983
|
await ae();
|
|
3962
3984
|
}, U = De(V, () => {
|
|
@@ -3974,8 +3996,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3974
3996
|
ve(
|
|
3975
3997
|
() => t.modelValue,
|
|
3976
3998
|
(V) => {
|
|
3977
|
-
const
|
|
3978
|
-
|
|
3999
|
+
const Y = H(V);
|
|
4000
|
+
Y && (m.value = x(Y));
|
|
3979
4001
|
},
|
|
3980
4002
|
{ immediate: !0 }
|
|
3981
4003
|
), ve(
|
|
@@ -3994,13 +4016,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3994
4016
|
}), we(() => {
|
|
3995
4017
|
document.removeEventListener("click", S), $ == null || $.destroy(), $ = null;
|
|
3996
4018
|
});
|
|
3997
|
-
function
|
|
4019
|
+
function H(V) {
|
|
3998
4020
|
if (!V)
|
|
3999
4021
|
return null;
|
|
4000
|
-
const
|
|
4001
|
-
if (!
|
|
4022
|
+
const Y = V.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
4023
|
+
if (!Y)
|
|
4002
4024
|
return null;
|
|
4003
|
-
const ae = Number(
|
|
4025
|
+
const ae = Number(Y[1]), se = Number(Y[2]) - 1, U = Number(Y[3]), X = new Date(ae, se, U);
|
|
4004
4026
|
return X.getFullYear() !== ae || X.getMonth() !== se || X.getDate() !== U ? null : Z(X);
|
|
4005
4027
|
}
|
|
4006
4028
|
function Z(V) {
|
|
@@ -4009,25 +4031,25 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4009
4031
|
function x(V) {
|
|
4010
4032
|
return new Date(V.getFullYear(), V.getMonth(), 1);
|
|
4011
4033
|
}
|
|
4012
|
-
function W(V,
|
|
4013
|
-
return new Date(V.getFullYear(), V.getMonth() +
|
|
4034
|
+
function W(V, Y) {
|
|
4035
|
+
return new Date(V.getFullYear(), V.getMonth() + Y, 1);
|
|
4014
4036
|
}
|
|
4015
|
-
function h(V,
|
|
4016
|
-
return new Date(V.getFullYear(), V.getMonth(), V.getDate() +
|
|
4037
|
+
function h(V, Y) {
|
|
4038
|
+
return new Date(V.getFullYear(), V.getMonth(), V.getDate() + Y);
|
|
4017
4039
|
}
|
|
4018
|
-
function P(V,
|
|
4019
|
-
const ae = x(V), U = (ae.getDay() -
|
|
4040
|
+
function P(V, Y) {
|
|
4041
|
+
const ae = x(V), U = (ae.getDay() - Y + 7) % 7;
|
|
4020
4042
|
return h(ae, -U);
|
|
4021
4043
|
}
|
|
4022
4044
|
function K(V) {
|
|
4023
|
-
const
|
|
4024
|
-
return `${
|
|
4045
|
+
const Y = V.getFullYear(), ae = `${V.getMonth() + 1}`.padStart(2, "0"), se = `${V.getDate()}`.padStart(2, "0");
|
|
4046
|
+
return `${Y}-${ae}-${se}`;
|
|
4025
4047
|
}
|
|
4026
|
-
function
|
|
4048
|
+
function A(V, Y, ae) {
|
|
4027
4049
|
const se = Z(V).getTime();
|
|
4028
|
-
return !!(
|
|
4050
|
+
return !!(Y && se < Y.getTime() || ae && se > ae.getTime());
|
|
4029
4051
|
}
|
|
4030
|
-
return (V,
|
|
4052
|
+
return (V, Y) => (c(), b("div", {
|
|
4031
4053
|
ref_key: "root",
|
|
4032
4054
|
ref: i,
|
|
4033
4055
|
class: ee(w.value)
|
|
@@ -4053,7 +4075,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4053
4075
|
B("span", {
|
|
4054
4076
|
class: ee(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !l.value }])
|
|
4055
4077
|
}, j(y.value || V.placeholder), 3),
|
|
4056
|
-
|
|
4078
|
+
Y[0] || (Y[0] = B("span", {
|
|
4057
4079
|
class: "vf-datepicker__chevron",
|
|
4058
4080
|
"aria-hidden": "true"
|
|
4059
4081
|
}, "▾", -1))
|
|
@@ -4135,7 +4157,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4135
4157
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4136
4158
|
setup(n, { emit: o }) {
|
|
4137
4159
|
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(
|
|
4160
|
+
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
4161
|
let $ = null;
|
|
4140
4162
|
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
4163
|
if (C.value)
|
|
@@ -4158,7 +4180,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4158
4180
|
}), R = f(() => {
|
|
4159
4181
|
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
4182
|
return Array.from({ length: 42 }, (oe, le) => {
|
|
4161
|
-
const ge =
|
|
4183
|
+
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
4184
|
return {
|
|
4163
4185
|
key: `${J}-${le}`,
|
|
4164
4186
|
iso: J,
|
|
@@ -4194,7 +4216,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4194
4216
|
m.value = V(m.value, -1);
|
|
4195
4217
|
}, F = () => {
|
|
4196
4218
|
m.value = V(m.value, 1);
|
|
4197
|
-
},
|
|
4219
|
+
}, H = (X, re) => {
|
|
4198
4220
|
const de = X ? se(X) : null, ye = re ? se(re) : null;
|
|
4199
4221
|
e("update:modelValue", [de, ye]), e("change", [de, ye]);
|
|
4200
4222
|
}, Z = (X) => {
|
|
@@ -4202,11 +4224,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4202
4224
|
return;
|
|
4203
4225
|
const re = y.value, de = z.value;
|
|
4204
4226
|
if (!re || re && de) {
|
|
4205
|
-
|
|
4227
|
+
H(X, null);
|
|
4206
4228
|
return;
|
|
4207
4229
|
}
|
|
4208
4230
|
const ye = K(re).getTime();
|
|
4209
|
-
K(X).getTime() < ye ?
|
|
4231
|
+
K(X).getTime() < ye ? H(X, re) : H(re, X), D();
|
|
4210
4232
|
}, x = (X) => {
|
|
4211
4233
|
var de;
|
|
4212
4234
|
if (!r.value || !i.value)
|
|
@@ -4245,7 +4267,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4245
4267
|
() => t.modelValue,
|
|
4246
4268
|
(X) => {
|
|
4247
4269
|
const [re, de] = h(X), ye = re ?? de ?? /* @__PURE__ */ new Date();
|
|
4248
|
-
m.value =
|
|
4270
|
+
m.value = A(ye);
|
|
4249
4271
|
},
|
|
4250
4272
|
{ immediate: !0 }
|
|
4251
4273
|
), ve(
|
|
@@ -4282,18 +4304,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4282
4304
|
function K(X) {
|
|
4283
4305
|
return new Date(X.getFullYear(), X.getMonth(), X.getDate());
|
|
4284
4306
|
}
|
|
4285
|
-
function
|
|
4307
|
+
function A(X) {
|
|
4286
4308
|
return new Date(X.getFullYear(), X.getMonth(), 1);
|
|
4287
4309
|
}
|
|
4288
4310
|
function V(X, re) {
|
|
4289
4311
|
return new Date(X.getFullYear(), X.getMonth() + re, 1);
|
|
4290
4312
|
}
|
|
4291
|
-
function
|
|
4313
|
+
function Y(X, re) {
|
|
4292
4314
|
return new Date(X.getFullYear(), X.getMonth(), X.getDate() + re);
|
|
4293
4315
|
}
|
|
4294
4316
|
function ae(X, re) {
|
|
4295
|
-
const de =
|
|
4296
|
-
return
|
|
4317
|
+
const de = A(X), te = (de.getDay() - re + 7) % 7;
|
|
4318
|
+
return Y(de, -te);
|
|
4297
4319
|
}
|
|
4298
4320
|
function se(X) {
|
|
4299
4321
|
const re = X.getFullYear(), de = `${X.getMonth() + 1}`.padStart(2, "0"), ye = `${X.getDate()}`.padStart(2, "0");
|
|
@@ -4407,14 +4429,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4407
4429
|
let a = 0;
|
|
4408
4430
|
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
4431
|
let m = null;
|
|
4410
|
-
const $ = f(() => S(t.min)), l = f(() => S(t.max)), _ = f(() => S(t.modelValue)), k = f(() => _.value === null ? "" :
|
|
4432
|
+
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
4433
|
const x = [], W = y.value, h = $.value, P = l.value;
|
|
4412
4434
|
for (let K = 0; K < 1440; K += W) {
|
|
4413
|
-
const
|
|
4435
|
+
const A = F(K);
|
|
4414
4436
|
x.push({
|
|
4415
|
-
value:
|
|
4437
|
+
value: A,
|
|
4416
4438
|
minutes: K,
|
|
4417
|
-
label:
|
|
4439
|
+
label: H(K, t.format),
|
|
4418
4440
|
isSelected: _.value === K,
|
|
4419
4441
|
isDisabled: Z(K, h, P)
|
|
4420
4442
|
});
|
|
@@ -4453,7 +4475,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4453
4475
|
const x = s.value, W = d.value, h = async () => {
|
|
4454
4476
|
const {
|
|
4455
4477
|
x: V,
|
|
4456
|
-
y:
|
|
4478
|
+
y: Y,
|
|
4457
4479
|
placement: ae
|
|
4458
4480
|
} = await Me(x, W, {
|
|
4459
4481
|
placement: u.value,
|
|
@@ -4462,18 +4484,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4462
4484
|
});
|
|
4463
4485
|
v.value = ae ?? u.value;
|
|
4464
4486
|
const se = x.getBoundingClientRect().width;
|
|
4465
|
-
W.style.minWidth = `${se}px`, W.style.width = `${se}px`, W.style.left = `${V}px`, W.style.top = `${
|
|
4487
|
+
W.style.minWidth = `${se}px`, W.style.width = `${se}px`, W.style.left = `${V}px`, W.style.top = `${Y}px`;
|
|
4466
4488
|
}, P = async () => {
|
|
4467
4489
|
await h();
|
|
4468
4490
|
}, K = De(x, () => {
|
|
4469
4491
|
P();
|
|
4470
|
-
}),
|
|
4492
|
+
}), A = () => {
|
|
4471
4493
|
P();
|
|
4472
4494
|
};
|
|
4473
|
-
document.addEventListener("scroll",
|
|
4495
|
+
document.addEventListener("scroll", A, !0), window.addEventListener("resize", A, !1), m = {
|
|
4474
4496
|
update: P,
|
|
4475
4497
|
destroy: () => {
|
|
4476
|
-
K(), document.removeEventListener("scroll",
|
|
4498
|
+
K(), document.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A, !1);
|
|
4477
4499
|
}
|
|
4478
4500
|
}, m.update();
|
|
4479
4501
|
}, M = () => {
|
|
@@ -4511,7 +4533,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4511
4533
|
const W = Math.floor(x / 60), h = x % 60;
|
|
4512
4534
|
return `${String(W).padStart(2, "0")}:${String(h).padStart(2, "0")}`;
|
|
4513
4535
|
}
|
|
4514
|
-
function
|
|
4536
|
+
function H(x, W) {
|
|
4515
4537
|
if (W === "12h") {
|
|
4516
4538
|
const h = Math.floor(x / 60), P = x % 60, K = h >= 12 ? "PM" : "AM";
|
|
4517
4539
|
return `${h % 12 || 12}:${String(P).padStart(2, "0")} ${K}`;
|
|
@@ -4679,11 +4701,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4679
4701
|
l.value = ue ? ue.minutes : null;
|
|
4680
4702
|
}, F = () => {
|
|
4681
4703
|
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
|
-
},
|
|
4704
|
+
}, H = () => {
|
|
4683
4705
|
r.value = !1, u.value = "bottom", v.value = "bottom";
|
|
4684
4706
|
}, Z = () => {
|
|
4685
4707
|
if (r.value) {
|
|
4686
|
-
|
|
4708
|
+
H();
|
|
4687
4709
|
return;
|
|
4688
4710
|
}
|
|
4689
4711
|
F();
|
|
@@ -4694,14 +4716,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4694
4716
|
}, h = (J) => {
|
|
4695
4717
|
t.readonly || le(J, z.value, C.value) || ($.value = se(J), S($.value), D());
|
|
4696
4718
|
}, P = (J) => {
|
|
4697
|
-
t.readonly || !$.value || ge($.value, J, z.value, C.value) || (l.value = J, D(),
|
|
4719
|
+
t.readonly || !$.value || ge($.value, J, z.value, C.value) || (l.value = J, D(), H());
|
|
4698
4720
|
}, K = (J) => {
|
|
4699
4721
|
var ce;
|
|
4700
4722
|
if (!r.value || !i.value)
|
|
4701
4723
|
return;
|
|
4702
4724
|
const ue = J.target;
|
|
4703
|
-
i.value.contains(ue) || (ce = d.value) != null && ce.contains(ue) ||
|
|
4704
|
-
},
|
|
4725
|
+
i.value.contains(ue) || (ce = d.value) != null && ce.contains(ue) || H();
|
|
4726
|
+
}, A = () => {
|
|
4705
4727
|
if (!s.value || !d.value)
|
|
4706
4728
|
return;
|
|
4707
4729
|
const J = s.value, ue = d.value, ce = async () => {
|
|
@@ -4748,7 +4770,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4748
4770
|
_ && (_.destroy(), _ = null);
|
|
4749
4771
|
return;
|
|
4750
4772
|
}
|
|
4751
|
-
await $e(), _ ||
|
|
4773
|
+
await $e(), _ || A(), _ == null || _.update();
|
|
4752
4774
|
}), Ve(() => {
|
|
4753
4775
|
document.addEventListener("click", K);
|
|
4754
4776
|
}), we(() => {
|
|
@@ -4763,7 +4785,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4763
4785
|
const ce = Number(ue[1]), _e = Number(ue[2]) - 1, Be = Number(ue[3]), xe = new Date(ce, _e, Be);
|
|
4764
4786
|
return xe.getFullYear() !== ce || xe.getMonth() !== _e || xe.getDate() !== Be ? null : se(xe);
|
|
4765
4787
|
}
|
|
4766
|
-
function
|
|
4788
|
+
function Y(J) {
|
|
4767
4789
|
if (!J)
|
|
4768
4790
|
return null;
|
|
4769
4791
|
const ue = J.match(/^(\d{2}):(\d{2})$/);
|
|
@@ -4778,7 +4800,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4778
4800
|
const ue = J.match(/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})$/);
|
|
4779
4801
|
if (!ue)
|
|
4780
4802
|
return null;
|
|
4781
|
-
const ce = V(ue[1]), _e =
|
|
4803
|
+
const ce = V(ue[1]), _e = Y(ue[2]);
|
|
4782
4804
|
return !ce || _e === null ? null : { date: ce, minutes: _e };
|
|
4783
4805
|
}
|
|
4784
4806
|
function se(J) {
|
|
@@ -4843,7 +4865,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4843
4865
|
onKeydown: [
|
|
4844
4866
|
pe(ie(F, ["prevent"]), ["down"]),
|
|
4845
4867
|
pe(ie(Z, ["prevent"]), ["enter"]),
|
|
4846
|
-
pe(ie(
|
|
4868
|
+
pe(ie(H, ["prevent"]), ["esc"])
|
|
4847
4869
|
],
|
|
4848
4870
|
onFocus: E,
|
|
4849
4871
|
onBlur: T
|
|
@@ -4864,7 +4886,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4864
4886
|
class: "vf-datetimepicker__panel",
|
|
4865
4887
|
role: "dialog",
|
|
4866
4888
|
"data-placement": v.value,
|
|
4867
|
-
onKeydown: pe(ie(
|
|
4889
|
+
onKeydown: pe(ie(H, ["prevent"]), ["esc"])
|
|
4868
4890
|
}, [
|
|
4869
4891
|
B("div", Mr, [
|
|
4870
4892
|
B("div", Rr, [
|
|
@@ -5185,7 +5207,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5185
5207
|
}, null, 40, Jr),
|
|
5186
5208
|
d[0] || (d[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
5187
5209
|
s.label || s.$slots.default ? (c(), b("span", el, [
|
|
5188
|
-
|
|
5210
|
+
q(s.$slots, "default", {}, () => [
|
|
5189
5211
|
me(j(s.label), 1)
|
|
5190
5212
|
])
|
|
5191
5213
|
])) : Q("", !0)
|
|
@@ -5223,7 +5245,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5223
5245
|
"aria-label": d.ariaLabel || void 0,
|
|
5224
5246
|
"aria-labelledby": d.ariaLabelledby || void 0
|
|
5225
5247
|
}, [
|
|
5226
|
-
|
|
5248
|
+
q(d.$slots, "default")
|
|
5227
5249
|
], 10, tl));
|
|
5228
5250
|
}
|
|
5229
5251
|
}), al = ["name", "value", "checked", "disabled"], ol = {
|
|
@@ -5261,7 +5283,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5261
5283
|
}, null, 40, al),
|
|
5262
5284
|
$[0] || ($[0] = B("span", { class: "vf-radio__circle" }, null, -1)),
|
|
5263
5285
|
m.label || m.$slots.default ? (c(), b("span", ol, [
|
|
5264
|
-
|
|
5286
|
+
q(m.$slots, "default", {}, () => [
|
|
5265
5287
|
me(j(m.label), 1)
|
|
5266
5288
|
])
|
|
5267
5289
|
])) : Q("", !0)
|
|
@@ -5381,10 +5403,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5381
5403
|
"aria-labelledby": l.ariaLabelledby || void 0,
|
|
5382
5404
|
onKeydown: p
|
|
5383
5405
|
}, [
|
|
5384
|
-
|
|
5406
|
+
q(l.$slots, "tabs")
|
|
5385
5407
|
], 40, nl),
|
|
5386
5408
|
B("div", sl, [
|
|
5387
|
-
|
|
5409
|
+
q(l.$slots, "panels")
|
|
5388
5410
|
])
|
|
5389
5411
|
], 2));
|
|
5390
5412
|
}
|
|
@@ -5411,7 +5433,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5411
5433
|
tabindex: u.value,
|
|
5412
5434
|
onClick: v
|
|
5413
5435
|
}, [
|
|
5414
|
-
|
|
5436
|
+
q(p.$slots, "default", {}, () => [
|
|
5415
5437
|
me(j(p.label), 1)
|
|
5416
5438
|
])
|
|
5417
5439
|
], 10, il));
|
|
@@ -5430,7 +5452,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5430
5452
|
tabindex: "0",
|
|
5431
5453
|
"aria-labelledby": t.value
|
|
5432
5454
|
}, [
|
|
5433
|
-
|
|
5455
|
+
q(s.$slots, "default")
|
|
5434
5456
|
], 8, dl)), [
|
|
5435
5457
|
[Se, e.value]
|
|
5436
5458
|
]);
|
|
@@ -5477,7 +5499,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5477
5499
|
"aria-label": p.ariaLabel || void 0,
|
|
5478
5500
|
"aria-labelledby": p.ariaLabelledby || void 0
|
|
5479
5501
|
}, [
|
|
5480
|
-
|
|
5502
|
+
q(p.$slots, "default")
|
|
5481
5503
|
], 10, ul));
|
|
5482
5504
|
}
|
|
5483
5505
|
}), 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 +5535,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5513
5535
|
onClick: u
|
|
5514
5536
|
}, [
|
|
5515
5537
|
B("span", vl, [
|
|
5516
|
-
|
|
5538
|
+
q(v.$slots, "title", {}, () => [
|
|
5517
5539
|
me(j(v.title), 1)
|
|
5518
5540
|
])
|
|
5519
5541
|
]),
|
|
@@ -5531,7 +5553,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5531
5553
|
"aria-hidden": e.value ? void 0 : "true"
|
|
5532
5554
|
}, [
|
|
5533
5555
|
B("div", pl, [
|
|
5534
|
-
|
|
5556
|
+
q(v.$slots, "default")
|
|
5535
5557
|
])
|
|
5536
5558
|
], 10, fl)) : Q("", !0)
|
|
5537
5559
|
], 2));
|
|
@@ -5582,7 +5604,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5582
5604
|
B("div", gl, [
|
|
5583
5605
|
r.title ? (c(), b("div", bl, j(r.title), 1)) : Q("", !0),
|
|
5584
5606
|
r.message || r.$slots.default ? (c(), b("div", hl, [
|
|
5585
|
-
|
|
5607
|
+
q(r.$slots, "default", {}, () => [
|
|
5586
5608
|
me(j(r.message), 1)
|
|
5587
5609
|
])
|
|
5588
5610
|
])) : Q("", !0)
|
|
@@ -5593,7 +5615,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5593
5615
|
type: "button",
|
|
5594
5616
|
onClick: d
|
|
5595
5617
|
}, [
|
|
5596
|
-
|
|
5618
|
+
q(r.$slots, "close", {}, () => [
|
|
5597
5619
|
u[0] || (u[0] = me("×"))
|
|
5598
5620
|
])
|
|
5599
5621
|
])) : Q("", !0)
|
|
@@ -5614,7 +5636,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5614
5636
|
role: "region",
|
|
5615
5637
|
"aria-live": "polite"
|
|
5616
5638
|
}, [
|
|
5617
|
-
|
|
5639
|
+
q(e.$slots, "default")
|
|
5618
5640
|
], 2)
|
|
5619
5641
|
]));
|
|
5620
5642
|
}
|
|
@@ -5660,24 +5682,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5660
5682
|
"data-severity": r.severity
|
|
5661
5683
|
}, [
|
|
5662
5684
|
r.$slots.icon || r.icon ? (c(), b("div", _l, [
|
|
5663
|
-
|
|
5685
|
+
q(r.$slots, "icon", {}, () => [
|
|
5664
5686
|
me(j(r.icon), 1)
|
|
5665
5687
|
])
|
|
5666
5688
|
])) : Q("", !0),
|
|
5667
5689
|
B("div", kl, [
|
|
5668
5690
|
r.title || r.$slots.title ? (c(), b("div", Cl, [
|
|
5669
|
-
|
|
5691
|
+
q(r.$slots, "title", {}, () => [
|
|
5670
5692
|
me(j(r.title), 1)
|
|
5671
5693
|
])
|
|
5672
5694
|
])) : Q("", !0),
|
|
5673
5695
|
r.message || r.$slots.default ? (c(), b("div", wl, [
|
|
5674
|
-
|
|
5696
|
+
q(r.$slots, "default", {}, () => [
|
|
5675
5697
|
me(j(r.message), 1)
|
|
5676
5698
|
])
|
|
5677
5699
|
])) : Q("", !0)
|
|
5678
5700
|
]),
|
|
5679
5701
|
r.$slots.actions ? (c(), b("div", $l, [
|
|
5680
|
-
|
|
5702
|
+
q(r.$slots, "actions")
|
|
5681
5703
|
])) : Q("", !0),
|
|
5682
5704
|
r.closable ? (c(), b("button", {
|
|
5683
5705
|
key: 2,
|
|
@@ -5686,7 +5708,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5686
5708
|
"aria-label": "Close",
|
|
5687
5709
|
onClick: d
|
|
5688
5710
|
}, [
|
|
5689
|
-
|
|
5711
|
+
q(r.$slots, "close", {}, () => [
|
|
5690
5712
|
u[0] || (u[0] = me("×"))
|
|
5691
5713
|
])
|
|
5692
5714
|
])) : Q("", !0)
|
|
@@ -5727,24 +5749,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5727
5749
|
"aria-live": "polite"
|
|
5728
5750
|
}, [
|
|
5729
5751
|
e.$slots.icon || e.icon ? (c(), b("div", zl, [
|
|
5730
|
-
|
|
5752
|
+
q(e.$slots, "icon", {}, () => [
|
|
5731
5753
|
me(j(e.icon), 1)
|
|
5732
5754
|
])
|
|
5733
5755
|
])) : Q("", !0),
|
|
5734
5756
|
B("div", Sl, [
|
|
5735
5757
|
e.title || e.$slots.title ? (c(), b("div", Bl, [
|
|
5736
|
-
|
|
5758
|
+
q(e.$slots, "title", {}, () => [
|
|
5737
5759
|
me(j(e.title), 1)
|
|
5738
5760
|
])
|
|
5739
5761
|
])) : Q("", !0),
|
|
5740
5762
|
e.description || e.$slots.default ? (c(), b("div", xl, [
|
|
5741
|
-
|
|
5763
|
+
q(e.$slots, "default", {}, () => [
|
|
5742
5764
|
me(j(e.description), 1)
|
|
5743
5765
|
])
|
|
5744
5766
|
])) : Q("", !0)
|
|
5745
5767
|
]),
|
|
5746
5768
|
e.$slots.actions ? (c(), b("div", Ll, [
|
|
5747
|
-
|
|
5769
|
+
q(e.$slots, "actions")
|
|
5748
5770
|
])) : Q("", !0)
|
|
5749
5771
|
], 2));
|
|
5750
5772
|
}
|
|
@@ -5781,7 +5803,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5781
5803
|
B("span", { class: "vf-switch__thumb" })
|
|
5782
5804
|
], -1)),
|
|
5783
5805
|
s.label || s.$slots.default ? (c(), b("span", Fl, [
|
|
5784
|
-
|
|
5806
|
+
q(s.$slots, "default", {}, () => [
|
|
5785
5807
|
me(j(s.label), 1)
|
|
5786
5808
|
])
|
|
5787
5809
|
])) : Q("", !0)
|
|
@@ -5810,7 +5832,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5810
5832
|
pe(ie(v, ["prevent"]), ["space"])
|
|
5811
5833
|
]
|
|
5812
5834
|
}, [
|
|
5813
|
-
|
|
5835
|
+
q(p.$slots, "button")
|
|
5814
5836
|
], 40, Il),
|
|
5815
5837
|
ze(Ge(Ut, {
|
|
5816
5838
|
id: s,
|
|
@@ -5824,31 +5846,31 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5824
5846
|
p.$slots.default ? {
|
|
5825
5847
|
name: "default",
|
|
5826
5848
|
fn: Ce(() => [
|
|
5827
|
-
|
|
5849
|
+
q(p.$slots, "default")
|
|
5828
5850
|
]),
|
|
5829
5851
|
key: "0"
|
|
5830
5852
|
} : void 0,
|
|
5831
5853
|
p.$slots.header || p.$slots.popoverHeader ? {
|
|
5832
5854
|
name: "header",
|
|
5833
5855
|
fn: Ce(() => [
|
|
5834
|
-
|
|
5835
|
-
p.$slots.header ? Q("", !0) :
|
|
5856
|
+
q(p.$slots, "header"),
|
|
5857
|
+
p.$slots.header ? Q("", !0) : q(p.$slots, "popoverHeader", { key: 0 })
|
|
5836
5858
|
]),
|
|
5837
5859
|
key: "1"
|
|
5838
5860
|
} : void 0,
|
|
5839
5861
|
p.$slots.body || p.$slots.popoverBody ? {
|
|
5840
5862
|
name: "body",
|
|
5841
5863
|
fn: Ce(() => [
|
|
5842
|
-
|
|
5843
|
-
p.$slots.body ? Q("", !0) :
|
|
5864
|
+
q(p.$slots, "body"),
|
|
5865
|
+
p.$slots.body ? Q("", !0) : q(p.$slots, "popoverBody", { key: 0 })
|
|
5844
5866
|
]),
|
|
5845
5867
|
key: "2"
|
|
5846
5868
|
} : void 0,
|
|
5847
5869
|
p.$slots.footer || p.$slots.popoverFooter ? {
|
|
5848
5870
|
name: "footer",
|
|
5849
5871
|
fn: Ce(() => [
|
|
5850
|
-
|
|
5851
|
-
p.$slots.footer ? Q("", !0) :
|
|
5872
|
+
q(p.$slots, "footer"),
|
|
5873
|
+
p.$slots.footer ? Q("", !0) : q(p.$slots, "popoverFooter", { key: 0 })
|
|
5852
5874
|
]),
|
|
5853
5875
|
key: "3"
|
|
5854
5876
|
} : void 0
|
|
@@ -5948,12 +5970,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5948
5970
|
id: m,
|
|
5949
5971
|
class: "vf-modal__header-content"
|
|
5950
5972
|
}, [
|
|
5951
|
-
|
|
5973
|
+
q(E.$slots, "header", {}, () => [
|
|
5952
5974
|
E.title ? (c(), b("h3", Rl, j(E.title), 1)) : Q("", !0)
|
|
5953
5975
|
])
|
|
5954
5976
|
])
|
|
5955
5977
|
])) : Q("", !0),
|
|
5956
|
-
E.showClose ?
|
|
5978
|
+
E.showClose ? q(E.$slots, "close", {
|
|
5957
5979
|
key: 1,
|
|
5958
5980
|
close: z
|
|
5959
5981
|
}, () => [
|
|
@@ -5969,11 +5991,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5969
5991
|
id: $,
|
|
5970
5992
|
class: "vf-modal__body"
|
|
5971
5993
|
}, [
|
|
5972
|
-
|
|
5973
|
-
E.$slots.body ? Q("", !0) :
|
|
5994
|
+
q(E.$slots, "body"),
|
|
5995
|
+
E.$slots.body ? Q("", !0) : q(E.$slots, "default", { key: 0 })
|
|
5974
5996
|
])) : Q("", !0),
|
|
5975
5997
|
E.$slots.footer ? (c(), b("div", Pl, [
|
|
5976
|
-
|
|
5998
|
+
q(E.$slots, "footer")
|
|
5977
5999
|
])) : Q("", !0)
|
|
5978
6000
|
], 40, Dl)
|
|
5979
6001
|
], 16), [
|
|
@@ -6044,14 +6066,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6044
6066
|
}, {
|
|
6045
6067
|
body: Ce(() => [
|
|
6046
6068
|
B("div", Ol, [
|
|
6047
|
-
|
|
6069
|
+
q(m.$slots, "default", {}, () => [
|
|
6048
6070
|
me(j(m.message), 1)
|
|
6049
6071
|
])
|
|
6050
6072
|
])
|
|
6051
6073
|
]),
|
|
6052
6074
|
footer: Ce(() => [
|
|
6053
6075
|
B("div", Al, [
|
|
6054
|
-
|
|
6076
|
+
q(m.$slots, "actions", {
|
|
6055
6077
|
confirm: p,
|
|
6056
6078
|
cancel: v
|
|
6057
6079
|
}, () => [
|
|
@@ -6131,12 +6153,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6131
6153
|
const T = L();
|
|
6132
6154
|
T.length ? T[0].focus() : (D = u.value) == null || D.focus();
|
|
6133
6155
|
}, I = (T) => {
|
|
6134
|
-
var
|
|
6156
|
+
var H;
|
|
6135
6157
|
if (T.key !== "Tab")
|
|
6136
6158
|
return;
|
|
6137
6159
|
const D = L();
|
|
6138
6160
|
if (!D.length) {
|
|
6139
|
-
T.preventDefault(), (
|
|
6161
|
+
T.preventDefault(), (H = u.value) == null || H.focus();
|
|
6140
6162
|
return;
|
|
6141
6163
|
}
|
|
6142
6164
|
const M = D[0], S = D[D.length - 1], F = document.activeElement;
|
|
@@ -6190,12 +6212,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6190
6212
|
id: p,
|
|
6191
6213
|
class: "vf-drawer__header-content"
|
|
6192
6214
|
}, [
|
|
6193
|
-
|
|
6215
|
+
q(T.$slots, "header", {}, () => [
|
|
6194
6216
|
T.title ? (c(), b("h3", Kl, j(T.title), 1)) : Q("", !0)
|
|
6195
6217
|
])
|
|
6196
6218
|
])
|
|
6197
6219
|
])) : Q("", !0),
|
|
6198
|
-
T.showClose ?
|
|
6220
|
+
T.showClose ? q(T.$slots, "close", {
|
|
6199
6221
|
key: 1,
|
|
6200
6222
|
close: C
|
|
6201
6223
|
}, () => [
|
|
@@ -6211,11 +6233,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6211
6233
|
id: m,
|
|
6212
6234
|
class: "vf-drawer__body"
|
|
6213
6235
|
}, [
|
|
6214
|
-
|
|
6215
|
-
T.$slots.body ? Q("", !0) :
|
|
6236
|
+
q(T.$slots, "body"),
|
|
6237
|
+
T.$slots.body ? Q("", !0) : q(T.$slots, "default", { key: 0 })
|
|
6216
6238
|
])) : Q("", !0),
|
|
6217
6239
|
T.$slots.footer ? (c(), b("div", Nl, [
|
|
6218
|
-
|
|
6240
|
+
q(T.$slots, "footer")
|
|
6219
6241
|
])) : Q("", !0)
|
|
6220
6242
|
], 40, Hl)
|
|
6221
6243
|
], 6), [
|
|
@@ -6290,14 +6312,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6290
6312
|
const O = d.value, E = r.value, T = async () => {
|
|
6291
6313
|
const {
|
|
6292
6314
|
x: F,
|
|
6293
|
-
y:
|
|
6315
|
+
y: H,
|
|
6294
6316
|
placement: Z
|
|
6295
6317
|
} = await Me(O, E, {
|
|
6296
6318
|
placement: v.value,
|
|
6297
6319
|
strategy: "fixed",
|
|
6298
6320
|
middleware: [Ie(t.offset), Te({ placements: R(v.value) })]
|
|
6299
6321
|
});
|
|
6300
|
-
p.value = Z ?? v.value, t.matchTriggerWidth && (E.style.minWidth = `${O.getBoundingClientRect().width}px`), E.style.left = `${F}px`, E.style.top = `${
|
|
6322
|
+
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
6323
|
}, D = async () => {
|
|
6302
6324
|
await T();
|
|
6303
6325
|
}, M = De(O, () => {
|
|
@@ -6353,7 +6375,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6353
6375
|
pe(ie(C, ["prevent"]), ["space"])
|
|
6354
6376
|
]
|
|
6355
6377
|
}, [
|
|
6356
|
-
|
|
6378
|
+
q(O.$slots, "trigger")
|
|
6357
6379
|
], 40, Gl),
|
|
6358
6380
|
(c(), be(Le, { to: "body" }, [
|
|
6359
6381
|
ze(B("div", {
|
|
@@ -6365,7 +6387,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6365
6387
|
"data-placement": p.value,
|
|
6366
6388
|
onClick: g
|
|
6367
6389
|
}, [
|
|
6368
|
-
|
|
6390
|
+
q(O.$slots, "default", {}, () => [
|
|
6369
6391
|
t.items.length ? (c(), be(ht, {
|
|
6370
6392
|
key: 0,
|
|
6371
6393
|
items: t.items
|
|
@@ -6443,7 +6465,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6443
6465
|
onClick: m
|
|
6444
6466
|
}, {
|
|
6445
6467
|
default: Ce(() => [
|
|
6446
|
-
|
|
6468
|
+
q(l.$slots, "default")
|
|
6447
6469
|
]),
|
|
6448
6470
|
_: 3
|
|
6449
6471
|
}, 8, ["label", "icon", "type", "size", "variant", "severity", "loading", "disabled"])) : (c(), be(Ze, {
|
|
@@ -6492,7 +6514,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6492
6514
|
l.$slots.menu ? {
|
|
6493
6515
|
name: "default",
|
|
6494
6516
|
fn: Ce(() => [
|
|
6495
|
-
|
|
6517
|
+
q(l.$slots, "menu")
|
|
6496
6518
|
]),
|
|
6497
6519
|
key: "0"
|
|
6498
6520
|
} : void 0
|
|
@@ -6579,7 +6601,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6579
6601
|
onContextmenu: ie(z, ["prevent"]),
|
|
6580
6602
|
onKeydown: C
|
|
6581
6603
|
}, [
|
|
6582
|
-
|
|
6604
|
+
q(I.$slots, "default")
|
|
6583
6605
|
], 34),
|
|
6584
6606
|
(c(), be(Le, { to: "body" }, [
|
|
6585
6607
|
ze(B("div", {
|
|
@@ -6591,7 +6613,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6591
6613
|
style: ke(u.value),
|
|
6592
6614
|
onClick: g
|
|
6593
6615
|
}, [
|
|
6594
|
-
|
|
6616
|
+
q(I.$slots, "menu", {}, () => [
|
|
6595
6617
|
t.items.length ? (c(), be(ht, {
|
|
6596
6618
|
key: 0,
|
|
6597
6619
|
items: t.items
|
|
@@ -6656,10 +6678,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6656
6678
|
var S;
|
|
6657
6679
|
const M = /* @__PURE__ */ new Map();
|
|
6658
6680
|
for (const F of m.value) {
|
|
6659
|
-
const
|
|
6660
|
-
M.has(
|
|
6681
|
+
const H = F.group ?? "";
|
|
6682
|
+
M.has(H) || M.set(H, []), (S = M.get(H)) == null || S.push(F);
|
|
6661
6683
|
}
|
|
6662
|
-
return Array.from(M.entries()).map(([F,
|
|
6684
|
+
return Array.from(M.entries()).map(([F, H]) => ({ name: F, items: H }));
|
|
6663
6685
|
}), l = f(() => m.value.filter((M) => !M.disabled)), _ = async () => {
|
|
6664
6686
|
var M;
|
|
6665
6687
|
await $e(), (M = s.value) == null || M.focus();
|
|
@@ -6692,8 +6714,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6692
6714
|
u.value = -1;
|
|
6693
6715
|
return;
|
|
6694
6716
|
}
|
|
6695
|
-
const S = l.value.findIndex((Z) => Z._index === u.value),
|
|
6696
|
-
u.value = l.value[
|
|
6717
|
+
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;
|
|
6718
|
+
u.value = l.value[H]._index;
|
|
6697
6719
|
}, I = (M) => {
|
|
6698
6720
|
if (u.value < 0)
|
|
6699
6721
|
return;
|
|
@@ -6778,23 +6800,23 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6778
6800
|
"data-group": F.name
|
|
6779
6801
|
}, [
|
|
6780
6802
|
F.name ? (c(), b("div", en, j(F.name), 1)) : Q("", !0),
|
|
6781
|
-
(c(!0), b(fe, null, he(F.items, (
|
|
6782
|
-
key:
|
|
6803
|
+
(c(!0), b(fe, null, he(F.items, (H) => (c(), b("button", {
|
|
6804
|
+
key: H._key,
|
|
6783
6805
|
class: ee(["vf-command-palette__item", {
|
|
6784
|
-
"is-active":
|
|
6785
|
-
"is-disabled":
|
|
6806
|
+
"is-active": H._index === u.value,
|
|
6807
|
+
"is-disabled": H.disabled
|
|
6786
6808
|
}]),
|
|
6787
6809
|
type: "button",
|
|
6788
6810
|
role: "option",
|
|
6789
|
-
"aria-selected":
|
|
6790
|
-
disabled:
|
|
6791
|
-
onClick: (Z) => L(
|
|
6811
|
+
"aria-selected": H._index === u.value,
|
|
6812
|
+
disabled: H.disabled,
|
|
6813
|
+
onClick: (Z) => L(H, Z)
|
|
6792
6814
|
}, [
|
|
6793
6815
|
B("div", an, [
|
|
6794
|
-
B("span", on, j(
|
|
6795
|
-
|
|
6816
|
+
B("span", on, j(H.label), 1),
|
|
6817
|
+
H.shortcut ? (c(), b("span", rn, j(H.shortcut), 1)) : Q("", !0)
|
|
6796
6818
|
]),
|
|
6797
|
-
|
|
6819
|
+
H.description ? (c(), b("span", ln, j(H.description), 1)) : Q("", !0)
|
|
6798
6820
|
], 10, tn))), 128))
|
|
6799
6821
|
], 8, Jl))), 128)) : (c(), b("div", nn, j(M.emptyText), 1))
|
|
6800
6822
|
])
|
|
@@ -6945,7 +6967,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6945
6967
|
class: ee(["vf-notification-center__item", { "is-unread": !g.read }]),
|
|
6946
6968
|
"data-severity": g.severity || "neutral"
|
|
6947
6969
|
}, [
|
|
6948
|
-
|
|
6970
|
+
q(z.$slots, "item", {
|
|
6949
6971
|
item: g,
|
|
6950
6972
|
index: w,
|
|
6951
6973
|
toggleRead: () => _(g.id)
|
|
@@ -6970,7 +6992,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6970
6992
|
}, j(g.read ? z.unreadLabel : z.readLabel), 9, Bn)
|
|
6971
6993
|
], 10, _n))), 128))
|
|
6972
6994
|
])) : (c(), b("p", xn, [
|
|
6973
|
-
|
|
6995
|
+
q(z.$slots, "empty", {}, () => [
|
|
6974
6996
|
me(j(z.emptyText), 1)
|
|
6975
6997
|
])
|
|
6976
6998
|
]))
|
|
@@ -7048,7 +7070,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7048
7070
|
class: "vf-app-shell__sidebar",
|
|
7049
7071
|
"aria-hidden": d.value && !r.value ? "true" : "false"
|
|
7050
7072
|
}, [
|
|
7051
|
-
|
|
7073
|
+
q(_.$slots, "sidebar", {
|
|
7052
7074
|
mobile: d.value,
|
|
7053
7075
|
collapsed: s.value
|
|
7054
7076
|
})
|
|
@@ -7069,7 +7091,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7069
7091
|
onClick: m
|
|
7070
7092
|
}, j(_.toggleIcon), 9, Tn)) : Q("", !0),
|
|
7071
7093
|
B("div", In, [
|
|
7072
|
-
|
|
7094
|
+
q(_.$slots, "header", {
|
|
7073
7095
|
mobile: d.value,
|
|
7074
7096
|
collapsed: s.value,
|
|
7075
7097
|
mobileSidebarOpen: r.value,
|
|
@@ -7081,10 +7103,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7081
7103
|
class: "vf-app-shell__main",
|
|
7082
7104
|
"aria-label": _.mainAriaLabel
|
|
7083
7105
|
}, [
|
|
7084
|
-
|
|
7106
|
+
q(_.$slots, "default")
|
|
7085
7107
|
], 8, Dn),
|
|
7086
7108
|
i.value ? (c(), b("footer", Mn, [
|
|
7087
|
-
|
|
7109
|
+
q(_.$slots, "footer", {
|
|
7088
7110
|
mobile: d.value,
|
|
7089
7111
|
collapsed: s.value
|
|
7090
7112
|
})
|
|
@@ -7169,7 +7191,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7169
7191
|
"data-column-id": String(C.id)
|
|
7170
7192
|
}, [
|
|
7171
7193
|
B("header", On, [
|
|
7172
|
-
|
|
7194
|
+
q(y.$slots, "column-header", {
|
|
7173
7195
|
column: C,
|
|
7174
7196
|
items: u(C.id)
|
|
7175
7197
|
}, () => [
|
|
@@ -7199,7 +7221,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7199
7221
|
}, ["prevent"])),
|
|
7200
7222
|
onDrop: ie((L) => _(C.id, w, L), ["prevent", "stop"])
|
|
7201
7223
|
}, [
|
|
7202
|
-
|
|
7224
|
+
q(y.$slots, "card", {
|
|
7203
7225
|
item: g,
|
|
7204
7226
|
column: C,
|
|
7205
7227
|
index: w
|
|
@@ -7221,13 +7243,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7221
7243
|
})
|
|
7222
7244
|
], 42, Kn))), 128)),
|
|
7223
7245
|
u(C.id).length ? Q("", !0) : (c(), b("li", Xn, [
|
|
7224
|
-
|
|
7246
|
+
q(y.$slots, "empty-column", { column: C }, () => [
|
|
7225
7247
|
me(j(y.emptyColumnText), 1)
|
|
7226
7248
|
])
|
|
7227
7249
|
]))
|
|
7228
7250
|
], 40, Wn),
|
|
7229
7251
|
B("footer", Un, [
|
|
7230
|
-
|
|
7252
|
+
q(y.$slots, "column-footer", {
|
|
7231
7253
|
column: C,
|
|
7232
7254
|
items: u(C.id)
|
|
7233
7255
|
})
|
|
@@ -7310,7 +7332,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7310
7332
|
onFocus: u,
|
|
7311
7333
|
onBlur: v
|
|
7312
7334
|
}, [
|
|
7313
|
-
|
|
7335
|
+
q($.$slots, "default")
|
|
7314
7336
|
], 544),
|
|
7315
7337
|
(c(), be(Le, { to: "body" }, [
|
|
7316
7338
|
ze(B("div", {
|
|
@@ -7322,7 +7344,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7322
7344
|
"data-placement": s.value
|
|
7323
7345
|
}, [
|
|
7324
7346
|
B("span", Zn, [
|
|
7325
|
-
|
|
7347
|
+
q($.$slots, "content", {}, () => [
|
|
7326
7348
|
me(j($.text), 1)
|
|
7327
7349
|
])
|
|
7328
7350
|
]),
|
|
@@ -7400,7 +7422,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7400
7422
|
}, F = () => {
|
|
7401
7423
|
var h;
|
|
7402
7424
|
return ((h = p.value) == null ? void 0 : h.offset) ?? e.offset;
|
|
7403
|
-
},
|
|
7425
|
+
}, H = async () => {
|
|
7404
7426
|
const {
|
|
7405
7427
|
x: h,
|
|
7406
7428
|
y: P,
|
|
@@ -7412,7 +7434,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7412
7434
|
});
|
|
7413
7435
|
s.value = K ?? S(), M.style.left = `${h}px`, M.style.top = `${P}px`;
|
|
7414
7436
|
}, Z = async () => {
|
|
7415
|
-
y(), await
|
|
7437
|
+
y(), await H();
|
|
7416
7438
|
}, x = De(D, () => {
|
|
7417
7439
|
Z();
|
|
7418
7440
|
}), W = () => {
|
|
@@ -7484,30 +7506,30 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7484
7506
|
"data-placement": s.value
|
|
7485
7507
|
}, [
|
|
7486
7508
|
(S = p.value) != null && S.title || D.$slots.title ? (c(), b("div", as, [
|
|
7487
|
-
|
|
7509
|
+
q(D.$slots, "title", {
|
|
7488
7510
|
step: p.value,
|
|
7489
7511
|
index: i.value
|
|
7490
7512
|
}, () => {
|
|
7491
|
-
var
|
|
7513
|
+
var H;
|
|
7492
7514
|
return [
|
|
7493
|
-
me(j((
|
|
7515
|
+
me(j((H = p.value) == null ? void 0 : H.title), 1)
|
|
7494
7516
|
];
|
|
7495
7517
|
})
|
|
7496
7518
|
])) : Q("", !0),
|
|
7497
7519
|
(F = p.value) != null && F.content || D.$slots.default ? (c(), b("div", os, [
|
|
7498
|
-
|
|
7520
|
+
q(D.$slots, "default", {
|
|
7499
7521
|
step: p.value,
|
|
7500
7522
|
index: i.value
|
|
7501
7523
|
}, () => {
|
|
7502
|
-
var
|
|
7524
|
+
var H;
|
|
7503
7525
|
return [
|
|
7504
|
-
me(j((
|
|
7526
|
+
me(j((H = p.value) == null ? void 0 : H.content), 1)
|
|
7505
7527
|
];
|
|
7506
7528
|
})
|
|
7507
7529
|
])) : Q("", !0),
|
|
7508
7530
|
D.showProgress ? (c(), b("div", rs, j(i.value + 1) + " / " + j(v.value), 1)) : Q("", !0),
|
|
7509
7531
|
B("div", ls, [
|
|
7510
|
-
|
|
7532
|
+
q(D.$slots, "actions", {
|
|
7511
7533
|
step: p.value,
|
|
7512
7534
|
index: i.value,
|
|
7513
7535
|
isFirst: m.value,
|
|
@@ -7642,7 +7664,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7642
7664
|
]))
|
|
7643
7665
|
])),
|
|
7644
7666
|
r.value || d.value ? (c(), b("span", cs, [
|
|
7645
|
-
|
|
7667
|
+
q($.$slots, "default", {}, () => [
|
|
7646
7668
|
me(j(r.value), 1)
|
|
7647
7669
|
])
|
|
7648
7670
|
])) : Q("", !0)
|
|
@@ -7666,7 +7688,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7666
7688
|
role: "status",
|
|
7667
7689
|
"aria-label": e.ariaLabel || void 0
|
|
7668
7690
|
}, [
|
|
7669
|
-
|
|
7691
|
+
q(e.$slots, "default", {}, () => [
|
|
7670
7692
|
me(j(e.label), 1)
|
|
7671
7693
|
])
|
|
7672
7694
|
], 10, vs));
|
|
@@ -7703,12 +7725,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7703
7725
|
"aria-label": s.ariaLabel || void 0
|
|
7704
7726
|
}, [
|
|
7705
7727
|
s.$slots.icon || s.icon ? (c(), b("span", ps, [
|
|
7706
|
-
|
|
7728
|
+
q(s.$slots, "icon", {}, () => [
|
|
7707
7729
|
Ge(We(Ne), { icon: s.icon }, null, 8, ["icon"])
|
|
7708
7730
|
])
|
|
7709
7731
|
])) : Q("", !0),
|
|
7710
7732
|
B("span", ms, [
|
|
7711
|
-
|
|
7733
|
+
q(s.$slots, "default", {}, () => [
|
|
7712
7734
|
me(j(s.label), 1)
|
|
7713
7735
|
])
|
|
7714
7736
|
]),
|
|
@@ -7720,7 +7742,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7720
7742
|
"aria-label": s.closeLabel || "Remove",
|
|
7721
7743
|
onClick: i
|
|
7722
7744
|
}, [
|
|
7723
|
-
|
|
7745
|
+
q(s.$slots, "close", {}, () => [
|
|
7724
7746
|
d[0] || (d[0] = me("×"))
|
|
7725
7747
|
])
|
|
7726
7748
|
], 8, gs)) : Q("", !0)
|
|
@@ -7844,7 +7866,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7844
7866
|
"aria-label": s.value
|
|
7845
7867
|
}, [
|
|
7846
7868
|
B("div", ws, [
|
|
7847
|
-
|
|
7869
|
+
q(u.$slots, "default", {}, () => [
|
|
7848
7870
|
i.value ? (c(), b("img", {
|
|
7849
7871
|
key: 0,
|
|
7850
7872
|
class: "vf-avatar__image",
|
|
@@ -7888,7 +7910,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7888
7910
|
"aria-hidden": "true"
|
|
7889
7911
|
}, null, -1)),
|
|
7890
7912
|
t.value || e.value ? (c(), b("span", xs, [
|
|
7891
|
-
|
|
7913
|
+
q(s.$slots, "default", {}, () => [
|
|
7892
7914
|
me(j(t.value), 1)
|
|
7893
7915
|
])
|
|
7894
7916
|
])) : Q("", !0)
|
|
@@ -8051,7 +8073,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8051
8073
|
const ge = Array.isArray(v.value) ? [...v.value] : [], J = ge.indexOf(le);
|
|
8052
8074
|
J >= 0 ? ge.splice(J, 1) : ge.push(le), D(ge);
|
|
8053
8075
|
}
|
|
8054
|
-
},
|
|
8076
|
+
}, H = () => {
|
|
8055
8077
|
if (e.selectionMode !== "multiple")
|
|
8056
8078
|
return;
|
|
8057
8079
|
if (g.value) {
|
|
@@ -8071,13 +8093,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8071
8093
|
}, h = (N) => p.value !== N.field ? "↕" : m.value === "asc" ? "↑" : "↓", P = (N) => p.value !== N.field ? "" : "is-active", K = (N) => {
|
|
8072
8094
|
if (L(N))
|
|
8073
8095
|
return p.value !== N.field ? "none" : m.value === "asc" ? "ascending" : "descending";
|
|
8074
|
-
},
|
|
8096
|
+
}, A = (N) => {
|
|
8075
8097
|
const oe = [];
|
|
8076
8098
|
return e.striped && N % 2 === 1 && oe.push("vf-datatable__row_striped"), oe;
|
|
8077
8099
|
}, V = (N) => {
|
|
8078
8100
|
const oe = [];
|
|
8079
8101
|
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
|
-
},
|
|
8102
|
+
}, Y = (N) => {
|
|
8081
8103
|
const oe = [];
|
|
8082
8104
|
return N.align && oe.push(`vf-datatable__cell_${N.align}`), N.sticky && oe.push(`vf-datatable__cell_sticky-${N.sticky}`), oe;
|
|
8083
8105
|
}, ae = (N) => {
|
|
@@ -8125,7 +8147,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8125
8147
|
class: ee(E.value)
|
|
8126
8148
|
}, [
|
|
8127
8149
|
w.value ? (c(), b("div", Ls, [
|
|
8128
|
-
|
|
8150
|
+
q(N.$slots, "bulk-actions", {
|
|
8129
8151
|
selectedKeys: z.value,
|
|
8130
8152
|
selectedRows: C.value,
|
|
8131
8153
|
clearSelection: ye,
|
|
@@ -8161,7 +8183,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8161
8183
|
class: "vf-datatable__selection-control",
|
|
8162
8184
|
checked: g.value,
|
|
8163
8185
|
"aria-label": N.selectAllAriaLabel,
|
|
8164
|
-
onChange:
|
|
8186
|
+
onChange: H
|
|
8165
8187
|
}, null, 40, Ps)) : Q("", !0)
|
|
8166
8188
|
])) : Q("", !0),
|
|
8167
8189
|
(c(!0), b(fe, null, he(N.columns, (le) => (c(), b("th", {
|
|
@@ -8178,7 +8200,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8178
8200
|
onClick: (ge) => W(le)
|
|
8179
8201
|
}, [
|
|
8180
8202
|
B("span", As, [
|
|
8181
|
-
N.$slots[`header-${le.field}`] ?
|
|
8203
|
+
N.$slots[`header-${le.field}`] ? q(N.$slots, `header-${le.field}`, {
|
|
8182
8204
|
key: 0,
|
|
8183
8205
|
column: le
|
|
8184
8206
|
}) : (c(), b(fe, { key: 1 }, [
|
|
@@ -8189,7 +8211,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8189
8211
|
class: ee(["vf-datatable__sort-icon", P(le)])
|
|
8190
8212
|
}, j(h(le)), 3)
|
|
8191
8213
|
], 8, Os)) : (c(), b("span", Hs, [
|
|
8192
|
-
N.$slots[`header-${le.field}`] ?
|
|
8214
|
+
N.$slots[`header-${le.field}`] ? q(N.$slots, `header-${le.field}`, {
|
|
8193
8215
|
key: 0,
|
|
8194
8216
|
column: le
|
|
8195
8217
|
}) : (c(), b(fe, { key: 1 }, [
|
|
@@ -8205,13 +8227,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8205
8227
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
8206
8228
|
colspan: y.value
|
|
8207
8229
|
}, [
|
|
8208
|
-
|
|
8230
|
+
q(N.$slots, "loading", {}, () => [
|
|
8209
8231
|
me(j(N.loadingText), 1)
|
|
8210
8232
|
])
|
|
8211
8233
|
], 8, Ns)
|
|
8212
8234
|
])) : I.value.length ? (c(!0), b(fe, { key: 2 }, he(I.value, (le, ge) => (c(), b("tr", {
|
|
8213
8235
|
key: T(le, ge),
|
|
8214
|
-
class: ee(["vf-datatable__row",
|
|
8236
|
+
class: ee(["vf-datatable__row", A(ge)]),
|
|
8215
8237
|
onClick: (J) => se(le, ge, J)
|
|
8216
8238
|
}, [
|
|
8217
8239
|
k.value ? (c(), b("td", qs, [
|
|
@@ -8228,10 +8250,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8228
8250
|
])) : Q("", !0),
|
|
8229
8251
|
(c(!0), b(fe, null, he(N.columns, (J) => (c(), b("td", {
|
|
8230
8252
|
key: J.field,
|
|
8231
|
-
class: ee(["vf-datatable__cell",
|
|
8253
|
+
class: ee(["vf-datatable__cell", Y(J)]),
|
|
8232
8254
|
style: ke(ae(J))
|
|
8233
8255
|
}, [
|
|
8234
|
-
N.$slots[`cell-${J.field}`] ?
|
|
8256
|
+
N.$slots[`cell-${J.field}`] ? q(N.$slots, `cell-${J.field}`, {
|
|
8235
8257
|
key: 0,
|
|
8236
8258
|
row: le,
|
|
8237
8259
|
column: J,
|
|
@@ -8246,7 +8268,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8246
8268
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
8247
8269
|
colspan: y.value
|
|
8248
8270
|
}, [
|
|
8249
|
-
|
|
8271
|
+
q(N.$slots, "empty", {}, () => [
|
|
8250
8272
|
me(j(N.emptyText), 1)
|
|
8251
8273
|
])
|
|
8252
8274
|
], 8, js)
|
|
@@ -8288,8 +8310,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8288
8310
|
const W = x.toString();
|
|
8289
8311
|
return W.includes(".") ? W.split(".")[1].length : 0;
|
|
8290
8312
|
}, 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(
|
|
8313
|
+
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;
|
|
8314
|
+
return Number.parseFloat(Y.toFixed(V));
|
|
8293
8315
|
}, p = f(() => {
|
|
8294
8316
|
if (!t.value) {
|
|
8295
8317
|
const P = v(e.modelValue ?? i.value);
|
|
@@ -8322,8 +8344,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8322
8344
|
if (e.disabled)
|
|
8323
8345
|
return;
|
|
8324
8346
|
const K = v(Number(x));
|
|
8325
|
-
let [
|
|
8326
|
-
W === "start" ?
|
|
8347
|
+
let [A, V] = p.value;
|
|
8348
|
+
W === "start" ? A = Math.min(K, V) : V = Math.max(K, A), a("update:modelValue", [A, V]), a(P, h);
|
|
8327
8349
|
}, R = (x) => {
|
|
8328
8350
|
const W = x.target;
|
|
8329
8351
|
if (t.value) {
|
|
@@ -8344,7 +8366,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8344
8366
|
}, E = (x) => {
|
|
8345
8367
|
const W = x.target;
|
|
8346
8368
|
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}`),
|
|
8369
|
+
}, 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
8370
|
return (x, W) => (c(), b("div", {
|
|
8349
8371
|
class: ee(z.value),
|
|
8350
8372
|
style: ke(y.value)
|
|
@@ -8361,7 +8383,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8361
8383
|
step: d.value,
|
|
8362
8384
|
value: m.value,
|
|
8363
8385
|
disabled: x.disabled,
|
|
8364
|
-
"aria-label":
|
|
8386
|
+
"aria-label": H.value,
|
|
8365
8387
|
style: ke(C.value),
|
|
8366
8388
|
onInput: R,
|
|
8367
8389
|
onChange: O,
|
|
@@ -8416,22 +8438,22 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8416
8438
|
}, $ = (x) => {
|
|
8417
8439
|
if (!x.length)
|
|
8418
8440
|
return [];
|
|
8419
|
-
const W = x.reduce((V,
|
|
8441
|
+
const W = x.reduce((V, Y) => V + Y, 0);
|
|
8420
8442
|
if (W <= 0) {
|
|
8421
8443
|
const V = 100 / x.length;
|
|
8422
8444
|
return x.map(
|
|
8423
|
-
(
|
|
8445
|
+
(Y, ae) => ae === x.length - 1 ? m(100 - V * (x.length - 1)) : V
|
|
8424
8446
|
);
|
|
8425
8447
|
}
|
|
8426
|
-
const P = x.map((V) => V / W * 100).map((V) => m(V)), K = m(100 - P.reduce((V,
|
|
8427
|
-
return P[
|
|
8448
|
+
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;
|
|
8449
|
+
return P[A] = m(P[A] + K), P;
|
|
8428
8450
|
}, l = (x, W) => {
|
|
8429
8451
|
if (!x.length)
|
|
8430
8452
|
return [];
|
|
8431
8453
|
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 =
|
|
8454
|
+
let A = K.reduce((ae, se) => ae + se, 0);
|
|
8455
|
+
if (A > 100) {
|
|
8456
|
+
let ae = A - 100, se = 0;
|
|
8435
8457
|
for (; ae > 1e-4 && se < 50; ) {
|
|
8436
8458
|
const U = K.map((re, de) => ({ index: de, slack: re - (P[de] ?? 0) })).filter((re) => re.slack > 1e-4);
|
|
8437
8459
|
if (!U.length)
|
|
@@ -8448,25 +8470,25 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8448
8470
|
K[re.index] = K[re.index] - ae * de;
|
|
8449
8471
|
}), ae = 0, ++se;
|
|
8450
8472
|
}
|
|
8451
|
-
} else if (
|
|
8452
|
-
const se = (100 -
|
|
8473
|
+
} else if (A < 100) {
|
|
8474
|
+
const se = (100 - A) / K.length;
|
|
8453
8475
|
for (let U = 0; U < K.length; ++U)
|
|
8454
8476
|
K[U] += se;
|
|
8455
8477
|
}
|
|
8456
|
-
const V = K.map((ae) => m(ae)),
|
|
8457
|
-
return V[V.length - 1] = m(V[V.length - 1] +
|
|
8478
|
+
const V = K.map((ae) => m(ae)), Y = m(100 - V.reduce((ae, se) => ae + se, 0));
|
|
8479
|
+
return V[V.length - 1] = m(V[V.length - 1] + Y), V;
|
|
8458
8480
|
}, _ = (x) => {
|
|
8459
8481
|
if (!x)
|
|
8460
8482
|
return [];
|
|
8461
8483
|
const W = a.modelValue;
|
|
8462
8484
|
if (W.length === x && W.every(v))
|
|
8463
8485
|
return $(W);
|
|
8464
|
-
const h = s.value.map((
|
|
8486
|
+
const h = s.value.map((Y) => Y.size), P = h.filter(v);
|
|
8465
8487
|
if (!P.length)
|
|
8466
8488
|
return $(Array.from({ length: x }, () => 1));
|
|
8467
|
-
const K = P.reduce((
|
|
8468
|
-
if (K < 100 &&
|
|
8469
|
-
const ae = (100 - K) /
|
|
8489
|
+
const K = P.reduce((Y, ae) => Y + ae, 0), A = h.length - P.length, V = h.map((Y) => v(Y) ? Y : 0);
|
|
8490
|
+
if (K < 100 && A > 0) {
|
|
8491
|
+
const ae = (100 - K) / A;
|
|
8470
8492
|
for (let se = 0; se < V.length; ++se)
|
|
8471
8493
|
v(h[se]) || (V[se] = ae);
|
|
8472
8494
|
return $(V);
|
|
@@ -8510,7 +8532,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8510
8532
|
const P = [...d.value];
|
|
8511
8533
|
if (!P[x] || !P[x + 1])
|
|
8512
8534
|
return;
|
|
8513
|
-
const K = k(),
|
|
8535
|
+
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
8536
|
P[x] = m(ae), P[x + 1] = m(se);
|
|
8515
8537
|
const U = l($(P), K);
|
|
8516
8538
|
d.value = U, h && e("update:modelValue", [...U]);
|
|
@@ -8534,18 +8556,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8534
8556
|
const h = a.direction === "horizontal", P = h ? "ArrowLeft" : "ArrowUp", K = h ? "ArrowRight" : "ArrowDown";
|
|
8535
8557
|
if ([P, K, "Home", "End"].includes(x.key)) {
|
|
8536
8558
|
if (x.preventDefault(), x.key === "Home") {
|
|
8537
|
-
const
|
|
8538
|
-
O(W,
|
|
8559
|
+
const A = k(), V = d.value[W] ?? 0, Y = A[W] ?? 0;
|
|
8560
|
+
O(W, Y - V);
|
|
8539
8561
|
} else if (x.key === "End") {
|
|
8540
|
-
const
|
|
8541
|
-
O(W, ae -
|
|
8562
|
+
const A = k(), V = (d.value[W] ?? 0) + (d.value[W + 1] ?? 0), Y = d.value[W] ?? 0, ae = V - (A[W + 1] ?? 0);
|
|
8563
|
+
O(W, ae - Y);
|
|
8542
8564
|
} else {
|
|
8543
|
-
const
|
|
8565
|
+
const A = x.shiftKey ? 5 : 2, V = x.key === K ? A : -A;
|
|
8544
8566
|
O(W, V);
|
|
8545
8567
|
}
|
|
8546
8568
|
e("change", [...d.value]);
|
|
8547
8569
|
}
|
|
8548
|
-
},
|
|
8570
|
+
}, H = (x) => {
|
|
8549
8571
|
const W = `vf-splitter-panel-${++t}`;
|
|
8550
8572
|
return s.value.push({
|
|
8551
8573
|
id: W,
|
|
@@ -8558,7 +8580,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8558
8580
|
return Qe(zt, {
|
|
8559
8581
|
direction: f(() => a.direction),
|
|
8560
8582
|
disabled: f(() => a.disabled),
|
|
8561
|
-
registerPanel:
|
|
8583
|
+
registerPanel: H,
|
|
8562
8584
|
unregisterPanel: Z,
|
|
8563
8585
|
getPanelStyle: L
|
|
8564
8586
|
}), ve(
|
|
@@ -8580,7 +8602,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8580
8602
|
ref: i,
|
|
8581
8603
|
class: ee(z.value)
|
|
8582
8604
|
}, [
|
|
8583
|
-
|
|
8605
|
+
q(x.$slots, "default"),
|
|
8584
8606
|
(c(!0), b(fe, null, he(C.value, (h, P) => (c(), b("div", {
|
|
8585
8607
|
key: `gutter-${P}`,
|
|
8586
8608
|
class: ee(["vf-splitter__gutter", { "is-dragging": r.value === P }]),
|
|
@@ -8622,7 +8644,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8622
8644
|
class: ee(t.value),
|
|
8623
8645
|
style: ke(i.value)
|
|
8624
8646
|
}, [
|
|
8625
|
-
|
|
8647
|
+
q(s.$slots, "default")
|
|
8626
8648
|
], 6));
|
|
8627
8649
|
}
|
|
8628
8650
|
}), oi = ["aria-label", "aria-labelledby"], ri = { class: "vf-stepper__list" }, li = { class: "vf-stepper__indicator-wrap" }, ni = { class: "vf-stepper__indicator" }, si = {
|
|
@@ -8690,7 +8712,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8690
8712
|
default: Ce(() => [
|
|
8691
8713
|
B("span", li, [
|
|
8692
8714
|
B("span", ni, [
|
|
8693
|
-
|
|
8715
|
+
q(g.$slots, "indicator", {
|
|
8694
8716
|
step: L,
|
|
8695
8717
|
index: R,
|
|
8696
8718
|
status: r(L, R),
|
|
@@ -8705,7 +8727,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8705
8727
|
R < t.value.length - 1 ? (c(), b("span", si)) : Q("", !0)
|
|
8706
8728
|
]),
|
|
8707
8729
|
B("span", ii, [
|
|
8708
|
-
|
|
8730
|
+
q(g.$slots, "step", {
|
|
8709
8731
|
step: L,
|
|
8710
8732
|
index: R,
|
|
8711
8733
|
status: r(L, R),
|
|
@@ -8771,7 +8793,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8771
8793
|
var S;
|
|
8772
8794
|
if (r.value.length) {
|
|
8773
8795
|
if (e.modelValue !== void 0) {
|
|
8774
|
-
const F = r.value.find((
|
|
8796
|
+
const F = r.value.find((H) => H.value === e.modelValue && !H.disabled);
|
|
8775
8797
|
if (F)
|
|
8776
8798
|
return F.value;
|
|
8777
8799
|
}
|
|
@@ -8783,17 +8805,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8783
8805
|
const F = r.value[S];
|
|
8784
8806
|
if (!F)
|
|
8785
8807
|
return !0;
|
|
8786
|
-
const
|
|
8808
|
+
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
8809
|
if (K)
|
|
8788
8810
|
return d.value = {
|
|
8789
8811
|
...d.value,
|
|
8790
|
-
[String(
|
|
8812
|
+
[String(H)]: K
|
|
8791
8813
|
}, a("invalidStep", K, F, S), !1;
|
|
8792
|
-
const
|
|
8793
|
-
return delete
|
|
8814
|
+
const A = { ...d.value };
|
|
8815
|
+
return delete A[String(H)], d.value = A, !0;
|
|
8794
8816
|
}, O = async (S, F) => {
|
|
8795
|
-
const
|
|
8796
|
-
!
|
|
8817
|
+
const H = r.value[S];
|
|
8818
|
+
!H || w(H, S) || u.value >= 0 && S > u.value && !await I(u.value) || R(H.value, F);
|
|
8797
8819
|
}, E = async () => {
|
|
8798
8820
|
u.value <= 0 || await O(u.value - 1, "prev");
|
|
8799
8821
|
}, T = async () => {
|
|
@@ -8831,41 +8853,41 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8831
8853
|
}, [
|
|
8832
8854
|
B("nav", vi, [
|
|
8833
8855
|
B("ol", fi, [
|
|
8834
|
-
(c(!0), b(fe, null, he(r.value, (
|
|
8835
|
-
key: String(
|
|
8836
|
-
class: ee(["vf-wizard__item", g(
|
|
8856
|
+
(c(!0), b(fe, null, he(r.value, (H, Z) => (c(), b("li", {
|
|
8857
|
+
key: String(H.value),
|
|
8858
|
+
class: ee(["vf-wizard__item", g(H, Z)])
|
|
8837
8859
|
}, [
|
|
8838
8860
|
B("button", {
|
|
8839
|
-
id: _(
|
|
8861
|
+
id: _(H.value),
|
|
8840
8862
|
class: "vf-wizard__step",
|
|
8841
8863
|
type: "button",
|
|
8842
8864
|
role: "tab",
|
|
8843
|
-
"aria-selected": y(
|
|
8844
|
-
"aria-controls": k(
|
|
8845
|
-
disabled: w(
|
|
8865
|
+
"aria-selected": y(H.value) ? "true" : "false",
|
|
8866
|
+
"aria-controls": k(H.value),
|
|
8867
|
+
disabled: w(H, Z),
|
|
8846
8868
|
onClick: (x) => M(Z)
|
|
8847
8869
|
}, [
|
|
8848
8870
|
B("span", mi, [
|
|
8849
|
-
|
|
8850
|
-
step:
|
|
8871
|
+
q(S.$slots, "indicator", {
|
|
8872
|
+
step: H,
|
|
8851
8873
|
index: Z
|
|
8852
8874
|
}, () => [
|
|
8853
8875
|
me(j(Z + 1), 1)
|
|
8854
8876
|
])
|
|
8855
8877
|
]),
|
|
8856
8878
|
B("span", gi, [
|
|
8857
|
-
B("span", bi, j(
|
|
8858
|
-
|
|
8879
|
+
B("span", bi, j(H.title || `Step ${Z + 1}`), 1),
|
|
8880
|
+
H.description ? (c(), b("span", hi, j(H.description), 1)) : Q("", !0)
|
|
8859
8881
|
])
|
|
8860
8882
|
], 8, pi)
|
|
8861
8883
|
], 2))), 128))
|
|
8862
8884
|
])
|
|
8863
8885
|
]),
|
|
8864
8886
|
B("div", yi, [
|
|
8865
|
-
|
|
8887
|
+
q(S.$slots, "default")
|
|
8866
8888
|
]),
|
|
8867
8889
|
B("div", _i, [
|
|
8868
|
-
|
|
8890
|
+
q(S.$slots, "actions", {
|
|
8869
8891
|
step: v.value,
|
|
8870
8892
|
index: u.value,
|
|
8871
8893
|
isFirst: p.value,
|
|
@@ -8906,7 +8928,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8906
8928
|
"aria-labelledby": i.value,
|
|
8907
8929
|
"aria-hidden": e.value ? "false" : "true"
|
|
8908
8930
|
}, [
|
|
8909
|
-
|
|
8931
|
+
q(s.$slots, "default")
|
|
8910
8932
|
], 8, Ci)), [
|
|
8911
8933
|
[Se, e.value]
|
|
8912
8934
|
]);
|
|
@@ -8952,7 +8974,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8952
8974
|
}, [
|
|
8953
8975
|
B("div", Si, [
|
|
8954
8976
|
B("span", Bi, [
|
|
8955
|
-
|
|
8977
|
+
q(i.$slots, "marker", {
|
|
8956
8978
|
item: d,
|
|
8957
8979
|
index: r
|
|
8958
8980
|
}, () => [
|
|
@@ -8965,7 +8987,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8965
8987
|
r < a.value.length - 1 ? (c(), b("span", Li)) : Q("", !0)
|
|
8966
8988
|
]),
|
|
8967
8989
|
B("div", Vi, [
|
|
8968
|
-
|
|
8990
|
+
q(i.$slots, "item", {
|
|
8969
8991
|
item: d,
|
|
8970
8992
|
index: r
|
|
8971
8993
|
}, () => [
|
|
@@ -9026,12 +9048,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9026
9048
|
t.value = r.value;
|
|
9027
9049
|
return;
|
|
9028
9050
|
}
|
|
9029
|
-
let
|
|
9051
|
+
let H = 0, Z = S, x = Number.POSITIVE_INFINITY;
|
|
9030
9052
|
D.forEach((h, P) => {
|
|
9031
|
-
const K = h.getBoundingClientRect(),
|
|
9032
|
-
V < x && (x = V,
|
|
9053
|
+
const K = h.getBoundingClientRect(), A = K.left + K.width / 2, V = Math.abs(M - A);
|
|
9054
|
+
V < x && (x = V, H = P, Z = K);
|
|
9033
9055
|
});
|
|
9034
|
-
let W =
|
|
9056
|
+
let W = H + 1;
|
|
9035
9057
|
if (e.allowHalf) {
|
|
9036
9058
|
const h = Z.left + Z.width / 2;
|
|
9037
9059
|
W = M < h ? W - 0.5 : W;
|
|
@@ -9101,7 +9123,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9101
9123
|
onKeydown: (S) => g(M, S)
|
|
9102
9124
|
}, [
|
|
9103
9125
|
B("span", Ri, [
|
|
9104
|
-
|
|
9126
|
+
q(T.$slots, "icon", {}, () => [
|
|
9105
9127
|
D[0] || (D[0] = B("svg", {
|
|
9106
9128
|
viewBox: "0 0 24 24",
|
|
9107
9129
|
"aria-hidden": "true",
|
|
@@ -9119,7 +9141,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9119
9141
|
style: ke({ width: R(M) })
|
|
9120
9142
|
}, [
|
|
9121
9143
|
B("span", Pi, [
|
|
9122
|
-
|
|
9144
|
+
q(T.$slots, "active-icon", {}, () => [
|
|
9123
9145
|
D[1] || (D[1] = B("svg", {
|
|
9124
9146
|
viewBox: "0 0 24 24",
|
|
9125
9147
|
"aria-hidden": "true",
|
|
@@ -9258,7 +9280,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9258
9280
|
onClick: ie($, ["stop"])
|
|
9259
9281
|
}, j(i.value ? "-" : "+"), 11, Ai)) : (c(), b("span", Hi)),
|
|
9260
9282
|
B("span", Wi, [
|
|
9261
|
-
|
|
9283
|
+
q(l.$slots, "label", {
|
|
9262
9284
|
node: l.node,
|
|
9263
9285
|
level: l.level,
|
|
9264
9286
|
selected: t.value,
|
|
@@ -9286,7 +9308,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9286
9308
|
"on-toggle": l.onToggle
|
|
9287
9309
|
}, {
|
|
9288
9310
|
label: Ce((z) => [
|
|
9289
|
-
|
|
9311
|
+
q(l.$slots, "label", st({ ref_for: !0 }, z))
|
|
9290
9312
|
]),
|
|
9291
9313
|
_: 2
|
|
9292
9314
|
}, 1032, ["node", "level", "size", "variant", "disabled", "expand-on-click", "selectable", "is-selected", "is-expanded", "is-disabled", "on-select", "on-toggle"]))), 128))
|
|
@@ -9356,7 +9378,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9356
9378
|
"on-toggle": $
|
|
9357
9379
|
}, {
|
|
9358
9380
|
label: Ce((y) => [
|
|
9359
|
-
|
|
9381
|
+
q(l.$slots, "label", st({ ref_for: !0 }, y))
|
|
9360
9382
|
]),
|
|
9361
9383
|
_: 2
|
|
9362
9384
|
}, 1032, ["node", "size", "variant", "disabled", "expand-on-click", "selectable"]))), 128))
|
|
@@ -9407,94 +9429,94 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9407
9429
|
let a = 0;
|
|
9408
9430
|
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
9431
|
let l = null;
|
|
9410
|
-
const _ = (
|
|
9411
|
-
const V = [],
|
|
9432
|
+
const _ = (A) => Array.isArray(A) ? A : A == null ? [] : [A], k = (A) => {
|
|
9433
|
+
const V = [], Y = (ae) => {
|
|
9412
9434
|
ae.forEach((se) => {
|
|
9413
9435
|
var U;
|
|
9414
|
-
V.push(se), (U = se.children) != null && U.length &&
|
|
9436
|
+
V.push(se), (U = se.children) != null && U.length && Y(se.children);
|
|
9415
9437
|
});
|
|
9416
9438
|
};
|
|
9417
|
-
return
|
|
9439
|
+
return Y(A), V;
|
|
9418
9440
|
}, y = f(() => _(t.modelValue)), z = f(() => y.value.length > 0), C = f(() => {
|
|
9419
|
-
const
|
|
9441
|
+
const A = /* @__PURE__ */ new Map();
|
|
9420
9442
|
return k(t.items).forEach((V) => {
|
|
9421
|
-
|
|
9422
|
-
}),
|
|
9443
|
+
A.set(V.key, V.label);
|
|
9444
|
+
}), A;
|
|
9423
9445
|
}), g = f(() => {
|
|
9424
|
-
const
|
|
9425
|
-
return
|
|
9426
|
-
}), w = (
|
|
9446
|
+
const A = y.value.map((V) => C.value.get(V)).filter((V) => !!V);
|
|
9447
|
+
return A.length ? t.multiple ? A.join(", ") : A[0] : "";
|
|
9448
|
+
}), w = (A, V) => A.label.toLowerCase().includes(V), L = (A, V) => {
|
|
9427
9449
|
if (!V)
|
|
9428
|
-
return
|
|
9429
|
-
const
|
|
9430
|
-
return
|
|
9450
|
+
return A;
|
|
9451
|
+
const Y = [];
|
|
9452
|
+
return A.forEach((ae) => {
|
|
9431
9453
|
var U;
|
|
9432
9454
|
const se = (U = ae.children) != null && U.length ? L(ae.children, V) : [];
|
|
9433
|
-
(w(ae, V) || se.length) &&
|
|
9455
|
+
(w(ae, V) || se.length) && Y.push({
|
|
9434
9456
|
...ae,
|
|
9435
9457
|
children: se
|
|
9436
9458
|
});
|
|
9437
|
-
}),
|
|
9459
|
+
}), Y;
|
|
9438
9460
|
}, R = f(() => {
|
|
9439
9461
|
if (!t.filter)
|
|
9440
9462
|
return t.items;
|
|
9441
|
-
const
|
|
9442
|
-
return
|
|
9463
|
+
const A = v.value.trim().toLowerCase();
|
|
9464
|
+
return A ? L(t.items, A) : t.items;
|
|
9443
9465
|
}), I = f(() => {
|
|
9444
|
-
const
|
|
9445
|
-
return t.size !== "normal" &&
|
|
9466
|
+
const A = ["vf-treeselect", `vf-treeselect_${t.variant}`, u.value ? "vf-treeselect_open" : ""];
|
|
9467
|
+
return t.size !== "normal" && A.push(`vf-treeselect_${t.size}`), t.disabled && A.push("vf-treeselect_disabled"), A.filter(Boolean);
|
|
9446
9468
|
}), O = () => {
|
|
9447
9469
|
u.value = !1, p.value = "bottom", m.value = "bottom", v.value = "";
|
|
9448
9470
|
}, E = async () => {
|
|
9449
|
-
var
|
|
9450
|
-
t.disabled || (u.value = !0, p.value = "bottom", m.value = "bottom", t.filter && (await $e(), (
|
|
9471
|
+
var A;
|
|
9472
|
+
t.disabled || (u.value = !0, p.value = "bottom", m.value = "bottom", t.filter && (await $e(), (A = r.value) == null || A.focus()));
|
|
9451
9473
|
}, T = () => {
|
|
9452
9474
|
if (u.value) {
|
|
9453
9475
|
O();
|
|
9454
9476
|
return;
|
|
9455
9477
|
}
|
|
9456
9478
|
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",
|
|
9479
|
+
}, D = (A) => {
|
|
9480
|
+
t.readonly || (e("update:modelValue", A), t.multiple || O());
|
|
9481
|
+
}, M = (A, V, Y) => {
|
|
9482
|
+
t.readonly || e("change", A, V, Y);
|
|
9483
|
+
}, S = (A) => {
|
|
9484
|
+
e("update:expandedKeys", A);
|
|
9485
|
+
}, F = (A, V, Y, ae) => {
|
|
9486
|
+
e("toggle", A, V, Y, ae);
|
|
9487
|
+
}, H = (A, V) => {
|
|
9488
|
+
e("nodeClick", A, V);
|
|
9467
9489
|
}, Z = () => {
|
|
9468
9490
|
if (t.readonly)
|
|
9469
9491
|
return;
|
|
9470
|
-
const
|
|
9471
|
-
e("update:modelValue",
|
|
9472
|
-
}, x = (
|
|
9473
|
-
const V =
|
|
9492
|
+
const A = t.multiple ? [] : void 0;
|
|
9493
|
+
e("update:modelValue", A), e("change", A);
|
|
9494
|
+
}, x = (A) => {
|
|
9495
|
+
const V = A.target;
|
|
9474
9496
|
v.value = V.value, e("search", V.value);
|
|
9475
|
-
}, W = (
|
|
9476
|
-
var
|
|
9497
|
+
}, W = (A) => e("focus", A), h = (A) => e("blur", A), P = (A) => {
|
|
9498
|
+
var Y;
|
|
9477
9499
|
if (!u.value || !i.value)
|
|
9478
9500
|
return;
|
|
9479
|
-
const V =
|
|
9480
|
-
i.value.contains(V) || (
|
|
9501
|
+
const V = A.target;
|
|
9502
|
+
i.value.contains(V) || (Y = d.value) != null && Y.contains(V) || O();
|
|
9481
9503
|
}, K = () => {
|
|
9482
9504
|
if (!s.value || !d.value)
|
|
9483
9505
|
return;
|
|
9484
|
-
const
|
|
9506
|
+
const A = s.value, V = d.value, Y = async () => {
|
|
9485
9507
|
const {
|
|
9486
9508
|
x: X,
|
|
9487
9509
|
y: re,
|
|
9488
9510
|
placement: de
|
|
9489
|
-
} = await Me(
|
|
9511
|
+
} = await Me(A, V, {
|
|
9490
9512
|
placement: p.value,
|
|
9491
9513
|
strategy: "fixed",
|
|
9492
9514
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
9493
9515
|
});
|
|
9494
|
-
m.value = de ?? p.value, V.style.minWidth = `${
|
|
9516
|
+
m.value = de ?? p.value, V.style.minWidth = `${A.getBoundingClientRect().width}px`, V.style.left = `${X}px`, V.style.top = `${re}px`;
|
|
9495
9517
|
}, ae = async () => {
|
|
9496
|
-
await
|
|
9497
|
-
}, se = De(
|
|
9518
|
+
await Y();
|
|
9519
|
+
}, se = De(A, () => {
|
|
9498
9520
|
ae();
|
|
9499
9521
|
}), U = () => {
|
|
9500
9522
|
ae();
|
|
@@ -9506,8 +9528,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9506
9528
|
}
|
|
9507
9529
|
}, l.update();
|
|
9508
9530
|
};
|
|
9509
|
-
return ve(u, async (
|
|
9510
|
-
if (!
|
|
9531
|
+
return ve(u, async (A) => {
|
|
9532
|
+
if (!A) {
|
|
9511
9533
|
l && (l.destroy(), l = null);
|
|
9512
9534
|
return;
|
|
9513
9535
|
}
|
|
@@ -9522,7 +9544,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9522
9544
|
document.addEventListener("click", P);
|
|
9523
9545
|
}), we(() => {
|
|
9524
9546
|
document.removeEventListener("click", P), l == null || l.destroy(), l = null;
|
|
9525
|
-
}), (
|
|
9547
|
+
}), (A, V) => (c(), b("div", {
|
|
9526
9548
|
ref_key: "root",
|
|
9527
9549
|
ref: i,
|
|
9528
9550
|
class: ee(I.value)
|
|
@@ -9532,7 +9554,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9532
9554
|
ref: s,
|
|
9533
9555
|
class: "vf-treeselect__control",
|
|
9534
9556
|
type: "button",
|
|
9535
|
-
disabled:
|
|
9557
|
+
disabled: A.disabled,
|
|
9536
9558
|
"aria-expanded": u.value,
|
|
9537
9559
|
"aria-controls": $,
|
|
9538
9560
|
"aria-haspopup": "tree",
|
|
@@ -9547,13 +9569,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9547
9569
|
}, [
|
|
9548
9570
|
B("span", {
|
|
9549
9571
|
class: ee(["vf-treeselect__label", { "vf-treeselect__label_placeholder": !g.value }])
|
|
9550
|
-
}, j(g.value ||
|
|
9572
|
+
}, j(g.value || A.placeholder), 3),
|
|
9551
9573
|
V[0] || (V[0] = B("span", {
|
|
9552
9574
|
class: "vf-treeselect__chevron",
|
|
9553
9575
|
"aria-hidden": "true"
|
|
9554
9576
|
}, "▾", -1))
|
|
9555
9577
|
], 40, qi),
|
|
9556
|
-
|
|
9578
|
+
A.clearable && z.value && !A.disabled && !A.readonly ? (c(), b("button", {
|
|
9557
9579
|
key: 0,
|
|
9558
9580
|
class: "vf-treeselect__clear",
|
|
9559
9581
|
type: "button",
|
|
@@ -9568,41 +9590,41 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9568
9590
|
class: "vf-treeselect__panel",
|
|
9569
9591
|
"data-placement": m.value
|
|
9570
9592
|
}, [
|
|
9571
|
-
|
|
9593
|
+
A.filter ? (c(), b("div", Ui, [
|
|
9572
9594
|
B("input", {
|
|
9573
9595
|
ref_key: "searchInput",
|
|
9574
9596
|
ref: r,
|
|
9575
9597
|
class: "vf-treeselect__search-control",
|
|
9576
9598
|
type: "text",
|
|
9577
9599
|
value: v.value,
|
|
9578
|
-
placeholder:
|
|
9600
|
+
placeholder: A.searchPlaceholder,
|
|
9579
9601
|
onInput: x,
|
|
9580
9602
|
onKeydown: pe(ie(O, ["prevent"]), ["esc"])
|
|
9581
9603
|
}, null, 40, Qi)
|
|
9582
9604
|
])) : Q("", !0),
|
|
9583
|
-
|
|
9605
|
+
A.loading ? (c(), b("div", Zi, j(A.loadingText), 1)) : R.value.length > 0 ? (c(), be(Yi, {
|
|
9584
9606
|
key: 2,
|
|
9585
9607
|
class: "vf-treeselect__tree",
|
|
9586
9608
|
items: R.value,
|
|
9587
|
-
"model-value":
|
|
9588
|
-
"expanded-keys":
|
|
9589
|
-
multiple:
|
|
9590
|
-
selectable:
|
|
9591
|
-
"expand-on-click":
|
|
9592
|
-
disabled:
|
|
9593
|
-
size:
|
|
9594
|
-
variant:
|
|
9609
|
+
"model-value": A.modelValue,
|
|
9610
|
+
"expanded-keys": A.expandedKeys,
|
|
9611
|
+
multiple: A.multiple,
|
|
9612
|
+
selectable: A.selectable,
|
|
9613
|
+
"expand-on-click": A.expandOnClick,
|
|
9614
|
+
disabled: A.disabled,
|
|
9615
|
+
size: A.size,
|
|
9616
|
+
variant: A.variant,
|
|
9595
9617
|
"onUpdate:modelValue": D,
|
|
9596
9618
|
onChange: M,
|
|
9597
9619
|
"onUpdate:expandedKeys": S,
|
|
9598
9620
|
onToggle: F,
|
|
9599
|
-
onNodeClick:
|
|
9621
|
+
onNodeClick: H
|
|
9600
9622
|
}, {
|
|
9601
|
-
label: Ce((
|
|
9602
|
-
|
|
9623
|
+
label: Ce((Y) => [
|
|
9624
|
+
q(A.$slots, "label", Pt(Et(Y)))
|
|
9603
9625
|
]),
|
|
9604
9626
|
_: 3
|
|
9605
|
-
}, 8, ["items", "model-value", "expanded-keys", "multiple", "selectable", "expand-on-click", "disabled", "size", "variant"])) : (c(), b("div", Ji, j(
|
|
9627
|
+
}, 8, ["items", "model-value", "expanded-keys", "multiple", "selectable", "expand-on-click", "disabled", "size", "variant"])) : (c(), b("div", Ji, j(A.emptyText), 1))
|
|
9606
9628
|
], 8, Xi), [
|
|
9607
9629
|
[Se, u.value]
|
|
9608
9630
|
])
|
|
@@ -9638,7 +9660,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9638
9660
|
B("li", {
|
|
9639
9661
|
class: ee(["vf-breadcrumbs__item", { "is-current": t(r, u), "is-disabled": r.disabled }])
|
|
9640
9662
|
}, [
|
|
9641
|
-
|
|
9663
|
+
q(s.$slots, "item", {
|
|
9642
9664
|
item: r,
|
|
9643
9665
|
index: u,
|
|
9644
9666
|
isLast: u === a.value.length - 1,
|
|
@@ -9659,7 +9681,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9659
9681
|
])
|
|
9660
9682
|
], 2),
|
|
9661
9683
|
u < a.value.length - 1 ? (c(), b("li", od, [
|
|
9662
|
-
|
|
9684
|
+
q(s.$slots, "separator", { separator: s.separator }, () => [
|
|
9663
9685
|
me(j(s.separator), 1)
|
|
9664
9686
|
])
|
|
9665
9687
|
])) : Q("", !0)
|
|
@@ -9692,7 +9714,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9692
9714
|
"aria-label": i.ariaLabel
|
|
9693
9715
|
}, [
|
|
9694
9716
|
e.value ? (c(), b("span", ld, [
|
|
9695
|
-
|
|
9717
|
+
q(i.$slots, "default", {}, () => [
|
|
9696
9718
|
me(j(i.label), 1)
|
|
9697
9719
|
])
|
|
9698
9720
|
])) : Q("", !0)
|
|
@@ -9735,17 +9757,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9735
9757
|
class: ee(d.value)
|
|
9736
9758
|
}, [
|
|
9737
9759
|
r.$slots.breadcrumbs ? (c(), b("div", nd, [
|
|
9738
|
-
|
|
9760
|
+
q(r.$slots, "breadcrumbs")
|
|
9739
9761
|
])) : Q("", !0),
|
|
9740
9762
|
B("div", sd, [
|
|
9741
9763
|
B("div", id, [
|
|
9742
9764
|
e.value ? (c(), b("h1", dd, [
|
|
9743
|
-
|
|
9765
|
+
q(r.$slots, "title", {}, () => [
|
|
9744
9766
|
me(j(r.title), 1)
|
|
9745
9767
|
])
|
|
9746
9768
|
])) : Q("", !0),
|
|
9747
9769
|
t.value ? (c(), b("p", ud, [
|
|
9748
|
-
|
|
9770
|
+
q(r.$slots, "subtitle", {}, () => [
|
|
9749
9771
|
me(j(r.subtitle), 1)
|
|
9750
9772
|
])
|
|
9751
9773
|
])) : Q("", !0),
|
|
@@ -9755,10 +9777,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9755
9777
|
role: "group",
|
|
9756
9778
|
"aria-label": r.metaAriaLabel || void 0
|
|
9757
9779
|
}, [
|
|
9758
|
-
|
|
9780
|
+
q(r.$slots, "meta")
|
|
9759
9781
|
], 8, cd)) : Q("", !0),
|
|
9760
9782
|
r.$slots.default ? (c(), b("div", vd, [
|
|
9761
|
-
|
|
9783
|
+
q(r.$slots, "default")
|
|
9762
9784
|
])) : Q("", !0)
|
|
9763
9785
|
]),
|
|
9764
9786
|
r.$slots.actions ? (c(), b("div", {
|
|
@@ -9767,7 +9789,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9767
9789
|
role: "group",
|
|
9768
9790
|
"aria-label": r.actionsAriaLabel || void 0
|
|
9769
9791
|
}, [
|
|
9770
|
-
|
|
9792
|
+
q(r.$slots, "actions")
|
|
9771
9793
|
], 8, fd)) : Q("", !0)
|
|
9772
9794
|
])
|
|
9773
9795
|
], 2));
|
|
@@ -9870,7 +9892,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9870
9892
|
style: ke(I.value),
|
|
9871
9893
|
role: "listitem"
|
|
9872
9894
|
}, [
|
|
9873
|
-
|
|
9895
|
+
q(M.$slots, "default", {
|
|
9874
9896
|
item: F.item,
|
|
9875
9897
|
index: F.index
|
|
9876
9898
|
}, () => [
|
|
@@ -9879,21 +9901,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9879
9901
|
], 4))), 128))
|
|
9880
9902
|
], 4)
|
|
9881
9903
|
], 4)) : (c(), b("div", gd, [
|
|
9882
|
-
(c(!0), b(fe, null, he(r.value, (F,
|
|
9883
|
-
key: O(F,
|
|
9904
|
+
(c(!0), b(fe, null, he(r.value, (F, H) => (c(), b("div", {
|
|
9905
|
+
key: O(F, H),
|
|
9884
9906
|
class: "vf-virtual-scroller__item",
|
|
9885
9907
|
style: ke(I.value),
|
|
9886
9908
|
role: "listitem"
|
|
9887
9909
|
}, [
|
|
9888
|
-
|
|
9910
|
+
q(M.$slots, "default", {
|
|
9889
9911
|
item: F,
|
|
9890
|
-
index:
|
|
9912
|
+
index: H
|
|
9891
9913
|
}, () => [
|
|
9892
9914
|
me(j(F), 1)
|
|
9893
9915
|
])
|
|
9894
9916
|
], 4))), 128))
|
|
9895
9917
|
])) : (c(), b("div", md, [
|
|
9896
|
-
|
|
9918
|
+
q(M.$slots, "empty", {}, () => [
|
|
9897
9919
|
me(j(M.emptyText), 1)
|
|
9898
9920
|
])
|
|
9899
9921
|
]))
|