Release v5.0.2 (#34276)

* Bump version to v5.0.2.

* Dist
This commit is contained in:
XhmikosR 2021-06-22 21:29:16 +03:00 committed by GitHub
parent 16d5041a76
commit 688bce4fa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 3113 additions and 2811 deletions

View file

@ -46,11 +46,11 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.1.zip)
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.2.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.1`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.2`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.

View file

@ -47,8 +47,8 @@ params:
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
current_version: "5.0.1"
current_ruby_version: "5.0.1"
current_version: "5.0.2"
current_ruby_version: "5.0.2"
docs_version: "5.0"
rfs_version: "9.0.3"
github_org: "https://github.com/twbs"
@ -61,19 +61,19 @@ params:
icons: "https://icons.getbootstrap.com/"
download:
source: "https://github.com/twbs/bootstrap/archive/v5.0.1.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.1/bootstrap-5.0.1-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.1/bootstrap-5.0.1-examples.zip"
source: "https://github.com/twbs/bootstrap/archive/v5.0.2.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.2/bootstrap-5.0.2-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.2/bootstrap-5.0.2-examples.zip"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
css_hash: "sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-LPvXVVAlyPoBSGkX8UddpctDks+1P4HG8MhT7/YwqHtJ40bstjzCqjj+VVVDhsCo"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
js_hash: "sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
css_hash: "sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-gXt9imSW0VcJVHezoNQsP+TNrjYXoGcrqBZJpry9zJt8PCQjobwmhMGaDHTASo9N"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
js_hash: "sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
popper_hash: "sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Reboot v5.0.1 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.0.1 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

35
js/dist/alert.js vendored
View file

@ -1,17 +1,16 @@
/*!
* Bootstrap alert.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap alert.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.SelectorEngine, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -56,9 +55,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -85,7 +93,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): alert.js
* Bootstrap (v5.0.2): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -148,21 +156,14 @@
}
_destroyElement(element) {
if (element.parentNode) {
element.parentNode.removeChild(element);
}
element.remove();
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
} // Static
static jQueryInterface(config) {
return this.each(function () {
let data = Data__default['default'].get(this, DATA_KEY);
if (!data) {
data = new Alert(this);
}
const data = Alert.getOrCreateInstance(this);
if (config === 'close') {
data[config](this);

BIN
js/dist/alert.js.map vendored

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap base-component.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap base-component.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -70,33 +70,45 @@
return null;
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const execute = callback => {
if (typeof callback === 'function') {
callback();
}
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
execute(callback);
return;
}
const durationPadding = 5;
const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
let called = false;
const handler = ({
target
}) => {
if (target !== transitionElement) {
return;
}
called = true;
transitionElement.removeEventListener(TRANSITION_END, handler);
execute(callback);
};
transitionElement.addEventListener(TRANSITION_END, handler);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(transitionElement);
}
}, emulatedDuration);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): base-component.js
* Bootstrap (v5.0.2): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -106,7 +118,7 @@
* ------------------------------------------------------------------------
*/
const VERSION = '5.0.1';
const VERSION = '5.0.2';
class BaseComponent {
constructor(element) {
@ -129,14 +141,7 @@
}
_queueCallback(callback, element, isAnimated = true) {
if (!isAnimated) {
execute(callback);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler__default['default'].one(element, 'transitionend', () => execute(callback));
emulateTransitionEnd(element, transitionDuration);
executeAfterTransition(callback, element, isAnimated);
}
/** Static */
@ -145,6 +150,10 @@
return Data__default['default'].get(element, this.DATA_KEY);
}
static getOrCreateInstance(element, config = {}) {
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
}
static get VERSION() {
return VERSION;
}

Binary file not shown.

37
js/dist/button.js vendored
View file

@ -1,17 +1,16 @@
/*!
* Bootstrap button.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap button.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.SelectorEngine, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -27,9 +26,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -56,7 +64,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): button.js
* Bootstrap (v5.0.2): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -94,11 +102,7 @@
static jQueryInterface(config) {
return this.each(function () {
let data = Data__default['default'].get(this, DATA_KEY);
if (!data) {
data = new Button(this);
}
const data = Button.getOrCreateInstance(this);
if (config === 'toggle') {
data[config]();
@ -117,12 +121,7 @@
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
event.preventDefault();
const button = event.target.closest(SELECTOR_DATA_TOGGLE);
let data = Data__default['default'].get(button, DATA_KEY);
if (!data) {
data = new Button(button);
}
const data = Button.getOrCreateInstance(button);
data.toggle();
});
/**

BIN
js/dist/button.js.map vendored

Binary file not shown.

121
js/dist/carousel.js vendored
View file

@ -1,18 +1,17 @@
/*!
* Bootstrap carousel.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap carousel.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -85,17 +84,11 @@
};
const isVisible = element => {
if (!element) {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const reflow = element => element.offsetHeight;
@ -112,9 +105,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -140,10 +142,37 @@
}
});
};
/**
* Return the previous/next element of a list.
*
* @param {array} list The list of elements
* @param activeElement The active element
* @param shouldGetNext Choose to get next or previous element
* @param isCycleAllowed
* @return {Element|elem} The proper element
*/
const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
if (index === -1) {
return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
}
const listLength = list.length;
index += shouldGetNext ? 1 : -1;
if (isCycleAllowed) {
index = (index + listLength) % listLength;
}
return list[Math.max(0, Math.min(index, listLength - 1))];
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): carousel.js
* Bootstrap (v5.0.2): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -182,6 +211,10 @@
const ORDER_PREV = 'prev';
const DIRECTION_LEFT = 'left';
const DIRECTION_RIGHT = 'right';
const KEY_TO_DIRECTION = {
[ARROW_LEFT_KEY]: DIRECTION_RIGHT,
[ARROW_RIGHT_KEY]: DIRECTION_LEFT
};
const EVENT_SLIDE = `slide${EVENT_KEY}`;
const EVENT_SLID = `slid${EVENT_KEY}`;
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;
@ -250,9 +283,7 @@
next() {
if (!this._isSliding) {
this._slide(ORDER_NEXT);
}
this._slide(ORDER_NEXT);
}
nextWhenVisible() {
@ -264,9 +295,7 @@
}
prev() {
if (!this._isSliding) {
this._slide(ORDER_PREV);
}
this._slide(ORDER_PREV);
}
pause(event) {
@ -328,7 +357,8 @@
_getConfig(config) {
config = { ...Default,
...config
...Manipulator__default['default'].getDataAttributes(this._element),
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME, config, DefaultType);
return config;
@ -426,14 +456,12 @@
return;
}
if (event.key === ARROW_LEFT_KEY) {
const direction = KEY_TO_DIRECTION[event.key];
if (direction) {
event.preventDefault();
this._slide(DIRECTION_RIGHT);
} else if (event.key === ARROW_RIGHT_KEY) {
event.preventDefault();
this._slide(DIRECTION_LEFT);
this._slide(direction);
}
}
@ -444,20 +472,7 @@
_getItemByOrder(order, activeElement) {
const isNext = order === ORDER_NEXT;
const isPrev = order === ORDER_PREV;
const activeIndex = this._getItemIndex(activeElement);
const lastItemIndex = this._items.length - 1;
const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
if (isGoingToWrap && !this._config.wrap) {
return activeElement;
}
const delta = isPrev ? -1 : 1;
const itemIndex = (activeIndex + delta) % this._items.length;
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);
}
_triggerSlideEvent(relatedTarget, eventDirectionName) {
@ -530,6 +545,10 @@
return;
}
if (this._isSliding) {
return;
}
const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.defaultPrevented) {
@ -613,10 +632,10 @@
static carouselInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
let _config = { ...Default,
...Manipulator__default['default'].getDataAttributes(element)
};
const data = Carousel.getOrCreateInstance(element, config);
let {
_config
} = data;
if (typeof config === 'object') {
_config = { ..._config,
@ -626,10 +645,6 @@
const action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
@ -669,7 +684,7 @@
Carousel.carouselInterface(target, config);
if (slideIndex) {
Data__default['default'].get(target, DATA_KEY).to(slideIndex);
Carousel.getInstance(target).to(slideIndex);
}
event.preventDefault();
@ -688,7 +703,7 @@
const carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
for (let i = 0, len = carousels.length; i < len; i++) {
Carousel.carouselInterface(carousels[i], Data__default['default'].get(carousels[i], DATA_KEY));
Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));
}
});
/**

Binary file not shown.

21
js/dist/collapse.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Bootstrap collapse.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap collapse.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -115,9 +115,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -144,7 +153,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): collapse.js
* Bootstrap (v5.0.2): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -260,7 +269,7 @@
if (actives) {
const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null;
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
if (activesData && activesData._isTransitioning) {
return;
@ -423,7 +432,7 @@
static collapseInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
let data = Collapse.getInstance(element);
const _config = { ...Default,
...Manipulator__default['default'].getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
@ -470,7 +479,7 @@
const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine__default['default'].find(selector);
selectorElements.forEach(element => {
const data = Data__default['default'].get(element, DATA_KEY);
const data = Collapse.getInstance(element);
let config;
if (data) {

Binary file not shown.

4
js/dist/dom/data.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Bootstrap data.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap data.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -11,7 +11,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/data.js
* Bootstrap (v5.0.2): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap event-handler.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap event-handler.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -23,7 +23,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/event-handler.js
* Bootstrap (v5.0.2): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap manipulator.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap manipulator.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -11,7 +11,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/manipulator.js
* Bootstrap (v5.0.2): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

Binary file not shown.

View file

@ -1,5 +1,5 @@
/*!
* Bootstrap selector-engine.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap selector-engine.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -11,7 +11,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/selector-engine.js
* Bootstrap (v5.0.2): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

Binary file not shown.

105
js/dist/dropdown.js vendored
View file

@ -1,13 +1,13 @@
/*!
* Bootstrap dropdown.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap dropdown.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Popper, SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -33,7 +33,6 @@
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -113,17 +112,11 @@
};
const isVisible = element => {
if (!element) {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const isDisabled = element => {
@ -156,9 +149,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -184,10 +186,37 @@
}
});
};
/**
* Return the previous/next element of a list.
*
* @param {array} list The list of elements
* @param activeElement The active element
* @param shouldGetNext Choose to get next or previous element
* @param isCycleAllowed
* @return {Element|elem} The proper element
*/
const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
if (index === -1) {
return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
}
const listLength = list.length;
index += shouldGetNext ? 1 : -1;
if (isCycleAllowed) {
index = (index + listLength) % listLength;
}
return list[Math.max(0, Math.min(index, listLength - 1))];
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dropdown.js
* Bootstrap (v5.0.2): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -507,38 +536,24 @@
};
}
_selectMenuItem(event) {
_selectMenuItem({
key,
target
}) {
const items = SelectorEngine__default['default'].find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
if (!items.length) {
return;
}
let index = items.indexOf(event.target); // Up
if (event.key === ARROW_UP_KEY && index > 0) {
index--;
} // Down
} // if target isn't included in items (e.g. when expanding the dropdown)
// allow cycling to get the last item in case key equals ARROW_UP_KEY
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
index++;
} // index is -1 if the first keydown is an ArrowUp
index = index === -1 ? 0 : index;
items[index].focus();
getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
} // Static
static dropdownInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
const _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(element, _config);
}
const data = Dropdown.getOrCreateInstance(element, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@ -563,7 +578,7 @@
const toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
for (let i = 0, len = toggles.length; i < len; i++) {
const context = Data__default['default'].get(toggles[i], DATA_KEY);
const context = Dropdown.getInstance(toggles[i]);
if (!context || context._config.autoClose === false) {
continue;
@ -636,17 +651,19 @@
return;
}
if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
getToggleButton().click();
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) {
getToggleButton().click();
}
Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
return;
}
if (!isActive || event.key === SPACE_KEY) {
Dropdown.clearMenus();
return;
}
Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
}
}

Binary file not shown.

309
js/dist/modal.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Bootstrap modal.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap modal.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -95,22 +95,17 @@
return typeof obj.nodeType !== 'undefined';
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const typeCheckConfig = (componentName, config, configTypes) => {
@ -126,17 +121,11 @@
};
const isVisible = element => {
if (!element) {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const reflow = element => element.offsetHeight;
@ -153,9 +142,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -188,83 +186,143 @@
}
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
execute(callback);
return;
}
const durationPadding = 5;
const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
let called = false;
const handler = ({
target
}) => {
if (target !== transitionElement) {
return;
}
called = true;
transitionElement.removeEventListener(TRANSITION_END, handler);
execute(callback);
};
transitionElement.addEventListener(TRANSITION_END, handler);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(transitionElement);
}
}, emulatedDuration);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/scrollBar.js
* Bootstrap (v5.0.2): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
const SELECTOR_STICKY_CONTENT = '.sticky-top';
const getWidth = () => {
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
const documentWidth = document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
};
const hide = (width = getWidth()) => {
_disableOverFlow(); // give padding to element to balances the hidden scrollbar width
_setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
_setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
_setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
};
const _disableOverFlow = () => {
const actualValue = document.body.style.overflow;
if (actualValue) {
Manipulator__default['default'].setDataAttribute(document.body, 'overflow', actualValue);
class ScrollBarHelper {
constructor() {
this._element = document.body;
}
document.body.style.overflow = 'hidden';
};
getWidth() {
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
const documentWidth = document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
}
const _setElementAttributes = (selector, styleProp, callback) => {
const scrollbarWidth = getWidth();
SelectorEngine__default['default'].find(selector).forEach(element => {
if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
return;
}
hide() {
const width = this.getWidth();
this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width
this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
}
_disableOverFlow() {
this._saveInitialAttribute(this._element, 'overflow');
this._element.style.overflow = 'hidden';
}
_setElementAttributes(selector, styleProp, callback) {
const scrollbarWidth = this.getWidth();
const manipulationCallBack = element => {
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
return;
}
this._saveInitialAttribute(element, styleProp);
const calculatedValue = window.getComputedStyle(element)[styleProp];
element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
};
this._applyManipulationCallback(selector, manipulationCallBack);
}
reset() {
this._resetElementAttributes(this._element, 'overflow');
this._resetElementAttributes(this._element, 'paddingRight');
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
}
_saveInitialAttribute(element, styleProp) {
const actualValue = element.style[styleProp];
const calculatedValue = window.getComputedStyle(element)[styleProp];
Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
});
};
const reset = () => {
_resetElementAttributes('body', 'overflow');
_resetElementAttributes('body', 'paddingRight');
_resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
_resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
};
const _resetElementAttributes = (selector, styleProp) => {
SelectorEngine__default['default'].find(selector).forEach(element => {
const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
if (typeof value === 'undefined') {
element.style.removeProperty(styleProp);
} else {
Manipulator__default['default'].removeDataAttribute(element, styleProp);
element.style[styleProp] = value;
if (actualValue) {
Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
}
});
};
}
_resetElementAttributes(selector, styleProp) {
const manipulationCallBack = element => {
const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
if (typeof value === 'undefined') {
element.style.removeProperty(styleProp);
} else {
Manipulator__default['default'].removeDataAttribute(element, styleProp);
element.style[styleProp] = value;
}
};
this._applyManipulationCallback(selector, manipulationCallBack);
}
_applyManipulationCallback(selector, callBack) {
if (isElement(selector)) {
callBack(selector);
} else {
SelectorEngine__default['default'].find(selector, this._element).forEach(callBack);
}
}
isOverflowing() {
return this.getWidth() > 0;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/backdrop.js
* Bootstrap (v5.0.2): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@ -272,14 +330,14 @@
isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom
isAnimated: false,
rootElement: document.body,
rootElement: 'body',
// give the choice to place backdrop under different elements
clickCallback: null
};
const DefaultType$1 = {
isVisible: 'boolean',
isAnimated: 'boolean',
rootElement: 'element',
rootElement: '(element|string)',
clickCallback: '(function|null)'
};
const NAME$1 = 'backdrop';
@ -347,8 +405,9 @@
_getConfig(config) {
config = { ...Default$1,
...(typeof config === 'object' ? config : {})
};
config.rootElement = config.rootElement || document.body;
}; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$1, config, DefaultType$1);
return config;
}
@ -373,27 +432,20 @@
EventHandler__default['default'].off(this._element, EVENT_MOUSEDOWN);
this._getElement().parentNode.removeChild(this._element);
this._element.remove();
this._isAppended = false;
}
_emulateAnimation(callback) {
if (!this._config.isAnimated) {
execute(callback);
return;
}
const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
EventHandler__default['default'].one(this._getElement(), 'transitionend', () => execute(callback));
emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): modal.js
* Bootstrap (v5.0.2): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -453,6 +505,7 @@
this._isShown = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollBar = new ScrollBarHelper();
} // Getters
@ -474,20 +527,22 @@
return;
}
if (this._isAnimated()) {
this._isTransitioning = true;
}
const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
relatedTarget
});
if (this._isShown || showEvent.defaultPrevented) {
if (showEvent.defaultPrevented) {
return;
}
this._isShown = true;
hide();
if (this._isAnimated()) {
this._isTransitioning = true;
}
this._scrollBar.hide();
document.body.classList.add(CLASS_NAME_OPEN);
this._adjustDialog();
@ -509,7 +564,7 @@
}
hide(event) {
if (event) {
if (event && ['A', 'AREA'].includes(event.target.tagName)) {
event.preventDefault();
}
@ -576,7 +631,7 @@
_getConfig(config) {
config = { ...Default,
...Manipulator__default['default'].getDataAttributes(this._element),
...config
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME, config, DefaultType);
return config;
@ -679,7 +734,8 @@
this._resetAdjustments();
reset();
this._scrollBar.reset();
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
});
}
@ -716,27 +772,32 @@
return;
}
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
const {
classList,
scrollHeight,
style
} = this._element;
const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed
if (!isModalOverflowing) {
this._element.style.overflowY = 'hidden';
if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {
return;
}
this._element.classList.add(CLASS_NAME_STATIC);
if (!isModalOverflowing) {
style.overflowY = 'hidden';
}
const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler__default['default'].off(this._element, 'transitionend');
EventHandler__default['default'].one(this._element, 'transitionend', () => {
this._element.classList.remove(CLASS_NAME_STATIC);
classList.add(CLASS_NAME_STATIC);
this._queueCallback(() => {
classList.remove(CLASS_NAME_STATIC);
if (!isModalOverflowing) {
EventHandler__default['default'].one(this._element, 'transitionend', () => {
this._element.style.overflowY = '';
});
emulateTransitionEnd(this._element, modalTransitionDuration);
this._queueCallback(() => {
style.overflowY = '';
}, this._dialog);
}
});
emulateTransitionEnd(this._element, modalTransitionDuration);
}, this._dialog);
this._element.focus();
} // ----------------------------------------------------------------------
@ -746,7 +807,9 @@
_adjustDialog() {
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
const scrollbarWidth = getWidth();
const scrollbarWidth = this._scrollBar.getWidth();
const isBodyOverflowing = scrollbarWidth > 0;
if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
@ -766,7 +829,7 @@
static jQueryInterface(config, relatedTarget) {
return this.each(function () {
const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
const data = Modal.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
@ -807,7 +870,7 @@
}
});
});
const data = Modal.getInstance(target) || new Modal(target);
const data = Modal.getOrCreateInstance(target);
data.toggle(this);
});
/**

BIN
js/dist/modal.js.map vendored

Binary file not shown.

267
js/dist/offcanvas.js vendored
View file

@ -1,19 +1,18 @@
/*!
* Bootstrap offcanvas.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap offcanvas.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/manipulator.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/manipulator', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Offcanvas = factory(global.SelectorEngine, global.Manipulator, global.Data, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, Manipulator, Data, EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/manipulator.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/manipulator', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Offcanvas = factory(global.SelectorEngine, global.Manipulator, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, Manipulator, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -96,22 +95,17 @@
return typeof obj.nodeType !== 'undefined';
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj);
}
return null;
};
const typeCheckConfig = (componentName, config, configTypes) => {
@ -127,17 +121,11 @@
};
const isVisible = element => {
if (!element) {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const isDisabled = element => {
@ -170,9 +158,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -203,83 +200,143 @@
}
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
execute(callback);
return;
}
const durationPadding = 5;
const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
let called = false;
const handler = ({
target
}) => {
if (target !== transitionElement) {
return;
}
called = true;
transitionElement.removeEventListener(TRANSITION_END, handler);
execute(callback);
};
transitionElement.addEventListener(TRANSITION_END, handler);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(transitionElement);
}
}, emulatedDuration);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/scrollBar.js
* Bootstrap (v5.0.2): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
const SELECTOR_STICKY_CONTENT = '.sticky-top';
const getWidth = () => {
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
const documentWidth = document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
};
const hide = (width = getWidth()) => {
_disableOverFlow(); // give padding to element to balances the hidden scrollbar width
_setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
_setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
_setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
};
const _disableOverFlow = () => {
const actualValue = document.body.style.overflow;
if (actualValue) {
Manipulator__default['default'].setDataAttribute(document.body, 'overflow', actualValue);
class ScrollBarHelper {
constructor() {
this._element = document.body;
}
document.body.style.overflow = 'hidden';
};
getWidth() {
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
const documentWidth = document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
}
const _setElementAttributes = (selector, styleProp, callback) => {
const scrollbarWidth = getWidth();
SelectorEngine__default['default'].find(selector).forEach(element => {
if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
return;
}
hide() {
const width = this.getWidth();
this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width
this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
}
_disableOverFlow() {
this._saveInitialAttribute(this._element, 'overflow');
this._element.style.overflow = 'hidden';
}
_setElementAttributes(selector, styleProp, callback) {
const scrollbarWidth = this.getWidth();
const manipulationCallBack = element => {
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
return;
}
this._saveInitialAttribute(element, styleProp);
const calculatedValue = window.getComputedStyle(element)[styleProp];
element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
};
this._applyManipulationCallback(selector, manipulationCallBack);
}
reset() {
this._resetElementAttributes(this._element, 'overflow');
this._resetElementAttributes(this._element, 'paddingRight');
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
}
_saveInitialAttribute(element, styleProp) {
const actualValue = element.style[styleProp];
const calculatedValue = window.getComputedStyle(element)[styleProp];
Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
});
};
const reset = () => {
_resetElementAttributes('body', 'overflow');
_resetElementAttributes('body', 'paddingRight');
_resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
_resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
};
const _resetElementAttributes = (selector, styleProp) => {
SelectorEngine__default['default'].find(selector).forEach(element => {
const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
if (typeof value === 'undefined') {
element.style.removeProperty(styleProp);
} else {
Manipulator__default['default'].removeDataAttribute(element, styleProp);
element.style[styleProp] = value;
if (actualValue) {
Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
}
});
};
}
_resetElementAttributes(selector, styleProp) {
const manipulationCallBack = element => {
const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
if (typeof value === 'undefined') {
element.style.removeProperty(styleProp);
} else {
Manipulator__default['default'].removeDataAttribute(element, styleProp);
element.style[styleProp] = value;
}
};
this._applyManipulationCallback(selector, manipulationCallBack);
}
_applyManipulationCallback(selector, callBack) {
if (isElement(selector)) {
callBack(selector);
} else {
SelectorEngine__default['default'].find(selector, this._element).forEach(callBack);
}
}
isOverflowing() {
return this.getWidth() > 0;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/backdrop.js
* Bootstrap (v5.0.2): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@ -287,14 +344,14 @@
isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom
isAnimated: false,
rootElement: document.body,
rootElement: 'body',
// give the choice to place backdrop under different elements
clickCallback: null
};
const DefaultType$1 = {
isVisible: 'boolean',
isAnimated: 'boolean',
rootElement: 'element',
rootElement: '(element|string)',
clickCallback: '(function|null)'
};
const NAME$1 = 'backdrop';
@ -362,8 +419,9 @@
_getConfig(config) {
config = { ...Default$1,
...(typeof config === 'object' ? config : {})
};
config.rootElement = config.rootElement || document.body;
}; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$1, config, DefaultType$1);
return config;
}
@ -388,27 +446,20 @@
EventHandler__default['default'].off(this._element, EVENT_MOUSEDOWN);
this._getElement().parentNode.removeChild(this._element);
this._element.remove();
this._isAppended = false;
}
_emulateAnimation(callback) {
if (!this._config.isAnimated) {
execute(callback);
return;
}
const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
EventHandler__default['default'].one(this._getElement(), 'transitionend', () => execute(callback));
emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): offcanvas.js
* Bootstrap (v5.0.2): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@ -495,7 +546,7 @@
this._backdrop.show();
if (!this._config.scroll) {
hide();
new ScrollBarHelper().hide();
this._enforceFocusOnElement(this._element);
}
@ -548,7 +599,7 @@
this._element.style.visibility = 'hidden';
if (!this._config.scroll) {
reset();
new ScrollBarHelper().reset();
}
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
@ -606,7 +657,7 @@
static jQueryInterface(config) {
return this.each(function () {
const data = Data__default['default'].get(this, DATA_KEY) || new Offcanvas(this, typeof config === 'object' ? config : {});
const data = Offcanvas.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
@ -652,12 +703,10 @@
Offcanvas.getInstance(allReadyOpen).hide();
}
const data = Data__default['default'].get(target, DATA_KEY) || new Offcanvas(target);
const data = Offcanvas.getOrCreateInstance(target);
data.toggle(this);
});
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => {
SelectorEngine__default['default'].find(OPEN_SELECTOR).forEach(el => (Data__default['default'].get(el, DATA_KEY) || new Offcanvas(el)).show());
});
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => SelectorEngine__default['default'].find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
/**
* ------------------------------------------------------------------------
* jQuery

Binary file not shown.

55
js/dist/popover.js vendored
View file

@ -1,18 +1,17 @@
/*!
* Bootstrap popover.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap popover.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './tooltip'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Data, global.Tooltip));
}(this, (function (SelectorEngine, Data, Tooltip) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './tooltip'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Tooltip));
}(this, (function (SelectorEngine, Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
const getjQuery = () => {
@ -27,9 +26,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -56,7 +64,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): popover.js
* Bootstrap (v5.0.2): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -126,6 +134,24 @@
return this.getTitle() || this._getContent();
}
getTipElement() {
if (this.tip) {
return this.tip;
}
this.tip = super.getTipElement();
if (!this.getTitle()) {
SelectorEngine__default['default'].findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
@ -162,18 +188,7 @@
static jQueryInterface(config) {
return this.each(function () {
let data = Data__default['default'].get(this, DATA_KEY);
const _config = typeof config === 'object' ? config : null;
if (!data && /dispose|hide/.test(config)) {
return;
}
if (!data) {
data = new Popover(this, _config);
Data__default['default'].set(this, DATA_KEY, data);
}
const data = Popover.getOrCreateInstance(this, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {

BIN
js/dist/popover.js.map vendored

Binary file not shown.

19
js/dist/scrollspy.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Bootstrap scrollspy.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap scrollspy.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -18,7 +18,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -117,9 +117,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -146,7 +155,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): scrollspy.js
* Bootstrap (v5.0.2): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -361,7 +370,7 @@
static jQueryInterface(config) {
return this.each(function () {
const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
const data = ScrollSpy.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;

Binary file not shown.

28
js/dist/tab.js vendored
View file

@ -1,18 +1,17 @@
/*!
* Bootstrap tab.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap tab.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.EventHandler, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -75,9 +74,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -104,7 +112,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): tab.js
* Bootstrap (v5.0.2): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -259,7 +267,7 @@
static jQueryInterface(config) {
return this.each(function () {
const data = Data__default['default'].get(this, DATA_KEY) || new Tab(this);
const data = Tab.getOrCreateInstance(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@ -288,7 +296,7 @@
return;
}
const data = Data__default['default'].get(this, DATA_KEY) || new Tab(this);
const data = Tab.getOrCreateInstance(this);
data.show();
});
/**

BIN
js/dist/tab.js.map vendored

Binary file not shown.

32
js/dist/toast.js vendored
View file

@ -1,17 +1,16 @@
/*!
* Bootstrap toast.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap toast.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/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('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator, global.Base));
}(this, (function (Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.EventHandler, global.Manipulator, global.Base));
}(this, (function (EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
@ -62,9 +61,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -91,7 +99,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): toast.js
* Bootstrap (v5.0.2): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -291,13 +299,7 @@
static jQueryInterface(config) {
return this.each(function () {
let data = Data__default['default'].get(this, DATA_KEY);
const _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
}
const data = Toast.getOrCreateInstance(this, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {

BIN
js/dist/toast.js.map vendored

Binary file not shown.

41
js/dist/tooltip.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Bootstrap tooltip.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap tooltip.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -40,7 +40,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -143,9 +143,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@ -174,7 +183,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/sanitizer.js
* Bootstrap (v5.0.2): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -269,7 +278,7 @@
const elName = el.nodeName.toLowerCase();
if (!allowlistKeys.includes(elName)) {
el.parentNode.removeChild(el);
el.remove();
continue;
}
@ -287,7 +296,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): tooltip.js
* Bootstrap (v5.0.2): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -456,8 +465,8 @@
clearTimeout(this._timeout);
EventHandler__default['default'].off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
if (this.tip && this.tip.parentNode) {
this.tip.parentNode.removeChild(this.tip);
if (this.tip) {
this.tip.remove();
}
if (this._popper) {
@ -562,8 +571,8 @@
return;
}
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip);
if (this._hoverState !== HOVER_STATE_SHOW) {
tip.remove();
}
this._cleanTipClass();
@ -950,17 +959,7 @@
static jQueryInterface(config) {
return this.each(function () {
let data = Data__default['default'].get(this, DATA_KEY);
const _config = typeof config === 'object' && config;
if (!data && /dispose|hide/.test(config)) {
return;
}
if (!data) {
data = new Tooltip(this, _config);
}
const data = Tooltip.getOrCreateInstance(this, config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {

BIN
js/dist/tooltip.js.map vendored

Binary file not shown.

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): index.esm.js
* Bootstrap (v5.0.2): index.esm.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): index.umd.js
* Bootstrap (v5.0.2): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): alert.js
* Bootstrap (v5.0.2): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): base-component.js
* Bootstrap (v5.0.2): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -18,7 +18,7 @@ import EventHandler from './dom/event-handler'
* ------------------------------------------------------------------------
*/
const VERSION = '5.0.1'
const VERSION = '5.0.2'
class BaseComponent {
constructor(element) {

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): button.js
* Bootstrap (v5.0.2): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): carousel.js
* Bootstrap (v5.0.2): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): collapse.js
* Bootstrap (v5.0.2): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/data.js
* Bootstrap (v5.0.2): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/event-handler.js
* Bootstrap (v5.0.2): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/manipulator.js
* Bootstrap (v5.0.2): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dom/selector-engine.js
* Bootstrap (v5.0.2): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): dropdown.js
* Bootstrap (v5.0.2): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): modal.js
* Bootstrap (v5.0.2): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): offcanvas.js
* Bootstrap (v5.0.2): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): popover.js
* Bootstrap (v5.0.2): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): scrollspy.js
* Bootstrap (v5.0.2): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): tab.js
* Bootstrap (v5.0.2): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): toast.js
* Bootstrap (v5.0.2): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): tooltip.js
* Bootstrap (v5.0.2): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/

View file

@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/backdrop.js
* Bootstrap (v5.0.2): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/

Some files were not shown because too many files have changed in this diff Show more