@mobileaction/action-kit 1.1.42 → 1.1.44
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/action-kit.js +4 -4
- package/dist/action-kit.mjs +139 -139
- package/package.json +1 -1
package/dist/action-kit.mjs
CHANGED
|
@@ -88,10 +88,10 @@ const ie = (a, s) => {
|
|
|
88
88
|
onKeyup: u,
|
|
89
89
|
role: "button"
|
|
90
90
|
}, g.$attrs, { "prefix-cls": "antd-btn" }), W({ _: 2 }, [
|
|
91
|
-
U(g.$slots, (z,
|
|
92
|
-
name:
|
|
91
|
+
U(g.$slots, (z, I) => ({
|
|
92
|
+
name: I,
|
|
93
93
|
fn: v(() => [
|
|
94
|
-
_(g.$slots,
|
|
94
|
+
_(g.$slots, I)
|
|
95
95
|
])
|
|
96
96
|
})),
|
|
97
97
|
t(i) ? {
|
|
@@ -657,16 +657,16 @@ const ks = {
|
|
|
657
657
|
e?.dropdownClassName,
|
|
658
658
|
"ma-select-dropdown",
|
|
659
659
|
!e?.mode && (o?.prefixIcon || e?.prefixIcon) ? "ma-select-dropdown--has-prefix" : null
|
|
660
|
-
].join(" ")), z = c(() => e?.loading ? "loader" : e?.suffixIcon),
|
|
660
|
+
].join(" ")), z = c(() => e?.loading ? "loader" : e?.suffixIcon), I = c(() => Object.keys(o).filter((F) => !["option"].includes(F))), A = c(() => e?.showArrow || !e?.mode), P = () => {
|
|
661
661
|
i.value = !0;
|
|
662
662
|
}, C = (F) => {
|
|
663
663
|
i.value = F, l.value = "";
|
|
664
|
-
}, T = c(() => !r.value && e?.showSearch),
|
|
664
|
+
}, T = c(() => !r.value && e?.showSearch), S = () => typeof window.orientation < "u" || navigator.userAgent.indexOf("Mobile") !== -1 ? window.innerHeight : e?.listHeight, j = () => {
|
|
665
665
|
i.value = !1;
|
|
666
666
|
};
|
|
667
667
|
return (F, x) => (n(), m(t(Ue), M({
|
|
668
668
|
value: t(u),
|
|
669
|
-
"onUpdate:value": x[1] || (x[1] = (
|
|
669
|
+
"onUpdate:value": x[1] || (x[1] = (b) => J(u) ? u.value = b : null)
|
|
670
670
|
}, F.$attrs, {
|
|
671
671
|
class: t(g),
|
|
672
672
|
allowClear: e?.allowClear,
|
|
@@ -684,7 +684,7 @@ const ks = {
|
|
|
684
684
|
showSearch: t(T),
|
|
685
685
|
showArrow: t(A),
|
|
686
686
|
mode: e?.mode,
|
|
687
|
-
"list-height":
|
|
687
|
+
"list-height": S(),
|
|
688
688
|
size: e?.size,
|
|
689
689
|
open: i.value,
|
|
690
690
|
onClick: P,
|
|
@@ -712,17 +712,17 @@ const ks = {
|
|
|
712
712
|
]),
|
|
713
713
|
_: 2
|
|
714
714
|
}, [
|
|
715
|
-
U(t(
|
|
716
|
-
name:
|
|
715
|
+
U(t(I), (b) => ({
|
|
716
|
+
name: b,
|
|
717
717
|
fn: v(() => [
|
|
718
|
-
_(F.$slots,
|
|
718
|
+
_(F.$slots, b)
|
|
719
719
|
])
|
|
720
720
|
})),
|
|
721
721
|
F.$slots.option ? {
|
|
722
722
|
name: "option",
|
|
723
|
-
fn: v(({ label:
|
|
723
|
+
fn: v(({ label: b, value: N }) => [
|
|
724
724
|
_(F.$slots, "option", {
|
|
725
|
-
label:
|
|
725
|
+
label: b,
|
|
726
726
|
value: N
|
|
727
727
|
})
|
|
728
728
|
]),
|
|
@@ -760,11 +760,11 @@ const ks = {
|
|
|
760
760
|
},
|
|
761
761
|
t(r) && i.value ? {
|
|
762
762
|
name: "dropdownRender",
|
|
763
|
-
fn: v(({ menuNode:
|
|
763
|
+
fn: v(({ menuNode: b }) => [
|
|
764
764
|
B(As, {
|
|
765
765
|
filter: l.value,
|
|
766
766
|
"onUpdate:filter": x[0] || (x[0] = (N) => l.value = N),
|
|
767
|
-
menu:
|
|
767
|
+
menu: b,
|
|
768
768
|
onCloseDropdown: j
|
|
769
769
|
}, null, 8, ["filter", "menu"])
|
|
770
770
|
]),
|
|
@@ -830,42 +830,42 @@ const Ds = ["for"], Ls = {
|
|
|
830
830
|
get() {
|
|
831
831
|
return e.value;
|
|
832
832
|
},
|
|
833
|
-
set(
|
|
834
|
-
s("update:value",
|
|
833
|
+
set(b) {
|
|
834
|
+
s("update:value", b);
|
|
835
835
|
}
|
|
836
836
|
}), d = c(() => e.amountCurrency ? Cs[e.amountCurrency] : null), z = c({
|
|
837
837
|
get() {
|
|
838
838
|
return e.amountCurrency;
|
|
839
839
|
},
|
|
840
|
-
set(
|
|
841
|
-
s("update:amountCurrency",
|
|
840
|
+
set(b) {
|
|
841
|
+
s("update:amountCurrency", b);
|
|
842
842
|
}
|
|
843
|
-
}),
|
|
844
|
-
let
|
|
845
|
-
return o?.class && delete
|
|
846
|
-
}), T = (
|
|
847
|
-
s("change",
|
|
848
|
-
},
|
|
849
|
-
s("currency-change",
|
|
843
|
+
}), I = c(() => e.type === K.password ? je : Ve), A = c(() => e.type === K.password ? { "input-prefix-cls": "antd-input" } : { "prefix-cls": "antd-input" }), P = c(() => e.type === K.url ? "https" : e?.addonBefore), C = c(() => {
|
|
844
|
+
let b = { ...o, ...A.value };
|
|
845
|
+
return o?.class && delete b?.class, b;
|
|
846
|
+
}), T = (b) => {
|
|
847
|
+
s("change", b);
|
|
848
|
+
}, S = (b) => {
|
|
849
|
+
s("currency-change", b);
|
|
850
850
|
}, j = () => {
|
|
851
851
|
l.value.focus();
|
|
852
|
-
}, F = (
|
|
853
|
-
s("focus",
|
|
854
|
-
}, x = (
|
|
855
|
-
s("focusout",
|
|
852
|
+
}, F = (b) => {
|
|
853
|
+
s("focus", b);
|
|
854
|
+
}, x = (b) => {
|
|
855
|
+
s("focusout", b);
|
|
856
856
|
};
|
|
857
|
-
return (
|
|
857
|
+
return (b, N) => (n(), p("div", {
|
|
858
858
|
class: R(t(r))
|
|
859
859
|
}, [
|
|
860
|
-
_(
|
|
860
|
+
_(b.$slots, "title"),
|
|
861
861
|
e.title ? (n(), p("label", {
|
|
862
862
|
key: 0,
|
|
863
863
|
onClick: j,
|
|
864
864
|
class: "ak-input__title",
|
|
865
|
-
for:
|
|
865
|
+
for: b.$attrs?.id
|
|
866
866
|
}, w(e.title), 9, Ds)) : f("", !0),
|
|
867
867
|
e.type !== "textarea" ? (n(), p("div", Ls, [
|
|
868
|
-
(n(), m(ee(t(
|
|
868
|
+
(n(), m(ee(t(I)), M({
|
|
869
869
|
value: t(g),
|
|
870
870
|
"onUpdate:value": N[1] || (N[1] = (O) => J(g) ? g.value = O : null)
|
|
871
871
|
}, t(C), {
|
|
@@ -898,7 +898,7 @@ const Ds = ["for"], Ls = {
|
|
|
898
898
|
key: 0,
|
|
899
899
|
value: t(z),
|
|
900
900
|
"onUpdate:value": N[0] || (N[0] = (O) => J(z) ? z.value = O : null),
|
|
901
|
-
onChange:
|
|
901
|
+
onChange: S,
|
|
902
902
|
dropdownClassName: "ak-input__input__ma-select__dropdown",
|
|
903
903
|
options: t(ws),
|
|
904
904
|
disabled: e.disabled,
|
|
@@ -912,10 +912,10 @@ const Ds = ["for"], Ls = {
|
|
|
912
912
|
]),
|
|
913
913
|
_: 2
|
|
914
914
|
}, [
|
|
915
|
-
U(
|
|
915
|
+
U(b.$slots, (O, G) => ({
|
|
916
916
|
name: G,
|
|
917
917
|
fn: v(() => [
|
|
918
|
-
_(
|
|
918
|
+
_(b.$slots, G)
|
|
919
919
|
])
|
|
920
920
|
}))
|
|
921
921
|
]), 1040, ["value", "allowClear", "type", "disabled", "placeholder", "addonBefore", "addonAfter", "class"]))
|
|
@@ -931,14 +931,14 @@ const Ds = ["for"], Ls = {
|
|
|
931
931
|
ref_key: "inputRef",
|
|
932
932
|
ref: l
|
|
933
933
|
}), W({ _: 2 }, [
|
|
934
|
-
U(
|
|
934
|
+
U(b.$slots, (O, G) => ({
|
|
935
935
|
name: G,
|
|
936
936
|
fn: v(() => [
|
|
937
|
-
_(
|
|
937
|
+
_(b.$slots, G)
|
|
938
938
|
])
|
|
939
939
|
}))
|
|
940
940
|
]), 1040, ["value", "class", "disabled", "placeholder"])),
|
|
941
|
-
_(
|
|
941
|
+
_(b.$slots, "hint"),
|
|
942
942
|
e.hintText ? (n(), p("div", Fs, w(e.hintText), 1)) : f("", !0)
|
|
943
943
|
], 2));
|
|
944
944
|
}
|
|
@@ -1087,10 +1087,10 @@ const Vs = {
|
|
|
1087
1087
|
switch (C.code) {
|
|
1088
1088
|
case "Backspace":
|
|
1089
1089
|
case "Delete":
|
|
1090
|
-
A("", T),
|
|
1090
|
+
A("", T), I();
|
|
1091
1091
|
break;
|
|
1092
1092
|
case "ArrowLeft":
|
|
1093
|
-
C.preventDefault(),
|
|
1093
|
+
C.preventDefault(), I();
|
|
1094
1094
|
break;
|
|
1095
1095
|
case "ArrowRight":
|
|
1096
1096
|
C.preventDefault(), z();
|
|
@@ -1101,14 +1101,14 @@ const Vs = {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}, z = () => {
|
|
1103
1103
|
o.value < e.length && o.value++;
|
|
1104
|
-
},
|
|
1104
|
+
}, I = () => {
|
|
1105
1105
|
e.length >= o.value && o.value > 0 && o.value--;
|
|
1106
1106
|
}, A = (C, T) => {
|
|
1107
1107
|
l.value[T] = C;
|
|
1108
1108
|
}, P = (C, T) => {
|
|
1109
1109
|
C.preventDefault();
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1110
|
+
const S = C.clipboardData.getData("text/plain").replaceAll(" ", "").replaceAll("-", "").slice(0, e.length);
|
|
1111
|
+
S.length === 1 && S.match(/^\d+$/) ? l.value[T] = S : S.match(/^\d+$/) && (l.value = S.split(""));
|
|
1112
1112
|
};
|
|
1113
1113
|
return oe(
|
|
1114
1114
|
() => l.value,
|
|
@@ -1123,15 +1123,15 @@ const Vs = {
|
|
|
1123
1123
|
C !== l.value.join("") && C && C.match(/^\d+$/) && (l.value = C.split("").slice(0, e.length));
|
|
1124
1124
|
}
|
|
1125
1125
|
), (C, T) => (n(), p("div", M({ class: t(i) }, C.$attrs), [
|
|
1126
|
-
(n(!0), p(H, null, U(e.length, (
|
|
1127
|
-
focus: o.value ===
|
|
1128
|
-
key:
|
|
1126
|
+
(n(!0), p(H, null, U(e.length, (S) => (n(), m(qs, {
|
|
1127
|
+
focus: o.value === S - 1,
|
|
1128
|
+
key: S,
|
|
1129
1129
|
placeholder: t(r),
|
|
1130
|
-
value: l.value[
|
|
1130
|
+
value: l.value[S - 1],
|
|
1131
1131
|
disabled: e.disabled,
|
|
1132
|
-
onFocus: (j) => g(
|
|
1133
|
-
onKeydown: (j) => d(j,
|
|
1134
|
-
onPaste: (j) => P(j,
|
|
1132
|
+
onFocus: (j) => g(S - 1),
|
|
1133
|
+
onKeydown: (j) => d(j, S - 1),
|
|
1134
|
+
onPaste: (j) => P(j, S - 1),
|
|
1135
1135
|
class: "ma-numeric-input__input"
|
|
1136
1136
|
}, null, 8, ["focus", "placeholder", "value", "disabled", "onFocus", "onKeydown", "onPaste"]))), 128))
|
|
1137
1137
|
], 16));
|
|
@@ -1477,22 +1477,22 @@ const Tn = [
|
|
|
1477
1477
|
}
|
|
1478
1478
|
);
|
|
1479
1479
|
const g = async () => {
|
|
1480
|
-
const { default:
|
|
1481
|
-
l =
|
|
1480
|
+
const { default: I } = await import("./lottie_light-b08f9446.mjs").then((A) => A.l);
|
|
1481
|
+
l = I;
|
|
1482
1482
|
}, d = async () => {
|
|
1483
1483
|
try {
|
|
1484
|
-
const { default:
|
|
1484
|
+
const { default: I } = await ie(/* @__PURE__ */ Object.assign({ "./files/fly-waiting.json": () => import("./fly-waiting-bc221374.mjs"), "./files/no-data-found.json": () => import("./no-data-found-98af8e80.mjs"), "./files/rocket.json": () => import("./rocket-21431704.mjs"), "./files/rounded-loading.json": () => import("./rounded-loading-d3184421.mjs"), "./files/sad-not-found.json": () => import("./sad-not-found-44e231b1.mjs"), "./files/success-confetti.json": () => import("./success-confetti-b9594f98.mjs") }), `./files/${o.name}.json`);
|
|
1485
1485
|
r.value = l.loadAnimation({
|
|
1486
1486
|
container: i.value,
|
|
1487
1487
|
loop: o.loop,
|
|
1488
1488
|
autoplay: o.autoplay,
|
|
1489
|
-
animationData:
|
|
1489
|
+
animationData: I,
|
|
1490
1490
|
rendererSettings: o?.rendererSettings
|
|
1491
1491
|
}), r.value.onComplete = () => e("onComplete"), r.value.addEventListener("DOMLoaded", function() {
|
|
1492
1492
|
e("onLoaded");
|
|
1493
1493
|
});
|
|
1494
|
-
} catch (
|
|
1495
|
-
e("onError",
|
|
1494
|
+
} catch (I) {
|
|
1495
|
+
e("onError", I);
|
|
1496
1496
|
}
|
|
1497
1497
|
}, z = () => {
|
|
1498
1498
|
r.value && r.value.destroy();
|
|
@@ -1501,7 +1501,7 @@ const Tn = [
|
|
|
1501
1501
|
await g(), d();
|
|
1502
1502
|
}), he(() => {
|
|
1503
1503
|
z();
|
|
1504
|
-
}), (
|
|
1504
|
+
}), (I, A) => (n(), p("div", {
|
|
1505
1505
|
ref_key: "animationRef",
|
|
1506
1506
|
ref: i,
|
|
1507
1507
|
class: "ma-animation",
|
|
@@ -1569,7 +1569,7 @@ const Tn = [
|
|
|
1569
1569
|
), i = c(
|
|
1570
1570
|
() => e.type === "error" ? "danger" : e.type === "warning" ? "warning" : "info"
|
|
1571
1571
|
), r = c(
|
|
1572
|
-
() =>
|
|
1572
|
+
() => I?.footer || e.okText || e.cancelText
|
|
1573
1573
|
), u = c(() => [
|
|
1574
1574
|
"ma-modal",
|
|
1575
1575
|
"ak-modal",
|
|
@@ -1581,7 +1581,7 @@ const Tn = [
|
|
|
1581
1581
|
o.value = !1, s("cancel");
|
|
1582
1582
|
}, z = () => {
|
|
1583
1583
|
s("ok");
|
|
1584
|
-
},
|
|
1584
|
+
}, I = ne();
|
|
1585
1585
|
return (A, P) => (n(), m(t(Ze), M(A.$attrs, {
|
|
1586
1586
|
visible: t(o),
|
|
1587
1587
|
"onUpdate:visible": P[0] || (P[0] = (C) => J(o) ? o.value = C : null),
|
|
@@ -1732,7 +1732,7 @@ const ko = {
|
|
|
1732
1732
|
o.value = 0;
|
|
1733
1733
|
}, z = (P, C) => {
|
|
1734
1734
|
!e?.allowHalf || e.disabled || (P.offsetX < P.target.clientWidth / 2 ? o.value = C - 0.5 : o.value = C);
|
|
1735
|
-
},
|
|
1735
|
+
}, I = (P) => {
|
|
1736
1736
|
e?.disabled || (P.key === "ArrowRight" && e.value < 5 ? A(e.value + (e.allowHalf ? 0.5 : 1)) : P.key === "ArrowLeft" && e.value > 0 && A(e.value - (e.allowHalf ? 0.5 : 1)));
|
|
1737
1737
|
}, A = (P) => {
|
|
1738
1738
|
s("update:value", P), s("change", P);
|
|
@@ -1740,15 +1740,15 @@ const ko = {
|
|
|
1740
1740
|
return (P, C) => (n(), p("ul", {
|
|
1741
1741
|
class: R(t(l)),
|
|
1742
1742
|
onMouseleave: d,
|
|
1743
|
-
onKeydown:
|
|
1743
|
+
onKeydown: I,
|
|
1744
1744
|
tabindex: t(r)
|
|
1745
1745
|
}, [
|
|
1746
1746
|
(n(), p(H, null, U(5, (T) => h("li", {
|
|
1747
1747
|
class: "ak-rate__item",
|
|
1748
1748
|
key: T,
|
|
1749
|
-
onMousemove: (
|
|
1750
|
-
onMouseover: (
|
|
1751
|
-
onClick: C[0] || (C[0] = (
|
|
1749
|
+
onMousemove: (S) => z(S, T),
|
|
1750
|
+
onMouseover: (S) => g(T),
|
|
1751
|
+
onClick: C[0] || (C[0] = (S) => u())
|
|
1752
1752
|
}, [
|
|
1753
1753
|
B($o, {
|
|
1754
1754
|
"star-rate": T,
|
|
@@ -1965,12 +1965,12 @@ const le = (a) => {
|
|
|
1965
1965
|
const l = E(0);
|
|
1966
1966
|
return { progress: l, upload: async (r, u) => {
|
|
1967
1967
|
const g = new FormData();
|
|
1968
|
-
g.append(o, r.file), Object.entries(e).forEach(([z,
|
|
1969
|
-
g.append(z,
|
|
1968
|
+
g.append(o, r.file), Object.entries(e).forEach(([z, I]) => {
|
|
1969
|
+
g.append(z, I);
|
|
1970
1970
|
});
|
|
1971
1971
|
const d = new XMLHttpRequest();
|
|
1972
|
-
d.open("POST", a), Object.entries(s).forEach(([z,
|
|
1973
|
-
d.setRequestHeader(z,
|
|
1972
|
+
d.open("POST", a), Object.entries(s).forEach(([z, I]) => {
|
|
1973
|
+
d.setRequestHeader(z, I);
|
|
1974
1974
|
}), d.upload.onprogress = (z) => {
|
|
1975
1975
|
z.lengthComputable && (l.value = z.loaded / z.total * 100, u(q.uploading, l.value));
|
|
1976
1976
|
}, d.onload = () => {
|
|
@@ -2096,8 +2096,8 @@ const le = (a) => {
|
|
|
2096
2096
|
get() {
|
|
2097
2097
|
return e.fileList;
|
|
2098
2098
|
},
|
|
2099
|
-
set(
|
|
2100
|
-
s("update:fileList",
|
|
2099
|
+
set(y) {
|
|
2100
|
+
s("update:fileList", y), s("change", y), e?.action && y.forEach(async (D, V) => {
|
|
2101
2101
|
if ([q.done, q.error].includes(
|
|
2102
2102
|
D.status
|
|
2103
2103
|
))
|
|
@@ -2123,11 +2123,11 @@ const le = (a) => {
|
|
|
2123
2123
|
});
|
|
2124
2124
|
}
|
|
2125
2125
|
}), z = c(
|
|
2126
|
-
() => d.value.map((
|
|
2127
|
-
),
|
|
2126
|
+
() => d.value.map((y) => y.file.name).join(", ")
|
|
2127
|
+
), I = c(
|
|
2128
2128
|
() => e.type === "box" ? e.multiple ? !0 : !d.value.length : !0
|
|
2129
2129
|
), A = c(
|
|
2130
|
-
() => e.ordered &&
|
|
2130
|
+
() => e.ordered && S.value ? !1 : d.value.length ? e.showFileList : !1
|
|
2131
2131
|
), P = c(() => [
|
|
2132
2132
|
`ma-upload ma-upload--${e.type} ma-upload--${e.type}--${e.size}`,
|
|
2133
2133
|
{
|
|
@@ -2139,37 +2139,37 @@ const le = (a) => {
|
|
|
2139
2139
|
]), C = c(() => [
|
|
2140
2140
|
"ma-file-list",
|
|
2141
2141
|
{
|
|
2142
|
-
"only-file-list": !
|
|
2142
|
+
"only-file-list": !I.value
|
|
2143
2143
|
}
|
|
2144
2144
|
]), T = c(() => {
|
|
2145
|
-
const
|
|
2146
|
-
return ss[
|
|
2147
|
-
}),
|
|
2148
|
-
() => e.wait || d.value.some((
|
|
2149
|
-
), j = c(() => e?.disabled ||
|
|
2145
|
+
const y = e?.size ? Lo.indexOf(e.size) : 0;
|
|
2146
|
+
return ss[y];
|
|
2147
|
+
}), S = c(
|
|
2148
|
+
() => e.wait || d.value.some((y) => y.status === q.uploading)
|
|
2149
|
+
), j = c(() => e?.disabled || S.value), F = (y) => Array.from(y).find(
|
|
2150
2150
|
(D) => e?.maxFileSize && D.size > e.maxFileSize
|
|
2151
|
-
), x = (
|
|
2152
|
-
const D =
|
|
2151
|
+
), x = (y) => {
|
|
2152
|
+
const D = y.target;
|
|
2153
2153
|
D.files && pe(Array.from(D.files));
|
|
2154
|
-
},
|
|
2154
|
+
}, b = () => {
|
|
2155
2155
|
l.value?.click();
|
|
2156
|
-
}, N = (
|
|
2157
|
-
|
|
2156
|
+
}, N = (y) => {
|
|
2157
|
+
y.preventDefault();
|
|
2158
2158
|
}, O = () => {
|
|
2159
2159
|
i.value = !0;
|
|
2160
2160
|
}, G = () => {
|
|
2161
2161
|
i.value = !1;
|
|
2162
|
-
}, $e = (
|
|
2163
|
-
j.value ||
|
|
2164
|
-
Array.from(
|
|
2162
|
+
}, $e = (y) => {
|
|
2163
|
+
j.value || y.dataTransfer?.files && pe(
|
|
2164
|
+
Array.from(y.dataTransfer.files).filter((D) => e?.accept && !Ro(D, e.accept) ? (s("error", { file: D, message: "file type does not match!" }), !1) : !0)
|
|
2165
2165
|
);
|
|
2166
|
-
}, pe = (
|
|
2167
|
-
const D = F(
|
|
2166
|
+
}, pe = (y) => {
|
|
2167
|
+
const D = F(y);
|
|
2168
2168
|
if (D) {
|
|
2169
2169
|
s("error", { file: D, message: "File too large" });
|
|
2170
2170
|
return;
|
|
2171
2171
|
}
|
|
2172
|
-
const V = Array.from(
|
|
2172
|
+
const V = Array.from(y).filter(
|
|
2173
2173
|
(Z, se) => e?.maxCount ? se + 1 <= e.maxCount : !0
|
|
2174
2174
|
).map((Z) => ({
|
|
2175
2175
|
file: Z,
|
|
@@ -2179,31 +2179,31 @@ const le = (a) => {
|
|
|
2179
2179
|
response: null
|
|
2180
2180
|
}));
|
|
2181
2181
|
e.multiple ? d.value = [...d.value, ...V] : V.length && (d.value = [V[0]]);
|
|
2182
|
-
}, ae = (
|
|
2183
|
-
s("remove", d.value[
|
|
2184
|
-
}, ue = (
|
|
2185
|
-
const D = d.value[
|
|
2186
|
-
typeof D?.cancelRequest == "function" && D.cancelRequest(), ae(
|
|
2187
|
-
}, Ce = (
|
|
2188
|
-
|
|
2182
|
+
}, ae = (y) => {
|
|
2183
|
+
s("remove", d.value[y]), d.value = d.value.filter((D, V) => V !== y);
|
|
2184
|
+
}, ue = (y) => {
|
|
2185
|
+
const D = d.value[y];
|
|
2186
|
+
typeof D?.cancelRequest == "function" && D.cancelRequest(), ae(y);
|
|
2187
|
+
}, Ce = (y) => {
|
|
2188
|
+
y.stopPropagation(), d.value.forEach((D, V) => ue(V)), d.value = [];
|
|
2189
2189
|
};
|
|
2190
2190
|
return re(() => {
|
|
2191
|
-
r.forEach((
|
|
2192
|
-
o.value?.addEventListener(
|
|
2193
|
-
}), u.forEach((
|
|
2194
|
-
o.value?.addEventListener(
|
|
2195
|
-
}), g.forEach((
|
|
2196
|
-
o.value?.addEventListener(
|
|
2191
|
+
r.forEach((y) => {
|
|
2192
|
+
o.value?.addEventListener(y, N);
|
|
2193
|
+
}), u.forEach((y) => {
|
|
2194
|
+
o.value?.addEventListener(y, O);
|
|
2195
|
+
}), g.forEach((y) => {
|
|
2196
|
+
o.value?.addEventListener(y, G);
|
|
2197
2197
|
});
|
|
2198
2198
|
}), Se(() => {
|
|
2199
|
-
r.forEach((
|
|
2200
|
-
o.value?.removeEventListener(
|
|
2201
|
-
}), u.forEach((
|
|
2202
|
-
o.value?.removeEventListener(
|
|
2203
|
-
}), g.forEach((
|
|
2204
|
-
o.value?.removeEventListener(
|
|
2199
|
+
r.forEach((y) => {
|
|
2200
|
+
o.value?.removeEventListener(y, N);
|
|
2201
|
+
}), u.forEach((y) => {
|
|
2202
|
+
o.value?.removeEventListener(y, O);
|
|
2203
|
+
}), g.forEach((y) => {
|
|
2204
|
+
o.value?.removeEventListener(y, G);
|
|
2205
2205
|
});
|
|
2206
|
-
}), (
|
|
2206
|
+
}), (y, D) => (n(), p("div", M({ class: "ma-upload-wrapper" }, y.$attrs), [
|
|
2207
2207
|
X(h("div", {
|
|
2208
2208
|
ref_key: "uploadArea",
|
|
2209
2209
|
ref: o,
|
|
@@ -2225,10 +2225,10 @@ const le = (a) => {
|
|
|
2225
2225
|
type: a.fileList.length ? "primary" : "secondary",
|
|
2226
2226
|
variant: "dark",
|
|
2227
2227
|
icon: "export-2",
|
|
2228
|
-
onClick:
|
|
2228
|
+
onClick: b,
|
|
2229
2229
|
size: t(T),
|
|
2230
2230
|
disabled: t(j),
|
|
2231
|
-
loading: t(
|
|
2231
|
+
loading: t(S)
|
|
2232
2232
|
}, {
|
|
2233
2233
|
default: v(() => [
|
|
2234
2234
|
L(w(a.fileList.length ? t(z) : e?.title), 1)
|
|
@@ -2237,9 +2237,9 @@ const le = (a) => {
|
|
|
2237
2237
|
}, 8, ["type", "size", "disabled", "loading"])) : e.type === "small-box" ? (n(), p("div", {
|
|
2238
2238
|
key: 1,
|
|
2239
2239
|
class: "ma-upload__small_box",
|
|
2240
|
-
onClick:
|
|
2240
|
+
onClick: b
|
|
2241
2241
|
}, [
|
|
2242
|
-
t(
|
|
2242
|
+
t(S) ? (n(), m(ve, {
|
|
2243
2243
|
key: 0,
|
|
2244
2244
|
type: "three-circles",
|
|
2245
2245
|
color: "blue"
|
|
@@ -2248,19 +2248,19 @@ const le = (a) => {
|
|
|
2248
2248
|
name: "export-2-bulk"
|
|
2249
2249
|
})),
|
|
2250
2250
|
h("span", Zo, [
|
|
2251
|
-
t(
|
|
2251
|
+
t(S) ? (n(), p(H, { key: 0 }, [
|
|
2252
2252
|
L(" Uploading... ")
|
|
2253
2253
|
], 64)) : (n(), p(H, { key: 1 }, [
|
|
2254
2254
|
L(w(e?.title) + " ", 1),
|
|
2255
|
-
_(
|
|
2255
|
+
_(y.$slots, "small-box-title")
|
|
2256
2256
|
], 64))
|
|
2257
2257
|
])
|
|
2258
2258
|
])) : (n(), p("div", {
|
|
2259
2259
|
key: 2,
|
|
2260
2260
|
class: "ma-upload__box",
|
|
2261
|
-
onClick:
|
|
2261
|
+
onClick: b
|
|
2262
2262
|
}, [
|
|
2263
|
-
e.ordered && t(
|
|
2263
|
+
e.ordered && t(S) ? (n(), p(H, { key: 0 }, [
|
|
2264
2264
|
B(ve, {
|
|
2265
2265
|
type: "three-circles",
|
|
2266
2266
|
color: "blue"
|
|
@@ -2283,16 +2283,16 @@ const le = (a) => {
|
|
|
2283
2283
|
]),
|
|
2284
2284
|
e?.title ? (n(), p("span", Qo, [
|
|
2285
2285
|
L(w(e?.title) + " ", 1),
|
|
2286
|
-
_(
|
|
2286
|
+
_(y.$slots, "box-title")
|
|
2287
2287
|
])) : f("", !0),
|
|
2288
2288
|
e?.description ? (n(), p("span", et, [
|
|
2289
2289
|
L(w(e?.description) + " ", 1),
|
|
2290
|
-
_(
|
|
2290
|
+
_(y.$slots, "box-description")
|
|
2291
2291
|
])) : f("", !0)
|
|
2292
2292
|
], 64))
|
|
2293
2293
|
]))
|
|
2294
2294
|
], 42, Ko), [
|
|
2295
|
-
[Q, t(
|
|
2295
|
+
[Q, t(I)]
|
|
2296
2296
|
]),
|
|
2297
2297
|
t(A) ? (n(), p("div", {
|
|
2298
2298
|
key: 0,
|
|
@@ -2962,29 +2962,29 @@ const oa = [
|
|
|
2962
2962
|
return e?.value;
|
|
2963
2963
|
},
|
|
2964
2964
|
set(x) {
|
|
2965
|
-
s("update:value", x), u.value =
|
|
2965
|
+
s("update:value", x), u.value = -1;
|
|
2966
2966
|
}
|
|
2967
|
-
}), d = c(() => e?.avatarUrl ? K.userInfo : K.text), z = c(() => !!o.default),
|
|
2967
|
+
}), d = c(() => e?.avatarUrl ? K.userInfo : K.text), z = c(() => !!o.default), I = c(
|
|
2968
2968
|
() => e.options.filter(
|
|
2969
2969
|
(x) => e.filterFn(g.value || "", x)
|
|
2970
2970
|
)
|
|
2971
2971
|
), A = (x) => {
|
|
2972
|
-
const
|
|
2973
|
-
g.value =
|
|
2974
|
-
}, P = async (
|
|
2975
|
-
const
|
|
2976
|
-
s("search",
|
|
2972
|
+
const b = x?.value || x?.label || x;
|
|
2973
|
+
g.value = b, z.value && r.value && (r.value.value = b), l.value = !1;
|
|
2974
|
+
}, P = async () => {
|
|
2975
|
+
const x = `${r.value?.value}`;
|
|
2976
|
+
s("search", x), z.value && s("update:value", x), l.value || (l.value = !0);
|
|
2977
2977
|
}, C = (x) => {
|
|
2978
2978
|
l.value = !0;
|
|
2979
2979
|
}, T = (x) => {
|
|
2980
2980
|
l.value && i.value && x.target instanceof Node && !i.value.contains(x.target) && (l.value = !1);
|
|
2981
|
-
},
|
|
2982
|
-
x.key === "ArrowUp" && u.value > -1 ? u.value-- : x.key === "ArrowDown" && u.value <
|
|
2981
|
+
}, S = (x) => {
|
|
2982
|
+
x.key === "ArrowUp" && u.value > -1 ? u.value-- : x.key === "ArrowDown" && u.value < I.value.length ? u.value++ : x.key === "Enter" && I.value[u.value] && A(I.value[u.value]);
|
|
2983
2983
|
}, j = (x) => {
|
|
2984
2984
|
u.value = x;
|
|
2985
|
-
}, F = (x,
|
|
2985
|
+
}, F = (x, b) => ({
|
|
2986
2986
|
"active-option": x?.value === g.value,
|
|
2987
|
-
"current-option": u.value ===
|
|
2987
|
+
"current-option": u.value === b
|
|
2988
2988
|
});
|
|
2989
2989
|
return oe(
|
|
2990
2990
|
() => e.open,
|
|
@@ -2994,10 +2994,10 @@ const oa = [
|
|
|
2994
2994
|
}, 0);
|
|
2995
2995
|
}
|
|
2996
2996
|
), re(() => {
|
|
2997
|
-
i.value && (i.value.addEventListener("input", P), i.value.addEventListener("keydown",
|
|
2997
|
+
i.value && (i.value.addEventListener("input", P), i.value.addEventListener("keydown", S), document.addEventListener("click", T), r.value = i.value.querySelector('input[type="text"]'), r.value && r.value.addEventListener("focus", C));
|
|
2998
2998
|
}), he(() => {
|
|
2999
|
-
i.value && (i.value.removeEventListener("input", P), document.removeEventListener("click", T), i.value.removeEventListener("keydown",
|
|
3000
|
-
}), (x,
|
|
2999
|
+
i.value && (i.value.removeEventListener("input", P), document.removeEventListener("click", T), i.value.removeEventListener("keydown", S), r.value && r.value.removeEventListener("focus", C));
|
|
3000
|
+
}), (x, b) => (n(), p("div", M({
|
|
3001
3001
|
class: "ak-autocomplete-wrapper",
|
|
3002
3002
|
ref_key: "autoComplete",
|
|
3003
3003
|
ref: i
|
|
@@ -3006,12 +3006,12 @@ const oa = [
|
|
|
3006
3006
|
"overlay-class-name": "ak-autocomplete__dropdown",
|
|
3007
3007
|
trigger: [],
|
|
3008
3008
|
visible: l.value,
|
|
3009
|
-
"onUpdate:visible":
|
|
3009
|
+
"onUpdate:visible": b[1] || (b[1] = (N) => l.value = N)
|
|
3010
3010
|
}, {
|
|
3011
3011
|
overlay: v(() => [
|
|
3012
3012
|
h("div", Rt, [
|
|
3013
3013
|
h("ul", null, [
|
|
3014
|
-
(n(!0), p(H, null, U(t(
|
|
3014
|
+
(n(!0), p(H, null, U(t(I), (N, O) => (n(), p("li", {
|
|
3015
3015
|
class: R(F(N, O)),
|
|
3016
3016
|
onMousedown: ye((G) => A(N), ["prevent"]),
|
|
3017
3017
|
onMouseover: (G) => j(O),
|
|
@@ -3044,7 +3044,7 @@ const oa = [
|
|
|
3044
3044
|
avatarUrl: e?.avatarUrl,
|
|
3045
3045
|
type: t(d),
|
|
3046
3046
|
value: t(g),
|
|
3047
|
-
"onUpdate:value":
|
|
3047
|
+
"onUpdate:value": b[0] || (b[0] = (N) => J(g) ? g.value = N : null)
|
|
3048
3048
|
}, null, 8, ["class", "placeholder", "prefixIcon", "avatarUrl", "type", "value"]))
|
|
3049
3049
|
])
|
|
3050
3050
|
]),
|