diff options
author | Mark Otto <otto@github.com> | 2019-02-11 22:15:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 22:15:34 +0300 |
commit | 1ded0d6a4eefb7daca62c44e4e735aec200f0b6f (patch) | |
tree | e0036e5068cfb8e2c17971c4e892bd6b502dda9a /dist/js/bootstrap.bundle.js | |
parent | 3aa0770b711f69c4dcf5858b8913794e81b32d80 (diff) |
Release v4.3.0 (#28228)v4.3.0
* Prep for v4.3.0
* More updates for v4.3.0.
* rerun to build docs source map
Diffstat (limited to 'dist/js/bootstrap.bundle.js')
-rw-r--r-- | dist/js/bootstrap.bundle.js | 138 |
1 files changed, 91 insertions, 47 deletions
diff --git a/dist/js/bootstrap.bundle.js b/dist/js/bootstrap.bundle.js index 6dc26d7b3b..f58c7c812c 100644 --- a/dist/js/bootstrap.bundle.js +++ b/dist/js/bootstrap.bundle.js @@ -1,5 +1,5 @@ /*! - * Bootstrap v4.2.1 (https://getbootstrap.com/) + * Bootstrap v4.3.0 (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) */ @@ -69,7 +69,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): util.js + * Bootstrap (v4.3.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -229,7 +229,7 @@ */ var NAME = 'alert'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -394,7 +394,7 @@ */ var NAME$1 = 'button'; - var VERSION$1 = '4.2.1'; + var VERSION$1 = '4.3.0'; var DATA_KEY$1 = 'bs.button'; var EVENT_KEY$1 = "." + DATA_KEY$1; var DATA_API_KEY$1 = '.data-api'; @@ -548,7 +548,7 @@ */ var NAME$2 = 'carousel'; - var VERSION$2 = '4.2.1'; + var VERSION$2 = '4.3.0'; var DATA_KEY$2 = 'bs.carousel'; var EVENT_KEY$2 = "." + DATA_KEY$2; var DATA_API_KEY$2 = '.data-api'; @@ -788,7 +788,9 @@ }); } - this._addTouchEventListeners(); + if (this._config.touch) { + this._addTouchEventListeners(); + } }; _proto._addTouchEventListeners = function _addTouchEventListeners() { @@ -1146,7 +1148,7 @@ */ var NAME$3 = 'collapse'; - var VERSION$3 = '4.2.1'; + var VERSION$3 = '4.3.0'; var DATA_KEY$3 = 'bs.collapse'; var EVENT_KEY$3 = "." + DATA_KEY$3; var DATA_API_KEY$3 = '.data-api'; @@ -1501,7 +1503,7 @@ /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.14.6 + * @version 1.14.7 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -2069,7 +2071,11 @@ if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } - return isFixed(getParentNode(element)); + var parentNode = getParentNode(element); + if (!parentNode) { + return false; + } + return isFixed(parentNode); } /** @@ -2725,18 +2731,23 @@ var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; + var round = Math.round, + floor = Math.floor; - - var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; - var isVariation = data.placement.indexOf('-') !== -1; - var sameWidthOddness = reference.width % 2 === popper.width % 2; - var bothOddWidth = reference.width % 2 === 1 && popper.width % 2 === 1; var noRound = function noRound(v) { return v; }; - var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthOddness ? Math.round : Math.floor; - var verticalToInteger = !shouldRound ? noRound : Math.round; + var referenceWidth = round(reference.width); + var popperWidth = round(popper.width); + + var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; + var isVariation = data.placement.indexOf('-') !== -1; + var sameWidthParity = referenceWidth % 2 === popperWidth % 2; + var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; + + var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; + var verticalToInteger = !shouldRound ? noRound : round; return { left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), @@ -4076,7 +4087,7 @@ */ var NAME$4 = 'dropdown'; - var VERSION$4 = '4.2.1'; + var VERSION$4 = '4.3.0'; var DATA_KEY$4 = 'bs.dropdown'; var EVENT_KEY$4 = "." + DATA_KEY$4; var DATA_API_KEY$4 = '.data-api'; @@ -4362,24 +4373,28 @@ return $(this._element).closest('.navbar').length > 0; }; - _proto._getPopperConfig = function _getPopperConfig() { + _proto._getOffset = function _getOffset() { var _this2 = this; - var offsetConf = {}; + var offset = {}; if (typeof this._config.offset === 'function') { - offsetConf.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { - offsetConf.offset = this._config.offset; + offset.offset = this._config.offset; } + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig() { var popperConfig = { placement: this._getPlacement(), modifiers: { - offset: offsetConf, + offset: this._getOffset(), flip: { enabled: this._config.flip }, @@ -4598,7 +4613,7 @@ */ var NAME$5 = 'modal'; - var VERSION$5 = '4.2.1'; + var VERSION$5 = '4.3.0'; var DATA_KEY$5 = 'bs.modal'; var EVENT_KEY$5 = "." + DATA_KEY$5; var DATA_API_KEY$5 = '.data-api'; @@ -4631,6 +4646,7 @@ CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 }; var ClassName$5 = { + SCROLLABLE: 'modal-dialog-scrollable', SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', @@ -4639,6 +4655,7 @@ }; var Selector$5 = { DIALOG: '.modal-dialog', + MODAL_BODY: '.modal-body', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', @@ -4816,7 +4833,11 @@ this._element.setAttribute('aria-modal', true); - this._element.scrollTop = 0; + if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { + this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } if (transition) { Util.reflow(this._element); @@ -5174,7 +5195,7 @@ */ var NAME$6 = 'tooltip'; - var VERSION$6 = '4.2.1'; + var VERSION$6 = '4.3.0'; var DATA_KEY$6 = 'bs.tooltip'; var EVENT_KEY$6 = "." + DATA_KEY$6; var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; @@ -5189,7 +5210,7 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', - offset: '(number|string)', + offset: '(number|string|function)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', boundary: '(string|element)' @@ -5398,9 +5419,7 @@ this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { - offset: { - offset: this.config.offset - }, + offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, @@ -5559,6 +5578,23 @@ } // Private ; + _proto._getOffset = function _getOffset() { + var _this3 = 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) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } + + return offset; + }; + _proto._getContainer = function _getContainer() { if (this.config.container === false) { return document.body; @@ -5576,27 +5612,27 @@ }; _proto._setListeners = function _setListeners() { - var _this3 = this; + var _this4 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { - return _this3.toggle(event); + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); }); } else if (trigger !== Trigger.MANUAL) { - 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; - $(_this3.element).on(eventIn, _this3.config.selector, function (event) { - return _this3._enter(event); - }).on(eventOut, _this3.config.selector, function (event) { - return _this3._leave(event); + 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); }); } }); $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this3.element) { - _this3.hide(); + if (_this4.element) { + _this4.hide(); } }); @@ -5850,7 +5886,7 @@ */ var NAME$7 = 'popover'; - var VERSION$7 = '4.2.1'; + var VERSION$7 = '4.3.0'; var DATA_KEY$7 = 'bs.popover'; var EVENT_KEY$7 = "." + DATA_KEY$7; var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; @@ -6037,7 +6073,7 @@ */ var NAME$8 = 'scrollspy'; - var VERSION$8 = '4.2.1'; + var VERSION$8 = '4.3.0'; var DATA_KEY$8 = 'bs.scrollspy'; var EVENT_KEY$8 = "." + DATA_KEY$8; var DATA_API_KEY$6 = '.data-api'; @@ -6344,7 +6380,7 @@ */ var NAME$9 = 'tab'; - var VERSION$9 = '4.2.1'; + var VERSION$9 = '4.3.0'; var DATA_KEY$9 = 'bs.tab'; var EVENT_KEY$9 = "." + DATA_KEY$9; var DATA_API_KEY$7 = '.data-api'; @@ -6495,7 +6531,10 @@ } Util.reflow(element); - $(element).addClass(ClassName$9.SHOW); + + if (element.classList.contains(ClassName$9.FADE)) { + element.classList.add(ClassName$9.SHOW); + } if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) { var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0]; @@ -6576,7 +6615,7 @@ */ var NAME$a = 'toast'; - var VERSION$a = '4.2.1'; + var VERSION$a = '4.3.0'; var DATA_KEY$a = 'bs.toast'; var EVENT_KEY$a = "." + DATA_KEY$a; var JQUERY_NO_CONFLICT$a = $.fn[NAME$a]; @@ -6760,6 +6799,11 @@ get: function get() { return DefaultType$7; } + }, { + key: "Default", + get: function get() { + return Default$7; + } }]); return Toast; @@ -6781,7 +6825,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): index.js + * Bootstrap (v4.3.0): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ |