0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Release v5.0.1 (#33972)

* Bump version to 5.0.1.

* Dist
This commit is contained in:
XhmikosR 2021-05-13 19:22:20 +03:00 committed by GitHub
parent 130a5ba1df
commit 58b1be927f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 1676 additions and 2048 deletions

View File

@ -46,11 +46,11 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
Several quick start options are available: Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0.zip) - [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.1.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` - Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap` - Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0` - Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.1`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` - Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.

View File

@ -47,8 +47,8 @@ params:
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
current_version: "5.0.0" current_version: "5.0.1"
current_ruby_version: "5.0.0" current_ruby_version: "5.0.1"
docs_version: "5.0" docs_version: "5.0"
rfs_version: "9.0.3" rfs_version: "9.0.3"
github_org: "https://github.com/twbs" github_org: "https://github.com/twbs"
@ -61,19 +61,19 @@ params:
icons: "https://icons.getbootstrap.com/" icons: "https://icons.getbootstrap.com/"
download: download:
source: "https://github.com/twbs/bootstrap/archive/v5.0.0.zip" source: "https://github.com/twbs/bootstrap/archive/v5.0.1.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-dist.zip" dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.1/bootstrap-5.0.1-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-examples.zip" dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.1/bootstrap-5.0.1-examples.zip"
cdn: cdn:
# See https://www.srihash.org for info on how to generate the hashes # See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
css_hash: "sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" css_hash: "sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.rtl.min.css" css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-jHiSqEim4+W1UCvv8kTcMbtCZlRF8MxbgKdfpvncia8gdN1UImBnhTpKtufREzv7" css_rtl_hash: "sha384-LPvXVVAlyPoBSGkX8UddpctDks+1P4HG8MhT7/YwqHtJ40bstjzCqjj+VVVDhsCo"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.min.js" js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
js_hash: "sha384-lpyLfhYuitXl2zRZ5Bn2fqnhNAKOAaM/0Kr9laMspuaMiZfGmfwRNFh8HlMy49eQ" js_hash: "sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js" js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8" js_bundle_hash: "sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
popper_hash: "sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" popper_hash: "sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/) * Bootstrap Grid v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/) * Bootstrap Grid v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/) * Bootstrap Grid v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/) * Bootstrap Grid v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/) * Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/) * Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/) * Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/) * Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
/*! /*!
* Bootstrap v5.0.0 (https://getbootstrap.com/) * Bootstrap v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -1921,6 +1921,7 @@ progress {
} }
.table { .table {
--bs-table-bg: transparent; --bs-table-bg: transparent;
--bs-table-accent-bg: transparent;
--bs-table-striped-color: #212529; --bs-table-striped-color: #212529;
--bs-table-striped-bg: rgba(0, 0, 0, 0.05); --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
--bs-table-active-color: #212529; --bs-table-active-color: #212529;
@ -2169,10 +2170,7 @@ progress {
.form-control[type=file] { .form-control[type=file] {
overflow: hidden; overflow: hidden;
} }
.form-control[type=file]:not(:disabled):not(:-moz-read-only) { .form-control[type=file]:not(:disabled):not([readonly]) {
cursor: pointer;
}
.form-control[type=file]:not(:disabled):not(:read-only) {
cursor: pointer; cursor: pointer;
} }
.form-control:focus { .form-control:focus {
@ -2193,11 +2191,7 @@ progress {
color: #6c757d; color: #6c757d;
opacity: 1; opacity: 1;
} }
.form-control:-moz-read-only { .form-control:disabled, .form-control[readonly] {
background-color: #e9ecef;
opacity: 1;
}
.form-control:disabled, .form-control:read-only {
background-color: #e9ecef; background-color: #e9ecef;
opacity: 1; opacity: 1;
} }
@ -2221,10 +2215,7 @@ progress {
transition: none; transition: none;
} }
} }
.form-control:hover:not(:disabled):not(:-moz-read-only)::file-selector-button { .form-control:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: #dde0e3;
}
.form-control:hover:not(:disabled):not(:read-only)::file-selector-button {
background-color: #dde0e3; background-color: #dde0e3;
} }
.form-control::-webkit-file-upload-button { .form-control::-webkit-file-upload-button {
@ -2249,7 +2240,7 @@ progress {
transition: none; transition: none;
} }
} }
.form-control:hover:not(:disabled):not(:read-only)::-webkit-file-upload-button { .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
background-color: #dde0e3; background-color: #dde0e3;
} }
@ -2322,10 +2313,7 @@ textarea.form-control-lg {
height: auto; height: auto;
padding: 0.375rem; padding: 0.375rem;
} }
.form-control-color:not(:disabled):not(:-moz-read-only) { .form-control-color:not(:disabled):not([readonly]) {
cursor: pointer;
}
.form-control-color:not(:disabled):not(:read-only) {
cursor: pointer; cursor: pointer;
} }
.form-control-color::-moz-color-swatch { .form-control-color::-moz-color-swatch {
@ -2804,6 +2792,11 @@ textarea.form-control-lg {
.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid, .was-validated .input-group .form-control:valid, .input-group .form-control.is-valid,
.was-validated .input-group .form-select:valid, .was-validated .input-group .form-select:valid,
.input-group .form-select.is-valid { .input-group .form-select.is-valid {
z-index: 1;
}
.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus,
.was-validated .input-group .form-select:valid:focus,
.input-group .form-select.is-valid:focus {
z-index: 3; z-index: 3;
} }
@ -2888,6 +2881,11 @@ textarea.form-control-lg {
.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid, .was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid,
.was-validated .input-group .form-select:invalid, .was-validated .input-group .form-select:invalid,
.input-group .form-select.is-invalid { .input-group .form-select.is-invalid {
z-index: 2;
}
.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus,
.was-validated .input-group .form-select:invalid:focus,
.input-group .form-select.is-invalid:focus {
z-index: 3; z-index: 3;
} }
@ -5203,14 +5201,6 @@ textarea.form-control-lg {
word-wrap: break-word; word-wrap: break-word;
} }
.modal-open {
overflow: hidden;
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal { .modal {
position: fixed; position: fixed;
top: 0; top: 0;
@ -5219,7 +5209,8 @@ textarea.form-control-lg {
display: none; display: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow-x: hidden;
overflow-y: auto;
outline: 0; outline: 0;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
/*! /*!
* Bootstrap v5.0.0 (https://getbootstrap.com/) * Bootstrap v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -1919,6 +1919,7 @@ progress {
} }
.table { .table {
--bs-table-bg: transparent; --bs-table-bg: transparent;
--bs-table-accent-bg: transparent;
--bs-table-striped-color: #212529; --bs-table-striped-color: #212529;
--bs-table-striped-bg: rgba(0, 0, 0, 0.05); --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
--bs-table-active-color: #212529; --bs-table-active-color: #212529;
@ -2167,10 +2168,7 @@ progress {
.form-control[type=file] { .form-control[type=file] {
overflow: hidden; overflow: hidden;
} }
.form-control[type=file]:not(:disabled):not(:-moz-read-only) { .form-control[type=file]:not(:disabled):not([readonly]) {
cursor: pointer;
}
.form-control[type=file]:not(:disabled):not(:read-only) {
cursor: pointer; cursor: pointer;
} }
.form-control:focus { .form-control:focus {
@ -2191,11 +2189,7 @@ progress {
color: #6c757d; color: #6c757d;
opacity: 1; opacity: 1;
} }
.form-control:-moz-read-only { .form-control:disabled, .form-control[readonly] {
background-color: #e9ecef;
opacity: 1;
}
.form-control:disabled, .form-control:read-only {
background-color: #e9ecef; background-color: #e9ecef;
opacity: 1; opacity: 1;
} }
@ -2219,10 +2213,7 @@ progress {
transition: none; transition: none;
} }
} }
.form-control:hover:not(:disabled):not(:-moz-read-only)::file-selector-button { .form-control:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: #dde0e3;
}
.form-control:hover:not(:disabled):not(:read-only)::file-selector-button {
background-color: #dde0e3; background-color: #dde0e3;
} }
.form-control::-webkit-file-upload-button { .form-control::-webkit-file-upload-button {
@ -2247,7 +2238,7 @@ progress {
transition: none; transition: none;
} }
} }
.form-control:hover:not(:disabled):not(:read-only)::-webkit-file-upload-button { .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
background-color: #dde0e3; background-color: #dde0e3;
} }
@ -2320,10 +2311,7 @@ textarea.form-control-lg {
height: auto; height: auto;
padding: 0.375rem; padding: 0.375rem;
} }
.form-control-color:not(:disabled):not(:-moz-read-only) { .form-control-color:not(:disabled):not([readonly]) {
cursor: pointer;
}
.form-control-color:not(:disabled):not(:read-only) {
cursor: pointer; cursor: pointer;
} }
.form-control-color::-moz-color-swatch { .form-control-color::-moz-color-swatch {
@ -2802,6 +2790,11 @@ textarea.form-control-lg {
.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid, .was-validated .input-group .form-control:valid, .input-group .form-control.is-valid,
.was-validated .input-group .form-select:valid, .was-validated .input-group .form-select:valid,
.input-group .form-select.is-valid { .input-group .form-select.is-valid {
z-index: 1;
}
.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus,
.was-validated .input-group .form-select:valid:focus,
.input-group .form-select.is-valid:focus {
z-index: 3; z-index: 3;
} }
@ -2886,6 +2879,11 @@ textarea.form-control-lg {
.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid, .was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid,
.was-validated .input-group .form-select:invalid, .was-validated .input-group .form-select:invalid,
.input-group .form-select.is-invalid { .input-group .form-select.is-invalid {
z-index: 2;
}
.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus,
.was-validated .input-group .form-select:invalid:focus,
.input-group .form-select.is-invalid:focus {
z-index: 3; z-index: 3;
} }
@ -5201,14 +5199,6 @@ textarea.form-control-lg {
word-wrap: break-word; word-wrap: break-word;
} }
.modal-open {
overflow: hidden;
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal { .modal {
position: fixed; position: fixed;
top: 0; top: 0;
@ -5217,7 +5207,8 @@ textarea.form-control-lg {
display: none; display: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow-x: hidden;
overflow-y: auto;
outline: 0; outline: 0;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.0 (https://getbootstrap.com/) * Bootstrap v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,10 +11,82 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js * Bootstrap (v5.0.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -107,7 +179,30 @@
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement$1 = obj => (obj[0] || obj).nodeType; const isElement$1 = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement$1(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj);
}
return null;
};
const emulateTransitionEnd = (element, duration) => { const emulateTransitionEnd = (element, duration) => {
let called = false; let called = false;
@ -218,12 +313,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -244,7 +340,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/data.js * Bootstrap (v5.0.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -298,7 +394,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/event-handler.js * Bootstrap (v5.0.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -587,7 +683,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): base-component.js * Bootstrap (v5.0.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -597,11 +693,11 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.0'; const VERSION = '5.0.1';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
element = typeof element === 'string' ? document.querySelector(element) : element; element = getElement(element);
if (!element) { if (!element) {
return; return;
@ -613,8 +709,21 @@
dispose() { dispose() {
Data.remove(this._element, this.constructor.DATA_KEY); Data.remove(this._element, this.constructor.DATA_KEY);
EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`); EventHandler.off(this._element, this.constructor.EVENT_KEY);
this._element = null; Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
if (!isAnimated) {
execute(callback);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => execute(callback));
emulateTransitionEnd(element, transitionDuration);
} }
/** Static */ /** Static */
@ -627,11 +736,23 @@
return VERSION; return VERSION;
} }
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
} }
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): alert.js * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -660,8 +781,8 @@
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$b; return NAME$c;
} // Public } // Public
@ -688,16 +809,9 @@
_removeElement(element) { _removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9); element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
if (!element.classList.contains(CLASS_NAME_FADE$6)) { this._queueCallback(() => this._destroyElement(element), element, isAnimated);
this._destroyElement(element);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => this._destroyElement(element));
emulateTransitionEnd(element, transitionDuration);
} }
_destroyElement(element) { _destroyElement(element) {
@ -749,11 +863,11 @@
* add .Alert to jQuery only if jQuery is present * add .Alert to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$c, Alert); defineJQueryPlugin(Alert);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): button.js * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -778,8 +892,8 @@
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$a; return NAME$b;
} // Public } // Public
@ -829,11 +943,11 @@
* add .Button to jQuery only if jQuery is present * add .Button to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$b, Button); defineJQueryPlugin(Button);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/manipulator.js * Bootstrap (v5.0.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -907,78 +1021,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/selector-engine.js * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1079,8 +1122,8 @@
return Default$9; return Default$9;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$9; return NAME$a;
} // Public } // Public
@ -1158,17 +1201,6 @@
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, this._items[index]); this._slide(order, this._items[index]);
}
dispose() {
this._items = null;
this._config = null;
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
super.dispose();
} // Private } // Private
@ -1397,37 +1429,35 @@
this._activeElement = nextElement; this._activeElement = nextElement;
if (this._element.classList.contains(CLASS_NAME_SLIDE)) { const triggerSlidEvent = () => {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, 'transitionend', () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(() => {
EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
EventHandler.trigger(this._element, EVENT_SLID, { EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
to: nextElementIndex to: nextElementIndex
}); });
};
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const completeCallBack = () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(triggerSlidEvent, 0);
};
this._queueCallback(completeCallBack, activeElement, true);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
triggerSlidEvent();
} }
if (isCycling) { if (isCycling) {
@ -1546,11 +1576,11 @@
* add .Carousel to jQuery only if jQuery is present * add .Carousel to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$a, Carousel); defineJQueryPlugin(Carousel);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): collapse.js * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1627,8 +1657,8 @@
return Default$8; return Default$8;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$8; return NAME$9;
} // Public } // Public
@ -1720,9 +1750,9 @@
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`; const scrollSize = `scroll${capitalizedDimension}`;
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = `${this._element[scrollSize]}px`; this._element.style[dimension] = `${this._element[scrollSize]}px`;
} }
@ -1773,21 +1803,12 @@
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
} }
setTransitioning(isTransitioning) { setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning; this._isTransitioning = isTransitioning;
}
dispose() {
super.dispose();
this._config = null;
this._parent = null;
this._triggerArray = null;
this._isTransitioning = null;
} // Private } // Private
@ -1809,16 +1830,7 @@
let { let {
parent parent
} = this._config; } = this._config;
parent = getElement(parent);
if (isElement$1(parent)) {
// it's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0];
}
} else {
parent = SelectorEngine.findOne(parent);
}
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(selector, parent).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
@ -1919,7 +1931,7 @@
* add .Collapse to jQuery only if jQuery is present * add .Collapse to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$9, Collapse); defineJQueryPlugin(Collapse);
var top = 'top'; var top = 'top';
var bottom = 'bottom'; var bottom = 'bottom';
@ -3677,7 +3689,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dropdown.js * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3764,8 +3776,8 @@
return DefaultType$7; return DefaultType$7;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$7; return NAME$8;
} // Public } // Public
@ -3812,11 +3824,7 @@
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = parent; referenceElement = parent;
} else if (isElement$1(this._config.reference)) { } else if (isElement$1(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element referenceElement = getElement(this._config.reference);
if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0];
}
} else if (typeof this._config.reference === 'object') { } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference; referenceElement = this._config.reference;
} }
@ -3863,12 +3871,8 @@
} }
dispose() { dispose() {
this._menu = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
this._popper = null;
} }
super.dispose(); super.dispose();
@ -4054,14 +4058,8 @@
} }
static clearMenus(event) { static clearMenus(event) {
if (event) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { return;
return;
}
if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
return;
}
} }
const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3); const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
@ -4087,10 +4085,10 @@
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue; continue;
} // Tab navigation through the dropdown menu shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -4176,11 +4174,11 @@
* add .Dropdown to jQuery only if jQuery is present * add .Dropdown to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$8, Dropdown); defineJQueryPlugin(Dropdown);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/scrollBar.js * Bootstrap (v5.0.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4254,7 +4252,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4338,6 +4336,7 @@
config = { ...Default$6, config = { ...Default$6,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
config.rootElement = config.rootElement || document.body;
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$7, config, DefaultType$6);
return config; return config;
} }
@ -4382,7 +4381,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): modal.js * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4412,7 +4411,7 @@
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`; const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
@ -4449,8 +4448,8 @@
return Default$5; return Default$5;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$6; return NAME$6;
} // Public } // Public
@ -4524,24 +4523,21 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$5);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (isAnimated) { this._queueCallback(() => this._hideModal(), this._element, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
} }
dispose() { dispose() {
[window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6)); [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
this._backdrop.dispose();
super.dispose(); super.dispose();
/** /**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@ -4549,16 +4545,7 @@
* It will remove `EVENT_CLICK_DATA_API` event that should remain * It will remove `EVENT_CLICK_DATA_API` event that should remain
*/ */
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._config = null;
this._dialog = null;
this._backdrop.dispose();
this._backdrop = null;
this._isShown = null;
this._ignoreBackdropClick = null;
this._isTransitioning = null;
} }
handleUpdate() { handleUpdate() {
@ -4628,19 +4615,13 @@
}); });
}; };
if (isAnimated) { this._queueCallback(transitionComplete, this._dialog, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, 'transitionend', transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
} }
_enforceFocus() { _enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => { EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) { if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus(); this._element.focus();
} }
@ -4824,11 +4805,11 @@
* add .Modal to jQuery only if jQuery is present * add .Modal to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$6, Modal); defineJQueryPlugin(Modal);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): offcanvas.js * Bootstrap (v5.0.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4860,7 +4841,7 @@
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`; const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`; const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
@ -4883,12 +4864,12 @@
} // Getters } // Getters
static get Default() { static get NAME() {
return Default$4; return NAME$5;
} }
static get DATA_KEY() { static get Default() {
return DATA_KEY$5; return Default$4;
} // Public } // Public
@ -4934,9 +4915,7 @@
}); });
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallBack, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallBack);
emulateTransitionEnd(this._element, transitionDuration);
} }
hide() { hide() {
@ -4950,7 +4929,7 @@
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._element.blur(); this._element.blur();
@ -4976,18 +4955,14 @@
EventHandler.trigger(this._element, EVENT_HIDDEN$2); EventHandler.trigger(this._element, EVENT_HIDDEN$2);
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallback, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallback);
emulateTransitionEnd(this._element, transitionDuration);
} }
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._config = null;
this._backdrop = null;
} // Private } // Private
@ -5010,9 +4985,9 @@
} }
_enforceFocusOnElement(element) { _enforceFocusOnElement(element) {
EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN, event => { EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) { if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus(); element.focus();
} }
@ -5090,11 +5065,11 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
defineJQueryPlugin(NAME$5, Offcanvas); defineJQueryPlugin(Offcanvas);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/sanitizer.js * Bootstrap (v5.0.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -5207,7 +5182,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tooltip.js * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -5310,7 +5285,7 @@
this._activeTrigger = {}; this._activeTrigger = {};
this._popper = null; // Protected this._popper = null; // Protected
this.config = this._getConfig(config); this._config = this._getConfig(config);
this.tip = null; this.tip = null;
this._setListeners(); this._setListeners();
@ -5325,18 +5300,10 @@
return NAME$4; return NAME$4;
} }
static get DATA_KEY() {
return DATA_KEY$4;
}
static get Event() { static get Event() {
return Event$2; return Event$2;
} }
static get EVENT_KEY() {
return EVENT_KEY$4;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$3; return DefaultType$3;
} // Public } // Public
@ -5388,18 +5355,10 @@
this.tip.parentNode.removeChild(this.tip); this.tip.parentNode.removeChild(this.tip);
} }
this._isEnabled = null;
this._timeout = null;
this._hoverState = null;
this._activeTrigger = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
this._popper = null;
this.config = null;
this.tip = null;
super.dispose(); super.dispose();
} }
@ -5428,18 +5387,19 @@
this.setContent(); this.setContent();
if (this.config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$3);
} }
const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
const attachment = this._getAttachment(placement); const attachment = this._getAttachment(placement);
this._addAttachmentClass(attachment); this._addAttachmentClass(attachment);
const container = this._getContainer(); const {
container
} = this._config;
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
@ -5454,7 +5414,7 @@
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$3);
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -5480,13 +5440,9 @@
} }
}; };
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
const transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, 'transitionend', complete); this._queueCallback(complete, this.tip, isAnimated);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -5534,14 +5490,9 @@
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { this._queueCallback(complete, this.tip, isAnimated);
const transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, 'transitionend', complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
this._hoverState = ''; this._hoverState = '';
} }
@ -5563,7 +5514,7 @@
} }
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this.config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; this.tip = element.children[0];
return this.tip; return this.tip;
} }
@ -5579,13 +5530,10 @@
return; return;
} }
if (typeof content === 'object' && isElement$1(content)) { if (isElement$1(content)) {
if (content.jquery) { content = getElement(content); // content is a DOM node or a jQuery
content = content[0];
} // content is a DOM node or a jQuery
if (this._config.html) {
if (this.config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.appendChild(content);
@ -5597,9 +5545,9 @@
return; return;
} }
if (this.config.html) { if (this._config.html) {
if (this.config.sanitize) { if (this._config.sanitize) {
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn); content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
} }
element.innerHTML = content; element.innerHTML = content;
@ -5612,7 +5560,7 @@
let title = this._element.getAttribute('data-bs-original-title'); let title = this._element.getAttribute('data-bs-original-title');
if (!title) { if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title; title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
} }
return title; return title;
@ -5646,7 +5594,7 @@
_getOffset() { _getOffset() {
const { const {
offset offset
} = this.config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(val => Number.parseInt(val, 10)); return offset.split(',').map(val => Number.parseInt(val, 10));
@ -5665,7 +5613,7 @@
modifiers: [{ modifiers: [{
name: 'flip', name: 'flip',
options: { options: {
fallbackPlacements: this.config.fallbackPlacements fallbackPlacements: this._config.fallbackPlacements
} }
}, { }, {
name: 'offset', name: 'offset',
@ -5675,7 +5623,7 @@
}, { }, {
name: 'preventOverflow', name: 'preventOverflow',
options: { options: {
boundary: this.config.boundary boundary: this._config.boundary
} }
}, { }, {
name: 'arrow', name: 'arrow',
@ -5695,7 +5643,7 @@
} }
}; };
return { ...defaultBsPopperConfig, return { ...defaultBsPopperConfig,
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}; };
} }
@ -5703,32 +5651,21 @@
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
} }
_getContainer() {
if (this.config.container === false) {
return document.body;
}
if (isElement$1(this.config.container)) {
return this.config.container;
}
return SelectorEngine.findOne(this.config.container);
}
_getAttachment(placement) { _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()]; return AttachmentMap[placement.toUpperCase()];
} }
_setListeners() { _setListeners() {
const triggers = this.config.trigger.split(' '); const triggers = this._config.trigger.split(' ');
triggers.forEach(trigger => { triggers.forEach(trigger => {
if (trigger === 'click') { if (trigger === 'click') {
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)); EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event)); EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event)); EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
} }
}); });
@ -5740,8 +5677,8 @@
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.config.selector) { if (this._config.selector) {
this.config = { ...this.config, this._config = { ...this._config,
trigger: 'manual', trigger: 'manual',
selector: '' selector: ''
}; };
@ -5781,7 +5718,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context._config.delay || !context._config.delay.show) {
context.show(); context.show();
return; return;
} }
@ -5790,7 +5727,7 @@
if (context._hoverState === HOVER_STATE_SHOW) { if (context._hoverState === HOVER_STATE_SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context._config.delay.show);
} }
_leave(event, context) { _leave(event, context) {
@ -5807,7 +5744,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT; context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) { if (!context._config.delay || !context._config.delay.hide) {
context.hide(); context.hide();
return; return;
} }
@ -5816,7 +5753,7 @@
if (context._hoverState === HOVER_STATE_OUT) { if (context._hoverState === HOVER_STATE_OUT) {
context.hide(); context.hide();
} }
}, context.config.delay.hide); }, context._config.delay.hide);
} }
_isWithActiveTrigger() { _isWithActiveTrigger() {
@ -5836,15 +5773,11 @@
delete dataAttributes[dataAttr]; delete dataAttributes[dataAttr];
} }
}); });
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = { ...this.constructor.Default, config = { ...this.constructor.Default,
...dataAttributes, ...dataAttributes,
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
@ -5873,10 +5806,10 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this.config) { if (this._config) {
for (const key in this.config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this.config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this.config[key]; config[key] = this._config[key];
} }
} }
} }
@ -5943,11 +5876,11 @@
*/ */
defineJQueryPlugin(NAME$4, Tooltip); defineJQueryPlugin(Tooltip);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): popover.js * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6004,18 +5937,10 @@
return NAME$3; return NAME$3;
} }
static get DATA_KEY() {
return DATA_KEY$3;
}
static get Event() { static get Event() {
return Event$1; return Event$1;
} }
static get EVENT_KEY() {
return EVENT_KEY$3;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$2; return DefaultType$2;
} // Overrides } // Overrides
@ -6046,7 +5971,7 @@
} }
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this.config.content; return this._element.getAttribute('data-bs-content') || this._config.content;
} }
_cleanTipClass() { _cleanTipClass() {
@ -6093,11 +6018,11 @@
*/ */
defineJQueryPlugin(NAME$3, Popover); defineJQueryPlugin(Popover);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): scrollspy.js * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6162,8 +6087,8 @@
return Default$1; return Default$1;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$2; return NAME$2;
} // Public } // Public
@ -6196,15 +6121,8 @@
} }
dispose() { dispose() {
super.dispose();
EventHandler.off(this._scrollElement, EVENT_KEY$2); EventHandler.off(this._scrollElement, EVENT_KEY$2);
this._scrollElement = null; super.dispose();
this._config = null;
this._selector = null;
this._offsets = null;
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
} // Private } // Private
@ -6351,11 +6269,11 @@
* add .ScrollSpy to jQuery only if jQuery is present * add .ScrollSpy to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$2, ScrollSpy); defineJQueryPlugin(ScrollSpy);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tab.js * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6393,8 +6311,8 @@
class Tab extends BaseComponent { class Tab extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$1; return NAME$1;
} // Public } // Public
@ -6452,10 +6370,9 @@
const complete = () => this._transitionComplete(element, active, callback); const complete = () => this._transitionComplete(element, active, callback);
if (active && isTransitioning) { if (active && isTransitioning) {
const transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(CLASS_NAME_SHOW$1); active.classList.remove(CLASS_NAME_SHOW$1);
EventHandler.one(active, 'transitionend', complete);
emulateTransitionEnd(active, transitionDuration); this._queueCallback(complete, element, true);
} else { } else {
complete(); complete();
} }
@ -6550,11 +6467,11 @@
* add .Tab to jQuery only if jQuery is present * add .Tab to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$1, Tab); defineJQueryPlugin(Tab);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): toast.js * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6568,6 +6485,10 @@
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
const EVENT_HIDE = `hide${EVENT_KEY}`; const EVENT_HIDE = `hide${EVENT_KEY}`;
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
@ -6598,6 +6519,8 @@
super(element); super(element);
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._timeout = null; this._timeout = null;
this._hasMouseInteraction = false;
this._hasKeyboardInteraction = false;
this._setListeners(); this._setListeners();
} // Getters } // Getters
@ -6611,8 +6534,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -6636,11 +6559,7 @@
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
if (this._config.autohide) { this._maybeScheduleHide();
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE);
@ -6649,13 +6568,7 @@
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -6677,13 +6590,7 @@
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
dispose() { dispose() {
@ -6694,7 +6601,6 @@
} }
super.dispose(); super.dispose();
this._config = null;
} // Private } // Private
@ -6707,8 +6613,54 @@
return config; return config;
} }
_maybeScheduleHide() {
if (!this._config.autohide) {
return;
}
if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
return;
}
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
_onInteraction(event, isInteracting) {
switch (event.type) {
case 'mouseover':
case 'mouseout':
this._hasMouseInteraction = isInteracting;
break;
case 'focusin':
case 'focusout':
this._hasKeyboardInteraction = isInteracting;
break;
}
if (isInteracting) {
this._clearTimeout();
return;
}
const nextElement = event.relatedTarget;
if (this._element === nextElement || this._element.contains(nextElement)) {
return;
}
this._maybeScheduleHide();
}
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()); EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
} }
_clearTimeout() { _clearTimeout() {
@ -6746,11 +6698,11 @@
*/ */
defineJQueryPlugin(NAME, Toast); defineJQueryPlugin(Toast);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): index.umd.js * Bootstrap (v5.0.1): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.0 (https://getbootstrap.com/) * Bootstrap v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -7,10 +7,82 @@ import * as Popper from '@popperjs/core';
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js * Bootstrap (v5.0.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -103,7 +175,30 @@ const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj);
}
return null;
};
const emulateTransitionEnd = (element, duration) => { const emulateTransitionEnd = (element, duration) => {
let called = false; let called = false;
@ -214,12 +309,13 @@ const onDOMContentLoaded = callback => {
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -240,7 +336,7 @@ const execute = callback => {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/data.js * Bootstrap (v5.0.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -294,7 +390,7 @@ var Data = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/event-handler.js * Bootstrap (v5.0.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -583,7 +679,7 @@ const EventHandler = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): base-component.js * Bootstrap (v5.0.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -593,11 +689,11 @@ const EventHandler = {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.0'; const VERSION = '5.0.1';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
element = typeof element === 'string' ? document.querySelector(element) : element; element = getElement(element);
if (!element) { if (!element) {
return; return;
@ -609,8 +705,21 @@ class BaseComponent {
dispose() { dispose() {
Data.remove(this._element, this.constructor.DATA_KEY); Data.remove(this._element, this.constructor.DATA_KEY);
EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`); EventHandler.off(this._element, this.constructor.EVENT_KEY);
this._element = null; Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
if (!isAnimated) {
execute(callback);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => execute(callback));
emulateTransitionEnd(element, transitionDuration);
} }
/** Static */ /** Static */
@ -623,11 +732,23 @@ class BaseComponent {
return VERSION; return VERSION;
} }
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
} }
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): alert.js * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -656,8 +777,8 @@ const CLASS_NAME_SHOW$9 = 'show';
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$b; return NAME$c;
} // Public } // Public
@ -684,16 +805,9 @@ class Alert extends BaseComponent {
_removeElement(element) { _removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9); element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
if (!element.classList.contains(CLASS_NAME_FADE$6)) { this._queueCallback(() => this._destroyElement(element), element, isAnimated);
this._destroyElement(element);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => this._destroyElement(element));
emulateTransitionEnd(element, transitionDuration);
} }
_destroyElement(element) { _destroyElement(element) {
@ -745,11 +859,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handle
* add .Alert to jQuery only if jQuery is present * add .Alert to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$c, Alert); defineJQueryPlugin(Alert);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): button.js * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -774,8 +888,8 @@ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$a; return NAME$b;
} // Public } // Public
@ -825,11 +939,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event
* add .Button to jQuery only if jQuery is present * add .Button to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$b, Button); defineJQueryPlugin(Button);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/manipulator.js * Bootstrap (v5.0.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -903,78 +1017,7 @@ const Manipulator = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/selector-engine.js * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1075,8 +1118,8 @@ class Carousel extends BaseComponent {
return Default$9; return Default$9;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$9; return NAME$a;
} // Public } // Public
@ -1154,17 +1197,6 @@ class Carousel extends BaseComponent {
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, this._items[index]); this._slide(order, this._items[index]);
}
dispose() {
this._items = null;
this._config = null;
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
super.dispose();
} // Private } // Private
@ -1393,37 +1425,35 @@ class Carousel extends BaseComponent {
this._activeElement = nextElement; this._activeElement = nextElement;
if (this._element.classList.contains(CLASS_NAME_SLIDE)) { const triggerSlidEvent = () => {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, 'transitionend', () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(() => {
EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
EventHandler.trigger(this._element, EVENT_SLID, { EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
to: nextElementIndex to: nextElementIndex
}); });
};
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const completeCallBack = () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(triggerSlidEvent, 0);
};
this._queueCallback(completeCallBack, activeElement, true);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
triggerSlidEvent();
} }
if (isCycling) { if (isCycling) {
@ -1542,11 +1572,11 @@ EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
* add .Carousel to jQuery only if jQuery is present * add .Carousel to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$a, Carousel); defineJQueryPlugin(Carousel);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): collapse.js * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1623,8 +1653,8 @@ class Collapse extends BaseComponent {
return Default$8; return Default$8;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$8; return NAME$9;
} // Public } // Public
@ -1716,9 +1746,9 @@ class Collapse extends BaseComponent {
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`; const scrollSize = `scroll${capitalizedDimension}`;
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = `${this._element[scrollSize]}px`; this._element.style[dimension] = `${this._element[scrollSize]}px`;
} }
@ -1769,21 +1799,12 @@ class Collapse extends BaseComponent {
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
} }
setTransitioning(isTransitioning) { setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning; this._isTransitioning = isTransitioning;
}
dispose() {
super.dispose();
this._config = null;
this._parent = null;
this._triggerArray = null;
this._isTransitioning = null;
} // Private } // Private
@ -1805,16 +1826,7 @@ class Collapse extends BaseComponent {
let { let {
parent parent
} = this._config; } = this._config;
parent = getElement(parent);
if (isElement(parent)) {
// it's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0];
}
} else {
parent = SelectorEngine.findOne(parent);
}
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(selector, parent).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
@ -1915,11 +1927,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, functi
* add .Collapse to jQuery only if jQuery is present * add .Collapse to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$9, Collapse); defineJQueryPlugin(Collapse);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dropdown.js * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2006,8 +2018,8 @@ class Dropdown extends BaseComponent {
return DefaultType$7; return DefaultType$7;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$7; return NAME$8;
} // Public } // Public
@ -2054,11 +2066,7 @@ class Dropdown extends BaseComponent {
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = parent; referenceElement = parent;
} else if (isElement(this._config.reference)) { } else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element referenceElement = getElement(this._config.reference);
if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0];
}
} else if (typeof this._config.reference === 'object') { } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference; referenceElement = this._config.reference;
} }
@ -2105,12 +2113,8 @@ class Dropdown extends BaseComponent {
} }
dispose() { dispose() {
this._menu = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
this._popper = null;
} }
super.dispose(); super.dispose();
@ -2296,14 +2300,8 @@ class Dropdown extends BaseComponent {
} }
static clearMenus(event) { static clearMenus(event) {
if (event) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { return;
return;
}
if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
return;
}
} }
const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3); const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
@ -2329,10 +2327,10 @@ class Dropdown extends BaseComponent {
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue; continue;
} // Tab navigation through the dropdown menu shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -2418,11 +2416,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, functi
* add .Dropdown to jQuery only if jQuery is present * add .Dropdown to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$8, Dropdown); defineJQueryPlugin(Dropdown);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/scrollBar.js * Bootstrap (v5.0.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2496,7 +2494,7 @@ const _resetElementAttributes = (selector, styleProp) => {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2580,6 +2578,7 @@ class Backdrop {
config = { ...Default$6, config = { ...Default$6,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
config.rootElement = config.rootElement || document.body;
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$7, config, DefaultType$6);
return config; return config;
} }
@ -2624,7 +2623,7 @@ class Backdrop {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): modal.js * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2654,7 +2653,7 @@ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`; const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
@ -2691,8 +2690,8 @@ class Modal extends BaseComponent {
return Default$5; return Default$5;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$6; return NAME$6;
} // Public } // Public
@ -2766,24 +2765,21 @@ class Modal extends BaseComponent {
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$5);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (isAnimated) { this._queueCallback(() => this._hideModal(), this._element, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
} }
dispose() { dispose() {
[window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6)); [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
this._backdrop.dispose();
super.dispose(); super.dispose();
/** /**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@ -2791,16 +2787,7 @@ class Modal extends BaseComponent {
* It will remove `EVENT_CLICK_DATA_API` event that should remain * It will remove `EVENT_CLICK_DATA_API` event that should remain
*/ */
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._config = null;
this._dialog = null;
this._backdrop.dispose();
this._backdrop = null;
this._isShown = null;
this._ignoreBackdropClick = null;
this._isTransitioning = null;
} }
handleUpdate() { handleUpdate() {
@ -2870,19 +2857,13 @@ class Modal extends BaseComponent {
}); });
}; };
if (isAnimated) { this._queueCallback(transitionComplete, this._dialog, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, 'transitionend', transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
} }
_enforceFocus() { _enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => { EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) { if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus(); this._element.focus();
} }
@ -3066,11 +3047,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, functi
* add .Modal to jQuery only if jQuery is present * add .Modal to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$6, Modal); defineJQueryPlugin(Modal);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): offcanvas.js * Bootstrap (v5.0.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3102,7 +3083,7 @@ const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`; const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`; const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
@ -3125,12 +3106,12 @@ class Offcanvas extends BaseComponent {
} // Getters } // Getters
static get Default() { static get NAME() {
return Default$4; return NAME$5;
} }
static get DATA_KEY() { static get Default() {
return DATA_KEY$5; return Default$4;
} // Public } // Public
@ -3176,9 +3157,7 @@ class Offcanvas extends BaseComponent {
}); });
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallBack, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallBack);
emulateTransitionEnd(this._element, transitionDuration);
} }
hide() { hide() {
@ -3192,7 +3171,7 @@ class Offcanvas extends BaseComponent {
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._element.blur(); this._element.blur();
@ -3218,18 +3197,14 @@ class Offcanvas extends BaseComponent {
EventHandler.trigger(this._element, EVENT_HIDDEN$2); EventHandler.trigger(this._element, EVENT_HIDDEN$2);
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallback, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallback);
emulateTransitionEnd(this._element, transitionDuration);
} }
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._config = null;
this._backdrop = null;
} // Private } // Private
@ -3252,9 +3227,9 @@ class Offcanvas extends BaseComponent {
} }
_enforceFocusOnElement(element) { _enforceFocusOnElement(element) {
EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN, event => { EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) { if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus(); element.focus();
} }
@ -3332,11 +3307,11 @@ EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
defineJQueryPlugin(NAME$5, Offcanvas); defineJQueryPlugin(Offcanvas);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/sanitizer.js * Bootstrap (v5.0.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3449,7 +3424,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tooltip.js * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3552,7 +3527,7 @@ class Tooltip extends BaseComponent {
this._activeTrigger = {}; this._activeTrigger = {};
this._popper = null; // Protected this._popper = null; // Protected
this.config = this._getConfig(config); this._config = this._getConfig(config);
this.tip = null; this.tip = null;
this._setListeners(); this._setListeners();
@ -3567,18 +3542,10 @@ class Tooltip extends BaseComponent {
return NAME$4; return NAME$4;
} }
static get DATA_KEY() {
return DATA_KEY$4;
}
static get Event() { static get Event() {
return Event$2; return Event$2;
} }
static get EVENT_KEY() {
return EVENT_KEY$4;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$3; return DefaultType$3;
} // Public } // Public
@ -3630,18 +3597,10 @@ class Tooltip extends BaseComponent {
this.tip.parentNode.removeChild(this.tip); this.tip.parentNode.removeChild(this.tip);
} }
this._isEnabled = null;
this._timeout = null;
this._hoverState = null;
this._activeTrigger = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
this._popper = null;
this.config = null;
this.tip = null;
super.dispose(); super.dispose();
} }
@ -3670,18 +3629,19 @@ class Tooltip extends BaseComponent {
this.setContent(); this.setContent();
if (this.config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$3);
} }
const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
const attachment = this._getAttachment(placement); const attachment = this._getAttachment(placement);
this._addAttachmentClass(attachment); this._addAttachmentClass(attachment);
const container = this._getContainer(); const {
container
} = this._config;
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
@ -3696,7 +3656,7 @@ class Tooltip extends BaseComponent {
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$3);
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -3722,13 +3682,9 @@ class Tooltip extends BaseComponent {
} }
}; };
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
const transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, 'transitionend', complete); this._queueCallback(complete, this.tip, isAnimated);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -3776,14 +3732,9 @@ class Tooltip extends BaseComponent {
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { this._queueCallback(complete, this.tip, isAnimated);
const transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, 'transitionend', complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
this._hoverState = ''; this._hoverState = '';
} }
@ -3805,7 +3756,7 @@ class Tooltip extends BaseComponent {
} }
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this.config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; this.tip = element.children[0];
return this.tip; return this.tip;
} }
@ -3821,13 +3772,10 @@ class Tooltip extends BaseComponent {
return; return;
} }
if (typeof content === 'object' && isElement(content)) { if (isElement(content)) {
if (content.jquery) { content = getElement(content); // content is a DOM node or a jQuery
content = content[0];
} // content is a DOM node or a jQuery
if (this._config.html) {
if (this.config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.appendChild(content);
@ -3839,9 +3787,9 @@ class Tooltip extends BaseComponent {
return; return;
} }
if (this.config.html) { if (this._config.html) {
if (this.config.sanitize) { if (this._config.sanitize) {
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn); content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
} }
element.innerHTML = content; element.innerHTML = content;
@ -3854,7 +3802,7 @@ class Tooltip extends BaseComponent {
let title = this._element.getAttribute('data-bs-original-title'); let title = this._element.getAttribute('data-bs-original-title');
if (!title) { if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title; title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
} }
return title; return title;
@ -3888,7 +3836,7 @@ class Tooltip extends BaseComponent {
_getOffset() { _getOffset() {
const { const {
offset offset
} = this.config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(val => Number.parseInt(val, 10)); return offset.split(',').map(val => Number.parseInt(val, 10));
@ -3907,7 +3855,7 @@ class Tooltip extends BaseComponent {
modifiers: [{ modifiers: [{
name: 'flip', name: 'flip',
options: { options: {
fallbackPlacements: this.config.fallbackPlacements fallbackPlacements: this._config.fallbackPlacements
} }
}, { }, {
name: 'offset', name: 'offset',
@ -3917,7 +3865,7 @@ class Tooltip extends BaseComponent {
}, { }, {
name: 'preventOverflow', name: 'preventOverflow',
options: { options: {
boundary: this.config.boundary boundary: this._config.boundary
} }
}, { }, {
name: 'arrow', name: 'arrow',
@ -3937,7 +3885,7 @@ class Tooltip extends BaseComponent {
} }
}; };
return { ...defaultBsPopperConfig, return { ...defaultBsPopperConfig,
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}; };
} }
@ -3945,32 +3893,21 @@ class Tooltip extends BaseComponent {
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
} }
_getContainer() {
if (this.config.container === false) {
return document.body;
}
if (isElement(this.config.container)) {
return this.config.container;
}
return SelectorEngine.findOne(this.config.container);
}
_getAttachment(placement) { _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()]; return AttachmentMap[placement.toUpperCase()];
} }
_setListeners() { _setListeners() {
const triggers = this.config.trigger.split(' '); const triggers = this._config.trigger.split(' ');
triggers.forEach(trigger => { triggers.forEach(trigger => {
if (trigger === 'click') { if (trigger === 'click') {
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)); EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event)); EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event)); EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
} }
}); });
@ -3982,8 +3919,8 @@ class Tooltip extends BaseComponent {
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.config.selector) { if (this._config.selector) {
this.config = { ...this.config, this._config = { ...this._config,
trigger: 'manual', trigger: 'manual',
selector: '' selector: ''
}; };
@ -4023,7 +3960,7 @@ class Tooltip extends BaseComponent {
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context._config.delay || !context._config.delay.show) {
context.show(); context.show();
return; return;
} }
@ -4032,7 +3969,7 @@ class Tooltip extends BaseComponent {
if (context._hoverState === HOVER_STATE_SHOW) { if (context._hoverState === HOVER_STATE_SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context._config.delay.show);
} }
_leave(event, context) { _leave(event, context) {
@ -4049,7 +3986,7 @@ class Tooltip extends BaseComponent {
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT; context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) { if (!context._config.delay || !context._config.delay.hide) {
context.hide(); context.hide();
return; return;
} }
@ -4058,7 +3995,7 @@ class Tooltip extends BaseComponent {
if (context._hoverState === HOVER_STATE_OUT) { if (context._hoverState === HOVER_STATE_OUT) {
context.hide(); context.hide();
} }
}, context.config.delay.hide); }, context._config.delay.hide);
} }
_isWithActiveTrigger() { _isWithActiveTrigger() {
@ -4078,15 +4015,11 @@ class Tooltip extends BaseComponent {
delete dataAttributes[dataAttr]; delete dataAttributes[dataAttr];
} }
}); });
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = { ...this.constructor.Default, config = { ...this.constructor.Default,
...dataAttributes, ...dataAttributes,
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
@ -4115,10 +4048,10 @@ class Tooltip extends BaseComponent {
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this.config) { if (this._config) {
for (const key in this.config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this.config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this.config[key]; config[key] = this._config[key];
} }
} }
} }
@ -4185,11 +4118,11 @@ class Tooltip extends BaseComponent {
*/ */
defineJQueryPlugin(NAME$4, Tooltip); defineJQueryPlugin(Tooltip);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): popover.js * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4246,18 +4179,10 @@ class Popover extends Tooltip {
return NAME$3; return NAME$3;
} }
static get DATA_KEY() {
return DATA_KEY$3;
}
static get Event() { static get Event() {
return Event$1; return Event$1;
} }
static get EVENT_KEY() {
return EVENT_KEY$3;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$2; return DefaultType$2;
} // Overrides } // Overrides
@ -4288,7 +4213,7 @@ class Popover extends Tooltip {
} }
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this.config.content; return this._element.getAttribute('data-bs-content') || this._config.content;
} }
_cleanTipClass() { _cleanTipClass() {
@ -4335,11 +4260,11 @@ class Popover extends Tooltip {
*/ */
defineJQueryPlugin(NAME$3, Popover); defineJQueryPlugin(Popover);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): scrollspy.js * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4404,8 +4329,8 @@ class ScrollSpy extends BaseComponent {
return Default$1; return Default$1;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$2; return NAME$2;
} // Public } // Public
@ -4438,15 +4363,8 @@ class ScrollSpy extends BaseComponent {
} }
dispose() { dispose() {
super.dispose();
EventHandler.off(this._scrollElement, EVENT_KEY$2); EventHandler.off(this._scrollElement, EVENT_KEY$2);
this._scrollElement = null; super.dispose();
this._config = null;
this._selector = null;
this._offsets = null;
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
} // Private } // Private
@ -4593,11 +4511,11 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
* add .ScrollSpy to jQuery only if jQuery is present * add .ScrollSpy to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$2, ScrollSpy); defineJQueryPlugin(ScrollSpy);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tab.js * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4635,8 +4553,8 @@ const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
class Tab extends BaseComponent { class Tab extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$1; return NAME$1;
} // Public } // Public
@ -4694,10 +4612,9 @@ class Tab extends BaseComponent {
const complete = () => this._transitionComplete(element, active, callback); const complete = () => this._transitionComplete(element, active, callback);
if (active && isTransitioning) { if (active && isTransitioning) {
const transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(CLASS_NAME_SHOW$1); active.classList.remove(CLASS_NAME_SHOW$1);
EventHandler.one(active, 'transitionend', complete);
emulateTransitionEnd(active, transitionDuration); this._queueCallback(complete, element, true);
} else { } else {
complete(); complete();
} }
@ -4792,11 +4709,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (
* add .Tab to jQuery only if jQuery is present * add .Tab to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$1, Tab); defineJQueryPlugin(Tab);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): toast.js * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4810,6 +4727,10 @@ const NAME = 'toast';
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
const EVENT_HIDE = `hide${EVENT_KEY}`; const EVENT_HIDE = `hide${EVENT_KEY}`;
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
@ -4840,6 +4761,8 @@ class Toast extends BaseComponent {
super(element); super(element);
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._timeout = null; this._timeout = null;
this._hasMouseInteraction = false;
this._hasKeyboardInteraction = false;
this._setListeners(); this._setListeners();
} // Getters } // Getters
@ -4853,8 +4776,8 @@ class Toast extends BaseComponent {
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -4878,11 +4801,7 @@ class Toast extends BaseComponent {
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
if (this._config.autohide) { this._maybeScheduleHide();
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE);
@ -4891,13 +4810,7 @@ class Toast extends BaseComponent {
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -4919,13 +4832,7 @@ class Toast extends BaseComponent {
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
dispose() { dispose() {
@ -4936,7 +4843,6 @@ class Toast extends BaseComponent {
} }
super.dispose(); super.dispose();
this._config = null;
} // Private } // Private
@ -4949,8 +4855,54 @@ class Toast extends BaseComponent {
return config; return config;
} }
_maybeScheduleHide() {
if (!this._config.autohide) {
return;
}
if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
return;
}
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
_onInteraction(event, isInteracting) {
switch (event.type) {
case 'mouseover':
case 'mouseout':
this._hasMouseInteraction = isInteracting;
break;
case 'focusin':
case 'focusout':
this._hasKeyboardInteraction = isInteracting;
break;
}
if (isInteracting) {
this._clearTimeout();
return;
}
const nextElement = event.relatedTarget;
if (this._element === nextElement || this._element.contains(nextElement)) {
return;
}
this._maybeScheduleHide();
}
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()); EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
} }
_clearTimeout() { _clearTimeout() {
@ -4988,7 +4940,7 @@ class Toast extends BaseComponent {
*/ */
defineJQueryPlugin(NAME, Toast); defineJQueryPlugin(Toast);
export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip }; export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip };
//# sourceMappingURL=bootstrap.esm.js.map //# sourceMappingURL=bootstrap.esm.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.0 (https://getbootstrap.com/) * Bootstrap v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -33,10 +33,82 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js * Bootstrap (v5.0.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -129,7 +201,30 @@
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj);
}
return null;
};
const emulateTransitionEnd = (element, duration) => { const emulateTransitionEnd = (element, duration) => {
let called = false; let called = false;
@ -240,12 +335,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -266,7 +362,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/data.js * Bootstrap (v5.0.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -320,7 +416,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/event-handler.js * Bootstrap (v5.0.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -609,7 +705,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): base-component.js * Bootstrap (v5.0.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -619,11 +715,11 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.0'; const VERSION = '5.0.1';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
element = typeof element === 'string' ? document.querySelector(element) : element; element = getElement(element);
if (!element) { if (!element) {
return; return;
@ -635,8 +731,21 @@
dispose() { dispose() {
Data.remove(this._element, this.constructor.DATA_KEY); Data.remove(this._element, this.constructor.DATA_KEY);
EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`); EventHandler.off(this._element, this.constructor.EVENT_KEY);
this._element = null; Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
if (!isAnimated) {
execute(callback);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => execute(callback));
emulateTransitionEnd(element, transitionDuration);
} }
/** Static */ /** Static */
@ -649,11 +758,23 @@
return VERSION; return VERSION;
} }
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
} }
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): alert.js * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -682,8 +803,8 @@
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$b; return NAME$c;
} // Public } // Public
@ -710,16 +831,9 @@
_removeElement(element) { _removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9); element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
if (!element.classList.contains(CLASS_NAME_FADE$6)) { this._queueCallback(() => this._destroyElement(element), element, isAnimated);
this._destroyElement(element);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, 'transitionend', () => this._destroyElement(element));
emulateTransitionEnd(element, transitionDuration);
} }
_destroyElement(element) { _destroyElement(element) {
@ -771,11 +885,11 @@
* add .Alert to jQuery only if jQuery is present * add .Alert to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$c, Alert); defineJQueryPlugin(Alert);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): button.js * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -800,8 +914,8 @@
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$a; return NAME$b;
} // Public } // Public
@ -851,11 +965,11 @@
* add .Button to jQuery only if jQuery is present * add .Button to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$b, Button); defineJQueryPlugin(Button);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/manipulator.js * Bootstrap (v5.0.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -929,78 +1043,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/selector-engine.js * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1101,8 +1144,8 @@
return Default$9; return Default$9;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$9; return NAME$a;
} // Public } // Public
@ -1180,17 +1223,6 @@
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, this._items[index]); this._slide(order, this._items[index]);
}
dispose() {
this._items = null;
this._config = null;
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
super.dispose();
} // Private } // Private
@ -1419,37 +1451,35 @@
this._activeElement = nextElement; this._activeElement = nextElement;
if (this._element.classList.contains(CLASS_NAME_SLIDE)) { const triggerSlidEvent = () => {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, 'transitionend', () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(() => {
EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
EventHandler.trigger(this._element, EVENT_SLID, { EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
to: nextElementIndex to: nextElementIndex
}); });
};
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const completeCallBack = () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(triggerSlidEvent, 0);
};
this._queueCallback(completeCallBack, activeElement, true);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
nextElement.classList.add(CLASS_NAME_ACTIVE$2);
this._isSliding = false;
triggerSlidEvent();
} }
if (isCycling) { if (isCycling) {
@ -1568,11 +1598,11 @@
* add .Carousel to jQuery only if jQuery is present * add .Carousel to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$a, Carousel); defineJQueryPlugin(Carousel);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): collapse.js * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1649,8 +1679,8 @@
return Default$8; return Default$8;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$8; return NAME$9;
} // Public } // Public
@ -1742,9 +1772,9 @@
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`; const scrollSize = `scroll${capitalizedDimension}`;
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = `${this._element[scrollSize]}px`; this._element.style[dimension] = `${this._element[scrollSize]}px`;
} }
@ -1795,21 +1825,12 @@
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
} }
setTransitioning(isTransitioning) { setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning; this._isTransitioning = isTransitioning;
}
dispose() {
super.dispose();
this._config = null;
this._parent = null;
this._triggerArray = null;
this._isTransitioning = null;
} // Private } // Private
@ -1831,16 +1852,7 @@
let { let {
parent parent
} = this._config; } = this._config;
parent = getElement(parent);
if (isElement(parent)) {
// it's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0];
}
} else {
parent = SelectorEngine.findOne(parent);
}
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(selector, parent).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
@ -1941,11 +1953,11 @@
* add .Collapse to jQuery only if jQuery is present * add .Collapse to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$9, Collapse); defineJQueryPlugin(Collapse);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dropdown.js * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2032,8 +2044,8 @@
return DefaultType$7; return DefaultType$7;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$7; return NAME$8;
} // Public } // Public
@ -2080,11 +2092,7 @@
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = parent; referenceElement = parent;
} else if (isElement(this._config.reference)) { } else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element referenceElement = getElement(this._config.reference);
if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0];
}
} else if (typeof this._config.reference === 'object') { } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference; referenceElement = this._config.reference;
} }
@ -2131,12 +2139,8 @@
} }
dispose() { dispose() {
this._menu = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
this._popper = null;
} }
super.dispose(); super.dispose();
@ -2322,14 +2326,8 @@
} }
static clearMenus(event) { static clearMenus(event) {
if (event) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { return;
return;
}
if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
return;
}
} }
const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3); const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
@ -2355,10 +2353,10 @@
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue; continue;
} // Tab navigation through the dropdown menu shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -2444,11 +2442,11 @@
* add .Dropdown to jQuery only if jQuery is present * add .Dropdown to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$8, Dropdown); defineJQueryPlugin(Dropdown);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/scrollBar.js * Bootstrap (v5.0.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2522,7 +2520,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2606,6 +2604,7 @@
config = { ...Default$6, config = { ...Default$6,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
config.rootElement = config.rootElement || document.body;
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$7, config, DefaultType$6);
return config; return config;
} }
@ -2650,7 +2649,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): modal.js * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2680,7 +2679,7 @@
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`; const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
@ -2717,8 +2716,8 @@
return Default$5; return Default$5;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$6; return NAME$6;
} // Public } // Public
@ -2792,24 +2791,21 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$5);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (isAnimated) { this._queueCallback(() => this._hideModal(), this._element, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
} }
dispose() { dispose() {
[window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6)); [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
this._backdrop.dispose();
super.dispose(); super.dispose();
/** /**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@ -2817,16 +2813,7 @@
* It will remove `EVENT_CLICK_DATA_API` event that should remain * It will remove `EVENT_CLICK_DATA_API` event that should remain
*/ */
EventHandler.off(document, EVENT_FOCUSIN$1); EventHandler.off(document, EVENT_FOCUSIN$2);
this._config = null;
this._dialog = null;
this._backdrop.dispose();
this._backdrop = null;
this._isShown = null;
this._ignoreBackdropClick = null;
this._isTransitioning = null;
} }
handleUpdate() { handleUpdate() {
@ -2896,19 +2883,13 @@
}); });
}; };
if (isAnimated) { this._queueCallback(transitionComplete, this._dialog, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, 'transitionend', transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
} }
_enforceFocus() { _enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => { EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) { if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus(); this._element.focus();
} }
@ -3092,11 +3073,11 @@
* add .Modal to jQuery only if jQuery is present * add .Modal to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$6, Modal); defineJQueryPlugin(Modal);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): offcanvas.js * Bootstrap (v5.0.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3128,7 +3109,7 @@
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`; const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`; const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
@ -3151,12 +3132,12 @@
} // Getters } // Getters
static get Default() { static get NAME() {
return Default$4; return NAME$5;
} }
static get DATA_KEY() { static get Default() {
return DATA_KEY$5; return Default$4;
} // Public } // Public
@ -3202,9 +3183,7 @@
}); });
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallBack, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallBack);
emulateTransitionEnd(this._element, transitionDuration);
} }
hide() { hide() {
@ -3218,7 +3197,7 @@
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._element.blur(); this._element.blur();
@ -3244,18 +3223,14 @@
EventHandler.trigger(this._element, EVENT_HIDDEN$2); EventHandler.trigger(this._element, EVENT_HIDDEN$2);
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallback, this._element, true);
EventHandler.one(this._element, 'transitionend', completeCallback);
emulateTransitionEnd(this._element, transitionDuration);
} }
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN$1);
this._config = null;
this._backdrop = null;
} // Private } // Private
@ -3278,9 +3253,9 @@
} }
_enforceFocusOnElement(element) { _enforceFocusOnElement(element) {
EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN, event => { EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) { if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus(); element.focus();
} }
@ -3358,11 +3333,11 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
defineJQueryPlugin(NAME$5, Offcanvas); defineJQueryPlugin(Offcanvas);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/sanitizer.js * Bootstrap (v5.0.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3475,7 +3450,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tooltip.js * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3578,7 +3553,7 @@
this._activeTrigger = {}; this._activeTrigger = {};
this._popper = null; // Protected this._popper = null; // Protected
this.config = this._getConfig(config); this._config = this._getConfig(config);
this.tip = null; this.tip = null;
this._setListeners(); this._setListeners();
@ -3593,18 +3568,10 @@
return NAME$4; return NAME$4;
} }
static get DATA_KEY() {
return DATA_KEY$4;
}
static get Event() { static get Event() {
return Event$2; return Event$2;
} }
static get EVENT_KEY() {
return EVENT_KEY$4;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$3; return DefaultType$3;
} // Public } // Public
@ -3656,18 +3623,10 @@
this.tip.parentNode.removeChild(this.tip); this.tip.parentNode.removeChild(this.tip);
} }
this._isEnabled = null;
this._timeout = null;
this._hoverState = null;
this._activeTrigger = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
this._popper = null;
this.config = null;
this.tip = null;
super.dispose(); super.dispose();
} }
@ -3696,18 +3655,19 @@
this.setContent(); this.setContent();
if (this.config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$3);
} }
const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
const attachment = this._getAttachment(placement); const attachment = this._getAttachment(placement);
this._addAttachmentClass(attachment); this._addAttachmentClass(attachment);
const container = this._getContainer(); const {
container
} = this._config;
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
@ -3722,7 +3682,7 @@
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$3);
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -3748,13 +3708,9 @@
} }
}; };
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
const transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, 'transitionend', complete); this._queueCallback(complete, this.tip, isAnimated);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -3802,14 +3758,9 @@
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
if (this.tip.classList.contains(CLASS_NAME_FADE$3)) { this._queueCallback(complete, this.tip, isAnimated);
const transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, 'transitionend', complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
this._hoverState = ''; this._hoverState = '';
} }
@ -3831,7 +3782,7 @@
} }
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this.config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; this.tip = element.children[0];
return this.tip; return this.tip;
} }
@ -3847,13 +3798,10 @@
return; return;
} }
if (typeof content === 'object' && isElement(content)) { if (isElement(content)) {
if (content.jquery) { content = getElement(content); // content is a DOM node or a jQuery
content = content[0];
} // content is a DOM node or a jQuery
if (this._config.html) {
if (this.config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.appendChild(content);
@ -3865,9 +3813,9 @@
return; return;
} }
if (this.config.html) { if (this._config.html) {
if (this.config.sanitize) { if (this._config.sanitize) {
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn); content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
} }
element.innerHTML = content; element.innerHTML = content;
@ -3880,7 +3828,7 @@
let title = this._element.getAttribute('data-bs-original-title'); let title = this._element.getAttribute('data-bs-original-title');
if (!title) { if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title; title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
} }
return title; return title;
@ -3914,7 +3862,7 @@
_getOffset() { _getOffset() {
const { const {
offset offset
} = this.config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(val => Number.parseInt(val, 10)); return offset.split(',').map(val => Number.parseInt(val, 10));
@ -3933,7 +3881,7 @@
modifiers: [{ modifiers: [{
name: 'flip', name: 'flip',
options: { options: {
fallbackPlacements: this.config.fallbackPlacements fallbackPlacements: this._config.fallbackPlacements
} }
}, { }, {
name: 'offset', name: 'offset',
@ -3943,7 +3891,7 @@
}, { }, {
name: 'preventOverflow', name: 'preventOverflow',
options: { options: {
boundary: this.config.boundary boundary: this._config.boundary
} }
}, { }, {
name: 'arrow', name: 'arrow',
@ -3963,7 +3911,7 @@
} }
}; };
return { ...defaultBsPopperConfig, return { ...defaultBsPopperConfig,
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}; };
} }
@ -3971,32 +3919,21 @@
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
} }
_getContainer() {
if (this.config.container === false) {
return document.body;
}
if (isElement(this.config.container)) {
return this.config.container;
}
return SelectorEngine.findOne(this.config.container);
}
_getAttachment(placement) { _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()]; return AttachmentMap[placement.toUpperCase()];
} }
_setListeners() { _setListeners() {
const triggers = this.config.trigger.split(' '); const triggers = this._config.trigger.split(' ');
triggers.forEach(trigger => { triggers.forEach(trigger => {
if (trigger === 'click') { if (trigger === 'click') {
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)); EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event)); EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event)); EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
} }
}); });
@ -4008,8 +3945,8 @@
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.config.selector) { if (this._config.selector) {
this.config = { ...this.config, this._config = { ...this._config,
trigger: 'manual', trigger: 'manual',
selector: '' selector: ''
}; };
@ -4049,7 +3986,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context._config.delay || !context._config.delay.show) {
context.show(); context.show();
return; return;
} }
@ -4058,7 +3995,7 @@
if (context._hoverState === HOVER_STATE_SHOW) { if (context._hoverState === HOVER_STATE_SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context._config.delay.show);
} }
_leave(event, context) { _leave(event, context) {
@ -4075,7 +4012,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT; context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) { if (!context._config.delay || !context._config.delay.hide) {
context.hide(); context.hide();
return; return;
} }
@ -4084,7 +4021,7 @@
if (context._hoverState === HOVER_STATE_OUT) { if (context._hoverState === HOVER_STATE_OUT) {
context.hide(); context.hide();
} }
}, context.config.delay.hide); }, context._config.delay.hide);
} }
_isWithActiveTrigger() { _isWithActiveTrigger() {
@ -4104,15 +4041,11 @@
delete dataAttributes[dataAttr]; delete dataAttributes[dataAttr];
} }
}); });
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = { ...this.constructor.Default, config = { ...this.constructor.Default,
...dataAttributes, ...dataAttributes,
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
@ -4141,10 +4074,10 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this.config) { if (this._config) {
for (const key in this.config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this.config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this.config[key]; config[key] = this._config[key];
} }
} }
} }
@ -4211,11 +4144,11 @@
*/ */
defineJQueryPlugin(NAME$4, Tooltip); defineJQueryPlugin(Tooltip);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): popover.js * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4272,18 +4205,10 @@
return NAME$3; return NAME$3;
} }
static get DATA_KEY() {
return DATA_KEY$3;
}
static get Event() { static get Event() {
return Event$1; return Event$1;
} }
static get EVENT_KEY() {
return EVENT_KEY$3;
}
static get DefaultType() { static get DefaultType() {
return DefaultType$2; return DefaultType$2;
} // Overrides } // Overrides
@ -4314,7 +4239,7 @@
} }
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this.config.content; return this._element.getAttribute('data-bs-content') || this._config.content;
} }
_cleanTipClass() { _cleanTipClass() {
@ -4361,11 +4286,11 @@
*/ */
defineJQueryPlugin(NAME$3, Popover); defineJQueryPlugin(Popover);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): scrollspy.js * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4430,8 +4355,8 @@
return Default$1; return Default$1;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY$2; return NAME$2;
} // Public } // Public
@ -4464,15 +4389,8 @@
} }
dispose() { dispose() {
super.dispose();
EventHandler.off(this._scrollElement, EVENT_KEY$2); EventHandler.off(this._scrollElement, EVENT_KEY$2);
this._scrollElement = null; super.dispose();
this._config = null;
this._selector = null;
this._offsets = null;
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
} // Private } // Private
@ -4619,11 +4537,11 @@
* add .ScrollSpy to jQuery only if jQuery is present * add .ScrollSpy to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$2, ScrollSpy); defineJQueryPlugin(ScrollSpy);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tab.js * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4661,8 +4579,8 @@
class Tab extends BaseComponent { class Tab extends BaseComponent {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY$1; return NAME$1;
} // Public } // Public
@ -4720,10 +4638,9 @@
const complete = () => this._transitionComplete(element, active, callback); const complete = () => this._transitionComplete(element, active, callback);
if (active && isTransitioning) { if (active && isTransitioning) {
const transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(CLASS_NAME_SHOW$1); active.classList.remove(CLASS_NAME_SHOW$1);
EventHandler.one(active, 'transitionend', complete);
emulateTransitionEnd(active, transitionDuration); this._queueCallback(complete, element, true);
} else { } else {
complete(); complete();
} }
@ -4818,11 +4735,11 @@
* add .Tab to jQuery only if jQuery is present * add .Tab to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME$1, Tab); defineJQueryPlugin(Tab);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): toast.js * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4836,6 +4753,10 @@
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
const EVENT_HIDE = `hide${EVENT_KEY}`; const EVENT_HIDE = `hide${EVENT_KEY}`;
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
@ -4866,6 +4787,8 @@
super(element); super(element);
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._timeout = null; this._timeout = null;
this._hasMouseInteraction = false;
this._hasKeyboardInteraction = false;
this._setListeners(); this._setListeners();
} // Getters } // Getters
@ -4879,8 +4802,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -4904,11 +4827,7 @@
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
if (this._config.autohide) { this._maybeScheduleHide();
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE);
@ -4917,13 +4836,7 @@
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -4945,13 +4858,7 @@
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
dispose() { dispose() {
@ -4962,7 +4869,6 @@
} }
super.dispose(); super.dispose();
this._config = null;
} // Private } // Private
@ -4975,8 +4881,54 @@
return config; return config;
} }
_maybeScheduleHide() {
if (!this._config.autohide) {
return;
}
if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
return;
}
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
_onInteraction(event, isInteracting) {
switch (event.type) {
case 'mouseover':
case 'mouseout':
this._hasMouseInteraction = isInteracting;
break;
case 'focusin':
case 'focusout':
this._hasKeyboardInteraction = isInteracting;
break;
}
if (isInteracting) {
this._clearTimeout();
return;
}
const nextElement = event.relatedTarget;
if (this._element === nextElement || this._element.contains(nextElement)) {
return;
}
this._maybeScheduleHide();
}
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()); EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
} }
_clearTimeout() { _clearTimeout() {
@ -5014,11 +4966,11 @@
*/ */
defineJQueryPlugin(NAME, Toast); defineJQueryPlugin(Toast);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): index.umd.js * Bootstrap (v5.0.1): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

86
js/dist/alert.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap alert.js v5.0.0 (https://getbootstrap.com/) * Bootstrap alert.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -15,15 +15,6 @@
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getSelector = element => { const getSelector = element => {
let selector = element.getAttribute('data-bs-target'); let selector = element.getAttribute('data-bs-target');
@ -53,51 +44,6 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -118,12 +64,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -138,7 +85,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): alert.js * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -167,8 +114,8 @@
class Alert extends BaseComponent__default['default'] { class Alert extends BaseComponent__default['default'] {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -195,16 +142,9 @@
_removeElement(element) { _removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW); element.classList.remove(CLASS_NAME_SHOW);
const isAnimated = element.classList.contains(CLASS_NAME_FADE);
if (!element.classList.contains(CLASS_NAME_FADE)) { this._queueCallback(() => this._destroyElement(element), element, isAnimated);
this._destroyElement(element);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler__default['default'].one(element, 'transitionend', () => this._destroyElement(element));
emulateTransitionEnd(element, transitionDuration);
} }
_destroyElement(element) { _destroyElement(element) {
@ -256,7 +196,7 @@
* add .Alert to jQuery only if jQuery is present * add .Alert to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Alert); defineJQueryPlugin(Alert);
return Alert; return Alert;

File diff suppressed because one or more lines are too long

View File

@ -1,22 +1,102 @@
/*! /*!
* Bootstrap base-component.js v5.0.0 (https://getbootstrap.com/) * Bootstrap base-component.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./dom/event-handler.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './dom/event-handler'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.EventHandler)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.SelectorEngine, global.EventHandler));
}(this, (function (Data, EventHandler) { 'use strict'; }(this, (function (Data, SelectorEngine, EventHandler) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const execute = callback => {
if (typeof callback === 'function') {
callback();
}
};
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): base-component.js * Bootstrap (v5.0.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -26,11 +106,11 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.0'; const VERSION = '5.0.1';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
element = typeof element === 'string' ? document.querySelector(element) : element; element = getElement(element);
if (!element) { if (!element) {
return; return;
@ -42,8 +122,21 @@
dispose() { dispose() {
Data__default['default'].remove(this._element, this.constructor.DATA_KEY); Data__default['default'].remove(this._element, this.constructor.DATA_KEY);
EventHandler__default['default'].off(this._element, `.${this.constructor.DATA_KEY}`); EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY);
this._element = null; Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
if (!isAnimated) {
execute(callback);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler__default['default'].one(element, 'transitionend', () => execute(callback));
emulateTransitionEnd(element, transitionDuration);
} }
/** Static */ /** Static */
@ -56,6 +149,18 @@
return VERSION; return VERSION;
} }
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
} }
return BaseComponent; return BaseComponent;

File diff suppressed because one or more lines are too long

28
js/dist/button.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap button.js v5.0.0 (https://getbootstrap.com/) * Bootstrap button.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -15,13 +15,6 @@
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -42,12 +35,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -62,7 +56,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): button.js * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -87,8 +81,8 @@
class Button extends BaseComponent__default['default'] { class Button extends BaseComponent__default['default'] {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -138,7 +132,7 @@
* add .Button to jQuery only if jQuery is present * add .Button to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Button); defineJQueryPlugin(Button);
return Button; return Button;

File diff suppressed because one or more lines are too long

136
js/dist/carousel.js vendored
View File

@ -1,29 +1,22 @@
/*! /*!
* Bootstrap carousel.js v5.0.0 (https://getbootstrap.com/) * Bootstrap carousel.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => { const toType = obj => {
@ -63,51 +56,20 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => { const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
const emulateTransitionEnd = (element, duration) => { return false;
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
} }
element.addEventListener(TRANSITION_END, listener); if (typeof obj.jquery !== 'undefined') {
setTimeout(() => { obj = obj[0];
if (!called) { }
triggerTransitionEnd(element);
} return typeof obj.nodeType !== 'undefined';
}, emulatedDuration);
}; };
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
@ -160,12 +122,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -180,7 +143,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): carousel.js * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -281,8 +244,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -360,17 +323,6 @@
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, this._items[index]); this._slide(order, this._items[index]);
}
dispose() {
this._items = null;
this._config = null;
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
super.dispose();
} // Private } // Private
@ -599,37 +551,35 @@
this._activeElement = nextElement; this._activeElement = nextElement;
if (this._element.classList.contains(CLASS_NAME_SLIDE)) { const triggerSlidEvent = () => {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler__default['default'].one(activeElement, 'transitionend', () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE);
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(() => {
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE);
nextElement.classList.add(CLASS_NAME_ACTIVE);
this._isSliding = false;
EventHandler__default['default'].trigger(this._element, EVENT_SLID, { EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
to: nextElementIndex to: nextElementIndex
}); });
};
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const completeCallBack = () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE);
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(triggerSlidEvent, 0);
};
this._queueCallback(completeCallBack, activeElement, true);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE);
nextElement.classList.add(CLASS_NAME_ACTIVE);
this._isSliding = false;
triggerSlidEvent();
} }
if (isCycling) { if (isCycling) {
@ -748,7 +698,7 @@
* add .Carousel to jQuery only if jQuery is present * add .Carousel to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Carousel); defineJQueryPlugin(Carousel);
return Carousel; return Carousel;

File diff suppressed because one or more lines are too long

126
js/dist/collapse.js vendored
View File

@ -1,31 +1,22 @@
/*! /*!
* Bootstrap collapse.js v5.0.0 (https://getbootstrap.com/) * Bootstrap collapse.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -73,51 +64,29 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const getTransitionDurationFromElement = element => { const isElement = obj => {
if (!element) { if (!obj || typeof obj !== 'object') {
return 0; return false;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => (obj[0] || obj).nodeType;
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
} }
element.addEventListener(TRANSITION_END, listener); if (typeof obj.jquery !== 'undefined') {
setTimeout(() => { obj = obj[0];
if (!called) { }
triggerTransitionEnd(element);
} return typeof obj.nodeType !== 'undefined';
}, emulatedDuration); };
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
}; };
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
@ -154,12 +123,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -174,7 +144,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): collapse.js * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -251,8 +221,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -344,9 +314,9 @@
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`; const scrollSize = `scroll${capitalizedDimension}`;
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = `${this._element[scrollSize]}px`; this._element.style[dimension] = `${this._element[scrollSize]}px`;
} }
@ -397,21 +367,12 @@
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete); this._queueCallback(complete, this._element, true);
emulateTransitionEnd(this._element, transitionDuration);
} }
setTransitioning(isTransitioning) { setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning; this._isTransitioning = isTransitioning;
}
dispose() {
super.dispose();
this._config = null;
this._parent = null;
this._triggerArray = null;
this._isTransitioning = null;
} // Private } // Private
@ -433,16 +394,7 @@
let { let {
parent parent
} = this._config; } = this._config;
parent = getElement(parent);
if (isElement(parent)) {
// it's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0];
}
} else {
parent = SelectorEngine__default['default'].findOne(parent);
}
const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`; const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`;
SelectorEngine__default['default'].find(selector, parent).forEach(element => { SelectorEngine__default['default'].find(selector, parent).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
@ -543,7 +495,7 @@
* add .Collapse to jQuery only if jQuery is present * add .Collapse to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Collapse); defineJQueryPlugin(Collapse);
return Collapse; return Collapse;

File diff suppressed because one or more lines are too long

4
js/dist/dom/data.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap data.js v5.0.0 (https://getbootstrap.com/) * Bootstrap data.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/data.js * Bootstrap (v5.0.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): 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 elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"} {"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): 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 elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"}

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap event-handler.js v5.0.0 (https://getbootstrap.com/) * Bootstrap event-handler.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -9,13 +9,6 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory()); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
}(this, (function () { 'use strict'; }(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -30,7 +23,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/event-handler.js * Bootstrap (v5.0.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap manipulator.js v5.0.0 (https://getbootstrap.com/) * Bootstrap manipulator.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/manipulator.js * Bootstrap (v5.0.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC5B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"} {"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC5B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"}

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap selector-engine.js v5.0.0 (https://getbootstrap.com/) * Bootstrap selector-engine.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/selector-engine.js * Bootstrap (v5.0.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1 +1 @@
{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children)\n .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 (ancestor.matches(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 (next.matches(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","find","selector","element","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","matches","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,SAAS,GAAG,CAAlB;QAEMC,cAAc,GAAG;EACrBC,EAAAA,IAAI,CAACC,QAAD,EAAWC,OAAO,GAAGC,QAAQ,CAACC,eAA9B,EAA+C;EACjD,WAAO,GAAGC,MAAH,CAAU,GAAGC,OAAO,CAACC,SAAR,CAAkBC,gBAAlB,CAAmCC,IAAnC,CAAwCP,OAAxC,EAAiDD,QAAjD,CAAb,CAAP;EACD,GAHoB;;EAKrBS,EAAAA,OAAO,CAACT,QAAD,EAAWC,OAAO,GAAGC,QAAQ,CAACC,eAA9B,EAA+C;EACpD,WAAOE,OAAO,CAACC,SAAR,CAAkBI,aAAlB,CAAgCF,IAAhC,CAAqCP,OAArC,EAA8CD,QAA9C,CAAP;EACD,GAPoB;;EASrBW,EAAAA,QAAQ,CAACV,OAAD,EAAUD,QAAV,EAAoB;EAC1B,WAAO,GAAGI,MAAH,CAAU,GAAGH,OAAO,CAACU,QAArB,EACJC,MADI,CACGC,KAAK,IAAIA,KAAK,CAACC,OAAN,CAAcd,QAAd,CADZ,CAAP;EAED,GAZoB;;EAcrBe,EAAAA,OAAO,CAACd,OAAD,EAAUD,QAAV,EAAoB;EACzB,UAAMe,OAAO,GAAG,EAAhB;EAEA,QAAIC,QAAQ,GAAGf,OAAO,CAACgB,UAAvB;;EAEA,WAAOD,QAAQ,IAAIA,QAAQ,CAACE,QAAT,KAAsBC,IAAI,CAACC,YAAvC,IAAuDJ,QAAQ,CAACE,QAAT,KAAsBrB,SAApF,EAA+F;EAC7F,UAAImB,QAAQ,CAACF,OAAT,CAAiBd,QAAjB,CAAJ,EAAgC;EAC9Be,QAAAA,OAAO,CAACM,IAAR,CAAaL,QAAb;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,UAApB;EACD;;EAED,WAAOF,OAAP;EACD,GA5BoB;;EA8BrBO,EAAAA,IAAI,CAACrB,OAAD,EAAUD,QAAV,EAAoB;EACtB,QAAIuB,QAAQ,GAAGtB,OAAO,CAACuB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACT,OAAT,CAAiBd,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACuB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA1CoB;;EA4CrBC,EAAAA,IAAI,CAACxB,OAAD,EAAUD,QAAV,EAAoB;EACtB,QAAIyB,IAAI,GAAGxB,OAAO,CAACyB,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAIA,IAAI,CAACX,OAAL,CAAad,QAAb,CAAJ,EAA4B;EAC1B,eAAO,CAACyB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;;EAxDoB;;;;;;;;"} {"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children)\n .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 (ancestor.matches(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 (next.matches(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","find","selector","element","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","matches","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,SAAS,GAAG,CAAlB;QAEMC,cAAc,GAAG;EACrBC,EAAAA,IAAI,CAACC,QAAD,EAAWC,OAAO,GAAGC,QAAQ,CAACC,eAA9B,EAA+C;EACjD,WAAO,GAAGC,MAAH,CAAU,GAAGC,OAAO,CAACC,SAAR,CAAkBC,gBAAlB,CAAmCC,IAAnC,CAAwCP,OAAxC,EAAiDD,QAAjD,CAAb,CAAP;EACD,GAHoB;;EAKrBS,EAAAA,OAAO,CAACT,QAAD,EAAWC,OAAO,GAAGC,QAAQ,CAACC,eAA9B,EAA+C;EACpD,WAAOE,OAAO,CAACC,SAAR,CAAkBI,aAAlB,CAAgCF,IAAhC,CAAqCP,OAArC,EAA8CD,QAA9C,CAAP;EACD,GAPoB;;EASrBW,EAAAA,QAAQ,CAACV,OAAD,EAAUD,QAAV,EAAoB;EAC1B,WAAO,GAAGI,MAAH,CAAU,GAAGH,OAAO,CAACU,QAArB,EACJC,MADI,CACGC,KAAK,IAAIA,KAAK,CAACC,OAAN,CAAcd,QAAd,CADZ,CAAP;EAED,GAZoB;;EAcrBe,EAAAA,OAAO,CAACd,OAAD,EAAUD,QAAV,EAAoB;EACzB,UAAMe,OAAO,GAAG,EAAhB;EAEA,QAAIC,QAAQ,GAAGf,OAAO,CAACgB,UAAvB;;EAEA,WAAOD,QAAQ,IAAIA,QAAQ,CAACE,QAAT,KAAsBC,IAAI,CAACC,YAAvC,IAAuDJ,QAAQ,CAACE,QAAT,KAAsBrB,SAApF,EAA+F;EAC7F,UAAImB,QAAQ,CAACF,OAAT,CAAiBd,QAAjB,CAAJ,EAAgC;EAC9Be,QAAAA,OAAO,CAACM,IAAR,CAAaL,QAAb;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,UAApB;EACD;;EAED,WAAOF,OAAP;EACD,GA5BoB;;EA8BrBO,EAAAA,IAAI,CAACrB,OAAD,EAAUD,QAAV,EAAoB;EACtB,QAAIuB,QAAQ,GAAGtB,OAAO,CAACuB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACT,OAAT,CAAiBd,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACuB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA1CoB;;EA4CrBC,EAAAA,IAAI,CAACxB,OAAD,EAAUD,QAAV,EAAoB;EACtB,QAAIyB,IAAI,GAAGxB,OAAO,CAACyB,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAIA,IAAI,CAACX,OAAL,CAAad,QAAb,CAAJ,EAA4B;EAC1B,eAAO,CAACyB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;;EAxDoB;;;;;;;;"}

79
js/dist/dropdown.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap dropdown.js v5.0.0 (https://getbootstrap.com/) * Bootstrap dropdown.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -32,19 +32,12 @@
} }
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -82,7 +75,30 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => { Object.keys(configTypes).forEach(property => {
@ -150,12 +166,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -170,7 +187,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dropdown.js * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -257,8 +274,8 @@
return DefaultType; return DefaultType;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -305,11 +322,7 @@
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = parent; referenceElement = parent;
} else if (isElement(this._config.reference)) { } else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element referenceElement = getElement(this._config.reference);
if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0];
}
} else if (typeof this._config.reference === 'object') { } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference; referenceElement = this._config.reference;
} }
@ -356,12 +369,8 @@
} }
dispose() { dispose() {
this._menu = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
this._popper = null;
} }
super.dispose(); super.dispose();
@ -547,14 +556,8 @@
} }
static clearMenus(event) { static clearMenus(event) {
if (event) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { return;
return;
}
if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
return;
}
} }
const toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE); const toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
@ -580,10 +583,10 @@
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue; continue;
} // Tab navigation through the dropdown menu shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -669,7 +672,7 @@
* add .Dropdown to jQuery only if jQuery is present * add .Dropdown to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Dropdown); defineJQueryPlugin(Dropdown);
return Dropdown; return Dropdown;

File diff suppressed because one or more lines are too long

74
js/dist/modal.js vendored
View File

@ -1,27 +1,21 @@
/*! /*!
* Bootstrap modal.js v5.0.0 (https://getbootstrap.com/) * Bootstrap modal.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -89,7 +83,17 @@
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const emulateTransitionEnd = (element, duration) => { const emulateTransitionEnd = (element, duration) => {
let called = false; let called = false;
@ -159,12 +163,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -185,7 +190,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/scrollBar.js * Bootstrap (v5.0.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -259,7 +264,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -343,6 +348,7 @@
config = { ...Default$1, config = { ...Default$1,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
config.rootElement = config.rootElement || document.body;
typeCheckConfig(NAME$1, config, DefaultType$1); typeCheckConfig(NAME$1, config, DefaultType$1);
return config; return config;
} }
@ -387,7 +393,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): modal.js * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -454,8 +460,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -536,17 +542,14 @@
EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS); EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (isAnimated) { this._queueCallback(() => this._hideModal(), this._element, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', event => this._hideModal(event));
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
} }
dispose() { dispose() {
[window, this._dialog].forEach(htmlElement => EventHandler__default['default'].off(htmlElement, EVENT_KEY)); [window, this._dialog].forEach(htmlElement => EventHandler__default['default'].off(htmlElement, EVENT_KEY));
this._backdrop.dispose();
super.dispose(); super.dispose();
/** /**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@ -555,15 +558,6 @@
*/ */
EventHandler__default['default'].off(document, EVENT_FOCUSIN); EventHandler__default['default'].off(document, EVENT_FOCUSIN);
this._config = null;
this._dialog = null;
this._backdrop.dispose();
this._backdrop = null;
this._isShown = null;
this._ignoreBackdropClick = null;
this._isTransitioning = null;
} }
handleUpdate() { handleUpdate() {
@ -633,13 +627,7 @@
}); });
}; };
if (isAnimated) { this._queueCallback(transitionComplete, this._dialog, isAnimated);
const transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler__default['default'].one(this._dialog, 'transitionend', transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
} }
_enforceFocus() { _enforceFocus() {
@ -829,7 +817,7 @@
* add .Modal to jQuery only if jQuery is present * add .Modal to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Modal); defineJQueryPlugin(Modal);
return Modal; return Modal;

File diff suppressed because one or more lines are too long

50
js/dist/offcanvas.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap offcanvas.js v5.0.0 (https://getbootstrap.com/) * Bootstrap offcanvas.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -17,12 +17,6 @@
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -90,7 +84,17 @@
element.dispatchEvent(new Event(TRANSITION_END)); element.dispatchEvent(new Event(TRANSITION_END));
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const emulateTransitionEnd = (element, duration) => { const emulateTransitionEnd = (element, duration) => {
let called = false; let called = false;
@ -174,12 +178,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -200,7 +205,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/scrollBar.js * Bootstrap (v5.0.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -274,7 +279,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -358,6 +363,7 @@
config = { ...Default$1, config = { ...Default$1,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
config.rootElement = config.rootElement || document.body;
typeCheckConfig(NAME$1, config, DefaultType$1); typeCheckConfig(NAME$1, config, DefaultType$1);
return config; return config;
} }
@ -402,7 +408,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): offcanvas.js * Bootstrap (v5.0.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -457,12 +463,12 @@
} // Getters } // Getters
static get Default() { static get NAME() {
return Default; return NAME;
} }
static get DATA_KEY() { static get Default() {
return DATA_KEY; return Default;
} // Public } // Public
@ -508,9 +514,7 @@
}); });
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallBack, this._element, true);
EventHandler__default['default'].one(this._element, 'transitionend', completeCallBack);
emulateTransitionEnd(this._element, transitionDuration);
} }
hide() { hide() {
@ -550,9 +554,7 @@
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN); EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
}; };
const transitionDuration = getTransitionDurationFromElement(this._element); this._queueCallback(completeCallback, this._element, true);
EventHandler__default['default'].one(this._element, 'transitionend', completeCallback);
emulateTransitionEnd(this._element, transitionDuration);
} }
dispose() { dispose() {
@ -560,8 +562,6 @@
super.dispose(); super.dispose();
EventHandler__default['default'].off(document, EVENT_FOCUSIN); EventHandler__default['default'].off(document, EVENT_FOCUSIN);
this._config = null;
this._backdrop = null;
} // Private } // Private
@ -664,7 +664,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
defineJQueryPlugin(NAME, Offcanvas); defineJQueryPlugin(Offcanvas);
return Offcanvas; return Offcanvas;

File diff suppressed because one or more lines are too long

36
js/dist/popover.js vendored
View File

@ -1,27 +1,20 @@
/*! /*!
* Bootstrap popover.js v5.0.0 (https://getbootstrap.com/) * Bootstrap popover.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './tooltip'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Data, global.Tooltip));
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict'; }(this, (function (SelectorEngine, Data, Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -42,12 +35,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -62,7 +56,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): popover.js * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -119,18 +113,10 @@
return NAME; return NAME;
} }
static get DATA_KEY() {
return DATA_KEY;
}
static get Event() { static get Event() {
return Event; return Event;
} }
static get EVENT_KEY() {
return EVENT_KEY;
}
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} // Overrides } // Overrides
@ -161,7 +147,7 @@
} }
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this.config.content; return this._element.getAttribute('data-bs-content') || this._config.content;
} }
_cleanTipClass() { _cleanTipClass() {
@ -208,7 +194,7 @@
*/ */
defineJQueryPlugin(NAME, Popover); defineJQueryPlugin(Popover);
return Popover; return Popover;

File diff suppressed because one or more lines are too long

47
js/dist/scrollspy.js vendored
View File

@ -1,27 +1,28 @@
/*! /*!
* Bootstrap scrollspy.js v5.0.0 (https://getbootstrap.com/) * Bootstrap scrollspy.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js * Bootstrap (v5.0.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const MAX_UID = 1000000; const MAX_UID = 1000000;
const toType = obj => { const toType = obj => {
@ -80,7 +81,17 @@
return null; return null;
}; };
const isElement = obj => (obj[0] || obj).nodeType; const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => { Object.keys(configTypes).forEach(property => {
@ -114,12 +125,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -134,7 +146,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): scrollspy.js * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -199,8 +211,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -233,15 +245,8 @@
} }
dispose() { dispose() {
super.dispose();
EventHandler__default['default'].off(this._scrollElement, EVENT_KEY); EventHandler__default['default'].off(this._scrollElement, EVENT_KEY);
this._scrollElement = null; super.dispose();
this._config = null;
this._selector = null;
this._offsets = null;
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
} // Private } // Private
@ -388,7 +393,7 @@
* add .ScrollSpy to jQuery only if jQuery is present * add .ScrollSpy to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, ScrollSpy); defineJQueryPlugin(ScrollSpy);
return ScrollSpy; return ScrollSpy;

File diff suppressed because one or more lines are too long

82
js/dist/tab.js vendored
View File

@ -1,30 +1,21 @@
/*! /*!
* Bootstrap tab.js v5.0.0 (https://getbootstrap.com/) * Bootstrap tab.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (Data, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getSelector = element => { const getSelector = element => {
let selector = element.getAttribute('data-bs-target'); let selector = element.getAttribute('data-bs-target');
@ -54,51 +45,6 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const isDisabled = element => { const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) { if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true; return true;
@ -137,12 +83,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -157,7 +104,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tab.js * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -195,8 +142,8 @@
class Tab extends BaseComponent__default['default'] { class Tab extends BaseComponent__default['default'] {
// Getters // Getters
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -254,10 +201,9 @@
const complete = () => this._transitionComplete(element, active, callback); const complete = () => this._transitionComplete(element, active, callback);
if (active && isTransitioning) { if (active && isTransitioning) {
const transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(CLASS_NAME_SHOW); active.classList.remove(CLASS_NAME_SHOW);
EventHandler__default['default'].one(active, 'transitionend', complete);
emulateTransitionEnd(active, transitionDuration); this._queueCallback(complete, element, true);
} else { } else {
complete(); complete();
} }
@ -352,7 +298,7 @@
* add .Tab to jQuery only if jQuery is present * add .Tab to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(NAME, Tab); defineJQueryPlugin(Tab);
return Tab; return Tab;

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

148
js/dist/toast.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap toast.js v5.0.0 (https://getbootstrap.com/) * Bootstrap toast.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -16,15 +16,6 @@
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -33,51 +24,16 @@
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
const getTransitionDurationFromElement = element => { const isElement = obj => {
if (!element) { if (!obj || typeof obj !== 'object') {
return 0; return false;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => (obj[0] || obj).nodeType;
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
} }
element.addEventListener(TRANSITION_END, listener); if (typeof obj.jquery !== 'undefined') {
setTimeout(() => { obj = obj[0];
if (!called) { }
triggerTransitionEnd(element);
} return typeof obj.nodeType !== 'undefined';
}, emulatedDuration);
}; };
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
@ -114,12 +70,13 @@
} }
}; };
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -134,7 +91,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): toast.js * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -148,6 +105,10 @@
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
const EVENT_HIDE = `hide${EVENT_KEY}`; const EVENT_HIDE = `hide${EVENT_KEY}`;
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
@ -178,6 +139,8 @@
super(element); super(element);
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._timeout = null; this._timeout = null;
this._hasMouseInteraction = false;
this._hasKeyboardInteraction = false;
this._setListeners(); this._setListeners();
} // Getters } // Getters
@ -191,8 +154,8 @@
return Default; return Default;
} }
static get DATA_KEY() { static get NAME() {
return DATA_KEY; return NAME;
} // Public } // Public
@ -216,11 +179,7 @@
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN); EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
if (this._config.autohide) { this._maybeScheduleHide();
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE);
@ -229,13 +188,7 @@
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -257,13 +210,7 @@
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) { this._queueCallback(complete, this._element, this._config.animation);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} }
dispose() { dispose() {
@ -274,7 +221,6 @@
} }
super.dispose(); super.dispose();
this._config = null;
} // Private } // Private
@ -287,8 +233,54 @@
return config; return config;
} }
_maybeScheduleHide() {
if (!this._config.autohide) {
return;
}
if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
return;
}
this._timeout = setTimeout(() => {
this.hide();
}, this._config.delay);
}
_onInteraction(event, isInteracting) {
switch (event.type) {
case 'mouseover':
case 'mouseout':
this._hasMouseInteraction = isInteracting;
break;
case 'focusin':
case 'focusout':
this._hasKeyboardInteraction = isInteracting;
break;
}
if (isInteracting) {
this._clearTimeout();
return;
}
const nextElement = event.relatedTarget;
if (this._element === nextElement || this._element.contains(nextElement)) {
return;
}
this._maybeScheduleHide();
}
_setListeners() { _setListeners() {
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()); EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler__default['default'].on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler__default['default'].on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler__default['default'].on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
EventHandler__default['default'].on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
} }
_clearTimeout() { _clearTimeout() {
@ -326,7 +318,7 @@
*/ */
defineJQueryPlugin(NAME, Toast); defineJQueryPlugin(Toast);
return Toast; return Toast;

File diff suppressed because one or more lines are too long

216
js/dist/tooltip.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap tooltip.js v5.0.0 (https://getbootstrap.com/) * Bootstrap tooltip.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; }(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -32,21 +32,20 @@
} }
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/index.js * Bootstrap (v5.0.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
@ -70,51 +69,29 @@
return prefix; return prefix;
}; };
const getTransitionDurationFromElement = element => { const isElement = obj => {
if (!element) { if (!obj || typeof obj !== 'object') {
return 0; return false;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => (obj[0] || obj).nodeType;
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
} }
element.addEventListener(TRANSITION_END, listener); if (typeof obj.jquery !== 'undefined') {
setTimeout(() => { obj = obj[0];
if (!called) { }
triggerTransitionEnd(element);
} return typeof obj.nodeType !== 'undefined';
}, emulatedDuration); };
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
}; };
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
@ -176,12 +153,13 @@
const isRTL = () => document.documentElement.dir === 'rtl'; const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = (name, plugin) => { const defineJQueryPlugin = plugin => {
onDOMContentLoaded(() => { onDOMContentLoaded(() => {
const $ = getjQuery(); const $ = getjQuery();
/* istanbul ignore if */ /* istanbul ignore if */
if ($) { if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name]; const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface; $.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin; $.fn[name].Constructor = plugin;
@ -196,7 +174,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/sanitizer.js * Bootstrap (v5.0.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -309,7 +287,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tooltip.js * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -370,7 +348,7 @@
allowList: DefaultAllowlist, allowList: DefaultAllowlist,
popperConfig: null popperConfig: null
}; };
const Event$1 = { const Event = {
HIDE: `hide${EVENT_KEY}`, HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`, HIDDEN: `hidden${EVENT_KEY}`,
SHOW: `show${EVENT_KEY}`, SHOW: `show${EVENT_KEY}`,
@ -412,7 +390,7 @@
this._activeTrigger = {}; this._activeTrigger = {};
this._popper = null; // Protected this._popper = null; // Protected
this.config = this._getConfig(config); this._config = this._getConfig(config);
this.tip = null; this.tip = null;
this._setListeners(); this._setListeners();
@ -427,16 +405,8 @@
return NAME; return NAME;
} }
static get DATA_KEY() {
return DATA_KEY;
}
static get Event() { static get Event() {
return Event$1; return Event;
}
static get EVENT_KEY() {
return EVENT_KEY;
} }
static get DefaultType() { static get DefaultType() {
@ -490,18 +460,10 @@
this.tip.parentNode.removeChild(this.tip); this.tip.parentNode.removeChild(this.tip);
} }
this._isEnabled = null;
this._timeout = null;
this._hoverState = null;
this._activeTrigger = null;
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
this._popper = null;
this.config = null;
this.tip = null;
super.dispose(); super.dispose();
} }
@ -530,18 +492,19 @@
this.setContent(); this.setContent();
if (this.config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE); tip.classList.add(CLASS_NAME_FADE);
} }
const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
const attachment = this._getAttachment(placement); const attachment = this._getAttachment(placement);
this._addAttachmentClass(attachment); this._addAttachmentClass(attachment);
const container = this._getContainer(); const {
container
} = this._config;
Data__default['default'].set(tip, this.constructor.DATA_KEY, this); Data__default['default'].set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
@ -556,7 +519,7 @@
} }
tip.classList.add(CLASS_NAME_SHOW); tip.classList.add(CLASS_NAME_SHOW);
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -582,13 +545,9 @@
} }
}; };
if (this.tip.classList.contains(CLASS_NAME_FADE)) { const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
const transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler__default['default'].one(this.tip, 'transitionend', complete); this._queueCallback(complete, this.tip, isAnimated);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
} }
hide() { hide() {
@ -636,14 +595,9 @@
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
if (this.tip.classList.contains(CLASS_NAME_FADE)) { this._queueCallback(complete, this.tip, isAnimated);
const transitionDuration = getTransitionDurationFromElement(tip);
EventHandler__default['default'].one(tip, 'transitionend', complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
this._hoverState = ''; this._hoverState = '';
} }
@ -665,7 +619,7 @@
} }
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this.config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; this.tip = element.children[0];
return this.tip; return this.tip;
} }
@ -681,13 +635,10 @@
return; return;
} }
if (typeof content === 'object' && isElement(content)) { if (isElement(content)) {
if (content.jquery) { content = getElement(content); // content is a DOM node or a jQuery
content = content[0];
} // content is a DOM node or a jQuery
if (this._config.html) {
if (this.config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.appendChild(content);
@ -699,9 +650,9 @@
return; return;
} }
if (this.config.html) { if (this._config.html) {
if (this.config.sanitize) { if (this._config.sanitize) {
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn); content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
} }
element.innerHTML = content; element.innerHTML = content;
@ -714,7 +665,7 @@
let title = this._element.getAttribute('data-bs-original-title'); let title = this._element.getAttribute('data-bs-original-title');
if (!title) { if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title; title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
} }
return title; return title;
@ -748,7 +699,7 @@
_getOffset() { _getOffset() {
const { const {
offset offset
} = this.config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(val => Number.parseInt(val, 10)); return offset.split(',').map(val => Number.parseInt(val, 10));
@ -767,7 +718,7 @@
modifiers: [{ modifiers: [{
name: 'flip', name: 'flip',
options: { options: {
fallbackPlacements: this.config.fallbackPlacements fallbackPlacements: this._config.fallbackPlacements
} }
}, { }, {
name: 'offset', name: 'offset',
@ -777,7 +728,7 @@
}, { }, {
name: 'preventOverflow', name: 'preventOverflow',
options: { options: {
boundary: this.config.boundary boundary: this._config.boundary
} }
}, { }, {
name: 'arrow', name: 'arrow',
@ -797,7 +748,7 @@
} }
}; };
return { ...defaultBsPopperConfig, return { ...defaultBsPopperConfig,
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}; };
} }
@ -805,32 +756,21 @@
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
} }
_getContainer() {
if (this.config.container === false) {
return document.body;
}
if (isElement(this.config.container)) {
return this.config.container;
}
return SelectorEngine__default['default'].findOne(this.config.container);
}
_getAttachment(placement) { _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()]; return AttachmentMap[placement.toUpperCase()];
} }
_setListeners() { _setListeners() {
const triggers = this.config.trigger.split(' '); const triggers = this._config.trigger.split(' ');
triggers.forEach(trigger => { triggers.forEach(trigger => {
if (trigger === 'click') { if (trigger === 'click') {
EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)); EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
EventHandler__default['default'].on(this._element, eventIn, this.config.selector, event => this._enter(event)); EventHandler__default['default'].on(this._element, eventIn, this._config.selector, event => this._enter(event));
EventHandler__default['default'].on(this._element, eventOut, this.config.selector, event => this._leave(event)); EventHandler__default['default'].on(this._element, eventOut, this._config.selector, event => this._leave(event));
} }
}); });
@ -842,8 +782,8 @@
EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.config.selector) { if (this._config.selector) {
this.config = { ...this.config, this._config = { ...this._config,
trigger: 'manual', trigger: 'manual',
selector: '' selector: ''
}; };
@ -883,7 +823,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context._config.delay || !context._config.delay.show) {
context.show(); context.show();
return; return;
} }
@ -892,7 +832,7 @@
if (context._hoverState === HOVER_STATE_SHOW) { if (context._hoverState === HOVER_STATE_SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context._config.delay.show);
} }
_leave(event, context) { _leave(event, context) {
@ -909,7 +849,7 @@
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT; context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) { if (!context._config.delay || !context._config.delay.hide) {
context.hide(); context.hide();
return; return;
} }
@ -918,7 +858,7 @@
if (context._hoverState === HOVER_STATE_OUT) { if (context._hoverState === HOVER_STATE_OUT) {
context.hide(); context.hide();
} }
}, context.config.delay.hide); }, context._config.delay.hide);
} }
_isWithActiveTrigger() { _isWithActiveTrigger() {
@ -938,15 +878,11 @@
delete dataAttributes[dataAttr]; delete dataAttributes[dataAttr];
} }
}); });
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = { ...this.constructor.Default, config = { ...this.constructor.Default,
...dataAttributes, ...dataAttributes,
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
@ -975,10 +911,10 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this.config) { if (this._config) {
for (const key in this.config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this.config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this.config[key]; config[key] = this._config[key];
} }
} }
} }
@ -1045,7 +981,7 @@
*/ */
defineJQueryPlugin(NAME, Tooltip); defineJQueryPlugin(Tooltip);
return Tooltip; return Tooltip;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): index.esm.js * Bootstrap (v5.0.1): index.esm.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): index.umd.js * Bootstrap (v5.0.1): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): alert.js * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): base-component.js * Bootstrap (v5.0.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -20,7 +20,7 @@ import EventHandler from './dom/event-handler'
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.0' const VERSION = '5.0.1'
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): button.js * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): carousel.js * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): collapse.js * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/data.js * Bootstrap (v5.0.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/event-handler.js * Bootstrap (v5.0.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/manipulator.js * Bootstrap (v5.0.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dom/selector-engine.js * Bootstrap (v5.0.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): dropdown.js * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): modal.js * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): offcanvas.js * Bootstrap (v5.0.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): popover.js * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): scrollspy.js * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tab.js * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): toast.js * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): tooltip.js * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.0): util/backdrop.js * Bootstrap (v5.0.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

Some files were not shown because too many files have changed in this diff Show More