Compare commits
2243 Commits
2.0.0-beta
...
main
Author | SHA1 | Date |
---|---|---|
![]() |
27acc9a80e | |
![]() |
43ad5dec90 | |
![]() |
aa8802679f | |
![]() |
aa211fd789 | |
![]() |
61d39be86f | |
![]() |
b80bd37f6e | |
![]() |
3db5e191b8 | |
![]() |
45c7109212 | |
![]() |
b58d0fb723 | |
![]() |
a21a1ca533 | |
![]() |
4a37016f4e | |
![]() |
5d6ebb30ac | |
![]() |
888457238d | |
![]() |
b0d9309471 | |
![]() |
f64d0718ae | |
![]() |
968317ca9f | |
![]() |
22dad3ba6d | |
![]() |
4f7bd6f28d | |
![]() |
12fcfa15b1 | |
![]() |
e46d537d45 | |
![]() |
ac9d1b0a7f | |
![]() |
2c7008d786 | |
![]() |
49d4b3166e | |
![]() |
339fb4a230 | |
![]() |
bb443a05e2 | |
![]() |
3a79f72816 | |
![]() |
89eec07145 | |
![]() |
c69a6d29b2 | |
![]() |
2666cb79ab | |
![]() |
35d5185634 | |
![]() |
4492086aac | |
![]() |
4b7c6ac02c | |
![]() |
208b8d3085 | |
![]() |
f41fec26ba | |
![]() |
9118d6cd42 | |
![]() |
5c7aaf0dd6 | |
![]() |
b82d8dd2ad | |
![]() |
1d0fa8533a | |
![]() |
4318147fc6 | |
![]() |
312bcc5127 | |
![]() |
6594fe3964 | |
![]() |
82f28ce3d0 | |
![]() |
6e2c5a6a83 | |
![]() |
307148e2df | |
![]() |
afebeb9ffa | |
![]() |
aeda2637f6 | |
![]() |
f42d8ad1ce | |
![]() |
33a0708eb4 | |
![]() |
085eb398a4 | |
![]() |
9c27414cd0 | |
![]() |
014e86bd27 | |
![]() |
40ad45bc05 | |
![]() |
1c82940160 | |
![]() |
7ce0f115d5 | |
![]() |
54434b0931 | |
![]() |
e01f26c541 | |
![]() |
9a45b35511 | |
![]() |
8e8073d17e | |
![]() |
d6cc262c3a | |
![]() |
9d7c171940 | |
![]() |
48a3ceb921 | |
![]() |
23c620ea3a | |
![]() |
752686e334 | |
![]() |
9b0f0e71e7 | |
![]() |
42d33e963c | |
![]() |
ed27700ef4 | |
![]() |
eedd7f3302 | |
![]() |
c28c38d02e | |
![]() |
162d1fcf95 | |
![]() |
4815ee6f20 | |
![]() |
2b41e56520 | |
![]() |
ab874ffd4b | |
![]() |
61ade6b8ec | |
![]() |
4d35b8caa3 | |
![]() |
040af82eb9 | |
![]() |
a8c72fc5e7 | |
![]() |
c25736d57d | |
![]() |
4a48bfc66b | |
![]() |
4138d3c822 | |
![]() |
dec67a6d65 | |
![]() |
85c48c0566 | |
![]() |
966bc1004c | |
![]() |
457d0fde0b | |
![]() |
ff184b3969 | |
![]() |
75886a8cbf | |
![]() |
2b0c2da232 | |
![]() |
ffd4d8fe92 | |
![]() |
49e1323baa | |
![]() |
35d1de9ea6 | |
![]() |
fa46999963 | |
![]() |
01300d01da | |
![]() |
9a5f83ed06 | |
![]() |
ce6b7f3b4e | |
![]() |
4a2f95fe88 | |
![]() |
7c73beb309 | |
![]() |
0cbf3ca354 | |
![]() |
7afb7ce465 | |
![]() |
9cc73011c5 | |
![]() |
4b21210700 | |
![]() |
a80ca17461 | |
![]() |
ad8d32ab09 | |
![]() |
d870f3f8e0 | |
![]() |
c717473568 | |
![]() |
1e07544e74 | |
![]() |
8ab008d255 | |
![]() |
f034a7759e | |
![]() |
3f33cefa81 | |
![]() |
81e43c56ef | |
![]() |
f400c803e1 | |
![]() |
502c11cc4c | |
![]() |
2cdb69f706 | |
![]() |
2eed8e62ec | |
![]() |
61c0d0cc9d | |
![]() |
d7f9bd27dc | |
![]() |
4ed2868137 | |
![]() |
8696e01039 | |
![]() |
a3fd390619 | |
![]() |
a9198e44df | |
![]() |
509ec682f2 | |
![]() |
73f0a29acf | |
![]() |
f93dd9170d | |
![]() |
cfa0a68568 | |
![]() |
afcff32fcc | |
![]() |
b989cf2d97 | |
![]() |
0e6fd652b8 | |
![]() |
6625d39118 | |
![]() |
67efafca4a | |
![]() |
a8a774a5ff | |
![]() |
1fc109704b | |
![]() |
d140523c89 | |
![]() |
91fe1b0d71 | |
![]() |
c1b4941def | |
![]() |
af383a34bc | |
![]() |
1dccce4e16 | |
![]() |
8aa8e5a778 | |
![]() |
42952b713a | |
![]() |
07c36192b8 | |
![]() |
562623c091 | |
![]() |
e362571719 | |
![]() |
e32ae99bfd | |
![]() |
ccbeb44264 | |
![]() |
3499b11a47 | |
![]() |
dae7262f13 | |
![]() |
8cf6be11f7 | |
![]() |
2510608665 | |
![]() |
b22875db33 | |
![]() |
2bdeed1432 | |
![]() |
49a6b588c1 | |
![]() |
bd080cde2a | |
![]() |
c1454bc7b5 | |
![]() |
61402142f8 | |
![]() |
242982301d | |
![]() |
9bdf882517 | |
![]() |
88ec06b717 | |
![]() |
6c39bec277 | |
![]() |
82f407d396 | |
![]() |
bfcdba251f | |
![]() |
0abcd25b2a | |
![]() |
72b8d09b92 | |
![]() |
b4c29d927b | |
![]() |
bf917f36eb | |
![]() |
0f9c80b86e | |
![]() |
61e5746b0d | |
![]() |
7786a81e76 | |
![]() |
6f89185fe1 | |
![]() |
449adb03df | |
![]() |
4428423be4 | |
![]() |
380fcd4aa9 | |
![]() |
4a1296bb3f | |
![]() |
b9c65656db | |
![]() |
f1bcf2093a | |
![]() |
398710cf1b | |
![]() |
858c4ec409 | |
![]() |
77eab3637c | |
![]() |
664711373c | |
![]() |
21d85ea82c | |
![]() |
b3ef24963f | |
![]() |
f953482a4d | |
![]() |
a9f9899185 | |
![]() |
c99e9b00bd | |
![]() |
3084ced55f | |
![]() |
c5ea668e88 | |
![]() |
3c5fb84542 | |
![]() |
2f7f0e6928 | |
![]() |
2c4d4650da | |
![]() |
0f1ffc99cd | |
![]() |
83d6c93765 | |
![]() |
a6c945caaa | |
![]() |
d0f7c34497 | |
![]() |
2b8f2adcbf | |
![]() |
f25bf6e189 | |
![]() |
93415d0442 | |
![]() |
d185a3af21 | |
![]() |
d3800b54a3 | |
![]() |
b7eed32484 | |
![]() |
46be19531d | |
![]() |
089548ed74 | |
![]() |
ce72484623 | |
![]() |
31d00bf7d1 | |
![]() |
deada0aeb8 | |
![]() |
418d8b33dd | |
![]() |
3c05b7704b | |
![]() |
1254677805 | |
![]() |
f7cc27b7ad | |
![]() |
9855e43805 | |
![]() |
1f01ae0728 | |
![]() |
9464158c0c | |
![]() |
13a4470fd8 | |
![]() |
84fb4b4b3d | |
![]() |
106750ed62 | |
![]() |
cac650737c | |
![]() |
95fa2547fe | |
![]() |
70102039c4 | |
![]() |
7a0c2a384c | |
![]() |
72e148cae8 | |
![]() |
6c13c964c5 | |
![]() |
367ddff30e | |
![]() |
e3ad856543 | |
![]() |
61df5e656f | |
![]() |
439fe840b4 | |
![]() |
197a00f6ea | |
![]() |
3f99a7e985 | |
![]() |
9c0311546b | |
![]() |
7f5b630d72 | |
![]() |
65ccb447c9 | |
![]() |
18405e13b2 | |
![]() |
9e78b4a985 | |
![]() |
6cf5d79e2e | |
![]() |
1abc33a9e7 | |
![]() |
e39e998ecc | |
![]() |
cfd4aadc29 | |
![]() |
38dd977b4c | |
![]() |
72f9262d0a | |
![]() |
c2d71fa7c3 | |
![]() |
969dadb265 | |
![]() |
9c3bf46108 | |
![]() |
141f0100d2 | |
![]() |
6ced156342 | |
![]() |
42608a5121 | |
![]() |
22b21cdac8 | |
![]() |
80a5b531f6 | |
![]() |
cacbde3e03 | |
![]() |
e3f09a18a1 | |
![]() |
7bfe30d280 | |
![]() |
53dc5daaaf | |
![]() |
531ae16553 | |
![]() |
d2b6eb9d94 | |
![]() |
27a4d8ceff | |
![]() |
12074a0dca | |
![]() |
8f95cdd5a3 | |
![]() |
cb0abe5fd5 | |
![]() |
ed87500e77 | |
![]() |
c01630113d | |
![]() |
5279d1289a | |
![]() |
9d406ab7ba | |
![]() |
826c183d0b | |
![]() |
bc576d6255 | |
![]() |
2c39273cc6 | |
![]() |
b49540a339 | |
![]() |
37059c38fd | |
![]() |
4fe57fa322 | |
![]() |
a3ccdeffc2 | |
![]() |
e8c2860c7d | |
![]() |
f1f89191ee | |
![]() |
0c863c1803 | |
![]() |
7591d5c3e6 | |
![]() |
4ea318be30 | |
![]() |
5fd00c05b5 | |
![]() |
a2e50dc43e | |
![]() |
0a738a36b6 | |
![]() |
10f990d534 | |
![]() |
8b5d71663a | |
![]() |
058e8ec542 | |
![]() |
f70b04c74f | |
![]() |
2ce4e7da82 | |
![]() |
a0e94978f5 | |
![]() |
fc5181d1d8 | |
![]() |
994707bd50 | |
![]() |
e9d26f2a7d | |
![]() |
7fd0e4a225 | |
![]() |
e229248053 | |
![]() |
10159941b9 | |
![]() |
9c26ab05d3 | |
![]() |
6861a77d29 | |
![]() |
308c30c738 | |
![]() |
afc1b84ed0 | |
![]() |
58f6d6ee28 | |
![]() |
7270855ce8 | |
![]() |
19f0aea965 | |
![]() |
8212237045 | |
![]() |
80edf86d18 | |
![]() |
6f032c9722 | |
![]() |
1001ff3834 | |
![]() |
6be947aeb9 | |
![]() |
3057cfe9ef | |
![]() |
45ede0853b | |
![]() |
afb2619a81 | |
![]() |
2bf85998ba | |
![]() |
9cff5cb558 | |
![]() |
42cb6871ee | |
![]() |
508e8e3706 | |
![]() |
fe3c2bdf89 | |
![]() |
64b9347fce | |
![]() |
96f940d834 | |
![]() |
d3d37f08a2 | |
![]() |
1e0cefa786 | |
![]() |
d49082008e | |
![]() |
bba322702e | |
![]() |
1d0a2737a4 | |
![]() |
c9f0841628 | |
![]() |
03760e3e3d | |
![]() |
144bb2e6d5 | |
![]() |
b4258dc23d | |
![]() |
9499a7fc86 | |
![]() |
c36f7e701f | |
![]() |
83017269ab | |
![]() |
1c7b7a35f6 | |
![]() |
28263bbe33 | |
![]() |
5aad611d4c | |
![]() |
429172b345 | |
![]() |
e5787c2ed2 | |
![]() |
698c0ff3b4 | |
![]() |
db4148af5a | |
![]() |
21cf533664 | |
![]() |
4c8cc0129f | |
![]() |
6a1952c469 | |
![]() |
a694167f37 | |
![]() |
3ed455b3f7 | |
![]() |
e49e72d24a | |
![]() |
149cedd262 | |
![]() |
8bf8515933 | |
![]() |
f5bea1413b | |
![]() |
0d24755ee3 | |
![]() |
f2f7cfd94d | |
![]() |
d933605b56 | |
![]() |
266482deca | |
![]() |
1deefa8b7f | |
![]() |
fd8af2322c | |
![]() |
9fdc297686 | |
![]() |
fded418b8a | |
![]() |
feffe70ebb | |
![]() |
02ed988cba | |
![]() |
6eb4d8f5c5 | |
![]() |
b61c88e5df | |
![]() |
ac93c476d1 | |
![]() |
db46965761 | |
![]() |
5578c14a8e | |
![]() |
69640c0af8 | |
![]() |
0df6abe3a7 | |
![]() |
045193e797 | |
![]() |
3b37cc1ae7 | |
![]() |
b103b7570d | |
![]() |
b39f2b2d03 | |
![]() |
61d6312783 | |
![]() |
98be7071e5 | |
![]() |
5439e0c164 | |
![]() |
9be58078d2 | |
![]() |
019b539f16 | |
![]() |
ccf850552d | |
![]() |
858169aee3 | |
![]() |
80fbabc66f | |
![]() |
6d1035f1b0 | |
![]() |
063c06f9c6 | |
![]() |
43009f0c59 | |
![]() |
ca0d8cc7c1 | |
![]() |
678ec079bc | |
![]() |
eba8f6b960 | |
![]() |
760c4c2695 | |
![]() |
8ab50b1757 | |
![]() |
12c9e0c3fb | |
![]() |
b0990b7323 | |
![]() |
c36b69d7bd | |
![]() |
8e5431886a | |
![]() |
5376014b33 | |
![]() |
bccd9204e8 | |
![]() |
8932aff13f | |
![]() |
de00607dc7 | |
![]() |
118ae9a50b | |
![]() |
0683ede0fb | |
![]() |
634adae1c3 | |
![]() |
95642610da | |
![]() |
69da428a51 | |
![]() |
78c8c9d791 | |
![]() |
c690f4188a | |
![]() |
838aa71b4b | |
![]() |
2bf654da71 | |
![]() |
bf5fcdc269 | |
![]() |
515ab9e38c | |
![]() |
d4f2e97ca9 | |
![]() |
be90b53527 | |
![]() |
0b85b84dcf | |
![]() |
4e277ea9bb | |
![]() |
bf97057c2c | |
![]() |
637656b0c3 | |
![]() |
0e1b7fd94f | |
![]() |
33d1553908 | |
![]() |
2eaad16331 | |
![]() |
58998c4978 | |
![]() |
7db4265616 | |
![]() |
8a3ed32254 | |
![]() |
1151bdad0f | |
![]() |
84037f8eef | |
![]() |
3e46f27b59 | |
![]() |
719847901e | |
![]() |
fbfec0a062 | |
![]() |
9a5cbeee50 | |
![]() |
b0125de963 | |
![]() |
bf1e6fec95 | |
![]() |
5f1cb0d240 | |
![]() |
f6daa8d28f | |
![]() |
48ab5a2f99 | |
![]() |
1977074a7e | |
![]() |
72508d864b | |
![]() |
670ff3f857 | |
![]() |
a8294a9f79 | |
![]() |
9445dd23c8 | |
![]() |
2a5b18ac6e | |
![]() |
65408bfd48 | |
![]() |
a8823f523c | |
![]() |
f4b47ad94b | |
![]() |
b16c89fcd2 | |
![]() |
ae27d430e5 | |
![]() |
9dbe035efe | |
![]() |
7ebabb3778 | |
![]() |
051161f102 | |
![]() |
9802fb3ea1 | |
![]() |
5fd866b136 | |
![]() |
d956eed086 | |
![]() |
6d60eba281 | |
![]() |
bfcbd5bdef | |
![]() |
4d2a37fcd3 | |
![]() |
e5e20cca5b | |
![]() |
dcc3bb10cb | |
![]() |
7d1418d9f4 | |
![]() |
3653f37d6b | |
![]() |
f265a7bb02 | |
![]() |
89314fb4d0 | |
![]() |
b1f38eb2ec | |
![]() |
d95861aa90 | |
![]() |
0a610d818f | |
![]() |
5cc85f3cc1 | |
![]() |
98c361cbad | |
![]() |
2ac1e1d42a | |
![]() |
f3935ebb4f | |
![]() |
11c52d487d | |
![]() |
295c417f49 | |
![]() |
27c5a6c96a | |
![]() |
fc7cadb3f9 | |
![]() |
ad1d6443f2 | |
![]() |
77d0d188f0 | |
![]() |
b22bd85828 | |
![]() |
f819a1b209 | |
![]() |
dde2ff140d | |
![]() |
f429148734 | |
![]() |
23a213acda | |
![]() |
6fb47874a3 | |
![]() |
d241a06f9d | |
![]() |
3d2d5fdd99 | |
![]() |
1d9a521669 | |
![]() |
a04cae1221 | |
![]() |
add208aefb | |
![]() |
355c41b4aa | |
![]() |
3f5f3ecabf | |
![]() |
41a455f881 | |
![]() |
eda7247c2c | |
![]() |
f85485e733 | |
![]() |
a1e967dfc2 | |
![]() |
6058ca5576 | |
![]() |
dd063b8275 | |
![]() |
9c6a9fb47c | |
![]() |
516b2e5a0c | |
![]() |
d3a919b0bf | |
![]() |
261e7d0857 | |
![]() |
b393a0a2dd | |
![]() |
2b80870461 | |
![]() |
33a47bc27a | |
![]() |
53b146ab88 | |
![]() |
f3ffcdbc7e | |
![]() |
37b5d02b6d | |
![]() |
1b51e6ffb3 | |
![]() |
f39d4894e4 | |
![]() |
975d70e7ed | |
![]() |
c301c63e8b | |
![]() |
e04f73dfef | |
![]() |
8fcb3fdfe3 | |
![]() |
c7b15a96a8 | |
![]() |
e8918ce589 | |
![]() |
62dda88ea0 | |
![]() |
3741931363 | |
![]() |
7af22a70f9 | |
![]() |
087dfa2f1b | |
![]() |
799eeed346 | |
![]() |
124aae72a4 | |
![]() |
39e5824699 | |
![]() |
9df8317ece | |
![]() |
62e7f94aba | |
![]() |
47385347ee | |
![]() |
6240ab2885 | |
![]() |
328e42a9be | |
![]() |
634675e032 | |
![]() |
7ddf882a99 | |
![]() |
895b43338d | |
![]() |
9f53d53cb8 | |
![]() |
cd47a277da | |
![]() |
adec5211f1 | |
![]() |
a6a270b44a | |
![]() |
8472c25633 | |
![]() |
c1ed77f67a | |
![]() |
df6a1fdb71 | |
![]() |
321989b9c2 | |
![]() |
2f51f2d3af | |
![]() |
dc9987aea8 | |
![]() |
3715ded674 | |
![]() |
04e3819b0b | |
![]() |
587c1ca89d | |
![]() |
8a233d7c3a | |
![]() |
0464c84afc | |
![]() |
7e29eb2163 | |
![]() |
92795a828f | |
![]() |
44e5d09f22 | |
![]() |
f6afd7fffc | |
![]() |
7de1be6a9a | |
![]() |
19ec975deb | |
![]() |
4ccb1c3e19 | |
![]() |
68d295d7ef | |
![]() |
bbfb3cef7d | |
![]() |
e9ce4eb2d5 | |
![]() |
cb08f8551a | |
![]() |
f0e5da3b69 | |
![]() |
2f049329a5 | |
![]() |
350dbfedbb | |
![]() |
4b2ffd7127 | |
![]() |
a5389a22ea | |
![]() |
7a34c99935 | |
![]() |
dc480bd4b3 | |
![]() |
1d774507c0 | |
![]() |
80918cba98 | |
![]() |
197e209b4e | |
![]() |
82c4c8f0d3 | |
![]() |
23b81b0e17 | |
![]() |
f0649999fb | |
![]() |
b695dc95e3 | |
![]() |
e2d4f8c2e3 | |
![]() |
de77b0175d | |
![]() |
26f98b7b10 | |
![]() |
a9fbf98f0e | |
![]() |
fee7c04d67 | |
![]() |
8658806e3f | |
![]() |
4f3ce35e74 | |
![]() |
69c17dc255 | |
![]() |
bcc46d1d5d | |
![]() |
a40816880a | |
![]() |
2c1afa5e72 | |
![]() |
81e26a900e | |
![]() |
fc0f0d8a96 | |
![]() |
a205615af9 | |
![]() |
9b5a07220b | |
![]() |
47c84cdbad | |
![]() |
989bedda47 | |
![]() |
dd57d1e305 | |
![]() |
158cca7f8a | |
![]() |
8099391e97 | |
![]() |
7939eb1718 | |
![]() |
34373ca05d | |
![]() |
4ef70b1503 | |
![]() |
31776a2cf8 | |
![]() |
31ca070a18 | |
![]() |
f49437f002 | |
![]() |
1d01df4b85 | |
![]() |
337d958c67 | |
![]() |
94e981e00b | |
![]() |
221b203cbb | |
![]() |
dfe462ec6f | |
![]() |
8110d8cbbd | |
![]() |
c903de3c0e | |
![]() |
44d7917afd | |
![]() |
73ce708868 | |
![]() |
d211688059 | |
![]() |
9d5343ae9c | |
![]() |
2d54e2124f | |
![]() |
b5d7d582cd | |
![]() |
0399ce0ec7 | |
![]() |
94c2887c81 | |
![]() |
75e4b72c21 | |
![]() |
287a8d0c4e | |
![]() |
1e4e3cb3b4 | |
![]() |
e64a19a05a | |
![]() |
6c735fee67 | |
![]() |
f8ddc430cf | |
![]() |
641714734a | |
![]() |
46862d749b | |
![]() |
1f33babc89 | |
![]() |
b2841a27ae | |
![]() |
c0d7d041b4 | |
![]() |
10b52e0072 | |
![]() |
d64c6a8d53 | |
![]() |
058bc3622a | |
![]() |
034f71c005 | |
![]() |
c8b7848f99 | |
![]() |
75c65e094f | |
![]() |
8a0c8a8fb1 | |
![]() |
7ea18a8287 | |
![]() |
2eb071ce30 | |
![]() |
5b3ade8980 | |
![]() |
6bd8a9b984 | |
![]() |
040956819f | |
![]() |
0fd3d302e4 | |
![]() |
80a160d766 | |
![]() |
cb80e40aa6 | |
![]() |
7246e62823 | |
![]() |
925a8f6ee5 | |
![]() |
7c35bcfece | |
![]() |
fbf1c78cc8 | |
![]() |
d484e1f6a0 | |
![]() |
7fa1fe428d | |
![]() |
ac9d3e40c1 | |
![]() |
265233c34f | |
![]() |
639b746ba5 | |
![]() |
fcca4baefe | |
![]() |
9eac1a1da5 | |
![]() |
213c3a4059 | |
![]() |
4cdda535a6 | |
![]() |
5e60d7c3b0 | |
![]() |
7252149804 | |
![]() |
2a30de162c | |
![]() |
e10b659aac | |
![]() |
4201c923b5 | |
![]() |
a69a7ff82a | |
![]() |
d0eebf3791 | |
![]() |
d7f78435c1 | |
![]() |
bc5dc845ac | |
![]() |
7923c25e4f | |
![]() |
aea54ac7ad | |
![]() |
af756de1f3 | |
![]() |
775e48d428 | |
![]() |
23a8368894 | |
![]() |
714a6f4764 | |
![]() |
8318b731b4 | |
![]() |
31430f5365 | |
![]() |
c2b197a443 | |
![]() |
a2f7d6d062 | |
![]() |
b35f63788d | |
![]() |
0f634e27d5 | |
![]() |
31800cb99c | |
![]() |
6cd099d691 | |
![]() |
07907ca7f3 | |
![]() |
3cb1edad41 | |
![]() |
24c4c84576 | |
![]() |
1177c336cb | |
![]() |
0f11e4ecd4 | |
![]() |
d48cd8ef57 | |
![]() |
187f3b8c07 | |
![]() |
00422ac77b | |
![]() |
b53a5de6dc | |
![]() |
9815f817d4 | |
![]() |
6feda7be81 | |
![]() |
2a3798e9b4 | |
![]() |
ae451b71df | |
![]() |
d933f3edd5 | |
![]() |
dd60465373 | |
![]() |
60a8be3014 | |
![]() |
a26ac3e9f4 | |
![]() |
e7fdb128e3 | |
![]() |
fa53e89e51 | |
![]() |
1d6a8916cc | |
![]() |
8d0155878e | |
![]() |
333c48c6ba | |
![]() |
e79dd3508c | |
![]() |
3ca5209e0d | |
![]() |
e5e98e5776 | |
![]() |
b9000c891a | |
![]() |
125a0f7636 | |
![]() |
4c8131bd70 | |
![]() |
612c5000b5 | |
![]() |
05357a8c3f | |
![]() |
151555b7b7 | |
![]() |
c739e498c5 | |
![]() |
86450c2a1b | |
![]() |
c40fec0afa | |
![]() |
6650c4d6b1 | |
![]() |
8ef4d44787 | |
![]() |
6d83af53b5 | |
![]() |
3d77a1c1d4 | |
![]() |
36df585acf | |
![]() |
39e7b8f4b6 | |
![]() |
85b7741f3c | |
![]() |
b440215842 | |
![]() |
73bd25cbbe | |
![]() |
7473233bc9 | |
![]() |
9d210e3a30 | |
![]() |
901811bc43 | |
![]() |
9ea87fb973 | |
![]() |
dae579a88e | |
![]() |
58e8fd3e2e | |
![]() |
aae9a48dd0 | |
![]() |
09c5a3e53f | |
![]() |
985f1cfe1d | |
![]() |
e42fdd7a06 | |
![]() |
7999a2fef6 | |
![]() |
a2690a2d45 | |
![]() |
f672f873dc | |
![]() |
d94fe1c0b2 | |
![]() |
4c0f6f5865 | |
![]() |
8a659da84f | |
![]() |
3003d67c4f | |
![]() |
8b6a771318 | |
![]() |
39ac6ed89e | |
![]() |
bddf64e0ad | |
![]() |
62dc2402f3 | |
![]() |
b3dafb92ef | |
![]() |
9493dc224b | |
![]() |
cbd9e6b6ce | |
![]() |
ab8457303e | |
![]() |
168626bfeb | |
![]() |
d9304506d3 | |
![]() |
bb4b86a82e | |
![]() |
87121e2632 | |
![]() |
e39edab75a | |
![]() |
599b474ab7 | |
![]() |
09cb907bee | |
![]() |
c87ecd7ffc | |
![]() |
033e55af5d | |
![]() |
e5b9308374 | |
![]() |
171b2b643f | |
![]() |
87db9bd87d | |
![]() |
fef42fd089 | |
![]() |
361e818bcc | |
![]() |
e86a833b15 | |
![]() |
3ddc7cdd7c | |
![]() |
71c6195771 | |
![]() |
e907ffd759 | |
![]() |
18ce00d239 | |
![]() |
3cd7ca3e0b | |
![]() |
387141ae68 | |
![]() |
d5bb271dd8 | |
![]() |
9b0fb707e2 | |
![]() |
2c2a372137 | |
![]() |
ba8e17e1b5 | |
![]() |
c7e079bd65 | |
![]() |
dead1a3753 | |
![]() |
4f9b677555 | |
![]() |
44e1f020c8 | |
![]() |
9280b418d7 | |
![]() |
09ff91488c | |
![]() |
efe600e89e | |
![]() |
8b34bdfa5e | |
![]() |
3cbbba1020 | |
![]() |
3b1d48b4b4 | |
![]() |
dd1a535943 | |
![]() |
5b583962db | |
![]() |
37d35f7801 | |
![]() |
a4b6c0aee4 | |
![]() |
03f559a0dc | |
![]() |
bf1226d3bb | |
![]() |
527dec6078 | |
![]() |
af9371fe6f | |
![]() |
5c136e0286 | |
![]() |
a32d29149f | |
![]() |
e6a46b43ac | |
![]() |
9d1e5d72b5 | |
![]() |
63a688f94c | |
![]() |
21f9a1178a | |
![]() |
76573fc252 | |
![]() |
208c7ac6de | |
![]() |
44be8722f8 | |
![]() |
a435e2c090 | |
![]() |
8475542b2f | |
![]() |
40a65d19da | |
![]() |
8ad9317d11 | |
![]() |
d9b3d8057f | |
![]() |
4439e0f3c3 | |
![]() |
5edca6be5a | |
![]() |
13e1db0bc4 | |
![]() |
fdf76b9fb9 | |
![]() |
bb85f1f372 | |
![]() |
76585f75b9 | |
![]() |
3656dd5dbb | |
![]() |
7b60f2a8e6 | |
![]() |
5cf2707e11 | |
![]() |
d716421745 | |
![]() |
c6f692222d | |
![]() |
03c41177a3 | |
![]() |
c1a1b93553 | |
![]() |
6e41fbd01f | |
![]() |
093fa555ba | |
![]() |
e9d41efcec | |
![]() |
d5348f0361 | |
![]() |
e4f678f665 | |
![]() |
f00b9535d2 | |
![]() |
a1ac22443e | |
![]() |
4eb8088645 | |
![]() |
353f470c11 | |
![]() |
7a91110326 | |
![]() |
73f7f9e3b9 | |
![]() |
5bc17f0578 | |
![]() |
dbe7fe78ce | |
![]() |
40be639b63 | |
![]() |
6e1f30666b | |
![]() |
c4a61f210f | |
![]() |
0244e7f5b4 | |
![]() |
3aedf48eaf | |
![]() |
78045b4b5b | |
![]() |
894a5b955c | |
![]() |
a8dbea7c32 | |
![]() |
1d08e80165 | |
![]() |
ebc2082934 | |
![]() |
d315b61418 | |
![]() |
9673cb3a1a | |
![]() |
e4a7411ede | |
![]() |
2826ee1d04 | |
![]() |
96caaa0769 | |
![]() |
7789cb2989 | |
![]() |
9aeadaf877 | |
![]() |
53b4c5d8b2 | |
![]() |
646f0c69b2 | |
![]() |
c5159279ce | |
![]() |
ba041a767e | |
![]() |
cb6d0bd411 | |
![]() |
04752880af | |
![]() |
98867b36ae | |
![]() |
c127bac6fe | |
![]() |
f081707576 | |
![]() |
dd69527946 | |
![]() |
38d7408ecf | |
![]() |
91527cbc25 | |
![]() |
0c879fc22d | |
![]() |
c686bd2518 | |
![]() |
fc9b52e6e7 | |
![]() |
04f3e0da21 | |
![]() |
ab90e3fa08 | |
![]() |
bc3843b774 | |
![]() |
9b6e742f0c | |
![]() |
728bfe69da | |
![]() |
722f3f2ebf | |
![]() |
7bbf6d5272 | |
![]() |
3a7cb252e6 | |
![]() |
cddaf8cbc4 | |
![]() |
93c1d400c1 | |
![]() |
a7da435079 | |
![]() |
531755ebea | |
![]() |
bd87079e12 | |
![]() |
32a145a79f | |
![]() |
7a050e2498 | |
![]() |
8ad95e75c2 | |
![]() |
b3e31e1eba | |
![]() |
d5270e9a9d | |
![]() |
6d2bcf0ab8 | |
![]() |
f1f6085dbb | |
![]() |
278478b5b0 | |
![]() |
6f8c75cd6d | |
![]() |
d645ad6eda | |
![]() |
23f56561e9 | |
![]() |
2addaf35ac | |
![]() |
07940a4836 | |
![]() |
c0efc1e615 | |
![]() |
8fbdbb13a6 | |
![]() |
4724c0415e | |
![]() |
bb1ae396e0 | |
![]() |
eb29738cd8 | |
![]() |
b4b2732133 | |
![]() |
bfdc6749f9 | |
![]() |
4fc0fea5cd | |
![]() |
6e9cb0bd56 | |
![]() |
9b6bf4ac5f | |
![]() |
0c803216e5 | |
![]() |
9b554c9295 | |
![]() |
c9eb20f24b | |
![]() |
e82e4bed3e | |
![]() |
4c83c64812 | |
![]() |
babc85bc1b | |
![]() |
1ca0689233 | |
![]() |
34ebd55082 | |
![]() |
a41a9b086b | |
![]() |
74f77de5d0 | |
![]() |
7d9edbfde0 | |
![]() |
dd0653249d | |
![]() |
7c6dcba441 | |
![]() |
4a4670bdce | |
![]() |
48ade76046 | |
![]() |
b68a395e33 | |
![]() |
a7ea9bbe34 | |
![]() |
2e0f65926d | |
![]() |
9e6a592cff | |
![]() |
6d14732e2a | |
![]() |
6222e43d7a | |
![]() |
272430ba06 | |
![]() |
327489603f | |
![]() |
a154ecdfaf | |
![]() |
fa76f5c480 | |
![]() |
0d06ce26ac | |
![]() |
a298b00052 | |
![]() |
9004644738 | |
![]() |
797a1c6c8f | |
![]() |
ec177879ac | |
![]() |
669b22a54b | |
![]() |
80342f40b3 | |
![]() |
afd74c95d8 | |
![]() |
8e37ffbb97 | |
![]() |
def6a72a77 | |
![]() |
00dc2add94 | |
![]() |
790f83f4a6 | |
![]() |
3613eceff8 | |
![]() |
e146b4847d | |
![]() |
e9ba9fe110 | |
![]() |
12588250d5 | |
![]() |
b0042ab40c | |
![]() |
e7fb72ce90 | |
![]() |
2feab99b89 | |
![]() |
7bf1e0dda1 | |
![]() |
d137971e0a | |
![]() |
e81abe39ee | |
![]() |
86e69d34d9 | |
![]() |
ecab7f66d8 | |
![]() |
5724c84fe7 | |
![]() |
5d9afb7d1c | |
![]() |
cec9414d5c | |
![]() |
7127a5d816 | |
![]() |
96f508104c | |
![]() |
414e7a1c56 | |
![]() |
c86338542d | |
![]() |
ecda0a1084 | |
![]() |
47e218d7ab | |
![]() |
17acda5655 | |
![]() |
97a08423a1 | |
![]() |
ea79779ab5 | |
![]() |
cc47bb66ea | |
![]() |
d1e2f4ff27 | |
![]() |
bc5928ec42 | |
![]() |
9bd52d4ca0 | |
![]() |
00551b6263 | |
![]() |
120980cb5c | |
![]() |
a2ecd5f48e | |
![]() |
ee6d489bf4 | |
![]() |
c69cf76d3c | |
![]() |
73ce0ca7ff | |
![]() |
bac864ff83 | |
![]() |
625efff1fa | |
![]() |
2b81a7213b | |
![]() |
ccf9a410ac | |
![]() |
5c9aea8a19 | |
![]() |
71e110036e | |
![]() |
85197c4b50 | |
![]() |
00cf241315 | |
![]() |
f8cef206f3 | |
![]() |
05ff353f5d | |
![]() |
3814fc8f4e | |
![]() |
67939d3399 | |
![]() |
fa9f1f4f53 | |
![]() |
adbc39bfbd | |
![]() |
8f20fd514a | |
![]() |
4b9fe8242e | |
![]() |
32ffd6bb32 | |
![]() |
d929217752 | |
![]() |
ab26180635 | |
![]() |
4471520e35 | |
![]() |
1e8bbccdd2 | |
![]() |
eb6711f4f9 | |
![]() |
a3149521bd | |
![]() |
8f47732b45 | |
![]() |
fe7ee5b9a4 | |
![]() |
9b730ef5e2 | |
![]() |
a8d5dad362 | |
![]() |
2b8bdf3b1d | |
![]() |
2efe1af6b6 | |
![]() |
9707506c5a | |
![]() |
24ea3cd7f3 | |
![]() |
ed346d6251 | |
![]() |
f2e58b6225 | |
![]() |
cf37535d22 | |
![]() |
bf2ee6f5bd | |
![]() |
1750e163c0 | |
![]() |
ac52955caf | |
![]() |
637310015e | |
![]() |
2bafbb104c | |
![]() |
b3a0263c03 | |
![]() |
21fd0c74e8 | |
![]() |
abc4894605 | |
![]() |
5dd7a57734 | |
![]() |
f7e89998e9 | |
![]() |
ce00829d85 | |
![]() |
fc3bd1cba0 | |
![]() |
fe4c3e60bf | |
![]() |
87a0cd5a00 | |
![]() |
2ee3d43534 | |
![]() |
fdf7857f89 | |
![]() |
4c786dd7a7 | |
![]() |
207c944e21 | |
![]() |
7999cdecbf | |
![]() |
639a68521c | |
![]() |
991fa776cf | |
![]() |
55e0ad7f92 | |
![]() |
fe0fc8084f | |
![]() |
f0c770def0 | |
![]() |
f771a1aec0 | |
![]() |
be7a73a7e6 | |
![]() |
78c436b990 | |
![]() |
f0bc380527 | |
![]() |
c7492a0b59 | |
![]() |
5edc8cadca | |
![]() |
04baae5a57 | |
![]() |
3cf5d4fa43 | |
![]() |
6056b751b6 | |
![]() |
31c3a6f693 | |
![]() |
ad06a9ee05 | |
![]() |
2ec21c95a7 | |
![]() |
2e0bfd1f01 | |
![]() |
d9cdfa67db | |
![]() |
2d0e2b6899 | |
![]() |
91c6a28205 | |
![]() |
2b0adaf717 | |
![]() |
43b218806a | |
![]() |
8f9875e518 | |
![]() |
5d38b3cf8d | |
![]() |
c615251136 | |
![]() |
d12edaea6f | |
![]() |
34869eceb5 | |
![]() |
23624679fe | |
![]() |
42e34a63ec | |
![]() |
037470e1d2 | |
![]() |
b952038db1 | |
![]() |
5cc603d84c | |
![]() |
53fa27771d | |
![]() |
5c23d97daf | |
![]() |
95ce5f4eb1 | |
![]() |
4846bd0f65 | |
![]() |
6d4248d046 | |
![]() |
d442db08eb | |
![]() |
7657157586 | |
![]() |
ae4085f7c0 | |
![]() |
3d2a80b3bb | |
![]() |
41fe8be1f6 | |
![]() |
1418422bcf | |
![]() |
1d47959606 | |
![]() |
b88d97a314 | |
![]() |
ab79b4b078 | |
![]() |
f0385d7c24 | |
![]() |
7624d80abe | |
![]() |
62428b6df3 | |
![]() |
26f1b98728 | |
![]() |
10fed707f8 | |
![]() |
239354e313 | |
![]() |
b62c1564ec | |
![]() |
ce767f2e0d | |
![]() |
b25c5cc28e | |
![]() |
9693e4b10b | |
![]() |
dab6f90f81 | |
![]() |
f6d1b848e4 | |
![]() |
3d3dcd5c44 | |
![]() |
23f5fba013 | |
![]() |
7dda6e8e07 | |
![]() |
3297f7aa58 | |
![]() |
8013592e82 | |
![]() |
7c9c95cc37 | |
![]() |
615d7c7d32 | |
![]() |
dd0b0b2eb9 | |
![]() |
98755f332c | |
![]() |
ab2df12cce | |
![]() |
0a5dbf3642 | |
![]() |
efa045ab9c | |
![]() |
3e8959ad22 | |
![]() |
81ab68f696 | |
![]() |
5c90cc251e | |
![]() |
3fc7a050ec | |
![]() |
5b20498792 | |
![]() |
d71df4b3ba | |
![]() |
b13756ffbe | |
![]() |
ad76bb678d | |
![]() |
8a3724ff89 | |
![]() |
1d33c51d24 | |
![]() |
f6725f86c2 | |
![]() |
2213d0ed62 | |
![]() |
3c0979c5e4 | |
![]() |
ed3740048a | |
![]() |
ca2ad60aef | |
![]() |
26496ba0a9 | |
![]() |
620214d536 | |
![]() |
30bbd4c3b4 | |
![]() |
41f4187593 | |
![]() |
e1613fa9d4 | |
![]() |
8b2b402f73 | |
![]() |
b265d75c9a | |
![]() |
0bc1e0a620 | |
![]() |
8beb37f64a | |
![]() |
862a2b36e3 | |
![]() |
8526a7eb81 | |
![]() |
3791cfc37c | |
![]() |
c6ab969a96 | |
![]() |
9cfeace7f8 | |
![]() |
47f1bb050b | |
![]() |
e9c9fbae21 | |
![]() |
73ebf4c518 | |
![]() |
b645f827d0 | |
![]() |
3ff4f6b926 | |
![]() |
b6c1b3ed86 | |
![]() |
4e70c6dd77 | |
![]() |
7aae6f675c | |
![]() |
1c9cfd19e6 | |
![]() |
72f82771f1 | |
![]() |
cbbf9f8f51 | |
![]() |
89435951ae | |
![]() |
02e6fecc6d | |
![]() |
5cc1bd715d | |
![]() |
246e1163bb | |
![]() |
2a47de6c57 | |
![]() |
384ea35ca7 | |
![]() |
257f7f03b5 | |
![]() |
b77ca0eed7 | |
![]() |
ebd52af454 | |
![]() |
b02af565a6 | |
![]() |
a3799fb0ea | |
![]() |
443640effa | |
![]() |
79ea8918e5 | |
![]() |
46b216274f | |
![]() |
47066753ac | |
![]() |
ae9ab9c5b0 | |
![]() |
9784b429f5 | |
![]() |
06516ec60d | |
![]() |
2c2c070663 | |
![]() |
18cc95fa30 | |
![]() |
66eb020ce1 | |
![]() |
31c8339315 | |
![]() |
af2e2683b4 | |
![]() |
9791231e63 | |
![]() |
883d6e21ad | |
![]() |
0ee974a3aa | |
![]() |
296a2e549a | |
![]() |
5543ce6add | |
![]() |
7ec6831508 | |
![]() |
cd6c6ff048 | |
![]() |
07ee749023 | |
![]() |
4204ff0736 | |
![]() |
b9ff4eabcc | |
![]() |
9d469fb2af | |
![]() |
8eb43a4848 | |
![]() |
c685b46704 | |
![]() |
0f833cb536 | |
![]() |
9c0464d072 | |
![]() |
6e5390cec4 | |
![]() |
bcc5ca40ec | |
![]() |
d9cd6f2ba5 | |
![]() |
7bc9c78d51 | |
![]() |
7d7f0f326c | |
![]() |
6c28a8e40c | |
![]() |
8e207009b0 | |
![]() |
fcd6add766 | |
![]() |
95a1b4a964 | |
![]() |
30f87e6193 | |
![]() |
0a404e88b7 | |
![]() |
ee3188a782 | |
![]() |
3b1510b70e | |
![]() |
6f5730b8ac | |
![]() |
5ed8f8686d | |
![]() |
3bb093cb23 | |
![]() |
56a9b9a405 | |
![]() |
b19c8dd650 | |
![]() |
9ed73529a6 | |
![]() |
698b684233 | |
![]() |
75be0189d6 | |
![]() |
bde57724b7 | |
![]() |
eea3fe9015 | |
![]() |
6fad9ead9e | |
![]() |
5265440f76 | |
![]() |
c07e3f0831 | |
![]() |
79ae8006a8 | |
![]() |
af54405381 | |
![]() |
fbabea9065 | |
![]() |
4a80b556f8 | |
![]() |
65fc82e105 | |
![]() |
0dd60654c5 | |
![]() |
dfe590240f | |
![]() |
e8a77eb3a9 | |
![]() |
0113abb6f6 | |
![]() |
b336d3acca | |
![]() |
57469f4be8 | |
![]() |
96299c5812 | |
![]() |
cf4ab5470c | |
![]() |
7df7d788f8 | |
![]() |
8dfe7eed8b | |
![]() |
7461188c60 | |
![]() |
95cae149c4 | |
![]() |
61bf98e641 | |
![]() |
0ae5d7a324 | |
![]() |
be9d448ec9 | |
![]() |
fe54804b21 | |
![]() |
8ade6ebce2 | |
![]() |
b20865ffb6 | |
![]() |
ddc34539a9 | |
![]() |
bbfe451d5e | |
![]() |
5ad66497e5 | |
![]() |
3a141b2e9b | |
![]() |
b07882d92f | |
![]() |
5398550d35 | |
![]() |
e28168e0be | |
![]() |
51874d9cee | |
![]() |
7a64fe544d | |
![]() |
67066e2fb6 | |
![]() |
5af08c0904 | |
![]() |
d129670882 | |
![]() |
3e05460d09 | |
![]() |
84b9ac5904 | |
![]() |
876720f31b | |
![]() |
f5986a9cc9 | |
![]() |
3b3c71b3a0 | |
![]() |
74038a0f61 | |
![]() |
723785ef4e | |
![]() |
042bf616f8 | |
![]() |
cf9627e16d | |
![]() |
85eb1066a3 | |
![]() |
87a4007dd3 | |
![]() |
91dbc39bad | |
![]() |
dc4275129b | |
![]() |
45c0583426 | |
![]() |
c3400115dd | |
![]() |
a61f7fdd11 | |
![]() |
685460591d | |
![]() |
8f77208806 | |
![]() |
bbf1cc8a6f | |
![]() |
215a4d5752 | |
![]() |
0ef6cc81b4 | |
![]() |
bb2af2c730 | |
![]() |
61afa1571f | |
![]() |
641afe1b34 | |
![]() |
6dfc8375c8 | |
![]() |
fd02bcfb7b | |
![]() |
e38e59d05a | |
![]() |
80f9b9e8ac | |
![]() |
3ce5046dd5 | |
![]() |
42afcbbfbc | |
![]() |
9f5ac8d441 | |
![]() |
247032833b | |
![]() |
c57da055fc | |
![]() |
35bcec1e80 | |
![]() |
6f0dab1f72 | |
![]() |
166bac62b4 | |
![]() |
8e15f126eb | |
![]() |
943a345a92 | |
![]() |
a938bcb4de | |
![]() |
7b03f8a739 | |
![]() |
26b07115cd | |
![]() |
fdc2012b90 | |
![]() |
fbd9a21dc8 | |
![]() |
c16a5d46ae | |
![]() |
75e53514dc | |
![]() |
c8617dc9ee | |
![]() |
a5604bb967 | |
![]() |
a5779f2d18 | |
![]() |
42cc616ed3 | |
![]() |
15d4b2eb2c | |
![]() |
6b4a1c8f61 | |
![]() |
abcc545484 | |
![]() |
1272457517 | |
![]() |
17a1ca5edf | |
![]() |
a9f6365d78 | |
![]() |
7fbb0a0947 | |
![]() |
9322965027 | |
![]() |
816665f935 | |
![]() |
40f361fe1f | |
![]() |
7e9e5af63f | |
![]() |
a6d9d36343 | |
![]() |
c76b46fa1a | |
![]() |
333331a11c | |
![]() |
40d08f73bb | |
![]() |
f6868abbdb | |
![]() |
7d67e0e7f2 | |
![]() |
4fc7c1666a | |
![]() |
0373e3d523 | |
![]() |
d41d7a610c | |
![]() |
f2994c8fcc | |
![]() |
8fc4d7ac9c | |
![]() |
80fe6953ce | |
![]() |
d7a124c59d | |
![]() |
f0f71787c7 | |
![]() |
3a968fdd33 | |
![]() |
3f71a14874 | |
![]() |
73d68b9040 | |
![]() |
bb03efcf7a | |
![]() |
98b5e5d53f | |
![]() |
7638d3cc69 | |
![]() |
bd0bc086c1 | |
![]() |
f64d7adb22 | |
![]() |
350242129e | |
![]() |
e87f80bce3 | |
![]() |
9536fdd157 | |
![]() |
21de9fb209 | |
![]() |
a00ef07cd8 | |
![]() |
c4f6eb603e | |
![]() |
cc0a53c191 | |
![]() |
b78ccde9d9 | |
![]() |
8323952cfd | |
![]() |
5f02f0c90d | |
![]() |
ac70da19f5 | |
![]() |
62c6f0e0d0 | |
![]() |
75cf264040 | |
![]() |
022a3ce795 | |
![]() |
a5a3411c28 | |
![]() |
4fe3c7a919 | |
![]() |
cf002d8f47 | |
![]() |
d79460ff55 | |
![]() |
71b5c43252 | |
![]() |
5c7ccf3b8d | |
![]() |
1fb40a31e4 | |
![]() |
1add0d251c | |
![]() |
1228e1d604 | |
![]() |
4021e89b15 | |
![]() |
84341ef912 | |
![]() |
cf3fe6b9e0 | |
![]() |
f653955c97 | |
![]() |
cb53a18f02 | |
![]() |
5a9d7188b8 | |
![]() |
e1c8a57efd | |
![]() |
a1d7b972d2 | |
![]() |
9a16dcd6f2 | |
![]() |
c219e71ae9 | |
![]() |
3a98c44356 | |
![]() |
ba560a37fe | |
![]() |
3aeeeb2aed | |
![]() |
2e22b221c9 | |
![]() |
2e5e146f0c | |
![]() |
5d990afe27 | |
![]() |
7236fc253b | |
![]() |
27b258c29b | |
![]() |
3b8b19ea8c | |
![]() |
2ce3f44403 | |
![]() |
752642afaf | |
![]() |
fc0589c48f | |
![]() |
741718a0f9 | |
![]() |
4f36599458 | |
![]() |
a4d907a1bf | |
![]() |
d2b72143f0 | |
![]() |
4a28121b91 | |
![]() |
4c1347c24b | |
![]() |
11498add8e | |
![]() |
9cd4783fd5 | |
![]() |
3b08eee8c7 | |
![]() |
44ae7f1b93 | |
![]() |
c213c83844 | |
![]() |
8c122c7ca5 | |
![]() |
5c2eeb7d33 | |
![]() |
83f85f240c | |
![]() |
3fd9f9ae71 | |
![]() |
1f34aed666 | |
![]() |
2b51d30c2e | |
![]() |
f3f3919c34 | |
![]() |
30a5f68fef | |
![]() |
b3efecfab2 | |
![]() |
285e05fc15 | |
![]() |
a58eaf5ea1 | |
![]() |
25cca73a31 | |
![]() |
381636f83c | |
![]() |
0d41aa929a | |
![]() |
bd553de501 | |
![]() |
c6c004ce8d | |
![]() |
e9a44b9984 | |
![]() |
52df212c71 | |
![]() |
40f746e3e2 | |
![]() |
6ce295d490 | |
![]() |
baaccd574e | |
![]() |
c7abe76939 | |
![]() |
af0620d14e | |
![]() |
6479864a6f | |
![]() |
d0f03cae2a | |
![]() |
9f15fe9fdf | |
![]() |
8187d3a739 | |
![]() |
4e14656ef1 | |
![]() |
665e5919af | |
![]() |
ccb24016c0 | |
![]() |
01718e35ba | |
![]() |
68c1f45501 | |
![]() |
07f6d9edf0 | |
![]() |
1da679de34 | |
![]() |
3be5a422f2 | |
![]() |
0cd3db0bb0 | |
![]() |
08c3c9cc3b | |
![]() |
f5849fad68 | |
![]() |
6f3fca48a1 | |
![]() |
4135161173 | |
![]() |
257565b29d | |
![]() |
33f7b4850c | |
![]() |
987c3872bf | |
![]() |
38569c28c7 | |
![]() |
4fed700e96 | |
![]() |
524cc1382c | |
![]() |
093f07c500 | |
![]() |
881a796afd | |
![]() |
7665cbea01 | |
![]() |
f35bafb88a | |
![]() |
1ed4923ea1 | |
![]() |
386f3d003f | |
![]() |
5bdd6f4007 | |
![]() |
5409ce545c | |
![]() |
903ac35aa7 | |
![]() |
e7e3aeb548 | |
![]() |
fa5a6d87ff | |
![]() |
b00379744c | |
![]() |
a448e57475 | |
![]() |
002611752f | |
![]() |
50503e5fc7 | |
![]() |
b5ab14df8d | |
![]() |
bea5df1541 | |
![]() |
2dc5bbbf43 | |
![]() |
3da2b65fd8 | |
![]() |
cceac72267 | |
![]() |
a758fb2a75 | |
![]() |
39c866eb02 | |
![]() |
cf60f9c46f | |
![]() |
8ce46ab1a1 | |
![]() |
c20c1f2a32 | |
![]() |
fb94726a1e | |
![]() |
1152e8cd71 | |
![]() |
60aeec7033 | |
![]() |
cf2ffa2bd9 | |
![]() |
292f5c9d75 | |
![]() |
ffb52a2c40 | |
![]() |
427cf36eaa | |
![]() |
9e0244dfc3 | |
![]() |
203e42382f | |
![]() |
16ee0dd2f1 | |
![]() |
b7b433e98f | |
![]() |
761f6a6661 | |
![]() |
40c4b80f69 | |
![]() |
e64fb33905 | |
![]() |
a1ffe2ae90 | |
![]() |
f9e823b051 | |
![]() |
d5952c060f | |
![]() |
da10933cd3 | |
![]() |
aa05d369e1 | |
![]() |
e79a930e59 | |
![]() |
e4c737e752 | |
![]() |
2c2726c827 | |
![]() |
41324dc1e3 | |
![]() |
202f341299 | |
![]() |
61c19a81c2 | |
![]() |
389b233a40 | |
![]() |
e85d436ddd | |
![]() |
b12b7f83ca | |
![]() |
891f6dbb5a | |
![]() |
c563097faa | |
![]() |
0c3d9d535d | |
![]() |
9a86d1b54d | |
![]() |
64f7cbc423 | |
![]() |
e2ea50f08e | |
![]() |
cdbe8eea6b | |
![]() |
b6688c4419 | |
![]() |
c100e8d53f | |
![]() |
2f3ffdc79d | |
![]() |
5f8d8a555b | |
![]() |
86bde00882 | |
![]() |
4a0fce5a0a | |
![]() |
e8b95784eb | |
![]() |
d028cce23f | |
![]() |
b1bb913f9d | |
![]() |
d7f6148f24 | |
![]() |
d58a5d8b12 | |
![]() |
2e06d38aff | |
![]() |
8d8f940552 | |
![]() |
33c7230ee2 | |
![]() |
fdecafbbb3 | |
![]() |
22141e74de | |
![]() |
31ed5c68d1 | |
![]() |
b2aa49d064 | |
![]() |
604372ff2d | |
![]() |
656d14fc4e | |
![]() |
501204c543 | |
![]() |
3a93f198df | |
![]() |
4a0b04e063 | |
![]() |
276e4ec250 | |
![]() |
1cd6e94408 | |
![]() |
8a6b2a728e | |
![]() |
116c8e4cef | |
![]() |
e86492d249 | |
![]() |
edcc8b7107 | |
![]() |
8996db2adf | |
![]() |
9ce43befc4 | |
![]() |
810c8e6f89 | |
![]() |
700d04badc | |
![]() |
a1a8b799d0 | |
![]() |
8e078d1e1c | |
![]() |
f9e6217bc9 | |
![]() |
edca829e09 | |
![]() |
3a51216f51 | |
![]() |
0dcdd92ba2 | |
![]() |
0cf37b3f8e | |
![]() |
ce6f44f918 | |
![]() |
7624645d58 | |
![]() |
fc6c358e9a | |
![]() |
980ca7f4ff | |
![]() |
74b66ecbfb | |
![]() |
02e134f81d | |
![]() |
8c1979ef1b | |
![]() |
6ae707edf5 | |
![]() |
791ae38bf8 | |
![]() |
a2e5d966e1 | |
![]() |
617e534fda | |
![]() |
6cff37bb03 | |
![]() |
3557e019de | |
![]() |
0fa1581a99 | |
![]() |
6ad0f9dc9b | |
![]() |
770e9cc6f4 | |
![]() |
7e1301ad7f | |
![]() |
5d8f3fd8ee | |
![]() |
93c2bc1552 | |
![]() |
b45a6250de | |
![]() |
b65a8672a4 | |
![]() |
4de7737907 | |
![]() |
6c5c84a3fc | |
![]() |
9e0df41a55 | |
![]() |
772ac3c894 | |
![]() |
dde7719d23 | |
![]() |
5cc10c6156 | |
![]() |
2cfc6cce96 | |
![]() |
62ca3a91f4 | |
![]() |
0d02391127 | |
![]() |
b91659e4f7 | |
![]() |
f091582e03 | |
![]() |
2b0afdaead | |
![]() |
1281e4a4c9 | |
![]() |
08a5ff30ca | |
![]() |
a58cb3cd39 | |
![]() |
bc85604d94 | |
![]() |
836ae6d5fe | |
![]() |
3186b92c25 | |
![]() |
6b2af5c038 | |
![]() |
b8c52b34cb | |
![]() |
f9ccbfd321 | |
![]() |
72147106f3 | |
![]() |
3d2a04d23d | |
![]() |
0a2940e4ad | |
![]() |
c2bba2eb28 | |
![]() |
7ec594c5fc | |
![]() |
2b78d2dbc0 | |
![]() |
b68bb81652 | |
![]() |
c8898828d6 | |
![]() |
5096ee4d70 | |
![]() |
d2a1c422a7 | |
![]() |
ad2b447866 | |
![]() |
b53a91c337 | |
![]() |
2089961d6f | |
![]() |
5ee3d30858 | |
![]() |
e9854dafd8 | |
![]() |
3b89f59094 | |
![]() |
42916f50f5 | |
![]() |
a049a66ffe | |
![]() |
3825c6507f | |
![]() |
4fdcc90c41 | |
![]() |
fe99051b55 | |
![]() |
a01be5cce4 | |
![]() |
e442b0d1ec | |
![]() |
372ac5c729 | |
![]() |
69b9f80a01 | |
![]() |
44ccaa17de | |
![]() |
de4693c321 | |
![]() |
a6e30c2ded | |
![]() |
fbe3a48ac2 | |
![]() |
1877d66cc5 | |
![]() |
c0643fd437 | |
![]() |
accea40ab2 | |
![]() |
1139aa5f87 | |
![]() |
0c9951a0c1 | |
![]() |
3d0edbc292 | |
![]() |
8179361803 | |
![]() |
7b494fd445 | |
![]() |
67952ab5a6 | |
![]() |
f437e9124d | |
![]() |
5b36b9c43e | |
![]() |
7109a063c6 | |
![]() |
dc52be9810 | |
![]() |
4effe6d293 | |
![]() |
07b4150966 | |
![]() |
ea8ff66989 | |
![]() |
7acf577f56 | |
![]() |
4a5c4cdeb7 | |
![]() |
0984951845 | |
![]() |
49ad768432 | |
![]() |
b51f25fff7 | |
![]() |
dcb34b08e9 | |
![]() |
8f02b6d42c | |
![]() |
3a13ef26e1 | |
![]() |
b96fc440e9 | |
![]() |
5bcca46fff | |
![]() |
dbbd07d62e | |
![]() |
170a169f35 | |
![]() |
11ffa8dfda | |
![]() |
7a2f28ac2d | |
![]() |
4d178debd7 | |
![]() |
184957e3c7 | |
![]() |
7315bfd03e | |
![]() |
726f6b4b2d | |
![]() |
5917df205c | |
![]() |
b7783aeb1d | |
![]() |
04f47e3bb7 | |
![]() |
822d3e9dc9 | |
![]() |
7a8d05f32e | |
![]() |
ee26acd9f7 | |
![]() |
bec35d03aa | |
![]() |
3c4bd31a77 | |
![]() |
58ffdd9728 | |
![]() |
5eeaaae08c | |
![]() |
731a58d518 | |
![]() |
41657eacef | |
![]() |
ea8c694cb1 | |
![]() |
157d560d09 | |
![]() |
5295279a76 | |
![]() |
184f6cac2f | |
![]() |
7851c77db3 | |
![]() |
ff436c06d0 | |
![]() |
6d33d60d2b | |
![]() |
1fb65215a2 | |
![]() |
307c1fc093 | |
![]() |
248dfbb6f6 | |
![]() |
9c3cf323fe | |
![]() |
44cd93e29b | |
![]() |
fb5d2e5054 | |
![]() |
97167fdb7a | |
![]() |
a1e180da8c | |
![]() |
28e2660994 | |
![]() |
7863ac81ee | |
![]() |
f42b6292c0 | |
![]() |
07ba6e48c6 | |
![]() |
44e73cf460 | |
![]() |
efb382c9ce | |
![]() |
a20b49b808 | |
![]() |
4a7fcf95f5 | |
![]() |
67b9da71eb | |
![]() |
4c370edf24 | |
![]() |
58c543985d | |
![]() |
d8628ce66a | |
![]() |
efb388cb05 | |
![]() |
1504e2ba33 | |
![]() |
b5ccbd4aeb | |
![]() |
160f768008 | |
![]() |
db2e3599ff | |
![]() |
ad3aaec3ca | |
![]() |
a8b54e8512 | |
![]() |
625c318a7f | |
![]() |
3da83ea161 | |
![]() |
e6e365b8bf | |
![]() |
6554659338 | |
![]() |
73c71e19a2 | |
![]() |
e30077dd83 | |
![]() |
b72a414eae | |
![]() |
75c43683eb | |
![]() |
4bdbb2c5d4 | |
![]() |
749e196689 | |
![]() |
3985a2b6ee | |
![]() |
7b76eb7f00 | |
![]() |
e368139cdf | |
![]() |
b0025d9e79 | |
![]() |
21bf0a3a40 | |
![]() |
38db3a5f7e | |
![]() |
cdd45c4222 | |
![]() |
b8abf38075 | |
![]() |
76fc3f5ca2 | |
![]() |
cb9876e4c3 | |
![]() |
cd46103dfe | |
![]() |
9ebbe17631 | |
![]() |
1c0b42b629 | |
![]() |
b20902412f | |
![]() |
848d6497e6 | |
![]() |
c1102df3f0 | |
![]() |
7744dd0b6b | |
![]() |
fdee6333f3 | |
![]() |
79995c141d | |
![]() |
a7fd514ebd | |
![]() |
9a4e3e3ff2 | |
![]() |
93380d6b4e | |
![]() |
1780dba2de | |
![]() |
bf717f1226 | |
![]() |
0a58c0800d | |
![]() |
9dbc46cfa6 | |
![]() |
e6b7aa47ae | |
![]() |
f78d9aae4d | |
![]() |
4c05c46cb4 | |
![]() |
f589c8f723 | |
![]() |
925c71a8ae | |
![]() |
f8ce34a7d7 | |
![]() |
3967926110 | |
![]() |
483e177e13 | |
![]() |
765b420651 | |
![]() |
7303e9ae86 | |
![]() |
006e23ab69 | |
![]() |
f1cf66fcc4 | |
![]() |
634dafce63 | |
![]() |
8170a6ac8e | |
![]() |
d963151dba | |
![]() |
20cd96e400 | |
![]() |
553dff9f61 | |
![]() |
b61cab7746 | |
![]() |
63feed7162 | |
![]() |
3e90fa6482 | |
![]() |
ab75379f0c | |
![]() |
57b9ac17fd | |
![]() |
638ccb3b11 | |
![]() |
ae41fa1127 | |
![]() |
18ce372a13 | |
![]() |
cdac96b0bc | |
![]() |
4e4b9d6cca | |
![]() |
53f3950b81 | |
![]() |
f7db3ee718 | |
![]() |
d221171e53 | |
![]() |
10a5fb28cb | |
![]() |
94aedeae0c | |
![]() |
295b3f9621 | |
![]() |
47a847cc43 | |
![]() |
4a92ff9cac | |
![]() |
b30a316f4b | |
![]() |
b6c75bc73c | |
![]() |
fa55a16f2c | |
![]() |
1ea865e59b | |
![]() |
cdadeeeb04 | |
![]() |
4080b470ee | |
![]() |
6b474598e0 | |
![]() |
1d1ed164a6 | |
![]() |
a72db912f7 | |
![]() |
c5b6a7ce2c | |
![]() |
20b53a91d3 | |
![]() |
d275d2c6a3 | |
![]() |
22c81f909b | |
![]() |
aad33cb72f | |
![]() |
ca444b549c | |
![]() |
b07190e13d | |
![]() |
b7943b38ee | |
![]() |
5e92d9a7f2 | |
![]() |
44557b2d18 | |
![]() |
2904ceeab9 | |
![]() |
a6c3eae304 | |
![]() |
8a807caca2 | |
![]() |
6cb9d08b78 | |
![]() |
36502294ba | |
![]() |
110304b628 | |
![]() |
648741265b | |
![]() |
bf7c62f457 | |
![]() |
61f087ac2a | |
![]() |
ea2d8e2ecd | |
![]() |
1b68a46c89 | |
![]() |
f61018afd7 | |
![]() |
75931a1b39 | |
![]() |
eafc6dd0ba | |
![]() |
7b671c420d | |
![]() |
711c394aaf | |
![]() |
f5026dd49a | |
![]() |
efa477a3b0 | |
![]() |
adc6afb8fd | |
![]() |
c90afeeed2 | |
![]() |
2be1e77098 | |
![]() |
6ef9404ee9 | |
![]() |
8baf85f7f9 | |
![]() |
3c5c6becbf | |
![]() |
759f18b476 | |
![]() |
123d04d1ef | |
![]() |
674933ae60 | |
![]() |
f62681b9d4 | |
![]() |
73b996345c | |
![]() |
610b0ab651 | |
![]() |
aea25100e5 | |
![]() |
4f9555c64a | |
![]() |
5913cf9c5c | |
![]() |
c6b189b583 | |
![]() |
184fe6866c | |
![]() |
a9eb253bd2 | |
![]() |
be4830dcf6 | |
![]() |
2c559ea059 | |
![]() |
1896bb9b77 | |
![]() |
c7816b319e | |
![]() |
2bb27a4210 | |
![]() |
f567b663fb | |
![]() |
fcaedc525a | |
![]() |
a65416a1e9 | |
![]() |
8d1669b889 | |
![]() |
5b8bda9e51 | |
![]() |
48d3f98f4a | |
![]() |
c21ce3c617 | |
![]() |
3a8afb543a | |
![]() |
2f467d75f0 | |
![]() |
9553cfb489 | |
![]() |
10f35a1fa5 | |
![]() |
4ea00d3a70 | |
![]() |
520d6a5e85 | |
![]() |
5af2653e5a | |
![]() |
c2f5b3fa9f | |
![]() |
c5468f2b3b | |
![]() |
ef51ede2ce | |
![]() |
cc2d1551b7 | |
![]() |
7f239b26e1 | |
![]() |
67942e4ff4 | |
![]() |
28aeea6f0b | |
![]() |
8c94b78346 | |
![]() |
f5cf7e0920 | |
![]() |
fa320e6e64 | |
![]() |
335155e1f5 | |
![]() |
3f0921f690 | |
![]() |
23dc1f86b2 | |
![]() |
0a4245efa9 | |
![]() |
12d467e498 | |
![]() |
8a6125d74d | |
![]() |
da6d243e9e | |
![]() |
2d6b50242c | |
![]() |
04f72ed2cf | |
![]() |
32d327cb4f | |
![]() |
607fdf7d79 | |
![]() |
a6b7c6fa85 | |
![]() |
023efdcc71 | |
![]() |
1be269d275 | |
![]() |
994e709226 | |
![]() |
35f509aea6 | |
![]() |
7518096983 | |
![]() |
de05f936c1 | |
![]() |
00455da385 | |
![]() |
35ab3bd8c0 | |
![]() |
87e59853bb | |
![]() |
8da63a6a24 | |
![]() |
642291790e | |
![]() |
5e4fff39d6 | |
![]() |
bc03b6ede2 | |
![]() |
210dadc93c | |
![]() |
b051ac69a6 | |
![]() |
a60df373f9 | |
![]() |
1dcd93f6e7 | |
![]() |
e7fbaacf3b | |
![]() |
b84b981799 | |
![]() |
4456bbca14 | |
![]() |
17454b2cea | |
![]() |
f3063e00c0 | |
![]() |
4ab7a681a7 | |
![]() |
ba971c4f2c | |
![]() |
e29ad47995 | |
![]() |
f38c5a2f43 | |
![]() |
af62058b49 | |
![]() |
c07423a6d5 | |
![]() |
d122901de6 | |
![]() |
44bc942bf7 | |
![]() |
50357712d4 | |
![]() |
72a86910be | |
![]() |
7cd86b5a00 | |
![]() |
8096003ed1 | |
![]() |
c523266a99 | |
![]() |
c07d1eab41 | |
![]() |
17c7cb30a3 | |
![]() |
76c29b6a56 | |
![]() |
b14410902c | |
![]() |
dbbe345005 | |
![]() |
eef874b805 | |
![]() |
ee4cd3c35a | |
![]() |
343e3aa2e4 | |
![]() |
a3d48834f1 | |
![]() |
4de6dbeb25 | |
![]() |
19d5e7a14a | |
![]() |
7e53c435c3 | |
![]() |
b155627923 | |
![]() |
a13dd20f58 | |
![]() |
bd1f42a5ef | |
![]() |
c52cc02e89 | |
![]() |
7125d84fa2 | |
![]() |
8ba8983353 | |
![]() |
196d2dc8a5 | |
![]() |
cc35671d7b | |
![]() |
d4e7b59f23 | |
![]() |
2e61e9cb50 | |
![]() |
a3a060077b | |
![]() |
36b2d47f84 | |
![]() |
e39b43bbc2 | |
![]() |
a4854084bc | |
![]() |
df1428e33d | |
![]() |
6a16e19b37 | |
![]() |
1165b42dc2 | |
![]() |
c98e13d803 | |
![]() |
689113b3c9 | |
![]() |
a007b4757a | |
![]() |
26779d6367 | |
![]() |
0302908cb0 | |
![]() |
8dc62f59bb | |
![]() |
948727a2ef | |
![]() |
aca5301dc0 | |
![]() |
0e78488ac3 | |
![]() |
0c520520be | |
![]() |
71a3691edc | |
![]() |
5b15ea8348 | |
![]() |
bcb86428fe | |
![]() |
db14e68117 | |
![]() |
bd3bb02c6e | |
![]() |
9380621850 | |
![]() |
7651862729 | |
![]() |
ddd50fe153 | |
![]() |
41a0251a5b | |
![]() |
5696b19081 | |
![]() |
93629a8ac8 | |
![]() |
5a3b08167d | |
![]() |
a8e2e87fe1 | |
![]() |
323647114d | |
![]() |
5dbcba196f | |
![]() |
d54833b3bb | |
![]() |
a07acec2f4 | |
![]() |
21b4e6099b | |
![]() |
016c711cf1 | |
![]() |
d0429737bd | |
![]() |
d96a10dce8 | |
![]() |
789647c604 | |
![]() |
9de1b594b0 | |
![]() |
1e1a1bd8a8 | |
![]() |
e165b1eced | |
![]() |
cd52fec722 | |
![]() |
db63f369e1 | |
![]() |
8e9157aeaa | |
![]() |
7f77955474 | |
![]() |
4f510dd46c | |
![]() |
ee9ba197ba | |
![]() |
2fb52d6e26 | |
![]() |
6be6299717 | |
![]() |
0a7065ce89 | |
![]() |
ba90214573 | |
![]() |
19e3137ede | |
![]() |
59440f9207 | |
![]() |
b233d1e68a | |
![]() |
9ac18c5e52 | |
![]() |
a5879124df | |
![]() |
689486fadc | |
![]() |
3b14396a08 | |
![]() |
873ecf0312 | |
![]() |
b24552b029 | |
![]() |
f6953dc9a7 | |
![]() |
40893681c5 | |
![]() |
af46975f56 | |
![]() |
2070f702de | |
![]() |
1d2c7f3541 | |
![]() |
708edde641 | |
![]() |
6f86a8fb05 | |
![]() |
1c1e6dccb0 | |
![]() |
9eb15a524b | |
![]() |
c177494c1d | |
![]() |
ee0d450f93 | |
![]() |
d219ff1655 | |
![]() |
6891c38705 | |
![]() |
343afffbb1 | |
![]() |
e690669d70 | |
![]() |
518818000b | |
![]() |
fdca67f74b | |
![]() |
981470f393 | |
![]() |
2b6ef8e10f | |
![]() |
16224a1d47 | |
![]() |
64b51f22af | |
![]() |
f8ada772ae | |
![]() |
f8750f2350 | |
![]() |
a8dda5c586 | |
![]() |
86a90468ba | |
![]() |
b6e1284518 | |
![]() |
21bca582c6 | |
![]() |
0d5d2234c6 | |
![]() |
4dbed130e2 | |
![]() |
5643bfef88 | |
![]() |
e0667855ee | |
![]() |
02c3af5c7c | |
![]() |
f82fcad094 | |
![]() |
8e12971c2d | |
![]() |
f10d0f1e4d | |
![]() |
a16ca20770 | |
![]() |
0b002fb9cb | |
![]() |
34bfc91b5d | |
![]() |
7a2e2e3c3b | |
![]() |
4be3da0701 | |
![]() |
d465356f6d | |
![]() |
4abfd7ea52 | |
![]() |
7d379f9438 | |
![]() |
7e5ee6757c | |
![]() |
e28b004883 | |
![]() |
7f6d718c84 | |
![]() |
9350a332b3 | |
![]() |
ab9ab87242 | |
![]() |
eb0688398f | |
![]() |
6b80eb72da | |
![]() |
889ae305df | |
![]() |
bdd569f019 | |
![]() |
6b8cebc25f | |
![]() |
48f385556f | |
![]() |
d2d613980a | |
![]() |
ea67dd5d03 | |
![]() |
4cff2a81a6 | |
![]() |
a62a0296e7 | |
![]() |
2c60a2c5aa | |
![]() |
7a7b9f25cc | |
![]() |
7642bbafe4 | |
![]() |
057b80fedd | |
![]() |
2c36bf0323 | |
![]() |
3223d43ffb | |
![]() |
4692aad2c3 | |
![]() |
dbb67a7b81 | |
![]() |
46149b660b | |
![]() |
90476bb1c5 | |
![]() |
c97af1ac18 | |
![]() |
4fc1a3cd78 | |
![]() |
df771a8fc6 | |
![]() |
49fda0f7c8 | |
![]() |
8eb6afb9b0 | |
![]() |
01096b556d | |
![]() |
4d63b7cab6 | |
![]() |
f3c12b0323 | |
![]() |
6cb52efbc8 | |
![]() |
20f54950a9 | |
![]() |
8f581de762 | |
![]() |
2fdfa2b662 | |
![]() |
34b3e6366f | |
![]() |
e95bac3d87 | |
![]() |
de81c7c1d9 | |
![]() |
147845b55f | |
![]() |
b331753d31 | |
![]() |
54ca9021c3 | |
![]() |
db31c526d9 | |
![]() |
c732d09745 | |
![]() |
bae31bc9a2 | |
![]() |
dd249789ec | |
![]() |
90059e6b45 | |
![]() |
c959476265 | |
![]() |
88d3b6010b | |
![]() |
93b64061db | |
![]() |
ac863a6a11 | |
![]() |
efc7db1b69 | |
![]() |
8e1678cc70 | |
![]() |
d7426e11d4 | |
![]() |
ce7ca6895b | |
![]() |
dc4f2b2dcb | |
![]() |
1503364d6b | |
![]() |
b817873c15 | |
![]() |
c2994a6629 | |
![]() |
748f8d526d | |
![]() |
382e9b5de0 | |
![]() |
3f31590ad4 | |
![]() |
712f2b1599 | |
![]() |
64fef377c0 | |
![]() |
21cd0ae5cb | |
![]() |
043f401636 | |
![]() |
9214632841 | |
![]() |
642ed2fcce | |
![]() |
2185458744 | |
![]() |
c04b9a0267 | |
![]() |
f48ccdac01 | |
![]() |
3c20fc9f69 | |
![]() |
95eaf941d7 | |
![]() |
4c9d3161fd | |
![]() |
61ef8e6883 | |
![]() |
7fe34def78 | |
![]() |
103a05a471 | |
![]() |
22b72855e5 | |
![]() |
dcb71b06b2 | |
![]() |
a095728a46 | |
![]() |
c90b88d701 | |
![]() |
bd138a8711 | |
![]() |
b786f6bba6 | |
![]() |
72b1c0b539 | |
![]() |
1bcd4e27c1 | |
![]() |
183be1ba38 | |
![]() |
157d0e72e9 | |
![]() |
0bdaf14d1e | |
![]() |
4446a77784 | |
![]() |
13413df0d1 | |
![]() |
6ea812737f | |
![]() |
104a034e74 | |
![]() |
4b4fc9266c | |
![]() |
47e5df9103 | |
![]() |
51e03f3edd | |
![]() |
f3c5166197 | |
![]() |
aa07504e31 | |
![]() |
b1c4013cee | |
![]() |
acc3b7e8e4 | |
![]() |
c0bbbfaa4a | |
![]() |
b7db5b31ba | |
![]() |
609de24f19 | |
![]() |
8124653d07 | |
![]() |
5832a70644 | |
![]() |
347f69fa66 | |
![]() |
8cb7c65684 | |
![]() |
b856166520 | |
![]() |
2fd04595bf | |
![]() |
81e15834c2 | |
![]() |
150ebf15a5 | |
![]() |
b19ca0aaaf | |
![]() |
dffb0cce52 | |
![]() |
5526e19349 | |
![]() |
f8334fc42a | |
![]() |
dbaf8bc7ef | |
![]() |
d459c8dabe | |
![]() |
a892a8908b | |
![]() |
f6752899e2 | |
![]() |
a1a4fdbd21 | |
![]() |
28111e7f34 | |
![]() |
64dc5e69b7 | |
![]() |
604b7fe670 | |
![]() |
f875b3add1 | |
![]() |
ca2c77e4bd | |
![]() |
51fb7cd888 | |
![]() |
6e6fd3af79 | |
![]() |
caea1acfbe | |
![]() |
b9f9dad4c7 | |
![]() |
c579bb0ad5 | |
![]() |
0de3e6b716 | |
![]() |
3844466ff2 | |
![]() |
22cad37729 | |
![]() |
f96895c17c | |
![]() |
ab80874fa5 | |
![]() |
ad6b5ae520 | |
![]() |
0d34f45895 | |
![]() |
950fd00529 | |
![]() |
b36043c241 | |
![]() |
b154eeed28 | |
![]() |
d3d787e2b0 | |
![]() |
993ca4c799 | |
![]() |
8b3023e01f | |
![]() |
ecc755b084 | |
![]() |
c325f246cf | |
![]() |
eabad90b3d | |
![]() |
6197d60d9a | |
![]() |
c6c0ebc670 | |
![]() |
61e1f2414e | |
![]() |
12afa05aee | |
![]() |
0367f3e57e | |
![]() |
f942d5b1a6 | |
![]() |
7ea8de4b7e | |
![]() |
122e374224 | |
![]() |
7719c65169 | |
![]() |
7f7511bf61 | |
![]() |
f99200c966 | |
![]() |
df942fb245 | |
![]() |
efdb38d9f2 | |
![]() |
47c5191b8c | |
![]() |
490aacb7dc | |
![]() |
675dff92c1 | |
![]() |
dea4866177 | |
![]() |
be480a89c0 | |
![]() |
6a910de636 | |
![]() |
c1cfabb20e | |
![]() |
c78e9418a4 | |
![]() |
b5dd6c69b3 | |
![]() |
7cec8614b0 | |
![]() |
87aa5ecbd8 | |
![]() |
2b422dd17b | |
![]() |
4afb93e7fb | |
![]() |
5991cf776b | |
![]() |
19c4ec819a | |
![]() |
a5eda35693 | |
![]() |
05a6f82644 | |
![]() |
f38979f5ba | |
![]() |
ca2bfbd3ef | |
![]() |
f84065dcd3 | |
![]() |
b25eb6742a | |
![]() |
cf4edceca6 | |
![]() |
56ffcc6619 | |
![]() |
5f68ab9181 | |
![]() |
7ec5dac844 | |
![]() |
ec73097d9b | |
![]() |
9257c1ea68 | |
![]() |
b616823353 | |
![]() |
8024469b88 | |
![]() |
fb52b36067 | |
![]() |
58b66daa1e | |
![]() |
8dd2c5b751 | |
![]() |
fbcf0bff9d | |
![]() |
695607bbf3 | |
![]() |
1f6accba22 | |
![]() |
06b7e33cc0 | |
![]() |
c36a984b1b | |
![]() |
5b6a9f93ef | |
![]() |
5b5beb5942 | |
![]() |
382f603301 | |
![]() |
83f7c6ed41 | |
![]() |
2cbc72f617 | |
![]() |
d57a2acd87 | |
![]() |
3d17d5f26e | |
![]() |
2b1e972803 | |
![]() |
29d681ff52 | |
![]() |
4770ed4708 | |
![]() |
5e3d9fe5a3 | |
![]() |
8ac75e4a73 | |
![]() |
37ddc96666 | |
![]() |
6fa4f9cd23 | |
![]() |
0e0ad463c7 | |
![]() |
09eb71d5fb | |
![]() |
be8faa5190 | |
![]() |
91fe27d12c | |
![]() |
2397fb931c | |
![]() |
4af81c412c | |
![]() |
07d27b057a | |
![]() |
632da57962 | |
![]() |
34ac8444f4 | |
![]() |
0728c900af | |
![]() |
9a100b04c2 | |
![]() |
01c0a03ac8 | |
![]() |
4636463fde | |
![]() |
6f17c87005 | |
![]() |
e2e0eb32a8 | |
![]() |
9eebd8da23 | |
![]() |
32bedc9a9d | |
![]() |
8694abf14b | |
![]() |
16575da13c | |
![]() |
da09b87548 | |
![]() |
1f73e1f026 | |
![]() |
42cda6f5ac | |
![]() |
2b557452bd | |
![]() |
796b660e2e | |
![]() |
90de3f357b | |
![]() |
03a42a5b35 | |
![]() |
4bdb241aa6 | |
![]() |
648b026166 | |
![]() |
63e87471d6 | |
![]() |
941ebc2b66 | |
![]() |
716f32d608 | |
![]() |
4063fe6627 | |
![]() |
13b01d7a70 | |
![]() |
a60c0d37bc | |
![]() |
bd71e3806b | |
![]() |
e3c38b68f8 | |
![]() |
6681b50892 | |
![]() |
45562123d4 | |
![]() |
23f6116610 | |
![]() |
aa7d2d92d1 | |
![]() |
5d14259e7a | |
![]() |
ec024c8371 | |
![]() |
44882ed4cc | |
![]() |
c5c822f467 | |
![]() |
8ed937344a | |
![]() |
67464fdd4b | |
![]() |
1294220965 | |
![]() |
69509e9c38 | |
![]() |
0c15958484 | |
![]() |
b2d7ace9ff | |
![]() |
6b2764c3c8 | |
![]() |
c75582b4b6 | |
![]() |
79bb979daa | |
![]() |
f099848461 | |
![]() |
fd1554eacc | |
![]() |
54d2418249 | |
![]() |
17456b68fc | |
![]() |
1d8341bbee | |
![]() |
50ae500253 | |
![]() |
203e8c6b92 | |
![]() |
f34a5d962f | |
![]() |
06c8623db0 | |
![]() |
8b19623ca1 | |
![]() |
10ca7ae8b2 | |
![]() |
0587798674 | |
![]() |
25a97ec5ce | |
![]() |
61ec4adafa | |
![]() |
9f90d4cc55 | |
![]() |
2b53c74f3a | |
![]() |
74fe24b77f | |
![]() |
254a663d16 | |
![]() |
a4574c8a69 |
|
@ -0,0 +1,36 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const restCssPath = path.join(process.cwd(), 'components', 'style', 'reset.css');
|
||||||
|
const tokenStatisticPath = path.join(process.cwd(), 'components', 'version', 'token.json');
|
||||||
|
const tokenMetaPath = path.join(process.cwd(), 'components', 'version', 'token-meta.json');
|
||||||
|
|
||||||
|
function finalizeCompile() {
|
||||||
|
if (fs.existsSync(path.join(__dirname, './es'))) {
|
||||||
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'es', 'style', 'reset.css'));
|
||||||
|
fs.copyFileSync(tokenStatisticPath, path.join(process.cwd(), 'es', 'version', 'token.json'));
|
||||||
|
fs.copyFileSync(tokenMetaPath, path.join(process.cwd(), 'es', 'version', 'token-meta.json'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fs.existsSync(path.join(__dirname, './lib'))) {
|
||||||
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'lib', 'style', 'reset.css'));
|
||||||
|
fs.copyFileSync(tokenStatisticPath, path.join(process.cwd(), 'lib', 'version', 'token.json'));
|
||||||
|
fs.copyFileSync(tokenMetaPath, path.join(process.cwd(), 'lib', 'version', 'token-meta.json'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizeDist() {
|
||||||
|
if (fs.existsSync(path.join(__dirname, './dist'))) {
|
||||||
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'dist', 'reset.css'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
compile: {
|
||||||
|
finalize: finalizeCompile,
|
||||||
|
},
|
||||||
|
dist: {
|
||||||
|
finalize: finalizeDist,
|
||||||
|
},
|
||||||
|
bail: true,
|
||||||
|
};
|
|
@ -7,3 +7,7 @@ es/
|
||||||
lib/
|
lib/
|
||||||
_site/
|
_site/
|
||||||
dist/
|
dist/
|
||||||
|
site/dist/
|
||||||
|
components/version/version.ts
|
||||||
|
site/src/router/demoRoutes.js
|
||||||
|
locale/
|
53
.eslintrc
53
.eslintrc
|
@ -1,53 +0,0 @@
|
||||||
{
|
|
||||||
"root": true,
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"node": true,
|
|
||||||
"jasmine": true,
|
|
||||||
"jest": true,
|
|
||||||
"es6": true
|
|
||||||
},
|
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint"
|
|
||||||
},
|
|
||||||
"extends": ["plugin:vue/recommended", "prettier"],
|
|
||||||
"plugins": ["markdown"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["**/demo/*.md"],
|
|
||||||
"processor": "markdown/markdown",
|
|
||||||
"rules": {
|
|
||||||
"no-console": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"comma-dangle": [2, "always-multiline"],
|
|
||||||
"no-var": "error",
|
|
||||||
"no-console": [2, { "allow": ["warn", "error"] }],
|
|
||||||
"object-shorthand": 2,
|
|
||||||
"no-unused-vars": [2, { "ignoreRestSiblings": true, "argsIgnorePattern": "^h$" }],
|
|
||||||
"no-undef": 2,
|
|
||||||
"camelcase": "off",
|
|
||||||
"no-extra-boolean-cast": "off",
|
|
||||||
"semi": ["error", "always"],
|
|
||||||
"vue/require-prop-types": "off",
|
|
||||||
"vue/require-default-prop": "off",
|
|
||||||
"vue/no-reserved-keys": "off",
|
|
||||||
"vue/comment-directive": "off",
|
|
||||||
"vue/prop-name-casing": "off",
|
|
||||||
"vue/max-attributes-per-line": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"singleline": 20,
|
|
||||||
"multiline": {
|
|
||||||
"max": 1,
|
|
||||||
"allowFirstLine": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"h": true
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
node: true,
|
||||||
|
jasmine: true,
|
||||||
|
jest: true,
|
||||||
|
es6: true,
|
||||||
|
},
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
},
|
||||||
|
extends: [
|
||||||
|
'plugin:vue/vue3-recommended',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
'plugin:import/typescript',
|
||||||
|
'@vue/typescript/recommended',
|
||||||
|
'@vue/prettier',
|
||||||
|
// 'prettier',
|
||||||
|
],
|
||||||
|
// extends: [
|
||||||
|
// 'eslint:recommended',
|
||||||
|
// 'plugin:vue/vue3-recommended',
|
||||||
|
// '@vue/typescript/recommended',
|
||||||
|
// '@vue/prettier',
|
||||||
|
// ],
|
||||||
|
plugins: ['markdown', 'jest', '@typescript-eslint', 'import'],
|
||||||
|
globals: {
|
||||||
|
h: true,
|
||||||
|
defineProps: 'readonly',
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.md'],
|
||||||
|
processor: 'markdown/markdown',
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['*.ts', '*.tsx'],
|
||||||
|
// extends: ['@vue/typescript/recommended', '@vue/prettier'],
|
||||||
|
parserOptions: {
|
||||||
|
project: './tsconfig.json',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/ban-types': 0,
|
||||||
|
'@typescript-eslint/consistent-type-imports': 'error',
|
||||||
|
'@typescript-eslint/explicit-module-boundary-types': 0,
|
||||||
|
'@typescript-eslint/no-empty-function': 0,
|
||||||
|
'@typescript-eslint/no-non-null-assertion': 0,
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
|
||||||
|
],
|
||||||
|
'@typescript-eslint/ban-ts-comment': 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['*.vue'],
|
||||||
|
parser: 'vue-eslint-parser',
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
ecmaVersion: 2021,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
'vue/no-reserved-component-names': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-explicit-any': 0,
|
||||||
|
'@typescript-eslint/no-empty-function': 0,
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true, argsIgnorePattern: '^_' },
|
||||||
|
],
|
||||||
|
'import/no-named-as-default': 'off',
|
||||||
|
'import/namespace': [2, { allowComputed: true }],
|
||||||
|
'import/no-named-as-default-member': 'off',
|
||||||
|
'import/no-unresolved': [2, { ignore: ['ant-design-vue'] }],
|
||||||
|
'comma-dangle': [2, 'always-multiline'],
|
||||||
|
'no-var': 'error',
|
||||||
|
'no-console': [2, { allow: ['warn', 'error'] }],
|
||||||
|
'object-shorthand': 2,
|
||||||
|
'no-unused-vars': [2, { ignoreRestSiblings: true, argsIgnorePattern: '^_' }],
|
||||||
|
'no-undef': 2,
|
||||||
|
camelcase: 'off',
|
||||||
|
'no-extra-boolean-cast': 'off',
|
||||||
|
semi: ['error', 'always'],
|
||||||
|
'vue/no-v-html': 'off',
|
||||||
|
'vue/require-explicit-emits': 'off',
|
||||||
|
'vue/require-prop-types': 'off',
|
||||||
|
'vue/require-default-prop': 'off',
|
||||||
|
'vue/no-reserved-keys': 'off',
|
||||||
|
'vue/comment-directive': 'off',
|
||||||
|
'vue/prop-name-casing': 'off',
|
||||||
|
'vue/one-component-per-file': 'off',
|
||||||
|
'vue/custom-event-name-casing': 'off',
|
||||||
|
'vue/v-on-event-hyphenation': 'off',
|
||||||
|
'vue/max-attributes-per-line': [
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
singleline: 20,
|
||||||
|
multiline: 1,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
},
|
||||||
|
};
|
|
@ -1 +1,2 @@
|
||||||
*.jsx linguist-language=Vue
|
*.jsx linguist-language=Vue
|
||||||
|
*.tsx linguist-language=Vue
|
||||||
|
|
|
@ -3,11 +3,3 @@
|
||||||
github: # [tangjinzhou]
|
github: # [tangjinzhou]
|
||||||
open_collective: ant-design-vue
|
open_collective: ant-design-vue
|
||||||
patreon: tangjinzhou
|
patreon: tangjinzhou
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
custom:
|
|
||||||
[
|
|
||||||
"https://www.paypal.me/tangjinzhou",
|
|
||||||
"https://qn.antdv.com/alipay-and-wechat.png",
|
|
||||||
"https://www.buymeacoffee.com/antdv"
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
blank_issues_enabled: false
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Create new issue
|
- name: Create new issue
|
||||||
url: https://vuecomponent.github.io/issue-helper/
|
url: https://vuecomponent.github.io/issue-helper/
|
||||||
|
@ -13,5 +13,5 @@ contact_links:
|
||||||
url: https://www.paypal.me/tangjinzhou
|
url: https://www.paypal.me/tangjinzhou
|
||||||
about: Love Ant Design Vue? Please consider supporting us via Paypal.
|
about: Love Ant Design Vue? Please consider supporting us via Paypal.
|
||||||
- name: 支付宝/微信 赞助
|
- name: 支付宝/微信 赞助
|
||||||
url: https://qn.antdv.com/alipay-and-wechat.png
|
url: https://aliyuncdn.antdv.com/alipay-and-wechat.png
|
||||||
about: Ant Design Vue 的健康持续发展需要您的支持,🙏
|
about: Ant Design Vue 的健康持续发展需要您的支持,🙏
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
First of all, thank you for your contribution! 😄
|
|
||||||
|
|
||||||
New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
|
|
||||||
|
|
||||||
[[中文版模板 / Chinese template](https://github.com/vueComponent/ant-design-vue/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)]
|
|
||||||
|
|
||||||
### This is a ...
|
|
||||||
|
|
||||||
- [ ] New feature
|
|
||||||
- [ ] Bug fix
|
|
||||||
- [ ] Site / document update
|
|
||||||
- [ ] Component style update
|
|
||||||
- [ ] TypeScript definition update
|
|
||||||
- [ ] Refactoring
|
|
||||||
- [ ] Code style optimization
|
|
||||||
- [ ] Branch merge
|
|
||||||
- [ ] Other (about what?)
|
|
||||||
|
|
||||||
### What's the background?
|
|
||||||
|
|
||||||
> 1. Describe the source of requirement.
|
|
||||||
> 2. Resolve what problem.
|
|
||||||
> 3. Related issue link.
|
|
||||||
|
|
||||||
### API Realization (Optional if not new feature)
|
|
||||||
|
|
||||||
> 1. Basic thought of solution and other optional proposal.
|
|
||||||
> 2. List final API realization and usage sample.
|
|
||||||
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
|
|
||||||
|
|
||||||
### What's the effect? (Optional if not new feature)
|
|
||||||
|
|
||||||
> 1. Does this PR affect user? Which part will be affected?
|
|
||||||
> 2. What will say in changelog?
|
|
||||||
> 3. Does this PR contains potential break change or other risk?
|
|
||||||
|
|
||||||
### Changelog description (Optional if not new feature)
|
|
||||||
|
|
||||||
> 1. English description
|
|
||||||
> 2. Chinese description (optional)
|
|
||||||
|
|
||||||
### Self Check before Merge
|
|
||||||
|
|
||||||
- [ ] Doc is updated/provided or not needed
|
|
||||||
- [ ] Demo is updated/provided or not needed
|
|
||||||
- [ ] TypeScript definition is updated/provided or not needed
|
|
||||||
- [ ] Changelog is provided or not needed
|
|
||||||
|
|
||||||
### Additional Plan? (Optional if not new feature)
|
|
||||||
|
|
||||||
> If this PR related with other PR or following info. You can type here.
|
|
|
@ -1,8 +1,8 @@
|
||||||
首先,感谢你的贡献! 😄
|
首先,感谢你的贡献! 😄
|
||||||
|
|
||||||
新特性请提交至 feature 分支,其余可提交至 master 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
|
新特性请提交至 feature 分支,其余可提交至 main 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~
|
||||||
|
|
||||||
[[English Template / 英文模板](?expand=1)]
|
[[English Template / 英文模板](./pr_en.md)]
|
||||||
|
|
||||||
### 这个变动的性质是
|
### 这个变动的性质是
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
First of all, thank you for your contribution! 😄
|
||||||
|
|
||||||
|
New feature please send pull request to feature branch, and rest to main branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!
|
||||||
|
|
||||||
|
[[中文版模板 / Chinese template](./pr_cn.md)]
|
||||||
|
|
||||||
|
### This is a ...
|
||||||
|
|
||||||
|
- [ ] New feature
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] Site / document update
|
||||||
|
- [ ] Component style update
|
||||||
|
- [ ] TypeScript definition update
|
||||||
|
- [ ] Refactoring
|
||||||
|
- [ ] Code style optimization
|
||||||
|
- [ ] Branch merge
|
||||||
|
- [ ] Other (about what?)
|
||||||
|
|
||||||
|
### What's the background?
|
||||||
|
|
||||||
|
> 1. Describe the source of requirement.
|
||||||
|
> 2. Resolve what problem.
|
||||||
|
> 3. Related issue link.
|
||||||
|
|
||||||
|
### API Realization (Optional if not new feature)
|
||||||
|
|
||||||
|
> 1. Basic thought of solution and other optional proposal.
|
||||||
|
> 2. List final API realization and usage sample.
|
||||||
|
> 3. GIF or snapshot should be provided if includes UI/interactive modification.
|
||||||
|
|
||||||
|
### What's the effect? (Optional if not new feature)
|
||||||
|
|
||||||
|
> 1. Does this PR affect user? Which part will be affected?
|
||||||
|
> 2. What will say in changelog?
|
||||||
|
> 3. Does this PR contains potential break change or other risk?
|
||||||
|
|
||||||
|
### Changelog description (Optional if not new feature)
|
||||||
|
|
||||||
|
> 1. English description
|
||||||
|
> 2. Chinese description (optional)
|
||||||
|
|
||||||
|
### Self Check before Merge
|
||||||
|
|
||||||
|
- [ ] Doc is updated/provided or not needed
|
||||||
|
- [ ] Demo is updated/provided or not needed
|
||||||
|
- [ ] TypeScript definition is updated/provided or not needed
|
||||||
|
- [ ] Changelog is provided or not needed
|
||||||
|
|
||||||
|
### Additional Plan? (Optional if not new feature)
|
||||||
|
|
||||||
|
> If this PR related with other PR or following info. You can type here.
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
key: lock-${{ github.sha }}
|
key: lock-${{ github.sha }}
|
||||||
|
|
||||||
- name: create package-lock.json
|
- name: create package-lock.json
|
||||||
run: npm i --package-lock-only
|
run: npm i --package-lock-only --ignore-scripts
|
||||||
|
|
||||||
- name: hack for singe file
|
- name: hack for singe file
|
||||||
run: |
|
run: |
|
||||||
|
@ -41,16 +41,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
# with:
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
# token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
# - name: Checkout submodules
|
||||||
- name: Checkout submodules
|
# uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
# with:
|
||||||
with:
|
# repository: tangjinzhou/antdv-demo
|
||||||
repository: tangjinzhou/antdv-demo
|
# token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
# path: antdv-demo
|
||||||
path: antdv-demo
|
# submodules: true
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: restore cache from package-lock.json
|
- name: restore cache from package-lock.json
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
name: Emoji Helper
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
emoji:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions-cool/emoji-helper@v1.0.0
|
||||||
|
with:
|
||||||
|
type: 'release'
|
||||||
|
emoji: '+1, laugh, heart, hooray, rocket, eyes'
|
|
@ -0,0 +1,23 @@
|
||||||
|
name: Issue Close Require
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
close-issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: need reproduce
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'close-issues'
|
||||||
|
labels: '🤔 Need Reproduce'
|
||||||
|
inactive-day: 7
|
||||||
|
body: |
|
||||||
|
Since the issue was labeled with `Need Reproduce`, but no response in 7 days. This issue will be closed. If you have any questions, you can comment and reply.
|
||||||
|
|
||||||
|
由于该 issue 被标记为需要复现信息,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
|
|
@ -0,0 +1,76 @@
|
||||||
|
name: Issue Labeled
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-labeled:
|
||||||
|
permissions:
|
||||||
|
issues: write # for actions-cool/issues-helper to update issues
|
||||||
|
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Need Reproduce
|
||||||
|
if: github.event.label.name == '🤔 Need Reproduce'
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this [link for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [link for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) or a minimal GitHub repository. Make sure to choose the correct version.
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处 for vue2](https://codesandbox.io/s/2wpk21kzvr)、 [此处 for vue3](https://codesandbox.io/s/agitated-franklin-1w72v) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。
|
||||||
|
|
||||||
|
- name: help wanted
|
||||||
|
if: github.event.label.name == 'help wanted'
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
|
||||||
|
|
||||||
|
- name: Usage
|
||||||
|
if: github.event.label.name == 'Usage'
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment, close-issue'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Hello @${{ github.event.issue.user.login }}, we use GitHub issues to trace bugs or discuss plans of Ant Design Vue. So, please don't ask usage questions here. You can try to open a new discussion in [antdv discussions](https://github.com/vueComponent/ant-design-vue/discussions), select `Q&A` to ask questions, also can ask questions on [Stack Overflow](http://stackoverflow.com/questions/) or [Segment Fault](https://segmentfault.com).
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }},Ant Design Vue Issue 板块是用于 bug 反馈与需求讨论的地方。请勿询问如何使用的问题,你可以试着在 [antdv discussions](https://github.com/vueComponent/ant-design-vue/discussions) 新开一个 discussion,选择 `Q&A` 类别进行提问,也可以在 [Stack Overflow](http://stackoverflow.com/questions/) 或者 [Segment Fault](https://segmentfault.com/) 中提问。
|
||||||
|
|
||||||
|
- name: 1.x
|
||||||
|
if: github.event.label.name == '1.x'
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment,close-issue'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Hi @${{ github.event.issue.user.login }}. Current version (1.x) is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed.
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }},当前版本(1.x)已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。
|
||||||
|
|
||||||
|
- name: 2.x
|
||||||
|
if: github.event.label.name == '2.x'
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment,close-issue'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Hi @${{ github.event.issue.user.login }}. Current version (2.x) is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed.
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }},当前版本(2.x)已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: Issue Open Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-open-check:
|
||||||
|
permissions:
|
||||||
|
contents: read # for visiky/dingtalk-release-notify to get latest release
|
||||||
|
issues: write # for actions-cool/issues-helper to update issues
|
||||||
|
pull-requests: write # for actions-cool/issues-helper to update PRs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions-cool/check-user-permission@v1.0.0
|
||||||
|
id: checkUser
|
||||||
|
with:
|
||||||
|
require: 'write'
|
||||||
|
|
||||||
|
- name: check invalid
|
||||||
|
if: (contains(github.event.issue.body, 'issue-helper') == false) && (steps.checkUser.outputs.result == 'false')
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'create-comment,add-labels,close-issue'
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
labels: 'Invalid'
|
||||||
|
body: |
|
||||||
|
Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](https://vuecomponent.github.io/issue-helper/) to create an issue, thank you!
|
||||||
|
|
||||||
|
你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](https://vuecomponent.github.io/issue-helper/) 来创建 issue 以方便我们定位错误。谢谢配合!
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: "Close stale issues"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "30 1 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
||||||
|
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
||||||
|
exempt-issue-labels: 'bug,enhancement'
|
||||||
|
days-before-stale: 60
|
||||||
|
days-before-close: 7
|
||||||
|
|
|
@ -10,13 +10,13 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: cache package-lock.json
|
- name: cache package-lock.json
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: package-temp-dir
|
path: package-temp-dir
|
||||||
key: lock-${{ github.sha }}
|
key: lock-${{ github.sha }}
|
||||||
|
|
||||||
- name: create package-lock.json
|
- name: create package-lock.json
|
||||||
run: npm i --package-lock-only
|
run: npm i --package-lock-only --ignore-scripts
|
||||||
|
|
||||||
- name: hack for singe file
|
- name: hack for singe file
|
||||||
run: |
|
run: |
|
||||||
|
@ -27,7 +27,7 @@ jobs:
|
||||||
|
|
||||||
- name: cache node_modules
|
- name: cache node_modules
|
||||||
id: node_modules_cache_id
|
id: node_modules_cache_id
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||||
|
@ -43,25 +43,25 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: restore cache from package-lock.json
|
- name: restore cache from package-lock.json
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: package-temp-dir
|
path: package-temp-dir
|
||||||
key: lock-${{ github.sha }}
|
key: lock-${{ github.sha }}
|
||||||
|
|
||||||
- name: restore cache from node_modules
|
- name: restore cache from node_modules
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||||
|
|
||||||
- name: cache lib
|
- name: cache lib
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: lib
|
path: lib
|
||||||
key: lib-${{ github.sha }}
|
key: lib-${{ github.sha }}
|
||||||
|
|
||||||
- name: cache es
|
- name: cache es
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: es
|
path: es
|
||||||
key: es-${{ github.sha }}
|
key: es-${{ github.sha }}
|
||||||
|
@ -77,13 +77,13 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: restore cache from package-lock.json
|
- name: restore cache from package-lock.json
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: package-temp-dir
|
path: package-temp-dir
|
||||||
key: lock-${{ github.sha }}
|
key: lock-${{ github.sha }}
|
||||||
|
|
||||||
- name: restore cache from node_modules
|
- name: restore cache from node_modules
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||||
|
@ -97,25 +97,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
|
||||||
|
|
||||||
- name: Checkout submodules
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: tangjinzhou/antdv-demo
|
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
|
||||||
path: antdv-demo
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: restore cache from package-lock.json
|
- name: restore cache from package-lock.json
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: package-temp-dir
|
path: package-temp-dir
|
||||||
key: lock-${{ github.sha }}
|
key: lock-${{ github.sha }}
|
||||||
|
|
||||||
- name: restore cache from node_modules
|
- name: restore cache from node_modules
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||||
|
|
|
@ -36,9 +36,6 @@ build/Release
|
||||||
node_modules/
|
node_modules/
|
||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
# Typescript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# Optional npm cache directory
|
# Optional npm cache directory
|
||||||
.npm
|
.npm
|
||||||
|
|
||||||
|
@ -62,9 +59,11 @@ typings/
|
||||||
dist
|
dist
|
||||||
lib
|
lib
|
||||||
es
|
es
|
||||||
|
/locale
|
||||||
_site
|
_site
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
pnpm-lock.yaml
|
||||||
/coverage
|
/coverage
|
||||||
|
|
||||||
# 备份文件
|
# 备份文件
|
||||||
|
@ -72,3 +71,16 @@ package-lock.json
|
||||||
list.txt
|
list.txt
|
||||||
|
|
||||||
site/dev.js
|
site/dev.js
|
||||||
|
|
||||||
|
# IDE 语法提示临时文件
|
||||||
|
vetur/
|
||||||
|
|
||||||
|
report.html
|
||||||
|
|
||||||
|
site/src/router/demoRoutes.js
|
||||||
|
|
||||||
|
components/version/version.ts
|
||||||
|
components/version/version.tsx
|
||||||
|
components/version/token.json
|
||||||
|
components/version/token-meta.json
|
||||||
|
~component-api.json
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[submodule "antdv-demo"]
|
|
||||||
path = antdv-demo
|
|
||||||
url = git@github.com:tangjinzhou/antdv-demo.git
|
|
|
@ -0,0 +1 @@
|
||||||
|
_
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install pretty-quick --staged
|
49
.jest.js
49
.jest.js
|
@ -2,42 +2,59 @@ const libDir = process.env.LIB_DIR;
|
||||||
|
|
||||||
const transformIgnorePatterns = [
|
const transformIgnorePatterns = [
|
||||||
'/dist/',
|
'/dist/',
|
||||||
'node_modules/[^/]+?/(?!(es|node_modules)/)', // Ignore modules without es dir
|
// Ignore modules without es dir.
|
||||||
|
// Update: @babel/runtime should also be transformed
|
||||||
|
// 'node_modules/(?!.*(@babel|lodash-es))',
|
||||||
|
'node_modules/(?!@ant-design/icons-vue|@ant-design/icons-svg|lodash-es)/',
|
||||||
];
|
];
|
||||||
|
const testPathIgnorePatterns = ['/node_modules/', 'node'];
|
||||||
|
|
||||||
|
function getTestRegex(libDir) {
|
||||||
|
if (libDir === 'dist') {
|
||||||
|
return 'demo\\.test\\.js$';
|
||||||
|
}
|
||||||
|
return '.*\\.test\\.(j|t)sx?$';
|
||||||
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
testURL: 'http://localhost/',
|
verbose: true,
|
||||||
setupFiles: ['./tests/setup.js'],
|
setupFiles: ['./tests/setup.js'],
|
||||||
moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'md', 'jpg'],
|
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
|
||||||
|
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'vue', 'md', 'jpg'],
|
||||||
modulePathIgnorePatterns: ['/_site/'],
|
modulePathIgnorePatterns: ['/_site/'],
|
||||||
testPathIgnorePatterns: ['/node_modules/', 'node'],
|
testPathIgnorePatterns: testPathIgnorePatterns,
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.(vue|md)$': '<rootDir>/node_modules/vue-jest',
|
'\\.(vue|md)$': '<rootDir>/node_modules/@vue/vue3-jest',
|
||||||
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
|
'\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
|
||||||
'^.+\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
|
'\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest',
|
||||||
|
'\\.svg$': '<rootDir>/node_modules/jest-transform-stub',
|
||||||
},
|
},
|
||||||
testRegex: libDir === 'dist' ? 'demo\\.test\\.js$' : '.*\\.test\\.js$',
|
testRegex: getTestRegex(libDir),
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^@/(.*)$': '<rootDir>/$1',
|
'^@/(.*)$/': '<rootDir>/$1',
|
||||||
'ant-design-vue$': '<rootDir>/components/index.js',
|
'^ant-design-vue$': '<rootDir>/components/index',
|
||||||
'ant-design-vue/es': '<rootDir>/components',
|
'^ant-design-vue/es/(.*)$': '<rootDir>/components/$1',
|
||||||
},
|
},
|
||||||
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
|
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
|
||||||
collectCoverage: process.env.COVERAGE === 'true',
|
collectCoverage: process.env.COVERAGE === 'true',
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
'components/**/*.{js,jsx,vue}',
|
'components/**/*.{js,jsx,vue}',
|
||||||
'!components/*/style/index.{js,jsx}',
|
|
||||||
'!components/style/*.{js,jsx}',
|
|
||||||
'!components/*/locale/*.{js,jsx}',
|
|
||||||
'!components/*/__tests__/**/type.{js,jsx}',
|
'!components/*/__tests__/**/type.{js,jsx}',
|
||||||
'!components/vc-*/**/*',
|
'!components/vc-*/**/*',
|
||||||
'!components/*/demo/**/*',
|
'!components/*/demo/**/*',
|
||||||
'!components/_util/**/*',
|
'!components/_util/**/*',
|
||||||
'!components/align/**/*',
|
'!components/align/**/*',
|
||||||
'!components/trigger/**/*',
|
'!components/trigger/**/*',
|
||||||
'!components/style.js',
|
|
||||||
'!**/node_modules/**',
|
'!**/node_modules/**',
|
||||||
],
|
],
|
||||||
testEnvironment: 'jest-environment-jsdom-fifteen',
|
testEnvironment: 'jsdom',
|
||||||
|
testEnvironmentOptions: {
|
||||||
|
url: 'http://localhost',
|
||||||
|
customExportConditions: ['node', 'node-addons'],
|
||||||
|
},
|
||||||
transformIgnorePatterns,
|
transformIgnorePatterns,
|
||||||
|
globals: {
|
||||||
|
'ts-jest': {
|
||||||
|
babelConfig: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,6 @@ yarn-error.log
|
||||||
.editorconfig
|
.editorconfig
|
||||||
.eslintignore
|
.eslintignore
|
||||||
**/*.yml
|
**/*.yml
|
||||||
components/style/color/*.less
|
|
||||||
**/assets
|
**/assets
|
||||||
.gitattributes
|
.gitattributes
|
||||||
.stylelintrc
|
.stylelintrc
|
||||||
|
@ -28,4 +27,5 @@ components/style/color/*.less
|
||||||
.huskyrc
|
.huskyrc
|
||||||
.gitmodules
|
.gitmodules
|
||||||
*.png
|
*.png
|
||||||
|
v2-doc/
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
{
|
{
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
|
"endOfLine": "lf",
|
||||||
"printWidth": 100,
|
"printWidth": 100,
|
||||||
"proseWrap": "never",
|
"proseWrap": "never",
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"htmlWhitespaceSensitivity": "ignore",
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ".prettierrc",
|
"files": ".prettierrc",
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"stylelint-config-standard",
|
||||||
|
"stylelint-config-rational-order",
|
||||||
|
"stylelint-config-prettier"
|
||||||
|
],
|
||||||
|
"customSyntax": "postcss-less",
|
||||||
|
"plugins": ["stylelint-declaration-block-no-ignored-properties"],
|
||||||
|
"rules": {
|
||||||
|
"function-name-case": ["lower"],
|
||||||
|
"function-no-unknown": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"ignoreFunctions": [
|
||||||
|
"fade",
|
||||||
|
"fadeout",
|
||||||
|
"tint",
|
||||||
|
"darken",
|
||||||
|
"ceil",
|
||||||
|
"fadein",
|
||||||
|
"floor",
|
||||||
|
"unit",
|
||||||
|
"shade",
|
||||||
|
"lighten",
|
||||||
|
"percentage",
|
||||||
|
"-"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"import-notation": null,
|
||||||
|
"no-descending-specificity": null,
|
||||||
|
"no-invalid-position-at-import-rule": null,
|
||||||
|
"declaration-empty-line-before": null,
|
||||||
|
"keyframes-name-pattern": null,
|
||||||
|
"custom-property-pattern": null,
|
||||||
|
"number-max-precision": 8,
|
||||||
|
"alpha-value-notation": "number",
|
||||||
|
"color-function-notation": "legacy",
|
||||||
|
"selector-class-pattern": null,
|
||||||
|
"selector-id-pattern": null,
|
||||||
|
"selector-not-notation": null
|
||||||
|
}
|
||||||
|
}
|
5
.vcmrc
5
.vcmrc
|
@ -9,8 +9,9 @@
|
||||||
"perf",
|
"perf",
|
||||||
"test",
|
"test",
|
||||||
"chore",
|
"chore",
|
||||||
"revert"
|
"revert",
|
||||||
|
"ci"
|
||||||
],
|
],
|
||||||
"warnOnFail": false,
|
"warnOnFail": false,
|
||||||
"autoFix": false
|
"autoFix": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
<h2 align="center">Backers</h2>
|
<h2 align="center">Backers</h2>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
<a href="https://github.com/chuzhixin/vue-admin-beautiful" target="_blank"><img width="64" style="border-radius: 50%;" src="https://gitee.com/chu1204505056/image/raw/master/vue-admin-beautiful.png" title="vue-admin-beautiful"></a>
|
||||||
<a href="https://github.com/limichange" target="_blank"><img width="64" style="border-radius: 50%;" src="https://avatars0.githubusercontent.com/u/1947344?s=400&v=4" title="limichange donation total 24$ by qq from 2018.9"></a>
|
<a href="https://github.com/limichange" target="_blank"><img width="64" style="border-radius: 50%;" src="https://avatars0.githubusercontent.com/u/1947344?s=400&v=4" title="limichange donation total 24$ by qq from 2018.9"></a>
|
||||||
<a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a>
|
<a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a>
|
<a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a>
|
||||||
|
|
1199
CHANGELOG.en-US.md
1199
CHANGELOG.en-US.md
File diff suppressed because it is too large
Load Diff
1203
CHANGELOG.zh-CN.md
1203
CHANGELOG.zh-CN.md
File diff suppressed because it is too large
Load Diff
22
LICENSE
22
LICENSE
|
@ -44,3 +44,25 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://www.antdv.com/">
|
<a href="https://www.antdv.com/">
|
||||||
<img width="200" src="https://qn.antdv.com/logo.png">
|
<img width="200" src="https://aliyuncdn.antdv.com/logo.png">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
An enterprise-class UI components based on Ant Design and Vue.
|
基于 Ant Design 和 Vue 3 的企业级 UI 组件库。
|
||||||
|
|
||||||
 [](https://codecov.io/gh/vueComponent/ant-design-vue) [](https://www.npmjs.org/package/ant-design-vue) [](http://www.npmtrends.com/ant-design-vue) [](https://gitter.im/vueComponent/ant-design-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) (English) [](https://gitter.im/vueComponent/ant-design-vue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)(中文) [](#backers) [](#sponsors) [](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper)
|
 [](https://codecov.io/gh/vueComponent/ant-design-vue) [](https://www.npmjs.org/package/ant-design-vue) [](http://www.npmtrends.com/ant-design-vue) [](#backers) [](#sponsors) [](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) [](https://github.com/actions-cool/issues-helper)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,36 +20,28 @@ An enterprise-class UI components based on Ant Design and Vue.
|
||||||
|
|
||||||
[English](./README.md) | 简体中文
|
[English](./README.md) | 简体中文
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<b>Special thanks to the generous sponsorship by:</b>
|
|
||||||
</p>
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td align="center" valign="middle">
|
|
||||||
<a href="https://tipe.io/?ref=ant-design-vue" target="_blank">
|
|
||||||
<img width="120px" src="https://user-images.githubusercontent.com/1016365/34124854-48fafa06-e3e9-11e7-8c04-251055feebee.png">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## 特性
|
## 特性
|
||||||
|
|
||||||
- 提炼自企业级中后台产品的交互语言和视觉风格。
|
- 提炼自企业级中后台产品的交互语言和视觉风格。
|
||||||
- 开箱即用的高质量 Vue 组件。
|
- 开箱即用的高质量 Vue 组件。
|
||||||
- 共享 [Ant Design of React](http://ant-design.gitee.io/docs/spec/introduce-cn) 设计工具体系。
|
- 共享 [Ant Design of React](http://ant-design.gitee.io/docs/spec/introduce-cn) 设计工具体系。
|
||||||
|
|
||||||
|
## 关注我们
|
||||||
|
|
||||||
|
收藏加关注,第一时间获取更新动态!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 支持环境
|
## 支持环境
|
||||||
|
|
||||||
- 现代浏览器和 IE9 及以上(需要 [polyfills](https://www.antdv.com/docs/vue/getting-started-cn/#兼容性))。
|
- 现代浏览器。1.x 版本支持 IE 9+(需要 [polyfills](https://www.antdv.com/docs/vue/getting-started-cn/#兼容性))
|
||||||
- 支持服务端渲染。
|
- 支持服务端渲染。
|
||||||
- [Electron](https://electronjs.org/)
|
- [Electron](https://electronjs.org/)
|
||||||
|
- 支持 Vue 2 和 Vue 3
|
||||||
|
|
||||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| IE9, IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
|
@ -79,6 +71,9 @@ $ yarn add ant-design-vue
|
||||||
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | ant-design-vue 的 vscode 扩展 |
|
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | ant-design-vue 的 vscode 扩展 |
|
||||||
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | 使用 vue-cli3 快速使用 ant-design-vue 组件库 |
|
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | 使用 vue-cli3 快速使用 ant-design-vue 组件库 |
|
||||||
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | 在 DOM 模板中,您可以使用 ant-design-vue 组件的自定义事件(camelCase) |
|
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | 在 DOM 模板中,您可以使用 ant-design-vue 组件的自定义事件(camelCase) |
|
||||||
|
| [@formily/antdv](https://github.com/formilyjs/antdv) | 这是一个结合了 Formily 和 ant-design-vue 的组件库 |
|
||||||
|
| [@ant-design-vue/nuxt](https://github.com/vueComponent/ant-design-vue-nuxt) | ant-design-vue 的 nuxt 模块扩展 |
|
||||||
|
| [ant-design-x-vue](https://github.com/wzc520pyfm/ant-design-x-vue) | 基于 Ant Design X 设计规范的 Vue AI 界面解决方案 |
|
||||||
|
|
||||||
## 问答
|
## 问答
|
||||||
|
|
||||||
|
@ -93,24 +88,33 @@ ant-design-vue 是 MIT 协议的开源项目。为了项目能够更好的持续
|
||||||
- [Patreon](https://www.patreon.com/tangjinzhou)
|
- [Patreon](https://www.patreon.com/tangjinzhou)
|
||||||
- [opencollective](https://opencollective.com/ant-design-vue)
|
- [opencollective](https://opencollective.com/ant-design-vue)
|
||||||
- [paypal](https://www.paypal.me/tangjinzhou)
|
- [paypal](https://www.paypal.me/tangjinzhou)
|
||||||
- [支付宝或微信](https://qn.antdv.com/alipay-and-wechat.png)
|
- [支付宝或微信](https://aliyuncdn.antdv.com/alipay-and-wechat.png)
|
||||||
|
- ETH: 0x30cc48515d8ae9fefa20ab87226ad7e8ab9c3bc2
|
||||||
|
|
||||||
## Sponsors
|
## 赞助商
|
||||||
|
|
||||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)]
|
成为赞助商,并在 Github 上的自述文件上获得您的徽标,并链接到您的网站。 [[成为赞助商](https://opencollective.com/ant-design-vue#sponsor)]
|
||||||
|
|
||||||
<a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
|
<a href="http://www.jeecg.com/" target="_blank"><img src="https://aliyuncdn.antdv.com/jeecg-logo.png" height="64"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
|
||||||
|
|
||||||
## Backers
|
## 支持者
|
||||||
|
|
||||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/ant-design-vue#backer)]
|
每月捐款支持我们,帮助我们继续我们的活动。 [[成为支持者](https://opencollective.com/ant-design-vue#backer)]
|
||||||
|
|
||||||
<a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a>
|
<a href="https://github.com/chuzhixin/vue-admin-beautiful" target="_blank"><img width="64" style="border-radius: 50%;" src="https://gitee.com/chu1204505056/image/raw/master/vue-admin-beautiful.png" title="vue-admin-beautiful"></a> <a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a>
|
||||||
|
|
||||||
## Patreon
|
## Patreon
|
||||||
|
|
||||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://www.patreon.com/tangjinzhou)]
|
每月捐款支持我们,帮助我们继续我们的活动。 [[成为支持者](https://www.patreon.com/tangjinzhou)]
|
||||||
|
|
||||||
<a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a>
|
<a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a>
|
||||||
|
|
||||||
## [更多赞助者 (通过 Patreon、支付宝、微信、paypal 等等)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
|
## [更多赞助者 (通过 Patreon、支付宝、微信、paypal 等等)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
|
||||||
|
|
||||||
|
## 贡献者
|
||||||
|
|
||||||
|
感谢所有为 ant-design-vue 做出贡献的人!
|
||||||
|
|
||||||
|
<a href="https://github.com/vueComponent/ant-design-vue/graphs/contributors">
|
||||||
|
<img src="https://contrib.rocks/image?repo=vueComponent/ant-design-vue&max=100&columns=15" />
|
||||||
|
</a>
|
||||||
|
|
64
README.md
64
README.md
|
@ -1,6 +1,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://www.antdv.com/">
|
<a href="https://www.antdv.com/">
|
||||||
<img width="200" src="https://qn.antdv.com/logo.png">
|
<img width="200" src="https://aliyuncdn.antdv.com/logo.png">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
An enterprise-class UI components based on Ant Design and Vue.
|
An enterprise-class UI components based on Ant Design and Vue.
|
||||||
|
|
||||||
 [](https://codecov.io/gh/vueComponent/ant-design-vue) [](https://www.npmjs.org/package/ant-design-vue) [](http://www.npmtrends.com/ant-design-vue) [](https://gitter.im/vueComponent/ant-design-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) (English) [](https://gitter.im/vueComponent/ant-design-vue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)(中文) [](#backers) [](#sponsors) [](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper)
|
 [](https://codecov.io/gh/vueComponent/ant-design-vue) [](https://www.npmjs.org/package/ant-design-vue) [](http://www.npmtrends.com/ant-design-vue) [](#backers) [](#sponsors) [](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) [](https://github.com/actions-cool/issues-helper)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,40 +20,32 @@ An enterprise-class UI components based on Ant Design and Vue.
|
||||||
|
|
||||||
English | [简体中文](./README-zh_CN.md)
|
English | [简体中文](./README-zh_CN.md)
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<b>Special thanks to the generous sponsorship by:</b>
|
|
||||||
</p>
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td align="center" valign="middle">
|
|
||||||
<a href="https://tipe.io/?ref=ant-design-vue" target="_blank">
|
|
||||||
<img width="120px" src="https://user-images.githubusercontent.com/1016365/34124854-48fafa06-e3e9-11e7-8c04-251055feebee.png">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- An enterprise-class UI design system for desktop applications.
|
- An enterprise-class UI design system for desktop applications.
|
||||||
- A set of high-quality Vue components out of the box.
|
- A set of high-quality Vue components out of the box.
|
||||||
- Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
|
- Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
|
||||||
|
|
||||||
|
## Getting started & staying tuned with us.
|
||||||
|
|
||||||
|
Star us, and you will receive all releases notifications from GitHub without any delay!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Environment Support
|
## Environment Support
|
||||||
|
|
||||||
- Modern browsers and Internet Explorer 9+ (with [polyfills](https://www.antdv.com/docs/vue/getting-started/#Compatibility))
|
- Modern browsers. v1.x support Internet Explorer 9+ (with [polyfills](https://www.antdv.com/docs/vue/getting-started/#compatibility))
|
||||||
- Server-side Rendering
|
- Server-side Rendering
|
||||||
|
- Support Vue 2 & Vue 3
|
||||||
- [Electron](https://electronjs.org/)
|
- [Electron](https://electronjs.org/)
|
||||||
|
|
||||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| IE9, IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
||||||
|
|
||||||
## Using npm or yarn
|
## Using npm or yarn
|
||||||
|
|
||||||
**We recommend using npm or yarn to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
|
**We recommend using npm or yarn to install**, it not only makes development easier, but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install ant-design-vue --save
|
$ npm install ant-design-vue --save
|
||||||
|
@ -63,7 +55,7 @@ $ npm install ant-design-vue --save
|
||||||
$ yarn add ant-design-vue
|
$ yarn add ant-design-vue
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are in a bad network environment,you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
|
If you are in a bad network environment, you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
|
@ -79,6 +71,9 @@ If you are in a bad network environment,you can try other registries and tools
|
||||||
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | A vscode extension for ant-design-vue |
|
| [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) | A vscode extension for ant-design-vue |
|
||||||
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | Vue-cli 3 plugin to add ant-design-vue |
|
| [vue-cli-plugin-ant-design](https://github.com/vueComponent/vue-cli-plugin-ant-design) | Vue-cli 3 plugin to add ant-design-vue |
|
||||||
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase) |
|
| [vue-dash-event](https://github.com/vueComponent/vue-dash-event) | The library function, implemented in the DOM template, can use the custom event of the ant-design-vue component (camelCase) |
|
||||||
|
| [@formily/antdv](https://github.com/formilyjs/antdv) | The Library with Formily and ant-design-vue |
|
||||||
|
| [@ant-design-vue/nuxt](https://github.com/vueComponent/ant-design-vue-nuxt) | A nuxt module for ant-design-vue |
|
||||||
|
| [ant-design-x-vue](https://github.com/wzc520pyfm/ant-design-x-vue) | A Vue AI interface solutions base on the Ant Design X design specification |
|
||||||
|
|
||||||
## Donation
|
## Donation
|
||||||
|
|
||||||
|
@ -87,26 +82,25 @@ ant-design-vue is an MIT-licensed open source project. In order to achieve bette
|
||||||
- [Patreon](https://www.patreon.com/tangjinzhou)
|
- [Patreon](https://www.patreon.com/tangjinzhou)
|
||||||
- [opencollective](https://opencollective.com/ant-design-vue)
|
- [opencollective](https://opencollective.com/ant-design-vue)
|
||||||
- [paypal](https://www.paypal.me/tangjinzhou)
|
- [paypal](https://www.paypal.me/tangjinzhou)
|
||||||
- [支付宝或微信](https://qn.antdv.com/alipay-and-wechat.png)
|
- [支付宝或微信](https://aliyuncdn.antdv.com/alipay-and-wechat.png)
|
||||||
|
- ETH: 0x30cc48515d8ae9fefa20ab87226ad7e8ab9c3bc2
|
||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)]
|
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/ant-design-vue#sponsor)]
|
||||||
|
|
||||||
<a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
|
<a href="http://www.jeecg.com/" target="_blank"><img src="https://aliyuncdn.antdv.com/jeecg-logo.png" height="64"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/sponsor/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/sponsor/10/avatar.svg"></a>
|
||||||
|
|
||||||
## Backers
|
|
||||||
|
|
||||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/ant-design-vue#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/ant-design-vue/backer/0/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/0/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/1/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/1/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/2/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/2/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/3/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/3/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/4/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/4/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/5/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/5/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/6/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/6/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/7/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/7/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/8/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/8/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a> <a href="https://opencollective.com/ant-design-vue/backer/10/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/10/avatar.svg"></a><a href="https://opencollective.com/ant-design-vue/backer/9/website" target="_blank"><img src="https://opencollective.com/ant-design-vue/backer/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
## Patreon
|
|
||||||
|
|
||||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://www.patreon.com/tangjinzhou)]
|
|
||||||
|
|
||||||
<a href="https://www.mokeyjay.com" target="_blank"><img width="64" style="border-radius: 50%;" src="https://www.mokeyjay.com/headimg.png" title="donation by Patreon"></a>
|
|
||||||
|
|
||||||
## [More Sponsor (From Patreon、alipay、wechat、paypal...)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
|
## [More Sponsor (From Patreon、alipay、wechat、paypal...)](https://github.com/vueComponent/ant-design-vue/blob/master/BACKERS.md)
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
Thank you to all the people who already contributed to ant-design-vue!
|
||||||
|
|
||||||
|
<a href="https://github.com/vueComponent/ant-design-vue/graphs/contributors">
|
||||||
|
<img src="https://contrib.rocks/image?repo=vueComponent/ant-design-vue&max=100&columns=15" />
|
||||||
|
</a>
|
||||||
|
|
||||||
[](https://issuehunt.io/repos/104172832)
|
[](https://issuehunt.io/repos/104172832)
|
||||||
|
|
||||||
|
This project is tested with BrowserStack.
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
Use this section to tell people about which versions of your project are currently being supported with security updates.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 1.x | :white_check_mark: |
|
||||||
|
| 2.x | :x: |
|
||||||
|
| 3.x | :white_check_mark: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Use this section to tell people how to report a vulnerability.
|
||||||
|
|
||||||
|
Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc.
|
|
@ -0,0 +1,68 @@
|
||||||
|
// Read all the api from current documents
|
||||||
|
|
||||||
|
const glob = require('glob');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const COMPONENT_NAME = /components\/([^/]*)/;
|
||||||
|
const PROP_NAME = /^\s*\|\s*([^\s|]*)/;
|
||||||
|
|
||||||
|
const components = {};
|
||||||
|
|
||||||
|
function mappingPropLine(component, line) {
|
||||||
|
const propMatch = line.match(PROP_NAME);
|
||||||
|
if (!propMatch) return;
|
||||||
|
|
||||||
|
const propName = propMatch[1];
|
||||||
|
if (!/^[a-z]/.test(propName)) return;
|
||||||
|
|
||||||
|
components[component] = Array.from(new Set([...(components[component] || []), propName]));
|
||||||
|
}
|
||||||
|
|
||||||
|
function apiReport(entities) {
|
||||||
|
const apis = {};
|
||||||
|
Object.keys(entities).forEach(component => {
|
||||||
|
const apiList = entities[component];
|
||||||
|
apiList.forEach(api => {
|
||||||
|
if (typeof apis[api] === 'function') {
|
||||||
|
apis[api] = [];
|
||||||
|
}
|
||||||
|
apis[api] = [...(apis[api] || []), component];
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return apis;
|
||||||
|
}
|
||||||
|
|
||||||
|
function printReport(apis) {
|
||||||
|
const apiList = Object.keys(apis).map(api => ({
|
||||||
|
name: api,
|
||||||
|
componentList: apis[api],
|
||||||
|
}));
|
||||||
|
apiList.sort((a, b) => b.componentList.length - a.componentList.length);
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log('| name | components | comments |');
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log('| ---- | ---------- | -------- |');
|
||||||
|
apiList.forEach(({ name, componentList }) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log('|', name, '|', componentList.join(', '), '| |');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = () => {
|
||||||
|
glob('components/*/*.md', (error, files) => {
|
||||||
|
files.forEach(filePath => {
|
||||||
|
// Read md file to parse content
|
||||||
|
const content = fs.readFileSync(filePath, 'utf8');
|
||||||
|
const component = filePath.match(COMPONENT_NAME)[1];
|
||||||
|
|
||||||
|
// Parse lines to get API
|
||||||
|
const lines = content.split(/[\r\n]+/);
|
||||||
|
lines.forEach(line => {
|
||||||
|
mappingPropLine(component, line);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
printReport(apiReport(components));
|
||||||
|
});
|
||||||
|
};
|
|
@ -3,7 +3,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('colorful').colorful();
|
require('colorful').colorful();
|
||||||
require('colorful').isatty = true;
|
|
||||||
|
|
||||||
const program = require('commander');
|
const program = require('commander');
|
||||||
const packageInfo = require('../../package.json');
|
const packageInfo = require('../../package.json');
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('colorful').colorful();
|
require('colorful').colorful();
|
||||||
require('colorful').isatty = true;
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const program = require('commander');
|
const program = require('commander');
|
||||||
|
|
||||||
|
program.option('-c --npm-tag <type>', 'add --npm-tag=xxx');
|
||||||
|
|
||||||
program.on('--help', () => {
|
program.on('--help', () => {
|
||||||
console.log(' Usage:'.to.bold.blue.color);
|
console.log(' Usage:'.to.bold.blue.color);
|
||||||
console.log();
|
console.log();
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
fork github.com/youzan/vant packages/generator-types
|
|
@ -0,0 +1,23 @@
|
||||||
|
const path = require('path');
|
||||||
|
const pkg = require('../../package.json');
|
||||||
|
const { parseAndWrite } = require('./lib/index.js');
|
||||||
|
const rootPath = path.resolve(__dirname, '../../');
|
||||||
|
|
||||||
|
parseAndWrite({
|
||||||
|
version: pkg.version,
|
||||||
|
name: 'ant-design-vue',
|
||||||
|
path: path.resolve(rootPath, './components'),
|
||||||
|
typingsPath: path.resolve(rootPath, './typings/global.d.ts'),
|
||||||
|
// default match lang
|
||||||
|
test: /en-US\.md/,
|
||||||
|
outputDir: path.resolve(rootPath, './vetur'),
|
||||||
|
tagPrefix: 'a-',
|
||||||
|
})
|
||||||
|
.then(result => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(`generator types success: ${result} tags generated`);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('generator types error', error);
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
|
@ -0,0 +1,128 @@
|
||||||
|
import type { Articals } from './parser';
|
||||||
|
import { formatType, removeVersion, toKebabCase } from './utils';
|
||||||
|
import type { VueTag } from './type';
|
||||||
|
|
||||||
|
function getComponentName(name: string, tagPrefix: string) {
|
||||||
|
if (name) {
|
||||||
|
return tagPrefix + toKebabCase(name.split(' ')[0]);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function parserProps(tag: VueTag, line: any) {
|
||||||
|
const [name, desc, type, defaultVal] = line;
|
||||||
|
if (
|
||||||
|
type &&
|
||||||
|
(type.includes('v-slot') ||
|
||||||
|
type.includes('slot') ||
|
||||||
|
type.includes('slots') ||
|
||||||
|
type.includes('slot-scoped'))
|
||||||
|
) {
|
||||||
|
tag.slots!.push({
|
||||||
|
name: removeVersion(name),
|
||||||
|
description: desc,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
tag.attributes!.push({
|
||||||
|
name: removeVersion(name),
|
||||||
|
default: defaultVal,
|
||||||
|
description: desc,
|
||||||
|
value: {
|
||||||
|
type: formatType(type || ''),
|
||||||
|
kind: 'expression',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatter(
|
||||||
|
articals: Articals,
|
||||||
|
componentName: string,
|
||||||
|
kebabComponentName: string,
|
||||||
|
tagPrefix = '',
|
||||||
|
) {
|
||||||
|
if (!articals.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const tags: VueTag[] = [];
|
||||||
|
const tag: VueTag = {
|
||||||
|
name: kebabComponentName,
|
||||||
|
slots: [],
|
||||||
|
events: [],
|
||||||
|
attributes: [],
|
||||||
|
};
|
||||||
|
tags.push(tag);
|
||||||
|
|
||||||
|
const tables = articals.filter(artical => artical.type === 'table');
|
||||||
|
|
||||||
|
tables.forEach(item => {
|
||||||
|
const { table } = item;
|
||||||
|
const prevIndex = articals.indexOf(item) - 1;
|
||||||
|
const prevArtical = articals[prevIndex];
|
||||||
|
|
||||||
|
if (!prevArtical || !prevArtical.content || !table || !table.body) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const tableTitle = prevArtical.content;
|
||||||
|
|
||||||
|
if (tableTitle.includes('API')) {
|
||||||
|
table.body.forEach(line => {
|
||||||
|
parserProps(tag, line);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tableTitle.includes('events') && !tableTitle.includes(componentName)) {
|
||||||
|
table.body.forEach(line => {
|
||||||
|
const [name, desc] = line;
|
||||||
|
tag.events!.push({
|
||||||
|
name: removeVersion(name),
|
||||||
|
description: desc,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 额外的子组件
|
||||||
|
if (
|
||||||
|
tableTitle.includes(componentName) &&
|
||||||
|
!tableTitle.includes('events') &&
|
||||||
|
!tableTitle.includes('()')
|
||||||
|
) {
|
||||||
|
const childTag: VueTag = {
|
||||||
|
name: getComponentName(tableTitle.replace(/\.|\//g, ''), tagPrefix),
|
||||||
|
slots: [],
|
||||||
|
events: [],
|
||||||
|
attributes: [],
|
||||||
|
};
|
||||||
|
table.body.forEach(line => {
|
||||||
|
parserProps(childTag, line);
|
||||||
|
});
|
||||||
|
tags.push(childTag);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 额外的子组件事件
|
||||||
|
if (tableTitle.includes(componentName) && tableTitle.includes('events')) {
|
||||||
|
const childTagName = getComponentName(
|
||||||
|
tableTitle.replace('.', '').replace('events', ''),
|
||||||
|
tagPrefix,
|
||||||
|
);
|
||||||
|
const childTag: VueTag | undefined = tags.find(item => item.name === childTagName.trim());
|
||||||
|
if (!childTag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
table.body.forEach(line => {
|
||||||
|
const [name, desc] = line;
|
||||||
|
childTag.events!.push({
|
||||||
|
name: removeVersion(name),
|
||||||
|
description: desc,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return tags;
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
import glob from 'fast-glob';
|
||||||
|
import { dirname, join } from 'path';
|
||||||
|
import { mdParser } from './parser';
|
||||||
|
import { formatter } from './formatter';
|
||||||
|
import { genWebTypes } from './web-types';
|
||||||
|
import { outputFileSync, readFileSync } from 'fs-extra';
|
||||||
|
import type { Options, VueTag } from './type';
|
||||||
|
import { getComponentName, normalizePath, toKebabCase } from './utils';
|
||||||
|
import { flatMap } from 'lodash';
|
||||||
|
|
||||||
|
async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
||||||
|
const mdPaths = await glob(normalizePath(`${options.path}/**/*.md`));
|
||||||
|
const data = mdPaths
|
||||||
|
.filter(md => options.test.test(md))
|
||||||
|
.map(path => {
|
||||||
|
const docPath = dirname(path);
|
||||||
|
const kebabComponentName =
|
||||||
|
options.tagPrefix + docPath.substring(docPath.lastIndexOf('/') + 1) || '';
|
||||||
|
const componentName = getComponentName(docPath.substring(docPath.lastIndexOf('/') + 1) || '');
|
||||||
|
const fileContent = readFileSync(path, 'utf-8');
|
||||||
|
return formatter(mdParser(fileContent), componentName, kebabComponentName, options.tagPrefix);
|
||||||
|
})
|
||||||
|
.filter(item => item) as VueTag[][];
|
||||||
|
const tags = new Map<String, VueTag>();
|
||||||
|
flatMap(data, item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
function readTypings(options: Options): Map<String, VueTag> {
|
||||||
|
const tags = new Map<String, VueTag>();
|
||||||
|
const fileContent = readFileSync(options.typingsPath, 'utf-8');
|
||||||
|
fileContent
|
||||||
|
.split('\n')
|
||||||
|
.filter(line => line && line.includes('typeof'))
|
||||||
|
.map(line => {
|
||||||
|
const l = line.trim();
|
||||||
|
return toKebabCase(l.substring(0, l.indexOf(':')));
|
||||||
|
})
|
||||||
|
.forEach(tagName =>
|
||||||
|
tags.set(tagName, {
|
||||||
|
name: tagName,
|
||||||
|
slots: [],
|
||||||
|
events: [],
|
||||||
|
attributes: [],
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeTag(tags: Map<String, VueTag>, mergedTag: VueTag) {
|
||||||
|
const tagName = mergedTag.name;
|
||||||
|
const vueTag = tags.get(tagName);
|
||||||
|
if (vueTag) {
|
||||||
|
vueTag.slots = [...vueTag.slots, ...mergedTag.slots];
|
||||||
|
vueTag.events = [...vueTag.events, ...mergedTag.events];
|
||||||
|
vueTag.attributes = [...vueTag.attributes, ...mergedTag.attributes];
|
||||||
|
} else {
|
||||||
|
tags.set(tagName, mergedTag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeTags(mergedTagsArr: Map<String, VueTag>[]): VueTag[] {
|
||||||
|
if (mergedTagsArr.length === 1) return [...mergedTagsArr[0].values()];
|
||||||
|
const tags = new Map<String, VueTag>();
|
||||||
|
if (mergedTagsArr.length === 0) return [];
|
||||||
|
mergedTagsArr.forEach(mergedTags => {
|
||||||
|
mergedTags.forEach(mergedTag => mergeTag(tags, mergedTag));
|
||||||
|
});
|
||||||
|
return [...tags.values()];
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function parseAndWrite(options: Options): Promise<Number> {
|
||||||
|
if (!options.outputDir) {
|
||||||
|
throw new Error('outputDir can not be empty.');
|
||||||
|
}
|
||||||
|
const tagsFromMarkdown = await readMarkdown(options);
|
||||||
|
const tagsFromTypings = await readTypings(options);
|
||||||
|
const tags = mergeTags([tagsFromMarkdown, tagsFromTypings]);
|
||||||
|
const webTypes = genWebTypes(tags, options);
|
||||||
|
outputFileSync(join(options.outputDir, 'web-types.json'), JSON.stringify(webTypes, null, 2));
|
||||||
|
return tags.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { parseAndWrite };
|
|
@ -0,0 +1,107 @@
|
||||||
|
/* eslint-disable no-cond-assign */
|
||||||
|
const TITLE_REG = /^(#+)\s+([^\n]*)/;
|
||||||
|
const TABLE_REG = /^\|.+\r?\n\|\s*-+/;
|
||||||
|
const TD_REG = /\s*`[^`]+`\s*|([^|`]+)/g;
|
||||||
|
const TABLE_SPLIT_LINE_REG = /^\|\s*-/;
|
||||||
|
|
||||||
|
type TableContent = {
|
||||||
|
head: string[];
|
||||||
|
body: string[][];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Artical = {
|
||||||
|
type: string;
|
||||||
|
content?: string;
|
||||||
|
table?: TableContent;
|
||||||
|
level?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Articals = Artical[];
|
||||||
|
|
||||||
|
function readLine(input: string) {
|
||||||
|
const end = input.indexOf('\n');
|
||||||
|
|
||||||
|
return input.substring(0, end !== -1 ? end : input.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
function splitTableLine(line: string) {
|
||||||
|
line = line.replace(/\\\|/g, 'JOIN');
|
||||||
|
|
||||||
|
const items = line.split('|').map(item => item.trim().replace(/JOIN/g, '|'));
|
||||||
|
|
||||||
|
// remove pipe character on both sides
|
||||||
|
items.pop();
|
||||||
|
items.shift();
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tableParse(input: string) {
|
||||||
|
let start = 0;
|
||||||
|
let isHead = true;
|
||||||
|
|
||||||
|
const end = input.length;
|
||||||
|
const table: TableContent = {
|
||||||
|
head: [],
|
||||||
|
body: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
while (start < end) {
|
||||||
|
const target = input.substring(start);
|
||||||
|
const line = readLine(target);
|
||||||
|
|
||||||
|
if (!/^\|/.test(target)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TABLE_SPLIT_LINE_REG.test(target)) {
|
||||||
|
isHead = false;
|
||||||
|
} else if (!isHead && line.includes('|')) {
|
||||||
|
const matched = line.trim().match(TD_REG);
|
||||||
|
|
||||||
|
if (matched) {
|
||||||
|
table.body.push(splitTableLine(line));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start += line.length + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
table,
|
||||||
|
usedLength: start,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mdParser(input: string): Articals {
|
||||||
|
const artical = [];
|
||||||
|
let start = 0;
|
||||||
|
const end = input.length;
|
||||||
|
|
||||||
|
while (start < end) {
|
||||||
|
const target = input.substring(start);
|
||||||
|
|
||||||
|
let match;
|
||||||
|
if ((match = TITLE_REG.exec(target))) {
|
||||||
|
artical.push({
|
||||||
|
type: 'title',
|
||||||
|
content: match[2].replace('\r', ''),
|
||||||
|
level: match[1].length,
|
||||||
|
});
|
||||||
|
|
||||||
|
start += match.index + match[0].length;
|
||||||
|
} else if ((match = TABLE_REG.exec(target))) {
|
||||||
|
const { table, usedLength } = tableParse(target.substring(match.index));
|
||||||
|
artical.push({
|
||||||
|
type: 'table',
|
||||||
|
table,
|
||||||
|
});
|
||||||
|
|
||||||
|
start += match.index + usedLength;
|
||||||
|
} else {
|
||||||
|
start += readLine(target).length + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return artical;
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
import type { PathLike } from 'fs';
|
||||||
|
|
||||||
|
export type VueSlot = {
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type VueEventArgument = {
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type VueEvent = {
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
arguments?: VueEventArgument[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type VueAttribute = {
|
||||||
|
name: string;
|
||||||
|
default: string;
|
||||||
|
description: string;
|
||||||
|
value: {
|
||||||
|
kind: 'expression';
|
||||||
|
type: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type VueTag = {
|
||||||
|
name: string;
|
||||||
|
slots: VueSlot[];
|
||||||
|
events: VueEvent[];
|
||||||
|
attributes: VueAttribute[];
|
||||||
|
description?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Options = {
|
||||||
|
name: string;
|
||||||
|
path: PathLike;
|
||||||
|
typingsPath: PathLike;
|
||||||
|
test: RegExp;
|
||||||
|
version: string;
|
||||||
|
outputDir?: string;
|
||||||
|
tagPrefix?: string;
|
||||||
|
};
|
|
@ -0,0 +1,30 @@
|
||||||
|
// myName -> my-name
|
||||||
|
export function toKebabCase(camel: string): string {
|
||||||
|
return camel.replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1').toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// name `v2.0.0` -> name
|
||||||
|
export function removeVersion(str: string) {
|
||||||
|
return str.replace(/`(\w|\.)+`/g, '').trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
// *boolean* -> boolean
|
||||||
|
// _boolean_ -> boolean
|
||||||
|
export function formatType(type: string) {
|
||||||
|
return type
|
||||||
|
.replace(/(^(\*|_))|((\*|_)$)/g, '')
|
||||||
|
.replace('\\', '')
|
||||||
|
.replace('\\', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getComponentName(name: string) {
|
||||||
|
const title = name
|
||||||
|
.split('-')
|
||||||
|
.map(it => it.substring(0, 1) + it.substring(1))
|
||||||
|
.join('');
|
||||||
|
return title.substring(0, 1).toUpperCase() + title.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizePath(path: string): string {
|
||||||
|
return path.replace(/\\/g, '/');
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
import type { VueTag, Options } from './type';
|
||||||
|
|
||||||
|
// create web-types.json to provide autocomplete in JetBrains IDEs
|
||||||
|
export function genWebTypes(tags: VueTag[], options: Options) {
|
||||||
|
return {
|
||||||
|
$schema: 'https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json',
|
||||||
|
framework: 'vue',
|
||||||
|
name: options.name,
|
||||||
|
version: options.version,
|
||||||
|
contributions: {
|
||||||
|
html: {
|
||||||
|
tags,
|
||||||
|
attributes: [],
|
||||||
|
'types-syntax': 'typescript',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2017",
|
||||||
|
"outDir": "./lib",
|
||||||
|
"module": "commonjs",
|
||||||
|
"strict": true,
|
||||||
|
"declaration": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"lib": ["esnext"]
|
||||||
|
},
|
||||||
|
"include": ["src/**/*"]
|
||||||
|
}
|
|
@ -1,52 +1,56 @@
|
||||||
'use strict';
|
const { resolve, isThereHaveBrowserslistConfig } = require('./utils/projectHelper');
|
||||||
|
|
||||||
module.exports = function(modules) {
|
module.exports = function (modules) {
|
||||||
const plugins = [
|
const plugins = [
|
||||||
require.resolve('@ant-design-vue/babel-plugin-jsx'),
|
[
|
||||||
require.resolve('@babel/plugin-proposal-optional-chaining'),
|
resolve('@babel/plugin-transform-typescript'),
|
||||||
require.resolve('@babel/plugin-transform-object-assign'),
|
{
|
||||||
require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
isTSX: true,
|
||||||
require.resolve('@babel/plugin-proposal-export-default-from'),
|
},
|
||||||
require.resolve('@babel/plugin-proposal-class-properties'),
|
],
|
||||||
require.resolve('@babel/plugin-syntax-dynamic-import'),
|
[resolve('@vue/babel-plugin-jsx'), { mergeProps: false, enableObjectSlots: false }],
|
||||||
// require.resolve('babel-plugin-inline-import-data-uri'),
|
resolve('@babel/plugin-proposal-optional-chaining'),
|
||||||
// require.resolve('@babel/plugin-transform-member-expression-literals'),
|
resolve('@babel/plugin-transform-object-assign'),
|
||||||
// require.resolve('@babel/plugin-transform-property-literals'),
|
resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||||
// require.resolve('@babel/plugin-proposal-export-default-from'),
|
resolve('@babel/plugin-proposal-export-default-from'),
|
||||||
// require.resolve('@babel/plugin-transform-object-assign'),
|
resolve('@babel/plugin-proposal-export-namespace-from'),
|
||||||
// require.resolve('@babel/plugin-transform-template-literals'),
|
resolve('@babel/plugin-proposal-class-properties'),
|
||||||
// require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
resolve('@babel/plugin-syntax-dynamic-import'),
|
||||||
// require.resolve('@babel/plugin-proposal-class-properties'),
|
[
|
||||||
|
resolve('@babel/plugin-transform-runtime'),
|
||||||
|
{
|
||||||
|
useESModules: modules === false,
|
||||||
|
version:
|
||||||
|
require(`${process.cwd()}/package.json`).dependencies['@babel/runtime'] || '^7.10.4',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// resolve('babel-plugin-inline-import-data-uri'),
|
||||||
|
// resolve('@babel/plugin-transform-member-expression-literals'),
|
||||||
|
// resolve('@babel/plugin-transform-property-literals'),
|
||||||
|
// resolve('@babel/plugin-proposal-export-default-from'),
|
||||||
|
// resolve('@babel/plugin-transform-object-assign'),
|
||||||
|
// resolve('@babel/plugin-transform-template-literals'),
|
||||||
|
// resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||||
|
// resolve('@babel/plugin-proposal-class-properties'),
|
||||||
];
|
];
|
||||||
plugins.push([
|
|
||||||
require.resolve('@babel/plugin-transform-runtime'),
|
|
||||||
{
|
|
||||||
helpers: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
return {
|
return {
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
require.resolve('@babel/preset-env'),
|
resolve('@babel/preset-env'),
|
||||||
{
|
{
|
||||||
modules,
|
modules,
|
||||||
targets: {
|
targets: isThereHaveBrowserslistConfig()
|
||||||
browsers: [
|
? undefined
|
||||||
'last 2 versions',
|
: {
|
||||||
'Firefox ESR',
|
browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 11'],
|
||||||
'> 1%',
|
},
|
||||||
'ie >= 11',
|
|
||||||
'iOS >= 8',
|
|
||||||
'Android >= 4',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
plugins,
|
plugins,
|
||||||
env: {
|
env: {
|
||||||
test: {
|
test: {
|
||||||
plugins: [require.resolve('babel-plugin-istanbul')],
|
plugins: [resolve('babel-plugin-istanbul')],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const runCmd = require('./runCmd');
|
||||||
|
|
||||||
|
module.exports = function (done) {
|
||||||
|
if (process.env.NPM_CLI) {
|
||||||
|
done(process.env.NPM_CLI);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
runCmd('which', ['tnpm'], code => {
|
||||||
|
let npm = 'npm';
|
||||||
|
if (!code) {
|
||||||
|
npm = 'tnpm';
|
||||||
|
}
|
||||||
|
done(npm);
|
||||||
|
});
|
||||||
|
};
|
|
@ -0,0 +1,24 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
const { getProjectPath } = require('./utils/projectHelper');
|
||||||
|
|
||||||
|
module.exports = function () {
|
||||||
|
let my = {};
|
||||||
|
if (fs.existsSync(getProjectPath('tsconfig.json'))) {
|
||||||
|
my = require(getProjectPath('tsconfig.json'));
|
||||||
|
}
|
||||||
|
return Object.assign(
|
||||||
|
{
|
||||||
|
noUnusedParameters: true,
|
||||||
|
noUnusedLocals: true,
|
||||||
|
strictNullChecks: true,
|
||||||
|
target: 'es6',
|
||||||
|
jsx: 'preserve',
|
||||||
|
moduleResolution: 'node',
|
||||||
|
declaration: true,
|
||||||
|
allowSyntheticDefaultImports: true,
|
||||||
|
},
|
||||||
|
my.compilerOptions,
|
||||||
|
);
|
||||||
|
};
|
|
@ -1,12 +1,12 @@
|
||||||
|
const { getProjectPath, resolve } = require('./utils/projectHelper');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const WebpackBar = require('webpackbar');
|
const WebpackBar = require('webpackbar');
|
||||||
const webpackMerge = require('webpack-merge');
|
const { merge } = require('webpack-merge');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||||
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||||
const postcssConfig = require('./postcssConfig');
|
|
||||||
const CleanUpStatsPlugin = require('./utils/CleanUpStatsPlugin');
|
const CleanUpStatsPlugin = require('./utils/CleanUpStatsPlugin');
|
||||||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ const imageOptions = {
|
||||||
limit: 10000,
|
limit: 10000,
|
||||||
};
|
};
|
||||||
|
|
||||||
function getWebpackConfig(modules) {
|
function getWebpackConfig(modules, esm = false) {
|
||||||
const pkg = require(path.join(process.cwd(), 'package.json'));
|
const pkg = require(getProjectPath('package.json'));
|
||||||
const babelConfig = require('./getBabelCommonConfig')(modules || false);
|
const babelConfig = require('./getBabelCommonConfig')(modules || false);
|
||||||
|
|
||||||
const pluginImportOptions = {
|
const pluginImportOptions = {
|
||||||
|
@ -31,43 +31,54 @@ function getWebpackConfig(modules) {
|
||||||
libraryName: distFileBaseName,
|
libraryName: distFileBaseName,
|
||||||
libraryDirectory: 'components',
|
libraryDirectory: 'components',
|
||||||
};
|
};
|
||||||
babelConfig.plugins.push([require.resolve('babel-plugin-import'), pluginImportOptions]);
|
babelConfig.plugins.push([resolve('babel-plugin-import'), pluginImportOptions]);
|
||||||
|
|
||||||
if (modules === false) {
|
if (modules === false) {
|
||||||
babelConfig.plugins.push(require.resolve('./replaceLib'));
|
babelConfig.plugins.push(require.resolve('./replaceLib'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @type {import('webpack').Configuration} */
|
||||||
const config = {
|
const config = {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
path: path.join(process.cwd(), './dist/'),
|
path: getProjectPath('./dist/'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: ['node_modules', path.join(__dirname, '../node_modules')],
|
modules: ['node_modules', path.join(__dirname, '../node_modules')],
|
||||||
extensions: ['.js', '.jsx', '.vue', '.md', '.json'],
|
extensions: [
|
||||||
|
'.web.tsx',
|
||||||
|
'.web.ts',
|
||||||
|
'.web.jsx',
|
||||||
|
'.web.js',
|
||||||
|
'.ts',
|
||||||
|
'.tsx',
|
||||||
|
'.js',
|
||||||
|
'.jsx',
|
||||||
|
'.vue',
|
||||||
|
'.md',
|
||||||
|
'.json',
|
||||||
|
],
|
||||||
alias: {
|
alias: {
|
||||||
'@': process.cwd(),
|
'@': process.cwd(),
|
||||||
},
|
},
|
||||||
|
fallback: [
|
||||||
|
'child_process',
|
||||||
|
'cluster',
|
||||||
|
'dgram',
|
||||||
|
'dns',
|
||||||
|
'fs',
|
||||||
|
'module',
|
||||||
|
'net',
|
||||||
|
'readline',
|
||||||
|
'repl',
|
||||||
|
'tls',
|
||||||
|
].reduce((acc, name) => Object.assign({}, acc, { [name]: 'empty' }), {}),
|
||||||
},
|
},
|
||||||
|
|
||||||
node: [
|
|
||||||
'child_process',
|
|
||||||
'cluster',
|
|
||||||
'dgram',
|
|
||||||
'dns',
|
|
||||||
'fs',
|
|
||||||
'module',
|
|
||||||
'net',
|
|
||||||
'readline',
|
|
||||||
'repl',
|
|
||||||
'tls',
|
|
||||||
].reduce((acc, name) => Object.assign({}, acc, { [name]: 'empty' }), {}),
|
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
noParse: [/moment.js/],
|
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.vue$/,
|
test: /\.vue$/,
|
||||||
|
@ -81,10 +92,13 @@ function getWebpackConfig(modules) {
|
||||||
{
|
{
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
presets: [require.resolve('@babel/preset-env')],
|
presets: [resolve('@babel/preset-env')],
|
||||||
plugins: [
|
plugins: [
|
||||||
require.resolve('@ant-design-vue/babel-plugin-jsx'),
|
[
|
||||||
require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
resolve('@vue/babel-plugin-jsx'),
|
||||||
|
{ mergeProps: false, enableObjectSlots: false },
|
||||||
|
],
|
||||||
|
resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -100,6 +114,21 @@ function getWebpackConfig(modules) {
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
options: babelConfig,
|
options: babelConfig,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.tsx?$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: babelConfig,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'ts-loader',
|
||||||
|
options: {
|
||||||
|
transpileOnly: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [
|
use: [
|
||||||
|
@ -112,31 +141,11 @@ function getWebpackConfig(modules) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
loader: 'postcss-loader',
|
loader: 'postcss-loader',
|
||||||
options: Object.assign({}, postcssConfig, { sourceMap: true }),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.less$/,
|
|
||||||
use: [
|
|
||||||
MiniCssExtractPlugin.loader,
|
|
||||||
{
|
|
||||||
loader: 'css-loader',
|
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
postcssOptions: {
|
||||||
},
|
plugins: ['autoprefixer'],
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: 'postcss-loader',
|
|
||||||
options: Object.assign({}, postcssConfig, { sourceMap: true }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
loader: 'less-loader',
|
|
||||||
options: {
|
|
||||||
lessOptions: {
|
|
||||||
sourceMap: true,
|
|
||||||
javascriptEnabled: true,
|
|
||||||
},
|
},
|
||||||
|
sourceMap: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -161,7 +170,7 @@ function getWebpackConfig(modules) {
|
||||||
new webpack.BannerPlugin(`
|
new webpack.BannerPlugin(`
|
||||||
${pkg.name} v${pkg.version}
|
${pkg.name} v${pkg.version}
|
||||||
|
|
||||||
Copyright 2017-present, ant-design-vue.
|
Copyright 2017-present, Ant Design Vue.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
`),
|
`),
|
||||||
new WebpackBar({
|
new WebpackBar({
|
||||||
|
@ -170,32 +179,57 @@ All rights reserved.
|
||||||
}),
|
}),
|
||||||
new CleanUpStatsPlugin(),
|
new CleanUpStatsPlugin(),
|
||||||
],
|
],
|
||||||
|
performance: {
|
||||||
|
hints: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||||
const entry = ['./index'];
|
let entry = ['./index'];
|
||||||
config.externals = {
|
config.externals = [
|
||||||
vue: {
|
{
|
||||||
root: 'Vue',
|
vue: {
|
||||||
commonjs2: 'vue',
|
root: 'Vue',
|
||||||
commonjs: 'vue',
|
commonjs2: 'vue',
|
||||||
amd: 'vue',
|
commonjs: 'vue',
|
||||||
|
amd: 'vue',
|
||||||
|
module: 'vue',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
];
|
||||||
config.output.library = distFileBaseName;
|
if (esm) {
|
||||||
config.output.libraryTarget = 'umd';
|
entry = ['./index.esm'];
|
||||||
|
config.experiments = {
|
||||||
|
...config.experiments,
|
||||||
|
outputModule: true,
|
||||||
|
};
|
||||||
|
config.output.chunkFormat = 'module';
|
||||||
|
config.output.library = {
|
||||||
|
type: 'module',
|
||||||
|
};
|
||||||
|
config.target = 'es2019';
|
||||||
|
} else {
|
||||||
|
config.output.libraryTarget = 'umd';
|
||||||
|
config.output.library = distFileBaseName;
|
||||||
|
config.output.globalObject = 'this';
|
||||||
|
}
|
||||||
|
|
||||||
|
const entryName = esm ? `${distFileBaseName}.esm` : distFileBaseName;
|
||||||
|
|
||||||
config.optimization = {
|
config.optimization = {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserPlugin({
|
new TerserPlugin({
|
||||||
sourceMap: true,
|
parallel: true,
|
||||||
|
terserOptions: {
|
||||||
|
warnings: false,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Development
|
// Development
|
||||||
const uncompressedConfig = webpackMerge({}, config, {
|
const uncompressedConfig = merge({}, config, {
|
||||||
entry: {
|
entry: {
|
||||||
[distFileBaseName]: entry,
|
[entryName]: entry,
|
||||||
},
|
},
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -206,13 +240,12 @@ All rights reserved.
|
||||||
});
|
});
|
||||||
|
|
||||||
// Production
|
// Production
|
||||||
const prodConfig = webpackMerge({}, config, {
|
const prodConfig = merge({}, config, {
|
||||||
entry: {
|
entry: {
|
||||||
[`${distFileBaseName}.min`]: entry,
|
[`${entryName}.min`]: entry,
|
||||||
},
|
},
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
minimize: true,
|
minimize: true,
|
||||||
}),
|
}),
|
||||||
|
@ -221,14 +254,15 @@ All rights reserved.
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [new OptimizeCSSAssetsPlugin({})],
|
minimize: true,
|
||||||
|
minimizer: [new CssMinimizerPlugin({})],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return [prodConfig, uncompressedConfig];
|
return [prodConfig, uncompressedConfig];
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return [config];
|
||||||
}
|
}
|
||||||
|
|
||||||
getWebpackConfig.webpack = webpack;
|
getWebpackConfig.webpack = webpack;
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
'use strict';
|
const { getProjectPath, getConfig } = require('./utils/projectHelper');
|
||||||
|
|
||||||
// const install = require('./install')
|
|
||||||
const runCmd = require('./runCmd');
|
const runCmd = require('./runCmd');
|
||||||
const getBabelCommonConfig = require('./getBabelCommonConfig');
|
const getBabelCommonConfig = require('./getBabelCommonConfig');
|
||||||
const merge2 = require('merge2');
|
const merge2 = require('merge2');
|
||||||
const { execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
const through2 = require('through2');
|
const through2 = require('through2');
|
||||||
const transformLess = require('./transformLess');
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const babel = require('gulp-babel');
|
const babel = require('gulp-babel');
|
||||||
const argv = require('minimist')(process.argv.slice(2));
|
const argv = require('minimist')(process.argv.slice(2));
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
|
|
||||||
const packageJson = require(`${process.cwd()}/package.json`);
|
|
||||||
// const getNpm = require('./getNpm')
|
// const getNpm = require('./getNpm')
|
||||||
// const selfPackage = require('../package.json')
|
// const selfPackage = require('../package.json')
|
||||||
const chalk = require('chalk');
|
const chalk = require('chalk');
|
||||||
|
@ -21,21 +17,35 @@ const getNpmArgs = require('./utils/get-npm-args');
|
||||||
const getChangelog = require('./utils/getChangelog');
|
const getChangelog = require('./utils/getChangelog');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
// const watch = require('gulp-watch')
|
// const watch = require('gulp-watch')
|
||||||
|
const ts = require('gulp-typescript');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const rimraf = require('rimraf');
|
const rimraf = require('rimraf');
|
||||||
const replaceLib = require('./replaceLib');
|
|
||||||
const stripCode = require('gulp-strip-code');
|
const stripCode = require('gulp-strip-code');
|
||||||
const compareVersions = require('compare-versions');
|
const compareVersions = require('compare-versions');
|
||||||
|
const getTSCommonConfig = require('./getTSCommonConfig');
|
||||||
|
const replaceLib = require('./replaceLib');
|
||||||
|
const sortApiTable = require('./sortApiTable');
|
||||||
|
const { glob } = require('glob');
|
||||||
|
|
||||||
|
const packageJson = require(getProjectPath('package.json'));
|
||||||
|
const tsDefaultReporter = ts.reporter.defaultReporter();
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
const libDir = path.join(cwd, 'lib');
|
const libDir = getProjectPath('lib');
|
||||||
const esDir = path.join(cwd, 'es');
|
const esDir = getProjectPath('es');
|
||||||
|
const localeDir = getProjectPath('locale');
|
||||||
|
|
||||||
|
const tsConfig = getTSCommonConfig();
|
||||||
|
|
||||||
|
// FIXME: hard code, not find typescript can modify the path resolution
|
||||||
|
const localeDts = `import type { Locale } from '../lib/locale-provider';
|
||||||
|
declare const localeValues: Locale;
|
||||||
|
export default localeValues;`;
|
||||||
|
|
||||||
function dist(done) {
|
function dist(done) {
|
||||||
rimraf.sync(path.join(cwd, 'dist'));
|
rimraf.sync(path.join(cwd, 'dist'));
|
||||||
process.env.RUN_ENV = 'PRODUCTION';
|
process.env.RUN_ENV = 'PRODUCTION';
|
||||||
const webpackConfig = require(path.join(cwd, 'webpack.build.conf.js'));
|
const webpackConfig = require(getProjectPath('webpack.build.conf.js'));
|
||||||
webpack(webpackConfig, (err, stats) => {
|
webpack(webpackConfig, (err, stats) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.stack || err);
|
console.error(err.stack || err);
|
||||||
|
@ -46,11 +56,17 @@ function dist(done) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const info = stats.toJson();
|
const info = stats.toJson();
|
||||||
|
const { dist: { finalize } = {}, bail } = getConfig();
|
||||||
|
|
||||||
if (stats.hasErrors()) {
|
if (stats.hasErrors()) {
|
||||||
console.error(info.errors);
|
(info.errors || []).forEach(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
// https://github.com/ant-design/ant-design/pull/31662
|
||||||
|
if (bail) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats.hasWarnings()) {
|
if (stats.hasWarnings()) {
|
||||||
console.warn(info.warnings);
|
console.warn(info.warnings);
|
||||||
}
|
}
|
||||||
|
@ -65,10 +81,44 @@ function dist(done) {
|
||||||
version: false,
|
version: false,
|
||||||
});
|
});
|
||||||
console.log(buildInfo);
|
console.log(buildInfo);
|
||||||
|
// Additional process of dist finalize
|
||||||
|
if (finalize) {
|
||||||
|
console.log('[Dist] Finalization...');
|
||||||
|
finalize();
|
||||||
|
}
|
||||||
done(0);
|
done(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tsFiles = ['**/*.ts', '**/*.tsx', '!node_modules/**/*.*', 'typings/**/*.d.ts'];
|
||||||
|
|
||||||
|
function compileTs(stream) {
|
||||||
|
return stream
|
||||||
|
.pipe(ts(tsConfig))
|
||||||
|
.js.pipe(
|
||||||
|
through2.obj(function (file, encoding, next) {
|
||||||
|
// console.log(file.path, file.base);
|
||||||
|
file.path = file.path.replace(/\.[jt]sx$/, '.js');
|
||||||
|
this.push(file);
|
||||||
|
next();
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.pipe(gulp.dest(process.cwd()));
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task('tsc', () =>
|
||||||
|
compileTs(
|
||||||
|
gulp.src(tsFiles, {
|
||||||
|
base: cwd,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
gulp.task('clean', () => {
|
||||||
|
rimraf.sync(getProjectPath('_site'));
|
||||||
|
rimraf.sync(getProjectPath('_data'));
|
||||||
|
});
|
||||||
|
|
||||||
function babelify(js, modules) {
|
function babelify(js, modules) {
|
||||||
const babelConfig = getBabelCommonConfig(modules);
|
const babelConfig = getBabelCommonConfig(modules);
|
||||||
babelConfig.babelrc = false;
|
babelConfig.babelrc = false;
|
||||||
|
@ -76,67 +126,122 @@ function babelify(js, modules) {
|
||||||
if (modules === false) {
|
if (modules === false) {
|
||||||
babelConfig.plugins.push(replaceLib);
|
babelConfig.plugins.push(replaceLib);
|
||||||
}
|
}
|
||||||
let stream = js.pipe(babel(babelConfig)).pipe(
|
const stream = js.pipe(babel(babelConfig)).pipe(
|
||||||
through2.obj(function z(file, encoding, next) {
|
through2.obj(function z(file, encoding, next) {
|
||||||
this.push(file.clone());
|
this.push(file.clone());
|
||||||
if (file.path.match(/\/style\/index\.(js|jsx)$/)) {
|
if (modules !== false) {
|
||||||
const content = file.contents.toString(encoding);
|
const content = file.contents.toString(encoding);
|
||||||
file.contents = Buffer.from(
|
file.contents = Buffer.from(
|
||||||
content.replace(/\/style\/?'/g, "/style/css'").replace(/\.less/g, '.css'),
|
content
|
||||||
|
.replace(/lodash-es/g, 'lodash')
|
||||||
|
.replace(/@ant-design\/icons-vue/g, '@ant-design/icons-vue/lib/icons'),
|
||||||
);
|
);
|
||||||
file.path = file.path.replace(/index\.(js|jsx)$/, 'css.js');
|
|
||||||
this.push(file);
|
this.push(file);
|
||||||
next();
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
}
|
||||||
|
next();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
return stream.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||||
|
}
|
||||||
|
|
||||||
|
function compile(modules) {
|
||||||
|
const { compile: { transformTSFile, transformFile } = {} } = getConfig();
|
||||||
|
rimraf.sync(modules !== false ? libDir : esDir);
|
||||||
|
|
||||||
|
const assets = gulp
|
||||||
|
.src(['components/**/*.@(png|svg)'])
|
||||||
|
.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||||
|
let error = 0;
|
||||||
|
|
||||||
|
// =============================== FILE ===============================
|
||||||
|
let transformFileStream;
|
||||||
|
|
||||||
|
if (transformFile) {
|
||||||
|
transformFileStream = gulp
|
||||||
|
.src(['components/**/*.tsx'])
|
||||||
|
.pipe(
|
||||||
|
through2.obj(function (file, encoding, next) {
|
||||||
|
let nextFile = transformFile(file) || file;
|
||||||
|
nextFile = Array.isArray(nextFile) ? nextFile : [nextFile];
|
||||||
|
nextFile.forEach(f => this.push(f));
|
||||||
|
next();
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ================================ TS ================================
|
||||||
|
const source = [
|
||||||
|
'components/**/*.js',
|
||||||
|
'components/**/*.jsx',
|
||||||
|
'components/**/*.tsx',
|
||||||
|
'components/**/*.ts',
|
||||||
|
'typings/**/*.d.ts',
|
||||||
|
'!components/*/__tests__/*',
|
||||||
|
];
|
||||||
|
|
||||||
|
// Strip content if needed
|
||||||
|
let sourceStream = gulp.src(source);
|
||||||
if (modules === false) {
|
if (modules === false) {
|
||||||
stream = stream.pipe(
|
sourceStream = sourceStream.pipe(
|
||||||
stripCode({
|
stripCode({
|
||||||
start_comment: '@remove-on-es-build-begin',
|
start_comment: '@remove-on-es-build-begin',
|
||||||
end_comment: '@remove-on-es-build-end',
|
end_comment: '@remove-on-es-build-end',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return stream.pipe(gulp.dest(modules === false ? esDir : libDir));
|
|
||||||
|
if (transformTSFile) {
|
||||||
|
sourceStream = sourceStream.pipe(
|
||||||
|
through2.obj(function (file, encoding, next) {
|
||||||
|
let nextFile = transformTSFile(file) || file;
|
||||||
|
nextFile = Array.isArray(nextFile) ? nextFile : [nextFile];
|
||||||
|
nextFile.forEach(f => this.push(f));
|
||||||
|
next();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const tsResult = sourceStream.pipe(
|
||||||
|
ts(tsConfig, {
|
||||||
|
error(e) {
|
||||||
|
tsDefaultReporter.error(e);
|
||||||
|
error = 1;
|
||||||
|
},
|
||||||
|
finish: tsDefaultReporter.finish,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
function check() {
|
||||||
|
if (error && !argv['ignore-error']) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tsResult.on('finish', check);
|
||||||
|
tsResult.on('end', check);
|
||||||
|
const tsFilesStream = babelify(tsResult.js, modules);
|
||||||
|
const tsd = tsResult.dts.pipe(gulp.dest(modules === false ? esDir : libDir));
|
||||||
|
return merge2([tsFilesStream, tsd, assets, transformFileStream].filter(s => s));
|
||||||
}
|
}
|
||||||
|
|
||||||
function compile(modules) {
|
function generateLocale() {
|
||||||
rimraf.sync(modules !== false ? libDir : esDir);
|
if (!fs.existsSync(localeDir)) {
|
||||||
const less = gulp
|
fs.mkdirSync(localeDir);
|
||||||
.src(['components/**/*.less'])
|
}
|
||||||
.pipe(
|
|
||||||
through2.obj(function(file, encoding, next) {
|
|
||||||
this.push(file.clone());
|
|
||||||
if (
|
|
||||||
file.path.match(/\/style\/index\.less$/) ||
|
|
||||||
file.path.match(/\/style\/v2-compatible-reset\.less$/)
|
|
||||||
) {
|
|
||||||
transformLess(file.path)
|
|
||||||
.then(css => {
|
|
||||||
file.contents = Buffer.from(css);
|
|
||||||
file.path = file.path.replace(/\.less$/, '.css');
|
|
||||||
this.push(file);
|
|
||||||
next();
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
console.error(e);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(modules === false ? esDir : libDir));
|
|
||||||
const assets = gulp
|
|
||||||
.src(['components/**/*.@(png|svg)'])
|
|
||||||
.pipe(gulp.dest(modules === false ? esDir : libDir));
|
|
||||||
|
|
||||||
const source = ['components/**/*.js', 'components/**/*.jsx', '!components/*/__tests__/*'];
|
const localeFiles = glob.sync('components/locale/*.ts?(x)');
|
||||||
const jsFilesStream = babelify(gulp.src(source), modules);
|
localeFiles.forEach(item => {
|
||||||
return merge2([less, jsFilesStream, assets]);
|
const match = item.match(/components\/locale\/(.*)\.tsx?/);
|
||||||
|
if (match) {
|
||||||
|
const locale = match[1];
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(localeDir, `${locale}.js`),
|
||||||
|
`module.exports = require('../lib/locale/${locale}');`,
|
||||||
|
);
|
||||||
|
fs.writeFileSync(path.join(localeDir, `${locale}.d.ts`), localeDts);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function tag() {
|
function tag() {
|
||||||
|
@ -242,61 +347,71 @@ function publish(tagString, done) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pub(done) {
|
function pub(done) {
|
||||||
dist(code => {
|
const notOk = !packageJson.version.match(/^\d+\.\d+\.\d+$/);
|
||||||
if (code) {
|
let tagString;
|
||||||
done(code);
|
if (argv['npm-tag']) {
|
||||||
return;
|
tagString = argv['npm-tag'];
|
||||||
}
|
}
|
||||||
const notOk = !packageJson.version.match(/^\d+\.\d+\.\d+$/);
|
if (!tagString && notOk) {
|
||||||
let tagString;
|
tagString = 'next';
|
||||||
if (argv['npm-tag']) {
|
}
|
||||||
tagString = argv['npm-tag'];
|
if (packageJson.scripts['pre-publish']) {
|
||||||
}
|
runCmd('npm', ['run', 'pre-publish'], code2 => {
|
||||||
if (!tagString && notOk) {
|
if (code2) {
|
||||||
tagString = 'next';
|
done(code2);
|
||||||
}
|
return;
|
||||||
if (packageJson.scripts['pre-publish']) {
|
}
|
||||||
runCmd('npm', ['run', 'pre-publish'], code2 => {
|
|
||||||
if (code2) {
|
|
||||||
done(code2);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
publish(tagString, done);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
publish(tagString, done);
|
publish(tagString, done);
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
publish(tagString, done);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task(
|
const startTime = new Date();
|
||||||
'compile-with-es',
|
gulp.task('compile-with-es', done => {
|
||||||
gulp.series(done => {
|
console.log('start compile at ', startTime);
|
||||||
compile(false).on('finish', function() {
|
console.log('[Parallel] Compile to es...');
|
||||||
done();
|
compile(false).on('finish', done);
|
||||||
});
|
});
|
||||||
}),
|
|
||||||
);
|
gulp.task('compile-with-lib', done => {
|
||||||
|
console.log('[Parallel] Compile to js...');
|
||||||
|
compile().on('finish', () => {
|
||||||
|
generateLocale();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('compile-finalize', done => {
|
||||||
|
// Additional process of compile finalize
|
||||||
|
const { compile: { finalize } = {} } = getConfig();
|
||||||
|
if (finalize) {
|
||||||
|
console.log('[Compile] Finalization...');
|
||||||
|
finalize();
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
'compile',
|
'compile',
|
||||||
gulp.series('compile-with-es', done => {
|
gulp.series(gulp.parallel('compile-with-es', 'compile-with-lib'), 'compile-finalize', done => {
|
||||||
compile().on('finish', function() {
|
console.log('end compile at ', new Date());
|
||||||
done();
|
console.log('compile time ', (new Date() - startTime) / 1000, 's');
|
||||||
});
|
done();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
'dist',
|
'dist',
|
||||||
gulp.series('compile', done => {
|
gulp.series(done => {
|
||||||
dist(done);
|
dist(done);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
'pub',
|
'pub',
|
||||||
gulp.series('check-git', 'compile', done => {
|
gulp.series('check-git', 'compile', 'dist', done => {
|
||||||
// if (!process.env.GITHUB_TOKEN) {
|
// if (!process.env.GITHUB_TOKEN) {
|
||||||
// console.log('no GitHub token found, skip');
|
// console.log('no GitHub token found, skip');
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -337,7 +452,7 @@ gulp.task(
|
||||||
newVersion.trim() === version
|
newVersion.trim() === version
|
||||||
) {
|
) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
runCmd('npm', ['run', 'pub'], code => {
|
runCmd('npm', ['run', 'pub'], _code => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -360,7 +475,11 @@ gulp.task(
|
||||||
const npmArgs = getNpmArgs();
|
const npmArgs = getNpmArgs();
|
||||||
if (npmArgs) {
|
if (npmArgs) {
|
||||||
for (let arg = npmArgs.shift(); arg; arg = npmArgs.shift()) {
|
for (let arg = npmArgs.shift(); arg; arg = npmArgs.shift()) {
|
||||||
if (/^pu(b(l(i(sh?)?)?)?)?$/.test(arg) && npmArgs.indexOf('--with-antd-tools') < 0) {
|
if (
|
||||||
|
/^pu(b(l(i(sh?)?)?)?)?$/.test(arg) &&
|
||||||
|
npmArgs.indexOf('--with-antd-tools') < 0 &&
|
||||||
|
!process.env.npm_config_with_antd_tools
|
||||||
|
) {
|
||||||
reportError();
|
reportError();
|
||||||
done(1);
|
done(1);
|
||||||
return;
|
return;
|
||||||
|
@ -370,3 +489,11 @@ gulp.task(
|
||||||
done();
|
done();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
gulp.task(
|
||||||
|
'sort-api-table',
|
||||||
|
gulp.series(done => {
|
||||||
|
sortApiTable();
|
||||||
|
done();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
const rucksack = require('rucksack-css');
|
|
||||||
const autoprefixer = require('autoprefixer');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
plugins: [rucksack(), autoprefixer()],
|
|
||||||
};
|
|
|
@ -1,14 +1,26 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const { join, dirname } = require('path');
|
const { dirname } = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const { getProjectPath } = require('./utils/projectHelper');
|
||||||
const cwd = process.cwd();
|
|
||||||
|
|
||||||
function replacePath(path) {
|
function replacePath(path) {
|
||||||
if (path.node.source && /\/lib\//.test(path.node.source.value)) {
|
if (path.node.source && /\/lib\//.test(path.node.source.value)) {
|
||||||
const esModule = path.node.source.value.replace('/lib/', '/es/');
|
const esModule = path.node.source.value.replace('/lib/', '/es/');
|
||||||
const esPath = dirname(join(cwd, `node_modules/${esModule}`));
|
const esPath = dirname(getProjectPath('node_modules', esModule));
|
||||||
|
if (fs.existsSync(esPath)) {
|
||||||
|
path.node.source.value = esModule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// @ant-design/icons-vue/xxx => @ant-design/icons-vue/es/icons/xxx
|
||||||
|
const antdIconMatcher = /@ant-design\/icons-vue\/([^/]*)$/;
|
||||||
|
if (path.node.source && antdIconMatcher.test(path.node.source.value)) {
|
||||||
|
const esModule = path.node.source.value.replace(
|
||||||
|
antdIconMatcher,
|
||||||
|
(_, iconName) => `@ant-design/icons-vue/es/icons/${iconName}`,
|
||||||
|
);
|
||||||
|
const esPath = dirname(getProjectPath('node_modules', esModule));
|
||||||
if (fs.existsSync(esPath)) {
|
if (fs.existsSync(esPath)) {
|
||||||
path.node.source.value = esModule;
|
path.node.source.value = esModule;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const isWindows = require('is-windows');
|
||||||
const getRunCmdEnv = require('./utils/getRunCmdEnv');
|
const getRunCmdEnv = require('./utils/getRunCmdEnv');
|
||||||
|
|
||||||
function runCmd(cmd, _args, fn) {
|
function runCmd(cmd, _args, fn) {
|
||||||
const args = _args || [];
|
const args = _args || [];
|
||||||
|
|
||||||
|
if (isWindows()) {
|
||||||
|
args.unshift(cmd);
|
||||||
|
args.unshift('/c');
|
||||||
|
cmd = process.env.ComSpec;
|
||||||
|
}
|
||||||
|
|
||||||
const runner = require('child_process').spawn(cmd, args, {
|
const runner = require('child_process').spawn(cmd, args, {
|
||||||
// keep color
|
// keep color
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
const program = require('commander');
|
||||||
|
const majo = require('majo');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const chalk = require('chalk');
|
||||||
|
|
||||||
|
const unified = require('unified');
|
||||||
|
const parse = require('remark-parse');
|
||||||
|
const stringify = require('remark-stringify');
|
||||||
|
|
||||||
|
const yamlConfig = require('remark-yaml-config');
|
||||||
|
const frontmatter = require('remark-frontmatter');
|
||||||
|
|
||||||
|
let fileAPIs = {};
|
||||||
|
const remarkWithYaml = unified()
|
||||||
|
.use(parse)
|
||||||
|
.use(stringify, {
|
||||||
|
paddedTable: false,
|
||||||
|
listItemIndent: 1,
|
||||||
|
stringLength: () => 3,
|
||||||
|
})
|
||||||
|
.use(frontmatter)
|
||||||
|
.use(yamlConfig);
|
||||||
|
|
||||||
|
const stream = majo.majo();
|
||||||
|
|
||||||
|
function getCellValue(node) {
|
||||||
|
return node.children[0].children[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// from small to large
|
||||||
|
const sizeBreakPoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
||||||
|
|
||||||
|
const whiteMethodList = ['afterChange', 'beforeChange'];
|
||||||
|
|
||||||
|
const groups = {
|
||||||
|
isDynamic: val => /^on[A-Z]/.test(val) || whiteMethodList.indexOf(val) > -1,
|
||||||
|
isSize: val => sizeBreakPoints.indexOf(val) > -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
function asciiSort(prev, next) {
|
||||||
|
if (prev > next) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prev < next) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// follow the alphabet order
|
||||||
|
function alphabetSort(nodes) {
|
||||||
|
// use toLowerCase to keep `case insensitive`
|
||||||
|
return nodes.sort((...comparison) =>
|
||||||
|
asciiSort(...comparison.map(val => getCellValue(val).toLowerCase())),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sizeSort(nodes) {
|
||||||
|
return nodes.sort((...comparison) =>
|
||||||
|
asciiSort(...comparison.map(val => sizeBreakPoints.indexOf(getCellValue(val).toLowerCase()))),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sort(ast, filename) {
|
||||||
|
const nameMatch = filename.match(/^components\/([^/]*)\//);
|
||||||
|
const componentName = nameMatch[1];
|
||||||
|
fileAPIs[componentName] = fileAPIs[componentName] || {
|
||||||
|
static: new Set(),
|
||||||
|
size: new Set(),
|
||||||
|
dynamic: new Set(),
|
||||||
|
};
|
||||||
|
|
||||||
|
ast.children.forEach(child => {
|
||||||
|
const staticProps = [];
|
||||||
|
// prefix with `on`
|
||||||
|
const dynamicProps = [];
|
||||||
|
// one of ['xs', 'sm', 'md', 'lg', 'xl']
|
||||||
|
const sizeProps = [];
|
||||||
|
|
||||||
|
// find table markdown type
|
||||||
|
if (child.type === 'table') {
|
||||||
|
// slice will create new array, so sort can affect the original array.
|
||||||
|
// slice(1) cut down the thead
|
||||||
|
child.children.slice(1).forEach(node => {
|
||||||
|
const value = getCellValue(node);
|
||||||
|
if (groups.isDynamic(value)) {
|
||||||
|
dynamicProps.push(node);
|
||||||
|
fileAPIs[componentName].dynamic.add(value);
|
||||||
|
} else if (groups.isSize(value)) {
|
||||||
|
sizeProps.push(node);
|
||||||
|
fileAPIs[componentName].size.add(value);
|
||||||
|
} else {
|
||||||
|
staticProps.push(node);
|
||||||
|
fileAPIs[componentName].static.add(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line
|
||||||
|
child.children = [
|
||||||
|
child.children[0],
|
||||||
|
...alphabetSort(staticProps),
|
||||||
|
...sizeSort(sizeProps),
|
||||||
|
...alphabetSort(dynamicProps),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return ast;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortAPI(md, filename) {
|
||||||
|
return remarkWithYaml.stringify(sort(remarkWithYaml.parse(md), filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortMiddleware(ctx) {
|
||||||
|
Object.keys(ctx.files).forEach(filename => {
|
||||||
|
const content = ctx.fileContents(filename);
|
||||||
|
ctx.writeContents(filename, sortAPI(content, filename));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = () => {
|
||||||
|
fileAPIs = {};
|
||||||
|
|
||||||
|
program
|
||||||
|
.version('0.1.0')
|
||||||
|
.option(
|
||||||
|
'-f, --file [file]',
|
||||||
|
'Specify which file to be transformed',
|
||||||
|
// default value
|
||||||
|
'components/**/index.+(zh-CN|en-US).md',
|
||||||
|
)
|
||||||
|
.option('-o, --output [output]', 'Specify component api output path', '~component-api.json')
|
||||||
|
.parse(process.argv);
|
||||||
|
// Get the markdown file all need to be transformed
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
stream
|
||||||
|
.source(program.file)
|
||||||
|
.use(sortMiddleware)
|
||||||
|
.dest('.')
|
||||||
|
.then(() => {
|
||||||
|
if (program.output) {
|
||||||
|
const data = {};
|
||||||
|
Object.keys(fileAPIs).forEach(componentName => {
|
||||||
|
data[componentName] = {
|
||||||
|
static: [...fileAPIs[componentName].static],
|
||||||
|
size: [...fileAPIs[componentName].size],
|
||||||
|
dynamic: [...fileAPIs[componentName].dynamic],
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const reportPath = path.resolve(program.output);
|
||||||
|
fs.writeFileSync(reportPath, JSON.stringify(data, null, 2), 'utf8');
|
||||||
|
console.log(chalk.cyan(`API list file: ${reportPath}`));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log(chalk.green(`sort ant-design-vue api successfully!`));
|
||||||
|
});
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
};
|
|
@ -1,33 +0,0 @@
|
||||||
const less = require('less');
|
|
||||||
const { readFileSync } = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const postcss = require('postcss');
|
|
||||||
const NpmImportPlugin = require('less-plugin-npm-import');
|
|
||||||
const postcssConfig = require('./postcssConfig');
|
|
||||||
|
|
||||||
function transformLess(lessFile, config = {}) {
|
|
||||||
const { cwd = process.cwd() } = config;
|
|
||||||
const resolvedLessFile = path.resolve(cwd, lessFile);
|
|
||||||
|
|
||||||
let data = readFileSync(resolvedLessFile, 'utf-8');
|
|
||||||
data = data.replace(/^\uFEFF/, '');
|
|
||||||
|
|
||||||
// Do less compile
|
|
||||||
const lessOpts = {
|
|
||||||
paths: [path.dirname(resolvedLessFile)],
|
|
||||||
filename: resolvedLessFile,
|
|
||||||
plugins: [new NpmImportPlugin({ prefix: '~' })],
|
|
||||||
javascriptEnabled: true,
|
|
||||||
};
|
|
||||||
return less
|
|
||||||
.render(data, lessOpts)
|
|
||||||
.then(result => {
|
|
||||||
const source = result.css;
|
|
||||||
return postcss(postcssConfig.plugins).process(source);
|
|
||||||
})
|
|
||||||
.then(r => {
|
|
||||||
return r.css;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = transformLess;
|
|
|
@ -24,13 +24,13 @@ class CleanUpStatsPlugin {
|
||||||
|
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
compiler.hooks.done.tap('CleanUpStatsPlugin', stats => {
|
compiler.hooks.done.tap('CleanUpStatsPlugin', stats => {
|
||||||
const { children } = stats.compilation;
|
const { children, warnings } = stats.compilation;
|
||||||
if (Array.isArray(children)) {
|
if (Array.isArray(children)) {
|
||||||
stats.compilation.children = children.filter(child => this.shouldPickStatChild(child));
|
stats.compilation.children = children.filter(child => this.shouldPickStatChild(child));
|
||||||
}
|
}
|
||||||
// if (Array.isArray(warnings)) {
|
if (Array.isArray(warnings)) {
|
||||||
// stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message));
|
stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message));
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
// NOTE: the following code was partially adopted from https://github.com/iarna/in-publish
|
// NOTE: the following code was partially adopted from https://github.com/iarna/in-publish
|
||||||
module.exports = function getNpmArgs() {
|
module.exports = function getNpmArgs() {
|
||||||
|
// https://github.com/iarna/in-publish/pull/14
|
||||||
|
if (process.env.npm_command) {
|
||||||
|
return [process.env.npm_command];
|
||||||
|
}
|
||||||
|
|
||||||
let npmArgv = null;
|
let npmArgv = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
module.exports = function getChangelog(file, version) {
|
module.exports = function getChangelog(file, version) {
|
||||||
const lines = fs
|
const lines = fs.readFileSync(file).toString().split('\n');
|
||||||
.readFileSync(file)
|
|
||||||
.toString()
|
|
||||||
.split('\n');
|
|
||||||
const changeLog = [];
|
const changeLog = [];
|
||||||
const startPattern = new RegExp(`^## ${version}`);
|
const startPattern = new RegExp(`^## ${version}`);
|
||||||
const stopPattern = /^## /; // 前一个版本
|
const stopPattern = /^## /; // 前一个版本
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const isWindows = require('is-windows');
|
||||||
|
|
||||||
module.exports = function getRunCmdEnv() {
|
module.exports = function getRunCmdEnv() {
|
||||||
const env = {};
|
const env = {};
|
||||||
|
@ -11,16 +12,12 @@ module.exports = function getRunCmdEnv() {
|
||||||
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
|
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
|
||||||
|
|
||||||
Object.entries(env)
|
Object.entries(env)
|
||||||
.filter(
|
.filter(v => v.slice(0, 1).pop().toLowerCase() === 'path')
|
||||||
v =>
|
|
||||||
v
|
|
||||||
.slice(0, 1)
|
|
||||||
.pop()
|
|
||||||
.toLowerCase() === 'path',
|
|
||||||
)
|
|
||||||
.forEach(v => {
|
.forEach(v => {
|
||||||
const key = v.slice(0, 1).pop();
|
const key = v.slice(0, 1).pop();
|
||||||
env[key] = env[key] ? `${nodeModulesBinDir}:${env[key]}` : nodeModulesBinDir;
|
env[key] = env[key]
|
||||||
|
? `${nodeModulesBinDir}${isWindows() ? ';' : ':'}${env[key]}`
|
||||||
|
: nodeModulesBinDir;
|
||||||
});
|
});
|
||||||
return env;
|
return env;
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const cwd = process.cwd();
|
||||||
|
|
||||||
|
function getProjectPath(...filePath) {
|
||||||
|
return path.join(cwd, ...filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolve(moduleName) {
|
||||||
|
return require.resolve(moduleName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need hack the require to ensure use package module first
|
||||||
|
// For example, `typescript` is required by `gulp-typescript` but provided by `antd`
|
||||||
|
// we do not need for ant-design-vue
|
||||||
|
let injected = false;
|
||||||
|
function injectRequire() {
|
||||||
|
if (injected) return;
|
||||||
|
|
||||||
|
const Module = require('module');
|
||||||
|
|
||||||
|
const oriRequire = Module.prototype.require;
|
||||||
|
Module.prototype.require = function (...args) {
|
||||||
|
const moduleName = args[0];
|
||||||
|
try {
|
||||||
|
return oriRequire.apply(this, args);
|
||||||
|
} catch (err) {
|
||||||
|
const newArgs = [...args];
|
||||||
|
if (moduleName[0] !== '/') {
|
||||||
|
newArgs[0] = getProjectPath('node_modules', moduleName);
|
||||||
|
}
|
||||||
|
return oriRequire.apply(this, newArgs);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
injected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getConfig() {
|
||||||
|
const configPath = getProjectPath('.antd-tools.config.js');
|
||||||
|
if (fs.existsSync(configPath)) {
|
||||||
|
return require(configPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否存在可用的browserslist config
|
||||||
|
* https://github.com/browserslist/browserslist#queries
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function isThereHaveBrowserslistConfig() {
|
||||||
|
try {
|
||||||
|
const packageJson = require(getProjectPath('package.json'));
|
||||||
|
if (packageJson.browserslist) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
if (fs.existsSync(getProjectPath('.browserslistrc'))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (fs.existsSync(getProjectPath('browserslist'))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// parent项目的配置支持,需要再补充
|
||||||
|
// ROWSERSLIST ROWSERSLIST_ENV 变量的形式,需要再补充。
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
getProjectPath,
|
||||||
|
resolve,
|
||||||
|
injectRequire,
|
||||||
|
getConfig,
|
||||||
|
isThereHaveBrowserslistConfig,
|
||||||
|
};
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit a71e2eac4c9b38092fc8edd2282bdd91170fa04b
|
|
|
@ -1,16 +1,18 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
test: {
|
test: {
|
||||||
presets: [['@babel/preset-env', { targets: { node: true } }]],
|
presets: [['@babel/preset-env']],
|
||||||
plugins: [
|
plugins: [
|
||||||
['@ant-design-vue/babel-plugin-jsx'],
|
['@vue/babel-plugin-jsx', { mergeProps: false, enableObjectSlots: false }],
|
||||||
'@babel/plugin-proposal-optional-chaining',
|
'@babel/plugin-proposal-optional-chaining',
|
||||||
'@babel/plugin-transform-object-assign',
|
'@babel/plugin-transform-object-assign',
|
||||||
'@babel/plugin-proposal-object-rest-spread',
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
'@babel/plugin-proposal-export-default-from',
|
'@babel/plugin-proposal-export-default-from',
|
||||||
|
'@babel/plugin-proposal-export-namespace-from',
|
||||||
'@babel/plugin-proposal-class-properties',
|
'@babel/plugin-proposal-class-properties',
|
||||||
'@babel/plugin-syntax-dynamic-import',
|
'@babel/plugin-syntax-dynamic-import',
|
||||||
'@babel/plugin-transform-runtime',
|
'@babel/plugin-transform-runtime',
|
||||||
|
'transform-require-context',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
# break change
|
|
||||||
|
|
||||||
## global api
|
|
||||||
|
|
||||||
所有 dom 原生属性由驼峰改成全小写,涉及 API
|
|
||||||
|
|
||||||
####
|
|
||||||
|
|
||||||
maxLength -> maxlength tabIndex => tabindex readOnly => readonly autoComplete => autocomplete
|
|
||||||
|
|
||||||
## Tag
|
|
||||||
|
|
||||||
### CheckableTag
|
|
||||||
|
|
||||||
v-model -> v-model:checked
|
|
||||||
|
|
||||||
### Tag
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
移除 afterClose 属性
|
|
||||||
|
|
||||||
## Radio
|
|
||||||
|
|
||||||
radioGroup radio v-model -> v-model:value
|
|
||||||
|
|
||||||
## popconfirm
|
|
||||||
|
|
||||||
okButtonProps、cancelButtonProps 扁平化处理
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
## popover
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
## Tooltip
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
## Modal
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
okButtonProps、cancelButtonProps 扁平化处理
|
|
||||||
|
|
||||||
## Mentions
|
|
||||||
|
|
||||||
v-model -> v-model:value
|
|
||||||
|
|
||||||
## menu
|
|
||||||
|
|
||||||
v-model -> v-model:selectedKeys :openKeys.sync -> v-mdoel:openKeys
|
|
||||||
|
|
||||||
## dropdown
|
|
||||||
|
|
||||||
v-model -> v-model:visible
|
|
||||||
|
|
||||||
## Steps
|
|
||||||
|
|
||||||
v-model -> v-model:current
|
|
||||||
|
|
||||||
## checkbox
|
|
||||||
|
|
||||||
v-model -> v-model:checked
|
|
||||||
|
|
||||||
checkboxGroup
|
|
||||||
|
|
||||||
v-model -> v-model:value
|
|
||||||
|
|
||||||
## Switch
|
|
||||||
|
|
||||||
v-model -> v-model:checked
|
|
||||||
|
|
||||||
## tabs
|
|
||||||
|
|
||||||
v-model -> v-model:activeKey
|
|
||||||
|
|
||||||
renderTabBar({props, on, style, class}, DefaultTabBar) -> {DefaultTabBar, ...props} 多参数改成单参数并且扁平化处理
|
|
||||||
|
|
||||||
## card
|
|
||||||
|
|
||||||
tabList[{scopedSlots}] -> tabList[{slots}]
|
|
||||||
|
|
||||||
## rate
|
|
||||||
|
|
||||||
v-model -> v-model:value
|
|
||||||
|
|
||||||
## Collapse
|
|
||||||
|
|
||||||
v-model -> v-model:activeKey
|
|
||||||
|
|
||||||
## List
|
|
||||||
|
|
||||||
renderItem(item, index) => renderItem({item, index}) 该用单参数
|
|
||||||
|
|
||||||
## TreeSelect
|
|
||||||
|
|
||||||
treeData 中 scopedSlots => slots , v-model => v-model:value
|
|
||||||
|
|
||||||
## datePicker
|
|
||||||
|
|
||||||
dateRender
|
|
||||||
|
|
||||||
(current: moment.Moment, today: moment.Moment) => ({current: moment.Moment, today: moment.Moment})
|
|
||||||
|
|
||||||
monthCellContentRender (date, locale) => ({date, locale})
|
|
||||||
|
|
||||||
## table
|
|
||||||
|
|
||||||
customRender( text, record, index, column ); => customRender({ text, record, index, column });
|
|
||||||
|
|
||||||
expandedRowRender(record, index, indent, expanded) => expandedRowRender({ record, index, indent, expanded })
|
|
||||||
|
|
||||||
filterIcon(filtered, column) => filterIcon({ filtered, column })
|
|
||||||
|
|
||||||
## calendar
|
|
||||||
|
|
||||||
dateCellRender、dateFullCellRender、monthCellRender、monthFullCellRender
|
|
||||||
|
|
||||||
function (date, today?) => function({current, today?})
|
|
|
@ -0,0 +1,123 @@
|
||||||
|
import type { ExtractPropTypes, PropType } from 'vue';
|
||||||
|
import { shallowRef, onMounted, defineComponent, onBeforeUnmount } from 'vue';
|
||||||
|
import Button from '../button';
|
||||||
|
import type { ButtonProps } from '../button';
|
||||||
|
import type { LegacyButtonType } from '../button/buttonTypes';
|
||||||
|
import { convertLegacyProps } from '../button/buttonTypes';
|
||||||
|
import useDestroyed from './hooks/useDestroyed';
|
||||||
|
import { objectType } from './type';
|
||||||
|
import { findDOMNode } from './props-util';
|
||||||
|
|
||||||
|
const actionButtonProps = {
|
||||||
|
type: {
|
||||||
|
type: String as PropType<LegacyButtonType>,
|
||||||
|
},
|
||||||
|
actionFn: Function as PropType<(...args: any[]) => any | PromiseLike<any>>,
|
||||||
|
close: Function,
|
||||||
|
autofocus: Boolean,
|
||||||
|
prefixCls: String,
|
||||||
|
buttonProps: objectType<ButtonProps>(),
|
||||||
|
emitEvent: Boolean,
|
||||||
|
quitOnNullishReturnValue: Boolean,
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ActionButtonProps = ExtractPropTypes<typeof actionButtonProps>;
|
||||||
|
|
||||||
|
function isThenable<T>(thing?: PromiseLike<T>): boolean {
|
||||||
|
return !!(thing && thing.then);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
name: 'ActionButton',
|
||||||
|
props: actionButtonProps,
|
||||||
|
setup(props, { slots }) {
|
||||||
|
const clickedRef = shallowRef<boolean>(false);
|
||||||
|
const buttonRef = shallowRef();
|
||||||
|
const loading = shallowRef(false);
|
||||||
|
let timeoutId: any;
|
||||||
|
const isDestroyed = useDestroyed();
|
||||||
|
onMounted(() => {
|
||||||
|
if (props.autofocus) {
|
||||||
|
timeoutId = setTimeout(() => findDOMNode(buttonRef.value)?.focus?.());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
});
|
||||||
|
|
||||||
|
const onInternalClose = (...args: any[]) => {
|
||||||
|
props.close?.(...args);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePromiseOnOk = (returnValueOfOnOk?: PromiseLike<any>) => {
|
||||||
|
if (!isThenable(returnValueOfOnOk)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loading.value = true;
|
||||||
|
returnValueOfOnOk!.then(
|
||||||
|
(...args: any[]) => {
|
||||||
|
if (!isDestroyed.value) {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
onInternalClose(...args);
|
||||||
|
clickedRef.value = false;
|
||||||
|
},
|
||||||
|
(e: Error) => {
|
||||||
|
// See: https://github.com/ant-design/ant-design/issues/6183
|
||||||
|
if (!isDestroyed.value) {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
clickedRef.value = false;
|
||||||
|
return Promise.reject(e);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClick = (e: MouseEvent) => {
|
||||||
|
const { actionFn } = props;
|
||||||
|
if (clickedRef.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clickedRef.value = true;
|
||||||
|
if (!actionFn) {
|
||||||
|
onInternalClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let returnValueOfOnOk: PromiseLike<any>;
|
||||||
|
if (props.emitEvent) {
|
||||||
|
returnValueOfOnOk = actionFn(e);
|
||||||
|
if (props.quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {
|
||||||
|
clickedRef.value = false;
|
||||||
|
onInternalClose(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (actionFn.length) {
|
||||||
|
returnValueOfOnOk = actionFn(props.close);
|
||||||
|
// https://github.com/ant-design/ant-design/issues/23358
|
||||||
|
clickedRef.value = false;
|
||||||
|
} else {
|
||||||
|
returnValueOfOnOk = actionFn();
|
||||||
|
if (!returnValueOfOnOk) {
|
||||||
|
onInternalClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
handlePromiseOnOk(returnValueOfOnOk);
|
||||||
|
};
|
||||||
|
return () => {
|
||||||
|
const { type, prefixCls, buttonProps } = props;
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
{...convertLegacyProps(type)}
|
||||||
|
onClick={onClick}
|
||||||
|
loading={loading.value}
|
||||||
|
prefixCls={prefixCls}
|
||||||
|
{...buttonProps}
|
||||||
|
ref={buttonRef}
|
||||||
|
v-slots={slots}
|
||||||
|
></Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
|
@ -0,0 +1,168 @@
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
import { computed, defineComponent, shallowRef, ref, watch } from 'vue';
|
||||||
|
import PropTypes from './vue-types';
|
||||||
|
import type { BaseInputInnerExpose } from './BaseInputInner';
|
||||||
|
import BaseInputInner from './BaseInputInner';
|
||||||
|
import { styleObjectToString } from '../vc-util/Dom/css';
|
||||||
|
|
||||||
|
export interface BaseInputExpose {
|
||||||
|
focus: () => void;
|
||||||
|
blur: () => void;
|
||||||
|
input: HTMLInputElement | HTMLTextAreaElement | null;
|
||||||
|
setSelectionRange: (
|
||||||
|
start: number,
|
||||||
|
end: number,
|
||||||
|
direction?: 'forward' | 'backward' | 'none',
|
||||||
|
) => void;
|
||||||
|
select: () => void;
|
||||||
|
getSelectionStart: () => number | null;
|
||||||
|
getSelectionEnd: () => number | null;
|
||||||
|
getScrollTop: () => number | null;
|
||||||
|
setScrollTop: (scrollTop: number) => void;
|
||||||
|
}
|
||||||
|
const BaseInput = defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
inheritAttrs: false,
|
||||||
|
props: {
|
||||||
|
disabled: PropTypes.looseBool,
|
||||||
|
type: PropTypes.string,
|
||||||
|
value: PropTypes.any,
|
||||||
|
lazy: PropTypes.bool.def(true),
|
||||||
|
tag: {
|
||||||
|
type: String as PropType<'input' | 'textarea'>,
|
||||||
|
default: 'input',
|
||||||
|
},
|
||||||
|
size: PropTypes.string,
|
||||||
|
style: PropTypes.oneOfType([String, Object]),
|
||||||
|
class: PropTypes.string,
|
||||||
|
},
|
||||||
|
emits: [
|
||||||
|
'change',
|
||||||
|
'input',
|
||||||
|
'blur',
|
||||||
|
'keydown',
|
||||||
|
'focus',
|
||||||
|
'compositionstart',
|
||||||
|
'compositionend',
|
||||||
|
'keyup',
|
||||||
|
'paste',
|
||||||
|
'mousedown',
|
||||||
|
],
|
||||||
|
setup(props, { emit, attrs, expose }) {
|
||||||
|
const inputRef = shallowRef<BaseInputInnerExpose>(null);
|
||||||
|
const renderValue = ref();
|
||||||
|
const isComposing = ref(false);
|
||||||
|
watch(
|
||||||
|
[() => props.value, isComposing],
|
||||||
|
() => {
|
||||||
|
if (isComposing.value) return;
|
||||||
|
renderValue.value = props.value;
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
);
|
||||||
|
const handleChange = (e: Event) => {
|
||||||
|
emit('change', e);
|
||||||
|
};
|
||||||
|
const onCompositionstart = (e: CompositionEvent) => {
|
||||||
|
isComposing.value = true;
|
||||||
|
(e.target as any).composing = true;
|
||||||
|
emit('compositionstart', e);
|
||||||
|
};
|
||||||
|
const onCompositionend = (e: CompositionEvent) => {
|
||||||
|
isComposing.value = false;
|
||||||
|
(e.target as any).composing = false;
|
||||||
|
emit('compositionend', e);
|
||||||
|
const event = document.createEvent('HTMLEvents');
|
||||||
|
event.initEvent('input', true, true);
|
||||||
|
e.target.dispatchEvent(event);
|
||||||
|
handleChange(e);
|
||||||
|
};
|
||||||
|
const handleInput = (e: Event) => {
|
||||||
|
if (isComposing.value && props.lazy) {
|
||||||
|
renderValue.value = (e.target as HTMLInputElement).value;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit('input', e);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBlur = (e: Event) => {
|
||||||
|
emit('blur', e);
|
||||||
|
};
|
||||||
|
const handleFocus = (e: Event) => {
|
||||||
|
emit('focus', e);
|
||||||
|
};
|
||||||
|
|
||||||
|
const focus = () => {
|
||||||
|
if (inputRef.value) {
|
||||||
|
inputRef.value.focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const blur = () => {
|
||||||
|
if (inputRef.value) {
|
||||||
|
inputRef.value.blur();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
|
emit('keydown', e);
|
||||||
|
};
|
||||||
|
const handleKeyUp = (e: KeyboardEvent) => {
|
||||||
|
emit('keyup', e);
|
||||||
|
};
|
||||||
|
const setSelectionRange = (
|
||||||
|
start: number,
|
||||||
|
end: number,
|
||||||
|
direction?: 'forward' | 'backward' | 'none',
|
||||||
|
) => {
|
||||||
|
inputRef.value?.setSelectionRange(start, end, direction);
|
||||||
|
};
|
||||||
|
|
||||||
|
const select = () => {
|
||||||
|
inputRef.value?.select();
|
||||||
|
};
|
||||||
|
expose({
|
||||||
|
focus,
|
||||||
|
blur,
|
||||||
|
input: computed(() => inputRef.value?.input),
|
||||||
|
setSelectionRange,
|
||||||
|
select,
|
||||||
|
getSelectionStart: () => inputRef.value?.getSelectionStart(),
|
||||||
|
getSelectionEnd: () => inputRef.value?.getSelectionEnd(),
|
||||||
|
getScrollTop: () => inputRef.value?.getScrollTop(),
|
||||||
|
});
|
||||||
|
const handleMousedown = (e: MouseEvent) => {
|
||||||
|
emit('mousedown', e);
|
||||||
|
};
|
||||||
|
const handlePaste = (e: ClipboardEvent) => {
|
||||||
|
emit('paste', e);
|
||||||
|
};
|
||||||
|
const styleString = computed(() => {
|
||||||
|
return props.style && typeof props.style !== 'string'
|
||||||
|
? styleObjectToString(props.style)
|
||||||
|
: props.style;
|
||||||
|
});
|
||||||
|
return () => {
|
||||||
|
const { style, lazy, ...restProps } = props;
|
||||||
|
return (
|
||||||
|
<BaseInputInner
|
||||||
|
{...restProps}
|
||||||
|
{...attrs}
|
||||||
|
style={styleString.value}
|
||||||
|
onInput={handleInput}
|
||||||
|
onChange={handleChange}
|
||||||
|
onBlur={handleBlur}
|
||||||
|
onFocus={handleFocus}
|
||||||
|
ref={inputRef}
|
||||||
|
value={renderValue.value}
|
||||||
|
onCompositionstart={onCompositionstart}
|
||||||
|
onCompositionend={onCompositionend}
|
||||||
|
onKeyup={handleKeyUp}
|
||||||
|
onKeydown={handleKeyDown}
|
||||||
|
onPaste={handlePaste}
|
||||||
|
onMousedown={handleMousedown}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default BaseInput;
|
|
@ -0,0 +1,96 @@
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
import { defineComponent, shallowRef } from 'vue';
|
||||||
|
import PropTypes from './vue-types';
|
||||||
|
|
||||||
|
export interface BaseInputInnerExpose {
|
||||||
|
focus: () => void;
|
||||||
|
blur: () => void;
|
||||||
|
input: HTMLInputElement | HTMLTextAreaElement | null;
|
||||||
|
setSelectionRange: (
|
||||||
|
start: number,
|
||||||
|
end: number,
|
||||||
|
direction?: 'forward' | 'backward' | 'none',
|
||||||
|
) => void;
|
||||||
|
select: () => void;
|
||||||
|
getSelectionStart: () => number | null;
|
||||||
|
getSelectionEnd: () => number | null;
|
||||||
|
getScrollTop: () => number | null;
|
||||||
|
setScrollTop: (scrollTop: number) => void;
|
||||||
|
}
|
||||||
|
const BaseInputInner = defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
// inheritAttrs: false,
|
||||||
|
props: {
|
||||||
|
disabled: PropTypes.looseBool,
|
||||||
|
type: PropTypes.string,
|
||||||
|
value: PropTypes.any,
|
||||||
|
tag: {
|
||||||
|
type: String as PropType<'input' | 'textarea'>,
|
||||||
|
default: 'input',
|
||||||
|
},
|
||||||
|
size: PropTypes.string,
|
||||||
|
onChange: Function as PropType<(e: Event) => void>,
|
||||||
|
onInput: Function as PropType<(e: Event) => void>,
|
||||||
|
onBlur: Function as PropType<(e: Event) => void>,
|
||||||
|
onFocus: Function as PropType<(e: Event) => void>,
|
||||||
|
onKeydown: Function as PropType<(e: Event) => void>,
|
||||||
|
onCompositionstart: Function as PropType<(e: Event) => void>,
|
||||||
|
onCompositionend: Function as PropType<(e: Event) => void>,
|
||||||
|
onKeyup: Function as PropType<(e: Event) => void>,
|
||||||
|
onPaste: Function as PropType<(e: Event) => void>,
|
||||||
|
onMousedown: Function as PropType<(e: Event) => void>,
|
||||||
|
},
|
||||||
|
emits: [
|
||||||
|
'change',
|
||||||
|
'input',
|
||||||
|
'blur',
|
||||||
|
'keydown',
|
||||||
|
'focus',
|
||||||
|
'compositionstart',
|
||||||
|
'compositionend',
|
||||||
|
'keyup',
|
||||||
|
'paste',
|
||||||
|
'mousedown',
|
||||||
|
],
|
||||||
|
setup(props, { expose }) {
|
||||||
|
const inputRef = shallowRef(null);
|
||||||
|
|
||||||
|
const focus = () => {
|
||||||
|
if (inputRef.value) {
|
||||||
|
inputRef.value.focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const blur = () => {
|
||||||
|
if (inputRef.value) {
|
||||||
|
inputRef.value.blur();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const setSelectionRange = (
|
||||||
|
start: number,
|
||||||
|
end: number,
|
||||||
|
direction?: 'forward' | 'backward' | 'none',
|
||||||
|
) => {
|
||||||
|
inputRef.value?.setSelectionRange(start, end, direction);
|
||||||
|
};
|
||||||
|
|
||||||
|
const select = () => {
|
||||||
|
inputRef.value?.select();
|
||||||
|
};
|
||||||
|
expose({
|
||||||
|
focus,
|
||||||
|
blur,
|
||||||
|
input: inputRef,
|
||||||
|
setSelectionRange,
|
||||||
|
select,
|
||||||
|
getSelectionStart: () => inputRef.value?.selectionStart,
|
||||||
|
getSelectionEnd: () => inputRef.value?.selectionEnd,
|
||||||
|
getScrollTop: () => inputRef.value?.scrollTop,
|
||||||
|
});
|
||||||
|
return () => {
|
||||||
|
const { tag: Tag, value, ...restProps } = props;
|
||||||
|
return <Tag {...restProps} ref={inputRef} value={value} />;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default BaseInputInner;
|
|
@ -1,43 +0,0 @@
|
||||||
import { getOptionProps } from './props-util';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
methods: {
|
|
||||||
setState(state = {}, callback) {
|
|
||||||
let newState = typeof state === 'function' ? state(this.$data, this.$props) : state;
|
|
||||||
if (this.getDerivedStateFromProps) {
|
|
||||||
const s = this.getDerivedStateFromProps(getOptionProps(this), {
|
|
||||||
...this.$data,
|
|
||||||
...newState,
|
|
||||||
});
|
|
||||||
if (s === null) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
newState = { ...newState, ...(s || {}) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Object.assign(this.$data, newState);
|
|
||||||
if (this._.isMounted) {
|
|
||||||
this.$forceUpdate();
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
callback && callback();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
__emit() {
|
|
||||||
// 直接调用事件,底层组件不需要vueTool记录events
|
|
||||||
const args = [].slice.call(arguments, 0);
|
|
||||||
let eventName = args[0];
|
|
||||||
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
|
|
||||||
const event = this.$props[eventName] || this.$attrs[eventName];
|
|
||||||
if (args.length && event) {
|
|
||||||
if (Array.isArray(event)) {
|
|
||||||
for (let i = 0, l = event.length; i < l; i++) {
|
|
||||||
event[i](...args.slice(1));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
event(...args.slice(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
import { nextTick } from 'vue';
|
||||||
|
import { getOptionProps } from './props-util';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
setState(state = {}, callback: () => any) {
|
||||||
|
let newState = typeof state === 'function' ? state(this.$data, this.$props) : state;
|
||||||
|
if (this.getDerivedStateFromProps) {
|
||||||
|
const s = this.getDerivedStateFromProps(getOptionProps(this), {
|
||||||
|
...this.$data,
|
||||||
|
...newState,
|
||||||
|
});
|
||||||
|
if (s === null) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
newState = { ...newState, ...(s || {}) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object.assign(this.$data, newState);
|
||||||
|
if (this._.isMounted) {
|
||||||
|
this.$forceUpdate();
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
callback && callback();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
__emit() {
|
||||||
|
// 直接调用事件,底层组件不需要vueTool记录events
|
||||||
|
// eslint-disable-next-line prefer-rest-params
|
||||||
|
const args = [].slice.call(arguments, 0);
|
||||||
|
let eventName = args[0];
|
||||||
|
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
|
||||||
|
const event = this.$props[eventName] || this.$attrs[eventName];
|
||||||
|
if (args.length && event) {
|
||||||
|
if (Array.isArray(event)) {
|
||||||
|
for (let i = 0, l = event.length; i < l; i++) {
|
||||||
|
event[i](...args.slice(1));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
event(...args.slice(1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -1,43 +0,0 @@
|
||||||
import { getOptionProps } from './props-util';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
methods: {
|
|
||||||
setState(state = {}, callback) {
|
|
||||||
let newState = typeof state === 'function' ? state(this, this.$props) : state;
|
|
||||||
if (this.getDerivedStateFromProps) {
|
|
||||||
const s = this.getDerivedStateFromProps(getOptionProps(this), {
|
|
||||||
...this,
|
|
||||||
...newState,
|
|
||||||
});
|
|
||||||
if (s === null) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
newState = { ...newState, ...(s || {}) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Object.assign(this, newState);
|
|
||||||
if (this._.isMounted) {
|
|
||||||
this.$forceUpdate();
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
callback && callback();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
__emit() {
|
|
||||||
// 直接调用事件,底层组件不需要vueTool记录events
|
|
||||||
const args = [].slice.call(arguments, 0);
|
|
||||||
let eventName = args[0];
|
|
||||||
eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
|
|
||||||
const event = this.$props[eventName] || this.$attrs[eventName];
|
|
||||||
if (args.length && event) {
|
|
||||||
if (Array.isArray(event)) {
|
|
||||||
for (let i = 0, l = event.length; i < l; i++) {
|
|
||||||
event[i](...args.slice(1));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
event(...args.slice(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,98 +0,0 @@
|
||||||
import PropTypes from './vue-types';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
autoMount: PropTypes.bool.def(true),
|
|
||||||
autoDestroy: PropTypes.bool.def(true),
|
|
||||||
visible: PropTypes.bool,
|
|
||||||
forceRender: PropTypes.bool.def(false),
|
|
||||||
parent: PropTypes.any,
|
|
||||||
getComponent: PropTypes.func.isRequired,
|
|
||||||
getContainer: PropTypes.func.isRequired,
|
|
||||||
children: PropTypes.func.isRequired,
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
if (this.autoMount) {
|
|
||||||
this.renderComponent();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
updated() {
|
|
||||||
if (this.autoMount) {
|
|
||||||
this.renderComponent();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeUnmount() {
|
|
||||||
if (this.autoDestroy) {
|
|
||||||
this.removeContainer();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
removeContainer() {
|
|
||||||
if (this.container) {
|
|
||||||
this._component && this._component.$destroy();
|
|
||||||
this.container.parentNode.removeChild(this.container);
|
|
||||||
this.container = null;
|
|
||||||
this._component = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
renderComponent(props = {}, ready) {
|
|
||||||
const { visible, forceRender, getContainer, parent } = this;
|
|
||||||
const self = this;
|
|
||||||
if (visible || parent._component || parent.$refs._component || forceRender) {
|
|
||||||
let el = this.componentEl;
|
|
||||||
if (!this.container) {
|
|
||||||
this.container = getContainer();
|
|
||||||
el = document.createElement('div');
|
|
||||||
this.componentEl = el;
|
|
||||||
this.container.appendChild(el);
|
|
||||||
}
|
|
||||||
// self.getComponent 不要放在 render 中,会因为响应式数据问题导致,多次触发 render
|
|
||||||
const com = { component: self.getComponent(props) };
|
|
||||||
if (!this._component) {
|
|
||||||
this._component = new this.$root.constructor({
|
|
||||||
el,
|
|
||||||
parent: self,
|
|
||||||
data: {
|
|
||||||
_com: com,
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (ready) {
|
|
||||||
ready.call(self);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
updated() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (ready) {
|
|
||||||
ready.call(self);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
setComponent(_com) {
|
|
||||||
this.$data._com = _com;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
render() {
|
|
||||||
return this.$data._com.component;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this._component.setComponent(com);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return this.children({
|
|
||||||
renderComponent: this.renderComponent,
|
|
||||||
removeContainer: this.removeContainer,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
export type FocusEventHandler = (e: FocusEvent) => void;
|
||||||
|
export type MouseEventHandler = (e: MouseEvent) => void;
|
||||||
|
export type KeyboardEventHandler = (e: KeyboardEvent) => void;
|
||||||
|
export type CompositionEventHandler = (e: CompositionEvent) => void;
|
||||||
|
export type ClipboardEventHandler = (e: ClipboardEvent) => void;
|
||||||
|
export type ChangeEventHandler = (e: ChangeEvent) => void;
|
||||||
|
export type WheelEventHandler = (e: WheelEvent) => void;
|
||||||
|
export type ChangeEvent = Event & {
|
||||||
|
target: {
|
||||||
|
value?: string | undefined;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type CheckboxChangeEvent = Event & {
|
||||||
|
target: {
|
||||||
|
checked?: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type EventHandler = (...args: any[]) => void;
|
|
@ -1,10 +0,0 @@
|
||||||
export function antDecorator(Vue) {
|
|
||||||
return Vue.directive('decorator', {});
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// just for tag
|
|
||||||
install: Vue => {
|
|
||||||
antDecorator(Vue);
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,521 +0,0 @@
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
* some key-codes definition and utils from closure-library
|
|
||||||
* @author yiminghe@gmail.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
const KeyCode = {
|
|
||||||
/**
|
|
||||||
* MAC_ENTER
|
|
||||||
*/
|
|
||||||
MAC_ENTER: 3,
|
|
||||||
/**
|
|
||||||
* BACKSPACE
|
|
||||||
*/
|
|
||||||
BACKSPACE: 8,
|
|
||||||
/**
|
|
||||||
* TAB
|
|
||||||
*/
|
|
||||||
TAB: 9,
|
|
||||||
/**
|
|
||||||
* NUMLOCK on FF/Safari Mac
|
|
||||||
*/
|
|
||||||
NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
|
|
||||||
/**
|
|
||||||
* ENTER
|
|
||||||
*/
|
|
||||||
ENTER: 13,
|
|
||||||
/**
|
|
||||||
* SHIFT
|
|
||||||
*/
|
|
||||||
SHIFT: 16,
|
|
||||||
/**
|
|
||||||
* CTRL
|
|
||||||
*/
|
|
||||||
CTRL: 17,
|
|
||||||
/**
|
|
||||||
* ALT
|
|
||||||
*/
|
|
||||||
ALT: 18,
|
|
||||||
/**
|
|
||||||
* PAUSE
|
|
||||||
*/
|
|
||||||
PAUSE: 19,
|
|
||||||
/**
|
|
||||||
* CAPS_LOCK
|
|
||||||
*/
|
|
||||||
CAPS_LOCK: 20,
|
|
||||||
/**
|
|
||||||
* ESC
|
|
||||||
*/
|
|
||||||
ESC: 27,
|
|
||||||
/**
|
|
||||||
* SPACE
|
|
||||||
*/
|
|
||||||
SPACE: 32,
|
|
||||||
/**
|
|
||||||
* PAGE_UP
|
|
||||||
*/
|
|
||||||
PAGE_UP: 33, // also NUM_NORTH_EAST
|
|
||||||
/**
|
|
||||||
* PAGE_DOWN
|
|
||||||
*/
|
|
||||||
PAGE_DOWN: 34, // also NUM_SOUTH_EAST
|
|
||||||
/**
|
|
||||||
* END
|
|
||||||
*/
|
|
||||||
END: 35, // also NUM_SOUTH_WEST
|
|
||||||
/**
|
|
||||||
* HOME
|
|
||||||
*/
|
|
||||||
HOME: 36, // also NUM_NORTH_WEST
|
|
||||||
/**
|
|
||||||
* LEFT
|
|
||||||
*/
|
|
||||||
LEFT: 37, // also NUM_WEST
|
|
||||||
/**
|
|
||||||
* UP
|
|
||||||
*/
|
|
||||||
UP: 38, // also NUM_NORTH
|
|
||||||
/**
|
|
||||||
* RIGHT
|
|
||||||
*/
|
|
||||||
RIGHT: 39, // also NUM_EAST
|
|
||||||
/**
|
|
||||||
* DOWN
|
|
||||||
*/
|
|
||||||
DOWN: 40, // also NUM_SOUTH
|
|
||||||
/**
|
|
||||||
* PRINT_SCREEN
|
|
||||||
*/
|
|
||||||
PRINT_SCREEN: 44,
|
|
||||||
/**
|
|
||||||
* INSERT
|
|
||||||
*/
|
|
||||||
INSERT: 45, // also NUM_INSERT
|
|
||||||
/**
|
|
||||||
* DELETE
|
|
||||||
*/
|
|
||||||
DELETE: 46, // also NUM_DELETE
|
|
||||||
/**
|
|
||||||
* ZERO
|
|
||||||
*/
|
|
||||||
ZERO: 48,
|
|
||||||
/**
|
|
||||||
* ONE
|
|
||||||
*/
|
|
||||||
ONE: 49,
|
|
||||||
/**
|
|
||||||
* TWO
|
|
||||||
*/
|
|
||||||
TWO: 50,
|
|
||||||
/**
|
|
||||||
* THREE
|
|
||||||
*/
|
|
||||||
THREE: 51,
|
|
||||||
/**
|
|
||||||
* FOUR
|
|
||||||
*/
|
|
||||||
FOUR: 52,
|
|
||||||
/**
|
|
||||||
* FIVE
|
|
||||||
*/
|
|
||||||
FIVE: 53,
|
|
||||||
/**
|
|
||||||
* SIX
|
|
||||||
*/
|
|
||||||
SIX: 54,
|
|
||||||
/**
|
|
||||||
* SEVEN
|
|
||||||
*/
|
|
||||||
SEVEN: 55,
|
|
||||||
/**
|
|
||||||
* EIGHT
|
|
||||||
*/
|
|
||||||
EIGHT: 56,
|
|
||||||
/**
|
|
||||||
* NINE
|
|
||||||
*/
|
|
||||||
NINE: 57,
|
|
||||||
/**
|
|
||||||
* QUESTION_MARK
|
|
||||||
*/
|
|
||||||
QUESTION_MARK: 63, // needs localization
|
|
||||||
/**
|
|
||||||
* A
|
|
||||||
*/
|
|
||||||
A: 65,
|
|
||||||
/**
|
|
||||||
* B
|
|
||||||
*/
|
|
||||||
B: 66,
|
|
||||||
/**
|
|
||||||
* C
|
|
||||||
*/
|
|
||||||
C: 67,
|
|
||||||
/**
|
|
||||||
* D
|
|
||||||
*/
|
|
||||||
D: 68,
|
|
||||||
/**
|
|
||||||
* E
|
|
||||||
*/
|
|
||||||
E: 69,
|
|
||||||
/**
|
|
||||||
* F
|
|
||||||
*/
|
|
||||||
F: 70,
|
|
||||||
/**
|
|
||||||
* G
|
|
||||||
*/
|
|
||||||
G: 71,
|
|
||||||
/**
|
|
||||||
* H
|
|
||||||
*/
|
|
||||||
H: 72,
|
|
||||||
/**
|
|
||||||
* I
|
|
||||||
*/
|
|
||||||
I: 73,
|
|
||||||
/**
|
|
||||||
* J
|
|
||||||
*/
|
|
||||||
J: 74,
|
|
||||||
/**
|
|
||||||
* K
|
|
||||||
*/
|
|
||||||
K: 75,
|
|
||||||
/**
|
|
||||||
* L
|
|
||||||
*/
|
|
||||||
L: 76,
|
|
||||||
/**
|
|
||||||
* M
|
|
||||||
*/
|
|
||||||
M: 77,
|
|
||||||
/**
|
|
||||||
* N
|
|
||||||
*/
|
|
||||||
N: 78,
|
|
||||||
/**
|
|
||||||
* O
|
|
||||||
*/
|
|
||||||
O: 79,
|
|
||||||
/**
|
|
||||||
* P
|
|
||||||
*/
|
|
||||||
P: 80,
|
|
||||||
/**
|
|
||||||
* Q
|
|
||||||
*/
|
|
||||||
Q: 81,
|
|
||||||
/**
|
|
||||||
* R
|
|
||||||
*/
|
|
||||||
R: 82,
|
|
||||||
/**
|
|
||||||
* S
|
|
||||||
*/
|
|
||||||
S: 83,
|
|
||||||
/**
|
|
||||||
* T
|
|
||||||
*/
|
|
||||||
T: 84,
|
|
||||||
/**
|
|
||||||
* U
|
|
||||||
*/
|
|
||||||
U: 85,
|
|
||||||
/**
|
|
||||||
* V
|
|
||||||
*/
|
|
||||||
V: 86,
|
|
||||||
/**
|
|
||||||
* W
|
|
||||||
*/
|
|
||||||
W: 87,
|
|
||||||
/**
|
|
||||||
* X
|
|
||||||
*/
|
|
||||||
X: 88,
|
|
||||||
/**
|
|
||||||
* Y
|
|
||||||
*/
|
|
||||||
Y: 89,
|
|
||||||
/**
|
|
||||||
* Z
|
|
||||||
*/
|
|
||||||
Z: 90,
|
|
||||||
/**
|
|
||||||
* META
|
|
||||||
*/
|
|
||||||
META: 91, // WIN_KEY_LEFT
|
|
||||||
/**
|
|
||||||
* WIN_KEY_RIGHT
|
|
||||||
*/
|
|
||||||
WIN_KEY_RIGHT: 92,
|
|
||||||
/**
|
|
||||||
* CONTEXT_MENU
|
|
||||||
*/
|
|
||||||
CONTEXT_MENU: 93,
|
|
||||||
/**
|
|
||||||
* NUM_ZERO
|
|
||||||
*/
|
|
||||||
NUM_ZERO: 96,
|
|
||||||
/**
|
|
||||||
* NUM_ONE
|
|
||||||
*/
|
|
||||||
NUM_ONE: 97,
|
|
||||||
/**
|
|
||||||
* NUM_TWO
|
|
||||||
*/
|
|
||||||
NUM_TWO: 98,
|
|
||||||
/**
|
|
||||||
* NUM_THREE
|
|
||||||
*/
|
|
||||||
NUM_THREE: 99,
|
|
||||||
/**
|
|
||||||
* NUM_FOUR
|
|
||||||
*/
|
|
||||||
NUM_FOUR: 100,
|
|
||||||
/**
|
|
||||||
* NUM_FIVE
|
|
||||||
*/
|
|
||||||
NUM_FIVE: 101,
|
|
||||||
/**
|
|
||||||
* NUM_SIX
|
|
||||||
*/
|
|
||||||
NUM_SIX: 102,
|
|
||||||
/**
|
|
||||||
* NUM_SEVEN
|
|
||||||
*/
|
|
||||||
NUM_SEVEN: 103,
|
|
||||||
/**
|
|
||||||
* NUM_EIGHT
|
|
||||||
*/
|
|
||||||
NUM_EIGHT: 104,
|
|
||||||
/**
|
|
||||||
* NUM_NINE
|
|
||||||
*/
|
|
||||||
NUM_NINE: 105,
|
|
||||||
/**
|
|
||||||
* NUM_MULTIPLY
|
|
||||||
*/
|
|
||||||
NUM_MULTIPLY: 106,
|
|
||||||
/**
|
|
||||||
* NUM_PLUS
|
|
||||||
*/
|
|
||||||
NUM_PLUS: 107,
|
|
||||||
/**
|
|
||||||
* NUM_MINUS
|
|
||||||
*/
|
|
||||||
NUM_MINUS: 109,
|
|
||||||
/**
|
|
||||||
* NUM_PERIOD
|
|
||||||
*/
|
|
||||||
NUM_PERIOD: 110,
|
|
||||||
/**
|
|
||||||
* NUM_DIVISION
|
|
||||||
*/
|
|
||||||
NUM_DIVISION: 111,
|
|
||||||
/**
|
|
||||||
* F1
|
|
||||||
*/
|
|
||||||
F1: 112,
|
|
||||||
/**
|
|
||||||
* F2
|
|
||||||
*/
|
|
||||||
F2: 113,
|
|
||||||
/**
|
|
||||||
* F3
|
|
||||||
*/
|
|
||||||
F3: 114,
|
|
||||||
/**
|
|
||||||
* F4
|
|
||||||
*/
|
|
||||||
F4: 115,
|
|
||||||
/**
|
|
||||||
* F5
|
|
||||||
*/
|
|
||||||
F5: 116,
|
|
||||||
/**
|
|
||||||
* F6
|
|
||||||
*/
|
|
||||||
F6: 117,
|
|
||||||
/**
|
|
||||||
* F7
|
|
||||||
*/
|
|
||||||
F7: 118,
|
|
||||||
/**
|
|
||||||
* F8
|
|
||||||
*/
|
|
||||||
F8: 119,
|
|
||||||
/**
|
|
||||||
* F9
|
|
||||||
*/
|
|
||||||
F9: 120,
|
|
||||||
/**
|
|
||||||
* F10
|
|
||||||
*/
|
|
||||||
F10: 121,
|
|
||||||
/**
|
|
||||||
* F11
|
|
||||||
*/
|
|
||||||
F11: 122,
|
|
||||||
/**
|
|
||||||
* F12
|
|
||||||
*/
|
|
||||||
F12: 123,
|
|
||||||
/**
|
|
||||||
* NUMLOCK
|
|
||||||
*/
|
|
||||||
NUMLOCK: 144,
|
|
||||||
/**
|
|
||||||
* SEMICOLON
|
|
||||||
*/
|
|
||||||
SEMICOLON: 186, // needs localization
|
|
||||||
/**
|
|
||||||
* DASH
|
|
||||||
*/
|
|
||||||
DASH: 189, // needs localization
|
|
||||||
/**
|
|
||||||
* EQUALS
|
|
||||||
*/
|
|
||||||
EQUALS: 187, // needs localization
|
|
||||||
/**
|
|
||||||
* COMMA
|
|
||||||
*/
|
|
||||||
COMMA: 188, // needs localization
|
|
||||||
/**
|
|
||||||
* PERIOD
|
|
||||||
*/
|
|
||||||
PERIOD: 190, // needs localization
|
|
||||||
/**
|
|
||||||
* SLASH
|
|
||||||
*/
|
|
||||||
SLASH: 191, // needs localization
|
|
||||||
/**
|
|
||||||
* APOSTROPHE
|
|
||||||
*/
|
|
||||||
APOSTROPHE: 192, // needs localization
|
|
||||||
/**
|
|
||||||
* SINGLE_QUOTE
|
|
||||||
*/
|
|
||||||
SINGLE_QUOTE: 222, // needs localization
|
|
||||||
/**
|
|
||||||
* OPEN_SQUARE_BRACKET
|
|
||||||
*/
|
|
||||||
OPEN_SQUARE_BRACKET: 219, // needs localization
|
|
||||||
/**
|
|
||||||
* BACKSLASH
|
|
||||||
*/
|
|
||||||
BACKSLASH: 220, // needs localization
|
|
||||||
/**
|
|
||||||
* CLOSE_SQUARE_BRACKET
|
|
||||||
*/
|
|
||||||
CLOSE_SQUARE_BRACKET: 221, // needs localization
|
|
||||||
/**
|
|
||||||
* WIN_KEY
|
|
||||||
*/
|
|
||||||
WIN_KEY: 224,
|
|
||||||
/**
|
|
||||||
* MAC_FF_META
|
|
||||||
*/
|
|
||||||
MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
|
|
||||||
/**
|
|
||||||
* WIN_IME
|
|
||||||
*/
|
|
||||||
WIN_IME: 229,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
whether text and modified key is entered at the same time.
|
|
||||||
*/
|
|
||||||
KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
|
|
||||||
const keyCode = e.keyCode;
|
|
||||||
if (
|
|
||||||
(e.altKey && !e.ctrlKey) ||
|
|
||||||
e.metaKey ||
|
|
||||||
// Function keys don't generate text
|
|
||||||
(keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The following keys are quite harmless, even in combination with
|
|
||||||
// CTRL, ALT or SHIFT.
|
|
||||||
switch (keyCode) {
|
|
||||||
case KeyCode.ALT:
|
|
||||||
case KeyCode.CAPS_LOCK:
|
|
||||||
case KeyCode.CONTEXT_MENU:
|
|
||||||
case KeyCode.CTRL:
|
|
||||||
case KeyCode.DOWN:
|
|
||||||
case KeyCode.END:
|
|
||||||
case KeyCode.ESC:
|
|
||||||
case KeyCode.HOME:
|
|
||||||
case KeyCode.INSERT:
|
|
||||||
case KeyCode.LEFT:
|
|
||||||
case KeyCode.MAC_FF_META:
|
|
||||||
case KeyCode.META:
|
|
||||||
case KeyCode.NUMLOCK:
|
|
||||||
case KeyCode.NUM_CENTER:
|
|
||||||
case KeyCode.PAGE_DOWN:
|
|
||||||
case KeyCode.PAGE_UP:
|
|
||||||
case KeyCode.PAUSE:
|
|
||||||
case KeyCode.PRINT_SCREEN:
|
|
||||||
case KeyCode.RIGHT:
|
|
||||||
case KeyCode.SHIFT:
|
|
||||||
case KeyCode.UP:
|
|
||||||
case KeyCode.WIN_KEY:
|
|
||||||
case KeyCode.WIN_KEY_RIGHT:
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
whether character is entered.
|
|
||||||
*/
|
|
||||||
KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
|
|
||||||
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Safari sends zero key code for non-latin characters.
|
|
||||||
if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (keyCode) {
|
|
||||||
case KeyCode.SPACE:
|
|
||||||
case KeyCode.QUESTION_MARK:
|
|
||||||
case KeyCode.NUM_PLUS:
|
|
||||||
case KeyCode.NUM_MINUS:
|
|
||||||
case KeyCode.NUM_PERIOD:
|
|
||||||
case KeyCode.NUM_DIVISION:
|
|
||||||
case KeyCode.SEMICOLON:
|
|
||||||
case KeyCode.DASH:
|
|
||||||
case KeyCode.EQUALS:
|
|
||||||
case KeyCode.COMMA:
|
|
||||||
case KeyCode.PERIOD:
|
|
||||||
case KeyCode.SLASH:
|
|
||||||
case KeyCode.APOSTROPHE:
|
|
||||||
case KeyCode.SINGLE_QUOTE:
|
|
||||||
case KeyCode.OPEN_SQUARE_BRACKET:
|
|
||||||
case KeyCode.BACKSLASH:
|
|
||||||
case KeyCode.CLOSE_SQUARE_BRACKET:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default KeyCode;
|
|
|
@ -0,0 +1,522 @@
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
* some key-codes definition and utils from closure-library
|
||||||
|
* @author yiminghe@gmail.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
const KeyCode = {
|
||||||
|
/**
|
||||||
|
* MAC_ENTER
|
||||||
|
*/
|
||||||
|
MAC_ENTER: 3,
|
||||||
|
/**
|
||||||
|
* BACKSPACE
|
||||||
|
*/
|
||||||
|
BACKSPACE: 8,
|
||||||
|
/**
|
||||||
|
* TAB
|
||||||
|
*/
|
||||||
|
TAB: 9,
|
||||||
|
/**
|
||||||
|
* NUMLOCK on FF/Safari Mac
|
||||||
|
*/
|
||||||
|
NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
|
||||||
|
/**
|
||||||
|
* ENTER
|
||||||
|
*/
|
||||||
|
ENTER: 13,
|
||||||
|
/**
|
||||||
|
* SHIFT
|
||||||
|
*/
|
||||||
|
SHIFT: 16,
|
||||||
|
/**
|
||||||
|
* CTRL
|
||||||
|
*/
|
||||||
|
CTRL: 17,
|
||||||
|
/**
|
||||||
|
* ALT
|
||||||
|
*/
|
||||||
|
ALT: 18,
|
||||||
|
/**
|
||||||
|
* PAUSE
|
||||||
|
*/
|
||||||
|
PAUSE: 19,
|
||||||
|
/**
|
||||||
|
* CAPS_LOCK
|
||||||
|
*/
|
||||||
|
CAPS_LOCK: 20,
|
||||||
|
/**
|
||||||
|
* ESC
|
||||||
|
*/
|
||||||
|
ESC: 27,
|
||||||
|
/**
|
||||||
|
* SPACE
|
||||||
|
*/
|
||||||
|
SPACE: 32,
|
||||||
|
/**
|
||||||
|
* PAGE_UP
|
||||||
|
*/
|
||||||
|
PAGE_UP: 33, // also NUM_NORTH_EAST
|
||||||
|
/**
|
||||||
|
* PAGE_DOWN
|
||||||
|
*/
|
||||||
|
PAGE_DOWN: 34, // also NUM_SOUTH_EAST
|
||||||
|
/**
|
||||||
|
* END
|
||||||
|
*/
|
||||||
|
END: 35, // also NUM_SOUTH_WEST
|
||||||
|
/**
|
||||||
|
* HOME
|
||||||
|
*/
|
||||||
|
HOME: 36, // also NUM_NORTH_WEST
|
||||||
|
/**
|
||||||
|
* LEFT
|
||||||
|
*/
|
||||||
|
LEFT: 37, // also NUM_WEST
|
||||||
|
/**
|
||||||
|
* UP
|
||||||
|
*/
|
||||||
|
UP: 38, // also NUM_NORTH
|
||||||
|
/**
|
||||||
|
* RIGHT
|
||||||
|
*/
|
||||||
|
RIGHT: 39, // also NUM_EAST
|
||||||
|
/**
|
||||||
|
* DOWN
|
||||||
|
*/
|
||||||
|
DOWN: 40, // also NUM_SOUTH
|
||||||
|
/**
|
||||||
|
* PRINT_SCREEN
|
||||||
|
*/
|
||||||
|
PRINT_SCREEN: 44,
|
||||||
|
/**
|
||||||
|
* INSERT
|
||||||
|
*/
|
||||||
|
INSERT: 45, // also NUM_INSERT
|
||||||
|
/**
|
||||||
|
* DELETE
|
||||||
|
*/
|
||||||
|
DELETE: 46, // also NUM_DELETE
|
||||||
|
/**
|
||||||
|
* ZERO
|
||||||
|
*/
|
||||||
|
ZERO: 48,
|
||||||
|
/**
|
||||||
|
* ONE
|
||||||
|
*/
|
||||||
|
ONE: 49,
|
||||||
|
/**
|
||||||
|
* TWO
|
||||||
|
*/
|
||||||
|
TWO: 50,
|
||||||
|
/**
|
||||||
|
* THREE
|
||||||
|
*/
|
||||||
|
THREE: 51,
|
||||||
|
/**
|
||||||
|
* FOUR
|
||||||
|
*/
|
||||||
|
FOUR: 52,
|
||||||
|
/**
|
||||||
|
* FIVE
|
||||||
|
*/
|
||||||
|
FIVE: 53,
|
||||||
|
/**
|
||||||
|
* SIX
|
||||||
|
*/
|
||||||
|
SIX: 54,
|
||||||
|
/**
|
||||||
|
* SEVEN
|
||||||
|
*/
|
||||||
|
SEVEN: 55,
|
||||||
|
/**
|
||||||
|
* EIGHT
|
||||||
|
*/
|
||||||
|
EIGHT: 56,
|
||||||
|
/**
|
||||||
|
* NINE
|
||||||
|
*/
|
||||||
|
NINE: 57,
|
||||||
|
/**
|
||||||
|
* QUESTION_MARK
|
||||||
|
*/
|
||||||
|
QUESTION_MARK: 63, // needs localization
|
||||||
|
/**
|
||||||
|
* A
|
||||||
|
*/
|
||||||
|
A: 65,
|
||||||
|
/**
|
||||||
|
* B
|
||||||
|
*/
|
||||||
|
B: 66,
|
||||||
|
/**
|
||||||
|
* C
|
||||||
|
*/
|
||||||
|
C: 67,
|
||||||
|
/**
|
||||||
|
* D
|
||||||
|
*/
|
||||||
|
D: 68,
|
||||||
|
/**
|
||||||
|
* E
|
||||||
|
*/
|
||||||
|
E: 69,
|
||||||
|
/**
|
||||||
|
* F
|
||||||
|
*/
|
||||||
|
F: 70,
|
||||||
|
/**
|
||||||
|
* G
|
||||||
|
*/
|
||||||
|
G: 71,
|
||||||
|
/**
|
||||||
|
* H
|
||||||
|
*/
|
||||||
|
H: 72,
|
||||||
|
/**
|
||||||
|
* I
|
||||||
|
*/
|
||||||
|
I: 73,
|
||||||
|
/**
|
||||||
|
* J
|
||||||
|
*/
|
||||||
|
J: 74,
|
||||||
|
/**
|
||||||
|
* K
|
||||||
|
*/
|
||||||
|
K: 75,
|
||||||
|
/**
|
||||||
|
* L
|
||||||
|
*/
|
||||||
|
L: 76,
|
||||||
|
/**
|
||||||
|
* M
|
||||||
|
*/
|
||||||
|
M: 77,
|
||||||
|
/**
|
||||||
|
* N
|
||||||
|
*/
|
||||||
|
N: 78,
|
||||||
|
/**
|
||||||
|
* O
|
||||||
|
*/
|
||||||
|
O: 79,
|
||||||
|
/**
|
||||||
|
* P
|
||||||
|
*/
|
||||||
|
P: 80,
|
||||||
|
/**
|
||||||
|
* Q
|
||||||
|
*/
|
||||||
|
Q: 81,
|
||||||
|
/**
|
||||||
|
* R
|
||||||
|
*/
|
||||||
|
R: 82,
|
||||||
|
/**
|
||||||
|
* S
|
||||||
|
*/
|
||||||
|
S: 83,
|
||||||
|
/**
|
||||||
|
* T
|
||||||
|
*/
|
||||||
|
T: 84,
|
||||||
|
/**
|
||||||
|
* U
|
||||||
|
*/
|
||||||
|
U: 85,
|
||||||
|
/**
|
||||||
|
* V
|
||||||
|
*/
|
||||||
|
V: 86,
|
||||||
|
/**
|
||||||
|
* W
|
||||||
|
*/
|
||||||
|
W: 87,
|
||||||
|
/**
|
||||||
|
* X
|
||||||
|
*/
|
||||||
|
X: 88,
|
||||||
|
/**
|
||||||
|
* Y
|
||||||
|
*/
|
||||||
|
Y: 89,
|
||||||
|
/**
|
||||||
|
* Z
|
||||||
|
*/
|
||||||
|
Z: 90,
|
||||||
|
/**
|
||||||
|
* META
|
||||||
|
*/
|
||||||
|
META: 91, // WIN_KEY_LEFT
|
||||||
|
/**
|
||||||
|
* WIN_KEY_RIGHT
|
||||||
|
*/
|
||||||
|
WIN_KEY_RIGHT: 92,
|
||||||
|
/**
|
||||||
|
* CONTEXT_MENU
|
||||||
|
*/
|
||||||
|
CONTEXT_MENU: 93,
|
||||||
|
/**
|
||||||
|
* NUM_ZERO
|
||||||
|
*/
|
||||||
|
NUM_ZERO: 96,
|
||||||
|
/**
|
||||||
|
* NUM_ONE
|
||||||
|
*/
|
||||||
|
NUM_ONE: 97,
|
||||||
|
/**
|
||||||
|
* NUM_TWO
|
||||||
|
*/
|
||||||
|
NUM_TWO: 98,
|
||||||
|
/**
|
||||||
|
* NUM_THREE
|
||||||
|
*/
|
||||||
|
NUM_THREE: 99,
|
||||||
|
/**
|
||||||
|
* NUM_FOUR
|
||||||
|
*/
|
||||||
|
NUM_FOUR: 100,
|
||||||
|
/**
|
||||||
|
* NUM_FIVE
|
||||||
|
*/
|
||||||
|
NUM_FIVE: 101,
|
||||||
|
/**
|
||||||
|
* NUM_SIX
|
||||||
|
*/
|
||||||
|
NUM_SIX: 102,
|
||||||
|
/**
|
||||||
|
* NUM_SEVEN
|
||||||
|
*/
|
||||||
|
NUM_SEVEN: 103,
|
||||||
|
/**
|
||||||
|
* NUM_EIGHT
|
||||||
|
*/
|
||||||
|
NUM_EIGHT: 104,
|
||||||
|
/**
|
||||||
|
* NUM_NINE
|
||||||
|
*/
|
||||||
|
NUM_NINE: 105,
|
||||||
|
/**
|
||||||
|
* NUM_MULTIPLY
|
||||||
|
*/
|
||||||
|
NUM_MULTIPLY: 106,
|
||||||
|
/**
|
||||||
|
* NUM_PLUS
|
||||||
|
*/
|
||||||
|
NUM_PLUS: 107,
|
||||||
|
/**
|
||||||
|
* NUM_MINUS
|
||||||
|
*/
|
||||||
|
NUM_MINUS: 109,
|
||||||
|
/**
|
||||||
|
* NUM_PERIOD
|
||||||
|
*/
|
||||||
|
NUM_PERIOD: 110,
|
||||||
|
/**
|
||||||
|
* NUM_DIVISION
|
||||||
|
*/
|
||||||
|
NUM_DIVISION: 111,
|
||||||
|
/**
|
||||||
|
* F1
|
||||||
|
*/
|
||||||
|
F1: 112,
|
||||||
|
/**
|
||||||
|
* F2
|
||||||
|
*/
|
||||||
|
F2: 113,
|
||||||
|
/**
|
||||||
|
* F3
|
||||||
|
*/
|
||||||
|
F3: 114,
|
||||||
|
/**
|
||||||
|
* F4
|
||||||
|
*/
|
||||||
|
F4: 115,
|
||||||
|
/**
|
||||||
|
* F5
|
||||||
|
*/
|
||||||
|
F5: 116,
|
||||||
|
/**
|
||||||
|
* F6
|
||||||
|
*/
|
||||||
|
F6: 117,
|
||||||
|
/**
|
||||||
|
* F7
|
||||||
|
*/
|
||||||
|
F7: 118,
|
||||||
|
/**
|
||||||
|
* F8
|
||||||
|
*/
|
||||||
|
F8: 119,
|
||||||
|
/**
|
||||||
|
* F9
|
||||||
|
*/
|
||||||
|
F9: 120,
|
||||||
|
/**
|
||||||
|
* F10
|
||||||
|
*/
|
||||||
|
F10: 121,
|
||||||
|
/**
|
||||||
|
* F11
|
||||||
|
*/
|
||||||
|
F11: 122,
|
||||||
|
/**
|
||||||
|
* F12
|
||||||
|
*/
|
||||||
|
F12: 123,
|
||||||
|
/**
|
||||||
|
* NUMLOCK
|
||||||
|
*/
|
||||||
|
NUMLOCK: 144,
|
||||||
|
/**
|
||||||
|
* SEMICOLON
|
||||||
|
*/
|
||||||
|
SEMICOLON: 186, // needs localization
|
||||||
|
/**
|
||||||
|
* DASH
|
||||||
|
*/
|
||||||
|
DASH: 189, // needs localization
|
||||||
|
/**
|
||||||
|
* EQUALS
|
||||||
|
*/
|
||||||
|
EQUALS: 187, // needs localization
|
||||||
|
/**
|
||||||
|
* COMMA
|
||||||
|
*/
|
||||||
|
COMMA: 188, // needs localization
|
||||||
|
/**
|
||||||
|
* PERIOD
|
||||||
|
*/
|
||||||
|
PERIOD: 190, // needs localization
|
||||||
|
/**
|
||||||
|
* SLASH
|
||||||
|
*/
|
||||||
|
SLASH: 191, // needs localization
|
||||||
|
/**
|
||||||
|
* APOSTROPHE
|
||||||
|
*/
|
||||||
|
APOSTROPHE: 192, // needs localization
|
||||||
|
/**
|
||||||
|
* SINGLE_QUOTE
|
||||||
|
*/
|
||||||
|
SINGLE_QUOTE: 222, // needs localization
|
||||||
|
/**
|
||||||
|
* OPEN_SQUARE_BRACKET
|
||||||
|
*/
|
||||||
|
OPEN_SQUARE_BRACKET: 219, // needs localization
|
||||||
|
/**
|
||||||
|
* BACKSLASH
|
||||||
|
*/
|
||||||
|
BACKSLASH: 220, // needs localization
|
||||||
|
/**
|
||||||
|
* CLOSE_SQUARE_BRACKET
|
||||||
|
*/
|
||||||
|
CLOSE_SQUARE_BRACKET: 221, // needs localization
|
||||||
|
/**
|
||||||
|
* WIN_KEY
|
||||||
|
*/
|
||||||
|
WIN_KEY: 224,
|
||||||
|
/**
|
||||||
|
* MAC_FF_META
|
||||||
|
*/
|
||||||
|
MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
|
||||||
|
/**
|
||||||
|
* WIN_IME
|
||||||
|
*/
|
||||||
|
WIN_IME: 229,
|
||||||
|
|
||||||
|
// ======================== Function ========================
|
||||||
|
/**
|
||||||
|
* whether text and modified key is entered at the same time.
|
||||||
|
*/
|
||||||
|
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e: KeyboardEvent) {
|
||||||
|
const { keyCode } = e;
|
||||||
|
if (
|
||||||
|
(e.altKey && !e.ctrlKey) ||
|
||||||
|
e.metaKey ||
|
||||||
|
// Function keys don't generate text
|
||||||
|
(keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following keys are quite harmless, even in combination with
|
||||||
|
// CTRL, ALT or SHIFT.
|
||||||
|
switch (keyCode) {
|
||||||
|
case KeyCode.ALT:
|
||||||
|
case KeyCode.CAPS_LOCK:
|
||||||
|
case KeyCode.CONTEXT_MENU:
|
||||||
|
case KeyCode.CTRL:
|
||||||
|
case KeyCode.DOWN:
|
||||||
|
case KeyCode.END:
|
||||||
|
case KeyCode.ESC:
|
||||||
|
case KeyCode.HOME:
|
||||||
|
case KeyCode.INSERT:
|
||||||
|
case KeyCode.LEFT:
|
||||||
|
case KeyCode.MAC_FF_META:
|
||||||
|
case KeyCode.META:
|
||||||
|
case KeyCode.NUMLOCK:
|
||||||
|
case KeyCode.NUM_CENTER:
|
||||||
|
case KeyCode.PAGE_DOWN:
|
||||||
|
case KeyCode.PAGE_UP:
|
||||||
|
case KeyCode.PAUSE:
|
||||||
|
case KeyCode.PRINT_SCREEN:
|
||||||
|
case KeyCode.RIGHT:
|
||||||
|
case KeyCode.SHIFT:
|
||||||
|
case KeyCode.UP:
|
||||||
|
case KeyCode.WIN_KEY:
|
||||||
|
case KeyCode.WIN_KEY_RIGHT:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* whether character is entered.
|
||||||
|
*/
|
||||||
|
isCharacterKey: function isCharacterKey(keyCode: number) {
|
||||||
|
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Safari sends zero key code for non-latin characters.
|
||||||
|
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (keyCode) {
|
||||||
|
case KeyCode.SPACE:
|
||||||
|
case KeyCode.QUESTION_MARK:
|
||||||
|
case KeyCode.NUM_PLUS:
|
||||||
|
case KeyCode.NUM_MINUS:
|
||||||
|
case KeyCode.NUM_PERIOD:
|
||||||
|
case KeyCode.NUM_DIVISION:
|
||||||
|
case KeyCode.SEMICOLON:
|
||||||
|
case KeyCode.DASH:
|
||||||
|
case KeyCode.EQUALS:
|
||||||
|
case KeyCode.COMMA:
|
||||||
|
case KeyCode.PERIOD:
|
||||||
|
case KeyCode.SLASH:
|
||||||
|
case KeyCode.APOSTROPHE:
|
||||||
|
case KeyCode.SINGLE_QUOTE:
|
||||||
|
case KeyCode.OPEN_SQUARE_BRACKET:
|
||||||
|
case KeyCode.BACKSLASH:
|
||||||
|
case KeyCode.CLOSE_SQUARE_BRACKET:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default KeyCode;
|
|
@ -1,48 +0,0 @@
|
||||||
import PropTypes from './vue-types';
|
|
||||||
import { Teleport } from 'vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Portal',
|
|
||||||
props: {
|
|
||||||
getContainer: PropTypes.func.isRequired,
|
|
||||||
children: PropTypes.any.isRequired,
|
|
||||||
didUpdate: PropTypes.func,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
this._container = null;
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.createContainer();
|
|
||||||
},
|
|
||||||
updated() {
|
|
||||||
const { didUpdate } = this.$props;
|
|
||||||
if (didUpdate) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
didUpdate(this.$props);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeUnmount() {
|
|
||||||
this.removeContainer();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
createContainer() {
|
|
||||||
this._container = this.$props.getContainer();
|
|
||||||
this.$forceUpdate();
|
|
||||||
},
|
|
||||||
removeContainer() {
|
|
||||||
if (this._container && this._container.parentNode) {
|
|
||||||
this._container.parentNode.removeChild(this._container);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
|
||||||
if (this._container) {
|
|
||||||
return <Teleport to={this._container}>{this.$props.children}</Teleport>;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
import PropTypes from './vue-types';
|
||||||
|
import {
|
||||||
|
defineComponent,
|
||||||
|
nextTick,
|
||||||
|
onBeforeMount,
|
||||||
|
onMounted,
|
||||||
|
onUpdated,
|
||||||
|
Teleport,
|
||||||
|
watch,
|
||||||
|
} from 'vue';
|
||||||
|
import { useInjectPortal } from '../vc-trigger/context';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
name: 'Portal',
|
||||||
|
inheritAttrs: false,
|
||||||
|
props: {
|
||||||
|
getContainer: PropTypes.func.isRequired,
|
||||||
|
didUpdate: Function,
|
||||||
|
},
|
||||||
|
setup(props, { slots }) {
|
||||||
|
let isSSR = true;
|
||||||
|
// getContainer 不会改变,不用响应式
|
||||||
|
let container: HTMLElement;
|
||||||
|
const { shouldRender } = useInjectPortal();
|
||||||
|
|
||||||
|
function setContainer() {
|
||||||
|
if (shouldRender.value) {
|
||||||
|
container = props.getContainer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
isSSR = false;
|
||||||
|
// drawer
|
||||||
|
setContainer();
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
if (container) return;
|
||||||
|
// https://github.com/vueComponent/ant-design-vue/issues/6937
|
||||||
|
setContainer();
|
||||||
|
});
|
||||||
|
|
||||||
|
const stopWatch = watch(shouldRender, () => {
|
||||||
|
if (shouldRender.value && !container) {
|
||||||
|
container = props.getContainer();
|
||||||
|
}
|
||||||
|
if (container) {
|
||||||
|
stopWatch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
onUpdated(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
if (shouldRender.value) {
|
||||||
|
props.didUpdate?.(props);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// onBeforeUnmount(() => {
|
||||||
|
// if (container && container.parentNode) {
|
||||||
|
// container.parentNode.removeChild(container);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
return () => {
|
||||||
|
if (!shouldRender.value) return null;
|
||||||
|
if (isSSR) {
|
||||||
|
return slots.default?.();
|
||||||
|
}
|
||||||
|
return container ? <Teleport to={container} v-slots={slots}></Teleport> : null;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
|
@ -1,150 +0,0 @@
|
||||||
import PropTypes from './vue-types';
|
|
||||||
import switchScrollingEffect from './switchScrollingEffect';
|
|
||||||
import setStyle from './setStyle';
|
|
||||||
import Portal from './Portal';
|
|
||||||
|
|
||||||
let openCount = 0;
|
|
||||||
const windowIsUndefined = !(
|
|
||||||
typeof window !== 'undefined' &&
|
|
||||||
window.document &&
|
|
||||||
window.document.createElement
|
|
||||||
);
|
|
||||||
// https://github.com/ant-design/ant-design/issues/19340
|
|
||||||
// https://github.com/ant-design/ant-design/issues/19332
|
|
||||||
let cacheOverflow = {};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'PortalWrapper',
|
|
||||||
props: {
|
|
||||||
wrapperClassName: PropTypes.string,
|
|
||||||
forceRender: PropTypes.bool,
|
|
||||||
getContainer: PropTypes.any,
|
|
||||||
children: PropTypes.func,
|
|
||||||
visible: PropTypes.bool,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
this._component = null;
|
|
||||||
const { visible } = this.$props;
|
|
||||||
openCount = visible ? openCount + 1 : openCount;
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
updated() {
|
|
||||||
this.setWrapperClassName();
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
visible(val) {
|
|
||||||
openCount = val ? openCount + 1 : openCount - 1;
|
|
||||||
},
|
|
||||||
getContainer(getContainer, prevGetContainer) {
|
|
||||||
const getContainerIsFunc =
|
|
||||||
typeof getContainer === 'function' && typeof prevGetContainer === 'function';
|
|
||||||
if (
|
|
||||||
getContainerIsFunc
|
|
||||||
? getContainer.toString() !== prevGetContainer.toString()
|
|
||||||
: getContainer !== prevGetContainer
|
|
||||||
) {
|
|
||||||
this.removeCurrentContainer(false);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
beforeUnmount() {
|
|
||||||
const { visible } = this.$props;
|
|
||||||
// 离开时不会 render, 导到离开时数值不变,改用 func 。。
|
|
||||||
openCount = visible && openCount ? openCount - 1 : openCount;
|
|
||||||
this.removeCurrentContainer(visible);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getParent() {
|
|
||||||
const { getContainer } = this.$props;
|
|
||||||
if (getContainer) {
|
|
||||||
if (typeof getContainer === 'string') {
|
|
||||||
return document.querySelectorAll(getContainer)[0];
|
|
||||||
}
|
|
||||||
if (typeof getContainer === 'function') {
|
|
||||||
return getContainer();
|
|
||||||
}
|
|
||||||
if (typeof getContainer === 'object' && getContainer instanceof window.HTMLElement) {
|
|
||||||
return getContainer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return document.body;
|
|
||||||
},
|
|
||||||
|
|
||||||
getDomContainer() {
|
|
||||||
if (windowIsUndefined) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (!this.container) {
|
|
||||||
this.container = document.createElement('div');
|
|
||||||
const parent = this.getParent();
|
|
||||||
if (parent) {
|
|
||||||
parent.appendChild(this.container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.setWrapperClassName();
|
|
||||||
return this.container;
|
|
||||||
},
|
|
||||||
|
|
||||||
setWrapperClassName() {
|
|
||||||
const { wrapperClassName } = this.$props;
|
|
||||||
if (this.container && wrapperClassName && wrapperClassName !== this.container.className) {
|
|
||||||
this.container.className = wrapperClassName;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
savePortal(c) {
|
|
||||||
// Warning: don't rename _component
|
|
||||||
// https://github.com/react-component/util/pull/65#discussion_r352407916
|
|
||||||
this._component = c;
|
|
||||||
},
|
|
||||||
|
|
||||||
removeCurrentContainer() {
|
|
||||||
this.container = null;
|
|
||||||
this._component = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enhance ./switchScrollingEffect
|
|
||||||
* 1. Simulate document body scroll bar with
|
|
||||||
* 2. Record body has overflow style and recover when all of PortalWrapper invisible
|
|
||||||
* 3. Disable body scroll when PortalWrapper has open
|
|
||||||
*
|
|
||||||
* @memberof PortalWrapper
|
|
||||||
*/
|
|
||||||
switchScrollingEffect() {
|
|
||||||
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
|
|
||||||
switchScrollingEffect();
|
|
||||||
// Must be set after switchScrollingEffect
|
|
||||||
cacheOverflow = setStyle({
|
|
||||||
overflow: 'hidden',
|
|
||||||
overflowX: 'hidden',
|
|
||||||
overflowY: 'hidden',
|
|
||||||
});
|
|
||||||
} else if (!openCount) {
|
|
||||||
setStyle(cacheOverflow);
|
|
||||||
cacheOverflow = {};
|
|
||||||
switchScrollingEffect(true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { children, forceRender, visible } = this.$props;
|
|
||||||
let portal = null;
|
|
||||||
const childProps = {
|
|
||||||
getOpenCount: () => openCount,
|
|
||||||
getContainer: this.getDomContainer,
|
|
||||||
switchScrollingEffect: this.switchScrollingEffect,
|
|
||||||
};
|
|
||||||
if (forceRender || visible || this._component) {
|
|
||||||
portal = (
|
|
||||||
<Portal
|
|
||||||
getContainer={this.getDomContainer}
|
|
||||||
children={children(childProps)}
|
|
||||||
ref={this.savePortal}
|
|
||||||
></Portal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return portal;
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -0,0 +1,191 @@
|
||||||
|
import PropTypes from './vue-types';
|
||||||
|
import Portal from './Portal';
|
||||||
|
import {
|
||||||
|
defineComponent,
|
||||||
|
shallowRef,
|
||||||
|
watch,
|
||||||
|
onMounted,
|
||||||
|
onBeforeUnmount,
|
||||||
|
onUpdated,
|
||||||
|
nextTick,
|
||||||
|
computed,
|
||||||
|
} from 'vue';
|
||||||
|
import canUseDom from './canUseDom';
|
||||||
|
import raf from './raf';
|
||||||
|
import { booleanType } from './type';
|
||||||
|
import useScrollLocker from './hooks/useScrollLocker';
|
||||||
|
|
||||||
|
let openCount = 0;
|
||||||
|
const supportDom = canUseDom();
|
||||||
|
|
||||||
|
/** @private Test usage only */
|
||||||
|
export function getOpenCount() {
|
||||||
|
return process.env.NODE_ENV === 'test' ? openCount : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getParent = (getContainer: GetContainer) => {
|
||||||
|
if (!supportDom) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (getContainer) {
|
||||||
|
if (typeof getContainer === 'string') {
|
||||||
|
return document.querySelectorAll(getContainer)[0] as HTMLElement;
|
||||||
|
}
|
||||||
|
if (typeof getContainer === 'function') {
|
||||||
|
return getContainer();
|
||||||
|
}
|
||||||
|
if (typeof getContainer === 'object' && getContainer instanceof window.HTMLElement) {
|
||||||
|
return getContainer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return document.body;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetContainer = string | HTMLElement | (() => HTMLElement);
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
name: 'PortalWrapper',
|
||||||
|
inheritAttrs: false,
|
||||||
|
props: {
|
||||||
|
wrapperClassName: String,
|
||||||
|
forceRender: { type: Boolean, default: undefined },
|
||||||
|
getContainer: PropTypes.any,
|
||||||
|
visible: { type: Boolean, default: undefined },
|
||||||
|
autoLock: booleanType(),
|
||||||
|
didUpdate: Function,
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { slots }) {
|
||||||
|
const container = shallowRef<HTMLElement>();
|
||||||
|
const componentRef = shallowRef();
|
||||||
|
const rafId = shallowRef<number>();
|
||||||
|
const triggerUpdate = shallowRef(1);
|
||||||
|
const defaultContainer = canUseDom() && document.createElement('div');
|
||||||
|
const removeCurrentContainer = () => {
|
||||||
|
// Portal will remove from `parentNode`.
|
||||||
|
// Let's handle this again to avoid refactor issue.
|
||||||
|
if (container.value === defaultContainer) {
|
||||||
|
container.value?.parentNode?.removeChild(container.value);
|
||||||
|
}
|
||||||
|
container.value = null;
|
||||||
|
};
|
||||||
|
let parent: HTMLElement = null;
|
||||||
|
const attachToParent = (force = false) => {
|
||||||
|
if (force || (container.value && !container.value.parentNode)) {
|
||||||
|
parent = getParent(props.getContainer);
|
||||||
|
if (parent) {
|
||||||
|
parent.appendChild(container.value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
const getContainer = () => {
|
||||||
|
if (!supportDom) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (!container.value) {
|
||||||
|
container.value = defaultContainer;
|
||||||
|
attachToParent(true);
|
||||||
|
}
|
||||||
|
setWrapperClassName();
|
||||||
|
return container.value;
|
||||||
|
};
|
||||||
|
const setWrapperClassName = () => {
|
||||||
|
const { wrapperClassName } = props;
|
||||||
|
if (container.value && wrapperClassName && wrapperClassName !== container.value.className) {
|
||||||
|
container.value.className = wrapperClassName;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onUpdated(() => {
|
||||||
|
setWrapperClassName();
|
||||||
|
attachToParent();
|
||||||
|
});
|
||||||
|
|
||||||
|
useScrollLocker(
|
||||||
|
computed(() => {
|
||||||
|
return (
|
||||||
|
props.autoLock &&
|
||||||
|
props.visible &&
|
||||||
|
canUseDom() &&
|
||||||
|
(container.value === document.body || container.value === defaultContainer)
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
onMounted(() => {
|
||||||
|
let init = false;
|
||||||
|
watch(
|
||||||
|
[() => props.visible, () => props.getContainer],
|
||||||
|
([visible, getContainer], [prevVisible, prevGetContainer]) => {
|
||||||
|
// Update count
|
||||||
|
if (supportDom) {
|
||||||
|
parent = getParent(props.getContainer);
|
||||||
|
if (parent === document.body) {
|
||||||
|
if (visible && !prevVisible) {
|
||||||
|
openCount += 1;
|
||||||
|
} else if (init) {
|
||||||
|
openCount -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (init) {
|
||||||
|
// Clean up container if needed
|
||||||
|
const getContainerIsFunc =
|
||||||
|
typeof getContainer === 'function' && typeof prevGetContainer === 'function';
|
||||||
|
if (
|
||||||
|
getContainerIsFunc
|
||||||
|
? getContainer.toString() !== prevGetContainer.toString()
|
||||||
|
: getContainer !== prevGetContainer
|
||||||
|
) {
|
||||||
|
removeCurrentContainer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
init = true;
|
||||||
|
},
|
||||||
|
{ immediate: true, flush: 'post' },
|
||||||
|
);
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
if (!attachToParent()) {
|
||||||
|
rafId.value = raf(() => {
|
||||||
|
triggerUpdate.value += 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
const { visible } = props;
|
||||||
|
if (supportDom && parent === document.body) {
|
||||||
|
// 离开时不会 render, 导到离开时数值不变,改用 func 。。
|
||||||
|
openCount = visible && openCount ? openCount - 1 : openCount;
|
||||||
|
}
|
||||||
|
removeCurrentContainer();
|
||||||
|
raf.cancel(rafId.value);
|
||||||
|
});
|
||||||
|
return () => {
|
||||||
|
const { forceRender, visible } = props;
|
||||||
|
let portal = null;
|
||||||
|
const childProps = {
|
||||||
|
getOpenCount: () => openCount,
|
||||||
|
getContainer,
|
||||||
|
};
|
||||||
|
if (triggerUpdate.value && (forceRender || visible || componentRef.value)) {
|
||||||
|
portal = (
|
||||||
|
<Portal
|
||||||
|
getContainer={getContainer}
|
||||||
|
ref={componentRef}
|
||||||
|
didUpdate={props.didUpdate}
|
||||||
|
v-slots={{ default: () => slots.default?.(childProps) }}
|
||||||
|
></Portal>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return portal;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
|
@ -1,10 +0,0 @@
|
||||||
export default {
|
|
||||||
methods: {
|
|
||||||
setState(state, callback) {
|
|
||||||
Object.assign(this.$data, state);
|
|
||||||
this.$nextTick(() => {
|
|
||||||
callback && callback();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
compatConfig: { MODE: 3 },
|
||||||
|
name: 'Portal',
|
||||||
|
inheritAttrs: false,
|
||||||
|
props: ['getContainer'],
|
||||||
|
setup(_props, { slots }) {
|
||||||
|
return () => {
|
||||||
|
return slots.default?.();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
import { customRenderSlot } from '../vnode';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'RenderSlot',
|
||||||
|
setup(_props, { slots }) {
|
||||||
|
return () => {
|
||||||
|
return customRenderSlot(slots, 'default', {}, () => ['default value']);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
|
@ -0,0 +1,8 @@
|
||||||
|
import UnreachableException from '../unreachableException';
|
||||||
|
|
||||||
|
describe('UnreachableException', () => {
|
||||||
|
it('error thrown matches snapshot', () => {
|
||||||
|
const exception = new UnreachableException('some value');
|
||||||
|
expect(exception.error.message).toMatchInlineSnapshot(`"unreachable case: \\"some value\\""`);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,26 @@
|
||||||
|
import RenderSlot from '../__mocks__/RenderSlot';
|
||||||
|
import { mount } from '@vue/test-utils';
|
||||||
|
import { nextTick } from 'vue';
|
||||||
|
|
||||||
|
describe('render slot content', () => {
|
||||||
|
it('renders slot content', () => {
|
||||||
|
const wrapper = mount(RenderSlot, {
|
||||||
|
slots: {
|
||||||
|
default: () => 'This is slot content',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(wrapper.html()).toContain('This is slot content');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('render default value when slot is fragment', async () => {
|
||||||
|
const wrapper = mount(RenderSlot, {
|
||||||
|
slots: {
|
||||||
|
default: () => <></>,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
expect(wrapper.html()).toContain('default value');
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,30 +0,0 @@
|
||||||
import { nextTick } from 'vue';
|
|
||||||
const antvRef = {
|
|
||||||
beforeMount: function bind(el, binding, vnode) {
|
|
||||||
nextTick(function() {
|
|
||||||
binding.value(el, vnode.key);
|
|
||||||
});
|
|
||||||
binding.value(el, vnode.key);
|
|
||||||
},
|
|
||||||
updated: function update(el, binding, vnode, oldVnode) {
|
|
||||||
if (oldVnode && oldVnode.directives) {
|
|
||||||
let oldBinding = oldVnode.directives.find(function(directive) {
|
|
||||||
return directive === antvRef;
|
|
||||||
});
|
|
||||||
if (oldBinding && oldBinding.value !== binding.value) {
|
|
||||||
oldBinding && oldBinding.value(null, oldVnode.key);
|
|
||||||
binding.value(el, vnode.key);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Should not have this situation
|
|
||||||
if (vnode.el !== oldVnode.el) {
|
|
||||||
binding.value(el, vnode.key);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
unmounted: function unbind(el, binding, vnode) {
|
|
||||||
binding.value(null, vnode.key);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default antvRef;
|
|
|
@ -1,12 +0,0 @@
|
||||||
import ref from 'vue-ref';
|
|
||||||
// import { antInput } from './antInputDirective';
|
|
||||||
import { antDecorator } from './FormDecoratorDirective';
|
|
||||||
import { antPortal } from './portalDirective';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
install: Vue => {
|
|
||||||
Vue.use(ref, { name: 'ant-ref' });
|
|
||||||
antDecorator(Vue);
|
|
||||||
antPortal(Vue);
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,72 +0,0 @@
|
||||||
/**
|
|
||||||
* Not type checking this file because flow doesn't like attaching
|
|
||||||
* properties to Elements.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const inBrowser = typeof window !== 'undefined';
|
|
||||||
export const UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
|
||||||
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
|
||||||
function makeMap(str, expectsLowerCase) {
|
|
||||||
const map = Object.create(null);
|
|
||||||
const list = str.split(',');
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
map[list[i]] = true;
|
|
||||||
}
|
|
||||||
return expectsLowerCase ? val => map[val.toLowerCase()] : val => map[val];
|
|
||||||
}
|
|
||||||
const isTextInputType = makeMap('text,number,password,search,email,tel,url');
|
|
||||||
|
|
||||||
function onCompositionStart(e) {
|
|
||||||
e.target.composing = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onCompositionEnd(e) {
|
|
||||||
// prevent triggering an input event for no reason
|
|
||||||
if (!e.target.composing) return;
|
|
||||||
e.target.composing = false;
|
|
||||||
trigger(e.target, 'input');
|
|
||||||
}
|
|
||||||
|
|
||||||
function trigger(el, type) {
|
|
||||||
const e = document.createEvent('HTMLEvents');
|
|
||||||
e.initEvent(type, true, true);
|
|
||||||
el.dispatchEvent(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* istanbul ignore if */
|
|
||||||
if (isIE9) {
|
|
||||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
|
||||||
document.addEventListener('selectionchange', () => {
|
|
||||||
const el = document.activeElement;
|
|
||||||
if (el && el.vmodel) {
|
|
||||||
trigger(el, 'input');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export const antInput = {
|
|
||||||
mounted(el, binding, vnode) {
|
|
||||||
if (vnode.type === 'textarea' || isTextInputType(el.type)) {
|
|
||||||
if (!binding.modifiers || !binding.modifiers.lazy) {
|
|
||||||
el.addEventListener('compositionstart', onCompositionStart);
|
|
||||||
el.addEventListener('compositionend', onCompositionEnd);
|
|
||||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
|
||||||
// switching focus before confirming composition choice
|
|
||||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
|
||||||
// fires "change" instead of "input" on autocomplete.
|
|
||||||
el.addEventListener('change', onCompositionEnd);
|
|
||||||
/* istanbul ignore if */
|
|
||||||
if (isIE9) {
|
|
||||||
el.vmodel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
install: app => {
|
|
||||||
antInput(app);
|
|
||||||
app.directive('ant-input', antInput);
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,4 +0,0 @@
|
||||||
// https://github.com/moment/moment/issues/3650
|
|
||||||
export default function callMoment(moment, ...args) {
|
|
||||||
return (moment.default || moment)(...args);
|
|
||||||
}
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
function canUseDom() {
|
||||||
|
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default canUseDom;
|
|
@ -0,0 +1,27 @@
|
||||||
|
import { isArray, isString, isObject } from './util';
|
||||||
|
function classNames(...args: any[]) {
|
||||||
|
const classes = [];
|
||||||
|
for (let i = 0; i < args.length; i++) {
|
||||||
|
const value = args[i];
|
||||||
|
if (!value) continue;
|
||||||
|
if (isString(value)) {
|
||||||
|
classes.push(value);
|
||||||
|
} else if (isArray(value)) {
|
||||||
|
for (let i = 0; i < value.length; i++) {
|
||||||
|
const inner = classNames(value[i]);
|
||||||
|
if (inner) {
|
||||||
|
classes.push(inner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (isObject(value)) {
|
||||||
|
for (const name in value) {
|
||||||
|
if (value[name]) {
|
||||||
|
classes.push(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return classes.join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
export default classNames;
|
|
@ -0,0 +1,50 @@
|
||||||
|
import { nextTick } from 'vue';
|
||||||
|
import { addClass, removeClass } from '../vc-util/Dom/class';
|
||||||
|
import type { CSSMotionProps } from './transition';
|
||||||
|
|
||||||
|
const collapseMotion = (name = 'ant-motion-collapse', appear = true): CSSMotionProps => {
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
appear,
|
||||||
|
css: true,
|
||||||
|
onBeforeEnter: (node: HTMLDivElement) => {
|
||||||
|
node.style.height = '0px';
|
||||||
|
node.style.opacity = '0';
|
||||||
|
addClass(node, name);
|
||||||
|
},
|
||||||
|
onEnter: (node: HTMLDivElement) => {
|
||||||
|
nextTick(() => {
|
||||||
|
node.style.height = `${node.scrollHeight}px`;
|
||||||
|
node.style.opacity = '1';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onAfterEnter: (node: HTMLDivElement) => {
|
||||||
|
if (node) {
|
||||||
|
removeClass(node, name);
|
||||||
|
node.style.height = null;
|
||||||
|
node.style.opacity = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onBeforeLeave: (node: HTMLDivElement) => {
|
||||||
|
addClass(node, name);
|
||||||
|
node.style.height = `${node.offsetHeight}px`;
|
||||||
|
node.style.opacity = null;
|
||||||
|
},
|
||||||
|
onLeave: (node: HTMLDivElement) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
node.style.height = '0px';
|
||||||
|
node.style.opacity = '0';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onAfterLeave: (node: HTMLDivElement) => {
|
||||||
|
if (node) {
|
||||||
|
removeClass(node, name);
|
||||||
|
if (node.style) {
|
||||||
|
node.style.height = null;
|
||||||
|
node.style.opacity = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export default collapseMotion;
|
|
@ -1,17 +0,0 @@
|
||||||
import { tuple } from './type';
|
|
||||||
|
|
||||||
export const PresetColorTypes = tuple(
|
|
||||||
'pink',
|
|
||||||
'red',
|
|
||||||
'yellow',
|
|
||||||
'orange',
|
|
||||||
'cyan',
|
|
||||||
'green',
|
|
||||||
'blue',
|
|
||||||
'purple',
|
|
||||||
'geekblue',
|
|
||||||
'magenta',
|
|
||||||
'volcano',
|
|
||||||
'gold',
|
|
||||||
'lime',
|
|
||||||
);
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
import type { PresetColorKey } from '../theme/interface';
|
||||||
|
import { PresetColors } from '../theme/interface';
|
||||||
|
|
||||||
|
type InverseColor = `${PresetColorKey}-inverse`;
|
||||||
|
const inverseColors = PresetColors.map<InverseColor>(color => `${color}-inverse`);
|
||||||
|
|
||||||
|
export const PresetStatusColorTypes = [
|
||||||
|
'success',
|
||||||
|
'processing',
|
||||||
|
'error',
|
||||||
|
'default',
|
||||||
|
'warning',
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export type PresetColorType = PresetColorKey | InverseColor;
|
||||||
|
|
||||||
|
export type PresetStatusColorType = (typeof PresetStatusColorTypes)[number];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.
|
||||||
|
* @param color color to be judged
|
||||||
|
* @param includeInverse whether to include reversed colors
|
||||||
|
*/
|
||||||
|
export function isPresetColor(color?: any, includeInverse = true) {
|
||||||
|
if (includeInverse) {
|
||||||
|
return [...inverseColors, ...PresetColors].includes(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
return PresetColors.includes(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isPresetStatusColor(color?: any): color is PresetStatusColorType {
|
||||||
|
return PresetStatusColorTypes.includes(color);
|
||||||
|
}
|
|
@ -0,0 +1,168 @@
|
||||||
|
/**
|
||||||
|
* source by `component-classes`
|
||||||
|
* https://github.com/component/classes.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
import indexOf from 'lodash-es/indexOf';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whitespace regexp.
|
||||||
|
*/
|
||||||
|
const re = /\s+/;
|
||||||
|
|
||||||
|
export class ClassList {
|
||||||
|
el: Element;
|
||||||
|
list: DOMTokenList;
|
||||||
|
|
||||||
|
constructor(el: Element) {
|
||||||
|
if (!el || !el.nodeType) {
|
||||||
|
throw new Error('A DOM element reference is required');
|
||||||
|
}
|
||||||
|
this.el = el;
|
||||||
|
this.list = el.classList;
|
||||||
|
}
|
||||||
|
|
||||||
|
array() {
|
||||||
|
const className = this.el.getAttribute('class') || '';
|
||||||
|
const str = className.replace(/^\s+|\s+$/g, '');
|
||||||
|
const arr = str.split(re);
|
||||||
|
if ('' === arr[0]) arr.shift();
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add class `name` if not already present.
|
||||||
|
*
|
||||||
|
* @param {String} name
|
||||||
|
* @return {ClassList}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
add(name: string): ClassList {
|
||||||
|
// classList
|
||||||
|
if (this.list) {
|
||||||
|
this.list.add(name);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fallback
|
||||||
|
const arr = this.array();
|
||||||
|
const i = indexOf(arr, name);
|
||||||
|
if (!~i) arr.push(name);
|
||||||
|
this.el.className = arr.join(' ');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Remove class `name` when present, or
|
||||||
|
* pass a regular expression to remove
|
||||||
|
* any which match.
|
||||||
|
*
|
||||||
|
* @param {String|RegExp} name
|
||||||
|
* @return {ClassList}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
remove(name: string | RegExp): ClassList {
|
||||||
|
if ('[object RegExp]' === toString.call(name)) {
|
||||||
|
return this._removeMatching(name as RegExp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// classList
|
||||||
|
if (this.list) {
|
||||||
|
this.list.remove(name as string);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fallback
|
||||||
|
const arr = this.array();
|
||||||
|
const i = indexOf(arr, name);
|
||||||
|
if (~i) arr.splice(i, 1);
|
||||||
|
this.el.className = arr.join(' ');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Remove all classes matching `re`.
|
||||||
|
*
|
||||||
|
* @param {RegExp} re
|
||||||
|
* @return {ClassList}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
_removeMatching(re: RegExp): ClassList {
|
||||||
|
const arr = this.array();
|
||||||
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
if (re.test(arr[i])) {
|
||||||
|
this.remove(arr[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle class `name`, can force state via `force`.
|
||||||
|
*
|
||||||
|
* For browsers that support classList, but do not support `force` yet,
|
||||||
|
* the mistake will be detected and corrected.
|
||||||
|
*
|
||||||
|
* @param {String} name
|
||||||
|
* @param {Boolean} force
|
||||||
|
* @return {ClassList}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
toggle(name: string, force: boolean): ClassList {
|
||||||
|
// classList
|
||||||
|
if (this.list) {
|
||||||
|
if ('undefined' !== typeof force) {
|
||||||
|
if (force !== this.list.toggle(name, force)) {
|
||||||
|
this.list.toggle(name); // toggle again to correct
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.list.toggle(name);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fallback
|
||||||
|
if ('undefined' !== typeof force) {
|
||||||
|
if (!force) {
|
||||||
|
this.remove(name);
|
||||||
|
} else {
|
||||||
|
this.add(name);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.has(name)) {
|
||||||
|
this.remove(name);
|
||||||
|
} else {
|
||||||
|
this.add(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Check if class `name` is present.
|
||||||
|
*
|
||||||
|
* @param {String} name
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
has(name: string) {
|
||||||
|
return this.list ? this.list.contains(name) : !!~indexOf(this.array(), name);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Check if class `name` is present.
|
||||||
|
*
|
||||||
|
* @param {String} name
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
contains(name: string) {
|
||||||
|
return this.has(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrap `el` in a `ClassList`.
|
||||||
|
*
|
||||||
|
* @param {Element} el
|
||||||
|
* @return {ClassList}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
export default function (el: Element): ClassList {
|
||||||
|
return new ClassList(el);
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
import deselectCurrent from './toggle-selection';
|
||||||
|
|
||||||
|
interface Options {
|
||||||
|
debug?: boolean;
|
||||||
|
message?: string;
|
||||||
|
format?: string; // MIME type
|
||||||
|
onCopy?: (clipboardData: object) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const clipboardToIE11Formatting = {
|
||||||
|
'text/plain': 'Text',
|
||||||
|
'text/html': 'Url',
|
||||||
|
default: 'Text',
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultMessage = 'Copy to clipboard: #{key}, Enter';
|
||||||
|
|
||||||
|
function format(message: string) {
|
||||||
|
const copyKey = (/mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl') + '+C';
|
||||||
|
return message.replace(/#{\s*key\s*}/g, copyKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
function copy(text: string, options?: Options): boolean {
|
||||||
|
let message,
|
||||||
|
reselectPrevious,
|
||||||
|
range,
|
||||||
|
selection,
|
||||||
|
mark,
|
||||||
|
success = false;
|
||||||
|
if (!options) {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
|
const debug = options.debug || false;
|
||||||
|
try {
|
||||||
|
reselectPrevious = deselectCurrent();
|
||||||
|
|
||||||
|
range = document.createRange();
|
||||||
|
selection = document.getSelection();
|
||||||
|
|
||||||
|
mark = document.createElement('span');
|
||||||
|
mark.textContent = text;
|
||||||
|
// reset user styles for span element
|
||||||
|
mark.style.all = 'unset';
|
||||||
|
// prevents scrolling to the end of the page
|
||||||
|
mark.style.position = 'fixed';
|
||||||
|
mark.style.top = 0;
|
||||||
|
mark.style.clip = 'rect(0, 0, 0, 0)';
|
||||||
|
// used to preserve spaces and line breaks
|
||||||
|
mark.style.whiteSpace = 'pre';
|
||||||
|
// do not inherit user-select (it may be `none`)
|
||||||
|
mark.style.webkitUserSelect = 'text';
|
||||||
|
mark.style.MozUserSelect = 'text';
|
||||||
|
mark.style.msUserSelect = 'text';
|
||||||
|
mark.style.userSelect = 'text';
|
||||||
|
mark.addEventListener('copy', function (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
if (options.format) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (typeof e.clipboardData === 'undefined') {
|
||||||
|
// IE 11
|
||||||
|
debug && console.warn('unable to use e.clipboardData');
|
||||||
|
debug && console.warn('trying IE specific stuff');
|
||||||
|
(window as any).clipboardData.clearData();
|
||||||
|
const format =
|
||||||
|
clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting['default'];
|
||||||
|
(window as any).clipboardData.setData(format, text);
|
||||||
|
} else {
|
||||||
|
// all other browsers
|
||||||
|
e.clipboardData.clearData();
|
||||||
|
e.clipboardData.setData(options.format, text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (options.onCopy) {
|
||||||
|
e.preventDefault();
|
||||||
|
options.onCopy(e.clipboardData);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.body.appendChild(mark);
|
||||||
|
|
||||||
|
range.selectNodeContents(mark);
|
||||||
|
selection.addRange(range);
|
||||||
|
|
||||||
|
const successful = document.execCommand('copy');
|
||||||
|
if (!successful) {
|
||||||
|
throw new Error('copy command was unsuccessful');
|
||||||
|
}
|
||||||
|
success = true;
|
||||||
|
} catch (err) {
|
||||||
|
debug && console.error('unable to copy using execCommand: ', err);
|
||||||
|
debug && console.warn('trying IE specific stuff');
|
||||||
|
try {
|
||||||
|
(window as any).clipboardData.setData(options.format || 'text', text);
|
||||||
|
options.onCopy && options.onCopy((window as any).clipboardData);
|
||||||
|
success = true;
|
||||||
|
} catch (err) {
|
||||||
|
debug && console.error('unable to copy using clipboardData: ', err);
|
||||||
|
debug && console.error('falling back to prompt');
|
||||||
|
message = format('message' in options ? options.message : defaultMessage);
|
||||||
|
window.prompt(message, text);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (selection) {
|
||||||
|
if (typeof selection.removeRange == 'function') {
|
||||||
|
selection.removeRange(range);
|
||||||
|
} else {
|
||||||
|
selection.removeAllRanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mark) {
|
||||||
|
document.body.removeChild(mark);
|
||||||
|
}
|
||||||
|
reselectPrevious();
|
||||||
|
}
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default copy;
|
|
@ -0,0 +1,41 @@
|
||||||
|
// copy from https://github.com/sudodoki/toggle-selection
|
||||||
|
// refactor to esm
|
||||||
|
const deselectCurrent = (): (() => void) => {
|
||||||
|
const selection = document.getSelection();
|
||||||
|
if (!selection.rangeCount) {
|
||||||
|
return function () {};
|
||||||
|
}
|
||||||
|
let active = document.activeElement as any;
|
||||||
|
|
||||||
|
const ranges = [];
|
||||||
|
for (let i = 0; i < selection.rangeCount; i++) {
|
||||||
|
ranges.push(selection.getRangeAt(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (
|
||||||
|
active.tagName.toUpperCase() // .toUpperCase handles XHTML
|
||||||
|
) {
|
||||||
|
case 'INPUT':
|
||||||
|
case 'TEXTAREA':
|
||||||
|
active.blur();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
active = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
selection.removeAllRanges();
|
||||||
|
return function () {
|
||||||
|
selection.type === 'Caret' && selection.removeAllRanges();
|
||||||
|
|
||||||
|
if (!selection.rangeCount) {
|
||||||
|
ranges.forEach(function (range) {
|
||||||
|
selection.addRange(range);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
active && active.focus();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export default deselectCurrent;
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
* Safe chained function
|
|
||||||
*
|
|
||||||
* Will only create a new function if needed,
|
|
||||||
* otherwise will pass back existing functions or null.
|
|
||||||
*
|
|
||||||
* @returns {function|null}
|
|
||||||
*/
|
|
||||||
export default function createChainedFunction() {
|
|
||||||
const args = [].slice.call(arguments, 0);
|
|
||||||
if (args.length === 1) {
|
|
||||||
return args[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return function chainedFunction() {
|
|
||||||
for (let i = 0; i < args.length; i++) {
|
|
||||||
if (args[i] && args[i].apply) {
|
|
||||||
args[i].apply(this, arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { inject, provide, reactive, watchEffect } from 'vue';
|
||||||
|
|
||||||
|
function createContext<T extends Record<string, any>>(defaultValue?: T) {
|
||||||
|
const contextKey = Symbol('contextKey');
|
||||||
|
const useProvide = (props: T, newProps?: T) => {
|
||||||
|
const mergedProps = reactive<T>({} as T);
|
||||||
|
provide(contextKey, mergedProps);
|
||||||
|
watchEffect(() => {
|
||||||
|
Object.assign(mergedProps, props, newProps || {});
|
||||||
|
});
|
||||||
|
return mergedProps;
|
||||||
|
};
|
||||||
|
const useInject = () => {
|
||||||
|
return inject(contextKey, defaultValue as T) || ({} as T);
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
useProvide,
|
||||||
|
useInject,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default createContext;
|
|
@ -0,0 +1,31 @@
|
||||||
|
export interface RefObject extends Function {
|
||||||
|
current?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createRef(): any {
|
||||||
|
const func: RefObject = (node: any) => {
|
||||||
|
func.current = node;
|
||||||
|
};
|
||||||
|
return func;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fillRef<T>(ref, node: T) {
|
||||||
|
if (typeof ref === 'function') {
|
||||||
|
ref(node);
|
||||||
|
} else if (typeof ref === 'object' && ref && 'current' in ref) {
|
||||||
|
(ref as any).current = node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merge refs into one ref function to support ref passing.
|
||||||
|
*/
|
||||||
|
export function composeRef<T>(...refs: any[]) {
|
||||||
|
return (node: T) => {
|
||||||
|
refs.forEach(ref => {
|
||||||
|
fillRef(ref, node);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default createRef;
|
|
@ -1,130 +0,0 @@
|
||||||
const START_EVENT_NAME_MAP = {
|
|
||||||
transitionstart: {
|
|
||||||
transition: 'transitionstart',
|
|
||||||
WebkitTransition: 'webkitTransitionStart',
|
|
||||||
MozTransition: 'mozTransitionStart',
|
|
||||||
OTransition: 'oTransitionStart',
|
|
||||||
msTransition: 'MSTransitionStart',
|
|
||||||
},
|
|
||||||
|
|
||||||
animationstart: {
|
|
||||||
animation: 'animationstart',
|
|
||||||
WebkitAnimation: 'webkitAnimationStart',
|
|
||||||
MozAnimation: 'mozAnimationStart',
|
|
||||||
OAnimation: 'oAnimationStart',
|
|
||||||
msAnimation: 'MSAnimationStart',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const END_EVENT_NAME_MAP = {
|
|
||||||
transitionend: {
|
|
||||||
transition: 'transitionend',
|
|
||||||
WebkitTransition: 'webkitTransitionEnd',
|
|
||||||
MozTransition: 'mozTransitionEnd',
|
|
||||||
OTransition: 'oTransitionEnd',
|
|
||||||
msTransition: 'MSTransitionEnd',
|
|
||||||
},
|
|
||||||
|
|
||||||
animationend: {
|
|
||||||
animation: 'animationend',
|
|
||||||
WebkitAnimation: 'webkitAnimationEnd',
|
|
||||||
MozAnimation: 'mozAnimationEnd',
|
|
||||||
OAnimation: 'oAnimationEnd',
|
|
||||||
msAnimation: 'MSAnimationEnd',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const startEvents = [];
|
|
||||||
const endEvents = [];
|
|
||||||
|
|
||||||
function detectEvents() {
|
|
||||||
const testEl = document.createElement('div');
|
|
||||||
const style = testEl.style;
|
|
||||||
|
|
||||||
if (!('AnimationEvent' in window)) {
|
|
||||||
delete START_EVENT_NAME_MAP.animationstart.animation;
|
|
||||||
delete END_EVENT_NAME_MAP.animationend.animation;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!('TransitionEvent' in window)) {
|
|
||||||
delete START_EVENT_NAME_MAP.transitionstart.transition;
|
|
||||||
delete END_EVENT_NAME_MAP.transitionend.transition;
|
|
||||||
}
|
|
||||||
|
|
||||||
function process(EVENT_NAME_MAP, events) {
|
|
||||||
for (const baseEventName in EVENT_NAME_MAP) {
|
|
||||||
if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) {
|
|
||||||
const baseEvents = EVENT_NAME_MAP[baseEventName];
|
|
||||||
for (const styleName in baseEvents) {
|
|
||||||
if (styleName in style) {
|
|
||||||
events.push(baseEvents[styleName]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
process(START_EVENT_NAME_MAP, startEvents);
|
|
||||||
process(END_EVENT_NAME_MAP, endEvents);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
||||||
detectEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
function addEventListener(node, eventName, eventListener) {
|
|
||||||
node.addEventListener(eventName, eventListener, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeEventListener(node, eventName, eventListener) {
|
|
||||||
node.removeEventListener(eventName, eventListener, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
const TransitionEvents = {
|
|
||||||
// Start events
|
|
||||||
startEvents,
|
|
||||||
|
|
||||||
addStartEventListener(node, eventListener) {
|
|
||||||
if (startEvents.length === 0) {
|
|
||||||
window.setTimeout(eventListener, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
startEvents.forEach(startEvent => {
|
|
||||||
addEventListener(node, startEvent, eventListener);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
removeStartEventListener(node, eventListener) {
|
|
||||||
if (startEvents.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
startEvents.forEach(startEvent => {
|
|
||||||
removeEventListener(node, startEvent, eventListener);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// End events
|
|
||||||
endEvents,
|
|
||||||
|
|
||||||
addEndEventListener(node, eventListener) {
|
|
||||||
if (endEvents.length === 0) {
|
|
||||||
window.setTimeout(eventListener, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
endEvents.forEach(endEvent => {
|
|
||||||
addEventListener(node, endEvent, eventListener);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
removeEndEventListener(node, eventListener) {
|
|
||||||
if (endEvents.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
endEvents.forEach(endEvent => {
|
|
||||||
removeEventListener(node, endEvent, eventListener);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TransitionEvents;
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue