aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-12 14:51:10 +0000
committerMario <mario@mariovavti.com>2019-12-12 14:51:10 +0000
commit544ef3bc588d4180d7ecad15bdacd43813a7c5c5 (patch)
tree62372d0af859287235f62f20d0cf55b5b5b1ace3 /vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
parent124cc4396247c75c14280136cfaa95415860ad4c (diff)
downloadvolse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.tar.gz
volse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.tar.bz2
volse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.zip
update composer libs and minor notifications display fixes
Diffstat (limited to 'vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js')
-rw-r--r--vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js739
1 files changed, 430 insertions, 309 deletions
diff --git a/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js b/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
index f4f23ead2..534452210 100644
--- a/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
+++ b/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap v4.3.1 (https://getbootstrap.com/)
+ * Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -7,7 +7,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
(global = global || self, factory(global.bootstrap = {}, global.jQuery));
-}(this, function (exports, $) { 'use strict';
+}(this, (function (exports, $) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
@@ -42,20 +42,35 @@
return obj;
}
- function _objectSpread(target) {
+ function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ keys.push.apply(keys, symbols);
+ }
+
+ return keys;
+ }
+
+ function _objectSpread2(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;
- }));
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ _defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+ });
}
-
- ownKeys.forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
}
return target;
@@ -69,7 +84,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.3.1): util.js
+ * Bootstrap (v4.4.1): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -218,8 +233,25 @@
}
return Util.findShadowRoot(element.parentNode);
+ },
+ jQueryDetection: function jQueryDetection() {
+ if (typeof $ === 'undefined') {
+ throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
+ }
+
+ var version = $.fn.jquery.split(' ')[0].split('.');
+ var minMajor = 1;
+ var ltMajor = 2;
+ var minMinor = 9;
+ var minPatch = 1;
+ var maxMajor = 4;
+
+ if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
+ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
+ }
}
};
+ Util.jQueryDetection();
setTransitionEndSupport();
/**
@@ -229,7 +261,7 @@
*/
var NAME = 'alert';
- var VERSION = '4.3.1';
+ var VERSION = '4.4.1';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -246,13 +278,12 @@
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Alert =
/*#__PURE__*/
@@ -394,7 +425,7 @@
*/
var NAME$1 = 'button';
- var VERSION$1 = '4.3.1';
+ var VERSION$1 = '4.4.1';
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
@@ -406,21 +437,23 @@
};
var Selector$1 = {
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
- DATA_TOGGLE: '[data-toggle="buttons"]',
+ DATA_TOGGLES: '[data-toggle="buttons"]',
+ DATA_TOGGLE: '[data-toggle="button"]',
+ DATA_TOGGLES_BUTTONS: '[data-toggle="buttons"] .btn',
INPUT: 'input:not([type="hidden"])',
ACTIVE: '.active',
BUTTON: '.btn'
};
var Event$1 = {
CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
- FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1)
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
+ FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1),
+ LOAD_DATA_API: "load" + EVENT_KEY$1 + DATA_API_KEY$1
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Button =
/*#__PURE__*/
@@ -436,7 +469,7 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
- var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
+ var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLES)[0];
if (rootElement) {
var input = this._element.querySelector(Selector$1.INPUT);
@@ -452,13 +485,16 @@
$(activeElement).removeClass(ClassName$1.ACTIVE);
}
}
+ } else if (input.type === 'checkbox') {
+ if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName$1.ACTIVE)) {
+ triggerChangeEvent = false;
+ }
+ } else {
+ // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
+ triggerChangeEvent = false;
}
if (triggerChangeEvent) {
- if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
- return;
- }
-
input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
$(input).trigger('change');
}
@@ -468,12 +504,14 @@
}
}
- if (addAriaPressed) {
- this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
- }
+ if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
+ if (addAriaPressed) {
+ this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
+ }
- if (triggerChangeEvent) {
- $(this._element).toggleClass(ClassName$1.ACTIVE);
+ if (triggerChangeEvent) {
+ $(this._element).toggleClass(ClassName$1.ACTIVE);
+ }
}
};
@@ -515,18 +553,58 @@
$(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
- event.preventDefault();
var button = event.target;
if (!$(button).hasClass(ClassName$1.BUTTON)) {
- button = $(button).closest(Selector$1.BUTTON);
+ button = $(button).closest(Selector$1.BUTTON)[0];
}
- Button._jQueryInterface.call($(button), 'toggle');
+ if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
+ event.preventDefault(); // work around Firefox bug #1540995
+ } else {
+ var inputBtn = button.querySelector(Selector$1.INPUT);
+
+ if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
+ event.preventDefault(); // work around Firefox bug #1540995
+
+ return;
+ }
+
+ Button._jQueryInterface.call($(button), 'toggle');
+ }
}).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(Selector$1.BUTTON)[0];
$(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
});
+ $(window).on(Event$1.LOAD_DATA_API, function () {
+ // ensure correct active class is set to match the controls' actual values/states
+ // find all checkboxes/readio buttons inside data-toggle groups
+ var buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLES_BUTTONS));
+
+ for (var i = 0, len = buttons.length; i < len; i++) {
+ var button = buttons[i];
+ var input = button.querySelector(Selector$1.INPUT);
+
+ if (input.checked || input.hasAttribute('checked')) {
+ button.classList.add(ClassName$1.ACTIVE);
+ } else {
+ button.classList.remove(ClassName$1.ACTIVE);
+ }
+ } // find all button toggles
+
+
+ buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLE));
+
+ for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
+ var _button = buttons[_i];
+
+ if (_button.getAttribute('aria-pressed') === 'true') {
+ _button.classList.add(ClassName$1.ACTIVE);
+ } else {
+ _button.classList.remove(ClassName$1.ACTIVE);
+ }
+ }
+ });
/**
* ------------------------------------------------------------------------
* jQuery
@@ -548,7 +626,7 @@
*/
var NAME$2 = 'carousel';
- var VERSION$2 = '4.3.1';
+ var VERSION$2 = '4.4.1';
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
@@ -621,13 +699,12 @@
var PointerType = {
TOUCH: 'touch',
PEN: 'pen'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Carousel =
/*#__PURE__*/
@@ -747,7 +824,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default, config);
+ config = _objectSpread2({}, Default, {}, config);
Util.typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@@ -759,7 +836,8 @@
return;
}
- var direction = absDeltax / this.touchDeltaX; // swipe left
+ var direction = absDeltax / this.touchDeltaX;
+ this.touchDeltaX = 0; // swipe left
if (direction > 0) {
this.prev();
@@ -885,8 +963,6 @@
event.preventDefault();
this.next();
break;
-
- default:
}
};
@@ -1038,10 +1114,10 @@
return this.each(function () {
var data = $(this).data(DATA_KEY$2);
- var _config = _objectSpread({}, Default, $(this).data());
+ var _config = _objectSpread2({}, Default, {}, $(this).data());
if (typeof config === 'object') {
- _config = _objectSpread({}, _config, config);
+ _config = _objectSpread2({}, _config, {}, config);
}
var action = typeof config === 'string' ? config : _config.slide;
@@ -1079,7 +1155,7 @@
return;
}
- var config = _objectSpread({}, $(target).data(), $(this).data());
+ var config = _objectSpread2({}, $(target).data(), {}, $(this).data());
var slideIndex = this.getAttribute('data-slide-to');
@@ -1148,7 +1224,7 @@
*/
var NAME$3 = 'collapse';
- var VERSION$3 = '4.3.1';
+ var VERSION$3 = '4.4.1';
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
@@ -1181,13 +1257,12 @@
var Selector$3 = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Collapse =
/*#__PURE__*/
@@ -1374,7 +1449,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default$1, config);
+ config = _objectSpread2({}, Default$1, {}, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME$3, config, DefaultType$1);
@@ -1428,7 +1503,7 @@
var $this = $(this);
var data = $this.data(DATA_KEY$3);
- var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
+ var _config = _objectSpread2({}, Default$1, {}, $this.data(), {}, typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
@@ -1503,7 +1578,7 @@
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
- * @version 1.14.7
+ * @version 1.16.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
@@ -1525,16 +1600,17 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
- var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
-
- var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
- var timeoutDuration = 0;
- for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
- if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
- timeoutDuration = 1;
- break;
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
+
+ var timeoutDuration = function () {
+ var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
+ for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
+ if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
+ return 1;
+ }
}
- }
+ return 0;
+ }();
function microtaskDebounce(fn) {
var called = false;
@@ -1654,6 +1730,17 @@
return getScrollParent(getParentNode(element));
}
+ /**
+ * Returns the reference node of the reference object, or the reference object itself.
+ * @method
+ * @memberof Popper.Utils
+ * @param {Element|Object} reference - the reference element (the popper will be relative to this)
+ * @returns {Element} parent
+ */
+ function getReferenceNode(reference) {
+ return reference && reference.referenceNode ? reference.referenceNode : reference;
+ }
+
var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
@@ -1962,8 +2049,8 @@
// subtract scrollbar size from sizes
var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
- var width = sizes.width || element.clientWidth || result.right - result.left;
- var height = sizes.height || element.clientHeight || result.bottom - result.top;
+ var width = sizes.width || element.clientWidth || result.width;
+ var height = sizes.height || element.clientHeight || result.height;
var horizScrollbar = element.offsetWidth - width;
var vertScrollbar = element.offsetHeight - height;
@@ -2115,7 +2202,7 @@
// NOTE: 1 DOM access here
var boundaries = { top: 0, left: 0 };
- var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
+ var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
// Handle viewport case
if (boundariesElement === 'viewport') {
@@ -2243,7 +2330,7 @@
function getReferenceOffsets(state, popper, reference) {
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
+ var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
}
@@ -2505,7 +2592,7 @@
this.disableEventListeners();
- // remove the popper if user explicity asked for the deletion on destroy
+ // remove the popper if user explicitly asked for the deletion on destroy
// do not use `remove` because IE11 doesn't support it
if (this.options.removeOnDestroy) {
this.popper.parentNode.removeChild(this.popper);
@@ -3107,7 +3194,14 @@
// flip the variation if required
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
- var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
+
+ // flips variation if reference element overflows boundaries
+ var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
+
+ // flips variation if popper content overflows boundaries
+ var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
+
+ var flippedVariation = flippedVariationByRef || flippedVariationByContent;
if (overlapsRef || overflowsBoundaries || flippedVariation) {
// this boolean to detect any flip loop
@@ -3714,7 +3808,23 @@
* The popper will never be placed outside of the defined boundaries
* (except if `keepTogether` is enabled)
*/
- boundariesElement: 'viewport'
+ boundariesElement: 'viewport',
+ /**
+ * @prop {Boolean} flipVariations=false
+ * The popper will switch placement variation between `-start` and `-end` when
+ * the reference element overlaps its boundaries.
+ *
+ * The original placement should have a set variation.
+ */
+ flipVariations: false,
+ /**
+ * @prop {Boolean} flipVariationsByContent=false
+ * The popper will switch placement variation between `-start` and `-end` when
+ * the popper element overlaps its reference boundaries.
+ *
+ * The original placement should have a set variation.
+ */
+ flipVariationsByContent: false
},
/**
@@ -3931,8 +4041,8 @@
/**
* Creates a new Popper.js instance.
* @class Popper
- * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
- * @param {HTMLElement} popper - The HTML element used as the popper
+ * @param {Element|referenceObject} reference - The reference element used to position the popper
+ * @param {Element} popper - The HTML / XML element used as the popper
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
* @return {Object} instance - The generated Popper.js instance
*/
@@ -4087,7 +4197,7 @@
*/
var NAME$4 = 'dropdown';
- var VERSION$4 = '4.3.1';
+ var VERSION$4 = '4.4.1';
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
@@ -4147,21 +4257,22 @@
flip: true,
boundary: 'scrollParent',
reference: 'toggle',
- display: 'dynamic'
+ display: 'dynamic',
+ popperConfig: null
};
var DefaultType$2 = {
offset: '(number|string|function)',
flip: 'boolean',
boundary: '(string|element)',
reference: '(string|element)',
- display: 'string'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
+ display: 'string',
+ popperConfig: '(null|object)'
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Dropdown =
/*#__PURE__*/
@@ -4185,8 +4296,6 @@
return;
}
- var parent = Dropdown._getParentFromElement(this._element);
-
var isActive = $(this._menu).hasClass(ClassName$4.SHOW);
Dropdown._clearMenus();
@@ -4195,10 +4304,25 @@
return;
}
+ this.show(true);
+ };
+
+ _proto.show = function show(usePopper) {
+ if (usePopper === void 0) {
+ usePopper = false;
+ }
+
+ if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
+ return;
+ }
+
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event$4.SHOW, relatedTarget);
+
+ var parent = Dropdown._getParentFromElement(this._element);
+
$(parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
@@ -4206,7 +4330,7 @@
} // Disable totally Popper.js for Dropdown in Navbar
- if (!this._inNavbar) {
+ if (!this._inNavbar && usePopper) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
@@ -4253,28 +4377,6 @@
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
};
- _proto.show = function show() {
- if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
- return;
- }
-
- var relatedTarget = {
- relatedTarget: this._element
- };
- var showEvent = $.Event(Event$4.SHOW, relatedTarget);
-
- var parent = Dropdown._getParentFromElement(this._element);
-
- $(parent).trigger(showEvent);
-
- if (showEvent.isDefaultPrevented()) {
- return;
- }
-
- $(this._menu).toggleClass(ClassName$4.SHOW);
- $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
- };
-
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {
return;
@@ -4293,6 +4395,10 @@
return;
}
+ if (this._popper) {
+ this._popper.destroy();
+ }
+
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
};
@@ -4331,7 +4437,7 @@
};
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
+ config = _objectSpread2({}, this.constructor.Default, {}, $(this._element).data(), {}, config);
Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
return config;
};
@@ -4380,7 +4486,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
+ data.offsets = _objectSpread2({}, data.offsets, {}, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
@@ -4401,9 +4507,8 @@
preventOverflow: {
boundariesElement: this._config.boundary
}
- } // Disable Popper.js if we have a static display
-
- };
+ }
+ }; // Disable Popper.js if we have a static display
if (this._config.display === 'static') {
popperConfig.modifiers.applyStyle = {
@@ -4411,7 +4516,7 @@
};
}
- return popperConfig;
+ return _objectSpread2({}, popperConfig, {}, this._config.popperConfig);
} // Static
;
@@ -4483,6 +4588,11 @@
}
toggles[i].setAttribute('aria-expanded', 'false');
+
+ if (context._popper) {
+ context._popper.destroy();
+ }
+
$(dropdownMenu).removeClass(ClassName$4.SHOW);
$(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
}
@@ -4523,6 +4633,10 @@
var isActive = $(parent).hasClass(ClassName$4.SHOW);
+ if (!isActive && event.which === ESCAPE_KEYCODE) {
+ return;
+ }
+
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);
@@ -4533,7 +4647,9 @@
return;
}
- var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS));
+ var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)).filter(function (item) {
+ return $(item).is(':visible');
+ });
if (items.length === 0) {
return;
@@ -4613,7 +4729,7 @@
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.3.1';
+ var VERSION$5 = '4.4.1';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
@@ -4634,6 +4750,7 @@
};
var Event$5 = {
HIDE: "hide" + EVENT_KEY$5,
+ HIDE_PREVENTED: "hidePrevented" + EVENT_KEY$5,
HIDDEN: "hidden" + EVENT_KEY$5,
SHOW: "show" + EVENT_KEY$5,
SHOWN: "shown" + EVENT_KEY$5,
@@ -4651,7 +4768,8 @@
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
- SHOW: 'show'
+ SHOW: 'show',
+ STATIC: 'modal-static'
};
var Selector$5 = {
DIALOG: '.modal-dialog',
@@ -4660,13 +4778,12 @@
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Modal =
/*#__PURE__*/
@@ -4812,15 +4929,40 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default$3, config);
+ config = _objectSpread2({}, Default$3, {}, config);
Util.typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
- _proto._showElement = function _showElement(relatedTarget) {
+ _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
var _this3 = this;
+ if (this._config.backdrop === 'static') {
+ var hideEventPrevented = $.Event(Event$5.HIDE_PREVENTED);
+ $(this._element).trigger(hideEventPrevented);
+
+ if (hideEventPrevented.defaultPrevented) {
+ return;
+ }
+
+ this._element.classList.add(ClassName$5.STATIC);
+
+ var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element);
+ $(this._element).one(Util.TRANSITION_END, function () {
+ _this3._element.classList.remove(ClassName$5.STATIC);
+ }).emulateTransitionEnd(modalTransitionDuration);
+
+ this._element.focus();
+ } else {
+ this.hide();
+ }
+ };
+
+ _proto._showElement = function _showElement(relatedTarget) {
+ var _this4 = this;
+
var transition = $(this._element).hasClass(ClassName$5.FADE);
+ var modalBody = this._dialog ? this._dialog.querySelector(Selector$5.MODAL_BODY) : null;
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@@ -4833,8 +4975,8 @@
this._element.setAttribute('aria-modal', true);
- if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
- this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
+ if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE) && modalBody) {
+ modalBody.scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
@@ -4854,12 +4996,12 @@
});
var transitionComplete = function transitionComplete() {
- if (_this3._config.focus) {
- _this3._element.focus();
+ if (_this4._config.focus) {
+ _this4._element.focus();
}
- _this3._isTransitioning = false;
- $(_this3._element).trigger(shownEvent);
+ _this4._isTransitioning = false;
+ $(_this4._element).trigger(shownEvent);
};
if (transition) {
@@ -4871,25 +5013,23 @@
};
_proto._enforceFocus = function _enforceFocus() {
- var _this4 = this;
+ var _this5 = this;
$(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop
.on(Event$5.FOCUSIN, function (event) {
- if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
- _this4._element.focus();
+ if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
+ _this5._element.focus();
}
});
};
_proto._setEscapeEvent = function _setEscapeEvent() {
- var _this5 = this;
+ var _this6 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE$1) {
- event.preventDefault();
-
- _this5.hide();
+ _this6._triggerBackdropTransition();
}
});
} else if (!this._isShown) {
@@ -4898,11 +5038,11 @@
};
_proto._setResizeEvent = function _setResizeEvent() {
- var _this6 = this;
+ var _this7 = this;
if (this._isShown) {
$(window).on(Event$5.RESIZE, function (event) {
- return _this6.handleUpdate(event);
+ return _this7.handleUpdate(event);
});
} else {
$(window).off(Event$5.RESIZE);
@@ -4910,7 +5050,7 @@
};
_proto._hideModal = function _hideModal() {
- var _this7 = this;
+ var _this8 = this;
this._element.style.display = 'none';
@@ -4923,11 +5063,11 @@
this._showBackdrop(function () {
$(document.body).removeClass(ClassName$5.OPEN);
- _this7._resetAdjustments();
+ _this8._resetAdjustments();
- _this7._resetScrollbar();
+ _this8._resetScrollbar();
- $(_this7._element).trigger(Event$5.HIDDEN);
+ $(_this8._element).trigger(Event$5.HIDDEN);
});
};
@@ -4939,7 +5079,7 @@
};
_proto._showBackdrop = function _showBackdrop(callback) {
- var _this8 = this;
+ var _this9 = this;
var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';
@@ -4953,8 +5093,8 @@
$(this._backdrop).appendTo(document.body);
$(this._element).on(Event$5.CLICK_DISMISS, function (event) {
- if (_this8._ignoreBackdropClick) {
- _this8._ignoreBackdropClick = false;
+ if (_this9._ignoreBackdropClick) {
+ _this9._ignoreBackdropClick = false;
return;
}
@@ -4962,11 +5102,7 @@
return;
}
- if (_this8._config.backdrop === 'static') {
- _this8._element.focus();
- } else {
- _this8.hide();
- }
+ _this9._triggerBackdropTransition();
});
if (animate) {
@@ -4990,7 +5126,7 @@
$(this._backdrop).removeClass(ClassName$5.SHOW);
var callbackRemove = function callbackRemove() {
- _this8._removeBackdrop();
+ _this9._removeBackdrop();
if (callback) {
callback();
@@ -5037,7 +5173,7 @@
};
_proto._setScrollbar = function _setScrollbar() {
- var _this9 = this;
+ var _this10 = this;
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
@@ -5048,13 +5184,13 @@
$(fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
- $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
+ $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
}); // Adjust sticky content margin
$(stickyContent).each(function (index, element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
+ $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
@@ -5103,7 +5239,7 @@
return this.each(function () {
var data = $(this).data(DATA_KEY$5);
- var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
+ var _config = _objectSpread2({}, Default$3, {}, $(this).data(), {}, typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
@@ -5144,7 +5280,7 @@
$(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
- var _this10 = this;
+ var _this11 = this;
var target;
var selector = Util.getSelectorFromElement(this);
@@ -5153,7 +5289,7 @@
target = document.querySelector(selector);
}
- var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
+ var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread2({}, $(target).data(), {}, $(this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
@@ -5166,8 +5302,8 @@
}
$target.one(Event$5.HIDDEN, function () {
- if ($(_this10).is(':visible')) {
- _this10.focus();
+ if ($(_this11).is(':visible')) {
+ _this11.focus();
}
});
});
@@ -5190,7 +5326,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.3.1): tools/sanitizer.js
+ * Bootstrap (v4.4.1): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -5228,13 +5364,13 @@
strong: [],
u: [],
ul: []
- /**
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
- *
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
- */
-
};
+ /**
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
@@ -5301,7 +5437,7 @@
};
for (var i = 0, len = elements.length; i < len; i++) {
- var _ret = _loop(i, len);
+ var _ret = _loop(i);
if (_ret === "continue") continue;
}
@@ -5316,7 +5452,7 @@
*/
var NAME$6 = 'tooltip';
- var VERSION$6 = '4.3.1';
+ var VERSION$6 = '4.4.1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
@@ -5338,7 +5474,8 @@
boundary: '(string|element)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
- whiteList: 'object'
+ whiteList: 'object',
+ popperConfig: '(null|object)'
};
var AttachmentMap$1 = {
AUTO: 'auto',
@@ -5362,7 +5499,8 @@
boundary: 'scrollParent',
sanitize: true,
sanitizeFn: null,
- whiteList: DefaultWhitelist
+ whiteList: DefaultWhitelist,
+ popperConfig: null
};
var HoverState = {
SHOW: 'show',
@@ -5394,22 +5532,17 @@
FOCUS: 'focus',
CLICK: 'click',
MANUAL: 'manual'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Tooltip =
/*#__PURE__*/
function () {
function Tooltip(element, config) {
- /**
- * Check for Popper dependency
- * Popper - https://popper.js.org
- */
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
} // private
@@ -5480,7 +5613,7 @@
clearTimeout(this._timeout);
$.removeData(this.element, this.constructor.DATA_KEY);
$(this.element).off(this.constructor.EVENT_KEY);
- $(this.element).closest('.modal').off('hide.bs.modal');
+ $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
if (this.tip) {
$(this.tip).remove();
@@ -5491,7 +5624,7 @@
this._hoverState = null;
this._activeTrigger = null;
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.destroy();
}
@@ -5544,29 +5677,7 @@
}
$(this.element).trigger(this.constructor.Event.INSERTED);
- this._popper = new Popper(this.element, tip, {
- placement: attachment,
- modifiers: {
- offset: this._getOffset(),
- flip: {
- behavior: this.config.fallbackPlacement
- },
- arrow: {
- element: Selector$6.ARROW
- },
- preventOverflow: {
- boundariesElement: this.config.boundary
- }
- },
- onCreate: function onCreate(data) {
- if (data.originalPlacement !== data.placement) {
- _this._handlePopperPlacementChange(data);
- }
- },
- onUpdate: function onUpdate(data) {
- return _this._handlePopperPlacementChange(data);
- }
- });
+ this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
$(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
@@ -5714,14 +5825,43 @@
} // Private
;
- _proto._getOffset = function _getOffset() {
+ _proto._getPopperConfig = function _getPopperConfig(attachment) {
var _this3 = this;
+ var defaultBsConfig = {
+ placement: attachment,
+ modifiers: {
+ offset: this._getOffset(),
+ flip: {
+ behavior: this.config.fallbackPlacement
+ },
+ arrow: {
+ element: Selector$6.ARROW
+ },
+ preventOverflow: {
+ boundariesElement: this.config.boundary
+ }
+ },
+ onCreate: function onCreate(data) {
+ if (data.originalPlacement !== data.placement) {
+ _this3._handlePopperPlacementChange(data);
+ }
+ },
+ onUpdate: function onUpdate(data) {
+ return _this3._handlePopperPlacementChange(data);
+ }
+ };
+ return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);
+ };
+
+ _proto._getOffset = function _getOffset() {
+ var _this4 = this;
+
var offset = {};
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
+ data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
return data;
};
} else {
@@ -5748,32 +5888,35 @@
};
_proto._setListeners = function _setListeners() {
- var _this4 = this;
+ var _this5 = this;
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
- $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
- return _this4.toggle(event);
+ $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
+ return _this5.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
- var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
- var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
- $(_this4.element).on(eventIn, _this4.config.selector, function (event) {
- return _this4._enter(event);
- }).on(eventOut, _this4.config.selector, function (event) {
- return _this4._leave(event);
+ var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
+ var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
+ $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
+ return _this5._enter(event);
+ }).on(eventOut, _this5.config.selector, function (event) {
+ return _this5._leave(event);
});
}
});
- $(this.element).closest('.modal').on('hide.bs.modal', function () {
- if (_this4.element) {
- _this4.hide();
+
+ this._hideModalHandler = function () {
+ if (_this5.element) {
+ _this5.hide();
}
- });
+ };
+
+ $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
if (this.config.selector) {
- this.config = _objectSpread({}, this.config, {
+ this.config = _objectSpread2({}, this.config, {
trigger: 'manual',
selector: ''
});
@@ -5873,7 +6016,7 @@
delete dataAttributes[dataAttr];
}
});
- config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
+ config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -6033,21 +6176,21 @@
*/
var NAME$7 = 'popover';
- var VERSION$7 = '4.3.1';
+ var VERSION$7 = '4.4.1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
- var Default$5 = _objectSpread({}, Tooltip.Default, {
+ var Default$5 = _objectSpread2({}, Tooltip.Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
- var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
+ var DefaultType$5 = _objectSpread2({}, Tooltip.DefaultType, {
content: '(string|element|function)'
});
@@ -6070,13 +6213,12 @@
FOCUSOUT: "focusout" + EVENT_KEY$7,
MOUSEENTER: "mouseenter" + EVENT_KEY$7,
MOUSELEAVE: "mouseleave" + EVENT_KEY$7
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Popover =
/*#__PURE__*/
@@ -6220,7 +6362,7 @@
*/
var NAME$8 = 'scrollspy';
- var VERSION$8 = '4.3.1';
+ var VERSION$8 = '4.4.1';
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
@@ -6259,13 +6401,12 @@
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var ScrollSpy =
/*#__PURE__*/
@@ -6347,7 +6488,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
+ config = _objectSpread2({}, Default$6, {}, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
@@ -6527,7 +6668,7 @@
*/
var NAME$9 = 'tab';
- var VERSION$9 = '4.3.1';
+ var VERSION$9 = '4.4.1';
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
@@ -6554,13 +6695,12 @@
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Tab =
/*#__PURE__*/
@@ -6762,7 +6902,7 @@
*/
var NAME$a = 'toast';
- var VERSION$a = '4.3.1';
+ var VERSION$a = '4.4.1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
@@ -6791,13 +6931,12 @@
};
var Selector$a = {
DATA_DISMISS: '[data-dismiss="toast"]'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
-
};
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
var Toast =
/*#__PURE__*/
@@ -6817,7 +6956,12 @@
_proto.show = function show() {
var _this = this;
- $(this._element).trigger(Event$a.SHOW);
+ var showEvent = $.Event(Event$a.SHOW);
+ $(this._element).trigger(showEvent);
+
+ if (showEvent.isDefaultPrevented()) {
+ return;
+ }
if (this._config.animation) {
this._element.classList.add(ClassName$a.FADE);
@@ -6831,12 +6975,16 @@
$(_this._element).trigger(Event$a.SHOWN);
if (_this._config.autohide) {
- _this.hide();
+ _this._timeout = setTimeout(function () {
+ _this.hide();
+ }, _this._config.delay);
}
};
this._element.classList.remove(ClassName$a.HIDE);
+ Util.reflow(this._element);
+
this._element.classList.add(ClassName$a.SHOWING);
if (this._config.animation) {
@@ -6847,22 +6995,19 @@
}
};
- _proto.hide = function hide(withoutTimeout) {
- var _this2 = this;
-
+ _proto.hide = function hide() {
if (!this._element.classList.contains(ClassName$a.SHOW)) {
return;
}
- $(this._element).trigger(Event$a.HIDE);
+ var hideEvent = $.Event(Event$a.HIDE);
+ $(this._element).trigger(hideEvent);
- if (withoutTimeout) {
- this._close();
- } else {
- this._timeout = setTimeout(function () {
- _this2._close();
- }, this._config.delay);
+ if (hideEvent.isDefaultPrevented()) {
+ return;
}
+
+ this._close();
};
_proto.dispose = function dispose() {
@@ -6881,26 +7026,26 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
+ config = _objectSpread2({}, Default$7, {}, $(this._element).data(), {}, typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
- var _this3 = this;
+ var _this2 = this;
$(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
- return _this3.hide(true);
+ return _this2.hide();
});
};
_proto._close = function _close() {
- var _this4 = this;
+ var _this3 = this;
var complete = function complete() {
- _this4._element.classList.add(ClassName$a.HIDE);
+ _this3._element.classList.add(ClassName$a.HIDE);
- $(_this4._element).trigger(Event$a.HIDDEN);
+ $(_this3._element).trigger(Event$a.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
@@ -6970,31 +7115,6 @@
return Toast._jQueryInterface;
};
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.3.1): index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- (function () {
- if (typeof $ === 'undefined') {
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
- }
-
- var version = $.fn.jquery.split(' ')[0].split('.');
- var minMajor = 1;
- var ltMajor = 2;
- var minMinor = 9;
- var minPatch = 1;
- var maxMajor = 4;
-
- if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
- }
- })();
-
- exports.Util = Util;
exports.Alert = Alert;
exports.Button = Button;
exports.Carousel = Carousel;
@@ -7006,8 +7126,9 @@
exports.Tab = Tab;
exports.Toast = Toast;
exports.Tooltip = Tooltip;
+ exports.Util = Util;
Object.defineProperty(exports, '__esModule', { value: true });
-}));
+})));
//# sourceMappingURL=bootstrap.bundle.js.map