@mobileaction/action-kit 1.1.24 → 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 +2 -2
- package/dist/action-kit.mjs +335 -330
- package/dist/src/components/upload/index.vue.d.ts +10 -1
- 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
|
|
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,28 +169,28 @@ 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",
|
|
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)
|
|
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
|
-
|
|
191
|
-
name:
|
|
190
|
+
E(l.$slots, (u, v) => ({
|
|
191
|
+
name: v,
|
|
192
192
|
fn: f(() => [
|
|
193
|
-
|
|
193
|
+
h(l.$slots, v)
|
|
194
194
|
])
|
|
195
195
|
}))
|
|
196
196
|
]), 1040, ["class", "disabled"]));
|
|
@@ -242,9 +242,9 @@ 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",
|
|
249
249
|
checked: t(s),
|
|
250
250
|
"onUpdate:checked": r[0] || (r[0] = (u) => W(s) ? s.value = u : null)
|
|
@@ -302,26 +302,26 @@ 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",
|
|
309
309
|
"aria-checked": t(s) === e.rightValue,
|
|
310
310
|
disabled: e.disabled
|
|
311
311
|
}), [
|
|
312
|
-
|
|
313
|
-
class:
|
|
314
|
-
onClick: u[0] || (u[0] = (
|
|
312
|
+
k("span", {
|
|
313
|
+
class: L({ active: e.active === e.leftValue }),
|
|
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:
|
|
322
|
-
onClick: u[1] || (u[1] = (
|
|
320
|
+
k("span", {
|
|
321
|
+
class: L({ active: e.active === e.rightValue }),
|
|
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(),
|
|
364
|
+
return (r, u) => (a(), g(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,
|
|
@@ -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",
|
|
@@ -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,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));
|
|
@@ -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,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,31 +560,31 @@ const yo = {
|
|
|
560
560
|
o("closeDropdown");
|
|
561
561
|
};
|
|
562
562
|
return (r, u) => (a(), d("div", Co, [
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
k("div", xo, [
|
|
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
|
}, {
|
|
574
574
|
default: f(() => [
|
|
575
|
-
|
|
575
|
+
P("Done")
|
|
576
576
|
]),
|
|
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 = {
|
|
@@ -628,10 +628,10 @@ 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",
|
|
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((
|
|
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
|
-
},
|
|
661
|
-
class: t(
|
|
659
|
+
"onUpdate:value": j[1] || (j[1] = (R) => W(u) ? u.value = R : null)
|
|
660
|
+
}, b.$attrs, {
|
|
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,13 +682,13 @@ 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"]),
|
|
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)
|
|
@@ -696,24 +696,24 @@ 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
|
]),
|
|
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)
|
|
@@ -731,31 +731,31 @@ 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
|
]),
|
|
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
|
},
|
|
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
|
-
"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"
|
|
@@ -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,44 +814,44 @@ 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
|
},
|
|
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
|
-
}), S = c(() => e.type ===
|
|
832
|
-
let
|
|
833
|
-
return s?.class && delete
|
|
834
|
-
}), T = (
|
|
835
|
-
o("change",
|
|
836
|
-
}, M = (
|
|
837
|
-
o("currency-change",
|
|
838
|
-
},
|
|
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 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(),
|
|
853
|
-
value: t(
|
|
854
|
-
"onUpdate:value":
|
|
852
|
+
(a(), g(ue(t(S)), z({
|
|
853
|
+
value: t(v),
|
|
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(
|
|
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
|
-
value: t(
|
|
907
|
-
"onUpdate:value":
|
|
906
|
+
value: t(v),
|
|
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"
|
|
@@ -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,16 +1105,16 @@ 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, 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"
|
|
@@ -1184,38 +1184,38 @@ 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,
|
|
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
|
-
|
|
1204
|
-
|
|
1203
|
+
k("span", Xo, [
|
|
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,31 +1261,31 @@ 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,
|
|
1270
1270
|
class: "ak-app-icon-closable"
|
|
1271
1271
|
}, [
|
|
1272
|
-
|
|
1272
|
+
I(w, {
|
|
1273
1273
|
size: "xs",
|
|
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),
|
|
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"])
|
|
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,
|
|
@@ -1393,24 +1393,24 @@ 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
|
})
|
|
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"]));
|
|
@@ -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(), 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",
|
|
@@ -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:
|
|
1586
|
+
class: L(t(v))
|
|
1587
1587
|
}, [
|
|
1588
|
-
|
|
1588
|
+
I(w, { name: t(i) }, null, 8, ["name"])
|
|
1589
1589
|
], 2)) : y("", !0),
|
|
1590
|
-
e.title ||
|
|
1591
|
-
|
|
1592
|
-
|
|
1590
|
+
e.title || B.$slots.title ? (a(), d("h1", ps, [
|
|
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
|
-
|
|
1663
|
-
class:
|
|
1662
|
+
I(w, {
|
|
1663
|
+
class: L(t(e)),
|
|
1664
1664
|
name: t(i),
|
|
1665
1665
|
size: n.iconSize
|
|
1666
1666
|
}, null, 8, ["class", "name", "size"])
|
|
@@ -1700,36 +1700,36 @@ 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", {
|
|
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(
|
|
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),
|
|
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,14 +1767,14 @@ 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,
|
|
1771
|
-
o.spinning ? (a(),
|
|
1770
|
+
return (u, v) => (a(), d("div", z({ class: t(s) }, u.$attrs), [
|
|
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);
|
|
@@ -1917,32 +1917,32 @@ 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]) => {
|
|
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
|
);
|
|
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,43 +1977,43 @@ 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,
|
|
1981
|
-
|
|
1982
|
-
|
|
1980
|
+
return (u, v) => (a(), d("div", As, [
|
|
1981
|
+
k("div", Ns, [
|
|
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
|
-
onClick:
|
|
1998
|
+
onClick: v[0] || (v[0] = (p) => r()),
|
|
1999
1999
|
size: "small",
|
|
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
|
-
onClick:
|
|
2006
|
+
onClick: v[1] || (v[1] = (p) => l()),
|
|
2007
2007
|
size: "small",
|
|
2008
2008
|
type: "primary",
|
|
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 = {
|
|
@@ -2045,26 +2045,26 @@ 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",
|
|
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;
|
|
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
|
-
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,18 +2076,18 @@ 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
|
-
),
|
|
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
|
{
|
|
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,97 +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(
|
|
2118
|
-
(A) => e?.accept && !Ts(A, e.accept) ? (o("error", { file: A, message: "file type does not match!" }), !1) : !0
|
|
2119
|
-
)
|
|
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)
|
|
2120
2118
|
);
|
|
2121
|
-
}, ne = (
|
|
2122
|
-
const A =
|
|
2119
|
+
}, ne = (m) => {
|
|
2120
|
+
const A = b(m);
|
|
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(m).filter(
|
|
2126
|
+
(H, Y) => e?.maxCount ? Y + 1 <= e.maxCount : !0
|
|
2127
|
+
).map((H) => ({
|
|
2128
|
+
file: H,
|
|
2131
2129
|
id: Is(),
|
|
2132
|
-
status: e?.action ?
|
|
2130
|
+
status: e?.action ? U.uploading : U.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 = (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 = [];
|
|
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((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);
|
|
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((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);
|
|
2160
2158
|
});
|
|
2161
|
-
}), (
|
|
2162
|
-
Me(
|
|
2159
|
+
}), (m, A) => (a(), d("div", z({ class: "ma-upload-wrapper" }, m.$attrs), [
|
|
2160
|
+
Me(k("div", {
|
|
2163
2161
|
ref_key: "uploadArea",
|
|
2164
2162
|
ref: s,
|
|
2165
|
-
class:
|
|
2163
|
+
class: L(t(N)),
|
|
2166
2164
|
onDrop: ze(fe, ["prevent"])
|
|
2167
2165
|
}, [
|
|
2168
|
-
|
|
2166
|
+
k("input", {
|
|
2169
2167
|
type: "file",
|
|
2170
2168
|
accept: n.accept,
|
|
2171
2169
|
multiple: e.multiple,
|
|
2172
|
-
disabled: t(
|
|
2173
|
-
onChange:
|
|
2170
|
+
disabled: t(V),
|
|
2171
|
+
onChange: j,
|
|
2174
2172
|
ref_key: "fileInput",
|
|
2175
2173
|
ref: i
|
|
2176
2174
|
}, null, 40, js),
|
|
2177
|
-
e.type === "button" ? (a(),
|
|
2175
|
+
e.type === "button" ? (a(), g(J, {
|
|
2178
2176
|
key: 0,
|
|
2179
2177
|
type: n.fileList.length ? "primary" : "secondary",
|
|
2180
2178
|
variant: "dark",
|
|
2181
2179
|
icon: "export-2",
|
|
2182
2180
|
onClick: R,
|
|
2183
2181
|
size: t(T),
|
|
2184
|
-
disabled: t(
|
|
2182
|
+
disabled: t(V),
|
|
2185
2183
|
loading: t(M)
|
|
2186
2184
|
}, {
|
|
2187
2185
|
default: f(() => [
|
|
2188
|
-
|
|
2186
|
+
P(C(n.fileList.length ? t(x) : e?.title), 1)
|
|
2189
2187
|
]),
|
|
2190
2188
|
_: 1
|
|
2191
2189
|
}, 8, ["type", "size", "disabled", "loading"])) : e.type === "small-box" ? (a(), d("div", {
|
|
@@ -2193,19 +2191,20 @@ const ee = (n) => {
|
|
|
2193
2191
|
class: "ma-upload__small_box",
|
|
2194
2192
|
onClick: R
|
|
2195
2193
|
}, [
|
|
2196
|
-
t(M) ? (a(),
|
|
2194
|
+
t(M) ? (a(), g(ce, {
|
|
2197
2195
|
key: 0,
|
|
2198
2196
|
type: "three-circles",
|
|
2199
2197
|
color: "blue"
|
|
2200
|
-
})) : (a(),
|
|
2198
|
+
})) : (a(), g(w, {
|
|
2201
2199
|
key: 1,
|
|
2202
2200
|
name: "export-2-bulk"
|
|
2203
2201
|
})),
|
|
2204
|
-
|
|
2205
|
-
t(M) ? (a(), d(
|
|
2206
|
-
|
|
2207
|
-
], 64)) : (a(), d(
|
|
2208
|
-
|
|
2202
|
+
k("span", qs, [
|
|
2203
|
+
t(M) ? (a(), d(K, { key: 0 }, [
|
|
2204
|
+
P(" Uploading... ")
|
|
2205
|
+
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2206
|
+
P(C(e?.title) + " ", 1),
|
|
2207
|
+
h(m.$slots, "small-box-title")
|
|
2209
2208
|
], 64))
|
|
2210
2209
|
])
|
|
2211
2210
|
])) : (a(), d("div", {
|
|
@@ -2213,47 +2212,53 @@ const ee = (n) => {
|
|
|
2213
2212
|
class: "ma-upload__box",
|
|
2214
2213
|
onClick: R
|
|
2215
2214
|
}, [
|
|
2216
|
-
e.ordered && t(M) ? (a(), d(
|
|
2217
|
-
|
|
2215
|
+
e.ordered && t(M) ? (a(), d(K, { key: 0 }, [
|
|
2216
|
+
I(ce, {
|
|
2218
2217
|
type: "three-circles",
|
|
2219
2218
|
color: "blue"
|
|
2220
2219
|
}),
|
|
2221
2220
|
Us,
|
|
2222
|
-
|
|
2221
|
+
I(J, {
|
|
2223
2222
|
onClick: _e,
|
|
2224
2223
|
class: "box-cancel",
|
|
2225
2224
|
type: "secondary",
|
|
2226
2225
|
size: "small"
|
|
2227
2226
|
}, {
|
|
2228
2227
|
default: f(() => [
|
|
2229
|
-
|
|
2228
|
+
P(" Cancel ")
|
|
2230
2229
|
]),
|
|
2231
2230
|
_: 1
|
|
2232
2231
|
})
|
|
2233
|
-
], 64)) : (a(), d(
|
|
2234
|
-
|
|
2235
|
-
|
|
2232
|
+
], 64)) : (a(), d(K, { key: 1 }, [
|
|
2233
|
+
k("div", Os, [
|
|
2234
|
+
I(w, { name: "upload-bulk" })
|
|
2236
2235
|
]),
|
|
2237
|
-
e?.title ? (a(), d("span", Hs,
|
|
2238
|
-
|
|
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)
|
|
2239
2244
|
], 64))
|
|
2240
2245
|
]))
|
|
2241
2246
|
], 42, Vs), [
|
|
2242
2247
|
[Be, t(S)]
|
|
2243
2248
|
]),
|
|
2244
|
-
t(
|
|
2249
|
+
t(B) ? (a(), d("div", {
|
|
2245
2250
|
key: 0,
|
|
2246
|
-
class:
|
|
2251
|
+
class: L(t(_))
|
|
2247
2252
|
}, [
|
|
2248
|
-
(a(!0), d(
|
|
2249
|
-
onRemove: (Y) => Z(
|
|
2250
|
-
onCancel: (Y) => ae(
|
|
2253
|
+
(a(!0), d(K, null, E(t(p), (D, H) => (a(), g(Es, {
|
|
2254
|
+
onRemove: (Y) => Z(H),
|
|
2255
|
+
onCancel: (Y) => ae(H),
|
|
2251
2256
|
file: D,
|
|
2252
|
-
key:
|
|
2257
|
+
key: H,
|
|
2253
2258
|
disabled: e.disabled
|
|
2254
2259
|
}, null, 8, ["onRemove", "onCancel", "file", "disabled"]))), 128))
|
|
2255
2260
|
], 2)) : y("", !0)
|
|
2256
|
-
],
|
|
2261
|
+
], 16));
|
|
2257
2262
|
}
|
|
2258
2263
|
});
|
|
2259
2264
|
class Ws {
|
|
@@ -2322,7 +2327,7 @@ export {
|
|
|
2322
2327
|
Po as MaInput,
|
|
2323
2328
|
yt as MaInputCurrency,
|
|
2324
2329
|
ho as MaInputSize,
|
|
2325
|
-
|
|
2330
|
+
G as MaInputType,
|
|
2326
2331
|
re as MaModal,
|
|
2327
2332
|
le as MaModalTypeIcon,
|
|
2328
2333
|
qt as MaModalTypes,
|
|
@@ -2343,7 +2348,7 @@ export {
|
|
|
2343
2348
|
ut as MaTooltip,
|
|
2344
2349
|
nt as MaTrackButton,
|
|
2345
2350
|
on as MaUpload,
|
|
2346
|
-
|
|
2351
|
+
U as MaUploadFileStatus,
|
|
2347
2352
|
Bs as MaUploadSizes,
|
|
2348
2353
|
en as MaUploadTypes,
|
|
2349
2354
|
xt as NumericInputSizes,
|