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.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.js')
-rw-r--r-- | dist/js/bootstrap.js | 111 |
1 files changed, 73 insertions, 38 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index 89914cd2b4..7f93fa2613 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.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) */ @@ -70,7 +70,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): util.js + * Bootstrap (v4.3.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -230,7 +230,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'; @@ -395,7 +395,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'; @@ -549,7 +549,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'; @@ -789,7 +789,9 @@ }); } - this._addTouchEventListeners(); + if (this._config.touch) { + this._addTouchEventListeners(); + } }; _proto._addTouchEventListeners = function _addTouchEventListeners() { @@ -1147,7 +1149,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'; @@ -1507,7 +1509,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'; @@ -1793,24 +1795,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 }, @@ -2029,7 +2035,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'; @@ -2062,6 +2068,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', @@ -2070,6 +2077,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', @@ -2247,7 +2255,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); @@ -2605,7 +2617,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]; @@ -2620,7 +2632,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)' @@ -2829,9 +2841,7 @@ this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { - offset: { - offset: this.config.offset - }, + offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, @@ -2990,6 +3000,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; @@ -3007,27 +3034,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(); } }); @@ -3281,7 +3308,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]; @@ -3468,7 +3495,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'; @@ -3775,7 +3802,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'; @@ -3926,7 +3953,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]; @@ -4007,7 +4037,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]; @@ -4191,6 +4221,11 @@ get: function get() { return DefaultType$7; } + }, { + key: "Default", + get: function get() { + return Default$7; + } }]); return Toast; @@ -4212,7 +4247,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): index.js + * Bootstrap (v4.3.0): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ |