mc-plus 1.0.13 → 1.0.15
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-CxnUJS3d.js → hooks-62IIdhwx.js} +18 -10
- package/dist/es/index.js +32 -28
- package/dist/es/{mc-alert-s4KpYECJ.js → mc-alert-CVkSnVFX.js} +2 -2
- package/dist/es/{mc-button-BS19BIJW.js → mc-button-Cf-VG5Ur.js} +3 -3
- package/dist/es/{mc-checkbox-DVNDqYj9.js → mc-checkbox-BUZHr7Ys.js} +1 -1
- package/dist/es/{mc-collapse-Po9aR_ne.js → mc-collapse-BYJ4MrV7.js} +2 -2
- package/dist/es/{mc-form-OFkkUeNw.js → mc-form-D4r9_6sH.js} +3 -3
- package/dist/es/{mc-icon-BeM-PhUM.js → mc-icon-DgWQKpUb.js} +1 -1
- package/dist/es/{mc-input-D6rFMciN.js → mc-input-CjWUmb5Z.js} +5 -5
- package/dist/es/{mc-light-box-BOFSLPYP.js → mc-light-box-B4boq66Q.js} +2 -2
- package/dist/es/{mc-message-CzKjhY9t.js → mc-message-BtvSWZOe.js} +2 -2
- package/dist/es/{mc-radio-BqtGdBKj.js → mc-radio-J4oXq4kB.js} +1 -1
- package/dist/es/{mc-select-zjg-qgVl.js → mc-select-B-Q-U8qN.js} +4 -4
- package/dist/es/mc-step-DKmFVLGM.js +47 -0
- package/dist/es/mc-success-icon-Blkes99Z.js +9 -0
- package/dist/es/{mc-switch-CeO7jQm6.js → mc-switch-DIRBLPV8.js} +1 -1
- package/dist/es/{mc-table-iUl1p5fd.js → mc-table-BUZHg5vc.js} +33 -33
- package/dist/es/{mc-tag-NIAZfHeJ.js → mc-tag-B-7Hg5Cy.js} +2 -2
- package/dist/es/{mc-toast-CLs2RBL9.js → mc-toast-DCUN9jI3.js} +2 -2
- package/dist/es/{mc-tooltip-CnA9TYJE.js → mc-tooltip-BxH43a0w.js} +7 -7
- package/dist/es/theme/mc-step.css +1 -0
- package/dist/es/theme/mc-success-icon.css +1 -0
- package/dist/es/{utils-ylUc-vYY.js → utils-C5rkiZEb.js} +5 -5
- package/dist/es/{vendor-Cxzr_0t9.js → vendor--XeEo7ry.js} +317 -312
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/mc-step/index.d.ts +48 -0
- package/dist/types/components/mc-step/types.d.ts +23 -0
- package/dist/types/components/mc-success-icon/index.d.ts +13 -0
- package/dist/types/components/mc-table/index.d.ts +255 -3
- package/dist/types/hooks/useWindowResize.d.ts +2 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +3 -3
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getCurrentInstance as e, computed as r, isRef as t, watch as n, onMounted as o, onBeforeUnmount as a, unref as u, ref as s } from "vue";
|
|
2
|
-
import { i } from "./vendor
|
|
3
|
-
function
|
|
1
|
+
import { getCurrentInstance as e, computed as r, isRef as t, watch as n, onMounted as o, onBeforeUnmount as a, unref as u, ref as s, onUnmounted as i } from "vue";
|
|
2
|
+
import { i as c } from "./vendor--XeEo7ry.js";
|
|
3
|
+
function v(t2) {
|
|
4
4
|
const n2 = e();
|
|
5
5
|
if (!n2) throw new Error("useProp must be used within a component");
|
|
6
6
|
return r(() => {
|
|
@@ -16,25 +16,33 @@ function l(e2, r2, s2) {
|
|
|
16
16
|
return (_a = u(e2)) == null ? void 0 : _a.removeEventListener(r2, s2);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function d(e2, r2) {
|
|
20
20
|
l(document, "click", (t2) => {
|
|
21
21
|
e2.value && t2.target && (e2.value.contains(t2.target) || r2(t2));
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
function f(r2, { afterFocus: t2, beforeBlur: n2, afterBlur: o2 } = {}) {
|
|
25
|
-
const a2 = e(), { emit: u2 } = a2,
|
|
26
|
-
return l(
|
|
25
|
+
const a2 = e(), { emit: u2 } = a2, i2 = s(), v2 = s(false);
|
|
26
|
+
return l(i2, "click", () => {
|
|
27
27
|
var _a;
|
|
28
28
|
(_a = r2.value) == null ? void 0 : _a.focus();
|
|
29
|
-
}), { wrapperRef:
|
|
29
|
+
}), { wrapperRef: i2, isFocused: v2, handleFocus: (e2) => {
|
|
30
30
|
v2.value || (v2.value = true, u2("focus", e2), t2 == null ? void 0 : t2());
|
|
31
31
|
}, handleBlur: (e2) => {
|
|
32
32
|
var _a;
|
|
33
|
-
|
|
33
|
+
c(n2) && n2(e2) || e2.relatedTarget && ((_a = i2.value) == null ? void 0 : _a.contains(e2.relatedTarget)) || (v2.value = false, u2("blur", e2), o2 == null ? void 0 : o2());
|
|
34
34
|
} };
|
|
35
35
|
}
|
|
36
|
+
function m(e2) {
|
|
37
|
+
o(() => {
|
|
38
|
+
window.addEventListener("resize", e2);
|
|
39
|
+
}), i(() => {
|
|
40
|
+
window.removeEventListener("resize", e2);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
36
43
|
export {
|
|
37
44
|
f as a,
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
d as b,
|
|
46
|
+
m as c,
|
|
47
|
+
v as u
|
|
40
48
|
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { p as s, m as o } from "./utils-
|
|
2
|
-
import { M } from "./mc-alert-
|
|
3
|
-
import { M as m } from "./mc-button-
|
|
4
|
-
import { M as r } from "./mc-checkbox-
|
|
5
|
-
import { M as i } from "./mc-collapse-
|
|
6
|
-
import { a } from "./mc-collapse-
|
|
7
|
-
import { a as p } from "./mc-icon-
|
|
8
|
-
import { M as f } from "./mc-input-
|
|
9
|
-
import { M as M2, c, l } from "./mc-light-box-
|
|
10
|
-
import { M as M3, a as a2 } from "./mc-message-
|
|
11
|
-
import { M as j, a as x } from "./mc-radio-
|
|
12
|
-
import { M as g, a as n, b as h } from "./mc-select-
|
|
13
|
-
import { M as T } from "./mc-switch-
|
|
14
|
-
import "
|
|
15
|
-
import {
|
|
16
|
-
import { M as
|
|
17
|
-
import { M as
|
|
18
|
-
import { M as
|
|
19
|
-
import { M as L
|
|
20
|
-
|
|
1
|
+
import { p as s, m as o } from "./utils-C5rkiZEb.js";
|
|
2
|
+
import { M } from "./mc-alert-CVkSnVFX.js";
|
|
3
|
+
import { M as m } from "./mc-button-Cf-VG5Ur.js";
|
|
4
|
+
import { M as r } from "./mc-checkbox-BUZHr7Ys.js";
|
|
5
|
+
import { M as i } from "./mc-collapse-BYJ4MrV7.js";
|
|
6
|
+
import { a } from "./mc-collapse-BYJ4MrV7.js";
|
|
7
|
+
import { a as p } from "./mc-icon-DgWQKpUb.js";
|
|
8
|
+
import { M as f } from "./mc-input-CjWUmb5Z.js";
|
|
9
|
+
import { M as M2, c, l } from "./mc-light-box-B4boq66Q.js";
|
|
10
|
+
import { M as M3, a as a2 } from "./mc-message-BtvSWZOe.js";
|
|
11
|
+
import { M as j, a as x } from "./mc-radio-J4oXq4kB.js";
|
|
12
|
+
import { M as g, a as n, b as h } from "./mc-select-B-Q-U8qN.js";
|
|
13
|
+
import { M as T } from "./mc-switch-DIRBLPV8.js";
|
|
14
|
+
import { M as S } from "./mc-table-BUZHg5vc.js";
|
|
15
|
+
import { u, a as a3, b } from "./mc-table-BUZHg5vc.js";
|
|
16
|
+
import { M as M4 } from "./mc-tag-B-7Hg5Cy.js";
|
|
17
|
+
import { M as M5, c as c2, t, e, a as a4, b as b2, d } from "./mc-toast-DCUN9jI3.js";
|
|
18
|
+
import { M as k } from "./mc-tooltip-BxH43a0w.js";
|
|
19
|
+
import { M as L } from "./mc-step-DKmFVLGM.js";
|
|
20
|
+
import { M as P, b as w } from "./mc-form-D4r9_6sH.js";
|
|
21
|
+
import { M as y } from "./mc-success-icon-Blkes99Z.js";
|
|
22
|
+
const A = [m, i, k, S, T, j, x, g, n, h, r, L, P, w, f, p, y];
|
|
21
23
|
s();
|
|
22
|
-
const
|
|
24
|
+
const B = o(A);
|
|
23
25
|
export {
|
|
24
26
|
M as McAlert,
|
|
25
27
|
m as McButton,
|
|
26
28
|
r as McCheckbox,
|
|
27
29
|
i as McCollapse,
|
|
28
30
|
a as McCollapseItem,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
P as McForm,
|
|
32
|
+
w as McFormItem,
|
|
31
33
|
p as McIcon,
|
|
32
34
|
f as McInput,
|
|
33
35
|
M2 as McLightBox,
|
|
@@ -37,15 +39,17 @@ export {
|
|
|
37
39
|
g as McSelect,
|
|
38
40
|
n as McSelectGroup,
|
|
39
41
|
h as McSelectOption,
|
|
42
|
+
L as McStep,
|
|
43
|
+
y as McSuccessIcon,
|
|
40
44
|
T as McSwitch,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
S as McTable,
|
|
46
|
+
M4 as McTag,
|
|
47
|
+
M5 as McToast,
|
|
48
|
+
k as McTooltip,
|
|
45
49
|
a2 as Message,
|
|
46
50
|
c as createLightbox,
|
|
47
51
|
c2 as createToast,
|
|
48
|
-
|
|
52
|
+
B as default,
|
|
49
53
|
l as lightbox,
|
|
50
54
|
t as toast,
|
|
51
55
|
e as toastError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, w as t } from "./utils-
|
|
1
|
+
import { _ as e, w as t } from "./utils-C5rkiZEb.js";
|
|
2
2
|
import { defineComponent as s, ref as l, useAttrs as c, computed as i, createElementBlock as o, createCommentVNode as a, openBlock as r, normalizeClass as n, normalizeStyle as d, createElementVNode as _, createBlock as m, renderSlot as p, toDisplayString as y } from "vue";
|
|
3
|
-
import { M as f } from "./mc-icon-
|
|
3
|
+
import { M as f } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const v = { class: "mc-alert__content" }, h = { class: "mc-alert__header" }, u = { class: "mc-alert__header-left" }, k = { key: 1, class: "mc-alert__title" }, w = { key: 0, class: "mc-alert__description" }, g = { key: 1, class: "mc-alert__description" }, I = t(e(s({ name: "McAlert", __name: "mc-alert", props: { type: { default: "info" }, title: {}, description: {}, closable: { type: Boolean, default: true }, showIcon: { type: Boolean, default: true }, height: {}, width: {} }, emits: ["close"], setup(e2, { expose: t2, emit: s2 }) {
|
|
5
5
|
const I2 = e2, b = s2, M = l(), $ = l(true), j = c(), x = i(() => ({ ...j.style || {}, width: I2.width, height: I2.height })), z = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, A = (e3) => {
|
|
6
6
|
$.value = false, b("close", e3);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as e, toRefs as t, ref as o, useAttrs as a, computed as i, toValue as l, createElementBlock as n, openBlock as s, unref as d, normalizeClass as u, normalizeStyle as r, createBlock as c, createCommentVNode as m, renderSlot as p, createVNode as f } from "vue";
|
|
2
|
-
import { M as v } from "./mc-icon-
|
|
3
|
-
import { t as y } from "./vendor
|
|
4
|
-
import { _ as h, w as b } from "./utils-
|
|
2
|
+
import { M as v } from "./mc-icon-DgWQKpUb.js";
|
|
3
|
+
import { t as y } from "./vendor--XeEo7ry.js";
|
|
4
|
+
import { _ as h, w as b } from "./utils-C5rkiZEb.js";
|
|
5
5
|
const g = ["type", "disabled"], k = { key: 1, class: "loading-icon" }, I = b(h(e({ name: "McButton", __name: "mc-button", props: { type: { default: "primary" }, nativeType: { default: "button" }, size: { default: "medium" }, disabled: { type: Boolean }, loading: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 }, leftIcon: {}, rightIcon: {}, content: {}, height: {}, width: {} }, emits: ["click"], setup(e2, { expose: h2, emit: b2 }) {
|
|
6
6
|
const I2 = e2, { loading: _, disabled: w, throttleDuration: B, height: T, width: j } = t(I2), z = b2, M = o(), $ = t(a()), x = i(() => ({ ...l($).style, width: j.value ? j.value : void 0, height: T.value ? T.value : void 0 })), D = (e3) => {
|
|
7
7
|
_.value || w.value || z("click", e3);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as c, openBlock as a, normalizeStyle as l, normalizeClass as o, createElementVNode as s, toDisplayString as t } from "vue";
|
|
2
|
-
import { _ as m, w as d } from "./utils-
|
|
2
|
+
import { _ as m, w as d } from "./utils-C5rkiZEb.js";
|
|
3
3
|
const n = ["value", "disabled"], p = { class: "mc-checkbox__wrapper" }, b = { class: "mc-checkbox__content" }, k = { class: "mc-checkbox__content-text" }, h = { class: "mc-checkbox__content-remarks" }, i = d(m(e({ name: "McCheckbox", __name: "mc-checkbox", props: { modelValue: { type: Boolean }, disabled: { type: Boolean }, content: {}, remarks: {}, partial: { type: Boolean } }, emits: ["change", "update:modelValue"], setup(e2, { emit: m2 }) {
|
|
4
4
|
const d2 = e2, i2 = m2, r = () => {
|
|
5
5
|
d2.disabled || (i2("update:modelValue", !d2.modelValue), i2("change", !d2.modelValue));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as a, watchEffect as l, watch as s, provide as o, createElementBlock as c, openBlock as t, renderSlot as i, inject as m, computed as d, normalizeClass as n, createElementVNode as p, withDirectives as u, createTextVNode as r, toDisplayString as v, createVNode as _, vShow as h } from "vue";
|
|
2
|
-
import { d as f, _ as C, w as V } from "./utils-
|
|
3
|
-
import { M as b } from "./mc-icon-
|
|
2
|
+
import { d as f, _ as C, w as V } from "./utils-C5rkiZEb.js";
|
|
3
|
+
import { M as b } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const g = Symbol("COLLAPSE_CONTEXT"), I = "McCollapse", M = { class: "mc-collapse" }, k = C(e({ name: I, __name: "mc-collapse", props: { modelValue: {}, accordion: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: m2 }) {
|
|
5
5
|
const d2 = a(e2.modelValue), n2 = m2;
|
|
6
6
|
l(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject as e, computed as r, defineComponent as a, reactive as t, toRefs as s, provide as o, createElementBlock as l, openBlock as i, createElementVNode as d, renderSlot as u, ref as n, onMounted as c, onUnmounted as m, createCommentVNode as p, createVNode as v, normalizeClass as f, toDisplayString as _, Transition as b, withCtx as g, nextTick as h } from "vue";
|
|
2
|
-
import { u as y } from "./hooks-
|
|
3
|
-
import { s as F, f as j, a as q, k as P, b as w, c as x, m as I, d as k, g as M, e as S, h as V, j as B } from "./vendor
|
|
4
|
-
import { _ as C, w as $ } from "./utils-
|
|
2
|
+
import { u as y } from "./hooks-62IIdhwx.js";
|
|
3
|
+
import { s as F, f as j, a as q, k as P, b as w, c as x, m as I, d as k, g as M, e as S, h as V, j as B } from "./vendor--XeEo7ry.js";
|
|
4
|
+
import { _ as C, w as $ } from "./utils-C5rkiZEb.js";
|
|
5
5
|
import E from "async-validator";
|
|
6
6
|
const O = Symbol("formContext"), z = Symbol("formItemContext");
|
|
7
7
|
function A() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as s, createElementBlock as c, openBlock as i, normalizeStyle as o, createElementVNode as n, normalizeClass as t } from "vue";
|
|
2
|
-
import { _ as a, w as m } from "./utils-
|
|
2
|
+
import { _ as a, w as m } from "./utils-C5rkiZEb.js";
|
|
3
3
|
const r = a(e({ name: "McIcon", __name: "mc-icon", props: { name: {}, size: { default: 16 }, color: {} }, emits: ["click"], setup(e2, { expose: a2, emit: m2 }) {
|
|
4
4
|
const r2 = m2, p2 = s();
|
|
5
5
|
return a2({ ref: p2 }), (e3, s2) => (i(), c("span", { class: "mc-icon", style: o({ fontSize: `${e3.size}px`, width: `${e3.size}px`, height: `${e3.size}px` }) }, [n("i", { ref_key: "_ref", ref: p2, class: t(["mc-iconfont", `mc-icon--${e3.name}`]), onClick: s2[0] || (s2[0] = (e4) => ((e5) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e, ref as a, computed as t, onMounted as u, watch as l, createElementBlock as s, openBlock as r, normalizeStyle as c, normalizeClass as o, unref as n, createCommentVNode as i, createElementVNode as p, renderSlot as d, createBlock as m, createVNode as f, Fragment as v, nextTick as y } from "vue";
|
|
2
|
-
import { M as h } from "./mc-icon-
|
|
3
|
-
import { u as x, a as _ } from "./mc-form-
|
|
4
|
-
import { a as g } from "./hooks-
|
|
5
|
-
import { b as w, l as b, c as I, i as k } from "./vendor
|
|
6
|
-
import { _ as $, w as V } from "./utils-
|
|
2
|
+
import { M as h } from "./mc-icon-DgWQKpUb.js";
|
|
3
|
+
import { u as x, a as _ } from "./mc-form-D4r9_6sH.js";
|
|
4
|
+
import { a as g } from "./hooks-62IIdhwx.js";
|
|
5
|
+
import { b as w, l as b, c as I, i as k } from "./vendor--XeEo7ry.js";
|
|
6
|
+
import { _ as $, w as V } from "./utils-C5rkiZEb.js";
|
|
7
7
|
const j = { key: 0, class: "mc-input__prefix" }, B = ["type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "maxlength"], R = { key: 2, class: "mc-input__password" }, A = { key: 0, class: "mc-input__suffix" }, z = V($(e({ name: "McInput", inheritAttrs: false, __name: "mc-input", props: { modelValue: {}, width: {}, height: {}, 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: {}, formatter: {}, parser: {} }, emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"], setup(e2, { expose: $2, emit: V2 }) {
|
|
8
8
|
const z2 = e2, { formatter: F, parser: M } = z2, S = V2, C = a(), H = t(() => I(z2.modelValue) ? "" : b(z2.modelValue)), P = (e3) => ("number" === z2.type ? e3 = ((e4) => e4.replace(/[^\d]/g, ""))(e3) : "currency" === z2.type && (e3 = ((e4, a2 = 8) => {
|
|
9
9
|
e4 = e4.replace(/(?:[^0-9.]+)/g, "");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, computed as o, watch as l, createBlock as s, openBlock as i, Teleport as n, createVNode as a, Transition as c, withCtx as d, createElementBlock as m, createCommentVNode as u, withModifiers as h, createElementVNode as r, normalizeStyle as p, normalizeClass as y, toDisplayString as g, renderSlot as x, isVNode as f, render as v } from "vue";
|
|
2
|
-
import { _ as b, w as C } from "./utils-
|
|
3
|
-
import { M as _ } from "./mc-icon-
|
|
2
|
+
import { _ as b, w as C } from "./utils-C5rkiZEb.js";
|
|
3
|
+
import { M as _ } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const k = { class: "mc-lightbox__header" }, w = { class: "mc-lightbox__header-title" }, z = { key: 0, class: "mc-lightbox__header-title-text" }, V = { class: "mc-lightbox__body" }, B = { class: "mc-lightbox__content" }, T = { key: 0 }, $ = { key: 0, class: "mc-lightbox__footer" }, I = { key: 1, class: "mc-lightbox-footer-placeholder" }, j = b(e({ name: "McLightBox", __name: "mc-light-box", props: { modelValue: { type: Boolean, default: false }, title: { default: "" }, content: { default: "" }, showClose: { type: Boolean, default: true }, size: { default: "medium" }, position: { default: "center" }, maskClosable: { type: Boolean, default: true }, onClose: {}, onConfirm: {} }, emits: ["update:modelValue", "close", "confirm"], setup(e2, { expose: f2, emit: v2 }) {
|
|
5
5
|
const b2 = { small: { width: "430px", height: "512px" }, medium: { width: "800px", height: "512px" }, large: { width: "1024px", height: "700px" } }, C2 = e2, j2 = v2, E2 = t(), M2 = t(false), L2 = t(false), N2 = o(() => {
|
|
6
6
|
const e3 = b2[C2.size];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, w as s } from "./utils-
|
|
1
|
+
import { _ as e, w as s } from "./utils-C5rkiZEb.js";
|
|
2
2
|
import { defineComponent as o, ref as n, toRefs as t, useAttrs as a, computed as c, toValue as r, onMounted as l, createBlock as m, openBlock as i, Transition as d, withCtx as u, withDirectives as p, createElementVNode as f, normalizeStyle as g, normalizeClass as _, createCommentVNode as y, toDisplayString as v, vShow as h, render as C, createVNode as w } from "vue";
|
|
3
|
-
import { M as b } from "./mc-icon-
|
|
3
|
+
import { M as b } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const E = { class: "mc-message__content" }, I = { class: "mc-message__title" }, k = e(o({ name: "McMessage", __name: "mc-message", props: { type: { default: "info" }, message: { default: "" }, duration: { default: 3e3 }, showIcon: { type: Boolean, default: true }, closable: { type: Boolean, default: false }, onClose: {} }, emits: ["close"], setup(e2, { expose: s2, emit: o2 }) {
|
|
5
5
|
const C2 = e2, w2 = o2, k2 = n(), x2 = n(true), M2 = t(a()), A2 = c(() => ({ ...r(M2).style })), B2 = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, j2 = () => {
|
|
6
6
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as a, provide as e, computed as l, createElementBlock as d, openBlock as s, renderSlot as o, inject as r, normalizeClass as i, createElementVNode as c, createTextVNode as m, toDisplayString as t } from "vue";
|
|
2
|
-
import { _ as u, w as n } from "./utils-
|
|
2
|
+
import { _ as u, w as n } from "./utils-C5rkiZEb.js";
|
|
3
3
|
const p = Symbol("selectContext"), v = { class: "mc-radio-group" }, b = u(a({ name: "McRadioGroup", __name: "mc-radio-group", props: { modelValue: {}, disabled: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(a2, { emit: r2 }) {
|
|
4
4
|
const i2 = a2, c2 = r2;
|
|
5
5
|
return e(p, { modelValue: l(() => i2.modelValue), disabled: l(() => i2.disabled), handleSelect: (a3) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as e, ref as l, computed as a, watch as t, provide as s, createElementBlock as o, openBlock as c, normalizeStyle as d, normalizeClass as i, createElementVNode as u, createVNode as n, createCommentVNode as v, createBlock as r, resolveDynamicComponent as p, withDirectives as m, vModelText as h, Transition as f, withCtx as g, renderSlot as _, createTextVNode as b, vShow as y, inject as w, useSlots as k, onMounted as V, onBeforeUnmount as O, h as S, toDisplayString as x, toRefs as C, useAttrs as M, toValue as j } from "vue";
|
|
2
|
-
import { M as I } from "./mc-icon-
|
|
3
|
-
import { b as $ } from "./hooks-
|
|
4
|
-
import { c as A, n as N } from "./vendor
|
|
5
|
-
import { _ as B, w as G } from "./utils-
|
|
2
|
+
import { M as I } from "./mc-icon-DgWQKpUb.js";
|
|
3
|
+
import { b as $ } from "./hooks-62IIdhwx.js";
|
|
4
|
+
import { c as A, n as N } from "./vendor--XeEo7ry.js";
|
|
5
|
+
import { _ as B, w as G } from "./utils-C5rkiZEb.js";
|
|
6
6
|
const D = Symbol("selectContext"), P = Symbol("selectGroupContext"), T = { key: 0, class: "mc-select-selected-content" }, U = { class: "mc-select-input-wrapper" }, q = ["placeholder", "readonly", "disabled"], z = { class: "mc-select-dropdown-wrapper" }, E = { class: "mc-select-dropdown" }, F = { key: 0, class: "mc-select-no-data" }, H = B(e({ name: "McSelect", inheritAttrs: false, __name: "mc-select", props: { modelValue: { default: "" }, placeholder: { default: "Please select" }, disabled: { type: Boolean }, type: { default: "single" }, width: {}, height: {}, search: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: w2 }) {
|
|
7
7
|
const k2 = e2, V2 = w2, O2 = l([]), S2 = a(() => A(P2.value) ? O2.value : O2.value.filter((e3) => N(e3.label ?? e3.value).includes(N(P2.value)))), x2 = a(() => 0 === S2.value.length), C2 = l(false), M2 = () => {
|
|
8
8
|
C2.value = !C2.value;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as e, computed as t, watch as s, nextTick as c, ref as l, onMounted as n, createElementBlock as a, openBlock as m, normalizeClass as i, createElementVNode as o, Fragment as u, renderList as r, createBlock as p, toDisplayString as d, createCommentVNode as v, Transition as f, withCtx as y, resolveDynamicComponent as g } from "vue";
|
|
2
|
+
import { _ as k } from "./mc-success-icon-Blkes99Z.js";
|
|
3
|
+
import { c as h } from "./hooks-62IIdhwx.js";
|
|
4
|
+
import { o as _, t as b } from "./vendor--XeEo7ry.js";
|
|
5
|
+
import { _ as R, w as S } from "./utils-C5rkiZEb.js";
|
|
6
|
+
const x = { class: "mc-step-number-container" }, B = { class: "mc-step-item-number" }, C = { key: 0, class: "mc-step-item-number-text" }, V = { class: "mc-step-item-content" }, j = { class: "mc-step-item-label" }, q = { class: "mc-step-item-desc" }, w = { key: 0, class: "mc-step-item-component" }, A = S(R(e({ name: "McStep", inheritAttrs: false, __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: R2, emit: S2 }) {
|
|
7
|
+
const A2 = e2, Y = t(() => "vertical" === A2.type), $ = S2;
|
|
8
|
+
s(() => A2.modelValue, async (e3) => {
|
|
9
|
+
var _a;
|
|
10
|
+
await c();
|
|
11
|
+
const t2 = (_a = A2.steps[I.value - 1]) == null ? void 0 : _a.key;
|
|
12
|
+
D(t2), Y.value && F(), $("change", e3);
|
|
13
|
+
});
|
|
14
|
+
const L = l(), M = l(), X = l(), I = t(() => _(A2.steps, (e3) => e3.key === A2.modelValue)), z = l(), D = (e3) => {
|
|
15
|
+
z.value = e3, $("success", e3);
|
|
16
|
+
}, E = t(() => _(A2.steps, (e3) => e3.key === z.value));
|
|
17
|
+
n(() => {
|
|
18
|
+
Y.value ? F() : (G(), H());
|
|
19
|
+
});
|
|
20
|
+
const F = () => {
|
|
21
|
+
const e3 = E.value, t2 = X.value;
|
|
22
|
+
if (e3 < 0) return void (t2.style.transform = "scaleY(0)");
|
|
23
|
+
const s2 = L.value, c2 = s2.querySelectorAll(".mc-step-item");
|
|
24
|
+
if (e3 + 1 > c2.length - 1) return void (t2.style.transform = "scaleY(1)");
|
|
25
|
+
const l2 = c2 == null ? void 0 : c2[e3 + 1], n2 = s2.getBoundingClientRect(), a2 = (l2.getBoundingClientRect().top - n2.top) / (n2.height - 24);
|
|
26
|
+
t2.style.transform = `scaleY(${a2})`;
|
|
27
|
+
}, G = () => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const e3 = L.value, t2 = M.value, s2 = e3.querySelectorAll(".mc-step-item"), c2 = (_a = s2 == null ? void 0 : s2[0]) == null ? void 0 : _a.querySelector(".mc-step-item-number"), l2 = (_b = s2 == null ? void 0 : s2[s2.length - 1]) == null ? void 0 : _b.querySelector(".mc-step-item-number");
|
|
30
|
+
if (!c2 || !l2) return void (t2.style.width = "0px");
|
|
31
|
+
const n2 = e3.getBoundingClientRect(), a2 = c2.getBoundingClientRect(), m2 = l2.getBoundingClientRect();
|
|
32
|
+
t2.style.width = m2.left - a2.left + "px", t2.style.left = a2.left - n2.left + "px";
|
|
33
|
+
}, H = () => {
|
|
34
|
+
const e3 = X.value, t2 = E.value;
|
|
35
|
+
if (t2 < 0) return void (e3.style.transform = "scaleX(0)");
|
|
36
|
+
const s2 = (t2 + 1) / (A2.steps.length - 1), c2 = s2 > 1 ? 1 : s2;
|
|
37
|
+
e3.style.transform = `scaleX(${c2})`;
|
|
38
|
+
};
|
|
39
|
+
return s(() => z.value, () => {
|
|
40
|
+
Y.value ? F() : H();
|
|
41
|
+
}), h(b(() => {
|
|
42
|
+
Y.value ? F() : (G(), H());
|
|
43
|
+
}, 50)), R2({ ref: L, setSuccessStep: D }), (e3, t2) => (m(), a("div", { class: i(["mc-step", `mc-step-${e3.type}`]), ref_key: "_ref", ref: L }, [(m(true), a(u, null, r(e3.steps, (t3, s2) => (m(), a("div", { class: i(["mc-step-item", { "mc-step-item-active": e3.modelValue === t3.key, "mc-step-item-disabled": t3.disabled, "mc-step-item-success": s2 <= E.value }]), key: t3.key }, [o("div", x, [o("div", B, [s2 > E.value || t3.disabled ? (m(), a("span", C, d(s2 + 1), 1)) : (m(), p(k, { key: 1 }))])]), o("div", V, [o("h3", j, d(t3.label), 1), o("p", q, d(t3.desc), 1), Y.value ? (m(), p(f, { key: 0, name: "mc-step-item-component" }, { default: y(() => [t3.component && t3.key === e3.modelValue ? (m(), a("div", w, [(m(), p(g(t3.component)))])) : v("", true)]), _: 2 }, 1024)) : v("", true)])], 2))), 128)), o("div", { ref_key: "unsuccessLineRef", ref: M, class: "mc-step-line mc-step-unsuccess-line" }, [o("div", { ref_key: "successLineRef", ref: X, class: "mc-step-success-line" }, null, 512)], 512)], 2));
|
|
44
|
+
} }), [["__scopeId", "data-v-f4002da3"]]));
|
|
45
|
+
export {
|
|
46
|
+
A as M
|
|
47
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as s, createElementVNode as e } from "vue";
|
|
2
|
+
import { _ as r, w as n } from "./utils-C5rkiZEb.js";
|
|
3
|
+
const t = { class: "success-icon", width: "400", height: "400", viewBox: "0 0 400 400" }, i = r({}, [["render", function(r2, n2) {
|
|
4
|
+
return s(), o("svg", t, n2[0] || (n2[0] = [e("circle", { class: "circle", fill: "none", transform: "rotate(-90 200 200)", "stroke-width": "20", cx: "200", cy: "200", r: "190", "stroke-linecap": "round" }, null, -1), e("polyline", { class: "tick", fill: "none", "stroke-width": "26", points: "120,214 173,260 274,160", "stroke-linecap": "round", "stroke-linejoin": "round" }, null, -1)]));
|
|
5
|
+
}], ["__scopeId", "data-v-9da310d1"]]), l = n(i);
|
|
6
|
+
export {
|
|
7
|
+
l as M,
|
|
8
|
+
i as _
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as l, createElementBlock as a, openBlock as s, createElementVNode as t, normalizeClass as d, createCommentVNode as o, normalizeStyle as c, toDisplayString as i, renderSlot as m, createTextVNode as u } from "vue";
|
|
2
|
-
import { _ as p, w as n } from "./utils-
|
|
2
|
+
import { _ as p, w as n } from "./utils-C5rkiZEb.js";
|
|
3
3
|
const f = { class: "mc-switch-wrapper" }, r = ["disabled", "value"], b = { key: 0, class: "mc-switch-text" }, h = { key: 0, class: "mc-switch-label" }, w = n(p(e({ name: "McSwitch", __name: "mc-switch", props: { modelValue: { type: Boolean, default: false }, width: {}, label: {}, disabled: { type: Boolean, default: false }, onText: {}, offText: {} }, emits: ["update:modelValue"], setup(e2, { expose: p2, emit: n2 }) {
|
|
4
4
|
const w2 = e2, x = n2, y = l(), V = () => {
|
|
5
5
|
w2.disabled || x("update:modelValue", !w2.modelValue);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as e, computed as a, createElementBlock as l, createCommentVNode as n, openBlock as t, normalizeClass as o, renderSlot as i, Fragment as s, createTextVNode as c, toDisplayString as r, useSlots as u, ref as p, normalizeStyle as d, createElementVNode as g, renderList as m, createVNode as v, unref as h, createBlock as f, createSlots as _, withCtx as b, mergeProps as y, watch as w, withDirectives as x, vModelSelect as k, onMounted as S, nextTick as C, toRefs as z, normalizeProps as I, guardReactiveProps as M } from "vue";
|
|
2
|
-
import { M as R } from "./mc-checkbox-
|
|
3
|
-
import { _ as
|
|
4
|
-
import { M as
|
|
5
|
-
const
|
|
2
|
+
import { M as R } from "./mc-checkbox-BUZHr7Ys.js";
|
|
3
|
+
import { _ as $, w as P } from "./utils-C5rkiZEb.js";
|
|
4
|
+
import { M as H } from "./mc-icon-DgWQKpUb.js";
|
|
5
|
+
const W = ["rowspan", "colspan"], O = $(e({ __name: "mc-table-cell", props: { row: {}, column: {}, rowIndex: {}, columnIndex: {}, pagination: {}, spanMethod: { type: Function } }, setup(e2) {
|
|
6
6
|
const u2 = e2, p2 = a(() => {
|
|
7
7
|
if (u2.spanMethod) {
|
|
8
8
|
const e3 = u2.pagination && u2.pagination.currentPage && u2.pagination.pageSize ? (u2.pagination.currentPage - 1) * u2.pagination.pageSize + u2.rowIndex : u2.rowIndex, a2 = u2.spanMethod({ row: u2.row, column: u2.column, rowIndex: e3, columnIndex: u2.columnIndex });
|
|
@@ -39,28 +39,28 @@ const H = ["rowspan", "colspan"], W = $(e({ __name: "mc-table-cell", props: { ro
|
|
|
39
39
|
}
|
|
40
40
|
return true;
|
|
41
41
|
});
|
|
42
|
-
return (e3, a2) => g2.value ? (t(), l("td", { key: 0, class: o([e3.column.className, e3.column.align ? `is-${e3.column.align}` : "", e3.column.fixed ? `is-fixed-${"boolean" == typeof e3.column.fixed ? "left" : e3.column.fixed}` : "", "is-display-" + (0 === d2.value ? "none" : "table-cell")]), rowspan: p2.value, colspan: d2.value }, [i(e3.$slots, "cell", { row: e3.row, column: e3.column, $index: e3.rowIndex, value: e3.row[e3.column.prop], prop: e3.column.prop }, () => [i(e3.$slots, e3.column.slot || e3.column.prop, { row: e3.row, column: e3.column, $index: e3.rowIndex, value: e3.row[e3.column.prop] }, () => [e3.column.formatter ? (t(), l(s, { key: 0 }, [c(r(e3.column.formatter(e3.row, e3.column, e3.row[e3.column.prop], e3.rowIndex)), 1)], 64)) : (t(), l(s, { key: 1 }, [c(r(e3.row[e3.column.prop]), 1)], 64))], true)], true)], 10,
|
|
43
|
-
} }), [["__scopeId", "data-v-5892a88f"]]),
|
|
42
|
+
return (e3, a2) => g2.value ? (t(), l("td", { key: 0, class: o([e3.column.className, e3.column.align ? `is-${e3.column.align}` : "", e3.column.fixed ? `is-fixed-${"boolean" == typeof e3.column.fixed ? "left" : e3.column.fixed}` : "", "is-display-" + (0 === d2.value ? "none" : "table-cell")]), rowspan: p2.value, colspan: d2.value }, [i(e3.$slots, "cell", { row: e3.row, column: e3.column, $index: e3.rowIndex, value: e3.row[e3.column.prop], prop: e3.column.prop }, () => [i(e3.$slots, e3.column.slot || e3.column.prop, { row: e3.row, column: e3.column, $index: e3.rowIndex, value: e3.row[e3.column.prop] }, () => [e3.column.formatter ? (t(), l(s, { key: 0 }, [c(r(e3.column.formatter(e3.row, e3.column, e3.row[e3.column.prop], e3.rowIndex)), 1)], 64)) : (t(), l(s, { key: 1 }, [c(r(e3.row[e3.column.prop]), 1)], 64))], true)], true)], 10, W)) : n("", true);
|
|
43
|
+
} }), [["__scopeId", "data-v-5892a88f"]]), D = { class: "mc-table__body", cellspacing: "0", cellpadding: "0", border: "0" }, B = { key: 0, width: "50" }, L = ["width"], T = ["onClick"], A = { key: 0, class: "mc-table__selection-column" }, K = { class: "mc-table__cell" }, N = { key: 1 }, j = ["colspan"], E = { key: 1 }, F = $(e({ __name: "mc-table-body", props: { data: {}, columns: {}, rowKey: {}, emptyText: {}, height: {}, maxHeight: {}, pagination: {}, spanMethod: {}, getRowClass: {}, selectable: { type: Boolean, default: false }, selectedRows: {}, selectOnRowClick: { type: Boolean, default: false } }, emits: ["row-click", "select"], setup(e2, { expose: c2, emit: w2 }) {
|
|
44
44
|
const x2 = e2, k2 = u(), S2 = w2, C2 = p(), z2 = a(() => {
|
|
45
45
|
const e3 = {};
|
|
46
46
|
return x2.height && (e3.height = "number" == typeof x2.height ? `${x2.height}px` : x2.height), x2.maxHeight && (e3.maxHeight = "number" == typeof x2.maxHeight ? `${x2.maxHeight}px` : x2.maxHeight), e3;
|
|
47
47
|
}), I2 = (e3) => !!x2.selectedRows && x2.selectedRows.some((a2) => x2.rowKey ? a2[x2.rowKey] === e3[x2.rowKey] : a2 === e3);
|
|
48
|
-
return c2({ bodyWrapper: C2 }), (e3, a2) => (t(), l("div", { class: "mc-table__body-wrapper", ref_key: "bodyWrapper", ref: C2, style: d(z2.value) }, [g("table",
|
|
48
|
+
return c2({ bodyWrapper: C2 }), (e3, a2) => (t(), l("div", { class: "mc-table__body-wrapper", ref_key: "bodyWrapper", ref: C2, style: d(z2.value) }, [g("table", D, [g("colgroup", null, [e3.selectable ? (t(), l("col", B)) : n("", true), (t(true), l(s, null, m(e3.columns, (e4, a3) => (t(), l("col", { key: a3, width: e4.width }, null, 8, L))), 128))]), g("tbody", null, [e3.data && e3.data.length > 0 ? (t(true), l(s, { key: 0 }, m(e3.data, (a3, c3) => (t(), l("tr", { key: e3.rowKey ? a3[e3.rowKey] : c3, class: o(e3.getRowClass ? e3.getRowClass(a3, c3) : []), onClick: (e4) => function(e5, a4) {
|
|
49
49
|
S2("row-click", e5, a4);
|
|
50
|
-
}(a3, c3) }, [e3.selectable ? (t(), l("td",
|
|
50
|
+
}(a3, c3) }, [e3.selectable ? (t(), l("td", A, [g("div", K, [v(h(R), { "model-value": I2(a3), onChange: (e4) => function(e5, a4) {
|
|
51
51
|
S2("select", e5, a4);
|
|
52
|
-
}(a3, e4) }, null, 8, ["model-value", "onChange"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (l2, n2) => (t(), f(
|
|
53
|
-
} }), [["__scopeId", "data-v-a0a8dc5a"]]),
|
|
52
|
+
}(a3, e4) }, null, 8, ["model-value", "onChange"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (l2, n2) => (t(), f(O, { key: n2, row: a3, column: l2, "row-index": c3, "column-index": n2, "span-method": e3.spanMethod, pagination: e3.pagination }, _({ _: 2 }, [m(Object.keys(e3.$slots), (a4) => ({ name: a4, fn: b((l3) => [i(e3.$slots, a4, y({ ref_for: true }, l3), void 0, true)]) }))]), 1032, ["row", "column", "row-index", "column-index", "span-method", "pagination"]))), 128))], 10, T))), 128)) : (t(), l("tr", N, [g("td", { colspan: e3.selectable ? e3.columns.length + 1 : e3.columns.length, class: "mc-table__empty-cell" }, [h(k2).empty ? i(e3.$slots, "empty", { key: 0 }, void 0, true) : (t(), l("div", E, r(e3.emptyText), 1))], 8, j)]))])])], 4));
|
|
53
|
+
} }), [["__scopeId", "data-v-a0a8dc5a"]]), U = { class: "mc-table__header", cellspacing: "0", cellpadding: "0", border: "0" }, V = { key: 0, width: "50" }, q = ["width"], G = { key: 0, class: "mc-table__selection-column" }, J = { class: "mc-table__header-cell" }, Q = ["onClick"], X = { class: "mc-table__header-cell" }, Y = { class: "mc-table__header-label" }, Z = { key: 0, class: "mc-table__sort-caret" }, ee = $(e({ __name: "mc-table-header", props: { columns: {}, showHeader: { type: Boolean, default: true }, getSortOrder: { type: Function, default: () => null }, selectable: { type: Boolean, default: false }, isAllSelected: { type: Boolean, default: false }, isIndeterminate: { type: Boolean, default: false } }, emits: ["header-click", "sort-change", "select-all"], setup(e2, { expose: a2, emit: u2 }) {
|
|
54
54
|
const d2 = e2, _2 = u2, b2 = p(), y2 = (e3) => {
|
|
55
55
|
_2("select-all", e3);
|
|
56
56
|
}, w2 = (e3) => {
|
|
57
57
|
const a3 = d2.getSortOrder(e3);
|
|
58
58
|
return "asc" === a3 ? "is-sort-asc" : "desc" === a3 ? "is-sort-desc" : "";
|
|
59
59
|
};
|
|
60
|
-
return a2({ headerWrapper: b2 }), (e3, a3) => e3.showHeader ? (t(), l("div", { key: 0, class: "mc-table__header-wrapper", ref_key: "headerWrapper", ref: b2 }, [g("table",
|
|
60
|
+
return a2({ headerWrapper: b2 }), (e3, a3) => e3.showHeader ? (t(), l("div", { key: 0, class: "mc-table__header-wrapper", ref_key: "headerWrapper", ref: b2 }, [g("table", U, [g("colgroup", null, [e3.selectable ? (t(), l("col", V)) : n("", true), (t(true), l(s, null, m(e3.columns, (e4, a4) => (t(), l("col", { key: a4, width: e4.width }, null, 8, q))), 128))]), g("thead", null, [g("tr", null, [e3.selectable ? (t(), l("th", G, [g("div", J, [v(h(R), { "model-value": e3.isAllSelected, partial: e3.isIndeterminate, onChange: y2 }, null, 8, ["model-value", "partial"])])])) : n("", true), (t(true), l(s, null, m(e3.columns, (a4, s2) => (t(), l("th", { key: s2, class: o([a4.headerClassName, a4.align ? `is-${a4.align}` : "", a4.fixed ? `is-fixed-${"boolean" == typeof a4.fixed ? "left" : a4.fixed}` : "", a4.sortable ? "is-sortable" : "", w2(a4.prop)]), onClick: (e4) => ((e5, a5) => {
|
|
61
61
|
e5.sortable && _2("sort-change", e5), _2("header-click", e5, a5);
|
|
62
|
-
})(a4, e4) }, [g("div",
|
|
63
|
-
} }), [["__scopeId", "data-v-04e7c4a9"]]),
|
|
62
|
+
})(a4, e4) }, [g("div", X, [g("span", Y, [i(e3.$slots, `header-${a4.slot || a4.prop}`, { column: a4, index: s2 }, () => [c(r(a4.label), 1)], true)]), a4.sortable ? (t(), l("span", Z, ["asc" === e3.getSortOrder(a4.prop) ? (t(), f(H, { key: 0, name: "Up-Chevron02", class: o(["mc-table__sort-icon", { "is-active": "asc" === e3.getSortOrder(a4.prop) }]) }, null, 8, ["class"])) : (t(), f(H, { key: 1, name: "Down-Chevron02", class: o(["mc-table__sort-icon", { "is-active": "desc" === e3.getSortOrder(a4.prop) }]) }, null, 8, ["class"]))])) : n("", true)])], 10, Q))), 128))])])])], 512)) : n("", true);
|
|
63
|
+
} }), [["__scopeId", "data-v-04e7c4a9"]]), ae = { class: "mc-table__loading-content" }, le = { class: "mc-table__loading-spinner" }, ne = { key: 0, class: "mc-table__spinner mc-table__spinner--default" }, te = { key: 1, class: "mc-table__spinner mc-table__spinner--circle" }, oe = { key: 2, class: "mc-table__spinner mc-table__spinner--pulse" }, ie = ["innerHTML"], se = { key: 0, class: "mc-table__loading-text" }, ce = $(e({ __name: "mc-table-loading", props: { loading: { type: Boolean, default: false }, loadingText: { default: "Loading..." }, loadingConfig: { default: () => ({ spinner: "default" }) } }, setup(e2) {
|
|
64
64
|
const s2 = e2, c2 = a(() => {
|
|
65
65
|
var _a;
|
|
66
66
|
return ((_a = s2.loadingConfig) == null ? void 0 : _a.text) || s2.loadingText;
|
|
@@ -71,12 +71,12 @@ const H = ["rowspan", "colspan"], W = $(e({ __name: "mc-table-cell", props: { ro
|
|
|
71
71
|
});
|
|
72
72
|
return (e3, a2) => {
|
|
73
73
|
var _a;
|
|
74
|
-
return e3.loading ? (t(), l("div", { key: 0, class: o(["mc-table__loading-wrapper", ["mc-table__loading-wrapper", (_a = e3.loadingConfig) == null ? void 0 : _a.customClass]]), style: d(u2.value) }, [g("div",
|
|
74
|
+
return e3.loading ? (t(), l("div", { key: 0, class: o(["mc-table__loading-wrapper", ["mc-table__loading-wrapper", (_a = e3.loadingConfig) == null ? void 0 : _a.customClass]]), style: d(u2.value) }, [g("div", ae, [i(e3.$slots, "loading", { loading: e3.loading, text: c2.value }, () => {
|
|
75
75
|
var _a2;
|
|
76
|
-
return [g("div",
|
|
76
|
+
return [g("div", le, [((_a2 = e3.loadingConfig) == null ? void 0 : _a2.spinner) && "default" !== e3.loadingConfig.spinner ? "circle" === e3.loadingConfig.spinner ? (t(), l("div", te)) : "pulse" === e3.loadingConfig.spinner ? (t(), l("div", oe)) : (t(), l("div", { key: 3, class: "mc-table__spinner mc-table__spinner--custom", innerHTML: e3.loadingConfig.spinner }, null, 8, ie)) : (t(), l("div", ne, a2[0] || (a2[0] = [g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1), g("div", { class: "mc-table__spinner-dot" }, null, -1)])))]), c2.value ? (t(), l("div", se, r(c2.value), 1)) : n("", true)];
|
|
77
77
|
}, true)])], 6)) : n("", true);
|
|
78
78
|
};
|
|
79
|
-
} }), [["__scopeId", "data-v-2d08fe8f"]]),
|
|
79
|
+
} }), [["__scopeId", "data-v-2d08fe8f"]]), re = { key: 0, class: "mc-table__pagination" }, ue = { class: "mc-table__pagination-info" }, pe = { class: "mc-table__pagination-controls" }, de = ["onClick"], ge = { key: 1, class: "mc-table__pagination-ellipsis" }, me = { class: "mc-table__pagination-size" }, ve = ["value"], he = $(e({ __name: "mc-table-pagination", props: { pagination: {} }, emits: ["page-change"], setup(e2, { emit: i2 }) {
|
|
80
80
|
var _a, _b, _c;
|
|
81
81
|
const c2 = e2, u2 = i2, d2 = p(((_a = c2.pagination) == null ? void 0 : _a.currentPage) || 1), h2 = p(((_b = c2.pagination) == null ? void 0 : _b.pageSize) || 50), f2 = p(((_c = c2.pagination) == null ? void 0 : _c.pageSizes) || [25, 50, 75, 100]);
|
|
82
82
|
w(() => {
|
|
@@ -114,9 +114,9 @@ const H = ["rowspan", "colspan"], W = $(e({ __name: "mc-table-cell", props: { ro
|
|
|
114
114
|
}, z2 = () => {
|
|
115
115
|
d2.value = 1, u2("page-change", { pageSize: h2.value, pageNum: 1 });
|
|
116
116
|
};
|
|
117
|
-
return (e3, a2) => e3.pagination ? (t(), l("div",
|
|
117
|
+
return (e3, a2) => e3.pagination ? (t(), l("div", re, [g("div", ue, "Showing " + r(b2.value) + "-" + r(y2.value) + " of " + r(e3.pagination.total), 1), g("div", pe, [v(H, { name: "First", class: o({ "mc-table__icon": true, "is-disabled": d2.value <= 1 }), size: 24, onClick: a2[0] || (a2[0] = (e4) => C2(1)) }, null, 8, ["class"]), v(H, { name: "Left-Chevron", class: o({ "mc-table__icon": true, "is-disabled": d2.value <= 1 }), size: 24, onClick: a2[1] || (a2[1] = (e4) => C2(d2.value - 1)) }, null, 8, ["class"]), (t(true), l(s, null, m(S2.value, (e4) => (t(), l(s, { key: e4 }, ["..." !== e4 ? (t(), l("button", { key: 0, class: o(["mc-table__pagination-button mc-table__pagination-button--page", { "is-active": e4 === d2.value }]), onClick: (a3) => "number" == typeof e4 ? C2(e4) : void 0 }, r(e4), 11, de)) : (t(), l("span", ge, "..."))], 64))), 128)), v(H, { name: "Right-Chevron", class: o({ "mc-table__icon": true, "is-disabled": d2.value >= _2.value }), size: 24, onClick: a2[2] || (a2[2] = (e4) => C2(d2.value + 1)) }, null, 8, ["class"]), v(H, { name: "Last", class: o({ "mc-table__icon": true, "is-disabled": d2.value >= _2.value }), size: 24, onClick: a2[3] || (a2[3] = (e4) => C2(_2.value)) }, null, 8, ["class"])]), g("div", me, [a2[5] || (a2[5] = g("label", { class: "mc-table__pagination-size-label" }, "View per page", -1)), f2.value && f2.value.length > 0 ? x((t(), l("select", { key: 0, class: "mc-table__pagination-select", "onUpdate:modelValue": a2[4] || (a2[4] = (e4) => h2.value = e4), onChange: z2 }, [(t(true), l(s, null, m(f2.value, (e4) => (t(), l("option", { key: e4, value: e4 }, r(e4), 9, ve))), 128))], 544)), [[k, h2.value]]) : n("", true)])])) : n("", true);
|
|
118
118
|
} }), [["__scopeId", "data-v-229c4546"]]);
|
|
119
|
-
function
|
|
119
|
+
function fe(e2, l2) {
|
|
120
120
|
var _a, _b;
|
|
121
121
|
const n2 = p(((_a = l2.value) == null ? void 0 : _a.currentPage) || 1), t2 = p(((_b = l2.value) == null ? void 0 : _b.pageSize) || 50);
|
|
122
122
|
w(() => {
|
|
@@ -135,7 +135,7 @@ function he(e2, l2) {
|
|
|
135
135
|
n2.value = e3.pageNum, t2.value = e3.pageSize;
|
|
136
136
|
} };
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function _e(e2, l2, n2) {
|
|
139
139
|
const t2 = p(false), o2 = p(null), i2 = a(() => t2.value ? e2.value : e2.value.map((e3) => ({ ...e3, fixed: void 0 })));
|
|
140
140
|
function s2() {
|
|
141
141
|
o2.value && (t2.value = o2.value.scrollWidth > o2.value.clientWidth);
|
|
@@ -156,7 +156,7 @@ function fe(e2, l2, n2) {
|
|
|
156
156
|
r2();
|
|
157
157
|
}), { hasHorizontalScroll: t2, columnsWithFixed: i2, checkHorizontalScroll: s2, syncHeaderScroll: c2, initScrollSync: r2 };
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function be(e2, l2, n2) {
|
|
160
160
|
const t2 = p(n2 || null);
|
|
161
161
|
return { sortedData: a(() => {
|
|
162
162
|
if (!t2.value || !t2.value.order) return e2.value;
|
|
@@ -180,8 +180,8 @@ function _e(e2, l2, n2) {
|
|
|
180
180
|
return t2.value && t2.value.prop === e3 ? t2.value.order : null;
|
|
181
181
|
} };
|
|
182
182
|
}
|
|
183
|
-
const
|
|
184
|
-
const r2 = e2, { data: u2, columns: d2, pagination: g2, spanMethod: y2, loading: x2, loadingText: k2, loadingConfig: S2, defaultSort: R2, highlightCurrentRow: $2, rowKey: P2, selectable: H2, selectedRows: W2, selectOnRowClick: O2 } = z(r2), D2 = c2, B2 = p(), L2 = p(), T2 = p(), { columnsWithFixed: A2 } =
|
|
183
|
+
const ye = P($(e({ name: "McTable", __name: "mc-table", props: { data: {}, columns: {}, showHeader: { type: Boolean, default: true }, height: {}, maxHeight: {}, rowKey: {}, emptyText: { default: "No Data" }, pagination: {}, loading: { type: Boolean, default: false }, loadingText: { default: "Loading..." }, loadingConfig: {}, highlightCurrentRow: { type: Boolean, default: false }, selectable: { type: Boolean, default: false }, selectedRows: {}, selectOnRowClick: { type: Boolean, default: false }, spanMethod: {}, initData: {}, defaultSort: {} }, emits: ["row-click", "header-click", "page-change", "page-size-change", "sort-change", "current-change", "selection-change", "select", "select-all", "update:selectedRows"], setup(e2, { expose: s2, emit: c2 }) {
|
|
184
|
+
const r2 = e2, { data: u2, columns: d2, pagination: g2, spanMethod: y2, loading: x2, loadingText: k2, loadingConfig: S2, defaultSort: R2, highlightCurrentRow: $2, rowKey: P2, selectable: H2, selectedRows: W2, selectOnRowClick: O2 } = z(r2), D2 = c2, B2 = p(), L2 = p(), T2 = p(), { columnsWithFixed: A2 } = _e(d2, L2, T2), { sortedData: K2, handleSort: N2, getSortOrder: j2 } = be(u2, A2, R2 == null ? void 0 : R2.value), { paginatedData: E2, updatePagination: U2 } = fe(K2, g2), V2 = a(() => E2.value), q2 = p(null), G2 = p((W2 == null ? void 0 : W2.value) || []);
|
|
185
185
|
w(W2, (e3) => {
|
|
186
186
|
e3 && (G2.value = [...e3]);
|
|
187
187
|
}, { deep: true, immediate: true });
|
|
@@ -192,7 +192,7 @@ const be = $(e({ name: "McTable", __name: "mc-table", props: { data: {}, columns
|
|
|
192
192
|
}), X2 = (e3) => {
|
|
193
193
|
const a2 = [];
|
|
194
194
|
return $2.value && q2.value === e3 && a2.push("is-current"), a2;
|
|
195
|
-
}, Y2 = (e3) => G2.value.some((a2) => P2.value ? a2[P2.value] === e3[P2.value] : a2 === e3),
|
|
195
|
+
}, Y2 = (e3) => G2.value.some((a2) => P2.value ? a2[P2.value] === e3[P2.value] : a2 === e3), Z2 = (e3, a2) => {
|
|
196
196
|
const l2 = void 0 !== a2 ? a2 : !Y2(e3);
|
|
197
197
|
if (l2) Y2(e3) || G2.value.push(e3);
|
|
198
198
|
else {
|
|
@@ -212,17 +212,17 @@ const be = $(e({ name: "McTable", __name: "mc-table", props: { data: {}, columns
|
|
|
212
212
|
const a3 = ((e4) => (q2.value = e4, q2.value))(e3);
|
|
213
213
|
D2("current-change", a3);
|
|
214
214
|
}
|
|
215
|
-
H2.value && O2.value &&
|
|
215
|
+
H2.value && O2.value && Z2(e3), D2("row-click", e3, a2);
|
|
216
216
|
}, ne2 = (e3, a2) => {
|
|
217
217
|
D2("header-click", e3, a2);
|
|
218
218
|
}, te2 = (e3) => {
|
|
219
219
|
const a2 = N2(e3);
|
|
220
220
|
a2 && D2("sort-change", a2);
|
|
221
221
|
}, oe2 = (e3, a2) => {
|
|
222
|
-
|
|
222
|
+
Z2(e3, a2);
|
|
223
223
|
}, ie2 = (e3) => {
|
|
224
224
|
ae2(e3);
|
|
225
|
-
},
|
|
225
|
+
}, se2 = async (e3) => {
|
|
226
226
|
U2(e3), C(() => {
|
|
227
227
|
var _a;
|
|
228
228
|
((_a = T2.value) == null ? void 0 : _a.bodyWrapper) && (T2.value.bodyWrapper.scrollTop = 0);
|
|
@@ -237,16 +237,16 @@ const be = $(e({ name: "McTable", __name: "mc-table", props: { data: {}, columns
|
|
|
237
237
|
d2.value.forEach((e3) => {
|
|
238
238
|
e3.sortable && (e3.sortOrder = null);
|
|
239
239
|
});
|
|
240
|
-
}, toggleRowSelection:
|
|
240
|
+
}, toggleRowSelection: Z2, toggleAllSelection: ae2, clearSelection: () => {
|
|
241
241
|
G2.value = [], D2("update:selectedRows", []), D2("selection-change", []);
|
|
242
242
|
}, getSelectedRows: () => [...G2.value] }), (e3, a2) => {
|
|
243
243
|
var _a;
|
|
244
|
-
return t(), l("div", { ref_key: "_ref", ref: B2, class: o(["mc-table", { "mc-table--loading": h(x2) }]) }, [v(
|
|
244
|
+
return t(), l("div", { ref_key: "_ref", ref: B2, class: o(["mc-table", { "mc-table--loading": h(x2) }]) }, [v(ee, { ref_key: "headerRef", ref: L2, columns: h(A2), "show-header": e3.showHeader, "get-sort-order": h(j2), selectable: h(H2), "is-all-selected": J2.value, "is-indeterminate": Q2.value, onHeaderClick: ne2, onSortChange: te2, onSelectAll: ie2 }, _({ _: 2 }, [m(Object.keys(e3.$slots), (a3) => ({ name: a3, fn: b((l2) => [i(e3.$slots, a3, I(M(l2)), void 0, true)]) }))]), 1032, ["columns", "show-header", "get-sort-order", "selectable", "is-all-selected", "is-indeterminate"]), v(F, { ref_key: "bodyRef", ref: T2, data: V2.value, columns: h(A2), "row-key": h(P2), "empty-text": e3.emptyText, height: e3.height, "max-height": e3.maxHeight, "span-method": h(y2), pagination: h(g2), "get-row-class": X2, selectable: h(H2), "selected-rows": G2.value, "select-on-row-click": h(O2), onRowClick: le2, onSelect: oe2 }, _({ _: 2 }, [m(Object.keys(e3.$slots), (a3) => ({ name: a3, fn: b((l2) => [i(e3.$slots, a3, I(M(l2)), void 0, true)]) }))]), 1032, ["data", "columns", "row-key", "empty-text", "height", "max-height", "span-method", "pagination", "selectable", "selected-rows", "select-on-row-click"]), h(g2) && ((_a = h(g2)) == null ? void 0 : _a.total) > 0 ? (t(), f(he, { key: 0, pagination: h(g2), onPageChange: se2 }, null, 8, ["pagination"])) : n("", true), v(ce, { class: "mc-table__loading", loading: h(x2), "loading-text": h(k2), "loading-config": h(S2) }, { loading: b((a3) => [i(e3.$slots, "loading", I(M(a3)), void 0, true)]), _: 3 }, 8, ["loading", "loading-text", "loading-config"])], 2);
|
|
245
245
|
};
|
|
246
|
-
} }), [["__scopeId", "data-v-bacc72c2"]]);
|
|
246
|
+
} }), [["__scopeId", "data-v-bacc72c2"]]));
|
|
247
247
|
export {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
ye as M,
|
|
249
|
+
_e as a,
|
|
250
|
+
be as b,
|
|
251
|
+
fe as u
|
|
252
252
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, w as t } from "./utils-
|
|
1
|
+
import { _ as e, w as t } from "./utils-C5rkiZEb.js";
|
|
2
2
|
import { defineComponent as a, ref as o, toRefs as l, computed as r, createElementBlock as s, createCommentVNode as c, openBlock as i, normalizeStyle as u, normalizeClass as d, unref as n, createBlock as m, renderSlot as f } from "vue";
|
|
3
|
-
import { M as h } from "./mc-icon-
|
|
3
|
+
import { M as h } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const v = t(e(a({ __name: "mc-tag", props: { type: { default: "primary" }, size: { default: "medium" }, disabled: { type: Boolean, default: false }, closable: { type: Boolean, default: false }, color: {}, textColor: {}, backgroundColor: {}, selectedTextColor: {}, selectedBackgroundColor: {}, radius: { default: "default" }, height: {}, width: {}, icon: {}, selected: { type: Boolean } }, emits: ["click", "close"], setup(e2, { expose: t2, emit: a2 }) {
|
|
5
5
|
const v2 = o(), g = e2, p = a2, x = o(true), { type: b, size: y, disabled: C, closable: M, color: k, textColor: $, backgroundColor: _, selectedTextColor: z, selectedBackgroundColor: B, radius: w, height: W, width: j, icon: I, selected: T } = l(g), E = { small: 16, medium: 16, large: 24 }, F = r(() => {
|
|
6
6
|
const e3 = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as o, onUnmounted as s, createElementBlock as n, openBlock as l, normalizeClass as i, createElementVNode as a, createBlock as c, createCommentVNode as r, toDisplayString as m, isVNode as d, createVNode as y, render as p } from "vue";
|
|
2
|
-
import { _ as u, w as f } from "./utils-
|
|
3
|
-
import { M as g } from "./mc-icon-
|
|
2
|
+
import { _ as u, w as f } from "./utils-C5rkiZEb.js";
|
|
3
|
+
import { M as g } from "./mc-icon-DgWQKpUb.js";
|
|
4
4
|
const _ = { class: "mc-toast__title" }, v = { class: "mc-toast__message" }, C = u(e({ name: "McToast", __name: "mc-toast", props: { type: { default: "success" }, title: { default: "" }, message: { default: "" }, icon: {}, showClose: { type: Boolean, default: true }, duration: { default: 0 }, position: {}, onClose: {} }, emits: ["close"], setup(e2, { expose: d2, emit: y2 }) {
|
|
5
5
|
const p2 = e2, u2 = y2, f2 = t(), C2 = t(true), b2 = t(false);
|
|
6
6
|
let h2 = null;
|