mirror of https://github.com/twbs/bootstrap.git
Dist
This commit is contained in:
parent
220baef0d9
commit
fceee8d093
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,6 @@ html {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
-ms-text-size-adjust: 100%;
|
|
||||||
-ms-overflow-style: scrollbar;
|
-ms-overflow-style: scrollbar;
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +29,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, Noto Sans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
@ -101,10 +100,6 @@ blockquote {
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
dfn {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
b,
|
b,
|
||||||
strong {
|
strong {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
|
@ -236,7 +231,7 @@ select {
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
html [type="button"],
|
[type="button"],
|
||||||
[type="reset"],
|
[type="reset"],
|
||||||
[type="submit"] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button;
|
-webkit-appearance: button;
|
||||||
|
@ -301,7 +296,6 @@ progress {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[type="search"]::-webkit-search-cancel-button,
|
|
||||||
[type="search"]::-webkit-search-decoration {
|
[type="search"]::-webkit-search-decoration {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,5 +4,5 @@
|
||||||
* Copyright 2011-2018 Twitter, Inc.
|
* Copyright 2011-2018 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* 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)
|
* 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%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}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,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}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}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-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}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[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-cancel-button,[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%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-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}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[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}
|
||||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
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
1652
dist/js/bootstrap.js
1652
dist/js/bootstrap.js
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
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap alert.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -30,18 +35,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Alert = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'alert';
|
var NAME = 'alert';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.alert';
|
var DATA_KEY = 'bs.alert';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var Selector = {
|
var Selector = {
|
||||||
DISMISS: '[data-dismiss="alert"]'
|
DISMISS: '[data-dismiss="alert"]'
|
||||||
};
|
};
|
||||||
|
@ -90,7 +95,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._element = null;
|
this._element = null;
|
||||||
}; // Private
|
}; // Private
|
||||||
|
|
||||||
|
@ -104,43 +109,43 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
parent = $$$1(element).closest("." + ClassName.ALERT)[0];
|
parent = $(element).closest("." + ClassName.ALERT)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||||
var closeEvent = $$$1.Event(Event.CLOSE);
|
var closeEvent = $.Event(Event.CLOSE);
|
||||||
$$$1(element).trigger(closeEvent);
|
$(element).trigger(closeEvent);
|
||||||
return closeEvent;
|
return closeEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._removeElement = function _removeElement(element) {
|
_proto._removeElement = function _removeElement(element) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
$$$1(element).removeClass(ClassName.SHOW);
|
$(element).removeClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (!$$$1(element).hasClass(ClassName.FADE)) {
|
if (!$(element).hasClass(ClassName.FADE)) {
|
||||||
this._destroyElement(element);
|
this._destroyElement(element);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(element);
|
var transitionDuration = Util.getTransitionDurationFromElement(element);
|
||||||
$$$1(element).one(Util.TRANSITION_END, function (event) {
|
$(element).one(Util.TRANSITION_END, function (event) {
|
||||||
return _this._destroyElement(element, event);
|
return _this._destroyElement(element, event);
|
||||||
}).emulateTransitionEnd(transitionDuration);
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._destroyElement = function _destroyElement(element) {
|
_proto._destroyElement = function _destroyElement(element) {
|
||||||
$$$1(element).detach().trigger(Event.CLOSED).remove();
|
$(element).detach().trigger(Event.CLOSED).remove();
|
||||||
}; // Static
|
}; // Static
|
||||||
|
|
||||||
|
|
||||||
Alert._jQueryInterface = function _jQueryInterface(config) {
|
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var $element = $$$1(this);
|
var $element = $(this);
|
||||||
var data = $element.data(DATA_KEY);
|
var data = $element.data(DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@ -180,24 +185,21 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(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
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Alert._jQueryInterface;
|
$.fn[NAME] = Alert._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Alert;
|
$.fn[NAME].Constructor = Alert;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Alert._jQueryInterface;
|
return Alert._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Alert;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap button.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
@ -29,18 +34,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Button = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'button';
|
var NAME = 'button';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.button';
|
var DATA_KEY = 'bs.button';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var ClassName = {
|
var ClassName = {
|
||||||
ACTIVE: 'active',
|
ACTIVE: 'active',
|
||||||
BUTTON: 'btn',
|
BUTTON: 'btn',
|
||||||
|
@ -78,7 +83,7 @@
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
var triggerChangeEvent = true;
|
var triggerChangeEvent = true;
|
||||||
var addAriaPressed = true;
|
var addAriaPressed = true;
|
||||||
var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
|
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
|
||||||
|
|
||||||
if (rootElement) {
|
if (rootElement) {
|
||||||
var input = this._element.querySelector(Selector.INPUT);
|
var input = this._element.querySelector(Selector.INPUT);
|
||||||
|
@ -91,7 +96,7 @@
|
||||||
var activeElement = rootElement.querySelector(Selector.ACTIVE);
|
var activeElement = rootElement.querySelector(Selector.ACTIVE);
|
||||||
|
|
||||||
if (activeElement) {
|
if (activeElement) {
|
||||||
$$$1(activeElement).removeClass(ClassName.ACTIVE);
|
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +107,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
||||||
$$$1(input).trigger('change');
|
$(input).trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
input.focus();
|
input.focus();
|
||||||
|
@ -115,23 +120,23 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triggerChangeEvent) {
|
if (triggerChangeEvent) {
|
||||||
$$$1(this._element).toggleClass(ClassName.ACTIVE);
|
$(this._element).toggleClass(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._element = null;
|
this._element = null;
|
||||||
}; // Static
|
}; // Static
|
||||||
|
|
||||||
|
|
||||||
Button._jQueryInterface = function _jQueryInterface(config) {
|
Button._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Button(this);
|
data = new Button(this);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config === 'toggle') {
|
if (config === 'toggle') {
|
||||||
|
@ -156,18 +161,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var button = event.target;
|
var button = event.target;
|
||||||
|
|
||||||
if (!$$$1(button).hasClass(ClassName.BUTTON)) {
|
if (!$(button).hasClass(ClassName.BUTTON)) {
|
||||||
button = $$$1(button).closest(Selector.BUTTON);
|
button = $(button).closest(Selector.BUTTON);
|
||||||
}
|
}
|
||||||
|
|
||||||
Button._jQueryInterface.call($$$1(button), 'toggle');
|
Button._jQueryInterface.call($(button), 'toggle');
|
||||||
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||||
var button = $$$1(event.target).closest(Selector.BUTTON)[0];
|
var button = $(event.target).closest(Selector.BUTTON)[0];
|
||||||
$$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
|
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
|
@ -175,17 +180,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Button._jQueryInterface;
|
$.fn[NAME] = Button._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Button;
|
$.fn[NAME].Constructor = Button;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Button._jQueryInterface;
|
return Button._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Button;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap carousel.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -57,44 +62,40 @@
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
* Bootstrap (v4.1.3): carousel.js
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||||
* --------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Carousel = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'carousel';
|
var NAME = 'carousel';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.carousel';
|
var DATA_KEY = 'bs.carousel';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
|
|
||||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
|
||||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
|
var SWIPE_THRESHOLD = 40;
|
||||||
var Default = {
|
var Default = {
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
slide: false,
|
slide: false,
|
||||||
pause: 'hover',
|
pause: 'hover',
|
||||||
wrap: true
|
wrap: true,
|
||||||
|
touch: true
|
||||||
};
|
};
|
||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
interval: '(number|boolean)',
|
interval: '(number|boolean)',
|
||||||
keyboard: 'boolean',
|
keyboard: 'boolean',
|
||||||
slide: '(boolean|string)',
|
slide: '(boolean|string)',
|
||||||
pause: '(string|boolean)',
|
pause: '(string|boolean)',
|
||||||
wrap: 'boolean'
|
wrap: 'boolean',
|
||||||
|
touch: 'boolean'
|
||||||
};
|
};
|
||||||
var Direction = {
|
var Direction = {
|
||||||
NEXT: 'next',
|
NEXT: 'next',
|
||||||
|
@ -108,7 +109,15 @@
|
||||||
KEYDOWN: "keydown" + EVENT_KEY,
|
KEYDOWN: "keydown" + EVENT_KEY,
|
||||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||||
MOUSELEAVE: "mouseleave" + EVENT_KEY,
|
MOUSELEAVE: "mouseleave" + EVENT_KEY,
|
||||||
|
TOUCHSTART: "touchstart" + EVENT_KEY,
|
||||||
|
TOUCHMOVE: "touchmove" + EVENT_KEY,
|
||||||
TOUCHEND: "touchend" + EVENT_KEY,
|
TOUCHEND: "touchend" + EVENT_KEY,
|
||||||
|
POINTERDOWN: "pointerdown" + EVENT_KEY,
|
||||||
|
POINTERMOVE: "pointermove" + EVENT_KEY,
|
||||||
|
POINTERUP: "pointerup" + EVENT_KEY,
|
||||||
|
POINTERLEAVE: "pointerleave" + EVENT_KEY,
|
||||||
|
POINTERCANCEL: "pointercancel" + EVENT_KEY,
|
||||||
|
DRAG_START: "dragstart" + EVENT_KEY,
|
||||||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
|
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
|
||||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||||
};
|
};
|
||||||
|
@ -120,16 +129,22 @@
|
||||||
LEFT: 'carousel-item-left',
|
LEFT: 'carousel-item-left',
|
||||||
NEXT: 'carousel-item-next',
|
NEXT: 'carousel-item-next',
|
||||||
PREV: 'carousel-item-prev',
|
PREV: 'carousel-item-prev',
|
||||||
ITEM: 'carousel-item'
|
ITEM: 'carousel-item',
|
||||||
|
POINTER_EVENT: 'pointer-event'
|
||||||
};
|
};
|
||||||
var Selector = {
|
var Selector = {
|
||||||
ACTIVE: '.active',
|
ACTIVE: '.active',
|
||||||
ACTIVE_ITEM: '.active.carousel-item',
|
ACTIVE_ITEM: '.active.carousel-item',
|
||||||
ITEM: '.carousel-item',
|
ITEM: '.carousel-item',
|
||||||
|
ITEM_IMG: '.carousel-item img',
|
||||||
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
|
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
|
||||||
INDICATORS: '.carousel-indicators',
|
INDICATORS: '.carousel-indicators',
|
||||||
DATA_SLIDE: '[data-slide], [data-slide-to]',
|
DATA_SLIDE: '[data-slide], [data-slide-to]',
|
||||||
DATA_RIDE: '[data-ride="carousel"]'
|
DATA_RIDE: '[data-ride="carousel"]'
|
||||||
|
};
|
||||||
|
var PointerType = {
|
||||||
|
TOUCH: 'touch',
|
||||||
|
PEN: 'pen'
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Class Definition
|
* Class Definition
|
||||||
|
@ -148,9 +163,13 @@
|
||||||
this._isPaused = false;
|
this._isPaused = false;
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
this.touchTimeout = null;
|
this.touchTimeout = null;
|
||||||
|
this.touchStartX = 0;
|
||||||
|
this.touchDeltaX = 0;
|
||||||
this._config = this._getConfig(config);
|
this._config = this._getConfig(config);
|
||||||
this._element = $$$1(element)[0];
|
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);
|
||||||
|
|
||||||
this._addEventListeners();
|
this._addEventListeners();
|
||||||
} // Getters
|
} // Getters
|
||||||
|
@ -168,7 +187,7 @@
|
||||||
_proto.nextWhenVisible = function nextWhenVisible() {
|
_proto.nextWhenVisible = function nextWhenVisible() {
|
||||||
// Don't call next when the page isn't visible
|
// Don't call next when the page isn't visible
|
||||||
// or the carousel or its parent isn't visible
|
// or the carousel or its parent isn't visible
|
||||||
if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
|
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
|
||||||
this.next();
|
this.next();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -220,7 +239,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isSliding) {
|
if (this._isSliding) {
|
||||||
$$$1(this._element).one(Event.SLID, function () {
|
$(this._element).one(Event.SLID, function () {
|
||||||
return _this.to(index);
|
return _this.to(index);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -238,8 +257,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1(this._element).off(EVENT_KEY);
|
$(this._element).off(EVENT_KEY);
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._items = null;
|
this._items = null;
|
||||||
this._config = null;
|
this._config = null;
|
||||||
this._element = null;
|
this._element = null;
|
||||||
|
@ -257,23 +276,77 @@
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_proto._handleSwipe = function _handleSwipe() {
|
||||||
|
var absDeltax = Math.abs(this.touchDeltaX);
|
||||||
|
|
||||||
|
if (absDeltax <= SWIPE_THRESHOLD) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var direction = absDeltax / this.touchDeltaX; // swipe left
|
||||||
|
|
||||||
|
if (direction > 0) {
|
||||||
|
this.prev();
|
||||||
|
} // swipe right
|
||||||
|
|
||||||
|
|
||||||
|
if (direction < 0) {
|
||||||
|
this.next();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
_proto._addEventListeners = function _addEventListeners() {
|
_proto._addEventListeners = function _addEventListeners() {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._config.keyboard) {
|
if (this._config.keyboard) {
|
||||||
$$$1(this._element).on(Event.KEYDOWN, function (event) {
|
$(this._element).on(Event.KEYDOWN, function (event) {
|
||||||
return _this2._keydown(event);
|
return _this2._keydown(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover') {
|
if (this._config.pause === 'hover') {
|
||||||
$$$1(this._element).on(Event.MOUSEENTER, function (event) {
|
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||||
return _this2.pause(event);
|
return _this2.pause(event);
|
||||||
}).on(Event.MOUSELEAVE, function (event) {
|
}).on(Event.MOUSELEAVE, function (event) {
|
||||||
return _this2.cycle(event);
|
return _this2.cycle(event);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
this._addTouchEventListeners();
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||||
|
var _this3 = this;
|
||||||
|
|
||||||
|
if (!this._touchSupported) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var start = function start(event) {
|
||||||
|
if (_this3._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
|
||||||
|
_this3.touchStartX = event.originalEvent.clientX;
|
||||||
|
} else if (!_this3._pointerEvent) {
|
||||||
|
_this3.touchStartX = event.originalEvent.touches[0].clientX;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var move = function move(event) {
|
||||||
|
// ensure swiping with one touch and not pinching
|
||||||
|
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||||
|
_this3.touchDeltaX = 0;
|
||||||
|
} else {
|
||||||
|
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var end = function end(event) {
|
||||||
|
if (_this3._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
|
||||||
|
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
|
||||||
|
}
|
||||||
|
|
||||||
|
_this3._handleSwipe();
|
||||||
|
|
||||||
|
if (_this3._config.pause === 'hover') {
|
||||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
// part of the mouse compatibility events on first tap - the carousel
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
// would stop cycling until user tapped out of it;
|
// would stop cycling until user tapped out of it;
|
||||||
|
@ -281,18 +354,41 @@
|
||||||
// (as if it's the second time we tap on it, mouseenter compat event
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
// events to fire) we explicitly restart cycling
|
// events to fire) we explicitly restart cycling
|
||||||
$$$1(this._element).on(Event.TOUCHEND, function () {
|
_this3.pause();
|
||||||
_this2.pause();
|
|
||||||
|
|
||||||
if (_this2.touchTimeout) {
|
if (_this3.touchTimeout) {
|
||||||
clearTimeout(_this2.touchTimeout);
|
clearTimeout(_this3.touchTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
_this2.touchTimeout = setTimeout(function (event) {
|
_this3.touchTimeout = setTimeout(function (event) {
|
||||||
return _this2.cycle(event);
|
return _this3.cycle(event);
|
||||||
}, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
|
}, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(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) {
|
||||||
|
return start(event);
|
||||||
|
});
|
||||||
|
$(this._element).on(Event.POINTERUP, function (event) {
|
||||||
|
return end(event);
|
||||||
|
});
|
||||||
|
|
||||||
|
this._element.classList.add(ClassName.POINTER_EVENT);
|
||||||
|
} else {
|
||||||
|
$(this._element).on(Event.TOUCHSTART, function (event) {
|
||||||
|
return start(event);
|
||||||
|
});
|
||||||
|
$(this._element).on(Event.TOUCHMOVE, function (event) {
|
||||||
|
return move(event);
|
||||||
|
});
|
||||||
|
$(this._element).on(Event.TOUCHEND, function (event) {
|
||||||
|
return end(event);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -344,31 +440,31 @@
|
||||||
|
|
||||||
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
|
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
|
||||||
|
|
||||||
var slideEvent = $$$1.Event(Event.SLIDE, {
|
var slideEvent = $.Event(Event.SLIDE, {
|
||||||
relatedTarget: relatedTarget,
|
relatedTarget: relatedTarget,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: fromIndex,
|
from: fromIndex,
|
||||||
to: targetIndex
|
to: targetIndex
|
||||||
});
|
});
|
||||||
$$$1(this._element).trigger(slideEvent);
|
$(this._element).trigger(slideEvent);
|
||||||
return slideEvent;
|
return slideEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||||
if (this._indicatorsElement) {
|
if (this._indicatorsElement) {
|
||||||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
|
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
|
||||||
$$$1(indicators).removeClass(ClassName.ACTIVE);
|
$(indicators).removeClass(ClassName.ACTIVE);
|
||||||
|
|
||||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||||
|
|
||||||
if (nextIndicator) {
|
if (nextIndicator) {
|
||||||
$$$1(nextIndicator).addClass(ClassName.ACTIVE);
|
$(nextIndicator).addClass(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._slide = function _slide(direction, element) {
|
_proto._slide = function _slide(direction, element) {
|
||||||
var _this3 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
|
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
|
||||||
|
|
||||||
|
@ -393,7 +489,7 @@
|
||||||
eventDirectionName = Direction.RIGHT;
|
eventDirectionName = Direction.RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
|
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -417,18 +513,18 @@
|
||||||
|
|
||||||
this._setActiveIndicatorElement(nextElement);
|
this._setActiveIndicatorElement(nextElement);
|
||||||
|
|
||||||
var slidEvent = $$$1.Event(Event.SLID, {
|
var slidEvent = $.Event(Event.SLID, {
|
||||||
relatedTarget: nextElement,
|
relatedTarget: nextElement,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: activeElementIndex,
|
from: activeElementIndex,
|
||||||
to: nextElementIndex
|
to: nextElementIndex
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
|
if ($(this._element).hasClass(ClassName.SLIDE)) {
|
||||||
$$$1(nextElement).addClass(orderClassName);
|
$(nextElement).addClass(orderClassName);
|
||||||
Util.reflow(nextElement);
|
Util.reflow(nextElement);
|
||||||
$$$1(activeElement).addClass(directionalClassName);
|
$(activeElement).addClass(directionalClassName);
|
||||||
$$$1(nextElement).addClass(directionalClassName);
|
$(nextElement).addClass(directionalClassName);
|
||||||
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
||||||
|
|
||||||
if (nextElementInterval) {
|
if (nextElementInterval) {
|
||||||
|
@ -439,19 +535,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
|
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
|
||||||
$$$1(activeElement).one(Util.TRANSITION_END, function () {
|
$(activeElement).one(Util.TRANSITION_END, function () {
|
||||||
$$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
|
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
|
||||||
$$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
|
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||||
_this3._isSliding = false;
|
_this4._isSliding = false;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
return $$$1(_this3._element).trigger(slidEvent);
|
return $(_this4._element).trigger(slidEvent);
|
||||||
}, 0);
|
}, 0);
|
||||||
}).emulateTransitionEnd(transitionDuration);
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
$$$1(activeElement).removeClass(ClassName.ACTIVE);
|
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||||
$$$1(nextElement).addClass(ClassName.ACTIVE);
|
$(nextElement).addClass(ClassName.ACTIVE);
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
$$$1(this._element).trigger(slidEvent);
|
$(this._element).trigger(slidEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCycling) {
|
if (isCycling) {
|
||||||
|
@ -462,9 +558,9 @@
|
||||||
|
|
||||||
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _objectSpread({}, Default, $$$1(this).data());
|
var _config = _objectSpread({}, Default, $(this).data());
|
||||||
|
|
||||||
if (typeof config === 'object') {
|
if (typeof config === 'object') {
|
||||||
_config = _objectSpread({}, _config, config);
|
_config = _objectSpread({}, _config, config);
|
||||||
|
@ -474,7 +570,7 @@
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Carousel(this, _config);
|
data = new Carousel(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'number') {
|
if (typeof config === 'number') {
|
||||||
|
@ -499,13 +595,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target = $$$1(selector)[0];
|
var target = $(selector)[0];
|
||||||
|
|
||||||
if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
|
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
|
var config = _objectSpread({}, $(target).data(), $(this).data());
|
||||||
|
|
||||||
var slideIndex = this.getAttribute('data-slide-to');
|
var slideIndex = this.getAttribute('data-slide-to');
|
||||||
|
|
||||||
|
@ -513,10 +609,10 @@
|
||||||
config.interval = false;
|
config.interval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Carousel._jQueryInterface.call($$$1(target), config);
|
Carousel._jQueryInterface.call($(target), config);
|
||||||
|
|
||||||
if (slideIndex) {
|
if (slideIndex) {
|
||||||
$$$1(target).data(DATA_KEY).to(slideIndex);
|
$(target).data(DATA_KEY).to(slideIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -543,12 +639,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||||
$$$1(window).on(Event.LOAD_DATA_API, function () {
|
$(window).on(Event.LOAD_DATA_API, function () {
|
||||||
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
|
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
|
||||||
|
|
||||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||||
var $carousel = $$$1(carousels[i]);
|
var $carousel = $(carousels[i]);
|
||||||
|
|
||||||
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
||||||
}
|
}
|
||||||
|
@ -559,17 +655,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Carousel._jQueryInterface;
|
$.fn[NAME] = Carousel._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Carousel;
|
$.fn[NAME].Constructor = Carousel;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Carousel._jQueryInterface;
|
return Carousel._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Carousel;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap collapse.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -64,18 +69,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Collapse = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'collapse';
|
var NAME = 'collapse';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.collapse';
|
var DATA_KEY = 'bs.collapse';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var Default = {
|
var Default = {
|
||||||
toggle: true,
|
toggle: true,
|
||||||
parent: ''
|
parent: ''
|
||||||
|
@ -119,7 +124,7 @@
|
||||||
this._isTransitioning = false;
|
this._isTransitioning = false;
|
||||||
this._element = element;
|
this._element = element;
|
||||||
this._config = this._getConfig(config);
|
this._config = this._getConfig(config);
|
||||||
this._triggerArray = $$$1.makeArray(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
this._triggerArray = $.makeArray(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++) {
|
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||||
|
@ -152,7 +157,7 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
if ($$$1(this._element).hasClass(ClassName.SHOW)) {
|
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||||
this.hide();
|
this.hide();
|
||||||
} else {
|
} else {
|
||||||
this.show();
|
this.show();
|
||||||
|
@ -162,7 +167,7 @@
|
||||||
_proto.show = function show() {
|
_proto.show = function show() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
|
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,64 +189,64 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actives) {
|
if (actives) {
|
||||||
activesData = $$$1(actives).not(this._selector).data(DATA_KEY);
|
activesData = $(actives).not(this._selector).data(DATA_KEY);
|
||||||
|
|
||||||
if (activesData && activesData._isTransitioning) {
|
if (activesData && activesData._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = $$$1.Event(Event.SHOW);
|
var startEvent = $.Event(Event.SHOW);
|
||||||
$$$1(this._element).trigger(startEvent);
|
$(this._element).trigger(startEvent);
|
||||||
|
|
||||||
if (startEvent.isDefaultPrevented()) {
|
if (startEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actives) {
|
if (actives) {
|
||||||
Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');
|
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
|
||||||
|
|
||||||
if (!activesData) {
|
if (!activesData) {
|
||||||
$$$1(actives).data(DATA_KEY, null);
|
$(actives).data(DATA_KEY, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var dimension = this._getDimension();
|
var dimension = this._getDimension();
|
||||||
|
|
||||||
$$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
||||||
this._element.style[dimension] = 0;
|
this._element.style[dimension] = 0;
|
||||||
|
|
||||||
if (this._triggerArray.length) {
|
if (this._triggerArray.length) {
|
||||||
$$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
|
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setTransitioning(true);
|
this.setTransitioning(true);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
$$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
|
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
|
||||||
_this._element.style[dimension] = '';
|
_this._element.style[dimension] = '';
|
||||||
|
|
||||||
_this.setTransitioning(false);
|
_this.setTransitioning(false);
|
||||||
|
|
||||||
$$$1(_this._element).trigger(Event.SHOWN);
|
$(_this._element).trigger(Event.SHOWN);
|
||||||
};
|
};
|
||||||
|
|
||||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||||
var scrollSize = "scroll" + capitalizedDimension;
|
var scrollSize = "scroll" + capitalizedDimension;
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||||
$$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.hide = function hide() {
|
_proto.hide = function hide() {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
|
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = $$$1.Event(Event.HIDE);
|
var startEvent = $.Event(Event.HIDE);
|
||||||
$$$1(this._element).trigger(startEvent);
|
$(this._element).trigger(startEvent);
|
||||||
|
|
||||||
if (startEvent.isDefaultPrevented()) {
|
if (startEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
|
@ -251,7 +256,7 @@
|
||||||
|
|
||||||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||||
Util.reflow(this._element);
|
Util.reflow(this._element);
|
||||||
$$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
||||||
var triggerArrayLength = this._triggerArray.length;
|
var triggerArrayLength = this._triggerArray.length;
|
||||||
|
|
||||||
if (triggerArrayLength > 0) {
|
if (triggerArrayLength > 0) {
|
||||||
|
@ -260,10 +265,10 @@
|
||||||
var selector = Util.getSelectorFromElement(trigger);
|
var selector = Util.getSelectorFromElement(trigger);
|
||||||
|
|
||||||
if (selector !== null) {
|
if (selector !== null) {
|
||||||
var $elem = $$$1([].slice.call(document.querySelectorAll(selector)));
|
var $elem = $([].slice.call(document.querySelectorAll(selector)));
|
||||||
|
|
||||||
if (!$elem.hasClass(ClassName.SHOW)) {
|
if (!$elem.hasClass(ClassName.SHOW)) {
|
||||||
$$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,12 +279,12 @@
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
_this2.setTransitioning(false);
|
_this2.setTransitioning(false);
|
||||||
|
|
||||||
$$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
||||||
};
|
};
|
||||||
|
|
||||||
this._element.style[dimension] = '';
|
this._element.style[dimension] = '';
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||||
$$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
||||||
|
@ -287,7 +292,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._config = null;
|
this._config = null;
|
||||||
this._parent = null;
|
this._parent = null;
|
||||||
this._element = null;
|
this._element = null;
|
||||||
|
@ -305,7 +310,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getDimension = function _getDimension() {
|
_proto._getDimension = function _getDimension() {
|
||||||
var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);
|
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
|
||||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -326,17 +331,17 @@
|
||||||
|
|
||||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
|
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
|
||||||
var children = [].slice.call(parent.querySelectorAll(selector));
|
var children = [].slice.call(parent.querySelectorAll(selector));
|
||||||
$$$1(children).each(function (i, element) {
|
$(children).each(function (i, element) {
|
||||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||||
});
|
});
|
||||||
return parent;
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||||
var isOpen = $$$1(element).hasClass(ClassName.SHOW);
|
var isOpen = $(element).hasClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (triggerArray.length) {
|
if (triggerArray.length) {
|
||||||
$$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||||
}
|
}
|
||||||
}; // Static
|
}; // Static
|
||||||
|
|
||||||
|
@ -348,7 +353,7 @@
|
||||||
|
|
||||||
Collapse._jQueryInterface = function _jQueryInterface(config) {
|
Collapse._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var $this = $$$1(this);
|
var $this = $(this);
|
||||||
var data = $this.data(DATA_KEY);
|
var data = $this.data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
|
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
|
||||||
|
@ -393,17 +398,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(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
|
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||||
if (event.currentTarget.tagName === 'A') {
|
if (event.currentTarget.tagName === 'A') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
var $trigger = $$$1(this);
|
var $trigger = $(this);
|
||||||
var selector = Util.getSelectorFromElement(this);
|
var selector = Util.getSelectorFromElement(this);
|
||||||
var selectors = [].slice.call(document.querySelectorAll(selector));
|
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||||
$$$1(selectors).each(function () {
|
$(selectors).each(function () {
|
||||||
var $target = $$$1(this);
|
var $target = $(this);
|
||||||
var data = $target.data(DATA_KEY);
|
var data = $target.data(DATA_KEY);
|
||||||
var config = data ? 'toggle' : $trigger.data();
|
var config = data ? 'toggle' : $trigger.data();
|
||||||
|
|
||||||
|
@ -416,17 +421,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Collapse._jQueryInterface;
|
$.fn[NAME] = Collapse._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Collapse;
|
$.fn[NAME].Constructor = Collapse;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Collapse._jQueryInterface;
|
return Collapse._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Collapse;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap dropdown.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||||
|
@ -65,18 +70,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Dropdown = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'dropdown';
|
var NAME = 'dropdown';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.dropdown';
|
var DATA_KEY = 'bs.dropdown';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||||
|
|
||||||
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
|
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
|
||||||
|
@ -166,13 +171,13 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
|
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = Dropdown._getParentFromElement(this._element);
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
var isActive = $$$1(this._menu).hasClass(ClassName.SHOW);
|
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||||
|
|
||||||
Dropdown._clearMenus();
|
Dropdown._clearMenus();
|
||||||
|
|
||||||
|
@ -183,8 +188,8 @@
|
||||||
var relatedTarget = {
|
var relatedTarget = {
|
||||||
relatedTarget: this._element
|
relatedTarget: this._element
|
||||||
};
|
};
|
||||||
var showEvent = $$$1.Event(Event.SHOW, relatedTarget);
|
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||||
$$$1(parent).trigger(showEvent);
|
$(parent).trigger(showEvent);
|
||||||
|
|
||||||
if (showEvent.isDefaultPrevented()) {
|
if (showEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
|
@ -197,7 +202,7 @@
|
||||||
* Popper - https://popper.js.org
|
* Popper - https://popper.js.org
|
||||||
*/
|
*/
|
||||||
if (typeof Popper === 'undefined') {
|
if (typeof Popper === 'undefined') {
|
||||||
throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)');
|
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
|
||||||
}
|
}
|
||||||
|
|
||||||
var referenceElement = this._element;
|
var referenceElement = this._element;
|
||||||
|
@ -216,7 +221,7 @@
|
||||||
|
|
||||||
|
|
||||||
if (this._config.boundary !== 'scrollParent') {
|
if (this._config.boundary !== 'scrollParent') {
|
||||||
$$$1(parent).addClass(ClassName.POSITION_STATIC);
|
$(parent).addClass(ClassName.POSITION_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
|
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
|
||||||
|
@ -226,21 +231,65 @@
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) {
|
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {
|
||||||
$$$1(document.body).children().on('mouseover', null, $$$1.noop);
|
$(document.body).children().on('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._element.focus();
|
this._element.focus();
|
||||||
|
|
||||||
this._element.setAttribute('aria-expanded', true);
|
this._element.setAttribute('aria-expanded', true);
|
||||||
|
|
||||||
$$$1(this._menu).toggleClass(ClassName.SHOW);
|
$(this._menu).toggleClass(ClassName.SHOW);
|
||||||
$$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget));
|
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.show = function show() {
|
||||||
|
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var relatedTarget = {
|
||||||
|
relatedTarget: this._element
|
||||||
|
};
|
||||||
|
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||||
|
|
||||||
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
|
$(parent).trigger(showEvent);
|
||||||
|
|
||||||
|
if (showEvent.isDefaultPrevented()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this._menu).toggleClass(ClassName.SHOW);
|
||||||
|
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.hide = function hide() {
|
||||||
|
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var relatedTarget = {
|
||||||
|
relatedTarget: this._element
|
||||||
|
};
|
||||||
|
var hideEvent = $.Event(Event.HIDE, relatedTarget);
|
||||||
|
|
||||||
|
var parent = Dropdown._getParentFromElement(this._element);
|
||||||
|
|
||||||
|
$(parent).trigger(hideEvent);
|
||||||
|
|
||||||
|
if (hideEvent.isDefaultPrevented()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this._menu).toggleClass(ClassName.SHOW);
|
||||||
|
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
$$$1(this._element).off(EVENT_KEY);
|
$(this._element).off(EVENT_KEY);
|
||||||
this._element = null;
|
this._element = null;
|
||||||
this._menu = null;
|
this._menu = null;
|
||||||
|
|
||||||
|
@ -263,7 +312,7 @@
|
||||||
_proto._addEventListeners = function _addEventListeners() {
|
_proto._addEventListeners = function _addEventListeners() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
$$$1(this._element).on(Event.CLICK, function (event) {
|
$(this._element).on(Event.CLICK, function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
@ -272,7 +321,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config);
|
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
|
||||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
@ -290,20 +339,20 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getPlacement = function _getPlacement() {
|
_proto._getPlacement = function _getPlacement() {
|
||||||
var $parentDropdown = $$$1(this._element.parentNode);
|
var $parentDropdown = $(this._element.parentNode);
|
||||||
var placement = AttachmentMap.BOTTOM; // Handle dropup
|
var placement = AttachmentMap.BOTTOM; // Handle dropup
|
||||||
|
|
||||||
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
|
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
|
||||||
placement = AttachmentMap.TOP;
|
placement = AttachmentMap.TOP;
|
||||||
|
|
||||||
if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
|
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||||
placement = AttachmentMap.TOPEND;
|
placement = AttachmentMap.TOPEND;
|
||||||
}
|
}
|
||||||
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
|
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
|
||||||
placement = AttachmentMap.RIGHT;
|
placement = AttachmentMap.RIGHT;
|
||||||
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
|
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
|
||||||
placement = AttachmentMap.LEFT;
|
placement = AttachmentMap.LEFT;
|
||||||
} else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
|
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
|
||||||
placement = AttachmentMap.BOTTOMEND;
|
placement = AttachmentMap.BOTTOMEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +360,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._detectNavbar = function _detectNavbar() {
|
_proto._detectNavbar = function _detectNavbar() {
|
||||||
return $$$1(this._element).closest('.navbar').length > 0;
|
return $(this._element).closest('.navbar').length > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getPopperConfig = function _getPopperConfig() {
|
_proto._getPopperConfig = function _getPopperConfig() {
|
||||||
|
@ -354,13 +403,13 @@
|
||||||
|
|
||||||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = typeof config === 'object' ? config : null;
|
var _config = typeof config === 'object' ? config : null;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Dropdown(this, _config);
|
data = new Dropdown(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
@ -383,7 +432,7 @@
|
||||||
for (var i = 0, len = toggles.length; i < len; i++) {
|
for (var i = 0, len = toggles.length; i < len; i++) {
|
||||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||||
|
|
||||||
var context = $$$1(toggles[i]).data(DATA_KEY);
|
var context = $(toggles[i]).data(DATA_KEY);
|
||||||
var relatedTarget = {
|
var relatedTarget = {
|
||||||
relatedTarget: toggles[i]
|
relatedTarget: toggles[i]
|
||||||
};
|
};
|
||||||
|
@ -398,16 +447,16 @@
|
||||||
|
|
||||||
var dropdownMenu = context._menu;
|
var dropdownMenu = context._menu;
|
||||||
|
|
||||||
if (!$$$1(parent).hasClass(ClassName.SHOW)) {
|
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) {
|
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideEvent = $$$1.Event(Event.HIDE, relatedTarget);
|
var hideEvent = $.Event(Event.HIDE, relatedTarget);
|
||||||
$$$1(parent).trigger(hideEvent);
|
$(parent).trigger(hideEvent);
|
||||||
|
|
||||||
if (hideEvent.isDefaultPrevented()) {
|
if (hideEvent.isDefaultPrevented()) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -416,12 +465,12 @@
|
||||||
|
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$$$1(document.body).children().off('mouseover', null, $$$1.noop);
|
$(document.body).children().off('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggles[i].setAttribute('aria-expanded', 'false');
|
toggles[i].setAttribute('aria-expanded', 'false');
|
||||||
$$$1(dropdownMenu).removeClass(ClassName.SHOW);
|
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||||
$$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget));
|
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -445,28 +494,28 @@
|
||||||
// - If key is other than escape
|
// - If key is other than escape
|
||||||
// - If key is not up or down => not a dropdown command
|
// - If key is not up or down => not a dropdown command
|
||||||
// - If trigger inside the menu => not a dropdown command
|
// - If trigger inside the menu => not a dropdown command
|
||||||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) {
|
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parent = Dropdown._getParentFromElement(this);
|
var parent = Dropdown._getParentFromElement(this);
|
||||||
|
|
||||||
var isActive = $$$1(parent).hasClass(ClassName.SHOW);
|
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||||
if (event.which === ESCAPE_KEYCODE) {
|
if (event.which === ESCAPE_KEYCODE) {
|
||||||
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
|
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
|
||||||
$$$1(toggle).trigger('focus');
|
$(toggle).trigger('focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this).trigger('click');
|
$(this).trigger('click');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,11 +570,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(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.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
Dropdown._jQueryInterface.call($$$1(this), 'toggle');
|
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();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
|
@ -535,17 +584,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Dropdown._jQueryInterface;
|
$.fn[NAME] = Dropdown._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Dropdown;
|
$.fn[NAME].Constructor = Dropdown;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Dropdown._jQueryInterface;
|
return Dropdown._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Dropdown;
|
|
||||||
}($, Popper);
|
|
||||||
|
|
||||||
return Dropdown;
|
return Dropdown;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap modal.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -64,18 +69,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Modal = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'modal';
|
var NAME = 'modal';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.modal';
|
var DATA_KEY = 'bs.modal';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||||
|
|
||||||
var Default = {
|
var Default = {
|
||||||
|
@ -135,6 +140,7 @@
|
||||||
this._isShown = false;
|
this._isShown = false;
|
||||||
this._isBodyOverflowing = false;
|
this._isBodyOverflowing = false;
|
||||||
this._ignoreBackdropClick = false;
|
this._ignoreBackdropClick = false;
|
||||||
|
this._isTransitioning = false;
|
||||||
this._scrollbarWidth = 0;
|
this._scrollbarWidth = 0;
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
@ -149,18 +155,18 @@
|
||||||
_proto.show = function show(relatedTarget) {
|
_proto.show = function show(relatedTarget) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._isTransitioning || this._isShown) {
|
if (this._isShown || this._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($$$1(this._element).hasClass(ClassName.FADE)) {
|
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||||
this._isTransitioning = true;
|
this._isTransitioning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var showEvent = $$$1.Event(Event.SHOW, {
|
var showEvent = $.Event(Event.SHOW, {
|
||||||
relatedTarget: relatedTarget
|
relatedTarget: relatedTarget
|
||||||
});
|
});
|
||||||
$$$1(this._element).trigger(showEvent);
|
$(this._element).trigger(showEvent);
|
||||||
|
|
||||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
|
@ -174,18 +180,18 @@
|
||||||
|
|
||||||
this._adjustDialog();
|
this._adjustDialog();
|
||||||
|
|
||||||
$$$1(document.body).addClass(ClassName.OPEN);
|
$(document.body).addClass(ClassName.OPEN);
|
||||||
|
|
||||||
this._setEscapeEvent();
|
this._setEscapeEvent();
|
||||||
|
|
||||||
this._setResizeEvent();
|
this._setResizeEvent();
|
||||||
|
|
||||||
$$$1(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);
|
return _this.hide(event);
|
||||||
});
|
});
|
||||||
$$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
||||||
$$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||||
if ($$$1(event.target).is(_this._element)) {
|
if ($(event.target).is(_this._element)) {
|
||||||
_this._ignoreBackdropClick = true;
|
_this._ignoreBackdropClick = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -203,19 +209,19 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isTransitioning || !this._isShown) {
|
if (!this._isShown || this._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideEvent = $$$1.Event(Event.HIDE);
|
var hideEvent = $.Event(Event.HIDE);
|
||||||
$$$1(this._element).trigger(hideEvent);
|
$(this._element).trigger(hideEvent);
|
||||||
|
|
||||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._isShown = false;
|
this._isShown = false;
|
||||||
var transition = $$$1(this._element).hasClass(ClassName.FADE);
|
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
this._isTransitioning = true;
|
this._isTransitioning = true;
|
||||||
|
@ -225,14 +231,14 @@
|
||||||
|
|
||||||
this._setResizeEvent();
|
this._setResizeEvent();
|
||||||
|
|
||||||
$$$1(document).off(Event.FOCUSIN);
|
$(document).off(Event.FOCUSIN);
|
||||||
$$$1(this._element).removeClass(ClassName.SHOW);
|
$(this._element).removeClass(ClassName.SHOW);
|
||||||
$$$1(this._element).off(Event.CLICK_DISMISS);
|
$(this._element).off(Event.CLICK_DISMISS);
|
||||||
$$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||||
$$$1(this._element).one(Util.TRANSITION_END, function (event) {
|
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||||
return _this2._hideModal(event);
|
return _this2._hideModal(event);
|
||||||
}).emulateTransitionEnd(transitionDuration);
|
}).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
|
@ -241,8 +247,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
||||||
$$$1(window, document, this._element, this._backdrop).off(EVENT_KEY);
|
return $(htmlElement).off(EVENT_KEY);
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* `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
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).off(Event.FOCUSIN);
|
||||||
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._config = null;
|
this._config = null;
|
||||||
this._element = null;
|
this._element = null;
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
|
@ -250,6 +265,7 @@
|
||||||
this._isShown = null;
|
this._isShown = null;
|
||||||
this._isBodyOverflowing = null;
|
this._isBodyOverflowing = null;
|
||||||
this._ignoreBackdropClick = null;
|
this._ignoreBackdropClick = null;
|
||||||
|
this._isTransitioning = null;
|
||||||
this._scrollbarWidth = null;
|
this._scrollbarWidth = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -267,7 +283,7 @@
|
||||||
_proto._showElement = function _showElement(relatedTarget) {
|
_proto._showElement = function _showElement(relatedTarget) {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var transition = $$$1(this._element).hasClass(ClassName.FADE);
|
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||||
|
|
||||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||||
// Don't move modal's DOM position
|
// Don't move modal's DOM position
|
||||||
|
@ -284,13 +300,13 @@
|
||||||
Util.reflow(this._element);
|
Util.reflow(this._element);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this._element).addClass(ClassName.SHOW);
|
$(this._element).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (this._config.focus) {
|
if (this._config.focus) {
|
||||||
this._enforceFocus();
|
this._enforceFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
var shownEvent = $$$1.Event(Event.SHOWN, {
|
var shownEvent = $.Event(Event.SHOWN, {
|
||||||
relatedTarget: relatedTarget
|
relatedTarget: relatedTarget
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -300,12 +316,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
_this3._isTransitioning = false;
|
_this3._isTransitioning = false;
|
||||||
$$$1(_this3._element).trigger(shownEvent);
|
$(_this3._element).trigger(shownEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (transition) {
|
if (transition) {
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
|
||||||
$$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
transitionComplete();
|
transitionComplete();
|
||||||
}
|
}
|
||||||
|
@ -314,9 +330,9 @@
|
||||||
_proto._enforceFocus = function _enforceFocus() {
|
_proto._enforceFocus = function _enforceFocus() {
|
||||||
var _this4 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
$$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop
|
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop
|
||||||
.on(Event.FOCUSIN, function (event) {
|
.on(Event.FOCUSIN, function (event) {
|
||||||
if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) {
|
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
|
||||||
_this4._element.focus();
|
_this4._element.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -326,7 +342,7 @@
|
||||||
var _this5 = this;
|
var _this5 = this;
|
||||||
|
|
||||||
if (this._isShown && this._config.keyboard) {
|
if (this._isShown && this._config.keyboard) {
|
||||||
$$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
||||||
if (event.which === ESCAPE_KEYCODE) {
|
if (event.which === ESCAPE_KEYCODE) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
@ -334,7 +350,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (!this._isShown) {
|
} else if (!this._isShown) {
|
||||||
$$$1(this._element).off(Event.KEYDOWN_DISMISS);
|
$(this._element).off(Event.KEYDOWN_DISMISS);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -342,11 +358,11 @@
|
||||||
var _this6 = this;
|
var _this6 = this;
|
||||||
|
|
||||||
if (this._isShown) {
|
if (this._isShown) {
|
||||||
$$$1(window).on(Event.RESIZE, function (event) {
|
$(window).on(Event.RESIZE, function (event) {
|
||||||
return _this6.handleUpdate(event);
|
return _this6.handleUpdate(event);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$$$1(window).off(Event.RESIZE);
|
$(window).off(Event.RESIZE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -360,19 +376,19 @@
|
||||||
this._isTransitioning = false;
|
this._isTransitioning = false;
|
||||||
|
|
||||||
this._showBackdrop(function () {
|
this._showBackdrop(function () {
|
||||||
$$$1(document.body).removeClass(ClassName.OPEN);
|
$(document.body).removeClass(ClassName.OPEN);
|
||||||
|
|
||||||
_this7._resetAdjustments();
|
_this7._resetAdjustments();
|
||||||
|
|
||||||
_this7._resetScrollbar();
|
_this7._resetScrollbar();
|
||||||
|
|
||||||
$$$1(_this7._element).trigger(Event.HIDDEN);
|
$(_this7._element).trigger(Event.HIDDEN);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._removeBackdrop = function _removeBackdrop() {
|
_proto._removeBackdrop = function _removeBackdrop() {
|
||||||
if (this._backdrop) {
|
if (this._backdrop) {
|
||||||
$$$1(this._backdrop).remove();
|
$(this._backdrop).remove();
|
||||||
this._backdrop = null;
|
this._backdrop = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -380,7 +396,7 @@
|
||||||
_proto._showBackdrop = function _showBackdrop(callback) {
|
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||||
var _this8 = this;
|
var _this8 = this;
|
||||||
|
|
||||||
var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||||
|
|
||||||
if (this._isShown && this._config.backdrop) {
|
if (this._isShown && this._config.backdrop) {
|
||||||
this._backdrop = document.createElement('div');
|
this._backdrop = document.createElement('div');
|
||||||
|
@ -390,8 +406,8 @@
|
||||||
this._backdrop.classList.add(animate);
|
this._backdrop.classList.add(animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this._backdrop).appendTo(document.body);
|
$(this._backdrop).appendTo(document.body);
|
||||||
$$$1(this._element).on(Event.CLICK_DISMISS, function (event) {
|
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||||
if (_this8._ignoreBackdropClick) {
|
if (_this8._ignoreBackdropClick) {
|
||||||
_this8._ignoreBackdropClick = false;
|
_this8._ignoreBackdropClick = false;
|
||||||
return;
|
return;
|
||||||
|
@ -412,7 +428,7 @@
|
||||||
Util.reflow(this._backdrop);
|
Util.reflow(this._backdrop);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this._backdrop).addClass(ClassName.SHOW);
|
$(this._backdrop).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
return;
|
return;
|
||||||
|
@ -424,9 +440,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||||
$$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||||
} else if (!this._isShown && this._backdrop) {
|
} else if (!this._isShown && this._backdrop) {
|
||||||
$$$1(this._backdrop).removeClass(ClassName.SHOW);
|
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||||
|
|
||||||
var callbackRemove = function callbackRemove() {
|
var callbackRemove = function callbackRemove() {
|
||||||
_this8._removeBackdrop();
|
_this8._removeBackdrop();
|
||||||
|
@ -436,10 +452,10 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($$$1(this._element).hasClass(ClassName.FADE)) {
|
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||||
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||||
|
|
||||||
$$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||||
} else {
|
} else {
|
||||||
callbackRemove();
|
callbackRemove();
|
||||||
}
|
}
|
||||||
|
@ -484,44 +500,44 @@
|
||||||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
||||||
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
|
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
|
||||||
|
|
||||||
$$$1(fixedContent).each(function (index, element) {
|
$(fixedContent).each(function (index, element) {
|
||||||
var actualPadding = element.style.paddingRight;
|
var actualPadding = element.style.paddingRight;
|
||||||
var calculatedPadding = $$$1(element).css('padding-right');
|
var calculatedPadding = $(element).css('padding-right');
|
||||||
$$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
|
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
|
||||||
}); // Adjust sticky content margin
|
}); // Adjust sticky content margin
|
||||||
|
|
||||||
$$$1(stickyContent).each(function (index, element) {
|
$(stickyContent).each(function (index, element) {
|
||||||
var actualMargin = element.style.marginRight;
|
var actualMargin = element.style.marginRight;
|
||||||
var calculatedMargin = $$$1(element).css('margin-right');
|
var calculatedMargin = $(element).css('margin-right');
|
||||||
$$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
|
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
|
||||||
}); // Adjust body padding
|
}); // Adjust body padding
|
||||||
|
|
||||||
var actualPadding = document.body.style.paddingRight;
|
var actualPadding = document.body.style.paddingRight;
|
||||||
var calculatedPadding = $$$1(document.body).css('padding-right');
|
var calculatedPadding = $(document.body).css('padding-right');
|
||||||
$$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._resetScrollbar = function _resetScrollbar() {
|
_proto._resetScrollbar = function _resetScrollbar() {
|
||||||
// Restore fixed content padding
|
// Restore fixed content padding
|
||||||
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
|
||||||
$$$1(fixedContent).each(function (index, element) {
|
$(fixedContent).each(function (index, element) {
|
||||||
var padding = $$$1(element).data('padding-right');
|
var padding = $(element).data('padding-right');
|
||||||
$$$1(element).removeData('padding-right');
|
$(element).removeData('padding-right');
|
||||||
element.style.paddingRight = padding ? padding : '';
|
element.style.paddingRight = padding ? padding : '';
|
||||||
}); // Restore sticky content
|
}); // Restore sticky content
|
||||||
|
|
||||||
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
|
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
|
||||||
$$$1(elements).each(function (index, element) {
|
$(elements).each(function (index, element) {
|
||||||
var margin = $$$1(element).data('margin-right');
|
var margin = $(element).data('margin-right');
|
||||||
|
|
||||||
if (typeof margin !== 'undefined') {
|
if (typeof margin !== 'undefined') {
|
||||||
$$$1(element).css('margin-right', margin).removeData('margin-right');
|
$(element).css('margin-right', margin).removeData('margin-right');
|
||||||
}
|
}
|
||||||
}); // Restore body padding
|
}); // Restore body padding
|
||||||
|
|
||||||
var padding = $$$1(document.body).data('padding-right');
|
var padding = $(document.body).data('padding-right');
|
||||||
$$$1(document.body).removeData('padding-right');
|
$(document.body).removeData('padding-right');
|
||||||
document.body.style.paddingRight = padding ? padding : '';
|
document.body.style.paddingRight = padding ? padding : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -538,13 +554,13 @@
|
||||||
|
|
||||||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = _objectSpread({}, Default, $$$1(this).data(), typeof config === 'object' && config ? config : {});
|
var _config = _objectSpread({}, Default, $(this).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Modal(this, _config);
|
data = new Modal(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
@ -580,7 +596,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||||
var _this10 = this;
|
var _this10 = this;
|
||||||
|
|
||||||
var target;
|
var target;
|
||||||
|
@ -590,26 +606,26 @@
|
||||||
target = document.querySelector(selector);
|
target = document.querySelector(selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data());
|
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
|
||||||
|
|
||||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
var $target = $$$1(target).one(Event.SHOW, function (showEvent) {
|
var $target = $(target).one(Event.SHOW, function (showEvent) {
|
||||||
if (showEvent.isDefaultPrevented()) {
|
if (showEvent.isDefaultPrevented()) {
|
||||||
// Only register focus restorer if modal will actually get shown
|
// Only register focus restorer if modal will actually get shown
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$target.one(Event.HIDDEN, function () {
|
$target.one(Event.HIDDEN, function () {
|
||||||
if ($$$1(_this10).is(':visible')) {
|
if ($(_this10).is(':visible')) {
|
||||||
_this10.focus();
|
_this10.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Modal._jQueryInterface.call($$$1(target), config, this);
|
Modal._jQueryInterface.call($(target), config, this);
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
|
@ -617,17 +633,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Modal._jQueryInterface;
|
$.fn[NAME] = Modal._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Modal;
|
$.fn[NAME].Constructor = Modal;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Modal._jQueryInterface;
|
return Modal._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Modal;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Modal;
|
return Modal;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap popover.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
|
||||||
|
@ -70,17 +75,17 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Popover = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'popover';
|
var NAME = 'popover';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.popover';
|
var DATA_KEY = 'bs.popover';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var CLASS_PREFIX = 'bs-popover';
|
var CLASS_PREFIX = 'bs-popover';
|
||||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||||
|
|
||||||
|
@ -139,16 +144,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||||
$$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.getTipElement = function getTipElement() {
|
_proto.getTipElement = function getTipElement() {
|
||||||
this.tip = this.tip || $$$1(this.config.template)[0];
|
this.tip = this.tip || $(this.config.template)[0];
|
||||||
return this.tip;
|
return this.tip;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.setContent = function setContent() {
|
_proto.setContent = function setContent() {
|
||||||
var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events
|
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
|
||||||
|
|
||||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
||||||
|
|
||||||
|
@ -168,7 +173,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._cleanTipClass = function _cleanTipClass() {
|
_proto._cleanTipClass = function _cleanTipClass() {
|
||||||
var $tip = $$$1(this.getTipElement());
|
var $tip = $(this.getTipElement());
|
||||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||||
|
|
||||||
if (tabClass !== null && tabClass.length > 0) {
|
if (tabClass !== null && tabClass.length > 0) {
|
||||||
|
@ -179,7 +184,7 @@
|
||||||
|
|
||||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = typeof config === 'object' ? config : null;
|
var _config = typeof config === 'object' ? config : null;
|
||||||
|
|
||||||
|
@ -189,7 +194,7 @@
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Popover(this, _config);
|
data = new Popover(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
@ -249,17 +254,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1.fn[NAME] = Popover._jQueryInterface;
|
$.fn[NAME] = Popover._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Popover;
|
$.fn[NAME].Constructor = Popover;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Popover._jQueryInterface;
|
return Popover._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Popover;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Popover;
|
return Popover;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap scrollspy.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -64,18 +69,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ScrollSpy = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'scrollspy';
|
var NAME = 'scrollspy';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.scrollspy';
|
var DATA_KEY = 'bs.scrollspy';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var Default = {
|
var Default = {
|
||||||
offset: 10,
|
offset: 10,
|
||||||
method: 'auto',
|
method: 'auto',
|
||||||
|
@ -132,7 +137,7 @@
|
||||||
this._targets = [];
|
this._targets = [];
|
||||||
this._activeTarget = null;
|
this._activeTarget = null;
|
||||||
this._scrollHeight = 0;
|
this._scrollHeight = 0;
|
||||||
$$$1(this._scrollElement).on(Event.SCROLL, function (event) {
|
$(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||||
return _this._process(event);
|
return _this._process(event);
|
||||||
});
|
});
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
@ -167,7 +172,7 @@
|
||||||
|
|
||||||
if (targetBCR.width || targetBCR.height) {
|
if (targetBCR.width || targetBCR.height) {
|
||||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||||
return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector];
|
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,8 +189,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
$$$1(this._scrollElement).off(EVENT_KEY);
|
$(this._scrollElement).off(EVENT_KEY);
|
||||||
this._element = null;
|
this._element = null;
|
||||||
this._scrollElement = null;
|
this._scrollElement = null;
|
||||||
this._config = null;
|
this._config = null;
|
||||||
|
@ -201,11 +206,11 @@
|
||||||
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
|
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (typeof config.target !== 'string') {
|
if (typeof config.target !== 'string') {
|
||||||
var id = $$$1(config.target).attr('id');
|
var id = $(config.target).attr('id');
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
id = Util.getUID(NAME);
|
id = Util.getUID(NAME);
|
||||||
$$$1(config.target).attr('id', id);
|
$(config.target).attr('id', id);
|
||||||
}
|
}
|
||||||
|
|
||||||
config.target = "#" + id;
|
config.target = "#" + id;
|
||||||
|
@ -278,7 +283,7 @@
|
||||||
queries = queries.map(function (selector) {
|
queries = queries.map(function (selector) {
|
||||||
return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
|
return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
|
||||||
});
|
});
|
||||||
var $link = $$$1([].slice.call(document.querySelectorAll(queries.join(','))));
|
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
|
||||||
|
|
||||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
||||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||||
|
@ -293,26 +298,26 @@
|
||||||
$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(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this._scrollElement).trigger(Event.ACTIVATE, {
|
$(this._scrollElement).trigger(Event.ACTIVATE, {
|
||||||
relatedTarget: target
|
relatedTarget: target
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._clear = function _clear() {
|
_proto._clear = function _clear() {
|
||||||
var nodes = [].slice.call(document.querySelectorAll(this._selector));
|
var nodes = [].slice.call(document.querySelectorAll(this._selector));
|
||||||
$$$1(nodes).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
|
$(nodes).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
|
||||||
}; // Static
|
}; // Static
|
||||||
|
|
||||||
|
|
||||||
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
|
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = typeof config === 'object' && config;
|
var _config = typeof config === 'object' && config;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new ScrollSpy(this, _config);
|
data = new ScrollSpy(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
@ -346,12 +351,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(window).on(Event.LOAD_DATA_API, function () {
|
$(window).on(Event.LOAD_DATA_API, function () {
|
||||||
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
|
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
|
||||||
var scrollSpysLength = scrollSpys.length;
|
var scrollSpysLength = scrollSpys.length;
|
||||||
|
|
||||||
for (var i = scrollSpysLength; i--;) {
|
for (var i = scrollSpysLength; i--;) {
|
||||||
var $spy = $$$1(scrollSpys[i]);
|
var $spy = $(scrollSpys[i]);
|
||||||
|
|
||||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||||
}
|
}
|
||||||
|
@ -362,17 +367,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = ScrollSpy._jQueryInterface;
|
$.fn[NAME] = ScrollSpy._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = ScrollSpy;
|
$.fn[NAME].Constructor = ScrollSpy;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return ScrollSpy._jQueryInterface;
|
return ScrollSpy._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return ScrollSpy;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return ScrollSpy;
|
return ScrollSpy;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap tab.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
@ -30,18 +35,18 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Tab = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'tab';
|
var NAME = 'tab';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.tab';
|
var DATA_KEY = 'bs.tab';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var Event = {
|
var Event = {
|
||||||
HIDE: "hide" + EVENT_KEY,
|
HIDE: "hide" + EVENT_KEY,
|
||||||
HIDDEN: "hidden" + EVENT_KEY,
|
HIDDEN: "hidden" + EVENT_KEY,
|
||||||
|
@ -86,33 +91,33 @@
|
||||||
_proto.show = function show() {
|
_proto.show = function show() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) {
|
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var target;
|
var target;
|
||||||
var previous;
|
var previous;
|
||||||
var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0];
|
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
|
||||||
var selector = Util.getSelectorFromElement(this._element);
|
var selector = Util.getSelectorFromElement(this._element);
|
||||||
|
|
||||||
if (listElement) {
|
if (listElement) {
|
||||||
var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||||
previous = $$$1.makeArray($$$1(listElement).find(itemSelector));
|
previous = $.makeArray($(listElement).find(itemSelector));
|
||||||
previous = previous[previous.length - 1];
|
previous = previous[previous.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideEvent = $$$1.Event(Event.HIDE, {
|
var hideEvent = $.Event(Event.HIDE, {
|
||||||
relatedTarget: this._element
|
relatedTarget: this._element
|
||||||
});
|
});
|
||||||
var showEvent = $$$1.Event(Event.SHOW, {
|
var showEvent = $.Event(Event.SHOW, {
|
||||||
relatedTarget: previous
|
relatedTarget: previous
|
||||||
});
|
});
|
||||||
|
|
||||||
if (previous) {
|
if (previous) {
|
||||||
$$$1(previous).trigger(hideEvent);
|
$(previous).trigger(hideEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this._element).trigger(showEvent);
|
$(this._element).trigger(showEvent);
|
||||||
|
|
||||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
|
@ -125,14 +130,14 @@
|
||||||
this._activate(this._element, listElement);
|
this._activate(this._element, listElement);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
var hiddenEvent = $$$1.Event(Event.HIDDEN, {
|
var hiddenEvent = $.Event(Event.HIDDEN, {
|
||||||
relatedTarget: _this._element
|
relatedTarget: _this._element
|
||||||
});
|
});
|
||||||
var shownEvent = $$$1.Event(Event.SHOWN, {
|
var shownEvent = $.Event(Event.SHOWN, {
|
||||||
relatedTarget: previous
|
relatedTarget: previous
|
||||||
});
|
});
|
||||||
$$$1(previous).trigger(hiddenEvent);
|
$(previous).trigger(hiddenEvent);
|
||||||
$$$1(_this._element).trigger(shownEvent);
|
$(_this._element).trigger(shownEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
|
@ -143,7 +148,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
$$$1.removeData(this._element, DATA_KEY);
|
$.removeData(this._element, DATA_KEY);
|
||||||
this._element = null;
|
this._element = null;
|
||||||
}; // Private
|
}; // Private
|
||||||
|
|
||||||
|
@ -153,14 +158,14 @@
|
||||||
|
|
||||||
var activeElements;
|
var activeElements;
|
||||||
|
|
||||||
if (container.nodeName === 'UL') {
|
if (container && container.nodeName === 'UL') {
|
||||||
activeElements = $$$1(container).find(Selector.ACTIVE_UL);
|
activeElements = $(container).find(Selector.ACTIVE_UL);
|
||||||
} else {
|
} else {
|
||||||
activeElements = $$$1(container).children(Selector.ACTIVE);
|
activeElements = $(container).children(Selector.ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
var active = activeElements[0];
|
var active = activeElements[0];
|
||||||
var isTransitioning = callback && active && $$$1(active).hasClass(ClassName.FADE);
|
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
return _this2._transitionComplete(element, active, callback);
|
return _this2._transitionComplete(element, active, callback);
|
||||||
|
@ -168,7 +173,7 @@
|
||||||
|
|
||||||
if (active && isTransitioning) {
|
if (active && isTransitioning) {
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(active);
|
var transitionDuration = Util.getTransitionDurationFromElement(active);
|
||||||
$$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
@ -176,11 +181,11 @@
|
||||||
|
|
||||||
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
|
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
|
||||||
if (active) {
|
if (active) {
|
||||||
$$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
|
$(active).removeClass(ClassName.ACTIVE);
|
||||||
var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||||
|
|
||||||
if (dropdownChild) {
|
if (dropdownChild) {
|
||||||
$$$1(dropdownChild).removeClass(ClassName.ACTIVE);
|
$(dropdownChild).removeClass(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (active.getAttribute('role') === 'tab') {
|
if (active.getAttribute('role') === 'tab') {
|
||||||
|
@ -188,21 +193,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(element).addClass(ClassName.ACTIVE);
|
$(element).addClass(ClassName.ACTIVE);
|
||||||
|
|
||||||
if (element.getAttribute('role') === 'tab') {
|
if (element.getAttribute('role') === 'tab') {
|
||||||
element.setAttribute('aria-selected', true);
|
element.setAttribute('aria-selected', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.reflow(element);
|
Util.reflow(element);
|
||||||
$$$1(element).addClass(ClassName.SHOW);
|
$(element).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||||
var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0];
|
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
|
||||||
|
|
||||||
if (dropdownElement) {
|
if (dropdownElement) {
|
||||||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
|
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
|
||||||
$$$1(dropdownToggleList).addClass(ClassName.ACTIVE);
|
$(dropdownToggleList).addClass(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
element.setAttribute('aria-expanded', true);
|
element.setAttribute('aria-expanded', true);
|
||||||
|
@ -216,7 +221,7 @@
|
||||||
|
|
||||||
Tab._jQueryInterface = function _jQueryInterface(config) {
|
Tab._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var $this = $$$1(this);
|
var $this = $(this);
|
||||||
var data = $this.data(DATA_KEY);
|
var data = $this.data(DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@ -250,10 +255,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
Tab._jQueryInterface.call($$$1(this), 'show');
|
Tab._jQueryInterface.call($(this), 'show');
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
|
@ -261,17 +266,14 @@
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$$$1.fn[NAME] = Tab._jQueryInterface;
|
$.fn[NAME] = Tab._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Tab;
|
$.fn[NAME].Constructor = Tab;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Tab._jQueryInterface;
|
return Tab._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Tab;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Tab;
|
return Tab;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,279 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap toast.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||||
|
(global.Toast = factory(global.jQuery,global.Util));
|
||||||
|
}(this, (function ($,Util) { 'use strict';
|
||||||
|
|
||||||
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||||
|
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||||
|
|
||||||
|
function _defineProperties(target, props) {
|
||||||
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperty(obj, key, value) {
|
||||||
|
if (key in obj) {
|
||||||
|
Object.defineProperty(obj, key, {
|
||||||
|
value: value,
|
||||||
|
enumerable: true,
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
obj[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _objectSpread(target) {
|
||||||
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
|
var source = arguments[i] != null ? arguments[i] : {};
|
||||||
|
var ownKeys = Object.keys(source);
|
||||||
|
|
||||||
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||||
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||||
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
ownKeys.forEach(function (key) {
|
||||||
|
_defineProperty(target, key, source[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Bootstrap (v4.1.3): toast.js
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
var Toast = function ($$$1) {
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Constants
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
var NAME = 'toast';
|
||||||
|
var VERSION = '4.1.3';
|
||||||
|
var DATA_KEY = 'bs.toast';
|
||||||
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
|
var JQUERY_NO_CONFLICT = $$$1.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'
|
||||||
|
};
|
||||||
|
var DefaultType = {
|
||||||
|
animation: 'boolean',
|
||||||
|
autohide: 'boolean',
|
||||||
|
delay: 'number'
|
||||||
|
};
|
||||||
|
var Default = {
|
||||||
|
animation: true,
|
||||||
|
autohide: true,
|
||||||
|
delay: 500
|
||||||
|
};
|
||||||
|
var Selector = {
|
||||||
|
DATA_DISMISS: '[data-dismiss="toast"]'
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Class Definition
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var Toast =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function () {
|
||||||
|
function Toast(element, config) {
|
||||||
|
this._element = element;
|
||||||
|
this._config = this._getConfig(config);
|
||||||
|
this._timeout = null;
|
||||||
|
|
||||||
|
this._setListeners();
|
||||||
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
var _proto = Toast.prototype;
|
||||||
|
|
||||||
|
// Public
|
||||||
|
_proto.show = function show() {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
$$$1(this._element).trigger(Event.SHOW);
|
||||||
|
|
||||||
|
if (this._config.animation) {
|
||||||
|
this._element.classList.add(ClassName.FADE);
|
||||||
|
}
|
||||||
|
|
||||||
|
var complete = function complete() {
|
||||||
|
$$$1(_this._element).trigger(Event.SHOWN);
|
||||||
|
|
||||||
|
if (_this._config.autohide) {
|
||||||
|
_this.hide();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this._element.classList.add(ClassName.SHOW);
|
||||||
|
|
||||||
|
if (this._config.animation) {
|
||||||
|
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||||
|
$$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
|
} else {
|
||||||
|
complete();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.hide = function hide(withoutTimeout) {
|
||||||
|
var _this2 = this;
|
||||||
|
|
||||||
|
if (!this._element.classList.contains(ClassName.SHOW)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$$$1(this._element).trigger(Event.HIDE);
|
||||||
|
|
||||||
|
if (withoutTimeout) {
|
||||||
|
this._close();
|
||||||
|
} else {
|
||||||
|
this._timeout = setTimeout(function () {
|
||||||
|
_this2._close();
|
||||||
|
}, this._config.delay);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.dispose = function dispose() {
|
||||||
|
clearTimeout(this._timeout);
|
||||||
|
this._timeout = null;
|
||||||
|
|
||||||
|
if (this._element.classList.contains(ClassName.SHOW)) {
|
||||||
|
this._element.classList.remove(ClassName.SHOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
$$$1(this._element).off(Event.CLICK_DISMISS);
|
||||||
|
$$$1.removeData(this._element, DATA_KEY);
|
||||||
|
this._element = null;
|
||||||
|
this._config = null;
|
||||||
|
}; // Private
|
||||||
|
|
||||||
|
|
||||||
|
_proto._getConfig = function _getConfig(config) {
|
||||||
|
config = _objectSpread({}, Default, $$$1(this._element).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto._setListeners = function _setListeners() {
|
||||||
|
var _this3 = this;
|
||||||
|
|
||||||
|
$$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
|
||||||
|
return _this3.hide(true);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto._close = function _close() {
|
||||||
|
var _this4 = this;
|
||||||
|
|
||||||
|
var complete = function complete() {
|
||||||
|
$$$1(_this4._element).trigger(Event.HIDDEN);
|
||||||
|
};
|
||||||
|
|
||||||
|
this._element.classList.remove(ClassName.SHOW);
|
||||||
|
|
||||||
|
if (this._config.animation) {
|
||||||
|
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||||
|
$$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
|
} else {
|
||||||
|
complete();
|
||||||
|
}
|
||||||
|
}; // Static
|
||||||
|
|
||||||
|
|
||||||
|
Toast._jQueryInterface = function _jQueryInterface(config) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $element = $$$1(this);
|
||||||
|
var data = $element.data(DATA_KEY);
|
||||||
|
|
||||||
|
var _config = typeof config === 'object' && config;
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
data = new Toast(this, _config);
|
||||||
|
$element.data(DATA_KEY, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof config === 'string') {
|
||||||
|
if (typeof data[config] === 'undefined') {
|
||||||
|
throw new TypeError("No method named \"" + config + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
data[config](this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
_createClass(Toast, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "DefaultType",
|
||||||
|
get: function get() {
|
||||||
|
return DefaultType;
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
return Toast;
|
||||||
|
}();
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* jQuery
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$$$1.fn[NAME] = Toast._jQueryInterface;
|
||||||
|
$$$1.fn[NAME].Constructor = Toast;
|
||||||
|
|
||||||
|
$$$1.fn[NAME].noConflict = function () {
|
||||||
|
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
|
return Toast._jQueryInterface;
|
||||||
|
};
|
||||||
|
|
||||||
|
return Toast;
|
||||||
|
}($);
|
||||||
|
|
||||||
|
return Toast;
|
||||||
|
|
||||||
|
})));
|
||||||
|
//# sourceMappingURL=toast.js.map
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap tooltip.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||||
|
@ -65,17 +70,17 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Tooltip = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'tooltip';
|
var NAME = 'tooltip';
|
||||||
var VERSION = '4.1.3';
|
var VERSION = '4.1.3';
|
||||||
var DATA_KEY = 'bs.tooltip';
|
var DATA_KEY = 'bs.tooltip';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||||
var CLASS_PREFIX = 'bs-tooltip';
|
var CLASS_PREFIX = 'bs-tooltip';
|
||||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||||
var DefaultType = {
|
var DefaultType = {
|
||||||
|
@ -160,7 +165,7 @@
|
||||||
* Popper - https://popper.js.org
|
* Popper - https://popper.js.org
|
||||||
*/
|
*/
|
||||||
if (typeof Popper === 'undefined') {
|
if (typeof Popper === 'undefined') {
|
||||||
throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
|
||||||
} // private
|
} // private
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,11 +205,11 @@
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
var dataKey = this.constructor.DATA_KEY;
|
var dataKey = this.constructor.DATA_KEY;
|
||||||
var context = $$$1(event.currentTarget).data(dataKey);
|
var context = $(event.currentTarget).data(dataKey);
|
||||||
|
|
||||||
if (!context) {
|
if (!context) {
|
||||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||||
$$$1(event.currentTarget).data(dataKey, context);
|
$(event.currentTarget).data(dataKey, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
context._activeTrigger.click = !context._activeTrigger.click;
|
context._activeTrigger.click = !context._activeTrigger.click;
|
||||||
|
@ -215,7 +220,7 @@
|
||||||
context._leave(null, context);
|
context._leave(null, context);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) {
|
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
|
||||||
this._leave(null, this);
|
this._leave(null, this);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -227,12 +232,12 @@
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
clearTimeout(this._timeout);
|
clearTimeout(this._timeout);
|
||||||
$$$1.removeData(this.element, this.constructor.DATA_KEY);
|
$.removeData(this.element, this.constructor.DATA_KEY);
|
||||||
$$$1(this.element).off(this.constructor.EVENT_KEY);
|
$(this.element).off(this.constructor.EVENT_KEY);
|
||||||
$$$1(this.element).closest('.modal').off('hide.bs.modal');
|
$(this.element).closest('.modal').off('hide.bs.modal');
|
||||||
|
|
||||||
if (this.tip) {
|
if (this.tip) {
|
||||||
$$$1(this.tip).remove();
|
$(this.tip).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._isEnabled = null;
|
this._isEnabled = null;
|
||||||
|
@ -253,15 +258,15 @@
|
||||||
_proto.show = function show() {
|
_proto.show = function show() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
if ($$$1(this.element).css('display') === 'none') {
|
if ($(this.element).css('display') === 'none') {
|
||||||
throw new Error('Please use show on visible elements');
|
throw new Error('Please use show on visible elements');
|
||||||
}
|
}
|
||||||
|
|
||||||
var showEvent = $$$1.Event(this.constructor.Event.SHOW);
|
var showEvent = $.Event(this.constructor.Event.SHOW);
|
||||||
|
|
||||||
if (this.isWithContent() && this._isEnabled) {
|
if (this.isWithContent() && this._isEnabled) {
|
||||||
$$$1(this.element).trigger(showEvent);
|
$(this.element).trigger(showEvent);
|
||||||
var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element);
|
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
|
||||||
|
|
||||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||||
return;
|
return;
|
||||||
|
@ -274,7 +279,7 @@
|
||||||
this.setContent();
|
this.setContent();
|
||||||
|
|
||||||
if (this.config.animation) {
|
if (this.config.animation) {
|
||||||
$$$1(tip).addClass(ClassName.FADE);
|
$(tip).addClass(ClassName.FADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||||
|
@ -282,14 +287,14 @@
|
||||||
var attachment = this._getAttachment(placement);
|
var attachment = this._getAttachment(placement);
|
||||||
|
|
||||||
this.addAttachmentClass(attachment);
|
this.addAttachmentClass(attachment);
|
||||||
var container = this.config.container === false ? document.body : $$$1(document).find(this.config.container);
|
var container = this.config.container === false ? document.body : $(document).find(this.config.container);
|
||||||
$$$1(tip).data(this.constructor.DATA_KEY, this);
|
$(tip).data(this.constructor.DATA_KEY, this);
|
||||||
|
|
||||||
if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||||
$$$1(tip).appendTo(container);
|
$(tip).appendTo(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(this.element).trigger(this.constructor.Event.INSERTED);
|
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||||
this._popper = new Popper(this.element, tip, {
|
this._popper = new Popper(this.element, tip, {
|
||||||
placement: attachment,
|
placement: attachment,
|
||||||
modifiers: {
|
modifiers: {
|
||||||
|
@ -315,13 +320,13 @@
|
||||||
_this._handlePopperPlacementChange(data);
|
_this._handlePopperPlacementChange(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
|
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
|
||||||
// empty mouseover listeners to the body's immediate children;
|
// empty mouseover listeners to the body's immediate children;
|
||||||
// only needed because of broken event delegation on iOS
|
// only needed because of broken event delegation on iOS
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$$$1(document.body).children().on('mouseover', null, $$$1.noop);
|
$(document.body).children().on('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
|
@ -331,16 +336,16 @@
|
||||||
|
|
||||||
var prevHoverState = _this._hoverState;
|
var prevHoverState = _this._hoverState;
|
||||||
_this._hoverState = null;
|
_this._hoverState = null;
|
||||||
$$$1(_this.element).trigger(_this.constructor.Event.SHOWN);
|
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
||||||
|
|
||||||
if (prevHoverState === HoverState.OUT) {
|
if (prevHoverState === HoverState.OUT) {
|
||||||
_this._leave(null, _this);
|
_this._leave(null, _this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($$$1(this.tip).hasClass(ClassName.FADE)) {
|
if ($(this.tip).hasClass(ClassName.FADE)) {
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
|
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
|
||||||
$$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
@ -351,7 +356,7 @@
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
var tip = this.getTipElement();
|
var tip = this.getTipElement();
|
||||||
var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
|
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||||
|
@ -362,7 +367,7 @@
|
||||||
|
|
||||||
_this2.element.removeAttribute('aria-describedby');
|
_this2.element.removeAttribute('aria-describedby');
|
||||||
|
|
||||||
$$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||||
|
|
||||||
if (_this2._popper !== null) {
|
if (_this2._popper !== null) {
|
||||||
_this2._popper.destroy();
|
_this2._popper.destroy();
|
||||||
|
@ -373,26 +378,26 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$$$1(this.element).trigger(hideEvent);
|
$(this.element).trigger(hideEvent);
|
||||||
|
|
||||||
if (hideEvent.isDefaultPrevented()) {
|
if (hideEvent.isDefaultPrevented()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
|
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
|
||||||
// empty mouseover listeners we added for iOS support
|
// empty mouseover listeners we added for iOS support
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$$$1(document.body).children().off('mouseover', null, $$$1.noop);
|
$(document.body).children().off('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._activeTrigger[Trigger.CLICK] = false;
|
this._activeTrigger[Trigger.CLICK] = false;
|
||||||
this._activeTrigger[Trigger.FOCUS] = false;
|
this._activeTrigger[Trigger.FOCUS] = false;
|
||||||
this._activeTrigger[Trigger.HOVER] = false;
|
this._activeTrigger[Trigger.HOVER] = false;
|
||||||
|
|
||||||
if ($$$1(this.tip).hasClass(ClassName.FADE)) {
|
if ($(this.tip).hasClass(ClassName.FADE)) {
|
||||||
var transitionDuration = Util.getTransitionDurationFromElement(tip);
|
var transitionDuration = Util.getTransitionDurationFromElement(tip);
|
||||||
$$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
@ -412,18 +417,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||||
$$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.getTipElement = function getTipElement() {
|
_proto.getTipElement = function getTipElement() {
|
||||||
this.tip = this.tip || $$$1(this.config.template)[0];
|
this.tip = this.tip || $(this.config.template)[0];
|
||||||
return this.tip;
|
return this.tip;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.setContent = function setContent() {
|
_proto.setContent = function setContent() {
|
||||||
var tip = this.getTipElement();
|
var tip = this.getTipElement();
|
||||||
this.setElementContent($$$1(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
|
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
|
||||||
$$$1(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
|
$(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.setElementContent = function setElementContent($element, content) {
|
_proto.setElementContent = function setElementContent($element, content) {
|
||||||
|
@ -432,11 +437,11 @@
|
||||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||||
// Content is a DOM node or a jQuery
|
// Content is a DOM node or a jQuery
|
||||||
if (html) {
|
if (html) {
|
||||||
if (!$$$1(content).parent().is($element)) {
|
if (!$(content).parent().is($element)) {
|
||||||
$element.empty().append(content);
|
$element.empty().append(content);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$element.text($$$1(content).text());
|
$element.text($(content).text());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$element[html ? 'html' : 'text'](content);
|
$element[html ? 'html' : 'text'](content);
|
||||||
|
@ -464,22 +469,23 @@
|
||||||
var triggers = this.config.trigger.split(' ');
|
var triggers = this.config.trigger.split(' ');
|
||||||
triggers.forEach(function (trigger) {
|
triggers.forEach(function (trigger) {
|
||||||
if (trigger === 'click') {
|
if (trigger === 'click') {
|
||||||
$$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
|
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
|
||||||
return _this3.toggle(event);
|
return _this3.toggle(event);
|
||||||
});
|
});
|
||||||
} else if (trigger !== Trigger.MANUAL) {
|
} else if (trigger !== Trigger.MANUAL) {
|
||||||
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
|
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
|
||||||
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
|
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
|
||||||
$$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) {
|
$(_this3.element).on(eventIn, _this3.config.selector, function (event) {
|
||||||
return _this3._enter(event);
|
return _this3._enter(event);
|
||||||
}).on(eventOut, _this3.config.selector, function (event) {
|
}).on(eventOut, _this3.config.selector, function (event) {
|
||||||
return _this3._leave(event);
|
return _this3._leave(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () {
|
|
||||||
return _this3.hide();
|
|
||||||
});
|
});
|
||||||
|
$(this.element).closest('.modal').on('hide.bs.modal', function () {
|
||||||
|
if (_this3.element) {
|
||||||
|
_this3.hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.config.selector) {
|
if (this.config.selector) {
|
||||||
|
@ -503,18 +509,18 @@
|
||||||
|
|
||||||
_proto._enter = function _enter(event, context) {
|
_proto._enter = function _enter(event, context) {
|
||||||
var dataKey = this.constructor.DATA_KEY;
|
var dataKey = this.constructor.DATA_KEY;
|
||||||
context = context || $$$1(event.currentTarget).data(dataKey);
|
context = context || $(event.currentTarget).data(dataKey);
|
||||||
|
|
||||||
if (!context) {
|
if (!context) {
|
||||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||||
$$$1(event.currentTarget).data(dataKey, context);
|
$(event.currentTarget).data(dataKey, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
|
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
|
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
|
||||||
context._hoverState = HoverState.SHOW;
|
context._hoverState = HoverState.SHOW;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -536,11 +542,11 @@
|
||||||
|
|
||||||
_proto._leave = function _leave(event, context) {
|
_proto._leave = function _leave(event, context) {
|
||||||
var dataKey = this.constructor.DATA_KEY;
|
var dataKey = this.constructor.DATA_KEY;
|
||||||
context = context || $$$1(event.currentTarget).data(dataKey);
|
context = context || $(event.currentTarget).data(dataKey);
|
||||||
|
|
||||||
if (!context) {
|
if (!context) {
|
||||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||||
$$$1(event.currentTarget).data(dataKey, context);
|
$(event.currentTarget).data(dataKey, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
|
@ -577,7 +583,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config === 'object' && config ? config : {});
|
config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
if (typeof config.delay === 'number') {
|
if (typeof config.delay === 'number') {
|
||||||
config.delay = {
|
config.delay = {
|
||||||
|
@ -613,7 +619,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._cleanTipClass = function _cleanTipClass() {
|
_proto._cleanTipClass = function _cleanTipClass() {
|
||||||
var $tip = $$$1(this.getTipElement());
|
var $tip = $(this.getTipElement());
|
||||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||||
|
|
||||||
if (tabClass !== null && tabClass.length) {
|
if (tabClass !== null && tabClass.length) {
|
||||||
|
@ -638,7 +644,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$$$1(tip).removeClass(ClassName.FADE);
|
$(tip).removeClass(ClassName.FADE);
|
||||||
this.config.animation = false;
|
this.config.animation = false;
|
||||||
this.hide();
|
this.hide();
|
||||||
this.show();
|
this.show();
|
||||||
|
@ -648,7 +654,7 @@
|
||||||
|
|
||||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = $$$1(this).data(DATA_KEY);
|
var data = $(this).data(DATA_KEY);
|
||||||
|
|
||||||
var _config = typeof config === 'object' && config;
|
var _config = typeof config === 'object' && config;
|
||||||
|
|
||||||
|
@ -658,7 +664,7 @@
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Tooltip(this, _config);
|
data = new Tooltip(this, _config);
|
||||||
$$$1(this).data(DATA_KEY, data);
|
$(this).data(DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof config === 'string') {
|
if (typeof config === 'string') {
|
||||||
|
@ -717,17 +723,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$$$1.fn[NAME] = Tooltip._jQueryInterface;
|
$.fn[NAME] = Tooltip._jQueryInterface;
|
||||||
$$$1.fn[NAME].Constructor = Tooltip;
|
$.fn[NAME].Constructor = Tooltip;
|
||||||
|
|
||||||
$$$1.fn[NAME].noConflict = function () {
|
$.fn[NAME].noConflict = function () {
|
||||||
$$$1.fn[NAME] = JQUERY_NO_CONFLICT;
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
return Tooltip._jQueryInterface;
|
return Tooltip._jQueryInterface;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Tooltip;
|
|
||||||
}($, Popper);
|
|
||||||
|
|
||||||
return Tooltip;
|
return Tooltip;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap util.js v4.1.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||||
|
@ -13,12 +18,12 @@
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Util = function ($$$1) {
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Private TransitionEnd Helpers
|
* Private TransitionEnd Helpers
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var TRANSITION_END = 'transitionend';
|
var TRANSITION_END = 'transitionend';
|
||||||
var MAX_UID = 1000000;
|
var MAX_UID = 1000000;
|
||||||
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
@ -32,7 +37,7 @@
|
||||||
bindType: TRANSITION_END,
|
bindType: TRANSITION_END,
|
||||||
delegateType: TRANSITION_END,
|
delegateType: TRANSITION_END,
|
||||||
handle: function handle(event) {
|
handle: function handle(event) {
|
||||||
if ($$$1(event.target).is(this)) {
|
if ($(event.target).is(this)) {
|
||||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +50,7 @@
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
var called = false;
|
var called = false;
|
||||||
$$$1(this).one(Util.TRANSITION_END, function () {
|
$(this).one(Util.TRANSITION_END, function () {
|
||||||
called = true;
|
called = true;
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -57,8 +62,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTransitionEndSupport() {
|
function setTransitionEndSupport() {
|
||||||
$$$1.fn.emulateTransitionEnd = transitionEndEmulator;
|
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||||
$$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
|
@ -93,22 +98,25 @@
|
||||||
} // Get transition-duration of the element
|
} // Get transition-duration of the element
|
||||||
|
|
||||||
|
|
||||||
var transitionDuration = $$$1(element).css('transition-duration');
|
var transitionDuration = $(element).css('transition-duration');
|
||||||
var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
|
var transitionDelay = $(element).css('transition-delay');
|
||||||
|
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||||
|
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||||
|
|
||||||
if (!floatTransitionDuration) {
|
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||||
return 0;
|
return 0;
|
||||||
} // If multiple durations are defined, take the first
|
} // If multiple durations are defined, take the first
|
||||||
|
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
transitionDuration = transitionDuration.split(',')[0];
|
||||||
return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
|
transitionDelay = transitionDelay.split(',')[0];
|
||||||
|
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||||
},
|
},
|
||||||
reflow: function reflow(element) {
|
reflow: function reflow(element) {
|
||||||
return element.offsetHeight;
|
return element.offsetHeight;
|
||||||
},
|
},
|
||||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||||
$$$1(element).trigger(TRANSITION_END);
|
$(element).trigger(TRANSITION_END);
|
||||||
},
|
},
|
||||||
// TODO: Remove in v5
|
// TODO: Remove in v5
|
||||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||||
|
@ -132,8 +140,6 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
setTransitionEndSupport();
|
setTransitionEndSupport();
|
||||||
return Util;
|
|
||||||
}($);
|
|
||||||
|
|
||||||
return Util;
|
return Util;
|
||||||
|
|
||||||
|
|
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 one or more lines are too long
Loading…
Reference in New Issue