Compare commits
595 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80aefd862c | ||
|
|
2ed7504783 | ||
|
|
aeccf0e270 | ||
|
|
17521ed43a | ||
|
|
da458176f3 | ||
|
|
67c2f2c965 | ||
|
|
e7cbb59d53 | ||
|
|
dfe4810199 | ||
|
|
4e6c981f4e | ||
|
|
2e8f70f5a1 | ||
|
|
0f1069a32e | ||
|
|
f8da510367 | ||
|
|
37186db5fc | ||
|
|
6b788acf63 | ||
|
|
cafcca31ac | ||
|
|
b633c2befe | ||
|
|
4540436f3d | ||
|
|
3768b6e5b6 | ||
|
|
264a412589 | ||
|
|
1141a51789 | ||
|
|
ccee913e59 | ||
|
|
378f3939c8 | ||
|
|
bb99676a8a | ||
|
|
9fbf50c3ce | ||
|
|
984aacc32f | ||
|
|
b0e7e02ab6 | ||
|
|
fcfd2ce4b2 | ||
|
|
fca04236ad | ||
|
|
810de41bc3 | ||
|
|
307c08af42 | ||
|
|
4620b9838b | ||
|
|
d1e0610a45 | ||
|
|
f1b2ed93df | ||
|
|
4fc35bdc3c | ||
|
|
5db105e587 | ||
|
|
1897b4cd89 | ||
|
|
17bb67dd5b | ||
|
|
fbfaba5bb8 | ||
|
|
53542dc027 | ||
|
|
8e59752ee1 | ||
|
|
22168e9b15 | ||
|
|
6f58383f5a | ||
|
|
90ad4ffc82 | ||
|
|
b45b5e9e65 | ||
|
|
c9876ed15b | ||
|
|
b26768ee42 | ||
|
|
9260427a34 | ||
|
|
398ddedac7 | ||
|
|
57e045f0ab | ||
|
|
631b5d4df1 | ||
|
|
13486b8e27 | ||
|
|
aed84c9430 | ||
|
|
7eee78c517 | ||
|
|
bfb773d64b | ||
|
|
2d8c02eb10 | ||
|
|
ffa88deb85 | ||
|
|
6bc18dc113 | ||
|
|
e567b9a7ab | ||
|
|
e5b5881f8c | ||
|
|
052f72d360 | ||
|
|
764184fc43 | ||
|
|
b46f05a948 | ||
|
|
ae87f8f7ce | ||
|
|
5fd0c239bc | ||
|
|
4bdaa2604f | ||
|
|
5795e421ac | ||
|
|
d3cb97ad71 | ||
|
|
c41897ca98 | ||
|
|
6ddedbff77 | ||
|
|
4bbc32dda7 | ||
|
|
fb12b0bd6a | ||
|
|
45bf55e4ba | ||
|
|
e2e6e867f8 | ||
|
|
49d5756f01 | ||
|
|
03ec5342e0 | ||
|
|
896e444895 | ||
|
|
9e9e1e61d5 | ||
|
|
dec3d86514 | ||
|
|
43f7befe36 | ||
|
|
44d54eb578 | ||
|
|
f1acc7f1d8 | ||
|
|
b3aa3958da | ||
|
|
3063d74b86 | ||
|
|
ecf7db731f | ||
|
|
39e9cced88 | ||
|
|
30641eb346 | ||
|
|
bbfd22f924 | ||
|
|
5664e728b4 | ||
|
|
465135a0f8 | ||
|
|
f808026e5b | ||
|
|
76d4f728a0 | ||
|
|
1266103171 | ||
|
|
3f0b15cca6 | ||
|
|
76958761f2 | ||
|
|
9a094d44ef | ||
|
|
71e5b7ca2b | ||
|
|
23cf931c7f | ||
|
|
09df15cc3c | ||
|
|
1a90b8a418 | ||
|
|
35de511cb3 | ||
|
|
d8c189df59 | ||
|
|
5f1bc4a756 | ||
|
|
a7d5923470 | ||
|
|
084795db82 | ||
|
|
c0401ebfa0 | ||
|
|
d29b05c775 | ||
|
|
4b30fe622c | ||
|
|
efabff3a74 | ||
|
|
59b65a2cb8 | ||
|
|
5f3fa833c9 | ||
|
|
cec8e5ddc3 | ||
|
|
5d310db486 | ||
|
|
61b5efbaf7 | ||
|
|
a1b2071fe0 | ||
|
|
171da55628 | ||
|
|
b1ae785f40 | ||
|
|
f86149807d | ||
|
|
a716fb03f9 | ||
|
|
d9f4bcf6ff | ||
|
|
c049713382 | ||
|
|
1b48122641 | ||
|
|
5d066caace | ||
|
|
429a84ff33 | ||
|
|
91d0a65243 | ||
|
|
c437735b6c | ||
|
|
ca68277976 | ||
|
|
a03b2feff2 | ||
|
|
24572b1577 | ||
|
|
d9b4426b07 | ||
|
|
d9cccf476b | ||
|
|
b25e6d5fa9 | ||
|
|
80fc8d9f76 | ||
|
|
e0cd05019e | ||
|
|
3cd2cd25b7 | ||
|
|
6c051294aa | ||
|
|
ff1d751e36 | ||
|
|
d106b01dec | ||
|
|
f927a95b6c | ||
|
|
e45fbe7f72 | ||
|
|
16aa05752b | ||
|
|
34208778ba | ||
|
|
400364c7fd | ||
|
|
30c3cd45a2 | ||
|
|
6994dacee4 | ||
|
|
dfefd48c34 | ||
|
|
31eb108811 | ||
|
|
b31046aab3 | ||
|
|
c86b74fe88 | ||
|
|
be18957933 | ||
|
|
8acd7c9fbe | ||
|
|
b0a0c56788 | ||
|
|
ab0aec397e | ||
|
|
63b8a6ffdd | ||
|
|
7539cfb29c | ||
|
|
dc2f1e68cd | ||
|
|
1bd1d78a78 | ||
|
|
3be585990c | ||
|
|
1c37a2ba77 | ||
|
|
39282bcc9d | ||
|
|
5f2480a90a | ||
|
|
c0aa405632 | ||
|
|
e6ab4ad86a | ||
|
|
af4419b723 | ||
|
|
f083759d03 | ||
|
|
89dc9750ec | ||
|
|
e0f89dc90b | ||
|
|
30d375b33f | ||
|
|
6879a3c51d | ||
|
|
d44a1e105e | ||
|
|
81d3e2b917 | ||
|
|
1abe9264aa | ||
|
|
f530ab7549 | ||
|
|
0ec2ce44b4 | ||
|
|
cc49a5b506 | ||
|
|
99013a5c54 | ||
|
|
38bcf108c9 | ||
|
|
f40e1b651b | ||
|
|
ad8d3a6c54 | ||
|
|
9a6cfeb36e | ||
|
|
ea01c29294 | ||
|
|
234dd96abf | ||
|
|
c49b084158 | ||
|
|
b2ef98f154 | ||
|
|
04dbb6c24c | ||
|
|
5a9fc2938c | ||
|
|
c995886c0f | ||
|
|
9b241e630c | ||
|
|
920dc619a4 | ||
|
|
f6b74b8b41 | ||
|
|
2e991732de | ||
|
|
2314247825 | ||
|
|
3349eb6a41 | ||
|
|
6c04d186e2 | ||
|
|
7de8582657 | ||
|
|
242f75cd1f | ||
|
|
78a51cb12f | ||
|
|
89be07b51f | ||
|
|
4f44a2afd0 | ||
|
|
7b5e48d307 | ||
|
|
c3572ceca9 | ||
|
|
7c6a0db820 | ||
|
|
5b8163301c | ||
|
|
e9f039d1fe | ||
|
|
ba6d5e802b | ||
|
|
8429acf460 | ||
|
|
3caea1ca02 | ||
|
|
7ac763bcdc | ||
|
|
8bc6dcd280 | ||
|
|
288b9b82b5 | ||
|
|
ac3c2e2356 | ||
|
|
24d5a1e996 | ||
|
|
35310454b1 | ||
|
|
7a9bbd4489 | ||
|
|
fdb596b2c3 | ||
|
|
ce23903a76 | ||
|
|
ac48bbe081 | ||
|
|
f4a7888af5 | ||
|
|
4e685e70b7 | ||
|
|
b287736327 | ||
|
|
6f4d9fff02 | ||
|
|
daa01aacb5 | ||
|
|
58dd4cc66c | ||
|
|
a8eb919f44 | ||
|
|
700c6036aa | ||
|
|
7a6da5e3e7 | ||
|
|
109ad5db90 | ||
|
|
4a0ddb02db | ||
|
|
0f26be5ff3 | ||
|
|
842b0d2ae4 | ||
|
|
32932d27d5 | ||
|
|
4a26e51540 | ||
|
|
0f3eda8254 | ||
|
|
30e7df6cca | ||
|
|
f1827ce9cd | ||
|
|
eb1df3e079 | ||
|
|
df91d2cab0 | ||
|
|
d2f9fbd055 | ||
|
|
bad48dc3b9 | ||
|
|
86f2c01459 | ||
|
|
955c437f32 | ||
|
|
eb720f20ff | ||
|
|
53eace04df | ||
|
|
1c9e203c52 | ||
|
|
5f79b75ea8 | ||
|
|
195585f5a6 | ||
|
|
fa8a7eca06 | ||
|
|
52fdab8d70 | ||
|
|
b3601aae5b | ||
|
|
456194da11 | ||
|
|
fb4c8eacb0 | ||
|
|
5d10e4a58e | ||
|
|
fce3370843 | ||
|
|
345d68cdbb | ||
|
|
a1d8ed4413 | ||
|
|
4111242cbb | ||
|
|
e82888daf4 | ||
|
|
015aaf3c3d | ||
|
|
22f75ca2e3 | ||
|
|
5f267b1854 | ||
|
|
0f6cb9139f | ||
|
|
f3aed77dc7 | ||
|
|
d8691fcd5a | ||
|
|
566c829a1c | ||
|
|
e51a09a2b8 | ||
|
|
8876866399 | ||
|
|
d63b651f37 | ||
|
|
1fef25b777 | ||
|
|
63dbe4705d | ||
|
|
5f00bba652 | ||
|
|
c06a1f305d | ||
|
|
1b16736a72 | ||
|
|
ec637483f2 | ||
|
|
971738b4b5 | ||
|
|
33f47771ca | ||
|
|
6d9256d2b1 | ||
|
|
f93e58eddb | ||
|
|
e344ed4446 | ||
|
|
f79d14f7c8 | ||
|
|
748b1b9a5a | ||
|
|
5ecccd1171 | ||
|
|
92fe8445b1 | ||
|
|
9c7ee5e554 | ||
|
|
f5c7da4c78 | ||
|
|
7a678fc64f | ||
|
|
a66d9a3d50 | ||
|
|
9d0097013a | ||
|
|
4853c5b527 | ||
|
|
c4355e4a6b | ||
|
|
0321c632ed | ||
|
|
e33e344410 | ||
|
|
9f7fc4ac2b | ||
|
|
f5ec0dbf74 | ||
|
|
d848c32297 | ||
|
|
05cfefd32b | ||
|
|
04b8219c18 | ||
|
|
341ad62517 | ||
|
|
5053725870 | ||
|
|
04c1ecd79d | ||
|
|
abc17a4858 | ||
|
|
4d863effdb | ||
|
|
5455e30048 | ||
|
|
c1a75a7d8f | ||
|
|
adb08ca33a | ||
|
|
5f15f8cdbd | ||
|
|
6edeaa4291 | ||
|
|
fe9384c216 | ||
|
|
ddc58343d3 | ||
|
|
706bd3602d | ||
|
|
0cf29baf63 | ||
|
|
8cc9defbc0 | ||
|
|
1b575c27cd | ||
|
|
f7ed579d91 | ||
|
|
0225c1173b | ||
|
|
467c961976 | ||
|
|
b30c68f8a1 | ||
|
|
573c10f099 | ||
|
|
effe4e9588 | ||
|
|
dabd458b4b | ||
|
|
0c8d8a48e1 | ||
|
|
03fec36b44 | ||
|
|
138e8da421 | ||
|
|
45c99f7130 | ||
|
|
8b6dd449d7 | ||
|
|
ac5685d368 | ||
|
|
81e8f52fcb | ||
|
|
d65977a991 | ||
|
|
90fef3086d | ||
|
|
9b71d9817d | ||
|
|
3b5283602c | ||
|
|
cc3ca2586f | ||
|
|
906a5de548 | ||
|
|
61276d0881 | ||
|
|
0ca1ec6fc3 | ||
|
|
f852dff122 | ||
|
|
efb3fc402e | ||
|
|
81ba76bb3c | ||
|
|
39ac525f6e | ||
|
|
fa7510c6af | ||
|
|
69f36286f9 | ||
|
|
52c13233a3 | ||
|
|
642d1001e3 | ||
|
|
473d36ff38 | ||
|
|
4a7cbd5b9f | ||
|
|
c40b71318c | ||
|
|
037bad148c | ||
|
|
0bd57ce212 | ||
|
|
8c4b61e30c | ||
|
|
c77ec4fb06 | ||
|
|
4ea685a001 | ||
|
|
0d35f10842 | ||
|
|
6daae47cc0 | ||
|
|
0f0a8c364d | ||
|
|
7ca811315f | ||
|
|
1884b8a421 | ||
|
|
92525e9ec4 | ||
|
|
6c46493803 | ||
|
|
f737c73a27 | ||
|
|
411922b14d | ||
|
|
21041eecb7 | ||
|
|
fbf294a605 | ||
|
|
0d1aee6a2f | ||
|
|
3c0cf9365b | ||
|
|
0e09c6b831 | ||
|
|
80d842b501 | ||
|
|
55945dcc36 | ||
|
|
42714733b6 | ||
|
|
35d5cbf4fd | ||
|
|
0d08c74d2f | ||
|
|
00b0e0a9b7 | ||
|
|
16a82e7e99 | ||
|
|
e2530bf312 | ||
|
|
2d54fa9c3f | ||
|
|
97e2e0da7c | ||
|
|
b77af55325 | ||
|
|
52aceee0ab | ||
|
|
70de5e8398 | ||
|
|
52762f83d8 | ||
|
|
dca1ab7d87 | ||
|
|
b07b6f743c | ||
|
|
0d148d8854 | ||
|
|
c24aaa6cbf | ||
|
|
301ee1972d | ||
|
|
593574d510 | ||
|
|
d61bba584f | ||
|
|
7aa1722a97 | ||
|
|
340009e6de | ||
|
|
bdd8752994 | ||
|
|
e0a2d5890d | ||
|
|
136afcf59b | ||
|
|
eb1e1cfb49 | ||
|
|
5be0fe8820 | ||
|
|
a0bb417691 | ||
|
|
590c1baeeb | ||
|
|
f12ae8cea2 | ||
|
|
6b7ca1234b | ||
|
|
0aa6a81c11 | ||
|
|
7629daedc1 | ||
|
|
dd96b832f7 | ||
|
|
29f585365f | ||
|
|
f55566e36b | ||
|
|
7ecfa6a343 | ||
|
|
7453733ff6 | ||
|
|
dd6b8682a6 | ||
|
|
8e935b60c8 | ||
|
|
9be7aac831 | ||
|
|
f830450ca8 | ||
|
|
b0b8d3c982 | ||
|
|
90d4b72e06 | ||
|
|
ea1d09c444 | ||
|
|
7bd70e54f2 | ||
|
|
ed4a4e6081 | ||
|
|
087d0ea1e1 | ||
|
|
8cf6c209d8 | ||
|
|
db19e8c706 | ||
|
|
510a446be6 | ||
|
|
327bfca418 | ||
|
|
be452a0ed3 | ||
|
|
23a78f0ab1 | ||
|
|
6c9640c245 | ||
|
|
1260b4fb3f | ||
|
|
d521e147f9 | ||
|
|
f47243460e | ||
|
|
91a9fd96b9 | ||
|
|
5e304b60a1 | ||
|
|
4c74d58f26 | ||
|
|
cd64a164f1 | ||
|
|
1f2b048312 | ||
|
|
caf889e49e | ||
|
|
b5ba078b12 | ||
|
|
cdfba0be4a | ||
|
|
61cc86d68d | ||
|
|
846b603413 | ||
|
|
791b1943f2 | ||
|
|
8741eed7a5 | ||
|
|
afc9cae32c | ||
|
|
d08567797f | ||
|
|
acb2b7061c | ||
|
|
9ed860ef24 | ||
|
|
28758a03f0 | ||
|
|
f732bf025a | ||
|
|
68ddcec057 | ||
|
|
6d5739320e | ||
|
|
5d39e36083 | ||
|
|
269e5351aa | ||
|
|
ef1c7aadbc | ||
|
|
dd181e91bd | ||
|
|
bab999701c | ||
|
|
41b8ce278b | ||
|
|
de94f6003f | ||
|
|
3a3b0a4eae | ||
|
|
c4e5aa0d32 | ||
|
|
7652d326e4 | ||
|
|
6381c63fb1 | ||
|
|
9e1ef5623f | ||
|
|
9519b9e055 | ||
|
|
94395af932 | ||
|
|
81d5e6eb1b | ||
|
|
38d055e7fb | ||
|
|
727c1684bb | ||
|
|
e538b9f23e | ||
|
|
116da0b746 | ||
|
|
c387223720 | ||
|
|
81fa902454 | ||
|
|
d55f6c3073 | ||
|
|
e5a3ee5e9c | ||
|
|
3695c3a1fb | ||
|
|
2892675f65 | ||
|
|
9abaafa546 | ||
|
|
c93fdec2f0 | ||
|
|
8c3a1298f7 | ||
|
|
fb6266a8df | ||
|
|
96d4a64944 | ||
|
|
cf07b5a7ab | ||
|
|
f6b00cda24 | ||
|
|
af0786b10f | ||
|
|
d5266dc995 | ||
|
|
397359154c | ||
|
|
cd58245f10 | ||
|
|
e4d4c5d0bc | ||
|
|
8f95b26d65 | ||
|
|
e1cd51e4fb | ||
|
|
dcdd9be0b3 | ||
|
|
48e86c5796 | ||
|
|
d59aa2c702 | ||
|
|
22f6a4beea | ||
|
|
470adc3f16 | ||
|
|
e01103e3f9 | ||
|
|
9322cc83bc | ||
|
|
0f376c1107 | ||
|
|
b66abdf3b1 | ||
|
|
1bee3c03cf | ||
|
|
a2a38058af | ||
|
|
41fd25abe1 | ||
|
|
f233e05acc | ||
|
|
eeea633150 | ||
|
|
a5d280365b | ||
|
|
c26e68427c | ||
|
|
68ab243ffa | ||
|
|
cac30c0722 | ||
|
|
def8173e7b | ||
|
|
921f17a650 | ||
|
|
636204974b | ||
|
|
c6cbae6b2a | ||
|
|
4e4a1febb0 | ||
|
|
f2185b9b5f | ||
|
|
a894ea3a51 | ||
|
|
0ad0985ac0 | ||
|
|
d361194a99 | ||
|
|
3d72b94ee9 | ||
|
|
d395dfaafc | ||
|
|
e61d609bc0 | ||
|
|
23d7dd6dbd | ||
|
|
be80d26cdb | ||
|
|
22f6b373f9 | ||
|
|
a92f838c8d | ||
|
|
e76fce5852 | ||
|
|
c121778b49 | ||
|
|
4376d92ea7 | ||
|
|
de163b337c | ||
|
|
5f44e01dab | ||
|
|
1c5e1cb3c9 | ||
|
|
b165aff2f7 | ||
|
|
1bdeab8159 | ||
|
|
1da3aa3103 | ||
|
|
6587e5cf80 | ||
|
|
6c9f833a90 | ||
|
|
24abed1336 | ||
|
|
5bf876cb0f | ||
|
|
911b72cf78 | ||
|
|
e0d0f5a1c6 | ||
|
|
5baad13902 | ||
|
|
d9a8b8ea80 | ||
|
|
1161bff6eb | ||
|
|
a84a05a56a | ||
|
|
9d075734cb | ||
|
|
9508c4c11b | ||
|
|
01a71532d9 | ||
|
|
621391255b | ||
|
|
c6dd1a7d93 | ||
|
|
fe777292b5 | ||
|
|
67be130c7b | ||
|
|
be7198a05b | ||
|
|
f72d2511ba | ||
|
|
4251c23f71 | ||
|
|
fc745a3ec8 | ||
|
|
e9d8c1a9dd | ||
|
|
36ea7e7421 | ||
|
|
aa7b055064 | ||
|
|
add38103ad | ||
|
|
5c65ea6a38 | ||
|
|
27287a6884 | ||
|
|
cc5292f510 | ||
|
|
7da9729a62 | ||
|
|
605704d7f5 | ||
|
|
68932330f0 | ||
|
|
78f47133e9 | ||
|
|
c50c1e9d23 | ||
|
|
10f91729aa | ||
|
|
57ff6ee9ef | ||
|
|
77973cd7fb | ||
|
|
41eea9edc4 | ||
|
|
060880296a | ||
|
|
1c7cb61072 | ||
|
|
3bf08d87c9 | ||
|
|
8fda884ad3 | ||
|
|
c0b2f72a06 | ||
|
|
12532dc913 | ||
|
|
3ab0441667 | ||
|
|
60f31b32f8 | ||
|
|
77212386c0 | ||
|
|
e34ba3532f | ||
|
|
72a1437dae | ||
|
|
413c313644 | ||
|
|
c9159ccf05 | ||
|
|
9ba80d31d4 | ||
|
|
86a97d197e | ||
|
|
87527d8149 | ||
|
|
be8ef5f655 | ||
|
|
86de1d3875 | ||
|
|
dad0765ed3 | ||
|
|
f2b9055c2b | ||
|
|
a5179125b0 | ||
|
|
1a8886b7f7 | ||
|
|
ba641ae507 | ||
|
|
11c40217cf | ||
|
|
3b6c5ee620 | ||
|
|
d30039c1a9 | ||
|
|
a46866c950 | ||
|
|
146cfa21a3 | ||
|
|
5e9fd345da | ||
|
|
b2e9341b8c | ||
|
|
58a1c6ef92 | ||
|
|
fad6dda456 | ||
|
|
60ba89b9a7 | ||
|
|
8d109b62ba |
704 changed files with 48094 additions and 88539 deletions
|
|
@ -8,5 +8,10 @@ module.exports = {
|
||||||
modules: false
|
modules: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
env: {
|
||||||
|
test: {
|
||||||
|
plugins: [ 'istanbul' ]
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
# https://github.com/browserslist/browserslist#readme
|
# https://github.com/browserslist/browserslist#readme
|
||||||
|
|
||||||
>= 0.5%
|
>= 1%
|
||||||
last 2 major versions
|
last 1 major version
|
||||||
not dead
|
not dead
|
||||||
Chrome >= 60
|
Chrome >= 45
|
||||||
Firefox >= 60
|
Firefox >= 38
|
||||||
# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version
|
Edge >= 12
|
||||||
# should be removed in the future when its usage drops or when it's moved to dead browsers
|
Explorer >= 10
|
||||||
not Edge < 79
|
iOS >= 9
|
||||||
Firefox ESR
|
Safari >= 9
|
||||||
iOS >= 10
|
Android >= 4.4
|
||||||
Safari >= 10
|
Opera >= 30
|
||||||
Android >= 6
|
|
||||||
not Explorer <= 11
|
|
||||||
|
|
|
||||||
|
|
@ -6,55 +6,39 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/css/bootstrap-grid.min.css",
|
"path": "./dist/css/bootstrap-grid.min.css",
|
||||||
"maxSize": "6 kB"
|
"maxSize": "6.25 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/css/bootstrap-reboot.css",
|
"path": "./dist/css/bootstrap-reboot.css",
|
||||||
"maxSize": "2.25 kB"
|
"maxSize": "2 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/css/bootstrap-reboot.min.css",
|
"path": "./dist/css/bootstrap-reboot.min.css",
|
||||||
"maxSize": "2 kB"
|
"maxSize": "2 kB"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-utilities.css",
|
|
||||||
"maxSize": "7.5 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-utilities.min.css",
|
|
||||||
"maxSize": "6.75 kB"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "./dist/css/bootstrap.css",
|
"path": "./dist/css/bootstrap.css",
|
||||||
"maxSize": "24 kB"
|
"maxSize": "25.5 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/css/bootstrap.min.css",
|
"path": "./dist/css/bootstrap.min.css",
|
||||||
"maxSize": "22 kB"
|
"maxSize": "23.5 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/js/bootstrap.bundle.js",
|
"path": "./dist/js/bootstrap.bundle.js",
|
||||||
"maxSize": "41 kB"
|
"maxSize": "48 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/js/bootstrap.bundle.min.js",
|
"path": "./dist/js/bootstrap.bundle.min.js",
|
||||||
"maxSize": "21.5 kB"
|
"maxSize": "21.5 kB"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.esm.js",
|
|
||||||
"maxSize": "27 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.esm.min.js",
|
|
||||||
"maxSize": "18 kB"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "./dist/js/bootstrap.js",
|
"path": "./dist/js/bootstrap.js",
|
||||||
"maxSize": "28 kB"
|
"maxSize": "25.5 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/js/bootstrap.min.js",
|
"path": "./dist/js/bootstrap.min.js",
|
||||||
"maxSize": "15.5 kB"
|
"maxSize": "14.75 kB"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ci": {
|
"ci": {
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,6 @@ indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,6 @@
|
||||||
"warn",
|
"warn",
|
||||||
5
|
5
|
||||||
],
|
],
|
||||||
"multiline-ternary": [
|
|
||||||
"error",
|
|
||||||
"always-multiline"
|
|
||||||
],
|
|
||||||
"new-cap": [
|
"new-cap": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|
@ -32,6 +28,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
|
"no-mixed-operators": "off",
|
||||||
|
"no-negated-condition": "off",
|
||||||
"object-curly-spacing": [
|
"object-curly-spacing": [
|
||||||
"error",
|
"error",
|
||||||
"always"
|
"always"
|
||||||
|
|
@ -43,16 +41,23 @@
|
||||||
],
|
],
|
||||||
"unicorn/consistent-function-scoping": "off",
|
"unicorn/consistent-function-scoping": "off",
|
||||||
"unicorn/explicit-length-check": "off",
|
"unicorn/explicit-length-check": "off",
|
||||||
|
"unicorn/import-index": "off",
|
||||||
"unicorn/no-array-callback-reference": "off",
|
"unicorn/no-array-callback-reference": "off",
|
||||||
"unicorn/no-for-loop": "off",
|
"unicorn/no-for-loop": "off",
|
||||||
"unicorn/no-null": "off",
|
"unicorn/no-null": "off",
|
||||||
"unicorn/no-unused-properties": "error",
|
"unicorn/no-unused-properties": "error",
|
||||||
"unicorn/no-useless-undefined": "off",
|
"unicorn/no-useless-undefined": "off",
|
||||||
"unicorn/prefer-dom-node-append": "off",
|
"unicorn/prefer-array-find": "off",
|
||||||
"unicorn/prefer-dom-node-dataset": "off",
|
"unicorn/prefer-dom-node-dataset": "off",
|
||||||
|
"unicorn/prefer-includes": "off",
|
||||||
|
"unicorn/prefer-math-trunc": "off",
|
||||||
|
"unicorn/prefer-dom-node-append": "off",
|
||||||
"unicorn/prefer-dom-node-remove": "off",
|
"unicorn/prefer-dom-node-remove": "off",
|
||||||
|
"unicorn/prefer-number-properties": "off",
|
||||||
"unicorn/prefer-optional-catch-binding": "off",
|
"unicorn/prefer-optional-catch-binding": "off",
|
||||||
"unicorn/prefer-query-selector": "off",
|
"unicorn/prefer-query-selector": "off",
|
||||||
|
"unicorn/prefer-reflect-apply": "off",
|
||||||
|
"unicorn/prefer-set-has": "off",
|
||||||
"unicorn/prevent-abbreviations": "off"
|
"unicorn/prevent-abbreviations": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
.github/CONTRIBUTING.md
vendored
22
.github/CONTRIBUTING.md
vendored
|
|
@ -19,7 +19,7 @@ and [submitting pull requests](#pull-requests), but please respect the following
|
||||||
restrictions:
|
restrictions:
|
||||||
|
|
||||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||||
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
|
Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag),
|
||||||
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
||||||
|
|
||||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||||
|
|
@ -58,14 +58,14 @@ Good bug reports are extremely helpful, so thanks!
|
||||||
|
|
||||||
Guidelines for bug reports:
|
Guidelines for bug reports:
|
||||||
|
|
||||||
0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your
|
0. **[validate your HTML](https://html5.validator.nu/)** to ensure your
|
||||||
problem isn't caused by a simple error in your own code.
|
problem isn't caused by a simple error in your own code.
|
||||||
|
|
||||||
1. **Use the GitHub issue search** — check if the issue has already been
|
1. **Use the GitHub issue search** — check if the issue has already been
|
||||||
reported.
|
reported.
|
||||||
|
|
||||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||||
latest `main` (or `v4-dev` branch if the issue is about v4) in the repository.
|
latest `master` or `v4-dev` branch in the repository.
|
||||||
|
|
||||||
3. **Isolate the problem** — ideally create a [reduced test
|
3. **Isolate the problem** — ideally create a [reduced test
|
||||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||||
|
|
@ -100,6 +100,7 @@ Example:
|
||||||
### Reporting upstream browser bugs
|
### Reporting upstream browser bugs
|
||||||
|
|
||||||
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
|
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
|
||||||
|
When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
|
||||||
|
|
||||||
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
|
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
|
||||||
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
|
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
|
||||||
|
|
@ -136,12 +137,12 @@ project (indentation, accurate comments, etc.) and any other requirements
|
||||||
|
|
||||||
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
|
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
|
||||||
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
|
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
|
||||||
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss)
|
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/v4-dev/scss)
|
||||||
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/main/js/src) instead.
|
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/src) instead.
|
||||||
|
|
||||||
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
||||||
documentation source files in
|
documentation source files in
|
||||||
[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs).
|
[the `/bootstrap/site/content/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/content/docs).
|
||||||
**Do not edit the `gh-pages` branch.** That branch is generated from the
|
**Do not edit the `gh-pages` branch.** That branch is generated from the
|
||||||
documentation source files and is managed separately by the Bootstrap Core Team.
|
documentation source files and is managed separately by the Bootstrap Core Team.
|
||||||
|
|
||||||
|
|
@ -163,8 +164,8 @@ included in the project:
|
||||||
2. If you cloned a while ago, get the latest changes from upstream:
|
2. If you cloned a while ago, get the latest changes from upstream:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout main
|
git checkout v4-dev
|
||||||
git pull upstream main
|
git pull upstream v4-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Create a new topic branch (off the main project development branch) to
|
3. Create a new topic branch (off the main project development branch) to
|
||||||
|
|
@ -183,7 +184,7 @@ included in the project:
|
||||||
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git pull [--rebase] upstream main
|
git pull [--rebase] upstream v4-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Push your topic branch up to your fork:
|
6. Push your topic branch up to your fork:
|
||||||
|
|
@ -193,7 +194,7 @@ included in the project:
|
||||||
```
|
```
|
||||||
|
|
||||||
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
|
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
|
||||||
with a clear title and description against the `main` branch.
|
with a clear title and description against the `v4-dev` branch.
|
||||||
|
|
||||||
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
|
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
|
||||||
license your work under the terms of the [MIT License](../LICENSE) (if it
|
license your work under the terms of the [MIT License](../LICENSE) (if it
|
||||||
|
|
@ -225,6 +226,7 @@ includes code changes) and under the terms of the
|
||||||
- 2 spaces (no tabs)
|
- 2 spaces (no tabs)
|
||||||
- strict mode
|
- strict mode
|
||||||
- "Attractive"
|
- "Attractive"
|
||||||
|
- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
|
||||||
|
|
||||||
### Checking coding style
|
### Checking coding style
|
||||||
|
|
||||||
|
|
|
||||||
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
open_collective: bootstrap
|
|
||||||
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -11,10 +11,10 @@ Before opening:
|
||||||
|
|
||||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
|
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
|
||||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
Bug reports must include:
|
Bug reports must include:
|
||||||
|
|
||||||
- Operating system and version (Windows, macOS, Android, iOS)
|
- Operating system and version (Windows, macOS, Android, iOS)
|
||||||
- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
|
- Browser and version (Chrome, Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, Android Browser)
|
||||||
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||||
|
|
|
||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
contact_links:
|
|
||||||
- name: Ask a question
|
|
||||||
url: https://github.com/twbs/bootstrap/discussions/new
|
|
||||||
about: Ask and discuss questions with other Bootstrap community members
|
|
||||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
|
@ -10,7 +10,7 @@ assignees: ''
|
||||||
Before opening:
|
Before opening:
|
||||||
|
|
||||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
Feature requests must include:
|
Feature requests must include:
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/SUPPORT.md
vendored
2
.github/SUPPORT.md
vendored
|
|
@ -8,4 +8,4 @@ For general troubleshooting or help getting started:
|
||||||
|
|
||||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||||
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
|
- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
|
||||||
|
|
|
||||||
24
.github/dependabot.yml
vendored
24
.github/dependabot.yml
vendored
|
|
@ -1,24 +0,0 @@
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: tuesday
|
|
||||||
time: "12:00"
|
|
||||||
timezone: Europe/Athens
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- XhmikosR
|
|
||||||
labels:
|
|
||||||
- dependencies
|
|
||||||
- v5
|
|
||||||
versioning-strategy: increase
|
|
||||||
rebase-strategy: disabled
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: tuesday
|
|
||||||
time: "12:00"
|
|
||||||
timezone: Europe/Athens
|
|
||||||
54
.github/release-drafter.yml
vendored
54
.github/release-drafter.yml
vendored
|
|
@ -1,54 +0,0 @@
|
||||||
name-template: 'v$NEXT_MAJOR_VERSION'
|
|
||||||
tag-template: 'v$NEXT_MAJOR_VERSION'
|
|
||||||
prerelease: true
|
|
||||||
exclude-labels:
|
|
||||||
- 'skip-changelog'
|
|
||||||
categories:
|
|
||||||
- title: '❗ Breaking Changes'
|
|
||||||
labels:
|
|
||||||
- 'breaking-change'
|
|
||||||
- title: '🚀 Features'
|
|
||||||
labels:
|
|
||||||
- 'new-feature'
|
|
||||||
- 'feature'
|
|
||||||
- 'enhancement'
|
|
||||||
- title: '🐛 Bug fixes'
|
|
||||||
labels:
|
|
||||||
- 'fix'
|
|
||||||
- 'bugfix'
|
|
||||||
- 'bug'
|
|
||||||
- title: '⚡ Performance Improvements'
|
|
||||||
labels:
|
|
||||||
- 'performance'
|
|
||||||
- title: '🎨 CSS'
|
|
||||||
labels:
|
|
||||||
- 'css'
|
|
||||||
- title: '☕️ JavaScript'
|
|
||||||
labels:
|
|
||||||
- 'js'
|
|
||||||
- title: '📖 Docs'
|
|
||||||
labels:
|
|
||||||
- 'docs'
|
|
||||||
- title: '🌎 Accessibility'
|
|
||||||
labels:
|
|
||||||
- 'accessibility'
|
|
||||||
- title: '🔧 Utility API'
|
|
||||||
labels:
|
|
||||||
- 'utility API'
|
|
||||||
- 'utilities'
|
|
||||||
- title: '🏭 Tests'
|
|
||||||
labels:
|
|
||||||
- 'tests'
|
|
||||||
- title: '🧰 Misc'
|
|
||||||
labels:
|
|
||||||
- 'build'
|
|
||||||
- 'meta'
|
|
||||||
- 'chore'
|
|
||||||
- 'CI'
|
|
||||||
- title: '📦 Dependencies'
|
|
||||||
labels:
|
|
||||||
- 'dependencies'
|
|
||||||
change-template: '- #$NUMBER: $TITLE'
|
|
||||||
template: |
|
|
||||||
## Changes
|
|
||||||
$CHANGES
|
|
||||||
2
.github/workflows/browserstack.yml
vendored
2
.github/workflows/browserstack.yml
vendored
|
|
@ -5,7 +5,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
browserstack:
|
browserstack:
|
||||||
|
|
|
||||||
4
.github/workflows/bundlewatch.yml
vendored
4
.github/workflows/bundlewatch.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bundlewatch:
|
bundlewatch:
|
||||||
|
|
@ -42,4 +42,4 @@ jobs:
|
||||||
run: npm run bundlewatch
|
run: npm run bundlewatch
|
||||||
env:
|
env:
|
||||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||||
CI_BRANCH_BASE: main
|
CI_BRANCH_BASE: v4-dev
|
||||||
|
|
|
||||||
2
.github/workflows/css.yml
vendored
2
.github/workflows/css.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
css:
|
css:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: CSS (node-sass)
|
name: CSS (Dart Sass)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
css:
|
css:
|
||||||
|
|
@ -23,8 +23,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE }}"
|
node-version: "${{ env.NODE }}"
|
||||||
|
|
||||||
- name: Build CSS with node-sass
|
- name: Build CSS with Dart Sass
|
||||||
run: |
|
run: |
|
||||||
npx --package node-sass@latest node-sass --version
|
npx --package sass@latest sass --version
|
||||||
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
|
npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/
|
||||||
ls -Al dist-sass/css
|
ls -Al dist-sass/css
|
||||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
|
|
|
||||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 2
|
FORCE_COLOR: 2
|
||||||
NODE: 14
|
NODE: 14.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
|
|
||||||
14
.github/workflows/release-notes.yml
vendored
14
.github/workflows/release-notes.yml
vendored
|
|
@ -1,14 +0,0 @@
|
||||||
name: Release notes
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update_release_draft:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: release-drafter/release-drafter@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
# Ignore docs files
|
# Ignore docs files
|
||||||
/_gh_pages/
|
/_gh_pages/
|
||||||
# Hugo resources folder
|
# Hugo folders
|
||||||
/resources/
|
/resources/
|
||||||
|
|
||||||
# Numerous always-ignore extensions
|
# Numerous always-ignore extensions
|
||||||
|
|
|
||||||
13
.stylelintrc
13
.stylelintrc
|
|
@ -8,9 +8,7 @@
|
||||||
"outline": "none"
|
"outline": "none"
|
||||||
},
|
},
|
||||||
"function-disallowed-list": [
|
"function-disallowed-list": [
|
||||||
"calc",
|
"calc"
|
||||||
"lighten",
|
|
||||||
"darken"
|
|
||||||
],
|
],
|
||||||
"property-disallowed-list": [
|
"property-disallowed-list": [
|
||||||
"border-radius",
|
"border-radius",
|
||||||
|
|
@ -19,13 +17,6 @@
|
||||||
"border-bottom-right-radius",
|
"border-bottom-right-radius",
|
||||||
"border-bottom-left-radius",
|
"border-bottom-left-radius",
|
||||||
"transition"
|
"transition"
|
||||||
],
|
]
|
||||||
"scss/dollar-variable-default": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"ignore": "local"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"scss/selector-no-union-class-name": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
- Using welcoming and inclusive language
|
* Using welcoming and inclusive language
|
||||||
- Being respectful of differing viewpoints and experiences
|
* Being respectful of differing viewpoints and experiences
|
||||||
- Gracefully accepting constructive criticism
|
* Gracefully accepting constructive criticism
|
||||||
- Focusing on what is best for the community
|
* Focusing on what is best for the community
|
||||||
- Showing empathy towards other community members
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
- Public or private harassment
|
* Public or private harassment
|
||||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Our Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
|
|
|
||||||
134
README.md
134
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://getbootstrap.com/">
|
<a href="https://getbootstrap.com/">
|
||||||
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
|
<img src="https://getbootstrap.com/docs/4.5/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
|
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
|
||||||
<br>
|
<br>
|
||||||
<a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a>
|
<a href="https://getbootstrap.com/docs/4.5/"><strong>Explore Bootstrap docs »</strong></a>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
|
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
|
||||||
|
|
@ -22,11 +22,6 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## Bootstrap 4
|
|
||||||
|
|
||||||
Our default branch is for development of our upcoming Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
|
|
||||||
|
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
- [Quick start](#quick-start)
|
- [Quick start](#quick-start)
|
||||||
|
|
@ -46,20 +41,20 @@ Our default branch is for development of our upcoming Bootstrap 5 release. Head
|
||||||
|
|
||||||
Several quick start options are available:
|
Several quick start options are available:
|
||||||
|
|
||||||
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip)
|
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.5.3.zip)
|
||||||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
|
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
|
||||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@next`
|
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
|
||||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@next`
|
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.5.3`
|
||||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0-beta1`
|
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.5.3`
|
||||||
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
|
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
|
||||||
|
|
||||||
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
Read the [Getting started page](https://getbootstrap.com/docs/4.5/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||||
|
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
[](https://bootstrap-slack.herokuapp.com/)
|
[](https://bootstrap-slack.herokuapp.com/)
|
||||||
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
|
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av4-dev)
|
||||||
[](https://www.npmjs.com/package/bootstrap)
|
[](https://www.npmjs.com/package/bootstrap)
|
||||||
[](https://rubygems.org/gems/bootstrap)
|
[](https://rubygems.org/gems/bootstrap)
|
||||||
[](https://atmospherejs.com/twbs/bootstrap)
|
[](https://atmospherejs.com/twbs/bootstrap)
|
||||||
|
|
@ -67,11 +62,9 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-starte
|
||||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||||
[](https://coveralls.io/github/twbs/bootstrap?branch=main)
|
[](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
[](https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.min.css)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
[](https://github.com/twbs/bootstrap/blob/v4-dev/dist/js/bootstrap.min.js)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
|
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
|
|
||||||
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
||||||
[](#backers)
|
[](#backers)
|
||||||
[](#sponsors)
|
[](#sponsors)
|
||||||
|
|
@ -83,60 +76,37 @@ Within the download you'll find the following directories and files, logically g
|
||||||
|
|
||||||
```text
|
```text
|
||||||
bootstrap/
|
bootstrap/
|
||||||
├── css/
|
└── dist/
|
||||||
│ ├── bootstrap-grid.css
|
├── css/
|
||||||
│ ├── bootstrap-grid.css.map
|
│ ├── bootstrap-grid.css
|
||||||
│ ├── bootstrap-grid.min.css
|
│ ├── bootstrap-grid.css.map
|
||||||
│ ├── bootstrap-grid.min.css.map
|
│ ├── bootstrap-grid.min.css
|
||||||
│ ├── bootstrap-grid.rtl.css
|
│ ├── bootstrap-grid.min.css.map
|
||||||
│ ├── bootstrap-grid.rtl.css.map
|
│ ├── bootstrap-reboot.css
|
||||||
│ ├── bootstrap-grid.rtl.min.css
|
│ ├── bootstrap-reboot.css.map
|
||||||
│ ├── bootstrap-grid.rtl.min.css.map
|
│ ├── bootstrap-reboot.min.css
|
||||||
│ ├── bootstrap-reboot.css
|
│ ├── bootstrap-reboot.min.css.map
|
||||||
│ ├── bootstrap-reboot.css.map
|
│ ├── bootstrap.css
|
||||||
│ ├── bootstrap-reboot.min.css
|
│ ├── bootstrap.css.map
|
||||||
│ ├── bootstrap-reboot.min.css.map
|
│ ├── bootstrap.min.css
|
||||||
│ ├── bootstrap-reboot.rtl.css
|
│ └── bootstrap.min.css.map
|
||||||
│ ├── bootstrap-reboot.rtl.css.map
|
└── js/
|
||||||
│ ├── bootstrap-reboot.rtl.min.css
|
├── bootstrap.bundle.js
|
||||||
│ ├── bootstrap-reboot.rtl.min.css.map
|
├── bootstrap.bundle.js.map
|
||||||
│ ├── bootstrap-utilities.css
|
├── bootstrap.bundle.min.js
|
||||||
│ ├── bootstrap-utilities.css.map
|
├── bootstrap.bundle.min.js.map
|
||||||
│ ├── bootstrap-utilities.min.css
|
├── bootstrap.js
|
||||||
│ ├── bootstrap-utilities.min.css.map
|
├── bootstrap.js.map
|
||||||
│ ├── bootstrap-utilities.rtl.css
|
├── bootstrap.min.js
|
||||||
│ ├── bootstrap-utilities.rtl.css.map
|
└── bootstrap.min.js.map
|
||||||
│ ├── bootstrap-utilities.rtl.min.css
|
|
||||||
│ ├── bootstrap-utilities.rtl.min.css.map
|
|
||||||
│ ├── bootstrap.css
|
|
||||||
│ ├── bootstrap.css.map
|
|
||||||
│ ├── bootstrap.min.css
|
|
||||||
│ ├── bootstrap.min.css.map
|
|
||||||
│ ├── bootstrap.rtl.css
|
|
||||||
│ ├── bootstrap.rtl.css.map
|
|
||||||
│ ├── bootstrap.rtl.min.css
|
|
||||||
│ └── bootstrap.rtl.min.css.map
|
|
||||||
└── js/
|
|
||||||
├── bootstrap.bundle.js
|
|
||||||
├── bootstrap.bundle.js.map
|
|
||||||
├── bootstrap.bundle.min.js
|
|
||||||
├── bootstrap.bundle.min.js.map
|
|
||||||
├── bootstrap.esm.js
|
|
||||||
├── bootstrap.esm.js.map
|
|
||||||
├── bootstrap.esm.min.js
|
|
||||||
├── bootstrap.esm.min.js.map
|
|
||||||
├── bootstrap.js
|
|
||||||
├── bootstrap.js.map
|
|
||||||
├── bootstrap.min.js
|
|
||||||
└── bootstrap.min.js.map
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
|
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
|
||||||
|
|
||||||
|
|
||||||
## Bugs and feature requests
|
## Bugs and feature requests
|
||||||
|
|
||||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
||||||
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
@ -149,7 +119,7 @@ Documentation search is powered by [Algolia's DocSearch](https://community.algol
|
||||||
|
|
||||||
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
|
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
|
||||||
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
|
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
|
||||||
3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
|
3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
|
||||||
4. Open `http://localhost:9001/` in your browser, and voilà.
|
4. Open `http://localhost:9001/` in your browser, and voilà.
|
||||||
|
|
||||||
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
||||||
|
|
@ -163,11 +133,11 @@ You can find all our previous releases docs on <https://getbootstrap.com/docs/ve
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||||
|
|
||||||
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/main/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/v4-dev/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
||||||
|
|
||||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/v4-dev/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
||||||
|
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
@ -178,7 +148,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
|
||||||
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
||||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
|
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
|
||||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -215,16 +185,16 @@ Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infras
|
||||||
|
|
||||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
||||||
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
||||||
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
@ -236,4 +206,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
Code and documentation copyright 2011–2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
Code and documentation copyright 2011-2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const rollup = require('rollup')
|
||||||
const { babel } = require('@rollup/plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
|
|
||||||
const rootPath = path.resolve(__dirname, '../js/dist/')
|
const TEST = process.env.NODE_ENV === 'test'
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
|
|
@ -24,12 +24,7 @@ const plugins = [
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const bsPlugins = {
|
const bsPlugins = {
|
||||||
Data: path.resolve(__dirname, '../js/src/dom/data.js'),
|
|
||||||
EventHandler: path.resolve(__dirname, '../js/src/dom/event-handler.js'),
|
|
||||||
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
|
|
||||||
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
|
||||||
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
||||||
Base: path.resolve(__dirname, '../js/src/base-component.js'),
|
|
||||||
Button: path.resolve(__dirname, '../js/src/button.js'),
|
Button: path.resolve(__dirname, '../js/src/button.js'),
|
||||||
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
||||||
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
||||||
|
|
@ -39,124 +34,33 @@ const bsPlugins = {
|
||||||
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
|
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
|
||||||
Tab: path.resolve(__dirname, '../js/src/tab.js'),
|
Tab: path.resolve(__dirname, '../js/src/tab.js'),
|
||||||
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
||||||
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
|
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'),
|
||||||
|
Util: path.resolve(__dirname, '../js/src/util.js')
|
||||||
}
|
}
|
||||||
|
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'
|
||||||
const defaultPluginConfig = {
|
|
||||||
external: [
|
|
||||||
bsPlugins.Data,
|
|
||||||
bsPlugins.Base,
|
|
||||||
bsPlugins.EventHandler,
|
|
||||||
bsPlugins.SelectorEngine
|
|
||||||
],
|
|
||||||
globals: {
|
|
||||||
[bsPlugins.Data]: 'Data',
|
|
||||||
[bsPlugins.Base]: 'Base',
|
|
||||||
[bsPlugins.EventHandler]: 'EventHandler',
|
|
||||||
[bsPlugins.SelectorEngine]: 'SelectorEngine'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getConfigByPluginKey = pluginKey => {
|
|
||||||
if (
|
|
||||||
pluginKey === 'Data' ||
|
|
||||||
pluginKey === 'Manipulator' ||
|
|
||||||
pluginKey === 'EventHandler' ||
|
|
||||||
pluginKey === 'SelectorEngine' ||
|
|
||||||
pluginKey === 'Util' ||
|
|
||||||
pluginKey === 'Sanitizer'
|
|
||||||
) {
|
|
||||||
return {
|
|
||||||
external: []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluginKey === 'Alert' || pluginKey === 'Tab') {
|
|
||||||
return defaultPluginConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
pluginKey === 'Base' ||
|
|
||||||
pluginKey === 'Button' ||
|
|
||||||
pluginKey === 'Carousel' ||
|
|
||||||
pluginKey === 'Collapse' ||
|
|
||||||
pluginKey === 'Modal' ||
|
|
||||||
pluginKey === 'ScrollSpy'
|
|
||||||
) {
|
|
||||||
const config = Object.assign(defaultPluginConfig)
|
|
||||||
config.external.push(bsPlugins.Manipulator)
|
|
||||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
|
||||||
return config
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
|
|
||||||
const config = Object.assign(defaultPluginConfig)
|
|
||||||
config.external.push(bsPlugins.Manipulator, '@popperjs/core')
|
|
||||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
|
||||||
config.globals['@popperjs/core'] = 'Popper'
|
|
||||||
return config
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluginKey === 'Popover') {
|
|
||||||
return {
|
|
||||||
external: [
|
|
||||||
bsPlugins.Data,
|
|
||||||
bsPlugins.SelectorEngine,
|
|
||||||
bsPlugins.Tooltip
|
|
||||||
],
|
|
||||||
globals: {
|
|
||||||
[bsPlugins.Data]: 'Data',
|
|
||||||
[bsPlugins.SelectorEngine]: 'SelectorEngine',
|
|
||||||
[bsPlugins.Tooltip]: 'Tooltip'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluginKey === 'Toast') {
|
|
||||||
return {
|
|
||||||
external: [
|
|
||||||
bsPlugins.Data,
|
|
||||||
bsPlugins.Base,
|
|
||||||
bsPlugins.EventHandler,
|
|
||||||
bsPlugins.Manipulator
|
|
||||||
],
|
|
||||||
globals: {
|
|
||||||
[bsPlugins.Data]: 'Data',
|
|
||||||
[bsPlugins.Base]: 'Base',
|
|
||||||
[bsPlugins.EventHandler]: 'EventHandler',
|
|
||||||
[bsPlugins.Manipulator]: 'Manipulator'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const utilObjects = new Set([
|
|
||||||
'Util',
|
|
||||||
'Sanitizer'
|
|
||||||
])
|
|
||||||
|
|
||||||
const domObjects = new Set([
|
|
||||||
'Data',
|
|
||||||
'EventHandler',
|
|
||||||
'Manipulator',
|
|
||||||
'SelectorEngine'
|
|
||||||
])
|
|
||||||
|
|
||||||
const build = async plugin => {
|
const build = async plugin => {
|
||||||
console.log(`Building ${plugin} plugin...`)
|
console.log(`Building ${plugin} plugin...`)
|
||||||
|
|
||||||
const { external, globals } = getConfigByPluginKey(plugin)
|
const external = ['jquery', 'popper.js']
|
||||||
const pluginFilename = path.basename(bsPlugins[plugin])
|
const globals = {
|
||||||
let pluginPath = rootPath
|
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||||
|
'popper.js': 'Popper'
|
||||||
if (utilObjects.has(plugin)) {
|
|
||||||
pluginPath = `${rootPath}/util/`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domObjects.has(plugin)) {
|
// Do not bundle Util in plugins
|
||||||
pluginPath = `${rootPath}/dom/`
|
if (plugin !== 'Util') {
|
||||||
|
external.push(bsPlugins.Util)
|
||||||
|
globals[bsPlugins.Util] = 'Util'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not bundle Tooltip in Popover
|
||||||
|
if (plugin === 'Popover') {
|
||||||
|
external.push(bsPlugins.Tooltip)
|
||||||
|
globals[bsPlugins.Tooltip] = 'Tooltip'
|
||||||
|
}
|
||||||
|
|
||||||
|
const pluginFilename = `${plugin.toLowerCase()}.js`
|
||||||
const bundle = await rollup.rollup({
|
const bundle = await rollup.rollup({
|
||||||
input: bsPlugins[plugin],
|
input: bsPlugins[plugin],
|
||||||
plugins,
|
plugins,
|
||||||
|
|
@ -169,7 +73,7 @@ const build = async plugin => {
|
||||||
name: plugin,
|
name: plugin,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
globals,
|
globals,
|
||||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(`Building ${plugin} plugin... Done!`)
|
console.log(`Building ${plugin} plugin... Done!`)
|
||||||
|
|
|
||||||
26
build/change-version.js
Normal file → Executable file
26
build/change-version.js
Normal file → Executable file
|
|
@ -17,7 +17,7 @@ sh.config.fatal = true
|
||||||
|
|
||||||
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
|
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
|
||||||
function regExpQuote(string) {
|
function regExpQuote(string) {
|
||||||
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
|
return string.replace(/[$()*+.?[\\\]^{|}-]/g, '\\$&')
|
||||||
}
|
}
|
||||||
|
|
||||||
function regExpQuoteReplacement(string) {
|
function regExpQuoteReplacement(string) {
|
||||||
|
|
@ -58,19 +58,17 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
|
||||||
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
|
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
|
||||||
original = new RegExp(regExpQuote(original), 'g')
|
original = new RegExp(regExpQuote(original), 'g')
|
||||||
replacement = regExpQuoteReplacement(replacement)
|
replacement = regExpQuoteReplacement(replacement)
|
||||||
const updateFile = DRY_RUN ?
|
const updateFile = DRY_RUN ? filepath => {
|
||||||
filepath => {
|
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
||||||
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
console.log(`FILE: ${filepath}`)
|
||||||
console.log(`FILE: ${filepath}`)
|
} else {
|
||||||
} else {
|
console.log(`EXCLUDED:${filepath}`)
|
||||||
console.log(`EXCLUDED:${filepath}`)
|
|
||||||
}
|
|
||||||
} :
|
|
||||||
filepath => {
|
|
||||||
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
|
||||||
sh.sed('-i', original, replacement, filepath)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} : filepath => {
|
||||||
|
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
||||||
|
sh.sed('-i', original, replacement, filepath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
walkAsync(directory, excludedDirectories, updateFile, err => {
|
walkAsync(directory, excludedDirectories, updateFile, err => {
|
||||||
console.error('ERROR while traversing directory!:')
|
console.error('ERROR while traversing directory!:')
|
||||||
|
|
@ -95,7 +93,7 @@ function main(args) {
|
||||||
'vendor'
|
'vendor'
|
||||||
])
|
])
|
||||||
const INCLUDED_EXTENSIONS = new Set([
|
const INCLUDED_EXTENSIONS = new Set([
|
||||||
// This extension allowlist is how we avoid modifying binary files
|
// This extension whitelist is how we avoid modifying binary files
|
||||||
'',
|
'',
|
||||||
'.css',
|
'.css',
|
||||||
'.html',
|
'.html',
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const sh = require('shelljs')
|
const sh = require('shelljs')
|
||||||
|
|
||||||
|
const pkg = require('../package.json')
|
||||||
|
|
||||||
sh.config.fatal = true
|
sh.config.fatal = true
|
||||||
|
|
||||||
const configFile = path.join(__dirname, '../config.yml')
|
const configFile = path.join(__dirname, '../config.yml')
|
||||||
|
|
@ -29,10 +31,6 @@ const files = [
|
||||||
file: 'dist/css/bootstrap.min.css',
|
file: 'dist/css/bootstrap.min.css',
|
||||||
configPropertyName: 'css_hash'
|
configPropertyName: 'css_hash'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
file: 'dist/css/bootstrap.rtl.min.css',
|
|
||||||
configPropertyName: 'css_rtl_hash'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
file: 'dist/js/bootstrap.min.js',
|
file: 'dist/js/bootstrap.min.js',
|
||||||
configPropertyName: 'js_hash'
|
configPropertyName: 'js_hash'
|
||||||
|
|
@ -42,7 +40,11 @@ const files = [
|
||||||
configPropertyName: 'js_bundle_hash'
|
configPropertyName: 'js_bundle_hash'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
file: 'node_modules/@popperjs/core/dist/umd/popper.min.js',
|
file: `site/static/docs/${pkg.config.version_short}/assets/js/vendor/jquery.slim.min.js`,
|
||||||
|
configPropertyName: 'jquery_hash'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
file: 'node_modules/popper.js/dist/umd/popper.min.js',
|
||||||
configPropertyName: 'popper_hash'
|
configPropertyName: 'popper_hash'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ module.exports = ctx => {
|
||||||
plugins: {
|
plugins: {
|
||||||
autoprefixer: {
|
autoprefixer: {
|
||||||
cascade: false
|
cascade: false
|
||||||
},
|
}
|
||||||
rtlcss: ctx.env === 'RTL' ? {} : false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,12 @@
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const { babel } = require('@rollup/plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||||
const replace = require('@rollup/plugin-replace')
|
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
|
|
||||||
const BUNDLE = process.env.BUNDLE === 'true'
|
const BUNDLE = process.env.BUNDLE === 'true'
|
||||||
const ESM = process.env.ESM === 'true'
|
|
||||||
|
|
||||||
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
let fileDest = 'bootstrap.js'
|
||||||
const external = ['@popperjs/core']
|
const external = ['jquery', 'popper.js']
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
|
|
@ -20,31 +18,27 @@ const plugins = [
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const globals = {
|
const globals = {
|
||||||
'@popperjs/core': 'Popper'
|
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||||
|
'popper.js': 'Popper'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BUNDLE) {
|
if (BUNDLE) {
|
||||||
fileDest += '.bundle'
|
fileDest = 'bootstrap.bundle.js'
|
||||||
// Remove last entry in external array to bundle Popper
|
// Remove last entry in external array to bundle Popper
|
||||||
external.pop()
|
external.pop()
|
||||||
delete globals['@popperjs/core']
|
delete globals['popper.js']
|
||||||
plugins.push(replace({ 'process.env.NODE_ENV': '"production"' }), nodeResolve())
|
plugins.push(nodeResolve())
|
||||||
}
|
}
|
||||||
|
|
||||||
const rollupConfig = {
|
module.exports = {
|
||||||
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
|
input: path.resolve(__dirname, '../js/index.js'),
|
||||||
output: {
|
output: {
|
||||||
banner,
|
banner,
|
||||||
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
|
||||||
format: ESM ? 'esm' : 'umd',
|
format: 'umd',
|
||||||
globals
|
globals,
|
||||||
|
name: 'bootstrap'
|
||||||
},
|
},
|
||||||
external,
|
external,
|
||||||
plugins
|
plugins
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ESM) {
|
|
||||||
rollupConfig.output.name = 'bootstrap'
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = rollupConfig
|
|
||||||
|
|
|
||||||
2
build/ship.sh
Normal file → Executable file
2
build/ship.sh
Normal file → Executable file
|
|
@ -29,7 +29,7 @@ fi
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||||
printf "\n%sPulling latest changes...%s" "$magenta" "$end"
|
printf "\n%sPulling latest changes...%s" "$magenta" "$end"
|
||||||
printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
|
printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
|
||||||
git pull origin main
|
git pull origin v4-dev
|
||||||
|
|
||||||
# Update version number
|
# Update version number
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,10 @@ js2svg:
|
||||||
indent: 2
|
indent: 2
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
# - addAttributesToSVGElement:
|
# remove this with IE 11 is no longer supported
|
||||||
# attributes:
|
- addAttributesToSVGElement:
|
||||||
# - focusable: false
|
attributes:
|
||||||
|
- focusable: false
|
||||||
- cleanupAttrs: true
|
- cleanupAttrs: true
|
||||||
- cleanupEnableBackground: true
|
- cleanupEnableBackground: true
|
||||||
- cleanupIDs: true
|
- cleanupIDs: true
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,10 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||||
// Content → Reboot uses various date/time inputs as a visual example.
|
// Content → Reboot uses various date/time inputs as a visual example.
|
||||||
// Documentation does not rely on them being usable.
|
// Documentation does not rely on them being usable.
|
||||||
'The “date” input type is not supported in all browsers.*',
|
'The “date” input type is not supported in all browsers.*',
|
||||||
'The “week” input type is not supported in all browsers.*',
|
'The “time” input type is not supported in all browsers.*',
|
||||||
'The “month” input type is not supported in all browsers.*',
|
// IE11 doesn't recognise <main> / give the element an implicit "main" landmark.
|
||||||
'The “color” input type is not supported in all browsers.*',
|
// Explicit role="main" is redundant for other modern browsers, but still valid.
|
||||||
'The “datetime-local” input type is not supported in all browsers.*',
|
'The “main” role is unnecessary for element “main”.'
|
||||||
'The “time” input type is not supported in all browsers.*'
|
|
||||||
].join('|')
|
].join('|')
|
||||||
|
|
||||||
const args = [
|
const args = [
|
||||||
|
|
|
||||||
|
|
@ -15,64 +15,34 @@ const sh = require('shelljs')
|
||||||
const pkg = require('../package.json')
|
const pkg = require('../package.json')
|
||||||
|
|
||||||
const versionShort = pkg.config.version_short
|
const versionShort = pkg.config.version_short
|
||||||
const distFolder = `bootstrap-${pkg.version}-examples`
|
const folderName = `bootstrap-${pkg.version}-examples`
|
||||||
const rootDocsDir = '_gh_pages'
|
|
||||||
const docsDir = `${rootDocsDir}/docs/${versionShort}/`
|
|
||||||
|
|
||||||
// these are the files we need in the examples
|
|
||||||
const cssFiles = [
|
|
||||||
'bootstrap.min.css',
|
|
||||||
'bootstrap.min.css.map',
|
|
||||||
'bootstrap.rtl.min.css',
|
|
||||||
'bootstrap.rtl.min.css.map'
|
|
||||||
]
|
|
||||||
const jsFiles = [
|
|
||||||
'bootstrap.bundle.min.js',
|
|
||||||
'bootstrap.bundle.min.js.map'
|
|
||||||
]
|
|
||||||
const imgFiles = [
|
|
||||||
'bootstrap-logo.svg',
|
|
||||||
'bootstrap-logo-white.svg'
|
|
||||||
]
|
|
||||||
|
|
||||||
sh.config.fatal = true
|
sh.config.fatal = true
|
||||||
|
|
||||||
if (!sh.test('-d', rootDocsDir)) {
|
if (!sh.test('-d', '_gh_pages')) {
|
||||||
throw new Error(`The "${rootDocsDir}" folder does not exist, did you forget building the docs?`)
|
throw new Error('The "_gh_pages" folder does not exist, did you forget building the docs?')
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch to the root dir
|
// switch to the root dir
|
||||||
sh.cd(path.join(__dirname, '..'))
|
sh.cd(path.join(__dirname, '..'))
|
||||||
|
|
||||||
// remove any previously created folder/zip with the same name
|
// remove any previously created folder with the same name
|
||||||
sh.rm('-rf', [distFolder, `${distFolder}.zip`])
|
sh.rm('-rf', folderName)
|
||||||
|
|
||||||
// create any folders so that `cp` works
|
// create any folders so that `cp` works
|
||||||
sh.mkdir('-p', [
|
sh.mkdir('-p', folderName)
|
||||||
distFolder,
|
sh.mkdir('-p', `${folderName}/assets/brand/`)
|
||||||
`${distFolder}/assets/brand/`,
|
|
||||||
`${distFolder}/assets/dist/css/`,
|
|
||||||
`${distFolder}/assets/dist/js/`
|
|
||||||
])
|
|
||||||
|
|
||||||
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
|
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/examples/*`, folderName)
|
||||||
|
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/dist/`, `${folderName}/assets/`)
|
||||||
cssFiles.forEach(file => {
|
// also copy the two brand images we use in the examples
|
||||||
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
|
sh.cp('-f', [
|
||||||
})
|
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-outline.svg`,
|
||||||
|
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-solid.svg`
|
||||||
jsFiles.forEach(file => {
|
], `${folderName}/assets/brand/`)
|
||||||
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
|
sh.rm(`${folderName}/index.html`)
|
||||||
})
|
|
||||||
|
|
||||||
imgFiles.forEach(file => {
|
|
||||||
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
|
|
||||||
})
|
|
||||||
|
|
||||||
sh.rm(`${distFolder}/index.html`)
|
|
||||||
|
|
||||||
// get all examples' HTML files
|
// get all examples' HTML files
|
||||||
sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
sh.find(`${folderName}/**/*.html`).forEach(file => {
|
||||||
const fileContents = sh.cat(file)
|
const fileContents = sh.cat(file)
|
||||||
.toString()
|
.toString()
|
||||||
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
||||||
|
|
@ -84,7 +54,9 @@ sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// create the zip file
|
// create the zip file
|
||||||
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
|
sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, {
|
||||||
|
fatal: true
|
||||||
|
})
|
||||||
|
|
||||||
// remove the folder we created
|
// remove the folder we created
|
||||||
sh.rm('-rf', distFolder)
|
sh.rm('-rf', folderName)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@
|
||||||
"issues": "https://github.com/twbs/bootstrap/issues"
|
"issues": "https://github.com/twbs/bootstrap/issues"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"twitter/bootstrap": "self.version"
|
"twitter/bootstrap": "self.version"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
44
config.yml
44
config.yml
|
|
@ -25,7 +25,7 @@ publishDir: "_gh_pages"
|
||||||
module:
|
module:
|
||||||
mounts:
|
mounts:
|
||||||
- source: dist
|
- source: dist
|
||||||
target: static/docs/5.0/dist
|
target: static/docs/4.5/dist
|
||||||
- source: site/assets
|
- source: site/assets
|
||||||
target: assets
|
target: assets
|
||||||
- source: site/content
|
- source: site/content
|
||||||
|
|
@ -36,44 +36,44 @@ module:
|
||||||
target: layouts
|
target: layouts
|
||||||
- source: site/static
|
- source: site/static
|
||||||
target: static
|
target: static
|
||||||
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
|
- source: site/static/docs/4.5/assets/img/favicons/apple-touch-icon.png
|
||||||
target: static/apple-touch-icon.png
|
target: static/apple-touch-icon.png
|
||||||
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico
|
- source: site/static/docs/4.5/assets/img/favicons/favicon.ico
|
||||||
target: static/favicon.ico
|
target: static/favicon.ico
|
||||||
|
|
||||||
params:
|
params:
|
||||||
description: "The most popular HTML, CSS, and JS library in the world."
|
description: "The most popular HTML, CSS, and JS library in the world."
|
||||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||||
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
|
social_image_path: /docs/4.5/assets/brand/bootstrap-social.png
|
||||||
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
|
social_logo_path: /docs/4.5/assets/brand/bootstrap-social-logo.png
|
||||||
|
|
||||||
current_version: "5.0.0-beta1"
|
current_version: "4.5.3"
|
||||||
current_ruby_version: "5.0.0.beta1"
|
current_ruby_version: "4.5.3"
|
||||||
docs_version: "5.0"
|
docs_version: "4.5"
|
||||||
rfs_version: "9.0.3"
|
|
||||||
github_org: "https://github.com/twbs"
|
github_org: "https://github.com/twbs"
|
||||||
repo: "https://github.com/twbs/bootstrap"
|
repo: "https://github.com/twbs/bootstrap"
|
||||||
twitter: "getbootstrap"
|
twitter: "getbootstrap"
|
||||||
slack: "https://bootstrap-slack.herokuapp.com/"
|
slack: "https://bootstrap-slack.herokuapp.com/"
|
||||||
opencollective: "https://opencollective.com/bootstrap"
|
opencollective: "https://opencollective.com/bootstrap"
|
||||||
blog: "https://blog.getbootstrap.com/"
|
blog: "https://blog.getbootstrap.com/"
|
||||||
|
expo: "https://expo.getbootstrap.com/"
|
||||||
themes: "https://themes.getbootstrap.com/"
|
themes: "https://themes.getbootstrap.com/"
|
||||||
icons: "https://icons.getbootstrap.com/"
|
icons: "https://icons.getbootstrap.com/"
|
||||||
|
|
||||||
download:
|
download:
|
||||||
source: "https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip"
|
source: "https://github.com/twbs/bootstrap/archive/v4.5.3.zip"
|
||||||
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-dist.zip"
|
dist: "https://github.com/twbs/bootstrap/releases/download/v4.5.3/bootstrap-4.5.3-dist.zip"
|
||||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-examples.zip"
|
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.5.3/bootstrap-4.5.3-examples.zip"
|
||||||
|
|
||||||
cdn:
|
cdn:
|
||||||
# See https://www.srihash.org for info on how to generate the hashes
|
# See https://www.srihash.org for info on how to generate the hashes
|
||||||
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css"
|
css: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
|
||||||
css_hash: "sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
|
css_hash: "sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
|
||||||
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css"
|
js: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
|
||||||
css_rtl_hash: "sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl"
|
js_hash: "sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
|
||||||
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js"
|
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"
|
||||||
js_hash: "sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj"
|
js_bundle_hash: "sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx"
|
||||||
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
|
jquery: "https://code.jquery.com/jquery-3.5.1.slim.min.js"
|
||||||
js_bundle_hash: "sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
|
jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
|
||||||
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js"
|
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
||||||
popper_hash: "sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi"
|
popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
||||||
|
|
|
||||||
7033
dist/css/bootstrap-grid.css
vendored
7033
dist/css/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load diff
2
dist/css/bootstrap-grid.css.map
vendored
2
dist/css/bootstrap-grid.css.map
vendored
File diff suppressed because one or more lines are too long
4
dist/css/bootstrap-grid.min.css
vendored
4
dist/css/bootstrap-grid.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap-grid.min.css.map
vendored
2
dist/css/bootstrap-grid.min.css.map
vendored
File diff suppressed because one or more lines are too long
4996
dist/css/bootstrap-grid.rtl.css
vendored
4996
dist/css/bootstrap-grid.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-grid.rtl.css.map
vendored
1
dist/css/bootstrap-grid.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-grid.rtl.min.css
vendored
7
dist/css/bootstrap-grid.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-grid.rtl.min.css.map
vendored
1
dist/css/bootstrap-grid.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
281
dist/css/bootstrap-reboot.css
vendored
281
dist/css/bootstrap-reboot.css
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap Reboot v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
* Copyright 2011-2020 The Bootstrap Authors
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
* Copyright 2011-2020 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
|
@ -11,22 +11,26 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
html {
|
||||||
:root {
|
font-family: sans-serif;
|
||||||
scroll-behavior: smooth;
|
line-height: 1.15;
|
||||||
}
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #212529;
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||||
|
|
@ -34,66 +38,14 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
margin: 1rem 0;
|
box-sizing: content-box;
|
||||||
color: inherit;
|
height: 0;
|
||||||
background-color: currentColor;
|
overflow: visible;
|
||||||
border: 0;
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr:not([size]) {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6, h5, h4, h3, h2, h1 {
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: calc(1.375rem + 1.5vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h1 {
|
|
||||||
font-size: 2.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: calc(1.325rem + 0.9vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h2 {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: calc(1.3rem + 0.6vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h3 {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h4 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
@ -102,11 +54,12 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr[title],
|
abbr[title],
|
||||||
abbr[data-bs-original-title] {
|
abbr[data-original-title] {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
-webkit-text-decoration: underline dotted;
|
-webkit-text-decoration: underline dotted;
|
||||||
text-decoration: underline dotted;
|
text-decoration: underline dotted;
|
||||||
cursor: help;
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
-webkit-text-decoration-skip-ink: none;
|
-webkit-text-decoration-skip-ink: none;
|
||||||
text-decoration-skip-ink: none;
|
text-decoration-skip-ink: none;
|
||||||
}
|
}
|
||||||
|
|
@ -117,11 +70,6 @@ address {
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol,
|
|
||||||
ul {
|
|
||||||
padding-left: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
ul,
|
ul,
|
||||||
dl {
|
dl {
|
||||||
|
|
@ -141,7 +89,7 @@ dt {
|
||||||
}
|
}
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: .5rem;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -155,39 +103,42 @@ strong {
|
||||||
}
|
}
|
||||||
|
|
||||||
small {
|
small {
|
||||||
font-size: 0.875em;
|
font-size: 80%;
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
padding: 0.2em;
|
|
||||||
background-color: #fcf8e3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub,
|
sub,
|
||||||
sup {
|
sup {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 0.75em;
|
font-size: 75%;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub {
|
sub {
|
||||||
bottom: -0.25em;
|
bottom: -.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
top: -0.5em;
|
top: -.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #0d6efd;
|
color: #007bff;
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
}
|
background-color: transparent;
|
||||||
a:hover {
|
|
||||||
color: #0a58ca;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]) {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([class]):hover {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
@ -198,64 +149,39 @@ kbd,
|
||||||
samp {
|
samp {
|
||||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
direction: ltr /* rtl:ignore */;
|
|
||||||
unicode-bidi: bidi-override;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
display: block;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-size: 0.875em;
|
-ms-overflow-style: scrollbar;
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
font-size: inherit;
|
|
||||||
color: inherit;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #d63384;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
a > code {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #212529;
|
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
|
||||||
kbd kbd {
|
|
||||||
padding: 0;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
img,
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
|
overflow: hidden;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
caption-side: bottom;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption {
|
caption {
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.75rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.75rem;
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
|
|
@ -263,19 +189,9 @@ th {
|
||||||
text-align: -webkit-match-parent;
|
text-align: -webkit-match-parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead,
|
|
||||||
tbody,
|
|
||||||
tfoot,
|
|
||||||
tr,
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border-color: inherit;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|
@ -283,8 +199,8 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
button:focus {
|
button:focus {
|
||||||
outline: dotted 1px;
|
outline: 1px dotted;
|
||||||
outline: -webkit-focus-ring-color auto 5px;
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
input,
|
||||||
|
|
@ -298,12 +214,17 @@ textarea {
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
select {
|
select {
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[role=button] {
|
[role="button"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -311,29 +232,36 @@ select {
|
||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
[list]::-webkit-calendar-picker-indicator {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
button,
|
||||||
[type=button],
|
[type="button"],
|
||||||
[type=reset],
|
[type="reset"],
|
||||||
[type=submit] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button;
|
-webkit-appearance: button;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:not(:disabled),
|
button:not(:disabled),
|
||||||
[type=button]:not(:disabled),
|
[type="button"]:not(:disabled),
|
||||||
[type=reset]:not(:disabled),
|
[type="reset"]:not(:disabled),
|
||||||
[type=submit]:not(:disabled) {
|
[type="submit"]:not(:disabled) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-moz-focus-inner {
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -345,59 +273,33 @@ fieldset {
|
||||||
}
|
}
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
float: left;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: .5rem;
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
font-size: 1.5rem;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
color: inherit;
|
||||||
@media (min-width: 1200px) {
|
white-space: normal;
|
||||||
legend {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legend + * {
|
|
||||||
clear: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-datetime-edit-fields-wrapper,
|
progress {
|
||||||
::-webkit-datetime-edit-text,
|
vertical-align: baseline;
|
||||||
::-webkit-datetime-edit-minute,
|
|
||||||
::-webkit-datetime-edit-hour-field,
|
|
||||||
::-webkit-datetime-edit-day-field,
|
|
||||||
::-webkit-datetime-edit-month-field,
|
|
||||||
::-webkit-datetime-edit-year-field {
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-inner-spin-button {
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
[type=search] {
|
[type="search"] {
|
||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
-webkit-appearance: textfield;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* rtl:raw:
|
|
||||||
[type="tel"],
|
|
||||||
[type="url"],
|
|
||||||
[type="email"],
|
|
||||||
[type="number"] {
|
|
||||||
direction: ltr;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-color-swatch-wrapper {
|
[type="search"]::-webkit-search-decoration {
|
||||||
padding: 0;
|
-webkit-appearance: none;
|
||||||
}
|
|
||||||
|
|
||||||
::file-selector-button {
|
|
||||||
font: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
::-webkit-file-upload-button {
|
||||||
|
|
@ -409,21 +311,16 @@ output {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
summary {
|
summary {
|
||||||
display: list-item;
|
display: list-item;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
progress {
|
template {
|
||||||
vertical-align: baseline;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hidden] {
|
[hidden] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||||
2
dist/css/bootstrap-reboot.css.map
vendored
2
dist/css/bootstrap-reboot.css.map
vendored
File diff suppressed because one or more lines are too long
4
dist/css/bootstrap-reboot.min.css
vendored
4
dist/css/bootstrap-reboot.min.css
vendored
|
|
@ -1,8 +1,8 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap Reboot v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
* Copyright 2011-2020 The Bootstrap Authors
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
* Copyright 2011-2020 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||||
2
dist/css/bootstrap-reboot.min.css.map
vendored
2
dist/css/bootstrap-reboot.min.css.map
vendored
File diff suppressed because one or more lines are too long
426
dist/css/bootstrap-reboot.rtl.css
vendored
426
dist/css/bootstrap-reboot.rtl.css
vendored
|
|
@ -1,426 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
|
||||||
*/
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
|
||||||
:root {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #212529;
|
|
||||||
background-color: #fff;
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
|
||||||
outline: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: 1rem 0;
|
|
||||||
color: inherit;
|
|
||||||
background-color: currentColor;
|
|
||||||
border: 0;
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr:not([size]) {
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6, h5, h4, h3, h2, h1 {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: calc(1.375rem + 1.5vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h1 {
|
|
||||||
font-size: 2.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: calc(1.325rem + 0.9vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h2 {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: calc(1.3rem + 0.6vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h3 {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h4 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
abbr[title],
|
|
||||||
abbr[data-bs-original-title] {
|
|
||||||
text-decoration: underline;
|
|
||||||
-webkit-text-decoration: underline dotted;
|
|
||||||
text-decoration: underline dotted;
|
|
||||||
cursor: help;
|
|
||||||
-webkit-text-decoration-skip-ink: none;
|
|
||||||
text-decoration-skip-ink: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
address {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-style: normal;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol,
|
|
||||||
ul {
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol,
|
|
||||||
ul,
|
|
||||||
dl {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol ol,
|
|
||||||
ul ul,
|
|
||||||
ol ul,
|
|
||||||
ul ol {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dt {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
dd {
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin: 0 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 0.875em;
|
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
padding: 0.2em;
|
|
||||||
background-color: #fcf8e3;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup {
|
|
||||||
position: relative;
|
|
||||||
font-size: 0.75em;
|
|
||||||
line-height: 0;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
top: -0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #0d6efd;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #0a58ca;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre,
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
samp {
|
|
||||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
direction: ltr ;
|
|
||||||
unicode-bidi: bidi-override;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
display: block;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 0.875em;
|
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
font-size: inherit;
|
|
||||||
color: inherit;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #d63384;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
a > code {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #212529;
|
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
|
||||||
kbd kbd {
|
|
||||||
padding: 0;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
figure {
|
|
||||||
margin: 0 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
img,
|
|
||||||
svg {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
caption-side: bottom;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
caption {
|
|
||||||
padding-top: 0.5rem;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
color: #6c757d;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
text-align: inherit;
|
|
||||||
text-align: -webkit-match-parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead,
|
|
||||||
tbody,
|
|
||||||
tfoot,
|
|
||||||
tr,
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border-color: inherit;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:focus {
|
|
||||||
outline: dotted 1px;
|
|
||||||
outline: -webkit-focus-ring-color auto 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
|
||||||
button,
|
|
||||||
select,
|
|
||||||
optgroup,
|
|
||||||
textarea {
|
|
||||||
margin: 0;
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
|
||||||
select {
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
[role=button] {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
word-wrap: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
[list]::-webkit-calendar-picker-indicator {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
|
||||||
[type=button],
|
|
||||||
[type=reset],
|
|
||||||
[type=submit] {
|
|
||||||
-webkit-appearance: button;
|
|
||||||
}
|
|
||||||
button:not(:disabled),
|
|
||||||
[type=button]:not(:disabled),
|
|
||||||
[type=reset]:not(:disabled),
|
|
||||||
[type=submit]:not(:disabled) {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-moz-focus-inner {
|
|
||||||
padding: 0;
|
|
||||||
border-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset {
|
|
||||||
min-width: 0;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
legend {
|
|
||||||
float: right;
|
|
||||||
width: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
legend {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legend + * {
|
|
||||||
clear: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-datetime-edit-fields-wrapper,
|
|
||||||
::-webkit-datetime-edit-text,
|
|
||||||
::-webkit-datetime-edit-minute,
|
|
||||||
::-webkit-datetime-edit-hour-field,
|
|
||||||
::-webkit-datetime-edit-day-field,
|
|
||||||
::-webkit-datetime-edit-month-field,
|
|
||||||
::-webkit-datetime-edit-year-field {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-inner-spin-button {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
[type=search] {
|
|
||||||
outline-offset: -2px;
|
|
||||||
-webkit-appearance: textfield;
|
|
||||||
}
|
|
||||||
|
|
||||||
[type="tel"],
|
|
||||||
[type="url"],
|
|
||||||
[type="email"],
|
|
||||||
[type="number"] {
|
|
||||||
direction: ltr;
|
|
||||||
}
|
|
||||||
::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-color-swatch-wrapper {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::file-selector-button {
|
|
||||||
font: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
|
||||||
font: inherit;
|
|
||||||
-webkit-appearance: button;
|
|
||||||
}
|
|
||||||
|
|
||||||
output {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
summary {
|
|
||||||
display: list-item;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
progress {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
[hidden] {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
|
||||||
1
dist/css/bootstrap-reboot.rtl.css.map
vendored
1
dist/css/bootstrap-reboot.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
8
dist/css/bootstrap-reboot.rtl.min.css
vendored
8
dist/css/bootstrap-reboot.rtl.min.css
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
|
||||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
|
||||||
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
|
|
||||||
1
dist/css/bootstrap-reboot.rtl.min.css.map
vendored
1
dist/css/bootstrap-reboot.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
4617
dist/css/bootstrap-utilities.css
vendored
4617
dist/css/bootstrap-utilities.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-utilities.css.map
vendored
1
dist/css/bootstrap-utilities.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-utilities.min.css
vendored
7
dist/css/bootstrap-utilities.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-utilities.min.css.map
vendored
1
dist/css/bootstrap-utilities.min.css.map
vendored
File diff suppressed because one or more lines are too long
4608
dist/css/bootstrap-utilities.rtl.css
vendored
4608
dist/css/bootstrap-utilities.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-utilities.rtl.css.map
vendored
1
dist/css/bootstrap-utilities.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-utilities.rtl.min.css
vendored
7
dist/css/bootstrap-utilities.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-utilities.rtl.min.css.map
vendored
1
dist/css/bootstrap-utilities.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
14210
dist/css/bootstrap.css
14210
dist/css/bootstrap.css
File diff suppressed because it is too large
Load diff
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
6
dist/css/bootstrap.min.css
vendored
6
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css.map
vendored
2
dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
10693
dist/css/bootstrap.rtl.css
vendored
10693
dist/css/bootstrap.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap.rtl.css.map
vendored
1
dist/css/bootstrap.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap.rtl.min.css
vendored
7
dist/css/bootstrap.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap.rtl.min.css.map
vendored
1
dist/css/bootstrap.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
7946
dist/js/bootstrap.bundle.js
vendored
7946
dist/js/bootstrap.bundle.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/js/bootstrap.bundle.js.map
vendored
2
dist/js/bootstrap.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/js/bootstrap.bundle.min.js
vendored
4
dist/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/bootstrap.bundle.min.js.map
vendored
2
dist/js/bootstrap.bundle.min.js.map
vendored
File diff suppressed because one or more lines are too long
4961
dist/js/bootstrap.esm.js
vendored
4961
dist/js/bootstrap.esm.js
vendored
File diff suppressed because it is too large
Load diff
1
dist/js/bootstrap.esm.js.map
vendored
1
dist/js/bootstrap.esm.js.map
vendored
File diff suppressed because one or more lines are too long
7
dist/js/bootstrap.esm.min.js
vendored
7
dist/js/bootstrap.esm.min.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/bootstrap.esm.min.js.map
vendored
1
dist/js/bootstrap.esm.min.js.map
vendored
File diff suppressed because one or more lines are too long
3806
dist/js/bootstrap.js
3806
dist/js/bootstrap.js
File diff suppressed because it is too large
Load diff
2
dist/js/bootstrap.js.map
vendored
2
dist/js/bootstrap.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/bootstrap.min.js.map
vendored
2
dist/js/bootstrap.min.js.map
vendored
File diff suppressed because one or more lines are too long
259
js/dist/alert.js
vendored
259
js/dist/alert.js
vendored
|
|
@ -1,109 +1,18 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap alert.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap alert.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
|
||||||
}(this, (function (Data, EventHandler) { 'use strict';
|
}(this, (function ($, Util) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
|
||||||
var selector = element.getAttribute('data-bs-target');
|
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
|
||||||
var hrefAttr = element.getAttribute('href');
|
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return selector;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
|
||||||
if (!element) {
|
|
||||||
return 0;
|
|
||||||
} // Get transition-duration of the element
|
|
||||||
|
|
||||||
|
|
||||||
var _window$getComputedSt = window.getComputedStyle(element),
|
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
||||||
return 0;
|
|
||||||
} // If multiple durations are defined, take the first
|
|
||||||
|
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
||||||
};
|
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
|
||||||
};
|
|
||||||
|
|
||||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
|
||||||
var called = false;
|
|
||||||
var durationPadding = 5;
|
|
||||||
var emulatedDuration = duration + durationPadding;
|
|
||||||
|
|
||||||
function listener() {
|
|
||||||
called = true;
|
|
||||||
element.removeEventListener(TRANSITION_END, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
element.addEventListener(TRANSITION_END, listener);
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!called) {
|
|
||||||
triggerTransitionEnd(element);
|
|
||||||
}
|
|
||||||
}, emulatedDuration);
|
|
||||||
};
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -114,133 +23,107 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'alert';
|
var NAME = 'alert';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.alert';
|
var DATA_KEY = 'bs.alert';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
|
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
|
||||||
var EVENT_CLOSE = "close" + EVENT_KEY;
|
var EVENT_CLOSE = "close" + EVENT_KEY;
|
||||||
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||||
var CLASSNAME_ALERT = 'alert';
|
var CLASS_NAME_ALERT = 'alert';
|
||||||
var CLASSNAME_FADE = 'fade';
|
var CLASS_NAME_FADE = 'fade';
|
||||||
var CLASSNAME_SHOW = 'show';
|
var CLASS_NAME_SHOW = 'show';
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Class Definition
|
* Class Definition
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Alert = /*#__PURE__*/function (_BaseComponent) {
|
var Alert = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Alert, _BaseComponent);
|
function Alert(element) {
|
||||||
|
this._element = element;
|
||||||
|
} // Getters
|
||||||
|
|
||||||
function Alert() {
|
|
||||||
return _BaseComponent.apply(this, arguments) || this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = Alert.prototype;
|
var _proto = Alert.prototype;
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.close = function close(element) {
|
_proto.close = function close(element) {
|
||||||
var rootElement = element ? this._getRootElement(element) : this._element;
|
var rootElement = this._element;
|
||||||
|
|
||||||
|
if (element) {
|
||||||
|
rootElement = this._getRootElement(element);
|
||||||
|
}
|
||||||
|
|
||||||
var customEvent = this._triggerCloseEvent(rootElement);
|
var customEvent = this._triggerCloseEvent(rootElement);
|
||||||
|
|
||||||
if (customEvent === null || customEvent.defaultPrevented) {
|
if (customEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._removeElement(rootElement);
|
this._removeElement(rootElement);
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.dispose = function dispose() {
|
||||||
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
|
this._element = null;
|
||||||
} // Private
|
} // Private
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._getRootElement = function _getRootElement(element) {
|
_proto._getRootElement = function _getRootElement(element) {
|
||||||
return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
|
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||||
|
var parent = false;
|
||||||
|
|
||||||
|
if (selector) {
|
||||||
|
parent = document.querySelector(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!parent) {
|
||||||
|
parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||||
return EventHandler__default['default'].trigger(element, EVENT_CLOSE);
|
var closeEvent = $__default['default'].Event(EVENT_CLOSE);
|
||||||
|
$__default['default'](element).trigger(closeEvent);
|
||||||
|
return closeEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._removeElement = function _removeElement(element) {
|
_proto._removeElement = function _removeElement(element) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
element.classList.remove(CLASSNAME_SHOW);
|
$__default['default'](element).removeClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
if (!element.classList.contains(CLASSNAME_FADE)) {
|
if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) {
|
||||||
this._destroyElement(element);
|
this._destroyElement(element);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var transitionDuration = getTransitionDurationFromElement(element);
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(element);
|
||||||
EventHandler__default['default'].one(element, TRANSITION_END, function () {
|
$__default['default'](element).one(Util__default['default'].TRANSITION_END, function (event) {
|
||||||
return _this._destroyElement(element);
|
return _this._destroyElement(element, event);
|
||||||
});
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(element, transitionDuration);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._destroyElement = function _destroyElement(element) {
|
_proto._destroyElement = function _destroyElement(element) {
|
||||||
if (element.parentNode) {
|
$__default['default'](element).detach().trigger(EVENT_CLOSED).remove();
|
||||||
element.parentNode.removeChild(element);
|
|
||||||
}
|
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
|
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Alert.jQueryInterface = function jQueryInterface(config) {
|
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = Data__default['default'].getData(this, DATA_KEY);
|
var $element = $__default['default'](this);
|
||||||
|
var data = $element.data(DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Alert(this);
|
data = new Alert(this);
|
||||||
|
$element.data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config === 'close') {
|
if (config === 'close') {
|
||||||
|
|
@ -249,7 +132,7 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Alert.handleDismiss = function handleDismiss(alertInstance) {
|
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||||
return function (event) {
|
return function (event) {
|
||||||
if (event) {
|
if (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -259,16 +142,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Alert, null, [{
|
_createClass(Alert, null, [{
|
||||||
key: "DATA_KEY",
|
key: "VERSION",
|
||||||
// Getters
|
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return DATA_KEY;
|
return VERSION;
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -276,29 +158,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
|
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Alert to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Alert._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Alert;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Alert.jQueryInterface;
|
return Alert._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Alert;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Alert.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/alert.js.map
vendored
2
js/dist/alert.js.map
vendored
File diff suppressed because one or more lines are too long
260
js/dist/button.js
vendored
260
js/dist/button.js
vendored
|
|
@ -1,46 +1,17 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap button.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap button.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery));
|
||||||
}(this, (function (Data, EventHandler) { 'use strict';
|
}(this, (function ($) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -51,105 +22,122 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'button';
|
var NAME = 'button';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.button';
|
var DATA_KEY = 'bs.button';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
var CLASS_NAME_ACTIVE = 'active';
|
var CLASS_NAME_ACTIVE = 'active';
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
|
var CLASS_NAME_BUTTON = 'btn';
|
||||||
|
var CLASS_NAME_FOCUS = 'focus';
|
||||||
|
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
|
||||||
|
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
|
||||||
|
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
|
||||||
|
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
|
||||||
|
var SELECTOR_INPUT = 'input:not([type="hidden"])';
|
||||||
|
var SELECTOR_ACTIVE = '.active';
|
||||||
|
var SELECTOR_BUTTON = '.btn';
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||||
|
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
|
||||||
|
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Class Definition
|
* Class Definition
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Button = /*#__PURE__*/function (_BaseComponent) {
|
var Button = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Button, _BaseComponent);
|
function Button(element) {
|
||||||
|
this._element = element;
|
||||||
|
this.shouldAvoidTriggerChange = false;
|
||||||
|
} // Getters
|
||||||
|
|
||||||
function Button() {
|
|
||||||
return _BaseComponent.apply(this, arguments) || this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = Button.prototype;
|
var _proto = Button.prototype;
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
// Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
|
var triggerChangeEvent = true;
|
||||||
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
|
var addAriaPressed = true;
|
||||||
|
var rootElement = $__default['default'](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
|
||||||
|
|
||||||
|
if (rootElement) {
|
||||||
|
var input = this._element.querySelector(SELECTOR_INPUT);
|
||||||
|
|
||||||
|
if (input) {
|
||||||
|
if (input.type === 'radio') {
|
||||||
|
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||||
|
triggerChangeEvent = false;
|
||||||
|
} else {
|
||||||
|
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
|
||||||
|
|
||||||
|
if (activeElement) {
|
||||||
|
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triggerChangeEvent) {
|
||||||
|
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
|
||||||
|
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||||
|
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.shouldAvoidTriggerChange) {
|
||||||
|
$__default['default'](input).trigger('change');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input.focus();
|
||||||
|
addAriaPressed = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
|
||||||
|
if (addAriaPressed) {
|
||||||
|
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triggerChangeEvent) {
|
||||||
|
$__default['default'](this._element).toggleClass(CLASS_NAME_ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.dispose = function dispose() {
|
||||||
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
|
this._element = null;
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Button.jQueryInterface = function jQueryInterface(config) {
|
Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = Data__default['default'].getData(this, DATA_KEY);
|
var $element = $__default['default'](this);
|
||||||
|
var data = $element.data(DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Button(this);
|
data = new Button(this);
|
||||||
|
$element.data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.shouldAvoidTriggerChange = avoidTriggerChange;
|
||||||
|
|
||||||
if (config === 'toggle') {
|
if (config === 'toggle') {
|
||||||
data[config]();
|
data[config]();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Button, null, [{
|
_createClass(Button, null, [{
|
||||||
key: "DATA_KEY",
|
key: "VERSION",
|
||||||
// Getters
|
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return DATA_KEY;
|
return VERSION;
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -157,39 +145,75 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||||
event.preventDefault();
|
var button = event.target;
|
||||||
var button = event.target.closest(SELECTOR_DATA_TOGGLE);
|
var initialButton = button;
|
||||||
var data = Data__default['default'].getData(button, DATA_KEY);
|
|
||||||
|
|
||||||
if (!data) {
|
if (!$__default['default'](button).hasClass(CLASS_NAME_BUTTON)) {
|
||||||
data = new Button(button);
|
button = $__default['default'](button).closest(SELECTOR_BUTTON)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
data.toggle();
|
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
|
||||||
|
event.preventDefault(); // work around Firefox bug #1540995
|
||||||
|
} else {
|
||||||
|
var inputBtn = button.querySelector(SELECTOR_INPUT);
|
||||||
|
|
||||||
|
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
|
||||||
|
event.preventDefault(); // work around Firefox bug #1540995
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
|
||||||
|
Button._jQueryInterface.call($__default['default'](button), 'toggle', initialButton.tagName === 'INPUT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||||
|
var button = $__default['default'](event.target).closest(SELECTOR_BUTTON)[0];
|
||||||
|
$__default['default'](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
|
||||||
|
});
|
||||||
|
$__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
|
||||||
|
// ensure correct active class is set to match the controls' actual values/states
|
||||||
|
// find all checkboxes/readio buttons inside data-toggle groups
|
||||||
|
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
|
||||||
|
|
||||||
|
for (var i = 0, len = buttons.length; i < len; i++) {
|
||||||
|
var button = buttons[i];
|
||||||
|
var input = button.querySelector(SELECTOR_INPUT);
|
||||||
|
|
||||||
|
if (input.checked || input.hasAttribute('checked')) {
|
||||||
|
button.classList.add(CLASS_NAME_ACTIVE);
|
||||||
|
} else {
|
||||||
|
button.classList.remove(CLASS_NAME_ACTIVE);
|
||||||
|
}
|
||||||
|
} // find all button toggles
|
||||||
|
|
||||||
|
|
||||||
|
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||||
|
|
||||||
|
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
|
||||||
|
var _button = buttons[_i];
|
||||||
|
|
||||||
|
if (_button.getAttribute('aria-pressed') === 'true') {
|
||||||
|
_button.classList.add(CLASS_NAME_ACTIVE);
|
||||||
|
} else {
|
||||||
|
_button.classList.remove(CLASS_NAME_ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Button to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Button._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Button;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Button.jQueryInterface;
|
return Button._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Button;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Button.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/button.js.map
vendored
2
js/dist/button.js.map
vendored
File diff suppressed because one or more lines are too long
577
js/dist/carousel.js
vendored
577
js/dist/carousel.js
vendored
|
|
@ -1,153 +1,20 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap carousel.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap carousel.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
|
||||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, (function ($, Util) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
|
||||||
|
|
||||||
/**
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
||||||
};
|
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
|
||||||
var selector = element.getAttribute('data-bs-target');
|
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
|
||||||
var hrefAttr = element.getAttribute('href');
|
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return selector;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
|
||||||
if (!element) {
|
|
||||||
return 0;
|
|
||||||
} // Get transition-duration of the element
|
|
||||||
|
|
||||||
|
|
||||||
var _window$getComputedSt = window.getComputedStyle(element),
|
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
||||||
return 0;
|
|
||||||
} // If multiple durations are defined, take the first
|
|
||||||
|
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
||||||
};
|
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
|
||||||
};
|
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
|
||||||
return (obj[0] || obj).nodeType;
|
|
||||||
};
|
|
||||||
|
|
||||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
|
||||||
var called = false;
|
|
||||||
var durationPadding = 5;
|
|
||||||
var emulatedDuration = duration + durationPadding;
|
|
||||||
|
|
||||||
function listener() {
|
|
||||||
called = true;
|
|
||||||
element.removeEventListener(TRANSITION_END, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
element.addEventListener(TRANSITION_END, listener);
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!called) {
|
|
||||||
triggerTransitionEnd(element);
|
|
||||||
}
|
|
||||||
}, emulatedDuration);
|
|
||||||
};
|
|
||||||
|
|
||||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
|
||||||
Object.keys(configTypes).forEach(function (property) {
|
|
||||||
var expectedTypes = configTypes[property];
|
|
||||||
var value = config[property];
|
|
||||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
|
||||||
|
|
||||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
|
||||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var isVisible = function isVisible(element) {
|
|
||||||
if (!element) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (element.style && element.parentNode && element.parentNode.style) {
|
|
||||||
var elementStyle = getComputedStyle(element);
|
|
||||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
|
||||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
var reflow = function reflow(element) {
|
|
||||||
return element.offsetHeight;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -158,60 +25,16 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'carousel';
|
var NAME = 'carousel';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.carousel';
|
var DATA_KEY = 'bs.carousel';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var ARROW_LEFT_KEY = 'ArrowLeft';
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
var ARROW_RIGHT_KEY = 'ArrowRight';
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
|
|
||||||
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
|
||||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
var SWIPE_THRESHOLD = 40;
|
var SWIPE_THRESHOLD = 40;
|
||||||
|
|
@ -251,8 +74,8 @@
|
||||||
var CLASS_NAME_CAROUSEL = 'carousel';
|
var CLASS_NAME_CAROUSEL = 'carousel';
|
||||||
var CLASS_NAME_ACTIVE = 'active';
|
var CLASS_NAME_ACTIVE = 'active';
|
||||||
var CLASS_NAME_SLIDE = 'slide';
|
var CLASS_NAME_SLIDE = 'slide';
|
||||||
var CLASS_NAME_END = 'carousel-item-end';
|
var CLASS_NAME_RIGHT = 'carousel-item-right';
|
||||||
var CLASS_NAME_START = 'carousel-item-start';
|
var CLASS_NAME_LEFT = 'carousel-item-left';
|
||||||
var CLASS_NAME_NEXT = 'carousel-item-next';
|
var CLASS_NAME_NEXT = 'carousel-item-next';
|
||||||
var CLASS_NAME_PREV = 'carousel-item-prev';
|
var CLASS_NAME_PREV = 'carousel-item-prev';
|
||||||
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||||
|
|
@ -262,8 +85,8 @@
|
||||||
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
||||||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
||||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
var SELECTOR_INDICATORS = '.carousel-indicators';
|
||||||
var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
|
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
|
||||||
var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
|
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
|
||||||
var PointerType = {
|
var PointerType = {
|
||||||
TOUCH: 'touch',
|
TOUCH: 'touch',
|
||||||
PEN: 'pen'
|
PEN: 'pen'
|
||||||
|
|
@ -274,29 +97,23 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Carousel = /*#__PURE__*/function (_BaseComponent) {
|
var Carousel = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Carousel, _BaseComponent);
|
|
||||||
|
|
||||||
function Carousel(element, config) {
|
function Carousel(element, config) {
|
||||||
var _this;
|
this._items = null;
|
||||||
|
this._interval = null;
|
||||||
|
this._activeElement = null;
|
||||||
|
this._isPaused = false;
|
||||||
|
this._isSliding = false;
|
||||||
|
this.touchTimeout = null;
|
||||||
|
this.touchStartX = 0;
|
||||||
|
this.touchDeltaX = 0;
|
||||||
|
this._config = this._getConfig(config);
|
||||||
|
this._element = element;
|
||||||
|
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
|
||||||
|
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
||||||
|
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
|
||||||
|
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._addEventListeners();
|
||||||
_this._items = null;
|
|
||||||
_this._interval = null;
|
|
||||||
_this._activeElement = null;
|
|
||||||
_this._isPaused = false;
|
|
||||||
_this._isSliding = false;
|
|
||||||
_this.touchTimeout = null;
|
|
||||||
_this.touchStartX = 0;
|
|
||||||
_this.touchDeltaX = 0;
|
|
||||||
_this._config = _this._getConfig(config);
|
|
||||||
_this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, _this._element);
|
|
||||||
_this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
|
||||||
_this._pointerEvent = Boolean(window.PointerEvent);
|
|
||||||
|
|
||||||
_this._addEventListeners();
|
|
||||||
|
|
||||||
return _this;
|
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -310,9 +127,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.nextWhenVisible = function nextWhenVisible() {
|
_proto.nextWhenVisible = function nextWhenVisible() {
|
||||||
// Don't call next when the page isn't visible
|
var $element = $__default['default'](this._element); // Don't call next when the page isn't visible
|
||||||
// or the carousel or its parent isn't visible
|
// or the carousel or its parent isn't visible
|
||||||
if (!document.hidden && isVisible(this._element)) {
|
|
||||||
|
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
|
||||||
this.next();
|
this.next();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -328,8 +146,8 @@
|
||||||
this._isPaused = true;
|
this._isPaused = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) {
|
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
|
||||||
triggerTransitionEnd(this._element);
|
Util__default['default'].triggerTransitionEnd(this._element);
|
||||||
this.cycle(true);
|
this.cycle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -347,17 +165,15 @@
|
||||||
this._interval = null;
|
this._interval = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config && this._config.interval && !this._isPaused) {
|
if (this._config.interval && !this._isPaused) {
|
||||||
this._updateInterval();
|
|
||||||
|
|
||||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.to = function to(index) {
|
_proto.to = function to(index) {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||||
|
|
||||||
var activeIndex = this._getItemIndex(this._activeElement);
|
var activeIndex = this._getItemIndex(this._activeElement);
|
||||||
|
|
||||||
|
|
@ -366,8 +182,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isSliding) {
|
if (this._isSliding) {
|
||||||
EventHandler__default['default'].one(this._element, EVENT_SLID, function () {
|
$__default['default'](this._element).one(EVENT_SLID, function () {
|
||||||
return _this2.to(index);
|
return _this.to(index);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -384,11 +200,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
$__default['default'](this._element).off(EVENT_KEY);
|
||||||
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
EventHandler__default['default'].off(this._element, EVENT_KEY);
|
|
||||||
this._items = null;
|
this._items = null;
|
||||||
this._config = null;
|
this._config = null;
|
||||||
|
this._element = null;
|
||||||
this._interval = null;
|
this._interval = null;
|
||||||
this._isPaused = null;
|
this._isPaused = null;
|
||||||
this._isSliding = null;
|
this._isSliding = null;
|
||||||
|
|
@ -399,7 +215,7 @@
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _extends({}, Default, config);
|
config = _extends({}, Default, config);
|
||||||
typeCheckConfig(NAME, config, DefaultType);
|
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -424,56 +240,59 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addEventListeners = function _addEventListeners() {
|
_proto._addEventListeners = function _addEventListeners() {
|
||||||
var _this3 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._config.keyboard) {
|
if (this._config.keyboard) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, function (event) {
|
$__default['default'](this._element).on(EVENT_KEYDOWN, function (event) {
|
||||||
return _this3._keydown(event);
|
return _this2._keydown(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover') {
|
if (this._config.pause === 'hover') {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, function (event) {
|
$__default['default'](this._element).on(EVENT_MOUSEENTER, function (event) {
|
||||||
return _this3.pause(event);
|
return _this2.pause(event);
|
||||||
});
|
}).on(EVENT_MOUSELEAVE, function (event) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, function (event) {
|
return _this2.cycle(event);
|
||||||
return _this3.cycle(event);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.touch && this._touchSupported) {
|
if (this._config.touch) {
|
||||||
this._addTouchEventListeners();
|
this._addTouchEventListeners();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||||
var _this4 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
|
if (!this._touchSupported) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var start = function start(event) {
|
var start = function start(event) {
|
||||||
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||||
_this4.touchStartX = event.clientX;
|
_this3.touchStartX = event.originalEvent.clientX;
|
||||||
} else if (!_this4._pointerEvent) {
|
} else if (!_this3._pointerEvent) {
|
||||||
_this4.touchStartX = event.touches[0].clientX;
|
_this3.touchStartX = event.originalEvent.touches[0].clientX;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var move = function move(event) {
|
var move = function move(event) {
|
||||||
// ensure swiping with one touch and not pinching
|
// ensure swiping with one touch and not pinching
|
||||||
if (event.touches && event.touches.length > 1) {
|
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||||
_this4.touchDeltaX = 0;
|
_this3.touchDeltaX = 0;
|
||||||
} else {
|
} else {
|
||||||
_this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX;
|
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var end = function end(event) {
|
var end = function end(event) {
|
||||||
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||||
_this4.touchDeltaX = event.clientX - _this4.touchStartX;
|
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
|
||||||
}
|
}
|
||||||
|
|
||||||
_this4._handleSwipe();
|
_this3._handleSwipe();
|
||||||
|
|
||||||
if (_this4._config.pause === 'hover') {
|
if (_this3._config.pause === 'hover') {
|
||||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
// part of the mouse compatibility events on first tap - the carousel
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
// would stop cycling until user tapped out of it;
|
// would stop cycling until user tapped out of it;
|
||||||
|
|
@ -481,41 +300,39 @@
|
||||||
// (as if it's the second time we tap on it, mouseenter compat event
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
// events to fire) we explicitly restart cycling
|
// events to fire) we explicitly restart cycling
|
||||||
_this4.pause();
|
_this3.pause();
|
||||||
|
|
||||||
if (_this4.touchTimeout) {
|
if (_this3.touchTimeout) {
|
||||||
clearTimeout(_this4.touchTimeout);
|
clearTimeout(_this3.touchTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
_this4.touchTimeout = setTimeout(function (event) {
|
_this3.touchTimeout = setTimeout(function (event) {
|
||||||
return _this4.cycle(event);
|
return _this3.cycle(event);
|
||||||
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
}, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
|
$__default['default'](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
|
||||||
EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, function (e) {
|
return e.preventDefault();
|
||||||
return e.preventDefault();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this._pointerEvent) {
|
if (this._pointerEvent) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, function (event) {
|
$__default['default'](this._element).on(EVENT_POINTERDOWN, function (event) {
|
||||||
return start(event);
|
return start(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_POINTERUP, function (event) {
|
$__default['default'](this._element).on(EVENT_POINTERUP, function (event) {
|
||||||
return end(event);
|
return end(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||||
} else {
|
} else {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, function (event) {
|
$__default['default'](this._element).on(EVENT_TOUCHSTART, function (event) {
|
||||||
return start(event);
|
return start(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, function (event) {
|
$__default['default'](this._element).on(EVENT_TOUCHMOVE, function (event) {
|
||||||
return move(event);
|
return move(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, function (event) {
|
$__default['default'](this._element).on(EVENT_TOUCHEND, function (event) {
|
||||||
return end(event);
|
return end(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -526,13 +343,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event.key) {
|
switch (event.which) {
|
||||||
case ARROW_LEFT_KEY:
|
case ARROW_LEFT_KEYCODE:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.prev();
|
this.prev();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARROW_RIGHT_KEY:
|
case ARROW_RIGHT_KEYCODE:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.next();
|
this.next();
|
||||||
break;
|
break;
|
||||||
|
|
@ -540,7 +357,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getItemIndex = function _getItemIndex(element) {
|
_proto._getItemIndex = function _getItemIndex(element) {
|
||||||
this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : [];
|
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
|
||||||
return this._items.indexOf(element);
|
return this._items.indexOf(element);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -565,53 +382,35 @@
|
||||||
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||||
var targetIndex = this._getItemIndex(relatedTarget);
|
var targetIndex = this._getItemIndex(relatedTarget);
|
||||||
|
|
||||||
var fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element));
|
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
|
||||||
|
|
||||||
return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, {
|
var slideEvent = $__default['default'].Event(EVENT_SLIDE, {
|
||||||
relatedTarget: relatedTarget,
|
relatedTarget: relatedTarget,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: fromIndex,
|
from: fromIndex,
|
||||||
to: targetIndex
|
to: targetIndex
|
||||||
});
|
});
|
||||||
|
$__default['default'](this._element).trigger(slideEvent);
|
||||||
|
return slideEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||||
if (this._indicatorsElement) {
|
if (this._indicatorsElement) {
|
||||||
var indicators = SelectorEngine__default['default'].find(SELECTOR_ACTIVE, this._indicatorsElement);
|
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
|
||||||
|
$__default['default'](indicators).removeClass(CLASS_NAME_ACTIVE);
|
||||||
for (var i = 0; i < indicators.length; i++) {
|
|
||||||
indicators[i].classList.remove(CLASS_NAME_ACTIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||||
|
|
||||||
if (nextIndicator) {
|
if (nextIndicator) {
|
||||||
nextIndicator.classList.add(CLASS_NAME_ACTIVE);
|
$__default['default'](nextIndicator).addClass(CLASS_NAME_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._updateInterval = function _updateInterval() {
|
|
||||||
var element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
|
||||||
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
|
|
||||||
|
|
||||||
if (elementInterval) {
|
|
||||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
|
||||||
this._config.interval = elementInterval;
|
|
||||||
} else {
|
|
||||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
_proto._slide = function _slide(direction, element) {
|
_proto._slide = function _slide(direction, element) {
|
||||||
var _this5 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
var activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||||
|
|
||||||
var activeElementIndex = this._getItemIndex(activeElement);
|
var activeElementIndex = this._getItemIndex(activeElement);
|
||||||
|
|
||||||
|
|
@ -625,23 +424,23 @@
|
||||||
var eventDirectionName;
|
var eventDirectionName;
|
||||||
|
|
||||||
if (direction === DIRECTION_NEXT) {
|
if (direction === DIRECTION_NEXT) {
|
||||||
directionalClassName = CLASS_NAME_START;
|
directionalClassName = CLASS_NAME_LEFT;
|
||||||
orderClassName = CLASS_NAME_NEXT;
|
orderClassName = CLASS_NAME_NEXT;
|
||||||
eventDirectionName = DIRECTION_LEFT;
|
eventDirectionName = DIRECTION_LEFT;
|
||||||
} else {
|
} else {
|
||||||
directionalClassName = CLASS_NAME_END;
|
directionalClassName = CLASS_NAME_RIGHT;
|
||||||
orderClassName = CLASS_NAME_PREV;
|
orderClassName = CLASS_NAME_PREV;
|
||||||
eventDirectionName = DIRECTION_RIGHT;
|
eventDirectionName = DIRECTION_RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
|
if (nextElement && $__default['default'](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
||||||
|
|
||||||
if (slideEvent.defaultPrevented) {
|
if (slideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -658,39 +457,41 @@
|
||||||
|
|
||||||
this._setActiveIndicatorElement(nextElement);
|
this._setActiveIndicatorElement(nextElement);
|
||||||
|
|
||||||
this._activeElement = nextElement;
|
var slidEvent = $__default['default'].Event(EVENT_SLID, {
|
||||||
|
relatedTarget: nextElement,
|
||||||
|
direction: eventDirectionName,
|
||||||
|
from: activeElementIndex,
|
||||||
|
to: nextElementIndex
|
||||||
|
});
|
||||||
|
|
||||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
if ($__default['default'](this._element).hasClass(CLASS_NAME_SLIDE)) {
|
||||||
nextElement.classList.add(orderClassName);
|
$__default['default'](nextElement).addClass(orderClassName);
|
||||||
reflow(nextElement);
|
Util__default['default'].reflow(nextElement);
|
||||||
activeElement.classList.add(directionalClassName);
|
$__default['default'](activeElement).addClass(directionalClassName);
|
||||||
nextElement.classList.add(directionalClassName);
|
$__default['default'](nextElement).addClass(directionalClassName);
|
||||||
var transitionDuration = getTransitionDurationFromElement(activeElement);
|
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
||||||
EventHandler__default['default'].one(activeElement, TRANSITION_END, function () {
|
|
||||||
nextElement.classList.remove(directionalClassName, orderClassName);
|
if (nextElementInterval) {
|
||||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
|
this._config.interval = nextElementInterval;
|
||||||
_this5._isSliding = false;
|
} else {
|
||||||
|
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(activeElement);
|
||||||
|
$__default['default'](activeElement).one(Util__default['default'].TRANSITION_END, function () {
|
||||||
|
$__default['default'](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
|
||||||
|
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||||
|
_this4._isSliding = false;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
EventHandler__default['default'].trigger(_this5._element, EVENT_SLID, {
|
return $__default['default'](_this4._element).trigger(slidEvent);
|
||||||
relatedTarget: nextElement,
|
|
||||||
direction: eventDirectionName,
|
|
||||||
from: activeElementIndex,
|
|
||||||
to: nextElementIndex
|
|
||||||
});
|
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(activeElement, transitionDuration);
|
|
||||||
} else {
|
} else {
|
||||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
$__default['default'](nextElement).addClass(CLASS_NAME_ACTIVE);
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
|
$__default['default'](this._element).trigger(slidEvent);
|
||||||
relatedTarget: nextElement,
|
|
||||||
direction: eventDirectionName,
|
|
||||||
from: activeElementIndex,
|
|
||||||
to: nextElementIndex
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCycling) {
|
if (isCycling) {
|
||||||
|
|
@ -699,79 +500,82 @@
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Carousel.carouselInterface = function carouselInterface(element, config) {
|
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
return this.each(function () {
|
||||||
|
var data = $__default['default'](this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element));
|
var _config = _extends({}, Default, $__default['default'](this).data());
|
||||||
|
|
||||||
if (typeof config === 'object') {
|
if (typeof config === 'object') {
|
||||||
_config = _extends({}, _config, config);
|
_config = _extends({}, _config, config);
|
||||||
}
|
|
||||||
|
|
||||||
var action = typeof config === 'string' ? config : _config.slide;
|
|
||||||
|
|
||||||
if (!data) {
|
|
||||||
data = new Carousel(element, _config);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof config === 'number') {
|
|
||||||
data.to(config);
|
|
||||||
} else if (typeof action === 'string') {
|
|
||||||
if (typeof data[action] === 'undefined') {
|
|
||||||
throw new TypeError("No method named \"" + action + "\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data[action]();
|
var action = typeof config === 'string' ? config : _config.slide;
|
||||||
} else if (_config.interval && _config.ride) {
|
|
||||||
data.pause();
|
|
||||||
data.cycle();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Carousel.jQueryInterface = function jQueryInterface(config) {
|
if (!data) {
|
||||||
return this.each(function () {
|
data = new Carousel(this, _config);
|
||||||
Carousel.carouselInterface(this, config);
|
$__default['default'](this).data(DATA_KEY, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof config === 'number') {
|
||||||
|
data.to(config);
|
||||||
|
} else if (typeof action === 'string') {
|
||||||
|
if (typeof data[action] === 'undefined') {
|
||||||
|
throw new TypeError("No method named \"" + action + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
data[action]();
|
||||||
|
} else if (_config.interval && _config.ride) {
|
||||||
|
data.pause();
|
||||||
|
data.cycle();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
|
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
|
||||||
var target = getElementFromSelector(this);
|
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||||
|
|
||||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
if (!selector) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = _extends({}, Manipulator__default['default'].getDataAttributes(target), Manipulator__default['default'].getDataAttributes(this));
|
var target = $__default['default'](selector)[0];
|
||||||
|
|
||||||
var slideIndex = this.getAttribute('data-bs-slide-to');
|
if (!target || !$__default['default'](target).hasClass(CLASS_NAME_CAROUSEL)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
|
||||||
|
|
||||||
|
var slideIndex = this.getAttribute('data-slide-to');
|
||||||
|
|
||||||
if (slideIndex) {
|
if (slideIndex) {
|
||||||
config.interval = false;
|
config.interval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Carousel.carouselInterface(target, config);
|
Carousel._jQueryInterface.call($__default['default'](target), config);
|
||||||
|
|
||||||
if (slideIndex) {
|
if (slideIndex) {
|
||||||
Data__default['default'].getData(target, DATA_KEY).to(slideIndex);
|
$__default['default'](target).data(DATA_KEY).to(slideIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Carousel, null, [{
|
_createClass(Carousel, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -779,36 +583,29 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
|
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||||
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, function () {
|
$__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
|
||||||
var carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
|
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
|
||||||
|
|
||||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||||
Carousel.carouselInterface(carousels[i], Data__default['default'].getData(carousels[i], DATA_KEY));
|
var $carousel = $__default['default'](carousels[i]);
|
||||||
|
|
||||||
|
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Carousel to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Carousel._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Carousel;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Carousel.jQueryInterface;
|
return Carousel._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Carousel;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Carousel.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
505
js/dist/collapse.js
vendored
505
js/dist/collapse.js
vendored
|
|
@ -1,149 +1,20 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap collapse.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap collapse.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util));
|
||||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, (function ($, Util) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
|
||||||
|
|
||||||
/**
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
||||||
};
|
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
|
||||||
var selector = element.getAttribute('data-bs-target');
|
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
|
||||||
var hrefAttr = element.getAttribute('href');
|
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return selector;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getSelectorFromElement = function getSelectorFromElement(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
|
|
||||||
if (selector) {
|
|
||||||
return document.querySelector(selector) ? selector : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
|
||||||
if (!element) {
|
|
||||||
return 0;
|
|
||||||
} // Get transition-duration of the element
|
|
||||||
|
|
||||||
|
|
||||||
var _window$getComputedSt = window.getComputedStyle(element),
|
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
||||||
return 0;
|
|
||||||
} // If multiple durations are defined, take the first
|
|
||||||
|
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
||||||
};
|
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
|
||||||
};
|
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
|
||||||
return (obj[0] || obj).nodeType;
|
|
||||||
};
|
|
||||||
|
|
||||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
|
||||||
var called = false;
|
|
||||||
var durationPadding = 5;
|
|
||||||
var emulatedDuration = duration + durationPadding;
|
|
||||||
|
|
||||||
function listener() {
|
|
||||||
called = true;
|
|
||||||
element.removeEventListener(TRANSITION_END, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
element.addEventListener(TRANSITION_END, listener);
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!called) {
|
|
||||||
triggerTransitionEnd(element);
|
|
||||||
}
|
|
||||||
}, emulatedDuration);
|
|
||||||
};
|
|
||||||
|
|
||||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
|
||||||
Object.keys(configTypes).forEach(function (property) {
|
|
||||||
var expectedTypes = configTypes[property];
|
|
||||||
var value = config[property];
|
|
||||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
|
||||||
|
|
||||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
|
||||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var reflow = function reflow(element) {
|
|
||||||
return element.offsetHeight;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -154,58 +25,12 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'collapse';
|
var NAME = 'collapse';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.collapse';
|
var DATA_KEY = 'bs.collapse';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
var Default = {
|
var Default = {
|
||||||
toggle: true,
|
toggle: true,
|
||||||
parent: ''
|
parent: ''
|
||||||
|
|
@ -223,53 +48,47 @@
|
||||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
var CLASS_NAME_COLLAPSE = 'collapse';
|
||||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
var CLASS_NAME_COLLAPSING = 'collapsing';
|
||||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
var CLASS_NAME_COLLAPSED = 'collapsed';
|
||||||
var WIDTH = 'width';
|
var DIMENSION_WIDTH = 'width';
|
||||||
var HEIGHT = 'height';
|
var DIMENSION_HEIGHT = 'height';
|
||||||
var SELECTOR_ACTIVES = '.show, .collapsing';
|
var SELECTOR_ACTIVES = '.show, .collapsing';
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
|
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Class Definition
|
* Class Definition
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Collapse = /*#__PURE__*/function (_BaseComponent) {
|
var Collapse = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Collapse, _BaseComponent);
|
|
||||||
|
|
||||||
function Collapse(element, config) {
|
function Collapse(element, config) {
|
||||||
var _this;
|
this._isTransitioning = false;
|
||||||
|
this._element = element;
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._config = this._getConfig(config);
|
||||||
_this._isTransitioning = false;
|
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
||||||
_this._config = _this._getConfig(config);
|
var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||||
_this._triggerArray = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-bs-target=\"#" + element.id + "\"]"));
|
|
||||||
var toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
|
|
||||||
|
|
||||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||||
var elem = toggleList[i];
|
var elem = toggleList[i];
|
||||||
var selector = getSelectorFromElement(elem);
|
var selector = Util__default['default'].getSelectorFromElement(elem);
|
||||||
var filterElement = SelectorEngine__default['default'].find(selector).filter(function (foundElem) {
|
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
|
||||||
return foundElem === element;
|
return foundElem === element;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (selector !== null && filterElement.length) {
|
if (selector !== null && filterElement.length > 0) {
|
||||||
_this._selector = selector;
|
this._selector = selector;
|
||||||
|
|
||||||
_this._triggerArray.push(elem);
|
this._triggerArray.push(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_this._parent = _this._config.parent ? _this._getParent() : null;
|
this._parent = this._config.parent ? this._getParent() : null;
|
||||||
|
|
||||||
if (!_this._config.parent) {
|
if (!this._config.parent) {
|
||||||
_this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);
|
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_this._config.toggle) {
|
if (this._config.toggle) {
|
||||||
_this.toggle();
|
this.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _this;
|
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -277,7 +96,7 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if ($__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||||
this.hide();
|
this.hide();
|
||||||
} else {
|
} else {
|
||||||
this.show();
|
this.show();
|
||||||
|
|
@ -285,9 +104,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.show = function show() {
|
_proto.show = function show() {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._isTransitioning || $__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -295,9 +114,9 @@
|
||||||
var activesData;
|
var activesData;
|
||||||
|
|
||||||
if (this._parent) {
|
if (this._parent) {
|
||||||
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
|
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
|
||||||
if (typeof _this2._config.parent === 'string') {
|
if (typeof _this._config.parent === 'string') {
|
||||||
return elem.getAttribute('data-bs-parent') === _this2._config.parent;
|
return elem.getAttribute('data-parent') === _this._config.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
||||||
|
|
@ -308,106 +127,88 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var container = SelectorEngine__default['default'].findOne(this._selector);
|
|
||||||
|
|
||||||
if (actives) {
|
if (actives) {
|
||||||
var tempActiveData = actives.find(function (elem) {
|
activesData = $__default['default'](actives).not(this._selector).data(DATA_KEY);
|
||||||
return container !== elem;
|
|
||||||
});
|
|
||||||
activesData = tempActiveData ? Data__default['default'].getData(tempActiveData, DATA_KEY) : null;
|
|
||||||
|
|
||||||
if (activesData && activesData._isTransitioning) {
|
if (activesData && activesData._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
|
var startEvent = $__default['default'].Event(EVENT_SHOW);
|
||||||
|
$__default['default'](this._element).trigger(startEvent);
|
||||||
|
|
||||||
if (startEvent.defaultPrevented) {
|
if (startEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actives) {
|
if (actives) {
|
||||||
actives.forEach(function (elemActive) {
|
Collapse._jQueryInterface.call($__default['default'](actives).not(this._selector), 'hide');
|
||||||
if (container !== elemActive) {
|
|
||||||
Collapse.collapseInterface(elemActive, 'hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!activesData) {
|
if (!activesData) {
|
||||||
Data__default['default'].setData(elemActive, DATA_KEY, null);
|
$__default['default'](actives).data(DATA_KEY, null);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var dimension = this._getDimension();
|
var dimension = this._getDimension();
|
||||||
|
|
||||||
this._element.classList.remove(CLASS_NAME_COLLAPSE);
|
$__default['default'](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
|
||||||
|
|
||||||
this._element.style[dimension] = 0;
|
this._element.style[dimension] = 0;
|
||||||
|
|
||||||
if (this._triggerArray.length) {
|
if (this._triggerArray.length) {
|
||||||
this._triggerArray.forEach(function (element) {
|
$__default['default'](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
|
||||||
element.classList.remove(CLASS_NAME_COLLAPSED);
|
|
||||||
element.setAttribute('aria-expanded', true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setTransitioning(true);
|
this.setTransitioning(true);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
_this2._element.classList.remove(CLASS_NAME_COLLAPSING);
|
$__default['default'](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
|
||||||
|
_this._element.style[dimension] = '';
|
||||||
|
|
||||||
_this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
_this.setTransitioning(false);
|
||||||
|
|
||||||
_this2._element.style[dimension] = '';
|
$__default['default'](_this._element).trigger(EVENT_SHOWN);
|
||||||
|
|
||||||
_this2.setTransitioning(false);
|
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(_this2._element, EVENT_SHOWN);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||||
var scrollSize = "scroll" + capitalizedDimension;
|
var scrollSize = "scroll" + capitalizedDimension;
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
|
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(this._element, transitionDuration);
|
|
||||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.hide = function hide() {
|
_proto.hide = function hide() {
|
||||||
var _this3 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._isTransitioning || !$__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
|
var startEvent = $__default['default'].Event(EVENT_HIDE);
|
||||||
|
$__default['default'](this._element).trigger(startEvent);
|
||||||
|
|
||||||
if (startEvent.defaultPrevented) {
|
if (startEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dimension = this._getDimension();
|
var dimension = this._getDimension();
|
||||||
|
|
||||||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||||
reflow(this._element);
|
Util__default['default'].reflow(this._element);
|
||||||
|
$__default['default'](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
|
||||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
|
||||||
|
|
||||||
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
|
||||||
|
|
||||||
var triggerArrayLength = this._triggerArray.length;
|
var triggerArrayLength = this._triggerArray.length;
|
||||||
|
|
||||||
if (triggerArrayLength > 0) {
|
if (triggerArrayLength > 0) {
|
||||||
for (var i = 0; i < triggerArrayLength; i++) {
|
for (var i = 0; i < triggerArrayLength; i++) {
|
||||||
var trigger = this._triggerArray[i];
|
var trigger = this._triggerArray[i];
|
||||||
var elem = getElementFromSelector(trigger);
|
var selector = Util__default['default'].getSelectorFromElement(trigger);
|
||||||
|
|
||||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
if (selector !== null) {
|
||||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
var $elem = $__default['default']([].slice.call(document.querySelectorAll(selector)));
|
||||||
trigger.setAttribute('aria-expanded', false);
|
|
||||||
|
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
|
||||||
|
$__default['default'](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -415,19 +216,14 @@
|
||||||
this.setTransitioning(true);
|
this.setTransitioning(true);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
_this3.setTransitioning(false);
|
_this2.setTransitioning(false);
|
||||||
|
|
||||||
_this3._element.classList.remove(CLASS_NAME_COLLAPSING);
|
$__default['default'](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
|
||||||
|
|
||||||
_this3._element.classList.add(CLASS_NAME_COLLAPSE);
|
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(_this3._element, EVENT_HIDDEN);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this._element.style[dimension] = '';
|
this._element.style[dimension] = '';
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
|
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(this._element, transitionDuration);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
||||||
|
|
@ -435,10 +231,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
|
|
||||||
this._config = null;
|
this._config = null;
|
||||||
this._parent = null;
|
this._parent = null;
|
||||||
|
this._element = null;
|
||||||
this._triggerArray = null;
|
this._triggerArray = null;
|
||||||
this._isTransitioning = null;
|
this._isTransitioning = null;
|
||||||
} // Private
|
} // Private
|
||||||
|
|
@ -448,97 +244,92 @@
|
||||||
config = _extends({}, Default, config);
|
config = _extends({}, Default, config);
|
||||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||||
|
|
||||||
typeCheckConfig(NAME, config, DefaultType);
|
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getDimension = function _getDimension() {
|
_proto._getDimension = function _getDimension() {
|
||||||
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
|
var hasWidth = $__default['default'](this._element).hasClass(DIMENSION_WIDTH);
|
||||||
|
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getParent = function _getParent() {
|
_proto._getParent = function _getParent() {
|
||||||
var _this4 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var parent = this._config.parent;
|
var parent;
|
||||||
|
|
||||||
if (isElement(parent)) {
|
if (Util__default['default'].isElement(this._config.parent)) {
|
||||||
// it's a jQuery object
|
parent = this._config.parent; // It's a jQuery object
|
||||||
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
|
|
||||||
parent = parent[0];
|
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||||
|
parent = this._config.parent[0];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
parent = SelectorEngine__default['default'].findOne(parent);
|
parent = document.querySelector(this._config.parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
var selector = SELECTOR_DATA_TOGGLE + "[data-bs-parent=\"" + parent + "\"]";
|
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
|
||||||
SelectorEngine__default['default'].find(selector, parent).forEach(function (element) {
|
var children = [].slice.call(parent.querySelectorAll(selector));
|
||||||
var selected = getElementFromSelector(element);
|
$__default['default'](children).each(function (i, element) {
|
||||||
|
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||||
_this4._addAriaAndCollapsedClass(selected, [element]);
|
|
||||||
});
|
});
|
||||||
return parent;
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||||
if (!element || !triggerArray.length) {
|
var isOpen = $__default['default'](element).hasClass(CLASS_NAME_SHOW);
|
||||||
return;
|
|
||||||
|
if (triggerArray.length) {
|
||||||
|
$__default['default'](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
|
||||||
triggerArray.forEach(function (elem) {
|
|
||||||
if (isOpen) {
|
|
||||||
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
|
||||||
} else {
|
|
||||||
elem.classList.add(CLASS_NAME_COLLAPSED);
|
|
||||||
}
|
|
||||||
|
|
||||||
elem.setAttribute('aria-expanded', isOpen);
|
|
||||||
});
|
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Collapse.collapseInterface = function collapseInterface(element, config) {
|
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||||
|
return selector ? document.querySelector(selector) : null;
|
||||||
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element), typeof config === 'object' && config ? config : {});
|
|
||||||
|
|
||||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
|
||||||
_config.toggle = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!data) {
|
|
||||||
data = new Collapse(element, _config);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
|
||||||
if (typeof data[config] === 'undefined') {
|
|
||||||
throw new TypeError("No method named \"" + config + "\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
data[config]();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Collapse.jQueryInterface = function jQueryInterface(config) {
|
Collapse._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
Collapse.collapseInterface(this, config);
|
var $element = $__default['default'](this);
|
||||||
|
var data = $element.data(DATA_KEY);
|
||||||
|
|
||||||
|
var _config = _extends({}, Default, $element.data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
|
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||||
|
_config.toggle = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
data = new Collapse(this, _config);
|
||||||
|
$element.data(DATA_KEY, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof config === 'string') {
|
||||||
|
if (typeof data[config] === 'undefined') {
|
||||||
|
throw new TypeError("No method named \"" + config + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
data[config]();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Collapse, null, [{
|
_createClass(Collapse, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -546,56 +337,36 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||||
if (event.target.tagName === 'A') {
|
if (event.currentTarget.tagName === 'A') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
var triggerData = Manipulator__default['default'].getDataAttributes(this);
|
var $trigger = $__default['default'](this);
|
||||||
var selector = getSelectorFromElement(this);
|
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||||
var selectorElements = SelectorEngine__default['default'].find(selector);
|
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||||
selectorElements.forEach(function (element) {
|
$__default['default'](selectors).each(function () {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
var $target = $__default['default'](this);
|
||||||
var config;
|
var data = $target.data(DATA_KEY);
|
||||||
|
var config = data ? 'toggle' : $trigger.data();
|
||||||
|
|
||||||
if (data) {
|
Collapse._jQueryInterface.call($target, config);
|
||||||
// update parent attribute
|
|
||||||
if (data._parent === null && typeof triggerData.parent === 'string') {
|
|
||||||
data._config.parent = triggerData.parent;
|
|
||||||
data._parent = data._getParent();
|
|
||||||
}
|
|
||||||
|
|
||||||
config = 'toggle';
|
|
||||||
} else {
|
|
||||||
config = triggerData;
|
|
||||||
}
|
|
||||||
|
|
||||||
Collapse.collapseInterface(element, config);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Collapse to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Collapse._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Collapse;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Collapse.jQueryInterface;
|
return Collapse._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Collapse;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Collapse.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/collapse.js.map
vendored
2
js/dist/collapse.js.map
vendored
File diff suppressed because one or more lines are too long
82
js/dist/dom/data.js
vendored
82
js/dist/dom/data.js
vendored
|
|
@ -1,82 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap data.js v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
(function (global, factory) {
|
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
|
|
||||||
}(this, (function () { 'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): dom/data.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var mapData = function () {
|
|
||||||
var storeData = {};
|
|
||||||
var id = 1;
|
|
||||||
return {
|
|
||||||
set: function set(element, key, data) {
|
|
||||||
if (typeof element.bsKey === 'undefined') {
|
|
||||||
element.bsKey = {
|
|
||||||
key: key,
|
|
||||||
id: id
|
|
||||||
};
|
|
||||||
id++;
|
|
||||||
}
|
|
||||||
|
|
||||||
storeData[element.bsKey.id] = data;
|
|
||||||
},
|
|
||||||
get: function get(element, key) {
|
|
||||||
if (!element || typeof element.bsKey === 'undefined') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var keyProperties = element.bsKey;
|
|
||||||
|
|
||||||
if (keyProperties.key === key) {
|
|
||||||
return storeData[keyProperties.id];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
delete: function _delete(element, key) {
|
|
||||||
if (typeof element.bsKey === 'undefined') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var keyProperties = element.bsKey;
|
|
||||||
|
|
||||||
if (keyProperties.key === key) {
|
|
||||||
delete storeData[keyProperties.id];
|
|
||||||
delete element.bsKey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
var Data = {
|
|
||||||
setData: function setData(instance, key, data) {
|
|
||||||
mapData.set(instance, key, data);
|
|
||||||
},
|
|
||||||
getData: function getData(instance, key) {
|
|
||||||
return mapData.get(instance, key);
|
|
||||||
},
|
|
||||||
removeData: function removeData(instance, key) {
|
|
||||||
mapData.delete(instance, key);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return Data;
|
|
||||||
|
|
||||||
})));
|
|
||||||
//# sourceMappingURL=data.js.map
|
|
||||||
1
js/dist/dom/data.js.map
vendored
1
js/dist/dom/data.js.map
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key,\n id\n }\n id++\n }\n\n storeData[element.bsKey.id] = data\n },\n get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.bsKey\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","bsKey","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,MAAIC,EAAE,GAAG,CAAT;EACA,SAAO;EACLC,IAAAA,GADK,eACDC,OADC,EACQC,GADR,EACaC,IADb,EACmB;EACtB,UAAI,OAAOF,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxCH,QAAAA,OAAO,CAACG,KAAR,GAAgB;EACdF,UAAAA,GAAG,EAAHA,GADc;EAEdH,UAAAA,EAAE,EAAFA;EAFc,SAAhB;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACG,KAAR,CAAcL,EAAf,CAAT,GAA8BI,IAA9B;EACD,KAXI;EAYLE,IAAAA,GAZK,eAYDJ,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACG,KAAf,KAAyB,WAAzC,EAAsD;EACpD,eAAO,IAAP;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACD;;EAED,aAAO,IAAP;EACD,KAvBI;EAwBLQ,IAAAA,MAxBK,mBAwBEN,OAxBF,EAwBWC,GAxBX,EAwBgB;EACnB,UAAI,OAAOD,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxC;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACG,KAAf;EACD;EACF;EAlCI,GAAP;EAoCD,CAvCe,EAAhB;;MAyCMI,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOR,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYU,QAAZ,EAAsBR,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXQ,EAAAA,OAJW,mBAIHD,QAJG,EAIOR,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACQ,GAAR,CAAYK,QAAZ,EAAsBR,GAAtB,CAAP;EACD,GANU;EAOXU,EAAAA,UAPW,sBAOAF,QAPA,EAOUR,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACU,MAAR,CAAeG,QAAf,EAAyBR,GAAzB;EACD;EATU;;;;;;;;"}
|
|
||||||
310
js/dist/dom/event-handler.js
vendored
310
js/dist/dom/event-handler.js
vendored
|
|
@ -1,310 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap event-handler.js v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
(function (global, factory) {
|
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
|
|
||||||
}(this, (function () { 'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): dom/event-handler.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
|
|
||||||
var stripNameRegex = /\..*/;
|
|
||||||
var stripUidRegex = /::\d+$/;
|
|
||||||
var eventRegistry = {}; // Events storage
|
|
||||||
|
|
||||||
var uidEvent = 1;
|
|
||||||
var customEvents = {
|
|
||||||
mouseenter: 'mouseover',
|
|
||||||
mouseleave: 'mouseout'
|
|
||||||
};
|
|
||||||
var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Private methods
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
function getUidEvent(element, uid) {
|
|
||||||
return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEvent(element) {
|
|
||||||
var uid = getUidEvent(element);
|
|
||||||
element.uidEvent = uid;
|
|
||||||
eventRegistry[uid] = eventRegistry[uid] || {};
|
|
||||||
return eventRegistry[uid];
|
|
||||||
}
|
|
||||||
|
|
||||||
function bootstrapHandler(element, fn) {
|
|
||||||
return function handler(event) {
|
|
||||||
event.delegateTarget = element;
|
|
||||||
|
|
||||||
if (handler.oneOff) {
|
|
||||||
EventHandler.off(element, event.type, fn);
|
|
||||||
}
|
|
||||||
|
|
||||||
return fn.apply(element, [event]);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function bootstrapDelegationHandler(element, selector, fn) {
|
|
||||||
return function handler(event) {
|
|
||||||
var domElements = element.querySelectorAll(selector);
|
|
||||||
|
|
||||||
for (var target = event.target; target && target !== this; target = target.parentNode) {
|
|
||||||
for (var i = domElements.length; i--;) {
|
|
||||||
if (domElements[i] === target) {
|
|
||||||
event.delegateTarget = target;
|
|
||||||
|
|
||||||
if (handler.oneOff) {
|
|
||||||
EventHandler.off(element, event.type, fn);
|
|
||||||
}
|
|
||||||
|
|
||||||
return fn.apply(target, [event]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // To please ESLint
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function findHandler(events, handler, delegationSelector) {
|
|
||||||
if (delegationSelector === void 0) {
|
|
||||||
delegationSelector = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var uidEventList = Object.keys(events);
|
|
||||||
|
|
||||||
for (var i = 0, len = uidEventList.length; i < len; i++) {
|
|
||||||
var event = events[uidEventList[i]];
|
|
||||||
|
|
||||||
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
|
|
||||||
return event;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalizeParams(originalTypeEvent, handler, delegationFn) {
|
|
||||||
var delegation = typeof handler === 'string';
|
|
||||||
var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
|
|
||||||
|
|
||||||
var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
|
|
||||||
var custom = customEvents[typeEvent];
|
|
||||||
|
|
||||||
if (custom) {
|
|
||||||
typeEvent = custom;
|
|
||||||
}
|
|
||||||
|
|
||||||
var isNative = nativeEvents.has(typeEvent);
|
|
||||||
|
|
||||||
if (!isNative) {
|
|
||||||
typeEvent = originalTypeEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [delegation, originalHandler, typeEvent];
|
|
||||||
}
|
|
||||||
|
|
||||||
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
|
|
||||||
if (typeof originalTypeEvent !== 'string' || !element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!handler) {
|
|
||||||
handler = delegationFn;
|
|
||||||
delegationFn = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
|
|
||||||
delegation = _normalizeParams[0],
|
|
||||||
originalHandler = _normalizeParams[1],
|
|
||||||
typeEvent = _normalizeParams[2];
|
|
||||||
|
|
||||||
var events = getEvent(element);
|
|
||||||
var handlers = events[typeEvent] || (events[typeEvent] = {});
|
|
||||||
var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
|
|
||||||
|
|
||||||
if (previousFn) {
|
|
||||||
previousFn.oneOff = previousFn.oneOff && oneOff;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
|
|
||||||
var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
|
|
||||||
fn.delegationSelector = delegation ? handler : null;
|
|
||||||
fn.originalHandler = originalHandler;
|
|
||||||
fn.oneOff = oneOff;
|
|
||||||
fn.uidEvent = uid;
|
|
||||||
handlers[uid] = fn;
|
|
||||||
element.addEventListener(typeEvent, fn, delegation);
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
|
||||||
var fn = findHandler(events[typeEvent], handler, delegationSelector);
|
|
||||||
|
|
||||||
if (!fn) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
|
|
||||||
delete events[typeEvent][fn.uidEvent];
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
|
||||||
var storeElementEvent = events[typeEvent] || {};
|
|
||||||
Object.keys(storeElementEvent).forEach(function (handlerKey) {
|
|
||||||
if (handlerKey.includes(namespace)) {
|
|
||||||
var event = storeElementEvent[handlerKey];
|
|
||||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var EventHandler = {
|
|
||||||
on: function on(element, event, handler, delegationFn) {
|
|
||||||
addHandler(element, event, handler, delegationFn, false);
|
|
||||||
},
|
|
||||||
one: function one(element, event, handler, delegationFn) {
|
|
||||||
addHandler(element, event, handler, delegationFn, true);
|
|
||||||
},
|
|
||||||
off: function off(element, originalTypeEvent, handler, delegationFn) {
|
|
||||||
if (typeof originalTypeEvent !== 'string' || !element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
|
|
||||||
delegation = _normalizeParams2[0],
|
|
||||||
originalHandler = _normalizeParams2[1],
|
|
||||||
typeEvent = _normalizeParams2[2];
|
|
||||||
|
|
||||||
var inNamespace = typeEvent !== originalTypeEvent;
|
|
||||||
var events = getEvent(element);
|
|
||||||
var isNamespace = originalTypeEvent.startsWith('.');
|
|
||||||
|
|
||||||
if (typeof originalHandler !== 'undefined') {
|
|
||||||
// Simplest case: handler is passed, remove that listener ONLY.
|
|
||||||
if (!events || !events[typeEvent]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNamespace) {
|
|
||||||
Object.keys(events).forEach(function (elementEvent) {
|
|
||||||
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var storeElementEvent = events[typeEvent] || {};
|
|
||||||
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
|
|
||||||
var handlerKey = keyHandlers.replace(stripUidRegex, '');
|
|
||||||
|
|
||||||
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
|
||||||
var event = storeElementEvent[keyHandlers];
|
|
||||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
trigger: function trigger(element, event, args) {
|
|
||||||
if (typeof event !== 'string' || !element) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var $ = getjQuery();
|
|
||||||
var typeEvent = event.replace(stripNameRegex, '');
|
|
||||||
var inNamespace = event !== typeEvent;
|
|
||||||
var isNative = nativeEvents.has(typeEvent);
|
|
||||||
var jQueryEvent;
|
|
||||||
var bubbles = true;
|
|
||||||
var nativeDispatch = true;
|
|
||||||
var defaultPrevented = false;
|
|
||||||
var evt = null;
|
|
||||||
|
|
||||||
if (inNamespace && $) {
|
|
||||||
jQueryEvent = $.Event(event, args);
|
|
||||||
$(element).trigger(jQueryEvent);
|
|
||||||
bubbles = !jQueryEvent.isPropagationStopped();
|
|
||||||
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
|
||||||
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNative) {
|
|
||||||
evt = document.createEvent('HTMLEvents');
|
|
||||||
evt.initEvent(typeEvent, bubbles, true);
|
|
||||||
} else {
|
|
||||||
evt = new CustomEvent(event, {
|
|
||||||
bubbles: bubbles,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
} // merge custom information in our event
|
|
||||||
|
|
||||||
|
|
||||||
if (typeof args !== 'undefined') {
|
|
||||||
Object.keys(args).forEach(function (key) {
|
|
||||||
Object.defineProperty(evt, key, {
|
|
||||||
get: function get() {
|
|
||||||
return args[key];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defaultPrevented) {
|
|
||||||
evt.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nativeDispatch) {
|
|
||||||
element.dispatchEvent(evt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
|
|
||||||
jQueryEvent.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
return evt;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return EventHandler;
|
|
||||||
|
|
||||||
})));
|
|
||||||
//# sourceMappingURL=event-handler.js.map
|
|
||||||
1
js/dist/dom/event-handler.js.map
vendored
1
js/dist/dom/event-handler.js.map
vendored
File diff suppressed because one or more lines are too long
87
js/dist/dom/manipulator.js
vendored
87
js/dist/dom/manipulator.js
vendored
|
|
@ -1,87 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap manipulator.js v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
(function (global, factory) {
|
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
|
|
||||||
}(this, (function () { 'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): dom/manipulator.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
function normalizeData(val) {
|
|
||||||
if (val === 'true') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val === 'false') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val === Number(val).toString()) {
|
|
||||||
return Number(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val === '' || val === 'null') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalizeDataKey(key) {
|
|
||||||
return key.replace(/[A-Z]/g, function (chr) {
|
|
||||||
return "-" + chr.toLowerCase();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var Manipulator = {
|
|
||||||
setDataAttribute: function setDataAttribute(element, key, value) {
|
|
||||||
element.setAttribute("data-bs-" + normalizeDataKey(key), value);
|
|
||||||
},
|
|
||||||
removeDataAttribute: function removeDataAttribute(element, key) {
|
|
||||||
element.removeAttribute("data-bs-" + normalizeDataKey(key));
|
|
||||||
},
|
|
||||||
getDataAttributes: function getDataAttributes(element) {
|
|
||||||
if (!element) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
var attributes = {};
|
|
||||||
Object.keys(element.dataset).filter(function (key) {
|
|
||||||
return key.startsWith('bs');
|
|
||||||
}).forEach(function (key) {
|
|
||||||
var pureKey = key.replace(/^bs/, '');
|
|
||||||
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
|
|
||||||
attributes[pureKey] = normalizeData(element.dataset[key]);
|
|
||||||
});
|
|
||||||
return attributes;
|
|
||||||
},
|
|
||||||
getDataAttribute: function getDataAttribute(element, key) {
|
|
||||||
return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
|
|
||||||
},
|
|
||||||
offset: function offset(element) {
|
|
||||||
var rect = element.getBoundingClientRect();
|
|
||||||
return {
|
|
||||||
top: rect.top + document.body.scrollTop,
|
|
||||||
left: rect.left + document.body.scrollLeft
|
|
||||||
};
|
|
||||||
},
|
|
||||||
position: function position(element) {
|
|
||||||
return {
|
|
||||||
top: element.offsetTop,
|
|
||||||
left: element.offsetLeft
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return Manipulator;
|
|
||||||
|
|
||||||
})));
|
|
||||||
//# sourceMappingURL=manipulator.js.map
|
|
||||||
1
js/dist/dom/manipulator.js.map
vendored
1
js/dist/dom/manipulator.js.map
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsB,UAAAC,GAAG;EAAA,iBAAQA,GAAG,CAACC,WAAJ,EAAR;EAAA,GAAzB,CAAP;EACD;;MAEKC,WAAW,GAAG;EAClBC,EAAAA,gBADkB,4BACDC,OADC,EACQN,GADR,EACaO,KADb,EACoB;EACpCD,IAAAA,OAAO,CAACE,YAAR,cAAgCT,gBAAgB,CAACC,GAAD,CAAhD,EAAyDO,KAAzD;EACD,GAHiB;EAKlBE,EAAAA,mBALkB,+BAKEH,OALF,EAKWN,GALX,EAKgB;EAChCM,IAAAA,OAAO,CAACI,eAAR,cAAmCX,gBAAgB,CAACC,GAAD,CAAnD;EACD,GAPiB;EASlBW,EAAAA,iBATkB,6BASAL,OATA,EASS;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,QAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACU,UAAAhB,GAAG;EAAA,aAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CAAJ;EAAA,KADb,EAEGC,OAFH,CAEW,UAAAlB,GAAG,EAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;EA2BlBW,EAAAA,gBA3BkB,4BA2BDjB,OA3BC,EA2BQN,GA3BR,EA2Ba;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,cAAgCzB,gBAAgB,CAACC,GAAD,CAAhD,CAAD,CAApB;EACD,GA7BiB;EA+BlByB,EAAAA,MA/BkB,kBA+BXnB,OA/BW,EA+BF;EACd,QAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;EAwClBC,EAAAA,QAxCkB,oBAwCT5B,OAxCS,EAwCA;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;EA7CiB;;;;;;;;"}
|
|
||||||
99
js/dist/dom/selector-engine.js
vendored
99
js/dist/dom/selector-engine.js
vendored
|
|
@ -1,99 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap selector-engine.js v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
(function (global, factory) {
|
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
|
|
||||||
}(this, (function () { 'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): dom/selector-engine.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var NODE_TEXT = 3;
|
|
||||||
var SelectorEngine = {
|
|
||||||
matches: function matches(element, selector) {
|
|
||||||
return element.matches(selector);
|
|
||||||
},
|
|
||||||
find: function find(selector, element) {
|
|
||||||
var _ref;
|
|
||||||
|
|
||||||
if (element === void 0) {
|
|
||||||
element = document.documentElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
|
|
||||||
},
|
|
||||||
findOne: function findOne(selector, element) {
|
|
||||||
if (element === void 0) {
|
|
||||||
element = document.documentElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Element.prototype.querySelector.call(element, selector);
|
|
||||||
},
|
|
||||||
children: function children(element, selector) {
|
|
||||||
var _ref2;
|
|
||||||
|
|
||||||
var children = (_ref2 = []).concat.apply(_ref2, element.children);
|
|
||||||
|
|
||||||
return children.filter(function (child) {
|
|
||||||
return child.matches(selector);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
parents: function parents(element, selector) {
|
|
||||||
var parents = [];
|
|
||||||
var ancestor = element.parentNode;
|
|
||||||
|
|
||||||
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
|
|
||||||
if (this.matches(ancestor, selector)) {
|
|
||||||
parents.push(ancestor);
|
|
||||||
}
|
|
||||||
|
|
||||||
ancestor = ancestor.parentNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
return parents;
|
|
||||||
},
|
|
||||||
prev: function prev(element, selector) {
|
|
||||||
var previous = element.previousElementSibling;
|
|
||||||
|
|
||||||
while (previous) {
|
|
||||||
if (previous.matches(selector)) {
|
|
||||||
return [previous];
|
|
||||||
}
|
|
||||||
|
|
||||||
previous = previous.previousElementSibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
next: function next(element, selector) {
|
|
||||||
var next = element.nextElementSibling;
|
|
||||||
|
|
||||||
while (next) {
|
|
||||||
if (this.matches(next, selector)) {
|
|
||||||
return [next];
|
|
||||||
}
|
|
||||||
|
|
||||||
next = next.nextElementSibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return SelectorEngine;
|
|
||||||
|
|
||||||
})));
|
|
||||||
//# sourceMappingURL=selector-engine.js.map
|
|
||||||
1
js/dist/dom/selector-engine.js.map
vendored
1
js/dist/dom/selector-engine.js.map
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n matches(element, selector) {\n return element.matches(selector)\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n const children = [].concat(...element.children)\n\n return children.filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n"],"names":["NODE_TEXT","SelectorEngine","matches","element","selector","find","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,SAAS,GAAG,CAAlB;MAEMC,cAAc,GAAG;EACrBC,EAAAA,OADqB,mBACbC,OADa,EACJC,QADI,EACM;EACzB,WAAOD,OAAO,CAACD,OAAR,CAAgBE,QAAhB,CAAP;EACD,GAHoB;EAKrBC,EAAAA,IALqB,gBAKhBD,QALgB,EAKND,OALM,EAK8B;EAAA;;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BG,QAAQ,CAACC,eAAiB;EAAA;;EACjD,WAAO,YAAGC,MAAH,aAAaC,OAAO,CAACC,SAAR,CAAkBC,gBAAlB,CAAmCC,IAAnC,CAAwCT,OAAxC,EAAiDC,QAAjD,CAAb,CAAP;EACD,GAPoB;EASrBS,EAAAA,OATqB,mBASbT,QATa,EASHD,OATG,EASiC;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BG,QAAQ,CAACC,eAAiB;EAAA;;EACpD,WAAOE,OAAO,CAACC,SAAR,CAAkBI,aAAlB,CAAgCF,IAAhC,CAAqCT,OAArC,EAA8CC,QAA9C,CAAP;EACD,GAXoB;EAarBW,EAAAA,QAbqB,oBAaZZ,OAbY,EAaHC,QAbG,EAaO;EAAA;;EAC1B,QAAMW,QAAQ,GAAG,aAAGP,MAAH,cAAaL,OAAO,CAACY,QAArB,CAAjB;;EAEA,WAAOA,QAAQ,CAACC,MAAT,CAAgB,UAAAC,KAAK;EAAA,aAAIA,KAAK,CAACf,OAAN,CAAcE,QAAd,CAAJ;EAAA,KAArB,CAAP;EACD,GAjBoB;EAmBrBc,EAAAA,OAnBqB,mBAmBbf,OAnBa,EAmBJC,QAnBI,EAmBM;EACzB,QAAMc,OAAO,GAAG,EAAhB;EAEA,QAAIC,QAAQ,GAAGhB,OAAO,CAACiB,UAAvB;;EAEA,WAAOD,QAAQ,IAAIA,QAAQ,CAACE,QAAT,KAAsBC,IAAI,CAACC,YAAvC,IAAuDJ,QAAQ,CAACE,QAAT,KAAsBrB,SAApF,EAA+F;EAC7F,UAAI,KAAKE,OAAL,CAAaiB,QAAb,EAAuBf,QAAvB,CAAJ,EAAsC;EACpCc,QAAAA,OAAO,CAACM,IAAR,CAAaL,QAAb;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,UAApB;EACD;;EAED,WAAOF,OAAP;EACD,GAjCoB;EAmCrBO,EAAAA,IAnCqB,gBAmChBtB,OAnCgB,EAmCPC,QAnCO,EAmCG;EACtB,QAAIsB,QAAQ,GAAGvB,OAAO,CAACwB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACxB,OAAT,CAAiBE,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACsB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA/CoB;EAiDrBC,EAAAA,IAjDqB,gBAiDhBzB,OAjDgB,EAiDPC,QAjDO,EAiDG;EACtB,QAAIwB,IAAI,GAAGzB,OAAO,CAAC0B,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAI,KAAK1B,OAAL,CAAa0B,IAAb,EAAmBxB,QAAnB,CAAJ,EAAkC;EAChC,eAAO,CAACwB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;EA7DoB;;;;;;;;"}
|
|
||||||
599
js/dist/dropdown.js
vendored
599
js/dist/dropdown.js
vendored
|
|
@ -1,127 +1,21 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap dropdown.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap dropdown.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
|
||||||
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, (function ($, Popper, Util) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
function _interopNamespace(e) {
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
if (e && e.__esModule) return e;
|
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
||||||
var n = Object.create(null);
|
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||||
if (e) {
|
|
||||||
Object.keys(e).forEach(function (k) {
|
|
||||||
if (k !== 'default') {
|
|
||||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
||||||
Object.defineProperty(n, k, d.get ? d : {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return e[k];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
n['default'] = e;
|
|
||||||
return Object.freeze(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
||||||
};
|
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
|
||||||
var selector = element.getAttribute('data-bs-target');
|
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
|
||||||
var hrefAttr = element.getAttribute('href');
|
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return selector;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
|
||||||
return (obj[0] || obj).nodeType;
|
|
||||||
};
|
|
||||||
|
|
||||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
|
||||||
Object.keys(configTypes).forEach(function (property) {
|
|
||||||
var expectedTypes = configTypes[property];
|
|
||||||
var value = config[property];
|
|
||||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
|
||||||
|
|
||||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
|
||||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var isVisible = function isVisible(element) {
|
|
||||||
if (!element) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (element.style && element.parentNode && element.parentNode.style) {
|
|
||||||
var elementStyle = getComputedStyle(element);
|
|
||||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
|
||||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
var noop = function noop() {
|
|
||||||
return function () {};
|
|
||||||
};
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -132,66 +26,25 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'dropdown';
|
var NAME = 'dropdown';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.dropdown';
|
var DATA_KEY = 'bs.dropdown';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var ESCAPE_KEY = 'Escape';
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
var SPACE_KEY = 'Space';
|
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||||
var TAB_KEY = 'Tab';
|
|
||||||
var ARROW_UP_KEY = 'ArrowUp';
|
|
||||||
var ARROW_DOWN_KEY = 'ArrowDown';
|
|
||||||
var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
|
|
||||||
|
|
||||||
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
|
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
|
||||||
|
|
||||||
|
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
|
||||||
|
|
||||||
|
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
|
||||||
|
|
||||||
|
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
|
||||||
|
|
||||||
|
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
|
||||||
|
|
||||||
|
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
|
||||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||||
|
|
@ -203,24 +56,25 @@
|
||||||
var CLASS_NAME_DISABLED = 'disabled';
|
var CLASS_NAME_DISABLED = 'disabled';
|
||||||
var CLASS_NAME_SHOW = 'show';
|
var CLASS_NAME_SHOW = 'show';
|
||||||
var CLASS_NAME_DROPUP = 'dropup';
|
var CLASS_NAME_DROPUP = 'dropup';
|
||||||
var CLASS_NAME_DROPEND = 'dropend';
|
var CLASS_NAME_DROPRIGHT = 'dropright';
|
||||||
var CLASS_NAME_DROPSTART = 'dropstart';
|
var CLASS_NAME_DROPLEFT = 'dropleft';
|
||||||
var CLASS_NAME_NAVBAR = 'navbar';
|
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]';
|
var CLASS_NAME_POSITION_STATIC = 'position-static';
|
||||||
|
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
|
||||||
var SELECTOR_FORM_CHILD = '.dropdown form';
|
var SELECTOR_FORM_CHILD = '.dropdown form';
|
||||||
var SELECTOR_MENU = '.dropdown-menu';
|
var SELECTOR_MENU = '.dropdown-menu';
|
||||||
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
|
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
|
||||||
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
|
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
|
||||||
var PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start';
|
var PLACEMENT_TOP = 'top-start';
|
||||||
var PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end';
|
var PLACEMENT_TOPEND = 'top-end';
|
||||||
var PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start';
|
var PLACEMENT_BOTTOM = 'bottom-start';
|
||||||
var PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end';
|
var PLACEMENT_BOTTOMEND = 'bottom-end';
|
||||||
var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start';
|
var PLACEMENT_RIGHT = 'right-start';
|
||||||
var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start';
|
var PLACEMENT_LEFT = 'left-start';
|
||||||
var Default = {
|
var Default = {
|
||||||
offset: 0,
|
offset: 0,
|
||||||
flip: true,
|
flip: true,
|
||||||
boundary: 'clippingParents',
|
boundary: 'scrollParent',
|
||||||
reference: 'toggle',
|
reference: 'toggle',
|
||||||
display: 'dynamic',
|
display: 'dynamic',
|
||||||
popperConfig: null
|
popperConfig: null
|
||||||
|
|
@ -239,21 +93,15 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Dropdown = /*#__PURE__*/function (_BaseComponent) {
|
var Dropdown = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Dropdown, _BaseComponent);
|
|
||||||
|
|
||||||
function Dropdown(element, config) {
|
function Dropdown(element, config) {
|
||||||
var _this;
|
this._element = element;
|
||||||
|
this._popper = null;
|
||||||
|
this._config = this._getConfig(config);
|
||||||
|
this._menu = this._getMenuElement();
|
||||||
|
this._inNavbar = this._detectNavbar();
|
||||||
|
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._addEventListeners();
|
||||||
_this._popper = null;
|
|
||||||
_this._config = _this._getConfig(config);
|
|
||||||
_this._menu = _this._getMenuElement();
|
|
||||||
_this._inNavbar = _this._detectNavbar();
|
|
||||||
|
|
||||||
_this._addEventListeners();
|
|
||||||
|
|
||||||
return _this;
|
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -261,92 +109,106 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
|
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
|
var isActive = $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
Dropdown.clearMenus();
|
Dropdown._clearMenus();
|
||||||
|
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.show();
|
this.show(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.show = function show() {
|
_proto.show = function show(usePopper) {
|
||||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
|
if (usePopper === void 0) {
|
||||||
|
usePopper = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = Dropdown.getParentFromElement(this._element);
|
|
||||||
var relatedTarget = {
|
var relatedTarget = {
|
||||||
relatedTarget: this._element
|
relatedTarget: this._element
|
||||||
};
|
};
|
||||||
var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, relatedTarget);
|
var showEvent = $__default['default'].Event(EVENT_SHOW, relatedTarget);
|
||||||
|
|
||||||
if (showEvent.defaultPrevented) {
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
|
$__default['default'](parent).trigger(showEvent);
|
||||||
|
|
||||||
|
if (showEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
} // Totally disable Popper for Dropdowns in Navbar
|
} // Disable totally Popper.js for Dropdown in Navbar
|
||||||
|
|
||||||
|
|
||||||
if (!this._inNavbar) {
|
if (!this._inNavbar && usePopper) {
|
||||||
if (typeof Popper__namespace === 'undefined') {
|
/**
|
||||||
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
|
* Check for Popper dependency
|
||||||
|
* Popper - https://popper.js.org
|
||||||
|
*/
|
||||||
|
if (typeof Popper__default['default'] === 'undefined') {
|
||||||
|
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
|
||||||
}
|
}
|
||||||
|
|
||||||
var referenceElement = this._element;
|
var referenceElement = this._element;
|
||||||
|
|
||||||
if (this._config.reference === 'parent') {
|
if (this._config.reference === 'parent') {
|
||||||
referenceElement = parent;
|
referenceElement = parent;
|
||||||
} else if (isElement(this._config.reference)) {
|
} else if (Util__default['default'].isElement(this._config.reference)) {
|
||||||
referenceElement = this._config.reference; // Check if it's jQuery element
|
referenceElement = this._config.reference; // Check if it's jQuery element
|
||||||
|
|
||||||
if (typeof this._config.reference.jquery !== 'undefined') {
|
if (typeof this._config.reference.jquery !== 'undefined') {
|
||||||
referenceElement = this._config.reference[0];
|
referenceElement = this._config.reference[0];
|
||||||
}
|
}
|
||||||
|
} // If boundary is not `scrollParent`, then set position to `static`
|
||||||
|
// to allow the menu to "escape" the scroll parent's boundaries
|
||||||
|
// https://github.com/twbs/bootstrap/issues/24251
|
||||||
|
|
||||||
|
|
||||||
|
if (this._config.boundary !== 'scrollParent') {
|
||||||
|
$__default['default'](parent).addClass(CLASS_NAME_POSITION_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig());
|
this._popper = new Popper__default['default'](referenceElement, this._menu, this._getPopperConfig());
|
||||||
} // If this is a touch-enabled device we add extra
|
} // If this is a touch-enabled device we add extra
|
||||||
// empty mouseover listeners to the body's immediate children;
|
// empty mouseover listeners to the body's immediate children;
|
||||||
// only needed because of broken event delegation on iOS
|
// only needed because of broken event delegation on iOS
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
|
if ('ontouchstart' in document.documentElement && $__default['default'](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
|
||||||
var _ref;
|
$__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
|
||||||
|
|
||||||
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
|
|
||||||
return EventHandler__default['default'].on(elem, 'mouseover', null, noop());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._element.focus();
|
this._element.focus();
|
||||||
|
|
||||||
this._element.setAttribute('aria-expanded', true);
|
this._element.setAttribute('aria-expanded', true);
|
||||||
|
|
||||||
this._menu.classList.toggle(CLASS_NAME_SHOW);
|
$__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||||
|
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_SHOWN, relatedTarget));
|
||||||
this._element.classList.toggle(CLASS_NAME_SHOW);
|
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.hide = function hide() {
|
_proto.hide = function hide() {
|
||||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = Dropdown.getParentFromElement(this._element);
|
|
||||||
var relatedTarget = {
|
var relatedTarget = {
|
||||||
relatedTarget: this._element
|
relatedTarget: this._element
|
||||||
};
|
};
|
||||||
var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget);
|
var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
|
||||||
|
|
||||||
if (hideEvent.defaultPrevented) {
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
|
$__default['default'](parent).trigger(hideEvent);
|
||||||
|
|
||||||
|
if (hideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,20 +216,17 @@
|
||||||
this._popper.destroy();
|
this._popper.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._menu.classList.toggle(CLASS_NAME_SHOW);
|
$__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||||
|
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
|
||||||
this._element.classList.toggle(CLASS_NAME_SHOW);
|
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
|
$__default['default'](this._element).off(EVENT_KEY);
|
||||||
EventHandler__default['default'].off(this._element, EVENT_KEY);
|
this._element = null;
|
||||||
this._menu = null;
|
this._menu = null;
|
||||||
|
|
||||||
if (this._popper) {
|
if (this._popper !== null) {
|
||||||
this._popper.destroy();
|
this._popper.destroy();
|
||||||
|
|
||||||
this._popper = null;
|
this._popper = null;
|
||||||
|
|
@ -377,115 +236,135 @@
|
||||||
_proto.update = function update() {
|
_proto.update = function update() {
|
||||||
this._inNavbar = this._detectNavbar();
|
this._inNavbar = this._detectNavbar();
|
||||||
|
|
||||||
if (this._popper) {
|
if (this._popper !== null) {
|
||||||
this._popper.update();
|
this._popper.scheduleUpdate();
|
||||||
}
|
}
|
||||||
} // Private
|
} // Private
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._addEventListeners = function _addEventListeners() {
|
_proto._addEventListeners = function _addEventListeners() {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
EventHandler__default['default'].on(this._element, EVENT_CLICK, function (event) {
|
$__default['default'](this._element).on(EVENT_CLICK, function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
_this2.toggle();
|
_this.toggle();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _extends({}, this.constructor.Default, Manipulator__default['default'].getDataAttributes(this._element), config);
|
config = _extends({}, this.constructor.Default, $__default['default'](this._element).data(), config);
|
||||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getMenuElement = function _getMenuElement() {
|
_proto._getMenuElement = function _getMenuElement() {
|
||||||
return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0];
|
if (!this._menu) {
|
||||||
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
|
if (parent) {
|
||||||
|
this._menu = parent.querySelector(SELECTOR_MENU);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._menu;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getPlacement = function _getPlacement() {
|
_proto._getPlacement = function _getPlacement() {
|
||||||
var parentDropdown = this._element.parentNode;
|
var $parentDropdown = $__default['default'](this._element.parentNode);
|
||||||
|
var placement = PLACEMENT_BOTTOM; // Handle dropup
|
||||||
|
|
||||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
|
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
|
||||||
return PLACEMENT_RIGHT;
|
placement = $__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
|
||||||
|
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
|
||||||
|
placement = PLACEMENT_RIGHT;
|
||||||
|
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
|
||||||
|
placement = PLACEMENT_LEFT;
|
||||||
|
} else if ($__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
|
||||||
|
placement = PLACEMENT_BOTTOMEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
|
return placement;
|
||||||
return PLACEMENT_LEFT;
|
|
||||||
} // We need to trim the value because custom properties can also include spaces
|
|
||||||
|
|
||||||
|
|
||||||
var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
|
|
||||||
|
|
||||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
|
||||||
return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._detectNavbar = function _detectNavbar() {
|
_proto._detectNavbar = function _detectNavbar() {
|
||||||
return this._element.closest("." + CLASS_NAME_NAVBAR) !== null;
|
return $__default['default'](this._element).closest('.navbar').length > 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto._getOffset = function _getOffset() {
|
||||||
|
var _this2 = this;
|
||||||
|
|
||||||
|
var offset = {};
|
||||||
|
|
||||||
|
if (typeof this._config.offset === 'function') {
|
||||||
|
offset.fn = function (data) {
|
||||||
|
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
offset.offset = this._config.offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
return offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getPopperConfig = function _getPopperConfig() {
|
_proto._getPopperConfig = function _getPopperConfig() {
|
||||||
var popperConfig = {
|
var popperConfig = {
|
||||||
placement: this._getPlacement(),
|
placement: this._getPlacement(),
|
||||||
modifiers: [{
|
modifiers: {
|
||||||
name: 'preventOverflow',
|
offset: this._getOffset(),
|
||||||
options: {
|
flip: {
|
||||||
altBoundary: this._config.flip,
|
enabled: this._config.flip
|
||||||
rootBoundary: this._config.boundary
|
},
|
||||||
|
preventOverflow: {
|
||||||
|
boundariesElement: this._config.boundary
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
}; // Disable Popper if we have a static display
|
}; // Disable Popper.js if we have a static display
|
||||||
|
|
||||||
if (this._config.display === 'static') {
|
if (this._config.display === 'static') {
|
||||||
popperConfig.modifiers = [{
|
popperConfig.modifiers.applyStyle = {
|
||||||
name: 'applyStyles',
|
|
||||||
enabled: false
|
enabled: false
|
||||||
}];
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return _extends({}, popperConfig, this._config.popperConfig);
|
return _extends({}, popperConfig, this._config.popperConfig);
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Dropdown.dropdownInterface = function dropdownInterface(element, config) {
|
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
return this.each(function () {
|
||||||
|
var data = $__default['default'](this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = typeof config === 'object' ? config : null;
|
var _config = typeof config === 'object' ? config : null;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Dropdown(element, _config);
|
data = new Dropdown(this, _config);
|
||||||
}
|
$__default['default'](this).data(DATA_KEY, data);
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
|
||||||
if (typeof data[config] === 'undefined') {
|
|
||||||
throw new TypeError("No method named \"" + config + "\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data[config]();
|
if (typeof config === 'string') {
|
||||||
}
|
if (typeof data[config] === 'undefined') {
|
||||||
};
|
throw new TypeError("No method named \"" + config + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
Dropdown.jQueryInterface = function jQueryInterface(config) {
|
data[config]();
|
||||||
return this.each(function () {
|
}
|
||||||
Dropdown.dropdownInterface(this, config);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.clearMenus = function clearMenus(event) {
|
Dropdown._clearMenus = function _clearMenus(event) {
|
||||||
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
|
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
|
var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||||
|
|
||||||
for (var i = 0, len = toggles.length; i < len; i++) {
|
for (var i = 0, len = toggles.length; i < len; i++) {
|
||||||
var parent = Dropdown.getParentFromElement(toggles[i]);
|
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||||
var context = Data__default['default'].getData(toggles[i], DATA_KEY);
|
|
||||||
|
var context = $__default['default'](toggles[i]).data(DATA_KEY);
|
||||||
var relatedTarget = {
|
var relatedTarget = {
|
||||||
relatedTarget: toggles[i]
|
relatedTarget: toggles[i]
|
||||||
};
|
};
|
||||||
|
|
@ -500,28 +379,25 @@
|
||||||
|
|
||||||
var dropdownMenu = context._menu;
|
var dropdownMenu = context._menu;
|
||||||
|
|
||||||
if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {
|
if (!$__default['default'](parent).hasClass(CLASS_NAME_SHOW)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
|
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default['default'].contains(parent, event.target)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget);
|
var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
|
||||||
|
$__default['default'](parent).trigger(hideEvent);
|
||||||
|
|
||||||
if (hideEvent.defaultPrevented) {
|
if (hideEvent.isDefaultPrevented()) {
|
||||||
continue;
|
continue;
|
||||||
} // If this is a touch-enabled device we remove the extra
|
} // If this is a touch-enabled device we remove the extra
|
||||||
// empty mouseover listeners we added for iOS support
|
// empty mouseover listeners we added for iOS support
|
||||||
|
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
var _ref2;
|
$__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
|
||||||
|
|
||||||
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
|
|
||||||
return EventHandler__default['default'].off(elem, 'mouseover', null, noop());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggles[i].setAttribute('aria-expanded', 'false');
|
toggles[i].setAttribute('aria-expanded', 'false');
|
||||||
|
|
@ -530,17 +406,24 @@
|
||||||
context._popper.destroy();
|
context._popper.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
dropdownMenu.classList.remove(CLASS_NAME_SHOW);
|
$__default['default'](dropdownMenu).removeClass(CLASS_NAME_SHOW);
|
||||||
toggles[i].classList.remove(CLASS_NAME_SHOW);
|
$__default['default'](parent).removeClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
|
||||||
EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Dropdown.getParentFromElement = function getParentFromElement(element) {
|
Dropdown._getParentFromElement = function _getParentFromElement(element) {
|
||||||
return getElementFromSelector(element) || element.parentNode;
|
var parent;
|
||||||
};
|
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||||
|
|
||||||
Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
|
if (selector) {
|
||||||
|
parent = document.querySelector(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent || element.parentNode;
|
||||||
|
} // eslint-disable-next-line complexity
|
||||||
|
;
|
||||||
|
|
||||||
|
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
|
||||||
// If not input/textarea:
|
// If not input/textarea:
|
||||||
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
||||||
// If input/textarea:
|
// If input/textarea:
|
||||||
|
|
@ -548,55 +431,67 @@
|
||||||
// - If key is other than escape
|
// - If key is other than escape
|
||||||
// - If key is not up or down => not a dropdown command
|
// - If key is not up or down => not a dropdown command
|
||||||
// - If trigger inside the menu => not a dropdown command
|
// - If trigger inside the menu => not a dropdown command
|
||||||
if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
|
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default['default'](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.disabled || $__default['default'](this).hasClass(CLASS_NAME_DISABLED)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var parent = Dropdown._getParentFromElement(this);
|
||||||
|
|
||||||
|
var isActive = $__default['default'](parent).hasClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
|
if (!isActive && event.which === ESCAPE_KEYCODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
|
if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
|
||||||
|
if (event.which === ESCAPE_KEYCODE) {
|
||||||
|
$__default['default'](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
|
||||||
|
}
|
||||||
|
|
||||||
|
$__default['default'](this).trigger('click');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = Dropdown.getParentFromElement(this);
|
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
|
||||||
var isActive = this.classList.contains(CLASS_NAME_SHOW);
|
return $__default['default'](item).is(':visible');
|
||||||
|
});
|
||||||
|
|
||||||
if (event.key === ESCAPE_KEY) {
|
if (items.length === 0) {
|
||||||
var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0];
|
|
||||||
button.focus();
|
|
||||||
Dropdown.clearMenus();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isActive || event.key === SPACE_KEY) {
|
var index = items.indexOf(event.target);
|
||||||
Dropdown.clearMenus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var items = SelectorEngine__default['default'].find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
|
if (event.which === ARROW_UP_KEYCODE && index > 0) {
|
||||||
|
// Up
|
||||||
if (!items.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var index = items.indexOf(event.target); // Up
|
|
||||||
|
|
||||||
if (event.key === ARROW_UP_KEY && index > 0) {
|
|
||||||
index--;
|
index--;
|
||||||
} // Down
|
}
|
||||||
|
|
||||||
|
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
|
||||||
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
|
// Down
|
||||||
index++;
|
index++;
|
||||||
} // index is -1 if the first keydown is an ArrowUp
|
}
|
||||||
|
|
||||||
|
if (index < 0) {
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
index = index === -1 ? 0 : index;
|
|
||||||
items[index].focus();
|
items[index].focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Dropdown, null, [{
|
_createClass(Dropdown, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
|
|
@ -606,15 +501,10 @@
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return DefaultType;
|
return DefaultType;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Dropdown;
|
return Dropdown;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -622,40 +512,27 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
|
$__default['default'](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||||
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
|
|
||||||
EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
Dropdown.dropdownInterface(this, 'toggle');
|
|
||||||
});
|
Dropdown._jQueryInterface.call($__default['default'](this), 'toggle');
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
|
}).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
|
||||||
return e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Dropdown to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Dropdown._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Dropdown;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Dropdown.jQueryInterface;
|
return Dropdown._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Dropdown;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Dropdown.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Dropdown;
|
return Dropdown;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/dropdown.js.map
vendored
2
js/dist/dropdown.js.map
vendored
File diff suppressed because one or more lines are too long
22
js/dist/index.js
vendored
Normal file
22
js/dist/index.js
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Bootstrap (v4.5.3): index.js
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
(function ($) {
|
||||||
|
if (typeof $ === 'undefined') {
|
||||||
|
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var version = $.fn.jquery.split(' ')[0].split('.');
|
||||||
|
var minMajor = 1;
|
||||||
|
var ltMajor = 2;
|
||||||
|
var minMinor = 9;
|
||||||
|
var minPatch = 1;
|
||||||
|
var maxMajor = 4;
|
||||||
|
|
||||||
|
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
||||||
|
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
||||||
|
}
|
||||||
|
})($);
|
||||||
617
js/dist/modal.js
vendored
617
js/dist/modal.js
vendored
|
|
@ -1,153 +1,20 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap modal.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap modal.js v4.5.3 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util));
|
||||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, (function ($, Util) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
|
||||||
|
|
||||||
/**
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
||||||
};
|
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
|
||||||
var selector = element.getAttribute('data-bs-target');
|
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
|
||||||
var hrefAttr = element.getAttribute('href');
|
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return selector;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
|
||||||
if (!element) {
|
|
||||||
return 0;
|
|
||||||
} // Get transition-duration of the element
|
|
||||||
|
|
||||||
|
|
||||||
var _window$getComputedSt = window.getComputedStyle(element),
|
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
||||||
return 0;
|
|
||||||
} // If multiple durations are defined, take the first
|
|
||||||
|
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
||||||
};
|
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
|
||||||
};
|
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
|
||||||
return (obj[0] || obj).nodeType;
|
|
||||||
};
|
|
||||||
|
|
||||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
|
||||||
var called = false;
|
|
||||||
var durationPadding = 5;
|
|
||||||
var emulatedDuration = duration + durationPadding;
|
|
||||||
|
|
||||||
function listener() {
|
|
||||||
called = true;
|
|
||||||
element.removeEventListener(TRANSITION_END, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
element.addEventListener(TRANSITION_END, listener);
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!called) {
|
|
||||||
triggerTransitionEnd(element);
|
|
||||||
}
|
|
||||||
}, emulatedDuration);
|
|
||||||
};
|
|
||||||
|
|
||||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
|
||||||
Object.keys(configTypes).forEach(function (property) {
|
|
||||||
var expectedTypes = configTypes[property];
|
|
||||||
var value = config[property];
|
|
||||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
|
||||||
|
|
||||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
|
||||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var isVisible = function isVisible(element) {
|
|
||||||
if (!element) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (element.style && element.parentNode && element.parentNode.style) {
|
|
||||||
var elementStyle = getComputedStyle(element);
|
|
||||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
|
||||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
var reflow = function reflow(element) {
|
|
||||||
return element.offsetHeight;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||||
|
|
||||||
|
|
@ -158,68 +25,25 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var NAME = 'modal';
|
var NAME = 'modal';
|
||||||
|
var VERSION = '4.5.3';
|
||||||
var DATA_KEY = 'bs.modal';
|
var DATA_KEY = 'bs.modal';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var ESCAPE_KEY = 'Escape';
|
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||||
|
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||||
|
|
||||||
var Default = {
|
var Default = {
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
focus: true
|
focus: true,
|
||||||
|
show: true
|
||||||
};
|
};
|
||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
backdrop: '(boolean|string)',
|
backdrop: '(boolean|string)',
|
||||||
keyboard: 'boolean',
|
keyboard: 'boolean',
|
||||||
focus: 'boolean'
|
focus: 'boolean',
|
||||||
|
show: 'boolean'
|
||||||
};
|
};
|
||||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
||||||
|
|
@ -233,6 +57,7 @@
|
||||||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
||||||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||||
|
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
|
||||||
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
||||||
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
||||||
var CLASS_NAME_OPEN = 'modal-open';
|
var CLASS_NAME_OPEN = 'modal-open';
|
||||||
|
|
@ -241,8 +66,8 @@
|
||||||
var CLASS_NAME_STATIC = 'modal-static';
|
var CLASS_NAME_STATIC = 'modal-static';
|
||||||
var SELECTOR_DIALOG = '.modal-dialog';
|
var SELECTOR_DIALOG = '.modal-dialog';
|
||||||
var SELECTOR_MODAL_BODY = '.modal-body';
|
var SELECTOR_MODAL_BODY = '.modal-body';
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]';
|
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
|
||||||
var SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
|
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
|
||||||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
||||||
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
||||||
/**
|
/**
|
||||||
|
|
@ -251,22 +76,17 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Modal = /*#__PURE__*/function (_BaseComponent) {
|
var Modal = /*#__PURE__*/function () {
|
||||||
_inheritsLoose(Modal, _BaseComponent);
|
|
||||||
|
|
||||||
function Modal(element, config) {
|
function Modal(element, config) {
|
||||||
var _this;
|
this._config = this._getConfig(config);
|
||||||
|
this._element = element;
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._dialog = element.querySelector(SELECTOR_DIALOG);
|
||||||
_this._config = _this._getConfig(config);
|
this._backdrop = null;
|
||||||
_this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, element);
|
this._isShown = false;
|
||||||
_this._backdrop = null;
|
this._isBodyOverflowing = false;
|
||||||
_this._isShown = false;
|
this._ignoreBackdropClick = false;
|
||||||
_this._isBodyOverflowing = false;
|
this._isTransitioning = false;
|
||||||
_this._ignoreBackdropClick = false;
|
this._scrollbarWidth = 0;
|
||||||
_this._isTransitioning = false;
|
|
||||||
_this._scrollbarWidth = 0;
|
|
||||||
return _this;
|
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -278,21 +98,22 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.show = function show(relatedTarget) {
|
_proto.show = function show(relatedTarget) {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._isShown || this._isTransitioning) {
|
if (this._isShown || this._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||||
this._isTransitioning = true;
|
this._isTransitioning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
|
var showEvent = $__default['default'].Event(EVENT_SHOW, {
|
||||||
relatedTarget: relatedTarget
|
relatedTarget: relatedTarget
|
||||||
});
|
});
|
||||||
|
$__default['default'](this._element).trigger(showEvent);
|
||||||
|
|
||||||
if (this._isShown || showEvent.defaultPrevented) {
|
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -308,24 +129,24 @@
|
||||||
|
|
||||||
this._setResizeEvent();
|
this._setResizeEvent();
|
||||||
|
|
||||||
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
|
$__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
|
||||||
return _this2.hide(event);
|
return _this.hide(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
|
$__default['default'](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
|
||||||
EventHandler__default['default'].one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) {
|
$__default['default'](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
|
||||||
if (event.target === _this2._element) {
|
if ($__default['default'](event.target).is(_this._element)) {
|
||||||
_this2._ignoreBackdropClick = true;
|
_this._ignoreBackdropClick = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this._showBackdrop(function () {
|
this._showBackdrop(function () {
|
||||||
return _this2._showElement(relatedTarget);
|
return _this._showElement(relatedTarget);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.hide = function hide(event) {
|
_proto.hide = function hide(event) {
|
||||||
var _this3 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -335,15 +156,15 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
|
var hideEvent = $__default['default'].Event(EVENT_HIDE);
|
||||||
|
$__default['default'](this._element).trigger(hideEvent);
|
||||||
|
|
||||||
if (hideEvent.defaultPrevented) {
|
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._isShown = false;
|
this._isShown = false;
|
||||||
|
var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
|
||||||
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
this._isTransitioning = true;
|
this._isTransitioning = true;
|
||||||
|
|
@ -353,19 +174,16 @@
|
||||||
|
|
||||||
this._setResizeEvent();
|
this._setResizeEvent();
|
||||||
|
|
||||||
EventHandler__default['default'].off(document, EVENT_FOCUSIN);
|
$__default['default'](document).off(EVENT_FOCUSIN);
|
||||||
|
$__default['default'](this._element).removeClass(CLASS_NAME_SHOW);
|
||||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
$__default['default'](this._element).off(EVENT_CLICK_DISMISS);
|
||||||
|
$__default['default'](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
|
||||||
EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
|
|
||||||
EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
|
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, function (event) {
|
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function (event) {
|
||||||
return _this3._hideModal(event);
|
return _this2._hideModal(event);
|
||||||
});
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(this._element, transitionDuration);
|
|
||||||
} else {
|
} else {
|
||||||
this._hideModal();
|
this._hideModal();
|
||||||
}
|
}
|
||||||
|
|
@ -373,19 +191,18 @@
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
||||||
return EventHandler__default['default'].off(htmlElement, EVENT_KEY);
|
return $__default['default'](htmlElement).off(EVENT_KEY);
|
||||||
});
|
});
|
||||||
|
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
|
||||||
/**
|
/**
|
||||||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
|
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
|
||||||
* Do not move `document` in `htmlElements` array
|
* Do not move `document` in `htmlElements` array
|
||||||
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$__default['default'](document).off(EVENT_FOCUSIN);
|
||||||
EventHandler__default['default'].off(document, EVENT_FOCUSIN);
|
$__default['default'].removeData(this._element, DATA_KEY);
|
||||||
this._config = null;
|
this._config = null;
|
||||||
|
this._element = null;
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
this._backdrop = null;
|
this._backdrop = null;
|
||||||
this._isShown = null;
|
this._isShown = null;
|
||||||
|
|
@ -402,16 +219,52 @@
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _extends({}, Default, config);
|
config = _extends({}, Default, config);
|
||||||
typeCheckConfig(NAME, config, DefaultType);
|
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
|
||||||
|
var _this3 = this;
|
||||||
|
|
||||||
|
if (this._config.backdrop === 'static') {
|
||||||
|
var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED);
|
||||||
|
$__default['default'](this._element).trigger(hideEventPrevented);
|
||||||
|
|
||||||
|
if (hideEventPrevented.isDefaultPrevented()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||||
|
|
||||||
|
if (!isModalOverflowing) {
|
||||||
|
this._element.style.overflowY = 'hidden';
|
||||||
|
}
|
||||||
|
|
||||||
|
this._element.classList.add(CLASS_NAME_STATIC);
|
||||||
|
|
||||||
|
var modalTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
|
||||||
|
$__default['default'](this._element).off(Util__default['default'].TRANSITION_END);
|
||||||
|
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function () {
|
||||||
|
_this3._element.classList.remove(CLASS_NAME_STATIC);
|
||||||
|
|
||||||
|
if (!isModalOverflowing) {
|
||||||
|
$__default['default'](_this3._element).one(Util__default['default'].TRANSITION_END, function () {
|
||||||
|
_this3._element.style.overflowY = '';
|
||||||
|
}).emulateTransitionEnd(_this3._element, modalTransitionDuration);
|
||||||
|
}
|
||||||
|
}).emulateTransitionEnd(modalTransitionDuration);
|
||||||
|
|
||||||
|
this._element.focus();
|
||||||
|
} else {
|
||||||
|
this.hide();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
_proto._showElement = function _showElement(relatedTarget) {
|
_proto._showElement = function _showElement(relatedTarget) {
|
||||||
var _this4 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
|
||||||
|
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
|
||||||
var modalBody = SelectorEngine__default['default'].findOne(SELECTOR_MODAL_BODY, this._dialog);
|
|
||||||
|
|
||||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||||
// Don't move modal's DOM position
|
// Don't move modal's DOM position
|
||||||
|
|
@ -426,37 +279,38 @@
|
||||||
|
|
||||||
this._element.setAttribute('role', 'dialog');
|
this._element.setAttribute('role', 'dialog');
|
||||||
|
|
||||||
this._element.scrollTop = 0;
|
if ($__default['default'](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
|
||||||
|
|
||||||
if (modalBody) {
|
|
||||||
modalBody.scrollTop = 0;
|
modalBody.scrollTop = 0;
|
||||||
|
} else {
|
||||||
|
this._element.scrollTop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
reflow(this._element);
|
Util__default['default'].reflow(this._element);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_SHOW);
|
$__default['default'](this._element).addClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
if (this._config.focus) {
|
if (this._config.focus) {
|
||||||
this._enforceFocus();
|
this._enforceFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
|
||||||
|
relatedTarget: relatedTarget
|
||||||
|
});
|
||||||
|
|
||||||
var transitionComplete = function transitionComplete() {
|
var transitionComplete = function transitionComplete() {
|
||||||
if (_this4._config.focus) {
|
if (_this4._config.focus) {
|
||||||
_this4._element.focus();
|
_this4._element.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
_this4._isTransitioning = false;
|
_this4._isTransitioning = false;
|
||||||
EventHandler__default['default'].trigger(_this4._element, EVENT_SHOWN, {
|
$__default['default'](_this4._element).trigger(shownEvent);
|
||||||
relatedTarget: relatedTarget
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._dialog);
|
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
|
||||||
EventHandler__default['default'].one(this._dialog, TRANSITION_END, transitionComplete);
|
$__default['default'](this._dialog).one(Util__default['default'].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||||
emulateTransitionEnd(this._dialog, transitionDuration);
|
|
||||||
} else {
|
} else {
|
||||||
transitionComplete();
|
transitionComplete();
|
||||||
}
|
}
|
||||||
|
|
@ -465,10 +319,9 @@
|
||||||
_proto._enforceFocus = function _enforceFocus() {
|
_proto._enforceFocus = function _enforceFocus() {
|
||||||
var _this5 = this;
|
var _this5 = this;
|
||||||
|
|
||||||
EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop
|
$__default['default'](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
|
||||||
|
.on(EVENT_FOCUSIN, function (event) {
|
||||||
EventHandler__default['default'].on(document, EVENT_FOCUSIN, function (event) {
|
if (document !== event.target && _this5._element !== event.target && $__default['default'](_this5._element).has(event.target).length === 0) {
|
||||||
if (document !== event.target && _this5._element !== event.target && !_this5._element.contains(event.target)) {
|
|
||||||
_this5._element.focus();
|
_this5._element.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -478,17 +331,17 @@
|
||||||
var _this6 = this;
|
var _this6 = this;
|
||||||
|
|
||||||
if (this._isShown) {
|
if (this._isShown) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
|
$__default['default'](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
|
||||||
if (_this6._config.keyboard && event.key === ESCAPE_KEY) {
|
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
_this6.hide();
|
_this6.hide();
|
||||||
} else if (!_this6._config.keyboard && event.key === ESCAPE_KEY) {
|
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||||
_this6._triggerBackdropTransition();
|
_this6._triggerBackdropTransition();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else if (!this._isShown) {
|
||||||
EventHandler__default['default'].off(this._element, EVENT_KEYDOWN_DISMISS);
|
$__default['default'](this._element).off(EVENT_KEYDOWN_DISMISS);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -496,11 +349,11 @@
|
||||||
var _this7 = this;
|
var _this7 = this;
|
||||||
|
|
||||||
if (this._isShown) {
|
if (this._isShown) {
|
||||||
EventHandler__default['default'].on(window, EVENT_RESIZE, function () {
|
$__default['default'](window).on(EVENT_RESIZE, function (event) {
|
||||||
return _this7._adjustDialog();
|
return _this7.handleUpdate(event);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
EventHandler__default['default'].off(window, EVENT_RESIZE);
|
$__default['default'](window).off(EVENT_RESIZE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -518,26 +371,27 @@
|
||||||
this._isTransitioning = false;
|
this._isTransitioning = false;
|
||||||
|
|
||||||
this._showBackdrop(function () {
|
this._showBackdrop(function () {
|
||||||
document.body.classList.remove(CLASS_NAME_OPEN);
|
$__default['default'](document.body).removeClass(CLASS_NAME_OPEN);
|
||||||
|
|
||||||
_this8._resetAdjustments();
|
_this8._resetAdjustments();
|
||||||
|
|
||||||
_this8._resetScrollbar();
|
_this8._resetScrollbar();
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(_this8._element, EVENT_HIDDEN);
|
$__default['default'](_this8._element).trigger(EVENT_HIDDEN);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._removeBackdrop = function _removeBackdrop() {
|
_proto._removeBackdrop = function _removeBackdrop() {
|
||||||
this._backdrop.parentNode.removeChild(this._backdrop);
|
if (this._backdrop) {
|
||||||
|
$__default['default'](this._backdrop).remove();
|
||||||
this._backdrop = null;
|
this._backdrop = null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._showBackdrop = function _showBackdrop(callback) {
|
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||||
var _this9 = this;
|
var _this9 = this;
|
||||||
|
|
||||||
var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
var animate = $__default['default'](this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
||||||
|
|
||||||
if (this._isShown && this._config.backdrop) {
|
if (this._isShown && this._config.backdrop) {
|
||||||
this._backdrop = document.createElement('div');
|
this._backdrop = document.createElement('div');
|
||||||
|
|
@ -547,8 +401,8 @@
|
||||||
this._backdrop.classList.add(animate);
|
this._backdrop.classList.add(animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.body.appendChild(this._backdrop);
|
$__default['default'](this._backdrop).appendTo(document.body);
|
||||||
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, function (event) {
|
$__default['default'](this._element).on(EVENT_CLICK_DISMISS, function (event) {
|
||||||
if (_this9._ignoreBackdropClick) {
|
if (_this9._ignoreBackdropClick) {
|
||||||
_this9._ignoreBackdropClick = false;
|
_this9._ignoreBackdropClick = false;
|
||||||
return;
|
return;
|
||||||
|
|
@ -558,94 +412,61 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_this9._config.backdrop === 'static') {
|
_this9._triggerBackdropTransition();
|
||||||
_this9._triggerBackdropTransition();
|
|
||||||
} else {
|
|
||||||
_this9.hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
reflow(this._backdrop);
|
Util__default['default'].reflow(this._backdrop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._backdrop.classList.add(CLASS_NAME_SHOW);
|
$__default['default'](this._backdrop).addClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
|
if (!callback) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!animate) {
|
if (!animate) {
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
var backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
|
||||||
EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callback);
|
$__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||||
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
|
|
||||||
} else if (!this._isShown && this._backdrop) {
|
} else if (!this._isShown && this._backdrop) {
|
||||||
this._backdrop.classList.remove(CLASS_NAME_SHOW);
|
$__default['default'](this._backdrop).removeClass(CLASS_NAME_SHOW);
|
||||||
|
|
||||||
var callbackRemove = function callbackRemove() {
|
var callbackRemove = function callbackRemove() {
|
||||||
_this9._removeBackdrop();
|
_this9._removeBackdrop();
|
||||||
|
|
||||||
callback();
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||||
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
var _backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
|
||||||
|
|
||||||
EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callbackRemove);
|
$__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||||
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
|
|
||||||
} else {
|
} else {
|
||||||
callbackRemove();
|
callbackRemove();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
|
|
||||||
var _this10 = this;
|
|
||||||
|
|
||||||
var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE_PREVENTED);
|
|
||||||
|
|
||||||
if (hideEvent.defaultPrevented) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
|
||||||
|
|
||||||
if (!isModalOverflowing) {
|
|
||||||
this._element.style.overflowY = 'hidden';
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_STATIC);
|
|
||||||
|
|
||||||
var modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
|
|
||||||
EventHandler__default['default'].off(this._element, TRANSITION_END);
|
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, function () {
|
|
||||||
_this10._element.classList.remove(CLASS_NAME_STATIC);
|
|
||||||
|
|
||||||
if (!isModalOverflowing) {
|
|
||||||
EventHandler__default['default'].one(_this10._element, TRANSITION_END, function () {
|
|
||||||
_this10._element.style.overflowY = '';
|
|
||||||
});
|
|
||||||
emulateTransitionEnd(_this10._element, modalTransitionDuration);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
emulateTransitionEnd(this._element, modalTransitionDuration);
|
|
||||||
|
|
||||||
this._element.focus();
|
|
||||||
} // ----------------------------------------------------------------------
|
} // ----------------------------------------------------------------------
|
||||||
// the following methods are used to handle overflowing modals
|
// the following methods are used to handle overflowing modals
|
||||||
|
// todo (fat): these should probably be refactored out of modal.js
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._adjustDialog = function _adjustDialog() {
|
_proto._adjustDialog = function _adjustDialog() {
|
||||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||||
|
|
||||||
if (!this._isBodyOverflowing && isModalOverflowing && !isRTL || this._isBodyOverflowing && !isModalOverflowing && isRTL) {
|
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||||
this._element.style.paddingLeft = this._scrollbarWidth + "px";
|
this._element.style.paddingLeft = this._scrollbarWidth + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isBodyOverflowing && !isModalOverflowing && !isRTL || !this._isBodyOverflowing && isModalOverflowing && isRTL) {
|
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||||
this._element.style.paddingRight = this._scrollbarWidth + "px";
|
this._element.style.paddingRight = this._scrollbarWidth + "px";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -662,63 +483,55 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._setScrollbar = function _setScrollbar() {
|
_proto._setScrollbar = function _setScrollbar() {
|
||||||
var _this11 = this;
|
var _this10 = this;
|
||||||
|
|
||||||
if (this._isBodyOverflowing) {
|
if (this._isBodyOverflowing) {
|
||||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||||
// Adjust fixed content padding
|
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||||
SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
|
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
|
||||||
|
|
||||||
|
$__default['default'](fixedContent).each(function (index, element) {
|
||||||
var actualPadding = element.style.paddingRight;
|
var actualPadding = element.style.paddingRight;
|
||||||
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
|
var calculatedPadding = $__default['default'](element).css('padding-right');
|
||||||
Manipulator__default['default'].setDataAttribute(element, 'padding-right', actualPadding);
|
$__default['default'](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
|
||||||
element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px";
|
|
||||||
}); // Adjust sticky content margin
|
}); // Adjust sticky content margin
|
||||||
|
|
||||||
SelectorEngine__default['default'].find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
|
$__default['default'](stickyContent).each(function (index, element) {
|
||||||
var actualMargin = element.style.marginRight;
|
var actualMargin = element.style.marginRight;
|
||||||
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
|
var calculatedMargin = $__default['default'](element).css('margin-right');
|
||||||
Manipulator__default['default'].setDataAttribute(element, 'margin-right', actualMargin);
|
$__default['default'](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
|
||||||
element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px";
|
|
||||||
}); // Adjust body padding
|
}); // Adjust body padding
|
||||||
|
|
||||||
var actualPadding = document.body.style.paddingRight;
|
var actualPadding = document.body.style.paddingRight;
|
||||||
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
|
var calculatedPadding = $__default['default'](document.body).css('padding-right');
|
||||||
Manipulator__default['default'].setDataAttribute(document.body, 'padding-right', actualPadding);
|
$__default['default'](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
||||||
document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.body.classList.add(CLASS_NAME_OPEN);
|
$__default['default'](document.body).addClass(CLASS_NAME_OPEN);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._resetScrollbar = function _resetScrollbar() {
|
_proto._resetScrollbar = function _resetScrollbar() {
|
||||||
// Restore fixed content padding
|
// Restore fixed content padding
|
||||||
SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
|
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||||
var padding = Manipulator__default['default'].getDataAttribute(element, 'padding-right');
|
$__default['default'](fixedContent).each(function (index, element) {
|
||||||
|
var padding = $__default['default'](element).data('padding-right');
|
||||||
|
$__default['default'](element).removeData('padding-right');
|
||||||
|
element.style.paddingRight = padding ? padding : '';
|
||||||
|
}); // Restore sticky content
|
||||||
|
|
||||||
if (typeof padding !== 'undefined') {
|
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
|
||||||
Manipulator__default['default'].removeDataAttribute(element, 'padding-right');
|
$__default['default'](elements).each(function (index, element) {
|
||||||
element.style.paddingRight = padding;
|
var margin = $__default['default'](element).data('margin-right');
|
||||||
}
|
|
||||||
}); // Restore sticky content and navbar-toggler margin
|
|
||||||
|
|
||||||
SelectorEngine__default['default'].find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
|
|
||||||
var margin = Manipulator__default['default'].getDataAttribute(element, 'margin-right');
|
|
||||||
|
|
||||||
if (typeof margin !== 'undefined') {
|
if (typeof margin !== 'undefined') {
|
||||||
Manipulator__default['default'].removeDataAttribute(element, 'margin-right');
|
$__default['default'](element).css('margin-right', margin).removeData('margin-right');
|
||||||
element.style.marginRight = margin;
|
|
||||||
}
|
}
|
||||||
}); // Restore body padding
|
}); // Restore body padding
|
||||||
|
|
||||||
var padding = Manipulator__default['default'].getDataAttribute(document.body, 'padding-right');
|
var padding = $__default['default'](document.body).data('padding-right');
|
||||||
|
$__default['default'](document.body).removeData('padding-right');
|
||||||
if (typeof padding === 'undefined') {
|
document.body.style.paddingRight = padding ? padding : '';
|
||||||
document.body.style.paddingRight = '';
|
|
||||||
} else {
|
|
||||||
Manipulator__default['default'].removeDataAttribute(document.body, 'padding-right');
|
|
||||||
document.body.style.paddingRight = padding;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
||||||
|
|
@ -732,14 +545,15 @@
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
|
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = Data__default['default'].getData(this, DATA_KEY);
|
var data = $__default['default'](this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(this), typeof config === 'object' && config ? config : {});
|
var _config = _extends({}, Default, $__default['default'](this).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Modal(this, _config);
|
data = new Modal(this, _config);
|
||||||
|
$__default['default'](this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
|
@ -748,24 +562,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
data[config](relatedTarget);
|
data[config](relatedTarget);
|
||||||
|
} else if (_config.show) {
|
||||||
|
data.show(relatedTarget);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Modal, null, [{
|
_createClass(Modal, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Modal;
|
return Modal;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -773,59 +589,50 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||||
var _this12 = this;
|
var _this11 = this;
|
||||||
|
|
||||||
var target = getElementFromSelector(this);
|
var target;
|
||||||
|
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||||
|
|
||||||
|
if (selector) {
|
||||||
|
target = document.querySelector(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = $__default['default'](target).data(DATA_KEY) ? 'toggle' : _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
|
||||||
|
|
||||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
EventHandler__default['default'].one(target, EVENT_SHOW, function (showEvent) {
|
var $target = $__default['default'](target).one(EVENT_SHOW, function (showEvent) {
|
||||||
if (showEvent.defaultPrevented) {
|
if (showEvent.isDefaultPrevented()) {
|
||||||
// only register focus restorer if modal will actually get shown
|
// Only register focus restorer if modal will actually get shown
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventHandler__default['default'].one(target, EVENT_HIDDEN, function () {
|
$target.one(EVENT_HIDDEN, function () {
|
||||||
if (isVisible(_this12)) {
|
if ($__default['default'](_this11).is(':visible')) {
|
||||||
_this12.focus();
|
_this11.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var data = Data__default['default'].getData(target, DATA_KEY);
|
|
||||||
|
|
||||||
if (!data) {
|
Modal._jQueryInterface.call($__default['default'](target), config, this);
|
||||||
var config = _extends({}, Manipulator__default['default'].getDataAttributes(target), Manipulator__default['default'].getDataAttributes(this));
|
|
||||||
|
|
||||||
data = new Modal(target, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
data.show(this);
|
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Modal to jQuery only if jQuery is present
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
$__default['default'].fn[NAME] = Modal._jQueryInterface;
|
||||||
var $ = getjQuery();
|
$__default['default'].fn[NAME].Constructor = Modal;
|
||||||
/* istanbul ignore if */
|
|
||||||
|
|
||||||
if ($) {
|
$__default['default'].fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Modal.jQueryInterface;
|
return Modal._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Modal;
|
};
|
||||||
|
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Modal.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Modal;
|
return Modal;
|
||||||
|
|
||||||
|
|
|
||||||
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue