mc-plus 1.0.21 → 1.0.22
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/es/{hooks-D0n33nb8.js → hooks-Bd2T19-k.js} +11 -11
- package/dist/es/index.js +15 -12
- package/dist/es/mc-alert-BPMKgrkJ.js +12 -0
- package/dist/es/{mc-button-C3M_uIUL.js → mc-button-DTRgW-cB.js} +5 -5
- package/dist/es/{mc-drawer-Dle-4Mf2.js → mc-drawer-Q5ABQyWA.js} +1 -1
- package/dist/es/{mc-form-C_zKtVSz.js → mc-form-C00hex94.js} +27 -27
- package/dist/es/{mc-input-DtvjCuAH.js → mc-input-Bi14QxKi.js} +2 -2
- package/dist/es/mc-lightbox-CH6D0Hzz.js +35 -0
- package/dist/es/{mc-select-BpTBi_Ax.js → mc-select-BfRLyj_A.js} +3 -3
- package/dist/es/{mc-step-DPbqaW4a.js → mc-step-BNxvCF7V.js} +1 -1
- package/dist/es/{mc-tooltip-XvEaoUdt.js → mc-tooltip-CV3tcUfN.js} +3 -3
- package/dist/es/mc-upload-BfgOsSV7.js +120 -0
- package/dist/es/theme/mc-alert.css +1 -1
- package/dist/es/theme/mc-button.css +1 -1
- package/dist/es/theme/mc-form.css +1 -1
- package/dist/es/theme/mc-lightbox.css +1 -1
- package/dist/es/theme/mc-upload.css +1 -0
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/mc-lightbox/index.d.ts +3 -1
- package/dist/types/components/mc-upload/constanst.d.ts +11 -0
- package/dist/types/components/mc-upload/index.d.ts +124 -0
- package/dist/types/components/mc-upload/types.d.ts +46 -0
- package/dist/types/components/mc-upload/utils.d.ts +4 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +10 -10
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-alert-BfTDI70R.js +0 -12
- package/dist/es/mc-lightbox-BcK5Hqfm.js +0 -26
|
@@ -41,25 +41,25 @@ function b(e2) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
function p(e2, r2, t2 = 300) {
|
|
44
|
-
const
|
|
44
|
+
const u2 = new ResizeObserver(c((e3) => {
|
|
45
45
|
for (let t3 of e3) r2(t3.contentRect);
|
|
46
|
-
}, t2)),
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
46
|
+
}, t2)), a2 = (e3) => {
|
|
47
|
+
u2.observe(e3);
|
|
48
|
+
}, i2 = (e3) => {
|
|
49
|
+
u2.unobserve(e3);
|
|
50
50
|
};
|
|
51
51
|
return o(() => {
|
|
52
|
-
e2.value && u2(e2.value);
|
|
53
|
-
}), i(() => {
|
|
54
52
|
e2.value && a2(e2.value);
|
|
53
|
+
}), s(() => {
|
|
54
|
+
e2.value && i2(e2.value);
|
|
55
55
|
}), n(e2, (e3) => {
|
|
56
|
-
e3 &&
|
|
57
|
-
}), { resizeObserver:
|
|
56
|
+
e3 && a2(e3);
|
|
57
|
+
}), { resizeObserver: u2, observe: a2, unobserve: i2 };
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
60
|
l as a,
|
|
61
61
|
m as b,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
b as c,
|
|
63
|
+
f as d,
|
|
64
64
|
p as u
|
|
65
65
|
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { p as s, m } from "./utils-CMUecsjZ.js";
|
|
2
|
-
import { M as o } from "./mc-alert-
|
|
3
|
-
import { M as r } from "./mc-button-
|
|
2
|
+
import { M as o } from "./mc-alert-BPMKgrkJ.js";
|
|
3
|
+
import { M as r } from "./mc-button-DTRgW-cB.js";
|
|
4
4
|
import { M as i } from "./mc-checkbox-1v_7vBVm.js";
|
|
5
5
|
import { M as p } from "./mc-collapse-D4A3D1A7.js";
|
|
6
6
|
import { a } from "./mc-collapse-D4A3D1A7.js";
|
|
7
7
|
import { a as f } from "./mc-icon-oTgV9pMA.js";
|
|
8
|
-
import { M as j, a as M } from "./mc-input-
|
|
8
|
+
import { M as j, a as M } from "./mc-input-Bi14QxKi.js";
|
|
9
9
|
import { M as l } from "./mc-message-qDiSEyiP.js";
|
|
10
10
|
import { a as a2 } from "./mc-message-qDiSEyiP.js";
|
|
11
11
|
import { M as n, a as g } from "./mc-radio-TczsTpWI.js";
|
|
12
|
-
import { M as x, a as h, b as S } from "./mc-select-
|
|
12
|
+
import { M as x, a as h, b as S } from "./mc-select-BfRLyj_A.js";
|
|
13
13
|
import { M as T } from "./mc-switch-COmM8JEx.js";
|
|
14
14
|
import { M as k, a as w, b as P } from "./mc-tab-CGsHEm__.js";
|
|
15
15
|
import { u, c, d } from "./mc-tab-CGsHEm__.js";
|
|
16
16
|
import { M as q } from "./mc-tag-CfYut-mf.js";
|
|
17
17
|
import { M as v } from "./mc-toast-BrmJXXuA.js";
|
|
18
18
|
import { c as c2, t, e, a as a3, b, d as d2 } from "./mc-toast-BrmJXXuA.js";
|
|
19
|
-
import { M as y } from "./mc-tooltip-
|
|
20
|
-
import { M as C } from "./mc-step-
|
|
21
|
-
import { M as E, b as I } from "./mc-form-
|
|
19
|
+
import { M as y } from "./mc-tooltip-CV3tcUfN.js";
|
|
20
|
+
import { M as C } from "./mc-step-BNxvCF7V.js";
|
|
21
|
+
import { M as E, b as I } from "./mc-form-C00hex94.js";
|
|
22
22
|
import { M as W } from "./mc-success-icon-BB5f9EEL.js";
|
|
23
23
|
import { a as z, b as A } from "./mc-title-7qDFxVvc.js";
|
|
24
24
|
import { a as B } from "./mc-footer-CnMNnkA8.js";
|
|
25
25
|
import { a as D } from "./mc-modal-header-BVG3tywa.js";
|
|
26
|
-
import { M as F } from "./mc-drawer-
|
|
26
|
+
import { M as F } from "./mc-drawer-Q5ABQyWA.js";
|
|
27
27
|
import { M as G } from "./mc-reset-C2LQOIpe.js";
|
|
28
28
|
import { M as H } from "./mc-divider-DnJ_rBx3.js";
|
|
29
|
-
import { M as J } from "./mc-lightbox-
|
|
30
|
-
|
|
29
|
+
import { M as J } from "./mc-lightbox-CH6D0Hzz.js";
|
|
30
|
+
import { M as K, a as L } from "./mc-upload-BfgOsSV7.js";
|
|
31
|
+
const N = [r, p, y, k, T, n, g, x, h, S, i, o, l, q, v, C, E, I, j, M, f, W, z, B, A, D, F, w, P, G, H, J, K, L];
|
|
31
32
|
s();
|
|
32
|
-
const
|
|
33
|
+
const O = m(N);
|
|
33
34
|
export {
|
|
34
35
|
o as McAlert,
|
|
35
36
|
r as McButton,
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
a as McCollapseItem,
|
|
39
40
|
H as McDivider,
|
|
40
41
|
F as McDrawer,
|
|
42
|
+
L as McFileList,
|
|
41
43
|
B as McFooter,
|
|
42
44
|
E as McForm,
|
|
43
45
|
I as McFormItem,
|
|
@@ -64,9 +66,10 @@ export {
|
|
|
64
66
|
A as McTitleToolBar,
|
|
65
67
|
v as McToast,
|
|
66
68
|
y as McTooltip,
|
|
69
|
+
K as McUpload,
|
|
67
70
|
a2 as Message,
|
|
68
71
|
c2 as createToast,
|
|
69
|
-
|
|
72
|
+
O as default,
|
|
70
73
|
t as toast,
|
|
71
74
|
e as toastError,
|
|
72
75
|
a3 as toastPrimary,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _ as e, w as t } from "./utils-CMUecsjZ.js";
|
|
2
|
+
import { defineComponent as s, ref as l, useAttrs as c, computed as i, createElementBlock as o, createCommentVNode as r, openBlock as a, normalizeClass as n, normalizeStyle as _, createElementVNode as d, createBlock as m, renderSlot as p, toDisplayString as f } from "vue";
|
|
3
|
+
import { M as y } from "./mc-icon-oTgV9pMA.js";
|
|
4
|
+
const v = { class: "mc-alert__content" }, h = { class: "mc-alert__header" }, u = { class: "mc-alert__header-left" }, k = { key: 1, class: "mc-alert__title" }, w = { key: 0, class: "mc-alert__description" }, g = { key: 1, class: "mc-alert__description" }, I = t(e(s({ name: "McAlert", __name: "mc-alert", props: { type: { default: "info" }, title: {}, description: {}, closable: { type: Boolean, default: false }, showIcon: { type: Boolean, default: true }, height: {}, width: {} }, emits: ["close"], setup(e2, { expose: t2, emit: s2 }) {
|
|
5
|
+
const I2 = e2, M = s2, $ = l(), b = l(true), j = c(), x = i(() => ({ ...j.style || {}, width: I2.width, height: I2.height })), z = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, A = (e3) => {
|
|
6
|
+
b.value = false, M("close", e3);
|
|
7
|
+
};
|
|
8
|
+
return t2({ ref: $ }), (e3, t3) => b.value ? (a(), o("div", { key: 0, ref_key: "_ref", ref: $, style: _(x.value), class: n(["mc-alert", [`mc-alert--${e3.type}`]]) }, [d("div", v, [d("div", h, [d("div", u, [e3.showIcon ? (a(), m(y, { key: 0, name: z[e3.type], size: 24, class: "mc-alert__icon" }, null, 8, ["name"])) : r("", true), e3.title ? (a(), o("div", k, f(e3.title), 1)) : p(e3.$slots, "title", { key: 2 }, void 0, true)]), e3.closable ? (a(), m(y, { key: 0, name: "Cross", size: 24, class: "mc-alert__close", onClick: A })) : r("", true)]), e3.description ? (a(), o("div", w, f(e3.description), 1)) : (a(), o("div", g, [p(e3.$slots, "description", {}, void 0, true)]))])], 6)) : r("", true);
|
|
9
|
+
} }), [["__scopeId", "data-v-fc038f58"]]));
|
|
10
|
+
export {
|
|
11
|
+
I as M
|
|
12
|
+
};
|
|
@@ -3,11 +3,11 @@ import { M as y } from "./mc-icon-oTgV9pMA.js";
|
|
|
3
3
|
import { t as h } from "./vendor-DkZTEfn_.js";
|
|
4
4
|
import { _ as b, w as g } from "./utils-CMUecsjZ.js";
|
|
5
5
|
const k = ["type", "disabled"], I = { key: 1, class: "loading-icon" }, _ = { class: "mc-button-text" }, w = g(b(e({ name: "McButton", __name: "mc-button", props: { type: { default: "primary" }, nativeType: { default: "button" }, size: { default: "medium" }, disabled: { type: Boolean }, loading: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 }, leftIcon: {}, rightIcon: {}, content: {}, height: {}, width: {} }, emits: ["click"], setup(e2, { expose: b2, emit: g2 }) {
|
|
6
|
-
const w2 = e2, { loading:
|
|
7
|
-
|
|
8
|
-
}, q = h(L,
|
|
9
|
-
return b2({ ref: $ }), (e3, t2) => (s(), n("button", { ref_key: "_ref", ref: $, style: r(C.value), class: u(["mc-button", { [`mc-button--${e3.type}`]: e3.type, [`mc-button--${e3.size}`]: e3.size, "is-loading": d(
|
|
10
|
-
} }), [["__scopeId", "data-v-
|
|
6
|
+
const w2 = e2, { loading: z, disabled: B, throttleDuration: T, height: j, width: x } = t(w2), M = g2, $ = o(), D = t(a()), C = i(() => ({ ...l(D).style, width: x.value ? x.value : void 0, height: j.value ? j.value : void 0 })), L = (e3) => {
|
|
7
|
+
z.value || B.value || M("click", e3);
|
|
8
|
+
}, q = h(L, T.value, { trailing: false });
|
|
9
|
+
return b2({ ref: $ }), (e3, t2) => (s(), n("button", { ref_key: "_ref", ref: $, style: r(C.value), class: u(["mc-button", { [`mc-button--${e3.type}`]: e3.type, [`mc-button--${e3.size}`]: e3.size, "is-loading": d(z), "is-disabled": d(B) }]), type: e3.nativeType, disabled: !(!d(B) && !d(z)) || void 0, onClick: t2[0] || (t2[0] = (t3) => e3.useThrottle ? d(q)(t3) : L(t3)) }, [e3.leftIcon && !d(z) ? (s(), c(y, { key: 0, name: e3.leftIcon }, null, 8, ["name"])) : m("", true), d(z) && !d(B) ? (s(), n("span", I, [v(y, { name: "Loading", size: 16 })])) : m("", true), p("div", _, [f(e3.$slots, "default", {}, void 0, true)]), e3.rightIcon ? (s(), c(y, { key: 2, name: e3.rightIcon }, null, 8, ["name"])) : m("", true)], 14, k));
|
|
10
|
+
} }), [["__scopeId", "data-v-22e63398"]]));
|
|
11
11
|
export {
|
|
12
12
|
w as M
|
|
13
13
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as e, ref as o, watch as t, createElementBlock as a, cr
|
|
|
2
2
|
import { M as p } from "./mc-overlay-DwuQMb48.js";
|
|
3
3
|
import { M as w } from "./mc-modal-header-BVG3tywa.js";
|
|
4
4
|
import { M as y } from "./mc-footer-CnMNnkA8.js";
|
|
5
|
-
import { u as _ } from "./hooks-
|
|
5
|
+
import { u as _ } from "./hooks-Bd2T19-k.js";
|
|
6
6
|
import { _ as h, w as $ } from "./utils-CMUecsjZ.js";
|
|
7
7
|
const b = { key: 0, class: "mc-drawer-container" }, g = { class: "mc-drawer-header" }, k = { class: "mc-drawer-content-wrapper" }, x = { class: "mc-drawer-content" }, C = $(h(e({ name: "McDrawer", __name: "mc-drawer", props: { modelValue: { type: Boolean }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" } }, emits: ["update:modelValue", "close"], setup(e2, { expose: h2, emit: $2 }) {
|
|
8
8
|
const C2 = e2, j = o(false), M = o(false), B = o(false), V = async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject as e, computed as r, defineComponent as a, reactive as t, toRefs as s, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as
|
|
2
|
-
import { a as y } from "./hooks-
|
|
3
|
-
import { s as F, f as
|
|
1
|
+
import { inject as e, computed as r, defineComponent as a, reactive as t, toRefs as s, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as u, ref as n, onMounted as c, onUnmounted as m, createCommentVNode as p, createVNode as v, normalizeClass as f, toDisplayString as b, Transition as _, withCtx as g, nextTick as h } from "vue";
|
|
2
|
+
import { a as y } from "./hooks-Bd2T19-k.js";
|
|
3
|
+
import { s as F, f as q, a as j, k as P, b as w, c as x, m as I, d as k, g as M, e as S, h as V, j as B } from "./vendor-DkZTEfn_.js";
|
|
4
4
|
import { _ as C, w as $ } from "./utils-CMUecsjZ.js";
|
|
5
5
|
import E from "async-validator";
|
|
6
6
|
const O = Symbol("formContext"), z = Symbol("formItemContext");
|
|
@@ -12,8 +12,8 @@ function D() {
|
|
|
12
12
|
return r(() => s2.value || (a2 == null ? void 0 : a2.disabled) || (t2 == null ? void 0 : t2.disabled));
|
|
13
13
|
}
|
|
14
14
|
const G = { class: "mc-form" }, H = C(a({ name: "McForm", __name: "mc-form", props: { model: {}, rules: { default: () => ({}) }, disabled: { type: Boolean } }, emits: ["validate"], setup(e2, { expose: r2, emit: a2 }) {
|
|
15
|
-
const
|
|
16
|
-
const a3 = F(e3) ?
|
|
15
|
+
const n2 = a2, c2 = [], m2 = async (e3 = [], r3) => {
|
|
16
|
+
const a3 = F(e3) ? q(c2, (r4) => w(e3, r4.prop)) : c2;
|
|
17
17
|
try {
|
|
18
18
|
const e4 = await (async (e5 = []) => {
|
|
19
19
|
let r4 = {};
|
|
@@ -30,31 +30,31 @@ const G = { class: "mc-form" }, H = C(a({ name: "McForm", __name: "mc-form", pro
|
|
|
30
30
|
const a4 = e4;
|
|
31
31
|
return r3 == null ? void 0 : r3(false, a4), Promise.reject(a4);
|
|
32
32
|
}
|
|
33
|
-
}, p2 = (e3, r3) => F(r3) ?
|
|
33
|
+
}, p2 = (e3, r3) => F(r3) ? q(e3, (e4) => w(r3, e4.prop)) : e3, v2 = t({ ...s(e2), emits: n2, addField: (e3) => {
|
|
34
34
|
e3.prop && c2.push(e3);
|
|
35
35
|
}, removeField: (e3) => {
|
|
36
36
|
e3.prop && c2.splice(c2.indexOf(e3), 1);
|
|
37
37
|
} });
|
|
38
38
|
return o(O, v2), r2({ validate: async (e3) => await m2([], e3), validateField: m2, resetFields: (e3 = []) => {
|
|
39
|
-
|
|
39
|
+
j(p2(c2, e3), (e4) => e4.resetField());
|
|
40
40
|
}, clearValidate: (e3 = []) => {
|
|
41
|
-
|
|
42
|
-
} }), (e3, r3) => (i(), l("div", G, [d("form", null, [
|
|
43
|
-
} }), [["__scopeId", "data-v-
|
|
44
|
-
const
|
|
41
|
+
j(p2(c2, e3), (e4) => e4.clearValidate());
|
|
42
|
+
} }), (e3, r3) => (i(), l("div", G, [d("form", null, [u(e3.$slots, "default", {}, void 0, true)])]));
|
|
43
|
+
} }), [["__scopeId", "data-v-867f78c5"]]), J = { class: "mc-form-item" }, K = { class: "mc-form-item__content" }, L = { key: 0, class: "mc-form-item__error" }, N = C(a({ name: "McFormItem", __name: "mc-form-item", props: { prop: {}, label: {}, disabled: { type: Boolean, default: false }, required: { type: Boolean, default: false }, rules: {} }, setup(a2, { expose: y2 }) {
|
|
44
|
+
const j2 = a2, C2 = e(O), $2 = n("init"), A2 = n(""), D2 = (e2) => e2 && j2.prop && !x(M(e2, j2.prop)) ? M(e2, j2.prop) : null, G2 = r(() => {
|
|
45
45
|
const e2 = C2 == null ? void 0 : C2.model;
|
|
46
46
|
return D2(e2);
|
|
47
47
|
}), H2 = r(() => {
|
|
48
48
|
const e2 = [];
|
|
49
|
-
|
|
49
|
+
j2.required && e2.push({ required: true }), j2.rules && e2.push(...j2.rules);
|
|
50
50
|
const r2 = C2 == null ? void 0 : C2.rules;
|
|
51
|
-
if (r2 &&
|
|
51
|
+
if (r2 && j2.prop) {
|
|
52
52
|
const a4 = D2(r2);
|
|
53
53
|
a4 && e2.push(...a4);
|
|
54
54
|
}
|
|
55
|
-
const a3 =
|
|
55
|
+
const a3 = j2.required;
|
|
56
56
|
if (x(a3)) {
|
|
57
|
-
const r3 =
|
|
57
|
+
const r3 = q(I(e2, (e3, r4) => [e3, r4]), (e3) => w(P(e3[0]), "required"));
|
|
58
58
|
if (F(r3)) for (const t2 of r3) {
|
|
59
59
|
const [r4, s2] = t2;
|
|
60
60
|
r4.required !== a3 && (e2[s2] = { ...r4, required: a3 });
|
|
@@ -62,22 +62,22 @@ const G = { class: "mc-form" }, H = C(a({ name: "McForm", __name: "mc-form", pro
|
|
|
62
62
|
else e2.push({ required: a3 });
|
|
63
63
|
}
|
|
64
64
|
return e2;
|
|
65
|
-
}), N2 = r(() => F(H2.value) > 0), Q2 = r(() => k(H2.value, "required") ||
|
|
65
|
+
}), N2 = r(() => F(H2.value) > 0), Q2 = r(() => k(H2.value, "required") || j2.required), R2 = r(() => j2.disabled);
|
|
66
66
|
let T = null, U = false;
|
|
67
67
|
const W = (e2, r2) => {
|
|
68
|
-
if (U || !
|
|
68
|
+
if (U || !j2.prop || R2.value) return Promise.resolve(true);
|
|
69
69
|
if (!N2.value) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
|
|
70
70
|
const a3 = ((e3) => {
|
|
71
71
|
const r3 = H2.value;
|
|
72
|
-
return r3 ?
|
|
72
|
+
return r3 ? q(r3, (r4) => !r4.trigger || !e3 || (B(r4.trigger) ? w(r4.trigger, e3) : r4.trigger === e3)).map(({ trigger: e4, ...r4 }) => r4) : [];
|
|
73
73
|
})(e2);
|
|
74
74
|
if (!F(a3)) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
|
|
75
75
|
$2.value = "validating";
|
|
76
76
|
const t2 = ((e3) => {
|
|
77
|
-
const r3 =
|
|
78
|
-
return r3 ? new E({ [r3]: e3 }).validate({ [r3]: G2.value }, { firstFields: true }).then(() => ($2.value = "success", C2 == null ? void 0 : C2.emits("validate",
|
|
77
|
+
const r3 = j2.prop;
|
|
78
|
+
return r3 ? new E({ [r3]: e3 }).validate({ [r3]: G2.value }, { firstFields: true }).then(() => ($2.value = "success", C2 == null ? void 0 : C2.emits("validate", j2, true, ""), A2.value = "", true)).catch((e4) => {
|
|
79
79
|
const { errors: r4 } = e4;
|
|
80
|
-
return $2.value = "error", A2.value = r4 && F(r4) > 0 ? r4[0].message ?? "" : "", C2 == null ? void 0 : C2.emits("validate",
|
|
80
|
+
return $2.value = "error", A2.value = r4 && F(r4) > 0 ? r4[0].message ?? "" : "", C2 == null ? void 0 : C2.emits("validate", j2, false, A2.value), Promise.reject(e4);
|
|
81
81
|
}) : null;
|
|
82
82
|
})(a3);
|
|
83
83
|
return t2 ? t2.then(() => (r2 == null ? void 0 : r2(true), true)).catch((e3) => {
|
|
@@ -86,18 +86,18 @@ const G = { class: "mc-form" }, H = C(a({ name: "McForm", __name: "mc-form", pro
|
|
|
86
86
|
}) : Promise.reject(false);
|
|
87
87
|
}, X = () => {
|
|
88
88
|
const e2 = C2 == null ? void 0 : C2.model;
|
|
89
|
-
e2 &&
|
|
89
|
+
e2 && j2.prop && !x(M(e2, j2.prop)) && (U = true, S(e2, j2.prop, V(T))), h(() => {
|
|
90
90
|
Y();
|
|
91
91
|
});
|
|
92
92
|
}, Y = () => {
|
|
93
93
|
$2.value = "init", A2.value = "", U = false;
|
|
94
|
-
}, Z = t({ ...s(
|
|
94
|
+
}, Z = t({ ...s(j2), validateStatus: r(() => $2.value), disabled: R2.value, validate: W, resetField: X, clearValidate: Y });
|
|
95
95
|
return o(z, Z), c(() => {
|
|
96
|
-
|
|
96
|
+
j2.prop && (C2 == null ? void 0 : C2.addField(Z), T = G2.value);
|
|
97
97
|
}), m(() => {
|
|
98
|
-
|
|
99
|
-
}), y2({ validateMessage: A2, validateStatus: $2, validate: W, resetField: X, clearValidate: Y }), (e2, r2) => (i(), l("div", J, [e2.label ? (i(), l("label", { key: 0, class: f(["mc-form-item__label", { "mc-form-item__label--required": Q2.value }]) }, b(e2.label), 3)) : p("", true), d("div", K, [
|
|
100
|
-
} }), [["__scopeId", "data-v-
|
|
98
|
+
j2.prop && (C2 == null ? void 0 : C2.removeField(Z));
|
|
99
|
+
}), y2({ validateMessage: A2, validateStatus: $2, validate: W, resetField: X, clearValidate: Y }), (e2, r2) => (i(), l("div", J, [e2.label ? (i(), l("label", { key: 0, class: f(["mc-form-item__label", { "mc-form-item__label--required": Q2.value }]) }, b(e2.label), 3)) : p("", true), d("div", K, [u(e2.$slots, "default", {}, void 0, true)]), v(_, { name: "mc-form-item-error" }, { default: g(() => [A2.value ? (i(), l("div", L, b(A2.value), 1)) : p("", true)]), _: 1 })]));
|
|
100
|
+
} }), [["__scopeId", "data-v-5c93e7b2"]]), Q = $(H), R = $(N);
|
|
101
101
|
export {
|
|
102
102
|
Q as M,
|
|
103
103
|
A as a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject as e, computed as t, defineComponent as a, ref as u, onMounted as s, watch as l, createElementBlock as n, openBlock as r, normalizeStyle as c, normalizeClass as o, unref as i, createCommentVNode as p, createElementVNode as f, renderSlot as d, createBlock as m, createVNode as v, Fragment as y, nextTick as x, useSlots as h, reactive as _, watchEffect as g, provide as I } from "vue";
|
|
2
2
|
import { M as b } from "./mc-icon-oTgV9pMA.js";
|
|
3
|
-
import { u as w, a as $ } from "./mc-form-
|
|
4
|
-
import { b as k } from "./hooks-
|
|
3
|
+
import { u as w, a as $ } from "./mc-form-C00hex94.js";
|
|
4
|
+
import { b as k } from "./hooks-Bd2T19-k.js";
|
|
5
5
|
import { b as V, l as M, c as S, i as j } from "./vendor-DkZTEfn_.js";
|
|
6
6
|
import { _ as B, w as R } from "./utils-CMUecsjZ.js";
|
|
7
7
|
const z = Symbol("InputGroupContext");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as e, ref as t, watch as o, nextTick as l, createElementBlock as a, createCommentVNode as s, openBlock as i, createBlock as r, Teleport as d, createVNode as f, Transition as u, withCtx as c, normalizeClass as m, createElementVNode as n, renderSlot as v } from "vue";
|
|
2
|
+
import { M as h } from "./mc-overlay-DwuQMb48.js";
|
|
3
|
+
import { M as p } from "./mc-modal-header-BVG3tywa.js";
|
|
4
|
+
import { M as g } from "./mc-footer-CnMNnkA8.js";
|
|
5
|
+
import { c as b, u as x } from "./hooks-Bd2T19-k.js";
|
|
6
|
+
import { _ as y, w as _ } from "./utils-CMUecsjZ.js";
|
|
7
|
+
const k = { key: 0, class: "mc-lightbox-container" }, $ = { class: "mc-lightbox-header" }, w = _(y(e({ name: "McLightbox", __name: "mc-lightbox", props: { modelValue: { type: Boolean, default: false }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean, default: true }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" }, hideFooter: { type: Boolean, default: false } }, emits: ["update:modelValue", "close"], setup(e2, { expose: y2, emit: _2 }) {
|
|
8
|
+
const w2 = e2, C = _2, j = t(), B = t(), M = t(), R = t(), V = t(false), H = t(false), z = t(false), F = () => {
|
|
9
|
+
w2.maskClosable && L();
|
|
10
|
+
}, S = () => {
|
|
11
|
+
L();
|
|
12
|
+
}, I = async () => {
|
|
13
|
+
V.value = true, H.value = true, await l(), z.value = true;
|
|
14
|
+
}, L = async () => {
|
|
15
|
+
z.value = false, await l(), H.value = false, await l(), V.value = false, C("close"), C("update:modelValue", false);
|
|
16
|
+
};
|
|
17
|
+
o(() => w2.modelValue, (e3, t2) => {
|
|
18
|
+
!t2 && e3 ? I() : L();
|
|
19
|
+
}, { immediate: true, flush: "post" });
|
|
20
|
+
const q = () => {
|
|
21
|
+
var _a;
|
|
22
|
+
if (!M.value || !B.value) return;
|
|
23
|
+
const e3 = 0.7 * window.innerHeight - 56 - B.value.offsetHeight, t2 = ((_a = R.value) == null ? void 0 : _a.offsetHeight) ?? 40;
|
|
24
|
+
M.value.style.height = `${t2 > e3 ? e3 : t2}px`;
|
|
25
|
+
};
|
|
26
|
+
return b(() => {
|
|
27
|
+
q();
|
|
28
|
+
}), x(B, async ({ height: e3 }) => {
|
|
29
|
+
const t2 = j.value;
|
|
30
|
+
t2 && (t2.style.paddingBottom = `${e3}px`, await l(), q());
|
|
31
|
+
}), y2({ ref: j, open: I, close: L }), (e3, t2) => V.value ? (i(), a("div", k, [(i(), r(d, { to: e3.portCssSelector }, [f(u, { name: "mc-lightbox-overlay" }, { default: c(() => [f(h, { visible: H.value, fixed: e3.fixed, onClick: F }, { default: c(() => [f(u, { name: "mc-lightbox-content" }, { default: c(() => [z.value ? (i(), a("div", { key: 0, class: m(["mc-lightbox", [`mc-lightbox-${e3.size}`]]), ref_key: "lightboxRef", ref: j }, [n("div", $, [v(e3.$slots, "header", {}, () => [f(p, { title: e3.title, onClose: S }, { default: c(() => [v(e3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title"])], true)]), n("div", { class: "mc-lightbox-content-wrapper", ref_key: "wrapperRef", ref: M }, [n("div", { class: "mc-lightbox-content", ref_key: "contentRef", ref: R }, [v(e3.$slots, "default", {}, void 0, true)], 512)], 512), e3.hideFooter ? s("", true) : (i(), a("div", { key: 0, class: "mc-lightbox-footer", ref_key: "footerRef", ref: B }, [v(e3.$slots, "footer", {}, () => [f(g, null, { left: c(() => [v(e3.$slots, "footer-left", {}, void 0, true)]), right: c(() => [v(e3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": c(() => [v(e3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: c(() => [v(e3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)], 512))], 2)) : s("", true)]), _: 3 })]), _: 3 }, 8, ["visible", "fixed"])]), _: 3 })], 8, ["to"]))])) : s("", true);
|
|
32
|
+
} }), [["__scopeId", "data-v-632e7454"]]));
|
|
33
|
+
export {
|
|
34
|
+
w as M
|
|
35
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as e, ref as l, computed as a, watch as t, provide as s, createElementBlock as c, openBlock as o, normalizeStyle as u, normalizeClass as i, unref as d, createElementVNode as r, createVNode as v, createCommentVNode as n, createBlock as p, resolveDynamicComponent as m, withDirectives as h, vModelText as f, Transition as _, withCtx as g, renderSlot as w, createTextVNode as y, vShow as b, inject as k, useSlots as x, onMounted as S, onBeforeUnmount as V, h as O, toDisplayString as j, toRefs as B, useAttrs as C, toValue as I } from "vue";
|
|
2
2
|
import { M } from "./mc-icon-oTgV9pMA.js";
|
|
3
|
-
import { b as $,
|
|
4
|
-
import { u as F, a as N } from "./mc-form-
|
|
5
|
-
import { u as G } from "./mc-input-
|
|
3
|
+
import { b as $, d as R } from "./hooks-Bd2T19-k.js";
|
|
4
|
+
import { u as F, a as N } from "./mc-form-C00hex94.js";
|
|
5
|
+
import { u as G } from "./mc-input-Bi14QxKi.js";
|
|
6
6
|
import { c as P, n as z } from "./vendor-DkZTEfn_.js";
|
|
7
7
|
import { _ as A, w as D } from "./utils-CMUecsjZ.js";
|
|
8
8
|
const T = Symbol("selectContext"), U = Symbol("selectGroupContext"), q = { key: 0, class: "mc-select-selected-content" }, E = { class: "mc-select-input-wrapper" }, H = ["placeholder", "readonly", "disabled"], J = { class: "mc-select-dropdown-wrapper" }, K = { class: "mc-select-dropdown" }, L = { key: 0, class: "mc-select-no-data" }, Q = A(e({ name: "McSelect", __name: "mc-select", props: { modelValue: { default: "" }, placeholder: { default: "Please select" }, disabled: { type: Boolean }, type: { default: "single" }, width: {}, height: {}, search: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: k2 }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, computed as s, watch as t, nextTick as c, ref as l, onMounted as n, createElementBlock as a, openBlock as m, normalizeClass as i, createElementVNode as o, Fragment as u, renderList as r, createBlock as p, toDisplayString as d, createCommentVNode as v, Transition as f, withCtx as y, resolveDynamicComponent as g } from "vue";
|
|
2
2
|
import { _ as k } from "./mc-success-icon-BB5f9EEL.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as h } from "./hooks-Bd2T19-k.js";
|
|
4
4
|
import { o as _, t as b } from "./vendor-DkZTEfn_.js";
|
|
5
5
|
import { _ as R, w as S } from "./utils-CMUecsjZ.js";
|
|
6
6
|
const x = { class: "mc-step-number-container" }, B = { class: "mc-step-item-number" }, C = { key: 0, class: "mc-step-item-number-text" }, V = { class: "mc-step-item-content" }, j = { class: "mc-step-item-label" }, q = { class: "mc-step-item-desc" }, w = { key: 0, class: "mc-step-item-component" }, Y = S(R(e({ name: "McStep", __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: R2, emit: S2 }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as t, watch as a, onUnmounted as l, watchEffect as i, createElementBlock as r, openBlock as s, mergeProps as u, toHandlers as p, createElementVNode as n, createVNode as
|
|
1
|
+
import { defineComponent as e, ref as o, computed as t, watch as a, onUnmounted as l, watchEffect as i, createElementBlock as r, openBlock as s, mergeProps as u, toHandlers as p, createElementVNode as n, createVNode as v, renderSlot as c, Transition as m, withCtx as d, createCommentVNode as f, createTextVNode as g, toDisplayString as h } from "vue";
|
|
2
2
|
import { createPopper as _ } from "@popperjs/core";
|
|
3
|
-
import {
|
|
3
|
+
import { d as k } from "./hooks-Bd2T19-k.js";
|
|
4
4
|
import { q as b, r as y, c as N } from "./vendor-DkZTEfn_.js";
|
|
5
5
|
import { _ as T, w as j } from "./utils-CMUecsjZ.js";
|
|
6
6
|
const w = j(T(e({ name: "McTooltip", __name: "mc-tooltip", props: { content: {}, trigger: { default: "hover" }, placement: { default: "bottom" }, disabled: { type: Boolean }, popperOptions: {}, showTimeout: { default: 0 }, hideTimeout: { default: 300 }, transitionName: { default: "fade" } }, emits: ["visible:change", "click:outside"], setup(e2, { expose: T2, emit: j2 }) {
|
|
@@ -26,7 +26,7 @@ const w = j(T(e({ name: "McTooltip", __name: "mc-tooltip", props: { content: {},
|
|
|
26
26
|
};
|
|
27
27
|
return k(q, () => {
|
|
28
28
|
x("click:outside"), "hover" !== w2.trigger && z.value && K(false);
|
|
29
|
-
}), T2({ show: () => J(false), hide: () => K(false) }), (e3, o2) => (s(), r("div", u({ class: "mc-tooltip", ref_key: "containerNode", ref: q }, p(O.value, true)), [n("div", u({ class: "mc-tooltip__trigger", ref_key: "triggerNode", ref: B }, p(M.value, true)), [
|
|
29
|
+
}), T2({ show: () => J(false), hide: () => K(false) }), (e3, o2) => (s(), r("div", u({ class: "mc-tooltip", ref_key: "containerNode", ref: q }, p(O.value, true)), [n("div", u({ class: "mc-tooltip__trigger", ref_key: "triggerNode", ref: B }, p(M.value, true)), [c(e3.$slots, "default", {}, void 0, true)], 16), v(m, { name: e3.transitionName }, { default: d(() => [z.value ? (s(), r("div", u({ key: 0, class: "mc-tooltip__popper", ref_key: "popperNode", ref: I }, p($.value, true)), [c(e3.$slots, "content", {}, () => [g(h(e3.content), 1)], true)], 16)) : f("", true)]), _: 3 }, 8, ["name"])], 16));
|
|
30
30
|
} }), [["__scopeId", "data-v-d3a7e7be"]]));
|
|
31
31
|
export {
|
|
32
32
|
w as M
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { defineComponent as e, ref as l, computed as a, createElementBlock as t, openBlock as s, normalizeClass as i, createVNode as o, TransitionGroup as n, withCtx as r, Fragment as d, renderList as u, createElementVNode as c, createCommentVNode as f, createBlock as p, toDisplayString as m, unref as v, reactive as g, onMounted as h, withModifiers as y, withDirectives as w, vShow as z, renderSlot as _, Transition as B } from "vue";
|
|
2
|
+
import { M as C } from "./mc-icon-oTgV9pMA.js";
|
|
3
|
+
import { u as k } from "./hooks-Bd2T19-k.js";
|
|
4
|
+
import { _ as M, w as b } from "./utils-CMUecsjZ.js";
|
|
5
|
+
import { a as S, i as x } from "./vendor-DkZTEfn_.js";
|
|
6
|
+
var $ = ((e2) => (e2.B = "B", e2.KB = "KB", e2.MB = "MB", e2.GB = "GB", e2))($ || {});
|
|
7
|
+
const T = 1024, F = (e2) => parseFloat(e2).toString(), D = (e2, l2 = 2) => e2 < T ? `${e2} B` : e2 < 1048576 ? `${F((e2 / T).toFixed(l2))} KB` : e2 < 1073741824 ? `${F((e2 / 1048576).toFixed(l2))} MB` : `${F((e2 / 1073741824).toFixed(l2))} GB`;
|
|
8
|
+
function U(e2) {
|
|
9
|
+
if (!e2) return "--";
|
|
10
|
+
const l2 = new Date(e2);
|
|
11
|
+
return `${l2.getFullYear()}/${String(l2.getMonth() + 1).padStart(2, "0")}/${String(l2.getDate()).padStart(2, "0")} ${String(l2.getHours()).padStart(2, "0")}:${String(l2.getMinutes()).padStart(2, "0")}:${String(l2.getSeconds()).padStart(2, "0")}`;
|
|
12
|
+
}
|
|
13
|
+
const H = "[?]", V = { upload_note: "Click to upload or drag and drop files here", max_size: "Max file size:", max_count: "No limit on maximum number of documents but recommend that upload then in pdf if more than 5 files are to be upload.", uploaded_by: "Uploaded by", uploaded_on: "Uploaded on", limit_count: `The number of files cannot exceed ${H} .`, limit_size: `The file size cannot exceed ${H} .`, limit_type: `Please upload only ${H} files.` }, I = { class: "file-info-container" }, j = { class: "file-name file-info" }, E = ["onClick"], G = { class: "file-name-text" }, K = { key: 0, class: "size error-info" }, P = { key: 1, class: "size" }, R = { class: "file-info" }, L = { class: "label" }, N = { class: "content" }, q = { class: "file-info" }, A = { class: "label" }, Y = { class: "content" }, J = ["onClick"], O = { key: 0, class: "compact-container" }, Q = { class: "file-info" }, W = { class: "label" }, X = { class: "content" }, Z = { class: "file-info" }, ee = { class: "label" }, le = { class: "content" }, ae = M(e({ name: "McFileList", __name: "mc-file-list", props: { files: { default: () => [] }, deletable: { type: Boolean, default: false }, theme: { default: "white" } }, emits: ["delete:file", "review:file"], setup(e2, { emit: g2 }) {
|
|
14
|
+
const h2 = e2, y2 = g2, w2 = l(), z2 = l(false), _2 = a(() => "grey" === h2.theme);
|
|
15
|
+
return k(w2, ({ width: e3 }) => {
|
|
16
|
+
z2.value = e3 <= 600;
|
|
17
|
+
}), (e3, l2) => (s(), t("div", { class: i(["mc-file-list", { "mc-file-list-grey": _2.value }]), ref_key: "fileContainerRef", ref: w2 }, [o(n, { name: "file-list", tag: "ul" }, { default: r(() => [(s(true), t(d, null, u(e3.files, (l3) => (s(), t("li", { class: i(["file-item", l3.status]), key: l3.name }, [c("div", I, [c("div", j, [c("div", { class: "file", onClick: (e4) => (async (e5) => {
|
|
18
|
+
y2("review:file", e5);
|
|
19
|
+
})(l3) }, ["loading" === l3.status ? (s(), p(C, { key: 0, name: "Loading", class: "loading-icon" })) : (s(), p(C, { key: 1, name: "Document" })), c("span", G, m(l3.name), 1)], 8, E), "failed" === l3.status ? (s(), t("div", K, m(l3.errorMessage), 1)) : (s(), t("div", P, m(l3.size ? v(D)(l3.size) : ""), 1))]), "loading" !== l3.status ? (s(), t(d, { key: 0 }, [z2.value || "successed" !== l3.status ? f("", true) : (s(), t(d, { key: 0 }, [c("div", R, [c("div", L, m(v(V).uploaded_by), 1), c("div", N, m(l3.uploadBy), 1)]), c("div", q, [c("div", A, m(v(V).uploaded_on), 1), c("div", Y, m(v(U)(l3.uploadTime)), 1)])], 64)), e3.deletable ? (s(), t("div", { key: 1, class: "delete", onClick: (e4) => ((e5) => {
|
|
20
|
+
y2("delete:file", e5);
|
|
21
|
+
})(l3) }, [o(C, { name: "Trash" })], 8, J)) : f("", true)], 64)) : f("", true)]), z2.value && "successed" === l3.status ? (s(), t("div", O, [c("div", Q, [c("div", W, m(v(V).uploaded_by), 1), c("div", X, m(l3.uploadBy), 1)]), c("div", Z, [c("div", ee, m(v(V).uploaded_on), 1), c("div", le, m(v(U)(l3.uploadTime)), 1)])])) : f("", true)], 2))), 128))]), _: 1 })], 2));
|
|
22
|
+
} }), [["__scopeId", "data-v-579e8a9d"]]), te = { class: "upload" }, se = { class: "desc" }, ie = b(M(e({ name: "McUpload", __name: "mc-upload", props: { modelValue: { default: () => [] }, fileSize: { default: () => 15728640 }, fileCount: { default: 0 }, hiddenIcon: { type: Boolean, default: false }, allowedFileTypes: {}, uploadUser: { default: "--" }, uploadFunc: {} }, emits: ["upload", "update:modelValue", "delete:file", "review:file", "error:count", "error:size"], setup(e2, { expose: n2, emit: d2 }) {
|
|
23
|
+
const u2 = e2, C2 = d2, k2 = l(), M2 = l(false), b2 = g(/* @__PURE__ */ new Map()), F2 = a(() => [...b2.values()]);
|
|
24
|
+
h(() => {
|
|
25
|
+
(() => {
|
|
26
|
+
const e3 = u2.modelValue;
|
|
27
|
+
(e3 == null ? void 0 : e3.length) && S(e3, (e4) => {
|
|
28
|
+
e4.name && b2.set(e4.name, { fid: e4.fid, name: e4.name, size: e4.size, status: "successed", uploadBy: e4.uploadBy, uploadTime: e4.uploadTime });
|
|
29
|
+
});
|
|
30
|
+
})();
|
|
31
|
+
});
|
|
32
|
+
const U2 = () => {
|
|
33
|
+
k2.value.click();
|
|
34
|
+
}, I2 = (e3) => {
|
|
35
|
+
var _a;
|
|
36
|
+
M2.value = false;
|
|
37
|
+
const l2 = (_a = e3.dataTransfer) == null ? void 0 : _a.files;
|
|
38
|
+
l2 && E2(l2);
|
|
39
|
+
}, j2 = (e3) => {
|
|
40
|
+
const l2 = e3.target.files;
|
|
41
|
+
l2 && E2(l2);
|
|
42
|
+
}, E2 = async (e3) => {
|
|
43
|
+
var _a, _b, _c, _d;
|
|
44
|
+
let l2 = Array.from(e3);
|
|
45
|
+
if (l2 = K2(l2), l2 = P2(l2), !l2.length) return void (k2.value && (k2.value.value = ""));
|
|
46
|
+
if (l2.forEach((e4) => {
|
|
47
|
+
b2.set(e4.name, { name: e4.name, size: e4.size, status: "loading", uploadBy: u2.uploadUser, uploadTime: Date.now() });
|
|
48
|
+
}), !R2(l2)) return void (k2.value && (k2.value.value = ""));
|
|
49
|
+
const a2 = [];
|
|
50
|
+
for (const e4 of l2) b2.has(e4.name) && "loading" === b2.get(e4.name).status && a2.push(N2(e4));
|
|
51
|
+
const t2 = await Promise.allSettled(a2);
|
|
52
|
+
for (let e4 = 0; e4 < t2.length; e4++) {
|
|
53
|
+
const a3 = l2[e4];
|
|
54
|
+
if ("fulfilled" === t2[e4].status) {
|
|
55
|
+
const l3 = (_b = (_a = t2[e4]) == null ? void 0 : _a.value) == null ? void 0 : _b.fid;
|
|
56
|
+
b2.set(a3.name, { fid: l3, name: a3.name, size: a3.size, status: "successed", uploadBy: u2.uploadUser, uploadTime: Date.now() });
|
|
57
|
+
} else {
|
|
58
|
+
const l3 = ((_d = (_c = t2[e4]) == null ? void 0 : _c.reason) == null ? void 0 : _d.message) || "Upload failed";
|
|
59
|
+
console.error(t2[e4]), b2.set(a3.name, { name: a3.name, size: a3.size, status: "failed", errorMessage: l3, uploadBy: u2.uploadUser, uploadTime: Date.now() });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
L2();
|
|
63
|
+
}, G2 = a(() => "number" == typeof u2.fileSize ? u2.fileSize : "string" == typeof u2.fileSize ? ((e3) => {
|
|
64
|
+
try {
|
|
65
|
+
if (!e3 || !e3.includes(" ")) throw new Error();
|
|
66
|
+
const l2 = e3.split(" ");
|
|
67
|
+
if (2 !== l2.length) throw new Error();
|
|
68
|
+
const a2 = Number(l2[0]), t2 = l2[1];
|
|
69
|
+
if (!(t2 in $)) throw new Error();
|
|
70
|
+
if ("B" === t2) return a2;
|
|
71
|
+
if ("KB" === t2) return a2 * T;
|
|
72
|
+
if ("MB" === t2) return a2 * T * T;
|
|
73
|
+
if ("GB" === t2) return a2 * T * T * T;
|
|
74
|
+
throw new Error();
|
|
75
|
+
} catch (e4) {
|
|
76
|
+
return console.error("Please config the correct file size. ", e4), -1;
|
|
77
|
+
}
|
|
78
|
+
})(u2.fileSize) : -1), K2 = (e3) => {
|
|
79
|
+
const l2 = e3.length;
|
|
80
|
+
return u2.fileCount && l2 + b2.size > u2.fileCount && (e3 = e3.slice(0, u2.fileCount - b2.size), C2("error:count")), e3;
|
|
81
|
+
}, P2 = (e3) => {
|
|
82
|
+
const l2 = u2.allowedFileTypes;
|
|
83
|
+
if (l2 == null ? void 0 : l2.length) {
|
|
84
|
+
const a2 = l2.map((e4) => e4.toUpperCase()), t2 = e3.filter((e4) => {
|
|
85
|
+
var _a;
|
|
86
|
+
const l3 = ((_a = e4.name.split(".").pop()) == null ? void 0 : _a.toUpperCase()) ?? "--";
|
|
87
|
+
return a2.includes(l3);
|
|
88
|
+
});
|
|
89
|
+
t2.length !== e3.length && C2("error:size"), e3 = t2;
|
|
90
|
+
}
|
|
91
|
+
return e3;
|
|
92
|
+
}, R2 = (e3) => {
|
|
93
|
+
const l2 = G2.value;
|
|
94
|
+
if (l2 <= 0) return true;
|
|
95
|
+
let a2 = false;
|
|
96
|
+
for (let t2 = 0; t2 < e3.length; t2++) {
|
|
97
|
+
const s2 = e3[t2];
|
|
98
|
+
s2.size > l2 ? b2.set(s2.name, { name: s2.name, size: s2.size, status: "failed", errorMessage: V.limit_size.replace(H, `${D(l2)}`), uploadBy: u2.uploadUser, uploadTime: Date.now() }) : a2 = true;
|
|
99
|
+
}
|
|
100
|
+
return a2;
|
|
101
|
+
}, L2 = () => {
|
|
102
|
+
const e3 = [...b2.values()].filter((e4) => "successed" === e4.status);
|
|
103
|
+
C2("upload", e3), C2("update:modelValue", e3);
|
|
104
|
+
}, N2 = async (e3) => x(u2.uploadFunc) ? await u2.uploadFunc(e3) : Promise.reject("UploadFunc is not a function"), q2 = (e3) => {
|
|
105
|
+
b2.delete(e3.name), k2.value && (k2.value.value = ""), C2("delete:file", e3), L2();
|
|
106
|
+
}, A2 = (e3) => {
|
|
107
|
+
C2("review:file", e3);
|
|
108
|
+
};
|
|
109
|
+
return n2({ uploadInputRef: k2, clear: () => {
|
|
110
|
+
b2.clear(), k2.value && (k2.value.value = ""), L2();
|
|
111
|
+
} }), (e3, l2) => (s(), t("div", null, [c("div", { class: i(["mc-upload", { dragover: M2.value }]), onClick: U2, onDragover: l2[2] || (l2[2] = y(() => {
|
|
112
|
+
}, ["prevent"])), onDrop: y(I2, ["prevent"]) }, [c("div", { class: "cover", onDragenter: l2[0] || (l2[0] = (e4) => M2.value = true), onDragleave: l2[1] || (l2[1] = (e4) => M2.value = false) }, null, 32), c("div", te, [w(c("div", null, l2[3] || (l2[3] = [c("svg", { class: "upload-icon", width: "32", height: "38", viewBox: "0 0 32 38", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, [c("path", { d: "M27.7647 16.5V10.3334C27.7647 7.53311 27.7647 6.13298 27.2518 5.06342C26.8006 4.12261 26.0807 3.35771 25.1952 2.87834C24.1886 2.33337 22.8708 2.33337 20.2353 2.33337H10.1961C7.56053 2.33337 6.24276 2.33337 5.23612 2.87834C4.35065 3.35771 3.63074 4.12261 3.17957 5.06342C2.66666 6.13298 2.66666 7.53311 2.66666 10.3334V27.6667C2.66666 30.467 2.66666 31.8671 3.17957 32.9367C3.63074 33.8775 4.35065 34.6424 5.23612 35.1217C6.24276 35.6667 7.56053 35.6667 10.1961 35.6667H15.2157M18.3529 17.3334H8.94117M12.0784 24H8.94117M21.4902 10.6667H8.94117M24.6274 34V24M19.9216 29H29.3333", "stroke-width": "4", "stroke-linecap": "square" })], -1)]), 512), [[z, !e3.hiddenIcon]]), c("div", se, [_(e3.$slots, "default", {}, () => [c("p", { class: i(["title", { "hidden-icon": e3.hiddenIcon }]) }, m(v(V).upload_note), 3), w(c("p", null, m(v(V).max_size) + " " + m(v(D)(G2.value)), 513), [[z, G2.value > 0]]), c("p", null, m(v(V).max_count), 1)], true)])]), c("input", { ref_key: "uploadFileRef", ref: k2, type: "file", multiple: "", style: { display: "none" }, onChange: j2 }, null, 544)], 34), o(B, { name: "file-list-show" }, { default: r(() => {
|
|
113
|
+
var _a;
|
|
114
|
+
return [((_a = F2.value) == null ? void 0 : _a.length) ? (s(), p(ae, { key: 0, class: "file-list-show", files: F2.value, "onReview:file": A2, "onDelete:file": q2, deletable: "" }, null, 8, ["files"])) : f("", true)];
|
|
115
|
+
}), _: 1 })]));
|
|
116
|
+
} }), [["__scopeId", "data-v-960abad0"]])), oe = b(ae);
|
|
117
|
+
export {
|
|
118
|
+
ie as M,
|
|
119
|
+
oe as a
|
|
120
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-alert[data-v-
|
|
1
|
+
.mc-alert[data-v-fc038f58]{--mc-alert-color: inherit;--mc-alert-background: inherit;position:relative;display:flex;align-items:center;justify-content:space-between;border-radius:var(--mc-radius);padding:8px 16px;transition:opacity var(--mc-transition-duration),transform var(--mc-transition-duration);background-color:var(--mc-alert-background)}.mc-alert__content[data-v-fc038f58]{display:flex;flex-direction:column;gap:8px;width:100%;height:100%}.mc-alert__content .mc-alert__header[data-v-fc038f58]{display:flex;align-items:center;justify-content:space-between}.mc-alert__content .mc-alert__header .mc-alert__header-left[data-v-fc038f58]{display:flex;align-items:center;gap:8px}.mc-alert__content .mc-alert__header .mc-alert__header-left .mc-alert__title[data-v-fc038f58]{font-weight:600;font-size:22px;line-height:30px}.mc-alert__content .mc-alert__header .mc-alert__icon[data-v-fc038f58]{flex-shrink:0;color:var(--mc-alert-color)}.mc-alert__content .mc-alert__header .mc-alert__close[data-v-fc038f58]{cursor:pointer;opacity:.8;transition:opacity var(--mc-transition-duration)}.mc-alert__content .mc-alert__header .mc-alert__close[data-v-fc038f58]:hover{opacity:1}.mc-alert__content .mc-alert__description[data-v-fc038f58]{font-weight:400;font-size:16px;line-height:24px;color:var(--mc-gray-800);margin-left:32px}.mc-alert--success[data-v-fc038f58]{--mc-alert-color: var(--mc-success);--mc-alert-background: var(--mc-success-background)}.mc-alert--info[data-v-fc038f58]{--mc-alert-color: var(--mc-info);--mc-alert-background: var(--mc-info-background)}.mc-alert--warning[data-v-fc038f58]{--mc-alert-color: var(--mc-warning);--mc-alert-background: var(--mc-warning-background)}.mc-alert--error[data-v-fc038f58]{--mc-alert-color: var(--mc-error);--mc-alert-background: var(--mc-error-background)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes loading-
|
|
1
|
+
@keyframes loading-22e63398{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mc-button[data-v-22e63398]{border:none;background:none;padding:0;margin:0;font-family:inherit;font-size:inherit;color:inherit;line-height:inherit;-moz-appearance:none;appearance:none;-webkit-appearance:none;cursor:pointer;outline:none;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:var(--mc-gap);font-weight:700;border-radius:var(--mc-radius);transition:transform var(--mc-transition-duration)}.mc-button[data-v-22e63398]:active{transform:translateY(var(--mc-transform-distance))}.mc-button .mc-button-text[data-v-22e63398]{white-space:nowrap}.mc-button.mc-button--medium[data-v-22e63398]{width:fit-content;height:var(--mc-base-height);padding:15px 16px}.mc-button.mc-button--small[data-v-22e63398]{width:fit-content;height:34px;padding:12px 16px}.mc-button.mc-button--large[data-v-22e63398]{width:fit-content;height:64px;padding:27px 16px}.mc-button.mc-button--primary[data-v-22e63398]{background-color:var(--mc-teal-500);color:var(--mc-white)}.mc-button.mc-button--primary[data-v-22e63398]:hover{background-color:var(--mc-teal-900)}.mc-button.mc-button--primary.is-disabled[data-v-22e63398]:hover{background-color:var(--mc-gray-300);color:var(--mc-gray-400);border:none}.mc-button.mc-button--plain[data-v-22e63398]{border:1px solid var(--mc-teal-500);color:var(--mc-teal-500)}.mc-button.mc-button--plain[data-v-22e63398]:hover{border:1px solid var(--mc-teal-900);color:var(--mc-teal-900)}.mc-button.mc-button--plain.is-disabled[data-v-22e63398]{border:1px solid var(--mc-gray-300);color:var(--mc-gray-300);background:none}.mc-button.mc-button--link[data-v-22e63398]{padding:0;color:var(--mc-teal-500)}.mc-button.mc-button--link[data-v-22e63398]:hover{color:var(--mc-teal-900)}.mc-button.mc-button--link.is-disabled[data-v-22e63398]{color:var(--mc-gray-300);background:none}.mc-button.is-loading .loading-icon[data-v-22e63398]{width:16px;height:16px;display:flex;justify-content:center;align-items:center;transform-origin:center;animation:loading-22e63398 1s linear infinite}.mc-button.is-disabled[data-v-22e63398]{background-color:var(--mc-gray-300);color:var(--mc-gray-400);border:none;cursor:not-allowed}.mc-button.is-disabled[data-v-22e63398]:hover{transform:translateY(0)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-form-item[data-v-
|
|
1
|
+
.mc-form-item[data-v-5c93e7b2]{margin-bottom:24px;position:relative}.mc-form-item .mc-form-item__label[data-v-5c93e7b2]{position:relative;font-weight:700;color:var(--mc-gray-500);font-size:14px}.mc-form-item .mc-form-item__label.mc-form-item__label--required[data-v-5c93e7b2]:after{content:"*";color:var(--mc-error);position:absolute;right:-8px;top:0}.mc-form-item .mc-form-item__content[data-v-5c93e7b2]{margin-top:8px}.mc-form-item .mc-form-item__error[data-v-5c93e7b2]{position:absolute;bottom:-20px;left:0;color:var(--mc-error);font-size:12px}.mc-form-item .mc-form-item-error-enter-active[data-v-5c93e7b2],.mc-form-item .mc-form-item-error-leave-active[data-v-5c93e7b2]{transition:all .3s ease}.mc-form-item .mc-form-item-error-enter-from[data-v-5c93e7b2],.mc-form-item .mc-form-item-error-leave-to[data-v-5c93e7b2]{opacity:0;transform:translateY(-8px)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-lightbox[data-v-
|
|
1
|
+
.mc-lightbox[data-v-632e7454]{width:800px;height:fit-content;max-height:70%;padding:56px 0 72px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--mc-white);z-index:9999;box-sizing:border-box;border-radius:4px}.mc-lightbox.mc-lightbox-large[data-v-632e7454]{width:1024px}.mc-lightbox.mc-lightbox-small[data-v-632e7454]{width:430px}.mc-lightbox .mc-lightbox-header[data-v-632e7454]{width:100%;position:absolute;top:0}.mc-lightbox .mc-lightbox-footer[data-v-632e7454]{width:100%;position:absolute;bottom:0}.mc-lightbox .mc-lightbox-content-wrapper[data-v-632e7454]{width:100%;box-sizing:border-box;overflow-y:auto}.mc-lightbox .mc-lightbox-content-wrapper .mc-lightbox-content[data-v-632e7454]{padding:24px;box-sizing:border-box}.mc-lightbox-overlay-enter-active[data-v-632e7454],.mc-lightbox-overlay-leave-active[data-v-632e7454]{transition:opacity .3s ease-in-out}.mc-lightbox-overlay-enter-active.mc-lightbox-overlay-enter-from[data-v-632e7454],.mc-lightbox-overlay-enter-active.mc-lightbox-overlay-leave-to[data-v-632e7454],.mc-lightbox-overlay-leave-active.mc-lightbox-overlay-enter-from[data-v-632e7454],.mc-lightbox-overlay-leave-active.mc-lightbox-overlay-leave-to[data-v-632e7454]{opacity:0}.mc-lightbox-overlay-enter-active.mc-lightbox-overlay-enter-to[data-v-632e7454],.mc-lightbox-overlay-enter-active.mc-lightbox-overlay-leave-from[data-v-632e7454],.mc-lightbox-overlay-leave-active.mc-lightbox-overlay-enter-to[data-v-632e7454],.mc-lightbox-overlay-leave-active.mc-lightbox-overlay-leave-from[data-v-632e7454]{opacity:1}.mc-lightbox-content-enter-active[data-v-632e7454],.mc-lightbox-content-leave-active[data-v-632e7454]{transition:transform .5s ease-in-out,opacity .5s ease-in-out}.mc-lightbox-content-enter-active.mc-lightbox-content-enter-from[data-v-632e7454],.mc-lightbox-content-enter-active.mc-lightbox-content-leave-to[data-v-632e7454],.mc-lightbox-content-leave-active.mc-lightbox-content-enter-from[data-v-632e7454],.mc-lightbox-content-leave-active.mc-lightbox-content-leave-to[data-v-632e7454]{opacity:0;transform:translate(-50%,-50%) scale(.8)}.mc-lightbox-content-enter-active.mc-lightbox-content-enter-to[data-v-632e7454],.mc-lightbox-content-enter-active.mc-lightbox-content-leave-from[data-v-632e7454],.mc-lightbox-content-leave-active.mc-lightbox-content-enter-to[data-v-632e7454],.mc-lightbox-content-leave-active.mc-lightbox-content-leave-from[data-v-632e7454]{opacity:1;transform:translate(-50%,-50%) scale(1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes spin-579e8a9d{0%{transform:rotate(0)}to{transform:rotate(360deg)}}ul[data-v-579e8a9d]{margin:0;padding:0;box-sizing:border-box}ul li[data-v-579e8a9d]{list-style:none;margin:0;padding:0}.mc-file-list[data-v-579e8a9d]{width:100%;border-radius:8px;background-color:var(--mc-white)}.mc-file-list.mc-file-list-grey[data-v-579e8a9d]{background-color:var(--mc-gray-100)}.mc-file-list .file-item[data-v-579e8a9d]{padding:16px;box-sizing:border-box;margin-bottom:8px;box-shadow:0 2px 4px #0000001a}.mc-file-list .file-item .file-info-container[data-v-579e8a9d]{display:flex;justify-content:space-between;gap:24px}.mc-file-list .file-item .compact-container[data-v-579e8a9d]{margin-top:32px;position:relative}.mc-file-list .file-item .compact-container[data-v-579e8a9d]:before{content:"";height:1px;width:100%;background-color:var(--mc-white);position:absolute;top:-16px}.mc-file-list .file-item .compact-container .file-info[data-v-579e8a9d]{height:32px;display:flex;align-items:center;gap:24px}.mc-file-list .file-item .compact-container .file-info .label[data-v-579e8a9d]{margin:0;min-width:160px}.mc-file-list .file-item .compact-container .file-info .content[data-v-579e8a9d]{word-wrap:break-word}.mc-file-list .file-item[data-v-579e8a9d]:last-of-type{margin-bottom:0}.mc-file-list .file-item.loading .loading-icon[data-v-579e8a9d]{transform-origin:center;animation:spin-579e8a9d 1.5s ease-in-out 0s infinite}.mc-file-list .file-item.successed .file-name .file[data-v-579e8a9d]{color:var(--mc-teal-500);gap:4px;cursor:pointer}.mc-file-list .file-item.successed .file-name .file[data-v-579e8a9d]:hover{color:var(--mc-teal-900)}.mc-file-list .file-item.successed .file-name .file .file-name-text[data-v-579e8a9d]{max-width:500px;word-wrap:break-word}.mc-file-list .file-item.failed .file-name .file[data-v-579e8a9d],.mc-file-list .file-item.failed .file-name .size[data-v-579e8a9d]{color:var(--mc-error)}.mc-file-list .file-item.failed .error-info[data-v-579e8a9d]{color:var(--mc-error);font-size:12px!important;font-weight:700}.mc-file-list .file-item.failed .delete[data-v-579e8a9d]{color:var(--mc-error)}.mc-file-list .file-item .file-name[data-v-579e8a9d]{cursor:default}.mc-file-list .file-item .file-name .file[data-v-579e8a9d]{font-size:12px;font-weight:400;color:var(--mc-black);display:flex;gap:8px;transition:transform .2s}.mc-file-list .file-item .file-name .size[data-v-579e8a9d]{margin-top:8px;margin-left:24px;font-size:10px;color:var(--mc-gray-500)}.mc-file-list .file-item .file-info[data-v-579e8a9d]{max-width:386px;word-break:break-all}.mc-file-list .file-item .file-info .label[data-v-579e8a9d]{margin-bottom:8px;font-size:12px;min-height:24px;display:flex;align-items:center;color:var(--mc-gray-500)}.mc-file-list .file-item .file-info .content[data-v-579e8a9d]{min-height:24px;display:flex;align-items:center;font-size:16px;font-weight:400}.mc-file-list .file-item .delete[data-v-579e8a9d]{cursor:pointer;color:var(--mc-teal-500)}.mc-file-list .file-item .delete[data-v-579e8a9d]:hover{color:var(--mc-error)}.file-list-enter-from[data-v-579e8a9d],.file-list-leave-to[data-v-579e8a9d]{transform:scaleY(0);opacity:0}.file-list-enter-to[data-v-579e8a9d],.file-list-leave-from[data-v-579e8a9d]{transform:scaleY(1);opacity:1}.file-list-enter-active[data-v-579e8a9d],.file-list-leave-active[data-v-579e8a9d]{transform-origin:top;transition:transform .3s linear 0s,opacity .3s linear 0s}.mc-upload[data-v-960abad0]{width:100%;max-width:1284px;min-height:180px;padding:24px;border:1px solid var(--mc-teal-500);border-radius:8px;background-color:#d7eceb80;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;box-sizing:border-box;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-upload p[data-v-960abad0]{padding:0;margin:0}.mc-upload:hover .upload-icon path[data-v-960abad0]{stroke:var(--mc-teal-900)!important}.mc-upload:hover .desc .title[data-v-960abad0]{color:var(--mc-teal-900)!important;text-decoration:underline}.mc-upload.dragover[data-v-960abad0]{box-sizing:border-box;border:2px solid var(--mc-teal-500);box-shadow:0 4px 8px #0000001a}.mc-upload.dragover .cover[data-v-960abad0]{background-color:#d2d2d21a}.mc-upload .cover[data-v-960abad0]{width:100%;height:100%;position:absolute;border-radius:8px}.mc-upload .upload[data-v-960abad0]{display:flex;flex-direction:column;justify-content:center;align-items:center}.mc-upload .upload .upload-icon[data-v-960abad0]{margin-bottom:16px}.mc-upload .upload .upload-icon path[data-v-960abad0]{stroke:var(--mc-teal-500)}.mc-upload .upload .desc[data-v-960abad0]{display:flex;flex-direction:column;justify-content:center;align-items:center}.mc-upload .upload .desc p[data-v-960abad0]{font-weight:400!important;font-size:14px!important;color:var(--mc-gray-500)}.mc-upload .upload .desc p.title[data-v-960abad0]{color:var(--mc-teal-500);font-weight:700!important;font-size:16px!important;margin-bottom:16px}.file-list-show[data-v-960abad0]{max-width:1284px;margin-top:8px}.file-list-show-enter-from[data-v-960abad0],.file-list-show-leave-to[data-v-960abad0]{transform:scaleY(0);opacity:0}.file-list-show-enter-to[data-v-960abad0],.file-list-show-leave-from[data-v-960abad0]{transform:scaleY(1);opacity:1}.file-list-show-enter-active[data-v-960abad0],.file-list-show-leave-active[data-v-960abad0]{transform-origin:top;transition:transform .3s linear 0s,opacity .3s linear 0s}
|