1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-10-02 16:28:26 +02:00

Rebuild the dist to pickup new utilities file (#29105)

Dist after adding new utils file
This commit is contained in:
Mark Otto
2019-07-23 23:13:50 -07:00
committed by XhmikosR
parent e101ba4989
commit 114a0ee193
58 changed files with 4364 additions and 663 deletions

80
js/dist/modal.js vendored
View File

@@ -4,8 +4,8 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/data.js'), require('../dom/event-handler.js'), require('../dom/manipulator.js'), require('../dom/selector-engine.js')) :
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/manipulator.js', '../dom/selector-engine.js'], factory) :
(global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
@@ -45,20 +45,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(source, true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(source).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
@@ -326,7 +341,7 @@
var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
if (!this._isShown || hideEvent.defaultPrevented) {
if (hideEvent.defaultPrevented) {
return;
}
@@ -389,7 +404,7 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
config = _objectSpread2({}, Default, {}, config);
typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -469,7 +484,7 @@
_this5.hide();
}
});
} else if (!this._isShown) {
} else {
EventHandler.off(this._element, Event.KEYDOWN_DISMISS);
}
};
@@ -478,8 +493,8 @@
var _this6 = this;
if (this._isShown) {
EventHandler.on(window, Event.RESIZE, function (event) {
return _this6.handleUpdate(event);
EventHandler.on(window, Event.RESIZE, function () {
return _this6._adjustDialog();
});
} else {
EventHandler.off(window, Event.RESIZE);
@@ -509,11 +524,9 @@
};
_proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
this._backdrop.parentNode.removeChild(this._backdrop);
this._backdrop.parentNode.removeChild(this._backdrop);
this._backdrop = null;
}
this._backdrop = null;
};
_proto._showBackdrop = function _showBackdrop(callback) {
@@ -553,10 +566,6 @@
this._backdrop.classList.add(ClassName.SHOW);
if (!callback) {
return;
}
if (!animate) {
callback();
return;
@@ -571,9 +580,7 @@
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();
if (callback) {
callback();
}
callback();
};
if (this._element.classList.contains(ClassName.FADE)) {
@@ -584,7 +591,7 @@
} else {
callbackRemove();
}
} else if (callback) {
} else {
callback();
}
} // ----------------------------------------------------------------------
@@ -690,7 +697,7 @@
return this.each(function () {
var data = Data.getData(this, DATA_KEY);
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
var _config = _objectSpread2({}, Default, {}, Manipulator.getDataAttributes(this), {}, typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
@@ -736,14 +743,8 @@
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this10 = this;
var target;
var selector = getSelectorFromElement(this);
if (selector) {
target = SelectorEngine.findOne(selector);
}
var config = Data.getData(target, DATA_KEY) ? 'toggle' : _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
var target = SelectorEngine.findOne(selector);
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
@@ -764,6 +765,8 @@
var data = Data.getData(target, DATA_KEY);
if (!data) {
var config = _objectSpread2({}, Manipulator.getDataAttributes(target), {}, Manipulator.getDataAttributes(this));
data = new Modal(target, config);
}
@@ -773,8 +776,11 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .modal to jQuery only if jQuery is present
*/
/* istanbul ignore if */
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Modal._jQueryInterface;