@mobileaction/action-kit 1.1.24 → 1.1.25
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 +2 -2
- package/dist/action-kit.mjs +165 -167
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/action-kit.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as c, defineAsyncComponent as be, openBlock as a, createBlock as m, resolveDynamicComponent as ue, unref as t, normalizeClass as P, mergeProps as
|
|
1
|
+
import { defineComponent as $, computed as c, defineAsyncComponent as be, openBlock as a, createBlock as m, resolveDynamicComponent as ue, unref as t, normalizeClass as P, mergeProps as z, createSlots as O, renderList as L, withCtx as f, renderSlot as k, createVNode as I, createTextVNode as U, toDisplayString as C, createElementBlock as d, isRef as W, createCommentVNode as y, createElementVNode as b, ref as F, Fragment as K, useSlots as Q, useAttrs as ke, watch as X, Transition as de, onMounted as me, onBeforeUnmount as $e, normalizeStyle as ge, h as we, createApp as Ce, onUnmounted as xe, withDirectives as Me, withModifiers as ze, vShow as Be, reactive as Ie, readonly as Se, toRefs as Te } from "vue";
|
|
2
2
|
import { Button as ve, Switch as Ae, Tooltip as Ne, Form as Re, FormItem as De, Avatar as Fe, Select as Pe, InputPassword as Le, Input as Ee, Textarea as Ve, SelectOption as je, Checkbox as qe, CheckboxGroup as Ue, Radio as Oe, RadioGroup as He, Alert as Ge, Modal as Ke, Dropdown as We } from "ant-design-vue";
|
|
3
3
|
const oe = (n, o) => {
|
|
4
4
|
const e = n[o];
|
|
@@ -74,7 +74,7 @@ const oe = (n, o) => {
|
|
|
74
74
|
"ak-button--disabled": l.value
|
|
75
75
|
}
|
|
76
76
|
]), i = c(() => o?.loading || o?.icon), l = c(() => o?.disabled || o?.loading);
|
|
77
|
-
return (r, u) => (a(), m(t(ve),
|
|
77
|
+
return (r, u) => (a(), m(t(ve), z({
|
|
78
78
|
class: t(s),
|
|
79
79
|
href: o.href,
|
|
80
80
|
target: o.target,
|
|
@@ -82,7 +82,7 @@ const oe = (n, o) => {
|
|
|
82
82
|
type: t(e),
|
|
83
83
|
role: "button"
|
|
84
84
|
}, r.$attrs, { "prefix-cls": "antd-btn" }), O({ _: 2 }, [
|
|
85
|
-
L(r.$slots, (
|
|
85
|
+
L(r.$slots, (v, p) => ({
|
|
86
86
|
name: p,
|
|
87
87
|
fn: f(() => [
|
|
88
88
|
k(r.$slots, p)
|
|
@@ -169,14 +169,14 @@ const Zs = [
|
|
|
169
169
|
]), s = c(
|
|
170
170
|
() => o.loading ? "loader" : o?.showClose ? "close-circle" : o?.tracked ? "tick-circle-bold" : "add"
|
|
171
171
|
), i = c(() => o.size === "lg" ? "sm" : "xs");
|
|
172
|
-
return (l, r) => (a(), m(t(ve),
|
|
172
|
+
return (l, r) => (a(), m(t(ve), z(l.$attrs, {
|
|
173
173
|
class: t(e),
|
|
174
174
|
disabled: o?.disabled || o?.loading,
|
|
175
175
|
role: "button",
|
|
176
176
|
"prefix-cls": "antd-btn"
|
|
177
177
|
}), O({
|
|
178
178
|
icon: f(() => [
|
|
179
|
-
|
|
179
|
+
I(w, {
|
|
180
180
|
spin: o?.loading,
|
|
181
181
|
name: t(s),
|
|
182
182
|
size: t(i)
|
|
@@ -187,10 +187,10 @@ const Zs = [
|
|
|
187
187
|
]),
|
|
188
188
|
_: 2
|
|
189
189
|
}, [
|
|
190
|
-
L(l.$slots, (u,
|
|
191
|
-
name:
|
|
190
|
+
L(l.$slots, (u, v) => ({
|
|
191
|
+
name: v,
|
|
192
192
|
fn: f(() => [
|
|
193
|
-
k(l.$slots,
|
|
193
|
+
k(l.$slots, v)
|
|
194
194
|
])
|
|
195
195
|
}))
|
|
196
196
|
]), 1040, ["class", "disabled"]));
|
|
@@ -244,7 +244,7 @@ const at = [
|
|
|
244
244
|
return (l, r) => (a(), d("div", {
|
|
245
245
|
class: P(t(i))
|
|
246
246
|
}, [
|
|
247
|
-
|
|
247
|
+
I(t(Ae), z({
|
|
248
248
|
class: "ma-toggle__switch",
|
|
249
249
|
checked: t(s),
|
|
250
250
|
"onUpdate:checked": r[0] || (r[0] = (u) => W(s) ? s.value = u : null)
|
|
@@ -302,7 +302,7 @@ const rt = [
|
|
|
302
302
|
]), l = (r) => {
|
|
303
303
|
e.disabled || (s.value = r);
|
|
304
304
|
};
|
|
305
|
-
return (r, u) => (a(), d("button",
|
|
305
|
+
return (r, u) => (a(), d("button", z(r.$attrs, {
|
|
306
306
|
class: t(i),
|
|
307
307
|
type: "button",
|
|
308
308
|
role: "switch",
|
|
@@ -311,17 +311,17 @@ const rt = [
|
|
|
311
311
|
}), [
|
|
312
312
|
b("span", {
|
|
313
313
|
class: P({ active: e.active === e.leftValue }),
|
|
314
|
-
onClick: u[0] || (u[0] = (
|
|
314
|
+
onClick: u[0] || (u[0] = (v) => l(e.leftValue))
|
|
315
315
|
}, [
|
|
316
|
-
|
|
316
|
+
I(w, {
|
|
317
317
|
name: e.leftIcon
|
|
318
318
|
}, null, 8, ["name"])
|
|
319
319
|
], 2),
|
|
320
320
|
b("span", {
|
|
321
321
|
class: P({ active: e.active === e.rightValue }),
|
|
322
|
-
onClick: u[1] || (u[1] = (
|
|
322
|
+
onClick: u[1] || (u[1] = (v) => l(e.rightValue))
|
|
323
323
|
}, [
|
|
324
|
-
|
|
324
|
+
I(w, {
|
|
325
325
|
name: e.rightIcon
|
|
326
326
|
}, null, 8, ["name"])
|
|
327
327
|
], 2)
|
|
@@ -361,9 +361,9 @@ const pt = [
|
|
|
361
361
|
].join(" ")), i = F(o.defaultVisible), l = () => {
|
|
362
362
|
i.value = !1;
|
|
363
363
|
};
|
|
364
|
-
return (r, u) => (a(), m(t(Ne),
|
|
364
|
+
return (r, u) => (a(), m(t(Ne), z(r.$attrs, {
|
|
365
365
|
visible: i.value,
|
|
366
|
-
"onUpdate:visible": u[0] || (u[0] = (
|
|
366
|
+
"onUpdate:visible": u[0] || (u[0] = (v) => i.value = v),
|
|
367
367
|
class: t(e),
|
|
368
368
|
placement: o.placement,
|
|
369
369
|
trigger: o.trigger,
|
|
@@ -441,7 +441,7 @@ const dt = [
|
|
|
441
441
|
value: "HubspotCollectedFormsWorkaround"
|
|
442
442
|
}, null, -1);
|
|
443
443
|
function vo(n, o, e, s, i, l) {
|
|
444
|
-
return a(), d(
|
|
444
|
+
return a(), d(K, null, [
|
|
445
445
|
mo,
|
|
446
446
|
go
|
|
447
447
|
], 64);
|
|
@@ -461,7 +461,7 @@ const fo = /* @__PURE__ */ uo(po, [["render", vo]]), _o = {
|
|
|
461
461
|
resetFields: () => s.value.resetFields(),
|
|
462
462
|
scrollToField: () => s.value.scrollToField(),
|
|
463
463
|
validateFields: () => s.value.validateFields()
|
|
464
|
-
}), (p, x) => (a(), m(t(Re),
|
|
464
|
+
}), (p, x) => (a(), m(t(Re), z(p.$attrs, {
|
|
465
465
|
class: "ma-form",
|
|
466
466
|
"prefix-cls": "antd-form",
|
|
467
467
|
ref_key: "form",
|
|
@@ -480,7 +480,7 @@ const yo = {
|
|
|
480
480
|
}, ft = /* @__PURE__ */ $({
|
|
481
481
|
...yo,
|
|
482
482
|
setup(n) {
|
|
483
|
-
return (o, e) => (a(), m(t(De),
|
|
483
|
+
return (o, e) => (a(), m(t(De), z(o.$attrs, {
|
|
484
484
|
class: "ma-form-item",
|
|
485
485
|
"prefix-cls": "antd-form"
|
|
486
486
|
}), O({ _: 2 }, [
|
|
@@ -496,7 +496,7 @@ const yo = {
|
|
|
496
496
|
"horizontal",
|
|
497
497
|
"vertical",
|
|
498
498
|
"inline"
|
|
499
|
-
],
|
|
499
|
+
], G = {
|
|
500
500
|
text: "text",
|
|
501
501
|
password: "password",
|
|
502
502
|
textarea: "textarea",
|
|
@@ -531,7 +531,7 @@ const yo = {
|
|
|
531
531
|
}, wo = /* @__PURE__ */ $({
|
|
532
532
|
...$o,
|
|
533
533
|
setup(n) {
|
|
534
|
-
return (o, e) => (a(), m(t(Fe),
|
|
534
|
+
return (o, e) => (a(), m(t(Fe), z(o.$attrs, { "prefix-cls": "antd-avatar" }), null, 16));
|
|
535
535
|
}
|
|
536
536
|
}), Co = { class: "dropdown-wrapper" }, xo = { class: "mobile-header" }, Mo = /* @__PURE__ */ b("label", null, "Select", -1), zo = {
|
|
537
537
|
name: "MaDropdownRender"
|
|
@@ -561,13 +561,13 @@ const yo = {
|
|
|
561
561
|
};
|
|
562
562
|
return (r, u) => (a(), d("div", Co, [
|
|
563
563
|
b("div", xo, [
|
|
564
|
-
|
|
564
|
+
I(w, {
|
|
565
565
|
size: "lg",
|
|
566
566
|
name: "close-circle",
|
|
567
567
|
onClick: l
|
|
568
568
|
}),
|
|
569
569
|
Mo,
|
|
570
|
-
|
|
570
|
+
I(J, {
|
|
571
571
|
type: "grey-link",
|
|
572
572
|
onClick: l
|
|
573
573
|
}, {
|
|
@@ -577,14 +577,14 @@ const yo = {
|
|
|
577
577
|
_: 1
|
|
578
578
|
})
|
|
579
579
|
]),
|
|
580
|
-
|
|
580
|
+
I(Po, {
|
|
581
581
|
value: t(i),
|
|
582
|
-
"onUpdate:value": u[0] || (u[0] = (
|
|
582
|
+
"onUpdate:value": u[0] || (u[0] = (v) => W(i) ? i.value = v : null),
|
|
583
583
|
autofocus: "",
|
|
584
584
|
placeholder: "Search",
|
|
585
585
|
"prefix-icon": "search-normal"
|
|
586
586
|
}, null, 8, ["value"]),
|
|
587
|
-
|
|
587
|
+
I(s, { vnodes: n.menu }, null, 8, ["vnodes"])
|
|
588
588
|
]));
|
|
589
589
|
}
|
|
590
590
|
}), Io = {
|
|
@@ -631,7 +631,7 @@ const yo = {
|
|
|
631
631
|
set(h) {
|
|
632
632
|
o("update:value", h);
|
|
633
633
|
}
|
|
634
|
-
}),
|
|
634
|
+
}), v = c(() => [
|
|
635
635
|
"ma-select",
|
|
636
636
|
`ma-select--${e.size}`,
|
|
637
637
|
{
|
|
@@ -647,18 +647,18 @@ const yo = {
|
|
|
647
647
|
e?.dropdownClassName,
|
|
648
648
|
"ma-select-dropdown",
|
|
649
649
|
!e?.mode && (s?.prefixIcon || e?.prefixIcon) ? "ma-select-dropdown--has-prefix" : null
|
|
650
|
-
].join(" ")), x = c(() => e?.loading ? "loader" : e?.suffixIcon), S = c(() => Object.keys(s).filter((h) => !["option"].includes(h))),
|
|
650
|
+
].join(" ")), x = c(() => e?.loading ? "loader" : e?.suffixIcon), S = c(() => Object.keys(s).filter((h) => !["option"].includes(h))), B = c(() => e?.showArrow || !e?.mode), N = () => {
|
|
651
651
|
l.value = !0;
|
|
652
652
|
}, _ = (h) => {
|
|
653
653
|
l.value = h, i.value = "";
|
|
654
654
|
}, T = c(() => !r.value && e?.showSearch), M = () => typeof window.orientation < "u" || navigator.userAgent.indexOf("Mobile") !== -1 ? window.innerHeight : e?.listHeight, E = () => {
|
|
655
655
|
l.value = !1;
|
|
656
656
|
};
|
|
657
|
-
return (h, V) => (a(), m(t(Pe),
|
|
657
|
+
return (h, V) => (a(), m(t(Pe), z({
|
|
658
658
|
value: t(u),
|
|
659
659
|
"onUpdate:value": V[1] || (V[1] = (R) => W(u) ? u.value = R : null)
|
|
660
660
|
}, h.$attrs, {
|
|
661
|
-
class: t(
|
|
661
|
+
class: t(v),
|
|
662
662
|
allowClear: e?.allowClear,
|
|
663
663
|
autoClearSearchValue: e?.autoClearSearchValue,
|
|
664
664
|
autofocus: e?.autofocus,
|
|
@@ -672,7 +672,7 @@ const yo = {
|
|
|
672
672
|
placeholder: e?.placeholder,
|
|
673
673
|
searchValue: i.value || void 0,
|
|
674
674
|
showSearch: t(T),
|
|
675
|
-
showArrow: t(
|
|
675
|
+
showArrow: t(B),
|
|
676
676
|
mode: e?.mode,
|
|
677
677
|
"list-height": M(),
|
|
678
678
|
size: e?.size,
|
|
@@ -682,7 +682,7 @@ const yo = {
|
|
|
682
682
|
"prefix-cls": "antd-select"
|
|
683
683
|
}), O({
|
|
684
684
|
suffixIcon: f(() => [
|
|
685
|
-
|
|
685
|
+
I(w, {
|
|
686
686
|
spin: e?.loading,
|
|
687
687
|
name: t(x) || "chevron-down"
|
|
688
688
|
}, null, 8, ["spin", "name"]),
|
|
@@ -696,7 +696,7 @@ const yo = {
|
|
|
696
696
|
])) : y("", !0)
|
|
697
697
|
]),
|
|
698
698
|
removeIcon: f(() => [
|
|
699
|
-
|
|
699
|
+
I(w, {
|
|
700
700
|
name: e?.removeIcon || "close"
|
|
701
701
|
}, null, 8, ["name"])
|
|
702
702
|
]),
|
|
@@ -731,7 +731,7 @@ const yo = {
|
|
|
731
731
|
e?.menuItemSelectedIcon ? {
|
|
732
732
|
name: "menuItemSelectedIcon",
|
|
733
733
|
fn: f(() => [
|
|
734
|
-
|
|
734
|
+
I(w, {
|
|
735
735
|
name: e?.menuItemSelectedIcon
|
|
736
736
|
}, null, 8, ["name"])
|
|
737
737
|
]),
|
|
@@ -740,7 +740,7 @@ const yo = {
|
|
|
740
740
|
h.$slots.notFoundContent ? void 0 : {
|
|
741
741
|
name: "notFoundContent",
|
|
742
742
|
fn: f(() => [
|
|
743
|
-
|
|
743
|
+
I(w, {
|
|
744
744
|
size: "sm",
|
|
745
745
|
name: "warning"
|
|
746
746
|
}),
|
|
@@ -751,7 +751,7 @@ const yo = {
|
|
|
751
751
|
t(r) && l.value ? {
|
|
752
752
|
name: "dropdownRender",
|
|
753
753
|
fn: f(({ menuNode: R }) => [
|
|
754
|
-
|
|
754
|
+
I(Bo, {
|
|
755
755
|
filter: i.value,
|
|
756
756
|
"onUpdate:filter": V[0] || (V[0] = (j) => i.value = j),
|
|
757
757
|
menu: R,
|
|
@@ -779,7 +779,7 @@ const Ao = ["for"], No = {
|
|
|
779
779
|
...Fo,
|
|
780
780
|
props: {
|
|
781
781
|
allowClear: { type: Boolean },
|
|
782
|
-
type: { default:
|
|
782
|
+
type: { default: G.text },
|
|
783
783
|
size: { default: ho.small },
|
|
784
784
|
title: null,
|
|
785
785
|
hintText: null,
|
|
@@ -803,7 +803,7 @@ const Ao = ["for"], No = {
|
|
|
803
803
|
"update:amountCurrency"
|
|
804
804
|
],
|
|
805
805
|
setup(n, { emit: o }) {
|
|
806
|
-
const e = n, s = ke(), i = F(null), l = c(() => [
|
|
806
|
+
const e = n, s = ke(), i = F(null), l = c(() => [G.amount, G.creditCard].includes(e.type) ? "number" : e.type === G.userInfo ? "text" : e.type), r = c(() => [
|
|
807
807
|
`ma-input ak-input ak-input--${e.type} ak-input--${e.size} ${s?.class}`,
|
|
808
808
|
{
|
|
809
809
|
"ak-input--has-error": e.hasError
|
|
@@ -814,7 +814,7 @@ const Ao = ["for"], No = {
|
|
|
814
814
|
{
|
|
815
815
|
"ak-input--filled": e?.value
|
|
816
816
|
}
|
|
817
|
-
]), u = c(() => ["ak-input__input", e?.inputClass]),
|
|
817
|
+
]), u = c(() => ["ak-input__input", e?.inputClass]), v = c({
|
|
818
818
|
get() {
|
|
819
819
|
return e.value;
|
|
820
820
|
},
|
|
@@ -828,8 +828,8 @@ const Ao = ["for"], No = {
|
|
|
828
828
|
set(h) {
|
|
829
829
|
o("update:amountCurrency", h);
|
|
830
830
|
}
|
|
831
|
-
}), S = c(() => e.type ===
|
|
832
|
-
let h = { ...s, ...
|
|
831
|
+
}), S = c(() => e.type === G.password ? Le : Ee), B = c(() => e.type === G.password ? { "input-prefix-cls": "antd-input" } : { "prefix-cls": "antd-input" }), N = c(() => e.type === G.url ? "https" : e?.addonBefore), _ = c(() => {
|
|
832
|
+
let h = { ...s, ...B.value };
|
|
833
833
|
return s?.class && delete h?.class, h;
|
|
834
834
|
}), T = (h) => {
|
|
835
835
|
o("change", h);
|
|
@@ -849,9 +849,9 @@ const Ao = ["for"], No = {
|
|
|
849
849
|
for: h.$attrs?.id
|
|
850
850
|
}, C(e.title), 9, Ao)) : y("", !0),
|
|
851
851
|
e.type !== "textarea" ? (a(), d("div", No, [
|
|
852
|
-
(a(), m(ue(t(S)),
|
|
853
|
-
value: t(
|
|
854
|
-
"onUpdate:value": V[1] || (V[1] = (R) => W(
|
|
852
|
+
(a(), m(ue(t(S)), z({
|
|
853
|
+
value: t(v),
|
|
854
|
+
"onUpdate:value": V[1] || (V[1] = (R) => W(v) ? v.value = R : null)
|
|
855
855
|
}, t(_), {
|
|
856
856
|
allowClear: e?.allowClear,
|
|
857
857
|
type: t(l),
|
|
@@ -869,7 +869,7 @@ const Ao = ["for"], No = {
|
|
|
869
869
|
key: 0,
|
|
870
870
|
size: "xs",
|
|
871
871
|
name: e.prefixIcon
|
|
872
|
-
}, null, 8, ["name"])) : t(p) ? (a(), d("span", Ro, C(t(p)), 1)) : e.type === t(
|
|
872
|
+
}, null, 8, ["name"])) : t(p) ? (a(), d("span", Ro, C(t(p)), 1)) : e.type === t(G).userInfo ? (a(), m(wo, {
|
|
873
873
|
key: 2,
|
|
874
874
|
src: e.avatarUrl,
|
|
875
875
|
disabled: e.disabled
|
|
@@ -901,10 +901,10 @@ const Ao = ["for"], No = {
|
|
|
901
901
|
])
|
|
902
902
|
}))
|
|
903
903
|
]), 1040, ["value", "allowClear", "type", "disabled", "placeholder", "addonBefore", "addonAfter", "class"]))
|
|
904
|
-
])) : (a(), m(t(Ve),
|
|
904
|
+
])) : (a(), m(t(Ve), z({
|
|
905
905
|
key: 2,
|
|
906
|
-
value: t(
|
|
907
|
-
"onUpdate:value": V[2] || (V[2] = (R) => W(
|
|
906
|
+
value: t(v),
|
|
907
|
+
"onUpdate:value": V[2] || (V[2] = (R) => W(v) ? v.value = R : null)
|
|
908
908
|
}, t(_), {
|
|
909
909
|
class: t(u),
|
|
910
910
|
disabled: e?.disabled,
|
|
@@ -931,7 +931,7 @@ const Lo = {
|
|
|
931
931
|
}, ht = /* @__PURE__ */ $({
|
|
932
932
|
...Lo,
|
|
933
933
|
setup(n) {
|
|
934
|
-
return (o, e) => (a(), m(t(je),
|
|
934
|
+
return (o, e) => (a(), m(t(je), z(o.$attrs, {
|
|
935
935
|
class: "ma-select-option",
|
|
936
936
|
"prefix-cls": "antd-select"
|
|
937
937
|
}), O({ _: 2 }, [
|
|
@@ -967,7 +967,7 @@ const Lo = {
|
|
|
967
967
|
"ak-checkbox--intermediate": typeof o?.indeterminate == "boolean"
|
|
968
968
|
}
|
|
969
969
|
]);
|
|
970
|
-
return (s, i) => (a(), m(t(qe),
|
|
970
|
+
return (s, i) => (a(), m(t(qe), z(s.$attrs, {
|
|
971
971
|
class: t(e),
|
|
972
972
|
disabled: o?.disabled,
|
|
973
973
|
indeterminate: o?.indeterminate,
|
|
@@ -996,7 +996,7 @@ const Vo = {
|
|
|
996
996
|
},
|
|
997
997
|
setup(n) {
|
|
998
998
|
const o = n;
|
|
999
|
-
return (e, s) => (a(), m(t(Ue),
|
|
999
|
+
return (e, s) => (a(), m(t(Ue), z(e.$attrs, {
|
|
1000
1000
|
class: "ak-checkbox-group ma-checkbox-group",
|
|
1001
1001
|
"prefix-cls": "antd-checkbox"
|
|
1002
1002
|
}), O({ _: 2 }, [
|
|
@@ -1030,7 +1030,7 @@ const Vo = {
|
|
|
1030
1030
|
const i = (l) => {
|
|
1031
1031
|
o("update:value", l.target.value);
|
|
1032
1032
|
};
|
|
1033
|
-
return (l, r) => (a(), d("input",
|
|
1033
|
+
return (l, r) => (a(), d("input", z(l.$attrs, {
|
|
1034
1034
|
value: e.value,
|
|
1035
1035
|
onInput: i,
|
|
1036
1036
|
ref_key: "input",
|
|
@@ -1066,11 +1066,11 @@ const Vo = {
|
|
|
1066
1066
|
{
|
|
1067
1067
|
"ma-numeric-input--disabled": e?.disabled
|
|
1068
1068
|
}
|
|
1069
|
-
]), r = c(() => e?.placeholderStatus ? "0" : null), u = (_) => /^Digit[0-9]$/.test(_),
|
|
1069
|
+
]), r = c(() => e?.placeholderStatus ? "0" : null), u = (_) => /^Digit[0-9]$/.test(_), v = (_) => s.value = _, p = (_, T) => {
|
|
1070
1070
|
switch (_.code) {
|
|
1071
1071
|
case "Backspace":
|
|
1072
1072
|
case "Delete":
|
|
1073
|
-
|
|
1073
|
+
B("", T), S();
|
|
1074
1074
|
break;
|
|
1075
1075
|
case "ArrowLeft":
|
|
1076
1076
|
_.preventDefault(), S();
|
|
@@ -1079,14 +1079,14 @@ const Vo = {
|
|
|
1079
1079
|
_.preventDefault(), x();
|
|
1080
1080
|
break;
|
|
1081
1081
|
default:
|
|
1082
|
-
u(_.code) && (_.preventDefault(),
|
|
1082
|
+
u(_.code) && (_.preventDefault(), B(_.key, T), x());
|
|
1083
1083
|
break;
|
|
1084
1084
|
}
|
|
1085
1085
|
}, x = () => {
|
|
1086
1086
|
s.value < e.length && s.value++;
|
|
1087
1087
|
}, S = () => {
|
|
1088
1088
|
e.length >= s.value && s.value > 0 && s.value--;
|
|
1089
|
-
},
|
|
1089
|
+
}, B = (_, T) => {
|
|
1090
1090
|
i.value[T] = _;
|
|
1091
1091
|
}, N = (_, T) => {
|
|
1092
1092
|
_.preventDefault();
|
|
@@ -1105,14 +1105,14 @@ const Vo = {
|
|
|
1105
1105
|
(_) => {
|
|
1106
1106
|
_ !== i.value.join("") && _ && _.match(/^\d+$/) && (i.value = _.split("").slice(0, e.length));
|
|
1107
1107
|
}
|
|
1108
|
-
), (_, T) => (a(), d("div",
|
|
1109
|
-
(a(!0), d(
|
|
1108
|
+
), (_, T) => (a(), d("div", z({ class: t(l) }, _.$attrs), [
|
|
1109
|
+
(a(!0), d(K, null, L(e.length, (M) => (a(), m(qo, {
|
|
1110
1110
|
focus: s.value === M - 1,
|
|
1111
1111
|
key: M,
|
|
1112
1112
|
placeholder: t(r),
|
|
1113
1113
|
value: i.value[M - 1],
|
|
1114
1114
|
disabled: e.disabled,
|
|
1115
|
-
onFocus: (E) =>
|
|
1115
|
+
onFocus: (E) => v(M - 1),
|
|
1116
1116
|
onKeydown: (E) => p(E, M - 1),
|
|
1117
1117
|
onPaste: (E) => N(E, M - 1),
|
|
1118
1118
|
class: "ma-numeric-input__input"
|
|
@@ -1135,7 +1135,7 @@ const xt = [
|
|
|
1135
1135
|
},
|
|
1136
1136
|
setup(n) {
|
|
1137
1137
|
const o = n, e = c(() => [`ma-radio ma-radio--${o.type}`]);
|
|
1138
|
-
return (s, i) => (a(), m(t(Oe),
|
|
1138
|
+
return (s, i) => (a(), m(t(Oe), z(s.$attrs, {
|
|
1139
1139
|
class: t(e),
|
|
1140
1140
|
"prefix-cls": "antd-radio"
|
|
1141
1141
|
}), O({ _: 2 }, [
|
|
@@ -1184,7 +1184,7 @@ const Go = ["aria-checked", "disabled"], Ko = ["src", "alt"], Wo = { class: "ma-
|
|
|
1184
1184
|
"ma-app-track-button--loading": e.loading
|
|
1185
1185
|
}
|
|
1186
1186
|
]);
|
|
1187
|
-
return (l, r) => (a(), d("button",
|
|
1187
|
+
return (l, r) => (a(), d("button", z({
|
|
1188
1188
|
class: t(i),
|
|
1189
1189
|
role: "switch",
|
|
1190
1190
|
"aria-checked": e.checked,
|
|
@@ -1201,7 +1201,7 @@ const Go = ["aria-checked", "disabled"], Ko = ["src", "alt"], Wo = { class: "ma-
|
|
|
1201
1201
|
e.appCategory ? (a(), d("span", Yo, C(e?.appCategory), 1)) : y("", !0)
|
|
1202
1202
|
]),
|
|
1203
1203
|
b("span", Xo, [
|
|
1204
|
-
|
|
1204
|
+
I(de, {
|
|
1205
1205
|
name: "fade",
|
|
1206
1206
|
mode: "out-in"
|
|
1207
1207
|
}, {
|
|
@@ -1269,7 +1269,7 @@ const Zo = { class: "ak-app-icon__logo" }, es = ["src"], os = {
|
|
|
1269
1269
|
onClick: l,
|
|
1270
1270
|
class: "ak-app-icon-closable"
|
|
1271
1271
|
}, [
|
|
1272
|
-
|
|
1272
|
+
I(w, {
|
|
1273
1273
|
size: "xs",
|
|
1274
1274
|
name: "close-circle"
|
|
1275
1275
|
})
|
|
@@ -1279,7 +1279,7 @@ const Zo = { class: "ak-app-icon__logo" }, es = ["src"], os = {
|
|
|
1279
1279
|
src: e.appIcon
|
|
1280
1280
|
}, null, 8, es),
|
|
1281
1281
|
e?.platform ? (a(), d("span", os, [
|
|
1282
|
-
|
|
1282
|
+
I(w, {
|
|
1283
1283
|
size: "xs",
|
|
1284
1284
|
name: t(s)
|
|
1285
1285
|
}, null, 8, ["name"])
|
|
@@ -1306,7 +1306,7 @@ const Bt = [
|
|
|
1306
1306
|
}, St = /* @__PURE__ */ $({
|
|
1307
1307
|
...is,
|
|
1308
1308
|
setup(n) {
|
|
1309
|
-
return (o, e) => (a(), m(t(He),
|
|
1309
|
+
return (o, e) => (a(), m(t(He), z(o.$attrs, { "prefix-cls": "antd-radio" }), O({ _: 2 }, [
|
|
1310
1310
|
L(o.$slots, (s, i) => ({
|
|
1311
1311
|
name: i,
|
|
1312
1312
|
fn: f(() => [
|
|
@@ -1384,7 +1384,7 @@ const Nt = [
|
|
|
1384
1384
|
},
|
|
1385
1385
|
setup(n) {
|
|
1386
1386
|
const o = n, e = Q(), s = c(() => [`ma-alert ak-alert ak-alert--${o.variant}--${o.type}`]), i = c(() => !!o?.icon || !!e?.icon);
|
|
1387
|
-
return (l, r) => (a(), m(t(Ge),
|
|
1387
|
+
return (l, r) => (a(), m(t(Ge), z(l.$attrs, {
|
|
1388
1388
|
class: t(s),
|
|
1389
1389
|
description: n.description,
|
|
1390
1390
|
message: n.message,
|
|
@@ -1393,7 +1393,7 @@ const Nt = [
|
|
|
1393
1393
|
"prefix-cls": "antd-alert"
|
|
1394
1394
|
}), {
|
|
1395
1395
|
closeIcon: f(() => [
|
|
1396
|
-
|
|
1396
|
+
I(w, {
|
|
1397
1397
|
name: "close",
|
|
1398
1398
|
size: "xs"
|
|
1399
1399
|
})
|
|
@@ -1455,8 +1455,8 @@ const Lt = [
|
|
|
1455
1455
|
x(), p();
|
|
1456
1456
|
}
|
|
1457
1457
|
);
|
|
1458
|
-
const
|
|
1459
|
-
const { default: S } = await import("./lottie_light-b08f9446.mjs").then((
|
|
1458
|
+
const v = async () => {
|
|
1459
|
+
const { default: S } = await import("./lottie_light-b08f9446.mjs").then((B) => B.l);
|
|
1460
1460
|
i = S;
|
|
1461
1461
|
}, p = async () => {
|
|
1462
1462
|
try {
|
|
@@ -1477,10 +1477,10 @@ const Lt = [
|
|
|
1477
1477
|
r.value && r.value.destroy();
|
|
1478
1478
|
};
|
|
1479
1479
|
return me(async () => {
|
|
1480
|
-
await
|
|
1480
|
+
await v(), p();
|
|
1481
1481
|
}), $e(() => {
|
|
1482
1482
|
x();
|
|
1483
|
-
}), (S,
|
|
1483
|
+
}), (S, B) => (a(), d("div", {
|
|
1484
1484
|
ref_key: "animationRef",
|
|
1485
1485
|
ref: l,
|
|
1486
1486
|
class: "ma-animation",
|
|
@@ -1540,8 +1540,8 @@ const Lt = [
|
|
|
1540
1540
|
get() {
|
|
1541
1541
|
return e.visible;
|
|
1542
1542
|
},
|
|
1543
|
-
set(
|
|
1544
|
-
o("update:visible",
|
|
1543
|
+
set(B) {
|
|
1544
|
+
o("update:visible", B);
|
|
1545
1545
|
}
|
|
1546
1546
|
}), i = c(
|
|
1547
1547
|
() => e.type && le[e.type] ? le[e.type] : null
|
|
@@ -1553,7 +1553,7 @@ const Lt = [
|
|
|
1553
1553
|
"ma-modal",
|
|
1554
1554
|
"ak-modal",
|
|
1555
1555
|
{ [`ak-modal--${e.type}`]: !!e.type }
|
|
1556
|
-
]),
|
|
1556
|
+
]), v = c(() => [
|
|
1557
1557
|
"ak-modal__header-icon",
|
|
1558
1558
|
{ [`ak-modal__header-icon--${e.type}`]: !!e.type }
|
|
1559
1559
|
]), p = () => {
|
|
@@ -1561,7 +1561,7 @@ const Lt = [
|
|
|
1561
1561
|
}, x = () => {
|
|
1562
1562
|
o("ok");
|
|
1563
1563
|
}, S = Q();
|
|
1564
|
-
return (
|
|
1564
|
+
return (B, N) => (a(), m(t(Ke), z(B.$attrs, {
|
|
1565
1565
|
visible: t(s),
|
|
1566
1566
|
"onUpdate:visible": N[0] || (N[0] = (_) => W(s) ? s.value = _ : null),
|
|
1567
1567
|
"prefix-cls": "antd-modal",
|
|
@@ -1575,7 +1575,7 @@ const Lt = [
|
|
|
1575
1575
|
onCancel: p
|
|
1576
1576
|
}), {
|
|
1577
1577
|
closeIcon: f(() => [
|
|
1578
|
-
|
|
1578
|
+
I(w, {
|
|
1579
1579
|
name: "close-circle",
|
|
1580
1580
|
size: "sm"
|
|
1581
1581
|
})
|
|
@@ -1583,21 +1583,21 @@ const Lt = [
|
|
|
1583
1583
|
default: f(() => [
|
|
1584
1584
|
t(i) ? (a(), d("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
|
-
class: P(t(
|
|
1586
|
+
class: P(t(v))
|
|
1587
1587
|
}, [
|
|
1588
|
-
|
|
1588
|
+
I(w, { name: t(i) }, null, 8, ["name"])
|
|
1589
1589
|
], 2)) : y("", !0),
|
|
1590
|
-
e.title ||
|
|
1591
|
-
k(
|
|
1590
|
+
e.title || B.$slots.title ? (a(), d("h1", ps, [
|
|
1591
|
+
k(B.$slots, "title"),
|
|
1592
1592
|
U(" " + C(e.title), 1)
|
|
1593
1593
|
])) : y("", !0),
|
|
1594
1594
|
b("div", us, [
|
|
1595
1595
|
e.content ? (a(), d("div", ds, C(e.content), 1)) : y("", !0),
|
|
1596
|
-
k(
|
|
1597
|
-
k(
|
|
1596
|
+
k(B.$slots, "content"),
|
|
1597
|
+
k(B.$slots, "default")
|
|
1598
1598
|
]),
|
|
1599
1599
|
t(r) ? (a(), d("div", ms, [
|
|
1600
|
-
e.okText ? (a(), m(J,
|
|
1600
|
+
e.okText ? (a(), m(J, z({
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
onClick: x,
|
|
1603
1603
|
class: "ak-modal__ok-button",
|
|
@@ -1609,7 +1609,7 @@ const Lt = [
|
|
|
1609
1609
|
]),
|
|
1610
1610
|
_: 1
|
|
1611
1611
|
}, 16, ["variant", "loading"])) : y("", !0),
|
|
1612
|
-
e.cancelText ? (a(), m(J,
|
|
1612
|
+
e.cancelText ? (a(), m(J, z({
|
|
1613
1613
|
key: 1,
|
|
1614
1614
|
onClick: p,
|
|
1615
1615
|
type: "grey-link"
|
|
@@ -1619,7 +1619,7 @@ const Lt = [
|
|
|
1619
1619
|
]),
|
|
1620
1620
|
_: 1
|
|
1621
1621
|
}, 16)) : y("", !0),
|
|
1622
|
-
k(
|
|
1622
|
+
k(B.$slots, "footer")
|
|
1623
1623
|
])) : y("", !0)
|
|
1624
1624
|
]),
|
|
1625
1625
|
_: 3
|
|
@@ -1659,7 +1659,7 @@ const fs = {
|
|
|
1659
1659
|
]), s = c(() => o.starRate - 0.5 === o.value), i = c(() => s.value ? "star-half-colored" : "star-bold");
|
|
1660
1660
|
return (l, r) => (a(), m(de, { name: "fade" }, {
|
|
1661
1661
|
default: f(() => [
|
|
1662
|
-
|
|
1662
|
+
I(w, {
|
|
1663
1663
|
class: P(t(e)),
|
|
1664
1664
|
name: t(i),
|
|
1665
1665
|
size: n.iconSize
|
|
@@ -1700,20 +1700,20 @@ const fs = {
|
|
|
1700
1700
|
}), r = c(() => e?.disabled ? -1 : e.tabIndex), u = () => {
|
|
1701
1701
|
if (!e?.disabled) {
|
|
1702
1702
|
if (e?.allowClear && s.value === e.value) {
|
|
1703
|
-
|
|
1703
|
+
B(0);
|
|
1704
1704
|
return;
|
|
1705
1705
|
}
|
|
1706
|
-
|
|
1706
|
+
B(s.value);
|
|
1707
1707
|
}
|
|
1708
|
-
},
|
|
1708
|
+
}, v = (N) => {
|
|
1709
1709
|
e?.disabled || (s.value = N);
|
|
1710
1710
|
}, p = () => {
|
|
1711
1711
|
s.value = 0;
|
|
1712
1712
|
}, x = (N, _) => {
|
|
1713
1713
|
!e?.allowHalf || e.disabled || (N.offsetX < N.target.clientWidth / 2 ? s.value = _ - 0.5 : s.value = _);
|
|
1714
1714
|
}, S = (N) => {
|
|
1715
|
-
e?.disabled || (N.key === "ArrowRight" && e.value < 5 ?
|
|
1716
|
-
},
|
|
1715
|
+
e?.disabled || (N.key === "ArrowRight" && e.value < 5 ? B(e.value + (e.allowHalf ? 0.5 : 1)) : N.key === "ArrowLeft" && e.value > 0 && B(e.value - (e.allowHalf ? 0.5 : 1)));
|
|
1716
|
+
}, B = (N) => {
|
|
1717
1717
|
o("update:value", N), o("change", N);
|
|
1718
1718
|
};
|
|
1719
1719
|
return (N, _) => (a(), d("ul", {
|
|
@@ -1722,14 +1722,14 @@ const fs = {
|
|
|
1722
1722
|
onKeydown: S,
|
|
1723
1723
|
tabindex: t(r)
|
|
1724
1724
|
}, [
|
|
1725
|
-
(a(), d(
|
|
1725
|
+
(a(), d(K, null, L(5, (T) => b("li", {
|
|
1726
1726
|
class: "ak-rate__item",
|
|
1727
1727
|
key: T,
|
|
1728
1728
|
onMousemove: (M) => x(M, T),
|
|
1729
|
-
onMouseover: (M) =>
|
|
1729
|
+
onMouseover: (M) => v(T),
|
|
1730
1730
|
onClick: _[0] || (_[0] = (M) => u())
|
|
1731
1731
|
}, [
|
|
1732
|
-
|
|
1732
|
+
I(_s, {
|
|
1733
1733
|
"star-rate": T,
|
|
1734
1734
|
value: s.value || e.value,
|
|
1735
1735
|
"icon-size": t(l)
|
|
@@ -1767,7 +1767,7 @@ const Ot = [
|
|
|
1767
1767
|
]), i = c(() => [
|
|
1768
1768
|
"ma-spin__icon"
|
|
1769
1769
|
]), l = c(() => `spin-${o.type}`), r = c(() => e?.default && o.spinning);
|
|
1770
|
-
return (u,
|
|
1770
|
+
return (u, v) => (a(), d("div", z({ class: t(s) }, u.$attrs), [
|
|
1771
1771
|
o.spinning ? (a(), m(w, {
|
|
1772
1772
|
key: 0,
|
|
1773
1773
|
class: P(t(i)),
|
|
@@ -1813,7 +1813,7 @@ const Gt = [
|
|
|
1813
1813
|
}), i = c(
|
|
1814
1814
|
() => ["ma-dropdown-overlay", e?.overlayClassName].join(" ")
|
|
1815
1815
|
);
|
|
1816
|
-
return (l, r) => (a(), m(t(We),
|
|
1816
|
+
return (l, r) => (a(), m(t(We), z({
|
|
1817
1817
|
"prefix-cls": "antd-dropdown",
|
|
1818
1818
|
overlayClassName: t(i),
|
|
1819
1819
|
destroyPopupOnHide: e.destroyPopupOnHide,
|
|
@@ -1917,9 +1917,9 @@ const ee = (n) => {
|
|
|
1917
1917
|
}, Ss = (n, o = {}, e = {}, s) => {
|
|
1918
1918
|
const i = F(0);
|
|
1919
1919
|
return { progress: i, upload: async (r, u) => {
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
|
|
1920
|
+
const v = new FormData();
|
|
1921
|
+
v.append(s, r.file), Object.entries(e).forEach(([x, S]) => {
|
|
1922
|
+
v.append(x, S);
|
|
1923
1923
|
});
|
|
1924
1924
|
const p = new XMLHttpRequest();
|
|
1925
1925
|
p.open("POST", n), Object.entries(o).forEach(([x, S]) => {
|
|
@@ -1942,7 +1942,7 @@ const ee = (n) => {
|
|
|
1942
1942
|
i.value,
|
|
1943
1943
|
ee(p.responseText)
|
|
1944
1944
|
);
|
|
1945
|
-
}, p.send(
|
|
1945
|
+
}, p.send(v), r.cancelRequest = () => p.abort();
|
|
1946
1946
|
} };
|
|
1947
1947
|
}, Ts = (n, o) => {
|
|
1948
1948
|
if (!o)
|
|
@@ -1957,8 +1957,8 @@ const ee = (n) => {
|
|
|
1957
1957
|
if (l.slice(1) === i)
|
|
1958
1958
|
return !0;
|
|
1959
1959
|
} else {
|
|
1960
|
-
const [r, u] = l.split("/"), [
|
|
1961
|
-
if (r ===
|
|
1960
|
+
const [r, u] = l.split("/"), [v, p] = s.split("/");
|
|
1961
|
+
if (r === v && u === p)
|
|
1962
1962
|
return !0;
|
|
1963
1963
|
}
|
|
1964
1964
|
return !1;
|
|
@@ -1977,9 +1977,9 @@ const ee = (n) => {
|
|
|
1977
1977
|
const e = n, s = c(
|
|
1978
1978
|
() => `${(e.file.file.size / (1024 * 1024)).toFixed(1)} MB`
|
|
1979
1979
|
), i = c(() => typeof e.file.file.size == "number"), l = () => o("remove"), r = () => o("cancel");
|
|
1980
|
-
return (u,
|
|
1980
|
+
return (u, v) => (a(), d("div", As, [
|
|
1981
1981
|
b("div", Ns, [
|
|
1982
|
-
|
|
1982
|
+
I(w, { name: "document-bulk" })
|
|
1983
1983
|
]),
|
|
1984
1984
|
b("div", Rs, [
|
|
1985
1985
|
b("span", Ds, C(n.file.file.name), 1),
|
|
@@ -1995,7 +1995,7 @@ const ee = (n) => {
|
|
|
1995
1995
|
n.file.status === t(q).uploading ? (a(), m(J, {
|
|
1996
1996
|
key: 0,
|
|
1997
1997
|
disabled: n.disabled,
|
|
1998
|
-
onClick:
|
|
1998
|
+
onClick: v[0] || (v[0] = (p) => r()),
|
|
1999
1999
|
size: "small",
|
|
2000
2000
|
type: "primary",
|
|
2001
2001
|
variant: "plain",
|
|
@@ -2003,7 +2003,7 @@ const ee = (n) => {
|
|
|
2003
2003
|
}, null, 8, ["disabled"])) : (a(), m(J, {
|
|
2004
2004
|
key: 1,
|
|
2005
2005
|
disabled: n.disabled,
|
|
2006
|
-
onClick:
|
|
2006
|
+
onClick: v[1] || (v[1] = (p) => l()),
|
|
2007
2007
|
size: "small",
|
|
2008
2008
|
type: "primary",
|
|
2009
2009
|
variant: "plain",
|
|
@@ -2045,24 +2045,24 @@ const ee = (n) => {
|
|
|
2045
2045
|
},
|
|
2046
2046
|
emits: ["update:fileList", "change", "remove", "error"],
|
|
2047
2047
|
setup(n, { emit: o }) {
|
|
2048
|
-
const e = n, s = F(null), i = F(null), l = F(!1), r = ["dragenter", "dragover", "dragleave", "drop"], u = ["dragenter", "dragover"],
|
|
2048
|
+
const e = n, s = F(null), i = F(null), l = F(!1), r = ["dragenter", "dragover", "dragleave", "drop"], u = ["dragenter", "dragover"], v = ["dragleave", "drop"], p = c({
|
|
2049
2049
|
get() {
|
|
2050
2050
|
return e.fileList;
|
|
2051
2051
|
},
|
|
2052
|
-
set(
|
|
2053
|
-
o("update:fileList",
|
|
2052
|
+
set(g) {
|
|
2053
|
+
o("update:fileList", g), o("change", g), e?.action && g.forEach(async (A, D) => {
|
|
2054
2054
|
if ([q.done, q.error].includes(
|
|
2055
2055
|
A.status
|
|
2056
2056
|
))
|
|
2057
2057
|
return;
|
|
2058
|
-
const { upload:
|
|
2058
|
+
const { upload: H } = Ss(
|
|
2059
2059
|
e?.action || "",
|
|
2060
2060
|
// || added for tsc warning
|
|
2061
2061
|
e.headers,
|
|
2062
2062
|
e.data,
|
|
2063
2063
|
e.name
|
|
2064
2064
|
);
|
|
2065
|
-
e?.beforeUpload && (A.file = await e.beforeUpload(A.file)),
|
|
2065
|
+
e?.beforeUpload && (A.file = await e.beforeUpload(A.file)), H(A, (Y, ye, ie) => {
|
|
2066
2066
|
if (p.value[D]) {
|
|
2067
2067
|
if (Y === q.error) {
|
|
2068
2068
|
o("error", { file: A.file, message: ie }), Z(
|
|
@@ -2076,11 +2076,11 @@ const ee = (n) => {
|
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
2078
|
}), x = c(
|
|
2079
|
-
() => p.value.map((
|
|
2079
|
+
() => p.value.map((g) => g.file.name).join(", ")
|
|
2080
2080
|
), S = c(
|
|
2081
2081
|
() => e.type === "box" ? e.multiple ? !0 : !p.value.length : !0
|
|
2082
|
-
),
|
|
2083
|
-
() => e.ordered && M.value ? !1 : e.showFileList
|
|
2082
|
+
), B = c(
|
|
2083
|
+
() => e.ordered && M.value ? !1 : p.value.length ? e.showFileList : !1
|
|
2084
2084
|
), N = c(() => [
|
|
2085
2085
|
`ma-upload ma-upload--${e.type} ma-upload--${e.type}--${e.size}`,
|
|
2086
2086
|
{
|
|
@@ -2095,70 +2095,68 @@ const ee = (n) => {
|
|
|
2095
2095
|
"only-file-list": !S.value
|
|
2096
2096
|
}
|
|
2097
2097
|
]), T = c(() => {
|
|
2098
|
-
const
|
|
2099
|
-
return Qe[
|
|
2098
|
+
const g = e?.size ? Bs.indexOf(e.size) : 0;
|
|
2099
|
+
return Qe[g];
|
|
2100
2100
|
}), M = c(
|
|
2101
|
-
() => e.wait || p.value.some((
|
|
2102
|
-
), E = c(() => e?.disabled || M.value), h = (
|
|
2101
|
+
() => e.wait || p.value.some((g) => g.status === q.uploading)
|
|
2102
|
+
), E = c(() => e?.disabled || M.value), h = (g) => Array.from(g).find(
|
|
2103
2103
|
(A) => e?.maxFileSize && A.size > e.maxFileSize
|
|
2104
|
-
), V = (
|
|
2105
|
-
const A =
|
|
2104
|
+
), V = (g) => {
|
|
2105
|
+
const A = g.target;
|
|
2106
2106
|
A.files && ne(Array.from(A.files));
|
|
2107
2107
|
}, R = () => {
|
|
2108
2108
|
i.value?.click();
|
|
2109
|
-
}, j = (
|
|
2110
|
-
|
|
2109
|
+
}, j = (g) => {
|
|
2110
|
+
g.preventDefault();
|
|
2111
2111
|
}, se = () => {
|
|
2112
2112
|
l.value = !0;
|
|
2113
2113
|
}, te = () => {
|
|
2114
2114
|
l.value = !1;
|
|
2115
|
-
}, fe = (
|
|
2116
|
-
E.value ||
|
|
2117
|
-
Array.from(
|
|
2118
|
-
(A) => e?.accept && !Ts(A, e.accept) ? (o("error", { file: A, message: "file type does not match!" }), !1) : !0
|
|
2119
|
-
)
|
|
2115
|
+
}, fe = (g) => {
|
|
2116
|
+
E.value || g.dataTransfer?.files && ne(
|
|
2117
|
+
Array.from(g.dataTransfer.files).filter((A) => e?.accept && !Ts(A, e.accept) ? (o("error", { file: A, message: "file type does not match!" }), !1) : !0)
|
|
2120
2118
|
);
|
|
2121
|
-
}, ne = (
|
|
2122
|
-
const A = h(
|
|
2119
|
+
}, ne = (g) => {
|
|
2120
|
+
const A = h(g);
|
|
2123
2121
|
if (A) {
|
|
2124
2122
|
o("error", { file: A, message: "File too large" });
|
|
2125
2123
|
return;
|
|
2126
2124
|
}
|
|
2127
|
-
const D = Array.from(
|
|
2128
|
-
(
|
|
2129
|
-
).map((
|
|
2130
|
-
file:
|
|
2125
|
+
const D = Array.from(g).filter(
|
|
2126
|
+
(H, Y) => e?.maxCount ? Y + 1 <= e.maxCount : !0
|
|
2127
|
+
).map((H) => ({
|
|
2128
|
+
file: H,
|
|
2131
2129
|
id: Is(),
|
|
2132
2130
|
status: e?.action ? q.uploading : q.done,
|
|
2133
2131
|
progress: e?.action ? 0 : 100,
|
|
2134
2132
|
response: null
|
|
2135
2133
|
}));
|
|
2136
2134
|
e.multiple ? p.value = [...p.value, ...D] : D.length && (p.value = [D[0]]);
|
|
2137
|
-
}, Z = (
|
|
2138
|
-
o("remove", p.value[
|
|
2139
|
-
}, ae = (
|
|
2140
|
-
const A = p.value[
|
|
2141
|
-
typeof A?.cancelRequest == "function" && A.cancelRequest(), Z(
|
|
2142
|
-
}, _e = (
|
|
2143
|
-
|
|
2135
|
+
}, Z = (g) => {
|
|
2136
|
+
o("remove", p.value[g]), p.value = p.value.filter((A, D) => D !== g);
|
|
2137
|
+
}, ae = (g) => {
|
|
2138
|
+
const A = p.value[g];
|
|
2139
|
+
typeof A?.cancelRequest == "function" && A.cancelRequest(), Z(g);
|
|
2140
|
+
}, _e = (g) => {
|
|
2141
|
+
g.stopPropagation(), p.value.forEach((A, D) => ae(D)), p.value = [];
|
|
2144
2142
|
};
|
|
2145
2143
|
return me(() => {
|
|
2146
|
-
r.forEach((
|
|
2147
|
-
s.value?.addEventListener(
|
|
2148
|
-
}), u.forEach((
|
|
2149
|
-
s.value?.addEventListener(
|
|
2150
|
-
}),
|
|
2151
|
-
s.value?.addEventListener(
|
|
2144
|
+
r.forEach((g) => {
|
|
2145
|
+
s.value?.addEventListener(g, j);
|
|
2146
|
+
}), u.forEach((g) => {
|
|
2147
|
+
s.value?.addEventListener(g, se);
|
|
2148
|
+
}), v.forEach((g) => {
|
|
2149
|
+
s.value?.addEventListener(g, te);
|
|
2152
2150
|
});
|
|
2153
2151
|
}), xe(() => {
|
|
2154
|
-
r.forEach((
|
|
2155
|
-
s.value?.removeEventListener(
|
|
2156
|
-
}), u.forEach((
|
|
2157
|
-
s.value?.removeEventListener(
|
|
2158
|
-
}),
|
|
2159
|
-
s.value?.removeEventListener(
|
|
2152
|
+
r.forEach((g) => {
|
|
2153
|
+
s.value?.removeEventListener(g, j);
|
|
2154
|
+
}), u.forEach((g) => {
|
|
2155
|
+
s.value?.removeEventListener(g, se);
|
|
2156
|
+
}), v.forEach((g) => {
|
|
2157
|
+
s.value?.removeEventListener(g, te);
|
|
2160
2158
|
});
|
|
2161
|
-
}), (
|
|
2159
|
+
}), (g, A) => (a(), d("div", z({ class: "ma-upload-wrapper" }, g.$attrs), [
|
|
2162
2160
|
Me(b("div", {
|
|
2163
2161
|
ref_key: "uploadArea",
|
|
2164
2162
|
ref: s,
|
|
@@ -2202,9 +2200,9 @@ const ee = (n) => {
|
|
|
2202
2200
|
name: "export-2-bulk"
|
|
2203
2201
|
})),
|
|
2204
2202
|
b("span", qs, [
|
|
2205
|
-
t(M) ? (a(), d(
|
|
2203
|
+
t(M) ? (a(), d(K, { key: 0 }, [
|
|
2206
2204
|
U(" Uploading... ")
|
|
2207
|
-
], 64)) : (a(), d(
|
|
2205
|
+
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2208
2206
|
U(C(e?.title), 1)
|
|
2209
2207
|
], 64))
|
|
2210
2208
|
])
|
|
@@ -2213,13 +2211,13 @@ const ee = (n) => {
|
|
|
2213
2211
|
class: "ma-upload__box",
|
|
2214
2212
|
onClick: R
|
|
2215
2213
|
}, [
|
|
2216
|
-
e.ordered && t(M) ? (a(), d(
|
|
2217
|
-
|
|
2214
|
+
e.ordered && t(M) ? (a(), d(K, { key: 0 }, [
|
|
2215
|
+
I(ce, {
|
|
2218
2216
|
type: "three-circles",
|
|
2219
2217
|
color: "blue"
|
|
2220
2218
|
}),
|
|
2221
2219
|
Us,
|
|
2222
|
-
|
|
2220
|
+
I(J, {
|
|
2223
2221
|
onClick: _e,
|
|
2224
2222
|
class: "box-cancel",
|
|
2225
2223
|
type: "secondary",
|
|
@@ -2230,9 +2228,9 @@ const ee = (n) => {
|
|
|
2230
2228
|
]),
|
|
2231
2229
|
_: 1
|
|
2232
2230
|
})
|
|
2233
|
-
], 64)) : (a(), d(
|
|
2231
|
+
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2234
2232
|
b("div", Os, [
|
|
2235
|
-
|
|
2233
|
+
I(w, { name: "upload-bulk" })
|
|
2236
2234
|
]),
|
|
2237
2235
|
e?.title ? (a(), d("span", Hs, C(e?.title), 1)) : y("", !0),
|
|
2238
2236
|
e?.description ? (a(), d("span", Gs, C(e?.description), 1)) : y("", !0)
|
|
@@ -2241,19 +2239,19 @@ const ee = (n) => {
|
|
|
2241
2239
|
], 42, Vs), [
|
|
2242
2240
|
[Be, t(S)]
|
|
2243
2241
|
]),
|
|
2244
|
-
t(
|
|
2242
|
+
t(B) ? (a(), d("div", {
|
|
2245
2243
|
key: 0,
|
|
2246
2244
|
class: P(t(_))
|
|
2247
2245
|
}, [
|
|
2248
|
-
(a(!0), d(
|
|
2249
|
-
onRemove: (Y) => Z(
|
|
2250
|
-
onCancel: (Y) => ae(
|
|
2246
|
+
(a(!0), d(K, null, L(t(p), (D, H) => (a(), m(Es, {
|
|
2247
|
+
onRemove: (Y) => Z(H),
|
|
2248
|
+
onCancel: (Y) => ae(H),
|
|
2251
2249
|
file: D,
|
|
2252
|
-
key:
|
|
2250
|
+
key: H,
|
|
2253
2251
|
disabled: e.disabled
|
|
2254
2252
|
}, null, 8, ["onRemove", "onCancel", "file", "disabled"]))), 128))
|
|
2255
2253
|
], 2)) : y("", !0)
|
|
2256
|
-
],
|
|
2254
|
+
], 16));
|
|
2257
2255
|
}
|
|
2258
2256
|
});
|
|
2259
2257
|
class Ws {
|
|
@@ -2322,7 +2320,7 @@ export {
|
|
|
2322
2320
|
Po as MaInput,
|
|
2323
2321
|
yt as MaInputCurrency,
|
|
2324
2322
|
ho as MaInputSize,
|
|
2325
|
-
|
|
2323
|
+
G as MaInputType,
|
|
2326
2324
|
re as MaModal,
|
|
2327
2325
|
le as MaModalTypeIcon,
|
|
2328
2326
|
qt as MaModalTypes,
|