mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
Rebuild the dist to pickup new utilities file (#29105)
Dist after adding new utils file
This commit is contained in:
Vendored
+6
-4
@@ -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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
}
|
||||
|
||||
var transitionDuration = getTransitionDurationFromElement(element);
|
||||
EventHandler.one(element, TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
EventHandler.one(element, TRANSITION_END, function () {
|
||||
return _this._destroyElement(element);
|
||||
});
|
||||
emulateTransitionEnd(element, transitionDuration);
|
||||
};
|
||||
@@ -268,6 +268,8 @@
|
||||
* add .alert to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Alert._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-3
@@ -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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
@@ -181,7 +181,6 @@
|
||||
|
||||
if (!data) {
|
||||
data = new Button(button);
|
||||
Data.setData(button, DATA_KEY, data);
|
||||
}
|
||||
|
||||
data.toggle();
|
||||
@@ -207,6 +206,8 @@
|
||||
* add .button to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Button._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+34
-21
@@ -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.Carousel = 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;
|
||||
@@ -388,7 +403,7 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
config = _objectSpread2({}, Default, {}, config);
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
@@ -431,7 +446,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
if (this._config.touch && this._touchSupported) {
|
||||
this._addTouchEventListeners();
|
||||
}
|
||||
};
|
||||
@@ -439,10 +454,6 @@
|
||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this._touchSupported) {
|
||||
return;
|
||||
}
|
||||
|
||||
var start = function start(event) {
|
||||
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||
_this3.touchStartX = event.clientX;
|
||||
@@ -691,10 +702,10 @@
|
||||
Carousel._carouselInterface = function _carouselInterface(element, config) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
|
||||
var _config = _objectSpread2({}, Default, {}, Manipulator.getDataAttributes(element));
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _objectSpread({}, _config, config);
|
||||
_config = _objectSpread2({}, _config, {}, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
@@ -736,7 +747,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
|
||||
var config = _objectSpread2({}, Manipulator.getDataAttributes(target), {}, Manipulator.getDataAttributes(this));
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
@@ -793,6 +804,8 @@
|
||||
* add .carousel to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Carousel._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+35
-20
@@ -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.Collapse = 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;
|
||||
@@ -434,7 +449,7 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
config = _objectSpread2({}, Default, {}, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
typeCheckConfig(NAME, config, DefaultType);
|
||||
@@ -463,7 +478,10 @@
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + parent + "\"]";
|
||||
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
var selector = getSelectorFromElement(element);
|
||||
var selected = selector ? SelectorEngine.findOne(selector) : null;
|
||||
|
||||
_this3._addAriaAndCollapsedClass(selected, [element]);
|
||||
});
|
||||
return parent;
|
||||
};
|
||||
@@ -487,15 +505,10 @@
|
||||
} // Static
|
||||
;
|
||||
|
||||
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||
var selector = getSelectorFromElement(element);
|
||||
return selector ? SelectorEngine.findOne(selector) : null;
|
||||
};
|
||||
|
||||
Collapse._collapseInterface = function _collapseInterface(element, config) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
|
||||
var _config = _objectSpread2({}, Default, {}, Manipulator.getDataAttributes(element), {}, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
@@ -580,6 +593,8 @@
|
||||
* add .collapse to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Collapse._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+26
-11
@@ -24,20 +24,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;
|
||||
@@ -87,7 +102,7 @@
|
||||
return {};
|
||||
}
|
||||
|
||||
var attributes = _objectSpread({}, element.dataset);
|
||||
var attributes = _objectSpread2({}, element.dataset);
|
||||
|
||||
Object.keys(attributes).forEach(function (key) {
|
||||
attributes[key] = normalizeData(attributes[key]);
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => chr.toLowerCase())\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {\n ...element.dataset\n }\n\n Object.keys(attributes).forEach(key => {\n attributes[key] = normalizeData(attributes[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n },\n\n toggleClass(element, className) {\n if (!element) {\n return\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className)\n } else {\n element.classList.add(className)\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","dataset","Object","keys","forEach","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","toggleClass","className","classList","contains","remove","add"],"mappings":"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"}
|
||||
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => chr.toLowerCase())\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {\n ...element.dataset\n }\n\n Object.keys(attributes).forEach(key => {\n attributes[key] = normalizeData(attributes[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n },\n\n toggleClass(element, className) {\n if (!element) {\n return\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className)\n } else {\n element.classList.add(className)\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","dataset","Object","keys","forEach","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","toggleClass","className","classList","contains","remove","add"],"mappings":"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"}
|
||||
Vendored
-24
@@ -48,10 +48,6 @@
|
||||
element = document.documentElement;
|
||||
}
|
||||
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return polyfill_js.find.call(element, selector);
|
||||
},
|
||||
findOne: function findOne(selector, element) {
|
||||
@@ -59,29 +55,17 @@
|
||||
element = document.documentElement;
|
||||
}
|
||||
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return polyfill_js.findOne.call(element, selector);
|
||||
},
|
||||
children: function children(element, selector) {
|
||||
var _this = this;
|
||||
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
var children = makeArray(element.children);
|
||||
return children.filter(function (child) {
|
||||
return _this.matches(child, selector);
|
||||
});
|
||||
},
|
||||
parents: function parents(element, selector) {
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
var parents = [];
|
||||
var ancestor = element.parentNode;
|
||||
|
||||
@@ -96,17 +80,9 @@
|
||||
return parents;
|
||||
},
|
||||
closest: function closest(element, selector) {
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return polyfill_js.closest.call(element, selector);
|
||||
},
|
||||
prev: function prev(element, selector) {
|
||||
if (typeof selector !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
var siblings = [];
|
||||
var previous = element.previousSibling;
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+33
-22
@@ -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('popper.js'), require('./dom/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.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('popper.js'), require('../dom/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/manipulator.js', 'popper.js', '../dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
|
||||
}(this, function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
|
||||
|
||||
@@ -46,20 +46,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;
|
||||
@@ -373,21 +388,15 @@
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
|
||||
config = _objectSpread2({}, this.constructor.Default, {}, Manipulator.getDataAttributes(this._element), {}, config);
|
||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
if (parent) {
|
||||
this._menu = SelectorEngine.findOne(Selector.MENU, parent);
|
||||
}
|
||||
}
|
||||
|
||||
return this._menu;
|
||||
return SelectorEngine.findOne(Selector.MENU, parent);
|
||||
};
|
||||
|
||||
_proto._getPlacement = function _getPlacement() {
|
||||
@@ -422,7 +431,7 @@
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
|
||||
data.offsets = _objectSpread2({}, data.offsets, {}, _this2._config.offset(data.offsets, _this2._element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
@@ -654,6 +663,8 @@
|
||||
* add .dropdown to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Dropdown._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+43
-37
@@ -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;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+31
-14
@@ -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/selector-engine.js'), require('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selector-engine.js', './tooltip.js'], factory) :
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/data.js'), require('../dom/selector-engine.js'), require('../tooltip/tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/selector-engine.js', '../tooltip/tooltip.js'], factory) :
|
||||
(global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
|
||||
}(this, function (Data, SelectorEngine, Tooltip) { 'use strict';
|
||||
|
||||
@@ -44,20 +44,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;
|
||||
@@ -91,14 +106,14 @@
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
|
||||
var Default = _objectSpread({}, Tooltip.Default, {
|
||||
var Default = _objectSpread2({}, Tooltip.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = _objectSpread({}, Tooltip.DefaultType, {
|
||||
var DefaultType = _objectSpread2({}, Tooltip.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
@@ -259,6 +274,8 @@
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+30
-13
@@ -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.ScrollSpy = 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;
|
||||
@@ -263,7 +278,7 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
|
||||
config = _objectSpread2({}, Default, {}, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.target !== 'string') {
|
||||
var id = config.target.id;
|
||||
@@ -434,6 +449,8 @@
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-2
@@ -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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.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/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
@@ -340,6 +340,8 @@
|
||||
* add .tab to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
jQuery.fn[NAME] = Tab._jQueryInterface;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+36
-13
@@ -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')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js'], factory) :
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/data.js'), require('../dom/event-handler.js'), require('../dom/manipulator.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/manipulator.js'], factory) :
|
||||
(global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
|
||||
}(this, function (Data, EventHandler, Manipulator) { 'use strict';
|
||||
|
||||
@@ -44,20 +44,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;
|
||||
@@ -141,6 +156,10 @@
|
||||
});
|
||||
};
|
||||
|
||||
var reflow = function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
@@ -230,6 +249,8 @@
|
||||
|
||||
this._element.classList.remove(ClassName.HIDE);
|
||||
|
||||
reflow(this._element);
|
||||
|
||||
this._element.classList.add(ClassName.SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
@@ -287,7 +308,7 @@
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
|
||||
config = _objectSpread2({}, Default, {}, Manipulator.getDataAttributes(this._element), {}, typeof config === 'object' && config ? config : {});
|
||||
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
@@ -351,6 +372,8 @@
|
||||
* add .toast to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+42
-31
@@ -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('popper.js'), require('./dom/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.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('popper.js'), require('../dom/selector-engine.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/event-handler.js', '../dom/manipulator.js', 'popper.js', '../dom/selector-engine.js'], factory) :
|
||||
(global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
|
||||
}(this, function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
|
||||
|
||||
@@ -46,20 +46,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;
|
||||
@@ -308,7 +323,7 @@
|
||||
};
|
||||
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
var _ret = _loop(i, len);
|
||||
var _ret = _loop(i);
|
||||
|
||||
if (_ret === "continue") continue;
|
||||
}
|
||||
@@ -537,7 +552,7 @@
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
|
||||
this.addAttachmentClass(attachment);
|
||||
this._addAttachmentClass(attachment);
|
||||
|
||||
var container = this._getContainer();
|
||||
|
||||
@@ -606,7 +621,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
_proto.hide = function hide(callback) {
|
||||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
@@ -622,13 +637,7 @@
|
||||
|
||||
EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
|
||||
|
||||
if (_this2._popper !== null) {
|
||||
_this2._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
_this2._popper.destroy();
|
||||
};
|
||||
|
||||
var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
|
||||
@@ -672,10 +681,6 @@
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
if (this.tip) {
|
||||
return this.tip;
|
||||
@@ -699,7 +704,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
if (typeof content === 'object' && isElement(content)) {
|
||||
if (content.jquery) {
|
||||
content = content[0];
|
||||
} // content is a DOM node or a jQuery
|
||||
@@ -739,6 +744,10 @@
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
|
||||
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
var _this3 = this;
|
||||
|
||||
@@ -746,7 +755,7 @@
|
||||
|
||||
if (typeof this.config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
|
||||
data.offsets = _objectSpread2({}, data.offsets, {}, _this3.config.offset(data.offsets, _this3.element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
@@ -802,7 +811,7 @@
|
||||
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = _objectSpread({}, this.config, {
|
||||
this.config = _objectSpread2({}, this.config, {
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
});
|
||||
@@ -907,7 +916,7 @@
|
||||
config.container = config.container[0];
|
||||
}
|
||||
|
||||
config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
|
||||
config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
@@ -966,7 +975,7 @@
|
||||
|
||||
this._cleanTipClass();
|
||||
|
||||
this.addAttachmentClass(this._getAttachment(popperData.placement));
|
||||
this._addAttachmentClass(this._getAttachment(popperData.placement));
|
||||
};
|
||||
|
||||
_proto._fixTransition = function _fixTransition() {
|
||||
@@ -1059,6 +1068,8 @@
|
||||
* add .tooltip to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
|
||||
|
||||
if (typeof jQuery !== 'undefined') {
|
||||
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user