Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2018-11-24 19:22:59 +0300
committerXhmikosR <xhmikosr@gmail.com>2018-11-25 12:46:37 +0300
commit5c336d0247cd94ed56ac24d941f86325df474313 (patch)
tree8e905679661cec26543ded7bae9a8d53f5ed6cd9 /dist/js/bootstrap.bundle.js
parentfdc5c1f49ab3f826fcff79c78fc0fd9adf19a6fb (diff)
Dist
Diffstat (limited to 'dist/js/bootstrap.bundle.js')
-rw-r--r--dist/js/bootstrap.bundle.js433
1 files changed, 176 insertions, 257 deletions
diff --git a/dist/js/bootstrap.bundle.js b/dist/js/bootstrap.bundle.js
index f3a05a3aec..85662b1f50 100644
--- a/dist/js/bootstrap.bundle.js
+++ b/dist/js/bootstrap.bundle.js
@@ -73,7 +73,6 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
-
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
@@ -198,13 +197,6 @@
setTransitionEndSupport();
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): alert.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -370,13 +362,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): button.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -581,10 +566,7 @@
TOUCHMOVE: "touchmove" + EVENT_KEY$2,
TOUCHEND: "touchend" + EVENT_KEY$2,
POINTERDOWN: "pointerdown" + EVENT_KEY$2,
- POINTERMOVE: "pointermove" + EVENT_KEY$2,
POINTERUP: "pointerup" + EVENT_KEY$2,
- POINTERLEAVE: "pointerleave" + EVENT_KEY$2,
- POINTERCANCEL: "pointercancel" + EVENT_KEY$2,
DRAG_START: "dragstart" + EVENT_KEY$2,
LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2,
CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2
@@ -791,7 +773,7 @@
}
var start = function start(event) {
- if (_this3._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
+ if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchStartX = event.originalEvent.clientX;
} else if (!_this3._pointerEvent) {
_this3.touchStartX = event.originalEvent.touches[0].clientX;
@@ -808,7 +790,7 @@
};
var end = function end(event) {
- if (_this3._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
+ if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
}
@@ -1132,13 +1114,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): collapse.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -1193,7 +1168,7 @@
this._isTransitioning = false;
this._element = element;
this._config = this._getConfig(config);
- this._triggerArray = $.makeArray(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
+ this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
for (var i = 0, len = toggleList.length; i < len; i++) {
@@ -1500,7 +1475,7 @@
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
- * @version 1.14.4
+ * @version 1.14.5
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
@@ -1597,7 +1572,8 @@
return [];
}
// NOTE: 1 DOM access here
- var css = getComputedStyle(element, null);
+ var window = element.ownerDocument.defaultView;
+ var css = window.getComputedStyle(element, null);
return property ? css[property] : css;
}
@@ -1685,7 +1661,7 @@
var noOffsetParent = isIE(10) ? document.body : null;
// NOTE: 1 DOM access here
- var offsetParent = element.offsetParent;
+ var offsetParent = element.offsetParent || null;
// Skip hidden elements which don't have an offsetParent
while (offsetParent === noOffsetParent && element.nextElementSibling) {
offsetParent = (element = element.nextElementSibling).offsetParent;
@@ -1697,9 +1673,9 @@
return element ? element.ownerDocument.documentElement : document.documentElement;
}
- // .offsetParent will return the closest TD or TABLE in case
+ // .offsetParent will return the closest TH, TD or TABLE in case
// no offsetParent is present, I hate this job...
- if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
+ if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
return getOffsetParent(offsetParent);
}
@@ -2247,7 +2223,8 @@
* @returns {Object} object containing width and height properties
*/
function getOuterSizes(element) {
- var styles = getComputedStyle(element);
+ var window = element.ownerDocument.defaultView;
+ var styles = window.getComputedStyle(element);
var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
var result = {
@@ -4029,13 +4006,6 @@
Popper.Defaults = Defaults;
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): dropdown.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -4558,13 +4528,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): modal.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -4675,8 +4638,6 @@
this._adjustDialog();
- $(document.body).addClass(ClassName$5.OPEN);
-
this._setEscapeEvent();
this._setResizeEvent();
@@ -5011,6 +4972,8 @@
var calculatedPadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
}
+
+ $(document.body).addClass(ClassName$5.OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
@@ -5137,13 +5100,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): tooltip.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -5390,7 +5346,7 @@
}
},
onUpdate: function onUpdate(data) {
- _this._handlePopperPlacementChange(data);
+ return _this._handlePopperPlacementChange(data);
}
});
$(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
@@ -5805,13 +5761,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): popover.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -5999,13 +5948,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): scrollspy.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -6213,12 +6155,10 @@
this._clear();
- var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
-
-
- queries = queries.map(function (selector) {
- return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
+ var queries = this._selector.split(',').map(function (selector) {
+ return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
+
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {
@@ -6240,8 +6180,11 @@
};
_proto._clear = function _clear() {
- var nodes = [].slice.call(document.querySelectorAll(this._selector));
- $(nodes).filter(Selector$8.ACTIVE).removeClass(ClassName$8.ACTIVE);
+ [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
+ return node.classList.contains(ClassName$8.ACTIVE);
+ }).forEach(function (node) {
+ return node.classList.remove(ClassName$8.ACTIVE);
+ });
}; // Static
@@ -6312,13 +6255,6 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): tab.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
@@ -6384,7 +6320,7 @@
var selector = Util.getSelectorFromElement(this._element);
if (listElement) {
- var itemSelector = listElement.nodeName === 'UL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
+ var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = previous[previous.length - 1];
}
@@ -6439,14 +6375,7 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
- var activeElements;
-
- if (container && container.nodeName === 'UL') {
- activeElements = $(container).find(Selector$9.ACTIVE_UL);
- } else {
- activeElements = $(container).children(Selector$9.ACTIVE);
- }
-
+ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);
@@ -6558,215 +6487,205 @@
};
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.3): toast.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
*/
- var Toast = function ($$$1) {
+ var NAME$a = 'toast';
+ var VERSION$a = '4.1.3';
+ var DATA_KEY$a = 'bs.toast';
+ var EVENT_KEY$a = "." + DATA_KEY$a;
+ var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
+ var Event$a = {
+ CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
+ HIDE: "hide" + EVENT_KEY$a,
+ HIDDEN: "hidden" + EVENT_KEY$a,
+ SHOW: "show" + EVENT_KEY$a,
+ SHOWN: "shown" + EVENT_KEY$a
+ };
+ var ClassName$a = {
+ FADE: 'fade',
+ HIDE: 'hide',
+ SHOW: 'show'
+ };
+ var DefaultType$7 = {
+ animation: 'boolean',
+ autohide: 'boolean',
+ delay: 'number'
+ };
+ var Default$7 = {
+ animation: true,
+ autohide: true,
+ delay: 500
+ };
+ var Selector$a = {
+ DATA_DISMISS: '[data-dismiss="toast"]'
/**
* ------------------------------------------------------------------------
- * Constants
+ * Class Definition
* ------------------------------------------------------------------------
*/
- 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 Toast =
+ /*#__PURE__*/
+ function () {
+ function Toast(element, config) {
+ this._element = element;
+ this._config = this._getConfig(config);
+ this._timeout = null;
- var _proto = Toast.prototype;
+ this._setListeners();
+ } // Getters
- // Public
- _proto.show = function show() {
- var _this = this;
- $$$1(this._element).trigger(Event.SHOW);
+ var _proto = Toast.prototype;
- if (this._config.animation) {
- this._element.classList.add(ClassName.FADE);
- }
+ // Public
+ _proto.show = function show() {
+ var _this = this;
- var complete = function complete() {
- $$$1(_this._element).trigger(Event.SHOWN);
+ $(this._element).trigger(Event$a.SHOW);
- if (_this._config.autohide) {
- _this.hide();
- }
- };
+ if (this._config.animation) {
+ this._element.classList.add(ClassName$a.FADE);
+ }
- this._element.classList.add(ClassName.SHOW);
+ var complete = function complete() {
+ $(_this._element).trigger(Event$a.SHOWN);
- if (this._config.animation) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
+ if (_this._config.autohide) {
+ _this.hide();
}
};
- _proto.hide = function hide(withoutTimeout) {
- var _this2 = this;
+ this._element.classList.add(ClassName$a.SHOW);
- if (!this._element.classList.contains(ClassName.SHOW)) {
- return;
- }
+ if (this._config.animation) {
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ } else {
+ complete();
+ }
+ };
- $$$1(this._element).trigger(Event.HIDE);
+ _proto.hide = function hide(withoutTimeout) {
+ var _this2 = this;
- if (withoutTimeout) {
- this._close();
- } else {
- this._timeout = setTimeout(function () {
- _this2._close();
- }, this._config.delay);
- }
- };
+ if (!this._element.classList.contains(ClassName$a.SHOW)) {
+ return;
+ }
- _proto.dispose = function dispose() {
- clearTimeout(this._timeout);
- this._timeout = null;
+ $(this._element).trigger(Event$a.HIDE);
- if (this._element.classList.contains(ClassName.SHOW)) {
- this._element.classList.remove(ClassName.SHOW);
- }
+ if (withoutTimeout) {
+ this._close();
+ } else {
+ this._timeout = setTimeout(function () {
+ _this2._close();
+ }, this._config.delay);
+ }
+ };
- $$$1(this._element).off(Event.CLICK_DISMISS);
- $$$1.removeData(this._element, DATA_KEY);
- this._element = null;
- this._config = null;
- }; // Private
+ _proto.dispose = function dispose() {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ if (this._element.classList.contains(ClassName$a.SHOW)) {
+ this._element.classList.remove(ClassName$a.SHOW);
+ }
- _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;
- };
+ $(this._element).off(Event$a.CLICK_DISMISS);
+ $.removeData(this._element, DATA_KEY$a);
+ this._element = null;
+ this._config = null;
+ }; // Private
- _proto._setListeners = function _setListeners() {
- var _this3 = this;
- $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
- return _this3.hide(true);
- });
- };
+ _proto._getConfig = function _getConfig(config) {
+ config = _objectSpread({}, 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;
- _proto._close = function _close() {
- var _this4 = this;
+ $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
+ return _this3.hide(true);
+ });
+ };
- var complete = function complete() {
- $$$1(_this4._element).trigger(Event.HIDDEN);
- };
+ _proto._close = function _close() {
+ var _this4 = this;
- this._element.classList.remove(ClassName.SHOW);
+ var complete = function complete() {
+ $(_this4._element).trigger(Event$a.HIDDEN);
+ };
- if (this._config.animation) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
- }
- }; // Static
+ this._element.classList.remove(ClassName$a.SHOW);
+ if (this._config.animation) {
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
+ $(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;
+ Toast._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $element = $(this);
+ var data = $element.data(DATA_KEY$a);
- if (!data) {
- data = new Toast(this, _config);
- $element.data(DATA_KEY, data);
- }
+ var _config = typeof config === 'object' && config;
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
+ if (!data) {
+ data = new Toast(this, _config);
+ $element.data(DATA_KEY$a, data);
+ }
- data[config](this);
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError("No method named \"" + config + "\"");
}
- });
- };
- _createClass(Toast, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "DefaultType",
- get: function get() {
- return DefaultType;
+ data[config](this);
}
- }]);
+ });
+ };
- return Toast;
- }();
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
+ _createClass(Toast, null, [{
+ key: "VERSION",
+ get: function get() {
+ return VERSION$a;
+ }
+ }, {
+ key: "DefaultType",
+ get: function get() {
+ return DefaultType$7;
+ }
+ }]);
+ 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;
- };
+ $.fn[NAME$a] = Toast._jQueryInterface;
+ $.fn[NAME$a].Constructor = Toast;
- return Toast;
- }($);
+ $.fn[NAME$a].noConflict = function () {
+ $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
+ return Toast._jQueryInterface;
+ };
/**
* --------------------------------------------------------------------------