mc-plus 1.0.38 → 1.0.39
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-DQBM4MPn.js +74 -0
- package/dist/es/index.js +31 -29
- package/dist/es/{mc-checkbox-DFbu_OiJ.js → mc-checkbox-5wE4IPwp.js} +1 -1
- package/dist/es/mc-currency-icon-Bi3GlZaG.js +10 -0
- package/dist/es/{mc-drawer-BZ2EXwHI.js → mc-drawer-BAqCBDFv.js} +1 -1
- package/dist/es/{mc-form-D8Wqhwjk.js → mc-form-B385pPPT.js} +18 -18
- package/dist/es/{mc-input-saIYNHWc.js → mc-input-CgplNojs.js} +2 -2
- package/dist/es/{mc-lightbox-CikSebkm.js → mc-lightbox-CLsHAZWT.js} +3 -3
- package/dist/es/{mc-popper-M-81mTwQ.js → mc-popper-Dvh1rxVO.js} +1 -1
- package/dist/es/{mc-radio-DQQnPJHd.js → mc-radio-RIdhxPQE.js} +11 -11
- package/dist/es/{mc-select-v0mUBb6b.js → mc-select-DiqALSF2.js} +14 -16
- package/dist/es/mc-step-CLbrPQk7.js +119 -0
- package/dist/es/{mc-switch-C1dmHB40.js → mc-switch-DkJTjepY.js} +9 -9
- package/dist/es/{mc-tab-BZppF9j8.js → mc-tab-8Fvo9GmL.js} +1 -1
- package/dist/es/{mc-tooltip-qgVKnjBG.js → mc-tooltip-Ckhu6Zvc.js} +3 -3
- package/dist/es/{mc-upload-BCFOVrpH.js → mc-upload-COiLFcW-.js} +1 -1
- package/dist/es/theme/mc-currency-icon.css +1 -0
- package/dist/es/theme/mc-icon.css +1 -1
- package/dist/es/theme/mc-select.css +1 -1
- package/dist/es/theme/mc-step.css +1 -1
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/mc-currency-icon/index.d.ts +29 -0
- package/dist/types/components/mc-currency-icon/types.d.ts +11 -0
- package/dist/types/components/mc-step-v2/index.d.ts +3 -0
- package/dist/types/components/mc-step-v2/types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +5 -0
- package/dist/types/hooks/useCDNPath.d.ts +4 -0
- package/dist/types/hooks/useWidthHeight.d.ts +5 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +4 -4
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/hooks-9tiUvCeE.js +0 -65
- package/dist/es/mc-step-B3YYwL9G.js +0 -113
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { getCurrentInstance as e, computed as t, isRef as r, watch as n, onMounted as o, onBeforeUnmount as u, unref as a, ref as s, onUnmounted as i } from "vue";
|
|
2
|
+
import { i as v, t as l } from "./vendor-CF1nicIl.js";
|
|
3
|
+
function c(r2) {
|
|
4
|
+
const n2 = e();
|
|
5
|
+
if (!n2) throw new Error("useProp must be used within a component");
|
|
6
|
+
return t(() => {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
return (_b = (_a = n2 == null ? void 0 : n2.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[r2];
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function f(e2, t2, s2) {
|
|
12
|
+
r(e2) ? n(e2, (e3, r2) => {
|
|
13
|
+
r2 == null ? void 0 : r2.removeEventListener(t2, s2), e3 == null ? void 0 : e3.addEventListener(t2, s2);
|
|
14
|
+
}) : o(() => e2 == null ? void 0 : e2.addEventListener(t2, s2)), u(() => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (_a = a(e2)) == null ? void 0 : _a.removeEventListener(t2, s2);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function d(e2, t2) {
|
|
20
|
+
f(document, "click", (r2) => {
|
|
21
|
+
e2.value && r2.target && (e2.value.contains(r2.target) || t2(r2));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function p(t2, { afterFocus: r2, beforeBlur: n2, afterBlur: o2 } = {}) {
|
|
25
|
+
const u2 = e(), { emit: a2 } = u2, i2 = s(), l2 = s(false);
|
|
26
|
+
return f(i2, "click", () => {
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = t2.value) == null ? void 0 : _a.focus();
|
|
29
|
+
}), { wrapperRef: i2, isFocused: l2, handleFocus: (e2) => {
|
|
30
|
+
l2.value || (l2.value = true, a2("focus", e2), r2 == null ? void 0 : r2());
|
|
31
|
+
}, handleBlur: (e2) => {
|
|
32
|
+
var _a;
|
|
33
|
+
v(n2) && n2(e2) || e2.relatedTarget && ((_a = i2.value) == null ? void 0 : _a.contains(e2.relatedTarget)) || (l2.value = false, a2("blur", e2), o2 == null ? void 0 : o2());
|
|
34
|
+
} };
|
|
35
|
+
}
|
|
36
|
+
const m = (e2, t2) => ({ generateFileUrl: (r2) => {
|
|
37
|
+
if (e2 && t2 && r2) return `${e2}/${r2}.${t2}`;
|
|
38
|
+
} });
|
|
39
|
+
function b(e2, t2, r2 = 300) {
|
|
40
|
+
const a2 = new ResizeObserver(l((e3) => {
|
|
41
|
+
for (let r3 of e3) t2(r3.contentRect);
|
|
42
|
+
}, r2)), s2 = (e3) => {
|
|
43
|
+
a2.observe(e3);
|
|
44
|
+
}, i2 = (e3) => {
|
|
45
|
+
a2.unobserve(e3);
|
|
46
|
+
};
|
|
47
|
+
return o(() => {
|
|
48
|
+
e2.value && s2(e2.value);
|
|
49
|
+
}), u(() => {
|
|
50
|
+
e2.value && i2(e2.value);
|
|
51
|
+
}), n(e2, (e3) => {
|
|
52
|
+
e3 && s2(e3);
|
|
53
|
+
}), { resizeObserver: a2, observe: s2, unobserve: i2 };
|
|
54
|
+
}
|
|
55
|
+
function w(e2) {
|
|
56
|
+
o(() => {
|
|
57
|
+
window.addEventListener("resize", e2);
|
|
58
|
+
}), i(() => {
|
|
59
|
+
window.removeEventListener("resize", e2);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const h = () => {
|
|
63
|
+
const e2 = c("width"), r2 = c("height");
|
|
64
|
+
return { width: t(() => "number" == typeof e2.value ? `${e2.value}px` : e2.value || "auto"), height: t(() => "number" == typeof r2.value ? `${r2.value}px` : r2.value || "auto") };
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
h as a,
|
|
68
|
+
b,
|
|
69
|
+
c,
|
|
70
|
+
p as d,
|
|
71
|
+
w as e,
|
|
72
|
+
d as f,
|
|
73
|
+
m as u
|
|
74
|
+
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { p as s, m } from "./utils-BmNJhgNi.js";
|
|
2
2
|
import { M as o, a as r } from "./mc-alert-bpaTCVUK.js";
|
|
3
3
|
import { a as p } from "./mc-button-Ba7DDZG9.js";
|
|
4
|
-
import { a as i, b as e } from "./mc-checkbox-
|
|
4
|
+
import { a as i, b as e } from "./mc-checkbox-5wE4IPwp.js";
|
|
5
5
|
import { M as f } from "./mc-collapse-DFNPqcdt.js";
|
|
6
6
|
import { a } from "./mc-collapse-DFNPqcdt.js";
|
|
7
|
-
import { M as j, a as M } from "./mc-input-
|
|
7
|
+
import { M as j, a as M } from "./mc-input-CgplNojs.js";
|
|
8
8
|
import { M as l } from "./mc-message-YfksGJAF.js";
|
|
9
9
|
import { a as a2 } from "./mc-message-YfksGJAF.js";
|
|
10
|
-
import { M as b, a as n } from "./mc-radio-
|
|
11
|
-
import { M as
|
|
12
|
-
import { M as
|
|
13
|
-
import { u, c, d } from "./mc-tab-
|
|
10
|
+
import { M as b, a as n } from "./mc-radio-RIdhxPQE.js";
|
|
11
|
+
import { M as x, a as g, b as h } from "./mc-select-DiqALSF2.js";
|
|
12
|
+
import { M as w, a as k, b as v } from "./mc-tab-8Fvo9GmL.js";
|
|
13
|
+
import { u, c, d } from "./mc-tab-8Fvo9GmL.js";
|
|
14
14
|
import { M as S } from "./mc-toast-LpYAseXY.js";
|
|
15
15
|
import { t } from "./mc-toast-LpYAseXY.js";
|
|
16
|
-
import { M as T, b as q } from "./mc-form-
|
|
17
|
-
import { a as
|
|
18
|
-
import { a as
|
|
19
|
-
import { a as
|
|
16
|
+
import { M as T, b as q } from "./mc-form-B385pPPT.js";
|
|
17
|
+
import { a as y } from "./mc-icon-D3S6pb2m.js";
|
|
18
|
+
import { a as C } from "./mc-success-icon-BpxyU5y9.js";
|
|
19
|
+
import { a as I, b as P } from "./mc-title-B6Hvo9y-.js";
|
|
20
20
|
import { a as z } from "./mc-footer-D-q92WeC.js";
|
|
21
21
|
import { a as A } from "./mc-modal-header-BXLmfVq5.js";
|
|
22
|
-
import { M as B } from "./mc-drawer-
|
|
22
|
+
import { M as B } from "./mc-drawer-BAqCBDFv.js";
|
|
23
23
|
import { M as D } from "./mc-reset-BjETD0vP.js";
|
|
24
24
|
import { M as E } from "./mc-divider-CNE-PJUC.js";
|
|
25
|
-
import { M as F } from "./mc-lightbox-
|
|
26
|
-
import { M as G, a as H } from "./mc-upload-
|
|
27
|
-
import { M as J } from "./mc-popper-
|
|
28
|
-
import { a as K } from "./mc-tooltip-
|
|
25
|
+
import { M as F } from "./mc-lightbox-CLsHAZWT.js";
|
|
26
|
+
import { M as G, a as H } from "./mc-upload-COiLFcW-.js";
|
|
27
|
+
import { M as J } from "./mc-popper-Dvh1rxVO.js";
|
|
28
|
+
import { a as K } from "./mc-tooltip-Ckhu6Zvc.js";
|
|
29
29
|
import { M as L } from "./mc-tag-DE_oW4QS.js";
|
|
30
30
|
import { M as N } from "./mc-status-Cc5Hvpvx.js";
|
|
31
|
-
import { M as O } from "./mc-switch-
|
|
32
|
-
import { M as Q, a as R, b as U, c as V } from "./mc-step-
|
|
33
|
-
|
|
31
|
+
import { M as O } from "./mc-switch-DkJTjepY.js";
|
|
32
|
+
import { M as Q, a as R, b as U, c as V } from "./mc-step-CLbrPQk7.js";
|
|
33
|
+
import { M as W } from "./mc-currency-icon-Bi3GlZaG.js";
|
|
34
|
+
const X = [p, f, w, b, n, x, g, h, i, e, o, l, S, T, q, j, M, y, C, I, z, P, A, B, k, v, D, E, F, G, H, J, K, L, N, O, Q, R, U, V, r, W];
|
|
34
35
|
s();
|
|
35
|
-
const
|
|
36
|
+
const Y = m(X);
|
|
36
37
|
export {
|
|
37
38
|
o as McAlert,
|
|
38
39
|
r as McAlertMessage,
|
|
@@ -41,13 +42,14 @@ export {
|
|
|
41
42
|
e as McCheckboxGroup,
|
|
42
43
|
f as McCollapse,
|
|
43
44
|
a as McCollapseItem,
|
|
45
|
+
W as McCurrencyIcon,
|
|
44
46
|
E as McDivider,
|
|
45
47
|
B as McDrawer,
|
|
46
48
|
H as McFileList,
|
|
47
49
|
z as McFooter,
|
|
48
50
|
T as McForm,
|
|
49
51
|
q as McFormItem,
|
|
50
|
-
|
|
52
|
+
y as McIcon,
|
|
51
53
|
j as McInput,
|
|
52
54
|
M as McInputGroup,
|
|
53
55
|
F as McLightbox,
|
|
@@ -57,27 +59,27 @@ export {
|
|
|
57
59
|
b as McRadio,
|
|
58
60
|
n as McRadioGroup,
|
|
59
61
|
D as McReset,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
x as McSelect,
|
|
63
|
+
g as McSelectGroup,
|
|
62
64
|
h as McSelectOption,
|
|
63
65
|
N as McStatus,
|
|
64
66
|
Q as McStep,
|
|
65
67
|
V as McStepChildItemV2,
|
|
66
68
|
U as McStepItemV2,
|
|
67
69
|
R as McStepV2,
|
|
68
|
-
|
|
70
|
+
C as McSuccessIcon,
|
|
69
71
|
O as McSwitch,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
k as McTab,
|
|
73
|
+
v as McTabItem,
|
|
74
|
+
w as McTable,
|
|
73
75
|
L as McTag,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
I as McTitle,
|
|
77
|
+
P as McTitleToolBar,
|
|
76
78
|
S as McToast,
|
|
77
79
|
K as McTooltip,
|
|
78
80
|
G as McUpload,
|
|
79
81
|
a2 as Message,
|
|
80
|
-
|
|
82
|
+
Y as default,
|
|
81
83
|
t as toast,
|
|
82
84
|
u as usePagination,
|
|
83
85
|
c as useTableScroll,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, inject as a, computed as l, watch as c, createElementBlock as o, openBlock as t, normalizeStyle as s, normalizeClass as u, createElementVNode as m, toDisplayString as d, provide as n, renderSlot as r } from "vue";
|
|
2
|
-
import { u as p, a as i } from "./mc-form-
|
|
2
|
+
import { u as p, a as i } from "./mc-form-B385pPPT.js";
|
|
3
3
|
import { a as h, b } from "./vendor-CF1nicIl.js";
|
|
4
4
|
import { _ as v, w as k } from "./utils-BmNJhgNi.js";
|
|
5
5
|
const x = Symbol("CheckboxGroupContext"), _ = ["value", "disabled"], f = { class: "mc-checkbox__wrapper" }, V = { class: "mc-checkbox__content" }, g = { class: "mc-checkbox__content-text" }, y = { class: "mc-checkbox__content-remarks" }, B = v(e({ name: "McCheckbox", __name: "mc-checkbox", props: { modelValue: { type: Boolean }, disabled: { type: Boolean }, content: {}, remarks: {}, partial: { type: Boolean }, formValidate: { type: Boolean, default: true }, value: {} }, emits: ["change", "update:modelValue"], setup(e2, { emit: n2 }) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineComponent as c, createElementBlock as r, openBlock as n, normalizeStyle as s, unref as e, createElementVNode as i, renderSlot as t, normalizeClass as o, toDisplayString as l } from "vue";
|
|
2
|
+
import { u as a, a as u } from "./hooks-DQBM4MPn.js";
|
|
3
|
+
import { _ as d, w as m } from "./utils-BmNJhgNi.js";
|
|
4
|
+
const y = { class: "mc-currency-icon-img-wrapper" }, p = ["src", "alt"], h = { class: "mc-currency-icon-label" }, f = { class: "mc-currency-icon-text" }, g = m(d(c({ name: "McCurrencyIcon", __name: "mc-currency-icon", props: { currency: {}, direction: { default: "horizontal" }, desc: {}, cdnUrl: {}, suffix: { default: "svg" }, height: {}, width: {} }, setup(c2) {
|
|
5
|
+
const d2 = c2, { generateFileUrl: m2 } = a(d2.cdnUrl, d2.suffix), { width: g2, height: v } = u();
|
|
6
|
+
return (c3, a2) => (n(), r("div", { class: "mc-currency-icon", style: s({ width: e(g2), height: e(v) }) }, [i("div", y, [t(c3.$slots, "icon", {}, () => [i("img", { src: e(m2)(c3.currency), class: "mc-currency-icon-img", alt: `${c3.currency}-icon` }, null, 8, p)], true)]), i("div", { class: o(["mc-currency-icon-content", [`mc-currency-icon-content-${c3.direction}`]]) }, [i("div", h, [t(c3.$slots, "default", {}, () => [i("span", null, l(c3.currency), 1)], true)]), i("div", f, [t(c3.$slots, "desc", {}, () => [i("span", null, l(c3.desc), 1)], true)])], 2)], 4));
|
|
7
|
+
} }), [["__scopeId", "data-v-a7836bdb"]]));
|
|
8
|
+
export {
|
|
9
|
+
g as M
|
|
10
|
+
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as e, ref as o, watch as t, createElementBlock as a, cr
|
|
|
2
2
|
import { M as v } from "./mc-overlay-unPNM2RL.js";
|
|
3
3
|
import { M as w } from "./mc-modal-header-BXLmfVq5.js";
|
|
4
4
|
import { M as h } from "./mc-footer-D-q92WeC.js";
|
|
5
|
-
import {
|
|
5
|
+
import { b as y } from "./hooks-DQBM4MPn.js";
|
|
6
6
|
import { _, w as b } from "./utils-BmNJhgNi.js";
|
|
7
7
|
const $ = { key: 0, class: "mc-drawer-container" }, g = { class: "mc-drawer-header" }, k = { class: "mc-drawer-content-wrapper" }, x = { class: "mc-drawer-content" }, B = b(_(e({ name: "McDrawer", __name: "mc-drawer", props: { modelValue: { type: Boolean }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean, default: true }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" }, showBorder: { type: Boolean, default: true } }, emits: ["update:modelValue", "close"], setup(e2, { expose: _2, emit: b2 }) {
|
|
8
8
|
const B2 = e2, C = o(false), j = o(false), M = o(false), V = async () => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { inject as e, computed as r, defineComponent as t, reactive as
|
|
2
|
-
import {
|
|
1
|
+
import { inject as e, computed as r, defineComponent as t, reactive as s, toRefs as a, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as c, ref as m, onMounted as n, onUnmounted as u, normalizeClass as p, createCommentVNode as v, toDisplayString as f, createVNode as h, createTextVNode as b, Transition as g, withCtx as y, nextTick as _ } from "vue";
|
|
2
|
+
import { c as q } from "./hooks-DQBM4MPn.js";
|
|
3
3
|
import { c as F, s as j, f as P, d as $, k as w, a as x, e as k, m as I, g as M, h as V, j as S, l as z, n as B } from "./vendor-CF1nicIl.js";
|
|
4
4
|
import { _ as C, w as E } from "./utils-BmNJhgNi.js";
|
|
5
5
|
import O from "async-validator";
|
|
6
|
-
import { M as A } from "./mc-tooltip-
|
|
6
|
+
import { M as A } from "./mc-tooltip-Ckhu6Zvc.js";
|
|
7
7
|
const D = Symbol("formContext"), G = Symbol("formItemContext");
|
|
8
8
|
function H() {
|
|
9
9
|
const r2 = e(D, void 0), t2 = q("formValidate");
|
|
10
10
|
return { form: r2, formItem: F(t2.value) && !t2.value ? void 0 : e(G, void 0) };
|
|
11
11
|
}
|
|
12
12
|
function J() {
|
|
13
|
-
const t2 = e(D, void 0),
|
|
14
|
-
return r(() =>
|
|
13
|
+
const t2 = e(D, void 0), s2 = e(G, void 0), a2 = q("disabled");
|
|
14
|
+
return r(() => a2.value || (t2 == null ? void 0 : t2.disabled) || (s2 == null ? void 0 : s2.disabled));
|
|
15
15
|
}
|
|
16
16
|
const K = { class: "mc-form" }, L = C(t({ name: "McForm", __name: "mc-form", props: { model: {}, rules: { default: () => ({}) }, disabled: { type: Boolean }, direction: { default: "vertical" } }, emits: ["validate"], setup(e2, { expose: r2, emit: t2 }) {
|
|
17
17
|
const m2 = t2, n2 = [], u2 = async (e3 = [], r3) => {
|
|
@@ -32,7 +32,7 @@ const K = { class: "mc-form" }, L = C(t({ name: "McForm", __name: "mc-form", pro
|
|
|
32
32
|
const t4 = e4;
|
|
33
33
|
return r3 == null ? void 0 : r3(false, t4), Promise.reject(t4);
|
|
34
34
|
}
|
|
35
|
-
}, p2 = (e3, r3) => j(r3) ? P(e3, (e4) => x(r3, e4.prop)) : e3, v2 =
|
|
35
|
+
}, p2 = (e3, r3) => j(r3) ? P(e3, (e4) => x(r3, e4.prop)) : e3, v2 = s({ ...a(e2), emits: m2, addField: (e3) => {
|
|
36
36
|
e3.prop && n2.push(e3);
|
|
37
37
|
}, removeField: (e3) => {
|
|
38
38
|
e3.prop && n2.splice(n2.indexOf(e3), 1);
|
|
@@ -57,9 +57,9 @@ const K = { class: "mc-form" }, L = C(t({ name: "McForm", __name: "mc-form", pro
|
|
|
57
57
|
const t3 = F2.required;
|
|
58
58
|
if (k(t3)) {
|
|
59
59
|
const r3 = P(I(e2, (e3, r4) => [e3, r4]), (e3) => x(w(e3[0]), "required"));
|
|
60
|
-
if (j(r3)) for (const
|
|
61
|
-
const [r4,
|
|
62
|
-
r4.required !== t3 && (e2[
|
|
60
|
+
if (j(r3)) for (const s2 of r3) {
|
|
61
|
+
const [r4, a2] = s2;
|
|
62
|
+
r4.required !== t3 && (e2[a2] = { ...r4, required: t3 });
|
|
63
63
|
}
|
|
64
64
|
else e2.push({ required: t3 });
|
|
65
65
|
}
|
|
@@ -75,30 +75,30 @@ const K = { class: "mc-form" }, L = C(t({ name: "McForm", __name: "mc-form", pro
|
|
|
75
75
|
})(e2);
|
|
76
76
|
if (!j(t3)) return r2 == null ? void 0 : r2(true), Promise.resolve(true);
|
|
77
77
|
C2.value = "validating";
|
|
78
|
-
const
|
|
78
|
+
const s2 = ((e3) => {
|
|
79
79
|
const r3 = F2.prop;
|
|
80
80
|
return r3 ? new O({ [r3]: e3 }).validate({ [r3]: J2.value }, { firstFields: true }).then(() => (C2.value = "success", $2 == null ? void 0 : $2.emits("validate", F2, true, ""), E2.value = "", true)).catch((e4) => {
|
|
81
81
|
const { errors: r4 } = e4;
|
|
82
82
|
return C2.value = "error", E2.value = r4 && j(r4) > 0 ? r4[0].message ?? "" : "", $2 == null ? void 0 : $2.emits("validate", F2, false, E2.value), Promise.reject(e4);
|
|
83
83
|
}) : null;
|
|
84
84
|
})(t3);
|
|
85
|
-
return
|
|
85
|
+
return s2 ? s2.then(() => (r2 == null ? void 0 : r2(true), true)).catch((e3) => {
|
|
86
86
|
const { fields: t4 } = e3;
|
|
87
87
|
return r2 == null ? void 0 : r2(false, t4), Promise.reject(t4);
|
|
88
88
|
}) : Promise.reject(false);
|
|
89
89
|
}, te = () => {
|
|
90
90
|
const e2 = $2 == null ? void 0 : $2.model;
|
|
91
91
|
e2 && F2.prop && !k(V(e2, F2.prop)) && (ee = true, S(e2, F2.prop, z(Z2))), _(() => {
|
|
92
|
-
|
|
92
|
+
se();
|
|
93
93
|
});
|
|
94
|
-
},
|
|
94
|
+
}, se = () => {
|
|
95
95
|
C2.value = "init", E2.value = "", ee = false;
|
|
96
|
-
},
|
|
97
|
-
return o(G,
|
|
98
|
-
F2.prop && ($2 == null ? void 0 : $2.addField(
|
|
96
|
+
}, ae = s({ ...a(F2), validateStatus: r(() => C2.value), disabled: Y2, validate: re, resetField: te, clearValidate: se }), oe = r(() => "horizontal" === ($2 == null ? void 0 : $2.direction));
|
|
97
|
+
return o(G, ae), n(() => {
|
|
98
|
+
F2.prop && ($2 == null ? void 0 : $2.addField(ae), Z2 = J2.value);
|
|
99
99
|
}), u(() => {
|
|
100
|
-
F2.prop && ($2 == null ? void 0 : $2.removeField(
|
|
101
|
-
}), q2({ validateMessage: E2, validateStatus: C2, validate: re, resetField: te, clearValidate:
|
|
100
|
+
F2.prop && ($2 == null ? void 0 : $2.removeField(ae));
|
|
101
|
+
}), q2({ validateMessage: E2, validateStatus: C2, validate: re, resetField: te, clearValidate: se }), (e2, r2) => (i(), l("div", { class: p(["mc-form-item", { "mc-form-item-horizontal": oe.value }]) }, [c(e2.$slots, "label", { required: X2.value }, () => [d("div", null, [d("div", N, [e2.label ? (i(), l("label", Q, [d("span", { class: p(["mc-form-item-lable-text", { "mc-form-item-label-required": X2.value }]) }, f(e2.label), 3), e2.help || e2.$slots.help ? (i(), l("div", R, [c(e2.$slots, "help", {}, () => [h(A, { content: e2.help, "icon-size": 20 }, null, 8, ["content"])], true)])) : v("", true)])) : v("", true), c(e2.$slots, "tool", {}, void 0, true)]), e2.desc || e2.$slots.desc ? (i(), l("div", T, [c(e2.$slots, "desc", {}, () => [b(f(e2.desc), 1)], true)])) : v("", true)])], true), d("div", U, [c(e2.$slots, "default", {}, void 0, true), h(g, { name: "mc-form-item-error" }, { default: y(() => [E2.value ? (i(), l("div", W, f(E2.value), 1)) : v("", true)]), _: 1 })])], 2));
|
|
102
102
|
} }), [["__scopeId", "data-v-d8ce9b29"]]), Y = E(L), Z = E(X);
|
|
103
103
|
export {
|
|
104
104
|
Y as M,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject as e, computed as t, ref as a, defineComponent as u, onMounted as l, watch as s, createElementBlock as r, openBlock as n, normalizeStyle as o, normalizeClass as c, unref as i, createCommentVNode as p, createElementVNode as f, renderSlot as d, createBlock as m, withKeys as v, createVNode as y, Fragment as x, nextTick as h, useSlots as g, reactive as _, watchEffect as b, provide as I } from "vue";
|
|
2
2
|
import { M as w } from "./mc-icon-D3S6pb2m.js";
|
|
3
|
-
import { a as S, u as $ } from "./mc-form-
|
|
4
|
-
import {
|
|
3
|
+
import { a as S, u as $ } from "./mc-form-B385pPPT.js";
|
|
4
|
+
import { d as k } from "./hooks-DQBM4MPn.js";
|
|
5
5
|
import { O as V } from "./mc-otp-DnzPqlEK.js";
|
|
6
6
|
import { a as j, o as B, p as C, q as M, e as R, i as z } from "./vendor-CF1nicIl.js";
|
|
7
7
|
import { _ as A, w as P } from "./utils-BmNJhgNi.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, watch as t, 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
|
|
1
|
+
import { defineComponent as e, ref as o, watch as t, 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 m, normalizeClass as c, createElementVNode as n, renderSlot as h } from "vue";
|
|
2
2
|
import { M as v } from "./mc-overlay-unPNM2RL.js";
|
|
3
3
|
import { M as p } from "./mc-modal-header-BXLmfVq5.js";
|
|
4
4
|
import { M as g } from "./mc-footer-D-q92WeC.js";
|
|
5
|
-
import {
|
|
5
|
+
import { e as b, b as x } from "./hooks-DQBM4MPn.js";
|
|
6
6
|
import { _ as y, w as _ } from "./utils-BmNJhgNi.js";
|
|
7
7
|
const w = { key: 0, class: "mc-lightbox-container" }, k = { class: "mc-lightbox-header" }, $ = _(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 }, showBorder: { type: Boolean, default: false } }, emits: ["update:modelValue", "close"], setup(e2, { expose: y2, emit: _2 }) {
|
|
8
8
|
const $2 = e2, B = _2, C = o(), j = o(), M = o(), R = o(), V = o(false), H = o(false), z = o(false), F = () => {
|
|
@@ -30,7 +30,7 @@ const w = { key: 0, class: "mc-lightbox-container" }, k = { class: "mc-lightbox-
|
|
|
30
30
|
o2 && (o2.style.paddingBottom = `${e3}px`, await l(), q());
|
|
31
31
|
}), x(R, () => {
|
|
32
32
|
q();
|
|
33
|
-
}), y2({ ref: C, open: I, close: L }), (e3, o2) => V.value ? (i(), a("div", w, [(i(), r(d, { to: e3.portCssSelector }, [f(u, { name: "mc-lightbox-overlay" }, { default:
|
|
33
|
+
}), y2({ ref: C, open: I, close: L }), (e3, o2) => V.value ? (i(), a("div", w, [(i(), r(d, { to: e3.portCssSelector }, [f(u, { name: "mc-lightbox-overlay" }, { default: m(() => [f(v, { visible: H.value, fixed: e3.fixed, onClick: F }, { default: m(() => [f(u, { name: "mc-lightbox-content" }, { default: m(() => [z.value ? (i(), a("div", { key: 0, class: c(["mc-lightbox", [`mc-lightbox-${e3.size}`]]), ref_key: "lightboxRef", ref: C }, [n("div", k, [h(e3.$slots, "header", {}, () => [f(p, { title: e3.title, "show-border": e3.showBorder, onClose: S }, { default: m(() => [h(e3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title", "show-border"])], true)]), n("div", { class: "mc-lightbox-content-wrapper", ref_key: "wrapperRef", ref: M }, [n("div", { class: "mc-lightbox-content", ref_key: "contentRef", ref: R }, [h(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: j }, [h(e3.$slots, "footer", {}, () => [f(g, null, { left: m(() => [h(e3.$slots, "footer-left", {}, void 0, true)]), right: m(() => [h(e3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": m(() => [h(e3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: m(() => [h(e3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)], 512))], 2)) : s("", true)]), _: 3 })]), _: 3 }, 8, ["visible", "fixed"])]), _: 3 })], 8, ["to"]))])) : s("", true);
|
|
34
34
|
} }), [["__scopeId", "data-v-fad03923"]]));
|
|
35
35
|
export {
|
|
36
36
|
$ as M
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as o, computed as r, watch as a, onUnmounted as t, watchEffect as s, createElementBlock as l, openBlock as p, mergeProps as i, toHandlers as u, createElementVNode as n, createVNode as v, renderSlot as c, Transition as d, withCtx as m, createCommentVNode as f, createTextVNode as g, toDisplayString as h } from "vue";
|
|
2
2
|
import { createPopper as w } from "@popperjs/core";
|
|
3
|
-
import {
|
|
3
|
+
import { f as k } from "./hooks-DQBM4MPn.js";
|
|
4
4
|
import { r as _, u as y, e as b } from "./vendor-CF1nicIl.js";
|
|
5
5
|
import { _ as N, w as j } from "./utils-BmNJhgNi.js";
|
|
6
6
|
const T = { key: 0, id: "arrow", class: "mc-popper-arrow", "data-popper-arrow": "" }, x = N(e({ name: "McPopper", __name: "mc-popper", props: { content: {}, trigger: { default: "hover" }, placement: { default: "top" }, disabled: { type: Boolean }, popperOptions: {}, showTimeout: { default: 0 }, hideTimeout: { default: 300 }, transitionName: { default: "fade" }, showArrow: { type: Boolean, default: true } }, emits: ["visible:change", "click:outside"], setup(e2, { expose: N2, emit: j2 }) {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { defineComponent as e, watch as a, provide as l, computed as o, createElementBlock as r, openBlock as s, renderSlot as d, inject as t, normalizeClass as c, createElementVNode as i, createCommentVNode as m, createTextVNode as u, toDisplayString as n, createVNode as p } from "vue";
|
|
2
|
-
import { u as v, a as b } from "./mc-form-
|
|
3
|
-
import { _ as h, w as
|
|
4
|
-
import { M as
|
|
5
|
-
const
|
|
2
|
+
import { u as v, a as b } from "./mc-form-B385pPPT.js";
|
|
3
|
+
import { _ as h, w as k } from "./utils-BmNJhgNi.js";
|
|
4
|
+
import { M as _ } from "./mc-tooltip-Ckhu6Zvc.js";
|
|
5
|
+
const f = Symbol("selectContext"), g = { class: "mc-radio-group" }, y = h(e({ name: "McRadioGroup", __name: "mc-radio-group", props: { modelValue: { type: [Number, String, Boolean] }, disabled: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: t2 }) {
|
|
6
6
|
const c2 = e2, i2 = t2, { formItem: m2 } = v();
|
|
7
7
|
return a(() => c2.modelValue, () => {
|
|
8
8
|
m2 == null ? void 0 : m2.validate("change");
|
|
9
|
-
}), l(
|
|
9
|
+
}), l(f, { hasError: o(() => "error" === (m2 == null ? void 0 : m2.validateStatus)), modelValue: o(() => c2.modelValue), disabled: o(() => c2.disabled), handleSelect: (e3) => {
|
|
10
10
|
i2("update:modelValue", e3), i2("change", e3);
|
|
11
11
|
} }), (e3, a2) => (s(), r("div", g, [d(e3.$slots, "default", {}, void 0, true)]));
|
|
12
12
|
} }), [["__scopeId", "data-v-152cbc8e"]]), V = ["disabled"], S = { class: "mc-radio-content" }, $ = { key: 0, class: "mc-radio-help" }, B = { class: "mc-radio-remark" }, M = h(e({ name: "McRadio", __name: "mc-radio", props: { label: {}, value: { type: [Number, String, Boolean] }, disabled: { type: Boolean }, remark: {}, help: {} }, setup(e2) {
|
|
13
|
-
const a2 = e2, l2 = t(
|
|
13
|
+
const a2 = e2, l2 = t(f), v2 = o(() => {
|
|
14
14
|
var _a;
|
|
15
15
|
return ((_a = l2 == null ? void 0 : l2.modelValue) == null ? void 0 : _a.value) === a2.value;
|
|
16
|
-
}), h2 = b(),
|
|
16
|
+
}), h2 = b(), k2 = o(() => {
|
|
17
17
|
var _a;
|
|
18
18
|
return ((_a = l2 == null ? void 0 : l2.disabled) == null ? void 0 : _a.value) || h2.value;
|
|
19
19
|
}), g2 = o(() => {
|
|
20
20
|
var _a;
|
|
21
|
-
return !
|
|
21
|
+
return !k2.value && ((_a = l2 == null ? void 0 : l2.hasError) == null ? void 0 : _a.value);
|
|
22
22
|
}), y2 = () => {
|
|
23
|
-
|
|
23
|
+
k2.value || (l2 == null ? void 0 : l2.handleSelect(a2.value));
|
|
24
24
|
};
|
|
25
|
-
return (e3, a3) => (s(), r("div", { class: c(["mc-radio", { "mc-radio-has-remark": !!e3.remark }]) }, [i("label", { class: c(["mc-radio-label", { "mc-radio-checked": v2.value, "mc-radio-disabled":
|
|
26
|
-
} }), [["__scopeId", "data-v-cc9e26bd"]]), j =
|
|
25
|
+
return (e3, a3) => (s(), r("div", { class: c(["mc-radio", { "mc-radio-has-remark": !!e3.remark }]) }, [i("label", { class: c(["mc-radio-label", { "mc-radio-checked": v2.value, "mc-radio-disabled": k2.value, "mc-radio-error": g2.value }]), onClick: y2 }, [i("input", { type: "radio", class: "mc-radio-input", disabled: k2.value }, null, 8, V), a3[0] || (a3[0] = i("span", { class: "mc-radio-circle" }, null, -1)), i("div", S, [d(e3.$slots, "default", {}, () => [u(n(e3.label), 1)], true)]), e3.help || e3.$slots.help ? (s(), r("div", $, [d(e3.$slots, "help", {}, () => [p(_, { content: e3.help, "icon-size": 24 }, null, 8, ["content"])], true)])) : m("", true)], 2), i("div", B, [d(e3.$slots, "remark", {}, () => [u(n(e3.remark), 1)], true)])], 2));
|
|
26
|
+
} }), [["__scopeId", "data-v-cc9e26bd"]]), j = k(y), I = k(M);
|
|
27
27
|
export {
|
|
28
28
|
I as M,
|
|
29
29
|
j as a
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as e, ref as l, computed as a, watch as t, provide as s, createElementBlock as o, openBlock as u, normalizeStyle as c, normalizeClass as d, unref as r, createElementVNode as i, createVNode as v, createCommentVNode as n, createBlock as m, resolveDynamicComponent as p, Fragment as h, renderList as f, withCtx as g, createTextVNode as _, toDisplayString as y, withDirectives as w, vModelText as V, Transition as b, renderSlot as k, vShow as x, inject as S, useSlots as j, onMounted as M, onBeforeUnmount as O, h as B, toRefs as R, useAttrs as C, toValue as A } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { a as z, u as D } from "./mc-form-
|
|
4
|
-
import { u as F } from "./mc-input-
|
|
2
|
+
import { d as I, f as $ } from "./hooks-DQBM4MPn.js";
|
|
3
|
+
import { a as z, u as D } from "./mc-form-B385pPPT.js";
|
|
4
|
+
import { u as F } from "./mc-input-CgplNojs.js";
|
|
5
5
|
import { M as N } from "./mc-icon-D3S6pb2m.js";
|
|
6
|
-
import { M as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { M as
|
|
9
|
-
import { M as
|
|
10
|
-
import { M as
|
|
6
|
+
import { M as q } from "./mc-button-Ba7DDZG9.js";
|
|
7
|
+
import { _ as G } from "./mc-tag-DE_oW4QS.js";
|
|
8
|
+
import { M as P } from "./mc-checkbox-5wE4IPwp.js";
|
|
9
|
+
import { M as T } from "./mc-title-B6Hvo9y-.js";
|
|
10
|
+
import { M as U } from "./mc-footer-D-q92WeC.js";
|
|
11
11
|
import { e as W, v as E, q as H, f as J, m as K, a as L } from "./vendor-CF1nicIl.js";
|
|
12
12
|
import { _ as Q, w as X } from "./utils-BmNJhgNi.js";
|
|
13
13
|
const Y = Symbol("selectContext"), Z = Symbol("selectGroupContext"), ee = { key: 0, class: "mc-select-selected-content" }, le = ["placeholder", "readonly", "disabled"], ae = { class: "mc-select-dropdown-header-content" }, te = { class: "mc-select-dropdown-content" }, se = { class: "mc-select-dropdown" }, oe = { key: 0, class: "mc-select-no-data" }, ue = Q(e({ name: "McSelect", __name: "mc-select", props: { modelValue: {}, placeholder: { default: "Please select" }, disabled: { type: Boolean }, multiple: { type: Boolean, default: false }, width: {}, height: {}, search: { type: Boolean }, allowReset: { type: Boolean, default: true }, allowSelectAll: { type: Boolean, default: true } }, emits: ["update:modelValue", "change", "blur", "focus", "reset"], setup(e2, { emit: S2 }) {
|
|
@@ -31,7 +31,7 @@ const Y = Symbol("selectContext"), Z = Symbol("selectGroupContext"), ee = { key:
|
|
|
31
31
|
default:
|
|
32
32
|
return "";
|
|
33
33
|
}
|
|
34
|
-
}), ke = a(() => "error" === be.value), xe = a(() => "success" === be.value), Se = a(() => !C2.value && (ke.value || xe.value) && !Ne.value && !
|
|
34
|
+
}), ke = a(() => "error" === be.value), xe = a(() => "success" === be.value), Se = a(() => !C2.value && (ke.value || xe.value) && !Ne.value && !qe.value);
|
|
35
35
|
let je = [];
|
|
36
36
|
const Me = () => {
|
|
37
37
|
M2("update:modelValue", [...je]), M2("change", [...je]);
|
|
@@ -62,23 +62,21 @@ const Y = Symbol("selectContext"), Z = Symbol("selectGroupContext"), ee = { key:
|
|
|
62
62
|
const l2 = [...j2.modelValue];
|
|
63
63
|
L(l2, e4.value) ? l2.splice(l2.indexOf(e4.value), 1) : l2.push(e4.value), M2("update:modelValue", l2);
|
|
64
64
|
})(e3) : ((e4) => {
|
|
65
|
-
me2.value = false;
|
|
66
|
-
const l2 = j2.modelValue === e4.value ? void 0 : e4.value;
|
|
67
|
-
M2("update:modelValue", l2), M2("change", l2);
|
|
65
|
+
me2.value = false, M2("update:modelValue", e4.value), M2("change", e4.value);
|
|
68
66
|
})(e3);
|
|
69
67
|
}, removeOption: (e3) => {
|
|
70
68
|
X2.value = X2.value.filter((l2) => l2.value !== e3.value);
|
|
71
69
|
}, addOption: (e3) => {
|
|
72
70
|
X2.value.push(e3);
|
|
73
71
|
} });
|
|
74
|
-
const { isPrefix: Ne, isSuffix:
|
|
75
|
-
return (e3, l2) => (u(), o("div", { class: d(["mc-select", [me2.value && !r(C2) ? "mc-select-expand" : "mc-select-collapse", { "mc-select-disabled": r(C2), "mc-input-focused": r(ce2), [`mc-select--${be.value}`]: be.value, "mc-select--input-group-prefix": r(Ne), "mc-select--input-group-suffix": r(
|
|
72
|
+
const { isPrefix: Ne, isSuffix: qe } = F("select");
|
|
73
|
+
return (e3, l2) => (u(), o("div", { class: d(["mc-select", [me2.value && !r(C2) ? "mc-select-expand" : "mc-select-collapse", { "mc-select-disabled": r(C2), "mc-input-focused": r(ce2) && e3.search, [`mc-select--${be.value}`]: be.value, "mc-select--input-group-prefix": r(Ne), "mc-select--input-group-suffix": r(qe), "mc-select--hover": $e.value }]]), ref_key: "wrapperRef", ref: ue2, style: c(Ie.value), onMouseenter: l2[4] || (l2[4] = (e4) => $e.value = true), onMouseleave: l2[5] || (l2[5] = (e4) => $e.value = false) }, [i("div", { class: "mc-select-trigger", onClick: pe2, ref_key: "triggerRef", ref: R2 }, [ge.value.length && !Ae.value ? (u(), o("div", ee, [A2.value ? (u(), o("div", { key: 1, class: "mc-select-multi-wrapper", ref_key: "tagsWrapperRef", ref: B2 }, [(u(true), o(h, null, f(ye.value, (e4) => (u(), m(G, { key: e4.value, size: "x-small", type: "selectable", emphasis: we.value, disabled: r(C2), onDelete: (l3) => ((e5) => {
|
|
76
74
|
if (Q2(j2.modelValue)) {
|
|
77
75
|
const l4 = [...j2.modelValue];
|
|
78
76
|
l4.splice(l4.indexOf(e5.value), 1), M2("update:modelValue", l4);
|
|
79
77
|
}
|
|
80
|
-
})(e4) }, { default: g(() => [_(y(e4.label), 1)]), _: 2 }, 1032, ["emphasis", "disabled", "onDelete"]))), 128))], 512)) : (u(), m(p(_e.value._vnode), { key: _e.value.value }))])) : n("", true), i("div", { class: d(["mc-select-input-wrapper", { "mc-select-input-wrapper-search": Ae.value || Be.value }]) }, [w(i("input", { class: d(["mc-select-input", { "mc-select-input-readonly": !e3.search }]), ref_key: "inputRef", ref: O2, type: "text", placeholder: Be.value ? e3.placeholder : "", "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => Re.value = e4), onInput: Ce, onFocus: l2[1] || (l2[1] = (...e4) => r(de2) && r(de2)(...e4)), onBlur: l2[2] || (l2[2] = (...e4) => r(re2) && r(re2)(...e4)), readonly: !e3.search, disabled: r(C2) }, null, 42, le), [[V, Re.value]])], 2), Se.value ? (u(), o("div", { key: 1, class: d(["mc-select__status", [ke.value ? "mc-select__status--error" : "mc-select__status--success"]]) }, [v(N, { name: ke.value ? "Reject_02" : "Accept_02", size: 24 }, null, 8, ["name"])], 2)) : n("", true), i("div", { class: d(["mc-select-icon-wrapper", { "mc-select-icon-wrapper-expand": me2.value && !r(C2) }]) }, [v(N, { name: "Down-Chevron", class: "mc-select-icon" })], 2)], 512), v(b, { name: "mc-select-dropdown-transition" }, { default: g(() => [w(i("div", { class: "mc-select-dropdown-wrapper", style: c({ paddingTop: ve2.value ? "40px" : "0", paddingBottom: ne2.value ? "48px" : "0" }) }, [ve2.value ? (u(), m(
|
|
81
|
-
} }), [["__scopeId", "data-v-
|
|
78
|
+
})(e4) }, { default: g(() => [_(y(e4.label), 1)]), _: 2 }, 1032, ["emphasis", "disabled", "onDelete"]))), 128))], 512)) : (u(), m(p(_e.value._vnode), { key: _e.value.value }))])) : n("", true), i("div", { class: d(["mc-select-input-wrapper", { "mc-select-input-wrapper-search": Ae.value || Be.value }]) }, [w(i("input", { class: d(["mc-select-input", { "mc-select-input-readonly": !e3.search }]), ref_key: "inputRef", ref: O2, type: "text", placeholder: Be.value ? e3.placeholder : "", "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => Re.value = e4), onInput: Ce, onFocus: l2[1] || (l2[1] = (...e4) => r(de2) && r(de2)(...e4)), onBlur: l2[2] || (l2[2] = (...e4) => r(re2) && r(re2)(...e4)), readonly: !e3.search, disabled: r(C2) }, null, 42, le), [[V, Re.value]])], 2), Se.value ? (u(), o("div", { key: 1, class: d(["mc-select__status", [ke.value ? "mc-select__status--error" : "mc-select__status--success"]]) }, [v(N, { name: ke.value ? "Reject_02" : "Accept_02", size: 24 }, null, 8, ["name"])], 2)) : n("", true), i("div", { class: d(["mc-select-icon-wrapper", { "mc-select-icon-wrapper-expand": me2.value && !r(C2) }]) }, [v(N, { name: "Down-Chevron", class: "mc-select-icon" })], 2)], 512), v(b, { name: "mc-select-dropdown-transition" }, { default: g(() => [w(i("div", { class: "mc-select-dropdown-wrapper", style: c({ paddingTop: ve2.value ? "40px" : "0", paddingBottom: ne2.value ? "48px" : "0" }) }, [ve2.value ? (u(), m(T, { key: 0, class: "mc-select-dropdown-header", "show-tool-bar": false, height: "40px" }, { default: g(() => [i("div", ae, [v(P, { modelValue: ze.value, "onUpdate:modelValue": l2[3] || (l2[3] = (e4) => ze.value = e4), content: "Select All", "form-validate": false, partial: De.value, onChange: Fe }, null, 8, ["modelValue", "partial"])])]), _: 1 })) : n("", true), i("div", te, [i("div", se, [k(e3.$slots, "default", {}, void 0, true), ie2.value ? (u(), o("div", oe, [k(e3.$slots, "empty", {}, () => [l2[6] || (l2[6] = _("No data"))], true)])) : n("", true)])]), ne2.value ? (u(), m(U, { key: 1, class: "mc-select-dropdown-footer" }, { "right-button-group": g(() => [v(q, { type: "link", size: "small", onClick: Me }, { default: g(() => l2[7] || (l2[7] = [_(" Reset ")])), _: 1 }), v(q, { type: "plain", size: "small", onClick: Oe }, { default: g(() => l2[8] || (l2[8] = [_(" Apply ")])), _: 1 })]), _: 1 })) : n("", true)], 4), [[x, me2.value && !r(C2)]])]), _: 3 })], 38));
|
|
79
|
+
} }), [["__scopeId", "data-v-9db85e1f"]]), ce = { class: "mc-select-option-content" }, de = Q(e({ name: "McSelectOption", __name: "mc-select-option", props: { value: {}, label: {}, width: {}, height: {}, _group: {}, _vnode: {} }, setup(e2, { expose: t2 }) {
|
|
82
80
|
const s2 = l(), r2 = e2, v2 = S(Y, void 0), m2 = S(Z, void 0), p2 = a(() => v2 == null ? void 0 : v2.selectValues.value.includes(r2.value)), h2 = a(() => !!(v2 == null ? void 0 : v2.filterOptions.value.some((e3) => e3.value === r2.value))), f2 = j(), g2 = () => {
|
|
83
81
|
v2 == null ? void 0 : v2.handleSelect(w2(r2));
|
|
84
82
|
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { defineComponent as e, computed as t, ref as s, watch as l, onMounted as c, nextTick as a, createElementBlock as m, openBlock as n, normalizeClass as i, createElementVNode as o, createCommentVNode as u, Fragment as p, renderList as d, createBlock as v, toDisplayString as r, resolveDynamicComponent as y, provide as f, renderSlot as h, inject as b, onBeforeUnmount as g, normalizeStyle as k, createTextVNode as S } from "vue";
|
|
2
|
+
import { M as _ } from "./mc-success-icon-BpxyU5y9.js";
|
|
3
|
+
import { e as C, b as w } from "./hooks-DQBM4MPn.js";
|
|
4
|
+
import { w as x, x as B, t as I, b as V, e as R } from "./vendor-CF1nicIl.js";
|
|
5
|
+
import { _ as $, w as M } from "./utils-BmNJhgNi.js";
|
|
6
|
+
import { M as j } from "./mc-icon-D3S6pb2m.js";
|
|
7
|
+
const q = { class: "mc-step-number-container" }, A = { class: "mc-step-item-number" }, H = { key: 0, class: "mc-step-item-number-text" }, L = { class: "mc-step-item-content" }, z = { key: 0, class: "mc-step-item-content-title" }, D = { class: "mc-step-item-label" }, E = { class: "mc-step-item-desc" }, F = { key: 1, class: "mc-step-item-component" }, G = { key: 0, class: "mc-step-item-component" }, J = M($(e({ name: "McStep", __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: f2, emit: h2 }) {
|
|
8
|
+
const b2 = e2, g2 = t(() => "vertical" === b2.type), k2 = h2, S2 = s(), w2 = s(), V2 = s(), R2 = s(), $2 = t(() => x(b2.steps, (e3) => e3.key === b2.modelValue)), M2 = t(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = b2.steps[$2.value - 1]) == null ? void 0 : _a.key;
|
|
11
|
+
});
|
|
12
|
+
l(() => b2.modelValue, (e3) => {
|
|
13
|
+
J2(), k2("change", e3);
|
|
14
|
+
}, { flush: "post" });
|
|
15
|
+
const j2 = s(), J2 = (e3 = M2.value) => {
|
|
16
|
+
j2.value = e3, k2("success", e3);
|
|
17
|
+
}, K2 = t(() => x(b2.steps, (e3) => e3.key === j2.value));
|
|
18
|
+
c(() => {
|
|
19
|
+
g2.value ? N2() : (O2(), P2()), J2();
|
|
20
|
+
});
|
|
21
|
+
const N2 = async () => {
|
|
22
|
+
await a();
|
|
23
|
+
const e3 = K2.value, t2 = R2.value;
|
|
24
|
+
if (e3 < 0) return void (t2.style.height = "0");
|
|
25
|
+
const s2 = w2.value, l2 = s2.querySelectorAll(".mc-step-item");
|
|
26
|
+
if (e3 + 1 > l2.length - 1) return void (t2.style.height = "100%");
|
|
27
|
+
const c2 = l2 == null ? void 0 : l2[e3 + 1], m2 = s2.getBoundingClientRect(), n2 = (c2.getBoundingClientRect().top - m2.top) / (m2.height - 24);
|
|
28
|
+
t2.style.height = 100 * n2 + "%";
|
|
29
|
+
}, O2 = () => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const e3 = w2.value, t2 = V2.value, s2 = e3.querySelectorAll(".mc-step-item"), l2 = (_a = s2 == null ? void 0 : s2[0]) == null ? void 0 : _a.querySelector(".mc-step-item-number"), c2 = (_b = s2 == null ? void 0 : s2[s2.length - 1]) == null ? void 0 : _b.querySelector(".mc-step-item-number");
|
|
32
|
+
if (!l2 || !c2) return void (t2.style.width = "0px");
|
|
33
|
+
const a2 = e3.getBoundingClientRect(), m2 = l2.getBoundingClientRect(), n2 = c2.getBoundingClientRect();
|
|
34
|
+
t2.style.width = n2.left - m2.left - m2.width + "px", t2.style.left = `${m2.left - a2.left + m2.width}px`;
|
|
35
|
+
}, P2 = () => {
|
|
36
|
+
const e3 = R2.value, t2 = K2.value;
|
|
37
|
+
if (t2 < 0) return void (e3.style.width = "0");
|
|
38
|
+
const s2 = (t2 + 1) / (b2.steps.length - 1), l2 = s2 > 1 ? 1 : s2;
|
|
39
|
+
e3.style.width = 100 * l2 + "%";
|
|
40
|
+
}, Q2 = (e3) => g2.value && e3.component && e3.key === b2.modelValue, T2 = t(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
return !g2.value && ((_a = B(b2.steps, (e3) => e3.key === b2.modelValue)) == null ? void 0 : _a.component);
|
|
43
|
+
});
|
|
44
|
+
return l(() => j2.value, () => {
|
|
45
|
+
g2.value ? N2() : P2();
|
|
46
|
+
}), C(I(() => {
|
|
47
|
+
g2.value ? N2() : (O2(), P2());
|
|
48
|
+
}, 50)), f2({ ref: S2, setSuccessStep: J2 }), (e3, t2) => (n(), m("div", { class: i(["mc-step", `mc-step-${e3.type}`]), ref_key: "_ref", ref: S2 }, [o("ul", { class: "mc-step-item-container", ref_key: "stepContainerRef", ref: w2 }, [(n(true), m(p, null, d(e3.steps, (t3, s2) => (n(), m("li", { class: i(["mc-step-item", { "mc-step-item-active": e3.modelValue === t3.key, "mc-step-item-disabled": t3.disabled, "mc-step-item-success": s2 <= K2.value }]), key: t3.key }, [o("div", q, [o("div", A, [s2 > K2.value || t3.disabled ? (n(), m("span", H, r(s2 + 1), 1)) : (n(), v(_, { key: 1 }))])]), o("div", L, [t3.label || t3.desc ? (n(), m("div", z, [o("h3", D, r(t3.label), 1), o("p", E, r(t3.desc), 1)])) : u("", true), Q2(t3) ? (n(), m("div", F, [(n(), v(y(t3.component)))])) : u("", true)])], 2))), 128)), o("div", { ref_key: "unsuccessLineRef", ref: V2, class: "mc-step-line mc-step-unsuccess-line" }, [o("div", { ref_key: "successLineRef", ref: R2, class: "mc-step-success-line" }, null, 512)], 512)], 512), T2.value ? (n(), m("div", G, [(n(), v(y(T2.value)))])) : u("", true)], 2));
|
|
49
|
+
} }), [["__scopeId", "data-v-3e1df60e"]])), K = Symbol("StepV2Context"), N = Symbol("StepItemV2Context"), O = { class: "mc-step-v2" }, P = e({ name: "McStepV2", __name: "mc-step-v2", props: { modelValue: {}, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean, default: false } }, emits: ["update:modelValue", "change"], setup(e2, { expose: a2 }) {
|
|
50
|
+
const i2 = e2, o2 = s([]), u2 = s(-1), p2 = (e3) => {
|
|
51
|
+
e3 > -1 ? e3 > o2.value.length - 1 ? u2.value = o2.value.length - 1 : u2.value = e3 : u2.value = -1;
|
|
52
|
+
}, d2 = () => {
|
|
53
|
+
const e3 = x(o2.value, (e4) => e4.name === i2.modelValue);
|
|
54
|
+
p2(e3 - 1);
|
|
55
|
+
};
|
|
56
|
+
return c(() => {
|
|
57
|
+
d2();
|
|
58
|
+
}), l(() => i2.modelValue, () => {
|
|
59
|
+
d2();
|
|
60
|
+
}, { flush: "post" }), f(K, { successStepIndex: u2, activeStep: t(() => i2.modelValue), succeed: t(() => i2.succeed), showContent: t(() => i2.showContent), stepItems: o2.value, addStepItem: (e3) => {
|
|
61
|
+
o2.value.push(e3);
|
|
62
|
+
}, removeStepItem: (e3) => {
|
|
63
|
+
const t2 = x(o2.value, (t3) => t3.name === e3.name);
|
|
64
|
+
t2 > -1 && o2.value.splice(t2, 1);
|
|
65
|
+
} }), a2({ setSuccessIndex: p2, setSuccessStep: (e3) => {
|
|
66
|
+
const t2 = x(o2.value, (t3) => t3.name === e3);
|
|
67
|
+
p2(t2);
|
|
68
|
+
} }), (e3, t2) => (n(), m("div", O, [h(e3.$slots, "default")]));
|
|
69
|
+
} }), Q = { class: "mc-step-item-step-bar-number" }, T = { key: 0, class: "mc-step-item-step-bar-number-text" }, U = { key: 0, class: "mc-step-item-label" }, W = { class: "mc-step-item-label-title" }, X = { class: "mc-step-item-label-desc" }, Y = { key: 1, class: "mc-step-item-slot" }, Z = $(e({ name: "McStepItemV2", __name: "mc-step-item-v2", props: { icon: {}, minHeight: { default: "64px" }, name: {}, label: {}, desc: {}, disabled: { type: Boolean }, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean, default: false } }, setup(e2) {
|
|
70
|
+
const a2 = e2, p2 = s(), d2 = s(), y2 = b(K);
|
|
71
|
+
c(() => {
|
|
72
|
+
y2 == null ? void 0 : y2.addStepItem(a2);
|
|
73
|
+
}), g(() => {
|
|
74
|
+
y2 == null ? void 0 : y2.removeStepItem(a2);
|
|
75
|
+
});
|
|
76
|
+
const C2 = t(() => V(y2 == null ? void 0 : y2.stepItems, a2)), x2 = t(() => {
|
|
77
|
+
var _a;
|
|
78
|
+
return ((_a = y2 == null ? void 0 : y2.activeStep) == null ? void 0 : _a.value) === a2.name;
|
|
79
|
+
}), B2 = t(() => {
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = y2 == null ? void 0 : y2.showContent) == null ? void 0 : _a.value) || a2.showContent || x2.value;
|
|
82
|
+
}), I2 = t(() => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
return R((_a = y2 == null ? void 0 : y2.succeed) == null ? void 0 : _a.value) ? R(a2.succeed) ? (((_b = y2 == null ? void 0 : y2.successStepIndex) == null ? void 0 : _b.value) ?? -1) >= C2.value : a2.succeed : (_c = y2 == null ? void 0 : y2.succeed) == null ? void 0 : _c.value;
|
|
85
|
+
}), $2 = t(() => {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = y2 == null ? void 0 : y2.stepItems) == null ? void 0 : _a.length) === C2.value + 1;
|
|
88
|
+
});
|
|
89
|
+
w(p2, () => {
|
|
90
|
+
if ($2.value && p2.value && d2.value) {
|
|
91
|
+
const e3 = Array.from(p2.value.querySelectorAll(".mc-step-child-item-v2") ?? []);
|
|
92
|
+
if (e3.length > 0) {
|
|
93
|
+
const t2 = e3[e3.length - 1], { top: s2 } = t2.getBoundingClientRect(), { top: l2 } = d2.value.getBoundingClientRect();
|
|
94
|
+
M2(s2 - l2 + 4);
|
|
95
|
+
} else M2(40);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const M2 = (e3) => {
|
|
99
|
+
d2.value && e3 && (d2.value.style.height = "number" == typeof e3 ? `${e3}px` : e3);
|
|
100
|
+
};
|
|
101
|
+
return l($2, (e3) => {
|
|
102
|
+
M2(e3 ? 40 : "auto");
|
|
103
|
+
}), f(N, { succeed: t(() => I2.value), actived: t(() => x2.value) }), (e3, t2) => (n(), m("div", { class: i(["mc-step-item-v2", { "mc-step-item-actived": x2.value, "mc-step-item-success": I2.value }]), style: k({ minHeight: e3.minHeight }) }, [o("div", { class: "mc-step-item-step-bar", ref_key: "stepBarRef", ref: d2 }, [o("div", Q, [I2.value ? (n(), v(_, { key: 1, class: "mc-step-item-step-bar-success-icon" })) : (n(), m("div", T, [e3.icon ? (n(), v(j, { key: 0, name: e3.icon, class: "mc-step-item-step-bar-icon" }, null, 8, ["name"])) : h(e3.$slots, "step-number", { key: 1 }, () => [S(r(C2.value + 1), 1)], true)]))])], 512), o("div", { class: "mc-step-item-content", ref_key: "contentRef", ref: p2 }, [e3.label || e3.desc ? (n(), m("div", U, [h(e3.$slots, "label", {}, () => [o("span", W, r(e3.label), 1)], true), h(e3.$slots, "desc", {}, () => [o("p", X, r(e3.desc), 1)], true)])) : u("", true), B2.value ? (n(), m("div", Y, [h(e3.$slots, "default", {}, void 0, true)])) : u("", true)], 512)], 6));
|
|
104
|
+
} }), [["__scopeId", "data-v-fe6fb14d"]]), ee = { class: "mc-step-child-item-content" }, te = { key: 0, class: "mc-step-child-item-label" }, se = { class: "mc-step-child-item-label-title" }, le = { class: "mc-step-child-item-label-desc" }, ce = { key: 1, class: "mc-step-child-item-slot" }, ae = $(e({ name: "McStepChildItemV2", __name: "mc-step-child-item-v2", props: { name: {}, label: {}, desc: {}, disabled: { type: Boolean }, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean } }, setup(e2) {
|
|
105
|
+
const s2 = e2, l2 = b(N), c2 = t(() => {
|
|
106
|
+
var _a;
|
|
107
|
+
return (_a = l2 == null ? void 0 : l2.actived) == null ? void 0 : _a.value;
|
|
108
|
+
}), a2 = t(() => {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
return ((_a = l2 == null ? void 0 : l2.succeed) == null ? void 0 : _a.value) ? (_b = l2 == null ? void 0 : l2.succeed) == null ? void 0 : _b.value : s2.succeed;
|
|
111
|
+
});
|
|
112
|
+
return (e3, t2) => (n(), m("div", { class: i(["mc-step-child-item-v2", { "mc-step-child-item-actived": c2.value, "mc-step-child-item-success": a2.value }]) }, [o("div", ee, [e3.label || e3.desc ? (n(), m("div", te, [o("span", se, r(e3.label), 1), o("p", le, r(e3.desc), 1)])) : u("", true), e3.$slots.default ? (n(), m("div", ce, [h(e3.$slots, "default", {}, void 0, true)])) : u("", true)])], 2));
|
|
113
|
+
} }), [["__scopeId", "data-v-dbb161eb"]]), me = M(P), ne = M(Z), ie = M(ae);
|
|
114
|
+
export {
|
|
115
|
+
J as M,
|
|
116
|
+
me as a,
|
|
117
|
+
ne as b,
|
|
118
|
+
ie as c
|
|
119
|
+
};
|