mc-plus 1.0.96 → 1.0.97
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/index.js +16 -16
- package/dist/es/mc-file-list-DEx-jX1K.js +29 -0
- package/dist/es/{mc-input-group-B45WZ5mO.js → mc-input-group-EkEIqaP0.js} +15 -15
- package/dist/es/{mc-input-DNxN4R08.js → mc-input-p_XWRrLk.js} +1 -1
- package/dist/es/{mc-richtext-rpgRGRXa.js → mc-richtext-EFlj6wEQ.js} +4 -4
- package/dist/es/mc-select-group-plus-DwFonS40.js +13 -0
- package/dist/es/mc-select-option-plus-mMlT_leo.js +18 -0
- package/dist/es/mc-select-plus-XXyTxReE.js +206 -0
- package/dist/es/mc-upload-BPCzV6vM.js +117 -0
- package/dist/es/theme/mc-alert-message.css +1 -1
- package/dist/es/theme/mc-checkbox.css +1 -1
- package/dist/es/theme/mc-collapse-item.css +1 -1
- package/dist/es/theme/mc-copy.css +1 -1
- package/dist/es/theme/mc-count.css +1 -1
- package/dist/es/theme/mc-currency-icon.css +1 -1
- package/dist/es/theme/mc-date-picker.css +1 -1
- package/dist/es/theme/mc-drawer.css +1 -1
- package/dist/es/theme/mc-file-list.css +1 -1
- package/dist/es/theme/mc-input-group.css +1 -1
- package/dist/es/theme/mc-input.css +1 -1
- package/dist/es/theme/mc-lightbox.css +1 -1
- package/dist/es/theme/mc-loading.css +1 -1
- package/dist/es/theme/mc-multi-tag.css +1 -1
- package/dist/es/theme/mc-otp.css +1 -1
- package/dist/es/theme/mc-progress-bar.css +1 -1
- package/dist/es/theme/mc-progress-indicator.css +1 -1
- package/dist/es/theme/mc-radio.css +1 -1
- package/dist/es/theme/mc-removable-tag.css +1 -1
- package/dist/es/theme/mc-richtext.css +1 -1
- package/dist/es/theme/mc-secondary-menu.css +1 -1
- package/dist/es/theme/mc-select-group-plus.css +1 -1
- package/dist/es/theme/mc-select-option-plus.css +1 -1
- package/dist/es/theme/mc-select-plus.css +1 -1
- package/dist/es/theme/mc-step-plus.css +1 -1
- package/dist/es/theme/mc-step.css +1 -1
- package/dist/es/theme/mc-switch.css +1 -1
- package/dist/es/theme/mc-table-plus.css +1 -1
- package/dist/es/theme/mc-textarea.css +1 -1
- package/dist/es/theme/mc-toast.css +1 -1
- package/dist/es/theme/mc-upload.css +1 -1
- package/dist/es/{vendor-BEjxar4U.js → vendor-BLme4Nko.js} +2095 -1981
- package/dist/index.css +1 -1
- package/dist/types/mc-file-list/index.d.ts +10 -1
- package/dist/types/mc-file-list/mc-file-list.vue.d.ts +23 -1
- package/dist/types/mc-input-group/hooks/useInputGroupCtx.d.ts +1 -0
- package/dist/types/mc-select-plus/components/mc-select-list/constant.d.ts +1 -0
- package/dist/types/mc-select-plus/components/mc-select-list/hooks/index.d.ts +2 -0
- package/dist/types/mc-select-plus/components/mc-select-list/hooks/useScrollOutSide.d.ts +5 -0
- package/dist/types/mc-select-plus/components/mc-select-list/hooks/useSelectAll.d.ts +6 -0
- package/dist/types/mc-select-plus/components/mc-select-list/index.vue.d.ts +35 -0
- package/dist/types/mc-select-plus/components/mc-select-list/types.d.ts +11 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content/constant.d.ts +2 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content/index.vue.d.ts +21 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content/types.d.ts +4 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content-multi/constant.d.ts +3 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content-multi/index.vue.d.ts +7 -0
- package/dist/types/mc-select-plus/components/mc-select-selected-content-multi/types.d.ts +13 -0
- package/dist/types/mc-select-plus/components/mc-select-trigger/constant.d.ts +2 -0
- package/dist/types/mc-select-plus/components/mc-select-trigger/hooks/index.d.ts +1 -0
- package/dist/types/mc-select-plus/{hooks → components/mc-select-trigger/hooks}/useClear.d.ts +1 -3
- package/dist/types/mc-select-plus/components/mc-select-trigger/index.vue.d.ts +55 -0
- package/dist/types/mc-select-plus/components/mc-select-trigger/types.d.ts +20 -0
- package/dist/types/mc-select-plus/hooks/index.d.ts +5 -8
- package/dist/types/mc-select-plus/hooks/re_useClickOutside.d.ts +5 -0
- package/dist/types/mc-select-plus/hooks/{useSearch.d.ts → re_useSearch.d.ts} +0 -1
- package/dist/types/mc-select-plus/hooks/re_useSelected.d.ts +6 -0
- package/dist/types/mc-select-plus/index.d.ts +35 -55
- package/dist/types/mc-select-plus/mc-select-plus.vue.d.ts +58 -100
- package/dist/types/mc-select-plus/types/mc-select.d.ts +9 -9
- package/dist/types/mc-upload/index.d.ts +3 -0
- package/dist/types/mc-upload/mc-upload.vue.d.ts +3 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +38 -38
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-file-list-CEjzwuoW.js +0 -29
- package/dist/es/mc-select-group-plus-B3EJzLHL.js +0 -13
- package/dist/es/mc-select-option-plus-BhrMU8QL.js +0 -24
- package/dist/es/mc-select-plus-CtXzc-qi.js +0 -182
- package/dist/es/mc-upload-BKguo5Ul.js +0 -117
- package/dist/types/mc-select-plus/hooks/useExpand.d.ts +0 -10
- package/dist/types/mc-select-plus/hooks/useSelectAll.d.ts +0 -8
- package/dist/types/mc-select-plus/hooks/useSelectDisable.d.ts +0 -5
- package/dist/types/mc-select-plus/hooks/useSelectWidthHeight.d.ts +0 -7
- /package/dist/types/mc-select-plus/hooks/{useOptionHover.d.ts → re_useOptionHover.d.ts} +0 -0
- /package/dist/types/mc-select-plus/hooks/{useSelectOptions.d.ts → re_useSelectOptions.d.ts} +0 -0
package/dist/es/index.js
CHANGED
|
@@ -33,10 +33,10 @@ import { M as w } from "./mc-icon-CnpccbFi.js";
|
|
|
33
33
|
import { a as a15 } from "./mc-icon-CnpccbFi.js";
|
|
34
34
|
import { M as J } from "./mc-icon-plus-CHgt2j0R.js";
|
|
35
35
|
import { b as b3 } from "./mc-icon-plus-CHgt2j0R.js";
|
|
36
|
-
import { M as V } from "./mc-input-
|
|
37
|
-
import { a as a16 } from "./mc-input-
|
|
38
|
-
import { M as Z } from "./mc-input-group-
|
|
39
|
-
import { I, a as a17 } from "./mc-input-group-
|
|
36
|
+
import { M as V } from "./mc-input-p_XWRrLk.js";
|
|
37
|
+
import { a as a16 } from "./mc-input-p_XWRrLk.js";
|
|
38
|
+
import { M as Z } from "./mc-input-group-EkEIqaP0.js";
|
|
39
|
+
import { I, a as a17 } from "./mc-input-group-EkEIqaP0.js";
|
|
40
40
|
import { M as z } from "./mc-lightbox-CvcYh54U.js";
|
|
41
41
|
import { a as a18 } from "./mc-lightbox-CvcYh54U.js";
|
|
42
42
|
import { M as Q } from "./mc-loading-w8PEFPUz.js";
|
|
@@ -69,8 +69,8 @@ import { M as Cs } from "./mc-removable-tag-X5mFMPl2.js";
|
|
|
69
69
|
import { a as a29 } from "./mc-removable-tag-X5mFMPl2.js";
|
|
70
70
|
import { M as is } from "./mc-reset-2g3HidL0.js";
|
|
71
71
|
import { a as a30 } from "./mc-reset-2g3HidL0.js";
|
|
72
|
-
import { M as fs } from "./mc-richtext-
|
|
73
|
-
import { F as F3, a as a31, b as b6, T } from "./mc-richtext-
|
|
72
|
+
import { M as fs } from "./mc-richtext-EFlj6wEQ.js";
|
|
73
|
+
import { F as F3, a as a31, b as b6, T } from "./mc-richtext-EFlj6wEQ.js";
|
|
74
74
|
import { M as Es } from "./mc-secondary-menu-DXNC7YoQ.js";
|
|
75
75
|
import { a as a32 } from "./mc-secondary-menu-DXNC7YoQ.js";
|
|
76
76
|
import { M as js } from "./mc-select-A1sfj0F6.js";
|
|
@@ -79,12 +79,12 @@ import { M as Ts } from "./mc-select-group-DyxMiZvG.js";
|
|
|
79
79
|
import { a as a34, S as S2 } from "./mc-select-group-DyxMiZvG.js";
|
|
80
80
|
import { M as Os } from "./mc-select-option-DdaXGsnw.js";
|
|
81
81
|
import { a as a35 } from "./mc-select-option-DdaXGsnw.js";
|
|
82
|
-
import { M as ls } from "./mc-select-plus-
|
|
83
|
-
import { b as b7, a as a36 } from "./mc-select-plus-
|
|
84
|
-
import { a as Ls } from "./mc-select-group-plus-
|
|
85
|
-
import { M as M4 } from "./mc-select-group-plus-
|
|
86
|
-
import { M as As } from "./mc-select-option-plus-
|
|
87
|
-
import { a as a37 } from "./mc-select-option-plus-
|
|
82
|
+
import { M as ls } from "./mc-select-plus-XXyTxReE.js";
|
|
83
|
+
import { b as b7, a as a36 } from "./mc-select-plus-XXyTxReE.js";
|
|
84
|
+
import { a as Ls } from "./mc-select-group-plus-DwFonS40.js";
|
|
85
|
+
import { M as M4 } from "./mc-select-group-plus-DwFonS40.js";
|
|
86
|
+
import { M as As } from "./mc-select-option-plus-mMlT_leo.js";
|
|
87
|
+
import { a as a37 } from "./mc-select-option-plus-mMlT_leo.js";
|
|
88
88
|
import { M as xs } from "./mc-select-multi-option-CcI3A3-Q.js";
|
|
89
89
|
import { a as a38 } from "./mc-select-multi-option-CcI3A3-Q.js";
|
|
90
90
|
import { M as Is } from "./mc-status-Bw9-cSOb.js";
|
|
@@ -123,10 +123,10 @@ import { M as hs } from "./mc-toast-BNRX1zn4.js";
|
|
|
123
123
|
import { a as a51, t } from "./mc-toast-BNRX1zn4.js";
|
|
124
124
|
import { M as Fs } from "./mc-tooltip-B4YnwWwZ.js";
|
|
125
125
|
import { a as a52 } from "./mc-tooltip-B4YnwWwZ.js";
|
|
126
|
-
import { M as Hs } from "./mc-upload-
|
|
127
|
-
import { A, a as a53, b as b11, W } from "./mc-upload-
|
|
128
|
-
import { M as Xs } from "./mc-file-list-
|
|
129
|
-
import { a as a54 } from "./mc-file-list-
|
|
126
|
+
import { M as Hs } from "./mc-upload-BPCzV6vM.js";
|
|
127
|
+
import { A, a as a53, b as b11, W } from "./mc-upload-BPCzV6vM.js";
|
|
128
|
+
import { M as Xs } from "./mc-file-list-DEx-jX1K.js";
|
|
129
|
+
import { a as a54 } from "./mc-file-list-DEx-jX1K.js";
|
|
130
130
|
const ys = [E, O, L, x, P, R, N, U, B, G, K, H, X, y, v, w, J, V, Z, z, Q, $, ss, os, ms, rs, as, ts, ps, _s, cs, es, Ms, Cs, is, fs, Es, js, Ts, Os, Ls, xs, As, ls, Is, Ps, us, Rs, Ss, Ns, ns, Us, bs, ds, gs, Ds, Bs, Gs, Ys, Ks, hs, Fs, Xs, Hs];
|
|
131
131
|
s();
|
|
132
132
|
const Ws = _(ys);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { _ as e, u as l } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as i, ref as s, createElementBlock as a, openBlock as t, normalizeClass as m, Fragment as c, renderList as o, createElementVNode as n, createCommentVNode as f, createVNode as d, unref as u, toDisplayString as p, renderSlot as r, createBlock as v } from "vue";
|
|
3
|
+
import { useResizeObserver as k } from "@mc-plus/hooks";
|
|
4
|
+
import { M as y } from "./mc-icon-CnpccbFi.js";
|
|
5
|
+
import { M as g } from "./mc-divider-BkBo-IT9.js";
|
|
6
|
+
import { M as b } from "./mc-progress-bar-COF1YGM0.js";
|
|
7
|
+
import { u as C, g as w, f as _ } from "./mc-upload-BPCzV6vM.js";
|
|
8
|
+
const h = "mc-file-list", x = { class: "mc-file-list-item-content" }, M = { class: "mc-file-list-item-file mc-file-list-item-info" }, j = ["onClick"], B = { class: "mc-file-list-item-file-name-text" }, V = { class: "mc-file-list-item-file-desc" }, $ = { class: "mc-file-list-item-file-size-text" }, z = { key: 0, class: "mc-file-list-item-file-progress-bar" }, T = { key: 1, class: "mc-file-list-item-file-error" }, D = { class: "mc-file-list-item-info" }, I = { class: "mc-file-list-item-label" }, L = { class: "mc-file-list-item-value" }, R = { class: "mc-file-list-item-info" }, q = { class: "mc-file-list-item-label" }, A = { class: "mc-file-list-item-value" }, E = { key: 0, class: "mc-file-list-item-info" }, F = { class: "mc-file-list-item-actions" }, G = { class: "mc-file-list-item-compact-content" }, H = { class: "mc-file-list-item-info" }, J = { class: "mc-file-list-item-label" }, K = { class: "mc-file-list-item-value" }, N = { class: "mc-file-list-item-info" }, O = { class: "mc-file-list-item-label" }, P = { class: "mc-file-list-item-value" }, Q = { key: 0, class: "mc-file-list-item-info" }, S = l(e(i({ name: h, __name: "mc-file-list", props: { modelValue: { default: () => [] }, theme: { default: "light" }, lang: { default: "en" }, downloadable: { type: Boolean, default: false }, allowCancel: { type: Boolean, default: false }, deletable: { type: Boolean, default: true } }, emits: ["update:modelValue", "change", "delete", "download", "preview", "cancel"], setup(e2, { emit: l2 }) {
|
|
9
|
+
const i2 = e2, h2 = l2, { langMap: S2 } = C(), U = s(false), W = s();
|
|
10
|
+
k(W, ({ width: e3 }) => {
|
|
11
|
+
U.value = e3 <= 600;
|
|
12
|
+
});
|
|
13
|
+
const X = (e3) => {
|
|
14
|
+
h2("update:modelValue", i2.modelValue.filter((l3) => l3.name !== e3.name));
|
|
15
|
+
};
|
|
16
|
+
return (l3, i3) => (t(), a("ul", { class: m(["mc-file-list", [`mc-file-list-${e2.theme}`, { "mc-file-list-compact": U.value }]]), ref_key: "fileListRef", ref: W }, [(t(true), a(c, null, o(e2.modelValue, (i4) => (t(), a("li", { class: "mc-file-list-item", key: i4.name }, [n("div", x, [n("div", M, [n("div", { class: "mc-file-list-item-file-name", onClick: (e3) => ((e4) => {
|
|
17
|
+
h2("preview", e4);
|
|
18
|
+
})(i4) }, [d(u(y), { name: "Document" }), n("span", B, p(i4.name), 1)], 8, j), n("div", V, ["failed" !== i4.status ? (t(), a(c, { key: 0 }, [n("span", $, p(i4.size ? u(w)(i4.size) : "--"), 1), "loading" === i4.status ? (t(), a("div", z, [d(u(b), { percentage: i4.progress, "transition-duration": 1e3 }, null, 8, ["percentage"])])) : f("", true)], 64)) : (t(), a("span", T, p(i4.errorMessage || "failed to upload"), 1))])]), U.value ? f("", true) : (t(), a(c, { key: 0 }, [n("div", D, [n("span", I, p(u(S2).uploaded_by), 1), n("span", L, p(i4.uploadBy || "--"), 1)]), n("div", R, [n("span", q, p(u(S2).uploaded_on), 1), n("span", A, p(u(_)(i4.uploadTime) || "--"), 1)]), l3.$slots.extra && "successed" === i4.status ? (t(), a("div", E, [r(l3.$slots, "extra", { file: i4 }, void 0, true)])) : f("", true)], 64)), n("div", F, ["loading" === i4.status ? (t(), a(c, { key: 0 }, [e2.allowCancel ? (t(), v(u(y), { key: 0, name: "Cross", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
|
|
19
|
+
h2("cancel", e4), X(e4);
|
|
20
|
+
})(i4) }, null, 8, ["onClick"])) : f("", true)], 64)) : (t(), a(c, { key: 1 }, [e2.downloadable ? (t(), v(u(y), { key: 0, name: "Download", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
|
|
21
|
+
h2("download", e4);
|
|
22
|
+
})(i4) }, null, 8, ["onClick"])) : f("", true), e2.deletable ? (t(), v(u(y), { key: 1, name: "Trash", class: "mc-file-list-item-icon", onClick: (e3) => ((e4) => {
|
|
23
|
+
h2("delete", e4), X(e4);
|
|
24
|
+
})(i4) }, null, 8, ["onClick"])) : f("", true)], 64))])]), U.value ? (t(), a(c, { key: 0 }, [d(u(g)), n("div", G, [n("div", H, [n("span", J, p(u(S2).uploaded_by), 1), n("span", K, p(i4.uploadBy || "--"), 1)]), n("div", N, [n("span", O, p(u(S2).uploaded_on), 1), n("span", P, p(u(_)(i4.uploadTime) || "--"), 1)]), l3.$slots.extra && "successed" === i4.status ? (t(), a("div", Q, [r(l3.$slots, "extra", { file: i4 }, void 0, true)])) : f("", true)])], 64)) : f("", true)]))), 128))], 2));
|
|
25
|
+
} }), [["__scopeId", "data-v-1e7a8f73"]]));
|
|
26
|
+
export {
|
|
27
|
+
S as M,
|
|
28
|
+
h as a
|
|
29
|
+
};
|
|
@@ -2,21 +2,21 @@ import { ref as e, computed as u, inject as t, watch as i, defineComponent as p,
|
|
|
2
2
|
import { useProp as v } from "@mc-plus/hooks";
|
|
3
3
|
import { _ as x, u as m } from "./utils-dWwt4JKv.js";
|
|
4
4
|
import { a as I } from "./mc-form-ClGYeMfQ.js";
|
|
5
|
-
const
|
|
6
|
-
const p2 = t(
|
|
5
|
+
const G = Symbol("mc-input-group-context"), g = "mc-input-group", A = (e2) => {
|
|
6
|
+
const p2 = t(G, void 0), r2 = u(() => !!p2);
|
|
7
7
|
if (!p2) return;
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
-
const { validateStatus:
|
|
11
|
-
return
|
|
8
|
+
const s2 = u(() => p2.disabled.value), o2 = v("inputGroupPosition");
|
|
9
|
+
if (!o2 || !o2.value) return;
|
|
10
|
+
const { validateStatus: a2, isExpanded: d2, isFocused: n2, isHovering: l2 } = e2;
|
|
11
|
+
return a2 && i(a2, (e3) => {
|
|
12
12
|
p2.setInputGroupValidate(e3);
|
|
13
|
-
}),
|
|
13
|
+
}), d2 && i(d2, (e3) => {
|
|
14
14
|
p2.setInputGroupExpanded(e3);
|
|
15
|
-
}), i([
|
|
16
|
-
e3 || u2 ? p2.setInputGroupActived(true,
|
|
17
|
-
}), {
|
|
18
|
-
}, E = ["id"], b = { key: 0, class: "mc-input-group-divider" }, y = m(x(p({ name:
|
|
19
|
-
const { isError: i2, isExpanded: p2, isPrefixActived: v2, isSuffixActived: x2, setInputGroupValidate: m2, setInputGroupExpanded:
|
|
15
|
+
}), i([n2, l2], ([e3, u2]) => {
|
|
16
|
+
e3 || u2 ? p2.setInputGroupActived(true, o2.value) : p2.setInputGroupActived(false, o2.value);
|
|
17
|
+
}), { isInputGroup: r2, inputGroupDisabled: s2 };
|
|
18
|
+
}, E = ["id"], b = { key: 0, class: "mc-input-group-divider" }, y = m(x(p({ name: g, __name: "mc-input-group", props: { disabled: { type: Boolean, default: false }, suffixFlex: { default: 1 }, prefixFlex: { default: 1 } }, setup(t2) {
|
|
19
|
+
const { isError: i2, isExpanded: p2, isPrefixActived: v2, isSuffixActived: x2, setInputGroupValidate: m2, setInputGroupExpanded: g2, setInputGroupActived: A2 } = (() => {
|
|
20
20
|
const t3 = e("init"), i3 = u(() => "error" === t3.value), p3 = e(false), r2 = e(false), s2 = e(false);
|
|
21
21
|
return { validateStatus: t3, isError: i3, isExpanded: p3, isPrefixActived: r2, isSuffixActived: s2, setInputGroupValidate: (e2) => {
|
|
22
22
|
t3.value = e2;
|
|
@@ -26,11 +26,11 @@ const g = Symbol("mc-input-group-context"), G = "mc-input-group", A = (e2) => {
|
|
|
26
26
|
"prefix" === u2 ? r2.value = e2 : s2.value = e2;
|
|
27
27
|
} };
|
|
28
28
|
})(), { formId: y2, formDisabled: F } = I(), S = u(() => !v2.value && !x2.value && !p2.value || F.value);
|
|
29
|
-
return r(
|
|
29
|
+
return r(G, { disabled: F, setInputGroupExpanded: g2, setInputGroupValidate: m2, setInputGroupActived: A2 }), (e2, u2) => (o(), s("div", { id: d(y2), class: a(["mc-input-group", { "mc-input-group-disabled": d(F) }]) }, [n("div", { class: a(["mc-input-group-prefix", { "mc-input-group-prefix-expanded": d(p2), "mc-input-group-prefix-actived": d(v2), "mc-input-group-prefix-error": d(i2) }]), style: f({ flex: t2.prefixFlex }) }, [c(e2.$slots, "prefix", {}, void 0, true)], 6), S.value ? (o(), s("div", b)) : l("", true), n("div", { class: a(["mc-input-group-suffix", { "mc-input-group-suffix-expanded": d(p2), "mc-input-group-suffix-actived": d(x2), "mc-input-group-suffix-error": d(i2) }]), style: f({ flex: t2.suffixFlex }) }, [c(e2.$slots, "suffix", {}, void 0, true)], 6)], 10, E));
|
|
30
30
|
} }), [["__scopeId", "data-v-deb1fe8a"]]));
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
G as I,
|
|
33
33
|
y as M,
|
|
34
|
-
|
|
34
|
+
g as a,
|
|
35
35
|
A as u
|
|
36
36
|
};
|
|
@@ -4,7 +4,7 @@ import { includes as b, endsWith as _, startsWith as w, toString as I, isNil as
|
|
|
4
4
|
import { useFocus as B, useHover as V } from "@mc-plus/hooks";
|
|
5
5
|
import { M as S } from "./mc-icon-CnpccbFi.js";
|
|
6
6
|
import { u as A } from "./mc-form-ClGYeMfQ.js";
|
|
7
|
-
import { u as C } from "./mc-input-group-
|
|
7
|
+
import { u as C } from "./mc-input-group-EkEIqaP0.js";
|
|
8
8
|
const R = "mc-input", j = { key: 0, class: "mc-input__prefix" }, T = ["id", "type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "maxlength"], z = { key: 2, class: "mc-input__password" }, F = { key: 0, class: "mc-input__suffix" }, P = { key: 4, class: "mc-input-append" }, D = { class: "mc-input-append-text" }, H = t(e(l({ name: R, __name: "mc-input", props: { modelValue: {}, width: {}, height: {}, id: {}, type: { default: "text" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please enter" }, readonly: { type: Boolean, default: false }, autocomplete: { default: "off" }, autofocus: { type: Boolean, default: false }, prefixIcon: {}, suffixIcon: {}, maxlength: {}, currencyAccuracy: {}, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, textAlign: { default: "left" }, validateProp: {}, formatter: {}, parser: {} }, emits: ["update:modelValue", "input", "change", "focus", "blur", "paste", "clear", "delete"], setup(e2, { expose: t2, emit: l2 }) {
|
|
9
9
|
const R2 = e2, { formatter: H2, parser: E } = R2, G = l2, M = a(), K = n(() => k(R2.modelValue) ? "" : I(R2.modelValue)), O = (e3) => ("number" === R2.type ? e3 = ((e4) => e4.replace(/[^\d]/g, ""))(e3) : "currency" === R2.type && (e3 = ((e4, t3 = 8) => {
|
|
10
10
|
e4 = e4.replace(/(?:[^0-9.]+)/g, "");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as t, openBlock as l, normalizeClass as a, renderSlot as o, createBlock as i, ref as s, watch as c, watchEffect as n, normalizeStyle as r, unref as m, createElementVNode as u, createVNode as d, withCtx as v, toDisplayString as p, createTextVNode as L } from "vue";
|
|
2
|
-
import { M as h, u as f, i as A, a as g, E as M } from "./vendor-
|
|
2
|
+
import { M as h, u as f, i as A, a as g, E as M } from "./vendor-BLme4Nko.js";
|
|
3
3
|
import { useWidthHeight as x } from "@mc-plus/hooks";
|
|
4
|
-
import { M as O } from "./mc-select-plus-
|
|
5
|
-
import { M as T } from "./mc-select-option-plus-
|
|
4
|
+
import { M as O } from "./mc-select-plus-XXyTxReE.js";
|
|
5
|
+
import { M as T } from "./mc-select-option-plus-mMlT_leo.js";
|
|
6
6
|
import { a as k, M as I } from "./mc-icon-plus-CHgt2j0R.js";
|
|
7
7
|
import { M as R } from "./mc-tooltip-B4YnwWwZ.js";
|
|
8
|
-
import { M as b } from "./mc-input-
|
|
8
|
+
import { M as b } from "./mc-input-p_XWRrLk.js";
|
|
9
9
|
import { M as _ } from "./mc-button-CcrftE8N.js";
|
|
10
10
|
import { _ as E, u as N } from "./utils-dWwt4JKv.js";
|
|
11
11
|
const C = "McRichtext", S = "McRichtextTool";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { _ as l, u as s } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as e, inject as t, computed as o, withDirectives as a, createElementBlock as u, openBlock as p, createElementVNode as r, normalizeStyle as c, unref as m, toDisplayString as i, renderSlot as d, vShow as h } from "vue";
|
|
3
|
+
import { includes as f } from "lodash-es";
|
|
4
|
+
import { useWidthHeight as g } from "@mc-plus/hooks";
|
|
5
|
+
import { a as n } from "./mc-select-plus-XXyTxReE.js";
|
|
6
|
+
const v = "mc-select-group-plus", _ = { class: "mc-select-group" }, b = { class: "mc-select-option-list" }, w = s(l(e({ name: v, __name: "mc-select-group-plus", props: { label: {}, height: { default: 40 }, width: { default: "100%" } }, setup(l2) {
|
|
7
|
+
const s2 = l2, { filteredGroups: e2 } = t(n), { height: v2, width: w2 } = g(), j = o(() => f(e2.value, s2.label));
|
|
8
|
+
return (s3, e3) => a((p(), u("ul", _, [r("li", { class: "mc-select-group-label", style: c({ height: m(v2), width: m(w2) }) }, i(l2.label), 5), r("li", null, [r("ul", b, [d(s3.$slots, "default", {}, void 0, true)])])], 512)), [[h, j.value]]);
|
|
9
|
+
} }), [["__scopeId", "data-v-fad05d30"]]));
|
|
10
|
+
export {
|
|
11
|
+
v as M,
|
|
12
|
+
w as a
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { _ as e, u as l } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as a, inject as t, computed as s, ref as o, withDirectives as i, createElementBlock as u, openBlock as d, normalizeStyle as c, normalizeClass as p, unref as m, renderSlot as v, createBlock as r, toDisplayString as n, vShow as b } from "vue";
|
|
3
|
+
import { find as h, some as f } from "lodash-es";
|
|
4
|
+
import { useWidthHeight as y } from "@mc-plus/hooks";
|
|
5
|
+
import { M as _ } from "./mc-select-multi-option-CcI3A3-Q.js";
|
|
6
|
+
import { a as g } from "./mc-select-plus-XXyTxReE.js";
|
|
7
|
+
const k = "mc-select-option-plus", M = ["aria-selected"], j = { key: 1, class: "mc-select-option-label" }, w = l(e(a({ name: k, __name: "mc-select-option-plus", props: { label: {}, value: { type: [String, Number, Boolean] }, height: { default: 40 }, width: { default: "100%" }, disabled: { type: Boolean } }, setup(e2) {
|
|
8
|
+
const l2 = e2, { height: a2, width: k2 } = y(), { isMulti: w2, selectedOptions: O, filteredOptions: B, hoverOption: x, select: A, hover: C } = t(g), D = s(() => !!h(B.value, (e3) => e3.value === l2.value)), I = s(() => f(O.value, (e3) => e3.value === l2.value)), J = o(false), N = s(() => l2.label), Q = () => {
|
|
9
|
+
C(l2.value);
|
|
10
|
+
}, S = s(() => x.value === l2.value), $ = () => {
|
|
11
|
+
l2.disabled || A(l2.value);
|
|
12
|
+
};
|
|
13
|
+
return (l3, t2) => i((d(), u("li", { role: "option", class: p(["mc-select-option", { "mc-select-option-actived": I.value && !m(w2), "mc-select-option-hover": S.value, "mc-select-option-disabled": e2.disabled }]), style: c({ height: m(a2), width: m(k2) }), "aria-selected": J.value, onMouseenter: Q, onClick: $ }, [v(l3.$slots, "default", { isActived: I.value, isDisabled: e2.disabled }, () => [m(w2) ? (d(), r(m(_), { key: 0, "model-value": I.value, label: N.value, disabled: e2.disabled }, null, 8, ["model-value", "label", "disabled"])) : (d(), u("span", j, n(N.value), 1))], true)], 46, M)), [[b, D.value]]);
|
|
14
|
+
} }), [["__scopeId", "data-v-c6116c80"]]));
|
|
15
|
+
export {
|
|
16
|
+
w as M,
|
|
17
|
+
k as a
|
|
18
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { _ as e, u as l } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as t, inject as s, computed as a, createElementBlock as o, openBlock as i, normalizeClass as r, unref as n, renderSlot as u, createBlock as c, resolveDynamicComponent as d, toDisplayString as p, Fragment as v, renderList as m, createVNode as f, withCtx as h, createTextVNode as y, ref as g, createElementVNode as b, normalizeStyle as w, withDirectives as x, withKeys as O, withModifiers as _, vShow as k, createSlots as V, watchEffect as $, onUnmounted as B, Teleport as I, createCommentVNode as P, getCurrentInstance as D, watch as R, nextTick as S, provide as E, isRef as A } from "vue";
|
|
3
|
+
import { isEmpty as L, isNumber as M, map as j, isArray as F, isString as H, isFunction as T, includes as G, filter as C, toLower as U, uniqBy as z, findIndex as K, difference as N } from "lodash-es";
|
|
4
|
+
import { useProp as X, useFocus as Y, useHover as q, useEventListener as J, useWidthHeight as Q } from "@mc-plus/hooks";
|
|
5
|
+
import { M as W } from "./mc-icon-plus-CHgt2j0R.js";
|
|
6
|
+
import { M as Z } from "./mc-tag-DMybZ4uk.js";
|
|
7
|
+
import { b as ee, c as le } from "./vendor-BLme4Nko.js";
|
|
8
|
+
import { M as te } from "./mc-checkbox-AlY2j_HW.js";
|
|
9
|
+
import { M as se } from "./mc-select-group-plus-DwFonS40.js";
|
|
10
|
+
import { a as ae } from "./mc-select-option-plus-mMlT_leo.js";
|
|
11
|
+
import { u as oe } from "./mc-form-ClGYeMfQ.js";
|
|
12
|
+
import { u as ie } from "./mc-input-group-EkEIqaP0.js";
|
|
13
|
+
const re = Symbol("mc-select-plus-context"), ne = "mc-select-plus", ue = { key: 1 }, ce = e(t({ name: "mc-select-selected-content", __name: "index", setup(e2) {
|
|
14
|
+
const { selectedOptions: l2, isDisabled: t2 } = s(re), v2 = a(() => L(l2.value) ? void 0 : l2.value[0]), m2 = a(() => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return L(v2.value) ? void 0 : v2.value.label ?? ((_b = (_a = v2.value) == null ? void 0 : _a.value) == null ? void 0 : _b.toString());
|
|
17
|
+
}), f2 = a(() => L(v2.value) ? void 0 : v2.value.context);
|
|
18
|
+
return (e3, l3) => {
|
|
19
|
+
var _a;
|
|
20
|
+
return i(), o("div", { class: r(["mc-select-selected-content", { "is-disabled": n(t2) }]) }, [f2.value || e3.$slots.default ? u(e3.$slots, "default", { key: 0, selectedOption: (_a = v2.value) == null ? void 0 : _a.value, selectedOptionLabel: m2.value, isDisabled: n(t2) }, () => [(i(), c(d(f2.value)))], true) : (i(), o("span", ue, p(m2.value), 1))], 2);
|
|
21
|
+
};
|
|
22
|
+
} }), [["__scopeId", "data-v-89e7c6ac"]]), de = { class: "mc-select-selected-content-multi" }, pe = e(t({ name: "mc-select-selected-content-multi", __name: "index", props: { isFocused: { type: Boolean, default: false }, isHovering: { type: Boolean, default: false }, maxTags: { default: void 0 } }, setup(e2) {
|
|
23
|
+
const { isMulti: l2, selectedOptions: t2, isDisabled: r2, deleteTag: u2 } = s(re), c2 = e2, d2 = a(() => {
|
|
24
|
+
const e3 = c2.maxTags, l3 = t2.value;
|
|
25
|
+
if (M(e3)) {
|
|
26
|
+
const t3 = l3.length - e3, s2 = [];
|
|
27
|
+
for (let t4 = 0; t4 < e3 && t4 < l3.length; t4++) {
|
|
28
|
+
const e4 = l3[t4];
|
|
29
|
+
s2.push({ label: `${e4.label ?? e4.value}`, item: e4.value, selectable: true });
|
|
30
|
+
}
|
|
31
|
+
return t3 > 0 && s2.push({ label: `+${t3}`, item: "rest", selectable: false }), s2;
|
|
32
|
+
}
|
|
33
|
+
return j(l3, (e4) => ({ label: `${e4.label ?? e4.value}`, item: e4.value, selectable: true }));
|
|
34
|
+
}), g2 = a(() => c2.isFocused || c2.isHovering ? "minimal" : "bold");
|
|
35
|
+
return (e3, t3) => (i(), o("ul", de, [(i(true), o(v, null, m(d2.value, (e4) => (i(), o("li", { key: `${e4.item}`, class: "mc-select-selected-tag" }, [f(n(Z), { size: "x-small", type: "selectable", deletable: e4.selectable, emphasis: g2.value, disabled: n(r2), onDelete: (t4) => {
|
|
36
|
+
return s2 = e4.item, void (l2.value && u2(s2));
|
|
37
|
+
var s2;
|
|
38
|
+
} }, { default: h(() => [y(p(e4.label), 1)]), _: 2 }, 1032, ["deletable", "emphasis", "disabled", "onDelete"])]))), 128))]));
|
|
39
|
+
} }), [["__scopeId", "data-v-0389b767"]]), ve = ["value", "placeholder", "disabled", "readonly", "onKeydown"], me = { class: "mc-select-placeholder" }, fe = { class: "mc-select-trigger-toolbar" }, he = e(t({ name: "mc-select-trigger", __name: "index", props: { search: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please select" }, searchValue: { default: void 0 }, isExpanded: { type: Boolean, default: false }, maxTags: { default: void 0 }, hideValidationIcon: { type: Boolean } }, emits: ["update:searchValue", "update:isExpanded", "press:arrow", "search", "focus", "blur", "clear"], setup(e2, { emit: l2 }) {
|
|
40
|
+
const t2 = e2, d2 = l2, v2 = g(), { wrapperRef: m2, isFocused: y2, handleFocus: $2, handleBlur: B2 } = Y(v2), { isHovering: I2 } = q(m2), { selectedOptions: P2, isMulti: D2, isDisabled: R2, validateStatus: S2, isInputGroup: E2 } = s(re), A2 = a(() => F(P2.value) ? P2.value.length > 0 : !!P2.value), L2 = (e3) => {
|
|
41
|
+
const { value: l3 } = e3.target;
|
|
42
|
+
d2("update:searchValue", l3), d2("search");
|
|
43
|
+
}, M2 = () => {
|
|
44
|
+
R2.value || d2("update:isExpanded", !t2.isExpanded);
|
|
45
|
+
}, { showClearIcon: j2, mouseOverIcon: H2 } = (() => {
|
|
46
|
+
const e3 = g(false), l3 = X("clearable"), t3 = X("isDisabled");
|
|
47
|
+
return { showClearIcon: a(() => !!l3.value && e3.value && !t3.value), mouseOverIcon: (l4) => {
|
|
48
|
+
e3.value = l4;
|
|
49
|
+
} };
|
|
50
|
+
})(), T2 = a(() => A2.value && j2.value), G2 = () => {
|
|
51
|
+
d2("clear");
|
|
52
|
+
}, C2 = a(() => R2.value ? "not-allowed" : t2.search ? "text" : "pointer"), U2 = () => {
|
|
53
|
+
R2.value || d2("update:isExpanded", !t2.isExpanded);
|
|
54
|
+
}, z2 = (e3) => {
|
|
55
|
+
R2.value || d2("press:arrow", e3);
|
|
56
|
+
};
|
|
57
|
+
return (l3, t3) => (i(), o("div", { ref_key: "triggerRef", ref: m2, class: r(["mc-select-trigger", { "is-hovering": n(I2), "is-focused": n(y2), "is-expanded": e2.isExpanded, "is-disabled": n(R2), "is-error": "error" === n(S2), "is-success": "success" === n(S2), "is-input-group": n(E2) }]), onClick: M2 }, [b("div", { class: "mc-select-trigger-selected-content", style: w({ cursor: C2.value }) }, [b("div", { class: "mc-select-trigger-input-wrapper", style: w({ width: e2.searchValue || !A2.value ? "100%" : "1em" }) }, [b("input", { value: e2.searchValue, ref_key: "inputRef", ref: v2, class: "mc-select-input", placeholder: e2.placeholder, disabled: n(R2), readonly: !e2.search || n(R2), onInput: L2, onFocus: t3[0] || (t3[0] = (...e3) => n($2) && n($2)(...e3)), onBlur: t3[1] || (t3[1] = (...e3) => n(B2) && n(B2)(...e3)), onKeydown: [O(_(U2, ["stop", "prevent"]), ["enter"]), O(_(z2, ["stop", "prevent"]), ["arrow-down"]), O(_(z2, ["stop", "prevent"]), ["arrow-up"])] }, null, 40, ve), x(b("div", me, [u(l3.$slots, "placeholder", { placeholder: e2.placeholder, isDisabled: n(R2) }, () => [b("span", null, p(e2.placeholder), 1)], true)], 512), [[k, !e2.searchValue && !A2.value]])], 4), n(D2) ? x((i(), c(pe, { key: 0, "max-tags": e2.maxTags, "is-focused": n(y2), "is-hovering": n(I2) }, null, 8, ["max-tags", "is-focused", "is-hovering"])), [[k, A2.value && !e2.searchValue]]) : x((i(), c(ce, { key: 1 }, V({ _: 2 }, [l3.$slots["selected-content"] ? { name: "default", fn: h(({ selectedOption: e3, selectedOptionLabel: t4, isDisabled: s2 }) => [u(l3.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: t4, isDisabled: s2 }, void 0, true)]), key: "0" } : void 0]), 1536)), [[k, A2.value && !e2.searchValue]])], 4), b("div", fe, [x(f(n(W), { class: "mc-select-status-icon", name: "error" === n(S2) ? "reject-fail-rev" : "accept-success-rev", size: 24 }, null, 8, ["name"]), [[k, "init" !== n(S2) && !e2.hideValidationIcon]]), b("div", { class: "mc-select-icon-wrapper", onMouseenter: t3[3] || (t3[3] = (e3) => n(H2)(true)), onMouseleave: t3[4] || (t3[4] = (e3) => n(H2)(false)) }, [x(f(n(W), { class: "mc-select-chevron-icon", name: "down-chevron", size: 24, cursor: n(R2) ? "not-allowed" : "pointer" }, null, 8, ["cursor"]), [[k, !T2.value]]), x(b("div", { onClick: t3[2] || (t3[2] = _(() => {
|
|
58
|
+
}, ["stop"])) }, [f(n(W), { class: "mc-select-clear-icon", name: "rejectfail", size: 16, cursor: "pointer", onClick: G2 })], 512), [[k, T2.value]])], 32)])], 2));
|
|
59
|
+
} }), [["__scopeId", "data-v-cec46699"]]), ye = { key: 0, class: "mc-select-list-header" }, ge = { key: 0, class: "mc-select-list-header-content" }, be = { class: "mc-select-list-content" }, we = { key: 0, class: "mc-select-list-empty" }, xe = { key: 1, class: "mc-select-list-footer" }, Oe = e(t({ name: "mc-select-list", __name: "index", props: { listRef: {}, showFooter: { type: Boolean }, showHeader: { type: Boolean } }, emits: ["update:listRef"], setup(e2, { expose: l2, emit: t2 }) {
|
|
60
|
+
const r2 = e2, d2 = t2, { filteredOptions: p2, isMulti: v2 } = s(re), m2 = a(() => !L(p2.value)), h2 = g(), { width: y2, left: w2, top: O2 } = le(h2), { isInside: _2 } = ((e3) => {
|
|
61
|
+
const l3 = g(false), { stop: t3 } = ee(e3, ([{ isIntersecting: e4 }]) => {
|
|
62
|
+
l3.value = e4;
|
|
63
|
+
}, { threshold: 0 });
|
|
64
|
+
return B(() => t3()), { isInside: l3 };
|
|
65
|
+
})(h2), V2 = (e3, l3, t3) => {
|
|
66
|
+
var _a, _b, _c;
|
|
67
|
+
(_a = r2.listRef) == null ? void 0 : _a.style.setProperty("--mc-select-list-width", e3 + "px"), (_b = r2.listRef) == null ? void 0 : _b.style.setProperty("--mc-select-list-top", l3 + window.pageYOffset + "px"), (_c = r2.listRef) == null ? void 0 : _c.style.setProperty("--mc-select-list-left", t3 + window.pageXOffset + "px");
|
|
68
|
+
};
|
|
69
|
+
$(() => {
|
|
70
|
+
V2(y2.value, O2.value, w2.value);
|
|
71
|
+
});
|
|
72
|
+
const { isSelectAll: D2, isSelectPartial: R2, selectAll: S2 } = (() => {
|
|
73
|
+
const { isMulti: e3, selectedOptions: l3, selectOptions: t3, selectAll: a2 } = s(re), o2 = g(false), i2 = g(false);
|
|
74
|
+
return $(() => {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
if (!e3.value) return;
|
|
77
|
+
const s2 = l3.value;
|
|
78
|
+
(s2 == null ? void 0 : s2.length) && ((_a = t3.value) == null ? void 0 : _a.length) && (s2 == null ? void 0 : s2.length) === ((_b = t3.value) == null ? void 0 : _b.length) ? (o2.value = true, i2.value = false) : (s2 == null ? void 0 : s2.length) > 0 ? (o2.value = false, i2.value = true) : (o2.value = false, i2.value = false);
|
|
79
|
+
}), { isSelectAll: o2, isSelectPartial: i2, selectAll: a2 };
|
|
80
|
+
})();
|
|
81
|
+
return l2({ resetListPosition: () => {
|
|
82
|
+
if (h2.value) {
|
|
83
|
+
const { width: e3, top: l3, left: t3 } = h2.value.getBoundingClientRect();
|
|
84
|
+
V2(e3, l3, t3);
|
|
85
|
+
}
|
|
86
|
+
} }), (l3, t3) => (i(), o("div", { ref_key: "wrapperRef", ref: h2, class: "mc-select-list-wrapper" }, [(i(), c(I, { to: "body" }, [x(b("ul", { class: "mc-select-list", ref: (e3) => ((e4) => {
|
|
87
|
+
d2("update:listRef", e4);
|
|
88
|
+
})(e3) }, [e2.showHeader ? (i(), o("li", ye, [u(l3.$slots, "header", { isEmpty: !m2.value }, () => [n(v2) ? (i(), o("div", ge, [f(n(te), { "model-value": n(D2), partial: n(R2), content: "Select All", "disable-validation": "", "onUpdate:modelValue": n(S2) }, null, 8, ["model-value", "partial", "onUpdate:modelValue"])])) : P("", true)], true)])) : P("", true), b("ul", be, [u(l3.$slots, "default", {}, void 0, true), m2.value ? P("", true) : (i(), o("li", we, [u(l3.$slots, "empty", {}, () => [t3[0] || (t3[0] = b("p", { class: "mc-select-list-empty-text" }, "No results found", -1))], true)]))]), e2.showFooter ? (i(), o("li", xe, [u(l3.$slots, "footer", { isEmpty: !m2.value }, void 0, true)])) : P("", true)], 512), [[k, n(_2)]])]))], 512));
|
|
89
|
+
} }), [["__scopeId", "data-v-0cd40bc1"]]), _e = ["id"], ke = l(e(t({ name: ne, __name: "mc-select-plus", props: { width: { default: 320 }, height: { default: 40 }, placeholder: { default: "Please select" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, multiple: { type: Boolean, default: false }, maxTags: {}, search: { type: Boolean, default: false }, options: {}, showHeader: { type: Boolean, default: false }, showFooter: { type: Boolean, default: false }, modelValue: { type: [String, Number, Boolean, Array] }, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, validateProp: {} }, emits: ["update:modelValue", "change", "focus", "blur", "expand"], setup(e2, { emit: l2 }) {
|
|
90
|
+
const t2 = e2, s2 = l2, r2 = g(false);
|
|
91
|
+
R(r2, (e3) => {
|
|
92
|
+
s2("expand", e3);
|
|
93
|
+
});
|
|
94
|
+
const { selectOptions: d2 } = (() => {
|
|
95
|
+
let e3 = [];
|
|
96
|
+
const l3 = g([]), t3 = D().proxy;
|
|
97
|
+
return $(() => {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
const s3 = (_b = (_a = t3.$slots).default) == null ? void 0 : _b.call(_a);
|
|
100
|
+
if (s3.length) {
|
|
101
|
+
const e4 = ((e5) => {
|
|
102
|
+
const l4 = [], t4 = (e6, s4) => {
|
|
103
|
+
F(e6) && e6.forEach((e7) => {
|
|
104
|
+
var _a2, _b2, _c, _d, _e2, _f, _g, _h;
|
|
105
|
+
const a2 = (_a2 = (e7 == null ? void 0 : e7.type) || {}) == null ? void 0 : _a2.name;
|
|
106
|
+
if (a2 === se) {
|
|
107
|
+
const l5 = H(e7.children) || F(e7.children) || !T((_b2 = e7.children) == null ? void 0 : _b2.default) ? e7.children : (_c = e7.children) == null ? void 0 : _c.default();
|
|
108
|
+
t4(l5, (_d = e7.props) == null ? void 0 : _d.label);
|
|
109
|
+
} else a2 === ae ? l4.push({ label: (_e2 = e7.props) == null ? void 0 : _e2.label, value: (_f = e7.props) == null ? void 0 : _f.value, disabled: (_g = e7.props) == null ? void 0 : _g.disabled, group: s4, context: (_h = e7.children) == null ? void 0 : _h.default }) : Array.isArray(e7.children) && t4(e7.children, s4);
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
return t4(e5), l4;
|
|
113
|
+
})(s3);
|
|
114
|
+
l3.value.push(...e4);
|
|
115
|
+
}
|
|
116
|
+
((e4, l4) => {
|
|
117
|
+
if (e4.length !== l4.length) return false;
|
|
118
|
+
for (const [t4] of e4.entries()) if (e4[t4] != l4[t4]) return false;
|
|
119
|
+
return true;
|
|
120
|
+
})(l3.value, e3) || (e3 = l3.value);
|
|
121
|
+
}), { selectOptions: l3 };
|
|
122
|
+
})(), { selectedOptions: p2 } = ((e3) => {
|
|
123
|
+
const l3 = X("modelValue"), t3 = X("multiple");
|
|
124
|
+
return { selectedOptions: a(() => {
|
|
125
|
+
if (!l3.value) return [];
|
|
126
|
+
if (t3.value && F(l3.value)) return e3.value.filter((e4) => G(l3.value, e4.value));
|
|
127
|
+
{
|
|
128
|
+
const t4 = e3.value.find((e4) => e4.value === l3.value);
|
|
129
|
+
return t4 ? [t4] : [];
|
|
130
|
+
}
|
|
131
|
+
}) };
|
|
132
|
+
})(d2), v2 = g(), { searchValue: m2, isSearch: y2, filteredOptions: b2, filteredGroups: x2, clearSearchValue: O2 } = ((e3) => {
|
|
133
|
+
const l3 = g(""), t3 = X("search"), s3 = a(() => !!t3.value), o2 = a(() => (e3 == null ? void 0 : e3.value.length) ? j(C(e3.value, (e4) => G(U(e4.label), U(l3.value))), (e4) => ({ value: e4.value, group: e4.group })) : []), i2 = a(() => o2.value.length ? j(z(o2.value, "group"), (e4) => e4.group) : []);
|
|
134
|
+
return { searchValue: l3, isSearch: s3, filteredOptions: o2, filteredGroups: i2, clearSearchValue: () => {
|
|
135
|
+
l3.value = "";
|
|
136
|
+
} };
|
|
137
|
+
})(d2), _2 = async () => {
|
|
138
|
+
var _a;
|
|
139
|
+
t2.search && (r2.value || (r2.value = true), await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition());
|
|
140
|
+
}, { selectRef: k2, teleportListRef: B2 } = (() => {
|
|
141
|
+
const e3 = X("multiple"), l3 = g(), t3 = g();
|
|
142
|
+
return J(document, "click", (s3) => {
|
|
143
|
+
var _a, _b, _c;
|
|
144
|
+
const a2 = s3.target;
|
|
145
|
+
if (e3.value) {
|
|
146
|
+
if (((_a = l3 == null ? void 0 : l3.value) == null ? void 0 : _a.contains(a2)) || ((_b = t3 == null ? void 0 : t3.value) == null ? void 0 : _b.contains(a2))) return;
|
|
147
|
+
} else if ((_c = l3 == null ? void 0 : l3.value) == null ? void 0 : _c.contains(a2)) return;
|
|
148
|
+
O2(), r2.value = false;
|
|
149
|
+
}), { selectRef: l3, teleportListRef: t3 };
|
|
150
|
+
})(), I2 = async () => {
|
|
151
|
+
var _a;
|
|
152
|
+
r2.value = false, O2(), de2(t2.multiple ? [] : void 0), await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition();
|
|
153
|
+
}, { hoverOption: M2, setHoverOption: Y2, handlePressArrow: q2 } = ((e3) => {
|
|
154
|
+
const l3 = g(), t3 = () => {
|
|
155
|
+
l3.value = void 0;
|
|
156
|
+
};
|
|
157
|
+
return { hoverOption: l3, setHoverOption: (e4) => {
|
|
158
|
+
l3.value = e4;
|
|
159
|
+
}, handlePressArrow: (s3) => {
|
|
160
|
+
var _a, _b, _c, _d, _e2;
|
|
161
|
+
if (!(e3 == null ? void 0 : e3.value.length)) return void t3();
|
|
162
|
+
if (!l3.value) return void (l3.value = (_a = e3.value[0]) == null ? void 0 : _a.value);
|
|
163
|
+
const a2 = K(e3 == null ? void 0 : e3.value, (e4) => e4.value === l3.value);
|
|
164
|
+
"ArrowDown" === s3.key ? l3.value = ((_b = e3.value[a2 + 1]) == null ? void 0 : _b.value) || ((_c = e3.value[0]) == null ? void 0 : _c.value) : "ArrowUp" === s3.key && (l3.value = ((_d = e3.value[a2 - 1]) == null ? void 0 : _d.value) || ((_e2 = e3.value[e3.value.length - 1]) == null ? void 0 : _e2.value));
|
|
165
|
+
}, clearHoverOption: t3 };
|
|
166
|
+
})(b2), { width: W2, height: Z2 } = Q(), { formId: ee2, formDisabled: le2, validateStatus: te2, validateByTrigger: ne2 } = oe();
|
|
167
|
+
R(le2, async (e3) => {
|
|
168
|
+
var _a;
|
|
169
|
+
e3 && (r2.value = false, O2(), await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition());
|
|
170
|
+
});
|
|
171
|
+
const ue2 = () => {
|
|
172
|
+
s2("focus");
|
|
173
|
+
}, ce2 = () => {
|
|
174
|
+
ne2("blur"), s2("blur");
|
|
175
|
+
}, de2 = async (e3) => {
|
|
176
|
+
s2("update:modelValue", e3), s2("change", e3);
|
|
177
|
+
}, pe2 = ie({ validateStatus: te2, isExpanded: r2, isFocused: a(() => false), isHovering: a(() => false) });
|
|
178
|
+
return E(re, { isMulti: a(() => t2.multiple), isDisabled: a(() => le2.value || !!(pe2 == null ? void 0 : pe2.inputGroupDisabled.value)), isInputGroup: a(() => !!(pe2 == null ? void 0 : pe2.isInputGroup.value)), validateStatus: te2, selectOptions: d2, selectedOptions: p2, filteredOptions: b2, filteredGroups: x2, hoverOption: M2, deleteTag: async (e3) => {
|
|
179
|
+
var _a;
|
|
180
|
+
if (!t2.multiple) return;
|
|
181
|
+
const l3 = j(p2.value, (e4) => e4.value), s3 = N(l3, [e3]);
|
|
182
|
+
de2(s3), await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition();
|
|
183
|
+
}, select: async (e3) => {
|
|
184
|
+
var _a;
|
|
185
|
+
if (O2(), t2.multiple) {
|
|
186
|
+
const l3 = t2.modelValue;
|
|
187
|
+
if (F(l3) && !L(l3)) if (G(l3, e3)) {
|
|
188
|
+
const t3 = N([...l3], [e3]);
|
|
189
|
+
de2(t3);
|
|
190
|
+
} else de2([...l3, e3]);
|
|
191
|
+
else de2([e3]);
|
|
192
|
+
await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition();
|
|
193
|
+
} else de2(e3);
|
|
194
|
+
}, selectAll: async (e3) => {
|
|
195
|
+
var _a;
|
|
196
|
+
if (!t2.multiple) return;
|
|
197
|
+
O2();
|
|
198
|
+
const l3 = e3 ? d2.value.map((e4) => e4.value) : [];
|
|
199
|
+
de2(l3), await S(), (_a = v2.value) == null ? void 0 : _a.resetListPosition();
|
|
200
|
+
}, hover: Y2 }), (l3, t3) => (i(), o("div", { ref_key: "selectRef", ref: k2, id: n(ee2), class: "mc-select", style: w({ width: n(W2), height: n(Z2) }) }, [f(he, { "search-value": n(m2), "onUpdate:searchValue": t3[0] || (t3[0] = (e3) => A(m2) ? m2.value = e3 : null), "is-expanded": r2.value, "onUpdate:isExpanded": t3[1] || (t3[1] = (e3) => r2.value = e3), search: n(y2), clearable: e2.clearable, placeholder: e2.placeholder, "max-tags": e2.maxTags, "hide-validation-icon": e2.hideValidationIcon, onSearch: _2, onClear: I2, "onPress:arrow": n(q2), onFocus: ue2, onBlur: ce2 }, V({ _: 2 }, [l3.$slots.placeholder ? { name: "placeholder", fn: h(({ placeholder: e3, isDisabled: t4 }) => [u(l3.$slots, "placeholder", { placeholder: e3, isDisabled: t4 }, void 0, true)]), key: "0" } : void 0, l3.$slots["selected-content"] ? { name: "selected-content", fn: h(({ selectedOption: e3, selectedOptionLabel: t4, isDisabled: s3 }) => [u(l3.$slots, "selected-content", { selectedOption: e3, selectedOptionLabel: t4, isDisabled: s3 }, void 0, true)]), key: "1" } : void 0]), 1032, ["search-value", "is-expanded", "search", "clearable", "placeholder", "max-tags", "hide-validation-icon", "onPress:arrow"]), r2.value ? (i(), c(Oe, { key: 0, "list-ref": n(B2), "onUpdate:listRef": t3[2] || (t3[2] = (e3) => A(B2) ? B2.value = e3 : null), ref_key: "listRef", ref: v2, "show-header": e2.showHeader, "show-footer": e2.showFooter }, V({ default: h(() => [u(l3.$slots, "default", {}, void 0, true)]), _: 2 }, [l3.$slots["option-header"] ? { name: "header", fn: h(({ isEmpty: e3 }) => [u(l3.$slots, "option-header", { isEmpty: e3 }, void 0, true)]), key: "0" } : void 0, l3.$slots["option-footer"] ? { name: "footer", fn: h(({ isEmpty: e3 }) => [u(l3.$slots, "option-footer", { isEmpty: e3 }, void 0, true)]), key: "1" } : void 0, l3.$slots.empty ? { name: "empty", fn: h(() => [u(l3.$slots, "empty", {}, void 0, true)]), key: "2" } : void 0]), 1032, ["list-ref", "show-header", "show-footer"])) : P("", true)], 12, _e));
|
|
201
|
+
} }), [["__scopeId", "data-v-8fc71bb7"]]));
|
|
202
|
+
export {
|
|
203
|
+
ke as M,
|
|
204
|
+
re as a,
|
|
205
|
+
ne as b
|
|
206
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { _ as e, u as l } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { computed as o, defineComponent as a, ref as t, createElementBlock as d, openBlock as n, normalizeClass as i, unref as s, createElementVNode as r, renderSlot as p, createCommentVNode as u, createVNode as c, toDisplayString as m, useSlots as f, reactive as g, watch as h, normalizeStyle as y, createBlock as v, withCtx as _, createSlots as w } from "vue";
|
|
3
|
+
import { useProp as z, useDragover as $, useWidthHeight as x } from "@mc-plus/hooks";
|
|
4
|
+
import { M as b } from "./mc-icon-CnpccbFi.js";
|
|
5
|
+
import { M as S } from "./mc-success-icon-BgQB9Rmp.js";
|
|
6
|
+
import { map as C, includes as k } from "lodash-es";
|
|
7
|
+
import { M } from "./mc-file-list-DEx-jX1K.js";
|
|
8
|
+
import { t as U } from "./mc-toast-BNRX1zn4.js";
|
|
9
|
+
const D = (e2) => parseFloat(e2).toString(), B = (e2, l2 = 2) => e2 < 1024 ? `${e2} B` : e2 < 1048576 ? `${D((e2 / 1024).toFixed(l2))} KB` : e2 < 1073741824 ? `${D((e2 / 1048576).toFixed(l2))} MB` : `${D((e2 / 1073741824).toFixed(l2))} GB`, F = (e2) => {
|
|
10
|
+
if (!e2) return "--";
|
|
11
|
+
const l2 = new Date(e2);
|
|
12
|
+
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")}`;
|
|
13
|
+
}, T = (e2, l2, o2) => {
|
|
14
|
+
const a2 = e2.get(l2);
|
|
15
|
+
e2.set(l2, { ...a2, ...o2 });
|
|
16
|
+
}, V = "mc-upload", j = "mc-upload-dropzone", A = "[?]", E = ["jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "pdf"], I = { upload_note: "Click to upload or drag and drop your 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 ${A} .`, limit_size: `The file size cannot exceed ${A} .`, limit_type: `${A} only`, limit_count_reached: `You can only upload ${A} files.` }, R = { upload_note: "单击即可上传或将文件拖放到此处", max_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_on: "上传时间", limit_count: `文件数量不能超过 ${A} 。`, limit_size: `最大文件大小:${A} 。`, limit_type: `只接受文件格式:${A}`, limit_count_reached: `您只能上传 ${A} 个文件。` }, N = () => {
|
|
17
|
+
const e2 = z("lang");
|
|
18
|
+
return { langMap: o(() => "zh" === e2.value ? R : I) };
|
|
19
|
+
}, Y = { class: "mc-upload-dropzone-area" }, G = { class: "mc-upload-dropzone-title" }, H = { class: "mc-upload-dropzone-title-text" }, K = { key: 0, class: "mc-upload-dropzone-desc" }, P = { key: 0 }, W = { key: 1 }, q = e(a({ name: j, __name: "mc-upload-dropzone", props: { title: {}, icon: { default: "Document_Upload" }, allowedFileTypes: { default: () => E }, fileSize: { default: 15728640 }, uploadUser: { default: "--" }, lang: { default: "en" }, hideDesc: { type: Boolean, default: false }, fileCount: {} }, emits: ["upload", "error:type", "error:size"], setup(e2, { expose: l2, emit: a2 }) {
|
|
20
|
+
const f2 = e2, g2 = a2, { langMap: h2 } = N(), y2 = t(), v2 = o(() => {
|
|
21
|
+
var _a;
|
|
22
|
+
return ((_a = f2.allowedFileTypes) == null ? void 0 : _a.length) ? h2.value.limit_type.replace(A, C(f2.allowedFileTypes, (e3) => e3.toUpperCase()).join(", ")) : void 0;
|
|
23
|
+
}), { isDragover: _2 } = $(y2, { onDrop: (e3) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const l3 = (_a = e3.dataTransfer) == null ? void 0 : _a.files;
|
|
26
|
+
l3 && M2(l3);
|
|
27
|
+
} }), w2 = t(), z2 = () => {
|
|
28
|
+
w2.value && (w2.value.value = "");
|
|
29
|
+
}, x2 = () => {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = w2.value) == null ? void 0 : _a.click();
|
|
32
|
+
}, S2 = (e3) => {
|
|
33
|
+
const l3 = e3.target.files;
|
|
34
|
+
l3 && M2(l3);
|
|
35
|
+
}, M2 = async (e3) => {
|
|
36
|
+
let l3 = Array.from(e3);
|
|
37
|
+
const o2 = /* @__PURE__ */ new Map();
|
|
38
|
+
l3.forEach((e4) => {
|
|
39
|
+
T(o2, e4.name, { name: e4.name, size: e4.size, status: "loading", uploadBy: f2.uploadUser, uploadTime: Date.now(), file: e4 });
|
|
40
|
+
}), ((e4, l4) => {
|
|
41
|
+
const o3 = f2.fileSize;
|
|
42
|
+
if (o3 <= 0) return true;
|
|
43
|
+
let a3 = false;
|
|
44
|
+
for (let t2 = 0; t2 < e4.length; t2++) {
|
|
45
|
+
const d2 = e4[t2];
|
|
46
|
+
d2.size > o3 ? (T(l4, d2.name, { status: "failed", errorMessage: h2.value.limit_size.replace(A, `${B(o3)}`) }), g2("error:size", d2.name)) : a3 = true;
|
|
47
|
+
}
|
|
48
|
+
})(l3, o2), ((e4, l4) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const o3 = f2.allowedFileTypes;
|
|
51
|
+
if (!(o3 == null ? void 0 : o3.length)) return true;
|
|
52
|
+
let a3 = false;
|
|
53
|
+
const t2 = C(o3, (e5) => e5.toUpperCase());
|
|
54
|
+
for (let o4 = 0; o4 < e4.length; o4++) {
|
|
55
|
+
const d2 = ((_a = e4[o4].name.split(".").pop()) == null ? void 0 : _a.toUpperCase()) ?? "--";
|
|
56
|
+
k(t2, d2) ? a3 = true : (T(l4, e4[o4].name, { status: "failed", errorMessage: v2.value }), g2("error:type", e4[o4].name));
|
|
57
|
+
}
|
|
58
|
+
})(l3, o2), g2("upload", o2), z2();
|
|
59
|
+
};
|
|
60
|
+
return l2({ clearUploadInput: z2 }), (l3, o2) => (n(), d("div", { ref: "wrapperRef", class: i(["mc-upload-dropzone", { "mc-upload-dropzone-dragover": s(_2) }]), onClick: x2 }, [r("div", Y, [p(l3.$slots, "default", {}, () => [r("div", G, [p(l3.$slots, "title", {}, () => [c(s(b), { name: e2.icon }, null, 8, ["name"]), r("span", H, m(e2.title || s(h2).upload_note), 1)], true)]), e2.hideDesc ? u("", true) : (n(), d("div", K, [p(l3.$slots, "desc", {}, () => [e2.fileSize > 0 ? (n(), d("span", P, m(s(h2).max_size) + " " + m(s(B)(e2.fileSize)), 1)) : u("", true), v2.value ? (n(), d("span", W, m(v2.value), 1)) : u("", true)], true)]))], true)]), r("input", { ref_key: "uploadInputRef", ref: w2, type: "file", multiple: "", style: { display: "none" }, onChange: S2 }, null, 544), r("div", { class: "mc-upload-dropzone-cover", ref_key: "coverRef", ref: y2 }, null, 512)], 2));
|
|
61
|
+
} }), [["__scopeId", "data-v-f170b1e0"]]), J = { key: 0, class: "mc-upload-content" }, L = { class: "mc-upload-content-icon" }, O = { class: "mc-upload-content-text" }, Q = { class: "mc-upload-component" }, X = { key: 0, class: "mc-upload-dropzone-wrapper" }, Z = { class: "mc-upload-file-list-wrapper" }, ee = l(e(a({ name: V, __name: "mc-upload", props: { modelValue: { default: () => [] }, downloadable: { type: Boolean, default: false }, allowCancel: { type: Boolean, default: false }, deletable: { type: Boolean, default: true }, disabled: { type: Boolean, default: false }, theme: { default: "light" }, width: { default: "100%" }, succeed: { type: Boolean, default: false }, title: {}, icon: { default: "Document_Upload" }, allowedFileTypes: { default: () => E }, fileSize: { default: 15728640 }, uploadUser: { default: "--" }, lang: { default: "en" }, hideDesc: { type: Boolean, default: false }, fileCount: {} }, emits: ["update:modelValue", "download:all", "clear", "error:type", "error:size", "upload", "change", "delete", "download", "preview", "cancel"], setup(e2, { expose: l2, emit: a2 }) {
|
|
62
|
+
const m2 = e2, z2 = a2, { width: $2 } = x(), C2 = f(), k2 = o(() => !!C2.content), D2 = t(), B2 = g(/* @__PURE__ */ new Map()), { langMap: F2 } = N(), T2 = (e3) => 0 !== (e3 = ((e4) => {
|
|
63
|
+
if (m2.fileCount && e4.length > m2.fileCount) {
|
|
64
|
+
const l3 = F2.value.limit_count_reached.replace(A, m2.fileCount.toString());
|
|
65
|
+
return U.error(l3), e4.slice(0, m2.fileCount);
|
|
66
|
+
}
|
|
67
|
+
return e4;
|
|
68
|
+
})(e3)).length && (B2.clear(), e3.forEach((e4) => {
|
|
69
|
+
B2.set(e4.name, e4);
|
|
70
|
+
}), true);
|
|
71
|
+
h(() => m2.modelValue, (e3) => {
|
|
72
|
+
T2(e3);
|
|
73
|
+
}, { immediate: true });
|
|
74
|
+
const V2 = (e3) => Array.from([...e3.values()]), j2 = (e3) => {
|
|
75
|
+
z2("update:modelValue", e3);
|
|
76
|
+
}, E2 = (e3) => {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = D2.value) == null ? void 0 : _a.clearUploadInput();
|
|
79
|
+
const l3 = V2(e3);
|
|
80
|
+
if (!T2([...m2.modelValue, ...l3])) return;
|
|
81
|
+
const o2 = V2(B2);
|
|
82
|
+
z2("update:modelValue", o2), z2("upload", o2), z2("change", o2), P2();
|
|
83
|
+
}, I2 = (e3) => {
|
|
84
|
+
console.error("mc-upload: error:type:", e3), z2("error:type", e3);
|
|
85
|
+
}, R2 = (e3) => {
|
|
86
|
+
console.error("mc-upload: error:size:", e3), z2("error:size", e3);
|
|
87
|
+
}, Y2 = (e3) => {
|
|
88
|
+
z2("preview", e3);
|
|
89
|
+
}, G2 = (e3) => {
|
|
90
|
+
z2("delete", e3);
|
|
91
|
+
}, H2 = (e3) => {
|
|
92
|
+
z2("download", e3);
|
|
93
|
+
}, K2 = (e3) => {
|
|
94
|
+
z2("cancel", e3);
|
|
95
|
+
}, P2 = (e3 = 99, l3 = 100) => {
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
m2.modelValue.forEach((l4) => {
|
|
98
|
+
"loading" === l4.status && (l4.progress = e3);
|
|
99
|
+
});
|
|
100
|
+
}, l3);
|
|
101
|
+
}, W2 = o(() => m2.deletable && !m2.disabled);
|
|
102
|
+
return l2({ clearFiles: () => {
|
|
103
|
+
B2.clear(), z2("clear"), z2("update:modelValue", []), z2("change", []);
|
|
104
|
+
}, downloadAllFiles: () => {
|
|
105
|
+
z2("download:all", V2(B2));
|
|
106
|
+
} }), (l3, o2) => (n(), d("div", { class: "mc-upload", style: y({ width: s($2) }) }, [r("div", { class: i([{ "mc-upload-wrapper": k2.value }, `mc-upload-wrapper-${e2.theme}`]) }, [k2.value ? (n(), d("div", J, [r("div", L, [e2.succeed ? (n(), v(s(S), { key: 1, width: "24px", height: "24px" })) : (n(), v(s(b), { key: 0, name: "Accept" }))]), r("div", O, [p(l3.$slots, "content", {}, void 0, true)])])) : u("", true), r("div", Q, [e2.disabled ? u("", true) : (n(), d("div", X, [c(q, { ref_key: "uploadDropzoneRef", ref: D2, "upload-user": e2.uploadUser, "allowed-file-types": e2.allowedFileTypes, "file-size": e2.fileSize, icon: e2.icon, lang: e2.lang, theme: e2.theme, "hide-desc": e2.hideDesc, "file-count": e2.fileCount, onUpload: E2, "onError:type": I2, "onError:size": R2 }, { default: _(() => [p(l3.$slots, "default", {}, void 0, true)]), title: _(() => [p(l3.$slots, "title", {}, void 0, true)]), desc: _(() => [p(l3.$slots, "desc", {}, void 0, true)]), _: 3 }, 8, ["upload-user", "allowed-file-types", "file-size", "icon", "lang", "theme", "hide-desc", "file-count"])])), r("div", Z, [c(s(M), { "model-value": e2.modelValue, "allow-cancel": e2.allowCancel, downloadable: e2.downloadable, lang: e2.lang, theme: e2.theme, deletable: W2.value, "onUpdate:modelValue": j2, onPreview: Y2, onDelete: G2, onDownload: H2, onCancel: K2 }, w({ _: 2 }, [l3.$slots["file-extra"] ? { name: "extra", fn: _(({ file: e3 }) => [p(l3.$slots, "file-extra", { file: e3 }, void 0, true)]), key: "0" } : void 0]), 1032, ["model-value", "allow-cancel", "downloadable", "lang", "theme", "deletable"])])])], 2)], 4));
|
|
107
|
+
} }), [["__scopeId", "data-v-576c920e"]]));
|
|
108
|
+
export {
|
|
109
|
+
E as A,
|
|
110
|
+
ee as M,
|
|
111
|
+
A as W,
|
|
112
|
+
V as a,
|
|
113
|
+
j as b,
|
|
114
|
+
F as f,
|
|
115
|
+
B as g,
|
|
116
|
+
N as u
|
|
117
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-alert-message[data-v-ddf6ec41]{width:100%;border-radius:4px;padding:16px 0;min-height:40px;box-sizing:border-box}.mc-alert-message .mc-alert-message-header[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:0 16px;box-sizing:border-box}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:flex-start;align-items:start;gap:8px;box-sizing:border-box}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container .mc-alert-message-icon[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;width:24px}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container .mc-alert-message-title[data-v-ddf6ec41]{font-size:16px;font-weight:400;color:var(--mc-gray-800)}.mc-alert-message .mc-alert-message-body[data-v-ddf6ec41]{width:100%}.mc-alert-message .mc-alert-message-body .mc-alert-message-content[data-v-ddf6ec41]{width:100%;padding:8px 16px 0;box-sizing:border-box}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-active[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-active[data-v-ddf6ec41]{transition:opacity .3s ease-in-out,transform .3s ease-in-out;transform-origin:top}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-from[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-to[data-v-ddf6ec41]{opacity:0;transform:scaleY(0)}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-to[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-from[data-v-ddf6ec41]{opacity:1;transform:scaleY(1)}.mc-alert-message .mc-alert-message-icon-group[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;box-sizing:border-box}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-icon-wrapper[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;align-self:stretch}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon[data-v-ddf6ec41]{cursor:pointer;color:var(--mc-gray-800)}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-close[data-v-ddf6ec41]{transition:transform .3s ease-in-out}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-close[data-v-ddf6ec41]:hover{transform:rotate(180deg)}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-expand[data-v-ddf6ec41]{transition:transform .3s ease-in-out;transform-origin:center}.mc-alert-message.mc-alert-message-info[data-v-ddf6ec41]{background-color:var(--mc-info-background)}.mc-alert-message.mc-alert-message-info .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-info)}.mc-alert-message.mc-alert-message-success[data-v-ddf6ec41]{background-color:var(--mc-success-background)}.mc-alert-message.mc-alert-message-success .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-success)}.mc-alert-message.mc-alert-message-warning[data-v-ddf6ec41]{background-color:var(--mc-warning-background)}.mc-alert-message.mc-alert-message-warning .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-warning)}.mc-alert-message.mc-alert-message-error[data-v-ddf6ec41]{background-color:var(--mc-error-background)}.mc-alert-message.mc-alert-message-error .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-error)}
|
|
1
|
+
.mc-alert-message[data-v-ddf6ec41]{width:100%;border-radius:4px;padding:16px 0;min-height:40px;box-sizing:border-box}.mc-alert-message .mc-alert-message-header[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:8px;flex-wrap:nowrap;width:100%;padding:0 16px;box-sizing:border-box}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:flex-start;align-items:start;gap:8px;flex-wrap:nowrap;box-sizing:border-box}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container .mc-alert-message-icon[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;flex-wrap:nowrap;width:24px}.mc-alert-message .mc-alert-message-header .mc-alert-message-title-container .mc-alert-message-title[data-v-ddf6ec41]{font-size:16px;font-weight:400;color:var(--mc-gray-800)}.mc-alert-message .mc-alert-message-body[data-v-ddf6ec41]{width:100%}.mc-alert-message .mc-alert-message-body .mc-alert-message-content[data-v-ddf6ec41]{width:100%;padding:8px 16px 0;box-sizing:border-box}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-active[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-active[data-v-ddf6ec41]{transition:opacity .3s ease-in-out,transform .3s ease-in-out;transform-origin:top}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-from[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-to[data-v-ddf6ec41]{opacity:0;transform:scaleY(0)}.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-enter-to[data-v-ddf6ec41],.mc-alert-message .mc-alert-message-body .mc-alert-message-content-transition-leave-from[data-v-ddf6ec41]{opacity:1;transform:scaleY(1)}.mc-alert-message .mc-alert-message-icon-group[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:nowrap;box-sizing:border-box}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-icon-wrapper[data-v-ddf6ec41]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;flex-wrap:nowrap;align-self:stretch}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon[data-v-ddf6ec41]{cursor:pointer;color:var(--mc-gray-800)}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-close[data-v-ddf6ec41]{transition:transform .3s ease-in-out}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-close[data-v-ddf6ec41]:hover{transform:rotate(180deg)}.mc-alert-message .mc-alert-message-icon-group .mc-alert-message-tool-icon.mc-alert-message-tool-icon-expand[data-v-ddf6ec41]{transition:transform .3s ease-in-out;transform-origin:center}.mc-alert-message.mc-alert-message-info[data-v-ddf6ec41]{background-color:var(--mc-info-background)}.mc-alert-message.mc-alert-message-info .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-info)}.mc-alert-message.mc-alert-message-success[data-v-ddf6ec41]{background-color:var(--mc-success-background)}.mc-alert-message.mc-alert-message-success .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-success)}.mc-alert-message.mc-alert-message-warning[data-v-ddf6ec41]{background-color:var(--mc-warning-background)}.mc-alert-message.mc-alert-message-warning .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-warning)}.mc-alert-message.mc-alert-message-error[data-v-ddf6ec41]{background-color:var(--mc-error-background)}.mc-alert-message.mc-alert-message-error .mc-alert-message-icon[data-v-ddf6ec41]{color:var(--mc-error)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-checkbox[data-v-8711f0a8]{width:fit-content}.mc-checkbox .mc-checkbox-wrapper[data-v-8711f0a8]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;width:fit-content;position:relative;cursor:pointer}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-input[data-v-8711f0a8]{border:none;outline:none;background-color:transparent;padding:0;margin:0;position:absolute;width:0;height:0;opacity:0}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-box[data-v-8711f0a8]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;width:24px;height:24px;box-sizing:border-box;border-radius:var(--mc-radius);border:1px solid var(--mc-gray-400)}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-content[data-v-8711f0a8]{line-height:24px;font-size:16px;color:var(--mc-gray-800)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-teal-500);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8]:after{content:"";font-family:mc-iconfont!important;font-size:24px;color:var(--mc-white)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-teal-500);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]:after{content:"";font-family:mc-iconfont!important;font-size:24px;color:var(--mc-white)}.mc-checkbox .mc-checkbox-wrapper:hover:not(.mc-checkbox-disabled) .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-focused:not(.mc-checkbox-disabled) .mc-checkbox-box[data-v-8711f0a8]{border-width:2px}.mc-checkbox .mc-checkbox-wrapper:hover:not(.mc-checkbox-disabled):not(.mc-form-validate-error) .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-focused:not(.mc-checkbox-disabled):not(.mc-form-validate-error) .mc-checkbox-box[data-v-8711f0a8]{border-color:var(--mc-gray-500)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled[data-v-8711f0a8]{cursor:not-allowed}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled .mc-checkbox-content[data-v-8711f0a8]{color:var(--mc-gray-400)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-gray-300);color:var(--mc-gray-400);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-error)}.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error .mc-checkbox-box[data-v-8711f0a8]{border-color:var(--mc-error)}.mc-checkbox .mc-checkbox-remarks[data-v-8711f0a8]{padding-left:32px;box-sizing:border-box;font-size:12px;line-height:18px;color:var(--mc-gray-500)}
|
|
1
|
+
.mc-checkbox[data-v-8711f0a8]{width:fit-content}.mc-checkbox .mc-checkbox-wrapper[data-v-8711f0a8]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;flex-wrap:nowrap;width:fit-content;position:relative;cursor:pointer}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-input[data-v-8711f0a8]{border:none;outline:none;background-color:transparent;padding:0;margin:0;position:absolute;width:0;height:0;opacity:0}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-box[data-v-8711f0a8]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;flex-wrap:nowrap;width:24px;height:24px;box-sizing:border-box;border-radius:var(--mc-radius);border:1px solid var(--mc-gray-400)}.mc-checkbox .mc-checkbox-wrapper .mc-checkbox-content[data-v-8711f0a8]{line-height:24px;font-size:16px;color:var(--mc-gray-800)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-teal-500);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8]:after{content:"";font-family:mc-iconfont!important;font-size:24px;color:var(--mc-white)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-teal-500);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]:after{content:"";font-family:mc-iconfont!important;font-size:24px;color:var(--mc-white)}.mc-checkbox .mc-checkbox-wrapper:hover:not(.mc-checkbox-disabled) .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-focused:not(.mc-checkbox-disabled) .mc-checkbox-box[data-v-8711f0a8]{border-width:2px}.mc-checkbox .mc-checkbox-wrapper:hover:not(.mc-checkbox-disabled):not(.mc-form-validate-error) .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-focused:not(.mc-checkbox-disabled):not(.mc-form-validate-error) .mc-checkbox-box[data-v-8711f0a8]{border-color:var(--mc-gray-500)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled[data-v-8711f0a8]{cursor:not-allowed}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled .mc-checkbox-content[data-v-8711f0a8]{color:var(--mc-gray-400)}.mc-checkbox .mc-checkbox-wrapper.mc-checkbox-disabled .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-gray-300);color:var(--mc-gray-400);border:none}.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error.mc-checkbox-checked .mc-checkbox-box[data-v-8711f0a8],.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error.mc-checkbox-partial .mc-checkbox-box[data-v-8711f0a8]{background-color:var(--mc-error)}.mc-checkbox .mc-checkbox-wrapper.mc-form-validate-error .mc-checkbox-box[data-v-8711f0a8]{border-color:var(--mc-error)}.mc-checkbox .mc-checkbox-remarks[data-v-8711f0a8]{padding-left:32px;box-sizing:border-box;font-size:12px;line-height:18px;color:var(--mc-gray-500)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-collapse-item[data-v-4d4a75b5]{width:100%;position:relative}.mc-collapse-item .mc-collapse-item-header[data-v-4d4a75b5]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:0;width:100%;min-height:64px;padding:16px;box-sizing:border-box;border-top:1px solid var(--mc-gray-300);cursor:pointer}.mc-collapse-item .mc-collapse-item-header .triangle-icon[data-v-4d4a75b5]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;width:16px;height:16px;color:var(--mc-purple-500);transform:rotate(180deg);transform-origin:center;transition:transform .3s ease-in-out}.mc-collapse-item .mc-collapse-item-header .triangle-icon.triangle-icon-active[data-v-4d4a75b5]{transform:rotate(0)}.mc-collapse-item .mc-collapse-item-content[data-v-4d4a75b5]{padding:0 16px 24px;min-height:56px;box-sizing:border-box}.mc-collapse-item .mc-collapse-item-content-transition-enter-active[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-active[data-v-4d4a75b5]{transition:opacity .3s ease-in-out,transform .3s ease-in-out;transform-origin:top}.mc-collapse-item .mc-collapse-item-content-transition-enter-from[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-to[data-v-4d4a75b5]{opacity:0;transform:translateY(-10px)}.mc-collapse-item .mc-collapse-item-content-transition-enter-to[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-from[data-v-4d4a75b5]{opacity:1;transform:translateY(0)}
|
|
1
|
+
.mc-collapse-item[data-v-4d4a75b5]{width:100%;position:relative}.mc-collapse-item .mc-collapse-item-header[data-v-4d4a75b5]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:0;flex-wrap:nowrap;width:100%;min-height:64px;padding:16px;box-sizing:border-box;border-top:1px solid var(--mc-gray-300);cursor:pointer}.mc-collapse-item .mc-collapse-item-header .triangle-icon[data-v-4d4a75b5]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;flex-wrap:nowrap;width:16px;height:16px;color:var(--mc-purple-500);transform:rotate(180deg);transform-origin:center;transition:transform .3s ease-in-out}.mc-collapse-item .mc-collapse-item-header .triangle-icon.triangle-icon-active[data-v-4d4a75b5]{transform:rotate(0)}.mc-collapse-item .mc-collapse-item-content[data-v-4d4a75b5]{padding:0 16px 24px;min-height:56px;box-sizing:border-box}.mc-collapse-item .mc-collapse-item-content-transition-enter-active[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-active[data-v-4d4a75b5]{transition:opacity .3s ease-in-out,transform .3s ease-in-out;transform-origin:top}.mc-collapse-item .mc-collapse-item-content-transition-enter-from[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-to[data-v-4d4a75b5]{opacity:0;transform:translateY(-10px)}.mc-collapse-item .mc-collapse-item-content-transition-enter-to[data-v-4d4a75b5],.mc-collapse-item .mc-collapse-item-content-transition-leave-from[data-v-4d4a75b5]{opacity:1;transform:translateY(0)}
|