dist
This commit is contained in:
parent
cf71363649
commit
b744ba2c08
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7291
dist/js/bootstrap.js
7291
dist/js/bootstrap.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -35,7 +35,6 @@ h1, h2, h3, h4, h5, h6 {
|
|||
}
|
||||
|
||||
.nav-scroller .nav {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: nowrap;
|
||||
|
@ -61,7 +60,6 @@ h1, h2, h3, h4, h5, h6 {
|
|||
|
||||
.flex-auto {
|
||||
-ms-flex: 0 0 auto;
|
||||
-webkit-box-flex: 0;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ body {
|
|||
|
||||
body {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
color: #fff;
|
||||
text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
|
||||
|
|
|
@ -10,10 +10,8 @@ body {
|
|||
|
||||
body {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
|
|
|
@ -39,7 +39,6 @@ body {
|
|||
}
|
||||
|
||||
.nav-scroller .nav {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: nowrap;
|
||||
|
|
|
@ -67,13 +67,11 @@
|
|||
|
||||
.flex-equal > * {
|
||||
-ms-flex: 1;
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.flex-md-equal > * {
|
||||
-ms-flex: 1;
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@ body {
|
|||
|
||||
body {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
|
|
|
@ -20,7 +20,6 @@ var Alert = function ($) {
|
|||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
|
@ -98,15 +97,16 @@ var Alert = function ($) {
|
|||
|
||||
$(element).removeClass(ClassName.SHOW);
|
||||
|
||||
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
|
||||
if (!$(element).hasClass(ClassName.FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(element);
|
||||
$(element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
};
|
||||
|
||||
_proto._destroyElement = function _destroyElement(element) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -28,7 +30,6 @@ var Carousel = function ($) {
|
|||
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var MILLISECONDS_MULTIPLIER = 1000;
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
|
@ -98,7 +99,6 @@ var Carousel = function ($) {
|
|||
this._config = this._getConfig(config);
|
||||
this._element = $(element)[0];
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||
this._transitionDuration = this._getTransitionDuration();
|
||||
|
||||
this._addEventListeners();
|
||||
} // Getters
|
||||
|
@ -132,7 +132,7 @@ var Carousel = function ($) {
|
|||
this._isPaused = true;
|
||||
}
|
||||
|
||||
if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
|
||||
if ($(this._element).find(Selector.NEXT_PREV)[0]) {
|
||||
Util.triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
@ -200,25 +200,11 @@ var Carousel = function ($) {
|
|||
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config = _objectSpread({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getTransitionDuration = function _getTransitionDuration() {
|
||||
// Get transition-duration of first element in the carousel
|
||||
var transitionDuration = $(this._element).find(Selector.ITEM).css('transition-duration'); // Return 0 carousel item is not found
|
||||
|
||||
if (!transitionDuration) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0]; // Multiply by 1000 if transition-duration is defined in seconds
|
||||
|
||||
return transitionDuration.indexOf('ms') > -1 ? parseFloat(transitionDuration) : parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
|
||||
};
|
||||
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this2 = this;
|
||||
|
||||
|
@ -385,11 +371,12 @@ var Carousel = function ($) {
|
|||
to: nextElementIndex
|
||||
});
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
|
||||
if ($(this._element).hasClass(ClassName.SLIDE)) {
|
||||
$(nextElement).addClass(orderClassName);
|
||||
Util.reflow(nextElement);
|
||||
$(activeElement).addClass(directionalClassName);
|
||||
$(nextElement).addClass(directionalClassName);
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
|
||||
$(activeElement).one(Util.TRANSITION_END, function () {
|
||||
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
|
||||
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||
|
@ -397,7 +384,7 @@ var Carousel = function ($) {
|
|||
setTimeout(function () {
|
||||
return $(_this3._element).trigger(slidEvent);
|
||||
}, 0);
|
||||
}).emulateTransitionEnd(this._transitionDuration);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||
$(nextElement).addClass(ClassName.ACTIVE);
|
||||
|
@ -415,10 +402,10 @@ var Carousel = function ($) {
|
|||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $(this).data());
|
||||
var _config = _objectSpread({}, Default, $(this).data());
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _extends({}, _config, config);
|
||||
_config = _objectSpread({}, _config, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
|
@ -456,7 +443,7 @@ var Carousel = function ($) {
|
|||
return;
|
||||
}
|
||||
|
||||
var config = _extends({}, $(target).data(), $(this).data());
|
||||
var config = _objectSpread({}, $(target).data(), $(this).data());
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -22,7 +24,6 @@ var Collapse = function ($) {
|
|||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 600;
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
|
@ -164,14 +165,10 @@ var Collapse = function ($) {
|
|||
$(_this._element).trigger(Event.SHOWN);
|
||||
};
|
||||
|
||||
if (!Util.supportsTransitionEnd()) {
|
||||
complete();
|
||||
return;
|
||||
}
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = "scroll" + capitalizedDimension;
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||
};
|
||||
|
||||
|
@ -219,13 +216,8 @@ var Collapse = function ($) {
|
|||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
|
||||
if (!Util.supportsTransitionEnd()) {
|
||||
complete();
|
||||
return;
|
||||
}
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
};
|
||||
|
||||
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
||||
|
@ -243,7 +235,7 @@ var Collapse = function ($) {
|
|||
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config = _objectSpread({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
@ -298,7 +290,7 @@ var Collapse = function ($) {
|
|||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config);
|
||||
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config);
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -60,7 +62,7 @@ var Dropdown = function ($) {
|
|||
FORM_CHILD: '.dropdown form',
|
||||
MENU: '.dropdown-menu',
|
||||
NAVBAR_NAV: '.navbar-nav',
|
||||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
|
||||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
|
@ -217,7 +219,7 @@ var Dropdown = function ($) {
|
|||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, this.constructor.Default, $(this._element).data(), config);
|
||||
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
@ -264,7 +266,7 @@ var Dropdown = function ($) {
|
|||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offsetConf.fn = function (data) {
|
||||
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets) || {});
|
||||
data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../src/index.js"],"names":["$","TypeError","version","fn","jquery","split","minMajor","ltMajor","minMinor","minPatch","maxMajor","Error"],"mappings":"AAaA;;;;;;AAOA,CAAC,UAACA,CAAD,EAAO;AACN,MAAI,OAAOA,CAAP,KAAa,WAAjB,EAA8B;AAC5B,UAAM,IAAIC,SAAJ,CAAc,kGAAd,CAAN;AACD;;AAED,MAAMC,UAAUF,EAAEG,EAAF,CAAKC,MAAL,CAAYC,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,UAAU,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;;AAEA,MAAIR,QAAQ,CAAR,IAAaK,OAAb,IAAwBL,QAAQ,CAAR,IAAaM,QAArC,IAAiDN,QAAQ,CAAR,MAAeI,QAAf,IAA2BJ,QAAQ,CAAR,MAAeM,QAA1C,IAAsDN,QAAQ,CAAR,IAAaO,QAApH,IAAgIP,QAAQ,CAAR,KAAcQ,QAAlJ,EAA4J;AAC1J,UAAM,IAAIC,KAAJ,CAAU,8EAAV,CAAN;AACD;AACF,CAfD,EAeGX,CAfH","file":"index.js","sourcesContent":["import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(($) => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})($)\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Tooltip\n}\n"]}
|
||||
{"version":3,"sources":["../src/index.js"],"names":["$","TypeError","version","fn","jquery","split","minMajor","ltMajor","minMinor","minPatch","maxMajor","Error"],"mappings":"AAaA;;;;;;AAOA,CAAC,UAACA,CAAD,EAAO;AACN,MAAI,OAAOA,CAAP,KAAa,WAAjB,EAA8B;AAC5B,UAAM,IAAIC,SAAJ,CAAc,kGAAd,CAAN;AACD;;AAED,MAAMC,UAAUF,EAAEG,EAAF,CAAKC,MAAL,CAAYC,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,UAAU,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;;AAEA,MAAIR,QAAQ,CAAR,IAAaK,OAAb,IAAwBL,QAAQ,CAAR,IAAaM,QAArC,IAAiDN,QAAQ,CAAR,MAAeI,QAAf,IAA2BJ,QAAQ,CAAR,MAAeM,QAA1C,IAAsDN,QAAQ,CAAR,IAAaO,QAApH,IAAgIP,QAAQ,CAAR,KAAcQ,QAAlJ,EAA4J;AAC1J,UAAM,IAAIC,KAAJ,CAAU,8EAAV,CAAN;AACD;AACF,CAfD,EAeGX,CAfH","sourcesContent":["import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(($) => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})($)\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Tooltip\n}\n"],"file":"index.js"}
|
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -22,8 +24,6 @@ var Modal = function ($) {
|
|||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 300;
|
||||
var BACKDROP_TRANSITION_DURATION = 150;
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var Default = {
|
||||
|
@ -102,7 +102,7 @@ var Modal = function ($) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ var Modal = function ($) {
|
|||
}
|
||||
|
||||
this._isShown = false;
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
|
@ -180,9 +180,10 @@ var Modal = function ($) {
|
|||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
|
@ -207,7 +208,7 @@ var Modal = function ($) {
|
|||
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config = _objectSpread({}, Default, config);
|
||||
Util.typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
@ -215,7 +216,7 @@ var Modal = function ($) {
|
|||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
var _this3 = this;
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
var transition = $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// Don't move modal's DOM position
|
||||
|
@ -252,7 +253,8 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
if (transition) {
|
||||
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
|
||||
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
transitionComplete();
|
||||
}
|
||||
|
@ -330,7 +332,6 @@ var Modal = function ($) {
|
|||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
var doAnimate = Util.supportsTransitionEnd() && animate;
|
||||
this._backdrop = document.createElement('div');
|
||||
this._backdrop.className = ClassName.BACKDROP;
|
||||
|
||||
|
@ -356,7 +357,7 @@ var Modal = function ($) {
|
|||
}
|
||||
});
|
||||
|
||||
if (doAnimate) {
|
||||
if (animate) {
|
||||
Util.reflow(this._backdrop);
|
||||
}
|
||||
|
||||
|
@ -366,12 +367,13 @@ var Modal = function ($) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!doAnimate) {
|
||||
if (!animate) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
|
||||
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||
|
||||
|
@ -383,8 +385,10 @@ var Modal = function ($) {
|
|||
}
|
||||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
|
||||
if ($(this._element).hasClass(ClassName.FADE)) {
|
||||
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
|
||||
|
||||
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||
} else {
|
||||
callbackRemove();
|
||||
}
|
||||
|
@ -491,7 +495,7 @@ var Modal = function ($) {
|
|||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
|
||||
var _config = _objectSpread({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config);
|
||||
|
@ -541,7 +545,7 @@ var Modal = function ($) {
|
|||
target = $(selector)[0];
|
||||
}
|
||||
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
|
||||
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
|
||||
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
@ -26,14 +28,14 @@ var Popover = function ($) {
|
|||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
|
||||
var Default = _extends({}, Tooltip.Default, {
|
||||
var Default = _objectSpread({}, 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 = _extends({}, Tooltip.DefaultType, {
|
||||
var DefaultType = _objectSpread({}, Tooltip.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -144,7 +146,7 @@ var ScrollSpy = function ($) {
|
|||
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config = _objectSpread({}, Default, config);
|
||||
|
||||
if (typeof config.target !== 'string') {
|
||||
var id = $(config.target).attr('id');
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,6 @@ var Tab = function ($) {
|
|||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
|
@ -139,14 +138,15 @@ var Tab = function ($) {
|
|||
}
|
||||
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(active);
|
||||
$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
function _objectSpread(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; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
|
@ -21,7 +23,6 @@ var Tooltip = function ($) {
|
|||
var DATA_KEY = 'bs.tooltip';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
var DefaultType = {
|
||||
|
@ -284,8 +285,9 @@ var Tooltip = function ($) {
|
|||
}
|
||||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
if ($(this.tip).hasClass(ClassName.FADE)) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
@ -335,8 +337,9 @@ var Tooltip = function ($) {
|
|||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
if ($(this.tip).hasClass(ClassName.FADE)) {
|
||||
var transitionDuration = Util.getTransitionDurationFromElement(tip);
|
||||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
@ -427,7 +430,7 @@ var Tooltip = function ($) {
|
|||
});
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = _extends({}, this.config, {
|
||||
this.config = _objectSpread({}, this.config, {
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
});
|
||||
|
@ -521,7 +524,7 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, this.constructor.Default, $(this.element).data(), config);
|
||||
config = _objectSpread({}, this.constructor.Default, $(this.element).data(), config);
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,8 +10,9 @@ var Util = function ($) {
|
|||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var transition = false;
|
||||
var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
var TRANSITION_END = 'transitionend';
|
||||
var MAX_UID = 1000000;
|
||||
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
|
@ -19,8 +20,8 @@ var Util = function ($) {
|
|||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: transition.end,
|
||||
delegateType: transition.end,
|
||||
bindType: TRANSITION_END,
|
||||
delegateType: TRANSITION_END,
|
||||
handle: function handle(event) {
|
||||
if ($(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
|
@ -31,16 +32,6 @@ var Util = function ($) {
|
|||
};
|
||||
}
|
||||
|
||||
function transitionEndTest() {
|
||||
if (typeof window !== 'undefined' && window.QUnit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
end: 'transitionend'
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
|
@ -57,12 +48,8 @@ var Util = function ($) {
|
|||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
transition = transitionEndTest();
|
||||
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
|
||||
if (Util.supportsTransitionEnd()) {
|
||||
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
@ -95,14 +82,32 @@ var Util = function ($) {
|
|||
return null;
|
||||
}
|
||||
},
|
||||
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var transitionDuration = $(element).css('transition-duration');
|
||||
var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
$(element).trigger(transition.end);
|
||||
$(element).trigger(TRANSITION_END);
|
||||
},
|
||||
// TODO: Remove in v5
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(transition);
|
||||
return Boolean(TRANSITION_END);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -701,7 +701,7 @@
|
|||
},
|
||||
"@sinonjs/formatio": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz",
|
||||
"integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -1286,7 +1286,7 @@
|
|||
},
|
||||
"babel-eslint": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "http://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz",
|
||||
"integrity": "sha512-Qt2lz2egBxNYWqN9JIO2z4NOOf8i4b5JS6CFoYrOZZTDssueiV1jH/jsefyg+86SeNY3rB361/mi3kE1WK2WYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -3602,7 +3602,7 @@
|
|||
},
|
||||
"event-stream": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
|
||||
"integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
|
Loading…
Reference in New Issue