Compare commits
1386 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 |
+5
-7
@@ -4,14 +4,12 @@ module.exports = {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
bugfixes: true,
|
||||
modules: false
|
||||
modules: false,
|
||||
exclude: ['transform-typeof-symbol']
|
||||
}
|
||||
]
|
||||
],
|
||||
env: {
|
||||
test: {
|
||||
plugins: [ 'istanbul' ]
|
||||
}
|
||||
}
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-object-rest-spread'
|
||||
]
|
||||
};
|
||||
|
||||
+8
-8
@@ -3,11 +3,11 @@
|
||||
>= 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.16299
|
||||
iOS >= 10
|
||||
Safari >= 10
|
||||
Android >= 6
|
||||
not Explorer <= 11
|
||||
not ExplorerMobile <= 11
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-grid.min.css",
|
||||
"maxSize": "6.25 kB"
|
||||
"maxSize": "6 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap-reboot.css",
|
||||
@@ -16,29 +16,45 @@
|
||||
"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": "26 kB"
|
||||
"maxSize": "24 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.min.css",
|
||||
"maxSize": "23.75 kB"
|
||||
"maxSize": "21 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.js",
|
||||
"maxSize": "48 kB"
|
||||
"maxSize": "51 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.bundle.min.js",
|
||||
"maxSize": "21.75 kB"
|
||||
"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": "25.5 kB"
|
||||
"maxSize": "29 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/js/bootstrap.min.js",
|
||||
"maxSize": "15 kB"
|
||||
"maxSize": "16 kB"
|
||||
}
|
||||
],
|
||||
"ci": {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# https://dependabot.com/docs/config-file/
|
||||
version: 1
|
||||
update_configs:
|
||||
- package_manager: "javascript"
|
||||
directory: "/"
|
||||
update_schedule: "weekly"
|
||||
default_reviewers:
|
||||
- "XhmikosR"
|
||||
default_labels:
|
||||
- "dependencies"
|
||||
- "v5"
|
||||
version_requirement_updates: "increase_versions"
|
||||
@@ -9,6 +9,3 @@ indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
**/*.min.js
|
||||
**/dist/
|
||||
**/vendor/
|
||||
/_site/
|
||||
/_gh_pages/
|
||||
/js/coverage/
|
||||
/site/static/sw.js
|
||||
/package.js
|
||||
|
||||
+10
-29
@@ -4,16 +4,11 @@
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:unicorn/recommended",
|
||||
"xo",
|
||||
"xo/esnext",
|
||||
"xo/browser"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-body-style": "off",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
@@ -26,50 +21,36 @@
|
||||
"warn",
|
||||
5
|
||||
],
|
||||
"new-cap": [
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
{
|
||||
"properties": false
|
||||
}
|
||||
"always-multiline"
|
||||
],
|
||||
"new-cap": "off",
|
||||
"no-console": "error",
|
||||
"no-mixed-operators": "off",
|
||||
"no-negated-condition": "off",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"operator-linebreak": [
|
||||
"error",
|
||||
"after"
|
||||
],
|
||||
"prefer-named-capture-group": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/explicit-length-check": "off",
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-array-method-this-argument": "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/numeric-separators-style": "off",
|
||||
"unicorn/prefer-array-find": "off",
|
||||
"unicorn/prefer-array-flat": "off",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-dom-node-dataset": "off",
|
||||
"unicorn/prefer-dom-node-remove": "off",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-math-trunc": "off",
|
||||
"unicorn/prefer-module": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-node-remove": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-optional-catch-binding": "off",
|
||||
"unicorn/prefer-prototype-methods": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-reflect-apply": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
|
||||
+22
-26
@@ -18,9 +18,9 @@ the preferred channel for [bug reports](#bug-reports), [features requests](#feat
|
||||
and [submitting pull requests](#pull-requests), but please respect the following
|
||||
restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||
Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag),
|
||||
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](/README.md#community) are better places to get help.
|
||||
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||
respect the opinions of others.
|
||||
@@ -58,14 +58,14 @@ Good bug reports are extremely helpful, so thanks!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
0. **[validate your HTML](https://html5.validator.nu/)** to ensure your
|
||||
0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your
|
||||
problem isn't caused by a simple error in your own code.
|
||||
|
||||
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 `v4-dev` 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,14 +100,13 @@ 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 |
|
||||
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
|
||||
| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. |
|
||||
| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit | In Apple's bug reporter, choose "Safari" as the product. |
|
||||
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. |
|
||||
| Microsoft | Edge | Blink | https://developer.microsoft.com/en-us/microsoft-edge/ | Go to "Help > Send Feedback" from the browser |
|
||||
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
|
||||
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. |
|
||||
| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit <br> https://bugreport.apple.com/ | In Apple's bug reporter, choose "Safari" as the product. |
|
||||
| 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/ | |
|
||||
|
||||
|
||||
## Feature requests
|
||||
@@ -124,25 +123,23 @@ Good pull requests—patches, improvements, new features—are a fantastic
|
||||
help. They should remain focused in scope and avoid containing unrelated
|
||||
commits.
|
||||
|
||||
**Please ask first** before embarking on any **significant** pull request (e.g.
|
||||
**Please ask first** before embarking on any significant pull request (e.g.
|
||||
implementing features, refactoring code, porting to a different language),
|
||||
otherwise you risk spending a lot of time working on something that the
|
||||
project's developers might not want to merge into the project. For trivial
|
||||
things, or things that don't require a lot of your time, you can go ahead and
|
||||
make a PR.
|
||||
project's developers might not want to merge into the project.
|
||||
|
||||
Please adhere to the [coding guidelines](#code-guidelines) used throughout the
|
||||
project (indentation, accurate comments, etc.) and any other requirements
|
||||
(such as test coverage).
|
||||
|
||||
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
|
||||
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
|
||||
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/v4-dev/scss)
|
||||
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/src) instead.
|
||||
**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/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/site/content/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/content/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.
|
||||
|
||||
@@ -164,8 +161,8 @@ included in the project:
|
||||
2. If you cloned a while ago, get the latest changes from upstream:
|
||||
|
||||
```bash
|
||||
git checkout v4-dev
|
||||
git pull upstream v4-dev
|
||||
git checkout main
|
||||
git pull upstream main
|
||||
```
|
||||
|
||||
3. Create a new topic branch (off the main project development branch) to
|
||||
@@ -184,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 v4-dev
|
||||
git pull [--rebase] upstream main
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
@@ -194,7 +191,7 @@ 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 `v4-dev` 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
|
||||
@@ -218,7 +215,7 @@ includes code changes) and under the terms of the
|
||||
[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://www.a11yproject.com/posts/2013-01-25-never-remove-css-outlines/) for more details.
|
||||
- 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.
|
||||
|
||||
### JS
|
||||
|
||||
@@ -226,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
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
open_collective: bootstrap
|
||||
@@ -1,9 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Tell us about a bug you may have identified in Bootstrap.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -11,10 +8,10 @@ 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/) any HTML to avoid common problems
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
|
||||
- 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)
|
||||
- Browser and version (Chrome, Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, Android Browser)
|
||||
- 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,16 +1,13 @@
|
||||
---
|
||||
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/v4-dev/.github/CONTRIBUTING.md)
|
||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
||||
|
||||
Feature requests must include:
|
||||
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports.
|
||||
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.libera.chat` server, in the `#bootstrap` channel.
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
|
||||
|
||||
@@ -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
|
||||
@@ -1,28 +1,31 @@
|
||||
name: BrowserStack
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
browserstack:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'twbs/bootstrap' && (!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]'))
|
||||
timeout-minutes: 30
|
||||
if: github.repository == 'twbs/bootstrap'
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- 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
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
name: Bundlewatch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
bundlewatch:
|
||||
@@ -17,13 +10,21 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- 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
|
||||
@@ -35,4 +36,3 @@ jobs:
|
||||
run: npm run bundlewatch
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
CI_BRANCH_BASE: v4-dev
|
||||
|
||||
@@ -1,38 +1,25 @@
|
||||
name: "CodeQL"
|
||||
name: "Code Scanning - Action"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v4-dev
|
||||
- "!dependabot/**"
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches:
|
||||
- main
|
||||
- v4-dev
|
||||
- "!dependabot/**"
|
||||
schedule:
|
||||
- cron: "0 2 * * 5"
|
||||
workflow_dispatch:
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
CodeQL-Build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
languages: javascript
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
+15
-14
@@ -1,15 +1,8 @@
|
||||
name: CSS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
css:
|
||||
@@ -17,13 +10,21 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- 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
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
name: CSS (Dart Sass)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
css:
|
||||
@@ -17,10 +10,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
|
||||
+17
-27
@@ -1,15 +1,8 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
@@ -17,29 +10,26 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- 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: Build docs
|
||||
run: npm run docs-build
|
||||
|
||||
- name: Validate HTML
|
||||
run: npm run docs-vnu
|
||||
|
||||
- name: Run linkinator
|
||||
uses: JustinBeckwith/linkinator-action@v1
|
||||
with:
|
||||
paths: _site
|
||||
recurse: true
|
||||
verbosity: error
|
||||
skip: "^(?!http://localhost)"
|
||||
- name: Test docs
|
||||
run: npm run docs
|
||||
|
||||
+23
-17
@@ -1,30 +1,35 @@
|
||||
name: JS Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: JS Tests
|
||||
name: Node ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [10, 12]
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ env.NODE }}
|
||||
cache: npm
|
||||
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
|
||||
@@ -36,7 +41,8 @@ jobs:
|
||||
run: npm run js-test
|
||||
|
||||
- name: Run Coveralls
|
||||
uses: coverallsapp/github-action@1.1.3
|
||||
uses: coverallsapp/github-action@master
|
||||
if: matrix.node == 12
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
path-to-lcov: "./js/coverage/lcov.info"
|
||||
|
||||
+15
-14
@@ -1,15 +1,8 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE: 16
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -17,13 +10,21 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Set Node.js version
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- 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
|
||||
|
||||
@@ -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 }}
|
||||
+13
-6
@@ -1,8 +1,18 @@
|
||||
# Ignore docs files
|
||||
/_site/
|
||||
# Hugo files
|
||||
/_gh_pages/
|
||||
# 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/
|
||||
/.hugo_build.lock
|
||||
|
||||
# Ignore ruby/bundler files;
|
||||
# keeping them here so that when we switch branches they don't show up
|
||||
/.bundle/
|
||||
/vendor/
|
||||
/.ruby-version
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
@@ -29,9 +39,6 @@
|
||||
*.sublime-workspace
|
||||
nbproject
|
||||
Thumbs.db
|
||||
/.vscode/
|
||||
# Local Netlify folder
|
||||
.netlify
|
||||
|
||||
# Komodo
|
||||
.komodotools
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
**/*.min.css
|
||||
**/dist/
|
||||
**/vendor/
|
||||
/_site/
|
||||
/_gh_pages/
|
||||
/js/coverage/
|
||||
|
||||
+9
-9
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-twbs-bootstrap"
|
||||
"stylelint-config-twbs-bootstrap/scss"
|
||||
],
|
||||
"rules": {
|
||||
"declaration-property-value-disallowed-list": {
|
||||
"border": "none",
|
||||
"outline": "none"
|
||||
},
|
||||
"function-disallowed-list": [
|
||||
"calc"
|
||||
],
|
||||
"property-disallowed-list": [
|
||||
"property-blacklist": [
|
||||
"border-radius",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-bottom-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"transition"
|
||||
],
|
||||
"function-blacklist": ["calc"],
|
||||
"scss/dollar-variable-default": [
|
||||
true,
|
||||
{
|
||||
"ignore": "local"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+14
-11
@@ -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
|
||||
|
||||
@@ -40,4 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org/
|
||||
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2022 Twitter, Inc.
|
||||
Copyright (c) 2011-2022 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.6/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.6/"><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_report.md">Report bug</a>
|
||||
<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=feature_request.md">Request feature</a>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature.md&labels=feature">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,38 +46,38 @@
|
||||
|
||||
Several quick start options are available:
|
||||
|
||||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.6.2.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.6.2`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.6.2`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@next`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@5.0.0`
|
||||
- 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.6/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://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av4-dev)
|
||||
[](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://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
|
||||
[](https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.min.css)
|
||||
[](https://github.com/twbs/bootstrap/blob/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
|
||||
|
||||
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
|
||||
|
||||
<details><summary>Download contents</summary>
|
||||
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
|
||||
|
||||
```text
|
||||
bootstrap/
|
||||
@@ -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,50 +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
|
||||
```
|
||||
</details>
|
||||
|
||||
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/v4-dev/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
||||
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 [Hugo](https://gohugo.io/) 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/assets/js/search.js`.
|
||||
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 `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. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
|
||||
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 Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
||||
|
||||
### Documentation for previous releases
|
||||
|
||||
You can find all our previous releases docs on <https://getbootstrap.com/docs/versions/>.
|
||||
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/v4-dev/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/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/v4-dev/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
||||
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/v4-dev/.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
|
||||
@@ -148,7 +160,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
|
||||
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
|
||||
- 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.libera.chat` server, in the `#bootstrap` channel.
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
|
||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||
|
||||
@@ -186,16 +198,16 @@ Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infras
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
||||
|
||||
[](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
|
||||
@@ -207,4 +219,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Code and documentation copyright 2011-2022 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
||||
Code and documentation copyright 2011–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/).
|
||||
|
||||
+120
-24
@@ -2,8 +2,8 @@
|
||||
|
||||
/*!
|
||||
* Script to build our plugins to use them separately.
|
||||
* Copyright 2020-2022 The Bootstrap Authors
|
||||
* Copyright 2020-2022 Twitter, Inc.
|
||||
* Copyright 2020 The Bootstrap Authors
|
||||
* Copyright 2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -14,16 +14,20 @@ 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({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include the helpers in each file, at most one copy of each
|
||||
babelHelpers: 'bundled'
|
||||
// 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'),
|
||||
@@ -34,33 +38,125 @@ 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/')
|
||||
|
||||
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`
|
||||
const bundle = await rollup.rollup({
|
||||
input: bsPlugins[plugin],
|
||||
plugins,
|
||||
@@ -73,7 +169,7 @@ const build = async plugin => {
|
||||
name: plugin,
|
||||
sourcemap: true,
|
||||
globals,
|
||||
file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
|
||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
||||
})
|
||||
|
||||
console.log(`Building ${plugin} plugin... Done!`)
|
||||
|
||||
+76
-45
@@ -2,80 +2,111 @@
|
||||
|
||||
/*!
|
||||
* Script to update version number references in the project.
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs').promises
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const globby = require('globby')
|
||||
const sh = require('shelljs')
|
||||
|
||||
const VERBOSE = process.argv.includes('--verbose')
|
||||
const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-run')
|
||||
|
||||
// These are the filetypes we only care about replacing the version
|
||||
const GLOB = [
|
||||
'**/*.{css,html,js,json,md,scss,txt,yml}'
|
||||
]
|
||||
const GLOBBY_OPTIONS = {
|
||||
cwd: path.join(__dirname, '..'),
|
||||
gitignore: true
|
||||
}
|
||||
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, '$$')
|
||||
}
|
||||
|
||||
async function replaceRecursively(file, oldVersion, newVersion) {
|
||||
const originalString = await fs.readFile(file, 'utf8')
|
||||
const newString = originalString.replace(
|
||||
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
|
||||
)
|
||||
const DRY_RUN = false
|
||||
|
||||
// No need to move any further if the strings are identical
|
||||
if (originalString === newString) {
|
||||
function walkAsync(directory, excludedDirectories, fileCallback, errback) {
|
||||
if (excludedDirectories.has(path.parse(directory).base)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (VERBOSE) {
|
||||
console.log(`FILE: ${file}`)
|
||||
}
|
||||
fs.readdir(directory, (err, names) => {
|
||||
if (err) {
|
||||
errback(err)
|
||||
return
|
||||
}
|
||||
|
||||
if (DRY_RUN) {
|
||||
return
|
||||
}
|
||||
names.forEach(name => {
|
||||
const filepath = path.join(directory, name)
|
||||
fs.lstat(filepath, (err, stats) => {
|
||||
if (err) {
|
||||
process.nextTick(errback, err)
|
||||
return
|
||||
}
|
||||
|
||||
await fs.writeFile(file, newString, 'utf8')
|
||||
if (stats.isDirectory()) {
|
||||
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
|
||||
} else if (stats.isFile()) {
|
||||
process.nextTick(fileCallback, filepath)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function main(args) {
|
||||
let [oldVersion, newVersion] = args
|
||||
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}`)
|
||||
}
|
||||
} :
|
||||
filepath => {
|
||||
if (allowedExtensions.has(path.parse(filepath).ext)) {
|
||||
sh.sed('-i', original, replacement, filepath)
|
||||
}
|
||||
}
|
||||
|
||||
if (!oldVersion || !newVersion) {
|
||||
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
|
||||
walkAsync(directory, excludedDirectories, updateFile, err => {
|
||||
console.error('ERROR while traversing directory!:')
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
function main(args) {
|
||||
if (args.length !== 2) {
|
||||
console.error('USAGE: change-version old_version new_version')
|
||||
console.error('Got arguments:', args)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
|
||||
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
|
||||
|
||||
try {
|
||||
const files = await globby(GLOB, GLOBBY_OPTIONS)
|
||||
|
||||
await Promise.all(files.map(file => replaceRecursively(file, oldVersion, newVersion)))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
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
|
||||
'',
|
||||
'.css',
|
||||
'.html',
|
||||
'.js',
|
||||
'.json',
|
||||
'.md',
|
||||
'.scss',
|
||||
'.txt',
|
||||
'.yml'
|
||||
])
|
||||
replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion)
|
||||
}
|
||||
|
||||
main(process.argv.slice(2))
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* Remember to use the same vendor files as the CDN ones,
|
||||
* otherwise the hashes won't match!
|
||||
*
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,6 @@ 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')
|
||||
@@ -39,10 +37,6 @@ const files = [
|
||||
file: 'dist/js/bootstrap.bundle.min.js',
|
||||
configPropertyName: 'js_bundle_hash'
|
||||
},
|
||||
{
|
||||
file: `site/static/docs/${pkg.config.version_short}/assets/js/vendor/jquery.slim.min.js`,
|
||||
configPropertyName: 'jquery_hash'
|
||||
},
|
||||
{
|
||||
file: 'node_modules/popper.js/dist/umd/popper.min.js',
|
||||
configPropertyName: 'popper_hash'
|
||||
@@ -61,6 +55,6 @@ files.forEach(file => {
|
||||
|
||||
console.log(`${file.configPropertyName}: ${integrity}`)
|
||||
|
||||
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
|
||||
sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile)
|
||||
})
|
||||
})
|
||||
|
||||
+12
-14
@@ -1,18 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = ctx => {
|
||||
return {
|
||||
map: ctx.file.dirname.includes('examples') ?
|
||||
false :
|
||||
{
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
}
|
||||
module.exports = ctx => ({
|
||||
map: ctx.file.dirname.includes('examples') ?
|
||||
false :
|
||||
{
|
||||
inline: false,
|
||||
annotation: true,
|
||||
sourcesContent: true
|
||||
},
|
||||
plugins: {
|
||||
autoprefixer: {
|
||||
cascade: false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+18
-13
@@ -2,43 +2,48 @@
|
||||
|
||||
const path = require('path')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const resolve = require('@rollup/plugin-node-resolve')
|
||||
const banner = require('./banner.js')
|
||||
|
||||
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({
|
||||
// Only transpile our source code
|
||||
// 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(nodeResolve())
|
||||
plugins.push(resolve())
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
input: path.resolve(__dirname, '../js/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
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
#
|
||||
# Usage
|
||||
# ---------------
|
||||
# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`.
|
||||
# 2. Within `bs-docs` copy, switch to `gh-pages` branch.
|
||||
# 3. Pull latest, re-bundle, re-npm.
|
||||
# 4. Run script.
|
||||
|
||||
red=$'\e[1;31m'
|
||||
green=$'\e[1;32m'
|
||||
#blue=$'\e[1;34m'
|
||||
magenta=$'\e[1;35m'
|
||||
#cyan=$'\e[1;36m'
|
||||
end=$'\e[0m'
|
||||
|
||||
# Get current version from package.json
|
||||
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"
|
||||
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 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"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
@@ -0,0 +1,59 @@
|
||||
# Usage:
|
||||
# install svgo globally: `npm i -g svgo`
|
||||
# svgo --config=build/svgo.yml --input=foo.svg
|
||||
|
||||
# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md
|
||||
# replace default config
|
||||
|
||||
multipass: true
|
||||
#full: true
|
||||
|
||||
# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
|
||||
|
||||
js2svg:
|
||||
pretty: true
|
||||
indent: 2
|
||||
|
||||
plugins:
|
||||
# - addAttributesToSVGElement:
|
||||
# attributes:
|
||||
# - focusable: false
|
||||
- cleanupAttrs: true
|
||||
- cleanupEnableBackground: true
|
||||
- cleanupIDs: true
|
||||
- cleanupListOfValues: true
|
||||
- cleanupNumericValues: true
|
||||
- collapseGroups: true
|
||||
- convertColors: true
|
||||
- convertPathData: true
|
||||
- convertShapeToPath: true
|
||||
- convertStyleToAttrs: true
|
||||
- convertTransform: true
|
||||
- inlineStyles: true
|
||||
- mergePaths: true
|
||||
- minifyStyles: true
|
||||
- moveElemsAttrsToGroup: true
|
||||
- moveGroupAttrsToElems: true
|
||||
- removeAttrs:
|
||||
attrs:
|
||||
- "data-name"
|
||||
- removeComments: true
|
||||
- removeDesc: true
|
||||
- removeDoctype: true
|
||||
- removeEditorsNSData: true
|
||||
- removeEmptyAttrs: true
|
||||
- removeEmptyContainers: true
|
||||
- removeEmptyText: true
|
||||
- removeHiddenElems: true
|
||||
- removeMetadata: true
|
||||
- removeNonInheritableGroupAttrs: true
|
||||
- removeTitle: false
|
||||
- removeUnknownsAndDefaults:
|
||||
keepRoleAttr: true
|
||||
- removeUnusedNS: true
|
||||
- removeUselessDefs: true
|
||||
- removeUselessStrokeAndFill: true
|
||||
- removeViewBox: false
|
||||
- removeXMLNS: false
|
||||
- removeXMLProcInst: true
|
||||
- sortAttrs: true
|
||||
+21
-15
@@ -2,17 +2,17 @@
|
||||
|
||||
/*!
|
||||
* Script to run vnu-jar if Java is available.
|
||||
* Copyright 2017-2022 The Bootstrap Authors
|
||||
* Copyright 2017-2022 Twitter, Inc.
|
||||
* Copyright 2017-2020 The Bootstrap Authors
|
||||
* Copyright 2017-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const { execFile, spawn } = require('child_process')
|
||||
const childProcess = require('child_process')
|
||||
const vnu = require('vnu-jar')
|
||||
|
||||
execFile('java', ['-version'], (error, stdout, stderr) => {
|
||||
childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error('Skipping vnu-jar test; Java is missing.')
|
||||
return
|
||||
@@ -21,29 +21,35 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
|
||||
const is32bitJava = !/64-Bit/.test(stderr)
|
||||
|
||||
// vnu-jar accepts multiple ignores joined with a `|`.
|
||||
// Also note that the ignores are string regular expressions.
|
||||
// Also note that the ignores are regular expressions.
|
||||
const ignores = [
|
||||
// "autocomplete" is included in <button> and checkboxes and radio <input>s due to
|
||||
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
|
||||
'Attribute “autocomplete” is only allowed when the input type is.*',
|
||||
'Attribute “autocomplete” not allowed on element “button” at this point.',
|
||||
// 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”.',
|
||||
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
|
||||
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
|
||||
// and offer more robust alternatives, but also need to show a less-than-ideal example
|
||||
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.'
|
||||
// Markup used in Components → Forms → Layout → Form grid → Horizontal form is currently invalid,
|
||||
// but used this way due to lack of support for flexbox layout on <fieldset> element in most browsers
|
||||
'Element “legend” not allowed as child of element “div” in this context.*',
|
||||
// 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 “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 = [
|
||||
'-jar',
|
||||
`"${vnu}"`,
|
||||
vnu,
|
||||
'--asciiquotes',
|
||||
'--skip-non-html',
|
||||
// Ignore the language code warnings
|
||||
'--no-langdetect',
|
||||
'--Werror',
|
||||
`--filterpattern "${ignores}"`,
|
||||
'_site/',
|
||||
'_gh_pages/',
|
||||
'js/tests/'
|
||||
]
|
||||
|
||||
@@ -52,7 +58,7 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
|
||||
args.splice(0, 0, '-Xss512k')
|
||||
}
|
||||
|
||||
return spawn('java', args, {
|
||||
return childProcess.spawn('java', args, {
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
})
|
||||
|
||||
+20
-49
@@ -3,7 +3,7 @@
|
||||
/*!
|
||||
* Script to create the built examples zip archive;
|
||||
* requires the `zip` command to be present!
|
||||
* Copyright 2020-2022 The Bootstrap Authors
|
||||
* Copyright 2020 The Bootstrap Authors
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -12,65 +12,36 @@
|
||||
const path = require('path')
|
||||
const sh = require('shelljs')
|
||||
|
||||
const pkg = require('../package.json')
|
||||
const { version, version_short: versionShort } = require('../package.json')
|
||||
|
||||
const versionShort = pkg.config.version_short
|
||||
const distFolder = `bootstrap-${pkg.version}-examples`
|
||||
const rootDocsDir = '_site'
|
||||
const docsDir = `${rootDocsDir}/docs/${versionShort}/`
|
||||
|
||||
// these are the files we need in the examples
|
||||
const cssFiles = [
|
||||
'bootstrap.min.css',
|
||||
'bootstrap.min.css.map'
|
||||
]
|
||||
const jsFiles = [
|
||||
'bootstrap.bundle.min.js',
|
||||
'bootstrap.bundle.min.js.map'
|
||||
]
|
||||
const imgFiles = [
|
||||
'bootstrap-outline.svg',
|
||||
'bootstrap-solid.svg'
|
||||
]
|
||||
const folderName = `bootstrap-${version}-examples`
|
||||
|
||||
sh.config.fatal = true
|
||||
|
||||
if (!sh.test('-d', rootDocsDir)) {
|
||||
throw new Error(`The "${rootDocsDir}" folder does not exist, did you forget building the docs?`)
|
||||
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/zip with the same name
|
||||
sh.rm('-rf', [distFolder, `${distFolder}.zip`])
|
||||
|
||||
// remove any previously created folder with the same name
|
||||
sh.rm('-rf', folderName)
|
||||
// create any folders so that `cp` works
|
||||
sh.mkdir('-p', [
|
||||
distFolder,
|
||||
`${distFolder}/assets/brand/`,
|
||||
`${distFolder}/assets/dist/css/`,
|
||||
`${distFolder}/assets/dist/js/`
|
||||
])
|
||||
sh.mkdir('-p', folderName)
|
||||
sh.mkdir('-p', `${folderName}/assets/brand/`)
|
||||
|
||||
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
|
||||
|
||||
cssFiles.forEach(file => {
|
||||
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
|
||||
})
|
||||
|
||||
jsFiles.forEach(file => {
|
||||
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
|
||||
})
|
||||
|
||||
imgFiles.forEach(file => {
|
||||
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
|
||||
})
|
||||
|
||||
sh.rm(`${distFolder}/index.html`)
|
||||
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(`${distFolder}/**/*.html`).forEach(file => {
|
||||
sh.find(`${folderName}/**/*.html`).forEach(file => {
|
||||
const fileContents = sh.cat(file)
|
||||
.toString()
|
||||
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
||||
@@ -82,7 +53,7 @@ sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
||||
})
|
||||
|
||||
// create the zip file
|
||||
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
|
||||
sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, { fatal: true })
|
||||
|
||||
// remove the folder we created
|
||||
sh.rm('-rf', distFolder)
|
||||
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"
|
||||
}
|
||||
|
||||
+23
-32
@@ -1,15 +1,8 @@
|
||||
languageCode: "en"
|
||||
title: "Bootstrap"
|
||||
baseURL: "https://getbootstrap.com"
|
||||
baseURL: "https://v5.getbootstrap.com"
|
||||
enableInlineShortcodes: true
|
||||
|
||||
security:
|
||||
enableInlineShortcodes: true
|
||||
funcs:
|
||||
getenv:
|
||||
- ^HUGO_
|
||||
- NETLIFY
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
renderer:
|
||||
@@ -25,14 +18,14 @@ buildFuture: true
|
||||
|
||||
enableRobotsTXT: true
|
||||
metaDataFormat: "yaml"
|
||||
disableKinds: ["404", "taxonomy", "term", "RSS"]
|
||||
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
||||
|
||||
publishDir: "_site"
|
||||
publishDir: "_gh_pages"
|
||||
|
||||
module:
|
||||
mounts:
|
||||
- source: dist
|
||||
target: static/docs/4.6/dist
|
||||
target: static/docs/5.0/dist
|
||||
- source: site/assets
|
||||
target: assets
|
||||
- source: site/content
|
||||
@@ -43,21 +36,21 @@ module:
|
||||
target: layouts
|
||||
- source: site/static
|
||||
target: static
|
||||
- source: site/static/docs/4.6/assets/img/favicons/apple-touch-icon.png
|
||||
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
|
||||
target: static/apple-touch-icon.png
|
||||
- source: site/static/docs/4.6/assets/img/favicons/favicon.ico
|
||||
- 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/4.6/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/4.6/assets/brand/bootstrap-social-logo.png
|
||||
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: "4.6.2"
|
||||
current_ruby_version: "4.6.2"
|
||||
docs_version: "4.6"
|
||||
rfs_version: "v8.1.0"
|
||||
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"
|
||||
@@ -69,19 +62,17 @@ params:
|
||||
icons: "https://icons.getbootstrap.com/"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v4.6.2.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v4.6.2/bootstrap-4.6.2-dist.zip"
|
||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.6.2/bootstrap-4.6.2-examples.zip"
|
||||
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://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
|
||||
css_hash: "sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
|
||||
js: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"
|
||||
js_hash: "sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+"
|
||||
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
|
||||
jquery: "https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
|
||||
jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
|
||||
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
||||
popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
||||
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
+3343
-3263
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
+170
-69
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* 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,26 +11,16 @@
|
||||
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", "Liberation 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:not(:focus-visible) {
|
||||
@@ -38,14 +28,70 @@ body {
|
||||
}
|
||||
|
||||
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,22 +178,15 @@ sup {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
a:hover {
|
||||
color: #024dbc;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]):hover {
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -152,36 +200,63 @@ 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 {
|
||||
@@ -189,17 +264,28 @@ th {
|
||||
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 {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
@@ -231,6 +317,10 @@ select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
@@ -245,22 +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;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
@@ -272,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 {
|
||||
@@ -310,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
+4
-4
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* 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","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
*/*,::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
+5731
-6334
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
+2305
-1598
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
+3
-3
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
+2292
-1582
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
+3
-3
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
+149
-74
@@ -1,62 +1,132 @@
|
||||
/*!
|
||||
* Bootstrap alert.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* 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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : 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';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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;
|
||||
}
|
||||
|
||||
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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.6.2';
|
||||
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 = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_ALERT = 'alert';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
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 SELECTOR_DISMISS = '[data-dismiss="alert"]';
|
||||
var CLASSNAME_ALERT = 'alert';
|
||||
var CLASSNAME_FADE = 'fade';
|
||||
var CLASSNAME_SHOW = 'show';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Alert = /*#__PURE__*/function () {
|
||||
function Alert(element) {
|
||||
this._element = element;
|
||||
|
||||
if (this._element) {
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -72,7 +142,7 @@
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
if (customEvent === null || customEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -80,62 +150,52 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getRootElement = function _getRootElement(element) {
|
||||
var selector = Util__default["default"].getSelectorFromElement(element);
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
|
||||
};
|
||||
|
||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||
var closeEvent = $__default["default"].Event(EVENT_CLOSE);
|
||||
$__default["default"](element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
return EventHandler.trigger(element, EVENT_CLOSE);
|
||||
};
|
||||
|
||||
_proto._removeElement = function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
$__default["default"](element).removeClass(CLASS_NAME_SHOW);
|
||||
element.classList.remove(CLASSNAME_SHOW);
|
||||
|
||||
if (!$__default["default"](element).hasClass(CLASS_NAME_FADE)) {
|
||||
if (!element.classList.contains(CLASSNAME_FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(element);
|
||||
$__default["default"](element).one(Util__default["default"].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) {
|
||||
$__default["default"](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 = $__default["default"](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') {
|
||||
@@ -144,7 +204,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||
Alert.handleDismiss = function handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
@@ -154,6 +214,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
Alert.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Alert, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -164,24 +228,35 @@
|
||||
return Alert;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](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
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Alert._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Alert;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].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
+72
-155
@@ -1,68 +1,62 @@
|
||||
/*!
|
||||
* Bootstrap button.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* 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 = typeof globalThis !== 'undefined' ? globalThis : 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';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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;
|
||||
};
|
||||
|
||||
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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.6.2';
|
||||
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 = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_BUTTON = 'btn';
|
||||
var CLASS_NAME_FOCUS = 'focus';
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
|
||||
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
|
||||
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
|
||||
var SELECTOR_INPUT = 'input:not([type="hidden"])';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_BUTTON = '.btn';
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Button = /*#__PURE__*/function () {
|
||||
function Button(element) {
|
||||
this._element = element;
|
||||
this.shouldAvoidTriggerChange = false;
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -70,77 +64,34 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
|
||||
|
||||
if (rootElement) {
|
||||
var input = this._element.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
|
||||
|
||||
if (activeElement) {
|
||||
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
|
||||
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
if (!this.shouldAvoidTriggerChange) {
|
||||
$__default["default"](input).trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
$__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
// 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() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
|
||||
Button.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default["default"](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
data.shouldAvoidTriggerChange = avoidTriggerChange;
|
||||
|
||||
if (config === 'toggle') {
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Button.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Button, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -151,79 +102,45 @@
|
||||
return Button;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = event.target;
|
||||
var initialButton = button;
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
var button = event.target.closest(SELECTOR_DATA_TOGGLE);
|
||||
var data = Data.getData(button, DATA_KEY);
|
||||
|
||||
if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
|
||||
button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
|
||||
if (!data) {
|
||||
data = new Button(button);
|
||||
}
|
||||
|
||||
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
|
||||
event.preventDefault(); // work around Firefox bug #1540995
|
||||
} else {
|
||||
var inputBtn = button.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
|
||||
event.preventDefault(); // work around Firefox bug #1540995
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
|
||||
Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
|
||||
}
|
||||
}
|
||||
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
|
||||
$__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
|
||||
});
|
||||
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
|
||||
// ensure correct active class is set to match the controls' actual values/states
|
||||
// find all checkboxes/readio buttons inside data-toggle groups
|
||||
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
|
||||
|
||||
for (var i = 0, len = buttons.length; i < len; i++) {
|
||||
var button = buttons[i];
|
||||
var input = button.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (input.checked || input.hasAttribute('checked')) {
|
||||
button.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
button.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
} // find all button toggles
|
||||
|
||||
|
||||
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||
|
||||
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
|
||||
var _button = buttons[_i];
|
||||
|
||||
if (_button.getAttribute('aria-pressed') === 'true') {
|
||||
_button.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
_button.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
data.toggle();
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .button to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Button._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Button;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].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
-220
@@ -1,80 +1,183 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* 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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : 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';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
var getElementFromSelector = function getElementFromSelector(element) {
|
||||
var selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var _window$getComputedSt = window.getComputedStyle(element),
|
||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||
|
||||
var floatTransitionDuration = 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);
|
||||
};
|
||||
|
||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
||||
Object.keys(configTypes).forEach(function (property) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var isVisible = function isVisible(element) {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (element.style && element.parentNode && element.parentNode.style) {
|
||||
var elementStyle = getComputedStyle(element);
|
||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var reflow = function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
||||
var getjQuery = function getjQuery() {
|
||||
var _window = window,
|
||||
jQuery = _window.jQuery;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'carousel';
|
||||
var VERSION = '4.6.2';
|
||||
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 = $__default["default"].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;
|
||||
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 Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: 'hover',
|
||||
wrap: true,
|
||||
touch: true
|
||||
};
|
||||
var DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
slide: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
var DIRECTION_NEXT = 'next';
|
||||
var DIRECTION_PREV = 'prev';
|
||||
var DIRECTION_LEFT = 'left';
|
||||
@@ -92,6 +195,14 @@
|
||||
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';
|
||||
@@ -100,28 +211,14 @@
|
||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
||||
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
|
||||
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: 'hover',
|
||||
wrap: true,
|
||||
touch: true
|
||||
};
|
||||
var DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
slide: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
var PointerType = {
|
||||
TOUCH: 'touch',
|
||||
PEN: 'pen'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Carousel = /*#__PURE__*/function () {
|
||||
@@ -136,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
|
||||
|
||||
|
||||
@@ -154,10 +253,9 @@
|
||||
};
|
||||
|
||||
_proto.nextWhenVisible = function nextWhenVisible() {
|
||||
var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
|
||||
// Don't call next when the page isn't visible
|
||||
// or the carousel or its parent isn't visible
|
||||
|
||||
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
|
||||
if (!document.hidden && isVisible(this._element)) {
|
||||
this.next();
|
||||
}
|
||||
};
|
||||
@@ -173,8 +271,8 @@
|
||||
this._isPaused = true;
|
||||
}
|
||||
|
||||
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
|
||||
Util__default["default"].triggerTransitionEnd(this._element);
|
||||
if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
|
||||
triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
||||
@@ -192,9 +290,7 @@
|
||||
this._interval = null;
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._updateInterval();
|
||||
|
||||
if (this._config && this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||
}
|
||||
};
|
||||
@@ -202,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);
|
||||
|
||||
@@ -211,7 +307,7 @@
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
$__default["default"](this._element).one(EVENT_SLID, function () {
|
||||
EventHandler.one(this._element, EVENT_SLID, function () {
|
||||
return _this.to(index);
|
||||
});
|
||||
return;
|
||||
@@ -229,8 +325,8 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"](this._element).off(EVENT_KEY);
|
||||
$__default["default"].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;
|
||||
@@ -243,8 +339,8 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
|
||||
config = _objectSpread(_objectSpread({}, Default), config);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
@@ -272,20 +368,21 @@
|
||||
var _this2 = this;
|
||||
|
||||
if (this._config.keyboard) {
|
||||
$__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
|
||||
return _this2._keydown(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
$__default["default"](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();
|
||||
}
|
||||
};
|
||||
@@ -293,26 +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
|
||||
_this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
|
||||
if (event.touches && event.touches.length > 1) {
|
||||
_this3.touchDeltaX = 0;
|
||||
} else {
|
||||
_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();
|
||||
@@ -337,27 +434,29 @@
|
||||
}
|
||||
};
|
||||
|
||||
$__default["default"](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) {
|
||||
$__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||
} else {
|
||||
$__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
|
||||
return move(event);
|
||||
});
|
||||
$__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
}
|
||||
@@ -368,13 +467,13 @@
|
||||
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;
|
||||
@@ -382,7 +481,7 @@
|
||||
};
|
||||
|
||||
_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);
|
||||
};
|
||||
|
||||
@@ -407,52 +506,36 @@
|
||||
_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 = $__default["default"].Event(EVENT_SLIDE, {
|
||||
return EventHandler.trigger(this._element, EVENT_SLIDE, {
|
||||
relatedTarget: relatedTarget,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
$__default["default"](this._element).trigger(slideEvent);
|
||||
return slideEvent;
|
||||
};
|
||||
|
||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
|
||||
$__default["default"](indicators).removeClass(CLASS_NAME_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) {
|
||||
$__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE);
|
||||
nextIndicator.classList.add(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto._updateInterval = function _updateInterval() {
|
||||
var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
|
||||
|
||||
if (elementInterval) {
|
||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||
this._config.interval = elementInterval;
|
||||
} else {
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._slide = function _slide(direction, element) {
|
||||
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);
|
||||
|
||||
@@ -475,14 +558,14 @@
|
||||
eventDirectionName = DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_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;
|
||||
}
|
||||
|
||||
@@ -499,33 +582,46 @@
|
||||
|
||||
this._setActiveIndicatorElement(nextElement);
|
||||
|
||||
this._activeElement = nextElement;
|
||||
var slidEvent = $__default["default"].Event(EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
||||
nextElement.classList.add(orderClassName);
|
||||
reflow(nextElement);
|
||||
activeElement.classList.add(directionalClassName);
|
||||
nextElement.classList.add(directionalClassName);
|
||||
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
||||
|
||||
if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
|
||||
$__default["default"](nextElement).addClass(orderClassName);
|
||||
Util__default["default"].reflow(nextElement);
|
||||
$__default["default"](activeElement).addClass(directionalClassName);
|
||||
$__default["default"](nextElement).addClass(directionalClassName);
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(activeElement);
|
||||
$__default["default"](activeElement).one(Util__default["default"].TRANSITION_END, function () {
|
||||
$__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
|
||||
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||
if (nextElementInterval) {
|
||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||
this._config.interval = nextElementInterval;
|
||||
} else {
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||
}
|
||||
|
||||
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 $__default["default"](_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 {
|
||||
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||
$__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
this._isSliding = false;
|
||||
$__default["default"](this._element).trigger(slidEvent);
|
||||
EventHandler.trigger(this._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
}
|
||||
|
||||
if (isCycling) {
|
||||
@@ -534,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 = $__default["default"](this).data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $__default["default"](this).data());
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _extends({}, _config, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(this, _config);
|
||||
$__default["default"](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
} else if (typeof action === 'string') {
|
||||
if (typeof data[action] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + action + "\"");
|
||||
}
|
||||
|
||||
data[action]();
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause();
|
||||
data.cycle();
|
||||
}
|
||||
Carousel.carouselInterface(this, config);
|
||||
});
|
||||
};
|
||||
|
||||
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
|
||||
var selector = Util__default["default"].getSelectorFromElement(this);
|
||||
Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
|
||||
var target = getElementFromSelector(this);
|
||||
|
||||
if (!selector) {
|
||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target = $__default["default"](selector)[0];
|
||||
|
||||
if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
|
||||
var config = _objectSpread(_objectSpread({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
@@ -587,15 +680,19 @@
|
||||
config.interval = false;
|
||||
}
|
||||
|
||||
Carousel._jQueryInterface.call($__default["default"](target), config);
|
||||
Carousel.carouselInterface(target, config);
|
||||
|
||||
if (slideIndex) {
|
||||
$__default["default"](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() {
|
||||
@@ -611,33 +708,42 @@
|
||||
return Carousel;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||
$__default["default"](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 = $__default["default"](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
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Carousel._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Carousel;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].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
+316
-162
@@ -1,78 +1,158 @@
|
||||
/*!
|
||||
* Bootstrap collapse.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* 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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : 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';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
var getSelectorFromElement = function getSelectorFromElement(element) {
|
||||
var selector = getSelector(element);
|
||||
|
||||
if (selector) {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
var getElementFromSelector = function getElementFromSelector(element) {
|
||||
var selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var _window$getComputedSt = window.getComputedStyle(element),
|
||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||
|
||||
var floatTransitionDuration = 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);
|
||||
};
|
||||
|
||||
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 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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.6.2';
|
||||
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 = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
||||
var DIMENSION_WIDTH = 'width';
|
||||
var DIMENSION_HEIGHT = 'height';
|
||||
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 SELECTOR_ACTIVES = '.show, .collapsing';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
@@ -81,8 +161,23 @@
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
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
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Collapse = /*#__PURE__*/function () {
|
||||
@@ -90,17 +185,17 @@
|
||||
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__default["default"].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);
|
||||
@@ -116,6 +211,8 @@
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -123,7 +220,7 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
@@ -133,7 +230,7 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,7 +238,7 @@
|
||||
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;
|
||||
}
|
||||
@@ -154,88 +251,106 @@
|
||||
}
|
||||
}
|
||||
|
||||
var container = SelectorEngine.findOne(this._selector);
|
||||
|
||||
if (actives) {
|
||||
activesData = $__default["default"](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 = $__default["default"].Event(EVENT_SHOW);
|
||||
$__default["default"](this._element).trigger(startEvent);
|
||||
var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
|
||||
actives.forEach(function (elemActive) {
|
||||
if (container !== elemActive) {
|
||||
Collapse.collapseInterface(elemActive, 'hide');
|
||||
}
|
||||
|
||||
if (!activesData) {
|
||||
$__default["default"](actives).data(DATA_KEY, null);
|
||||
}
|
||||
if (!activesData) {
|
||||
Data.setData(elemActive, DATA_KEY, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
$__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
||||
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
$__default["default"](this._triggerArray).removeClass(CLASS_NAME_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() {
|
||||
$__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_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);
|
||||
|
||||
$__default["default"](_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__default["default"].getTransitionDurationFromElement(this._element);
|
||||
$__default["default"](this._element).one(Util__default["default"].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 || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = $__default["default"].Event(EVENT_HIDE);
|
||||
$__default["default"](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__default["default"].reflow(this._element);
|
||||
$__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_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__default["default"].getSelectorFromElement(trigger);
|
||||
var elem = getElementFromSelector(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
|
||||
|
||||
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
|
||||
$__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
||||
trigger.setAttribute('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,12 +360,17 @@
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
$__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_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__default["default"].getTransitionDurationFromElement(this._element);
|
||||
$__default["default"](this._element).one(Util__default["default"].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) {
|
||||
@@ -258,7 +378,7 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
@@ -268,81 +388,93 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config = _objectSpread(_objectSpread({}, Default), config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getDimension = function _getDimension() {
|
||||
var hasWidth = $__default["default"](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__default["default"].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));
|
||||
$__default["default"](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 = $__default["default"](element).hasClass(CLASS_NAME_SHOW);
|
||||
if (element) {
|
||||
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
$__default["default"](triggerArray).toggleClass(CLASS_NAME_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__default["default"].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 $element = $__default["default"](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $element.data(), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
Collapse.collapseInterface(this, config);
|
||||
});
|
||||
};
|
||||
|
||||
Collapse.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Collapse, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -358,40 +490,62 @@
|
||||
return Collapse;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](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 = $__default["default"](this);
|
||||
var selector = Util__default["default"].getSelectorFromElement(this);
|
||||
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||
$__default["default"](selectors).each(function () {
|
||||
var $target = $__default["default"](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
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Collapse._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Collapse;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].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
+269
-217
@@ -1,86 +1,124 @@
|
||||
/*!
|
||||
* Bootstrap dropdown.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* 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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : 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';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
var getElementFromSelector = function getElementFromSelector(element) {
|
||||
var selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
var isElement = function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
};
|
||||
|
||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
||||
Object.keys(configTypes).forEach(function (property) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var isVisible = function isVisible(element) {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (element.style && element.parentNode && element.parentNode.style) {
|
||||
var elementStyle = getComputedStyle(element);
|
||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var noop = function noop() {
|
||||
return function () {};
|
||||
};
|
||||
|
||||
var getjQuery = function getjQuery() {
|
||||
var _window = window,
|
||||
jQuery = _window.jQuery;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'dropdown';
|
||||
var VERSION = '4.6.2';
|
||||
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 = $__default["default"].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 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_POSITION_STATIC = 'position-static';
|
||||
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;
|
||||
@@ -89,6 +127,14 @@
|
||||
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';
|
||||
@@ -117,7 +163,9 @@
|
||||
popperConfig: '(null|object)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown = /*#__PURE__*/function () {
|
||||
@@ -129,6 +177,8 @@
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
this._addEventListeners();
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -136,55 +186,47 @@
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW);
|
||||
var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
Dropdown.clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.show(true);
|
||||
this.show();
|
||||
};
|
||||
|
||||
_proto.show = function show(usePopper) {
|
||||
if (usePopper === void 0) {
|
||||
usePopper = false;
|
||||
}
|
||||
|
||||
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||
_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 = $__default["default"].Event(EVENT_SHOW, relatedTarget);
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$__default["default"](parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
} // Totally disable Popper for Dropdowns in Navbar
|
||||
} // Disable totally Popper.js for Dropdown in Navbar
|
||||
|
||||
|
||||
if (!this._inNavbar && usePopper) {
|
||||
// Check for Popper dependency
|
||||
if (typeof Popper__default["default"] === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
|
||||
if (!this._inNavbar) {
|
||||
if (typeof Popper === 'undefined') {
|
||||
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__default["default"].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') {
|
||||
@@ -196,43 +238,45 @@
|
||||
|
||||
|
||||
if (this._config.boundary !== 'scrollParent') {
|
||||
$__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
|
||||
parent.classList.add(CLASS_NAME_POSITION_STATIC);
|
||||
}
|
||||
|
||||
this._popper = new Popper__default["default"](referenceElement, this._menu, this._getPopperConfig());
|
||||
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
|
||||
} // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
|
||||
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].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);
|
||||
|
||||
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default["default"].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 || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default["default"](this._menu).hasClass(CLASS_NAME_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 = $__default["default"].Event(EVENT_HIDE, relatedTarget);
|
||||
var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$__default["default"](parent).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -240,17 +284,18 @@
|
||||
this._popper.destroy();
|
||||
}
|
||||
|
||||
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default["default"].Event(EVENT_HIDDEN, relatedTarget));
|
||||
Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
|
||||
Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
$__default["default"](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;
|
||||
@@ -260,7 +305,7 @@
|
||||
_proto.update = function update() {
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
if (this._popper !== null) {
|
||||
if (this._popper) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
} // Private
|
||||
@@ -269,7 +314,7 @@
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this = this;
|
||||
|
||||
$__default["default"](this._element).on(EVENT_CLICK, function (event) {
|
||||
EventHandler.on(this._element, EVENT_CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -278,34 +323,30 @@
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, this.constructor.Default, $__default["default"](this._element).data(), config);
|
||||
Util__default["default"].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 = $__default["default"](this._element.parentNode);
|
||||
var parentDropdown = this._element.parentNode;
|
||||
var placement = PLACEMENT_BOTTOM; // Handle dropup
|
||||
|
||||
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
|
||||
placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
|
||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
||||
placement = PLACEMENT_TOP;
|
||||
|
||||
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_TOPEND;
|
||||
}
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT;
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
||||
placement = PLACEMENT_LEFT;
|
||||
} else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
|
||||
} else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_BOTTOMEND;
|
||||
}
|
||||
|
||||
@@ -313,7 +354,7 @@
|
||||
};
|
||||
|
||||
_proto._detectNavbar = function _detectNavbar() {
|
||||
return $__default["default"](this._element).closest('.navbar').length > 0;
|
||||
return Boolean(this._element.closest("." + CLASS_NAME_NAVBAR));
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
@@ -323,7 +364,7 @@
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _extends({}, 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 {
|
||||
@@ -345,7 +386,7 @@
|
||||
boundariesElement: this._config.boundary
|
||||
}
|
||||
}
|
||||
}; // Disable Popper if we have a static display
|
||||
}; // Disable Popper.js if we have a static display
|
||||
|
||||
if (this._config.display === 'static') {
|
||||
popperConfig.modifiers.applyStyle = {
|
||||
@@ -353,42 +394,44 @@
|
||||
};
|
||||
}
|
||||
|
||||
return _extends({}, popperConfig, this._config.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 = $__default["default"](this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this, _config);
|
||||
$__default["default"](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
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 = $__default["default"](toggles[i]).data(DATA_KEY);
|
||||
var parent = Dropdown.getParentFromElement(toggles[i]);
|
||||
var context = Data.getData(toggles[i], DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
@@ -403,25 +446,28 @@
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
|
||||
if (!$__default["default"](parent).hasClass(CLASS_NAME_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) && $__default["default"].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 = $__default["default"].Event(EVENT_HIDE, relatedTarget);
|
||||
$__default["default"](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) {
|
||||
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].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');
|
||||
@@ -430,24 +476,17 @@
|
||||
context._popper.destroy();
|
||||
}
|
||||
|
||||
$__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW);
|
||||
$__default["default"](parent).removeClass(CLASS_NAME_SHOW).trigger($__default["default"].Event(EVENT_HIDDEN, relatedTarget));
|
||||
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__default["default"].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:
|
||||
@@ -455,61 +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 || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
|
||||
var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (!isActive && event.which === ESCAPE_KEYCODE) {
|
||||
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 (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
$__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
|
||||
}
|
||||
|
||||
$__default["default"](this).trigger('click');
|
||||
if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
|
||||
return $__default["default"](item).is(':visible');
|
||||
});
|
||||
var parent = Dropdown.getParentFromElement(this);
|
||||
var isActive = this.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
if (items.length === 0) {
|
||||
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;
|
||||
}
|
||||
|
||||
if (!isActive || event.key === SPACE_KEY) {
|
||||
Dropdown.clearMenus();
|
||||
return;
|
||||
}
|
||||
|
||||
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() {
|
||||
@@ -530,31 +567,46 @@
|
||||
return Dropdown;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
EventHandler.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($__default["default"](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
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Dropdown._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Dropdown;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].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
-22
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): 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');
|
||||
}
|
||||
})($);
|
||||
Vendored
+365
-261
@@ -1,92 +1,163 @@
|
||||
/*!
|
||||
* Bootstrap modal.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap modal.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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = 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.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
var getSelector = function getSelector(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
var getElementFromSelector = function getElementFromSelector(element) {
|
||||
var selector = getSelector(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var _window$getComputedSt = window.getComputedStyle(element),
|
||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||
|
||||
var floatTransitionDuration = 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);
|
||||
};
|
||||
|
||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
||||
Object.keys(configTypes).forEach(function (property) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var isVisible = function isVisible(element) {
|
||||
if (!element) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (element.style && element.parentNode && element.parentNode.style) {
|
||||
var elementStyle = getComputedStyle(element);
|
||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var reflow = function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
||||
var getjQuery = function getjQuery() {
|
||||
var _window = window,
|
||||
jQuery = _window.jQuery;
|
||||
|
||||
if (jQuery && !document.body.hasAttribute('data-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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'modal';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.modal';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
|
||||
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
||||
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
||||
var CLASS_NAME_OPEN = 'modal-open';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_STATIC = 'modal-static';
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
|
||||
var EVENT_RESIZE = "resize" + EVENT_KEY;
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var SELECTOR_DIALOG = '.modal-dialog';
|
||||
var SELECTOR_MODAL_BODY = '.modal-body';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
|
||||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
||||
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
||||
var ESCAPE_KEY = 'Escape';
|
||||
var Default = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
@@ -99,21 +170,48 @@
|
||||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
};
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
|
||||
var EVENT_RESIZE = "resize" + EVENT_KEY;
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
||||
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
||||
var CLASS_NAME_OPEN = 'modal-open';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_STATIC = 'modal-static';
|
||||
var SELECTOR_DIALOG = '.modal-dialog';
|
||||
var SELECTOR_MODAL_BODY = '.modal-body';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
|
||||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
||||
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Modal = /*#__PURE__*/function () {
|
||||
function Modal(element, config) {
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._dialog = element.querySelector(SELECTOR_DIALOG);
|
||||
this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
|
||||
this._backdrop = null;
|
||||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._scrollbarWidth = 0;
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -131,21 +229,20 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var showEvent = $__default["default"].Event(EVENT_SHOW, {
|
||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
$__default["default"](this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
if (this._isShown || showEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = true;
|
||||
|
||||
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
this._checkScrollbar();
|
||||
|
||||
this._setScrollbar();
|
||||
@@ -156,12 +253,12 @@
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
|
||||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
|
||||
return _this.hide(event);
|
||||
});
|
||||
$__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
|
||||
$__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
|
||||
if ($__default["default"](event.target).is(_this._element)) {
|
||||
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
|
||||
EventHandler.one(_this._element, EVENT_MOUSEUP_DISMISS, function (event) {
|
||||
if (event.target === _this._element) {
|
||||
_this._ignoreBackdropClick = true;
|
||||
}
|
||||
});
|
||||
@@ -183,15 +280,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $__default["default"].Event(EVENT_HIDE);
|
||||
$__default["default"](this._element).trigger(hideEvent);
|
||||
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = false;
|
||||
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE);
|
||||
|
||||
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
@@ -201,16 +298,19 @@
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$__default["default"](document).off(EVENT_FOCUSIN);
|
||||
$__default["default"](this._element).removeClass(CLASS_NAME_SHOW);
|
||||
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
|
||||
$__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
|
||||
EventHandler.off(document, EVENT_FOCUSIN);
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
EventHandler.off(this._element, EVENT_CLICK_DISMISS);
|
||||
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
|
||||
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, function (event) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
});
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
@@ -218,7 +318,7 @@
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
||||
return $__default["default"](htmlElement).off(EVENT_KEY);
|
||||
return EventHandler.off(htmlElement, EVENT_KEY);
|
||||
});
|
||||
/**
|
||||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
|
||||
@@ -226,8 +326,8 @@
|
||||
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
||||
*/
|
||||
|
||||
$__default["default"](document).off(EVENT_FOCUSIN);
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
EventHandler.off(document, EVENT_FOCUSIN);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
this._dialog = null;
|
||||
@@ -245,49 +345,17 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
|
||||
config = _objectSpread(_objectSpread({}, Default), config);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
|
||||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
var _this3 = this;
|
||||
|
||||
var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
|
||||
$__default["default"](this._element).trigger(hideEventPrevented);
|
||||
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
if (hideEventPrevented.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
if (!isModalOverflowing) {
|
||||
this._element.style.overflowY = 'hidden';
|
||||
}
|
||||
|
||||
this._element.classList.add(CLASS_NAME_STATIC);
|
||||
|
||||
var modalTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._dialog);
|
||||
$__default["default"](this._element).off(Util__default["default"].TRANSITION_END);
|
||||
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, function () {
|
||||
_this3._element.classList.remove(CLASS_NAME_STATIC);
|
||||
|
||||
if (!isModalOverflowing) {
|
||||
$__default["default"](_this3._element).one(Util__default["default"].TRANSITION_END, function () {
|
||||
_this3._element.style.overflowY = '';
|
||||
}).emulateTransitionEnd(_this3._element, modalTransitionDuration);
|
||||
}
|
||||
}).emulateTransitionEnd(modalTransitionDuration);
|
||||
|
||||
this._element.focus();
|
||||
};
|
||||
|
||||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
var _this4 = this;
|
||||
|
||||
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE);
|
||||
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
|
||||
var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
|
||||
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// Don't move modal's DOM position
|
||||
@@ -302,86 +370,86 @@
|
||||
|
||||
this._element.setAttribute('role', 'dialog');
|
||||
|
||||
if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
|
||||
this._element.scrollTop = 0;
|
||||
|
||||
if (modalBody) {
|
||||
modalBody.scrollTop = 0;
|
||||
} else {
|
||||
this._element.scrollTop = 0;
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
Util__default["default"].reflow(this._element);
|
||||
reflow(this._element);
|
||||
}
|
||||
|
||||
$__default["default"](this._element).addClass(CLASS_NAME_SHOW);
|
||||
this._element.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus();
|
||||
}
|
||||
|
||||
var shownEvent = $__default["default"].Event(EVENT_SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this4._config.focus) {
|
||||
_this4._element.focus();
|
||||
if (_this3._config.focus) {
|
||||
_this3._element.focus();
|
||||
}
|
||||
|
||||
_this4._isTransitioning = false;
|
||||
$__default["default"](_this4._element).trigger(shownEvent);
|
||||
_this3._isTransitioning = false;
|
||||
EventHandler.trigger(_this3._element, EVENT_SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._dialog);
|
||||
$__default["default"](this._dialog).one(Util__default["default"].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(this._dialog);
|
||||
EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
|
||||
emulateTransitionEnd(this._dialog, transitionDuration);
|
||||
} else {
|
||||
transitionComplete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._enforceFocus = function _enforceFocus() {
|
||||
var _this5 = this;
|
||||
var _this4 = this;
|
||||
|
||||
$__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
|
||||
.on(EVENT_FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
|
||||
_this5._element.focus();
|
||||
EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
|
||||
|
||||
EventHandler.on(document, EVENT_FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
|
||||
_this4._element.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_proto._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this6 = this;
|
||||
var _this5 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
|
||||
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
|
||||
if (_this5._config.keyboard && event.key === ESCAPE_KEY) {
|
||||
event.preventDefault();
|
||||
|
||||
_this6.hide();
|
||||
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
_this6._triggerBackdropTransition();
|
||||
_this5.hide();
|
||||
} else if (!_this5._config.keyboard && event.key === ESCAPE_KEY) {
|
||||
_this5._triggerBackdropTransition();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
$__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
|
||||
} else {
|
||||
EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._setResizeEvent = function _setResizeEvent() {
|
||||
var _this7 = this;
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$__default["default"](window).on(EVENT_RESIZE, function (event) {
|
||||
return _this7.handleUpdate(event);
|
||||
EventHandler.on(window, EVENT_RESIZE, function () {
|
||||
return _this6._adjustDialog();
|
||||
});
|
||||
} else {
|
||||
$__default["default"](window).off(EVENT_RESIZE);
|
||||
EventHandler.off(window, EVENT_RESIZE);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._hideModal = function _hideModal() {
|
||||
var _this8 = this;
|
||||
var _this7 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
|
||||
@@ -394,27 +462,26 @@
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
$__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
|
||||
document.body.classList.remove(CLASS_NAME_OPEN);
|
||||
|
||||
_this8._resetAdjustments();
|
||||
_this7._resetAdjustments();
|
||||
|
||||
_this8._resetScrollbar();
|
||||
_this7._resetScrollbar();
|
||||
|
||||
$__default["default"](_this8._element).trigger(EVENT_HIDDEN);
|
||||
EventHandler.trigger(_this7._element, EVENT_HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
_proto._removeBackdrop = function _removeBackdrop() {
|
||||
if (this._backdrop) {
|
||||
$__default["default"](this._backdrop).remove();
|
||||
this._backdrop = null;
|
||||
}
|
||||
this._backdrop.parentNode.removeChild(this._backdrop);
|
||||
|
||||
this._backdrop = null;
|
||||
};
|
||||
|
||||
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||
var _this9 = this;
|
||||
var _this8 = this;
|
||||
|
||||
var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
||||
var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
this._backdrop = document.createElement('div');
|
||||
@@ -424,10 +491,10 @@
|
||||
this._backdrop.classList.add(animate);
|
||||
}
|
||||
|
||||
$__default["default"](this._backdrop).appendTo(document.body);
|
||||
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, function (event) {
|
||||
if (_this9._ignoreBackdropClick) {
|
||||
_this9._ignoreBackdropClick = false;
|
||||
document.body.appendChild(this._backdrop);
|
||||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
|
||||
if (_this8._ignoreBackdropClick) {
|
||||
_this8._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -435,54 +502,69 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (_this9._config.backdrop === 'static') {
|
||||
_this9._triggerBackdropTransition();
|
||||
} else {
|
||||
_this9.hide();
|
||||
}
|
||||
_this8._triggerBackdropTransition();
|
||||
});
|
||||
|
||||
if (animate) {
|
||||
Util__default["default"].reflow(this._backdrop);
|
||||
reflow(this._backdrop);
|
||||
}
|
||||
|
||||
$__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (!callback) {
|
||||
return;
|
||||
}
|
||||
this._backdrop.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
if (!animate) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
var backdropTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._backdrop);
|
||||
$__default["default"](this._backdrop).one(Util__default["default"].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
||||
EventHandler.one(this._backdrop, TRANSITION_END, callback);
|
||||
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW);
|
||||
this._backdrop.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this9._removeBackdrop();
|
||||
_this8._removeBackdrop();
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
callback();
|
||||
};
|
||||
|
||||
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
var _backdropTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._backdrop);
|
||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
||||
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
||||
|
||||
$__default["default"](this._backdrop).one(Util__default["default"].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
|
||||
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
|
||||
} else {
|
||||
callbackRemove();
|
||||
}
|
||||
} else if (callback) {
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
|
||||
var _this9 = this;
|
||||
|
||||
if (this._config.backdrop === 'static') {
|
||||
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._element.classList.add(CLASS_NAME_STATIC);
|
||||
|
||||
var modalTransitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, function () {
|
||||
_this9._element.classList.remove(CLASS_NAME_STATIC);
|
||||
});
|
||||
emulateTransitionEnd(this._element, modalTransitionDuration);
|
||||
|
||||
this._element.focus();
|
||||
} else {
|
||||
this.hide();
|
||||
}
|
||||
} // ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
;
|
||||
|
||||
@@ -515,50 +597,58 @@
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
|
||||
|
||||
$__default["default"](fixedContent).each(function (index, element) {
|
||||
// Adjust fixed content padding
|
||||
SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
|
||||
var actualPadding = element.style.paddingRight;
|
||||
var calculatedPadding = $__default["default"](element).css('padding-right');
|
||||
$__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
|
||||
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
|
||||
Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
|
||||
element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px";
|
||||
}); // Adjust sticky content margin
|
||||
|
||||
$__default["default"](stickyContent).each(function (index, element) {
|
||||
SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
|
||||
var actualMargin = element.style.marginRight;
|
||||
var calculatedMargin = $__default["default"](element).css('margin-right');
|
||||
$__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
|
||||
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
|
||||
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
|
||||
element.style.marginRight = parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px";
|
||||
}); // Adjust body padding
|
||||
|
||||
var actualPadding = document.body.style.paddingRight;
|
||||
var calculatedPadding = $__default["default"](document.body).css('padding-right');
|
||||
$__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
||||
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
|
||||
Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
|
||||
document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
|
||||
}
|
||||
|
||||
$__default["default"](document.body).addClass(CLASS_NAME_OPEN);
|
||||
document.body.classList.add(CLASS_NAME_OPEN);
|
||||
};
|
||||
|
||||
_proto._resetScrollbar = function _resetScrollbar() {
|
||||
// Restore fixed content padding
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||
$__default["default"](fixedContent).each(function (index, element) {
|
||||
var padding = $__default["default"](element).data('padding-right');
|
||||
$__default["default"](element).removeData('padding-right');
|
||||
element.style.paddingRight = padding ? padding : '';
|
||||
}); // Restore sticky content
|
||||
SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
|
||||
var padding = Manipulator.getDataAttribute(element, 'padding-right');
|
||||
|
||||
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
|
||||
$__default["default"](elements).each(function (index, element) {
|
||||
var margin = $__default["default"](element).data('margin-right');
|
||||
if (typeof padding !== 'undefined') {
|
||||
Manipulator.removeDataAttribute(element, 'padding-right');
|
||||
element.style.paddingRight = padding;
|
||||
}
|
||||
}); // Restore sticky content and navbar-toggler margin
|
||||
|
||||
SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
|
||||
var margin = Manipulator.getDataAttribute(element, 'margin-right');
|
||||
|
||||
if (typeof margin !== 'undefined') {
|
||||
$__default["default"](element).css('margin-right', margin).removeData('margin-right');
|
||||
Manipulator.removeDataAttribute(element, 'margin-right');
|
||||
element.style.marginRight = margin;
|
||||
}
|
||||
}); // Restore body padding
|
||||
|
||||
var padding = $__default["default"](document.body).data('padding-right');
|
||||
$__default["default"](document.body).removeData('padding-right');
|
||||
document.body.style.paddingRight = padding ? padding : '';
|
||||
var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
|
||||
|
||||
if (typeof padding === 'undefined') {
|
||||
document.body.style.paddingRight = '';
|
||||
} else {
|
||||
Manipulator.removeDataAttribute(document.body, 'padding-right');
|
||||
document.body.style.paddingRight = padding;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
||||
@@ -572,15 +662,14 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||
Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
var data = $__default["default"](this).data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
|
||||
var _config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(this)), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config);
|
||||
$__default["default"](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@@ -595,6 +684,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
Modal.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Modal, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -610,54 +703,65 @@
|
||||
return Modal;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
var _this11 = this;
|
||||
|
||||
var target;
|
||||
var selector = Util__default["default"].getSelectorFromElement(this);
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
var config = $__default["default"](target).data(DATA_KEY) ? 'toggle' : _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
|
||||
var target = getElementFromSelector(this);
|
||||
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $target = $__default["default"](target).one(EVENT_SHOW, function (showEvent) {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// Only register focus restorer if modal will actually get shown
|
||||
EventHandler.one(target, EVENT_SHOW, function (showEvent) {
|
||||
if (showEvent.defaultPrevented) {
|
||||
// only register focus restorer if modal will actually get shown
|
||||
return;
|
||||
}
|
||||
|
||||
$target.one(EVENT_HIDDEN, function () {
|
||||
if ($__default["default"](_this11).is(':visible')) {
|
||||
EventHandler.one(target, EVENT_HIDDEN, function () {
|
||||
if (isVisible(_this11)) {
|
||||
_this11.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
var data = Data.getData(target, DATA_KEY);
|
||||
|
||||
Modal._jQueryInterface.call($__default["default"](target), config, this);
|
||||
if (!data) {
|
||||
var config = _objectSpread(_objectSpread({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
|
||||
|
||||
data = new Modal(target, config);
|
||||
}
|
||||
|
||||
data.show(this);
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .modal to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Modal._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Modal;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Modal._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Modal.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Modal;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Modal.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Modal;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=modal.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+91
-100
@@ -1,94 +1,68 @@
|
||||
/*!
|
||||
* Bootstrap popover.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap popover.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('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
|
||||
})(this, (function ($, Tooltip) { 'use strict';
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selector-engine.js', './tooltip.js'], factory) :
|
||||
(global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
|
||||
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
|
||||
_setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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;
|
||||
};
|
||||
|
||||
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; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
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; }
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_TITLE = '.popover-header';
|
||||
var SELECTOR_CONTENT = '.popover-body';
|
||||
|
||||
var Default = _extends({}, Tooltip__default["default"].Default, {
|
||||
var Default = _objectSpread(_objectSpread({}, Tooltip.Default), {}, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = _extends({}, Tooltip__default["default"].DefaultType, {
|
||||
var DefaultType = _objectSpread(_objectSpread({}, Tooltip.DefaultType), {}, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
@@ -104,8 +78,14 @@
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_TITLE = '.popover-header';
|
||||
var SELECTOR_CONTENT = '.popover-body';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Popover = /*#__PURE__*/function (_Tooltip) {
|
||||
@@ -122,19 +102,10 @@
|
||||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
this.tip = this.tip || $__default["default"](this.config.template)[0];
|
||||
return this.tip;
|
||||
};
|
||||
|
||||
_proto.setContent = function setContent() {
|
||||
var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
|
||||
var tip = this.getTipElement(); // we use append for html objects to maintain js events
|
||||
|
||||
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
|
||||
|
||||
var content = this._getContent();
|
||||
|
||||
@@ -142,8 +113,12 @@
|
||||
content = content.call(this.element);
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(SELECTOR_CONTENT), content);
|
||||
$tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
|
||||
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
|
||||
};
|
||||
|
||||
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
|
||||
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
|
||||
} // Private
|
||||
;
|
||||
|
||||
@@ -152,18 +127,22 @@
|
||||
};
|
||||
|
||||
_proto._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $__default["default"](this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
var tip = this.getTipElement();
|
||||
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
tabClass.map(function (token) {
|
||||
return token.trim();
|
||||
}).forEach(function (tClass) {
|
||||
return tip.classList.remove(tClass);
|
||||
});
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
Popover.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default["default"](this).data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
@@ -173,7 +152,7 @@
|
||||
|
||||
if (!data) {
|
||||
data = new Popover(this, _config);
|
||||
$__default["default"](this).data(DATA_KEY, data);
|
||||
Data.setData(this, DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@@ -186,10 +165,14 @@
|
||||
});
|
||||
};
|
||||
|
||||
Popover.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Popover, null, [{
|
||||
key: "VERSION",
|
||||
get: // Getters
|
||||
function get() {
|
||||
// Getters
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
@@ -225,21 +208,29 @@
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
}(Tooltip__default["default"]);
|
||||
}(Tooltip);
|
||||
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME] = Popover._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Popover;
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Popover.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Popover;
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Popover;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=popover.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+183
-111
@@ -1,80 +1,117 @@
|
||||
/*!
|
||||
* Bootstrap scrollspy.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap scrollspy.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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = 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.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var MAX_UID = 1000000;
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var getUID = function getUID(prefix) {
|
||||
do {
|
||||
prefix += Math.floor(Math.random() * MAX_UID);
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return selector;
|
||||
};
|
||||
|
||||
var getSelectorFromElement = function getSelectorFromElement(element) {
|
||||
var selector = getSelector(element);
|
||||
|
||||
if (selector) {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
var isElement = function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
};
|
||||
|
||||
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
|
||||
Object.keys(configTypes).forEach(function (property) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var 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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
|
||||
var EVENT_SCROLL = "scroll" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var METHOD_OFFSET = 'offset';
|
||||
var METHOD_POSITION = 'position';
|
||||
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_NAV_LINKS = '.nav-link';
|
||||
var SELECTOR_NAV_ITEMS = '.nav-item';
|
||||
var SELECTOR_LIST_ITEMS = '.list-group-item';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
@@ -85,8 +122,24 @@
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
|
||||
var EVENT_SCROLL = "scroll" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_NAV_LINKS = '.nav-link';
|
||||
var SELECTOR_NAV_ITEMS = '.nav-item';
|
||||
var SELECTOR_LIST_ITEMS = '.list-group-item';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var METHOD_OFFSET = 'offset';
|
||||
var METHOD_POSITION = 'position';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var ScrollSpy = /*#__PURE__*/function () {
|
||||
@@ -96,17 +149,19 @@
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
|
||||
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM);
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
$__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
|
||||
EventHandler.on(this._scrollElement, EVENT_SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
});
|
||||
this.refresh();
|
||||
|
||||
this._process();
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -122,26 +177,27 @@
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._scrollHeight = this._getScrollHeight();
|
||||
var targets = [].slice.call(document.querySelectorAll(this._selector));
|
||||
var targets = SelectorEngine.find(this._selector);
|
||||
targets.map(function (element) {
|
||||
var target;
|
||||
var targetSelector = Util__default["default"].getSelectorFromElement(element);
|
||||
var targetSelector = getSelectorFromElement(element);
|
||||
|
||||
if (targetSelector) {
|
||||
target = document.querySelector(targetSelector);
|
||||
target = SelectorEngine.findOne(targetSelector);
|
||||
}
|
||||
|
||||
if (target) {
|
||||
var targetBCR = target.getBoundingClientRect();
|
||||
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||
return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(Boolean).sort(function (a, b) {
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this2._offsets.push(item[0]);
|
||||
@@ -151,8 +207,8 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
$__default["default"](this._scrollElement).off(EVENT_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
EventHandler.off(this._scrollElement, EVENT_KEY);
|
||||
this._element = null;
|
||||
this._scrollElement = null;
|
||||
this._config = null;
|
||||
@@ -165,20 +221,20 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, typeof config === 'object' && config ? config : {});
|
||||
config = _objectSpread(_objectSpread({}, Default), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.target !== 'string' && Util__default["default"].isElement(config.target)) {
|
||||
var id = $__default["default"](config.target).attr('id');
|
||||
if (typeof config.target !== 'string' && isElement(config.target)) {
|
||||
var id = config.target.id;
|
||||
|
||||
if (!id) {
|
||||
id = Util__default["default"].getUID(NAME);
|
||||
$__default["default"](config.target).attr('id', id);
|
||||
id = getUID(NAME);
|
||||
config.target.id = id;
|
||||
}
|
||||
|
||||
config.target = "#" + id;
|
||||
}
|
||||
|
||||
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
@@ -241,28 +297,36 @@
|
||||
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
|
||||
});
|
||||
|
||||
var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
|
||||
var link = SelectorEngine.findOne(queries.join(','));
|
||||
|
||||
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
|
||||
$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
|
||||
$link.addClass(CLASS_NAME_ACTIVE);
|
||||
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
|
||||
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
|
||||
link.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
$link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
link.classList.add(CLASS_NAME_ACTIVE);
|
||||
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {
|
||||
// Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
|
||||
return item.classList.add(CLASS_NAME_ACTIVE);
|
||||
}); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
|
||||
SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
|
||||
SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
|
||||
return item.classList.add(CLASS_NAME_ACTIVE);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
|
||||
EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
|
||||
relatedTarget: target
|
||||
});
|
||||
};
|
||||
|
||||
_proto._clear = function _clear() {
|
||||
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
|
||||
SelectorEngine.find(this._selector).filter(function (node) {
|
||||
return node.classList.contains(CLASS_NAME_ACTIVE);
|
||||
}).forEach(function (node) {
|
||||
return node.classList.remove(CLASS_NAME_ACTIVE);
|
||||
@@ -270,15 +334,14 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
|
||||
ScrollSpy.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default["default"](this).data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config);
|
||||
$__default["default"](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@@ -291,6 +354,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
ScrollSpy.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(ScrollSpy, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -306,33 +373,38 @@
|
||||
return ScrollSpy;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
|
||||
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
|
||||
var scrollSpysLength = scrollSpys.length;
|
||||
|
||||
for (var i = scrollSpysLength; i--;) {
|
||||
var $spy = $__default["default"](scrollSpys[i]);
|
||||
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||
}
|
||||
EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
|
||||
SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
|
||||
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
|
||||
});
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = ScrollSpy;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = ScrollSpy.jQueryInterface;
|
||||
$.fn[NAME].Constructor = ScrollSpy;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return ScrollSpy;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=scrollspy.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+173
-102
@@ -1,72 +1,144 @@
|
||||
/*!
|
||||
* Bootstrap tab.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap tab.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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = 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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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;
|
||||
}
|
||||
|
||||
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 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 _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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
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_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_UL = '> li > .active';
|
||||
var SELECTOR_ACTIVE_UL = ':scope > li > .active';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
|
||||
var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tab = /*#__PURE__*/function () {
|
||||
function Tab(element) {
|
||||
this._element = element;
|
||||
Data.setData(this._element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -76,53 +148,46 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) {
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE) || this._element.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target;
|
||||
var previous;
|
||||
var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
|
||||
var selector = Util__default["default"].getSelectorFromElement(this._element);
|
||||
var target = getElementFromSelector(this._element);
|
||||
|
||||
var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
|
||||
|
||||
if (listElement) {
|
||||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
|
||||
previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
|
||||
previous = SelectorEngine.find(itemSelector, listElement);
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
var hideEvent = $__default["default"].Event(EVENT_HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
var showEvent = $__default["default"].Event(EVENT_SHOW, {
|
||||
var hideEvent = null;
|
||||
|
||||
if (previous) {
|
||||
hideEvent = EventHandler.trigger(previous, EVENT_HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
}
|
||||
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
if (previous) {
|
||||
$__default["default"](previous).trigger(hideEvent);
|
||||
}
|
||||
|
||||
$__default["default"](this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
||||
if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN, {
|
||||
EventHandler.trigger(previous, EVENT_HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
var shownEvent = $__default["default"].Event(EVENT_SHOWN, {
|
||||
EventHandler.trigger(_this._element, EVENT_SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
$__default["default"](previous).trigger(hiddenEvent);
|
||||
$__default["default"](_this._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
@@ -133,7 +198,7 @@
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
@@ -141,17 +206,19 @@
|
||||
_proto._activate = function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
|
||||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE);
|
||||
var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(active);
|
||||
$__default["default"](active).removeClass(CLASS_NAME_SHOW).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(active);
|
||||
active.classList.remove(CLASS_NAME_SHOW);
|
||||
EventHandler.one(active, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(active, transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
@@ -159,11 +226,11 @@
|
||||
|
||||
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
$__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
|
||||
var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
|
||||
active.classList.remove(CLASS_NAME_ACTIVE);
|
||||
var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
|
||||
|
||||
if (dropdownChild) {
|
||||
$__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
|
||||
dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
@@ -171,30 +238,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
$__default["default"](element).addClass(CLASS_NAME_ACTIVE);
|
||||
element.classList.add(CLASS_NAME_ACTIVE);
|
||||
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
}
|
||||
|
||||
Util__default["default"].reflow(element);
|
||||
reflow(element);
|
||||
|
||||
if (element.classList.contains(CLASS_NAME_FADE)) {
|
||||
element.classList.add(CLASS_NAME_SHOW);
|
||||
}
|
||||
|
||||
var parent = element.parentNode;
|
||||
|
||||
if (parent && parent.nodeName === 'LI') {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
|
||||
if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
var dropdownElement = element.closest(SELECTOR_DROPDOWN);
|
||||
|
||||
if (dropdownElement) {
|
||||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
|
||||
$__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
|
||||
SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE).forEach(function (dropdown) {
|
||||
return dropdown.classList.add(CLASS_NAME_ACTIVE);
|
||||
});
|
||||
}
|
||||
|
||||
element.setAttribute('aria-expanded', true);
|
||||
@@ -206,15 +268,9 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tab._jQueryInterface = function _jQueryInterface(config) {
|
||||
Tab.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $__default["default"](this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Tab(this);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
var data = Data.getData(this, DATA_KEY) || new Tab(this);
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
@@ -226,6 +282,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
Tab.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Tab, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -236,28 +296,39 @@
|
||||
return Tab;
|
||||
}();
|
||||
/**
|
||||
* Data API implementation
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Tab._jQueryInterface.call($__default["default"](this), 'show');
|
||||
var data = Data.getData(this, DATA_KEY) || new Tab(this);
|
||||
data.show();
|
||||
});
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .tab to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
$__default["default"].fn[NAME] = Tab._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Tab;
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab._jQueryInterface;
|
||||
};
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Tab.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tab;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Tab;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=tab.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+186
-115
@@ -1,86 +1,154 @@
|
||||
/*!
|
||||
* Bootstrap toast.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap toast.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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = 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')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js'], factory) :
|
||||
(global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
|
||||
}(this, (function (Data, EventHandler, Manipulator) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
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 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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'toast';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.toast';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_HIDE = 'hide';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_SHOWING = 'showing';
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_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 SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
|
||||
var Default = {
|
||||
animation: true,
|
||||
autohide: true,
|
||||
delay: 500
|
||||
};
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_HIDE = 'hide';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_SHOWING = 'showing';
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
autohide: 'boolean',
|
||||
delay: 'number'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
autohide: true,
|
||||
delay: 500
|
||||
};
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Toast = /*#__PURE__*/function () {
|
||||
@@ -90,6 +158,8 @@
|
||||
this._timeout = null;
|
||||
|
||||
this._setListeners();
|
||||
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -99,15 +169,12 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
var showEvent = $__default["default"].Event(EVENT_SHOW);
|
||||
$__default["default"](this._element).trigger(showEvent);
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._clearTimeout();
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(CLASS_NAME_FADE);
|
||||
}
|
||||
@@ -117,7 +184,7 @@
|
||||
|
||||
_this._element.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
$__default["default"](_this._element).trigger(EVENT_SHOWN);
|
||||
EventHandler.trigger(_this._element, EVENT_SHOWN);
|
||||
|
||||
if (_this._config.autohide) {
|
||||
_this._timeout = setTimeout(function () {
|
||||
@@ -128,96 +195,87 @@
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_HIDE);
|
||||
|
||||
Util__default["default"].reflow(this._element);
|
||||
reflow(this._element);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
|
||||
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $__default["default"].Event(EVENT_HIDE);
|
||||
$__default["default"](this._element).trigger(hideEvent);
|
||||
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._close();
|
||||
var complete = function complete() {
|
||||
_this2._element.classList.add(CLASS_NAME_HIDE);
|
||||
|
||||
EventHandler.trigger(_this2._element, EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this._element, transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
this._clearTimeout();
|
||||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
}
|
||||
|
||||
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
|
||||
$__default["default"].removeData(this._element, DATA_KEY);
|
||||
EventHandler.off(this._element, EVENT_CLICK_DISMISS);
|
||||
Data.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
this._config = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
|
||||
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(this._element)), typeof config === 'object' && config ? config : {});
|
||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._setListeners = function _setListeners() {
|
||||
var _this2 = this;
|
||||
|
||||
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
|
||||
return _this2.hide();
|
||||
});
|
||||
};
|
||||
|
||||
_proto._close = function _close() {
|
||||
var _this3 = this;
|
||||
|
||||
var complete = function complete() {
|
||||
_this3._element.classList.add(CLASS_NAME_HIDE);
|
||||
|
||||
$__default["default"](_this3._element).trigger(EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
|
||||
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._clearTimeout = function _clearTimeout() {
|
||||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
|
||||
return _this3.hide();
|
||||
});
|
||||
} // Static
|
||||
;
|
||||
|
||||
Toast._jQueryInterface = function _jQueryInterface(config) {
|
||||
Toast.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default["default"](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new Toast(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@@ -230,6 +288,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
Toast.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Toast, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -249,20 +311,29 @@
|
||||
|
||||
return Toast;
|
||||
}();
|
||||
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .toast to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME] = Toast._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Toast;
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Toast.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Toast;
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast._jQueryInterface;
|
||||
};
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Toast;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=toast.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+386
-237
@@ -1,64 +1,198 @@
|
||||
/*!
|
||||
* Bootstrap tooltip.js v4.6.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap tooltip.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'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = 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.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
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);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.2): tools/sanitizer.js
|
||||
* Bootstrap (v5.0.0-alpha1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var MAX_UID = 1000000;
|
||||
var MILLISECONDS_MULTIPLIER = 1000;
|
||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var getUID = function getUID(prefix) {
|
||||
do {
|
||||
prefix += Math.floor(Math.random() * MAX_UID);
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
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 findShadowRoot = function findShadowRoot(element) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
return null;
|
||||
} // Can find the shadow root otherwise it'll return the document
|
||||
|
||||
|
||||
if (typeof element.getRootNode === 'function') {
|
||||
var root = element.getRootNode();
|
||||
return root instanceof ShadowRoot ? root : null;
|
||||
}
|
||||
|
||||
if (element instanceof ShadowRoot) {
|
||||
return element;
|
||||
} // when we don't find a shadow root
|
||||
|
||||
|
||||
if (!element.parentNode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return findShadowRoot(element.parentNode);
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-alpha1): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
|
||||
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
||||
|
||||
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
|
||||
var attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var regExp = allowedAttributeList.filter(function (attrRegex) {
|
||||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, len = regExp.length; i < len; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
@@ -92,47 +226,10 @@
|
||||
u: [],
|
||||
ul: []
|
||||
};
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
var attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var regExp = allowedAttributeList.filter(function (attrRegex) {
|
||||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, len = regExp.length; i < len; i++) {
|
||||
if (regExp[i].test(attrName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
var _ref;
|
||||
|
||||
if (!unsafeHtml.length) {
|
||||
return unsafeHtml;
|
||||
}
|
||||
|
||||
@@ -143,18 +240,21 @@
|
||||
var domParser = new window.DOMParser();
|
||||
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
|
||||
var whitelistKeys = Object.keys(whiteList);
|
||||
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
|
||||
|
||||
var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
|
||||
|
||||
var _loop = function _loop(i, len) {
|
||||
var _ref2;
|
||||
|
||||
var el = elements[i];
|
||||
var elName = el.nodeName.toLowerCase();
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
if (whitelistKeys.indexOf(elName) === -1) {
|
||||
el.parentNode.removeChild(el);
|
||||
return "continue";
|
||||
}
|
||||
|
||||
var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
|
||||
var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
|
||||
|
||||
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
|
||||
attributeList.forEach(function (attr) {
|
||||
@@ -173,54 +273,28 @@
|
||||
return createdDocument.body.innerHTML;
|
||||
}
|
||||
|
||||
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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tooltip';
|
||||
var VERSION = '4.6.2';
|
||||
var VERSION = '5.0.0-alpha1';
|
||||
var DATA_KEY = 'bs.tooltip';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var HOVER_STATE_SHOW = 'show';
|
||||
var HOVER_STATE_OUT = 'out';
|
||||
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
||||
var SELECTOR_ARROW = '.arrow';
|
||||
var TRIGGER_HOVER = 'hover';
|
||||
var TRIGGER_FOCUS = 'focus';
|
||||
var TRIGGER_CLICK = 'click';
|
||||
var TRIGGER_MANUAL = 'manual';
|
||||
var AttachmentMap = {
|
||||
AUTO: 'auto',
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent',
|
||||
customClass: '',
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
whiteList: DefaultWhitelist,
|
||||
popperConfig: null
|
||||
};
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
@@ -234,13 +308,37 @@
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)',
|
||||
boundary: '(string|element)',
|
||||
customClass: '(string|function)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
whiteList: 'object',
|
||||
popperConfig: '(null|object)'
|
||||
};
|
||||
var Event = {
|
||||
var AttachmentMap = {
|
||||
AUTO: 'auto',
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent',
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
whiteList: DefaultWhitelist,
|
||||
popperConfig: null
|
||||
};
|
||||
var Event$1 = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
@@ -252,15 +350,27 @@
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_MODAL = 'modal';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var HOVER_STATE_SHOW = 'show';
|
||||
var HOVER_STATE_OUT = 'out';
|
||||
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
||||
var TRIGGER_HOVER = 'hover';
|
||||
var TRIGGER_FOCUS = 'focus';
|
||||
var TRIGGER_CLICK = 'click';
|
||||
var TRIGGER_MANUAL = 'manual';
|
||||
/**
|
||||
* Class definition
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tooltip = /*#__PURE__*/function () {
|
||||
function Tooltip(element, config) {
|
||||
if (typeof Popper__default["default"] === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
|
||||
} // Private
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
|
||||
} // private
|
||||
|
||||
|
||||
this._isEnabled = true;
|
||||
@@ -274,6 +384,8 @@
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
|
||||
Data.setData(element, this.constructor.DATA_KEY, this);
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -299,11 +411,11 @@
|
||||
|
||||
if (event) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
var context = $__default["default"](event.currentTarget).data(dataKey);
|
||||
var context = Data.getData(event.target, dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default["default"](event.currentTarget).data(dataKey, context);
|
||||
context = new this.constructor(event.target, this._getDelegateConfig());
|
||||
Data.setData(event.target, dataKey, context);
|
||||
}
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click;
|
||||
@@ -314,7 +426,7 @@
|
||||
context._leave(null, context);
|
||||
}
|
||||
} else {
|
||||
if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
|
||||
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
|
||||
this._leave(null, this);
|
||||
|
||||
return;
|
||||
@@ -326,12 +438,12 @@
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
$__default["default"].removeData(this.element, this.constructor.DATA_KEY);
|
||||
$__default["default"](this.element).off(this.constructor.EVENT_KEY);
|
||||
$__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
|
||||
Data.removeData(this.element, this.constructor.DATA_KEY);
|
||||
EventHandler.off(this.element, this.constructor.EVENT_KEY);
|
||||
EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.tip) {
|
||||
$__default["default"](this.tip).remove();
|
||||
this.tip.parentNode.removeChild(this.tip);
|
||||
}
|
||||
|
||||
this._isEnabled = null;
|
||||
@@ -352,55 +464,56 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if ($__default["default"](this.element).css('display') === 'none') {
|
||||
if (this.element.style.display === 'none') {
|
||||
throw new Error('Please use show on visible elements');
|
||||
}
|
||||
|
||||
var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
|
||||
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$__default["default"](this.element).trigger(showEvent);
|
||||
var shadowRoot = Util__default["default"].findShadowRoot(this.element);
|
||||
var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
|
||||
var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
|
||||
var shadowRoot = findShadowRoot(this.element);
|
||||
var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||
if (showEvent.defaultPrevented || !isInTheDom) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var tipId = Util__default["default"].getUID(this.constructor.NAME);
|
||||
var tipId = getUID(this.constructor.NAME);
|
||||
tip.setAttribute('id', tipId);
|
||||
this.element.setAttribute('aria-describedby', tipId);
|
||||
this.setContent();
|
||||
|
||||
if (this.config.animation) {
|
||||
$__default["default"](tip).addClass(CLASS_NAME_FADE);
|
||||
tip.classList.add(CLASS_NAME_FADE);
|
||||
}
|
||||
|
||||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
|
||||
this.addAttachmentClass(attachment);
|
||||
this._addAttachmentClass(attachment);
|
||||
|
||||
var container = this._getContainer();
|
||||
|
||||
$__default["default"](tip).data(this.constructor.DATA_KEY, this);
|
||||
Data.setData(tip, this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$__default["default"](tip).appendTo(container);
|
||||
if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
|
||||
container.appendChild(tip);
|
||||
}
|
||||
|
||||
$__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
|
||||
this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
|
||||
$__default["default"](tip).addClass(CLASS_NAME_SHOW);
|
||||
$__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
|
||||
EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
|
||||
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
|
||||
tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
|
||||
var _ref;
|
||||
|
||||
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
|
||||
EventHandler.on(element, 'mouseover', noop());
|
||||
});
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
@@ -410,27 +523,27 @@
|
||||
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
$__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
|
||||
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HOVER_STATE_OUT) {
|
||||
_this._leave(null, _this);
|
||||
}
|
||||
};
|
||||
|
||||
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this.tip);
|
||||
$__default["default"](this.tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
if (this.tip.classList.contains(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this.tip);
|
||||
EventHandler.one(this.tip, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this.tip, transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto.hide = function hide(callback) {
|
||||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
||||
@@ -441,37 +554,36 @@
|
||||
|
||||
_this2.element.removeAttribute('aria-describedby');
|
||||
|
||||
$__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||
EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
|
||||
|
||||
if (_this2._popper !== null) {
|
||||
_this2._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
_this2._popper.destroy();
|
||||
};
|
||||
|
||||
$__default["default"](this.element).trigger(hideEvent);
|
||||
var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
$__default["default"](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
|
||||
tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
|
||||
var _ref2;
|
||||
|
||||
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
|
||||
return EventHandler.off(element, 'mouseover', noop);
|
||||
});
|
||||
}
|
||||
|
||||
this._activeTrigger[TRIGGER_CLICK] = false;
|
||||
this._activeTrigger[TRIGGER_FOCUS] = false;
|
||||
this._activeTrigger[TRIGGER_HOVER] = false;
|
||||
|
||||
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(tip);
|
||||
$__default["default"](tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
if (this.tip.classList.contains(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = getTransitionDurationFromElement(tip);
|
||||
EventHandler.one(tip, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(tip, transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
@@ -490,30 +602,41 @@
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
this.tip = this.tip || $__default["default"](this.config.template)[0];
|
||||
if (this.tip) {
|
||||
return this.tip;
|
||||
}
|
||||
|
||||
var element = document.createElement('div');
|
||||
element.innerHTML = this.config.template;
|
||||
this.tip = element.children[0];
|
||||
return this.tip;
|
||||
};
|
||||
|
||||
_proto.setContent = function setContent() {
|
||||
var tip = this.getTipElement();
|
||||
this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
|
||||
$__default["default"](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
|
||||
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
|
||||
};
|
||||
|
||||
_proto.setElementContent = function setElementContent($element, content) {
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
_proto.setElementContent = function setElementContent(element, content) {
|
||||
if (element === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof content === 'object' && isElement(content)) {
|
||||
if (content.jquery) {
|
||||
content = content[0];
|
||||
} // content is a DOM node or a jQuery
|
||||
|
||||
|
||||
if (this.config.html) {
|
||||
if (!$__default["default"](content).parent().is($element)) {
|
||||
$element.empty().append(content);
|
||||
if (content.parentNode !== element) {
|
||||
element.innerHTML = '';
|
||||
element.appendChild(content);
|
||||
}
|
||||
} else {
|
||||
$element.text($__default["default"](content).text());
|
||||
element.textContent = content.textContent;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -524,9 +647,9 @@
|
||||
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
|
||||
}
|
||||
|
||||
$element.html(content);
|
||||
element.innerHTML = content;
|
||||
} else {
|
||||
$element.text(content);
|
||||
element.textContent = content;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -552,7 +675,7 @@
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
arrow: {
|
||||
element: SELECTOR_ARROW
|
||||
element: "." + this.constructor.NAME + "-arrow"
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this.config.boundary
|
||||
@@ -567,7 +690,11 @@
|
||||
return _this3._handlePopperPlacementChange(data);
|
||||
}
|
||||
};
|
||||
return _extends({}, defaultBsConfig, this.config.popperConfig);
|
||||
return _objectSpread(_objectSpread({}, defaultBsConfig), this.config.popperConfig);
|
||||
};
|
||||
|
||||
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
|
||||
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
@@ -577,7 +704,7 @@
|
||||
|
||||
if (typeof this.config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
|
||||
data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
@@ -592,11 +719,11 @@
|
||||
return document.body;
|
||||
}
|
||||
|
||||
if (Util__default["default"].isElement(this.config.container)) {
|
||||
return $__default["default"](this.config.container);
|
||||
if (isElement(this.config.container)) {
|
||||
return this.config.container;
|
||||
}
|
||||
|
||||
return $__default["default"](document).find(this.config.container);
|
||||
return SelectorEngine.findOne(this.config.container);
|
||||
};
|
||||
|
||||
_proto._getAttachment = function _getAttachment(placement) {
|
||||
@@ -609,15 +736,16 @@
|
||||
var triggers = this.config.trigger.split(' ');
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
|
||||
EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
|
||||
return _this5.toggle(event);
|
||||
});
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
|
||||
$__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
|
||||
EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
|
||||
return _this5._enter(event);
|
||||
}).on(eventOut, _this5.config.selector, function (event) {
|
||||
});
|
||||
EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
|
||||
return _this5._leave(event);
|
||||
});
|
||||
}
|
||||
@@ -629,10 +757,10 @@
|
||||
}
|
||||
};
|
||||
|
||||
$__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
|
||||
EventHandler.on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = _extends({}, this.config, {
|
||||
this.config = _objectSpread(_objectSpread({}, this.config), {}, {
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
});
|
||||
@@ -652,18 +780,18 @@
|
||||
|
||||
_proto._enter = function _enter(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
context = context || $__default["default"](event.currentTarget).data(dataKey);
|
||||
context = context || Data.getData(event.target, dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default["default"](event.currentTarget).data(dataKey, context);
|
||||
context = new this.constructor(event.target, this._getDelegateConfig());
|
||||
Data.setData(event.target, dataKey, context);
|
||||
}
|
||||
|
||||
if (event) {
|
||||
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
|
||||
}
|
||||
|
||||
if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
||||
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
||||
context._hoverState = HOVER_STATE_SHOW;
|
||||
return;
|
||||
}
|
||||
@@ -685,11 +813,11 @@
|
||||
|
||||
_proto._leave = function _leave(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
context = context || $__default["default"](event.currentTarget).data(dataKey);
|
||||
context = context || Data.getData(event.target, dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default["default"](event.currentTarget).data(dataKey, context);
|
||||
context = new this.constructor(event.target, this._getDelegateConfig());
|
||||
Data.setData(event.target, dataKey, context);
|
||||
}
|
||||
|
||||
if (event) {
|
||||
@@ -726,13 +854,18 @@
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
var dataAttributes = $__default["default"](this.element).data();
|
||||
var dataAttributes = Manipulator.getDataAttributes(this.element);
|
||||
Object.keys(dataAttributes).forEach(function (dataAttr) {
|
||||
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
|
||||
delete dataAttributes[dataAttr];
|
||||
}
|
||||
});
|
||||
config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (config && typeof config.container === 'object' && config.container.jquery) {
|
||||
config.container = config.container[0];
|
||||
}
|
||||
|
||||
config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
@@ -749,7 +882,7 @@
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
if (config.sanitize) {
|
||||
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
|
||||
@@ -773,20 +906,25 @@
|
||||
};
|
||||
|
||||
_proto._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $__default["default"](this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
var tip = this.getTipElement();
|
||||
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
tabClass.map(function (token) {
|
||||
return token.trim();
|
||||
}).forEach(function (tClass) {
|
||||
return tip.classList.remove(tClass);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
|
||||
this.tip = popperData.instance.popper;
|
||||
var popperInstance = popperData.instance;
|
||||
this.tip = popperInstance.popper;
|
||||
|
||||
this._cleanTipClass();
|
||||
|
||||
this.addAttachmentClass(this._getAttachment(popperData.placement));
|
||||
this._addAttachmentClass(this._getAttachment(popperData.placement));
|
||||
};
|
||||
|
||||
_proto._fixTransition = function _fixTransition() {
|
||||
@@ -797,7 +935,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
$__default["default"](tip).removeClass(CLASS_NAME_FADE);
|
||||
tip.classList.remove(CLASS_NAME_FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
@@ -805,10 +943,9 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
Tooltip.jQueryInterface = function jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default["default"](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
var data = Data.getData(this, DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
@@ -818,7 +955,6 @@
|
||||
|
||||
if (!data) {
|
||||
data = new Tooltip(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@@ -831,6 +967,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
Tooltip.getInstance = function getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY);
|
||||
};
|
||||
|
||||
_createClass(Tooltip, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
@@ -854,7 +994,7 @@
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
return Event$1;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
@@ -870,20 +1010,29 @@
|
||||
|
||||
return Tooltip;
|
||||
}();
|
||||
|
||||
var $ = getjQuery();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
* add .tooltip to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
$__default["default"].fn[NAME] = Tooltip._jQueryInterface;
|
||||
$__default["default"].fn[NAME].Constructor = Tooltip;
|
||||
if ($) {
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
$.fn[NAME] = Tooltip.jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tooltip;
|
||||
|
||||
$__default["default"].fn[NAME].noConflict = function () {
|
||||
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tooltip._jQueryInterface;
|
||||
};
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tooltip.jQueryInterface;
|
||||
};
|
||||
}
|
||||
|
||||
return Tooltip;
|
||||
|
||||
}));
|
||||
})));
|
||||
//# sourceMappingURL=tooltip.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