mc-plus 1.0.91 → 1.0.92
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 +74 -78
- package/dist/es/mc-checkbox-fUrJ11Pn.js +27 -0
- package/dist/es/mc-checkbox-group-DE7LdKhc.js +17 -0
- package/dist/es/mc-form-DSnSPFEV.js +125 -0
- package/dist/es/mc-form-item-x7MVIw2A.js +107 -0
- package/dist/es/{mc-input-qt44a-BA.js → mc-input-Dji1TCLK.js} +2 -2
- package/dist/es/{mc-input-group-BVInIbfD.js → mc-input-group-C412QZF6.js} +1 -1
- package/dist/es/mc-lightbox-LuAm7sTR.js +27 -0
- package/dist/es/mc-otp-zlicIS5X.js +72 -0
- package/dist/es/mc-radio-group-CH90E56Q.js +14 -0
- package/dist/es/{mc-radio-BvJudWMS.js → mc-radio-oKtW62nH.js} +2 -2
- package/dist/es/{mc-richtext-cCvk3_YC.js → mc-richtext-NegVG4QT.js} +3 -3
- package/dist/es/{mc-select-tQeJEpzP.js → mc-select-CCjPA3Fm.js} +1 -1
- package/dist/es/{mc-select-group-Ssi6Fqxg.js → mc-select-group-BjbSnZ2v.js} +1 -1
- package/dist/es/{mc-select-group-plus--I98oCQp.js → mc-select-group-plus-DGd4HEjo.js} +1 -1
- package/dist/es/{mc-select-multi-option-C88bpVmy.js → mc-select-multi-option-D4woh8WX.js} +1 -1
- package/dist/es/{mc-select-option-CC72eawi.js → mc-select-option-BauwRp9j.js} +2 -2
- package/dist/es/{mc-select-option-plus-C8tF0LmF.js → mc-select-option-plus-DpMjFIC4.js} +2 -2
- package/dist/es/{mc-select-plus-CuCSyBFq.js → mc-select-plus-CiTDNs_C.js} +5 -5
- package/dist/es/{mc-switch-lTGTJv17.js → mc-switch-BdCQPDDk.js} +8 -8
- package/dist/es/{mc-tab-DG4Xp3K-.js → mc-tab-RML3Io4K.js} +19 -19
- package/dist/es/{mc-table-B2e9bH-x.js → mc-table-Klsieon4.js} +1 -1
- package/dist/es/{mc-table-plus-Byf8E_rc.js → mc-table-plus-BpZYuZwB.js} +24 -24
- package/dist/es/mc-textarea-D-fL5RMY.js +18 -0
- package/dist/es/theme/mc-checkbox.css +1 -1
- package/dist/es/theme/mc-form-item.css +1 -1
- package/dist/es/theme/mc-lightbox.css +1 -1
- package/dist/index.css +1 -1
- package/dist/types/components.d.ts +0 -1
- package/dist/types/mc-checkbox/types.d.ts +2 -1
- package/dist/types/mc-checkbox-group/types.d.ts +5 -2
- package/dist/types/mc-form/index.d.ts +29 -8
- package/dist/types/mc-form/mc-form.vue.d.ts +10 -2
- package/dist/types/mc-form/types.d.ts +8 -2
- package/dist/types/mc-form-item/types.d.ts +1 -1
- package/dist/types/mc-otp/types.d.ts +2 -0
- package/dist/types/mc-radio-group/types.d.ts +2 -0
- package/dist/types/mc-switch/types.d.ts +2 -0
- package/dist/types/mc-textarea/types.d.ts +2 -0
- package/dist/types/mc-upload/index.d.ts +3 -3
- package/dist/types/mc-upload/mc-upload.vue.d.ts +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +59 -59
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-checkbox-BbtQA-ct.js +0 -27
- package/dist/es/mc-checkbox-group-DYUFk58Z.js +0 -17
- package/dist/es/mc-form-CzrT7EJQ.js +0 -119
- package/dist/es/mc-form-item-DB5P_tJG.js +0 -105
- package/dist/es/mc-lightbox-CHPAlSAZ.js +0 -25
- package/dist/es/mc-otp-oPzld7i2.js +0 -72
- package/dist/es/mc-radio-group-Cu_zrby6.js +0 -14
- package/dist/es/mc-step-v2-DOizPA9I.js +0 -76
- package/dist/es/mc-textarea-DIfCDzeM.js +0 -18
- package/dist/es/theme/mc-step-v2.css +0 -1
- package/dist/types/mc-step-v2/constant.d.ts +0 -4
- package/dist/types/mc-step-v2/index.d.ts +0 -109
- package/dist/types/mc-step-v2/mc-step-child-item-v2.vue.d.ts +0 -20
- package/dist/types/mc-step-v2/mc-step-item-v2.vue.d.ts +0 -31
- package/dist/types/mc-step-v2/mc-step-v2.vue.d.ts +0 -30
- package/dist/types/mc-step-v2/types.d.ts +0 -41
package/dist/es/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { M as E } from "./mc-alert-message-CSNd2a1H.js";
|
|
|
3
3
|
import { a } from "./mc-alert-message-CSNd2a1H.js";
|
|
4
4
|
import { M as O } from "./mc-button-Cw5y1mY7.js";
|
|
5
5
|
import { a as a2 } from "./mc-button-Cw5y1mY7.js";
|
|
6
|
-
import { M as L } from "./mc-checkbox-
|
|
7
|
-
import { a as a3 } from "./mc-checkbox-
|
|
8
|
-
import { M as x } from "./mc-checkbox-group-
|
|
9
|
-
import { C, a as a4 } from "./mc-checkbox-group-
|
|
6
|
+
import { M as L } from "./mc-checkbox-fUrJ11Pn.js";
|
|
7
|
+
import { a as a3 } from "./mc-checkbox-fUrJ11Pn.js";
|
|
8
|
+
import { M as x } from "./mc-checkbox-group-DE7LdKhc.js";
|
|
9
|
+
import { C, a as a4 } from "./mc-checkbox-group-DE7LdKhc.js";
|
|
10
10
|
import { M as R } from "./mc-collapse-24CttFhq.js";
|
|
11
11
|
import { C as C2, a as a5 } from "./mc-collapse-24CttFhq.js";
|
|
12
12
|
import { M as P } from "./mc-collapse-item-DXdUuYdt.js";
|
|
@@ -23,28 +23,28 @@ import { M as G } from "./mc-drawer-CRXWL5Cb.js";
|
|
|
23
23
|
import { a as a11 } from "./mc-drawer-CRXWL5Cb.js";
|
|
24
24
|
import { M as Y } from "./mc-footer-DsN_d9ZN.js";
|
|
25
25
|
import { a as a12 } from "./mc-footer-DsN_d9ZN.js";
|
|
26
|
-
import { M as X } from "./mc-form-
|
|
27
|
-
import { F, b } from "./mc-form-
|
|
28
|
-
import { M as H } from "./mc-form-item-
|
|
29
|
-
import { F as F2, a as a13 } from "./mc-form-item-
|
|
26
|
+
import { M as X } from "./mc-form-DSnSPFEV.js";
|
|
27
|
+
import { F, b } from "./mc-form-DSnSPFEV.js";
|
|
28
|
+
import { M as H } from "./mc-form-item-x7MVIw2A.js";
|
|
29
|
+
import { F as F2, a as a13 } from "./mc-form-item-x7MVIw2A.js";
|
|
30
30
|
import { M as K } from "./mc-icon-B6jOIL3w.js";
|
|
31
31
|
import { a as a14 } from "./mc-icon-B6jOIL3w.js";
|
|
32
32
|
import { M as y } from "./mc-icon-plus-CPv_Um2j.js";
|
|
33
33
|
import { b as b2 } from "./mc-icon-plus-CPv_Um2j.js";
|
|
34
|
-
import { M as v } from "./mc-input-
|
|
35
|
-
import { a as a15 } from "./mc-input-
|
|
36
|
-
import { M as w } from "./mc-input-group-
|
|
37
|
-
import { I, a as a16 } from "./mc-input-group-
|
|
38
|
-
import { M as J } from "./mc-lightbox-
|
|
39
|
-
import { a as a17 } from "./mc-lightbox-
|
|
34
|
+
import { M as v } from "./mc-input-Dji1TCLK.js";
|
|
35
|
+
import { a as a15 } from "./mc-input-Dji1TCLK.js";
|
|
36
|
+
import { M as w } from "./mc-input-group-C412QZF6.js";
|
|
37
|
+
import { I, a as a16 } from "./mc-input-group-C412QZF6.js";
|
|
38
|
+
import { M as J } from "./mc-lightbox-LuAm7sTR.js";
|
|
39
|
+
import { a as a17 } from "./mc-lightbox-LuAm7sTR.js";
|
|
40
40
|
import { M as V } from "./mc-loading-BprtzkRY.js";
|
|
41
41
|
import { a as a18 } from "./mc-loading-BprtzkRY.js";
|
|
42
42
|
import { M as Z } from "./mc-modal-header-ChnzEwB_.js";
|
|
43
43
|
import { a as a19 } from "./mc-modal-header-ChnzEwB_.js";
|
|
44
44
|
import { M as z } from "./mc-multi-tag-BvapzQee.js";
|
|
45
45
|
import { a as a20 } from "./mc-multi-tag-BvapzQee.js";
|
|
46
|
-
import { M as Q } from "./mc-otp-
|
|
47
|
-
import { a as a21 } from "./mc-otp-
|
|
46
|
+
import { M as Q } from "./mc-otp-zlicIS5X.js";
|
|
47
|
+
import { a as a21 } from "./mc-otp-zlicIS5X.js";
|
|
48
48
|
import { M as $ } from "./mc-overlay-DjeN3ZV8.js";
|
|
49
49
|
import { a as a22 } from "./mc-overlay-DjeN3ZV8.js";
|
|
50
50
|
import { M as ss } from "./mc-popper-tmM-KwaS.js";
|
|
@@ -57,32 +57,32 @@ import { a as rs } from "./mc-progress-indicator-item-BdtMbC7A.js";
|
|
|
57
57
|
import { M } from "./mc-progress-indicator-item-BdtMbC7A.js";
|
|
58
58
|
import { a as as } from "./mc-progress-indicator-child-item-445fslo3.js";
|
|
59
59
|
import { M as M2 } from "./mc-progress-indicator-child-item-445fslo3.js";
|
|
60
|
-
import { M as ts } from "./mc-radio-
|
|
61
|
-
import { a as a26 } from "./mc-radio-
|
|
62
|
-
import { a as ps } from "./mc-radio-group-
|
|
63
|
-
import { b as b4, M as M3 } from "./mc-radio-group-
|
|
60
|
+
import { M as ts } from "./mc-radio-oKtW62nH.js";
|
|
61
|
+
import { a as a26 } from "./mc-radio-oKtW62nH.js";
|
|
62
|
+
import { a as ps } from "./mc-radio-group-CH90E56Q.js";
|
|
63
|
+
import { b as b4, M as M3 } from "./mc-radio-group-CH90E56Q.js";
|
|
64
64
|
import { M as cs } from "./mc-removable-tag-DRQEDpf6.js";
|
|
65
65
|
import { a as a27 } from "./mc-removable-tag-DRQEDpf6.js";
|
|
66
66
|
import { M as es } from "./mc-reset-BUVKxOSI.js";
|
|
67
67
|
import { a as a28 } from "./mc-reset-BUVKxOSI.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-NegVG4QT.js";
|
|
69
|
+
import { F as F3, a as a29, b as b5, T } from "./mc-richtext-NegVG4QT.js";
|
|
70
70
|
import { M as Ms } from "./mc-secondary-menu-DxsDdW36.js";
|
|
71
71
|
import { a as a30 } from "./mc-secondary-menu-DxsDdW36.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-
|
|
84
|
-
import { M as ls } from "./mc-select-multi-option-
|
|
85
|
-
import { a as a36 } from "./mc-select-multi-option-
|
|
72
|
+
import { M as is } from "./mc-select-CCjPA3Fm.js";
|
|
73
|
+
import { a as a31, S } from "./mc-select-CCjPA3Fm.js";
|
|
74
|
+
import { M as Cs } from "./mc-select-group-BjbSnZ2v.js";
|
|
75
|
+
import { a as a32, S as S2 } from "./mc-select-group-BjbSnZ2v.js";
|
|
76
|
+
import { M as fs } from "./mc-select-option-BauwRp9j.js";
|
|
77
|
+
import { a as a33 } from "./mc-select-option-BauwRp9j.js";
|
|
78
|
+
import { M as js } from "./mc-select-plus-CiTDNs_C.js";
|
|
79
|
+
import { b as b6, a as a34 } from "./mc-select-plus-CiTDNs_C.js";
|
|
80
|
+
import { a as Es } from "./mc-select-group-plus-DGd4HEjo.js";
|
|
81
|
+
import { M as M4 } from "./mc-select-group-plus-DGd4HEjo.js";
|
|
82
|
+
import { M as Ts } from "./mc-select-option-plus-DpMjFIC4.js";
|
|
83
|
+
import { a as a35 } from "./mc-select-option-plus-DpMjFIC4.js";
|
|
84
|
+
import { M as ls } from "./mc-select-multi-option-D4woh8WX.js";
|
|
85
|
+
import { a as a36 } from "./mc-select-multi-option-D4woh8WX.js";
|
|
86
86
|
import { M as Os } from "./mc-status-D7SL35EF.js";
|
|
87
87
|
import { a as a37 } from "./mc-status-D7SL35EF.js";
|
|
88
88
|
import { M as Ls } from "./mc-step-DAz2c-Xq.js";
|
|
@@ -93,40 +93,39 @@ import { a as Is } from "./mc-step-item-plus-DHDfilcx.js";
|
|
|
93
93
|
import { M as M5 } from "./mc-step-item-plus-DHDfilcx.js";
|
|
94
94
|
import { a as As } from "./mc-step-child-item-plus-CbMY1UMS.js";
|
|
95
95
|
import { M as M6 } from "./mc-step-child-item-plus-CbMY1UMS.js";
|
|
96
|
-
import { M as Ss
|
|
97
|
-
import { M as Ps } from "./mc-success-icon-ynIh02vH.js";
|
|
96
|
+
import { M as Ss } from "./mc-success-icon-ynIh02vH.js";
|
|
98
97
|
import { a as a40 } from "./mc-success-icon-ynIh02vH.js";
|
|
99
|
-
import { M as
|
|
100
|
-
import { a as a41, b as b7 } from "./mc-switch-
|
|
101
|
-
import { M as
|
|
102
|
-
import { a as a42 } from "./mc-tab-
|
|
103
|
-
import { a as
|
|
98
|
+
import { M as Rs } from "./mc-switch-BdCQPDDk.js";
|
|
99
|
+
import { a as a41, b as b7 } from "./mc-switch-BdCQPDDk.js";
|
|
100
|
+
import { M as us } from "./mc-tab-RML3Io4K.js";
|
|
101
|
+
import { a as a42 } from "./mc-tab-RML3Io4K.js";
|
|
102
|
+
import { a as Ps } from "./mc-tab-item-BGbfpv43.js";
|
|
104
103
|
import { M as M7 } from "./mc-tab-item-BGbfpv43.js";
|
|
105
|
-
import { M as
|
|
106
|
-
import { u, a as a43, b as b8 } from "./mc-table-
|
|
107
|
-
import { M as
|
|
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-
|
|
109
|
-
import { a as
|
|
104
|
+
import { M as ns } from "./mc-table-Klsieon4.js";
|
|
105
|
+
import { u, a as a43, b as b8 } from "./mc-table-Klsieon4.js";
|
|
106
|
+
import { M as Ns } from "./mc-table-plus-BpZYuZwB.js";
|
|
107
|
+
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-BpZYuZwB.js";
|
|
108
|
+
import { a as Us } from "./mc-table-column-plus-XSQZhnuc.js";
|
|
110
109
|
import { M as M8 } from "./mc-table-column-plus-XSQZhnuc.js";
|
|
111
|
-
import { M as
|
|
110
|
+
import { M as bs } from "./mc-tag-6nsZ6k2y.js";
|
|
112
111
|
import { a as a45 } from "./mc-tag-6nsZ6k2y.js";
|
|
113
|
-
import { M as
|
|
114
|
-
import { a as a46 } from "./mc-textarea-
|
|
115
|
-
import { M as
|
|
112
|
+
import { M as ds } from "./mc-textarea-D-fL5RMY.js";
|
|
113
|
+
import { a as a46 } from "./mc-textarea-D-fL5RMY.js";
|
|
114
|
+
import { M as gs } from "./mc-title-mICYrFwW.js";
|
|
116
115
|
import { a as a47 } from "./mc-title-mICYrFwW.js";
|
|
117
|
-
import { M as
|
|
116
|
+
import { M as Bs } from "./mc-title-tool-bar-fBEpDu22.js";
|
|
118
117
|
import { a as a48 } from "./mc-title-tool-bar-fBEpDu22.js";
|
|
119
|
-
import { M as
|
|
118
|
+
import { M as Ds } from "./mc-toast-CEW02a8l.js";
|
|
120
119
|
import { a as a49, t } from "./mc-toast-CEW02a8l.js";
|
|
121
|
-
import { M as
|
|
120
|
+
import { M as Gs } from "./mc-tooltip-D8HZ-fbT.js";
|
|
122
121
|
import { a as a50 } from "./mc-tooltip-D8HZ-fbT.js";
|
|
123
|
-
import { M as
|
|
122
|
+
import { M as hs } from "./mc-upload-D083DKRr.js";
|
|
124
123
|
import { A, a as a51, b as b10, W } from "./mc-upload-D083DKRr.js";
|
|
125
|
-
import { M as
|
|
124
|
+
import { M as Ys } from "./mc-file-list-1Zx4K2U8.js";
|
|
126
125
|
import { a as a52 } from "./mc-file-list-1Zx4K2U8.js";
|
|
127
|
-
const
|
|
126
|
+
const Fs = [E, O, L, x, R, P, N, U, B, D, G, Y, X, H, K, y, v, w, J, V, Z, z, Q, $, ss, os, ms, rs, as, ts, ps, cs, es, _s, Ms, is, Cs, fs, Es, ls, Ts, js, Os, Ls, As, Is, xs, Ss, Rs, us, Ps, ns, Us, Ns, bs, ds, gs, Bs, Ds, Gs, Ys, hs];
|
|
128
127
|
s();
|
|
129
|
-
const
|
|
128
|
+
const Xs = _(Fs);
|
|
130
129
|
export {
|
|
131
130
|
A as ALLOW_FILE_TYPES,
|
|
132
131
|
C as CHECKBOX_GROUP_INJECTION_KEY,
|
|
@@ -231,7 +230,7 @@ export {
|
|
|
231
230
|
B as McCurrencyIcon,
|
|
232
231
|
D as McDivider,
|
|
233
232
|
G as McDrawer,
|
|
234
|
-
|
|
233
|
+
Ys as McFileList,
|
|
235
234
|
Y as McFooter,
|
|
236
235
|
X as McForm,
|
|
237
236
|
H as McFormItem,
|
|
@@ -266,30 +265,27 @@ export {
|
|
|
266
265
|
Os as McStatus,
|
|
267
266
|
Ls as McStep,
|
|
268
267
|
As as McStepChildItemPlus,
|
|
269
|
-
Ss as McStepChildItemV2,
|
|
270
268
|
Is as McStepItemPlus,
|
|
271
|
-
Rs as McStepItemV2,
|
|
272
269
|
xs as McStepPlus,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
Us as
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
Xs as McUpload,
|
|
270
|
+
Ss as McSuccessIcon,
|
|
271
|
+
Rs as McSwitch,
|
|
272
|
+
us as McTab,
|
|
273
|
+
Ps as McTabItem,
|
|
274
|
+
ns as McTable,
|
|
275
|
+
Us as McTableColumnPlus,
|
|
276
|
+
Ns as McTablePlus,
|
|
277
|
+
bs as McTag,
|
|
278
|
+
ds as McTextarea,
|
|
279
|
+
gs as McTitle,
|
|
280
|
+
Bs as McTitleToolBar,
|
|
281
|
+
Ds as McToast,
|
|
282
|
+
Gs as McTooltip,
|
|
283
|
+
hs as McUpload,
|
|
288
284
|
S2 as SELECT_GROUP_INJECTION_KEY,
|
|
289
285
|
S as SELECT_INJECTION_KEY,
|
|
290
286
|
T as TOOL_ICON,
|
|
291
287
|
W as WILDCARD,
|
|
292
|
-
|
|
288
|
+
Xs as default,
|
|
293
289
|
t as toast,
|
|
294
290
|
u as usePagination,
|
|
295
291
|
a43 as useTableScroll,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { _ as e, u as o } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { inject as a, computed as c, defineComponent as l, ref as s, createElementBlock as t, openBlock as r, createElementVNode as d, createCommentVNode as i, withModifiers as u, normalizeClass as n, unref as m, withKeys as p, renderSlot as b, createTextVNode as k, toDisplayString as h, nextTick as x } from "vue";
|
|
3
|
+
import { useFocus as v } from "@mc-plus/hooks";
|
|
4
|
+
import { isFunction as f, includes as y, isNil as V } from "lodash-es";
|
|
5
|
+
import { C } from "./mc-checkbox-group-DE7LdKhc.js";
|
|
6
|
+
import { u as B } from "./mc-form-DSnSPFEV.js";
|
|
7
|
+
const S = "mc-checkbox", _ = { class: "mc-checkbox" }, G = ["id", "value", "disabled", "onKeypress"], g = { key: 0, class: "mc-checkbox-content" }, D = { key: 0, class: "mc-checkbox-remarks" }, I = o(e(l({ name: S, __name: "mc-checkbox", props: { modelValue: { type: Boolean }, disabled: { type: Boolean }, content: {}, remarks: {}, partial: { type: Boolean }, value: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean } }, emits: ["update:modelValue", "change", "focus", "blur"], setup(e2, { emit: o2 }) {
|
|
8
|
+
const l2 = e2, S2 = o2, I2 = s(), { wrapperRef: $, isFocused: j, handleFocus: w, handleBlur: F } = v(I2), { checkboxGroupCtx: R, checkboxGroupDisabled: K, isCheckboxGroup: M, isCheckboxSelected: T, handleCheckboxSelect: q } = (() => {
|
|
9
|
+
const e3 = a(C, void 0), o3 = c(() => {
|
|
10
|
+
var _a;
|
|
11
|
+
return !!((_a = e3 == null ? void 0 : e3.disabled) == null ? void 0 : _a.value);
|
|
12
|
+
}), l3 = c(() => !!e3 && f(e3 == null ? void 0 : e3.handleSelect));
|
|
13
|
+
return { checkboxGroupCtx: e3, checkboxGroupDisabled: o3, isCheckboxGroup: l3, isCheckboxSelected: (o4) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return !V(o4) && y((_a = e3 == null ? void 0 : e3.modelValue) == null ? void 0 : _a.value, o4);
|
|
16
|
+
}, handleCheckboxSelect: (o4) => {
|
|
17
|
+
e3 == null ? void 0 : e3.handleSelect(o4);
|
|
18
|
+
} };
|
|
19
|
+
})(), { formId: z, formDisabled: A, validateStyle: E, validateByTrigger: H } = B({ externalDisabled: K, disableValidation: R == null ? void 0 : R.disableValidation }), J = c(() => M.value ? T(l2.value) : !!l2.modelValue), L = async () => {
|
|
20
|
+
A.value || (M.value ? q(l2.value) : (S2("update:modelValue", !l2.modelValue), S2("change", !l2.modelValue), await x(), H("input")));
|
|
21
|
+
};
|
|
22
|
+
return (o3, a2) => (r(), t("div", _, [d("label", { ref_key: "checkboxRef", ref: $, class: n(["mc-checkbox-wrapper", { "mc-checkbox-disabled": m(A), "mc-checkbox-checked": J.value, "mc-checkbox-partial": e2.partial, "mc-checkbox-focused": m(j), [m(E)]: m(E) }]), onClick: u(L, ["prevent"]) }, [d("input", { ref_key: "checkboxInputRef", ref: I2, id: m(z), type: "checkbox", class: "mc-checkbox-input", value: J.value, disabled: m(A), onKeypress: p(u(L, ["prevent", "stop"]), ["enter"]), onFocus: a2[0] || (a2[0] = (...e3) => m(w) && m(w)(...e3)), onBlur: a2[1] || (a2[1] = (...e3) => m(F) && m(F)(...e3)) }, null, 40, G), a2[2] || (a2[2] = d("div", { class: "mc-checkbox-box" }, null, -1)), e2.content || o3.$slots.default ? (r(), t("div", g, [b(o3.$slots, "default", {}, () => [k(h(e2.content), 1)], true)])) : i("", true)], 2), e2.remarks || o3.$slots.remarks ? (r(), t("div", D, [b(o3.$slots, "remarks", {}, () => [k(h(e2.remarks), 1)], true)])) : i("", true)]));
|
|
23
|
+
} }), [["__scopeId", "data-v-8dbde265"]]));
|
|
24
|
+
export {
|
|
25
|
+
I as M,
|
|
26
|
+
S as a
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { u as e } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as a, provide as o, computed as l, createElementBlock as t, openBlock as d, unref as i, renderSlot as s, nextTick as m } from "vue";
|
|
3
|
+
import { indexOf as c } from "lodash-es";
|
|
4
|
+
import { u } from "./mc-form-DSnSPFEV.js";
|
|
5
|
+
const r = Symbol("mc-checkbox-group-context"), n = "mc-checkbox-group", p = ["id"], b = e(a({ name: n, __name: "mc-checkbox-group", props: { modelValue: { default: () => [] }, disabled: { type: Boolean, default: false }, disableValidation: { type: Boolean }, hideValidationIcon: { type: Boolean } }, emits: ["update:modelValue", "change"], setup(e2, { emit: a2 }) {
|
|
6
|
+
const n2 = e2, b2 = a2, { formId: f, validateByTrigger: h } = u();
|
|
7
|
+
return o(r, { modelValue: l(() => n2.modelValue), disabled: l(() => n2.disabled), disableValidation: l(() => !!n2.disableValidation), handleSelect: async (e3) => {
|
|
8
|
+
if (!e3) return;
|
|
9
|
+
const a3 = [...n2.modelValue], o2 = c(a3, e3);
|
|
10
|
+
o2 > -1 ? a3.splice(o2, 1) : a3.push(e3), b2("update:modelValue", a3), b2("change", a3), await m(), h("input");
|
|
11
|
+
} }), (e3, a3) => (d(), t("div", { class: "mc-checkbox-group", id: i(f) }, [s(e3.$slots, "default")], 8, p));
|
|
12
|
+
} }));
|
|
13
|
+
export {
|
|
14
|
+
r as C,
|
|
15
|
+
b as M,
|
|
16
|
+
n as a
|
|
17
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { p as e, _ as t, u as a } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { computed as r, defineComponent as o, provide as l, createElementBlock as i, openBlock as s, createElementVNode as d, withModifiers as n, renderSlot as c, nextTick as m, inject as u, onMounted as f, onBeforeUnmount as v, watch as p } from "vue";
|
|
3
|
+
import { isNil as I, isEmpty as b, isArray as x, each as y, keys as h, first as V, size as w, isFunction as C } from "lodash-es";
|
|
4
|
+
import { useProp as F, useId as g } from "@mc-plus/hooks";
|
|
5
|
+
import { F as D } from "./mc-form-item-x7MVIw2A.js";
|
|
6
|
+
const _ = Symbol("mc-form-context"), j = "mc-form", P = { class: "mc-form" }, S = a(t(o({ name: j, __name: "mc-form", props: { model: { default: () => ({}) }, modelValue: {}, rules: { default: () => ({}) }, disabled: { type: Boolean }, direction: { default: "vertical" }, scrollToError: { type: Boolean, default: false } }, emits: ["update:modelValue", "reset"], setup(t2, { expose: a2, emit: o2 }) {
|
|
7
|
+
const u2 = t2, f2 = o2, v2 = /* @__PURE__ */ new Map(), p2 = (e2) => {
|
|
8
|
+
if (x(e2)) {
|
|
9
|
+
if (b(e2)) return Array.from(v2.values());
|
|
10
|
+
{
|
|
11
|
+
const t3 = [];
|
|
12
|
+
return y(e2, (e3) => {
|
|
13
|
+
const a3 = v2.get(e3);
|
|
14
|
+
a3 && t3.push(a3);
|
|
15
|
+
}), t3;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return v2.get(e2);
|
|
19
|
+
}, C2 = async (t3 = [], a3, r2 = true) => {
|
|
20
|
+
try {
|
|
21
|
+
r2 && F2();
|
|
22
|
+
const e2 = await (async (e3, t4) => {
|
|
23
|
+
const a4 = p2(e3);
|
|
24
|
+
if (b(a4)) return t4 == null ? void 0 : t4(true), true;
|
|
25
|
+
try {
|
|
26
|
+
return await (async (e4) => {
|
|
27
|
+
const t5 = [];
|
|
28
|
+
for (const a5 of e4) try {
|
|
29
|
+
await a5.validate();
|
|
30
|
+
} catch (e5) {
|
|
31
|
+
t5.push(e5);
|
|
32
|
+
}
|
|
33
|
+
return !w(t5) || Promise.reject(t5);
|
|
34
|
+
})(x(a4) ? a4 : [a4]), t4 == null ? void 0 : t4(true), true;
|
|
35
|
+
} catch (e4) {
|
|
36
|
+
if (e4 instanceof Error) throw e4;
|
|
37
|
+
const a5 = e4;
|
|
38
|
+
return t4 == null ? void 0 : t4(false, a5), Promise.reject(a5);
|
|
39
|
+
}
|
|
40
|
+
})(t3, a3);
|
|
41
|
+
return e2;
|
|
42
|
+
} catch (t4) {
|
|
43
|
+
return u2.scrollToError && (async (t5) => {
|
|
44
|
+
const a4 = h(V(t5))[0], r3 = p2(a4);
|
|
45
|
+
if (b(r3)) return;
|
|
46
|
+
const o3 = r3.id;
|
|
47
|
+
if (!o3.size) return;
|
|
48
|
+
const l2 = V(Array.from(o3));
|
|
49
|
+
if (!l2) return;
|
|
50
|
+
const i2 = document.getElementById(l2);
|
|
51
|
+
i2 == null ? void 0 : i2.scrollIntoView({ block: "center", inline: "center", behavior: "smooth" }), await e(500), i2 == null ? void 0 : i2.focus();
|
|
52
|
+
})(t4), Promise.reject(t4);
|
|
53
|
+
}
|
|
54
|
+
}, F2 = (e2 = []) => {
|
|
55
|
+
const t3 = p2(e2);
|
|
56
|
+
b(t3) || (x(t3) ? y(t3, (e3) => e3.clearValidate()) : t3.clearValidate());
|
|
57
|
+
};
|
|
58
|
+
return l(_, { model: r(() => I(u2.modelValue) ? u2.model : u2.modelValue), rules: r(() => u2.rules), disabled: r(() => !!u2.disabled), direction: r(() => u2.direction), addFormItem: (e2) => {
|
|
59
|
+
b(e2.prop) || v2.set(e2.prop, e2);
|
|
60
|
+
}, removeFormItem: (e2) => {
|
|
61
|
+
b(e2.prop) || v2.delete(e2.prop);
|
|
62
|
+
} }), a2({ validate: C2, validateFields: async (e2, t3) => C2(e2, t3, false), resetFields: async (e2 = []) => {
|
|
63
|
+
const t3 = p2(e2);
|
|
64
|
+
if (b(t3)) return;
|
|
65
|
+
const a3 = {};
|
|
66
|
+
x(t3) ? y(t3, (e3) => {
|
|
67
|
+
a3[e3.prop] = e3.getInitialValue();
|
|
68
|
+
}) : a3[t3.prop] = t3.getInitialValue(), await m(), f2("reset", a3), f2("update:modelValue", a3), await m(), F2(e2);
|
|
69
|
+
}, clearValidate: F2 }), (e2, t3) => (s(), i("div", P, [d("form", { onSubmit: t3[0] || (t3[0] = n(() => {
|
|
70
|
+
}, ["prevent"])) }, [c(e2.$slots, "default", {}, void 0, true)], 32)]));
|
|
71
|
+
} }), [["__scopeId", "data-v-318f0cd2"]])), E = ({ externalId: e2, externalDisabled: t2 } = {}) => {
|
|
72
|
+
const a2 = u(_, void 0), o2 = u(D, void 0), l2 = F(["validateProp", "validate-prop"]), i2 = g((e2 == null ? void 0 : e2.value) ?? "mc-form-item");
|
|
73
|
+
f(() => {
|
|
74
|
+
s2();
|
|
75
|
+
}), v(() => {
|
|
76
|
+
s2("remove");
|
|
77
|
+
});
|
|
78
|
+
const s2 = (e3 = "add") => {
|
|
79
|
+
const t3 = l2.value;
|
|
80
|
+
if (t3) "add" === e3 ? o2 == null ? void 0 : o2.addFormId(t3, i2) : o2 == null ? void 0 : o2.removeFormId(t3, i2);
|
|
81
|
+
else {
|
|
82
|
+
const t4 = o2 == null ? void 0 : o2.prop.value;
|
|
83
|
+
if (b(t4)) return;
|
|
84
|
+
const a3 = x(t4) ? t4 : [t4];
|
|
85
|
+
for (const t5 of a3) "add" === e3 ? t5 && (o2 == null ? void 0 : o2.addFormId(t5, i2)) : t5 && (o2 == null ? void 0 : o2.removeFormId(t5, i2));
|
|
86
|
+
}
|
|
87
|
+
}, d2 = (({ formCtx: e3, formItemCtx: t3, externalDisabled: a3 }) => {
|
|
88
|
+
const o3 = F("disabled");
|
|
89
|
+
return r(() => o3.value || !!(e3 == null ? void 0 : e3.disabled.value) || !!(t3 == null ? void 0 : t3.disabled.value) || !!(a3 == null ? void 0 : a3.value));
|
|
90
|
+
})({ formCtx: a2, formItemCtx: o2, externalDisabled: t2 });
|
|
91
|
+
return { formCtx: a2, formItemCtx: o2, formId: i2, formDisabled: d2 };
|
|
92
|
+
}, B = ({ externalId: e2, externalDisabled: t2, disableValidation: a2, validator: o2 } = {}) => {
|
|
93
|
+
const l2 = F(["disableValidation", "disable-validation"]), i2 = F(["validateProp", "validate-prop"]), s2 = r(() => !!l2.value || !!(a2 == null ? void 0 : a2.value)), { formCtx: d2, formItemCtx: n2, formId: c2, formDisabled: m2 } = E({ externalId: e2, externalDisabled: t2 }), u2 = r(() => {
|
|
94
|
+
if (s2.value) return "init";
|
|
95
|
+
if (C(o2) && "error" === o2()) return "error";
|
|
96
|
+
const e3 = n2 == null ? void 0 : n2.validateStatus;
|
|
97
|
+
return (e3 == null ? void 0 : e3.size) ? i2.value ? e3.get(i2.value) || "init" : e3.values().next().value || "init" : "init";
|
|
98
|
+
}), f2 = r(() => s2.value ? "" : `mc-form-validate-${u2.value}`), v2 = r(() => !s2.value && "error" === u2.value), I2 = r(() => !s2.value && "success" === u2.value), b2 = F(["hideValidationIcon", "hide-validation-icon"]), y2 = r(() => !s2.value && !b2.value && (v2.value ? "Reject_02" : !!I2.value && "Accept_02")), h2 = F("modelValue");
|
|
99
|
+
p(() => h2.value, () => {
|
|
100
|
+
V2("change");
|
|
101
|
+
});
|
|
102
|
+
const V2 = async (e3) => {
|
|
103
|
+
if (!s2.value) try {
|
|
104
|
+
if (i2.value) await (n2 == null ? void 0 : n2.validate(i2.value, e3));
|
|
105
|
+
else {
|
|
106
|
+
const t3 = n2 == null ? void 0 : n2.prop.value;
|
|
107
|
+
if (t3) {
|
|
108
|
+
const a3 = x(t3) ? t3 : [t3], r2 = [];
|
|
109
|
+
for (const t4 of a3) r2.push(n2 == null ? void 0 : n2.validate(t4, e3));
|
|
110
|
+
await Promise.all(r2);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} catch (e4) {
|
|
114
|
+
console.error("[mc-form] validate error: ", e4);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
return { formCtx: d2, formItemCtx: n2, formId: c2, formDisabled: m2, validateStatus: u2, validateStyle: f2, isError: v2, isSuccess: I2, statusIcon: y2, validateByTrigger: V2 };
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
_ as F,
|
|
121
|
+
S as M,
|
|
122
|
+
E as a,
|
|
123
|
+
j as b,
|
|
124
|
+
B as u
|
|
125
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { _ as e, u as r } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { inject as t, onMounted as o, watch as s, onBeforeMount as l, onUnmounted as a, defineComponent as i, reactive as m, computed as d, provide as n, createElementBlock as c, openBlock as u, normalizeClass as f, renderSlot as p, createElementVNode as v, createCommentVNode as g, toDisplayString as h, createVNode as b, unref as I, createTextVNode as y, Transition as q, withCtx as F } from "vue";
|
|
3
|
+
import { isNil as _, isEmpty as w, isArray as k, get as $, cloneDeep as M, some as j, size as x, filter as P, map as V, includes as z, keys as S } from "lodash-es";
|
|
4
|
+
import B from "async-validator";
|
|
5
|
+
import { M as A } from "./mc-tooltip-D8HZ-fbT.js";
|
|
6
|
+
import { useProp as C } from "@mc-plus/hooks";
|
|
7
|
+
import { F as D } from "./mc-form-DSnSPFEV.js";
|
|
8
|
+
const E = Symbol("mc-form-item-context"), G = "mc-form-item", H = { class: "mc-form-item-label-wrapper" }, J = { key: 0, class: "mc-form-item-label" }, K = { key: 0, class: "mc-form-item-help" }, L = { key: 0, class: "mc-form-item-desc" }, N = { class: "mc-form-item__content" }, O = { key: 0, class: "mc-form-item__error" }, Q = r(e(i({ name: G, __name: "mc-form-item", props: { prop: { default: "" }, label: {}, disabled: { type: Boolean, default: false }, required: { type: Boolean, default: false }, rules: {}, help: {}, desc: {} }, setup(e2) {
|
|
9
|
+
const r2 = e2, i2 = m(/* @__PURE__ */ new Map()), G2 = m(/* @__PURE__ */ new Map()), Q2 = d(() => G2.values().next().value), R = t(D, void 0), { addFormId: T, removeFormId: U } = ((e3) => {
|
|
10
|
+
const r3 = t(D, void 0), o2 = /* @__PURE__ */ new Map(), i3 = C("prop"), m2 = () => {
|
|
11
|
+
if (_(i3.value)) return;
|
|
12
|
+
const t2 = k(i3.value) ? i3.value : [i3.value];
|
|
13
|
+
for (const s2 of t2) {
|
|
14
|
+
const t3 = e3(s2);
|
|
15
|
+
o2.set(s2, t3), r3 == null ? void 0 : r3.addFormItem(t3);
|
|
16
|
+
}
|
|
17
|
+
}, d2 = () => {
|
|
18
|
+
for (const e4 of o2.values()) r3 == null ? void 0 : r3.removeFormItem(e4);
|
|
19
|
+
};
|
|
20
|
+
return l(() => {
|
|
21
|
+
m2();
|
|
22
|
+
}), a(() => {
|
|
23
|
+
d2();
|
|
24
|
+
}), s(() => i3.value, (e4) => {
|
|
25
|
+
d2(), w(e4) || m2();
|
|
26
|
+
}, { deep: true }), { formItemInstances: o2, addFormId: (e4, r4) => {
|
|
27
|
+
const t2 = o2.get(e4);
|
|
28
|
+
t2 && t2.id.add(r4);
|
|
29
|
+
}, removeFormId: (e4, r4) => {
|
|
30
|
+
const t2 = o2.get(e4);
|
|
31
|
+
t2 && t2.id.delete(r4);
|
|
32
|
+
} };
|
|
33
|
+
})((e3) => (i2.set(e3, "init"), { prop: e3, id: /* @__PURE__ */ new Set(), validate: W(e3), getInitialValue: X(e3), clearValidate: ee })), W = (e3) => async (r3, t2) => re(e3, r3, t2), X = (e3) => () => {
|
|
34
|
+
const r3 = R == null ? void 0 : R.model.value;
|
|
35
|
+
if (!_(r3)) return Y(e3);
|
|
36
|
+
}, { getInitialValue: Y } = (() => {
|
|
37
|
+
const e3 = t(D, void 0), r3 = C("prop"), l2 = /* @__PURE__ */ new Map(), a2 = (r4) => {
|
|
38
|
+
const t2 = e3 == null ? void 0 : e3.model.value;
|
|
39
|
+
if (_(r4) || w(r4)) l2.clear();
|
|
40
|
+
else if (k(r4)) for (const e4 of r4) l2.set(e4, $(t2, e4));
|
|
41
|
+
else l2.set(r4, $(t2, r4));
|
|
42
|
+
};
|
|
43
|
+
return o(() => {
|
|
44
|
+
a2(r3.value);
|
|
45
|
+
}), s(() => r3.value, (e4) => {
|
|
46
|
+
a2(e4);
|
|
47
|
+
}), { getInitialValue: (e4) => {
|
|
48
|
+
if (!_(e4)) return M(l2.get(e4));
|
|
49
|
+
} };
|
|
50
|
+
})();
|
|
51
|
+
let Z = false;
|
|
52
|
+
const ee = () => {
|
|
53
|
+
for (const e3 of i2.keys()) i2.set(e3, "init");
|
|
54
|
+
for (const e3 of G2.keys()) G2.delete(e3);
|
|
55
|
+
Z = false;
|
|
56
|
+
}, re = async (e3, t2, o2) => {
|
|
57
|
+
if (Z || r2.disabled) return Promise.resolve(true);
|
|
58
|
+
const s2 = ((e4) => {
|
|
59
|
+
const t3 = [], o3 = !!r2.required;
|
|
60
|
+
o3 && t3.push({ required: true }), r2.rules && t3.push(...r2.rules);
|
|
61
|
+
const s3 = R == null ? void 0 : R.rules.value;
|
|
62
|
+
if (s3) {
|
|
63
|
+
const r3 = $(s3, e4);
|
|
64
|
+
r3 && t3.push(...r3);
|
|
65
|
+
}
|
|
66
|
+
if (o3) {
|
|
67
|
+
const e5 = P(V(t3, (e6, r3) => [e6, r3]), (e6) => z(S(e6[0]), "required"));
|
|
68
|
+
if (x(e5)) for (const r3 of e5) {
|
|
69
|
+
const [e6, s4] = r3;
|
|
70
|
+
e6.required !== o3 && (t3[s4] = { ...e6, required: o3 });
|
|
71
|
+
}
|
|
72
|
+
else t3.push({ required: o3 });
|
|
73
|
+
}
|
|
74
|
+
return t3;
|
|
75
|
+
})(e3), l2 = ((e4, r3) => P(e4, (e5) => !(!e5.trigger && r3 && "change" !== r3) && (!e5.trigger || !r3 || (k(e5.trigger) ? z(e5.trigger, r3) : e5.trigger === r3))).map(({ trigger: e5, ...r4 }) => r4))(s2, t2);
|
|
76
|
+
if (w(l2)) return o2 == null ? void 0 : o2(true), Promise.resolve(true);
|
|
77
|
+
i2.set(e3, "validating");
|
|
78
|
+
const a2 = ((e4, r3) => {
|
|
79
|
+
const t3 = new B({ [e4]: r3 }), o3 = R == null ? void 0 : R.model.value;
|
|
80
|
+
return t3.validate({ [e4]: $(o3, e4) }, { firstFields: true });
|
|
81
|
+
})(e3, l2);
|
|
82
|
+
try {
|
|
83
|
+
return await a2, i2.set(e3, "success"), G2.delete(e3), o2 == null ? void 0 : o2(true), Promise.resolve(true);
|
|
84
|
+
} catch (r3) {
|
|
85
|
+
const { errors: t3, fields: s3 } = r3;
|
|
86
|
+
i2.set(e3, "error");
|
|
87
|
+
const l3 = t3 && x(t3) > 0 ? t3[0].message ?? "" : "";
|
|
88
|
+
return G2.set(e3, l3), o2 == null ? void 0 : o2(false, s3), Promise.reject(s3);
|
|
89
|
+
}
|
|
90
|
+
}, te = d(() => "horizontal" === (R == null ? void 0 : R.direction.value)), oe = d(() => {
|
|
91
|
+
var _a;
|
|
92
|
+
if (r2.required) return true;
|
|
93
|
+
if ((_a = r2.rules) == null ? void 0 : _a.length) return j(r2.rules, (e4) => !!e4.required);
|
|
94
|
+
const e3 = R == null ? void 0 : R.rules.value, t2 = k(r2.prop) ? r2.prop : [r2.prop], o2 = [];
|
|
95
|
+
for (const r3 of t2) {
|
|
96
|
+
const t3 = $(e3, r3);
|
|
97
|
+
t3 && o2.push(...t3);
|
|
98
|
+
}
|
|
99
|
+
return j(o2, (e4) => !!e4.required);
|
|
100
|
+
});
|
|
101
|
+
return n(E, { disabled: d(() => r2.disabled), validateStatus: i2, prop: d(() => r2.prop), addFormId: T, removeFormId: U, validate: re }), (r3, t2) => (u(), c("div", { class: f(["mc-form-item", { "mc-form-item-horizontal": te.value }]) }, [p(r3.$slots, "label", { required: oe.value }, () => [v("div", null, [v("div", H, [e2.label ? (u(), c("label", J, [v("span", { class: f(["mc-form-item-lable-text", { "mc-form-item-label-required": oe.value }]) }, h(e2.label), 3), e2.help || r3.$slots.help ? (u(), c("div", K, [p(r3.$slots, "help", {}, () => [b(I(A), { content: e2.help, "icon-size": 20 }, null, 8, ["content"])], true)])) : g("", true)])) : g("", true), p(r3.$slots, "tool", {}, void 0, true)]), e2.desc || r3.$slots.desc ? (u(), c("div", L, [p(r3.$slots, "desc", {}, () => [y(h(e2.desc), 1)], true)])) : g("", true)])], true), v("div", N, [p(r3.$slots, "default", {}, void 0, true), b(q, { name: "mc-form-item-error" }, { default: F(() => [Q2.value ? (u(), c("div", O, h(Q2.value), 1)) : g("", true)]), _: 1 })])], 2));
|
|
102
|
+
} }), [["__scopeId", "data-v-133ad5d0"]]));
|
|
103
|
+
export {
|
|
104
|
+
E as F,
|
|
105
|
+
Q as M,
|
|
106
|
+
G as a
|
|
107
|
+
};
|
|
@@ -3,8 +3,8 @@ import { ref as a, defineComponent as l, computed as n, onMounted as u, watch as
|
|
|
3
3
|
import { includes as b, endsWith as _, startsWith as w, toString as I, isNil as k, isFunction as $ } from "lodash-es";
|
|
4
4
|
import { useFocus as B, useHover as V } from "@mc-plus/hooks";
|
|
5
5
|
import { M as S } from "./mc-icon-B6jOIL3w.js";
|
|
6
|
-
import { u as A } from "./mc-form-
|
|
7
|
-
import { u as C } from "./mc-input-group-
|
|
6
|
+
import { u as A } from "./mc-form-DSnSPFEV.js";
|
|
7
|
+
import { u as C } from "./mc-input-group-C412QZF6.js";
|
|
8
8
|
const R = "mc-input", j = { key: 0, class: "mc-input__prefix" }, T = ["id", "type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "maxlength"], z = { key: 2, class: "mc-input__password" }, F = { key: 0, class: "mc-input__suffix" }, P = { key: 4, class: "mc-input-append" }, D = { class: "mc-input-append-text" }, H = t(e(l({ name: R, __name: "mc-input", props: { modelValue: {}, width: {}, height: {}, id: {}, type: { default: "text" }, disabled: { type: Boolean, default: false }, clearable: { type: Boolean, default: false }, placeholder: { default: "Please enter" }, readonly: { type: Boolean, default: false }, autocomplete: { default: "off" }, autofocus: { type: Boolean, default: false }, prefixIcon: {}, suffixIcon: {}, maxlength: {}, currencyAccuracy: {}, inputGroupPosition: {}, disableValidation: { type: Boolean, default: false }, hideValidationIcon: { type: Boolean, default: false }, textAlign: { default: "left" }, validateProp: {}, formatter: {}, parser: {} }, emits: ["update:modelValue", "input", "change", "focus", "blur", "paste", "clear", "delete"], setup(e2, { expose: t2, emit: l2 }) {
|
|
9
9
|
const R2 = e2, { formatter: H2, parser: E } = R2, G = l2, M = a(), q = n(() => k(R2.modelValue) ? "" : I(R2.modelValue)), K = (e3) => ("number" === R2.type ? e3 = ((e4) => e4.replace(/[^\d]/g, ""))(e3) : "currency" === R2.type && (e3 = ((e4, t3 = 8) => {
|
|
10
10
|
e4 = e4.replace(/(?:[^0-9.]+)/g, "");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as e, computed as u, inject as t, watch as i, defineComponent as p, provide as r, createElementBlock as s, openBlock as o, normalizeClass as a, unref as d, createElementVNode as n, createCommentVNode as l, normalizeStyle as f, renderSlot as c } from "vue";
|
|
2
2
|
import { useProp as v } from "@mc-plus/hooks";
|
|
3
3
|
import { _ as x, u as m } from "./utils-dWwt4JKv.js";
|
|
4
|
-
import { a as I } from "./mc-form-
|
|
4
|
+
import { a as I } from "./mc-form-DSnSPFEV.js";
|
|
5
5
|
const g = Symbol("mc-input-group-context"), G = "mc-input-group", A = (e2) => {
|
|
6
6
|
const p2 = t(g, void 0);
|
|
7
7
|
if (!p2) return;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { _ as e, u as o } from "./utils-dWwt4JKv.js";
|
|
2
|
+
import { defineComponent as t, ref as l, onMounted as s, watch as i, createElementBlock as a, createCommentVNode as r, openBlock as d, createVNode as m, Transition as c, withCtx as f, unref as n, normalizeClass as u, createElementVNode as h, renderSlot as p, normalizeStyle as v } from "vue";
|
|
3
|
+
import { u as g, M as b } from "./mc-overlay-DjeN3ZV8.js";
|
|
4
|
+
import { M as x } from "./mc-modal-header-ChnzEwB_.js";
|
|
5
|
+
import { M as y } from "./mc-footer-DsN_d9ZN.js";
|
|
6
|
+
const _ = "mc-lightbox", $ = { key: 0, class: "mc-lightbox-container" }, k = { class: "mc-lightbox-header" }, w = { class: "mc-lightbox-content-wrapper" }, B = { key: 0, class: "mc-lightbox-footer" }, C = o(e(t({ name: _, __name: "mc-lightbox", props: { modelValue: { type: Boolean, default: false }, title: {}, size: { default: "medium" }, maskClosable: { type: Boolean, default: true }, fixed: { type: Boolean, default: true }, portCssSelector: { default: "body" }, hideFooter: { type: Boolean, default: false }, showBorder: { type: Boolean, default: false }, minHeight: { default: void 0 } }, emits: ["update:modelValue", "open", "close"], setup(e2, { expose: o2, emit: t2 }) {
|
|
7
|
+
const _2 = e2, C2 = t2, V = l(), j = l(), H = l(false), { isOverlayShow: M, isContentShow: S, openOverlay: O, closeOverlay: z } = g(), F = () => {
|
|
8
|
+
_2.maskClosable && I();
|
|
9
|
+
}, R = () => {
|
|
10
|
+
I();
|
|
11
|
+
}, A = () => {
|
|
12
|
+
H.value = true, O(), C2("open"), C2("update:modelValue", true);
|
|
13
|
+
}, I = () => {
|
|
14
|
+
z();
|
|
15
|
+
}, L = () => {
|
|
16
|
+
H.value = false, C2("close"), C2("update:modelValue", false);
|
|
17
|
+
};
|
|
18
|
+
return s(() => {
|
|
19
|
+
_2.modelValue && A();
|
|
20
|
+
}), i(() => _2.modelValue, (e3, o3) => {
|
|
21
|
+
!o3 && e3 ? A() : o3 && !e3 && I();
|
|
22
|
+
}), o2({ ref: V, open: A, close: I }), (o3, t3) => H.value ? (d(), a("div", $, [m(c, { name: "mc-lightbox-overlay", onAfterLeave: L }, { default: f(() => [m(n(b), { visible: n(M), fixed: e2.fixed, "port-css-selector": e2.portCssSelector, onClick: F }, { default: f(() => [m(c, { name: "mc-lightbox-content" }, { default: f(() => [n(S) ? (d(), a("div", { key: 0, class: u(["mc-lightbox", [`mc-lightbox-${e2.size}`]]), ref_key: "lightboxRef", ref: V }, [h("div", k, [p(o3.$slots, "header", {}, () => [m(n(x), { title: e2.title, "show-border": e2.showBorder, onClose: R }, { default: f(() => [p(o3.$slots, "header-title", {}, void 0, true)]), _: 3 }, 8, ["title", "show-border"])], true)]), h("div", w, [h("div", { class: "mc-lightbox-content", style: v({ minHeight: e2.minHeight ? `${e2.minHeight}px` : void 0 }), ref_key: "contentRef", ref: j }, [p(o3.$slots, "default", {}, void 0, true)], 4)]), e2.hideFooter ? r("", true) : (d(), a("div", B, [p(o3.$slots, "footer", {}, () => [m(n(y), null, { left: f(() => [p(o3.$slots, "footer-left", {}, void 0, true)]), right: f(() => [p(o3.$slots, "footer-right", {}, void 0, true)]), "right-button-group": f(() => [p(o3.$slots, "footer-right-button-group", {}, void 0, true)]), desc: f(() => [p(o3.$slots, "footer-desc", {}, void 0, true)]), _: 3 })], true)]))], 2)) : r("", true)]), _: 3 })]), _: 3 }, 8, ["visible", "fixed", "port-css-selector"])]), _: 3 })])) : r("", true);
|
|
23
|
+
} }), [["__scopeId", "data-v-a0340029"]]));
|
|
24
|
+
export {
|
|
25
|
+
C as M,
|
|
26
|
+
_ as a
|
|
27
|
+
};
|