@mobileaction/action-kit 1.1.25 → 1.1.26
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 +1 -1
- package/dist/action-kit.mjs +244 -237
- package/dist/src/components/upload/index.vue.d.ts +10 -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
|
|
1
|
+
import { defineComponent as $, computed as c, defineAsyncComponent as be, openBlock as a, createBlock as g, resolveDynamicComponent as ue, unref as t, normalizeClass as L, mergeProps as z, createSlots as O, renderList as E, withCtx as f, renderSlot as h, createVNode as I, createTextVNode as P, toDisplayString as C, createElementBlock as d, isRef as W, createCommentVNode as y, createElementVNode as k, 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];
|
|
@@ -35,8 +35,8 @@ const oe = (n, o) => {
|
|
|
35
35
|
Je[o.size],
|
|
36
36
|
{ "animate-spin": o.spin }
|
|
37
37
|
]);
|
|
38
|
-
return (l, r) => (a(),
|
|
39
|
-
class:
|
|
38
|
+
return (l, r) => (a(), g(ue(t(s)), {
|
|
39
|
+
class: L(t(i))
|
|
40
40
|
}, null, 8, ["class"]));
|
|
41
41
|
}
|
|
42
42
|
}), Xe = {
|
|
@@ -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(),
|
|
77
|
+
return (r, u) => (a(), g(t(ve), z({
|
|
78
78
|
class: t(s),
|
|
79
79
|
href: o.href,
|
|
80
80
|
target: o.target,
|
|
@@ -82,21 +82,21 @@ const oe = (n, o) => {
|
|
|
82
82
|
type: t(e),
|
|
83
83
|
role: "button"
|
|
84
84
|
}, r.$attrs, { "prefix-cls": "antd-btn" }), O({ _: 2 }, [
|
|
85
|
-
|
|
85
|
+
E(r.$slots, (v, p) => ({
|
|
86
86
|
name: p,
|
|
87
87
|
fn: f(() => [
|
|
88
|
-
|
|
88
|
+
h(r.$slots, p)
|
|
89
89
|
])
|
|
90
90
|
})),
|
|
91
91
|
t(i) ? {
|
|
92
92
|
name: "icon",
|
|
93
93
|
fn: f(() => [
|
|
94
|
-
o?.loading ? (a(),
|
|
94
|
+
o?.loading ? (a(), g(w, {
|
|
95
95
|
key: 0,
|
|
96
96
|
class: "ak-button__loader",
|
|
97
97
|
spin: "",
|
|
98
98
|
name: "loader"
|
|
99
|
-
})) : (a(),
|
|
99
|
+
})) : (a(), g(w, {
|
|
100
100
|
key: 1,
|
|
101
101
|
name: o?.icon
|
|
102
102
|
}, null, 8, ["name"]))
|
|
@@ -169,7 +169,7 @@ 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(),
|
|
172
|
+
return (l, r) => (a(), g(t(ve), z(l.$attrs, {
|
|
173
173
|
class: t(e),
|
|
174
174
|
disabled: o?.disabled || o?.loading,
|
|
175
175
|
role: "button",
|
|
@@ -183,14 +183,14 @@ const Zs = [
|
|
|
183
183
|
}, null, 8, ["spin", "name", "size"])
|
|
184
184
|
]),
|
|
185
185
|
default: f(() => [
|
|
186
|
-
|
|
186
|
+
P(" " + C(n.keyword) + " ", 1)
|
|
187
187
|
]),
|
|
188
188
|
_: 2
|
|
189
189
|
}, [
|
|
190
|
-
|
|
190
|
+
E(l.$slots, (u, v) => ({
|
|
191
191
|
name: v,
|
|
192
192
|
fn: f(() => [
|
|
193
|
-
|
|
193
|
+
h(l.$slots, v)
|
|
194
194
|
])
|
|
195
195
|
}))
|
|
196
196
|
]), 1040, ["class", "disabled"]));
|
|
@@ -242,7 +242,7 @@ const at = [
|
|
|
242
242
|
}
|
|
243
243
|
]);
|
|
244
244
|
return (l, r) => (a(), d("div", {
|
|
245
|
-
class:
|
|
245
|
+
class: L(t(i))
|
|
246
246
|
}, [
|
|
247
247
|
I(t(Ae), z({
|
|
248
248
|
class: "ma-toggle__switch",
|
|
@@ -309,16 +309,16 @@ const rt = [
|
|
|
309
309
|
"aria-checked": t(s) === e.rightValue,
|
|
310
310
|
disabled: e.disabled
|
|
311
311
|
}), [
|
|
312
|
-
|
|
313
|
-
class:
|
|
312
|
+
k("span", {
|
|
313
|
+
class: L({ active: e.active === e.leftValue }),
|
|
314
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
|
-
|
|
321
|
-
class:
|
|
320
|
+
k("span", {
|
|
321
|
+
class: L({ active: e.active === e.rightValue }),
|
|
322
322
|
onClick: u[1] || (u[1] = (v) => l(e.rightValue))
|
|
323
323
|
}, [
|
|
324
324
|
I(w, {
|
|
@@ -361,7 +361,7 @@ const pt = [
|
|
|
361
361
|
].join(" ")), i = F(o.defaultVisible), l = () => {
|
|
362
362
|
i.value = !1;
|
|
363
363
|
};
|
|
364
|
-
return (r, u) => (a(),
|
|
364
|
+
return (r, u) => (a(), g(t(Ne), z(r.$attrs, {
|
|
365
365
|
visible: i.value,
|
|
366
366
|
"onUpdate:visible": u[0] || (u[0] = (v) => i.value = v),
|
|
367
367
|
class: t(e),
|
|
@@ -371,23 +371,23 @@ const pt = [
|
|
|
371
371
|
"prefix-cls": "antd-tooltip"
|
|
372
372
|
}), {
|
|
373
373
|
title: f(() => [
|
|
374
|
-
o.icon ? (a(),
|
|
374
|
+
o.icon ? (a(), g(w, {
|
|
375
375
|
key: 0,
|
|
376
376
|
size: "xs",
|
|
377
377
|
name: o.icon
|
|
378
378
|
}, null, 8, ["name"])) : y("", !0),
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
379
|
+
h(r.$slots, "icon"),
|
|
380
|
+
k("div", io, [
|
|
381
|
+
k("span", lo, [
|
|
382
|
+
P(C(o.title) + " ", 1),
|
|
383
|
+
h(r.$slots, "title")
|
|
384
384
|
]),
|
|
385
385
|
o?.description || r.$slots.description ? (a(), d("span", ro, [
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
P(C(o.description) + " ", 1),
|
|
387
|
+
h(r.$slots, "description")
|
|
388
388
|
])) : y("", !0)
|
|
389
389
|
]),
|
|
390
|
-
o.closable ? (a(),
|
|
390
|
+
o.closable ? (a(), g(w, {
|
|
391
391
|
key: 1,
|
|
392
392
|
onClick: l,
|
|
393
393
|
class: "ak-tooltip-overlay__close",
|
|
@@ -396,7 +396,7 @@ const pt = [
|
|
|
396
396
|
})) : y("", !0)
|
|
397
397
|
]),
|
|
398
398
|
default: f(() => [
|
|
399
|
-
|
|
399
|
+
h(r.$slots, "default")
|
|
400
400
|
]),
|
|
401
401
|
_: 3
|
|
402
402
|
}, 16, ["visible", "class", "placement", "trigger", "overlayClassName"]));
|
|
@@ -430,10 +430,10 @@ const dt = [
|
|
|
430
430
|
for (const [s, i] of o)
|
|
431
431
|
e[s] = i;
|
|
432
432
|
return e;
|
|
433
|
-
}, mo = /* @__PURE__ */
|
|
433
|
+
}, mo = /* @__PURE__ */ k("label", {
|
|
434
434
|
for: "cc-num",
|
|
435
435
|
class: "hidden"
|
|
436
|
-
}, "HubspotCollectedFormsWorkaround", -1), go = /* @__PURE__ */
|
|
436
|
+
}, "HubspotCollectedFormsWorkaround", -1), go = /* @__PURE__ */ k("input", {
|
|
437
437
|
id: "cc-num",
|
|
438
438
|
name: "cc-num",
|
|
439
439
|
class: "hidden",
|
|
@@ -461,15 +461,15 @@ 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(),
|
|
464
|
+
}), (p, x) => (a(), g(t(Re), z(p.$attrs, {
|
|
465
465
|
class: "ma-form",
|
|
466
466
|
"prefix-cls": "antd-form",
|
|
467
467
|
ref_key: "form",
|
|
468
468
|
ref: s
|
|
469
469
|
}), {
|
|
470
470
|
default: f(() => [
|
|
471
|
-
e.nonHubspotFormsIgnore ? (a(),
|
|
472
|
-
|
|
471
|
+
e.nonHubspotFormsIgnore ? (a(), g(fo, { key: 0 })) : y("", !0),
|
|
472
|
+
h(p.$slots, "default")
|
|
473
473
|
]),
|
|
474
474
|
_: 3
|
|
475
475
|
}, 16));
|
|
@@ -480,14 +480,14 @@ const yo = {
|
|
|
480
480
|
}, ft = /* @__PURE__ */ $({
|
|
481
481
|
...yo,
|
|
482
482
|
setup(n) {
|
|
483
|
-
return (o, e) => (a(),
|
|
483
|
+
return (o, e) => (a(), g(t(De), z(o.$attrs, {
|
|
484
484
|
class: "ma-form-item",
|
|
485
485
|
"prefix-cls": "antd-form"
|
|
486
486
|
}), O({ _: 2 }, [
|
|
487
|
-
|
|
487
|
+
E(o.$slots, (s, i) => ({
|
|
488
488
|
name: i,
|
|
489
489
|
fn: f(() => [
|
|
490
|
-
|
|
490
|
+
h(o.$slots, i)
|
|
491
491
|
])
|
|
492
492
|
}))
|
|
493
493
|
]), 1040));
|
|
@@ -531,9 +531,9 @@ const yo = {
|
|
|
531
531
|
}, wo = /* @__PURE__ */ $({
|
|
532
532
|
...$o,
|
|
533
533
|
setup(n) {
|
|
534
|
-
return (o, e) => (a(),
|
|
534
|
+
return (o, e) => (a(), g(t(Fe), z(o.$attrs, { "prefix-cls": "antd-avatar" }), null, 16));
|
|
535
535
|
}
|
|
536
|
-
}), Co = { class: "dropdown-wrapper" }, xo = { class: "mobile-header" }, Mo = /* @__PURE__ */
|
|
536
|
+
}), Co = { class: "dropdown-wrapper" }, xo = { class: "mobile-header" }, Mo = /* @__PURE__ */ k("label", null, "Select", -1), zo = {
|
|
537
537
|
name: "MaDropdownRender"
|
|
538
538
|
}, Bo = /* @__PURE__ */ $({
|
|
539
539
|
...zo,
|
|
@@ -560,7 +560,7 @@ const yo = {
|
|
|
560
560
|
o("closeDropdown");
|
|
561
561
|
};
|
|
562
562
|
return (r, u) => (a(), d("div", Co, [
|
|
563
|
-
|
|
563
|
+
k("div", xo, [
|
|
564
564
|
I(w, {
|
|
565
565
|
size: "lg",
|
|
566
566
|
name: "close-circle",
|
|
@@ -572,7 +572,7 @@ const yo = {
|
|
|
572
572
|
onClick: l
|
|
573
573
|
}, {
|
|
574
574
|
default: f(() => [
|
|
575
|
-
|
|
575
|
+
P("Done")
|
|
576
576
|
]),
|
|
577
577
|
_: 1
|
|
578
578
|
})
|
|
@@ -628,8 +628,8 @@ const yo = {
|
|
|
628
628
|
get() {
|
|
629
629
|
return e.value;
|
|
630
630
|
},
|
|
631
|
-
set(
|
|
632
|
-
o("update:value",
|
|
631
|
+
set(b) {
|
|
632
|
+
o("update:value", b);
|
|
633
633
|
}
|
|
634
634
|
}), v = c(() => [
|
|
635
635
|
"ma-select",
|
|
@@ -647,17 +647,17 @@ 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((
|
|
650
|
+
].join(" ")), x = c(() => e?.loading ? "loader" : e?.suffixIcon), S = c(() => Object.keys(s).filter((b) => !["option"].includes(b))), B = c(() => e?.showArrow || !e?.mode), N = () => {
|
|
651
651
|
l.value = !0;
|
|
652
|
-
}, _ = (
|
|
653
|
-
l.value =
|
|
654
|
-
}, T = c(() => !r.value && e?.showSearch), M = () => typeof window.orientation < "u" || navigator.userAgent.indexOf("Mobile") !== -1 ? window.innerHeight : e?.listHeight,
|
|
652
|
+
}, _ = (b) => {
|
|
653
|
+
l.value = b, i.value = "";
|
|
654
|
+
}, T = c(() => !r.value && e?.showSearch), M = () => typeof window.orientation < "u" || navigator.userAgent.indexOf("Mobile") !== -1 ? window.innerHeight : e?.listHeight, V = () => {
|
|
655
655
|
l.value = !1;
|
|
656
656
|
};
|
|
657
|
-
return (
|
|
657
|
+
return (b, j) => (a(), g(t(Pe), z({
|
|
658
658
|
value: t(u),
|
|
659
|
-
"onUpdate:value":
|
|
660
|
-
},
|
|
659
|
+
"onUpdate:value": j[1] || (j[1] = (R) => W(u) ? u.value = R : null)
|
|
660
|
+
}, b.$attrs, {
|
|
661
661
|
class: t(v),
|
|
662
662
|
allowClear: e?.allowClear,
|
|
663
663
|
autoClearSearchValue: e?.autoClearSearchValue,
|
|
@@ -686,9 +686,9 @@ const yo = {
|
|
|
686
686
|
spin: e?.loading,
|
|
687
687
|
name: t(x) || "chevron-down"
|
|
688
688
|
}, null, 8, ["spin", "name"]),
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
e?.prefixIcon ? (a(),
|
|
689
|
+
b.$slots?.prefixIcon || e?.prefixIcon ? (a(), d("div", Io, [
|
|
690
|
+
h(b.$slots, "prefixIcon", {}, () => [
|
|
691
|
+
e?.prefixIcon ? (a(), g(w, {
|
|
692
692
|
key: 0,
|
|
693
693
|
name: e?.prefixIcon
|
|
694
694
|
}, null, 8, ["name"])) : y("", !0)
|
|
@@ -702,18 +702,18 @@ const yo = {
|
|
|
702
702
|
]),
|
|
703
703
|
_: 2
|
|
704
704
|
}, [
|
|
705
|
-
|
|
705
|
+
E(t(S), (R) => ({
|
|
706
706
|
name: R,
|
|
707
707
|
fn: f(() => [
|
|
708
|
-
|
|
708
|
+
h(b.$slots, R)
|
|
709
709
|
])
|
|
710
710
|
})),
|
|
711
|
-
|
|
711
|
+
b.$slots.option ? {
|
|
712
712
|
name: "option",
|
|
713
|
-
fn: f(({ label: R, value:
|
|
714
|
-
|
|
713
|
+
fn: f(({ label: R, value: q }) => [
|
|
714
|
+
h(b.$slots, "option", {
|
|
715
715
|
label: R,
|
|
716
|
-
value:
|
|
716
|
+
value: q
|
|
717
717
|
})
|
|
718
718
|
]),
|
|
719
719
|
key: "0"
|
|
@@ -721,7 +721,7 @@ const yo = {
|
|
|
721
721
|
e?.clearIcon ? {
|
|
722
722
|
name: "clearIcon",
|
|
723
723
|
fn: f(() => [
|
|
724
|
-
e?.clearIcon ? (a(),
|
|
724
|
+
e?.clearIcon ? (a(), g(w, {
|
|
725
725
|
key: 0,
|
|
726
726
|
name: e?.clearIcon
|
|
727
727
|
}, null, 8, ["name"])) : y("", !0)
|
|
@@ -737,14 +737,14 @@ const yo = {
|
|
|
737
737
|
]),
|
|
738
738
|
key: "2"
|
|
739
739
|
} : void 0,
|
|
740
|
-
|
|
740
|
+
b.$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
|
}),
|
|
747
|
-
|
|
747
|
+
P(" No result found! ")
|
|
748
748
|
]),
|
|
749
749
|
key: "3"
|
|
750
750
|
},
|
|
@@ -753,9 +753,9 @@ const yo = {
|
|
|
753
753
|
fn: f(({ menuNode: R }) => [
|
|
754
754
|
I(Bo, {
|
|
755
755
|
filter: i.value,
|
|
756
|
-
"onUpdate:filter":
|
|
756
|
+
"onUpdate:filter": j[0] || (j[0] = (q) => i.value = q),
|
|
757
757
|
menu: R,
|
|
758
|
-
onCloseDropdown:
|
|
758
|
+
onCloseDropdown: V
|
|
759
759
|
}, null, 8, ["filter", "menu"])
|
|
760
760
|
]),
|
|
761
761
|
key: "4"
|
|
@@ -818,40 +818,40 @@ const Ao = ["for"], No = {
|
|
|
818
818
|
get() {
|
|
819
819
|
return e.value;
|
|
820
820
|
},
|
|
821
|
-
set(
|
|
822
|
-
o("update:value",
|
|
821
|
+
set(b) {
|
|
822
|
+
o("update:value", b);
|
|
823
823
|
}
|
|
824
824
|
}), p = c(() => e.amountCurrency ? bo[e.amountCurrency] : null), x = c({
|
|
825
825
|
get() {
|
|
826
826
|
return e.amountCurrency;
|
|
827
827
|
},
|
|
828
|
-
set(
|
|
829
|
-
o("update:amountCurrency",
|
|
828
|
+
set(b) {
|
|
829
|
+
o("update:amountCurrency", b);
|
|
830
830
|
}
|
|
831
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
|
|
833
|
-
return s?.class && delete
|
|
834
|
-
}), T = (
|
|
835
|
-
o("change",
|
|
836
|
-
}, M = (
|
|
837
|
-
o("currency-change",
|
|
838
|
-
},
|
|
832
|
+
let b = { ...s, ...B.value };
|
|
833
|
+
return s?.class && delete b?.class, b;
|
|
834
|
+
}), T = (b) => {
|
|
835
|
+
o("change", b);
|
|
836
|
+
}, M = (b) => {
|
|
837
|
+
o("currency-change", b);
|
|
838
|
+
}, V = () => {
|
|
839
839
|
i.value.focus();
|
|
840
840
|
};
|
|
841
|
-
return (
|
|
842
|
-
class:
|
|
841
|
+
return (b, j) => (a(), d("div", {
|
|
842
|
+
class: L(t(r))
|
|
843
843
|
}, [
|
|
844
|
-
|
|
844
|
+
h(b.$slots, "title"),
|
|
845
845
|
e.title ? (a(), d("label", {
|
|
846
846
|
key: 0,
|
|
847
|
-
onClick:
|
|
847
|
+
onClick: V,
|
|
848
848
|
class: "ak-input__title",
|
|
849
|
-
for:
|
|
849
|
+
for: b.$attrs?.id
|
|
850
850
|
}, C(e.title), 9, Ao)) : y("", !0),
|
|
851
851
|
e.type !== "textarea" ? (a(), d("div", No, [
|
|
852
|
-
(a(),
|
|
852
|
+
(a(), g(ue(t(S)), z({
|
|
853
853
|
value: t(v),
|
|
854
|
-
"onUpdate:value":
|
|
854
|
+
"onUpdate:value": j[1] || (j[1] = (R) => W(v) ? v.value = R : null)
|
|
855
855
|
}, t(_), {
|
|
856
856
|
allowClear: e?.allowClear,
|
|
857
857
|
type: t(l),
|
|
@@ -865,28 +865,28 @@ const Ao = ["for"], No = {
|
|
|
865
865
|
ref: i
|
|
866
866
|
}), O({
|
|
867
867
|
prefix: f(() => [
|
|
868
|
-
e.prefixIcon ? (a(),
|
|
868
|
+
e.prefixIcon ? (a(), g(w, {
|
|
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(G).userInfo ? (a(),
|
|
872
|
+
}, null, 8, ["name"])) : t(p) ? (a(), d("span", Ro, C(t(p)), 1)) : e.type === t(G).userInfo ? (a(), g(wo, {
|
|
873
873
|
key: 2,
|
|
874
874
|
src: e.avatarUrl,
|
|
875
875
|
disabled: e.disabled
|
|
876
876
|
}, null, 8, ["src", "disabled"])) : y("", !0)
|
|
877
877
|
]),
|
|
878
878
|
suffix: f(() => [
|
|
879
|
-
e.type === "amount" ? (a(),
|
|
879
|
+
e.type === "amount" ? (a(), g(To, {
|
|
880
880
|
key: 0,
|
|
881
881
|
value: t(x),
|
|
882
|
-
"onUpdate:value":
|
|
882
|
+
"onUpdate:value": j[0] || (j[0] = (R) => W(x) ? x.value = R : null),
|
|
883
883
|
onChange: M,
|
|
884
884
|
dropdownClassName: "ak-input__input__ma-select__dropdown",
|
|
885
885
|
options: t(ko),
|
|
886
886
|
disabled: e.disabled,
|
|
887
887
|
size: "small"
|
|
888
888
|
}, null, 8, ["value", "options", "disabled"])) : y("", !0),
|
|
889
|
-
e.suffixIcon ? (a(),
|
|
889
|
+
e.suffixIcon ? (a(), g(w, {
|
|
890
890
|
key: 1,
|
|
891
891
|
size: "xs",
|
|
892
892
|
name: e.suffixIcon
|
|
@@ -894,17 +894,17 @@ const Ao = ["for"], No = {
|
|
|
894
894
|
]),
|
|
895
895
|
_: 2
|
|
896
896
|
}, [
|
|
897
|
-
|
|
898
|
-
name:
|
|
897
|
+
E(b.$slots, (R, q) => ({
|
|
898
|
+
name: q,
|
|
899
899
|
fn: f(() => [
|
|
900
|
-
|
|
900
|
+
h(b.$slots, q)
|
|
901
901
|
])
|
|
902
902
|
}))
|
|
903
903
|
]), 1040, ["value", "allowClear", "type", "disabled", "placeholder", "addonBefore", "addonAfter", "class"]))
|
|
904
|
-
])) : (a(),
|
|
904
|
+
])) : (a(), g(t(Ve), z({
|
|
905
905
|
key: 2,
|
|
906
906
|
value: t(v),
|
|
907
|
-
"onUpdate:value":
|
|
907
|
+
"onUpdate:value": j[2] || (j[2] = (R) => W(v) ? v.value = R : null)
|
|
908
908
|
}, t(_), {
|
|
909
909
|
class: t(u),
|
|
910
910
|
disabled: e?.disabled,
|
|
@@ -914,14 +914,14 @@ const Ao = ["for"], No = {
|
|
|
914
914
|
ref_key: "inputRef",
|
|
915
915
|
ref: i
|
|
916
916
|
}), O({ _: 2 }, [
|
|
917
|
-
|
|
918
|
-
name:
|
|
917
|
+
E(b.$slots, (R, q) => ({
|
|
918
|
+
name: q,
|
|
919
919
|
fn: f(() => [
|
|
920
|
-
|
|
920
|
+
h(b.$slots, q)
|
|
921
921
|
])
|
|
922
922
|
}))
|
|
923
923
|
]), 1040, ["value", "class", "disabled", "placeholder"])),
|
|
924
|
-
|
|
924
|
+
h(b.$slots, "hint"),
|
|
925
925
|
e.hintText ? (a(), d("div", Do, C(e.hintText), 1)) : y("", !0)
|
|
926
926
|
], 2));
|
|
927
927
|
}
|
|
@@ -931,14 +931,14 @@ const Lo = {
|
|
|
931
931
|
}, ht = /* @__PURE__ */ $({
|
|
932
932
|
...Lo,
|
|
933
933
|
setup(n) {
|
|
934
|
-
return (o, e) => (a(),
|
|
934
|
+
return (o, e) => (a(), g(t(je), z(o.$attrs, {
|
|
935
935
|
class: "ma-select-option",
|
|
936
936
|
"prefix-cls": "antd-select"
|
|
937
937
|
}), O({ _: 2 }, [
|
|
938
|
-
|
|
938
|
+
E(o.$slots, (s, i) => ({
|
|
939
939
|
name: i,
|
|
940
940
|
fn: f(() => [
|
|
941
|
-
|
|
941
|
+
h(o.$slots, i)
|
|
942
942
|
])
|
|
943
943
|
}))
|
|
944
944
|
]), 1040));
|
|
@@ -967,16 +967,16 @@ const Lo = {
|
|
|
967
967
|
"ak-checkbox--intermediate": typeof o?.indeterminate == "boolean"
|
|
968
968
|
}
|
|
969
969
|
]);
|
|
970
|
-
return (s, i) => (a(),
|
|
970
|
+
return (s, i) => (a(), g(t(qe), z(s.$attrs, {
|
|
971
971
|
class: t(e),
|
|
972
972
|
disabled: o?.disabled,
|
|
973
973
|
indeterminate: o?.indeterminate,
|
|
974
974
|
"prefix-cls": "antd-checkbox"
|
|
975
975
|
}), O({ _: 2 }, [
|
|
976
|
-
|
|
976
|
+
E(s.$slots, (l, r) => ({
|
|
977
977
|
name: r,
|
|
978
978
|
fn: f(() => [
|
|
979
|
-
|
|
979
|
+
h(s.$slots, r),
|
|
980
980
|
o.hint ? (a(), d("div", {
|
|
981
981
|
key: r,
|
|
982
982
|
class: "ak-checkbox__hint-text"
|
|
@@ -996,14 +996,14 @@ const Vo = {
|
|
|
996
996
|
},
|
|
997
997
|
setup(n) {
|
|
998
998
|
const o = n;
|
|
999
|
-
return (e, s) => (a(),
|
|
999
|
+
return (e, s) => (a(), g(t(Ue), z(e.$attrs, {
|
|
1000
1000
|
class: "ak-checkbox-group ma-checkbox-group",
|
|
1001
1001
|
"prefix-cls": "antd-checkbox"
|
|
1002
1002
|
}), O({ _: 2 }, [
|
|
1003
|
-
|
|
1003
|
+
E(e.$slots, (i, l) => ({
|
|
1004
1004
|
name: l,
|
|
1005
1005
|
fn: f(() => [
|
|
1006
|
-
|
|
1006
|
+
h(e.$slots, l),
|
|
1007
1007
|
o.hint ? (a(), d("div", {
|
|
1008
1008
|
key: l,
|
|
1009
1009
|
class: "ak-checkbox__hint-text"
|
|
@@ -1106,15 +1106,15 @@ const Vo = {
|
|
|
1106
1106
|
_ !== i.value.join("") && _ && _.match(/^\d+$/) && (i.value = _.split("").slice(0, e.length));
|
|
1107
1107
|
}
|
|
1108
1108
|
), (_, T) => (a(), d("div", z({ class: t(l) }, _.$attrs), [
|
|
1109
|
-
(a(!0), d(K, null,
|
|
1109
|
+
(a(!0), d(K, null, E(e.length, (M) => (a(), g(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: (
|
|
1116
|
-
onKeydown: (
|
|
1117
|
-
onPaste: (
|
|
1115
|
+
onFocus: (V) => v(M - 1),
|
|
1116
|
+
onKeydown: (V) => p(V, M - 1),
|
|
1117
|
+
onPaste: (V) => N(V, M - 1),
|
|
1118
1118
|
class: "ma-numeric-input__input"
|
|
1119
1119
|
}, null, 8, ["focus", "placeholder", "value", "disabled", "onFocus", "onKeydown", "onPaste"]))), 128))
|
|
1120
1120
|
], 16));
|
|
@@ -1135,14 +1135,14 @@ 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(),
|
|
1138
|
+
return (s, i) => (a(), g(t(Oe), z(s.$attrs, {
|
|
1139
1139
|
class: t(e),
|
|
1140
1140
|
"prefix-cls": "antd-radio"
|
|
1141
1141
|
}), O({ _: 2 }, [
|
|
1142
|
-
|
|
1142
|
+
E(s.$slots, (l, r) => ({
|
|
1143
1143
|
name: r,
|
|
1144
1144
|
fn: f(() => [
|
|
1145
|
-
|
|
1145
|
+
h(s.$slots, r),
|
|
1146
1146
|
o.hint ? (a(), d("div", {
|
|
1147
1147
|
key: r,
|
|
1148
1148
|
class: "ma-radio__hint-text"
|
|
@@ -1190,32 +1190,32 @@ const Go = ["aria-checked", "disabled"], Ko = ["src", "alt"], Wo = { class: "ma-
|
|
|
1190
1190
|
"aria-checked": e.checked,
|
|
1191
1191
|
disabled: e.disabled
|
|
1192
1192
|
}, l.$attrs, { onClick: s }), [
|
|
1193
|
-
|
|
1193
|
+
k("img", {
|
|
1194
1194
|
src: e.appIcon,
|
|
1195
1195
|
alt: e.appName,
|
|
1196
1196
|
width: "40",
|
|
1197
1197
|
height: "40"
|
|
1198
1198
|
}, null, 8, Ko),
|
|
1199
|
-
|
|
1200
|
-
|
|
1199
|
+
k("span", Wo, [
|
|
1200
|
+
k("span", Jo, C(e.appName), 1),
|
|
1201
1201
|
e.appCategory ? (a(), d("span", Yo, C(e?.appCategory), 1)) : y("", !0)
|
|
1202
1202
|
]),
|
|
1203
|
-
|
|
1203
|
+
k("span", Xo, [
|
|
1204
1204
|
I(de, {
|
|
1205
1205
|
name: "fade",
|
|
1206
1206
|
mode: "out-in"
|
|
1207
1207
|
}, {
|
|
1208
1208
|
default: f(() => [
|
|
1209
|
-
e.loading ? (a(),
|
|
1209
|
+
e.loading ? (a(), g(w, {
|
|
1210
1210
|
key: 0,
|
|
1211
1211
|
name: "loader",
|
|
1212
1212
|
size: "xs",
|
|
1213
1213
|
spin: ""
|
|
1214
|
-
})) : !e.multiple || e.checked ? (a(),
|
|
1214
|
+
})) : !e.multiple || e.checked ? (a(), g(Ho, {
|
|
1215
1215
|
key: 1,
|
|
1216
1216
|
checked: e.checked,
|
|
1217
1217
|
type: "check"
|
|
1218
|
-
}, null, 8, ["checked"])) : (a(),
|
|
1218
|
+
}, null, 8, ["checked"])) : (a(), g(w, {
|
|
1219
1219
|
key: 2,
|
|
1220
1220
|
name: "add-circle",
|
|
1221
1221
|
size: "xs"
|
|
@@ -1261,9 +1261,9 @@ const Zo = { class: "ak-app-icon__logo" }, es = ["src"], os = {
|
|
|
1261
1261
|
o("close");
|
|
1262
1262
|
};
|
|
1263
1263
|
return (r, u) => (a(), d("div", {
|
|
1264
|
-
class:
|
|
1264
|
+
class: L(t(i))
|
|
1265
1265
|
}, [
|
|
1266
|
-
|
|
1266
|
+
k("div", Zo, [
|
|
1267
1267
|
e.closable ? (a(), d("span", {
|
|
1268
1268
|
key: 0,
|
|
1269
1269
|
onClick: l,
|
|
@@ -1274,7 +1274,7 @@ const Zo = { class: "ak-app-icon__logo" }, es = ["src"], os = {
|
|
|
1274
1274
|
name: "close-circle"
|
|
1275
1275
|
})
|
|
1276
1276
|
])) : y("", !0),
|
|
1277
|
-
|
|
1277
|
+
k("img", {
|
|
1278
1278
|
class: "ak-app-icon-img",
|
|
1279
1279
|
src: e.appIcon
|
|
1280
1280
|
}, null, 8, es),
|
|
@@ -1285,7 +1285,7 @@ const Zo = { class: "ak-app-icon__logo" }, es = ["src"], os = {
|
|
|
1285
1285
|
}, null, 8, ["name"])
|
|
1286
1286
|
])) : y("", !0)
|
|
1287
1287
|
]),
|
|
1288
|
-
|
|
1288
|
+
k("div", ss, [
|
|
1289
1289
|
e?.appName ? (a(), d("span", ts, C(e.appName), 1)) : y("", !0),
|
|
1290
1290
|
e?.appDescription ? (a(), d("span", ns, C(e.appDescription), 1)) : y("", !0)
|
|
1291
1291
|
])
|
|
@@ -1306,11 +1306,11 @@ const Bt = [
|
|
|
1306
1306
|
}, St = /* @__PURE__ */ $({
|
|
1307
1307
|
...is,
|
|
1308
1308
|
setup(n) {
|
|
1309
|
-
return (o, e) => (a(),
|
|
1310
|
-
|
|
1309
|
+
return (o, e) => (a(), g(t(He), z(o.$attrs, { "prefix-cls": "antd-radio" }), O({ _: 2 }, [
|
|
1310
|
+
E(o.$slots, (s, i) => ({
|
|
1311
1311
|
name: i,
|
|
1312
1312
|
fn: f(() => [
|
|
1313
|
-
|
|
1313
|
+
h(o.$slots, i)
|
|
1314
1314
|
])
|
|
1315
1315
|
}))
|
|
1316
1316
|
]), 1040));
|
|
@@ -1340,13 +1340,13 @@ const Bt = [
|
|
|
1340
1340
|
}
|
|
1341
1341
|
]);
|
|
1342
1342
|
return (s, i) => (a(), d("div", {
|
|
1343
|
-
class:
|
|
1343
|
+
class: L(t(e))
|
|
1344
1344
|
}, [
|
|
1345
|
-
o?.icon ? (a(),
|
|
1345
|
+
o?.icon ? (a(), g(w, {
|
|
1346
1346
|
key: 0,
|
|
1347
1347
|
name: o?.icon
|
|
1348
1348
|
}, null, 8, ["name"])) : y("", !0),
|
|
1349
|
-
|
|
1349
|
+
h(s.$slots, "default")
|
|
1350
1350
|
], 2));
|
|
1351
1351
|
}
|
|
1352
1352
|
});
|
|
@@ -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(),
|
|
1387
|
+
return (l, r) => (a(), g(t(Ge), z(l.$attrs, {
|
|
1388
1388
|
class: t(s),
|
|
1389
1389
|
description: n.description,
|
|
1390
1390
|
message: n.message,
|
|
@@ -1399,18 +1399,18 @@ const Nt = [
|
|
|
1399
1399
|
})
|
|
1400
1400
|
]),
|
|
1401
1401
|
icon: f(() => [
|
|
1402
|
-
o?.icon ? (a(),
|
|
1402
|
+
o?.icon ? (a(), g(w, {
|
|
1403
1403
|
key: 0,
|
|
1404
1404
|
name: n.icon,
|
|
1405
1405
|
size: "lg"
|
|
1406
1406
|
}, null, 8, ["name"])) : y("", !0),
|
|
1407
|
-
|
|
1407
|
+
h(l.$slots, "icon")
|
|
1408
1408
|
]),
|
|
1409
1409
|
message: f(() => [
|
|
1410
|
-
|
|
1410
|
+
h(l.$slots, "message")
|
|
1411
1411
|
]),
|
|
1412
1412
|
description: f(() => [
|
|
1413
|
-
|
|
1413
|
+
h(l.$slots, "description")
|
|
1414
1414
|
]),
|
|
1415
1415
|
_: 3
|
|
1416
1416
|
}, 16, ["class", "description", "message", "closable", "showIcon"]));
|
|
@@ -1561,7 +1561,7 @@ const Lt = [
|
|
|
1561
1561
|
}, x = () => {
|
|
1562
1562
|
o("ok");
|
|
1563
1563
|
}, S = Q();
|
|
1564
|
-
return (B, N) => (a(),
|
|
1564
|
+
return (B, N) => (a(), g(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",
|
|
@@ -1583,21 +1583,21 @@ const Lt = [
|
|
|
1583
1583
|
default: f(() => [
|
|
1584
1584
|
t(i) ? (a(), d("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
|
-
class:
|
|
1586
|
+
class: L(t(v))
|
|
1587
1587
|
}, [
|
|
1588
1588
|
I(w, { name: t(i) }, null, 8, ["name"])
|
|
1589
1589
|
], 2)) : y("", !0),
|
|
1590
1590
|
e.title || B.$slots.title ? (a(), d("h1", ps, [
|
|
1591
|
-
|
|
1592
|
-
|
|
1591
|
+
h(B.$slots, "title"),
|
|
1592
|
+
P(" " + C(e.title), 1)
|
|
1593
1593
|
])) : y("", !0),
|
|
1594
|
-
|
|
1594
|
+
k("div", us, [
|
|
1595
1595
|
e.content ? (a(), d("div", ds, C(e.content), 1)) : y("", !0),
|
|
1596
|
-
|
|
1597
|
-
|
|
1596
|
+
h(B.$slots, "content"),
|
|
1597
|
+
h(B.$slots, "default")
|
|
1598
1598
|
]),
|
|
1599
1599
|
t(r) ? (a(), d("div", ms, [
|
|
1600
|
-
e.okText ? (a(),
|
|
1600
|
+
e.okText ? (a(), g(J, z({
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
onClick: x,
|
|
1603
1603
|
class: "ak-modal__ok-button",
|
|
@@ -1605,21 +1605,21 @@ const Lt = [
|
|
|
1605
1605
|
loading: e.confirmLoading
|
|
1606
1606
|
}, e.okButtonProps), {
|
|
1607
1607
|
default: f(() => [
|
|
1608
|
-
|
|
1608
|
+
P(C(e.okText), 1)
|
|
1609
1609
|
]),
|
|
1610
1610
|
_: 1
|
|
1611
1611
|
}, 16, ["variant", "loading"])) : y("", !0),
|
|
1612
|
-
e.cancelText ? (a(),
|
|
1612
|
+
e.cancelText ? (a(), g(J, z({
|
|
1613
1613
|
key: 1,
|
|
1614
1614
|
onClick: p,
|
|
1615
1615
|
type: "grey-link"
|
|
1616
1616
|
}, e.cancelButtonProps), {
|
|
1617
1617
|
default: f(() => [
|
|
1618
|
-
|
|
1618
|
+
P(C(e.cancelText), 1)
|
|
1619
1619
|
]),
|
|
1620
1620
|
_: 1
|
|
1621
1621
|
}, 16)) : y("", !0),
|
|
1622
|
-
|
|
1622
|
+
h(B.$slots, "footer")
|
|
1623
1623
|
])) : y("", !0)
|
|
1624
1624
|
]),
|
|
1625
1625
|
_: 3
|
|
@@ -1657,10 +1657,10 @@ const fs = {
|
|
|
1657
1657
|
"ak-rate__item__icon--filled": o.value + 0.5 >= o.starRate
|
|
1658
1658
|
}
|
|
1659
1659
|
]), s = c(() => o.starRate - 0.5 === o.value), i = c(() => s.value ? "star-half-colored" : "star-bold");
|
|
1660
|
-
return (l, r) => (a(),
|
|
1660
|
+
return (l, r) => (a(), g(de, { name: "fade" }, {
|
|
1661
1661
|
default: f(() => [
|
|
1662
1662
|
I(w, {
|
|
1663
|
-
class:
|
|
1663
|
+
class: L(t(e)),
|
|
1664
1664
|
name: t(i),
|
|
1665
1665
|
size: n.iconSize
|
|
1666
1666
|
}, null, 8, ["class", "name", "size"])
|
|
@@ -1717,12 +1717,12 @@ const fs = {
|
|
|
1717
1717
|
o("update:value", N), o("change", N);
|
|
1718
1718
|
};
|
|
1719
1719
|
return (N, _) => (a(), d("ul", {
|
|
1720
|
-
class:
|
|
1720
|
+
class: L(t(i)),
|
|
1721
1721
|
onMouseleave: p,
|
|
1722
1722
|
onKeydown: S,
|
|
1723
1723
|
tabindex: t(r)
|
|
1724
1724
|
}, [
|
|
1725
|
-
(a(), d(K, null,
|
|
1725
|
+
(a(), d(K, null, E(5, (T) => k("li", {
|
|
1726
1726
|
class: "ak-rate__item",
|
|
1727
1727
|
key: T,
|
|
1728
1728
|
onMousemove: (M) => x(M, T),
|
|
@@ -1768,13 +1768,13 @@ const Ot = [
|
|
|
1768
1768
|
"ma-spin__icon"
|
|
1769
1769
|
]), l = c(() => `spin-${o.type}`), r = c(() => e?.default && o.spinning);
|
|
1770
1770
|
return (u, v) => (a(), d("div", z({ class: t(s) }, u.$attrs), [
|
|
1771
|
-
o.spinning ? (a(),
|
|
1771
|
+
o.spinning ? (a(), g(w, {
|
|
1772
1772
|
key: 0,
|
|
1773
|
-
class:
|
|
1773
|
+
class: L(t(i)),
|
|
1774
1774
|
name: t(l)
|
|
1775
1775
|
}, null, 8, ["class", "name"])) : y("", !0),
|
|
1776
1776
|
t(r) ? (a(), d("div", ks)) : y("", !0),
|
|
1777
|
-
|
|
1777
|
+
h(u.$slots, "default")
|
|
1778
1778
|
], 16));
|
|
1779
1779
|
}
|
|
1780
1780
|
});
|
|
@@ -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(),
|
|
1816
|
+
return (l, r) => (a(), g(t(We), z({
|
|
1817
1817
|
"prefix-cls": "antd-dropdown",
|
|
1818
1818
|
overlayClassName: t(i),
|
|
1819
1819
|
destroyPopupOnHide: e.destroyPopupOnHide,
|
|
@@ -1825,10 +1825,10 @@ const Gt = [
|
|
|
1825
1825
|
"onUpdate:visible": r[0] || (r[0] = (u) => W(s) ? s.value = u : null)
|
|
1826
1826
|
}), {
|
|
1827
1827
|
overlay: f(() => [
|
|
1828
|
-
|
|
1828
|
+
h(l.$slots, "overlay")
|
|
1829
1829
|
]),
|
|
1830
1830
|
default: f(() => [
|
|
1831
|
-
|
|
1831
|
+
h(l.$slots, "default")
|
|
1832
1832
|
]),
|
|
1833
1833
|
_: 3
|
|
1834
1834
|
}, 16, ["overlayClassName", "destroyPopupOnHide", "disabled", "placement", "trigger", "visible"]));
|
|
@@ -1876,17 +1876,17 @@ const Jt = [
|
|
|
1876
1876
|
`ma-empty ma-empty--${o.variant} ma-empty--${o.size}`
|
|
1877
1877
|
]);
|
|
1878
1878
|
return (i, l) => (a(), d("div", {
|
|
1879
|
-
class:
|
|
1879
|
+
class: L(t(s))
|
|
1880
1880
|
}, [
|
|
1881
|
-
t(e) ? (a(),
|
|
1881
|
+
t(e) ? (a(), g(w, {
|
|
1882
1882
|
key: 0,
|
|
1883
1883
|
name: t(e),
|
|
1884
1884
|
class: "ma-empty__icon"
|
|
1885
1885
|
}, null, 8, ["name"])) : y("", !0),
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1886
|
+
k("span", Cs, C(n.title), 1),
|
|
1887
|
+
k("span", xs, C(n.description), 1),
|
|
1888
|
+
k("div", Ms, [
|
|
1889
|
+
h(i.$slots, "default")
|
|
1890
1890
|
])
|
|
1891
1891
|
], 2));
|
|
1892
1892
|
}
|
|
@@ -1902,7 +1902,7 @@ const en = [
|
|
|
1902
1902
|
"lg",
|
|
1903
1903
|
"xl"
|
|
1904
1904
|
];
|
|
1905
|
-
var
|
|
1905
|
+
var U = /* @__PURE__ */ ((n) => (n.error = "error", n.done = "done", n.uploading = "uploading", n))(U || {});
|
|
1906
1906
|
const ee = (n) => {
|
|
1907
1907
|
try {
|
|
1908
1908
|
return JSON.parse(n);
|
|
@@ -1925,20 +1925,20 @@ const ee = (n) => {
|
|
|
1925
1925
|
p.open("POST", n), Object.entries(o).forEach(([x, S]) => {
|
|
1926
1926
|
p.setRequestHeader(x, S);
|
|
1927
1927
|
}), p.upload.onprogress = (x) => {
|
|
1928
|
-
x.lengthComputable && (i.value = x.loaded / x.total * 100, u(
|
|
1928
|
+
x.lengthComputable && (i.value = x.loaded / x.total * 100, u(U.uploading, i.value));
|
|
1929
1929
|
}, p.onload = () => {
|
|
1930
1930
|
p.status >= 200 && p.status < 300 ? u(
|
|
1931
|
-
|
|
1931
|
+
U.done,
|
|
1932
1932
|
i.value,
|
|
1933
1933
|
ee(p.responseText)
|
|
1934
1934
|
) : u(
|
|
1935
|
-
|
|
1935
|
+
U.error,
|
|
1936
1936
|
i.value,
|
|
1937
1937
|
ee(p.responseText)
|
|
1938
1938
|
);
|
|
1939
1939
|
}, p.onerror = () => {
|
|
1940
1940
|
u(
|
|
1941
|
-
|
|
1941
|
+
U.error,
|
|
1942
1942
|
i.value,
|
|
1943
1943
|
ee(p.responseText)
|
|
1944
1944
|
);
|
|
@@ -1978,21 +1978,21 @@ const ee = (n) => {
|
|
|
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
1980
|
return (u, v) => (a(), d("div", As, [
|
|
1981
|
-
|
|
1981
|
+
k("div", Ns, [
|
|
1982
1982
|
I(w, { name: "document-bulk" })
|
|
1983
1983
|
]),
|
|
1984
|
-
|
|
1985
|
-
|
|
1984
|
+
k("div", Rs, [
|
|
1985
|
+
k("span", Ds, C(n.file.file.name), 1),
|
|
1986
1986
|
t(i) ? (a(), d("span", Fs, C(t(s)), 1)) : y("", !0),
|
|
1987
|
-
|
|
1988
|
-
|
|
1987
|
+
k("span", Ps, [
|
|
1988
|
+
k("span", {
|
|
1989
1989
|
class: "progress-item",
|
|
1990
1990
|
style: ge({ width: `${n.file.progress}%` })
|
|
1991
1991
|
}, null, 4)
|
|
1992
1992
|
])
|
|
1993
1993
|
]),
|
|
1994
|
-
|
|
1995
|
-
n.file.status === t(
|
|
1994
|
+
k("div", Ls, [
|
|
1995
|
+
n.file.status === t(U).uploading ? (a(), g(J, {
|
|
1996
1996
|
key: 0,
|
|
1997
1997
|
disabled: n.disabled,
|
|
1998
1998
|
onClick: v[0] || (v[0] = (p) => r()),
|
|
@@ -2000,7 +2000,7 @@ const ee = (n) => {
|
|
|
2000
2000
|
type: "primary",
|
|
2001
2001
|
variant: "plain",
|
|
2002
2002
|
icon: "close-circle-bulk"
|
|
2003
|
-
}, null, 8, ["disabled"])) : (a(),
|
|
2003
|
+
}, null, 8, ["disabled"])) : (a(), g(J, {
|
|
2004
2004
|
key: 1,
|
|
2005
2005
|
disabled: n.disabled,
|
|
2006
2006
|
onClick: v[1] || (v[1] = (p) => l()),
|
|
@@ -2009,11 +2009,11 @@ const ee = (n) => {
|
|
|
2009
2009
|
variant: "plain",
|
|
2010
2010
|
icon: "trash-bulk"
|
|
2011
2011
|
}, null, 8, ["disabled"])),
|
|
2012
|
-
|
|
2012
|
+
k("span", null, "%" + C(parseInt(n.file.progress.toString())), 1)
|
|
2013
2013
|
])
|
|
2014
2014
|
]));
|
|
2015
2015
|
}
|
|
2016
|
-
}), Vs = ["onDrop"], js = ["accept", "multiple", "disabled"], qs = { class: "text" }, Us = /* @__PURE__ */
|
|
2016
|
+
}), Vs = ["onDrop"], js = ["accept", "multiple", "disabled"], qs = { class: "text" }, Us = /* @__PURE__ */ k("span", null, "Uploading file...", -1), Os = { class: "upload-icon" }, Hs = {
|
|
2017
2017
|
key: 0,
|
|
2018
2018
|
class: "upload-title"
|
|
2019
2019
|
}, Gs = {
|
|
@@ -2049,9 +2049,9 @@ const ee = (n) => {
|
|
|
2049
2049
|
get() {
|
|
2050
2050
|
return e.fileList;
|
|
2051
2051
|
},
|
|
2052
|
-
set(
|
|
2053
|
-
o("update:fileList",
|
|
2054
|
-
if ([
|
|
2052
|
+
set(m) {
|
|
2053
|
+
o("update:fileList", m), o("change", m), e?.action && m.forEach(async (A, D) => {
|
|
2054
|
+
if ([U.done, U.error].includes(
|
|
2055
2055
|
A.status
|
|
2056
2056
|
))
|
|
2057
2057
|
return;
|
|
@@ -2064,7 +2064,7 @@ const ee = (n) => {
|
|
|
2064
2064
|
);
|
|
2065
2065
|
e?.beforeUpload && (A.file = await e.beforeUpload(A.file)), H(A, (Y, ye, ie) => {
|
|
2066
2066
|
if (p.value[D]) {
|
|
2067
|
-
if (Y ===
|
|
2067
|
+
if (Y === U.error) {
|
|
2068
2068
|
o("error", { file: A.file, message: ie }), Z(
|
|
2069
2069
|
p.value.findIndex((he) => he.id === A.id)
|
|
2070
2070
|
);
|
|
@@ -2076,7 +2076,7 @@ const ee = (n) => {
|
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
2078
|
}), x = c(
|
|
2079
|
-
() => p.value.map((
|
|
2079
|
+
() => p.value.map((m) => m.file.name).join(", ")
|
|
2080
2080
|
), S = c(
|
|
2081
2081
|
() => e.type === "box" ? e.multiple ? !0 : !p.value.length : !0
|
|
2082
2082
|
), B = c(
|
|
@@ -2087,7 +2087,7 @@ const ee = (n) => {
|
|
|
2087
2087
|
"ma-upload--active": l.value
|
|
2088
2088
|
},
|
|
2089
2089
|
{
|
|
2090
|
-
"ma-upload--disabled":
|
|
2090
|
+
"ma-upload--disabled": V.value
|
|
2091
2091
|
}
|
|
2092
2092
|
]), _ = c(() => [
|
|
2093
2093
|
"ma-file-list",
|
|
@@ -2095,95 +2095,95 @@ const ee = (n) => {
|
|
|
2095
2095
|
"only-file-list": !S.value
|
|
2096
2096
|
}
|
|
2097
2097
|
]), T = c(() => {
|
|
2098
|
-
const
|
|
2099
|
-
return Qe[
|
|
2098
|
+
const m = e?.size ? Bs.indexOf(e.size) : 0;
|
|
2099
|
+
return Qe[m];
|
|
2100
2100
|
}), M = c(
|
|
2101
|
-
() => e.wait || p.value.some((
|
|
2102
|
-
),
|
|
2101
|
+
() => e.wait || p.value.some((m) => m.status === U.uploading)
|
|
2102
|
+
), V = c(() => e?.disabled || M.value), b = (m) => Array.from(m).find(
|
|
2103
2103
|
(A) => e?.maxFileSize && A.size > e.maxFileSize
|
|
2104
|
-
),
|
|
2105
|
-
const A =
|
|
2104
|
+
), j = (m) => {
|
|
2105
|
+
const A = m.target;
|
|
2106
2106
|
A.files && ne(Array.from(A.files));
|
|
2107
2107
|
}, R = () => {
|
|
2108
2108
|
i.value?.click();
|
|
2109
|
-
},
|
|
2110
|
-
|
|
2109
|
+
}, q = (m) => {
|
|
2110
|
+
m.preventDefault();
|
|
2111
2111
|
}, se = () => {
|
|
2112
2112
|
l.value = !0;
|
|
2113
2113
|
}, te = () => {
|
|
2114
2114
|
l.value = !1;
|
|
2115
|
-
}, fe = (
|
|
2116
|
-
|
|
2117
|
-
Array.from(
|
|
2115
|
+
}, fe = (m) => {
|
|
2116
|
+
V.value || m.dataTransfer?.files && ne(
|
|
2117
|
+
Array.from(m.dataTransfer.files).filter((A) => e?.accept && !Ts(A, e.accept) ? (o("error", { file: A, message: "file type does not match!" }), !1) : !0)
|
|
2118
2118
|
);
|
|
2119
|
-
}, ne = (
|
|
2120
|
-
const A =
|
|
2119
|
+
}, ne = (m) => {
|
|
2120
|
+
const A = b(m);
|
|
2121
2121
|
if (A) {
|
|
2122
2122
|
o("error", { file: A, message: "File too large" });
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
|
-
const D = Array.from(
|
|
2125
|
+
const D = Array.from(m).filter(
|
|
2126
2126
|
(H, Y) => e?.maxCount ? Y + 1 <= e.maxCount : !0
|
|
2127
2127
|
).map((H) => ({
|
|
2128
2128
|
file: H,
|
|
2129
2129
|
id: Is(),
|
|
2130
|
-
status: e?.action ?
|
|
2130
|
+
status: e?.action ? U.uploading : U.done,
|
|
2131
2131
|
progress: e?.action ? 0 : 100,
|
|
2132
2132
|
response: null
|
|
2133
2133
|
}));
|
|
2134
2134
|
e.multiple ? p.value = [...p.value, ...D] : D.length && (p.value = [D[0]]);
|
|
2135
|
-
}, Z = (
|
|
2136
|
-
o("remove", p.value[
|
|
2137
|
-
}, ae = (
|
|
2138
|
-
const A = p.value[
|
|
2139
|
-
typeof A?.cancelRequest == "function" && A.cancelRequest(), Z(
|
|
2140
|
-
}, _e = (
|
|
2141
|
-
|
|
2135
|
+
}, Z = (m) => {
|
|
2136
|
+
o("remove", p.value[m]), p.value = p.value.filter((A, D) => D !== m);
|
|
2137
|
+
}, ae = (m) => {
|
|
2138
|
+
const A = p.value[m];
|
|
2139
|
+
typeof A?.cancelRequest == "function" && A.cancelRequest(), Z(m);
|
|
2140
|
+
}, _e = (m) => {
|
|
2141
|
+
m.stopPropagation(), p.value.forEach((A, D) => ae(D)), p.value = [];
|
|
2142
2142
|
};
|
|
2143
2143
|
return me(() => {
|
|
2144
|
-
r.forEach((
|
|
2145
|
-
s.value?.addEventListener(
|
|
2146
|
-
}), u.forEach((
|
|
2147
|
-
s.value?.addEventListener(
|
|
2148
|
-
}), v.forEach((
|
|
2149
|
-
s.value?.addEventListener(
|
|
2144
|
+
r.forEach((m) => {
|
|
2145
|
+
s.value?.addEventListener(m, q);
|
|
2146
|
+
}), u.forEach((m) => {
|
|
2147
|
+
s.value?.addEventListener(m, se);
|
|
2148
|
+
}), v.forEach((m) => {
|
|
2149
|
+
s.value?.addEventListener(m, te);
|
|
2150
2150
|
});
|
|
2151
2151
|
}), xe(() => {
|
|
2152
|
-
r.forEach((
|
|
2153
|
-
s.value?.removeEventListener(
|
|
2154
|
-
}), u.forEach((
|
|
2155
|
-
s.value?.removeEventListener(
|
|
2156
|
-
}), v.forEach((
|
|
2157
|
-
s.value?.removeEventListener(
|
|
2152
|
+
r.forEach((m) => {
|
|
2153
|
+
s.value?.removeEventListener(m, q);
|
|
2154
|
+
}), u.forEach((m) => {
|
|
2155
|
+
s.value?.removeEventListener(m, se);
|
|
2156
|
+
}), v.forEach((m) => {
|
|
2157
|
+
s.value?.removeEventListener(m, te);
|
|
2158
2158
|
});
|
|
2159
|
-
}), (
|
|
2160
|
-
Me(
|
|
2159
|
+
}), (m, A) => (a(), d("div", z({ class: "ma-upload-wrapper" }, m.$attrs), [
|
|
2160
|
+
Me(k("div", {
|
|
2161
2161
|
ref_key: "uploadArea",
|
|
2162
2162
|
ref: s,
|
|
2163
|
-
class:
|
|
2163
|
+
class: L(t(N)),
|
|
2164
2164
|
onDrop: ze(fe, ["prevent"])
|
|
2165
2165
|
}, [
|
|
2166
|
-
|
|
2166
|
+
k("input", {
|
|
2167
2167
|
type: "file",
|
|
2168
2168
|
accept: n.accept,
|
|
2169
2169
|
multiple: e.multiple,
|
|
2170
|
-
disabled: t(
|
|
2171
|
-
onChange:
|
|
2170
|
+
disabled: t(V),
|
|
2171
|
+
onChange: j,
|
|
2172
2172
|
ref_key: "fileInput",
|
|
2173
2173
|
ref: i
|
|
2174
2174
|
}, null, 40, js),
|
|
2175
|
-
e.type === "button" ? (a(),
|
|
2175
|
+
e.type === "button" ? (a(), g(J, {
|
|
2176
2176
|
key: 0,
|
|
2177
2177
|
type: n.fileList.length ? "primary" : "secondary",
|
|
2178
2178
|
variant: "dark",
|
|
2179
2179
|
icon: "export-2",
|
|
2180
2180
|
onClick: R,
|
|
2181
2181
|
size: t(T),
|
|
2182
|
-
disabled: t(
|
|
2182
|
+
disabled: t(V),
|
|
2183
2183
|
loading: t(M)
|
|
2184
2184
|
}, {
|
|
2185
2185
|
default: f(() => [
|
|
2186
|
-
|
|
2186
|
+
P(C(n.fileList.length ? t(x) : e?.title), 1)
|
|
2187
2187
|
]),
|
|
2188
2188
|
_: 1
|
|
2189
2189
|
}, 8, ["type", "size", "disabled", "loading"])) : e.type === "small-box" ? (a(), d("div", {
|
|
@@ -2191,19 +2191,20 @@ const ee = (n) => {
|
|
|
2191
2191
|
class: "ma-upload__small_box",
|
|
2192
2192
|
onClick: R
|
|
2193
2193
|
}, [
|
|
2194
|
-
t(M) ? (a(),
|
|
2194
|
+
t(M) ? (a(), g(ce, {
|
|
2195
2195
|
key: 0,
|
|
2196
2196
|
type: "three-circles",
|
|
2197
2197
|
color: "blue"
|
|
2198
|
-
})) : (a(),
|
|
2198
|
+
})) : (a(), g(w, {
|
|
2199
2199
|
key: 1,
|
|
2200
2200
|
name: "export-2-bulk"
|
|
2201
2201
|
})),
|
|
2202
|
-
|
|
2202
|
+
k("span", qs, [
|
|
2203
2203
|
t(M) ? (a(), d(K, { key: 0 }, [
|
|
2204
|
-
|
|
2204
|
+
P(" Uploading... ")
|
|
2205
2205
|
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2206
|
-
|
|
2206
|
+
P(C(e?.title) + " ", 1),
|
|
2207
|
+
h(m.$slots, "small-box-title")
|
|
2207
2208
|
], 64))
|
|
2208
2209
|
])
|
|
2209
2210
|
])) : (a(), d("div", {
|
|
@@ -2224,16 +2225,22 @@ const ee = (n) => {
|
|
|
2224
2225
|
size: "small"
|
|
2225
2226
|
}, {
|
|
2226
2227
|
default: f(() => [
|
|
2227
|
-
|
|
2228
|
+
P(" Cancel ")
|
|
2228
2229
|
]),
|
|
2229
2230
|
_: 1
|
|
2230
2231
|
})
|
|
2231
2232
|
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2232
|
-
|
|
2233
|
+
k("div", Os, [
|
|
2233
2234
|
I(w, { name: "upload-bulk" })
|
|
2234
2235
|
]),
|
|
2235
|
-
e?.title ? (a(), d("span", Hs,
|
|
2236
|
-
|
|
2236
|
+
e?.title ? (a(), d("span", Hs, [
|
|
2237
|
+
P(C(e?.title) + " ", 1),
|
|
2238
|
+
h(m.$slots, "box-title")
|
|
2239
|
+
])) : y("", !0),
|
|
2240
|
+
e?.description ? (a(), d("span", Gs, [
|
|
2241
|
+
P(C(e?.description) + " ", 1),
|
|
2242
|
+
h(m.$slots, "box-description")
|
|
2243
|
+
])) : y("", !0)
|
|
2237
2244
|
], 64))
|
|
2238
2245
|
]))
|
|
2239
2246
|
], 42, Vs), [
|
|
@@ -2241,9 +2248,9 @@ const ee = (n) => {
|
|
|
2241
2248
|
]),
|
|
2242
2249
|
t(B) ? (a(), d("div", {
|
|
2243
2250
|
key: 0,
|
|
2244
|
-
class:
|
|
2251
|
+
class: L(t(_))
|
|
2245
2252
|
}, [
|
|
2246
|
-
(a(!0), d(K, null,
|
|
2253
|
+
(a(!0), d(K, null, E(t(p), (D, H) => (a(), g(Es, {
|
|
2247
2254
|
onRemove: (Y) => Z(H),
|
|
2248
2255
|
onCancel: (Y) => ae(H),
|
|
2249
2256
|
file: D,
|
|
@@ -2341,7 +2348,7 @@ export {
|
|
|
2341
2348
|
ut as MaTooltip,
|
|
2342
2349
|
nt as MaTrackButton,
|
|
2343
2350
|
on as MaUpload,
|
|
2344
|
-
|
|
2351
|
+
U as MaUploadFileStatus,
|
|
2345
2352
|
Bs as MaUploadSizes,
|
|
2346
2353
|
en as MaUploadTypes,
|
|
2347
2354
|
xt as NumericInputSizes,
|