abl-ui 0.5.73 → 0.5.75
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/lib/abl-ui.es.js +135 -135
- package/lib/abl-ui.umd.js +2 -2
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/abl-ui.es.js
CHANGED
|
@@ -601,7 +601,7 @@ function it(e, n = 0, t = !1) {
|
|
|
601
601
|
function St(e) {
|
|
602
602
|
e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e);
|
|
603
603
|
}
|
|
604
|
-
const He = (e) => (ye("data-v-
|
|
604
|
+
const He = (e) => (ye("data-v-523e424a"), e = e(), be(), e), ln = ["onMouseenter", "onMouseleave", "onClick"], nn = {
|
|
605
605
|
key: 1,
|
|
606
606
|
class: "icon-svg",
|
|
607
607
|
focusable: "false",
|
|
@@ -696,15 +696,15 @@ const He = (e) => (ye("data-v-37a282cc"), e = e(), be(), e), ln = ["onMouseenter
|
|
|
696
696
|
}, c.value));
|
|
697
697
|
}
|
|
698
698
|
function $(g) {
|
|
699
|
-
const S = s.value.findIndex((
|
|
700
|
-
|
|
699
|
+
const S = s.value.findIndex((W) => W.id === g), F = s.value.length - 1, H = s.value[F];
|
|
700
|
+
H != null && H.top ? m.value = typeof H.top == "number" ? `${H.top}px` : H.top : m.value = typeof l.top == "number" ? `${l.top}px` : l.top, i.value[S] = !0, H != null && H.duration ? (c.value = H.duration || l.duration, o.value[S] = it(() => {
|
|
701
701
|
i.value[S] = !1, s.value[S].onClose && s.value[S].onClose(), f("close");
|
|
702
702
|
}, 0)) : c.value = null;
|
|
703
703
|
}
|
|
704
704
|
function k() {
|
|
705
705
|
a.value && St(a.value);
|
|
706
706
|
const g = s.value.length - 1, S = s.value[g];
|
|
707
|
-
S
|
|
707
|
+
S != null && S.top ? m.value = typeof S.top == "number" ? `${S.top}px` : S.top : m.value = typeof l.top == "number" ? `${l.top}px` : l.top, i.value[g] = !0, S != null && S.duration ? (c.value = S.duration || l.duration, x(g)) : c.value = null;
|
|
708
708
|
}
|
|
709
709
|
const _ = (g, S) => {
|
|
710
710
|
let F;
|
|
@@ -760,16 +760,16 @@ const He = (e) => (ye("data-v-37a282cc"), e = e(), be(), e), ln = ["onMouseenter
|
|
|
760
760
|
appear: ""
|
|
761
761
|
}, {
|
|
762
762
|
default: re(() => [
|
|
763
|
-
(r(!0), d(K, null, ae(s.value, (F,
|
|
763
|
+
(r(!0), d(K, null, ae(s.value, (F, H) => Z((r(), d("div", {
|
|
764
764
|
class: V(["message-wrap", F.class]),
|
|
765
765
|
style: E(F.style),
|
|
766
|
-
key:
|
|
766
|
+
key: H
|
|
767
767
|
}, [
|
|
768
768
|
u("div", {
|
|
769
769
|
class: V(["message-content-wrap", `icon-${F.mode}`]),
|
|
770
|
-
onMouseenter: (
|
|
771
|
-
onMouseleave: (
|
|
772
|
-
onClick: (
|
|
770
|
+
onMouseenter: (W) => v(H),
|
|
771
|
+
onMouseleave: (W) => y(H),
|
|
772
|
+
onClick: (W) => h(W, H)
|
|
773
773
|
}, [
|
|
774
774
|
F.icon ? (r(), ie(ft(F.icon), {
|
|
775
775
|
key: 0,
|
|
@@ -779,18 +779,18 @@ const He = (e) => (ye("data-v-37a282cc"), e = e(), be(), e), ln = ["onMouseenter
|
|
|
779
779
|
F.closable ? (r(), d("span", {
|
|
780
780
|
key: 6,
|
|
781
781
|
class: "icon iconfont-abl close-icon",
|
|
782
|
-
onClick: (
|
|
782
|
+
onClick: (W) => $(F.id)
|
|
783
783
|
}, "", 8, _n)) : R("", !0)
|
|
784
784
|
], 42, ln)
|
|
785
785
|
], 6)), [
|
|
786
|
-
[le, i.value[
|
|
786
|
+
[le, i.value[H]]
|
|
787
787
|
])), 128))
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
790
790
|
})) : (r(), d(K, { key: 1 }, [], 64))
|
|
791
791
|
], 4));
|
|
792
792
|
}
|
|
793
|
-
}, xn = /* @__PURE__ */ G(wn, [["__scopeId", "data-v-
|
|
793
|
+
}, xn = /* @__PURE__ */ G(wn, [["__scopeId", "data-v-523e424a"]]);
|
|
794
794
|
let qe;
|
|
795
795
|
function Be() {
|
|
796
796
|
return qe || (qe = pl(xn).mount(document.createElement("div")), document.body.appendChild(qe.$el)), qe;
|
|
@@ -1549,12 +1549,12 @@ const ea = (e) => ({
|
|
|
1549
1549
|
}, y = gt(a), h = ht(y), x = await o.getDimensions(f), $ = y === "y", k = $ ? "top" : "left", _ = $ ? "bottom" : "right", M = $ ? "clientHeight" : "clientWidth", C = i.reference[h] + i.reference[y] - v[y] - i.floating[h], I = v[y] - i.reference[y], N = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(f));
|
|
1550
1550
|
let w = N ? N[M] : 0;
|
|
1551
1551
|
(!w || !await (o.isElement == null ? void 0 : o.isElement(N))) && (w = s.floating[M] || i.floating[h]);
|
|
1552
|
-
const L = C / 2 - I / 2, g = w / 2 - x[h] / 2 - 1, S = Me(p[k], g), F = Me(p[_], g),
|
|
1552
|
+
const L = C / 2 - I / 2, g = w / 2 - x[h] / 2 - 1, S = Me(p[k], g), F = Me(p[_], g), H = S, W = w - x[h] - F, q = w / 2 - x[h] / 2 + L, A = ct(H, q, W), X = !c.arrow && Ue(a) != null && q !== A && i.reference[h] / 2 - (q < H ? S : F) - x[h] / 2 < 0, Q = X ? q < H ? q - H : q - W : 0;
|
|
1553
1553
|
return {
|
|
1554
1554
|
[y]: v[y] + Q,
|
|
1555
1555
|
data: {
|
|
1556
1556
|
[y]: A,
|
|
1557
|
-
centerOffset:
|
|
1557
|
+
centerOffset: q - A - Q,
|
|
1558
1558
|
...X && {
|
|
1559
1559
|
alignmentOffset: Q
|
|
1560
1560
|
}
|
|
@@ -1591,42 +1591,42 @@ const ea = (e) => ({
|
|
|
1591
1591
|
const I = [s, ...C], N = await Yt(n, $), w = [];
|
|
1592
1592
|
let L = ((l = i.flip) == null ? void 0 : l.overflows) || [];
|
|
1593
1593
|
if (m && w.push(N[k]), p) {
|
|
1594
|
-
const
|
|
1595
|
-
w.push(N[
|
|
1594
|
+
const H = Xn(a, o, M);
|
|
1595
|
+
w.push(N[H[0]], N[H[1]]);
|
|
1596
1596
|
}
|
|
1597
1597
|
if (L = [...L, {
|
|
1598
1598
|
placement: a,
|
|
1599
1599
|
overflows: w
|
|
1600
|
-
}], !w.every((
|
|
1600
|
+
}], !w.every((H) => H <= 0)) {
|
|
1601
1601
|
var g, S;
|
|
1602
|
-
const
|
|
1603
|
-
if (
|
|
1602
|
+
const H = (((g = i.flip) == null ? void 0 : g.index) || 0) + 1, W = I[H];
|
|
1603
|
+
if (W)
|
|
1604
1604
|
return {
|
|
1605
1605
|
data: {
|
|
1606
|
-
index:
|
|
1606
|
+
index: H,
|
|
1607
1607
|
overflows: L
|
|
1608
1608
|
},
|
|
1609
1609
|
reset: {
|
|
1610
|
-
placement:
|
|
1610
|
+
placement: W
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
|
-
let
|
|
1614
|
-
if (!
|
|
1613
|
+
let q = (S = L.filter((A) => A.overflows[0] <= 0).sort((A, X) => A.overflows[1] - X.overflows[1])[0]) == null ? void 0 : S.placement;
|
|
1614
|
+
if (!q)
|
|
1615
1615
|
switch (y) {
|
|
1616
1616
|
case "bestFit": {
|
|
1617
1617
|
var F;
|
|
1618
1618
|
const A = (F = L.map((X) => [X.placement, X.overflows.filter((Q) => Q > 0).reduce((Q, P) => Q + P, 0)]).sort((X, Q) => X[1] - Q[1])[0]) == null ? void 0 : F[0];
|
|
1619
|
-
A && (
|
|
1619
|
+
A && (q = A);
|
|
1620
1620
|
break;
|
|
1621
1621
|
}
|
|
1622
1622
|
case "initialPlacement":
|
|
1623
|
-
|
|
1623
|
+
q = s;
|
|
1624
1624
|
break;
|
|
1625
1625
|
}
|
|
1626
|
-
if (a !==
|
|
1626
|
+
if (a !== q)
|
|
1627
1627
|
return {
|
|
1628
1628
|
reset: {
|
|
1629
|
-
placement:
|
|
1629
|
+
placement: q
|
|
1630
1630
|
}
|
|
1631
1631
|
};
|
|
1632
1632
|
}
|
|
@@ -2263,7 +2263,7 @@ const Ca = ["data-side"], ll = {
|
|
|
2263
2263
|
};
|
|
2264
2264
|
ge(() => {
|
|
2265
2265
|
t.value = !0, N(), vt(() => {
|
|
2266
|
-
|
|
2266
|
+
q();
|
|
2267
2267
|
});
|
|
2268
2268
|
}), ne(() => m.value, (A) => {
|
|
2269
2269
|
A && M(m.value);
|
|
@@ -2278,7 +2278,7 @@ const Ca = ["data-side"], ll = {
|
|
|
2278
2278
|
}, 0);
|
|
2279
2279
|
}, g = () => {
|
|
2280
2280
|
I(), document.removeEventListener("mousedown", g);
|
|
2281
|
-
}, S = O(() => o.value.split("-")[0]), F = O(() => ({ left: v.value + "px", top: y.value + "px", zIndex: l.zIndex, width: f.value })),
|
|
2281
|
+
}, S = O(() => o.value.split("-")[0]), F = O(() => ({ left: v.value + "px", top: y.value + "px", zIndex: l.zIndex, width: f.value })), H = O(() => {
|
|
2282
2282
|
if (!l.showArrow)
|
|
2283
2283
|
return {};
|
|
2284
2284
|
const { arrow: A } = se(h);
|
|
@@ -2286,7 +2286,7 @@ const Ca = ["data-side"], ll = {
|
|
|
2286
2286
|
left: (A == null ? void 0 : A.x) + "px",
|
|
2287
2287
|
top: (A == null ? void 0 : A.y) + "px"
|
|
2288
2288
|
};
|
|
2289
|
-
}),
|
|
2289
|
+
}), W = async () => {
|
|
2290
2290
|
if (!(!_.value || !p.value))
|
|
2291
2291
|
try {
|
|
2292
2292
|
const A = await Sa(_.value, p.value, {
|
|
@@ -2301,10 +2301,10 @@ const Ca = ["data-side"], ll = {
|
|
|
2301
2301
|
console.error("Error updating position:", A);
|
|
2302
2302
|
}
|
|
2303
2303
|
};
|
|
2304
|
-
async function
|
|
2304
|
+
async function q() {
|
|
2305
2305
|
if (!(!_.value || !p.value))
|
|
2306
2306
|
try {
|
|
2307
|
-
await me(), $ = xa(_.value, p.value,
|
|
2307
|
+
await me(), $ = xa(_.value, p.value, W);
|
|
2308
2308
|
} catch (A) {
|
|
2309
2309
|
console.error("Error updating position:", A);
|
|
2310
2310
|
}
|
|
@@ -2341,7 +2341,7 @@ const Ca = ["data-side"], ll = {
|
|
|
2341
2341
|
ref_key: "arrowRef",
|
|
2342
2342
|
ref: a,
|
|
2343
2343
|
class: "abl-popper__arrow",
|
|
2344
|
-
style: E(
|
|
2344
|
+
style: E(H.value)
|
|
2345
2345
|
}, null, 4)) : R("", !0)
|
|
2346
2346
|
], 46, Ca)) : R("", !0)
|
|
2347
2347
|
])) : R("", !0)
|
|
@@ -3057,40 +3057,40 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3057
3057
|
},
|
|
3058
3058
|
emits: ["update:modelValue"],
|
|
3059
3059
|
setup(e, { emit: n }) {
|
|
3060
|
-
const t = Ze(), l = e, a = O(() => l.previewSrcList.length), i = b(Array(a.value).fill(!1)), o = b(l.initialIndex), s = b(1), c = b(0), f = b(0), m = b(0), p = b(0), v = b(0), y = n, h = (
|
|
3061
|
-
t && (t.appContext.config.globalProperties.$lockCount =
|
|
3060
|
+
const t = Ze(), l = e, a = O(() => l.previewSrcList.length), i = b(Array(a.value).fill(!1)), o = b(l.initialIndex), s = b(1), c = b(0), f = b(0), m = b(0), p = b(0), v = b(0), y = n, h = (W) => {
|
|
3061
|
+
t && (t.appContext.config.globalProperties.$lockCount = W || 0);
|
|
3062
3062
|
}, x = () => {
|
|
3063
3063
|
document.body.style.paddingRight = window.innerWidth - document.documentElement.clientWidth + "px", document.body.style.overflow = "hidden", document.body.style.touchAction = "none";
|
|
3064
|
-
const
|
|
3065
|
-
h(
|
|
3064
|
+
const W = t.appContext.config.globalProperties.$lockCount || 0;
|
|
3065
|
+
h(W + 1);
|
|
3066
3066
|
}, $ = () => {
|
|
3067
3067
|
t.appContext.config.globalProperties.$lockCount > 0 && h((t.appContext.config.globalProperties.$lockCount || 0) - 1), (t.appContext.config.globalProperties.$lockCount || 0) <= 0 && (document.body.style.overflow = "", document.body.style.touchAction = "", document.body.style.paddingRight = "");
|
|
3068
3068
|
};
|
|
3069
|
-
ne(() => l.modelValue, (
|
|
3069
|
+
ne(() => l.modelValue, (W) => {
|
|
3070
3070
|
ol && l.modelValue && x();
|
|
3071
3071
|
}, {
|
|
3072
3072
|
deep: !0,
|
|
3073
3073
|
immediate: !0
|
|
3074
3074
|
});
|
|
3075
|
-
const k = (
|
|
3075
|
+
const k = (W, q) => {
|
|
3076
3076
|
let A, X;
|
|
3077
3077
|
try {
|
|
3078
|
-
A =
|
|
3078
|
+
A = W.toString().split(".")[1].length;
|
|
3079
3079
|
} catch {
|
|
3080
3080
|
A = 0;
|
|
3081
3081
|
}
|
|
3082
3082
|
try {
|
|
3083
|
-
X =
|
|
3083
|
+
X = q.toString().split(".")[1].length;
|
|
3084
3084
|
} catch {
|
|
3085
3085
|
X = 0;
|
|
3086
3086
|
}
|
|
3087
3087
|
const Q = Math.max(A, X), P = Math.pow(10, Q);
|
|
3088
|
-
return
|
|
3089
|
-
}, _ = (
|
|
3090
|
-
i.value[
|
|
3091
|
-
}, M = (
|
|
3088
|
+
return W = Math.round(W * P), q = Math.round(q * P), (W + q) / P;
|
|
3089
|
+
}, _ = (W) => {
|
|
3090
|
+
i.value[W] = !0;
|
|
3091
|
+
}, M = (W) => {
|
|
3092
3092
|
o.value = (o.value + 1) % a.value;
|
|
3093
|
-
}, C = (
|
|
3093
|
+
}, C = (W) => {
|
|
3094
3094
|
o.value = (o.value - 1 + a.value) % a.value;
|
|
3095
3095
|
}, I = () => {
|
|
3096
3096
|
s.value + l.zoomRate > l.maxScale ? s.value = l.maxScale : s.value = k(s.value, l.zoomRate);
|
|
@@ -3102,26 +3102,26 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3102
3102
|
v.value += 90;
|
|
3103
3103
|
}, g = () => {
|
|
3104
3104
|
v.value = 0, s.value = 1, m.value = 0, p.value = 0;
|
|
3105
|
-
}, S = (
|
|
3105
|
+
}, S = (W) => {
|
|
3106
3106
|
if (!l.drag)
|
|
3107
3107
|
return;
|
|
3108
|
-
const
|
|
3109
|
-
c.value =
|
|
3110
|
-
const B = m.value,
|
|
3111
|
-
document.onmousemove = (
|
|
3112
|
-
m.value = B +
|
|
3113
|
-
}, document.onmouseup = (
|
|
3114
|
-
m.value > B + T - Q && (m.value = B + T - Q), m.value < B - X && (m.value = B - X), p.value >
|
|
3108
|
+
const q = W.target, { top: A, left: X, right: Q, bottom: P } = q.getBoundingClientRect(), T = document.documentElement.clientWidth, Y = document.documentElement.clientHeight;
|
|
3109
|
+
c.value = W.clientX, f.value = W.clientY;
|
|
3110
|
+
const B = m.value, U = p.value;
|
|
3111
|
+
document.onmousemove = (j) => {
|
|
3112
|
+
m.value = B + j.clientX - c.value, p.value = U + j.clientY - f.value;
|
|
3113
|
+
}, document.onmouseup = (j) => {
|
|
3114
|
+
m.value > B + T - Q && (m.value = B + T - Q), m.value < B - X && (m.value = B - X), p.value > U + Y - P && (p.value = U + Y - P), p.value < U - A && (p.value = U - A), document.onmousemove = null;
|
|
3115
3115
|
};
|
|
3116
|
-
}, F = (
|
|
3116
|
+
}, F = (W) => {
|
|
3117
3117
|
if (!l.drag)
|
|
3118
3118
|
return;
|
|
3119
|
-
const
|
|
3120
|
-
s.value === l.minScale &&
|
|
3121
|
-
},
|
|
3119
|
+
const q = W.deltaY * l.zoomRate * 0.1;
|
|
3120
|
+
s.value === l.minScale && q > 0 || s.value === l.maxScale && q < 0 || (s.value - q < l.minScale ? s.value = l.minScale : s.value - q > l.maxScale ? s.value = l.maxScale : s.value = k(s.value, -q));
|
|
3121
|
+
}, H = () => {
|
|
3122
3122
|
$(), y("update:modelValue", !1);
|
|
3123
3123
|
};
|
|
3124
|
-
return (
|
|
3124
|
+
return (W, q) => (r(), ie(et, { to: "body" }, [
|
|
3125
3125
|
fe(ke, { name: "mask" }, {
|
|
3126
3126
|
default: re(() => [
|
|
3127
3127
|
so
|
|
@@ -3135,7 +3135,7 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3135
3135
|
default: re(() => [
|
|
3136
3136
|
u("div", {
|
|
3137
3137
|
class: "abl-image-preview-wrap",
|
|
3138
|
-
onWheel:
|
|
3138
|
+
onWheel: q[4] || (q[4] = J((A) => F(A), ["prevent"]))
|
|
3139
3139
|
}, [
|
|
3140
3140
|
u("div", io, [
|
|
3141
3141
|
u("div", {
|
|
@@ -3156,8 +3156,8 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3156
3156
|
class: "abl-image-preview__img",
|
|
3157
3157
|
style: E(`transform: scale3d(${s.value}, ${s.value}, 1) rotate(${v.value}deg);`),
|
|
3158
3158
|
onLoad: (Q) => _(X),
|
|
3159
|
-
onMousedown:
|
|
3160
|
-
onClick:
|
|
3159
|
+
onMousedown: q[0] || (q[0] = J((Q) => S(Q), ["prevent"])),
|
|
3160
|
+
onClick: q[1] || (q[1] = J(() => {
|
|
3161
3161
|
}, ["stop"]))
|
|
3162
3162
|
}, null, 44, ro)) : (r(), d("video", {
|
|
3163
3163
|
key: 1,
|
|
@@ -3186,12 +3186,12 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3186
3186
|
title: "",
|
|
3187
3187
|
style: E(`transform: scale3d(${s.value}, ${s.value}, 1) rotate(${v.value}deg);`),
|
|
3188
3188
|
onLoad: (Q) => _(X),
|
|
3189
|
-
onMousedown:
|
|
3190
|
-
onClick:
|
|
3189
|
+
onMousedown: q[2] || (q[2] = J((Q) => S(Q), ["prevent"])),
|
|
3190
|
+
onClick: q[3] || (q[3] = J(() => {
|
|
3191
3191
|
}, ["stop"])),
|
|
3192
3192
|
loading: "lazy"
|
|
3193
3193
|
}, null, 44, uo)),
|
|
3194
|
-
z(
|
|
3194
|
+
z(W.$slots, "default"),
|
|
3195
3195
|
e.showProgress ? (r(), d("div", fo, [
|
|
3196
3196
|
u("div", po, D(`${o.value + 1}/${a.value}`), 1)
|
|
3197
3197
|
])) : R("", !0)
|
|
@@ -3211,7 +3211,7 @@ const so = /* @__PURE__ */ u("div", {
|
|
|
3211
3211
|
], 64)) : R("", !0),
|
|
3212
3212
|
u("div", {
|
|
3213
3213
|
class: "abl-image-preview__btn abl-image-preview__close",
|
|
3214
|
-
onClick:
|
|
3214
|
+
onClick: H
|
|
3215
3215
|
}, bo),
|
|
3216
3216
|
e.showAction ? (r(), d("div", _o, [
|
|
3217
3217
|
u("div", wo, [
|
|
@@ -4109,8 +4109,8 @@ const wt = (e) => (ye("data-v-915b5556"), e = e(), be(), e), Is = { class: "abl-
|
|
|
4109
4109
|
const g = (S = w.dataTransfer) == null ? void 0 : S.files;
|
|
4110
4110
|
if (g != null && g.length) {
|
|
4111
4111
|
const F = g.length;
|
|
4112
|
-
for (let
|
|
4113
|
-
k(g[
|
|
4112
|
+
for (let H = 0; H < F && L + H <= t.maxCount; H++)
|
|
4113
|
+
k(g[H], L + H);
|
|
4114
4114
|
o.value[L].value = "";
|
|
4115
4115
|
}
|
|
4116
4116
|
}, h = (w) => {
|
|
@@ -4138,12 +4138,12 @@ const wt = (e) => (ye("data-v-915b5556"), e = e(), be(), e), Is = { class: "abl-
|
|
|
4138
4138
|
}, g.onprogress = function(S) {
|
|
4139
4139
|
S.loaded === S.total && (i.value[L] = !1);
|
|
4140
4140
|
}, g.onload = function(S) {
|
|
4141
|
-
var F,
|
|
4141
|
+
var F, H;
|
|
4142
4142
|
t.isUrl ? l.value.push({
|
|
4143
4143
|
name: w.name,
|
|
4144
4144
|
url: (F = S.target) == null ? void 0 : F.result,
|
|
4145
4145
|
type: w.type
|
|
4146
|
-
}) : l.value.push((
|
|
4146
|
+
}) : l.value.push((H = S.target) == null ? void 0 : H.result), $("update:fileList", l.value), $("change", l.value);
|
|
4147
4147
|
}, g.onloadend = function(S) {
|
|
4148
4148
|
console.log("读取结束 onloadend:", S);
|
|
4149
4149
|
};
|
|
@@ -4414,15 +4414,15 @@ const Gs = { class: "abl-select-warpper-content" }, Js = { class: "abl-select-ha
|
|
|
4414
4414
|
});
|
|
4415
4415
|
_.list = T;
|
|
4416
4416
|
}
|
|
4417
|
-
},
|
|
4417
|
+
}, H = (P) => {
|
|
4418
4418
|
o.disabled || (M.value = !0, y.value === "focus" ? y.value = "blur" : y.value = "focus", setTimeout(() => {
|
|
4419
4419
|
const T = document.querySelector("#abl-select"), Y = T.querySelector(".abl-options-item-active");
|
|
4420
4420
|
if (!Y)
|
|
4421
4421
|
return;
|
|
4422
|
-
const B = T.getBoundingClientRect(),
|
|
4423
|
-
|
|
4422
|
+
const B = T.getBoundingClientRect(), U = Y.getBoundingClientRect();
|
|
4423
|
+
U.top >= B.top && U.bottom <= B.bottom || (T.scrollTop = Y.offsetTop - T.offsetHeight / 2);
|
|
4424
4424
|
}, 100));
|
|
4425
|
-
},
|
|
4425
|
+
}, W = (P, T) => {
|
|
4426
4426
|
var B;
|
|
4427
4427
|
if (o.disabled)
|
|
4428
4428
|
return;
|
|
@@ -4434,8 +4434,8 @@ const Gs = { class: "abl-select-warpper-content" }, Js = { class: "abl-select-ha
|
|
|
4434
4434
|
let Y = null;
|
|
4435
4435
|
y.value = "blur", w.value[0] && w.value[0].value === P.value ? w.value.shift() : w.value[0] = P, Y = P.value, c("update:modelValue", Y), c("change", Y, P, $t(w.value)), h.value.close();
|
|
4436
4436
|
};
|
|
4437
|
-
$e("handleSlotClick",
|
|
4438
|
-
const
|
|
4437
|
+
$e("handleSlotClick", W);
|
|
4438
|
+
const q = () => {
|
|
4439
4439
|
var P;
|
|
4440
4440
|
(P = v.value) == null || P.focus(), !C.value && y.value === "focus" && w.value.length > 0 && (w.value.pop(), c("change", $t(w.value)));
|
|
4441
4441
|
}, A = () => {
|
|
@@ -4504,9 +4504,9 @@ const Gs = { class: "abl-select-warpper-content" }, Js = { class: "abl-select-ha
|
|
|
4504
4504
|
id: "abl-select"
|
|
4505
4505
|
}, [
|
|
4506
4506
|
_.list.length > 0 ? (r(!0), d(K, { key: 0 }, ae(_.list, (Y, B) => (r(), d("div", {
|
|
4507
|
-
class: V(["abl-select-options-item", w.value.some((
|
|
4507
|
+
class: V(["abl-select-options-item", w.value.some((U) => U.value === Y.value) ? "abl-options-item-active" : ""]),
|
|
4508
4508
|
key: Y.name + Y.value,
|
|
4509
|
-
onMousedown: (
|
|
4509
|
+
onMousedown: (U) => W(Y, U)
|
|
4510
4510
|
}, [
|
|
4511
4511
|
i.value ? z(P.$slots, "abloption", xt(xe({ key: 0 }, Y)), void 0, !0) : (r(), d(K, { key: 1 }, [
|
|
4512
4512
|
Y.iconColor ? (r(), d("div", {
|
|
@@ -4528,11 +4528,11 @@ const Gs = { class: "abl-select-warpper-content" }, Js = { class: "abl-select-ha
|
|
|
4528
4528
|
]),
|
|
4529
4529
|
default: re(() => [
|
|
4530
4530
|
u("div", {
|
|
4531
|
-
onClick:
|
|
4531
|
+
onClick: H,
|
|
4532
4532
|
id: "select-input-warpper",
|
|
4533
4533
|
class: V(["abl-select-warpper", I.value ? "abl-select-warpper-disabled" : ""]),
|
|
4534
4534
|
style: E({ height: e.height }),
|
|
4535
|
-
onKeydown: Dt(
|
|
4535
|
+
onKeydown: Dt(q, ["delete"])
|
|
4536
4536
|
}, [
|
|
4537
4537
|
u("div", Gs, [
|
|
4538
4538
|
u("div", {
|
|
@@ -4929,8 +4929,8 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
4929
4929
|
const s = b(), c = b(), f = $i();
|
|
4930
4930
|
b(), b(), b([]);
|
|
4931
4931
|
const m = O(() => {
|
|
4932
|
-
const { marks: B, max:
|
|
4933
|
-
return Object.keys(B).map(parseFloat).sort((ce, ve) => ce - ve).filter((ce) => ce >= +
|
|
4932
|
+
const { marks: B, max: U, min: j } = t;
|
|
4933
|
+
return Object.keys(B).map(parseFloat).sort((ce, ve) => ce - ve).filter((ce) => ce >= +j && ce <= +U);
|
|
4934
4934
|
}), p = O(() => Number(t.max) - Number(t.min)), v = b([]), y = b(), h = O(() => {
|
|
4935
4935
|
const B = "abl-range";
|
|
4936
4936
|
return {
|
|
@@ -4950,11 +4950,11 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
4950
4950
|
})), k = O(() => ({
|
|
4951
4951
|
borderColor: t.buttonColor
|
|
4952
4952
|
})), _ = b(!1), M = (B) => !!t.range && Array.isArray(B), C = () => {
|
|
4953
|
-
const { modelValue: B, min:
|
|
4954
|
-
return M(B) ? `${(B[1] - B[0]) * 100 / p.value}%` : `${(B - Number(
|
|
4953
|
+
const { modelValue: B, min: U } = t;
|
|
4954
|
+
return M(B) ? `${(B[1] - B[0]) * 100 / p.value}%` : `${(B - Number(U)) * 100 / p.value}%`;
|
|
4955
4955
|
}, I = () => {
|
|
4956
|
-
const { modelValue: B, min:
|
|
4957
|
-
return M(B) ? `${(B[0] - Number(
|
|
4956
|
+
const { modelValue: B, min: U } = t;
|
|
4957
|
+
return M(B) ? `${(B[0] - Number(U)) * 100 / p.value}%` : "0%";
|
|
4958
4958
|
}, N = O(() => t.vertical ? {
|
|
4959
4959
|
height: C(),
|
|
4960
4960
|
top: I(),
|
|
@@ -4966,54 +4966,54 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
4966
4966
|
background: t.activeColor,
|
|
4967
4967
|
transition: c.value ? "none" : void 0
|
|
4968
4968
|
}), w = (B) => {
|
|
4969
|
-
const
|
|
4969
|
+
const U = "abl-range-mark", { modelValue: j, max: te, min: de } = t;
|
|
4970
4970
|
let ce = Number(de), ve = Number(te);
|
|
4971
4971
|
if (t.range) {
|
|
4972
|
-
const [ze, Oe] =
|
|
4972
|
+
const [ze, Oe] = j;
|
|
4973
4973
|
ce = ze, ve = Oe;
|
|
4974
4974
|
} else
|
|
4975
|
-
ve =
|
|
4975
|
+
ve = j;
|
|
4976
4976
|
let Te = B <= +ve && B >= ce;
|
|
4977
4977
|
return {
|
|
4978
|
-
[`${
|
|
4979
|
-
[`${
|
|
4978
|
+
[`${U}-text`]: !0,
|
|
4979
|
+
[`${U}-text-active`]: Te
|
|
4980
4980
|
};
|
|
4981
4981
|
}, L = (B) => {
|
|
4982
|
-
const { min:
|
|
4982
|
+
const { min: U, vertical: j } = t;
|
|
4983
4983
|
let te = {
|
|
4984
|
-
left: `${(B - Number(
|
|
4984
|
+
left: `${(B - Number(U)) / p.value * 100}%`
|
|
4985
4985
|
};
|
|
4986
|
-
return
|
|
4987
|
-
top: `${(B - Number(
|
|
4986
|
+
return j && (te = {
|
|
4987
|
+
top: `${(B - Number(U)) / p.value * 100}%`
|
|
4988
4988
|
}), te;
|
|
4989
4989
|
}, g = (B) => {
|
|
4990
|
-
const { modelValue:
|
|
4991
|
-
let de = Number(te), ce = Number(
|
|
4990
|
+
const { modelValue: U, max: j, min: te } = t;
|
|
4991
|
+
let de = Number(te), ce = Number(j);
|
|
4992
4992
|
if (t.range) {
|
|
4993
|
-
const [ze, Oe] =
|
|
4993
|
+
const [ze, Oe] = U;
|
|
4994
4994
|
de = ze, ce = Oe;
|
|
4995
4995
|
}
|
|
4996
4996
|
return {
|
|
4997
4997
|
background: B <= ce && B >= de ? t.activeColor : t.inactiveColor
|
|
4998
4998
|
};
|
|
4999
4999
|
}, S = (B) => {
|
|
5000
|
-
const { min:
|
|
5001
|
-
return B = Math.max(+
|
|
5002
|
-
}, F = (B,
|
|
5003
|
-
M(B) ? B =
|
|
5004
|
-
},
|
|
5000
|
+
const { min: U, max: j, step: te } = t;
|
|
5001
|
+
return B = Math.max(+U, Math.min(B, +j)), Math.round(B / +te) * +te;
|
|
5002
|
+
}, F = (B, U) => JSON.stringify(B) === JSON.stringify(U), H = (B) => B[0] > B[1] ? B.slice(0).reverse() : B, W = (B, U) => {
|
|
5003
|
+
M(B) ? B = H(B).map(S) : B = S(B), F(B, t.modelValue) || l("update:modelValue", B), U && !F(B, i) && l("change", B);
|
|
5004
|
+
}, q = (B) => {
|
|
5005
5005
|
if (t.disabled || c.value === "draging")
|
|
5006
5006
|
return;
|
|
5007
5007
|
_.value = !0;
|
|
5008
|
-
const { min:
|
|
5008
|
+
const { min: U, modelValue: j } = t, te = Nt(s);
|
|
5009
5009
|
let de = B.clientX - te.left, ce = te.width;
|
|
5010
5010
|
t.vertical && (de = B.clientY - te.top, ce = te.height);
|
|
5011
|
-
const ve = Number(
|
|
5012
|
-
if (M(
|
|
5013
|
-
const [Te, ze] =
|
|
5014
|
-
ve <= Oe ? (a.value = 0,
|
|
5011
|
+
const ve = Number(U) + de / ce * p.value;
|
|
5012
|
+
if (M(j)) {
|
|
5013
|
+
const [Te, ze] = j, Oe = (Te + ze) / 2;
|
|
5014
|
+
ve <= Oe ? (a.value = 0, W([ve, ze], !0)) : (a.value = 1, W([Te, ve], !0));
|
|
5015
5015
|
} else
|
|
5016
|
-
|
|
5016
|
+
W(ve, !0);
|
|
5017
5017
|
setTimeout(() => {
|
|
5018
5018
|
document.addEventListener("mousedown", A, { once: !0 });
|
|
5019
5019
|
});
|
|
@@ -5025,17 +5025,17 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
5025
5025
|
if (t.disabled)
|
|
5026
5026
|
return;
|
|
5027
5027
|
c.value === "start" && l("dragStart"), f.move(B), c.value = "draging", B.type.startsWith("touch") && (_.value = !0);
|
|
5028
|
-
const
|
|
5029
|
-
let
|
|
5030
|
-
t.vertical && (
|
|
5028
|
+
const U = Nt(s);
|
|
5029
|
+
let j = f.deltaX.value, te = U.width, de = j / te * p.value;
|
|
5030
|
+
t.vertical && (j = f.deltaY.value, te = U.height, de = j / te * p.value), M(i) ? o[a.value] = i[a.value] + de : o = i + de, W(o);
|
|
5031
5031
|
}, P = (B) => {
|
|
5032
|
-
t.disabled || c.value === "draging" && (
|
|
5032
|
+
t.disabled || c.value === "draging" && (W(o, !0), l("dragEnd"), window.removeEventListener("mousemove", Q), window.removeEventListener("touchmove", Q), window.removeEventListener("mouseup", P), window.removeEventListener("touchend", P), B.type.startsWith("touch") && (_.value = !1), setTimeout(() => {
|
|
5033
5033
|
c.value = "";
|
|
5034
5034
|
}));
|
|
5035
|
-
}, T = (B,
|
|
5035
|
+
}, T = (B, U) => {
|
|
5036
5036
|
t.disabled || (X(B), window.addEventListener("mousemove", Q), window.addEventListener("touchmove", Q), window.addEventListener("mouseup", P), window.addEventListener("touchend", P));
|
|
5037
5037
|
}, Y = (B) => Array.isArray(t.modelValue) && typeof B == "number" ? t.modelValue[B] : Number(t.modelValue);
|
|
5038
|
-
return (B,
|
|
5038
|
+
return (B, U) => (r(), d("div", {
|
|
5039
5039
|
class: V(x.value)
|
|
5040
5040
|
}, [
|
|
5041
5041
|
e.hiddenRange ? R("", !0) : (r(), d("div", Si, D(+e.min), 1)),
|
|
@@ -5044,18 +5044,18 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
5044
5044
|
ref: s,
|
|
5045
5045
|
style: E($.value),
|
|
5046
5046
|
class: V(h.value),
|
|
5047
|
-
onClick: J(
|
|
5047
|
+
onClick: J(q, ["stop"])
|
|
5048
5048
|
}, [
|
|
5049
5049
|
m.value.length > 0 ? (r(), d("div", Ci, [
|
|
5050
|
-
(r(!0), d(K, null, ae(m.value, (
|
|
5051
|
-
key:
|
|
5052
|
-
class: V(w(
|
|
5053
|
-
style: E(L(
|
|
5050
|
+
(r(!0), d(K, null, ae(m.value, (j) => (r(), d("span", {
|
|
5051
|
+
key: j,
|
|
5052
|
+
class: V(w(j)),
|
|
5053
|
+
style: E(L(j))
|
|
5054
5054
|
}, [
|
|
5055
|
-
ee(D(
|
|
5055
|
+
ee(D(j) + " ", 1),
|
|
5056
5056
|
u("span", {
|
|
5057
5057
|
class: "abl-range-tick",
|
|
5058
|
-
style: E(g(
|
|
5058
|
+
style: E(g(j))
|
|
5059
5059
|
}, null, 4)
|
|
5060
5060
|
], 6))), 128))
|
|
5061
5061
|
])) : R("", !0),
|
|
@@ -5063,24 +5063,24 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
5063
5063
|
class: "abl-range-bar",
|
|
5064
5064
|
style: E(N.value)
|
|
5065
5065
|
}, [
|
|
5066
|
-
e.range ? (r(), d(K, { key: 0 }, ae([0, 1], (
|
|
5067
|
-
key:
|
|
5066
|
+
e.range ? (r(), d(K, { key: 0 }, ae([0, 1], (j) => u("div", {
|
|
5067
|
+
key: j,
|
|
5068
5068
|
role: "slider",
|
|
5069
|
-
class: V({ "abl-range-button-wrapper-left":
|
|
5069
|
+
class: V({ "abl-range-button-wrapper-left": j == 0, "abl-range-button-wrapper-right": j == 1 }),
|
|
5070
5070
|
tabindex: e.disabled ? -1 : 0,
|
|
5071
5071
|
"aria-valuemin": +e.min,
|
|
5072
|
-
"aria-valuenow": Y(
|
|
5072
|
+
"aria-valuenow": Y(j),
|
|
5073
5073
|
"aria-valuemax": +e.max,
|
|
5074
5074
|
"aria-orientation": "horizontal",
|
|
5075
5075
|
ref_for: !0,
|
|
5076
5076
|
ref: (te) => {
|
|
5077
|
-
v.value[
|
|
5077
|
+
v.value[j] = te;
|
|
5078
5078
|
},
|
|
5079
5079
|
onTouchstartPassive: (te) => {
|
|
5080
|
-
typeof
|
|
5080
|
+
typeof j == "number" && (a.value = j), T(te);
|
|
5081
5081
|
},
|
|
5082
5082
|
onMousedown: (te) => {
|
|
5083
|
-
typeof
|
|
5083
|
+
typeof j == "number" && (a.value = j), T(te);
|
|
5084
5084
|
}
|
|
5085
5085
|
}, [
|
|
5086
5086
|
B.$slots.button ? z(B.$slots, "button", { key: 0 }, void 0, !0) : (r(), d("div", {
|
|
@@ -5090,9 +5090,9 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
5090
5090
|
}, [
|
|
5091
5091
|
e.showTooltip ? (r(), d("div", {
|
|
5092
5092
|
key: 0,
|
|
5093
|
-
class: V(["abl-handle-tooltip", [{ "display-tooltip": a.value ===
|
|
5093
|
+
class: V(["abl-handle-tooltip", [{ "display-tooltip": a.value === j && _.value }]])
|
|
5094
5094
|
}, [
|
|
5095
|
-
ee(D(Y(
|
|
5095
|
+
ee(D(Y(j)) + " ", 1),
|
|
5096
5096
|
Vi
|
|
5097
5097
|
], 2)) : R("", !0)
|
|
5098
5098
|
], 4))
|
|
@@ -5107,11 +5107,11 @@ const ul = (e) => (ye("data-v-f4c52821"), e = e(), be(), e), Si = {
|
|
|
5107
5107
|
ref_key: "buttonRef",
|
|
5108
5108
|
ref: y,
|
|
5109
5109
|
"aria-orientation": "horizontal",
|
|
5110
|
-
onTouchstart:
|
|
5111
|
-
T(
|
|
5110
|
+
onTouchstart: U[0] || (U[0] = (j) => {
|
|
5111
|
+
T(j);
|
|
5112
5112
|
}),
|
|
5113
|
-
onMousedown:
|
|
5114
|
-
T(
|
|
5113
|
+
onMousedown: U[1] || (U[1] = (j) => {
|
|
5114
|
+
T(j);
|
|
5115
5115
|
})
|
|
5116
5116
|
}, [
|
|
5117
5117
|
B.$slots.button ? z(B.$slots, "button", { key: 0 }, void 0, !0) : (r(), d("div", {
|