Compare commits
1436 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 686b88c505 | |||
| 2c38800ea2 | |||
| 22f32415c0 | |||
| acdeaed47d | |||
| c500d201ce | |||
| 395aed8e1c | |||
| 49698e92b6 | |||
| 786208ea15 | |||
| fb4efb49ea | |||
| 9f173aeff3 | |||
| ca22e72411 | |||
| c140347bd2 | |||
| d33a560dd6 | |||
| 9c320df652 | |||
| 02ff387daa | |||
| 9882de8079 | |||
| 4fb01c34d7 | |||
| d6671d8f2d | |||
| 806f64e162 | |||
| 9ca811eed5 | |||
| fc74a0d915 | |||
| d3aa909c92 | |||
| edbcc401c2 | |||
| 7acf586d3e | |||
| b84c9ed489 | |||
| d6a9e785b5 | |||
| 3a61e1ae2f | |||
| b1560e2d18 | |||
| 3a2741507e | |||
| d80a9fc553 | |||
| ffbdb08474 | |||
| e6ce44e5e2 | |||
| f4e6932611 | |||
| 588a029abc | |||
| d2aefa7d94 | |||
| 59943ab868 | |||
| 639fb4f251 | |||
| 7af860d13a | |||
| ac73ced8a9 | |||
| 12b754800c | |||
| 8debdf6ce6 | |||
| 94a5d87e15 | |||
| 9f9e4d04a1 | |||
| 088c727a31 | |||
| 5ad43fec83 | |||
| 8efe4aa9af | |||
| de0047051c | |||
| 99e78ea082 | |||
| c943e438b0 | |||
| 66bd7feed5 | |||
| a1708ec2a3 | |||
| 40fd8350f3 | |||
| ebb0b8c68c | |||
| 723cd8d12b | |||
| c28934cb18 | |||
| 970f3b3a8f | |||
| 11e63c1b36 | |||
| d126c1fe4e | |||
| a9519d6336 | |||
| 69921580fd | |||
| e8a590f253 | |||
| 442df2119b | |||
| 0cc66b4145 | |||
| 6ca54573a9 | |||
| e084588517 | |||
| cf6ab08842 | |||
| 1776197c26 | |||
| 17768d2459 | |||
| 96aa924d37 | |||
| 3b66bbeddc | |||
| ac2b7c0c8e | |||
| c9dd6772e8 | |||
| 43a2a38576 | |||
| 93f1028e82 | |||
| 8b7b234fd1 | |||
| 1a0a0858ef | |||
| 1b2ea5efb1 | |||
| 7e28764e67 | |||
| aee711bfa9 | |||
| 6fa3dfe8d9 | |||
| 7b30cb9b77 | |||
| a656458856 | |||
| cde53a85d1 | |||
| 286f16b92c | |||
| 594e5fd071 | |||
| c4d26a511e | |||
| d963442d0b | |||
| 3d8d0012c8 | |||
| 2a4e97b56c | |||
| b0b9d14446 | |||
| 833125b5fe | |||
| 3575a2b3c8 | |||
| f57ac7231e | |||
| 37dc6e1031 | |||
| 0c731dd24f | |||
| e7604207a1 | |||
| 32d18d199c | |||
| 21a18c1cf5 | |||
| e9f7a1d826 | |||
| e9da984ef4 | |||
| 6061227f77 | |||
| e140ff92ed | |||
| 92a728eae6 | |||
| 5faf41eb48 | |||
| 358d637d1c | |||
| 6824d67beb | |||
| 08742abda3 | |||
| 9a5b4766ae | |||
| 2e92e843bb | |||
| 2277f19a7e | |||
| a9f08e884b | |||
| b5c546e413 | |||
| b274c22d7f | |||
| 2c12dfd1a4 | |||
| 797550d14b | |||
| 7e77926e27 | |||
| c0ba8ac795 | |||
| e8c901e57e | |||
| b1501bf034 | |||
| c682e751bf | |||
| 1f1b147f19 | |||
| 407b4c3606 | |||
| c6288e3170 | |||
| d9063498f9 | |||
| ad518e2097 | |||
| 3935fc04e9 | |||
| 167739baf1 | |||
| db93d17383 | |||
| 57273a520c | |||
| b369e624a2 | |||
| e75f9603d8 | |||
| b1c720d047 | |||
| 340236cbe4 | |||
| c9cd3e4a08 | |||
| 3b06411402 | |||
| e1f320851a | |||
| b45a2ab178 | |||
| e03ef123e2 | |||
| e04bbe99ea | |||
| 5b480fcc80 | |||
| a0dd474bc6 | |||
| a7e1b914ef | |||
| 1b8bf5b56c | |||
| 2df63f4925 | |||
| 95446d5e7a | |||
| 7229b3a6bc | |||
| 0a9627f9a9 | |||
| 943cb8ee29 | |||
| 0cbf988096 | |||
| 468134410d | |||
| bcd3f5a040 | |||
| ad92acde5e | |||
| e271d01606 | |||
| 62626db320 | |||
| d2f07ec9e1 | |||
| 897d2f3877 | |||
| c794c9df2f | |||
| 01d1d6bb0c | |||
| b531bda07c | |||
| bbeda10e37 | |||
| 12a6576f48 | |||
| 46d876314b | |||
| 5d11d5790a | |||
| 7966167cf6 | |||
| ddf39a5092 | |||
| 1eaae4fa1f | |||
| b07b342086 | |||
| 97eb2c1e24 | |||
| 38ec7c4df7 | |||
| de7af5ee07 | |||
| 53eb7d3883 | |||
| ab85aec2a7 | |||
| c26a0cb49c | |||
| 75eb4d521b | |||
| 2f0decdf1f | |||
| e94795562b | |||
| e6829fb7b6 | |||
| fbdacc0e92 | |||
| 86fbe1c2ef | |||
| d59de33fc0 | |||
| 3e7566f2c3 | |||
| a22e2900f9 | |||
| bf06347020 | |||
| 94109cabf4 | |||
| ec3cfae29c | |||
| acd1b562f0 | |||
| ca0a2d278c | |||
| f979307833 | |||
| 2bd3bd842d | |||
| 737b6925ab | |||
| c380aeb751 | |||
| 967e6071ba | |||
| 23aaee8c6f | |||
| 650a7a7b76 | |||
| d1575b6b6b | |||
| f91788548c | |||
| 122c99ebeb | |||
| 515bdd4ce6 | |||
| c33457dc2d | |||
| fb0ad7a93c | |||
| 6f7c8d3caf | |||
| 55f80949f5 | |||
| 79195675b2 | |||
| 345fd1fe4c | |||
| b00da79ab9 | |||
| a9fdecfd26 | |||
| 7de323d66e | |||
| e2770d2f8e | |||
| ee14be248c | |||
| f355bb14b6 | |||
| 70a41c5aef | |||
| db80eb96fa | |||
| 56190d04dd | |||
| b8abded0af | |||
| 89822cfa05 | |||
| 727e09b641 | |||
| 37f2c04c5f | |||
| 9e8d6ba3f8 | |||
| 1f531a6583 | |||
| ee2765076d | |||
| e0b1eff2d3 | |||
| ca5c67364a | |||
| 81404d2e3c | |||
| 3e73039936 | |||
| 85c4788ded | |||
| ed2caa5117 | |||
| 8bee113008 | |||
| df88748eb7 | |||
| 7153c2c3bf | |||
| 9922ef5c16 | |||
| ad75ee191f | |||
| 6d7cb22728 | |||
| 1e8e3e5e12 | |||
| 9d3dc5f0e0 | |||
| c8d68fbec7 | |||
| 06c3c144b6 | |||
| acaa44cc0e | |||
| 7d347a4c72 | |||
| 3300c6267a | |||
| 693ee0d2b0 | |||
| 82ef465b20 | |||
| 72b37fa6ca | |||
| 5a7d31f820 | |||
| ecda8301a5 | |||
| ba858eafe8 | |||
| ea34cc4c1e | |||
| 28cb1ff2b2 | |||
| ac58c25dc8 | |||
| 7ba43e3361 | |||
| 78261846dd | |||
| cb4aff6eac | |||
| 81417a2fc6 | |||
| 1e3672418a | |||
| 88490fe81d | |||
| cab56abd08 | |||
| cbe8ad0bf8 | |||
| f6e2f4c656 | |||
| 85ac2fc35e | |||
| 0408799ae5 | |||
| bb7ada6548 | |||
| d2ed920b15 | |||
| cff2a085bb | |||
| 6558664f4c | |||
| eed27f35cc | |||
| d089a683c8 | |||
| ffb19e925c | |||
| 0f79583b7f | |||
| ed32ee2e78 | |||
| 4fc701f6aa | |||
| 338ca83821 | |||
| b79e55fed4 | |||
| a8883a3b96 | |||
| d2325b65c8 | |||
| 7787f642b9 | |||
| d7f0f1aac9 | |||
| dcd99aa7d1 | |||
| 8547ab149a | |||
| 6b5f055a7d | |||
| 3ff3680d4e | |||
| df4be07a02 | |||
| 8cdb057111 | |||
| f0abe26b98 | |||
| 5c2a50fb9e | |||
| fea6f6987d | |||
| 3ab9323ad2 | |||
| be9a2374c5 | |||
| 11d562d20a | |||
| 5136228368 | |||
| 33d08209f9 | |||
| 3a0fb1f7dc | |||
| ed8fd689e6 | |||
| 9eaeb38ac0 | |||
| 4efc1c462d | |||
| e2afbbfa82 | |||
| 789bcf6ad6 | |||
| febdcefcd7 | |||
| 7dedccfb9a | |||
| e3583115c6 | |||
| 5f932ff734 | |||
| e2efa2b764 | |||
| 33a4e8ff9b | |||
| bb3e5f712a | |||
| 6fdb8e6e68 | |||
| 1004e3e786 | |||
| 8cb60bf043 | |||
| 939beea620 | |||
| bcdd8fbc07 | |||
| 8fe162d67a | |||
| 9a5033d413 | |||
| 7126741ffb | |||
| 5e65b12f1c | |||
| 9f6ccf9d12 | |||
| 64050f43bc | |||
| bfbf265a50 | |||
| 2ac41f0d3e | |||
| cbe26bb764 | |||
| d03dce5d27 | |||
| 83b49aa688 | |||
| 98ba40dc06 | |||
| a85d80c925 | |||
| 4bcac68ec9 | |||
| e8e6d64eb0 | |||
| 1cc1a47646 | |||
| dfa017adc3 | |||
| 05fb3905e6 | |||
| 062002d952 | |||
| e138decdbb | |||
| 053d5d5e93 | |||
| 6663faa3e7 | |||
| 43d866313d | |||
| c48d89cb70 | |||
| 695088ba8f | |||
| 6dfe8e02d7 | |||
| df707cd727 | |||
| a0c2a29a8d | |||
| 1fbafea0fe | |||
| 077ec65a6d | |||
| eccd337818 | |||
| 588cdaffcd | |||
| df748516eb | |||
| a1b5a64fba | |||
| 22a535641b | |||
| 232de79db8 | |||
| fd2f669836 | |||
| e52e0ff463 | |||
| 878d636739 | |||
| d966f7ee5f | |||
| 1221cc6e34 | |||
| 5e68429a48 | |||
| 8414126266 | |||
| e1f5d819c7 | |||
| ed94976ea8 | |||
| dec3ea6a7f | |||
| 9496cb60f3 | |||
| 4448856038 | |||
| 9efaeba35e | |||
| c0aa3a1e1e | |||
| 72230091b6 | |||
| 79dc21b22b | |||
| 5f58b3df2c | |||
| 74afe149c4 | |||
| f761d8e801 | |||
| c0efceb6d5 | |||
| 7ce29d75f3 | |||
| 860b511e03 | |||
| 2add57eeff | |||
| 0ed53ff15b | |||
| b9bc5beb1d | |||
| 863ed22e1a | |||
| e65c75e39f | |||
| 3c6d5c4675 | |||
| e140577dd4 | |||
| 7cbc1c569e | |||
| fe492d8021 | |||
| 2c86fdb254 | |||
| 9adf91221e | |||
| 26d86fce2a | |||
| 98c4598696 | |||
| 8411c37974 | |||
| ec3c6776ff | |||
| acd1c40d50 | |||
| 735bb5996c | |||
| 1ca47aef4f | |||
| fa908c4a1a | |||
| 20406926ed | |||
| 7af4af209c | |||
| 00ff5b83f9 | |||
| a68f73e754 | |||
| c96f6391e8 | |||
| 1871412978 | |||
| 4ccd522a76 | |||
| 64a5987cc0 | |||
| 8f84d4051b | |||
| 1b7e13f2a3 | |||
| 3e5bc4c56d | |||
| 03908ea37a | |||
| 2e150e722a | |||
| 85b12549ec | |||
| 9eccb3a230 | |||
| 25d2eac45b | |||
| c51e9fa4ee | |||
| 0388ee03d9 | |||
| 4a37677dda | |||
| 7fc4037a02 | |||
| 39c11c6b3f | |||
| 81223ee041 | |||
| 0790b8efeb | |||
| a523caab87 | |||
| 27ec3e8690 | |||
| 910d481062 | |||
| 89d90d1f85 | |||
| d9e83671ae | |||
| 018a94c9c1 | |||
| 47aef7b2c6 | |||
| bc3f82863b | |||
| 5017f6b620 | |||
| dffe600b1c | |||
| 9108e303ef | |||
| 13b27f8a09 | |||
| 057f880000 | |||
| 2a05c9e33f | |||
| aff115219e | |||
| d773cafe3d | |||
| 38333feda5 | |||
| cece839fc9 | |||
| 0ca2cf4cca | |||
| 80c291fec3 | |||
| 1e0575ced2 | |||
| 685da5c802 | |||
| a66e5e6643 | |||
| f3692bf517 | |||
| 6e422a742f | |||
| 7aaf688471 | |||
| b035661d93 | |||
| 3da444574b | |||
| 52c5b06f1c | |||
| fef94bf163 | |||
| 8501f2413f | |||
| 4d4400e5ca | |||
| ff39e0bf84 | |||
| 481f7c6a3d | |||
| 3b555aaf61 | |||
| 61b86c1e86 | |||
| e45c92f1d5 | |||
| 51268b700b | |||
| 2a2b0b5abe | |||
| 973876eda6 | |||
| fca5e35d13 | |||
| 5ac9fe8967 | |||
| 66408b6e59 | |||
| 8eb8c97bec | |||
| c05f993451 | |||
| df8f64d195 | |||
| 9daf36fdb7 | |||
| beefc6f530 | |||
| 0327545e6d | |||
| 86a3816855 | |||
| 56e3f088a6 | |||
| cbc7b55b86 | |||
| 67edc4d45d | |||
| 437ce77851 | |||
| 74ed9d92e8 | |||
| c47547cd09 | |||
| 7d8c7c4ba8 | |||
| 14c4a601fe | |||
| 2ab73225f3 | |||
| 0e611a3dcd | |||
| f59ed75ba3 | |||
| cfa874f5b9 | |||
| fcc67da41f | |||
| d79830c4ee | |||
| b982d76ba3 | |||
| 50a4b83a96 | |||
| bcb6bc30e6 | |||
| 9a06b8d888 | |||
| b5b5d8f461 | |||
| 43246bff41 | |||
| 163e1934c2 | |||
| 8abccff7b3 | |||
| d9215ebd5a | |||
| 59c5d7599d | |||
| 7eaf7528fc | |||
| 414314f3cb | |||
| 0cfd8dfddf | |||
| a99c531aa7 | |||
| 50c95d9b5d | |||
| 481540800d | |||
| 9bf33e4c80 | |||
| 40ac139bbe | |||
| ad8fd9e208 | |||
| af4e37631c | |||
| 5e3857fafb | |||
| 178a990cb3 | |||
| b5dcb84112 | |||
| 43b10cbee4 | |||
| 6e8dd76373 | |||
| d438f3fc79 | |||
| 96fbd4951a | |||
| 648bceadd8 | |||
| 90f5dbae1d | |||
| b8ffcdf9a4 | |||
| 9d50c6a18f | |||
| 557e9cfb3c | |||
| d191d57445 | |||
| 9c57f79d6b | |||
| f1e47e24c3 | |||
| 48c8697fed | |||
| b9f6c29459 | |||
| cc44b4479a | |||
| f3e3c4976b | |||
| 8087272f06 | |||
| 737308ae47 | |||
| 2e581510dc | |||
| 90375b5433 | |||
| 1dcd4967cc | |||
| 148421be12 | |||
| d7088cf048 | |||
| 3e8ab644ea | |||
| 139b480b6d | |||
| 8d791f2800 | |||
| daf0c438f1 | |||
| 1d8a3a9597 | |||
| 22062ed9d7 | |||
| cd7e5d1111 | |||
| 6933bd4a1d | |||
| 9aee71776d | |||
| 7a694396c1 | |||
| a9263e38fd | |||
| 7fd6dd9d58 | |||
| f2aeea6927 | |||
| 6f4784c8bb | |||
| e7bedac3db | |||
| ba72645eaf | |||
| f54b83073d | |||
| dc64ff3314 | |||
| 980c5fd728 | |||
| 1bc2d65b29 | |||
| c32209eb8a | |||
| 1238734922 | |||
| e0b4882703 | |||
| f9f7f11bfe | |||
| 4361f4ab63 | |||
| 666b82fdd1 | |||
| bfd83c0a47 | |||
| 0b9cf29f5a | |||
| 6e8ea2722d | |||
| a0811af216 | |||
| 7a60dcf9b0 | |||
| a880a582b7 | |||
| 96ac6068b3 | |||
| 8f94ed8e30 | |||
| cef9b4e2ee | |||
| b493b11c17 | |||
| 1c5613857c | |||
| 3b2aadf2a1 | |||
| f887fc5cec | |||
| 67d70aa03c | |||
| 807d67fe7e | |||
| 532feab38b | |||
| aa95f6d618 | |||
| 3df79f0c4b | |||
| d947ccd515 | |||
| 69b2d6538f | |||
| 25ad8dd55f | |||
| 16068edfc3 | |||
| 874fa88870 | |||
| f7a55a9763 | |||
| fb91ee4d84 | |||
| ef6c13c534 | |||
| 05fb3f219b | |||
| 0fcd32889a | |||
| 770d95ed02 | |||
| 07b726b27e | |||
| 1a4ff0903e | |||
| d182ad1e62 | |||
| 5ef829bd15 | |||
| 3350931585 | |||
| 2e6c9f32bd | |||
| 9a5a60676c | |||
| 58f2e8309c | |||
| b1b8b53f3d | |||
| 5b896b526e | |||
| ada2011dfa | |||
| 71c8578395 | |||
| 071d278934 | |||
| 322ced1565 | |||
| af78de3cdd | |||
| dfc1149597 | |||
| 67bc5cf4d1 | |||
| 430c16dfac | |||
| a79a83e7c4 | |||
| fbb907acc4 | |||
| 5b044604c5 | |||
| 7faca149a3 | |||
| 7a21544a62 | |||
| 4a7b901124 | |||
| 7f999ff588 | |||
| e7ed63a693 | |||
| 45c2a0c3c5 | |||
| c13ec3ea93 | |||
| 030d120d6d | |||
| 954a0b1e6a | |||
| 4e1fb4fe1a | |||
| 5d132671ca | |||
| 3c0a3fc0d6 | |||
| b78e0a62ff | |||
| 1a07feacf5 | |||
| 71daf2ae61 | |||
| e301ebd3c0 | |||
| 46f086ccc0 | |||
| 25c53c4ec4 | |||
| 5638499aba | |||
| 44776c38fe | |||
| 6904afe36b | |||
| 5d1da6377d | |||
| 9ab79ac1fc | |||
| 01ba56303b | |||
| 9c2b9ac74d | |||
| a7945d4501 | |||
| 6dc6813ef5 | |||
| 733ab04bfc | |||
| 0160c5e701 | |||
| c8dab8ed9f | |||
| 9fc4438314 | |||
| 9822f9f3e8 | |||
| 5d9dd3b25e | |||
| c7ce627ca8 | |||
| d5270cb811 | |||
| 27cc792615 | |||
| e2530d38aa | |||
| 7b990eb2f4 | |||
| 8295ad7629 | |||
| 4ba7248308 | |||
| 082d5ef087 | |||
| bd27834198 | |||
| c30abbe112 | |||
| 4387038421 | |||
| 167a93a0f3 | |||
| 5c37724d49 | |||
| 036a40c3dd | |||
| 538f4f10c9 | |||
| b39f704954 | |||
| 31e69475d8 | |||
| 4b021dc666 | |||
| 8f1c4b9a03 | |||
| f153748f52 | |||
| e2f7fe6cf1 | |||
| 3ac97a1e85 | |||
| 1f7cbc2212 | |||
| 74e45ebc07 | |||
| 7b78456be8 | |||
| 3a90a851ce | |||
| 94e20317d0 | |||
| eb183caec1 | |||
| c6cfc23239 | |||
| fa4dd7e9af | |||
| df74efe053 | |||
| a6125b29d4 | |||
| 96c41589d0 | |||
| 16954d67dc | |||
| eb0ccdd5ec | |||
| 75f6b1ef11 | |||
| 25cbe7dd88 | |||
| 486668726a | |||
| 31038b03ba | |||
| 7d2f24ed02 | |||
| fb9ed574ab | |||
| 44ca196534 | |||
| ef03833b69 | |||
| c340897955 | |||
| 4dfcb035cf | |||
| 665e1e56b9 | |||
| b1b7f8ee76 | |||
| dcc2ce3587 | |||
| 4e59997d06 | |||
| 9c784e45f1 | |||
| c26636d56b | |||
| 346be3e7ea | |||
| 043b054480 | |||
| dde55d16a2 | |||
| 815048db24 | |||
| a4340638f4 | |||
| 2e7dfe1db0 | |||
| 5d1efcb4fe | |||
| b6a4fdbd49 | |||
| ac704a57ac | |||
| 1a5b7f4a8e | |||
| 2a6ba75388 | |||
| 9894000b42 | |||
| 76fd85be80 | |||
| 159aac7afe | |||
| 9a78dd385c | |||
| e1833cec72 | |||
| d7203bac3b | |||
| 1dc3901979 | |||
| 37d97c973f | |||
| 0964a88ac8 | |||
| 4de4874e72 | |||
| 1977a661e6 | |||
| 82d8dae7e7 | |||
| a84f7233ea | |||
| 2180daa6f5 | |||
| d5c212bbcb | |||
| ff256ca23c | |||
| cd077cd599 | |||
| 4787347c85 | |||
| a02f771e4b | |||
| 519d299eea | |||
| 0160e56397 | |||
| cd51c2a52d | |||
| 787256cae4 | |||
| 0caed940a5 | |||
| 460ba061cb | |||
| e8eed52271 | |||
| 24b88226eb | |||
| a65d066530 | |||
| db87297afb | |||
| 0b98e6e6db | |||
| 24809f7be7 | |||
| f1f3204610 | |||
| 7b323ffed9 | |||
| 733895ba49 | |||
| d5dfd5f9a4 | |||
| 099860d727 | |||
| eedf568b00 | |||
| 741b08eb65 | |||
| 47b1bc71af | |||
| 54d1b6bef3 | |||
| 36aee3dd49 | |||
| a7e920baff | |||
| bca5b6ab9c | |||
| 2a4d526ce8 | |||
| 52a7f19d72 | |||
| 03ab5a4407 | |||
| bba97a9324 | |||
| cc6f66f72a | |||
| eb849d73cd | |||
| dbeb85cb08 | |||
| 67015b4aa2 | |||
| c9ae98ee38 | |||
| c3fa502d32 | |||
| 1d30e05caf | |||
| 35f9d3cd6c | |||
| cc8ac09d97 | |||
| 8ac5672ac4 | |||
| 54b2f34fd9 | |||
| 258a56b473 | |||
| 972369c997 | |||
| e40b3355f0 | |||
| 04acb679ab | |||
| a28adc7666 | |||
| 504098d664 | |||
| 6b3ee0e5fd | |||
| 81541b955f | |||
| 5ed567f217 | |||
| 8805122f73 | |||
| bfb27a4dce | |||
| 9451648041 | |||
| 9e9e2ed81f | |||
| f2483febb6 | |||
| 08ba61e276 | |||
| ca9731692e | |||
| 9e54d8e120 | |||
| 32b932c959 | |||
| d6ebc60d3d | |||
| c62efc3ef6 | |||
| 639c405c65 | |||
| 4d661120f3 | |||
| b81a23a60d | |||
| 9c7bc1a111 | |||
| 23c3cdbd43 | |||
| 819f922276 | |||
| 2de0cf8479 | |||
| 46912797b2 | |||
| 9ee9b8a1e8 | |||
| b3dfcdc7ed | |||
| 9f4e72d8c1 | |||
| 08e03e37f9 | |||
| 5d58cd13ce | |||
| da9abd4d76 | |||
| e298e42e29 | |||
| 6c0e75d6cf | |||
| 5f41a9a280 | |||
| 7bfcd83b97 | |||
| e0579584c6 | |||
| 874515f2b3 | |||
| 39997874ac | |||
| c8b09f6f42 | |||
| b91ce09405 | |||
| 3b876be652 | |||
| 3251de8d57 | |||
| 6e214b0241 | |||
| f3e84e0268 | |||
| 8d56c19b55 | |||
| 943bef258d | |||
| 1fa337cc20 | |||
| c1ee395f80 | |||
| 104385c508 | |||
| b483f80b9e | |||
| 680efa6a81 | |||
| 78f0e85f22 | |||
| 03063bc64e | |||
| 2a8486962e | |||
| b4e957d360 | |||
| 7327e38b1c | |||
| 64e22b4284 | |||
| 09e6af48d7 | |||
| 4e37fc3ab4 | |||
| b3451ff258 | |||
| 133e0c8c9a | |||
| 577bf8b14d | |||
| 1770691b33 | |||
| 9c54d35797 | |||
| 622c914a3a | |||
| 60559d44a2 | |||
| e1b82f51e2 | |||
| 3d12b541c4 | |||
| 393ddae09b | |||
| 03c9788f7a | |||
| f6a1e2fc89 | |||
| 494713b55a | |||
| de8c65158b | |||
| 707973ebdd | |||
| c306e963e8 | |||
| e41342b4c1 | |||
| b1a4b0ecc4 | |||
| adfd3fbd46 | |||
| 46e8f1a34f | |||
| 0a3aa08b89 | |||
| f2dff864aa | |||
| 6b150855df | |||
| de3a3731bd | |||
| 7e09017790 | |||
| d2a24e09ec | |||
| 04796b8f3a | |||
| 84861ceadb | |||
| 90c5de151b | |||
| 129bb08fc4 | |||
| a9c05ab798 | |||
| 758ee5f0f8 | |||
| 1edba8072d | |||
| fbeed6f1d9 | |||
| 943a074a2b | |||
| 0126d9832b | |||
| e2a93ec094 | |||
| 6e63868500 | |||
| d99ff902f8 | |||
| 49469ca0dc | |||
| 2f549ecda8 | |||
| 713dd82403 | |||
| 9066f9495c | |||
| c5e80ff2af | |||
| c6ac6365e5 | |||
| b6b96c174b | |||
| d6945d5e8f | |||
| 2c9e22ef88 | |||
| cf4ae75eff | |||
| f7fe5d5bca | |||
| eb49bd11c9 | |||
| c6a82fcc6f | |||
| db002902da | |||
| d0affaa2ec | |||
| 88d7d8b822 | |||
| 6cb4ebc048 | |||
| 6f1eb110e7 | |||
| edf7923c8f | |||
| 919b526f17 | |||
| b1f4909287 | |||
| ebfeaa4ad1 | |||
| cc248791b0 | |||
| db692d02d5 | |||
| e2252e0230 | |||
| 4041d70eb5 | |||
| aa3b4c41a4 | |||
| a6460d9727 | |||
| 007ea0d8d0 | |||
| ae249e8f55 | |||
| 8360edc57b | |||
| d06eec372a | |||
| e99625c088 | |||
| ee01dc2340 | |||
| 84cba07246 | |||
| 1d69e6ccfd | |||
| 4ce8eab10c | |||
| 12442a68a4 | |||
| bed2a5edab | |||
| 4db520bedb | |||
| bf57274fb5 | |||
| cad3d1098a | |||
| cd4dc92dd8 | |||
| 18cfe34585 | |||
| c463c261ed | |||
| 2ad135ebb4 | |||
| 19ee63ad25 | |||
| a5cbb5e71a | |||
| b02bae769e | |||
| 1a9b1206c2 | |||
| 327d32ebad | |||
| d9abb8e20d | |||
| 0603522199 | |||
| 68d67c8f16 | |||
| 57e17706a9 | |||
| 4d101491da | |||
| 6885d65578 | |||
| a5e725fa2e | |||
| bfd4c1921d | |||
| 4437248459 | |||
| 0aabaa209d | |||
| 66e9ab3e4d | |||
| 94521206e5 | |||
| 329448ecb7 | |||
| 7b3ec256d5 | |||
| a9c35b3ca8 | |||
| 9cee3c2808 | |||
| f03c10a189 | |||
| b3cf60018c | |||
| 294fcddeac | |||
| 8e26010d06 | |||
| dd383ff27b | |||
| fad5002912 | |||
| 0d15b2bd7e | |||
| 1a9356424c | |||
| 6335fbe224 | |||
| bbbda681cc | |||
| ceddca71a2 | |||
| 361ab8063d | |||
| a92d29a25f | |||
| 4b243de2c0 | |||
| 9a72d5c29e | |||
| 7149b6f0eb | |||
| 3130288ba6 | |||
| cd20ef09f4 | |||
| b749e12c2c | |||
| e0b5b832d1 | |||
| fda35d1499 | |||
| a12466aeff | |||
| 34afe84424 | |||
| 3d8c5b9640 | |||
| ecaefed920 | |||
| 6fc9108a86 | |||
| 2e0a16f461 | |||
| d94148bf50 | |||
| 8c362f0a0a | |||
| 9c75a63bfc | |||
| d2b79d97e7 | |||
| 83058fb34c | |||
| 8468f4a37e | |||
| 2be5f03bfc | |||
| b316235e63 | |||
| 7bce809a63 | |||
| 4ae6a29b12 | |||
| 81af1bf9cc | |||
| a0f3fd2342 | |||
| 8b2b490f9b | |||
| 1ebb8e7d9b | |||
| ca408b176b | |||
| 96ed9f7bf0 | |||
| 09c3a8f893 | |||
| b7a079d808 | |||
| 291bbac519 | |||
| cd21ca074e | |||
| eecd75db00 | |||
| 3100dd3dab | |||
| b016825edd | |||
| 749622f43d | |||
| fb475e90a1 | |||
| 6cdfcdf658 | |||
| dcba526775 | |||
| 144220f0c5 | |||
| 8570d86d79 | |||
| 9131e3e401 | |||
| 13b7416544 | |||
| 472e5fcb36 | |||
| b433a05cbd | |||
| e5beea5973 | |||
| 420efb0bac | |||
| 2ea71a9e78 | |||
| f4e297c878 | |||
| d95d08249c | |||
| 756d4ec91e | |||
| d39aa6f676 | |||
| 21f3375f21 | |||
| c0a64e989a | |||
| b4bf0ab371 | |||
| 18d75e3243 | |||
| ea34b6c5be | |||
| 97edf94c11 | |||
| 855d763ae5 | |||
| 39b88d4293 | |||
| 97e9214edd | |||
| 1c05c1dbf1 | |||
| 172d580db3 | |||
| 3adcf3a954 | |||
| 2f4f15c018 | |||
| 0d1e259ecf | |||
| 94693f899c | |||
| 2494140689 | |||
| fc02932946 | |||
| f4dbffe93a | |||
| e48e498bf4 | |||
| b2ae6a6a94 | |||
| f4cc5d3e41 | |||
| b8aa040aee | |||
| 114a0ee193 | |||
| e101ba4989 | |||
| d7a62b505c | |||
| ebb1eea520 | |||
| a76c13589d | |||
| 201d338dbf | |||
| 93c3be3e0e | |||
| 233f3fb1ce | |||
| e1b5d8471a | |||
| b7b56cb10a | |||
| 85b70cef3c | |||
| c9e650a56f | |||
| 1ac07a66ce | |||
| e916a9bc03 | |||
| 6a59c58480 | |||
| 0ed1618c06 | |||
| 62730d9afd | |||
| 747f0f4c7b | |||
| 891a187059 | |||
| c834895fa0 | |||
| fe6ba2384a | |||
| c8c2074650 | |||
| 08d81c8437 | |||
| 8db74682e4 | |||
| 21f19d0fce | |||
| c3ea8db2f6 | |||
| b65a5cb2c9 | |||
| cd4768aa81 | |||
| 025f69cb20 | |||
| 3521947611 | |||
| 8780d9360a | |||
| 3f27053c44 | |||
| 6bebd2938a | |||
| deac34d7df | |||
| 1cfe18571f | |||
| 2f08484be9 | |||
| 3b06769c2f | |||
| c69326dd6b | |||
| 65446dc7de | |||
| 4ba4cc2e79 | |||
| 967f1ab37a | |||
| 262a24b627 | |||
| 8b59b73a2b | |||
| 88065dfe71 | |||
| b4c4223409 | |||
| 3b73dfc44b | |||
| ae0baff087 | |||
| e7890d1562 | |||
| 0fcb0af131 | |||
| 39e4615763 | |||
| 5a0be01e3e | |||
| 956cbbc6b7 | |||
| 5027a8086a | |||
| b08d2b6adc | |||
| af9d6c3dd3 | |||
| 14e0ef57db | |||
| 5912fdc916 | |||
| fe71808494 | |||
| 1cdba95c50 | |||
| 634344c003 | |||
| 57154a6562 | |||
| 37703a6fc9 | |||
| f6694b7440 | |||
| 28dfa54083 | |||
| 2c5e41a95b | |||
| c0a1cfa075 | |||
| fc38f25287 | |||
| 73c2bfc7a0 | |||
| 38557b2fa1 | |||
| 62b8e84970 | |||
| 99676c7809 | |||
| 4634fd7c1a | |||
| e09f306b6b | |||
| 67bea95df5 | |||
| cc2d55b8f2 | |||
| ebcc3ff9af | |||
| 8bc6692082 | |||
| 3898df1f5a | |||
| 5e6f5d8f38 | |||
| 506282fb9e | |||
| e864f65789 | |||
| b81a3e8b3c | |||
| 9745790514 | |||
| 57edecbfb8 | |||
| 18cf5c02c9 | |||
| 294752ed9e | |||
| 18077460aa | |||
| 34e9c5ee0c | |||
| e4dc6b84b1 | |||
| 9be99c9b34 | |||
| fe09d106dc | |||
| ef98fbdb84 | |||
| d39977271c | |||
| 78c9c8bdd4 | |||
| bce2b5e7ed | |||
| 88e87ca7c9 | |||
| d2f4e2bf97 | |||
| df1c3c0ce8 | |||
| b4f99cb968 | |||
| cc49977038 | |||
| cef69b9a65 | |||
| 6a9fd74a83 | |||
| cdb6504e48 | |||
| 37ec7f6928 | |||
| 39c4ca3970 | |||
| aaf03bdc9e | |||
| 50f97710eb | |||
| d479fd89d0 | |||
| 92c45a19a5 | |||
| fdbc63fb3f | |||
| 9badcf6c41 | |||
| c7a847b6a1 | |||
| 53a3d449fd | |||
| 08bddb8743 | |||
| f5f09d8b0b | |||
| 4b3d2635f3 | |||
| 65f21bbef1 | |||
| 27824ec586 | |||
| f2c63ac729 | |||
| ad62301a5b | |||
| 2fb6ccf951 | |||
| 39fc46fb71 | |||
| ac6eefd227 | |||
| cbabd8ff0d | |||
| f0f75379f6 | |||
| ceffc3a5fd | |||
| 1efcf7a5dc | |||
| 83fc5a3239 | |||
| c5b1919dea | |||
| 0829decce0 | |||
| 2ac2a5a91e | |||
| cafbbdc3b6 | |||
| 1835004b96 | |||
| 8c61254919 | |||
| 543ff4e3e5 | |||
| 1c510ddaec | |||
| 8437be2f33 | |||
| 3283fe1b52 | |||
| 87030c98ac | |||
| d6e0552efe | |||
| cb4cdbf2bb | |||
| 8f97e2dc52 | |||
| 8a79cf894d | |||
| 319de5b309 | |||
| 41fcd13d3e | |||
| fd21354de2 | |||
| 14cb65f702 | |||
| 4c70e96b97 | |||
| 91d07fb26c | |||
| 072622d959 | |||
| b28322469e | |||
| 111024695a | |||
| de1a6e3201 | |||
| c215dc83f0 | |||
| 1ce7960c6c | |||
| 769c8d8246 | |||
| a4a04cd9ec | |||
| 1a41b0ffa6 | |||
| 2d6e086342 | |||
| 552e11a1ab | |||
| 6269d05670 | |||
| 02f80c1616 | |||
| 803088c526 | |||
| 976e825d26 | |||
| 759fe25567 | |||
| d5752a18ab | |||
| 4ea7e11233 | |||
| c805aec770 | |||
| 7694a5a70a | |||
| df3277f14d | |||
| 104308b276 | |||
| 19e86a34af | |||
| fd8a651521 | |||
| 99b2a80db8 | |||
| b7040ad9b4 | |||
| 5db281d7c4 | |||
| 06635be7bd | |||
| a5d7dff164 | |||
| bc012957b5 | |||
| 6b177cc409 | |||
| 473689ce5d | |||
| d806e874b4 | |||
| f1e6e6e4a1 | |||
| 1d4d9f8d89 | |||
| a827934f13 | |||
| 292cb46cb9 | |||
| 438e01b61c | |||
| dda31bbee6 | |||
| e7657c8bc0 | |||
| d102363c9f | |||
| dfab49aab7 | |||
| 45a1954740 | |||
| f5599d0a04 | |||
| a776cc473d | |||
| be2ad67786 | |||
| 4f85850945 | |||
| acf7ca9a68 | |||
| a2594e1d6e | |||
| 57a09376b1 | |||
| 91230dbdf1 | |||
| 0321fbf036 | |||
| ccfd575dfc | |||
| b327c34ce3 | |||
| 336778f463 | |||
| 09c99fe6e7 | |||
| f36890d1cd | |||
| a454ea7cf7 | |||
| 99eff2f58f | |||
| 312f54fa66 | |||
| 0ed44cab2d | |||
| 344dfbb302 | |||
| 280f45c55e | |||
| 952c3d3677 | |||
| 38a4e4bb10 | |||
| 60d826a305 | |||
| 2d0f2feb10 | |||
| 275cd7f91e | |||
| 4ee2ae4ce0 | |||
| 091aa1e9fd | |||
| 5c5b15a077 | |||
| 07e21dbf31 | |||
| 14f53d9baa | |||
| 80dfee9dc1 | |||
| 09a70e3717 | |||
| bff1c3a53d | |||
| b1b5e87d65 | |||
| a86598e4ff | |||
| afc63ec887 | |||
| 105687ac4a | |||
| 0b12f61e3c | |||
| f4877dbf03 | |||
| 91ebb4b3b2 | |||
| 51b0c42778 | |||
| e0738f8207 | |||
| c6c9e322f7 | |||
| efb9a7749f | |||
| f2d33cd86b | |||
| 1752addadf | |||
| 3c3ed3ff05 | |||
| 6672aea5a9 | |||
| d7ecff24d1 | |||
| 940b8da7a9 | |||
| aa3b4d33f8 | |||
| b4a2beb3c2 | |||
| 1f7f876810 | |||
| b0f918982f | |||
| 2017eb9aed | |||
| 5e459e9b52 | |||
| ad0f5f153c | |||
| c2fa74b652 | |||
| 8060528281 | |||
| 42c21e50fc | |||
| dd75ac6c25 | |||
| bcf76ef5f0 | |||
| 15d242d21a | |||
| 08679ac0b5 | |||
| f7c1b1e683 | |||
| a88d58605a | |||
| 837ff0cc11 | |||
| c16532c724 | |||
| 1add6341a7 | |||
| 43eb6b1703 | |||
| 6a3433da9a | |||
| 02e0aa3b60 | |||
| 28ad7a901e | |||
| 913f290e3d | |||
| 46e88fb8f3 | |||
| 35c6b2b12b | |||
| 6a82a2ebe8 | |||
| 6e16720b12 | |||
| 47b4ea084f | |||
| e58b587a72 | |||
| 678da2ead9 | |||
| b1860eca05 | |||
| 142af24018 | |||
| 69e18b9634 | |||
| 04a58887cd | |||
| 5d6e896ebb | |||
| 23ddfa99a3 | |||
| d948a3f9cb | |||
| 850817bb09 | |||
| 89a6380032 | |||
| 1afa67fca8 | |||
| e2fd847032 | |||
| d95d30029f | |||
| 6aa475c82e | |||
| ff1788666f | |||
| 3e05d016cf | |||
| e8827874ad | |||
| d6501970ad | |||
| 89d7384944 | |||
| ac67e04ce0 | |||
| c2b05dd7b5 | |||
| ba9caacaa5 | |||
| e8684b55b8 | |||
| 41f72d3d5f | |||
| faba7e3f64 | |||
| 2fd50f98a5 | |||
| 3ffe3a5d82 | |||
| 1393678f0b | |||
| dd0239d169 | |||
| dce47b5451 | |||
| 5ac1a12625 | |||
| 5bcd6a29cd | |||
| 46c037410b | |||
| 44e6abcba5 | |||
| 8896827bd0 | |||
| 8770b84e84 | |||
| 7626f8b17d | |||
| c8361e2adf | |||
| 19aee321a0 | |||
| d47d29aeaa | |||
| 93f77bc761 | |||
| da5f428b35 | |||
| d5f9107abb | |||
| 428280574b | |||
| 427799d075 | |||
| fdfe1679ba | |||
| 9cbd041f6b | |||
| bc60a22a18 | |||
| f7b55da450 | |||
| 7933ee3282 | |||
| 497518db1a | |||
| 8a37045b79 | |||
| 8affe84c72 | |||
| 5ad2121819 | |||
| 5328d0db0d | |||
| 423e4a3811 | |||
| 7d964650ee | |||
| fee11fd7ae | |||
| 5877306104 | |||
| 68e6de42ec | |||
| 9fda96e197 | |||
| 2b8eebb4b8 | |||
| 089e3334a7 | |||
| 7f7f858cb9 | |||
| 1da5b9f76a | |||
| 7491b14f03 | |||
| 25bba7bd68 | |||
| e58b47cf74 | |||
| 30861cbc6d | |||
| 4b7c058a25 | |||
| 08227506f2 | |||
| 764bab2941 | |||
| f0c6b24bd7 | |||
| fdbb5db919 | |||
| 62277bc58e | |||
| cbd333185e | |||
| 049a500d18 | |||
| c096e0e0da | |||
| 709dcb98dd | |||
| e04a5139ab | |||
| 388d16360a | |||
| 661db08eeb | |||
| 5e068eeda9 | |||
| 57d50b2134 | |||
| 6cfc78f2d9 | |||
| e866b1ae43 | |||
| a2f1d79045 | |||
| 19b836c907 | |||
| c44db783bf | |||
| cf821e1d4d | |||
| 467dd113c5 | |||
| 5dcca44fcf | |||
| 0b726de94e | |||
| 83cea3bafa | |||
| 6b0808354d | |||
| 8010c010e9 | |||
| a1cc9a6e33 | |||
| 096413a994 | |||
| 4510e7e61d | |||
| b4a3b00ac8 | |||
| fe580a8e5a | |||
| 64591b3722 | |||
| 4d6e41dea6 | |||
| 0b719e065c | |||
| 9313446274 | |||
| 2b78078779 | |||
| 7eddee286e | |||
| 0263d1742c | |||
| 9744886519 | |||
| 7f08061eca | |||
| 90261b484c | |||
| 330a29734f | |||
| 2ff8ed5cbf | |||
| ec69de4b7e | |||
| 99c3119c82 | |||
| b5077a1a81 | |||
| 2929bf9619 | |||
| cc6e130fc1 | |||
| 7c1d0a1097 | |||
| bcbea02886 | |||
| 69e4d4f3ac | |||
| 53ca76ebc0 | |||
| 33211eefdf | |||
| 9f9712b98c | |||
| 44f38e4128 | |||
| c5595e5b67 | |||
| aba87279fd | |||
| 47242cd0fe | |||
| 7d7873b6f2 | |||
| 6b5850212e | |||
| b69fa9db95 | |||
| f2f69970eb | |||
| 79144adb12 | |||
| 3e8bc9d9ec | |||
| 3664d14908 | |||
| 4aef395e49 | |||
| 2970d14dd9 | |||
| a3398fffd6 | |||
| 00ca781171 | |||
| 744071040e | |||
| d6560bbc81 | |||
| 0b16c8c6d9 | |||
| 8d34bc136b | |||
| fb465c4745 | |||
| ececf644f4 | |||
| 3a61df51d7 | |||
| e4ec9dfe9c | |||
| 4c87843d2d | |||
| a4f260d0a8 | |||
| 3731f0d271 | |||
| be380572fb | |||
| 4b00aa6c4e | |||
| 68a8af4a36 | |||
| e04f393237 | |||
| abec77a06b | |||
| 28a7abf0f7 | |||
| 25ce91adc0 | |||
| 974193a8da | |||
| f0f846fc00 | |||
| 9baf8537a7 | |||
| ff29c1224c |
+4
-12
@@ -1,20 +1,12 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/env',
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
modules: false,
|
||||
exclude: ['transform-typeof-symbol']
|
||||
bugfixes: true,
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-object-rest-spread'
|
||||
],
|
||||
env: {
|
||||
test: {
|
||||
plugins: [ 'istanbul' ]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
+7
-8
@@ -3,11 +3,10 @@
|
||||
>= 1%
|
||||
last 1 major version
|
||||
not dead
|
||||
Chrome >= 45
|
||||
Firefox >= 38
|
||||
Edge >= 12
|
||||
Explorer >= 10
|
||||
iOS >= 9
|
||||
Safari >= 9
|
||||
Android >= 4.4
|
||||
Opera >= 30
|
||||
Chrome >= 60
|
||||
Firefox >= 60
|
||||
Edge >= 16
|
||||
iOS >= 10
|
||||
Safari >= 10
|
||||
Android >= 6
|
||||
not Explorer <= 11
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.css",
|
||||
"maxSize": "7 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.min.css",
|
||||
"maxSize": "6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.css",
|
||||
"maxSize": "2 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.min.css",
|
||||
"maxSize": "2 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.css",
|
||||
"maxSize": "7 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-utilities.min.css",
|
||||
"maxSize": "6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.css",
|
||||
"maxSize": "24 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.min.css",
|
||||
"maxSize": "21 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.js",
|
||||
"maxSize": "51 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.min.js",
|
||||
"maxSize": "22.5 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.esm.js",
|
||||
"maxSize": "28 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.esm.min.js",
|
||||
"maxSize": "19 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.js",
|
||||
"maxSize": "29 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.min.js",
|
||||
"maxSize": "16 kB"
|
||||
}
|
||||
],
|
||||
"ci": {
|
||||
"trackBranches": [
|
||||
"main",
|
||||
"v4-dev"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,3 @@ indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
**/vendor/
|
||||
/_gh_pages/
|
||||
/js/coverage/
|
||||
/site/static/sw.js
|
||||
/package.js
|
||||
|
||||
+51
-227
@@ -1,233 +1,57 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": ["eslint:recommended"],
|
||||
"extends": [
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:unicorn/recommended",
|
||||
"xo/esnext",
|
||||
"xo/browser"
|
||||
],
|
||||
"rules": {
|
||||
// Possible Errors
|
||||
"no-await-in-loop": "error",
|
||||
"no-extra-parens": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"valid-jsdoc": "error",
|
||||
|
||||
// Best Practices
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-scoped-var": "error",
|
||||
"class-methods-use-this": "off",
|
||||
"complexity": "error",
|
||||
"consistent-return": "error",
|
||||
"curly": "error",
|
||||
"default-case": "error",
|
||||
"dot-location": ["error", "property"],
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": "error",
|
||||
"guard-for-in": "error",
|
||||
"no-alert": "error",
|
||||
"no-caller": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": ["error", {
|
||||
"ignore": [-1, 0, 1],
|
||||
"ignoreArrayIndexes": true
|
||||
}
|
||||
],
|
||||
"no-multi-spaces": ["error", {
|
||||
"ignoreEOLComments": true,
|
||||
"exceptions": {
|
||||
"AssignmentExpression": true,
|
||||
"ArrowFunctionExpression": true,
|
||||
"CallExpression": true,
|
||||
"VariableDeclarator": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-multi-str": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-proto": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "off",
|
||||
"no-with": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"vars-on-top": "error",
|
||||
"wrap-iife": "error",
|
||||
"yoda": "error",
|
||||
|
||||
// Strict Mode
|
||||
"strict": "error",
|
||||
|
||||
// Variables
|
||||
"init-declarations": "off",
|
||||
"no-catch-shadow": "error",
|
||||
"no-label-var": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-use-before-define": "off",
|
||||
|
||||
// Node.js and CommonJS
|
||||
"callback-return": "off",
|
||||
"global-require": "error",
|
||||
"handle-callback-err": "error",
|
||||
"no-mixed-requires": "error",
|
||||
"no-new-require": "error",
|
||||
"no-path-concat": "error",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-sync": "error",
|
||||
|
||||
// Stylistic Issues
|
||||
"array-bracket-spacing": "error",
|
||||
"block-spacing": "error",
|
||||
"brace-style": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": "error",
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"computed-property-spacing": "error",
|
||||
"consistent-this": "error",
|
||||
"eol-last": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": "off",
|
||||
"func-style": ["error", "declaration"],
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"line-comment-position": "off",
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "error",
|
||||
"max-depth": ["error", 10],
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "error",
|
||||
"multiline-ternary": "off",
|
||||
"new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
|
||||
"newline-after-var": "off",
|
||||
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
|
||||
"new-parens": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-continue": "off",
|
||||
"no-inline-comments": "off",
|
||||
"no-lonely-if": "error",
|
||||
"no-mixed-operators": "off",
|
||||
"no-multi-assign": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"nonblock-statement-body-position": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new-object": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-tabs": "error",
|
||||
"no-ternary": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-newline": ["error", { "minProperties": 1 }],
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"object-property-newline": "error",
|
||||
"one-var": ["error", "never"],
|
||||
"one-var-declaration-per-line": "error",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": ["error", "never"],
|
||||
"padding-line-between-statements": "off",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"quotes": ["error", "single"],
|
||||
"require-jsdoc": "off",
|
||||
"semi": ["error", "never"],
|
||||
"semi-spacing": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": ["error", {
|
||||
"anonymous": "always",
|
||||
"named": "never"
|
||||
}],
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": "error",
|
||||
"wrap-regex": "off",
|
||||
|
||||
// ECMAScript 6
|
||||
"arrow-body-style": ["error", "as-needed"],
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"generator-star-spacing": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"rest-spread-spacing": "error",
|
||||
"sort-imports": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"yield-star-spacing": "error"
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"MemberExpression": "off",
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"max-params": [
|
||||
"warn",
|
||||
5
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"new-cap": "off",
|
||||
"no-console": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"prefer-named-capture-group": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/explicit-length-check": "off",
|
||||
"unicorn/import-index": "off",
|
||||
"unicorn/no-fn-reference-in-iterator": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/no-useless-undefined": "off",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-node-remove": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-optional-catch-binding": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-12
@@ -1,18 +1,8 @@
|
||||
# Enforce Unix newlines
|
||||
*.css text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.md text eol=lf
|
||||
*.rb text eol=lf
|
||||
*.scss text eol=lf
|
||||
*.svg text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.yml text eol=lf
|
||||
* text=auto eol=lf
|
||||
|
||||
# Don't diff or textually merge source maps
|
||||
*.map binary
|
||||
*.map binary
|
||||
|
||||
bootstrap.css linguist-vendored=false
|
||||
bootstrap.js linguist-vendored=false
|
||||
|
||||
+17
-23
@@ -19,7 +19,8 @@ and [submitting pull requests](#pull-requests), but please respect the following
|
||||
restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||
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.
|
||||
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
|
||||
[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
|
||||
respect the opinions of others.
|
||||
@@ -57,15 +58,14 @@ Good bug reports are extremely helpful, so thanks!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
0. **Validate and lint your code** — [validate your HTML](https://html5.validator.nu/)
|
||||
and [lint your HTML](https://github.com/twbs/bootlint) 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.
|
||||
|
||||
1. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
latest `master` or development branch in the repository.
|
||||
latest `main` (or `v4-dev` branch if the issue is about v4) in the repository.
|
||||
|
||||
3. **Isolate the problem** — ideally create a [reduced test
|
||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||
@@ -100,7 +100,6 @@ Example:
|
||||
### 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.
|
||||
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 |
|
||||
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
||||
@@ -109,10 +108,6 @@ When feasible, we aim to report such upstream bugs to the relevant browser vendo
|
||||
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. |
|
||||
| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | |
|
||||
|
||||
### Issues bots
|
||||
|
||||
[@twbs-lmvtfy](https://github.com/twbs-lmvtfy) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks for HTML validation errors in live examples (e.g. jsFiddles, JS Bins, Bootplys, Plunks, CodePens, etc.) posted in issue comments. If it finds any errors, it will post a follow-up comment on the issue and point out the errors. If this happens with an example you've posted, please fix the errors and post an updated live example. If you opened a bug report, please check whether the bug still occurs with your revised, valid live example. If the bug no longer occurs, it was probably due to your invalid HTML rather than something in Bootstrap and we'd appreciate it if you could close out the GitHub issue.
|
||||
|
||||
|
||||
## Feature requests
|
||||
|
||||
@@ -139,12 +134,12 @@ project (indentation, accurate comments, etc.) and any other requirements
|
||||
|
||||
**Do not edit `bootstrap.css`, or `bootstrap.js`
|
||||
directly!** Those files are automatically generated. You should edit the
|
||||
source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/master/scss)
|
||||
and/or [`/bootstrap/js/`](https://github.com/twbs/bootstrap/tree/master/js) instead.
|
||||
source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss)
|
||||
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/main/js/src) instead.
|
||||
|
||||
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
||||
documentation source files in
|
||||
[the `/bootstrap/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/docs).
|
||||
[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs).
|
||||
**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.
|
||||
|
||||
@@ -166,8 +161,8 @@ included in the project:
|
||||
2. If you cloned a while ago, get the latest changes from upstream:
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout main
|
||||
git pull upstream main
|
||||
```
|
||||
|
||||
3. Create a new topic branch (off the main project development branch) to
|
||||
@@ -186,7 +181,7 @@ included in the project:
|
||||
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||
|
||||
```bash
|
||||
git pull [--rebase] upstream master
|
||||
git pull [--rebase] upstream main
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
@@ -196,12 +191,12 @@ included in the project:
|
||||
```
|
||||
|
||||
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
|
||||
with a clear title and description against the `master` branch.
|
||||
with a clear title and description against the `main` branch.
|
||||
|
||||
**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
|
||||
includes code changes) and under the terms of the
|
||||
[Creative Commons Attribution 3.0 Unported License](docs/LICENSE)
|
||||
[Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
|
||||
(if it includes documentation changes).
|
||||
|
||||
|
||||
@@ -209,7 +204,7 @@ includes code changes) and under the terms of the
|
||||
|
||||
### HTML
|
||||
|
||||
[Adhere to the Code Guide.](http://codeguide.co/#html)
|
||||
[Adhere to the Code Guide.](https://codeguide.co/#html)
|
||||
|
||||
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
|
||||
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
|
||||
@@ -217,7 +212,7 @@ includes code changes) and under the terms of the
|
||||
|
||||
### CSS
|
||||
|
||||
[Adhere to the Code Guide.](http://codeguide.co/#css)
|
||||
[Adhere to the Code Guide.](https://codeguide.co/#css)
|
||||
|
||||
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
|
||||
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://a11yproject.com/posts/never-remove-css-outlines/) for more details.
|
||||
@@ -228,7 +223,6 @@ includes code changes) and under the terms of the
|
||||
- 2 spaces (no tabs)
|
||||
- strict mode
|
||||
- "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
|
||||
|
||||
@@ -237,7 +231,7 @@ Run `npm run test` before committing to ensure your changes follow our coding st
|
||||
|
||||
## License
|
||||
|
||||
By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
|
||||
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
|
||||
By contributing your code, you agree to license your contribution under the [MIT License](../LICENSE).
|
||||
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/).
|
||||
|
||||
Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
open_collective: bootstrap
|
||||
@@ -1,11 +0,0 @@
|
||||
Before opening:
|
||||
|
||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
|
||||
|
||||
Bug reports must include:
|
||||
|
||||
- Operating system and version (Windows, macOS, Android, iOS, Win10 Mobile)
|
||||
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
|
||||
- [Reduced test case](https://css-tricks.com/reduced-test-cases/) and suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||
@@ -1,17 +1,20 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Tell us about a bug you may have identified in Bootstrap.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before opening:
|
||||
|
||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||
- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
|
||||
- [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)
|
||||
|
||||
Bug reports must include:
|
||||
|
||||
- Operating system and version (Windows, macOS, Android, iOS, Win10 Mobile)
|
||||
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
|
||||
- [Reduced test case](https://css-tricks.com/reduced-test-cases/) and suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||
- Operating system and version (Windows, macOS, Android, iOS)
|
||||
- Browser and version (Chrome, Firefox, Safari, 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/)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
contact_links:
|
||||
- name: Ask a question
|
||||
url: https://github.com/twbs/bootstrap/discussions/new
|
||||
about: Ask and discuss questions with other Bootstrap community members
|
||||
@@ -1,9 +0,0 @@
|
||||
Before opening:
|
||||
|
||||
- [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/master/CONTRIBUTING.md)
|
||||
|
||||
Feature requests must include:
|
||||
|
||||
- As much detail as possible for what we should add and why it's important to Bootstrap
|
||||
- Relevant links to prior art, screenshots, or live demos whenever possible
|
||||
@@ -1,13 +1,16 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for a new feature in Bootstrap.
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Before opening:
|
||||
|
||||
- [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/master/CONTRIBUTING.md)
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
|
||||
Feature requests must include:
|
||||
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ For general troubleshooting or help getting started:
|
||||
|
||||
- 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.
|
||||
- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
|
||||
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
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
|
||||
@@ -0,0 +1,40 @@
|
||||
name-template: 'v$NEXT_MAJOR_VERSION'
|
||||
tag-template: 'v$NEXT_MAJOR_VERSION'
|
||||
prerelease: true
|
||||
exclude-labels:
|
||||
- 'skip-changelog'
|
||||
categories:
|
||||
- title: '🚀 Features'
|
||||
labels:
|
||||
- 'new-feature'
|
||||
- 'feature'
|
||||
- 'enhancement'
|
||||
- title: '🐛 Bug fixes'
|
||||
labels:
|
||||
- 'fix'
|
||||
- 'bugfix'
|
||||
- 'bug'
|
||||
- title: '🎨 CSS'
|
||||
labels:
|
||||
- 'css'
|
||||
- title: '☕️ JavaScript'
|
||||
labels:
|
||||
- 'js'
|
||||
- title: '📖 Docs'
|
||||
labels:
|
||||
- 'docs'
|
||||
- title: '🌎 Accessibility'
|
||||
labels:
|
||||
- 'accessibility'
|
||||
- title: '🧰 Misc'
|
||||
labels:
|
||||
- 'build'
|
||||
- 'meta'
|
||||
- 'chore'
|
||||
- title: '📦 Dependencies'
|
||||
labels:
|
||||
- 'dependencies'
|
||||
change-template: '- #$NUMBER: $TITLE'
|
||||
template: |
|
||||
## Changes
|
||||
$CHANGES
|
||||
@@ -0,0 +1,40 @@
|
||||
name: BrowserStack
|
||||
on: [push]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
browserstack:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'twbs/bootstrap'
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run dist
|
||||
run: npm run dist
|
||||
|
||||
- name: Run BrowserStack tests
|
||||
run: npm run js-test-cloud
|
||||
env:
|
||||
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
|
||||
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
|
||||
@@ -0,0 +1,39 @@
|
||||
name: Bundlewatch
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
bundlewatch:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run dist
|
||||
run: npm run dist
|
||||
|
||||
- name: Run bundlewatch
|
||||
run: npm run bundlewatch
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
CI_BRANCH_BASE: main
|
||||
@@ -0,0 +1,25 @@
|
||||
name: "Code Scanning - Action"
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: javascript
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -0,0 +1,33 @@
|
||||
name: CSS
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
css:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build CSS
|
||||
run: npm run css
|
||||
@@ -0,0 +1,24 @@
|
||||
name: CSS (Dart Sass)
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
css:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Build CSS with Dart Sass
|
||||
run: |
|
||||
npx --package sass@latest sass --version
|
||||
npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/
|
||||
ls -Al dist-sass/css
|
||||
@@ -0,0 +1,35 @@
|
||||
name: Docs
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- run: java -version
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test docs
|
||||
run: npm run docs
|
||||
@@ -0,0 +1,48 @@
|
||||
name: JS Tests
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Node ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [10, 12]
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ matrix.node }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run dist
|
||||
run: npm run js
|
||||
|
||||
- name: Run JS tests
|
||||
run: npm run js-test
|
||||
|
||||
- name: Run Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
if: matrix.node == 12
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
path-to-lcov: "./js/coverage/lcov.info"
|
||||
@@ -0,0 +1,33 @@
|
||||
name: Lint
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.NODE }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
@@ -0,0 +1,14 @@
|
||||
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 }}
|
||||
+8
-2
@@ -1,9 +1,15 @@
|
||||
# Ignore docs files
|
||||
/_gh_pages/
|
||||
/site/.jekyll-metadata
|
||||
# This is the old Jekyll docs dist folder;
|
||||
# keeping it here so that when we switch branches it doesn't show up
|
||||
/site/docs/**/dist/
|
||||
# Jekyll's cache folder; keeping it for the same reason as above
|
||||
/site/.jekyll-cache/
|
||||
# Hugo resources folder
|
||||
/resources/
|
||||
|
||||
# Ignore ruby/bundler files
|
||||
# Ignore ruby/bundler files;
|
||||
# keeping them here so that when we switch branches they don't show up
|
||||
/.bundle/
|
||||
/vendor/
|
||||
/.ruby-version
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
**/dist/
|
||||
**/vendor/
|
||||
/_gh_pages/
|
||||
/js/coverage/
|
||||
|
||||
@@ -10,6 +10,13 @@
|
||||
"border-bottom-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"transition"
|
||||
],
|
||||
"function-blacklist": ["calc"],
|
||||
"scss/dollar-variable-default": [
|
||||
true,
|
||||
{
|
||||
"ignore": "local"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
addons:
|
||||
chrome: stable
|
||||
language: node_js
|
||||
git:
|
||||
depth: 3
|
||||
node_js:
|
||||
- "6"
|
||||
- "8"
|
||||
install:
|
||||
- bundle install --deployment --jobs=3 --retry=3 --clean
|
||||
- npm install
|
||||
before_script:
|
||||
- google-chrome-stable --product-version
|
||||
script:
|
||||
- npm test || travis_terminate 1
|
||||
- if [[ "$TRAVIS_NODE_VERSION" = "8" ]]; then npm run check-broken-links; fi
|
||||
- if [[ "$TRAVIS_NODE_VERSION" = "8" && "$TRAVIS_EVENT_TYPE" = "push" && ! `git log --format=%B --no-merges -n 1 | grep '\[skip browser\]'` ]]; then npm run js-test-cloud; fi
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_NODE_VERSION" = "8" ]]; then npm run coveralls; fi
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
- vendor/bundle
|
||||
notifications:
|
||||
email: false
|
||||
+10
-10
@@ -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:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* 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
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- 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
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'jekyll', '~> 3.8.5'
|
||||
gem 'jekyll-redirect-from', '~> 0.14.0'
|
||||
gem 'jekyll-sitemap', '~> 1.2.0'
|
||||
gem 'jekyll-toc', '~> 0.9.1'
|
||||
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
|
||||
end
|
||||
@@ -1,82 +0,0 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.6.0)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.4)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
eventmachine (1.2.7)
|
||||
eventmachine (1.2.7-x64-mingw32)
|
||||
ffi (1.10.0)
|
||||
ffi (1.10.0-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (3.8.5)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 0.7)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 1.14)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.3.3)
|
||||
pathutil (~> 0.9)
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-redirect-from (0.14.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-sitemap (1.2.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-toc (0.9.1)
|
||||
nokogiri (~> 1.8)
|
||||
jekyll-watch (2.1.2)
|
||||
listen (~> 3.0)
|
||||
kramdown (1.17.0)
|
||||
liquid (4.0.1)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.1)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogiri (1.10.1-x64-mingw32)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (3.0.3)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
rouge (3.3.0)
|
||||
ruby_dep (1.5.0)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.7.3)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
wdm (0.1.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x64-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll (~> 3.8.5)
|
||||
jekyll-redirect-from (~> 0.14.0)
|
||||
jekyll-sitemap (~> 1.2.0)
|
||||
jekyll-toc (~> 0.9.1)
|
||||
wdm (~> 0.1.1)
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.3
|
||||
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2019 Twitter, Inc.
|
||||
Copyright (c) 2011-2019 The Bootstrap Authors
|
||||
Copyright (c) 2011-2020 Twitter, Inc.
|
||||
Copyright (c) 2011-2020 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<a href="https://getbootstrap.com/">
|
||||
<img src="https://getbootstrap.com/docs/4.3/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
|
||||
<a href="https://v5.getbootstrap.com/">
|
||||
<img src="https://v5.getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<p align="center">
|
||||
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
|
||||
<br>
|
||||
<a href="https://getbootstrap.com/docs/4.3/"><strong>Explore Bootstrap docs »</strong></a>
|
||||
<a href="https://v5.getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug.md">Report bug</a>
|
||||
<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=feature.md&labels=feature">Request feature</a>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature_request.md">Request feature</a>
|
||||
·
|
||||
<a href="https://themes.getbootstrap.com/">Themes</a>
|
||||
·
|
||||
@@ -22,6 +22,11 @@
|
||||
</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
|
||||
|
||||
- [Quick start](#quick-start)
|
||||
@@ -41,33 +46,33 @@
|
||||
|
||||
Several quick start options are available:
|
||||
|
||||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.3.1.zip)
|
||||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v5.0.0.zip)
|
||||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.3.1`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.3.1`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@next`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@next`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0`
|
||||
- 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/4.3/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||
Read the [Getting started page](https://v5.getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||
|
||||
|
||||
## Status
|
||||
|
||||
[](https://bootstrap-slack.herokuapp.com/)
|
||||
[](https://travis-ci.org/twbs/bootstrap)
|
||||
[](https://www.npmjs.com/package/bootstrap)
|
||||
[](https://rubygems.org/gems/bootstrap)
|
||||
[](https://atmospherejs.com/twbs/bootstrap)
|
||||
[](https://packagist.org/packages/twbs/bootstrap)
|
||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||
[](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
|
||||
[](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css)
|
||||
[](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js)
|
||||
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
|
||||
[](https://www.npmjs.com/package/bootstrap)
|
||||
[](https://rubygems.org/gems/bootstrap)
|
||||
[](https://atmospherejs.com/twbs/bootstrap)
|
||||
[](https://packagist.org/packages/twbs/bootstrap)
|
||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||
[](https://coveralls.io/github/twbs/bootstrap?branch=main)
|
||||
[](https://github.com/twbs/bootstrap/tree/main/dist/css/bootstrap.min.css)
|
||||
[](https://github.com/twbs/bootstrap/tree/main/dist/js/bootstrap.min.js)
|
||||
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
|
||||
## What's included
|
||||
@@ -86,6 +91,10 @@ bootstrap/
|
||||
│ ├── bootstrap-reboot.css.map
|
||||
│ ├── bootstrap-reboot.min.css
|
||||
│ ├── bootstrap-reboot.min.css.map
|
||||
│ ├── bootstrap-utilities.css
|
||||
│ ├── bootstrap-utilities.css.map
|
||||
│ ├── bootstrap-utilities.min.css
|
||||
│ ├── bootstrap-utilities.min.css.map
|
||||
│ ├── bootstrap.css
|
||||
│ ├── bootstrap.css.map
|
||||
│ ├── bootstrap.min.css
|
||||
@@ -95,54 +104,53 @@ bootstrap/
|
||||
├── 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/), but not [jQuery](https://jquery.com/).
|
||||
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/).
|
||||
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/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/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).
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://v5.getbootstrap.com/>. The docs may also be run locally.
|
||||
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/docs/4.3/assets/js/src/search.js` file.
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/src/search.js` file.
|
||||
|
||||
### Running documentation locally
|
||||
|
||||
1. Run through the [tooling setup](https://getbootstrap.com/docs/4.3/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
|
||||
2. Run `npm install` to install Node.js dependencies.
|
||||
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à.
|
||||
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.
|
||||
3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
|
||||
4. Open `http://localhost:9001/` in your browser, and voilà.
|
||||
|
||||
Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/).
|
||||
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
||||
|
||||
### Documentation for previous releases
|
||||
|
||||
- For v2.3.2: <https://getbootstrap.com/2.3.2/>
|
||||
- For v3.3.x: <https://getbootstrap.com/docs/3.3/>
|
||||
- For v3.4.0: <https://getbootstrap.com/docs/3.4/>
|
||||
- For v4.0.x: <https://getbootstrap.com/docs/4.0/>
|
||||
- For v4.1.x: <https://getbootstrap.com/docs/4.1/>
|
||||
- For v4.2.x: <https://getbootstrap.com/docs/4.2/>
|
||||
You can find all our previous releases docs on <https://v5.getbootstrap.com/docs/versions/>.
|
||||
|
||||
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/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/main/.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/master/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/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).
|
||||
|
||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.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/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
||||
|
||||
|
||||
## Community
|
||||
@@ -153,7 +161,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/).
|
||||
- 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.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
|
||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
|
||||
- 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.
|
||||
|
||||
|
||||
@@ -186,29 +194,29 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
|
||||
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
|
||||
|
||||
[](https://opencollective.com/bootstrap#backers)
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
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/1/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
|
||||
|
||||
[](https://opencollective.com/bootstrap#backers)
|
||||
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Code and documentation copyright 2011-2019 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/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
|
||||
Code and documentation copyright 2011–2020 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/).
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Reporting Security Issues
|
||||
|
||||
The Bootstrap team and community take security issues in Bootstrap seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
||||
|
||||
To report a security issue, email [security@getbootstrap.com](mailto:security@getbootstrap.com) and include the word "SECURITY" in the subject line.
|
||||
|
||||
We'll endeavor to respond quickly, and will keep you updated throughout the process.
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
# Dependencies
|
||||
markdown: kramdown
|
||||
highlighter: rouge
|
||||
|
||||
kramdown:
|
||||
auto_ids: true
|
||||
|
||||
# Permalinks
|
||||
permalink: pretty
|
||||
|
||||
# Server
|
||||
source: "site"
|
||||
destination: ./_gh_pages
|
||||
host: "localhost"
|
||||
port: 9001
|
||||
baseurl: ""
|
||||
url: "https://getbootstrap.com"
|
||||
encoding: UTF-8
|
||||
exclude:
|
||||
- docs/4.3/assets/scss/
|
||||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-sitemap
|
||||
- jekyll-toc
|
||||
|
||||
# Social
|
||||
title: Bootstrap
|
||||
description: "The most popular HTML, CSS, and JS library in the world."
|
||||
twitter: getbootstrap
|
||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||
social_image_path: /docs/4.3/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/4.3/assets/brand/bootstrap-social-logo.png
|
||||
|
||||
# Custom variables
|
||||
current_version: 4.3.1
|
||||
current_ruby_version: 4.3.1
|
||||
docs_version: 4.3
|
||||
repo: "https://github.com/twbs/bootstrap"
|
||||
slack: "https://bootstrap-slack.herokuapp.com"
|
||||
opencollective: "https://opencollective.com/bootstrap"
|
||||
blog: "https://blog.getbootstrap.com"
|
||||
expo: "https://expo.getbootstrap.com"
|
||||
themes: "https://themes.getbootstrap.com"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v4.3.1.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v4.3.1/bootstrap-4.3.1-dist.zip"
|
||||
|
||||
cdn:
|
||||
# See https://www.srihash.org for info on how to generate the hashes
|
||||
css: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||
css_hash: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
||||
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||
js_hash: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
|
||||
jquery: "https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
||||
jquery_hash: "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
||||
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
||||
popper_hash: "sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
||||
|
||||
toc:
|
||||
min_level: 2
|
||||
max_level: 4
|
||||
no_toc_section_class:
|
||||
- "bd-callout"
|
||||
- "bd-example"
|
||||
@@ -8,13 +8,7 @@
|
||||
},
|
||||
"extends": "../.eslintrc.json",
|
||||
"rules": {
|
||||
"consistent-return": "off",
|
||||
"func-style": "off",
|
||||
"no-console": "off",
|
||||
"no-magic-numbers": "off",
|
||||
"no-process-env": "off",
|
||||
"no-process-exit": "off",
|
||||
"no-sync": "off",
|
||||
"spaced-comment": "off"
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ function getBanner(pluginFilename) {
|
||||
return `/*!
|
||||
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2011-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/`
|
||||
}
|
||||
|
||||
|
||||
+152
-49
@@ -1,31 +1,33 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/*!
|
||||
* Script to build our plugins to use them separately.
|
||||
* Copyright 2019 The Bootstrap Authors
|
||||
* Copyright 2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Copyright 2020 The Bootstrap Authors
|
||||
* Copyright 2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const rollup = require('rollup')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const banner = require('./banner.js')
|
||||
const path = require('path')
|
||||
const rollup = require('rollup')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const banner = require('./banner.js')
|
||||
|
||||
const TEST = process.env.NODE_ENV === 'test'
|
||||
const plugins = [
|
||||
babel({
|
||||
exclude: 'node_modules/**', // Only transpile our source code
|
||||
externalHelpersWhitelist: [ // Include only required helpers
|
||||
'defineProperties',
|
||||
'createClass',
|
||||
'inheritsLoose',
|
||||
'defineProperty',
|
||||
'objectSpread'
|
||||
]
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Inline the required helpers in each file
|
||||
babelHelpers: 'inline'
|
||||
})
|
||||
]
|
||||
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'),
|
||||
Polyfill: path.resolve(__dirname, '../js/src/dom/polyfill.js'),
|
||||
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
||||
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
||||
Button: path.resolve(__dirname, '../js/src/button.js'),
|
||||
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
||||
@@ -36,50 +38,151 @@ const bsPlugins = {
|
||||
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
|
||||
Tab: path.resolve(__dirname, '../js/src/tab.js'),
|
||||
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
||||
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'),
|
||||
Util: path.resolve(__dirname, '../js/src/util.js')
|
||||
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
|
||||
}
|
||||
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'
|
||||
const rootPath = path.resolve(__dirname, '../js/dist/')
|
||||
|
||||
function build(plugin) {
|
||||
const defaultPluginConfig = {
|
||||
external: [
|
||||
bsPlugins.Data,
|
||||
bsPlugins.EventHandler,
|
||||
bsPlugins.SelectorEngine
|
||||
],
|
||||
globals: {
|
||||
[bsPlugins.Data]: 'Data',
|
||||
[bsPlugins.EventHandler]: 'EventHandler',
|
||||
[bsPlugins.SelectorEngine]: 'SelectorEngine'
|
||||
}
|
||||
}
|
||||
|
||||
const getConfigByPluginKey = pluginKey => {
|
||||
if (
|
||||
pluginKey === 'Data' ||
|
||||
pluginKey === 'Manipulator' ||
|
||||
pluginKey === 'EventHandler' ||
|
||||
pluginKey === 'Polyfill' ||
|
||||
pluginKey === 'SelectorEngine' ||
|
||||
pluginKey === 'Util' ||
|
||||
pluginKey === 'Sanitizer'
|
||||
) {
|
||||
return {
|
||||
external: [bsPlugins.Polyfill],
|
||||
globals: {
|
||||
[bsPlugins.Polyfill]: 'Polyfill'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginKey === 'Alert' || pluginKey === 'Tab') {
|
||||
return defaultPluginConfig
|
||||
}
|
||||
|
||||
if (
|
||||
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, 'popper.js')
|
||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
||||
config.globals['popper.js'] = '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.EventHandler,
|
||||
bsPlugins.Manipulator
|
||||
],
|
||||
globals: {
|
||||
[bsPlugins.Data]: 'Data',
|
||||
[bsPlugins.EventHandler]: 'EventHandler',
|
||||
[bsPlugins.Manipulator]: 'Manipulator'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const utilObjects = [
|
||||
'Util',
|
||||
'Sanitizer'
|
||||
]
|
||||
|
||||
const domObjects = [
|
||||
'Data',
|
||||
'EventHandler',
|
||||
'Manipulator',
|
||||
'Polyfill',
|
||||
'SelectorEngine'
|
||||
]
|
||||
|
||||
const build = async plugin => {
|
||||
console.log(`Building ${plugin} plugin...`)
|
||||
|
||||
const external = ['jquery', 'popper.js']
|
||||
const globals = {
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
'popper.js': 'Popper'
|
||||
const { external, globals } = getConfigByPluginKey(plugin)
|
||||
const pluginFilename = path.basename(bsPlugins[plugin])
|
||||
let pluginPath = rootPath
|
||||
|
||||
if (utilObjects.includes(plugin)) {
|
||||
pluginPath = `${rootPath}/util/`
|
||||
}
|
||||
|
||||
// Do not bundle Util in plugins
|
||||
if (plugin !== 'Util') {
|
||||
external.push(bsPlugins.Util)
|
||||
globals[bsPlugins.Util] = 'Util'
|
||||
if (domObjects.includes(plugin)) {
|
||||
pluginPath = `${rootPath}/dom/`
|
||||
}
|
||||
|
||||
// Do not bundle Tooltip in Popover
|
||||
if (plugin === 'Popover') {
|
||||
external.push(bsPlugins.Tooltip)
|
||||
globals[bsPlugins.Tooltip] = 'Tooltip'
|
||||
}
|
||||
|
||||
const pluginFilename = `${plugin.toLowerCase()}.js`
|
||||
|
||||
rollup.rollup({
|
||||
const bundle = await rollup.rollup({
|
||||
input: bsPlugins[plugin],
|
||||
plugins,
|
||||
external
|
||||
}).then((bundle) => {
|
||||
bundle.write({
|
||||
banner: banner(pluginFilename),
|
||||
format: 'umd',
|
||||
name: plugin,
|
||||
sourcemap: true,
|
||||
globals,
|
||||
file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
|
||||
})
|
||||
.then(() => console.log(`Building ${plugin} plugin... Done!`))
|
||||
.catch((err) => console.error(`${plugin}: ${err}`))
|
||||
})
|
||||
|
||||
await bundle.write({
|
||||
banner: banner(pluginFilename),
|
||||
format: 'umd',
|
||||
name: plugin,
|
||||
sourcemap: true,
|
||||
globals,
|
||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
||||
})
|
||||
|
||||
console.log(`Building ${plugin} plugin... Done!`)
|
||||
}
|
||||
|
||||
Object.keys(bsPlugins).forEach((plugin) => build(plugin))
|
||||
const main = async () => {
|
||||
try {
|
||||
await Promise.all(Object.keys(bsPlugins).map(plugin => build(plugin)))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Executable → Regular
+26
-18
@@ -2,9 +2,9 @@
|
||||
|
||||
/*!
|
||||
* Script to update version number references in the project.
|
||||
* Copyright 2017-2019 The Bootstrap Authors
|
||||
* Copyright 2017-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
@@ -17,11 +17,11 @@ sh.config.fatal = true
|
||||
|
||||
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
|
||||
function regExpQuote(string) {
|
||||
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
|
||||
}
|
||||
|
||||
function regExpQuoteReplacement(string) {
|
||||
return string.replace(/[$]/g, '$$')
|
||||
return string.replace(/\$/g, '$$')
|
||||
}
|
||||
|
||||
const DRY_RUN = false
|
||||
@@ -30,18 +30,21 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
|
||||
if (excludedDirectories.has(path.parse(directory).base)) {
|
||||
return
|
||||
}
|
||||
|
||||
fs.readdir(directory, (err, names) => {
|
||||
if (err) {
|
||||
errback(err)
|
||||
return
|
||||
}
|
||||
names.forEach((name) => {
|
||||
|
||||
names.forEach(name => {
|
||||
const filepath = path.join(directory, name)
|
||||
fs.lstat(filepath, (err, stats) => {
|
||||
if (err) {
|
||||
process.nextTick(errback, err)
|
||||
return
|
||||
}
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
|
||||
} else if (stats.isFile()) {
|
||||
@@ -55,18 +58,21 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
|
||||
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
|
||||
original = new RegExp(regExpQuote(original), 'g')
|
||||
replacement = regExpQuoteReplacement(replacement)
|
||||
const updateFile = DRY_RUN ? (filepath) => {
|
||||
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
||||
console.log(`FILE: ${filepath}`)
|
||||
} else {
|
||||
console.log(`EXCLUDED:${filepath}`)
|
||||
const updateFile = DRY_RUN ?
|
||||
filepath => {
|
||||
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
||||
console.log(`FILE: ${filepath}`)
|
||||
} else {
|
||||
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(err)
|
||||
process.exit(1)
|
||||
@@ -79,15 +85,17 @@ function main(args) {
|
||||
console.error('Got arguments:', args)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const oldVersion = args[0]
|
||||
const newVersion = args[1]
|
||||
const EXCLUDED_DIRS = new Set([
|
||||
'.git',
|
||||
'_gh_pages',
|
||||
'node_modules',
|
||||
'vendor'
|
||||
])
|
||||
const INCLUDED_EXTENSIONS = new Set([
|
||||
// This extension whitelist is how we avoid modifying binary files
|
||||
// This extension allowlist is how we avoid modifying binary files
|
||||
'',
|
||||
'.css',
|
||||
'.html',
|
||||
|
||||
+6
-12
@@ -5,9 +5,9 @@
|
||||
* Remember to use the same vendor files as the CDN ones,
|
||||
* otherwise the hashes won't match!
|
||||
*
|
||||
* Copyright 2017-2019 The Bootstrap Authors
|
||||
* Copyright 2017-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
@@ -17,15 +17,13 @@ const fs = require('fs')
|
||||
const path = require('path')
|
||||
const sh = require('shelljs')
|
||||
|
||||
const pkg = require('../package.json')
|
||||
|
||||
sh.config.fatal = true
|
||||
|
||||
const configFile = path.join(__dirname, '../_config.yml')
|
||||
const configFile = path.join(__dirname, '../config.yml')
|
||||
|
||||
// Array of objects which holds the files to generate SRI hashes for.
|
||||
// `file` is the path from the root folder
|
||||
// `configPropertyName` is the _config.yml variable's name of the file
|
||||
// `configPropertyName` is the config.yml variable's name of the file
|
||||
const files = [
|
||||
{
|
||||
file: 'dist/css/bootstrap.min.css',
|
||||
@@ -39,17 +37,13 @@ const files = [
|
||||
file: 'dist/js/bootstrap.bundle.min.js',
|
||||
configPropertyName: 'js_bundle_hash'
|
||||
},
|
||||
{
|
||||
file: `site/docs/${pkg.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'
|
||||
}
|
||||
]
|
||||
|
||||
files.forEach((file) => {
|
||||
files.forEach(file => {
|
||||
fs.readFile(file.file, 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
throw err
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
map: ctx.file.dirname.includes('examples') ? false : {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
module.exports = ctx => ({
|
||||
map: ctx.file.dirname.includes('examples') ?
|
||||
false :
|
||||
{
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
|
||||
+24
-23
@@ -1,48 +1,49 @@
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const resolve = require('rollup-plugin-node-resolve')
|
||||
const banner = require('./banner.js')
|
||||
const path = require('path')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const resolve = require('@rollup/plugin-node-resolve')
|
||||
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.js'
|
||||
const external = ['jquery', 'popper.js']
|
||||
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
||||
const external = ['popper.js']
|
||||
const plugins = [
|
||||
babel({
|
||||
exclude: 'node_modules/**', // Only transpile our source code
|
||||
externalHelpersWhitelist: [ // Include only required helpers
|
||||
'defineProperties',
|
||||
'createClass',
|
||||
'inheritsLoose',
|
||||
'defineProperty',
|
||||
'objectSpread'
|
||||
]
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in the bundle, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
]
|
||||
const globals = {
|
||||
jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
|
||||
'popper.js': 'Popper'
|
||||
}
|
||||
|
||||
if (BUNDLE) {
|
||||
fileDest = 'bootstrap.bundle.js'
|
||||
fileDest += '.bundle'
|
||||
// Remove last entry in external array to bundle Popper
|
||||
external.pop()
|
||||
delete globals['popper.js']
|
||||
plugins.push(resolve())
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
input: path.resolve(__dirname, '../js/src/index.js'),
|
||||
const rollupConfig = {
|
||||
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
|
||||
output: {
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
|
||||
format: 'umd',
|
||||
globals,
|
||||
name: 'bootstrap'
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
||||
format: ESM ? 'esm' : 'umd',
|
||||
globals
|
||||
},
|
||||
external,
|
||||
plugins
|
||||
}
|
||||
|
||||
if (!ESM) {
|
||||
rollupConfig.output.name = 'bootstrap'
|
||||
}
|
||||
|
||||
module.exports = rollupConfig
|
||||
|
||||
Executable → Regular
+20
-17
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
# Usage
|
||||
# ---------------
|
||||
@@ -18,35 +21,35 @@ end=$'\e[0m'
|
||||
current_version=$(node -p "require('./package.json').version")
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" $red $end
|
||||
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" "$red" "$end"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Pulling latest changes, just to be sure
|
||||
printf "\n%s=======================================================%s" $magenta $end
|
||||
printf "\n%sPulling latest changes...%s" $magenta $end
|
||||
printf "\n%s=======================================================\n\n%s" $magenta $end
|
||||
git pull origin v4-dev
|
||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||
printf "\n%sPulling latest changes...%s" "$magenta" "$end"
|
||||
printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
|
||||
git pull origin main
|
||||
|
||||
# Update version number
|
||||
printf "\n%s=======================================================%s" $magenta $end
|
||||
printf "\n%sUpdating version number...%s" $magenta $end
|
||||
printf "\n%s=======================================================\n%s" $magenta $end
|
||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||
printf "\n%sUpdating version number...%s" "$magenta" "$end"
|
||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
||||
npm run release-version "$current_version" "$1"
|
||||
|
||||
# Build release
|
||||
printf "\n%s=======================================================%s" $magenta $end
|
||||
printf "\n%sBuilding release...%s" $magenta $end
|
||||
printf "\n%s=======================================================\n%s" $magenta $end
|
||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||
printf "\n%sBuilding release...%s" "$magenta" "$end"
|
||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
||||
npm run release
|
||||
|
||||
# Copy the contents of the built docs site over to `bs-docs` repo
|
||||
printf "\n%s=======================================================%s" $magenta $end
|
||||
printf "\n%sCopy it over...%s" $magenta $end
|
||||
printf "\n%s=======================================================\n%s" $magenta $end
|
||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
||||
printf "\n%sCopy it over...%s" "$magenta" "$end"
|
||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
||||
cp -rf _gh_pages/. ../bs-docs/
|
||||
printf "\nDone!\n"
|
||||
|
||||
printf "\n%s=======================================================%s" $green $end
|
||||
printf "\n%sSuccess, $1 is ready to review and publish.%s" $green $end
|
||||
printf "\n%s=======================================================\n\n%s" $green $end
|
||||
printf "\n%s=======================================================%s" "$green" "$end"
|
||||
printf "\n%sSuccess, $1 is ready to review and publish.%s" "$green" "$end"
|
||||
printf "\n%s=======================================================\n\n%s" "$green" "$end"
|
||||
|
||||
+6
-4
@@ -15,10 +15,9 @@ js2svg:
|
||||
indent: 2
|
||||
|
||||
plugins:
|
||||
# remove this with IE 11 is no longer supported
|
||||
- addAttributesToSVGElement:
|
||||
attributes:
|
||||
- focusable: false
|
||||
# - addAttributesToSVGElement:
|
||||
# attributes:
|
||||
# - focusable: false
|
||||
- cleanupAttrs: true
|
||||
- cleanupEnableBackground: true
|
||||
- cleanupIDs: true
|
||||
@@ -35,6 +34,9 @@ plugins:
|
||||
- minifyStyles: true
|
||||
- moveElemsAttrsToGroup: true
|
||||
- moveGroupAttrsToElems: true
|
||||
- removeAttrs:
|
||||
attrs:
|
||||
- "data-name"
|
||||
- removeComments: true
|
||||
- removeDesc: true
|
||||
- removeDoctype: true
|
||||
|
||||
+11
-10
@@ -2,9 +2,9 @@
|
||||
|
||||
/*!
|
||||
* Script to run vnu-jar if Java is available.
|
||||
* Copyright 2017-2019 The Bootstrap Authors
|
||||
* Copyright 2017-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
@@ -18,7 +18,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
return
|
||||
}
|
||||
|
||||
const is32bitJava = !stderr.match(/64-Bit/)
|
||||
const is32bitJava = !/64-Bit/.test(stderr)
|
||||
|
||||
// vnu-jar accepts multiple ignores joined with a `|`.
|
||||
// Also note that the ignores are regular expressions.
|
||||
@@ -33,12 +33,11 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
// Content → Reboot uses various date/time inputs as a visual example.
|
||||
// Documentation does not rely on them being usable.
|
||||
'The “date” input type is not supported in all browsers.*',
|
||||
'The “time” input type is not supported in all browsers.*',
|
||||
// IE11 doesn't recognise <main> / give the element an implicit "main" landmark.
|
||||
// Explicit role="main" is redundant for other modern browsers, but still valid.
|
||||
'The “main” role is unnecessary for element “main”.',
|
||||
// Ignore the wrong lanuage code warnings for now; they happen randomly.
|
||||
'This document appears to be written in.*'
|
||||
'The “week” input type is not supported in all browsers.*',
|
||||
'The “month” input type is not supported in all browsers.*',
|
||||
'The “color” input type is not supported in all browsers.*',
|
||||
'The “datetime-local” input type is not supported in all browsers.*',
|
||||
'The “time” input type is not supported in all browsers.*'
|
||||
].join('|')
|
||||
|
||||
const args = [
|
||||
@@ -46,6 +45,8 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
vnu,
|
||||
'--asciiquotes',
|
||||
'--skip-non-html',
|
||||
// Ignore the language code warnings
|
||||
'--no-langdetect',
|
||||
'--Werror',
|
||||
`--filterpattern "${ignores}"`,
|
||||
'_gh_pages/',
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/*!
|
||||
* Script to create the built examples zip archive;
|
||||
* requires the `zip` command to be present!
|
||||
* Copyright 2020 The Bootstrap Authors
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const sh = require('shelljs')
|
||||
|
||||
const { version, version_short: versionShort } = require('../package.json')
|
||||
|
||||
const folderName = `bootstrap-${version}-examples`
|
||||
|
||||
sh.config.fatal = true
|
||||
|
||||
if (!sh.test('-d', '_gh_pages')) {
|
||||
throw new Error('The "_gh_pages" folder does not exist, did you forget building the docs?')
|
||||
}
|
||||
|
||||
// switch to the root dir
|
||||
sh.cd(path.join(__dirname, '..'))
|
||||
|
||||
// remove any previously created folder with the same name
|
||||
sh.rm('-rf', folderName)
|
||||
// create any folders so that `cp` works
|
||||
sh.mkdir('-p', folderName)
|
||||
sh.mkdir('-p', `${folderName}/assets/brand/`)
|
||||
|
||||
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/examples/*`, folderName)
|
||||
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/dist/`, `${folderName}/assets/`)
|
||||
// also copy the two brand images we use in the examples
|
||||
sh.cp('-f', [
|
||||
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-outline.svg`,
|
||||
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-solid.svg`
|
||||
], `${folderName}/assets/brand/`)
|
||||
sh.rm(`${folderName}/index.html`)
|
||||
|
||||
// get all examples' HTML files
|
||||
sh.find(`${folderName}/**/*.html`).forEach(file => {
|
||||
const fileContents = sh.cat(file)
|
||||
.toString()
|
||||
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
||||
.replace(/"..\/dist\//g, '"../assets/dist/')
|
||||
.replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>')
|
||||
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
|
||||
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
|
||||
new sh.ShellString(fileContents).to(file)
|
||||
})
|
||||
|
||||
// create the zip file
|
||||
sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, { fatal: true })
|
||||
|
||||
// remove the folder we created
|
||||
sh.rm('-rf', folderName)
|
||||
@@ -26,11 +26,6 @@
|
||||
"issues": "https://github.com/twbs/bootstrap/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3.x-dev"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"twitter/bootstrap": "self.version"
|
||||
}
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
languageCode: "en"
|
||||
title: "Bootstrap"
|
||||
baseURL: "https://v5.getbootstrap.com"
|
||||
enableInlineShortcodes: true
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
renderer:
|
||||
unsafe: true
|
||||
highlight:
|
||||
noClasses: false
|
||||
tableOfContents:
|
||||
startLevel: 2
|
||||
endLevel: 6
|
||||
|
||||
buildDrafts: true
|
||||
buildFuture: true
|
||||
|
||||
enableRobotsTXT: true
|
||||
metaDataFormat: "yaml"
|
||||
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
||||
|
||||
publishDir: "_gh_pages"
|
||||
|
||||
module:
|
||||
mounts:
|
||||
- source: dist
|
||||
target: static/docs/5.0/dist
|
||||
- source: site/assets
|
||||
target: assets
|
||||
- source: site/content
|
||||
target: content
|
||||
- source: site/data
|
||||
target: data
|
||||
- source: site/layouts
|
||||
target: layouts
|
||||
- source: site/static
|
||||
target: static
|
||||
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
|
||||
target: static/apple-touch-icon.png
|
||||
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico
|
||||
target: static/favicon.ico
|
||||
|
||||
params:
|
||||
description: "The most popular HTML, CSS, and JS library in the world."
|
||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
|
||||
|
||||
current_version: "5.0.0-alpha1"
|
||||
current_ruby_version: "5.0.0-alpha1"
|
||||
docs_version: "5.0"
|
||||
rfs_version: "9.0.2"
|
||||
github_org: "https://github.com/twbs"
|
||||
repo: "https://github.com/twbs/bootstrap"
|
||||
twitter: "getbootstrap"
|
||||
slack: "https://bootstrap-slack.herokuapp.com/"
|
||||
opencollective: "https://opencollective.com/bootstrap"
|
||||
blog: "https://blog.getbootstrap.com/"
|
||||
expo: "https://expo.getbootstrap.com/"
|
||||
themes: "https://themes.getbootstrap.com/"
|
||||
icons: "https://icons.getbootstrap.com/"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v5.0.0-alpha1.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-alpha1/bootstrap-5.0.0-alpha1-dist.zip"
|
||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-alpha1/bootstrap-5.0.0-alpha1-examples.zip"
|
||||
|
||||
cdn:
|
||||
# See https://www.srihash.org for info on how to generate the hashes
|
||||
css: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
|
||||
css_hash: "sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
|
||||
js: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
|
||||
js_hash: "sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
|
||||
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-DBjhmceckmzwrnMMrjI7BvG2FmRuxQVaTfFYHgfnrdfqMhxKt445b7j3KBQLolRl"
|
||||
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
popper_hash: "sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
||||
Vendored
+3369
-3136
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+175
-80
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap Reboot v5.0.0-alpha1 (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)
|
||||
*/
|
||||
*,
|
||||
@@ -11,41 +11,87 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
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 {
|
||||
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-family: system-ui, -apple-system, "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;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus {
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
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 {
|
||||
@@ -59,7 +105,6 @@ abbr[data-original-title] {
|
||||
-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;
|
||||
}
|
||||
@@ -70,6 +115,11 @@ address {
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
@@ -103,13 +153,18 @@ strong {
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
@@ -123,30 +178,19 @@ sup {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
a:hover {
|
||||
color: #024dbc;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
@@ -156,44 +200,83 @@ samp {
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
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 {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
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;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
@@ -226,10 +309,18 @@ select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
@@ -244,29 +335,12 @@ button:not(:disabled),
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
@@ -278,33 +352,50 @@ fieldset {
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-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;
|
||||
}
|
||||
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
@@ -316,13 +407,17 @@ output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-5
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap Reboot v5.0.0-alpha1 (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}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{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([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}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}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}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}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}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}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}
|
||||
*/*,::after,::before{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"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;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-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:#024dbc}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}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em;-ms-overflow-style:scrollbar}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: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}[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;white-space:normal}@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}::-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.min.css.map */
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3517
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+7
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+5922
-6231
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2283
-1618
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5038
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+7
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
+2225
-1594
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+146
-83
@@ -1,33 +1,101 @@
|
||||
/*!
|
||||
* Bootstrap alert.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap alert.js v5.0.0-alpha1 (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(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global = global || self, global.Alert = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js'], factory) :
|
||||
(global = global || self, global.Alert = factory(global.Data, global.EventHandler));
|
||||
}(this, (function (Data, EventHandler) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
|
||||
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);
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
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 = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = 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 (parseFloat(transitionDuration) + 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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -35,36 +103,30 @@
|
||||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.3.1';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
var Event = {
|
||||
CLOSE: "close" + EVENT_KEY,
|
||||
CLOSED: "closed" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
|
||||
var EVENT_CLOSE = "close" + EVENT_KEY;
|
||||
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASSNAME_ALERT = 'alert';
|
||||
var CLASSNAME_FADE = 'fade';
|
||||
var CLASSNAME_SHOW = 'show';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Alert =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Alert = /*#__PURE__*/function () {
|
||||
function Alert(element) {
|
||||
this._element = element;
|
||||
|
||||
if (this._element) {
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -80,7 +142,7 @@
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
if (customEvent === null || customEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -88,62 +150,52 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getRootElement = function _getRootElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $(element).closest("." + ClassName.ALERT)[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
|
||||
};
|
||||
|
||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||
var closeEvent = $.Event(Event.CLOSE);
|
||||
$(element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
return EventHandler.trigger(element, EVENT_CLOSE);
|
||||
};
|
||||
|
||||
_proto._removeElement = function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
$(element).removeClass(ClassName.SHOW);
|
||||
element.classList.remove(CLASSNAME_SHOW);
|
||||
|
||||
if (!$(element).hasClass(ClassName.FADE)) {
|
||||
if (!element.classList.contains(CLASSNAME_FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(element);
|
||||
$(element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(element);
|
||||
EventHandler.one(element, TRANSITION_END, function () {
|
||||
return _this._destroyElement(element);
|
||||
});
|
||||
emulateTransitionEnd(element, transitionDuration);
|
||||
};
|
||||
|
||||
_proto._destroyElement = function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
if (element.parentNode) {
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
|
||||
EventHandler.trigger(element, EVENT_CLOSED);
|
||||
} // Static
|
||||
;
|
||||
|
||||
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||
Alert.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $(this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
@@ -152,7 +204,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||
Alert.handleDismiss = function handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
@@ -162,6 +214,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
Alert.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Alert, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -178,22 +234,29 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .alert to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Alert._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Alert;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Alert.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Alert;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Alert;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=alert.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+67
-108
@@ -1,32 +1,38 @@
|
||||
/*!
|
||||
* Bootstrap button.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap button.js v5.0.0-alpha1 (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(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = global || self, global.Button = factory(global.jQuery));
|
||||
}(this, function ($) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js'], factory) :
|
||||
(global = global || self, global.Button = factory(global.Data, global.EventHandler));
|
||||
}(this, (function (Data, EventHandler) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
|
||||
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);
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -34,39 +40,23 @@
|
||||
*/
|
||||
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.3.1';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var ClassName = {
|
||||
ACTIVE: 'active',
|
||||
BUTTON: 'btn',
|
||||
FOCUS: 'focus'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
INPUT: 'input:not([type="hidden"])',
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
var Event = {
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
|
||||
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Button =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Button = /*#__PURE__*/function () {
|
||||
function Button(element) {
|
||||
this._element = element;
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -74,62 +64,22 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
|
||||
|
||||
if (rootElement) {
|
||||
var input = this._element.querySelector(Selector.INPUT);
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = rootElement.querySelector(Selector.ACTIVE);
|
||||
|
||||
if (activeElement) {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
||||
$(input).trigger('change');
|
||||
}
|
||||
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
$(this._element).toggleClass(ClassName.ACTIVE);
|
||||
}
|
||||
// Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
|
||||
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Button._jQueryInterface = function _jQueryInterface(config) {
|
||||
Button.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'toggle') {
|
||||
@@ -138,6 +88,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
Button.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Button, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -154,34 +108,39 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
var button = event.target;
|
||||
var button = event.target.closest(SELECTOR_DATA_TOGGLE);
|
||||
var data = Data.getData(button, DATA_KEY);
|
||||
|
||||
if (!$(button).hasClass(ClassName.BUTTON)) {
|
||||
button = $(button).closest(Selector.BUTTON);
|
||||
if (!data) {
|
||||
data = new Button(button);
|
||||
}
|
||||
|
||||
Button._jQueryInterface.call($(button), 'toggle');
|
||||
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = $(event.target).closest(Selector.BUTTON)[0];
|
||||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
|
||||
data.toggle();
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .button to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Button._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Button;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Button.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Button;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Button;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=button.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+326
-245
@@ -1,67 +1,151 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap carousel.js v5.0.0-alpha1 (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(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global = global || self, global.Carousel = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
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 define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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)
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
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 = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = 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 (parseFloat(transitionDuration) + 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);
|
||||
};
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
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;
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -69,15 +153,12 @@
|
||||
*/
|
||||
|
||||
var NAME = 'carousel';
|
||||
var VERSION = '4.3.1';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.carousel';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
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 ARROW_LEFT_KEY = 'ArrowLeft';
|
||||
var ARROW_RIGHT_KEY = 'ArrowRight';
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var SWIPE_THRESHOLD = 40;
|
||||
@@ -97,62 +178,50 @@
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
var Direction = {
|
||||
NEXT: 'next',
|
||||
PREV: 'prev',
|
||||
LEFT: 'left',
|
||||
RIGHT: 'right'
|
||||
};
|
||||
var Event = {
|
||||
SLIDE: "slide" + EVENT_KEY,
|
||||
SLID: "slid" + EVENT_KEY,
|
||||
KEYDOWN: "keydown" + EVENT_KEY,
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY,
|
||||
TOUCHSTART: "touchstart" + EVENT_KEY,
|
||||
TOUCHMOVE: "touchmove" + EVENT_KEY,
|
||||
TOUCHEND: "touchend" + EVENT_KEY,
|
||||
POINTERDOWN: "pointerdown" + EVENT_KEY,
|
||||
POINTERUP: "pointerup" + EVENT_KEY,
|
||||
DRAG_START: "dragstart" + EVENT_KEY,
|
||||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
CAROUSEL: 'carousel',
|
||||
ACTIVE: 'active',
|
||||
SLIDE: 'slide',
|
||||
RIGHT: 'carousel-item-right',
|
||||
LEFT: 'carousel-item-left',
|
||||
NEXT: 'carousel-item-next',
|
||||
PREV: 'carousel-item-prev',
|
||||
ITEM: 'carousel-item',
|
||||
POINTER_EVENT: 'pointer-event'
|
||||
};
|
||||
var Selector = {
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_ITEM: '.active.carousel-item',
|
||||
ITEM: '.carousel-item',
|
||||
ITEM_IMG: '.carousel-item img',
|
||||
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
|
||||
INDICATORS: '.carousel-indicators',
|
||||
DATA_SLIDE: '[data-slide], [data-slide-to]',
|
||||
DATA_RIDE: '[data-ride="carousel"]'
|
||||
};
|
||||
var DIRECTION_NEXT = 'next';
|
||||
var DIRECTION_PREV = 'prev';
|
||||
var DIRECTION_LEFT = 'left';
|
||||
var DIRECTION_RIGHT = 'right';
|
||||
var EVENT_SLIDE = "slide" + EVENT_KEY;
|
||||
var EVENT_SLID = "slid" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
|
||||
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
|
||||
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
|
||||
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
|
||||
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
|
||||
var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
|
||||
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
|
||||
var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
|
||||
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_CAROUSEL = 'carousel';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_SLIDE = 'slide';
|
||||
var CLASS_NAME_RIGHT = 'carousel-item-right';
|
||||
var CLASS_NAME_LEFT = 'carousel-item-left';
|
||||
var CLASS_NAME_NEXT = 'carousel-item-next';
|
||||
var CLASS_NAME_PREV = 'carousel-item-prev';
|
||||
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
|
||||
var SELECTOR_ITEM = '.carousel-item';
|
||||
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
||||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
||||
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
|
||||
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
|
||||
var PointerType = {
|
||||
TOUCH: 'touch',
|
||||
PEN: 'pen'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Carousel =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Carousel = /*#__PURE__*/function () {
|
||||
function Carousel(element, config) {
|
||||
this._items = null;
|
||||
this._interval = null;
|
||||
@@ -164,11 +233,13 @@
|
||||
this.touchDeltaX = 0;
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
|
||||
this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
|
||||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
||||
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
|
||||
this._pointerEvent = Boolean(window.PointerEvent);
|
||||
|
||||
this._addEventListeners();
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -177,21 +248,21 @@
|
||||
// Public
|
||||
_proto.next = function next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
this._slide(DIRECTION_NEXT);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.nextWhenVisible = function nextWhenVisible() {
|
||||
// Don't call next when the page isn't visible
|
||||
// or the carousel or its parent isn't visible
|
||||
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
|
||||
if (!document.hidden && isVisible(this._element)) {
|
||||
this.next();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.prev = function prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV);
|
||||
this._slide(DIRECTION_PREV);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -200,8 +271,8 @@
|
||||
this._isPaused = true;
|
||||
}
|
||||
|
||||
if (this._element.querySelector(Selector.NEXT_PREV)) {
|
||||
Util.triggerTransitionEnd(this._element);
|
||||
if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
|
||||
triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
||||
@@ -219,7 +290,7 @@
|
||||
this._interval = null;
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
if (this._config && this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||
}
|
||||
};
|
||||
@@ -227,7 +298,7 @@
|
||||
_proto.to = function to(index) {
|
||||
var _this = this;
|
||||
|
||||
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
|
||||
this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
|
||||
var activeIndex = this._getItemIndex(this._activeElement);
|
||||
|
||||
@@ -236,7 +307,7 @@
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
$(this._element).one(Event.SLID, function () {
|
||||
EventHandler.one(this._element, EVENT_SLID, function () {
|
||||
return _this.to(index);
|
||||
});
|
||||
return;
|
||||
@@ -248,14 +319,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
|
||||
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
|
||||
|
||||
this._slide(direction, this._items[index]);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$(this._element).off(EVENT_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
EventHandler.off(this._element, EVENT_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._items = null;
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
@@ -268,8 +339,8 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
config = _objectSpread(_objectSpread({}, Default), config);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
@@ -280,7 +351,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var direction = absDeltax / this.touchDeltaX; // swipe left
|
||||
var direction = absDeltax / this.touchDeltaX;
|
||||
this.touchDeltaX = 0; // swipe left
|
||||
|
||||
if (direction > 0) {
|
||||
this.prev();
|
||||
@@ -296,20 +368,21 @@
|
||||
var _this2 = this;
|
||||
|
||||
if (this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
|
||||
return _this2._keydown(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||
EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
|
||||
return _this2.pause(event);
|
||||
}).on(Event.MOUSELEAVE, function (event) {
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
|
||||
return _this2.cycle(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
if (this._config.touch && this._touchSupported) {
|
||||
this._addTouchEventListeners();
|
||||
}
|
||||
};
|
||||
@@ -317,30 +390,26 @@
|
||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this._touchSupported) {
|
||||
return;
|
||||
}
|
||||
|
||||
var start = function start(event) {
|
||||
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
_this3.touchStartX = event.originalEvent.clientX;
|
||||
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||
_this3.touchStartX = event.clientX;
|
||||
} else if (!_this3._pointerEvent) {
|
||||
_this3.touchStartX = event.originalEvent.touches[0].clientX;
|
||||
_this3.touchStartX = event.touches[0].clientX;
|
||||
}
|
||||
};
|
||||
|
||||
var move = function move(event) {
|
||||
// ensure swiping with one touch and not pinching
|
||||
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||
if (event.touches && event.touches.length > 1) {
|
||||
_this3.touchDeltaX = 0;
|
||||
} else {
|
||||
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
|
||||
_this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
|
||||
}
|
||||
};
|
||||
|
||||
var end = function end(event) {
|
||||
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
|
||||
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||
_this3.touchDeltaX = event.clientX - _this3.touchStartX;
|
||||
}
|
||||
|
||||
_this3._handleSwipe();
|
||||
@@ -365,27 +434,29 @@
|
||||
}
|
||||
};
|
||||
|
||||
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, function (e) {
|
||||
return e.preventDefault();
|
||||
SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
|
||||
EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
|
||||
return e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
if (this._pointerEvent) {
|
||||
$(this._element).on(Event.POINTERDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$(this._element).on(Event.POINTERUP, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
|
||||
this._element.classList.add(ClassName.POINTER_EVENT);
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||
} else {
|
||||
$(this._element).on(Event.TOUCHSTART, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$(this._element).on(Event.TOUCHMOVE, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
|
||||
return move(event);
|
||||
});
|
||||
$(this._element).on(Event.TOUCHEND, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
}
|
||||
@@ -396,29 +467,27 @@
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.which) {
|
||||
case ARROW_LEFT_KEYCODE:
|
||||
switch (event.key) {
|
||||
case ARROW_LEFT_KEY:
|
||||
event.preventDefault();
|
||||
this.prev();
|
||||
break;
|
||||
|
||||
case ARROW_RIGHT_KEYCODE:
|
||||
case ARROW_RIGHT_KEY:
|
||||
event.preventDefault();
|
||||
this.next();
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
};
|
||||
|
||||
_proto._getItemIndex = function _getItemIndex(element) {
|
||||
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
|
||||
this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
|
||||
return this._items.indexOf(element);
|
||||
};
|
||||
|
||||
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
|
||||
var isNextDirection = direction === Direction.NEXT;
|
||||
var isPrevDirection = direction === Direction.PREV;
|
||||
var isNextDirection = direction === DIRECTION_NEXT;
|
||||
var isPrevDirection = direction === DIRECTION_PREV;
|
||||
|
||||
var activeIndex = this._getItemIndex(activeElement);
|
||||
|
||||
@@ -429,7 +498,7 @@
|
||||
return activeElement;
|
||||
}
|
||||
|
||||
var delta = direction === Direction.PREV ? -1 : 1;
|
||||
var delta = direction === DIRECTION_PREV ? -1 : 1;
|
||||
var itemIndex = (activeIndex + delta) % this._items.length;
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||
};
|
||||
@@ -437,27 +506,28 @@
|
||||
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
var targetIndex = this._getItemIndex(relatedTarget);
|
||||
|
||||
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
|
||||
var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
|
||||
|
||||
var slideEvent = $.Event(Event.SLIDE, {
|
||||
return EventHandler.trigger(this._element, EVENT_SLIDE, {
|
||||
relatedTarget: relatedTarget,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
$(this._element).trigger(slideEvent);
|
||||
return slideEvent;
|
||||
};
|
||||
|
||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
|
||||
$(indicators).removeClass(ClassName.ACTIVE);
|
||||
var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
|
||||
|
||||
for (var i = 0; i < indicators.length; i++) {
|
||||
indicators[i].classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||
|
||||
if (nextIndicator) {
|
||||
$(nextIndicator).addClass(ClassName.ACTIVE);
|
||||
nextIndicator.classList.add(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -465,7 +535,7 @@
|
||||
_proto._slide = function _slide(direction, element) {
|
||||
var _this4 = this;
|
||||
|
||||
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
|
||||
var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
||||
|
||||
var activeElementIndex = this._getItemIndex(activeElement);
|
||||
|
||||
@@ -478,24 +548,24 @@
|
||||
var orderClassName;
|
||||
var eventDirectionName;
|
||||
|
||||
if (direction === Direction.NEXT) {
|
||||
directionalClassName = ClassName.LEFT;
|
||||
orderClassName = ClassName.NEXT;
|
||||
eventDirectionName = Direction.LEFT;
|
||||
if (direction === DIRECTION_NEXT) {
|
||||
directionalClassName = CLASS_NAME_LEFT;
|
||||
orderClassName = CLASS_NAME_NEXT;
|
||||
eventDirectionName = DIRECTION_LEFT;
|
||||
} else {
|
||||
directionalClassName = ClassName.RIGHT;
|
||||
orderClassName = ClassName.PREV;
|
||||
eventDirectionName = Direction.RIGHT;
|
||||
directionalClassName = CLASS_NAME_RIGHT;
|
||||
orderClassName = CLASS_NAME_PREV;
|
||||
eventDirectionName = DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
|
||||
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
this._isSliding = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
||||
|
||||
if (slideEvent.isDefaultPrevented()) {
|
||||
if (slideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -512,18 +582,11 @@
|
||||
|
||||
this._setActiveIndicatorElement(nextElement);
|
||||
|
||||
var slidEvent = $.Event(Event.SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
|
||||
if ($(this._element).hasClass(ClassName.SLIDE)) {
|
||||
$(nextElement).addClass(orderClassName);
|
||||
Util.reflow(nextElement);
|
||||
$(activeElement).addClass(directionalClassName);
|
||||
$(nextElement).addClass(directionalClassName);
|
||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
||||
nextElement.classList.add(orderClassName);
|
||||
reflow(nextElement);
|
||||
activeElement.classList.add(directionalClassName);
|
||||
nextElement.classList.add(directionalClassName);
|
||||
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
||||
|
||||
if (nextElementInterval) {
|
||||
@@ -533,20 +596,32 @@
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||
}
|
||||
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
|
||||
$(activeElement).one(Util.TRANSITION_END, function () {
|
||||
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
|
||||
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||
var transitionDuration = getTransitionDurationFromElement(activeElement);
|
||||
EventHandler.one(activeElement, TRANSITION_END, function () {
|
||||
nextElement.classList.remove(directionalClassName, orderClassName);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
|
||||
_this4._isSliding = false;
|
||||
setTimeout(function () {
|
||||
return $(_this4._element).trigger(slidEvent);
|
||||
EventHandler.trigger(_this4._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
}, 0);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
});
|
||||
emulateTransitionEnd(activeElement, transitionDuration);
|
||||
} else {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||
$(nextElement).addClass(ClassName.ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
this._isSliding = false;
|
||||
$(this._element).trigger(slidEvent);
|
||||
EventHandler.trigger(this._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
}
|
||||
|
||||
if (isCycling) {
|
||||
@@ -555,52 +630,49 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||
Carousel.carouselInterface = function carouselInterface(element, config) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
|
||||
var _config = _objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(element));
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _objectSpread(_objectSpread({}, _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]();
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause();
|
||||
data.cycle();
|
||||
}
|
||||
};
|
||||
|
||||
Carousel.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, $(this).data());
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _objectSpread({}, _config, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(this, _config);
|
||||
$(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.carouselInterface(this, config);
|
||||
});
|
||||
};
|
||||
|
||||
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
|
||||
var selector = Util.getSelectorFromElement(this);
|
||||
Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
|
||||
var target = getElementFromSelector(this);
|
||||
|
||||
if (!selector) {
|
||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target = $(selector)[0];
|
||||
|
||||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var config = _objectSpread({}, $(target).data(), $(this).data());
|
||||
var config = _objectSpread(_objectSpread({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
@@ -608,15 +680,19 @@
|
||||
config.interval = false;
|
||||
}
|
||||
|
||||
Carousel._jQueryInterface.call($(target), config);
|
||||
Carousel.carouselInterface(target, config);
|
||||
|
||||
if (slideIndex) {
|
||||
$(target).data(DATA_KEY).to(slideIndex);
|
||||
Data.getData(target, DATA_KEY).to(slideIndex);
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
Carousel.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Carousel, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -638,31 +714,36 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
|
||||
EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
|
||||
var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
|
||||
|
||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||
var $carousel = $(carousels[i]);
|
||||
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
||||
Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));
|
||||
}
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .carousel to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Carousel._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Carousel;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Carousel._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Carousel.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Carousel;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Carousel.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Carousel;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=carousel.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+304
-181
@@ -1,67 +1,147 @@
|
||||
/*!
|
||||
* Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap collapse.js v5.0.0-alpha1 (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(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global = global || self, global.Collapse = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
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 define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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)
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
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 = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = 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 (parseFloat(transitionDuration) + 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);
|
||||
};
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -69,11 +149,10 @@
|
||||
*/
|
||||
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.3.1';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
@@ -82,52 +161,41 @@
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
SHOW: 'show',
|
||||
COLLAPSE: 'collapse',
|
||||
COLLAPSING: 'collapsing',
|
||||
COLLAPSED: 'collapsed'
|
||||
};
|
||||
var Dimension = {
|
||||
WIDTH: 'width',
|
||||
HEIGHT: 'height'
|
||||
};
|
||||
var Selector = {
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
||||
var WIDTH = 'width';
|
||||
var HEIGHT = 'height';
|
||||
var SELECTOR_ACTIVES = '.show, .collapsing';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Collapse =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Collapse = /*#__PURE__*/function () {
|
||||
function Collapse(element, config) {
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
||||
var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
|
||||
this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-target=\"#" + element.id + "\"]"));
|
||||
var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
|
||||
|
||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||
var elem = toggleList[i];
|
||||
var selector = Util.getSelectorFromElement(elem);
|
||||
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
|
||||
var selector = getSelectorFromElement(elem);
|
||||
var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
|
||||
return foundElem === element;
|
||||
});
|
||||
|
||||
if (selector !== null && filterElement.length > 0) {
|
||||
if (selector !== null && filterElement.length) {
|
||||
this._selector = selector;
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
@@ -143,6 +211,8 @@
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -150,7 +220,7 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
@@ -160,7 +230,7 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -168,12 +238,12 @@
|
||||
var activesData;
|
||||
|
||||
if (this._parent) {
|
||||
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) {
|
||||
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
|
||||
if (typeof _this._config.parent === 'string') {
|
||||
return elem.getAttribute('data-parent') === _this._config.parent;
|
||||
}
|
||||
|
||||
return elem.classList.contains(ClassName.COLLAPSE);
|
||||
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
||||
});
|
||||
|
||||
if (actives.length === 0) {
|
||||
@@ -181,88 +251,106 @@
|
||||
}
|
||||
}
|
||||
|
||||
var container = SelectorEngine.findOne(this._selector);
|
||||
|
||||
if (actives) {
|
||||
activesData = $(actives).not(this._selector).data(DATA_KEY);
|
||||
var tempActiveData = actives.filter(function (elem) {
|
||||
return container !== elem;
|
||||
});
|
||||
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null;
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var startEvent = $.Event(Event.SHOW);
|
||||
$(this._element).trigger(startEvent);
|
||||
var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
|
||||
actives.forEach(function (elemActive) {
|
||||
if (container !== elemActive) {
|
||||
Collapse.collapseInterface(elemActive, 'hide');
|
||||
}
|
||||
|
||||
if (!activesData) {
|
||||
$(actives).data(DATA_KEY, null);
|
||||
}
|
||||
if (!activesData) {
|
||||
Data.setData(elemActive, DATA_KEY, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
|
||||
this._triggerArray.forEach(function (element) {
|
||||
element.classList.remove(CLASS_NAME_COLLAPSED);
|
||||
element.setAttribute('aria-expanded', true);
|
||||
});
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
|
||||
_this._element.classList.remove(CLASS_NAME_COLLAPSING);
|
||||
|
||||
_this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
||||
|
||||
_this._element.style[dimension] = '';
|
||||
|
||||
_this.setTransitioning(false);
|
||||
|
||||
$(_this._element).trigger(Event.SHOWN);
|
||||
EventHandler.trigger(_this._element, EVENT_SHOWN);
|
||||
};
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = "scroll" + capitalizedDimension;
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = $.Event(Event.HIDE);
|
||||
$(this._element).trigger(startEvent);
|
||||
var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||
Util.reflow(this._element);
|
||||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
||||
reflow(this._element);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
||||
|
||||
var triggerArrayLength = this._triggerArray.length;
|
||||
|
||||
if (triggerArrayLength > 0) {
|
||||
for (var i = 0; i < triggerArrayLength; i++) {
|
||||
var trigger = this._triggerArray[i];
|
||||
var selector = Util.getSelectorFromElement(trigger);
|
||||
var elem = getElementFromSelector(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = $([].slice.call(document.querySelectorAll(selector)));
|
||||
|
||||
if (!$elem.hasClass(ClassName.SHOW)) {
|
||||
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
||||
trigger.setAttribute('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,12 +360,17 @@
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
||||
_this2._element.classList.remove(CLASS_NAME_COLLAPSING);
|
||||
|
||||
_this2._element.classList.add(CLASS_NAME_COLLAPSE);
|
||||
|
||||
EventHandler.trigger(_this2._element, EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
};
|
||||
|
||||
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
||||
@@ -285,7 +378,7 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
@@ -295,81 +388,93 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
config = _objectSpread(_objectSpread({}, Default), config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getDimension = function _getDimension() {
|
||||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||
var hasWidth = this._element.classList.contains(WIDTH);
|
||||
|
||||
return hasWidth ? WIDTH : HEIGHT;
|
||||
};
|
||||
|
||||
_proto._getParent = function _getParent() {
|
||||
var _this3 = this;
|
||||
|
||||
var parent;
|
||||
var parent = this._config.parent;
|
||||
|
||||
if (Util.isElement(this._config.parent)) {
|
||||
parent = this._config.parent; // It's a jQuery object
|
||||
|
||||
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||
parent = this._config.parent[0];
|
||||
if (isElement(parent)) {
|
||||
// it's a jQuery object
|
||||
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
|
||||
parent = parent[0];
|
||||
}
|
||||
} else {
|
||||
parent = document.querySelector(this._config.parent);
|
||||
parent = SelectorEngine.findOne(parent);
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
|
||||
var children = [].slice.call(parent.querySelectorAll(selector));
|
||||
$(children).each(function (i, element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
var selector = SELECTOR_DATA_TOGGLE + "[data-parent=\"" + parent + "\"]";
|
||||
SelectorEngine.find(selector, parent).forEach(function (element) {
|
||||
var selected = getElementFromSelector(element);
|
||||
|
||||
_this3._addAriaAndCollapsedClass(selected, [element]);
|
||||
});
|
||||
return parent;
|
||||
};
|
||||
|
||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
var isOpen = $(element).hasClass(ClassName.SHOW);
|
||||
if (element) {
|
||||
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
if (triggerArray.length) {
|
||||
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
|
||||
;
|
||||
|
||||
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
Collapse.collapseInterface = function collapseInterface(element, config) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
|
||||
var _config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.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 () {
|
||||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
Collapse.collapseInterface(this, config);
|
||||
});
|
||||
};
|
||||
|
||||
Collapse.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Collapse, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -391,38 +496,56 @@
|
||||
*/
|
||||
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
if (event.target.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $trigger = $(this);
|
||||
var selector = Util.getSelectorFromElement(this);
|
||||
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||
$(selectors).each(function () {
|
||||
var $target = $(this);
|
||||
var data = $target.data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $trigger.data();
|
||||
var triggerData = Manipulator.getDataAttributes(this);
|
||||
var selector = getSelectorFromElement(this);
|
||||
var selectorElements = SelectorEngine.find(selector);
|
||||
selectorElements.forEach(function (element) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
var config;
|
||||
|
||||
Collapse._jQueryInterface.call($target, config);
|
||||
if (data) {
|
||||
// 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);
|
||||
});
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .collapse to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Collapse._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Collapse;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Collapse.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Collapse;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Collapse;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=collapse.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+82
@@ -0,0 +1,82 @@
|
||||
/*!
|
||||
* Bootstrap data.js v5.0.0-alpha1 (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 = global || self, global.Data = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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.key === 'undefined') {
|
||||
element.key = {
|
||||
key: key,
|
||||
id: id
|
||||
};
|
||||
id++;
|
||||
}
|
||||
|
||||
storeData[element.key.id] = data;
|
||||
},
|
||||
get: function get(element, key) {
|
||||
if (!element || typeof element.key === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
|
||||
var keyProperties = element.key;
|
||||
|
||||
if (keyProperties.key === key) {
|
||||
return storeData[keyProperties.id];
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
delete: function _delete(element, key) {
|
||||
if (typeof element.key === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
var keyProperties = element.key;
|
||||
|
||||
if (keyProperties.key === key) {
|
||||
delete storeData[keyProperties.id];
|
||||
delete element.key;
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
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
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): 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.key === 'undefined') {\n element.key = {\n key,\n id\n }\n id++\n }\n\n storeData[element.key.id] = data\n },\n get(element, key) {\n if (!element || typeof element.key === 'undefined') {\n return null\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.key === 'undefined') {\n return\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.key\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","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;;;;;;;EAOA;;;;;EAMA,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,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtCD,QAAAA,OAAO,CAACC,GAAR,GAAc;EACZA,UAAAA,GAAG,EAAHA,GADY;EAEZH,UAAAA,EAAE,EAAFA;EAFY,SAAd;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACC,GAAR,CAAYH,EAAb,CAAT,GAA4BI,IAA5B;EACD,KAXI;EAYLC,IAAAA,GAZK,eAYDH,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACC,GAAf,KAAuB,WAAvC,EAAoD;EAClD,eAAO,IAAP;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACD;;EAED,aAAO,IAAP;EACD,KAvBI;EAwBLO,IAAAA,MAxBK,mBAwBEL,OAxBF,EAwBWC,GAxBX,EAwBgB;EACnB,UAAI,OAAOD,OAAO,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtC;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACC,GAAf;EACD;EACF;EAlCI,GAAP;EAoCD,CAvCe,EAAhB;;MAyCMK,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOP,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYS,QAAZ,EAAsBP,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXO,EAAAA,OAJW,mBAIHD,QAJG,EAIOP,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACO,GAAR,CAAYK,QAAZ,EAAsBP,GAAtB,CAAP;EACD,GANU;EAOXS,EAAAA,UAPW,sBAOAF,QAPA,EAOUP,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACS,MAAR,CAAeG,QAAf,EAAyBP,GAAzB;EACD;EATU;;;;;;;;"}
|
||||
Vendored
+312
@@ -0,0 +1,312 @@
|
||||
/*!
|
||||
* Bootstrap event-handler.js v5.0.0-alpha1 (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(require('./polyfill.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
|
||||
(global = global || self, global.EventHandler = factory(global.Polyfill));
|
||||
}(this, (function (polyfill_js) { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var $ = getjQuery();
|
||||
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
|
||||
var stripNameRegex = /\..*/;
|
||||
var stripUidRegex = /::\d+$/;
|
||||
var eventRegistry = {}; // Events storage
|
||||
|
||||
var uidEvent = 1;
|
||||
var customEvents = {
|
||||
mouseenter: 'mouseover',
|
||||
mouseleave: 'mouseout'
|
||||
};
|
||||
var nativeEvents = ['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) {
|
||||
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) {
|
||||
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.indexOf(typeEvent) > -1;
|
||||
|
||||
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.indexOf(namespace) > -1) {
|
||||
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.charAt(0) === '.';
|
||||
|
||||
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.indexOf(handlerKey) > -1) {
|
||||
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 typeEvent = event.replace(stripNameRegex, '');
|
||||
var inNamespace = event !== typeEvent;
|
||||
var isNative = nativeEvents.indexOf(typeEvent) > -1;
|
||||
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 informations 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 (!polyfill_js.defaultPreventedPreservedOnDispatch) {
|
||||
Object.defineProperty(evt, 'defaultPrevented', {
|
||||
get: function get() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (nativeDispatch) {
|
||||
element.dispatchEvent(evt);
|
||||
}
|
||||
|
||||
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
|
||||
jQueryEvent.preventDefault();
|
||||
}
|
||||
|
||||
return evt;
|
||||
}
|
||||
};
|
||||
|
||||
return EventHandler;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=event-handler.js.map
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+101
@@ -0,0 +1,101 @@
|
||||
/*!
|
||||
* Bootstrap manipulator.js v5.0.0-alpha1 (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 = global || self, global.Manipulator = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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-" + normalizeDataKey(key), value);
|
||||
},
|
||||
removeDataAttribute: function removeDataAttribute(element, key) {
|
||||
element.removeAttribute("data-" + normalizeDataKey(key));
|
||||
},
|
||||
getDataAttributes: function getDataAttributes(element) {
|
||||
if (!element) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var attributes = _objectSpread({}, element.dataset);
|
||||
|
||||
Object.keys(attributes).forEach(function (key) {
|
||||
attributes[key] = normalizeData(attributes[key]);
|
||||
});
|
||||
return attributes;
|
||||
},
|
||||
getDataAttribute: function getDataAttribute(element, key) {
|
||||
return normalizeData(element.getAttribute("data-" + 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
|
||||
};
|
||||
},
|
||||
toggleClass: function toggleClass(element, className) {
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (element.classList.contains(className)) {
|
||||
element.classList.remove(className);
|
||||
} else {
|
||||
element.classList.add(className);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return Manipulator;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=manipulator.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): 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-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {\n ...element.dataset\n }\n\n Object.keys(attributes).forEach(key => {\n attributes[key] = normalizeData(attributes[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-${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 toggleClass(element, className) {\n if (!element) {\n return\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className)\n } else {\n element.classList.add(className)\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","dataset","Object","keys","forEach","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","toggleClass","className","classList","contains","remove","add"],"mappings":";;;;;;;;;;;;;;;;;EAAA;;;;;;EAOA,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,WAA6BT,gBAAgB,CAACC,GAAD,CAA7C,EAAsDO,KAAtD;EACD,GAHiB;EAKlBE,EAAAA,mBALkB,+BAKEH,OALF,EAKWN,GALX,EAKgB;EAChCM,IAAAA,OAAO,CAACI,eAAR,WAAgCX,gBAAgB,CAACC,GAAD,CAAhD;EACD,GAPiB;EASlBW,EAAAA,iBATkB,6BASAL,OATA,EASS;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,QAAMM,UAAU,qBACXN,OAAO,CAACO,OADG,CAAhB;;EAIAC,IAAAA,MAAM,CAACC,IAAP,CAAYH,UAAZ,EAAwBI,OAAxB,CAAgC,UAAAhB,GAAG,EAAI;EACrCY,MAAAA,UAAU,CAACZ,GAAD,CAAV,GAAkBL,aAAa,CAACiB,UAAU,CAACZ,GAAD,CAAX,CAA/B;EACD,KAFD;EAIA,WAAOY,UAAP;EACD,GAvBiB;EAyBlBK,EAAAA,gBAzBkB,4BAyBDX,OAzBC,EAyBQN,GAzBR,EAyBa;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACY,YAAR,WAA6BnB,gBAAgB,CAACC,GAAD,CAA7C,CAAD,CAApB;EACD,GA3BiB;EA6BlBmB,EAAAA,MA7BkB,kBA6BXb,OA7BW,EA6BF;EACd,QAAMc,IAAI,GAAGd,OAAO,CAACe,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,GApCiB;EAsClBC,EAAAA,QAtCkB,oBAsCTtB,OAtCS,EAsCA;EAChB,WAAO;EACLgB,MAAAA,GAAG,EAAEhB,OAAO,CAACuB,SADR;EAELH,MAAAA,IAAI,EAAEpB,OAAO,CAACwB;EAFT,KAAP;EAID,GA3CiB;EA6ClBC,EAAAA,WA7CkB,uBA6CNzB,OA7CM,EA6CG0B,SA7CH,EA6Cc;EAC9B,QAAI,CAAC1B,OAAL,EAAc;EACZ;EACD;;EAED,QAAIA,OAAO,CAAC2B,SAAR,CAAkBC,QAAlB,CAA2BF,SAA3B,CAAJ,EAA2C;EACzC1B,MAAAA,OAAO,CAAC2B,SAAR,CAAkBE,MAAlB,CAAyBH,SAAzB;EACD,KAFD,MAEO;EACL1B,MAAAA,OAAO,CAAC2B,SAAR,CAAkBG,GAAlB,CAAsBJ,SAAtB;EACD;EACF;EAvDiB;;;;;;;;"}
|
||||
Vendored
+111
@@ -0,0 +1,111 @@
|
||||
/*!
|
||||
* Bootstrap polyfill.js v5.0.0-alpha1 (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' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = global || self, factory(global.Polyfill = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var MAX_UID = 1000000;
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var getUID = function getUID(prefix) {
|
||||
do {
|
||||
prefix += Math.floor(Math.random() * MAX_UID);
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
};
|
||||
|
||||
/* istanbul ignore file */
|
||||
exports.find = Element.prototype.querySelectorAll;
|
||||
exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
|
||||
|
||||
var defaultPreventedPreservedOnDispatch = function () {
|
||||
var e = new CustomEvent('Bootstrap', {
|
||||
cancelable: true
|
||||
});
|
||||
var element = document.createElement('div');
|
||||
element.addEventListener('Bootstrap', function () {
|
||||
return null;
|
||||
});
|
||||
e.preventDefault();
|
||||
element.dispatchEvent(e);
|
||||
return e.defaultPrevented;
|
||||
}();
|
||||
|
||||
var scopeSelectorRegex = /:scope\b/;
|
||||
|
||||
var supportScopeQuery = function () {
|
||||
var element = document.createElement('div');
|
||||
|
||||
try {
|
||||
element.querySelectorAll(':scope *');
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}();
|
||||
|
||||
if (!supportScopeQuery) {
|
||||
exports.find = function find(selector) {
|
||||
if (!scopeSelectorRegex.test(selector)) {
|
||||
return this.querySelectorAll(selector);
|
||||
}
|
||||
|
||||
var hasId = Boolean(this.id);
|
||||
|
||||
if (!hasId) {
|
||||
this.id = getUID('scope');
|
||||
}
|
||||
|
||||
var nodeList = null;
|
||||
|
||||
try {
|
||||
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
|
||||
nodeList = this.querySelectorAll(selector);
|
||||
} finally {
|
||||
if (!hasId) {
|
||||
this.removeAttribute('id');
|
||||
}
|
||||
}
|
||||
|
||||
return nodeList;
|
||||
};
|
||||
|
||||
exports.findOne = function findOne(selector) {
|
||||
if (!scopeSelectorRegex.test(selector)) {
|
||||
return this.querySelector(selector);
|
||||
}
|
||||
|
||||
var matches = exports.find.call(this, selector);
|
||||
|
||||
if (typeof matches[0] !== 'undefined') {
|
||||
return matches[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
exports.defaultPreventedPreservedOnDispatch = defaultPreventedPreservedOnDispatch;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=polyfill.js.map
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
/*!
|
||||
* Bootstrap selector-engine.js v5.0.0-alpha1 (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(require('./polyfill.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
|
||||
(global = global || self, global.SelectorEngine = factory(global.Polyfill));
|
||||
}(this, (function (polyfill_js) { 'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): 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, polyfill_js.find.call(element, selector));
|
||||
},
|
||||
findOne: function findOne(selector, element) {
|
||||
if (element === void 0) {
|
||||
element = document.documentElement;
|
||||
}
|
||||
|
||||
return polyfill_js.findOne.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
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { find as findFn, findOne } from './polyfill'\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(...findFn.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return findOne.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","findFn","call","findOne","children","filter","child","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;;;;;;EASA;;;;;;EAMA,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,gBAAM,CAACC,IAAP,CAAYP,OAAZ,EAAqBC,QAArB,CAAb,CAAP;EACD,GAPoB;EASrBO,EAAAA,OATqB,mBASbP,QATa,EASHD,OATG,EASiC;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BG,QAAQ,CAACC,eAAiB;EAAA;;EACpD,WAAOI,mBAAO,CAACD,IAAR,CAAaP,OAAb,EAAsBC,QAAtB,CAAP;EACD,GAXoB;EAarBQ,EAAAA,QAbqB,oBAaZT,OAbY,EAaHC,QAbG,EAaO;EAAA;;EAC1B,QAAMQ,QAAQ,GAAG,aAAGJ,MAAH,cAAaL,OAAO,CAACS,QAArB,CAAjB;;EAEA,WAAOA,QAAQ,CAACC,MAAT,CAAgB,UAAAC,KAAK;EAAA,aAAIA,KAAK,CAACZ,OAAN,CAAcE,QAAd,CAAJ;EAAA,KAArB,CAAP;EACD,GAjBoB;EAmBrBW,EAAAA,OAnBqB,mBAmBbZ,OAnBa,EAmBJC,QAnBI,EAmBM;EACzB,QAAMW,OAAO,GAAG,EAAhB;EAEA,QAAIC,QAAQ,GAAGb,OAAO,CAACc,UAAvB;;EAEA,WAAOD,QAAQ,IAAIA,QAAQ,CAACE,QAAT,KAAsBC,IAAI,CAACC,YAAvC,IAAuDJ,QAAQ,CAACE,QAAT,KAAsBlB,SAApF,EAA+F;EAC7F,UAAI,KAAKE,OAAL,CAAac,QAAb,EAAuBZ,QAAvB,CAAJ,EAAsC;EACpCW,QAAAA,OAAO,CAACM,IAAR,CAAaL,QAAb;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,UAApB;EACD;;EAED,WAAOF,OAAP;EACD,GAjCoB;EAmCrBO,EAAAA,IAnCqB,gBAmChBnB,OAnCgB,EAmCPC,QAnCO,EAmCG;EACtB,QAAImB,QAAQ,GAAGpB,OAAO,CAACqB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACrB,OAAT,CAAiBE,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACmB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA/CoB;EAiDrBC,EAAAA,IAjDqB,gBAiDhBtB,OAjDgB,EAiDPC,QAjDO,EAiDG;EACtB,QAAIqB,IAAI,GAAGtB,OAAO,CAACuB,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAI,KAAKvB,OAAL,CAAauB,IAAb,EAAmBrB,QAAnB,CAAJ,EAAkC;EAChC,eAAO,CAACqB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;EA7DoB;;;;;;;;"}
|
||||
Vendored
+288
-271
@@ -1,68 +1,105 @@
|
||||
/*!
|
||||
* Bootstrap dropdown.js v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Bootstrap dropdown.js v5.0.0-alpha1 (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(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
|
||||
}(this, function ($, Popper, Util) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.js', './dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
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 + "\"."));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
var isVisible = function isVisible(element) {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
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-no-jquery')) {
|
||||
return jQuery;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -70,85 +107,68 @@
|
||||
*/
|
||||
|
||||
var NAME = 'dropdown';
|
||||
var VERSION = '4.3.1';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.dropdown';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
var ESCAPE_KEY = 'Escape';
|
||||
var SPACE_KEY = 'Space';
|
||||
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 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,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
CLICK: "click" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
|
||||
KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY,
|
||||
KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
DISABLED: 'disabled',
|
||||
SHOW: 'show',
|
||||
DROPUP: 'dropup',
|
||||
DROPRIGHT: 'dropright',
|
||||
DROPLEFT: 'dropleft',
|
||||
MENURIGHT: 'dropdown-menu-right',
|
||||
MENULEFT: 'dropdown-menu-left',
|
||||
POSITION_STATIC: 'position-static'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE: '[data-toggle="dropdown"]',
|
||||
FORM_CHILD: '.dropdown form',
|
||||
MENU: '.dropdown-menu',
|
||||
NAVBAR_NAV: '.navbar-nav',
|
||||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
TOPEND: 'top-end',
|
||||
BOTTOM: 'bottom-start',
|
||||
BOTTOMEND: 'bottom-end',
|
||||
RIGHT: 'right-start',
|
||||
RIGHTEND: 'right-end',
|
||||
LEFT: 'left-start',
|
||||
LEFTEND: 'left-end'
|
||||
};
|
||||
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_CLICK = "click" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_DROPUP = 'dropup';
|
||||
var CLASS_NAME_DROPRIGHT = 'dropright';
|
||||
var CLASS_NAME_DROPLEFT = 'dropleft';
|
||||
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
|
||||
var CLASS_NAME_NAVBAR = 'navbar';
|
||||
var CLASS_NAME_POSITION_STATIC = 'position-static';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
|
||||
var SELECTOR_FORM_CHILD = '.dropdown form';
|
||||
var SELECTOR_MENU = '.dropdown-menu';
|
||||
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
|
||||
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
|
||||
var PLACEMENT_TOP = 'top-start';
|
||||
var PLACEMENT_TOPEND = 'top-end';
|
||||
var PLACEMENT_BOTTOM = 'bottom-start';
|
||||
var PLACEMENT_BOTTOMEND = 'bottom-end';
|
||||
var PLACEMENT_RIGHT = 'right-start';
|
||||
var PLACEMENT_LEFT = 'left-start';
|
||||
var Default = {
|
||||
offset: 0,
|
||||
flip: true,
|
||||
boundary: 'scrollParent',
|
||||
reference: 'toggle',
|
||||
display: 'dynamic'
|
||||
display: 'dynamic',
|
||||
popperConfig: null
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: '(number|string|function)',
|
||||
flip: 'boolean',
|
||||
boundary: '(string|element)',
|
||||
reference: '(string|element)',
|
||||
display: 'string'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
display: 'string',
|
||||
popperConfig: '(null|object)'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Dropdown = /*#__PURE__*/function () {
|
||||
function Dropdown(element, config) {
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
@@ -157,6 +177,8 @@
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
this._addEventListeners();
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -164,45 +186,47 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
Dropdown.clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.show();
|
||||
};
|
||||
|
||||
_proto.show = function show() {
|
||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown.getParentFromElement(this._element);
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
$(parent).trigger(showEvent);
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
} // Disable totally Popper.js for Dropdown in Navbar
|
||||
|
||||
|
||||
if (!this._inNavbar) {
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
|
||||
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
var referenceElement = this._element;
|
||||
|
||||
if (this._config.reference === 'parent') {
|
||||
referenceElement = parent;
|
||||
} else if (Util.isElement(this._config.reference)) {
|
||||
} else if (isElement(this._config.reference)) {
|
||||
referenceElement = this._config.reference; // Check if it's jQuery element
|
||||
|
||||
if (typeof this._config.reference.jquery !== 'undefined') {
|
||||
@@ -214,7 +238,7 @@
|
||||
|
||||
|
||||
if (this._config.boundary !== 'scrollParent') {
|
||||
$(parent).addClass(ClassName.POSITION_STATIC);
|
||||
parent.classList.add(CLASS_NAME_POSITION_STATIC);
|
||||
}
|
||||
|
||||
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
|
||||
@@ -224,69 +248,54 @@
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {
|
||||
$(document.body).children().on('mouseover', null, $.noop);
|
||||
if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
|
||||
var _ref;
|
||||
|
||||
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
|
||||
return EventHandler.on(elem, 'mouseover', null, noop());
|
||||
});
|
||||
}
|
||||
|
||||
this._element.focus();
|
||||
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
};
|
||||
|
||||
_proto.show = function show() {
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$(parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
|
||||
Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_SHOWN, relatedTarget);
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {
|
||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown.getParentFromElement(this._element);
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var hideEvent = $.Event(Event.HIDE, relatedTarget);
|
||||
var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$(parent).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
if (this._popper) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
|
||||
Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
|
||||
Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
EventHandler.off(this._element, EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
|
||||
if (this._popper !== null) {
|
||||
if (this._popper) {
|
||||
this._popper.destroy();
|
||||
|
||||
this._popper = null;
|
||||
@@ -296,7 +305,7 @@
|
||||
_proto.update = function update() {
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
if (this._popper !== null) {
|
||||
if (this._popper) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
} // Private
|
||||
@@ -305,7 +314,7 @@
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this = this;
|
||||
|
||||
$(this._element).on(Event.CLICK, function (event) {
|
||||
EventHandler.on(this._element, EVENT_CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -314,46 +323,38 @@
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), Manipulator.getDataAttributes(this._element)), config);
|
||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
if (parent) {
|
||||
this._menu = parent.querySelector(Selector.MENU);
|
||||
}
|
||||
}
|
||||
|
||||
return this._menu;
|
||||
return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
|
||||
};
|
||||
|
||||
_proto._getPlacement = function _getPlacement() {
|
||||
var $parentDropdown = $(this._element.parentNode);
|
||||
var placement = AttachmentMap.BOTTOM; // Handle dropup
|
||||
var parentDropdown = this._element.parentNode;
|
||||
var placement = PLACEMENT_BOTTOM; // Handle dropup
|
||||
|
||||
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
|
||||
placement = AttachmentMap.TOP;
|
||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
||||
placement = PLACEMENT_TOP;
|
||||
|
||||
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.TOPEND;
|
||||
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_TOPEND;
|
||||
}
|
||||
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
|
||||
placement = AttachmentMap.RIGHT;
|
||||
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
|
||||
placement = AttachmentMap.LEFT;
|
||||
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.BOTTOMEND;
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT;
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
||||
placement = PLACEMENT_LEFT;
|
||||
} else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_BOTTOMEND;
|
||||
}
|
||||
|
||||
return placement;
|
||||
};
|
||||
|
||||
_proto._detectNavbar = function _detectNavbar() {
|
||||
return $(this._element).closest('.navbar').length > 0;
|
||||
return Boolean(this._element.closest("." + CLASS_NAME_NAVBAR));
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
@@ -363,7 +364,7 @@
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
|
||||
data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
@@ -384,9 +385,8 @@
|
||||
preventOverflow: {
|
||||
boundariesElement: this._config.boundary
|
||||
}
|
||||
} // Disable Popper.js if we have a static display
|
||||
|
||||
};
|
||||
}
|
||||
}; // Disable Popper.js if we have a static display
|
||||
|
||||
if (this._config.display === 'static') {
|
||||
popperConfig.modifiers.applyStyle = {
|
||||
@@ -394,42 +394,44 @@
|
||||
};
|
||||
}
|
||||
|
||||
return popperConfig;
|
||||
return _objectSpread(_objectSpread({}, popperConfig), this._config.popperConfig);
|
||||
} // Static
|
||||
;
|
||||
|
||||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
Dropdown.dropdownInterface = function dropdownInterface(element, config) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(element, _config);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
};
|
||||
|
||||
Dropdown.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
Dropdown.dropdownInterface(this, config);
|
||||
});
|
||||
};
|
||||
|
||||
Dropdown._clearMenus = function _clearMenus(event) {
|
||||
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
|
||||
Dropdown.clearMenus = function clearMenus(event) {
|
||||
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
|
||||
var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
|
||||
|
||||
for (var i = 0, len = toggles.length; i < len; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
|
||||
var context = $(toggles[i]).data(DATA_KEY);
|
||||
var parent = Dropdown.getParentFromElement(toggles[i]);
|
||||
var context = Data.getData(toggles[i], DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
@@ -444,46 +446,47 @@
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
|
||||
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||
if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
|
||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE, relatedTarget);
|
||||
$(parent).trigger(hideEvent);
|
||||
var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
continue;
|
||||
} // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(document.body).children().off('mouseover', null, $.noop);
|
||||
var _ref2;
|
||||
|
||||
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
|
||||
return EventHandler.off(elem, 'mouseover', null, noop());
|
||||
});
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
|
||||
if (context._popper) {
|
||||
context._popper.destroy();
|
||||
}
|
||||
|
||||
dropdownMenu.classList.remove(CLASS_NAME_SHOW);
|
||||
toggles[i].classList.remove(CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
|
||||
}
|
||||
};
|
||||
|
||||
Dropdown._getParentFromElement = function _getParentFromElement(element) {
|
||||
var parent;
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
Dropdown.getParentFromElement = function getParentFromElement(element) {
|
||||
return getElementFromSelector(element) || element.parentNode;
|
||||
};
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
return parent || element.parentNode;
|
||||
} // eslint-disable-next-line complexity
|
||||
;
|
||||
|
||||
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
|
||||
Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
|
||||
// If not input/textarea:
|
||||
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
||||
// If input/textarea:
|
||||
@@ -491,56 +494,59 @@
|
||||
// - If key is other than escape
|
||||
// - If key is not up or down => not a dropdown command
|
||||
// - If trigger inside the menu => not a dropdown command
|
||||
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 || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||
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)) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||
if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var parent = Dropdown.getParentFromElement(this);
|
||||
var isActive = this.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
|
||||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
|
||||
$(toggle).trigger('focus');
|
||||
}
|
||||
|
||||
$(this).trigger('click');
|
||||
if (event.key === ESCAPE_KEY) {
|
||||
var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0];
|
||||
button.focus();
|
||||
Dropdown.clearMenus();
|
||||
return;
|
||||
}
|
||||
|
||||
var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS));
|
||||
if (!isActive || event.key === SPACE_KEY) {
|
||||
Dropdown.clearMenus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (items.length === 0) {
|
||||
var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
|
||||
|
||||
if (!items.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var index = items.indexOf(event.target);
|
||||
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) {
|
||||
if (event.key === ARROW_UP_KEY && index > 0) {
|
||||
// Up
|
||||
index--;
|
||||
}
|
||||
|
||||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
|
||||
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
|
||||
// Down
|
||||
index++;
|
||||
}
|
||||
} // index is -1 if the first keydown is an ArrowUp
|
||||
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
index = index === -1 ? 0 : index;
|
||||
items[index].focus();
|
||||
};
|
||||
|
||||
Dropdown.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Dropdown, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -567,29 +573,40 @@
|
||||
*/
|
||||
|
||||
|
||||
$(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.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
|
||||
EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
|
||||
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle');
|
||||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
Dropdown.dropdownInterface(this, 'toggle');
|
||||
});
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
|
||||
return e.stopPropagation();
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .dropdown to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Dropdown._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Dropdown;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Dropdown._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Dropdown.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Dropdown;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Dropdown.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Dropdown;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=dropdown.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): 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');
|
||||
}
|
||||
})($);
|
||||
//# sourceMappingURL=index.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user