mc-plus 1.0.83 → 1.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +20 -20
- package/dist/es/mc-richtext-C29pWb3W.js +97 -0
- package/dist/es/{mc-select-fruDiRFO.js → mc-select-B7XqWfwV.js} +5 -5
- package/dist/es/{mc-select-group-BdSZKhe5.js → mc-select-group-DPGvLjck.js} +1 -1
- package/dist/es/{mc-select-group-plus-CMI3azyH.js → mc-select-group-plus-CI0jtl4n.js} +1 -1
- package/dist/es/{mc-select-option-CeH5Ew8u.js → mc-select-option-DWrxPuSI.js} +10 -10
- package/dist/es/{mc-select-option-plus-DeksR1iB.js → mc-select-option-plus-PUkvSiLd.js} +8 -8
- package/dist/es/{mc-select-plus-CvhDak14.js → mc-select-plus-BNA_HLU1.js} +27 -27
- package/dist/es/{mc-step-plus-dPMVmUi4.js → mc-step-plus-CxYftUdb.js} +4 -4
- package/dist/es/{mc-tab-BT5bQZPB.js → mc-tab-D3vcDe9Q.js} +19 -19
- package/dist/es/{mc-table-plus-mrdERsrX.js → mc-table-plus-CBZDQGiv.js} +24 -24
- package/dist/es/vendor-BEjxar4U.js +9964 -0
- package/package.json +6 -6
- package/dist/es/mc-richtext-CFVb-rKQ.js +0 -100
package/dist/es/index.js
CHANGED
|
@@ -65,30 +65,30 @@ import { M as cs } from "./mc-removable-tag-YZpBGZiE.js";
|
|
|
65
65
|
import { a as a27 } from "./mc-removable-tag-YZpBGZiE.js";
|
|
66
66
|
import { M as es } from "./mc-reset-CJBlVip8.js";
|
|
67
67
|
import { a as a28 } from "./mc-reset-CJBlVip8.js";
|
|
68
|
-
import { M as _s } from "./mc-richtext-
|
|
69
|
-
import { F as F3, a as a29, b as b5, T } from "./mc-richtext-
|
|
68
|
+
import { M as _s } from "./mc-richtext-C29pWb3W.js";
|
|
69
|
+
import { F as F3, a as a29, b as b5, T } from "./mc-richtext-C29pWb3W.js";
|
|
70
70
|
import { M as Ms } from "./mc-secondary-menu-3p4UsHZ0.js";
|
|
71
71
|
import { a as a30 } from "./mc-secondary-menu-3p4UsHZ0.js";
|
|
72
|
-
import { M as is } from "./mc-select-
|
|
73
|
-
import { a as a31, S } from "./mc-select-
|
|
74
|
-
import { M as Cs } from "./mc-select-group-
|
|
75
|
-
import { a as a32, S as S2 } from "./mc-select-group-
|
|
76
|
-
import { M as fs } from "./mc-select-option-
|
|
77
|
-
import { a as a33 } from "./mc-select-option-
|
|
78
|
-
import { M as js } from "./mc-select-plus-
|
|
79
|
-
import { b as b6, a as a34 } from "./mc-select-plus-
|
|
80
|
-
import { a as Es } from "./mc-select-group-plus-
|
|
81
|
-
import { M as M4 } from "./mc-select-group-plus-
|
|
82
|
-
import { M as Ts } from "./mc-select-option-plus-
|
|
83
|
-
import { a as a35 } from "./mc-select-option-plus-
|
|
72
|
+
import { M as is } from "./mc-select-B7XqWfwV.js";
|
|
73
|
+
import { a as a31, S } from "./mc-select-B7XqWfwV.js";
|
|
74
|
+
import { M as Cs } from "./mc-select-group-DPGvLjck.js";
|
|
75
|
+
import { a as a32, S as S2 } from "./mc-select-group-DPGvLjck.js";
|
|
76
|
+
import { M as fs } from "./mc-select-option-DWrxPuSI.js";
|
|
77
|
+
import { a as a33 } from "./mc-select-option-DWrxPuSI.js";
|
|
78
|
+
import { M as js } from "./mc-select-plus-BNA_HLU1.js";
|
|
79
|
+
import { b as b6, a as a34 } from "./mc-select-plus-BNA_HLU1.js";
|
|
80
|
+
import { a as Es } from "./mc-select-group-plus-CI0jtl4n.js";
|
|
81
|
+
import { M as M4 } from "./mc-select-group-plus-CI0jtl4n.js";
|
|
82
|
+
import { M as Ts } from "./mc-select-option-plus-PUkvSiLd.js";
|
|
83
|
+
import { a as a35 } from "./mc-select-option-plus-PUkvSiLd.js";
|
|
84
84
|
import { M as ls } from "./mc-select-multi-option-BFTikd5T.js";
|
|
85
85
|
import { a as a36 } from "./mc-select-multi-option-BFTikd5T.js";
|
|
86
86
|
import { M as Os } from "./mc-status-BJGdWYD5.js";
|
|
87
87
|
import { a as a37 } from "./mc-status-BJGdWYD5.js";
|
|
88
88
|
import { M as Ls } from "./mc-step-DRDtR0u_.js";
|
|
89
89
|
import { a as a38 } from "./mc-step-DRDtR0u_.js";
|
|
90
|
-
import { M as xs } from "./mc-step-plus-
|
|
91
|
-
import { a as a39 } from "./mc-step-plus-
|
|
90
|
+
import { M as xs } from "./mc-step-plus-CxYftUdb.js";
|
|
91
|
+
import { a as a39 } from "./mc-step-plus-CxYftUdb.js";
|
|
92
92
|
import { a as Is } from "./mc-step-item-plus-DupEJu7U.js";
|
|
93
93
|
import { M as M5 } from "./mc-step-item-plus-DupEJu7U.js";
|
|
94
94
|
import { a as As } from "./mc-step-child-item-plus-CUT06Cwi.js";
|
|
@@ -98,14 +98,14 @@ import { M as Ps } from "./mc-success-icon-BuGz3uNE.js";
|
|
|
98
98
|
import { a as a40 } from "./mc-success-icon-BuGz3uNE.js";
|
|
99
99
|
import { M as ns } from "./mc-switch-DaGGPSCt.js";
|
|
100
100
|
import { a as a41, b as b7 } from "./mc-switch-DaGGPSCt.js";
|
|
101
|
-
import { M as Ns } from "./mc-tab-
|
|
102
|
-
import { a as a42 } from "./mc-tab-
|
|
101
|
+
import { M as Ns } from "./mc-tab-D3vcDe9Q.js";
|
|
102
|
+
import { a as a42 } from "./mc-tab-D3vcDe9Q.js";
|
|
103
103
|
import { a as bs } from "./mc-tab-item-CqXL4HVs.js";
|
|
104
104
|
import { M as M7 } from "./mc-tab-item-CqXL4HVs.js";
|
|
105
105
|
import { M as Us } from "./mc-table-DFxor-rm.js";
|
|
106
106
|
import { u, a as a43, b as b8 } from "./mc-table-DFxor-rm.js";
|
|
107
|
-
import { M as ds } from "./mc-table-plus-
|
|
108
|
-
import { d, f, r, p, q, o, g, j, b as b9, h, l, m, n, a as a44, e, i, c as c2, k } from "./mc-table-plus-
|
|
107
|
+
import { M as ds } from "./mc-table-plus-CBZDQGiv.js";
|
|
108
|
+
import { d, f, r, p, q, o, g, j, b as b9, h, l, m, n, a as a44, e, i, c as c2, k } from "./mc-table-plus-CBZDQGiv.js";
|
|
109
109
|
import { a as gs } from "./mc-table-column-plus-N4ocB9zX.js";
|
|
110
110
|
import { M as M8 } from "./mc-table-column-plus-N4ocB9zX.js";
|
|
111
111
|
import { M as Bs } from "./mc-tag-CeJarQKP.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as e, createElementBlock as t, openBlock as l, normalizeClass as a, renderSlot as o, createBlock as i, ref as s, watch as c, watchEffect as n, normalizeStyle as r, unref as m, createElementVNode as u, createVNode as d, withCtx as v, toDisplayString as p, createTextVNode as L } from "vue";
|
|
2
|
+
import { M as h, u as f, i as A, a as g, E as M } from "./vendor-BEjxar4U.js";
|
|
3
|
+
import { useWidthHeight as x } from "@mc-plus/hooks";
|
|
4
|
+
import { M as O } from "./mc-select-plus-BNA_HLU1.js";
|
|
5
|
+
import { M as T } from "./mc-select-option-plus-PUkvSiLd.js";
|
|
6
|
+
import { a as k, M as I } from "./mc-icon-plus-BFYVRrKw.js";
|
|
7
|
+
import { M as R } from "./mc-tooltip-BNmrE7e_.js";
|
|
8
|
+
import { M as _ } from "./mc-input-C9AUHpPJ.js";
|
|
9
|
+
import { M as b } from "./mc-button-Bg4Yihn7.js";
|
|
10
|
+
import { _ as E, u as N } from "./utils-y7s5KtP-.js";
|
|
11
|
+
const C = "McRichtext", S = "McRichtextTool";
|
|
12
|
+
var F = ((e2) => (e2.NORMAL = "normal", e2.SMALL = "small", e2.FOOTNOTE = "footnote", e2.BOLD = "bold", e2.ITALIC = "italic", e2.LIST = "list", e2.ORDERED_LIST = "numbering", e2.LINK = "link", e2.IMAGE = "document-image", e2.CLEAR = "input-reset", e2))(F || {}), V = ((e2) => (e2.NORMAL = "mc-richtext-normal-text", e2.SMALL = "mc-richtext-small-text", e2.FOOTNOTE = "mc-richtext-footnote", e2))(V || {});
|
|
13
|
+
const D = E(e({ name: S, __name: "mc-richtext-tool", props: { icon: {}, isActive: { type: Boolean, default: false } }, emits: ["click"], setup(e2, { emit: s2 }) {
|
|
14
|
+
const c2 = s2;
|
|
15
|
+
return (s3, n2) => (l(), t("div", { class: a(["mc-richtext-tool", { "mc-richtext-tool-icon-actived": e2.isActive }]) }, [o(s3.$slots, "default", { isActive: e2.isActive }, () => [(l(), i(k, { class: "mc-richtext-tool-icon", key: e2.icon, name: e2.icon, size: 24, cursor: "pointer", onClick: n2[0] || (n2[0] = (t2) => {
|
|
16
|
+
return l2 = e2.icon, void c2("click", l2);
|
|
17
|
+
var l2;
|
|
18
|
+
}) }, null, 8, ["name"]))], true)], 2));
|
|
19
|
+
} }), [["__scopeId", "data-v-341e9121"]]), y = h.create({ name: "custom-font", addAttributes: () => ({ class: { default: null, parseHTML: (e2) => e2.getAttribute("class"), renderHTML: (e2) => e2.class ? { class: e2.class } : {} } }), parseHTML: () => [{ tag: "span", getAttrs: (e2) => !!e2.hasAttribute("class") && null }], renderHTML: ({ HTMLAttributes: e2 }) => ["span", e2, 0] }), j = { class: "mc-richtext-toolbar" }, H = { class: "mc-richtext-font-selector" }, w = { class: "mc-richtext-tool-group" }, B = { class: "mc-richtext-tool-group" }, U = { class: "mc-richtext-tool-group" }, G = { class: "mc-richtext-attach-link" }, K = N(E(e({ name: C, __name: "mc-richtext", props: { modelValue: { default: "" }, width: { default: "100%" }, height: {} }, emits: ["update:modelValue"], setup(e2, { expose: o2, emit: i2 }) {
|
|
20
|
+
const h2 = e2, k2 = i2, E2 = s(), { width: N2, height: C2 } = x(), S2 = f({ content: `${h2.modelValue}`, extensions: [A, g.configure({ inline: true, allowBase64: true }), y], onUpdate: ({ editor: e3 }) => {
|
|
21
|
+
k2("update:modelValue", e3.getHTML());
|
|
22
|
+
} });
|
|
23
|
+
c(() => h2.modelValue, (e3) => {
|
|
24
|
+
const t2 = S2.value, l2 = t2 == null ? void 0 : t2.getHTML();
|
|
25
|
+
t2 && l2 !== e3 && t2.commands.setContent(e3);
|
|
26
|
+
});
|
|
27
|
+
const K2 = s(F.NORMAL), $ = (e3) => {
|
|
28
|
+
e3 === F.NORMAL ? z() : e3 === F.SMALL ? P() : e3 === F.FOOTNOTE ? W() : e3 === F.BOLD ? q() : e3 === F.ITALIC ? J() : e3 === F.LIST ? Q() : e3 === F.ORDERED_LIST ? X() : e3 === F.LINK ? te() : e3 === F.IMAGE ? le() : e3 === F.CLEAR && oe();
|
|
29
|
+
}, z = () => {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = S2.value) == null ? void 0 : _a.commands.setMark("custom-font", { class: V.NORMAL });
|
|
32
|
+
}, P = () => {
|
|
33
|
+
var _a;
|
|
34
|
+
(_a = S2.value) == null ? void 0 : _a.commands.setMark("custom-font", { class: V.SMALL });
|
|
35
|
+
}, W = () => {
|
|
36
|
+
var _a;
|
|
37
|
+
(_a = S2.value) == null ? void 0 : _a.commands.setMark("custom-font", { class: V.FOOTNOTE });
|
|
38
|
+
}, q = () => {
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = S2.value) == null ? void 0 : _a.commands.toggleBold();
|
|
41
|
+
}, J = () => {
|
|
42
|
+
var _a;
|
|
43
|
+
(_a = S2.value) == null ? void 0 : _a.commands.toggleItalic();
|
|
44
|
+
}, Q = () => {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = S2.value) == null ? void 0 : _a.commands.toggleList("bulletList", "listItem");
|
|
47
|
+
}, X = () => {
|
|
48
|
+
var _a;
|
|
49
|
+
(_a = S2.value) == null ? void 0 : _a.commands.toggleList("orderedList", "listItem");
|
|
50
|
+
};
|
|
51
|
+
n(() => {
|
|
52
|
+
const e3 = S2.value;
|
|
53
|
+
if (!e3) return;
|
|
54
|
+
const t2 = e3.getAttributes("custom-font").class;
|
|
55
|
+
t2 === V.SMALL ? K2.value = F.SMALL : t2 === V.FOOTNOTE ? K2.value = F.FOOTNOTE : K2.value = F.NORMAL;
|
|
56
|
+
});
|
|
57
|
+
const Y = s(), Z = s(""), ee = () => {
|
|
58
|
+
var _a;
|
|
59
|
+
Z.value = ((_a = S2.value) == null ? void 0 : _a.getAttributes("link").href) || "";
|
|
60
|
+
}, te = () => {
|
|
61
|
+
var _a, _b, _c;
|
|
62
|
+
const e3 = Z.value;
|
|
63
|
+
e3 ? ((_a = S2.value) == null ? void 0 : _a.commands.setLink({ href: e3 }), Z.value = "") : ((_b = S2.value) == null ? void 0 : _b.commands.unsetLink(), Z.value = ""), (_c = Y.value) == null ? void 0 : _c.hide();
|
|
64
|
+
}, le = () => {
|
|
65
|
+
var _a;
|
|
66
|
+
(_a = E2.value) == null ? void 0 : _a.click();
|
|
67
|
+
}, ae = (e3) => {
|
|
68
|
+
var _a;
|
|
69
|
+
const t2 = e3.target, l2 = (_a = t2.files) == null ? void 0 : _a[0];
|
|
70
|
+
if (!l2 || !l2.type.startsWith("image/")) return;
|
|
71
|
+
const a2 = new FileReader();
|
|
72
|
+
a2.onload = (e4) => {
|
|
73
|
+
var _a2, _b;
|
|
74
|
+
const t3 = (_a2 = e4.target) == null ? void 0 : _a2.result;
|
|
75
|
+
t3 && ((_b = S2.value) == null ? void 0 : _b.commands.setImage({ src: t3 }));
|
|
76
|
+
}, a2.onerror = () => {
|
|
77
|
+
console.error("mc-richtext: error:read:image:", l2.name);
|
|
78
|
+
}, a2.readAsDataURL(l2), t2.value = "";
|
|
79
|
+
}, oe = () => {
|
|
80
|
+
var _a;
|
|
81
|
+
(_a = S2.value) == null ? void 0 : _a.chain().focus().unsetAllMarks().clearNodes().run();
|
|
82
|
+
};
|
|
83
|
+
return o2({ editor: S2.value, getText: () => {
|
|
84
|
+
var _a;
|
|
85
|
+
return (_a = S2.value) == null ? void 0 : _a.getText();
|
|
86
|
+
} }), (e3, o3) => {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f;
|
|
88
|
+
return l(), t("div", { class: "mc-richtext", style: r({ width: m(N2), height: m(C2) }) }, [u("section", j, [u("div", H, [d(m(O), { modelValue: K2.value, "onUpdate:modelValue": o3[0] || (o3[0] = (e4) => K2.value = e4), width: 148, height: 32, "disable-validation": "", onChange: o3[1] || (o3[1] = (e4) => $(e4)) }, { "selected-content": v(({ selectedOptionLabel: e4 }) => [u("span", { class: a(["mc-richtext-font-selected", `mc-richtext-font-${K2.value}`]) }, p(e4), 3)]), default: v(() => [d(m(T), { value: m(F).NORMAL, label: "Normal text" }, { default: v(() => [...o3[4] || (o3[4] = [u("span", { class: "mc-richtext-font-normal" }, "Normal text", -1)])]), _: 1 }, 8, ["value"]), d(m(T), { value: m(F).SMALL, label: "Small text" }, { default: v(() => [...o3[5] || (o3[5] = [u("span", { class: "mc-richtext-font-small" }, "Small text", -1)])]), _: 1 }, 8, ["value"]), d(m(T), { value: m(F).FOOTNOTE, label: "Footnote" }, { default: v(() => [...o3[6] || (o3[6] = [u("span", { class: "mc-richtext-font-footnote" }, "Footnote", -1)])]), _: 1 }, 8, ["value"])]), _: 1 }, 8, ["modelValue"])]), u("div", w, [d(D, { icon: m(F).BOLD, "is-active": !!((_a = m(S2)) == null ? void 0 : _a.isActive("bold")), onClick: $ }, null, 8, ["icon", "is-active"]), d(D, { icon: m(F).ITALIC, "is-active": !!((_b = m(S2)) == null ? void 0 : _b.isActive("italic")), onClick: $ }, null, 8, ["icon", "is-active"])]), u("div", B, [d(D, { icon: m(F).LIST, "is-active": !!((_c = m(S2)) == null ? void 0 : _c.isActive("bulletList")), onClick: $ }, null, 8, ["icon", "is-active"]), d(D, { icon: m(F).ORDERED_LIST, "is-active": !!((_d = m(S2)) == null ? void 0 : _d.isActive("orderedList")), onClick: $ }, null, 8, ["icon", "is-active"])]), u("div", U, [d(D, { icon: m(F).LINK, "is-active": !!((_e = m(S2)) == null ? void 0 : _e.isActive("link")) }, { default: v(() => [d(m(R), { placement: "bottom-start", trigger: "click", ref_key: "linkTooltipRef", ref: Y }, { content: v(() => [u("div", G, [d(m(_), { modelValue: Z.value, "onUpdate:modelValue": o3[2] || (o3[2] = (e4) => Z.value = e4), placeholder: "Please enter the URL" }, null, 8, ["modelValue"]), d(m(b), { width: "180px", onClick: o3[3] || (o3[3] = (e4) => $("link")) }, { default: v(() => [...o3[7] || (o3[7] = [L(" Attach ", -1)])]), _: 1 })])]), default: v(() => [d(m(I), { name: "link", cursor: "pointer", class: "mc-richtext-tool-icon-link", onClick: ee })]), _: 1 }, 512)]), _: 1 }, 8, ["icon", "is-active"]), d(D, { icon: m(F).IMAGE, "is-active": !!((_f = m(S2)) == null ? void 0 : _f.isActive("image")), onClick: $ }, null, 8, ["icon", "is-active"])]), d(D, { icon: m(F).CLEAR, onClick: $ }, null, 8, ["icon"])]), d(m(M), { editor: m(S2), class: "mc-richtext-content" }, null, 8, ["editor"]), u("input", { ref_key: "fileInputRef", ref: E2, type: "file", accept: "image/*", style: { display: "none" }, "aria-hidden": "true", onChange: ae }, null, 544)], 4);
|
|
89
|
+
};
|
|
90
|
+
} }), [["__scopeId", "data-v-c216489d"]]));
|
|
91
|
+
export {
|
|
92
|
+
V as F,
|
|
93
|
+
K as M,
|
|
94
|
+
F as T,
|
|
95
|
+
C as a,
|
|
96
|
+
S as b
|
|
97
|
+
};
|
|
@@ -7,9 +7,9 @@ import { M as $ } from "./mc-button-Bg4Yihn7.js";
|
|
|
7
7
|
import { M as I } from "./mc-tag-CeJarQKP.js";
|
|
8
8
|
import { M as T } from "./mc-checkbox-DOYKa_Ym.js";
|
|
9
9
|
import { M as U } from "./mc-title-Bp0U8n05.js";
|
|
10
|
-
import { M as
|
|
11
|
-
const N = Symbol("mc-select-context"), P = "mc-select", W = { key: 0, class: "mc-select-selected-content" }, q = ["placeholder", "readonly", "disabled"], E = { class: "mc-select-dropdown-header-content" }, G = { class: "mc-select-dropdown-content" }, H = { class: "mc-select-dropdown" }, J = { key: 0, class: "mc-select-no-data" },
|
|
12
|
-
const a2 = e2, P2 = l2,
|
|
10
|
+
import { M as L } from "./mc-footer-BeEDYFlH.js";
|
|
11
|
+
const N = Symbol("mc-select-context"), P = "mc-select", W = { key: 0, class: "mc-select-selected-content" }, q = ["placeholder", "readonly", "disabled"], E = { class: "mc-select-dropdown-header-content" }, G = { class: "mc-select-dropdown-content" }, H = { class: "mc-select-dropdown" }, J = { key: 0, class: "mc-select-no-data" }, K = l(e(a({ name: P, __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: l2 }) {
|
|
12
|
+
const a2 = e2, P2 = l2, K2 = t(), Q = t(), X = t(), Y = s(() => a2.multiple), Z = (e3) => Y.value && Array.isArray(e3), ee = t([]), le = s(() => j(Me.value) ? ee.value : ee.value.filter((e3) => B(A(e3.label ?? e3.value)).includes(B(Me.value)))), { wrapperRef: ae, isFocused: te, handleFocus: se, handleBlur: ue } = z(K2, {}), oe = s(() => 0 === le.value.length), ce = s(() => Y.value && a2.allowSelectAll && !oe.value), de = s(() => Y.value && a2.allowReset && !oe.value), ve = t(false), me = () => {
|
|
13
13
|
ve.value = !ve.value;
|
|
14
14
|
}, ne = () => Z(a2.modelValue) ? [...a2.modelValue] : [a2.modelValue], re = t(ne());
|
|
15
15
|
u(() => a2.modelValue, () => {
|
|
@@ -60,10 +60,10 @@ const N = Symbol("mc-select-context"), P = "mc-select", W = { key: 0, class: "mc
|
|
|
60
60
|
const l5 = [...a2.modelValue];
|
|
61
61
|
l5.splice(l5.indexOf(e4.value), 1), P2("update:modelValue", l5);
|
|
62
62
|
}
|
|
63
|
-
})(l4) }, { default: g(() => [b(w(l4.label), 1)]), _: 2 }, 1032, ["emphasis", "disabled", "onDelete"]))), 128))], 512)) : (d(), h(f(pe.value._vnode), { key: pe.value.value }))])) : p("", true), r("div", { class: m(["mc-select-input-wrapper", { "mc-select-input-wrapper-search": je.value || xe.value }]) }, [_(r("input", { class: m(["mc-select-input", { "mc-select-input-readonly": !e2.search }]), ref_key: "inputRef", ref:
|
|
63
|
+
})(l4) }, { default: g(() => [b(w(l4.label), 1)]), _: 2 }, 1032, ["emphasis", "disabled", "onDelete"]))), 128))], 512)) : (d(), h(f(pe.value._vnode), { key: pe.value.value }))])) : p("", true), r("div", { class: m(["mc-select-input-wrapper", { "mc-select-input-wrapper-search": je.value || xe.value }]) }, [_(r("input", { class: m(["mc-select-input", { "mc-select-input-readonly": !e2.search }]), ref_key: "inputRef", ref: K2, type: "text", placeholder: xe.value ? e2.placeholder : "", "onUpdate:modelValue": t2[0] || (t2[0] = (e3) => Me.value = e3), onInput: Re, onFocus: t2[1] || (t2[1] = (...e3) => n(se) && n(se)(...e3)), onBlur: t2[2] || (t2[2] = (...e3) => n(ue) && n(ue)(...e3)), readonly: !e2.search, disabled: e2.disabled }, null, 42, q), [[k, Me.value]])], 2), be.value ? (d(), c("div", { key: 1, class: m(["mc-select__status", [Ve.value ? "mc-select__status--error" : "mc-select__status--success"]]) }, [i(n(F), { name: Ve.value ? "Reject_02" : "Accept_02", size: 24 }, null, 8, ["name"])], 2)) : p("", true), r("div", { class: m(["mc-select-icon-wrapper", { "mc-select-icon-wrapper-expand": ve.value && !e2.disabled }]) }, [i(n(F), { name: "Down-Chevron", class: "mc-select-icon" })], 2)], 512), i(x, { name: "mc-select-dropdown-transition" }, { default: g(() => [_(r("div", { class: "mc-select-dropdown-wrapper", style: v({ paddingTop: ce.value ? "40px" : "0", paddingBottom: de.value ? "48px" : "0" }) }, [ce.value ? (d(), h(n(U), { key: 0, class: "mc-select-dropdown-header", "show-tool-bar": false, height: "40px" }, { default: g(() => [r("div", E, [i(n(T), { modelValue: Se.value, "onUpdate:modelValue": t2[3] || (t2[3] = (e3) => Se.value = e3), content: "Select All", "form-validate": false, partial: Ce.value, onChange: Oe }, null, 8, ["modelValue", "partial"])])]), _: 1 })) : p("", true), r("div", G, [r("div", H, [M(l3.$slots, "default", {}, void 0, true), oe.value ? (d(), c("div", J, [M(l3.$slots, "empty", {}, () => [t2[6] || (t2[6] = b("No data", -1))], true)])) : p("", true)])]), de.value ? (d(), h(n(L), { key: 1, class: "mc-select-dropdown-footer" }, { "right-button-group": g(() => [i(n($), { type: "link", size: "small", onClick: _e }, { default: g(() => [...t2[7] || (t2[7] = [b(" Reset ", -1)])]), _: 1 }), i(n($), { type: "plain", size: "small", onClick: ke }, { default: g(() => [...t2[8] || (t2[8] = [b(" Apply ", -1)])]), _: 1 })]), _: 1 })) : p("", true)], 4), [[R, ve.value && !e2.disabled]])]), _: 3 })], 38));
|
|
64
64
|
} }), [["__scopeId", "data-v-0096011b"]]));
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
K as M,
|
|
67
67
|
N as S,
|
|
68
68
|
P as a
|
|
69
69
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, u as t } from "./utils-y7s5KtP-.js";
|
|
2
2
|
import { defineComponent as s, inject as l, provide as o, computed as a, toRefs as c, useAttrs as i, toValue as r, withDirectives as m, createElementBlock as p, openBlock as u, createElementVNode as d, normalizeStyle as v, toDisplayString as g, renderSlot as n, vShow as h } from "vue";
|
|
3
|
-
import { S as f } from "./mc-select-
|
|
3
|
+
import { S as f } from "./mc-select-B7XqWfwV.js";
|
|
4
4
|
const b = Symbol("mc-select-group-context"), _ = "mc-select-group", w = { class: "mc-select-group" }, y = { class: "mc-select-group-content" }, S = t(e(s({ name: _, __name: "mc-select-group", props: { label: {}, width: {}, height: {} }, setup(e2) {
|
|
5
5
|
const t2 = e2, s2 = l(f, void 0);
|
|
6
6
|
o(b, { groupName: t2.label });
|
|
@@ -2,7 +2,7 @@ import { _ as l, u as s } from "./utils-y7s5KtP-.js";
|
|
|
2
2
|
import { defineComponent as e, inject as t, computed as o, withDirectives as a, createElementBlock as u, openBlock as p, createElementVNode as r, normalizeStyle as c, unref as i, toDisplayString as m, renderSlot as d, vShow as h } from "vue";
|
|
3
3
|
import { includes as f } from "lodash-es";
|
|
4
4
|
import { useWidthHeight as g } from "@mc-plus/hooks";
|
|
5
|
-
import { a as n } from "./mc-select-plus-
|
|
5
|
+
import { a as n } from "./mc-select-plus-BNA_HLU1.js";
|
|
6
6
|
const v = "mc-select-group-plus", _ = { class: "mc-select-group" }, b = { class: "mc-select-option-list" }, w = s(l(e({ name: v, __name: "mc-select-group-plus", props: { label: {}, height: { default: 40 }, width: { default: "100%" } }, setup(l2) {
|
|
7
7
|
const s2 = l2, e2 = t(n || void 0), { height: v2, width: w2 } = g(), j = o(() => f(e2 == null ? void 0 : e2.filteredGroups.value, s2.label));
|
|
8
8
|
return (s3, e3) => a((p(), u("ul", _, [r("li", { class: "mc-select-group-label", style: c({ height: i(v2), width: i(w2) }) }, m(l2.label), 5), r("li", null, [r("ul", b, [d(s3.$slots, "default", {}, void 0, true)])])], 512)), [[h, j.value]]);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { _ as e, u as o } from "./utils-y7s5KtP-.js";
|
|
2
2
|
import { defineComponent as t, ref as s, inject as l, computed as c, useSlots as i, onMounted as a, onBeforeUnmount as n, h as p, createElementBlock as m, createCommentVNode as r, openBlock as v, normalizeStyle as d, normalizeClass as u, createElementVNode as f, renderSlot as h, createTextVNode as _, toDisplayString as g } from "vue";
|
|
3
|
-
import { S as w } from "./mc-select-group-
|
|
4
|
-
import { S } from "./mc-select-
|
|
3
|
+
import { S as w } from "./mc-select-group-DPGvLjck.js";
|
|
4
|
+
import { S } from "./mc-select-B7XqWfwV.js";
|
|
5
5
|
const j = "mc-select-option", k = { class: "mc-select-option-content" }, y = o(e(t({ name: j, __name: "mc-select-option", props: { value: {}, label: {}, width: {}, height: {}, _group: {}, _vnode: {} }, setup(e2, { expose: o2 }) {
|
|
6
|
-
const t2 = s(), j2 = e2, y2 = l(S, void 0), O = l(w, void 0), b = c(() => y2 == null ? void 0 : y2.selectValues.value.includes(j2.value)), x = c(() => !!(y2 == null ? void 0 : y2.filterOptions.value.some((e3) => e3.value === j2.value))),
|
|
7
|
-
y2 == null ? void 0 : y2.handleSelect(
|
|
6
|
+
const t2 = s(), j2 = e2, y2 = l(S, void 0), O = l(w, void 0), b = c(() => y2 == null ? void 0 : y2.selectValues.value.includes(j2.value)), x = c(() => !!(y2 == null ? void 0 : y2.filterOptions.value.some((e3) => e3.value === j2.value))), M = i(), C = () => {
|
|
7
|
+
y2 == null ? void 0 : y2.handleSelect(I(j2));
|
|
8
8
|
};
|
|
9
9
|
a(() => {
|
|
10
|
-
y2 == null ? void 0 : y2.addOption(
|
|
10
|
+
y2 == null ? void 0 : y2.addOption(I(j2));
|
|
11
11
|
}), n(() => {
|
|
12
|
-
y2 == null ? void 0 : y2.removeOption(
|
|
12
|
+
y2 == null ? void 0 : y2.removeOption(I(j2));
|
|
13
13
|
});
|
|
14
|
-
const
|
|
14
|
+
const I = (e3) => {
|
|
15
15
|
var _a;
|
|
16
|
-
return { ...e3, _group: O == null ? void 0 : O.groupName, _vnode: p("div", { class: "mc-select-option-content" }, (_a =
|
|
17
|
-
},
|
|
18
|
-
return o2({ isShow: x.value, ref: t2 }), (o3, s2) => x.value ? (v(), m("div", { key: 0, class: u(["mc-select-dropdown-item mc-select-option", { "mc-select-option-icon-active": b.value }]), onClick:
|
|
16
|
+
return { ...e3, _group: O == null ? void 0 : O.groupName, _vnode: p("div", { class: "mc-select-option-content" }, (_a = M.default) == null ? void 0 : _a.call(M, {})) };
|
|
17
|
+
}, K = c(() => ({ width: j2.width ?? void 0, height: j2.height ?? void 0 }));
|
|
18
|
+
return o2({ isShow: x.value, ref: t2 }), (o3, s2) => x.value ? (v(), m("div", { key: 0, class: u(["mc-select-dropdown-item mc-select-option", { "mc-select-option-icon-active": b.value }]), onClick: C, ref_key: "_ref", ref: t2, style: d(K.value) }, [f("div", k, [h(o3.$slots, "default", {}, () => [_(g(e2.label), 1)], true)])], 6)) : r("", true);
|
|
19
19
|
} }), [["__scopeId", "data-v-8c13e012"]]));
|
|
20
20
|
export {
|
|
21
21
|
y as M,
|
|
@@ -2,23 +2,23 @@ import { _ as e, u as l } from "./utils-y7s5KtP-.js";
|
|
|
2
2
|
import { defineComponent as a, inject as t, computed as o, ref as s, withDirectives as i, createElementBlock as u, openBlock as d, normalizeStyle as c, normalizeClass as v, unref as p, renderSlot as r, createBlock as n, toDisplayString as m, vShow as b } from "vue";
|
|
3
3
|
import { find as h, includes as f } from "lodash-es";
|
|
4
4
|
import { useWidthHeight as y } from "@mc-plus/hooks";
|
|
5
|
-
import { M as
|
|
6
|
-
import { a as
|
|
7
|
-
const
|
|
8
|
-
const l2 = e2, { height: a2, width:
|
|
5
|
+
import { M as O } from "./mc-select-multi-option-BFTikd5T.js";
|
|
6
|
+
import { a as _ } from "./mc-select-plus-BNA_HLU1.js";
|
|
7
|
+
const g = "mc-select-option-plus", k = ["aria-selected"], M = { key: 1, class: "mc-select-option-label" }, j = l(e(a({ name: g, __name: "mc-select-option-plus", props: { label: {}, value: { type: [String, Number, Boolean] }, height: { default: 40 }, width: { default: "100%" }, disabled: { type: Boolean } }, setup(e2) {
|
|
8
|
+
const l2 = e2, { height: a2, width: g2 } = y(), j2 = t(_ || void 0), w = o(() => !!h(j2 == null ? void 0 : j2.filteredOptions.value, (e3) => e3.value === l2.value)), B = o(() => !!(j2 == null ? void 0 : j2.isMulti.value)), x = o(() => {
|
|
9
9
|
if (B.value) {
|
|
10
10
|
const e3 = j2 == null ? void 0 : j2.selectedOption.value;
|
|
11
11
|
return f(e3, l2.value);
|
|
12
12
|
}
|
|
13
13
|
return (j2 == null ? void 0 : j2.selectedOption.value) === l2.value;
|
|
14
|
-
}),
|
|
14
|
+
}), A = s(false), C = o(() => l2.label), D = () => {
|
|
15
15
|
j2 == null ? void 0 : j2.hover(l2.value);
|
|
16
|
-
},
|
|
16
|
+
}, H = o(() => (j2 == null ? void 0 : j2.hoverOption.value) === l2.value), I = () => {
|
|
17
17
|
l2.disabled || (j2 == null ? void 0 : j2.select(l2.value));
|
|
18
18
|
};
|
|
19
|
-
return (l3, t2) => i((d(), u("li", { role: "option", class: v(["mc-select-option", { "mc-select-option-actived":
|
|
19
|
+
return (l3, t2) => i((d(), u("li", { role: "option", class: v(["mc-select-option", { "mc-select-option-actived": x.value && !B.value, "mc-select-option-hover": H.value, "mc-select-option-disabled": e2.disabled }]), style: c({ height: p(a2), width: p(g2) }), "aria-selected": A.value, onMouseenter: D, onClick: I }, [r(l3.$slots, "default", { isActived: x.value, isDisabled: e2.disabled }, () => [B.value ? (d(), n(p(O), { key: 0, "model-value": x.value, label: C.value, disabled: e2.disabled }, null, 8, ["model-value", "label", "disabled"])) : (d(), u("span", M, m(C.value), 1))], true)], 46, k)), [[b, w.value]]);
|
|
20
20
|
} }), [["__scopeId", "data-v-5c070d19"]]));
|
|
21
21
|
export {
|
|
22
22
|
j as M,
|
|
23
|
-
|
|
23
|
+
g as a
|
|
24
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as e, _ as l, u as a } from "./utils-y7s5KtP-.js";
|
|
2
|
-
import { ref as t, computed as o, getCurrentInstance as s, watchEffect as u, onMounted as r, watch as n, inject as c, defineComponent as i, h as p, provide as v, createElementBlock as d, openBlock as m, normalizeClass as h, unref as f, createVNode as g, normalizeStyle as y, withCtx as b, createBlock as w, createCommentVNode as k, createElementVNode as x, renderSlot as O, isRef as V, Fragment as S, createTextVNode as _, withDirectives as B, withKeys as j, withModifiers as A, vModelText as M, renderList as
|
|
3
|
-
import { isFunction as
|
|
2
|
+
import { ref as t, computed as o, getCurrentInstance as s, watchEffect as u, onMounted as r, watch as n, inject as c, defineComponent as i, h as p, provide as v, createElementBlock as d, openBlock as m, normalizeClass as h, unref as f, createVNode as g, normalizeStyle as y, withCtx as b, createBlock as w, createCommentVNode as k, createElementVNode as x, renderSlot as O, isRef as V, Fragment as S, createTextVNode as _, withDirectives as B, withKeys as j, withModifiers as A, vModelText as M, renderList as I, toDisplayString as R, resolveDynamicComponent as $, vShow as C, nextTick as P } from "vue";
|
|
3
|
+
import { isFunction as H, findIndex as D, isEmpty as F, map as z, filter as E, includes as G, toLower as T, uniqBy as N, isArray as U, isString as K, isNumber as L, find as q, difference as W } from "lodash-es";
|
|
4
4
|
import { useProp as J, useWidthHeight as Q, useFocus as X, useHover as Y, useClickOutside as Z } from "@mc-plus/hooks";
|
|
5
5
|
import { M as ee } from "./mc-icon-CmYW61Q0.js";
|
|
6
6
|
import { M as le } from "./mc-popper-CbGrFzA5.js";
|
|
@@ -10,12 +10,12 @@ import { M as oe } from "./mc-footer-BeEDYFlH.js";
|
|
|
10
10
|
import { M as se } from "./mc-checkbox-DOYKa_Ym.js";
|
|
11
11
|
import { M as ue } from "./mc-button-Bg4Yihn7.js";
|
|
12
12
|
import { u as re } from "./mc-form-B2yyvtha.js";
|
|
13
|
-
import { M as ne } from "./mc-select-group-plus-
|
|
14
|
-
import { a as ce } from "./mc-select-option-plus-
|
|
13
|
+
import { M as ne } from "./mc-select-group-plus-CI0jtl4n.js";
|
|
14
|
+
import { a as ce } from "./mc-select-option-plus-PUkvSiLd.js";
|
|
15
15
|
import { I as ie, u as pe } from "./mc-input-group-C7qYI7yq.js";
|
|
16
16
|
const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id", "placeholder", "readonly", "disabled", "onKeydown"], he = { key: 0, class: "mc-select-multi-options-wrapper" }, fe = { key: 1, class: "mc-select-selected-content-wrapper" }, ge = { key: 1, class: "mc-select-placeholder" }, ye = { key: 0, class: "mc-select-status-icon-wrapper" }, be = { key: 0, class: "mc-select-dropdown-header-content" }, we = { key: 0, class: "mc-select-empty" }, ke = a(l(i({ name: de, __name: "mc-select-plus", props: { width: { default: 320 }, height: { default: 40 }, placeholder: { default: "Please select" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, multiple: { type: Boolean, default: false }, maxTags: {}, search: { type: Boolean, default: false }, options: {}, showHeader: { type: Boolean, default: false }, showFooter: { type: Boolean, default: false }, modelValue: { type: [String, Number, Boolean, Array] }, placement: { default: "bottom-start" }, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, validateProp: {} }, emits: ["update:modelValue", "change", "focus", "blur", "expand"], setup(l2, { emit: a2 }) {
|
|
17
17
|
const i2 = l2, de2 = a2, ke2 = o(() => i2.multiple), xe = t(), { wrapperRef: Oe, isFocused: Ve, handleFocus: Se, handleBlur: _e } = X(xe, { afterBlur: async () => {
|
|
18
|
-
await e(300), await
|
|
18
|
+
await e(300), await qe("blur");
|
|
19
19
|
} }), { isHovering: Be } = Y(Oe), { selectRef: je, width: Ae, height: Me } = (() => {
|
|
20
20
|
const e2 = t(), { width: l3, height: a3 } = Q(), o2 = () => {
|
|
21
21
|
e2.value && (e2.value.style.setProperty("--mc-select-width", l3.value || "auto"), e2.value.style.setProperty("--mc-select-height", a3.value || "auto"));
|
|
@@ -23,7 +23,7 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
23
23
|
return r(() => {
|
|
24
24
|
o2();
|
|
25
25
|
}), n(() => l3.value, () => o2()), { selectRef: e2, width: l3, height: a3, setWidth: o2 };
|
|
26
|
-
})(), { selectOptions:
|
|
26
|
+
})(), { selectOptions: Ie } = (() => {
|
|
27
27
|
let e2 = [];
|
|
28
28
|
const l3 = t([]), a3 = s().proxy;
|
|
29
29
|
return u(() => {
|
|
@@ -36,7 +36,7 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
36
36
|
var _a2, _b2, _c, _d, _e2, _f, _g, _h;
|
|
37
37
|
const o2 = (_a2 = (e6 == null ? void 0 : e6.type) || {}) == null ? void 0 : _a2.name;
|
|
38
38
|
if (o2 === ne) {
|
|
39
|
-
const l5 =
|
|
39
|
+
const l5 = K(e6.children) || U(e6.children) || !H((_b2 = e6.children) == null ? void 0 : _b2.default) ? e6.children : (_c = e6.children) == null ? void 0 : _c.default();
|
|
40
40
|
a4(l5, (_d = e6.props) == null ? void 0 : _d.label);
|
|
41
41
|
} else o2 === ce ? l4.push({ label: (_e2 = e6.props) == null ? void 0 : _e2.label, value: (_f = e6.props) == null ? void 0 : _f.value, disabled: (_g = e6.props) == null ? void 0 : _g.disabled, group: t3, context: (_h = e6.children) == null ? void 0 : _h.default }) : Array.isArray(e6.children) && a4(e6.children, t3);
|
|
42
42
|
});
|
|
@@ -51,12 +51,12 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
51
51
|
return true;
|
|
52
52
|
})(l3.value, e2) || (e2 = l3.value);
|
|
53
53
|
}), { selectOptions: l3 };
|
|
54
|
-
})(), { searchValue:
|
|
55
|
-
const l3 = t(""), a3 = J("search"), s2 = o(() => !!a3.value), u2 = o(() => s2.value && !F(l3.value)), r2 = o(() => (e2 == null ? void 0 : e2.value.length) ? z(E(e2.value, (e3) => G(T(e3.label), T(l3.value))), (e3) => ({ value: e3.value, group: e3.group })) : []), n2 = o(() => r2.value.length ? z(
|
|
54
|
+
})(), { searchValue: Re, isSearch: $e, hasSearchValue: Ce, filteredOptions: Pe, filteredGroups: He, clearSearchValue: De } = ((e2) => {
|
|
55
|
+
const l3 = t(""), a3 = J("search"), s2 = o(() => !!a3.value), u2 = o(() => s2.value && !F(l3.value)), r2 = o(() => (e2 == null ? void 0 : e2.value.length) ? z(E(e2.value, (e3) => G(T(e3.label), T(l3.value))), (e3) => ({ value: e3.value, group: e3.group })) : []), n2 = o(() => r2.value.length ? z(N(r2.value, "group"), (e3) => e3.group) : []);
|
|
56
56
|
return { searchValue: l3, isSearch: s2, hasSearchValue: u2, filteredOptions: r2, filteredGroups: n2, clearSearchValue: () => {
|
|
57
57
|
l3.value = "";
|
|
58
58
|
} };
|
|
59
|
-
})(
|
|
59
|
+
})(Ie), { hoverOption: Fe, setHoverOption: ze, handlePressArrow: Ee, clearHoverOption: Ge } = ((e2) => {
|
|
60
60
|
const l3 = t(), a3 = () => {
|
|
61
61
|
l3.value = void 0;
|
|
62
62
|
};
|
|
@@ -69,12 +69,12 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
69
69
|
const o2 = D(e2 == null ? void 0 : e2.value, (e3) => e3.value === l3.value);
|
|
70
70
|
"ArrowDown" === t2.key ? l3.value = ((_b = e2.value[o2 + 1]) == null ? void 0 : _b.value) || ((_c = e2.value[0]) == null ? void 0 : _c.value) : "ArrowUp" === t2.key && (l3.value = ((_d = e2.value[o2 - 1]) == null ? void 0 : _d.value) || ((_e2 = e2.value[e2.value.length - 1]) == null ? void 0 : _e2.value));
|
|
71
71
|
}, clearHoverOption: a3 };
|
|
72
|
-
})(
|
|
72
|
+
})(Pe), { formId: Te, formDisabled: Ne, validateStatus: Ue, validateStyle: Ke, statusIcon: Le, validateByTrigger: qe } = re(), { isDisabled: We } = ((e2, l3) => {
|
|
73
73
|
const a3 = c(ie, void 0), t2 = o(() => !!e2.value || !!(a3 == null ? void 0 : a3.disabled.value));
|
|
74
74
|
return n(t2, (e3) => {
|
|
75
|
-
e3 &&
|
|
75
|
+
e3 && H(l3) && l3();
|
|
76
76
|
}), { isDisabled: t2 };
|
|
77
|
-
})(
|
|
77
|
+
})(Ne, () => {
|
|
78
78
|
Ye(false), De();
|
|
79
79
|
}), { isExpanded: Je, popperRef: Qe, popperOptions: Xe, toggleExpand: Ye } = ((e2) => {
|
|
80
80
|
const l3 = t(false), a3 = s(), { emit: u2 } = a3, r2 = t(), i3 = c(ie, void 0), p2 = J("inputGroupPosition"), v2 = { modifiers: [{ name: "offset", options: { offset: [o(() => i3 && p2.value ? "prefix" === p2.value ? -1 : "suffix" === p2.value ? 1 : 0 : 0).value, 0] } }] };
|
|
@@ -89,10 +89,10 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
89
89
|
return { showClearIcon: o(() => !!s2.value && a3.value && !l3.value), mouseOverIcon: (e3) => {
|
|
90
90
|
a3.value = e3;
|
|
91
91
|
}, clear: () => {
|
|
92
|
-
|
|
92
|
+
H(e2) && e2();
|
|
93
93
|
} };
|
|
94
94
|
})(async () => {
|
|
95
|
-
We.value || (al.value = ke2.value ? [] : void 0, De(), Ye(false), Vl(), await
|
|
95
|
+
We.value || (al.value = ke2.value ? [] : void 0, De(), Ye(false), Vl(), await P(), qe("input"));
|
|
96
96
|
}, We);
|
|
97
97
|
pe({ validateStatus: Ue, isExpanded: Je, isFocused: Ve, isHovering: Be }), Z(je, () => {
|
|
98
98
|
De(), Ye(false);
|
|
@@ -104,7 +104,7 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
104
104
|
const al = t(), tl = o(() => {
|
|
105
105
|
if (ke2.value) {
|
|
106
106
|
const e2 = i2.maxTags, l3 = al.value;
|
|
107
|
-
if (
|
|
107
|
+
if (L(e2)) {
|
|
108
108
|
const a3 = l3.length - e2, t2 = [];
|
|
109
109
|
for (let a4 = 0; a4 < e2 && a4 < l3.length; a4++) {
|
|
110
110
|
const e3 = l3[a4];
|
|
@@ -118,8 +118,8 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
118
118
|
}), ol = o(() => {
|
|
119
119
|
var _a;
|
|
120
120
|
return ke2.value ? (_a = al.value) == null ? void 0 : _a.map((e2) => ul(e2)) : ul(al.value);
|
|
121
|
-
}), sl = o(() =>
|
|
122
|
-
const l3 =
|
|
121
|
+
}), sl = o(() => Pe.value.length > 0), ul = (e2) => {
|
|
122
|
+
const l3 = q(Ie.value, (l4) => l4.value === e2);
|
|
123
123
|
return (l3 == null ? void 0 : l3.label) || (l3 == null ? void 0 : l3.value);
|
|
124
124
|
}, rl = async (e2) => {
|
|
125
125
|
if (De(), !We.value) {
|
|
@@ -127,14 +127,14 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
127
127
|
const l3 = al.value;
|
|
128
128
|
G(l3, e2) ? al.value = W(l3, [e2]) : al.value = [...l3, e2];
|
|
129
129
|
} else al.value = e2;
|
|
130
|
-
ke2.value || Ye(false), Vl(), await
|
|
130
|
+
ke2.value || Ye(false), Vl(), await P(), qe("input");
|
|
131
131
|
}
|
|
132
132
|
}, nl = o(() => {
|
|
133
133
|
if (!ke2.value) {
|
|
134
|
-
const e2 =
|
|
134
|
+
const e2 = q(Ie.value, (e3) => e3.value === al.value);
|
|
135
135
|
return (e2 == null ? void 0 : e2.context) ? e2.context : p("span", { class: "mc-selected-option-label", style: { color: "inherit" } }, (e2 == null ? void 0 : e2.label) || (e2 == null ? void 0 : e2.value));
|
|
136
136
|
}
|
|
137
|
-
}), cl = o(() => !
|
|
137
|
+
}), cl = o(() => !Ce.value && !!al.value), il = o(() => !!i2.placeholder && !Ce.value && kl.value), pl = o(() => Ve.value ? "minimal" : "bold");
|
|
138
138
|
n(Je, () => {
|
|
139
139
|
Ge();
|
|
140
140
|
});
|
|
@@ -152,10 +152,10 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
152
152
|
const t2 = l3.value;
|
|
153
153
|
(t2 == null ? void 0 : t2.length) && ((_a = a3.value) == null ? void 0 : _a.length) && (t2 == null ? void 0 : t2.length) === ((_b = a3.value) == null ? void 0 : _b.length) ? s2.value = true : (t2 == null ? void 0 : t2.length) > 0 ? (s2.value = false, r2.value = true) : (s2.value = false, r2.value = false);
|
|
154
154
|
}), { isSelectAll: s2, isSelectPartial: r2, selectAll: () => {
|
|
155
|
-
e2.value &&
|
|
155
|
+
e2.value && H(o2) && o2();
|
|
156
156
|
} };
|
|
157
|
-
})(ke2, al,
|
|
158
|
-
hl.value ? al.value =
|
|
157
|
+
})(ke2, al, Ie, () => {
|
|
158
|
+
hl.value ? al.value = Ie.value.map((e2) => e2.value) : al.value = [], Vl();
|
|
159
159
|
}), yl = t([]);
|
|
160
160
|
n(Je, () => {
|
|
161
161
|
Je.value && ke2.value && (yl.value = al.value);
|
|
@@ -167,13 +167,13 @@ const ve = Symbol("mc-select-plus-context"), de = "mc-select-plus", me = ["id",
|
|
|
167
167
|
}, kl = o(() => {
|
|
168
168
|
var _a;
|
|
169
169
|
return ke2.value ? ((_a = al.value) == null ? void 0 : _a.length) <= 0 : !al.value;
|
|
170
|
-
}), xl = o(() => Ze.value && !kl.value), Ol = o(() => We.value ? "not-allowed" :
|
|
170
|
+
}), xl = o(() => Ze.value && !kl.value), Ol = o(() => We.value ? "not-allowed" : $e.value ? "text" : "pointer"), Vl = () => {
|
|
171
171
|
de2("update:modelValue", al.value), de2("change", al.value);
|
|
172
172
|
};
|
|
173
|
-
return v(ve, { isMulti: ke2, selectedOption: al, filteredOptions:
|
|
173
|
+
return v(ve, { isMulti: ke2, selectedOption: al, filteredOptions: Pe, filteredGroups: He, hoverOption: Fe, select: rl, hover: ze }), (e2, a3) => (m(), d("div", { ref_key: "selectRef", ref: je, class: h(["mc-select", { "mc-select-expanded": f(Je) }]) }, [g(f(le), { ref_key: "popperRef", ref: Qe, placement: l2.placement, trigger: "manual", class: "mc-select-popper", style: y({ width: f(Ae) }), "show-arrow": false, "popper-options": f(Xe), "hide-timeout": 100 }, { default: b(() => [x("div", { ref_key: "triggerRef", ref: Oe, class: h(["mc-select-trigger", { "mc-select-trigger-focused": f(Ve), "mc-select-trigger-disabled": f(We), "mc-select-trigger-hovering": f(Be), [f(Ke)]: f(Ke) }]), style: y({ width: f(Ae), height: f(Me) }), onClick: vl }, [x("div", { class: "mc-select-input-wrapper", style: y({ cursor: Ol.value }) }, [B(x("input", { "onUpdate:modelValue": a3[0] || (a3[0] = (e3) => V(Re) ? Re.value = e3 : null), ref_key: "inputRef", ref: xe, id: f(Te), class: "mc-select-input", style: y({ width: f(Ce) ? "100%" : "1px" }), placeholder: l2.placeholder, readonly: !f($e) || f(We), disabled: f(We), onFocus: a3[1] || (a3[1] = (...e3) => f(Se) && f(Se)(...e3)), onBlur: a3[2] || (a3[2] = (...e3) => f(_e) && f(_e)(...e3)), onInput: dl, onKeydown: [j(A(ml, ["stop"]), ["enter"]), a3[3] || (a3[3] = j(A((...e3) => f(Ee) && f(Ee)(...e3), ["stop"]), ["arrow-down"])), a3[4] || (a3[4] = j(A((...e3) => f(Ee) && f(Ee)(...e3), ["stop"]), ["arrow-up"]))] }, null, 44, me), [[M, f(Re)]]), cl.value ? O(e2.$slots, "selected-content", { key: 0, selectedOption: al.value, selectedOptionLabel: ol.value, isDisabled: f(We) }, () => [ke2.value ? (m(), d("ul", he, [(m(true), d(S, null, I(tl.value, (e3) => (m(), d("li", { key: `${e3.item}`, class: "mc-select-multi-option" }, [g(f(ae), { size: "x-small", type: "selectable", deletable: e3.selectable, emphasis: pl.value, disabled: f(We), onDelete: (l3) => ((e4) => {
|
|
174
174
|
const l4 = al.value;
|
|
175
175
|
al.value = W(l4, [e4]), Vl();
|
|
176
|
-
})(e3.item) }, { default: b(() => [_(
|
|
176
|
+
})(e3.item) }, { default: b(() => [_(R(e3.label), 1)]), _: 2 }, 1032, ["deletable", "emphasis", "disabled", "onDelete"])]))), 128))])) : (m(), d("div", fe, [nl.value ? (m(), w($(nl.value), { key: al.value })) : k("", true)]))], true) : k("", true), il.value ? (m(), d("p", ge, [O(e2.$slots, "placeholder", {}, () => [_(R(l2.placeholder), 1)], true)])) : k("", true)], 4), f(Le) ? (m(), d("div", ye, [f(Le) ? (m(), w(f(ee), { key: 0, name: f(Le), size: 24 }, null, 8, ["name"])) : k("", true)])) : k("", true), x("div", { class: "mc-select-icon-wrapper", onMouseenter: a3[5] || (a3[5] = (e3) => f(el)(true)), onMouseleave: a3[6] || (a3[6] = (e3) => f(el)(false)) }, [B(g(f(ee), { name: "Reject", size: 20, class: "mc-select-clear-icon", onClick: A(f(ll), ["stop"]) }, null, 8, ["onClick"]), [[C, xl.value]]), B(g(f(ee), { name: "Down-Chevron", size: 24, class: h(["mc-select-chevron-icon", { "mc-select-chevron-icon-rotate": f(Je) }]) }, null, 8, ["class"]), [[C, !xl.value]])], 32)], 6)]), content: b(() => [sl.value && l2.showHeader ? (m(), w(f(te), { key: 0, class: "mc-select-dropdown-header", "show-tool-bar": false, height: "40px" }, { default: b(() => [O(e2.$slots, "option-header", {}, () => [ke2.value ? (m(), d("div", be, [g(f(se), { modelValue: f(hl), "onUpdate:modelValue": a3[7] || (a3[7] = (e3) => V(hl) ? hl.value = e3 : null), content: "Select All", "form-validate": false, partial: f(fl), onChange: f(gl) }, null, 8, ["modelValue", "partial", "onChange"])])) : k("", true)], true)]), _: 3 })) : k("", true), x("ul", { class: "mc-select-list", style: y({ paddingTop: l2.showHeader ? "40px" : "0", paddingBottom: l2.showFooter ? "48px" : "0" }) }, [O(e2.$slots, "default", {}, void 0, true), sl.value ? k("", true) : (m(), d("li", we, [O(e2.$slots, "empty", {}, () => [a3[8] || (a3[8] = x("p", { class: "mc-select-text" }, "No results found", -1))], true)]))], 4), sl.value && l2.showFooter ? (m(), w(f(oe), { key: 1, class: "mc-select-dropdown-footer" }, { "right-button-group": b(() => [O(e2.$slots, "option-footer", {}, () => [ke2.value ? (m(), d(S, { key: 0 }, [g(f(ue), { type: "link", size: "small", onClick: bl }, { default: b(() => [...a3[9] || (a3[9] = [_(" Reset ", -1)])]), _: 1 }), g(f(ue), { type: "plain", size: "small", onClick: wl }, { default: b(() => [...a3[10] || (a3[10] = [_(" Apply ", -1)])]), _: 1 })], 64)) : k("", true)], true)]), _: 3 })) : k("", true)]), _: 3 }, 8, ["placement", "style", "popper-options"])], 2));
|
|
177
177
|
} }), [["__scopeId", "data-v-e971c45f"]]));
|
|
178
178
|
export {
|
|
179
179
|
ke as M,
|
|
@@ -6,8 +6,8 @@ import { M as g } from "./mc-icon-CmYW61Q0.js";
|
|
|
6
6
|
import { useProp as I } from "@mc-plus/hooks";
|
|
7
7
|
import { M as j } from "./mc-step-item-plus-DupEJu7U.js";
|
|
8
8
|
import { M } from "./mc-step-child-item-plus-CUT06Cwi.js";
|
|
9
|
-
const _ = "mc-step-plus", B = { class: "mc-step-plus" }, V = { class: "mc-step-container" }, z = ["onClick"], E = { class: "mc-step-item-icon" }, N = { key: 0, class: "mc-step-item-icon-number" }, P = { key: 1, class: "mc-step-item-icon-point" },
|
|
10
|
-
const _2 = e2, K2 = l2, { stepItems: L, activedStep: O, isActivedStep: Q, showStep:
|
|
9
|
+
const _ = "mc-step-plus", B = { class: "mc-step-plus" }, V = { class: "mc-step-container" }, z = ["onClick"], E = { class: "mc-step-item-icon" }, N = { key: 0, class: "mc-step-item-icon-number" }, P = { key: 1, class: "mc-step-item-icon-point" }, T = { class: "mc-step-item-content" }, q = { class: "mc-step-item-content-title" }, D = { class: "mc-step-item-label" }, F = { key: 1, class: "mc-step-item-label-title" }, G = { class: "mc-step-item-desc" }, H = { key: 1, class: "mc-step-item-desc-title" }, J = { key: 0, class: "mc-step-item-content-display" }, K = s(e(l({ name: _, __name: "mc-step-plus", props: { modelValue: { default: void 0 }, successSteps: {}, successBehavior: { default: "manual" }, previousBehavior: { default: "last-child" } }, emits: ["update:modelValue", "update:successSteps", "change", "click:step"], setup(e2, { expose: s2, emit: l2 }) {
|
|
10
|
+
const _2 = e2, K2 = l2, { stepItems: L, activedStep: O, isActivedStep: Q, showStep: R, isSuccessStep: U, showContent: W } = (() => {
|
|
11
11
|
const e3 = t([]), s3 = c();
|
|
12
12
|
i(() => {
|
|
13
13
|
var _a;
|
|
@@ -60,9 +60,9 @@ const _ = "mc-step-plus", B = { class: "mc-step-plus" }, V = { class: "mc-step-c
|
|
|
60
60
|
let s3 = e3 - 1, t2 = L.value[s3];
|
|
61
61
|
((_b = O.value) == null ? void 0 : _b.isChild) && O.value.parentStep === t2 && (t2 = L.value[s3 - 1]), "first-child" === _2.previousBehavior && (t2 == null ? void 0 : t2.isChild) && !b((_c = t2.parentStep) == null ? void 0 : _c.index) && (s3 = t2.parentStep.index + 1, t2 = L.value[s3]), (t2 == null ? void 0 : t2.step) && Y(t2.step);
|
|
62
62
|
}
|
|
63
|
-
} }), (e3, s3) => (o(), p("div", B, [a("div", V, [(o(true), p(d, null, u(r(L), (e4) => (o(), p(d, { key: e4.step }, [r(
|
|
63
|
+
} }), (e3, s3) => (o(), p("div", B, [a("div", V, [(o(true), p(d, null, u(r(L), (e4) => (o(), p(d, { key: e4.step }, [r(R)(e4) ? (o(), p("div", { key: 0, class: h(["mc-step-item", { "mc-step-item-child": e4.isChild, "mc-step-item-actived": r(Q)(e4), "mc-step-item-success": r(U)(e4) }]) }, [a("div", { class: "mc-step-item-indicator", onClick: (s4) => ((e5) => {
|
|
64
64
|
K2("click:step", e5.step);
|
|
65
|
-
})(e4) }, [a("div", E, [e4.isChild || r(b)(e4.parentIndex) ? (o(), p("div", P)) : (o(), p("div", N, [r(U)(e4) ? (o(), v(r(A), { key: 0 })) : (o(), p(d, { key: 1 }, [e4.iconContent ? (o(), v(S(e4.iconContent), { key: e4.step, step: e4.step, isSuccess: r(U)(e4), isActived: r(Q)(e4) }, null, 8, ["step", "isSuccess", "isActived"])) : e4.icon ? (o(), v(r(g), { key: 1, name: e4.icon }, null, 8, ["name"])) : (o(), p(d, { key: 2 }, [C(f(e4.parentIndex + 1), 1)], 64))], 64))]))])], 8, z), a("div",
|
|
65
|
+
})(e4) }, [a("div", E, [e4.isChild || r(b)(e4.parentIndex) ? (o(), p("div", P)) : (o(), p("div", N, [r(U)(e4) ? (o(), v(r(A), { key: 0 })) : (o(), p(d, { key: 1 }, [e4.iconContent ? (o(), v(S(e4.iconContent), { key: e4.step, step: e4.step, isSuccess: r(U)(e4), isActived: r(Q)(e4) }, null, 8, ["step", "isSuccess", "isActived"])) : e4.icon ? (o(), v(r(g), { key: 1, name: e4.icon }, null, 8, ["name"])) : (o(), p(d, { key: 2 }, [C(f(e4.parentIndex + 1), 1)], 64))], 64))]))])], 8, z), a("div", T, [a("div", q, [a("div", D, [e4.labelContent ? (o(), v(S(e4.labelContent), { key: e4.step, step: e4.step, label: e4.label, isSuccess: r(U)(e4), isActived: r(Q)(e4) }, null, 8, ["step", "label", "isSuccess", "isActived"])) : (o(), p("div", F, f(e4.label), 1))]), a("div", G, [e4.descContent ? (o(), v(S(e4.descContent), { key: e4.step, step: e4.step, desc: e4.desc, isSuccess: r(U)(e4), isActived: r(Q)(e4) }, null, 8, ["step", "desc", "isSuccess", "isActived"])) : (o(), p("div", H, f(e4.desc), 1))])]), r(W)(e4) ? (o(), p("div", J, [(o(), v(S(e4.content), { key: e4.step, step: e4.step, isSuccess: r(U)(e4), isActived: r(Q)(e4) }, null, 8, ["step", "isSuccess", "isActived"]))])) : m("", true)])], 2)) : m("", true)], 64))), 128))])]));
|
|
66
66
|
} }), [["__scopeId", "data-v-d451c649"]]));
|
|
67
67
|
export {
|
|
68
68
|
K as M,
|
|
@@ -3,49 +3,49 @@ import { defineComponent as t, ref as n, useSlots as l, watchEffect as d, Fragme
|
|
|
3
3
|
import { map as k, filter as P, find as V, findIndex as x } from "lodash-es";
|
|
4
4
|
import { M as R } from "./mc-tab-item-CqXL4HVs.js";
|
|
5
5
|
const C = "mc-tab", L = ["onClick"], $ = { key: 0, class: "mc-tab-nav-item-count" }, j = { class: "mc-tab-actived-component-wrapper" }, A = a(e(t({ name: C, __name: "mc-tab", props: { modelValue: {}, type: { default: "plain" }, wrapperPadding: { default: "0" } }, emits: ["update:modelValue", "change"], setup(e2, { expose: a2, emit: t2 }) {
|
|
6
|
-
const C2 = e2, A2 = t2, B = n(), M = n(),
|
|
6
|
+
const C2 = e2, A2 = t2, B = n(), M = n(), I = n(), N = n([]), T = l();
|
|
7
7
|
d(() => {
|
|
8
|
-
if (!
|
|
9
|
-
let e3 =
|
|
10
|
-
e3.length && e3[0].type === i && (e3 = [...Array.from(e3[0].children)]),
|
|
8
|
+
if (!T.default) return void (N.value = []);
|
|
9
|
+
let e3 = T.default();
|
|
10
|
+
e3.length && e3[0].type === i && (e3 = [...Array.from(e3[0].children)]), N.value = k(P(e3, (e4) => e4.type.name === R), (e4) => {
|
|
11
11
|
var _a, _b, _c;
|
|
12
12
|
const a3 = e4.props;
|
|
13
13
|
return { _vnode: r("div", (_c = (_b = (_a = e4.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c[0]), ...a3 };
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const X = s(() => V(N.value, (e3) => e3.name === C2.modelValue)), Y = s(() => "plain" === C2.type);
|
|
17
17
|
o(async () => {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
q(C2.modelValue), setTimeout(() => {
|
|
19
|
+
z();
|
|
20
20
|
});
|
|
21
21
|
}), m(() => {
|
|
22
|
-
|
|
22
|
+
z(false);
|
|
23
23
|
});
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
const a3 =
|
|
24
|
+
const q = (e3) => {
|
|
25
|
+
if (!Y.value) return;
|
|
26
|
+
const a3 = I.value, t3 = M.value, n2 = x(N.value, (a4) => a4.name === e3);
|
|
27
27
|
if (n2 < 0) return void (a3.style.width = "0");
|
|
28
28
|
const l2 = Array.from(t3.children)[n2], { x: d2, width: i2 } = l2.getBoundingClientRect(), { x: r2 } = t3.getBoundingClientRect();
|
|
29
29
|
a3.style.width = `${i2}px`, a3.style.transform = `translateX(${d2 - r2}px)`;
|
|
30
|
-
},
|
|
31
|
-
const a3 =
|
|
32
|
-
|
|
30
|
+
}, z = (e3 = true) => {
|
|
31
|
+
const a3 = I.value;
|
|
32
|
+
Y.value && a3 && (a3.style.transition = e3 ? "transform 0.3s ease-in-out" : "");
|
|
33
33
|
};
|
|
34
34
|
c(() => C2.modelValue, (e3) => {
|
|
35
|
-
|
|
35
|
+
q(e3);
|
|
36
36
|
});
|
|
37
|
-
const
|
|
37
|
+
const D = s(() => {
|
|
38
38
|
var _a;
|
|
39
39
|
return "string" == typeof C2.wrapperPadding ? C2.wrapperPadding : ((_a = C2.wrapperPadding) == null ? void 0 : _a.left) ?? "0";
|
|
40
|
-
}),
|
|
40
|
+
}), E = s(() => {
|
|
41
41
|
var _a;
|
|
42
42
|
return "string" == typeof C2.wrapperPadding ? C2.wrapperPadding : ((_a = C2.wrapperPadding) == null ? void 0 : _a.right) ?? "0";
|
|
43
43
|
});
|
|
44
44
|
return a2({ ref: B }), (a3, t3) => {
|
|
45
45
|
var _a;
|
|
46
|
-
return u(), p("div", { class: v(["mc-tab", `mc-tab-${e2.type}`]), ref_key: "_ref", ref: B }, [f("div", { class: "mc-tab-nav", style: g({ paddingLeft:
|
|
46
|
+
return u(), p("div", { class: v(["mc-tab", `mc-tab-${e2.type}`]), ref_key: "_ref", ref: B }, [f("div", { class: "mc-tab-nav", style: g({ paddingLeft: D.value, paddingRight: E.value }) }, [f("div", { class: "mc-tab-nav-wrapper", ref_key: "tabNavRef", ref: M }, [(u(true), p(i, null, b(N.value, (a4) => (u(), p("div", { class: v(["mc-tab-nav-item", { "mc-tab-nav-item-active": a4.name === e2.modelValue, "mc-tab-nav-item-disabled": a4.disabled }]), key: a4.name, onClick: (e3) => ((e4) => {
|
|
47
47
|
e4.disabled || (A2("update:modelValue", e4.name), A2("change", e4.name));
|
|
48
|
-
})(a4) }, [f("span", null, h(a4.label), 1), a4.count ? (u(), p("span", $, h(a4.count), 1)) : y("", true)], 10, L))), 128))], 512),
|
|
48
|
+
})(a4) }, [f("span", null, h(a4.label), 1), a4.count ? (u(), p("span", $, h(a4.count), 1)) : y("", true)], 10, L))), 128))], 512), Y.value ? (u(), p("div", { key: 0, class: "mc-tab-line", ref_key: "tabLineRef", ref: I }, null, 512)) : y("", true)], 4), ((_a = X.value) == null ? void 0 : _a._vnode) ? (u(), p("div", { key: 0, class: "mc-tab-actived-component", style: g({ paddingLeft: D.value, paddingRight: E.value }) }, [f("div", j, [(u(), w(_(X.value._vnode), { key: X.value.name }))])], 4)) : y("", true)], 2);
|
|
49
49
|
};
|
|
50
50
|
} }), [["__scopeId", "data-v-2c21b5ce"]]));
|
|
51
51
|
export {
|