1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-01 17:32:41 +02:00
This commit is contained in:
XhmikosR
2020-03-28 12:29:08 +02:00
committed by GitHub
parent f761d8e801
commit 74afe149c4
59 changed files with 4462 additions and 4022 deletions

2
js/dist/dom/data.js vendored
View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap data.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap event-handler.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -279,7 +279,7 @@
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = polyfill_js.createCustomEvent(event, {
evt = new CustomEvent(event, {
bubbles: bubbles,
cancelable: true
});

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap manipulator.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -43,13 +43,13 @@
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(source, true).forEach(function (key) {
ownKeys(Object(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) {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap polyfill.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -32,58 +32,11 @@
};
/* istanbul ignore file */
var _Element$prototype = Element.prototype;
exports.matches = _Element$prototype.matches;
exports.closest = _Element$prototype.closest;
exports.find = Element.prototype.querySelectorAll;
exports.findOne = Element.prototype.querySelector;
exports.createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
if (typeof window.CustomEvent !== 'function') {
exports.createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = exports.createCustomEvent('Bootstrap', {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
@@ -95,26 +48,6 @@
return e.defaultPrevented;
}();
if (!exports.matches) {
exports.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!exports.closest) {
exports.closest = function closest(selector) {
var element = this;
do {
if (exports.matches.call(element, selector)) {
return element;
}
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
return null;
};
}
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap selector-engine.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -9,21 +9,6 @@
(global = global || self, global.SelectorEngine = factory(global.Polyfill));
}(this, (function (polyfill_js) { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selector-engine.js
@@ -39,14 +24,16 @@
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return polyfill_js.matches.call(element, selector);
return element.matches(selector);
},
find: function find(selector, element) {
var _ref;
if (element === void 0) {
element = document.documentElement;
}
return polyfill_js.find.call(element, selector);
return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));
},
findOne: function findOne(selector, element) {
if (element === void 0) {
@@ -56,11 +43,12 @@
return polyfill_js.findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
var _ref2;
var children = (_ref2 = []).concat.apply(_ref2, element.children);
var children = makeArray(element.children);
return children.filter(function (child) {
return _this.matches(child, selector);
return child.matches(selector);
});
},
parents: function parents(element, selector) {
@@ -78,21 +66,33 @@
return parents;
},
closest: function closest(element, selector) {
return polyfill_js.closest.call(element, selector);
return element.closest(selector);
},
prev: function prev(element, selector) {
var siblings = [];
var previous = element.previousSibling;
var previous = element.previousElementSibling;
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
if (this.matches(previous, selector)) {
siblings.push(previous);
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousSibling;
previous = previous.previousElementSibling;
}
return siblings;
return [];
},
next: function next(element, selector) {
var next = element.nextElementSibling;
while (next) {
if (this.matches(next, selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};

File diff suppressed because one or more lines are too long