use directories for structure

This commit is contained in:
s2
2020-05-26 10:37:57 +02:00
parent 66580d4847
commit ae4aaf2668
1287 changed files with 92093 additions and 13113 deletions

4
node_modules/bootstrap/LICENSE generated vendored
View File

@@ -1,7 +1,7 @@
The MIT License (MIT)
Copyright (c) 2011-2019 Twitter, Inc.
Copyright (c) 2011-2019 The Bootstrap Authors
Copyright (c) 2011-2020 Twitter, Inc.
Copyright (c) 2011-2020 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

34
node_modules/bootstrap/README.md generated vendored
View File

@@ -1,6 +1,6 @@
<p align="center">
<a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/4.4/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
<img src="https://getbootstrap.com/docs/4.5/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
</a>
</p>
@@ -9,7 +9,7 @@
<p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br>
<a href="https://getbootstrap.com/docs/4.4/"><strong>Explore Bootstrap docs »</strong></a>
<a href="https://getbootstrap.com/docs/4.5/"><strong>Explore Bootstrap docs »</strong></a>
<br>
<br>
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug.md">Report bug</a>
@@ -41,20 +41,20 @@
Several quick start options are available:
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.4.1.zip)
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.5.0.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.4.1`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.4.1`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.5.0`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.5.0`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/4.4/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
Read the [Getting started page](https://getbootstrap.com/docs/4.5/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
[![Build Status](https://github.com/twbs/bootstrap/workflows/Tests/badge.svg)](https://github.com/twbs/bootstrap/actions?workflow=Tests)
[![Build Status](https://github.com/twbs/bootstrap/workflows/Tests/badge.svg?branch=v4-dev)](https://github.com/twbs/bootstrap/actions?query=workflow%3ATests+branch%3Av4-dev)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
@@ -113,11 +113,11 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/docs/4.4/assets/js/src/search.js` file.
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/docs/4.5/assets/js/src/search.js` file.
### Running documentation locally
1. Run through the [tooling setup](https://getbootstrap.com/docs/4.4/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
1. Run through the [tooling setup](https://getbootstrap.com/docs/4.5/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
2. Run `npm install` to install Node.js dependencies.
3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
4. Open `http://localhost:9001` in your browser, and voilà.
@@ -181,13 +181,6 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
[![Bakers](https://opencollective.com/bootstrap/backers.svg?width=890)](https://opencollective.com/bootstrap#backers)
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
@@ -204,6 +197,13 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
[![](https://opencollective.com/bootstrap/sponsor/9/avatar.svg)](https://opencollective.com/bootstrap/sponsor/9/website)
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
[![Backers](https://opencollective.com/bootstrap/backers.svg?width=890)](https://opencollective.com/bootstrap#backers)
## Copyright and license
Code and documentation copyright 2011-2019 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
Code and documentation copyright 2011-2020 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).

View File

@@ -1,7 +1,7 @@
/*!
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Grid v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
html {
@@ -116,6 +116,7 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -359,6 +360,7 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-sm-1 > * {
@@ -561,6 +563,7 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-md-1 > * {
@@ -763,6 +766,7 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-lg-1 > * {
@@ -965,6 +969,7 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-xl-1 > * {

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,7 +1,7 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
@@ -155,6 +155,7 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@@ -222,6 +223,10 @@ select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
@@ -254,13 +259,6 @@ input[type="checkbox"] {
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
:root {
@@ -185,6 +185,7 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@@ -252,6 +253,10 @@ select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
@@ -284,13 +289,6 @@ input[type="checkbox"] {
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
@@ -642,6 +640,7 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -885,6 +884,7 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-sm-1 > * {
@@ -1087,6 +1087,7 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-md-1 > * {
@@ -1289,6 +1290,7 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-lg-1 > * {
@@ -1491,6 +1493,7 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-xl-1 > * {
@@ -2100,6 +2103,15 @@ pre code {
opacity: 1;
}
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
select.form-control:focus::-ms-value {
color: #495057;
background-color: #fff;
@@ -2517,7 +2529,6 @@ textarea.form-control {
color: #212529;
text-align: center;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
@@ -2551,6 +2562,10 @@ textarea.form-control {
opacity: 0.65;
}
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
}
a.btn.disabled,
fieldset:disabled a.btn {
pointer-events: none;
@@ -3121,7 +3136,6 @@ fieldset:disabled a.btn {
.btn-link:focus, .btn-link.focus {
text-decoration: underline;
box-shadow: none;
}
.btn-link:disabled, .btn-link.disabled {
@@ -3580,8 +3594,9 @@ input[type="button"].btn-block {
.input-group > .custom-select,
.input-group > .custom-file {
position: relative;
-ms-flex: 1 1 0%;
flex: 1 1 0%;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
width: 1%;
min-width: 0;
margin-bottom: 0;
}
@@ -4661,7 +4676,7 @@ input[type="button"].btn-block {
}
.navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-light .navbar-text {
@@ -4709,7 +4724,7 @@ input[type="button"].btn-block {
}
.navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-dark .navbar-text {
@@ -4743,14 +4758,21 @@ input[type="button"].btn-block {
margin-left: 0;
}
.card > .list-group:first-child .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
.card > .list-group {
border-top: inherit;
border-bottom: inherit;
}
.card > .list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
.card > .list-group:first-child {
border-top-width: 0;
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.card > .list-group:last-child {
border-bottom-width: 0;
border-bottom-right-radius: calc(0.25rem - 1px);
border-bottom-left-radius: calc(0.25rem - 1px);
}
.card-body {
@@ -4968,6 +4990,11 @@ input[type="button"].btn-block {
border-radius: 0.25rem;
}
.breadcrumb-item {
display: -ms-flexbox;
display: flex;
}
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem;
}
@@ -5422,6 +5449,7 @@ a.badge-dark:focus, a.badge-dark.focus {
display: flex;
height: 1rem;
overflow: hidden;
line-height: 0;
font-size: 0.75rem;
background-color: #e9ecef;
border-radius: 0.25rem;
@@ -5484,6 +5512,7 @@ a.badge-dark:focus, a.badge-dark.focus {
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
border-radius: 0.25rem;
}
.list-group-item-action {
@@ -5513,13 +5542,13 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
.list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-bottom-right-radius: inherit;
border-bottom-left-radius: inherit;
}
.list-group-item.disabled, .list-group-item:disabled {
@@ -5549,26 +5578,26 @@ a.badge-dark:focus, a.badge-dark.focus {
flex-direction: row;
}
.list-group-horizontal .list-group-item:first-child {
.list-group-horizontal > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal .list-group-item:last-child {
.list-group-horizontal > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal .list-group-item.active {
.list-group-horizontal > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal .list-group-item + .list-group-item {
.list-group-horizontal > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal .list-group-item + .list-group-item.active {
.list-group-horizontal > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5578,22 +5607,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-sm .list-group-item:first-child {
.list-group-horizontal-sm > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-sm .list-group-item:last-child {
.list-group-horizontal-sm > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-sm .list-group-item.active {
.list-group-horizontal-sm > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-sm .list-group-item + .list-group-item {
.list-group-horizontal-sm > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-sm .list-group-item + .list-group-item.active {
.list-group-horizontal-sm > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5604,22 +5633,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-md .list-group-item:first-child {
.list-group-horizontal-md > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-md .list-group-item:last-child {
.list-group-horizontal-md > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-md .list-group-item.active {
.list-group-horizontal-md > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-md .list-group-item + .list-group-item {
.list-group-horizontal-md > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-md .list-group-item + .list-group-item.active {
.list-group-horizontal-md > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5630,22 +5659,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-lg .list-group-item:first-child {
.list-group-horizontal-lg > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-lg .list-group-item:last-child {
.list-group-horizontal-lg > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-lg .list-group-item.active {
.list-group-horizontal-lg > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-lg .list-group-item + .list-group-item {
.list-group-horizontal-lg > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-lg .list-group-item + .list-group-item.active {
.list-group-horizontal-lg > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5656,38 +5685,36 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-xl .list-group-item:first-child {
.list-group-horizontal-xl > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-xl .list-group-item:last-child {
.list-group-horizontal-xl > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-xl .list-group-item.active {
.list-group-horizontal-xl > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-xl .list-group-item + .list-group-item {
.list-group-horizontal-xl > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-xl .list-group-item + .list-group-item.active {
.list-group-horizontal-xl > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
}
.list-group-flush .list-group-item {
border-right-width: 0;
border-left-width: 0;
.list-group-flush {
border-radius: 0;
}
.list-group-flush .list-group-item:first-child {
border-top-width: 0;
.list-group-flush > .list-group-item {
border-width: 0 0 1px;
}
.list-group-flush:last-child .list-group-item:last-child {
.list-group-flush > .list-group-item:last-child {
border-bottom-width: 0;
}
@@ -5842,9 +5869,6 @@ button.close {
padding: 0;
background-color: transparent;
border: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
a.close.disabled {
@@ -5982,6 +6006,9 @@ a.close.disabled {
.modal-dialog-centered::before {
display: block;
height: calc(100vh - 1rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
content: "";
}
@@ -6107,6 +6134,9 @@ a.close.disabled {
}
.modal-dialog-centered::before {
height: calc(100vh - 3.5rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
}
.modal-sm {
max-width: 300px;
@@ -6638,6 +6668,8 @@ a.close.disabled {
}
50% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@@ -6648,6 +6680,8 @@ a.close.disabled {
}
50% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@@ -7933,6 +7967,27 @@ button.bg-dark:focus {
}
}
.user-select-all {
-webkit-user-select: all !important;
-moz-user-select: all !important;
-ms-user-select: all !important;
user-select: all !important;
}
.user-select-auto {
-webkit-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
user-select: auto !important;
}
.user-select-none {
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
}
.overflow-auto {
overflow: auto !important;
}
@@ -8088,18 +8143,6 @@ button.bg-dark:focus {
height: 100vh !important;
}
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.m-0 {
margin: 0 !important;
}
@@ -9912,6 +9955,18 @@ button.bg-dark:focus {
}
}
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.text-monospace {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}
@@ -10127,8 +10182,7 @@ a.text-dark:hover, a.text-dark:focus {
}
.text-break {
word-break: break-word !important;
overflow-wrap: break-word !important;
word-wrap: break-word !important;
}
.text-reset {

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

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 @@
/*!
* Bootstrap alert.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap alert.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Alert = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -35,33 +35,25 @@
*/
var NAME = 'alert';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Selector = {
DISMISS: '[data-dismiss="alert"]'
};
var Event = {
CLOSE: "close" + EVENT_KEY,
CLOSED: "closed" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
};
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
var EVENT_CLOSE = "close" + EVENT_KEY;
var EVENT_CLOSED = "closed" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_ALERT = 'alert';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Alert =
/*#__PURE__*/
function () {
var Alert = /*#__PURE__*/function () {
function Alert(element) {
this._element = element;
} // Getters
@@ -101,14 +93,14 @@
}
if (!parent) {
parent = $(element).closest("." + ClassName.ALERT)[0];
parent = $(element).closest("." + CLASS_NAME_ALERT)[0];
}
return parent;
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
var closeEvent = $.Event(EVENT_CLOSE);
$(element).trigger(closeEvent);
return closeEvent;
};
@@ -116,9 +108,9 @@
_proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.SHOW);
$(element).removeClass(CLASS_NAME_SHOW);
if (!$(element).hasClass(ClassName.FADE)) {
if (!$(element).hasClass(CLASS_NAME_FADE)) {
this._destroyElement(element);
return;
@@ -131,7 +123,7 @@
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
$(element).detach().trigger(EVENT_CLOSED).remove();
} // Static
;
@@ -177,7 +169,7 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap button.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap button.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,7 +9,7 @@
(global = global || self, global.Button = factory(global.jQuery));
}(this, (function ($) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -34,39 +34,31 @@
*/
var NAME = 'button';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ClassName = {
ACTIVE: 'active',
BUTTON: 'btn',
FOCUS: 'focus'
};
var Selector = {
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
DATA_TOGGLES: '[data-toggle="buttons"]',
DATA_TOGGLE: '[data-toggle="button"]',
DATA_TOGGLES_BUTTONS: '[data-toggle="buttons"] .btn',
INPUT: 'input:not([type="hidden"])',
ACTIVE: '.active',
BUTTON: '.btn'
};
var Event = {
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY),
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY
};
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_BUTTON = 'btn';
var CLASS_NAME_FOCUS = 'focus';
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
var SELECTOR_INPUT = 'input:not([type="hidden"])';
var SELECTOR_ACTIVE = '.active';
var SELECTOR_BUTTON = '.btn';
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Button =
/*#__PURE__*/
function () {
var Button = /*#__PURE__*/function () {
function Button(element) {
this._element = element;
} // Getters
@@ -78,33 +70,30 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector.DATA_TOGGLES)[0];
var rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0];
if (rootElement) {
var input = this._element.querySelector(Selector.INPUT);
var input = this._element.querySelector(SELECTOR_INPUT);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = rootElement.querySelector(Selector.ACTIVE);
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
if (activeElement) {
$(activeElement).removeClass(ClassName.ACTIVE);
$(activeElement).removeClass(CLASS_NAME_ACTIVE);
}
}
} else if (input.type === 'checkbox') {
if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName.ACTIVE)) {
triggerChangeEvent = false;
}
} else {
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
triggerChangeEvent = false;
}
if (triggerChangeEvent) {
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
if (input.type === 'checkbox' || input.type === 'radio') {
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
}
$(input).trigger('change');
}
@@ -115,11 +104,11 @@
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
if (addAriaPressed) {
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
}
if (triggerChangeEvent) {
$(this._element).toggleClass(ClassName.ACTIVE);
$(this._element).toggleClass(CLASS_NAME_ACTIVE);
}
}
};
@@ -161,17 +150,18 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = event.target;
var initialButton = button;
if (!$(button).hasClass(ClassName.BUTTON)) {
button = $(button).closest(Selector.BUTTON)[0];
if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
button = $(button).closest(SELECTOR_BUTTON)[0];
}
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
event.preventDefault(); // work around Firefox bug #1540995
} else {
var inputBtn = button.querySelector(Selector.INPUT);
var inputBtn = button.querySelector(SELECTOR_INPUT);
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
event.preventDefault(); // work around Firefox bug #1540995
@@ -179,38 +169,42 @@
return;
}
if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') {
event.preventDefault(); // work around event sent to label and input
}
Button._jQueryInterface.call($(button), 'toggle');
}
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(Selector.BUTTON)[0];
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(SELECTOR_BUTTON)[0];
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
});
$(window).on(Event.LOAD_DATA_API, function () {
$(window).on(EVENT_LOAD_DATA_API, function () {
// ensure correct active class is set to match the controls' actual values/states
// find all checkboxes/readio buttons inside data-toggle groups
var buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLES_BUTTONS));
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
for (var i = 0, len = buttons.length; i < len; i++) {
var button = buttons[i];
var input = button.querySelector(Selector.INPUT);
var input = button.querySelector(SELECTOR_INPUT);
if (input.checked || input.hasAttribute('checked')) {
button.classList.add(ClassName.ACTIVE);
button.classList.add(CLASS_NAME_ACTIVE);
} else {
button.classList.remove(ClassName.ACTIVE);
button.classList.remove(CLASS_NAME_ACTIVE);
}
} // find all button toggles
buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
var _button = buttons[_i];
if (_button.getAttribute('aria-pressed') === 'true') {
_button.classList.add(ClassName.ACTIVE);
_button.classList.add(CLASS_NAME_ACTIVE);
} else {
_button.classList.remove(ClassName.ACTIVE);
_button.classList.remove(CLASS_NAME_ACTIVE);
}
}
});

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap carousel.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap carousel.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Carousel = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -84,7 +84,7 @@
*/
var NAME = 'carousel';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -112,48 +112,39 @@
wrap: 'boolean',
touch: 'boolean'
};
var Direction = {
NEXT: 'next',
PREV: 'prev',
LEFT: 'left',
RIGHT: 'right'
};
var Event = {
SLIDE: "slide" + EVENT_KEY,
SLID: "slid" + EVENT_KEY,
KEYDOWN: "keydown" + EVENT_KEY,
MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY,
TOUCHSTART: "touchstart" + EVENT_KEY,
TOUCHMOVE: "touchmove" + EVENT_KEY,
TOUCHEND: "touchend" + EVENT_KEY,
POINTERDOWN: "pointerdown" + EVENT_KEY,
POINTERUP: "pointerup" + EVENT_KEY,
DRAG_START: "dragstart" + EVENT_KEY,
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
CAROUSEL: 'carousel',
ACTIVE: 'active',
SLIDE: 'slide',
RIGHT: 'carousel-item-right',
LEFT: 'carousel-item-left',
NEXT: 'carousel-item-next',
PREV: 'carousel-item-prev',
ITEM: 'carousel-item',
POINTER_EVENT: 'pointer-event'
};
var Selector = {
ACTIVE: '.active',
ACTIVE_ITEM: '.active.carousel-item',
ITEM: '.carousel-item',
ITEM_IMG: '.carousel-item img',
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
};
var DIRECTION_NEXT = 'next';
var DIRECTION_PREV = 'prev';
var DIRECTION_LEFT = 'left';
var DIRECTION_RIGHT = 'right';
var EVENT_SLIDE = "slide" + EVENT_KEY;
var EVENT_SLID = "slid" + EVENT_KEY;
var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_CAROUSEL = 'carousel';
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_SLIDE = 'slide';
var CLASS_NAME_RIGHT = 'carousel-item-right';
var CLASS_NAME_LEFT = 'carousel-item-left';
var CLASS_NAME_NEXT = 'carousel-item-next';
var CLASS_NAME_PREV = 'carousel-item-prev';
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
var SELECTOR_ACTIVE = '.active';
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
var SELECTOR_ITEM = '.carousel-item';
var SELECTOR_ITEM_IMG = '.carousel-item img';
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
var SELECTOR_INDICATORS = '.carousel-indicators';
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
var PointerType = {
TOUCH: 'touch',
PEN: 'pen'
@@ -164,9 +155,7 @@
* ------------------------------------------------------------------------
*/
var Carousel =
/*#__PURE__*/
function () {
var Carousel = /*#__PURE__*/function () {
function Carousel(element, config) {
this._items = null;
this._interval = null;
@@ -178,7 +167,7 @@
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._element = element;
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
@@ -191,7 +180,7 @@
// Public
_proto.next = function next() {
if (!this._isSliding) {
this._slide(Direction.NEXT);
this._slide(DIRECTION_NEXT);
}
};
@@ -205,7 +194,7 @@
_proto.prev = function prev() {
if (!this._isSliding) {
this._slide(Direction.PREV);
this._slide(DIRECTION_PREV);
}
};
@@ -214,7 +203,7 @@
this._isPaused = true;
}
if (this._element.querySelector(Selector.NEXT_PREV)) {
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
Util.triggerTransitionEnd(this._element);
this.cycle(true);
}
@@ -241,7 +230,7 @@
_proto.to = function to(index) {
var _this = this;
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
var activeIndex = this._getItemIndex(this._activeElement);
@@ -250,7 +239,7 @@
}
if (this._isSliding) {
$(this._element).one(Event.SLID, function () {
$(this._element).one(EVENT_SLID, function () {
return _this.to(index);
});
return;
@@ -262,7 +251,7 @@
return;
}
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
this._slide(direction, this._items[index]);
};
@@ -282,7 +271,7 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, Default, {}, config);
config = _objectSpread2(_objectSpread2({}, Default), config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -311,15 +300,15 @@
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(Event.KEYDOWN, function (event) {
$(this._element).on(EVENT_KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
$(this._element).on(Event.MOUSEENTER, function (event) {
$(this._element).on(EVENT_MOUSEENTER, function (event) {
return _this2.pause(event);
}).on(Event.MOUSELEAVE, function (event) {
}).on(EVENT_MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
@@ -380,27 +369,27 @@
}
};
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, function (e) {
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
return e.preventDefault();
});
if (this._pointerEvent) {
$(this._element).on(Event.POINTERDOWN, function (event) {
$(this._element).on(EVENT_POINTERDOWN, function (event) {
return start(event);
});
$(this._element).on(Event.POINTERUP, function (event) {
$(this._element).on(EVENT_POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(ClassName.POINTER_EVENT);
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
$(this._element).on(Event.TOUCHSTART, function (event) {
$(this._element).on(EVENT_TOUCHSTART, function (event) {
return start(event);
});
$(this._element).on(Event.TOUCHMOVE, function (event) {
$(this._element).on(EVENT_TOUCHMOVE, function (event) {
return move(event);
});
$(this._element).on(Event.TOUCHEND, function (event) {
$(this._element).on(EVENT_TOUCHEND, function (event) {
return end(event);
});
}
@@ -425,13 +414,13 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
return this._items.indexOf(element);
};
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
var isNextDirection = direction === Direction.NEXT;
var isPrevDirection = direction === Direction.PREV;
var isNextDirection = direction === DIRECTION_NEXT;
var isPrevDirection = direction === DIRECTION_PREV;
var activeIndex = this._getItemIndex(activeElement);
@@ -442,7 +431,7 @@
return activeElement;
}
var delta = direction === Direction.PREV ? -1 : 1;
var delta = direction === DIRECTION_PREV ? -1 : 1;
var itemIndex = (activeIndex + delta) % this._items.length;
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
};
@@ -450,9 +439,9 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
var slideEvent = $.Event(Event.SLIDE, {
var slideEvent = $.Event(EVENT_SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
@@ -464,13 +453,13 @@
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
$(indicators).removeClass(ClassName.ACTIVE);
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
$(indicators).removeClass(CLASS_NAME_ACTIVE);
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
$(nextIndicator).addClass(ClassName.ACTIVE);
$(nextIndicator).addClass(CLASS_NAME_ACTIVE);
}
}
};
@@ -478,7 +467,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
var activeElementIndex = this._getItemIndex(activeElement);
@@ -491,17 +480,17 @@
var orderClassName;
var eventDirectionName;
if (direction === Direction.NEXT) {
directionalClassName = ClassName.LEFT;
orderClassName = ClassName.NEXT;
eventDirectionName = Direction.LEFT;
if (direction === DIRECTION_NEXT) {
directionalClassName = CLASS_NAME_LEFT;
orderClassName = CLASS_NAME_NEXT;
eventDirectionName = DIRECTION_LEFT;
} else {
directionalClassName = ClassName.RIGHT;
orderClassName = ClassName.PREV;
eventDirectionName = Direction.RIGHT;
directionalClassName = CLASS_NAME_RIGHT;
orderClassName = CLASS_NAME_PREV;
eventDirectionName = DIRECTION_RIGHT;
}
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
this._isSliding = false;
return;
}
@@ -525,14 +514,14 @@
this._setActiveIndicatorElement(nextElement);
var slidEvent = $.Event(Event.SLID, {
var slidEvent = $.Event(EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if ($(this._element).hasClass(ClassName.SLIDE)) {
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
$(nextElement).addClass(orderClassName);
Util.reflow(nextElement);
$(activeElement).addClass(directionalClassName);
@@ -548,16 +537,16 @@
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
$(activeElement).one(Util.TRANSITION_END, function () {
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
$(activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
return $(_this4._element).trigger(slidEvent);
}, 0);
}).emulateTransitionEnd(transitionDuration);
} else {
$(activeElement).removeClass(ClassName.ACTIVE);
$(nextElement).addClass(ClassName.ACTIVE);
$(activeElement).removeClass(CLASS_NAME_ACTIVE);
$(nextElement).addClass(CLASS_NAME_ACTIVE);
this._isSliding = false;
$(this._element).trigger(slidEvent);
}
@@ -572,10 +561,10 @@
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = _objectSpread2({}, Default, {}, $(this).data());
var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data());
if (typeof config === 'object') {
_config = _objectSpread2({}, _config, {}, config);
_config = _objectSpread2(_objectSpread2({}, _config), config);
}
var action = typeof config === 'string' ? config : _config.slide;
@@ -609,11 +598,11 @@
var target = $(selector)[0];
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
return;
}
var config = _objectSpread2({}, $(target).data(), {}, $(this).data());
var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
var slideIndex = this.getAttribute('data-slide-to');
@@ -651,9 +640,9 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(Event.LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(EVENT_LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap collapse.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap collapse.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Collapse = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -84,7 +84,7 @@
*/
var NAME = 'collapse';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -97,42 +97,32 @@
toggle: 'boolean',
parent: '(string|element)'
};
var Event = {
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
SHOW: 'show',
COLLAPSE: 'collapse',
COLLAPSING: 'collapsing',
COLLAPSED: 'collapsed'
};
var Dimension = {
WIDTH: 'width',
HEIGHT: 'height'
};
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
};
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_COLLAPSE = 'collapse';
var CLASS_NAME_COLLAPSING = 'collapsing';
var CLASS_NAME_COLLAPSED = 'collapsed';
var DIMENSION_WIDTH = 'width';
var DIMENSION_HEIGHT = 'height';
var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Collapse =
/*#__PURE__*/
function () {
var Collapse = /*#__PURE__*/function () {
function Collapse(element, config) {
this._isTransitioning = false;
this._element = element;
this._config = this._getConfig(config);
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
@@ -164,7 +154,7 @@
// Public
_proto.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.SHOW)) {
if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
@@ -174,7 +164,7 @@
_proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW)) {
return;
}
@@ -182,12 +172,12 @@
var activesData;
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) {
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
return elem.classList.contains(ClassName.COLLAPSE);
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
@@ -203,7 +193,7 @@
}
}
var startEvent = $.Event(Event.SHOW);
var startEvent = $.Event(EVENT_SHOW);
$(this._element).trigger(startEvent);
if (startEvent.isDefaultPrevented()) {
@@ -220,22 +210,22 @@
var dimension = this._getDimension();
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
$(this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
$(this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
}
this.setTransitioning(true);
var complete = function complete() {
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
$(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
_this._element.style[dimension] = '';
_this.setTransitioning(false);
$(_this._element).trigger(Event.SHOWN);
$(_this._element).trigger(EVENT_SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
@@ -248,11 +238,11 @@
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW)) {
return;
}
var startEvent = $.Event(Event.HIDE);
var startEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(startEvent);
if (startEvent.isDefaultPrevented()) {
@@ -263,7 +253,7 @@
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
$(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
@@ -274,8 +264,8 @@
if (selector !== null) {
var $elem = $([].slice.call(document.querySelectorAll(selector)));
if (!$elem.hasClass(ClassName.SHOW)) {
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
$(trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
}
}
}
@@ -286,7 +276,7 @@
var complete = function complete() {
_this2.setTransitioning(false);
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
$(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
};
this._element.style[dimension] = '';
@@ -309,7 +299,7 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, Default, {}, config);
config = _objectSpread2(_objectSpread2({}, Default), config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME, config, DefaultType);
@@ -317,8 +307,8 @@
};
_proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH);
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
};
_proto._getParent = function _getParent() {
@@ -345,10 +335,10 @@
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
var isOpen = $(element).hasClass(ClassName.SHOW);
var isOpen = $(element).hasClass(CLASS_NAME_SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
$(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
}
} // Static
;
@@ -363,9 +353,9 @@
var $this = $(this);
var data = $this.data(DATA_KEY);
var _config = _objectSpread2({}, Default, {}, $this.data(), {}, typeof config === 'object' && config ? config : {});
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $this.data()), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
}
@@ -405,7 +395,7 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
event.preventDefault();

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap dropdown.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap dropdown.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,9 +9,9 @@
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
}(this, (function ($, Popper, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -85,7 +85,7 @@
*/
var NAME = 'dropdown';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -103,43 +103,32 @@
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
CLICK: "click" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY,
KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
DISABLED: 'disabled',
SHOW: 'show',
DROPUP: 'dropup',
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left',
POSITION_STATIC: 'position-static'
};
var Selector = {
DATA_TOGGLE: '[data-toggle="dropdown"]',
FORM_CHILD: '.dropdown form',
MENU: '.dropdown-menu',
NAVBAR_NAV: '.navbar-nav',
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
};
var AttachmentMap = {
TOP: 'top-start',
TOPEND: 'top-end',
BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end',
RIGHT: 'right-start',
RIGHTEND: 'right-end',
LEFT: 'left-start',
LEFTEND: 'left-end'
};
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_CLICK = "click" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_DROPUP = 'dropup';
var CLASS_NAME_DROPRIGHT = 'dropright';
var CLASS_NAME_DROPLEFT = 'dropleft';
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
var CLASS_NAME_POSITION_STATIC = 'position-static';
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
var SELECTOR_FORM_CHILD = '.dropdown form';
var SELECTOR_MENU = '.dropdown-menu';
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
var PLACEMENT_TOP = 'top-start';
var PLACEMENT_TOPEND = 'top-end';
var PLACEMENT_BOTTOM = 'bottom-start';
var PLACEMENT_BOTTOMEND = 'bottom-end';
var PLACEMENT_RIGHT = 'right-start';
var PLACEMENT_LEFT = 'left-start';
var Default = {
offset: 0,
flip: true,
@@ -162,9 +151,7 @@
* ------------------------------------------------------------------------
*/
var Dropdown =
/*#__PURE__*/
function () {
var Dropdown = /*#__PURE__*/function () {
function Dropdown(element, config) {
this._element = element;
this._popper = null;
@@ -180,11 +167,11 @@
// Public
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var isActive = $(this._menu).hasClass(ClassName.SHOW);
var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW);
Dropdown._clearMenus();
@@ -200,14 +187,14 @@
usePopper = false;
}
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
return;
}
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event.SHOW, relatedTarget);
var showEvent = $.Event(EVENT_SHOW, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
@@ -243,7 +230,7 @@
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName.POSITION_STATIC);
$(parent).addClass(CLASS_NAME_POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@@ -253,7 +240,7 @@
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {
if ('ontouchstart' in document.documentElement && $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop);
}
@@ -261,19 +248,19 @@
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
$(this._menu).toggleClass(CLASS_NAME_SHOW);
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_SHOWN, relatedTarget));
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
return;
}
var relatedTarget = {
relatedTarget: this._element
};
var hideEvent = $.Event(Event.HIDE, relatedTarget);
var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
@@ -287,8 +274,8 @@
this._popper.destroy();
}
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
$(this._menu).toggleClass(CLASS_NAME_SHOW);
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
};
_proto.dispose = function dispose() {
@@ -316,7 +303,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event.CLICK, function (event) {
$(this._element).on(EVENT_CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@@ -325,7 +312,7 @@
};
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, this.constructor.Default, {}, $(this._element).data(), {}, config);
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
@@ -335,7 +322,7 @@
var parent = Dropdown._getParentFromElement(this._element);
if (parent) {
this._menu = parent.querySelector(Selector.MENU);
this._menu = parent.querySelector(SELECTOR_MENU);
}
}
@@ -344,20 +331,16 @@
_proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element.parentNode);
var placement = AttachmentMap.BOTTOM; // Handle dropup
var placement = PLACEMENT_BOTTOM; // Handle dropup
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
}
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND;
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT;
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
placement = PLACEMENT_LEFT;
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND;
}
return placement;
@@ -374,7 +357,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _objectSpread2({}, data.offsets, {}, _this2._config.offset(data.offsets, _this2._element) || {});
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
@@ -404,7 +387,7 @@
};
}
return _objectSpread2({}, popperConfig, {}, this._config.popperConfig);
return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig);
} // Static
;
@@ -434,7 +417,7 @@
return;
}
var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
@@ -454,7 +437,7 @@
var dropdownMenu = context._menu;
if (!$(parent).hasClass(ClassName.SHOW)) {
if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
continue;
}
@@ -462,7 +445,7 @@
continue;
}
var hideEvent = $.Event(Event.HIDE, relatedTarget);
var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
$(parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
@@ -481,8 +464,8 @@
context._popper.destroy();
}
$(dropdownMenu).removeClass(ClassName.SHOW);
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
$(dropdownMenu).removeClass(CLASS_NAME_SHOW);
$(parent).removeClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
}
};
@@ -506,36 +489,35 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
return;
}
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(CLASS_NAME_SHOW);
if (!isActive && event.which === ESCAPE_KEYCODE) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.SHOW);
if (!isActive && event.which === ESCAPE_KEYCODE) {
return;
}
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
$(toggle).trigger('focus');
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
}
$(this).trigger('click');
return;
}
var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS)).filter(function (item) {
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
return $(item).is(':visible');
});
@@ -588,12 +570,12 @@
*/
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
}).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
e.stopPropagation();
});
/**

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap modal.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap modal.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Modal = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -84,7 +84,7 @@
*/
var NAME = 'modal';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -103,50 +103,42 @@
focus: 'boolean',
show: 'boolean'
};
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDE_PREVENTED: "hidePrevented" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
FOCUSIN: "focusin" + EVENT_KEY,
RESIZE: "resize" + EVENT_KEY,
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY,
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY,
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
SCROLLABLE: 'modal-dialog-scrollable',
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
SHOW: 'show',
STATIC: 'modal-static'
};
var Selector = {
DIALOG: '.modal-dialog',
MODAL_BODY: '.modal-body',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top'
};
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
var EVENT_RESIZE = "resize" + EVENT_KEY;
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
var CLASS_NAME_BACKDROP = 'modal-backdrop';
var CLASS_NAME_OPEN = 'modal-open';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_STATIC = 'modal-static';
var SELECTOR_DIALOG = '.modal-dialog';
var SELECTOR_MODAL_BODY = '.modal-body';
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
var SELECTOR_STICKY_CONTENT = '.sticky-top';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Modal =
/*#__PURE__*/
function () {
var Modal = /*#__PURE__*/function () {
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
this._dialog = element.querySelector(Selector.DIALOG);
this._dialog = element.querySelector(SELECTOR_DIALOG);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
@@ -170,11 +162,11 @@
return;
}
if ($(this._element).hasClass(ClassName.FADE)) {
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true;
}
var showEvent = $.Event(Event.SHOW, {
var showEvent = $.Event(EVENT_SHOW, {
relatedTarget: relatedTarget
});
$(this._element).trigger(showEvent);
@@ -195,11 +187,11 @@
this._setResizeEvent();
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this.hide(event);
});
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
$(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
_this._ignoreBackdropClick = true;
}
@@ -222,7 +214,7 @@
return;
}
var hideEvent = $.Event(Event.HIDE);
var hideEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(hideEvent);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
@@ -230,7 +222,7 @@
}
this._isShown = false;
var transition = $(this._element).hasClass(ClassName.FADE);
var transition = $(this._element).hasClass(CLASS_NAME_FADE);
if (transition) {
this._isTransitioning = true;
@@ -240,10 +232,10 @@
this._setResizeEvent();
$(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
$(document).off(EVENT_FOCUSIN);
$(this._element).removeClass(CLASS_NAME_SHOW);
$(this._element).off(EVENT_CLICK_DISMISS);
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -260,12 +252,12 @@
return $(htmlElement).off(EVENT_KEY);
});
/**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `Event.CLICK_DATA_API` event that should remain
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
$(document).off(Event.FOCUSIN);
$(document).off(EVENT_FOCUSIN);
$.removeData(this._element, DATA_KEY);
this._config = null;
this._element = null;
@@ -284,7 +276,7 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, Default, {}, config);
config = _objectSpread2(_objectSpread2({}, Default), config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -293,18 +285,18 @@
var _this3 = this;
if (this._config.backdrop === 'static') {
var hideEventPrevented = $.Event(Event.HIDE_PREVENTED);
var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED);
$(this._element).trigger(hideEventPrevented);
if (hideEventPrevented.defaultPrevented) {
return;
}
this._element.classList.add(ClassName.STATIC);
this._element.classList.add(CLASS_NAME_STATIC);
var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function () {
_this3._element.classList.remove(ClassName.STATIC);
_this3._element.classList.remove(CLASS_NAME_STATIC);
}).emulateTransitionEnd(modalTransitionDuration);
this._element.focus();
@@ -316,8 +308,8 @@
_proto._showElement = function _showElement(relatedTarget) {
var _this4 = this;
var transition = $(this._element).hasClass(ClassName.FADE);
var modalBody = this._dialog ? this._dialog.querySelector(Selector.MODAL_BODY) : null;
var transition = $(this._element).hasClass(CLASS_NAME_FADE);
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@@ -330,7 +322,7 @@
this._element.setAttribute('aria-modal', true);
if ($(this._dialog).hasClass(ClassName.SCROLLABLE) && modalBody) {
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0;
} else {
this._element.scrollTop = 0;
@@ -340,13 +332,13 @@
Util.reflow(this._element);
}
$(this._element).addClass(ClassName.SHOW);
$(this._element).addClass(CLASS_NAME_SHOW);
if (this._config.focus) {
this._enforceFocus();
}
var shownEvent = $.Event(Event.SHOWN, {
var shownEvent = $.Event(EVENT_SHOWN, {
relatedTarget: relatedTarget
});
@@ -370,8 +362,8 @@
_proto._enforceFocus = function _enforceFocus() {
var _this5 = this;
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop
.on(Event.FOCUSIN, function (event) {
$(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
.on(EVENT_FOCUSIN, function (event) {
if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
_this5._element.focus();
}
@@ -381,14 +373,18 @@
_proto._setEscapeEvent = function _setEscapeEvent() {
var _this6 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) {
if (this._isShown) {
$(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault();
_this6.hide();
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
_this6._triggerBackdropTransition();
}
});
} else if (!this._isShown) {
$(this._element).off(Event.KEYDOWN_DISMISS);
$(this._element).off(EVENT_KEYDOWN_DISMISS);
}
};
@@ -396,11 +392,11 @@
var _this7 = this;
if (this._isShown) {
$(window).on(Event.RESIZE, function (event) {
$(window).on(EVENT_RESIZE, function (event) {
return _this7.handleUpdate(event);
});
} else {
$(window).off(Event.RESIZE);
$(window).off(EVENT_RESIZE);
}
};
@@ -416,13 +412,13 @@
this._isTransitioning = false;
this._showBackdrop(function () {
$(document.body).removeClass(ClassName.OPEN);
$(document.body).removeClass(CLASS_NAME_OPEN);
_this8._resetAdjustments();
_this8._resetScrollbar();
$(_this8._element).trigger(Event.HIDDEN);
$(_this8._element).trigger(EVENT_HIDDEN);
});
};
@@ -436,18 +432,18 @@
_proto._showBackdrop = function _showBackdrop(callback) {
var _this9 = this;
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
var animate = $(this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
this._backdrop.className = ClassName.BACKDROP;
this._backdrop.className = CLASS_NAME_BACKDROP;
if (animate) {
this._backdrop.classList.add(animate);
}
$(this._backdrop).appendTo(document.body);
$(this._element).on(Event.CLICK_DISMISS, function (event) {
$(this._element).on(EVENT_CLICK_DISMISS, function (event) {
if (_this9._ignoreBackdropClick) {
_this9._ignoreBackdropClick = false;
return;
@@ -464,7 +460,7 @@
Util.reflow(this._backdrop);
}
$(this._backdrop).addClass(ClassName.SHOW);
$(this._backdrop).addClass(CLASS_NAME_SHOW);
if (!callback) {
return;
@@ -478,7 +474,7 @@
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.SHOW);
$(this._backdrop).removeClass(CLASS_NAME_SHOW);
var callbackRemove = function callbackRemove() {
_this9._removeBackdrop();
@@ -488,7 +484,7 @@
}
};
if ($(this._element).hasClass(ClassName.FADE)) {
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
@@ -523,7 +519,7 @@
_proto._checkScrollbar = function _checkScrollbar() {
var rect = document.body.getBoundingClientRect();
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
this._scrollbarWidth = this._getScrollbarWidth();
};
@@ -533,8 +529,8 @@
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight;
@@ -553,19 +549,19 @@
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
}
$(document.body).addClass(ClassName.OPEN);
$(document.body).addClass(CLASS_NAME_OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
$(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
$(elements).each(function (index, element) {
var margin = $(element).data('margin-right');
@@ -582,7 +578,7 @@
_proto._getScrollbarWidth = function _getScrollbarWidth() {
// thx d.walsh
var scrollDiv = document.createElement('div');
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
@@ -594,7 +590,7 @@
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = _objectSpread2({}, Default, {}, $(this).data(), {}, typeof config === 'object' && config ? config : {});
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this).data()), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
@@ -634,7 +630,7 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
var _this11 = this;
var target;
@@ -644,19 +640,19 @@
target = document.querySelector(selector);
}
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread2({}, $(target).data(), {}, $(this).data());
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
var $target = $(target).one(Event.SHOW, function (showEvent) {
var $target = $(target).one(EVENT_SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
return;
}
$target.one(Event.HIDDEN, function () {
$target.one(EVENT_HIDDEN, function () {
if ($(_this11).is(':visible')) {
_this11.focus();
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap popover.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap popover.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));
}(this, (function ($, Tooltip) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -90,32 +90,28 @@
*/
var NAME = 'popover';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var Default = _objectSpread2({}, Tooltip.Default, {
var Default = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType = _objectSpread2({}, Tooltip.DefaultType, {
var DefaultType = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, {
content: '(string|element|function)'
});
var ClassName = {
FADE: 'fade',
SHOW: 'show'
};
var Selector = {
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TITLE = '.popover-header';
var SELECTOR_CONTENT = '.popover-body';
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@@ -134,9 +130,7 @@
* ------------------------------------------------------------------------
*/
var Popover =
/*#__PURE__*/
function (_Tooltip) {
var Popover = /*#__PURE__*/function (_Tooltip) {
_inheritsLoose(Popover, _Tooltip);
function Popover() {
@@ -162,7 +156,7 @@
_proto.setContent = function setContent() {
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
var content = this._getContent();
@@ -170,8 +164,8 @@
content = content.call(this.element);
}
this.setElementContent($tip.find(Selector.CONTENT), content);
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
this.setElementContent($tip.find(SELECTOR_CONTENT), content);
$tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
} // Private
;

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap scrollspy.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap scrollspy.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -84,7 +84,7 @@
*/
var NAME = 'scrollspy';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -99,52 +99,40 @@
method: 'string',
target: '(string|element)'
};
var Event = {
ACTIVATE: "activate" + EVENT_KEY,
SCROLL: "scroll" + EVENT_KEY,
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
DROPDOWN_ITEM: 'dropdown-item',
DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active'
};
var Selector = {
DATA_SPY: '[data-spy="scroll"]',
ACTIVE: '.active',
NAV_LIST_GROUP: '.nav, .list-group',
NAV_LINKS: '.nav-link',
NAV_ITEMS: '.nav-item',
LIST_ITEMS: '.list-group-item',
DROPDOWN: '.dropdown',
DROPDOWN_ITEMS: '.dropdown-item',
DROPDOWN_TOGGLE: '.dropdown-toggle'
};
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
};
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
var EVENT_SCROLL = "scroll" + EVENT_KEY;
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
var CLASS_NAME_ACTIVE = 'active';
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_NAV_LINKS = '.nav-link';
var SELECTOR_NAV_ITEMS = '.nav-item';
var SELECTOR_LIST_ITEMS = '.list-group-item';
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var METHOD_OFFSET = 'offset';
var METHOD_POSITION = 'position';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var ScrollSpy =
/*#__PURE__*/
function () {
var ScrollSpy = /*#__PURE__*/function () {
function ScrollSpy(element, config) {
var _this = this;
this._element = element;
this._scrollElement = element.tagName === 'BODY' ? window : element;
this._config = this._getConfig(config);
this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
this._offsets = [];
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
$(this._scrollElement).on(Event.SCROLL, function (event) {
$(this._scrollElement).on(EVENT_SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
@@ -159,9 +147,9 @@
_proto.refresh = function refresh() {
var _this2 = this;
var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
@@ -210,9 +198,9 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, Default, {}, typeof config === 'object' && config ? config : {});
config = _objectSpread2(_objectSpread2({}, Default), typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
var id = $(config.target).attr('id');
if (!id) {
@@ -268,9 +256,7 @@
return;
}
var offsetLength = this._offsets.length;
for (var i = offsetLength; i--;) {
for (var i = this._offsets.length; i--;) {
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
if (isActiveTarget) {
@@ -290,29 +276,29 @@
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
$link.addClass(ClassName.ACTIVE);
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
$link.addClass(CLASS_NAME_ACTIVE);
} else {
// Set triggered link as active
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
$link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
}
$(this._scrollElement).trigger(Event.ACTIVATE, {
$(this._scrollElement).trigger(EVENT_ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
return node.classList.contains(ClassName.ACTIVE);
return node.classList.contains(CLASS_NAME_ACTIVE);
}).forEach(function (node) {
return node.classList.remove(ClassName.ACTIVE);
return node.classList.remove(CLASS_NAME_ACTIVE);
});
} // Static
;
@@ -359,8 +345,8 @@
*/
$(window).on(Event.LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
$(window).on(EVENT_LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
var scrollSpysLength = scrollSpys.length;
for (var i = scrollSpysLength; i--;) {

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap tab.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap tab.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Tab = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -35,43 +35,35 @@
*/
var NAME = 'tab';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
DROPDOWN_MENU: 'dropdown-menu',
ACTIVE: 'active',
DISABLED: 'disabled',
FADE: 'fade',
SHOW: 'show'
};
var Selector = {
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
ACTIVE: '.active',
ACTIVE_UL: '> li > .active',
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
};
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_ACTIVE = '.active';
var SELECTOR_ACTIVE_UL = '> li > .active';
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Tab =
/*#__PURE__*/
function () {
var Tab = /*#__PURE__*/function () {
function Tab(element) {
this._element = element;
} // Getters
@@ -83,25 +75,25 @@
_proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(CLASS_NAME_ACTIVE) || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var target;
var previous;
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = previous[previous.length - 1];
}
var hideEvent = $.Event(Event.HIDE, {
var hideEvent = $.Event(EVENT_HIDE, {
relatedTarget: this._element
});
var showEvent = $.Event(Event.SHOW, {
var showEvent = $.Event(EVENT_SHOW, {
relatedTarget: previous
});
@@ -122,10 +114,10 @@
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(Event.HIDDEN, {
var hiddenEvent = $.Event(EVENT_HIDDEN, {
relatedTarget: _this._element
});
var shownEvent = $.Event(Event.SHOWN, {
var shownEvent = $.Event(EVENT_SHOWN, {
relatedTarget: previous
});
$(previous).trigger(hiddenEvent);
@@ -148,9 +140,9 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE);
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);
var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
@@ -158,7 +150,7 @@
if (active && isTransitioning) {
var transitionDuration = Util.getTransitionDurationFromElement(active);
$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
$(active).removeClass(CLASS_NAME_SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
@@ -166,11 +158,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(ClassName.ACTIVE);
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
$(active).removeClass(CLASS_NAME_ACTIVE);
var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName.ACTIVE);
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@@ -178,7 +170,7 @@
}
}
$(element).addClass(ClassName.ACTIVE);
$(element).addClass(CLASS_NAME_ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
@@ -186,16 +178,16 @@
Util.reflow(element);
if (element.classList.contains(ClassName.FADE)) {
element.classList.add(ClassName.SHOW);
if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(CLASS_NAME_SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0];
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(ClassName.ACTIVE);
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
}
element.setAttribute('aria-expanded', true);
@@ -243,7 +235,7 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap toast.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap toast.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,8 +9,8 @@
(global = global || self, global.Toast = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -84,23 +84,19 @@
*/
var NAME = 'toast';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY
};
var ClassName = {
FADE: 'fade',
HIDE: 'hide',
SHOW: 'show',
SHOWING: 'showing'
};
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_HIDE = 'hide';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_SHOWING = 'showing';
var DefaultType = {
animation: 'boolean',
autohide: 'boolean',
@@ -111,18 +107,14 @@
autohide: true,
delay: 500
};
var Selector = {
DATA_DISMISS: '[data-dismiss="toast"]'
};
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Toast =
/*#__PURE__*/
function () {
var Toast = /*#__PURE__*/function () {
function Toast(element, config) {
this._element = element;
this._config = this._getConfig(config);
@@ -138,7 +130,7 @@
_proto.show = function show() {
var _this = this;
var showEvent = $.Event(Event.SHOW);
var showEvent = $.Event(EVENT_SHOW);
$(this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
@@ -146,15 +138,15 @@
}
if (this._config.animation) {
this._element.classList.add(ClassName.FADE);
this._element.classList.add(CLASS_NAME_FADE);
}
var complete = function complete() {
_this._element.classList.remove(ClassName.SHOWING);
_this._element.classList.remove(CLASS_NAME_SHOWING);
_this._element.classList.add(ClassName.SHOW);
_this._element.classList.add(CLASS_NAME_SHOW);
$(_this._element).trigger(Event.SHOWN);
$(_this._element).trigger(EVENT_SHOWN);
if (_this._config.autohide) {
_this._timeout = setTimeout(function () {
@@ -163,11 +155,11 @@
}
};
this._element.classList.remove(ClassName.HIDE);
this._element.classList.remove(CLASS_NAME_HIDE);
Util.reflow(this._element);
this._element.classList.add(ClassName.SHOWING);
this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -178,11 +170,11 @@
};
_proto.hide = function hide() {
if (!this._element.classList.contains(ClassName.SHOW)) {
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
var hideEvent = $.Event(Event.HIDE);
var hideEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
@@ -196,11 +188,11 @@
clearTimeout(this._timeout);
this._timeout = null;
if (this._element.classList.contains(ClassName.SHOW)) {
this._element.classList.remove(ClassName.SHOW);
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW);
}
$(this._element).off(Event.CLICK_DISMISS);
$(this._element).off(EVENT_CLICK_DISMISS);
$.removeData(this._element, DATA_KEY);
this._element = null;
this._config = null;
@@ -208,7 +200,7 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2({}, Default, {}, $(this._element).data(), {}, typeof config === 'object' && config ? config : {});
config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this._element).data()), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
@@ -216,7 +208,7 @@
_proto._setListeners = function _setListeners() {
var _this2 = this;
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
return _this2.hide();
});
};
@@ -225,12 +217,12 @@
var _this3 = this;
var complete = function complete() {
_this3._element.classList.add(ClassName.HIDE);
_this3._element.classList.add(CLASS_NAME_HIDE);
$(_this3._element).trigger(Event.HIDDEN);
$(_this3._element).trigger(EVENT_HIDDEN);
};
this._element.classList.remove(ClassName.SHOW);
this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap tooltip.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap tooltip.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,9 +9,9 @@
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
}(this, (function ($, Popper, Util) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -80,7 +80,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): tools/sanitizer.js
* Bootstrap (v4.5.0): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -105,7 +105,7 @@
h5: [],
h6: [],
i: [],
img: ['src', 'alt', 'title', 'width', 'height'],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
@@ -125,14 +125,14 @@
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
@@ -149,7 +149,7 @@
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
for (var i = 0, len = regExp.length; i < len; i++) {
if (attrName.match(regExp[i])) {
return true;
}
@@ -206,7 +206,7 @@
*/
var NAME = 'tooltip';
var VERSION = '4.4.1';
var VERSION = '4.5.0';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -256,10 +256,8 @@
whiteList: DefaultWhitelist,
popperConfig: null
};
var HoverState = {
SHOW: 'show',
OUT: 'out'
};
var HOVER_STATE_SHOW = 'show';
var HOVER_STATE_OUT = 'out';
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@@ -272,30 +270,21 @@
MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY
};
var ClassName = {
FADE: 'fade',
SHOW: 'show'
};
var Selector = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
};
var Trigger = {
HOVER: 'hover',
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
};
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
var SELECTOR_ARROW = '.arrow';
var TRIGGER_HOVER = 'hover';
var TRIGGER_FOCUS = 'focus';
var TRIGGER_CLICK = 'click';
var TRIGGER_MANUAL = 'manual';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Tooltip =
/*#__PURE__*/
function () {
var Tooltip = /*#__PURE__*/function () {
function Tooltip(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
@@ -353,7 +342,7 @@
context._leave(null, context);
}
} else {
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
this._leave(null, this);
return;
@@ -413,7 +402,7 @@
this.setContent();
if (this.config.animation) {
$(tip).addClass(ClassName.FADE);
$(tip).addClass(CLASS_NAME_FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@@ -432,7 +421,7 @@
$(this.element).trigger(this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
$(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
@@ -450,12 +439,12 @@
_this._hoverState = null;
$(_this.element).trigger(_this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
if (prevHoverState === HOVER_STATE_OUT) {
_this._leave(null, _this);
}
};
if ($(this.tip).hasClass(ClassName.FADE)) {
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
@@ -471,7 +460,7 @@
var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip);
}
@@ -496,18 +485,18 @@
return;
}
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
$(tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
}
this._activeTrigger[Trigger.CLICK] = false;
this._activeTrigger[Trigger.FOCUS] = false;
this._activeTrigger[Trigger.HOVER] = false;
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
if ($(this.tip).hasClass(ClassName.FADE)) {
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(tip);
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
@@ -539,8 +528,8 @@
_proto.setContent = function setContent() {
var tip = this.getTipElement();
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
@@ -590,7 +579,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector.ARROW
element: SELECTOR_ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
@@ -605,7 +594,7 @@
return _this3._handlePopperPlacementChange(data);
}
};
return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);
return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig);
};
_proto._getOffset = function _getOffset() {
@@ -615,7 +604,7 @@
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
return data;
};
} else {
@@ -650,9 +639,9 @@
$(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
return _this5.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
} else if (trigger !== TRIGGER_MANUAL) {
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
$(_this5.element).on(eventIn, _this5.config.selector, function (event) {
return _this5._enter(event);
}).on(eventOut, _this5.config.selector, function (event) {
@@ -670,7 +659,7 @@
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
if (this.config.selector) {
this.config = _objectSpread2({}, this.config, {
this.config = _objectSpread2(_objectSpread2({}, this.config), {}, {
trigger: 'manual',
selector: ''
});
@@ -698,16 +687,16 @@
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
}
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW;
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW;
return;
}
clearTimeout(context._timeout);
context._hoverState = HoverState.SHOW;
context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) {
context.show();
@@ -715,7 +704,7 @@
}
context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.SHOW) {
if (context._hoverState === HOVER_STATE_SHOW) {
context.show();
}
}, context.config.delay.show);
@@ -731,7 +720,7 @@
}
if (event) {
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
}
if (context._isWithActiveTrigger()) {
@@ -739,7 +728,7 @@
}
clearTimeout(context._timeout);
context._hoverState = HoverState.OUT;
context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) {
context.hide();
@@ -747,7 +736,7 @@
}
context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.OUT) {
if (context._hoverState === HOVER_STATE_OUT) {
context.hide();
}
}, context.config.delay.hide);
@@ -770,7 +759,7 @@
delete dataAttributes[dataAttr];
}
});
config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -820,8 +809,7 @@
};
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
var popperInstance = popperData.instance;
this.tip = popperInstance.popper;
this.tip = popperData.instance.popper;
this._cleanTipClass();
@@ -836,7 +824,7 @@
return;
}
$(tip).removeClass(ClassName.FADE);
$(tip).removeClass(CLASS_NAME_FADE);
this.config.animation = false;
this.hide();
this.show();

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap util.js v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap util.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,11 +9,11 @@
(global = global || self, global.Util = factory(global.jQuery));
}(this, (function ($) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): util.js
* Bootstrap (v4.5.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -28,6 +28,10 @@
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
if (obj === null || typeof obj === 'undefined') {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}
@@ -40,7 +44,7 @@
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined; // eslint-disable-line no-undefined
return undefined;
}
};
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): alert.js
* Bootstrap (v4.5.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,27 +15,21 @@ import Util from './util'
*/
const NAME = 'alert'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Selector = {
DISMISS : '[data-dismiss="alert"]'
}
const SELECTOR_DISMISS = '[data-dismiss="alert"]'
const Event = {
CLOSE : `close${EVENT_KEY}`,
CLOSED : `closed${EVENT_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_CLOSE = `close${EVENT_KEY}`
const EVENT_CLOSED = `closed${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
ALERT : 'alert',
FADE : 'fade',
SHOW : 'show'
}
const CLASS_NAME_ALERT = 'alert'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
/**
* ------------------------------------------------------------------------
@@ -87,23 +81,23 @@ class Alert {
}
if (!parent) {
parent = $(element).closest(`.${ClassName.ALERT}`)[0]
parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]
}
return parent
}
_triggerCloseEvent(element) {
const closeEvent = $.Event(Event.CLOSE)
const closeEvent = $.Event(EVENT_CLOSE)
$(element).trigger(closeEvent)
return closeEvent
}
_removeElement(element) {
$(element).removeClass(ClassName.SHOW)
$(element).removeClass(CLASS_NAME_SHOW)
if (!$(element).hasClass(ClassName.FADE)) {
if (!$(element).hasClass(CLASS_NAME_FADE)) {
this._destroyElement(element)
return
}
@@ -118,7 +112,7 @@ class Alert {
_destroyElement(element) {
$(element)
.detach()
.trigger(Event.CLOSED)
.trigger(EVENT_CLOSED)
.remove()
}
@@ -158,8 +152,8 @@ class Alert {
*/
$(document).on(
Event.CLICK_DATA_API,
Selector.DISMISS,
EVENT_CLICK_DATA_API,
SELECTOR_DISMISS,
Alert._handleDismiss(new Alert())
)

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): button.js
* Bootstrap (v4.5.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14,34 +14,28 @@ import $ from 'jquery'
*/
const NAME = 'button'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ClassName = {
ACTIVE : 'active',
BUTTON : 'btn',
FOCUS : 'focus'
}
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_BUTTON = 'btn'
const CLASS_NAME_FOCUS = 'focus'
const Selector = {
DATA_TOGGLE_CARROT : '[data-toggle^="button"]',
DATA_TOGGLES : '[data-toggle="buttons"]',
DATA_TOGGLE : '[data-toggle="button"]',
DATA_TOGGLES_BUTTONS : '[data-toggle="buttons"] .btn',
INPUT : 'input:not([type="hidden"])',
ACTIVE : '.active',
BUTTON : '.btn'
}
const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'
const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'
const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'
const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'
const SELECTOR_INPUT = 'input:not([type="hidden"])'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_BUTTON = '.btn'
const Event = {
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,
FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` +
`blur${EVENT_KEY}${DATA_API_KEY}`,
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +
`blur${EVENT_KEY}${DATA_API_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
/**
* ------------------------------------------------------------------------
@@ -66,35 +60,31 @@ class Button {
let triggerChangeEvent = true
let addAriaPressed = true
const rootElement = $(this._element).closest(
Selector.DATA_TOGGLES
SELECTOR_DATA_TOGGLES
)[0]
if (rootElement) {
const input = this._element.querySelector(Selector.INPUT)
const input = this._element.querySelector(SELECTOR_INPUT)
if (input) {
if (input.type === 'radio') {
if (input.checked &&
this._element.classList.contains(ClassName.ACTIVE)) {
this._element.classList.contains(CLASS_NAME_ACTIVE)) {
triggerChangeEvent = false
} else {
const activeElement = rootElement.querySelector(Selector.ACTIVE)
const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)
if (activeElement) {
$(activeElement).removeClass(ClassName.ACTIVE)
$(activeElement).removeClass(CLASS_NAME_ACTIVE)
}
}
} else if (input.type === 'checkbox') {
if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName.ACTIVE)) {
triggerChangeEvent = false
}
} else {
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
triggerChangeEvent = false
}
if (triggerChangeEvent) {
input.checked = !this._element.classList.contains(ClassName.ACTIVE)
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
if (input.type === 'checkbox' || input.type === 'radio') {
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)
}
$(input).trigger('change')
}
@@ -106,11 +96,11 @@ class Button {
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
if (addAriaPressed) {
this._element.setAttribute('aria-pressed',
!this._element.classList.contains(ClassName.ACTIVE))
!this._element.classList.contains(CLASS_NAME_ACTIVE))
}
if (triggerChangeEvent) {
$(this._element).toggleClass(ClassName.ACTIVE)
$(this._element).toggleClass(CLASS_NAME_ACTIVE)
}
}
}
@@ -145,54 +135,58 @@ class Button {
*/
$(document)
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => {
let button = event.target
const initialButton = button
if (!$(button).hasClass(ClassName.BUTTON)) {
button = $(button).closest(Selector.BUTTON)[0]
if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
button = $(button).closest(SELECTOR_BUTTON)[0]
}
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
event.preventDefault() // work around Firefox bug #1540995
} else {
const inputBtn = button.querySelector(Selector.INPUT)
const inputBtn = button.querySelector(SELECTOR_INPUT)
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
event.preventDefault() // work around Firefox bug #1540995
return
}
if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') {
event.preventDefault() // work around event sent to label and input
}
Button._jQueryInterface.call($(button), 'toggle')
}
})
.on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
const button = $(event.target).closest(Selector.BUTTON)[0]
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))
.on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => {
const button = $(event.target).closest(SELECTOR_BUTTON)[0]
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))
})
$(window).on(Event.LOAD_DATA_API, () => {
$(window).on(EVENT_LOAD_DATA_API, () => {
// ensure correct active class is set to match the controls' actual values/states
// find all checkboxes/readio buttons inside data-toggle groups
let buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLES_BUTTONS))
let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS))
for (let i = 0, len = buttons.length; i < len; i++) {
const button = buttons[i]
const input = button.querySelector(Selector.INPUT)
const input = button.querySelector(SELECTOR_INPUT)
if (input.checked || input.hasAttribute('checked')) {
button.classList.add(ClassName.ACTIVE)
button.classList.add(CLASS_NAME_ACTIVE)
} else {
button.classList.remove(ClassName.ACTIVE)
button.classList.remove(CLASS_NAME_ACTIVE)
}
}
// find all button toggles
buttons = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
for (let i = 0, len = buttons.length; i < len; i++) {
const button = buttons[i]
if (button.getAttribute('aria-pressed') === 'true') {
button.classList.add(ClassName.ACTIVE)
button.classList.add(CLASS_NAME_ACTIVE)
} else {
button.classList.remove(ClassName.ACTIVE)
button.classList.remove(CLASS_NAME_ACTIVE)
}
}
})

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): carousel.js
* Bootstrap (v4.5.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'carousel'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -43,51 +43,42 @@ const DefaultType = {
touch : 'boolean'
}
const Direction = {
NEXT : 'next',
PREV : 'prev',
LEFT : 'left',
RIGHT : 'right'
}
const DIRECTION_NEXT = 'next'
const DIRECTION_PREV = 'prev'
const DIRECTION_LEFT = 'left'
const DIRECTION_RIGHT = 'right'
const Event = {
SLIDE : `slide${EVENT_KEY}`,
SLID : `slid${EVENT_KEY}`,
KEYDOWN : `keydown${EVENT_KEY}`,
MOUSEENTER : `mouseenter${EVENT_KEY}`,
MOUSELEAVE : `mouseleave${EVENT_KEY}`,
TOUCHSTART : `touchstart${EVENT_KEY}`,
TOUCHMOVE : `touchmove${EVENT_KEY}`,
TOUCHEND : `touchend${EVENT_KEY}`,
POINTERDOWN : `pointerdown${EVENT_KEY}`,
POINTERUP : `pointerup${EVENT_KEY}`,
DRAG_START : `dragstart${EVENT_KEY}`,
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_SLIDE = `slide${EVENT_KEY}`
const EVENT_SLID = `slid${EVENT_KEY}`
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`
const EVENT_TOUCHEND = `touchend${EVENT_KEY}`
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`
const EVENT_POINTERUP = `pointerup${EVENT_KEY}`
const EVENT_DRAG_START = `dragstart${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
CAROUSEL : 'carousel',
ACTIVE : 'active',
SLIDE : 'slide',
RIGHT : 'carousel-item-right',
LEFT : 'carousel-item-left',
NEXT : 'carousel-item-next',
PREV : 'carousel-item-prev',
ITEM : 'carousel-item',
POINTER_EVENT : 'pointer-event'
}
const CLASS_NAME_CAROUSEL = 'carousel'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_SLIDE = 'slide'
const CLASS_NAME_RIGHT = 'carousel-item-right'
const CLASS_NAME_LEFT = 'carousel-item-left'
const CLASS_NAME_NEXT = 'carousel-item-next'
const CLASS_NAME_PREV = 'carousel-item-prev'
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
const Selector = {
ACTIVE : '.active',
ACTIVE_ITEM : '.active.carousel-item',
ITEM : '.carousel-item',
ITEM_IMG : '.carousel-item img',
NEXT_PREV : '.carousel-item-next, .carousel-item-prev',
INDICATORS : '.carousel-indicators',
DATA_SLIDE : '[data-slide], [data-slide-to]',
DATA_RIDE : '[data-ride="carousel"]'
}
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item'
const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ITEM_IMG = '.carousel-item img'
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
const PointerType = {
TOUCH : 'touch',
@@ -112,7 +103,7 @@ class Carousel {
this._config = this._getConfig(config)
this._element = element
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS)
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
@@ -133,7 +124,7 @@ class Carousel {
next() {
if (!this._isSliding) {
this._slide(Direction.NEXT)
this._slide(DIRECTION_NEXT)
}
}
@@ -148,7 +139,7 @@ class Carousel {
prev() {
if (!this._isSliding) {
this._slide(Direction.PREV)
this._slide(DIRECTION_PREV)
}
}
@@ -157,7 +148,7 @@ class Carousel {
this._isPaused = true
}
if (this._element.querySelector(Selector.NEXT_PREV)) {
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
Util.triggerTransitionEnd(this._element)
this.cycle(true)
}
@@ -185,7 +176,7 @@ class Carousel {
}
to(index) {
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM)
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
const activeIndex = this._getItemIndex(this._activeElement)
@@ -194,7 +185,7 @@ class Carousel {
}
if (this._isSliding) {
$(this._element).one(Event.SLID, () => this.to(index))
$(this._element).one(EVENT_SLID, () => this.to(index))
return
}
@@ -205,8 +196,8 @@ class Carousel {
}
const direction = index > activeIndex
? Direction.NEXT
: Direction.PREV
? DIRECTION_NEXT
: DIRECTION_PREV
this._slide(direction, this._items[index])
}
@@ -260,14 +251,13 @@ class Carousel {
_addEventListeners() {
if (this._config.keyboard) {
$(this._element)
.on(Event.KEYDOWN, (event) => this._keydown(event))
$(this._element).on(EVENT_KEYDOWN, (event) => this._keydown(event))
}
if (this._config.pause === 'hover') {
$(this._element)
.on(Event.MOUSEENTER, (event) => this.pause(event))
.on(Event.MOUSELEAVE, (event) => this.cycle(event))
.on(EVENT_MOUSEENTER, (event) => this.pause(event))
.on(EVENT_MOUSELEAVE, (event) => this.cycle(event))
}
if (this._config.touch) {
@@ -320,16 +310,18 @@ class Carousel {
}
}
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, (e) => e.preventDefault())
if (this._pointerEvent) {
$(this._element).on(Event.POINTERDOWN, (event) => start(event))
$(this._element).on(Event.POINTERUP, (event) => end(event))
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG))
.on(EVENT_DRAG_START, (e) => e.preventDefault())
this._element.classList.add(ClassName.POINTER_EVENT)
if (this._pointerEvent) {
$(this._element).on(EVENT_POINTERDOWN, (event) => start(event))
$(this._element).on(EVENT_POINTERUP, (event) => end(event))
this._element.classList.add(CLASS_NAME_POINTER_EVENT)
} else {
$(this._element).on(Event.TOUCHSTART, (event) => start(event))
$(this._element).on(Event.TOUCHMOVE, (event) => move(event))
$(this._element).on(Event.TOUCHEND, (event) => end(event))
$(this._element).on(EVENT_TOUCHSTART, (event) => start(event))
$(this._element).on(EVENT_TOUCHMOVE, (event) => move(event))
$(this._element).on(EVENT_TOUCHEND, (event) => end(event))
}
}
@@ -353,14 +345,14 @@ class Carousel {
_getItemIndex(element) {
this._items = element && element.parentNode
? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM))
? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM))
: []
return this._items.indexOf(element)
}
_getItemByDirection(direction, activeElement) {
const isNextDirection = direction === Direction.NEXT
const isPrevDirection = direction === Direction.PREV
const isNextDirection = direction === DIRECTION_NEXT
const isPrevDirection = direction === DIRECTION_PREV
const activeIndex = this._getItemIndex(activeElement)
const lastItemIndex = this._items.length - 1
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
@@ -370,7 +362,7 @@ class Carousel {
return activeElement
}
const delta = direction === Direction.PREV ? -1 : 1
const delta = direction === DIRECTION_PREV ? -1 : 1
const itemIndex = (activeIndex + delta) % this._items.length
return itemIndex === -1
@@ -379,8 +371,8 @@ class Carousel {
_triggerSlideEvent(relatedTarget, eventDirectionName) {
const targetIndex = this._getItemIndex(relatedTarget)
const fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM))
const slideEvent = $.Event(Event.SLIDE, {
const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM))
const slideEvent = $.Event(EVENT_SLIDE, {
relatedTarget,
direction: eventDirectionName,
from: fromIndex,
@@ -394,22 +386,21 @@ class Carousel {
_setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE))
$(indicators)
.removeClass(ClassName.ACTIVE)
const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE))
$(indicators).removeClass(CLASS_NAME_ACTIVE)
const nextIndicator = this._indicatorsElement.children[
this._getItemIndex(element)
]
if (nextIndicator) {
$(nextIndicator).addClass(ClassName.ACTIVE)
$(nextIndicator).addClass(CLASS_NAME_ACTIVE)
}
}
}
_slide(direction, element) {
const activeElement = this._element.querySelector(Selector.ACTIVE_ITEM)
const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
const activeElementIndex = this._getItemIndex(activeElement)
const nextElement = element || activeElement &&
this._getItemByDirection(direction, activeElement)
@@ -420,17 +411,17 @@ class Carousel {
let orderClassName
let eventDirectionName
if (direction === Direction.NEXT) {
directionalClassName = ClassName.LEFT
orderClassName = ClassName.NEXT
eventDirectionName = Direction.LEFT
if (direction === DIRECTION_NEXT) {
directionalClassName = CLASS_NAME_LEFT
orderClassName = CLASS_NAME_NEXT
eventDirectionName = DIRECTION_LEFT
} else {
directionalClassName = ClassName.RIGHT
orderClassName = ClassName.PREV
eventDirectionName = Direction.RIGHT
directionalClassName = CLASS_NAME_RIGHT
orderClassName = CLASS_NAME_PREV
eventDirectionName = DIRECTION_RIGHT
}
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
this._isSliding = false
return
}
@@ -453,14 +444,14 @@ class Carousel {
this._setActiveIndicatorElement(nextElement)
const slidEvent = $.Event(Event.SLID, {
const slidEvent = $.Event(EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
})
if ($(this._element).hasClass(ClassName.SLIDE)) {
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
$(nextElement).addClass(orderClassName)
Util.reflow(nextElement)
@@ -482,9 +473,9 @@ class Carousel {
.one(Util.TRANSITION_END, () => {
$(nextElement)
.removeClass(`${directionalClassName} ${orderClassName}`)
.addClass(ClassName.ACTIVE)
.addClass(CLASS_NAME_ACTIVE)
$(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`)
$(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`)
this._isSliding = false
@@ -492,8 +483,8 @@ class Carousel {
})
.emulateTransitionEnd(transitionDuration)
} else {
$(activeElement).removeClass(ClassName.ACTIVE)
$(nextElement).addClass(ClassName.ACTIVE)
$(activeElement).removeClass(CLASS_NAME_ACTIVE)
$(nextElement).addClass(CLASS_NAME_ACTIVE)
this._isSliding = false
$(this._element).trigger(slidEvent)
@@ -551,7 +542,7 @@ class Carousel {
const target = $(selector)[0]
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
return
}
@@ -581,11 +572,10 @@ class Carousel {
* ------------------------------------------------------------------------
*/
$(document)
.on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)
$(window).on(Event.LOAD_DATA_API, () => {
const carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE))
$(window).on(EVENT_LOAD_DATA_API, () => {
const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE))
for (let i = 0, len = carousels.length; i < len; i++) {
const $carousel = $(carousels[i])
Carousel._jQueryInterface.call($carousel, $carousel.data())

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): collapse.js
* Bootstrap (v4.5.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'collapse'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -31,30 +31,22 @@ const DefaultType = {
parent : '(string|element)'
}
const Event = {
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`,
HIDE : `hide${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
SHOW : 'show',
COLLAPSE : 'collapse',
COLLAPSING : 'collapsing',
COLLAPSED : 'collapsed'
}
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
const Dimension = {
WIDTH : 'width',
HEIGHT : 'height'
}
const DIMENSION_WIDTH = 'width'
const DIMENSION_HEIGHT = 'height'
const Selector = {
ACTIVES : '.show, .collapsing',
DATA_TOGGLE : '[data-toggle="collapse"]'
}
const SELECTOR_ACTIVES = '.show, .collapsing'
const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
/**
* ------------------------------------------------------------------------
@@ -72,7 +64,7 @@ class Collapse {
`[data-toggle="collapse"][data-target="#${element.id}"]`
))
const toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))
const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
for (let i = 0, len = toggleList.length; i < len; i++) {
const elem = toggleList[i]
const selector = Util.getSelectorFromElement(elem)
@@ -109,7 +101,7 @@ class Collapse {
// Public
toggle() {
if ($(this._element).hasClass(ClassName.SHOW)) {
if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
this.hide()
} else {
this.show()
@@ -118,7 +110,7 @@ class Collapse {
show() {
if (this._isTransitioning ||
$(this._element).hasClass(ClassName.SHOW)) {
$(this._element).hasClass(CLASS_NAME_SHOW)) {
return
}
@@ -126,13 +118,13 @@ class Collapse {
let activesData
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES))
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))
.filter((elem) => {
if (typeof this._config.parent === 'string') {
return elem.getAttribute('data-parent') === this._config.parent
}
return elem.classList.contains(ClassName.COLLAPSE)
return elem.classList.contains(CLASS_NAME_COLLAPSE)
})
if (actives.length === 0) {
@@ -147,7 +139,7 @@ class Collapse {
}
}
const startEvent = $.Event(Event.SHOW)
const startEvent = $.Event(EVENT_SHOW)
$(this._element).trigger(startEvent)
if (startEvent.isDefaultPrevented()) {
return
@@ -163,14 +155,14 @@ class Collapse {
const dimension = this._getDimension()
$(this._element)
.removeClass(ClassName.COLLAPSE)
.addClass(ClassName.COLLAPSING)
.removeClass(CLASS_NAME_COLLAPSE)
.addClass(CLASS_NAME_COLLAPSING)
this._element.style[dimension] = 0
if (this._triggerArray.length) {
$(this._triggerArray)
.removeClass(ClassName.COLLAPSED)
.removeClass(CLASS_NAME_COLLAPSED)
.attr('aria-expanded', true)
}
@@ -178,15 +170,14 @@ class Collapse {
const complete = () => {
$(this._element)
.removeClass(ClassName.COLLAPSING)
.addClass(ClassName.COLLAPSE)
.addClass(ClassName.SHOW)
.removeClass(CLASS_NAME_COLLAPSING)
.addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
this._element.style[dimension] = ''
this.setTransitioning(false)
$(this._element).trigger(Event.SHOWN)
$(this._element).trigger(EVENT_SHOWN)
}
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
@@ -202,11 +193,11 @@ class Collapse {
hide() {
if (this._isTransitioning ||
!$(this._element).hasClass(ClassName.SHOW)) {
!$(this._element).hasClass(CLASS_NAME_SHOW)) {
return
}
const startEvent = $.Event(Event.HIDE)
const startEvent = $.Event(EVENT_HIDE)
$(this._element).trigger(startEvent)
if (startEvent.isDefaultPrevented()) {
return
@@ -219,9 +210,8 @@ class Collapse {
Util.reflow(this._element)
$(this._element)
.addClass(ClassName.COLLAPSING)
.removeClass(ClassName.COLLAPSE)
.removeClass(ClassName.SHOW)
.addClass(CLASS_NAME_COLLAPSING)
.removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
const triggerArrayLength = this._triggerArray.length
if (triggerArrayLength > 0) {
@@ -231,8 +221,8 @@ class Collapse {
if (selector !== null) {
const $elem = $([].slice.call(document.querySelectorAll(selector)))
if (!$elem.hasClass(ClassName.SHOW)) {
$(trigger).addClass(ClassName.COLLAPSED)
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
$(trigger).addClass(CLASS_NAME_COLLAPSED)
.attr('aria-expanded', false)
}
}
@@ -244,9 +234,9 @@ class Collapse {
const complete = () => {
this.setTransitioning(false)
$(this._element)
.removeClass(ClassName.COLLAPSING)
.addClass(ClassName.COLLAPSE)
.trigger(Event.HIDDEN)
.removeClass(CLASS_NAME_COLLAPSING)
.addClass(CLASS_NAME_COLLAPSE)
.trigger(EVENT_HIDDEN)
}
this._element.style[dimension] = ''
@@ -284,8 +274,8 @@ class Collapse {
}
_getDimension() {
const hasWidth = $(this._element).hasClass(Dimension.WIDTH)
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT
const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH)
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT
}
_getParent() {
@@ -302,10 +292,9 @@ class Collapse {
parent = document.querySelector(this._config.parent)
}
const selector =
`[data-toggle="collapse"][data-parent="${this._config.parent}"]`
const selector = `[data-toggle="collapse"][data-parent="${this._config.parent}"]`
const children = [].slice.call(parent.querySelectorAll(selector))
$(children).each((i, element) => {
this._addAriaAndCollapsedClass(
Collapse._getTargetFromElement(element),
@@ -317,11 +306,11 @@ class Collapse {
}
_addAriaAndCollapsedClass(element, triggerArray) {
const isOpen = $(element).hasClass(ClassName.SHOW)
const isOpen = $(element).hasClass(CLASS_NAME_SHOW)
if (triggerArray.length) {
$(triggerArray)
.toggleClass(ClassName.COLLAPSED, !isOpen)
.toggleClass(CLASS_NAME_COLLAPSED, !isOpen)
.attr('aria-expanded', isOpen)
}
}
@@ -343,7 +332,7 @@ class Collapse {
...typeof config === 'object' && config ? config : {}
}
if (!data && _config.toggle && /show|hide/.test(config)) {
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false
}
@@ -368,7 +357,7 @@ class Collapse {
* ------------------------------------------------------------------------
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
event.preventDefault()

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): dropdown.js
* Bootstrap (v4.5.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,7 +16,7 @@ import Util from './util'
*/
const NAME = 'dropdown'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -29,46 +29,35 @@ const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow
const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)
const Event = {
HIDE : `hide${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`,
CLICK : `click${EVENT_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,
KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`,
KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_CLICK = `click${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
DISABLED : 'disabled',
SHOW : 'show',
DROPUP : 'dropup',
DROPRIGHT : 'dropright',
DROPLEFT : 'dropleft',
MENURIGHT : 'dropdown-menu-right',
MENULEFT : 'dropdown-menu-left',
POSITION_STATIC : 'position-static'
}
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_DROPUP = 'dropup'
const CLASS_NAME_DROPRIGHT = 'dropright'
const CLASS_NAME_DROPLEFT = 'dropleft'
const CLASS_NAME_MENURIGHT = 'dropdown-menu-right'
const CLASS_NAME_POSITION_STATIC = 'position-static'
const Selector = {
DATA_TOGGLE : '[data-toggle="dropdown"]',
FORM_CHILD : '.dropdown form',
MENU : '.dropdown-menu',
NAVBAR_NAV : '.navbar-nav',
VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
}
const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'
const SELECTOR_FORM_CHILD = '.dropdown form'
const SELECTOR_MENU = '.dropdown-menu'
const SELECTOR_NAVBAR_NAV = '.navbar-nav'
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
const AttachmentMap = {
TOP : 'top-start',
TOPEND : 'top-end',
BOTTOM : 'bottom-start',
BOTTOMEND : 'bottom-end',
RIGHT : 'right-start',
RIGHTEND : 'right-end',
LEFT : 'left-start',
LEFTEND : 'left-end'
}
const PLACEMENT_TOP = 'top-start'
const PLACEMENT_TOPEND = 'top-end'
const PLACEMENT_BOTTOM = 'bottom-start'
const PLACEMENT_BOTTOMEND = 'bottom-end'
const PLACEMENT_RIGHT = 'right-start'
const PLACEMENT_LEFT = 'left-start'
const Default = {
offset : 0,
@@ -122,11 +111,11 @@ class Dropdown {
// Public
toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
return
}
const isActive = $(this._menu).hasClass(ClassName.SHOW)
const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW)
Dropdown._clearMenus()
@@ -138,14 +127,14 @@ class Dropdown {
}
show(usePopper = false) {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
return
}
const relatedTarget = {
relatedTarget: this._element
}
const showEvent = $.Event(Event.SHOW, relatedTarget)
const showEvent = $.Event(EVENT_SHOW, relatedTarget)
const parent = Dropdown._getParentFromElement(this._element)
$(parent).trigger(showEvent)
@@ -181,7 +170,7 @@ class Dropdown {
// to allow the menu to "escape" the scroll parent's boundaries
// https://github.com/twbs/bootstrap/issues/24251
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName.POSITION_STATIC)
$(parent).addClass(CLASS_NAME_POSITION_STATIC)
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())
}
@@ -191,28 +180,28 @@ class Dropdown {
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement &&
$(parent).closest(Selector.NAVBAR_NAV).length === 0) {
$(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop)
}
this._element.focus()
this._element.setAttribute('aria-expanded', true)
$(this._menu).toggleClass(ClassName.SHOW)
$(this._menu).toggleClass(CLASS_NAME_SHOW)
$(parent)
.toggleClass(ClassName.SHOW)
.trigger($.Event(Event.SHOWN, relatedTarget))
.toggleClass(CLASS_NAME_SHOW)
.trigger($.Event(EVENT_SHOWN, relatedTarget))
}
hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
return
}
const relatedTarget = {
relatedTarget: this._element
}
const hideEvent = $.Event(Event.HIDE, relatedTarget)
const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
const parent = Dropdown._getParentFromElement(this._element)
$(parent).trigger(hideEvent)
@@ -225,10 +214,10 @@ class Dropdown {
this._popper.destroy()
}
$(this._menu).toggleClass(ClassName.SHOW)
$(this._menu).toggleClass(CLASS_NAME_SHOW)
$(parent)
.toggleClass(ClassName.SHOW)
.trigger($.Event(Event.HIDDEN, relatedTarget))
.toggleClass(CLASS_NAME_SHOW)
.trigger($.Event(EVENT_HIDDEN, relatedTarget))
}
dispose() {
@@ -252,7 +241,7 @@ class Dropdown {
// Private
_addEventListeners() {
$(this._element).on(Event.CLICK, (event) => {
$(this._element).on(EVENT_CLICK, (event) => {
event.preventDefault()
event.stopPropagation()
this.toggle()
@@ -280,7 +269,7 @@ class Dropdown {
const parent = Dropdown._getParentFromElement(this._element)
if (parent) {
this._menu = parent.querySelector(Selector.MENU)
this._menu = parent.querySelector(SELECTOR_MENU)
}
}
return this._menu
@@ -288,20 +277,19 @@ class Dropdown {
_getPlacement() {
const $parentDropdown = $(this._element.parentNode)
let placement = AttachmentMap.BOTTOM
let placement = PLACEMENT_BOTTOM
// Handle dropup
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
placement = AttachmentMap.TOP
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND
}
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT)
? PLACEMENT_TOPEND
: PLACEMENT_TOP
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
placement = PLACEMENT_LEFT
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND
}
return placement
}
@@ -383,7 +371,7 @@ class Dropdown {
return
}
const toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))
const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
for (let i = 0, len = toggles.length; i < len; i++) {
const parent = Dropdown._getParentFromElement(toggles[i])
@@ -401,7 +389,7 @@ class Dropdown {
}
const dropdownMenu = context._menu
if (!$(parent).hasClass(ClassName.SHOW)) {
if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
continue
}
@@ -411,7 +399,7 @@ class Dropdown {
continue
}
const hideEvent = $.Event(Event.HIDE, relatedTarget)
const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
$(parent).trigger(hideEvent)
if (hideEvent.isDefaultPrevented()) {
continue
@@ -429,10 +417,10 @@ class Dropdown {
context._popper.destroy()
}
$(dropdownMenu).removeClass(ClassName.SHOW)
$(dropdownMenu).removeClass(CLASS_NAME_SHOW)
$(parent)
.removeClass(ClassName.SHOW)
.trigger($.Event(Event.HIDDEN, relatedTarget))
.removeClass(CLASS_NAME_SHOW)
.trigger($.Event(EVENT_HIDDEN, relatedTarget))
}
}
@@ -459,35 +447,34 @@ class Dropdown {
if (/input|textarea/i.test(event.target.tagName)
? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&
(event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||
$(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
$(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
return
}
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
return
}
const parent = Dropdown._getParentFromElement(this)
const isActive = $(parent).hasClass(CLASS_NAME_SHOW)
if (!isActive && event.which === ESCAPE_KEYCODE) {
return
}
event.preventDefault()
event.stopPropagation()
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
return
}
const parent = Dropdown._getParentFromElement(this)
const isActive = $(parent).hasClass(ClassName.SHOW)
if (!isActive && event.which === ESCAPE_KEYCODE) {
return
}
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
const toggle = parent.querySelector(Selector.DATA_TOGGLE)
$(toggle).trigger('focus')
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')
}
$(this).trigger('click')
return
}
const items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS))
const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))
.filter((item) => $(item).is(':visible'))
if (items.length === 0) {
@@ -519,15 +506,15 @@ class Dropdown {
*/
$(document)
.on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)
.on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler)
.on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus)
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler)
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler)
.on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus)
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault()
event.stopPropagation()
Dropdown._jQueryInterface.call($(this), 'toggle')
})
.on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {
.on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, (e) => {
e.stopPropagation()
})
@@ -544,5 +531,4 @@ $.fn[NAME].noConflict = () => {
return Dropdown._jQueryInterface
}
export default Dropdown

View File

@@ -13,7 +13,7 @@ import Util from './util'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): index.js
* Bootstrap (v4.5.0): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): modal.js
* Bootstrap (v4.5.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'modal'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -36,39 +36,33 @@ const DefaultType = {
show : 'boolean'
}
const Event = {
HIDE : `hide${EVENT_KEY}`,
HIDE_PREVENTED : `hidePrevented${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`,
FOCUSIN : `focusin${EVENT_KEY}`,
RESIZE : `resize${EVENT_KEY}`,
CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,
KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,
MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,
MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
const EVENT_RESIZE = `resize${EVENT_KEY}`
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
SCROLLABLE : 'modal-dialog-scrollable',
SCROLLBAR_MEASURER : 'modal-scrollbar-measure',
BACKDROP : 'modal-backdrop',
OPEN : 'modal-open',
FADE : 'fade',
SHOW : 'show',
STATIC : 'modal-static'
}
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_OPEN = 'modal-open'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_STATIC = 'modal-static'
const Selector = {
DIALOG : '.modal-dialog',
MODAL_BODY : '.modal-body',
DATA_TOGGLE : '[data-toggle="modal"]',
DATA_DISMISS : '[data-dismiss="modal"]',
FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT : '.sticky-top'
}
const SELECTOR_DIALOG = '.modal-dialog'
const SELECTOR_MODAL_BODY = '.modal-body'
const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'
const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
const SELECTOR_STICKY_CONTENT = '.sticky-top'
/**
* ------------------------------------------------------------------------
@@ -80,7 +74,7 @@ class Modal {
constructor(element, config) {
this._config = this._getConfig(config)
this._element = element
this._dialog = element.querySelector(Selector.DIALOG)
this._dialog = element.querySelector(SELECTOR_DIALOG)
this._backdrop = null
this._isShown = false
this._isBodyOverflowing = false
@@ -110,11 +104,11 @@ class Modal {
return
}
if ($(this._element).hasClass(ClassName.FADE)) {
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true
}
const showEvent = $.Event(Event.SHOW, {
const showEvent = $.Event(EVENT_SHOW, {
relatedTarget
})
@@ -135,13 +129,13 @@ class Modal {
this._setResizeEvent()
$(this._element).on(
Event.CLICK_DISMISS,
Selector.DATA_DISMISS,
EVENT_CLICK_DISMISS,
SELECTOR_DATA_DISMISS,
(event) => this.hide(event)
)
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {
$(this._element).one(Event.MOUSEUP_DISMISS, (event) => {
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {
$(this._element).one(EVENT_MOUSEUP_DISMISS, (event) => {
if ($(event.target).is(this._element)) {
this._ignoreBackdropClick = true
}
@@ -160,7 +154,7 @@ class Modal {
return
}
const hideEvent = $.Event(Event.HIDE)
const hideEvent = $.Event(EVENT_HIDE)
$(this._element).trigger(hideEvent)
@@ -169,7 +163,7 @@ class Modal {
}
this._isShown = false
const transition = $(this._element).hasClass(ClassName.FADE)
const transition = $(this._element).hasClass(CLASS_NAME_FADE)
if (transition) {
this._isTransitioning = true
@@ -178,13 +172,12 @@ class Modal {
this._setEscapeEvent()
this._setResizeEvent()
$(document).off(Event.FOCUSIN)
$(document).off(EVENT_FOCUSIN)
$(this._element).removeClass(ClassName.SHOW)
$(this._element).off(Event.CLICK_DISMISS)
$(this._dialog).off(Event.MOUSEDOWN_DISMISS)
$(this._element).removeClass(CLASS_NAME_SHOW)
$(this._element).off(EVENT_CLICK_DISMISS)
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)
if (transition) {
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
@@ -202,11 +195,11 @@ class Modal {
.forEach((htmlElement) => $(htmlElement).off(EVENT_KEY))
/**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `Event.CLICK_DATA_API` event that should remain
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
$(document).off(Event.FOCUSIN)
$(document).off(EVENT_FOCUSIN)
$.removeData(this._element, DATA_KEY)
@@ -238,19 +231,19 @@ class Modal {
_triggerBackdropTransition() {
if (this._config.backdrop === 'static') {
const hideEventPrevented = $.Event(Event.HIDE_PREVENTED)
const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
$(this._element).trigger(hideEventPrevented)
if (hideEventPrevented.defaultPrevented) {
return
}
this._element.classList.add(ClassName.STATIC)
this._element.classList.add(CLASS_NAME_STATIC)
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._element)
$(this._element).one(Util.TRANSITION_END, () => {
this._element.classList.remove(ClassName.STATIC)
this._element.classList.remove(CLASS_NAME_STATIC)
})
.emulateTransitionEnd(modalTransitionDuration)
this._element.focus()
@@ -260,8 +253,8 @@ class Modal {
}
_showElement(relatedTarget) {
const transition = $(this._element).hasClass(ClassName.FADE)
const modalBody = this._dialog ? this._dialog.querySelector(Selector.MODAL_BODY) : null
const transition = $(this._element).hasClass(CLASS_NAME_FADE)
const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null
if (!this._element.parentNode ||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
@@ -273,7 +266,7 @@ class Modal {
this._element.removeAttribute('aria-hidden')
this._element.setAttribute('aria-modal', true)
if ($(this._dialog).hasClass(ClassName.SCROLLABLE) && modalBody) {
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0
} else {
this._element.scrollTop = 0
@@ -283,13 +276,13 @@ class Modal {
Util.reflow(this._element)
}
$(this._element).addClass(ClassName.SHOW)
$(this._element).addClass(CLASS_NAME_SHOW)
if (this._config.focus) {
this._enforceFocus()
}
const shownEvent = $.Event(Event.SHOWN, {
const shownEvent = $.Event(EVENT_SHOWN, {
relatedTarget
})
@@ -314,8 +307,8 @@ class Modal {
_enforceFocus() {
$(document)
.off(Event.FOCUSIN) // Guard against infinite focus loop
.on(Event.FOCUSIN, (event) => {
.off(EVENT_FOCUSIN) // Guard against infinite focus loop
.on(EVENT_FOCUSIN, (event) => {
if (document !== event.target &&
this._element !== event.target &&
$(this._element).has(event.target).length === 0) {
@@ -325,22 +318,25 @@ class Modal {
}
_setEscapeEvent() {
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
if (event.which === ESCAPE_KEYCODE) {
if (this._isShown) {
$(this._element).on(EVENT_KEYDOWN_DISMISS, (event) => {
if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault()
this.hide()
} else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) {
this._triggerBackdropTransition()
}
})
} else if (!this._isShown) {
$(this._element).off(Event.KEYDOWN_DISMISS)
$(this._element).off(EVENT_KEYDOWN_DISMISS)
}
}
_setResizeEvent() {
if (this._isShown) {
$(window).on(Event.RESIZE, (event) => this.handleUpdate(event))
$(window).on(EVENT_RESIZE, (event) => this.handleUpdate(event))
} else {
$(window).off(Event.RESIZE)
$(window).off(EVENT_RESIZE)
}
}
@@ -350,10 +346,10 @@ class Modal {
this._element.removeAttribute('aria-modal')
this._isTransitioning = false
this._showBackdrop(() => {
$(document.body).removeClass(ClassName.OPEN)
$(document.body).removeClass(CLASS_NAME_OPEN)
this._resetAdjustments()
this._resetScrollbar()
$(this._element).trigger(Event.HIDDEN)
$(this._element).trigger(EVENT_HIDDEN)
})
}
@@ -365,12 +361,12 @@ class Modal {
}
_showBackdrop(callback) {
const animate = $(this._element).hasClass(ClassName.FADE)
? ClassName.FADE : ''
const animate = $(this._element).hasClass(CLASS_NAME_FADE)
? CLASS_NAME_FADE : ''
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div')
this._backdrop.className = ClassName.BACKDROP
this._backdrop.className = CLASS_NAME_BACKDROP
if (animate) {
this._backdrop.classList.add(animate)
@@ -378,7 +374,7 @@ class Modal {
$(this._backdrop).appendTo(document.body)
$(this._element).on(Event.CLICK_DISMISS, (event) => {
$(this._element).on(EVENT_CLICK_DISMISS, (event) => {
if (this._ignoreBackdropClick) {
this._ignoreBackdropClick = false
return
@@ -394,7 +390,7 @@ class Modal {
Util.reflow(this._backdrop)
}
$(this._backdrop).addClass(ClassName.SHOW)
$(this._backdrop).addClass(CLASS_NAME_SHOW)
if (!callback) {
return
@@ -411,7 +407,7 @@ class Modal {
.one(Util.TRANSITION_END, callback)
.emulateTransitionEnd(backdropTransitionDuration)
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.SHOW)
$(this._backdrop).removeClass(CLASS_NAME_SHOW)
const callbackRemove = () => {
this._removeBackdrop()
@@ -420,7 +416,7 @@ class Modal {
}
}
if ($(this._element).hasClass(ClassName.FADE)) {
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
$(this._backdrop)
@@ -459,7 +455,7 @@ class Modal {
_checkScrollbar() {
const rect = document.body.getBoundingClientRect()
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth
this._scrollbarWidth = this._getScrollbarWidth()
}
@@ -467,8 +463,8 @@ class Modal {
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT))
const stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT))
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT))
// Adjust fixed content padding
$(fixedContent).each((index, element) => {
@@ -496,12 +492,12 @@ class Modal {
.css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
}
$(document.body).addClass(ClassName.OPEN)
$(document.body).addClass(CLASS_NAME_OPEN)
}
_resetScrollbar() {
// Restore fixed content padding
const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT))
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
$(fixedContent).each((index, element) => {
const padding = $(element).data('padding-right')
$(element).removeData('padding-right')
@@ -509,7 +505,7 @@ class Modal {
})
// Restore sticky content
const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}`))
const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`))
$(elements).each((index, element) => {
const margin = $(element).data('margin-right')
if (typeof margin !== 'undefined') {
@@ -525,7 +521,7 @@ class Modal {
_getScrollbarWidth() { // thx d.walsh
const scrollDiv = document.createElement('div')
scrollDiv.className = ClassName.SCROLLBAR_MEASURER
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER
document.body.appendChild(scrollDiv)
const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth
document.body.removeChild(scrollDiv)
@@ -566,7 +562,7 @@ class Modal {
* ------------------------------------------------------------------------
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
let target
const selector = Util.getSelectorFromElement(this)
@@ -584,13 +580,13 @@ $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault()
}
const $target = $(target).one(Event.SHOW, (showEvent) => {
const $target = $(target).one(EVENT_SHOW, (showEvent) => {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
return
}
$target.one(Event.HIDDEN, () => {
$target.one(EVENT_HIDDEN, () => {
if ($(this).is(':visible')) {
this.focus()
}

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): popover.js
* Bootstrap (v4.5.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Tooltip from './tooltip'
*/
const NAME = 'popover'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
@@ -38,15 +38,11 @@ const DefaultType = {
content : '(string|element|function)'
}
const ClassName = {
FADE : 'fade',
SHOW : 'show'
}
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const Selector = {
TITLE : '.popover-header',
CONTENT : '.popover-body'
}
const SELECTOR_TITLE = '.popover-header'
const SELECTOR_CONTENT = '.popover-body'
const Event = {
HIDE : `hide${EVENT_KEY}`,
@@ -117,14 +113,14 @@ class Popover extends Tooltip {
const $tip = $(this.getTipElement())
// We use append for html objects to maintain js events
this.setElementContent($tip.find(Selector.TITLE), this.getTitle())
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())
let content = this._getContent()
if (typeof content === 'function') {
content = content.call(this.element)
}
this.setElementContent($tip.find(Selector.CONTENT), content)
this.setElementContent($tip.find(SELECTOR_CONTENT), content)
$tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)
$tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
}
// Private

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): scrollspy.js
* Bootstrap (v4.5.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'scrollspy'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -33,34 +33,24 @@ const DefaultType = {
target : '(string|element)'
}
const Event = {
ACTIVATE : `activate${EVENT_KEY}`,
SCROLL : `scroll${EVENT_KEY}`,
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_ACTIVATE = `activate${EVENT_KEY}`
const EVENT_SCROLL = `scroll${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
DROPDOWN_ITEM : 'dropdown-item',
DROPDOWN_MENU : 'dropdown-menu',
ACTIVE : 'active'
}
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'
const CLASS_NAME_ACTIVE = 'active'
const Selector = {
DATA_SPY : '[data-spy="scroll"]',
ACTIVE : '.active',
NAV_LIST_GROUP : '.nav, .list-group',
NAV_LINKS : '.nav-link',
NAV_ITEMS : '.nav-item',
LIST_ITEMS : '.list-group-item',
DROPDOWN : '.dropdown',
DROPDOWN_ITEMS : '.dropdown-item',
DROPDOWN_TOGGLE : '.dropdown-toggle'
}
const SELECTOR_DATA_SPY = '[data-spy="scroll"]'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_NAV_LINKS = '.nav-link'
const SELECTOR_NAV_ITEMS = '.nav-item'
const SELECTOR_LIST_ITEMS = '.list-group-item'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const OffsetMethod = {
OFFSET : 'offset',
POSITION : 'position'
}
const METHOD_OFFSET = 'offset'
const METHOD_POSITION = 'position'
/**
* ------------------------------------------------------------------------
@@ -73,15 +63,15 @@ class ScrollSpy {
this._element = element
this._scrollElement = element.tagName === 'BODY' ? window : element
this._config = this._getConfig(config)
this._selector = `${this._config.target} ${Selector.NAV_LINKS},` +
`${this._config.target} ${Selector.LIST_ITEMS},` +
`${this._config.target} ${Selector.DROPDOWN_ITEMS}`
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +
`${this._config.target} ${SELECTOR_LIST_ITEMS},` +
`${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`
this._offsets = []
this._targets = []
this._activeTarget = null
this._scrollHeight = 0
$(this._scrollElement).on(Event.SCROLL, (event) => this._process(event))
$(this._scrollElement).on(EVENT_SCROLL, (event) => this._process(event))
this.refresh()
this._process()
@@ -101,12 +91,12 @@ class ScrollSpy {
refresh() {
const autoMethod = this._scrollElement === this._scrollElement.window
? OffsetMethod.OFFSET : OffsetMethod.POSITION
? METHOD_OFFSET : METHOD_POSITION
const offsetMethod = this._config.method === 'auto'
? autoMethod : this._config.method
const offsetBase = offsetMethod === OffsetMethod.POSITION
const offsetBase = offsetMethod === METHOD_POSITION
? this._getScrollTop() : 0
this._offsets = []
@@ -167,7 +157,7 @@ class ScrollSpy {
...typeof config === 'object' && config ? config : {}
}
if (typeof config.target !== 'string') {
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
let id = $(config.target).attr('id')
if (!id) {
id = Util.getUID(NAME)
@@ -201,9 +191,7 @@ class ScrollSpy {
_process() {
const scrollTop = this._getScrollTop() + this._config.offset
const scrollHeight = this._getScrollHeight()
const maxScroll = this._config.offset +
scrollHeight -
this._getOffsetHeight()
const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()
if (this._scrollHeight !== scrollHeight) {
this.refresh()
@@ -224,8 +212,7 @@ class ScrollSpy {
return
}
const offsetLength = this._offsets.length
for (let i = offsetLength; i--;) {
for (let i = this._offsets.length; i--;) {
const isActiveTarget = this._activeTarget !== this._targets[i] &&
scrollTop >= this._offsets[i] &&
(typeof this._offsets[i + 1] === 'undefined' ||
@@ -248,28 +235,35 @@ class ScrollSpy {
const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
$link.addClass(ClassName.ACTIVE)
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
$link.closest(SELECTOR_DROPDOWN)
.find(SELECTOR_DROPDOWN_TOGGLE)
.addClass(CLASS_NAME_ACTIVE)
$link.addClass(CLASS_NAME_ACTIVE)
} else {
// Set triggered link as active
$link.addClass(ClassName.ACTIVE)
$link.addClass(CLASS_NAME_ACTIVE)
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
$link.parents(Selector.NAV_LIST_GROUP).prev(`${Selector.NAV_LINKS}, ${Selector.LIST_ITEMS}`).addClass(ClassName.ACTIVE)
$link.parents(SELECTOR_NAV_LIST_GROUP)
.prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)
.addClass(CLASS_NAME_ACTIVE)
// Handle special case when .nav-link is inside .nav-item
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE)
$link.parents(SELECTOR_NAV_LIST_GROUP)
.prev(SELECTOR_NAV_ITEMS)
.children(SELECTOR_NAV_LINKS)
.addClass(CLASS_NAME_ACTIVE)
}
$(this._scrollElement).trigger(Event.ACTIVATE, {
$(this._scrollElement).trigger(EVENT_ACTIVATE, {
relatedTarget: target
})
}
_clear() {
[].slice.call(document.querySelectorAll(this._selector))
.filter((node) => node.classList.contains(ClassName.ACTIVE))
.forEach((node) => node.classList.remove(ClassName.ACTIVE))
.filter((node) => node.classList.contains(CLASS_NAME_ACTIVE))
.forEach((node) => node.classList.remove(CLASS_NAME_ACTIVE))
}
// Static
@@ -300,8 +294,8 @@ class ScrollSpy {
* ------------------------------------------------------------------------
*/
$(window).on(Event.LOAD_DATA_API, () => {
const scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY))
$(window).on(EVENT_LOAD_DATA_API, () => {
const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY))
const scrollSpysLength = scrollSpys.length
for (let i = scrollSpysLength; i--;) {

90
node_modules/bootstrap/js/src/tab.js generated vendored
View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): tab.js
* Bootstrap (v4.5.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,37 +15,31 @@ import Util from './util'
*/
const NAME = 'tab'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
HIDE : `hide${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
}
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const ClassName = {
DROPDOWN_MENU : 'dropdown-menu',
ACTIVE : 'active',
DISABLED : 'disabled',
FADE : 'fade',
SHOW : 'show'
}
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const Selector = {
DROPDOWN : '.dropdown',
NAV_LIST_GROUP : '.nav, .list-group',
ACTIVE : '.active',
ACTIVE_UL : '> li > .active',
DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE : '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'
}
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_UL = '> li > .active'
const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
@@ -69,27 +63,27 @@ class Tab {
show() {
if (this._element.parentNode &&
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
$(this._element).hasClass(ClassName.ACTIVE) ||
$(this._element).hasClass(ClassName.DISABLED)) {
$(this._element).hasClass(CLASS_NAME_ACTIVE) ||
$(this._element).hasClass(CLASS_NAME_DISABLED)) {
return
}
let target
let previous
const listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]
const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]
const selector = Util.getSelectorFromElement(this._element)
if (listElement) {
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE
previous = $.makeArray($(listElement).find(itemSelector))
previous = previous[previous.length - 1]
}
const hideEvent = $.Event(Event.HIDE, {
const hideEvent = $.Event(EVENT_HIDE, {
relatedTarget: this._element
})
const showEvent = $.Event(Event.SHOW, {
const showEvent = $.Event(EVENT_SHOW, {
relatedTarget: previous
})
@@ -114,11 +108,11 @@ class Tab {
)
const complete = () => {
const hiddenEvent = $.Event(Event.HIDDEN, {
const hiddenEvent = $.Event(EVENT_HIDDEN, {
relatedTarget: this._element
})
const shownEvent = $.Event(Event.SHOWN, {
const shownEvent = $.Event(EVENT_SHOWN, {
relatedTarget: previous
})
@@ -142,11 +136,11 @@ class Tab {
_activate(element, container, callback) {
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL')
? $(container).find(Selector.ACTIVE_UL)
: $(container).children(Selector.ACTIVE)
? $(container).find(SELECTOR_ACTIVE_UL)
: $(container).children(SELECTOR_ACTIVE)
const active = activeElements[0]
const isTransitioning = callback && (active && $(active).hasClass(ClassName.FADE))
const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))
const complete = () => this._transitionComplete(
element,
active,
@@ -157,7 +151,7 @@ class Tab {
const transitionDuration = Util.getTransitionDurationFromElement(active)
$(active)
.removeClass(ClassName.SHOW)
.removeClass(CLASS_NAME_SHOW)
.one(Util.TRANSITION_END, complete)
.emulateTransitionEnd(transitionDuration)
} else {
@@ -167,14 +161,14 @@ class Tab {
_transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(ClassName.ACTIVE)
$(active).removeClass(CLASS_NAME_ACTIVE)
const dropdownChild = $(active.parentNode).find(
Selector.DROPDOWN_ACTIVE_CHILD
SELECTOR_DROPDOWN_ACTIVE_CHILD
)[0]
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName.ACTIVE)
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE)
}
if (active.getAttribute('role') === 'tab') {
@@ -182,24 +176,24 @@ class Tab {
}
}
$(element).addClass(ClassName.ACTIVE)
$(element).addClass(CLASS_NAME_ACTIVE)
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true)
}
Util.reflow(element)
if (element.classList.contains(ClassName.FADE)) {
element.classList.add(ClassName.SHOW)
if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(CLASS_NAME_SHOW)
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]
if (dropdownElement) {
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE))
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE))
$(dropdownToggleList).addClass(ClassName.ACTIVE)
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE)
}
element.setAttribute('aria-expanded', true)
@@ -239,7 +233,7 @@ class Tab {
*/
$(document)
.on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault()
Tab._jQueryInterface.call($(this), 'show')
})

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): toast.js
* Bootstrap (v4.5.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,25 +15,21 @@ import Util from './util'
*/
const NAME = 'toast'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,
HIDE : `hide${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`
}
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const ClassName = {
FADE : 'fade',
HIDE : 'hide',
SHOW : 'show',
SHOWING : 'showing'
}
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_HIDE = 'hide'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_SHOWING = 'showing'
const DefaultType = {
animation : 'boolean',
@@ -47,9 +43,7 @@ const Default = {
delay : 500
}
const Selector = {
DATA_DISMISS : '[data-dismiss="toast"]'
}
const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'
/**
* ------------------------------------------------------------------------
@@ -82,7 +76,7 @@ class Toast {
// Public
show() {
const showEvent = $.Event(Event.SHOW)
const showEvent = $.Event(EVENT_SHOW)
$(this._element).trigger(showEvent)
if (showEvent.isDefaultPrevented()) {
@@ -90,14 +84,14 @@ class Toast {
}
if (this._config.animation) {
this._element.classList.add(ClassName.FADE)
this._element.classList.add(CLASS_NAME_FADE)
}
const complete = () => {
this._element.classList.remove(ClassName.SHOWING)
this._element.classList.add(ClassName.SHOW)
this._element.classList.remove(CLASS_NAME_SHOWING)
this._element.classList.add(CLASS_NAME_SHOW)
$(this._element).trigger(Event.SHOWN)
$(this._element).trigger(EVENT_SHOWN)
if (this._config.autohide) {
this._timeout = setTimeout(() => {
@@ -106,9 +100,9 @@ class Toast {
}
}
this._element.classList.remove(ClassName.HIDE)
this._element.classList.remove(CLASS_NAME_HIDE)
Util.reflow(this._element)
this._element.classList.add(ClassName.SHOWING)
this._element.classList.add(CLASS_NAME_SHOWING)
if (this._config.animation) {
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
@@ -121,11 +115,11 @@ class Toast {
}
hide() {
if (!this._element.classList.contains(ClassName.SHOW)) {
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
return
}
const hideEvent = $.Event(Event.HIDE)
const hideEvent = $.Event(EVENT_HIDE)
$(this._element).trigger(hideEvent)
if (hideEvent.isDefaultPrevented()) {
@@ -139,11 +133,11 @@ class Toast {
clearTimeout(this._timeout)
this._timeout = null
if (this._element.classList.contains(ClassName.SHOW)) {
this._element.classList.remove(ClassName.SHOW)
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW)
}
$(this._element).off(Event.CLICK_DISMISS)
$(this._element).off(EVENT_CLICK_DISMISS)
$.removeData(this._element, DATA_KEY)
this._element = null
@@ -169,20 +163,16 @@ class Toast {
}
_setListeners() {
$(this._element).on(
Event.CLICK_DISMISS,
Selector.DATA_DISMISS,
() => this.hide()
)
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())
}
_close() {
const complete = () => {
this._element.classList.add(ClassName.HIDE)
$(this._element).trigger(Event.HIDDEN)
this._element.classList.add(CLASS_NAME_HIDE)
$(this._element).trigger(EVENT_HIDDEN)
}
this._element.classList.remove(ClassName.SHOW)
this._element.classList.remove(CLASS_NAME_SHOW)
if (this._config.animation) {
const transitionDuration = Util.getTransitionDurationFromElement(this._element)

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): tools/sanitizer.js
* Bootstrap (v4.5.0): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@ export const DefaultWhitelist = {
h5: [],
h6: [],
i: [],
img: ['src', 'alt', 'title', 'width', 'height'],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
@@ -57,14 +57,14 @@ export const DefaultWhitelist = {
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i
function allowedAttribute(attr, allowedAttributeList) {
const attrName = attr.nodeName.toLowerCase()
@@ -80,7 +80,7 @@ function allowedAttribute(attr, allowedAttributeList) {
const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp)
// Check if a regular expression validates the attribute.
for (let i = 0, l = regExp.length; i < l; i++) {
for (let i = 0, len = regExp.length; i < len; i++) {
if (attrName.match(regExp[i])) {
return true
}

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): tooltip.js
* Bootstrap (v4.5.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@ import Util from './util'
*/
const NAME = 'tooltip'
const VERSION = '4.4.1'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.tooltip'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
@@ -76,10 +76,8 @@ const Default = {
popperConfig : null
}
const HoverState = {
SHOW : 'show',
OUT : 'out'
}
const HOVER_STATE_SHOW = 'show'
const HOVER_STATE_OUT = 'out'
const Event = {
HIDE : `hide${EVENT_KEY}`,
@@ -94,24 +92,16 @@ const Event = {
MOUSELEAVE : `mouseleave${EVENT_KEY}`
}
const ClassName = {
FADE : 'fade',
SHOW : 'show'
}
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const Selector = {
TOOLTIP : '.tooltip',
TOOLTIP_INNER : '.tooltip-inner',
ARROW : '.arrow'
}
const Trigger = {
HOVER : 'hover',
FOCUS : 'focus',
CLICK : 'click',
MANUAL : 'manual'
}
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'
const SELECTOR_ARROW = '.arrow'
const TRIGGER_HOVER = 'hover'
const TRIGGER_FOCUS = 'focus'
const TRIGGER_CLICK = 'click'
const TRIGGER_MANUAL = 'manual'
/**
* ------------------------------------------------------------------------
@@ -209,7 +199,7 @@ class Tooltip {
context._leave(null, context)
}
} else {
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
this._leave(null, this)
return
}
@@ -272,7 +262,7 @@ class Tooltip {
this.setContent()
if (this.config.animation) {
$(tip).addClass(ClassName.FADE)
$(tip).addClass(CLASS_NAME_FADE)
}
const placement = typeof this.config.placement === 'function'
@@ -293,7 +283,7 @@ class Tooltip {
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))
$(tip).addClass(ClassName.SHOW)
$(tip).addClass(CLASS_NAME_SHOW)
// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
@@ -312,12 +302,12 @@ class Tooltip {
$(this.element).trigger(this.constructor.Event.SHOWN)
if (prevHoverState === HoverState.OUT) {
if (prevHoverState === HOVER_STATE_OUT) {
this._leave(null, this)
}
}
if ($(this.tip).hasClass(ClassName.FADE)) {
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
const transitionDuration = Util.getTransitionDurationFromElement(this.tip)
$(this.tip)
@@ -333,7 +323,7 @@ class Tooltip {
const tip = this.getTipElement()
const hideEvent = $.Event(this.constructor.Event.HIDE)
const complete = () => {
if (this._hoverState !== HoverState.SHOW && tip.parentNode) {
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip)
}
@@ -355,7 +345,7 @@ class Tooltip {
return
}
$(tip).removeClass(ClassName.SHOW)
$(tip).removeClass(CLASS_NAME_SHOW)
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
@@ -363,11 +353,11 @@ class Tooltip {
$(document.body).children().off('mouseover', null, $.noop)
}
this._activeTrigger[Trigger.CLICK] = false
this._activeTrigger[Trigger.FOCUS] = false
this._activeTrigger[Trigger.HOVER] = false
this._activeTrigger[TRIGGER_CLICK] = false
this._activeTrigger[TRIGGER_FOCUS] = false
this._activeTrigger[TRIGGER_HOVER] = false
if ($(this.tip).hasClass(ClassName.FADE)) {
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
const transitionDuration = Util.getTransitionDurationFromElement(tip)
$(tip)
@@ -403,8 +393,8 @@ class Tooltip {
setContent() {
const tip = this.getTipElement()
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle())
$(tip).removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle())
$(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
}
setElementContent($element, content) {
@@ -455,7 +445,7 @@ class Tooltip {
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector.ARROW
element: SELECTOR_ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
@@ -520,25 +510,17 @@ class Tooltip {
this.config.selector,
(event) => this.toggle(event)
)
} else if (trigger !== Trigger.MANUAL) {
const eventIn = trigger === Trigger.HOVER
} else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER
? this.constructor.Event.MOUSEENTER
: this.constructor.Event.FOCUSIN
const eventOut = trigger === Trigger.HOVER
const eventOut = trigger === TRIGGER_HOVER
? this.constructor.Event.MOUSELEAVE
: this.constructor.Event.FOCUSOUT
$(this.element)
.on(
eventIn,
this.config.selector,
(event) => this._enter(event)
)
.on(
eventOut,
this.config.selector,
(event) => this._leave(event)
)
.on(eventIn, this.config.selector, (event) => this._enter(event))
.on(eventOut, this.config.selector, (event) => this._leave(event))
}
})
@@ -548,10 +530,7 @@ class Tooltip {
}
}
$(this.element).closest('.modal').on(
'hide.bs.modal',
this._hideModalHandler
)
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler)
if (this.config.selector) {
this.config = {
@@ -591,18 +570,18 @@ class Tooltip {
if (event) {
context._activeTrigger[
event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER
event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER
] = true
}
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW
return
}
clearTimeout(context._timeout)
context._hoverState = HoverState.SHOW
context._hoverState = HOVER_STATE_SHOW
if (!context.config.delay || !context.config.delay.show) {
context.show()
@@ -610,7 +589,7 @@ class Tooltip {
}
context._timeout = setTimeout(() => {
if (context._hoverState === HoverState.SHOW) {
if (context._hoverState === HOVER_STATE_SHOW) {
context.show()
}
}, context.config.delay.show)
@@ -630,7 +609,7 @@ class Tooltip {
if (event) {
context._activeTrigger[
event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER
event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER
] = false
}
@@ -640,7 +619,7 @@ class Tooltip {
clearTimeout(context._timeout)
context._hoverState = HoverState.OUT
context._hoverState = HOVER_STATE_OUT
if (!context.config.delay || !context.config.delay.hide) {
context.hide()
@@ -648,7 +627,7 @@ class Tooltip {
}
context._timeout = setTimeout(() => {
if (context._hoverState === HoverState.OUT) {
if (context._hoverState === HOVER_STATE_OUT) {
context.hide()
}
}, context.config.delay.hide)
@@ -731,8 +710,7 @@ class Tooltip {
}
_handlePopperPlacementChange(popperData) {
const popperInstance = popperData.instance
this.tip = popperInstance.popper
this.tip = popperData.instance.popper
this._cleanTipClass()
this.addAttachmentClass(this._getAttachment(popperData.placement))
}
@@ -745,7 +723,7 @@ class Tooltip {
return
}
$(tip).removeClass(ClassName.FADE)
$(tip).removeClass(CLASS_NAME_FADE)
this.config.animation = false
this.hide()
this.show()

View File

@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.1): util.js
* Bootstrap (v4.5.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -19,6 +19,10 @@ const MILLISECONDS_MULTIPLIER = 1000
// Shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
if (obj === null || typeof obj === 'undefined') {
return `${obj}`
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase()
}
@@ -30,7 +34,7 @@ function getSpecialTransitionEndEvent() {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
}
return undefined // eslint-disable-line no-undefined
return undefined
}
}
}
@@ -63,7 +67,6 @@ function setTransitionEndSupport() {
*/
const Util = {
TRANSITION_END: 'bsTransitionEnd',
getUID(prefix) {

127
node_modules/bootstrap/package.json generated vendored
View File

@@ -1,28 +1,28 @@
{
"_from": "bootstrap@4.4.1",
"_id": "bootstrap@4.4.1",
"_from": "bootstrap@4.5.0",
"_id": "bootstrap@4.5.0",
"_inBundle": false,
"_integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==",
"_integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==",
"_location": "/bootstrap",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "bootstrap@4.4.1",
"raw": "bootstrap@4.5.0",
"name": "bootstrap",
"escapedName": "bootstrap",
"rawSpec": "4.4.1",
"rawSpec": "4.5.0",
"saveSpec": null,
"fetchSpec": "4.4.1"
"fetchSpec": "4.5.0"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz",
"_shasum": "8582960eea0c5cd2bede84d8b0baf3789c3e8b01",
"_spec": "bootstrap@4.4.1",
"_where": "/home/s2/Code/vanillajs-seed",
"_resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
"_shasum": "97d9dbcb5a8972f8722c9962483543b907d9b9ec",
"_spec": "bootstrap@4.5.0",
"_where": "D:\\Projects\\siag\\vanillajs-seed",
"author": {
"name": "The Bootstrap Authors",
"url": "https://github.com/twbs/bootstrap/graphs/contributors"
@@ -40,52 +40,49 @@
"deprecated": false,
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"devDependencies": {
"@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"autoprefixer": "^9.7.2",
"babel-eslint": "^10.0.3",
"babel-plugin-istanbul": "^5.2.0",
"broken-link-checker": "^0.7.8",
"bundlesize": "^0.18.0",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6",
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"autoprefixer": "^9.7.6",
"babel-eslint": "^10.1.0",
"babel-plugin-istanbul": "^6.0.0",
"bundlewatch": "^0.2.7",
"clean-css-cli": "^4.3.0",
"cross-env": "^5.2.1",
"eslint": "^5.16.0",
"find-unused-sass-variables": "^0.6.0",
"cross-env": "^7.0.2",
"eslint": "^7.0.0",
"find-unused-sass-variables": "^2.0.0",
"glob": "^7.1.6",
"hammer-simulator": "0.0.1",
"http-server": "^0.11.1",
"ip": "^1.1.5",
"jquery": "^3.4.1",
"karma": "^3.1.4",
"jquery": "^3.5.1",
"karma": "^5.0.5",
"karma-browserstack-launcher": "1.4.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-coverage-istanbul-reporter": "^3.0.2",
"karma-detect-browsers": "^2.3.3",
"karma-firefox-launcher": "^1.2.0",
"karma-qunit": "^3.1.3",
"karma-firefox-launcher": "^1.3.0",
"karma-qunit": "^4.1.1",
"karma-sinon": "^1.0.5",
"node-sass": "^4.13.0",
"nodemon": "^1.19.4",
"linkinator": "^2.1.1",
"lockfile-lint": "^4.2.2",
"node-sass": "^4.14.1",
"nodemon": "^2.0.3",
"npm-run-all": "^4.1.5",
"popper.js": "^1.16.0",
"postcss-cli": "^6.1.3",
"postcss-cli": "^7.1.1",
"qunit": "2.9.2",
"rollup": "1.26.5",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"shelljs": "^0.8.3",
"rollup": "^2.9.1",
"rollup-plugin-babel": "^4.4.0",
"shelljs": "^0.8.4",
"shx": "^0.3.2",
"sinon": "^7.5.0",
"stylelint": "^9.10.1",
"stylelint-config-twbs-bootstrap": "^0.5.0",
"uglify-js": "^3.6.9",
"vnu-jar": "19.9.4"
},
"engines": {
"node": ">=6"
"stylelint": "^13.3.3",
"stylelint-config-twbs-bootstrap": "^2.0.2",
"terser": "^4.6.13",
"vnu-jar": "20.3.16"
},
"files": [
"dist/{css,js}/*.{css,js,map}",
@@ -128,7 +125,7 @@
"web"
],
"license": "MIT",
"main": "dist/js/bootstrap",
"main": "dist/js/bootstrap.js",
"name": "bootstrap",
"peerDependencies": {
"jquery": "1.9.1 - 3",
@@ -140,9 +137,7 @@
},
"sass": "scss/bootstrap.scss",
"scripts": {
"blc": "blc --exclude-external --filter-level 3 --follow --get --ordered --recursive --host-requests 4 --input http://localhost:3000/",
"bundlesize": "bundlesize",
"check-broken-links": "npm-run-all --parallel --race \"http-server -- _gh_pages/\" blc",
"bundlewatch": "bundlewatch --config .bundlewatch.config.json",
"css": "npm-run-all css-compile css-prefix css-minify css-copy",
"css-compile": "npm-run-all --parallel css-compile-*",
"css-compile-docs": "cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/docs/$npm_package_version_short/assets/scss/docs.scss site/docs/$npm_package_version_short/assets/css/docs.min.css",
@@ -161,14 +156,16 @@
"css-prefix-docs": "postcss --config build/postcss.config.js --replace \"site/docs/**/*.css\"",
"css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"",
"dist": "npm-run-all --parallel css js",
"docs": "npm-run-all css-docs js-docs docs-compile docs-lint",
"docs-compile": "bundle exec jekyll build",
"docs-lint": "node build/vnu-jar.js",
"docs-netlify": "cross-env JEKYLL_ENV=netlify npm run docs-compile",
"docs-production": "cross-env JEKYLL_ENV=production npm run docs-compile",
"docs": "npm-run-all css-docs js-docs docs-build docs-lint",
"docs-build": "bundle exec jekyll build",
"docs-compile": "npm run docs-build",
"docs-linkinator": "linkinator _gh_pages --recurse --silent --skip \"^(?!http://localhost)\"",
"docs-lint": "npm-run-all --parallel docs-vnu docs-linkinator",
"docs-netlify": "cross-env JEKYLL_ENV=netlify npm run docs-build",
"docs-production": "cross-env JEKYLL_ENV=production npm run docs-build",
"docs-serve": "bundle exec jekyll serve",
"docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch",
"http-server": "http-server --silent -p 3000",
"docs-vnu": "node build/vnu-jar.js",
"js": "npm-run-all js-compile js-minify js-copy",
"js-compile": "npm-run-all --parallel js-compile-* --sequential js-copy",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
@@ -178,14 +175,14 @@
"js-copy": "cross-env-shell shx mkdir -p site/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/js/ site/docs/$npm_package_version_short/dist/",
"js-docs": "npm-run-all js-lint-docs js-minify-docs",
"js-lint": "npm-run-all --continue-on-error --parallel js-lint-*",
"js-lint-docs": "eslint --cache --cache-location .cache/.eslintcache site/",
"js-lint-main": "eslint --cache --cache-location .cache/.eslintcache js/src js/tests build/",
"js-lint-docs": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache site/",
"js-lint-main": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache js/src js/tests build/",
"js-main": "npm-run-all js-lint js-compile js-minify-main",
"js-minify": "npm-run-all --parallel js-minify-main js-minify-docs",
"js-minify-bundle": "uglifyjs --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.bundle.js.map,includeSources,url=bootstrap.bundle.min.js.map\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js",
"js-minify-docs": "cross-env-shell uglifyjs --mangle --comments \\\"/^!/\\\" --output site/docs/$npm_package_version_short/assets/js/docs.min.js site/docs/$npm_package_version_short/assets/js/vendor/anchor.min.js site/docs/$npm_package_version_short/assets/js/vendor/clipboard.min.js site/docs/$npm_package_version_short/assets/js/vendor/bs-custom-file-input.min.js \"site/docs/$npm_package_version_short/assets/js/src/*.js\"",
"js-minify-bundle": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.bundle.js.map,includeSources,url=bootstrap.bundle.min.js.map\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js",
"js-minify-docs": "cross-env-shell terser --mangle --comments \\\"/^!/\\\" --output site/docs/$npm_package_version_short/assets/js/docs.min.js site/docs/$npm_package_version_short/assets/js/vendor/anchor.min.js site/docs/$npm_package_version_short/assets/js/vendor/clipboard.min.js site/docs/$npm_package_version_short/assets/js/vendor/bs-custom-file-input.min.js \"site/docs/$npm_package_version_short/assets/js/src/*.js\"",
"js-minify-main": "npm-run-all js-minify-standalone js-minify-bundle",
"js-minify-standalone": "uglifyjs --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-standalone": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-test": "npm-run-all js-test-karma* js-test-integration",
"js-test-cloud": "cross-env BROWSER=true npm run js-test-karma",
"js-test-integration": "rollup --config js/tests/integration/rollup.bundle.js",
@@ -193,15 +190,17 @@
"js-test-karma-bundle": "cross-env BUNDLE=true npm run js-test-karma",
"js-test-karma-bundle-old": "cross-env BUNDLE=true USE_OLD_JQUERY=true npm run js-test-karma",
"js-test-karma-old": "cross-env USE_OLD_JQUERY=true npm run js-test-karma",
"lint": "npm-run-all --parallel js-lint css-lint",
"lint": "npm-run-all --parallel js-lint css-lint lockfile-lint",
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
"netlify": "npm-run-all dist release-sri docs-netlify",
"release": "npm-run-all dist release-sri release-zip docs-production",
"release": "npm-run-all dist release-sri docs-build release-zip*",
"release-sri": "node build/generate-sri.js",
"release-version": "node build/change-version.js",
"release-zip": "cross-env-shell \"shx rm -rf bootstrap-$npm_package_version-dist && shx cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && shx rm -rf bootstrap-$npm_package_version-dist\"",
"release-zip-examples": "node build/zip-examples.js",
"start": "npm-run-all --parallel watch docs-serve",
"test": "npm-run-all lint dist js-test docs-compile docs-lint",
"update-deps": "ncu -a -x \"cross-env,eslint,find-unused-sass-variables,karma,karma-browserstack-launcher,karma-qunit,nodemon,qunit,rollup,stylelint,stylelint-config-twbs-bootstrap\" && npm update && bundle update && cross-env-shell echo Manually update \\\"site/docs/$npm_package_version_short/assets/js/vendor/\\\"",
"test": "npm-run-all lint dist js-test docs-build docs-lint",
"update-deps": "ncu -u -x \"jquery,karma-browserstack-launcher,popper.js,qunit,sinon\" && npm update && bundle update && cross-env-shell echo Manually update \\\"site/docs/$npm_package_version_short/assets/js/vendor/\\\"",
"watch": "npm-run-all --parallel watch-*",
"watch-css-docs": "nodemon --watch \"site/docs/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"",
"watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main\"",
@@ -209,6 +208,6 @@
"watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm run js-compile\""
},
"style": "dist/css/bootstrap.css",
"version": "4.4.1",
"version_short": "4.4"
"version": "4.5.0",
"version_short": "4.5"
}

View File

@@ -10,6 +10,8 @@
}
.breadcrumb-item {
display: flex;
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
padding-left: $breadcrumb-item-padding;

View File

@@ -10,9 +10,9 @@
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
text-decoration: if($link-decoration == none, null, none);
white-space: $btn-white-space;
vertical-align: middle;
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@@ -37,12 +37,16 @@
@include box-shadow(none);
}
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active {
@include box-shadow($btn-active-box-shadow);
&:not(:disabled):not(.disabled) {
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
&:active,
&.active {
@include box-shadow($btn-active-box-shadow);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
}
}
@@ -89,7 +93,6 @@ fieldset:disabled a.btn {
&:focus,
&.focus {
text-decoration: $link-hover-decoration;
box-shadow: none;
}
&:disabled,

View File

@@ -19,15 +19,18 @@
margin-left: 0;
}
> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
}
}
> .list-group {
border-top: inherit;
border-bottom: inherit;
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
}
&:last-child {
border-bottom-width: 0;
@include border-bottom-radius($card-inner-border-radius);
}
}
}
@@ -90,6 +93,7 @@
.card-footer {
padding: $card-spacer-y $card-spacer-x;
color: $card-cap-color;
background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color;

View File

@@ -30,7 +30,6 @@ button.close {
padding: 0;
background-color: transparent;
border: 0;
appearance: none;
}
// Future-proof disabling of clicks on `<a>` elements

View File

@@ -237,8 +237,9 @@
border-color: $custom-select-focus-border-color;
outline: 0;
@if $enable-shadows {
box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
@include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $custom-select-focus-box-shadow;
}

View File

@@ -128,6 +128,7 @@
font-weight: $font-weight-normal;
color: $dropdown-link-color;
text-align: inherit; // For `<button>`s
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap; // prevent links from randomly breaking onto new lines
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
@@ -176,7 +177,7 @@
// Dropdown section headers
.dropdown-header {
display: block;
padding: $dropdown-padding-y $dropdown-item-padding-x;
padding: $dropdown-header-padding;
margin-bottom: 0; // for use with heading elements
@include font-size($font-size-sm);
color: $dropdown-header-color;

View File

@@ -59,6 +59,15 @@
}
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
&.form-control {
appearance: none; // Fix appearance for date inputs in Safari
}
}
select.form-control {
&:focus::-ms-value {
// Suppress the nested default white text on blue background highlight given to

View File

@@ -23,10 +23,12 @@
// Starts at zero
// Used to ensure the min-width of the lowest breakpoint starts at 0.
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
@if length($map) > 0 {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
}
}
}
@@ -52,7 +54,12 @@
@function escape-svg($string) {
@if str-index($string, "data:image/svg+xml") {
@each $char, $encoded in $escaped-characters {
$string: str-replace($string, $char, $encoded);
// Do not escape the url brackets
@if str-index($string, "url(") == 1 {
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
} @else {
$string: str-replace($string, $char, $encoded);
}
}
}

View File

@@ -25,11 +25,19 @@
max-width: $container-max-width;
}
// Extend each breakpoint which is smaller or equal to the current breakpoint
$extend-breakpoint: true;
@each $name, $width in $grid-breakpoints {
@if ($container-max-width > $width or $breakpoint == $name) {
@if ($extend-breakpoint) {
.container#{breakpoint-infix($name, $grid-breakpoints)} {
@extend %responsive-container-#{$breakpoint};
}
// Once the current breakpoint is reached, stop extending
@if ($breakpoint == $name) {
$extend-breakpoint: false;
}
}
}
}

View File

@@ -16,7 +16,8 @@
> .custom-select,
> .custom-file {
position: relative; // For focus state's z-index
flex: 1 1 0%;
flex: 1 1 auto;
width: 1%;
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
margin-bottom: 0;

View File

@@ -9,6 +9,7 @@
// No need to set list-style: none; since .list-group-item is block level
padding-left: 0; // reset padding because ul and ol
margin-bottom: 0;
@include border-radius($list-group-border-radius);
}
@@ -46,15 +47,16 @@
display: block;
padding: $list-group-item-padding-y $list-group-item-padding-x;
color: $list-group-color;
text-decoration: if($link-decoration == none, null, none);
background-color: $list-group-bg;
border: $list-group-border-width solid $list-group-border-color;
&:first-child {
@include border-top-radius($list-group-border-radius);
@include border-top-radius(inherit);
}
&:last-child {
@include border-bottom-radius($list-group-border-radius);
@include border-bottom-radius(inherit);
}
&.disabled,
@@ -94,7 +96,7 @@
.list-group-horizontal#{$infix} {
flex-direction: row;
.list-group-item {
> .list-group-item {
&:first-child {
@include border-bottom-left-radius($list-group-border-radius);
@include border-top-right-radius(0);
@@ -130,18 +132,12 @@
// useful within other components (e.g., cards).
.list-group-flush {
.list-group-item {
border-right-width: 0;
border-left-width: 0;
@include border-radius(0);
@include border-radius(0);
&:first-child {
border-top-width: 0;
}
}
> .list-group-item {
border-width: 0 0 $list-group-border-width;
&:last-child {
.list-group-item:last-child {
&:last-child {
border-bottom-width: 0;
}
}

View File

@@ -83,6 +83,7 @@
&::before {
display: block; // IE10
height: subtract(100vh, $modal-dialog-margin * 2);
height: min-content; // Reset height to 0 except on IE
content: "";
}
@@ -217,6 +218,7 @@
&::before {
height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
height: min-content;
}
}

View File

@@ -14,6 +14,7 @@
.nav-link {
display: block;
padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: if($link-decoration == none, null, none);
@include hover-focus() {
text-decoration: none;

View File

@@ -11,6 +11,7 @@
margin-left: -$pagination-border-width;
line-height: $pagination-line-height;
color: $pagination-color;
text-decoration: if($link-decoration == none, null, none);
background-color: $pagination-bg;
border: $pagination-border-width solid $pagination-border-color;

View File

@@ -10,6 +10,7 @@
display: flex;
height: $progress-height;
overflow: hidden; // force rounded corners by cropping it
line-height: 0;
@include font-size($progress-font-size);
background-color: $progress-bg;
@include border-radius($progress-border-radius);

View File

@@ -229,6 +229,9 @@ pre {
margin-bottom: 1rem;
// Don't allow content to break outside
overflow: auto;
// Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
// making it impossible to interact with the content
-ms-overflow-style: scrollbar;
}
@@ -330,6 +333,13 @@ select {
text-transform: none; // Remove the inheritance of text transform in Firefox
}
// Set the cursor for non-`<button>` buttons
//
// Details at https://github.com/twbs/bootstrap/pull/30562
[role="button"] {
cursor: pointer;
}
// Remove the inheritance of word-wrap in Safari.
//
// Details at https://github.com/twbs/bootstrap/issues/24990
@@ -376,18 +386,6 @@ input[type="checkbox"] {
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
// bug where setting a custom line-height prevents text from being vertically
// centered within the input.
// See https://bugs.webkit.org/show_bug.cgi?id=139848
// and https://github.com/twbs/bootstrap/issues/11266
-webkit-appearance: listbox;
}
textarea {
overflow: auto; // Remove the default vertical scrollbar in IE.
// Textareas should really only resize vertically so they don't break their (horizontal) containers.

View File

@@ -34,6 +34,7 @@
}
50% {
opacity: 1;
transform: none;
}
}

View File

@@ -6,12 +6,13 @@
@import "utilities/embed";
@import "utilities/flex";
@import "utilities/float";
@import "utilities/interactions";
@import "utilities/overflow";
@import "utilities/position";
@import "utilities/screenreaders";
@import "utilities/shadows";
@import "utilities/sizing";
@import "utilities/stretched-link";
@import "utilities/spacing";
@import "utilities/stretched-link";
@import "utilities/text";
@import "utilities/visibility";

View File

@@ -106,6 +106,8 @@ $escaped-characters: (
("<","%3c"),
(">","%3e"),
("#","%23"),
("(","%28"),
(")","%29"),
) !default;
@@ -786,6 +788,7 @@ $dropdown-item-padding-y: .25rem !default;
$dropdown-item-padding-x: 1.5rem !default;
$dropdown-header-color: $gray-600 !default;
$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;
// Pagination
@@ -1135,6 +1138,7 @@ $pre-scrollable-max-height: 340px !default;
$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
$overflows: auto, hidden !default;
$positions: static, relative, absolute, fixed, sticky !default;
$user-selects: all, auto, none !default;
// Printing

View File

@@ -1,7 +1,7 @@
/*!
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Grid v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

View File

@@ -1,7 +1,7 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/

View File

@@ -1,7 +1,7 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

View File

@@ -15,8 +15,9 @@
@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
}
@mixin bg-gradient-variant($parent, $color) {
@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
}
@include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
}

View File

@@ -1,9 +1,22 @@
// stylelint-disable property-blacklist
// Single side border-radius
// Helper function to replace negative values with 0
@function valid-radius($radius) {
$return: ();
@each $value in $radius {
@if type-of($value) == number {
$return: append($return, max($value, 0));
} @else {
$return: append($return, $value);
}
}
@return $return;
}
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
@if $enable-rounded {
border-radius: $radius;
border-radius: valid-radius($radius);
}
@else if $fallback-border-radius != false {
border-radius: $fallback-border-radius;
@@ -12,52 +25,52 @@
@mixin border-top-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-top-right-radius: $radius;
border-top-left-radius: valid-radius($radius);
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-right-radius($radius) {
@if $enable-rounded {
border-top-right-radius: $radius;
border-bottom-right-radius: $radius;
border-top-right-radius: valid-radius($radius);
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-radius($radius) {
@if $enable-rounded {
border-bottom-right-radius: $radius;
border-bottom-left-radius: $radius;
border-bottom-right-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-left-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-bottom-left-radius: $radius;
border-top-left-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-top-left-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-top-left-radius: valid-radius($radius);
}
}
@mixin border-top-right-radius($radius) {
@if $enable-rounded {
border-top-right-radius: $radius;
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-right-radius($radius) {
@if $enable-rounded {
border-bottom-right-radius: $radius;
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-left-radius($radius) {
@if $enable-rounded {
border-bottom-left-radius: $radius;
border-bottom-left-radius: valid-radius($radius);
}
}

View File

@@ -20,10 +20,10 @@
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@@ -51,10 +51,10 @@
border-color: $active-border;
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@@ -90,10 +90,10 @@
border-color: $active-border;
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
}

View File

@@ -16,10 +16,10 @@
background-color: $input-focus-bg;
border-color: $input-focus-border-color;
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $input-box-shadow, $input-focus-box-shadow;
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $input-focus-box-shadow;
}
}

View File

@@ -15,12 +15,15 @@
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
// Allow columns to stretch full width below their breakpoints
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@extend %grid-column;
@if $columns > 0 {
// Allow columns to stretch full width below their breakpoints
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@extend %grid-column;
}
}
}
.col#{$infix},
.col#{$infix}-auto {
@extend %grid-column;
@@ -31,12 +34,15 @@
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410
max-width: 100%;
}
@for $i from 1 through $grid-row-columns {
.row-cols#{$infix}-#{$i} {
@include row-cols($i);
@if $grid-row-columns > 0 {
@for $i from 1 through $grid-row-columns {
.row-cols#{$infix}-#{$i} {
@include row-cols($i);
}
}
}
@@ -44,9 +50,11 @@
@include make-col-auto();
}
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@include make-col($i, $columns);
@if $columns > 0 {
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@include make-col($i, $columns);
}
}
}
@@ -58,11 +66,13 @@
.order#{$infix}-#{$i} { order: $i; }
}
// `$columns - 1` because offsetting by the width of an entire row isn't possible
@for $i from 0 through ($columns - 1) {
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
.offset#{$infix}-#{$i} {
@include make-col-offset($i, $columns);
@if $columns > 0 {
// `$columns - 1` because offsetting by the width of an entire row isn't possible
@for $i from 0 through ($columns - 1) {
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
.offset#{$infix}-#{$i} {
@include make-col-offset($i, $columns);
}
}
}
}

View File

@@ -1,16 +1,26 @@
// stylelint-disable property-blacklist
@mixin transition($transition...) {
@if $enable-transitions {
@if length($transition) == 0 {
transition: $transition-base;
} @else {
transition: $transition;
@if length($transition) == 0 {
$transition: $transition-base;
}
@if length($transition) > 1 {
@each $value in $transition {
@if $value == null or $value == none {
@warn "The keyword 'none' or 'null' must be used as a single argument.";
}
}
}
@if $enable-prefers-reduced-motion-media-query {
@media (prefers-reduced-motion: reduce) {
transition: none;
@if $enable-transitions {
@if nth($transition, 1) != null {
transition: $transition;
}
@if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
@media (prefers-reduced-motion: reduce) {
transition: none;
}
}
}
}

View File

@@ -6,7 +6,7 @@
@if $enable-gradients {
@each $color, $value in $theme-colors {
@include bg-gradient-variant(".bg-gradient-#{$color}", $value);
@include bg-gradient-variant(".bg-gradient-#{$color}", $value, true);
}
}

View File

@@ -0,0 +1,5 @@
// stylelint-disable declaration-no-important
@each $value in $user-selects {
.user-select-#{$value} { user-select: $value !important; }
}

View File

@@ -63,8 +63,7 @@
.text-decoration-none { text-decoration: none !important; }
.text-break {
word-break: break-word !important; // IE & < Edge 18
overflow-wrap: break-word !important;
word-wrap: break-word !important;
}
// Reset