Comparing version 5.0.0 to 5.0.1
@@ -0,1 +1,19 @@ | ||
## [5.0.1](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0...v5.0.1) (2021-06-10) | ||
### Bug Fixes | ||
* **#677:** improve cookie consent panel rendering ([c595c0a](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/c595c0a0e7d0d7e00e084a5852bf0d6b52f9370e)), closes [#677](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues/677) | ||
* **accessibility:** issue on pricing and sidebar + update label for logo on headers example ([7223e41](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/7223e41a3726bde152f561ae379b671136f31f55)) | ||
* **core:** update nuspec add boosted icon ([#679](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues/679)) ([d6b639c](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/d6b639caf5abda129850178e6e2a0c74645181a0)) | ||
* **doc:** replace `.sr-only` by `.visually-hidden` in checkout example ([1a23636](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/1a23636f9bc5fcaab9f411d27be1219934d2ddfa)) | ||
* **docs:** fix 'View on GitHub' link to target 'v5-dev' branch ([7d66ae4](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/7d66ae492df388520e1cfa9b4f9b0eeede2e5af2)) | ||
* **docs:** missing character in RTL starter template ([fda8432](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/fda843233b40405cd8f3862613f6083f6298752b)) | ||
* **lint:** remove trailing spaces ([d13994d](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/d13994ddce95d5d437bc54ad751187ed84b3a9e2)) | ||
* **margin:** finish migration of margin-left and right from `ml-` and `mr-` to `ms-` and `me-` ([195c408](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/195c4085798595931494efc5c35bc5278f913e3d)) | ||
* **offcanvas:** add offcanvas to boosted.scss ([8c1c8b2](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/8c1c8b2aa52449649929b317db4d8c4794b6da49)) | ||
* **sri:** v5 documentation rendering is broken due to bad integrity sha384s in config.yml ([edc8fa2](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/edc8fa2a7fdc0d66cf8b63a4338e0a5733298424)) | ||
* **table:** Accented table displays properly again ([85cdbf7](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/commit/85cdbf759775a99b7a061f99e450ff87761ff8f3)) | ||
# [5.0.0](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/compare/v5.0.0-beta3...v5.0.0) (2021-05-27) | ||
@@ -2,0 +20,0 @@ |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap alert.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap alert.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,6 +13,6 @@ * 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('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base)); | ||
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; | ||
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'; | ||
@@ -25,11 +25,2 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const getSelector = element => { | ||
@@ -64,47 +55,2 @@ let selector = element.getAttribute('data-bs-target'); | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
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 getjQuery = () => { | ||
@@ -130,3 +76,3 @@ const { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -137,2 +83,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -152,3 +99,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): alert.js | ||
* Bootstrap (v5.0.1): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -182,4 +129,4 @@ * -------------------------------------------------------------------------- | ||
// Getters | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -211,12 +158,5 @@ | ||
element.classList.remove(CLASS_NAME_SHOW); | ||
const isAnimated = element.classList.contains(CLASS_NAME_FADE); | ||
if (!element.classList.contains(CLASS_NAME_FADE)) { | ||
this._destroyElement(element); | ||
return; | ||
} | ||
const transitionDuration = getTransitionDurationFromElement(element); | ||
EventHandler__default['default'].one(element, 'transitionend', () => this._destroyElement(element)); | ||
emulateTransitionEnd(element, transitionDuration); | ||
this._queueCallback(() => this._destroyElement(element), element, isAnimated); | ||
} | ||
@@ -273,3 +213,3 @@ | ||
defineJQueryPlugin(NAME, Alert); | ||
defineJQueryPlugin(Alert); | ||
@@ -276,0 +216,0 @@ return Alert; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap base-component.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap base-component.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,6 +13,6 @@ * 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')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.EventHandler)); | ||
}(this, (function (Data, EventHandler) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./dom/event-handler.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './dom/event-handler'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.SelectorEngine, global.EventHandler)); | ||
}(this, (function (Data, SelectorEngine, EventHandler) { 'use strict'; | ||
@@ -22,7 +22,87 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); | ||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const getElement = obj => { | ||
if (isElement(obj)) { | ||
// it's a jQuery object or a node element | ||
return obj.jquery ? obj[0] : obj; | ||
} | ||
if (typeof obj === 'string' && obj.length > 0) { | ||
return SelectorEngine__default['default'].findOne(obj); | ||
} | ||
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(); | ||
} | ||
}; | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): base-component.js | ||
* Bootstrap (v5.0.1): base-component.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -37,7 +117,7 @@ * -------------------------------------------------------------------------- | ||
const VERSION = '5.0.0'; | ||
const VERSION = '5.0.1'; | ||
class BaseComponent { | ||
constructor(element) { | ||
element = typeof element === 'string' ? document.querySelector(element) : element; | ||
element = getElement(element); | ||
@@ -54,5 +134,18 @@ if (!element) { | ||
Data__default['default'].remove(this._element, this.constructor.DATA_KEY); | ||
EventHandler__default['default'].off(this._element, `.${this.constructor.DATA_KEY}`); | ||
this._element = null; | ||
EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY); | ||
Object.getOwnPropertyNames(this).forEach(propertyName => { | ||
this[propertyName] = null; | ||
}); | ||
} | ||
_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); | ||
} | ||
/** Static */ | ||
@@ -69,2 +162,14 @@ | ||
static get NAME() { | ||
throw new Error('You have to implement the static method "NAME", for each component!'); | ||
} | ||
static get DATA_KEY() { | ||
return `bs.${this.NAME}`; | ||
} | ||
static get EVENT_KEY() { | ||
return `.${this.DATA_KEY}`; | ||
} | ||
} | ||
@@ -71,0 +176,0 @@ |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap button.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap button.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,6 +13,6 @@ * 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('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base)); | ||
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict'; | ||
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'; | ||
@@ -25,9 +25,2 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const getjQuery = () => { | ||
@@ -53,3 +46,3 @@ const { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -60,2 +53,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -75,3 +69,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): button.js | ||
* Bootstrap (v5.0.1): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -101,4 +95,4 @@ * -------------------------------------------------------------------------- | ||
// Getters | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -153,3 +147,3 @@ | ||
defineJQueryPlugin(NAME, Button); | ||
defineJQueryPlugin(Button); | ||
@@ -156,0 +150,0 @@ return Button; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap carousel.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap carousel.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,22 +13,15 @@ * 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('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; | ||
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'; | ||
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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
@@ -73,25 +66,2 @@ | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
@@ -101,20 +71,12 @@ element.dispatchEvent(new Event(TRANSITION_END)); | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
const emulateTransitionEnd = (element, duration) => { | ||
let called = false; | ||
const durationPadding = 5; | ||
const emulatedDuration = duration + durationPadding; | ||
function listener() { | ||
called = true; | ||
element.removeEventListener(TRANSITION_END, listener); | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
element.addEventListener(TRANSITION_END, listener); | ||
setTimeout(() => { | ||
if (!called) { | ||
triggerTransitionEnd(element); | ||
} | ||
}, emulatedDuration); | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
@@ -172,3 +134,3 @@ | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -179,2 +141,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -194,3 +157,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): carousel.js | ||
* Bootstrap (v5.0.1): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -306,4 +269,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -404,13 +367,2 @@ | ||
this._slide(order, this._items[index]); | ||
} | ||
dispose() { | ||
this._items = null; | ||
this._config = null; | ||
this._interval = null; | ||
this._isPaused = null; | ||
this._isSliding = null; | ||
this._activeElement = null; | ||
this._indicatorsElement = null; | ||
super.dispose(); | ||
} // Private | ||
@@ -684,4 +636,14 @@ | ||
this._activeElement = nextElement; // Boosted mod: enable/disable prev/next controls when wrap=false | ||
this._activeElement = nextElement; | ||
const triggerSlidEvent = () => { | ||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}); | ||
}; // Boosted mod: enable/disable prev/next controls when wrap=false | ||
if (!this._config.wrap) { | ||
@@ -708,4 +670,4 @@ const prevControl = SelectorEngine__default['default'].findOne(SELECTOR_CONTROL_PREV, this._element); | ||
nextElement.classList.add(directionalClassName); | ||
const transitionDuration = getTransitionDurationFromElement(activeElement); | ||
EventHandler__default['default'].one(activeElement, 'transitionend', () => { | ||
const completeCallBack = () => { | ||
nextElement.classList.remove(directionalClassName, orderClassName); | ||
@@ -715,12 +677,6 @@ nextElement.classList.add(CLASS_NAME_ACTIVE); | ||
this._isSliding = false; | ||
setTimeout(() => { | ||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}); | ||
}, 0); | ||
}); | ||
emulateTransitionEnd(activeElement, transitionDuration); | ||
setTimeout(triggerSlidEvent, 0); | ||
}; | ||
this._queueCallback(completeCallBack, activeElement, true); | ||
} else { | ||
@@ -730,8 +686,3 @@ activeElement.classList.remove(CLASS_NAME_ACTIVE); | ||
this._isSliding = false; | ||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}); | ||
triggerSlidEvent(); | ||
} | ||
@@ -855,3 +806,3 @@ | ||
defineJQueryPlugin(NAME, Carousel); | ||
defineJQueryPlugin(Carousel); | ||
@@ -858,0 +809,0 @@ return Carousel; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap collapse.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap collapse.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,24 +13,15 @@ * 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('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; | ||
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.Collapse = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base)); | ||
}(this, (function (SelectorEngine, Data, 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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const toType = obj => { | ||
@@ -83,47 +74,25 @@ if (obj === null || obj === undefined) { | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
const getElement = obj => { | ||
if (isElement(obj)) { | ||
// it's a jQuery object or a node element | ||
return obj.jquery ? obj[0] : obj; | ||
} | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const emulateTransitionEnd = (element, duration) => { | ||
let called = false; | ||
const durationPadding = 5; | ||
const emulatedDuration = duration + durationPadding; | ||
function listener() { | ||
called = true; | ||
element.removeEventListener(TRANSITION_END, listener); | ||
if (typeof obj === 'string' && obj.length > 0) { | ||
return SelectorEngine__default['default'].findOne(obj); | ||
} | ||
element.addEventListener(TRANSITION_END, listener); | ||
setTimeout(() => { | ||
if (!called) { | ||
triggerTransitionEnd(element); | ||
} | ||
}, emulatedDuration); | ||
return null; | ||
}; | ||
@@ -165,3 +134,3 @@ | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -172,2 +141,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -187,3 +157,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): collapse.js | ||
* Bootstrap (v5.0.1): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -265,4 +235,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -359,5 +329,5 @@ | ||
const scrollSize = `scroll${capitalizedDimension}`; | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', complete); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
this._queueCallback(complete, this._element, true); | ||
this._element.style[dimension] = `${this._element[scrollSize]}px`; | ||
@@ -413,5 +383,4 @@ } | ||
this._element.style[dimension] = ''; | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', complete); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
this._queueCallback(complete, this._element, true); | ||
} | ||
@@ -421,10 +390,2 @@ | ||
this._isTransitioning = isTransitioning; | ||
} | ||
dispose() { | ||
super.dispose(); | ||
this._config = null; | ||
this._parent = null; | ||
this._triggerArray = null; | ||
this._isTransitioning = null; | ||
} // Private | ||
@@ -451,12 +412,3 @@ | ||
} = this._config; | ||
if (isElement(parent)) { | ||
// it's a jQuery object | ||
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') { | ||
parent = parent[0]; | ||
} | ||
} else { | ||
parent = SelectorEngine__default['default'].findOne(parent); | ||
} | ||
parent = getElement(parent); | ||
const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`; | ||
@@ -562,3 +514,3 @@ SelectorEngine__default['default'].find(selector, parent).forEach(element => { | ||
defineJQueryPlugin(NAME, Collapse); | ||
defineJQueryPlugin(Collapse); | ||
@@ -565,0 +517,0 @@ return Collapse; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap data.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap data.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -20,3 +20,3 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/data.js | ||
* Bootstrap (v5.0.1): dom/data.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -23,0 +23,0 @@ * -------------------------------------------------------------------------- |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap event-handler.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap event-handler.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -18,9 +18,2 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const getjQuery = () => { | ||
@@ -40,3 +33,3 @@ const { | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/event-handler.js | ||
* Bootstrap (v5.0.1): dom/event-handler.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -43,0 +36,0 @@ * -------------------------------------------------------------------------- |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap manipulator.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap manipulator.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -20,3 +20,3 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/manipulator.js | ||
* Bootstrap (v5.0.1): dom/manipulator.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -23,0 +23,0 @@ * -------------------------------------------------------------------------- |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap selector-engine.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap selector-engine.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -20,3 +20,3 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/selector-engine.js | ||
* Bootstrap (v5.0.1): dom/selector-engine.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -23,0 +23,0 @@ * -------------------------------------------------------------------------- |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap dropdown.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap dropdown.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,6 +13,6 @@ * 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; | ||
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'; | ||
@@ -42,15 +42,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const toType = obj => { | ||
@@ -93,4 +86,27 @@ if (obj === null || obj === undefined) { | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const getElement = obj => { | ||
if (isElement(obj)) { | ||
// it's a jQuery object or a node element | ||
return obj.jquery ? obj[0] : obj; | ||
} | ||
if (typeof obj === 'string' && obj.length > 0) { | ||
return SelectorEngine__default['default'].findOne(obj); | ||
} | ||
return null; | ||
}; | ||
const typeCheckConfig = (componentName, config, configTypes) => { | ||
@@ -162,3 +178,3 @@ Object.keys(configTypes).forEach(property => { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -169,2 +185,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -184,3 +201,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dropdown.js | ||
* Bootstrap (v5.0.1): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -272,4 +289,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -321,7 +338,3 @@ | ||
} else if (isElement(this._config.reference)) { | ||
referenceElement = this._config.reference; // Check if it's jQuery element | ||
if (typeof this._config.reference.jquery !== 'undefined') { | ||
referenceElement = this._config.reference[0]; | ||
} | ||
referenceElement = getElement(this._config.reference); | ||
} else if (typeof this._config.reference === 'object') { | ||
@@ -373,8 +386,4 @@ referenceElement = this._config.reference; | ||
dispose() { | ||
this._menu = null; | ||
if (this._popper) { | ||
this._popper.destroy(); | ||
this._popper = null; | ||
} | ||
@@ -565,10 +574,4 @@ | ||
static clearMenus(event) { | ||
if (event) { | ||
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { | ||
return; | ||
} | ||
if (/input|select|option|textarea|form/i.test(event.target.tagName)) { | ||
return; | ||
} | ||
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) { | ||
return; | ||
} | ||
@@ -599,6 +602,6 @@ | ||
continue; | ||
} // Tab navigation through the dropdown menu shouldn't close the menu | ||
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu | ||
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { | ||
if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) { | ||
continue; | ||
@@ -689,3 +692,3 @@ } | ||
defineJQueryPlugin(NAME, Dropdown); | ||
defineJQueryPlugin(Dropdown); | ||
@@ -692,0 +695,0 @@ return Dropdown; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap modal.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap modal.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,20 +13,14 @@ * 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/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (EventHandler, Manipulator, SelectorEngine, 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.Modal = 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 EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); | ||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); | ||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
@@ -99,4 +93,14 @@ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const emulateTransitionEnd = (element, duration) => { | ||
@@ -170,3 +174,3 @@ let called = false; | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -177,2 +181,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -198,3 +203,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/scrollBar.js | ||
* Bootstrap (v5.0.1): util/scrollBar.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -273,3 +278,3 @@ * -------------------------------------------------------------------------- | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/backdrop.js | ||
* Bootstrap (v5.0.1): util/backdrop.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -358,2 +363,3 @@ * -------------------------------------------------------------------------- | ||
}; | ||
config.rootElement = config.rootElement || document.body; | ||
typeCheckConfig(NAME$1, config, DefaultType$1); | ||
@@ -403,3 +409,3 @@ return config; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): modal.js | ||
* Bootstrap (v5.0.1): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -471,4 +477,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -554,9 +560,3 @@ | ||
if (isAnimated) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', event => this._hideModal(event)); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
} else { | ||
this._hideModal(); | ||
} | ||
this._queueCallback(() => this._hideModal(), this._element, isAnimated); | ||
} | ||
@@ -566,2 +566,5 @@ | ||
[window, this._dialog].forEach(htmlElement => EventHandler__default['default'].off(htmlElement, EVENT_KEY)); | ||
this._backdrop.dispose(); | ||
super.dispose(); | ||
@@ -575,11 +578,2 @@ /** | ||
EventHandler__default['default'].off(document, EVENT_FOCUSIN); | ||
this._config = null; | ||
this._dialog = null; | ||
this._backdrop.dispose(); | ||
this._backdrop = null; | ||
this._isShown = null; | ||
this._ignoreBackdropClick = null; | ||
this._isTransitioning = null; | ||
} | ||
@@ -654,9 +648,3 @@ | ||
if (isAnimated) { | ||
const transitionDuration = getTransitionDurationFromElement(this._dialog); | ||
EventHandler__default['default'].one(this._dialog, 'transitionend', transitionComplete); | ||
emulateTransitionEnd(this._dialog, transitionDuration); | ||
} else { | ||
transitionComplete(); | ||
} | ||
this._queueCallback(transitionComplete, this._dialog, isAnimated); | ||
} | ||
@@ -851,3 +839,3 @@ | ||
defineJQueryPlugin(NAME, Modal); | ||
defineJQueryPlugin(Modal); | ||
@@ -854,0 +842,0 @@ return Modal; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap offcanvas.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap offcanvas.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -26,8 +26,2 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
@@ -100,4 +94,14 @@ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const emulateTransitionEnd = (element, duration) => { | ||
@@ -185,3 +189,3 @@ let called = false; | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -192,2 +196,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -213,3 +218,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/scrollBar.js | ||
* Bootstrap (v5.0.1): util/scrollBar.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -288,3 +293,3 @@ * -------------------------------------------------------------------------- | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/backdrop.js | ||
* Bootstrap (v5.0.1): util/backdrop.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -373,2 +378,3 @@ * -------------------------------------------------------------------------- | ||
}; | ||
config.rootElement = config.rootElement || document.body; | ||
typeCheckConfig(NAME$1, config, DefaultType$1); | ||
@@ -418,3 +424,3 @@ return config; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): offcanvas.js | ||
* Bootstrap (v5.0.1): offcanvas.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -474,8 +480,8 @@ * -------------------------------------------------------------------------- | ||
static get NAME() { | ||
return NAME; | ||
} | ||
static get Default() { | ||
return Default; | ||
} | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
} // Public | ||
@@ -526,5 +532,3 @@ | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', completeCallBack); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
this._queueCallback(completeCallBack, this._element, true); | ||
} | ||
@@ -569,5 +573,3 @@ | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', completeCallback); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
this._queueCallback(completeCallback, this._element, true); | ||
} | ||
@@ -580,4 +582,2 @@ | ||
EventHandler__default['default'].off(document, EVENT_FOCUSIN); | ||
this._config = null; | ||
this._backdrop = null; | ||
} // Private | ||
@@ -685,3 +685,3 @@ | ||
defineJQueryPlugin(NAME, Offcanvas); | ||
defineJQueryPlugin(Offcanvas); | ||
@@ -688,0 +688,0 @@ return Offcanvas; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap popover.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap popover.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,20 +13,13 @@ * 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/selector-engine.js'), require('./tooltip.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); | ||
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict'; | ||
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'; | ||
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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const getjQuery = () => { | ||
@@ -52,3 +45,3 @@ const { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -59,2 +52,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -74,3 +68,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): popover.js | ||
* Bootstrap (v5.0.1): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -132,6 +126,2 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
} | ||
static get Event() { | ||
@@ -141,6 +131,2 @@ return Event; | ||
static get EVENT_KEY() { | ||
return EVENT_KEY; | ||
} | ||
static get DefaultType() { | ||
@@ -176,3 +162,3 @@ return DefaultType; | ||
_getContent() { | ||
return this._element.getAttribute('data-bs-content') || this.config.content; | ||
return this._element.getAttribute('data-bs-content') || this._config.content; | ||
} | ||
@@ -224,3 +210,3 @@ | ||
defineJQueryPlugin(NAME, Popover); | ||
defineJQueryPlugin(Popover); | ||
@@ -227,0 +213,0 @@ return Popover; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap scrollspy.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap scrollspy.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,12 +13,12 @@ * 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/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (EventHandler, Manipulator, SelectorEngine, 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.ScrollSpy = 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 EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); | ||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); | ||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
@@ -28,6 +28,7 @@ | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Bootstrap (v5.0.1): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MAX_UID = 1000000; | ||
@@ -91,4 +92,14 @@ | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const typeCheckConfig = (componentName, config, configTypes) => { | ||
@@ -126,3 +137,3 @@ Object.keys(configTypes).forEach(property => { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -133,2 +144,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -148,3 +160,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): scrollspy.js | ||
* Bootstrap (v5.0.1): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -214,4 +226,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -249,11 +261,4 @@ | ||
dispose() { | ||
EventHandler__default['default'].off(this._scrollElement, EVENT_KEY); | ||
super.dispose(); | ||
EventHandler__default['default'].off(this._scrollElement, EVENT_KEY); | ||
this._scrollElement = null; | ||
this._config = null; | ||
this._selector = null; | ||
this._offsets = null; | ||
this._targets = null; | ||
this._activeTarget = null; | ||
this._scrollHeight = null; | ||
} // Private | ||
@@ -405,3 +410,3 @@ | ||
defineJQueryPlugin(NAME, ScrollSpy); | ||
defineJQueryPlugin(ScrollSpy); | ||
@@ -408,0 +413,0 @@ return ScrollSpy; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap tab.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap tab.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,23 +13,14 @@ * 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/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine, global.Base)); | ||
}(this, (function (Data, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; | ||
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'; | ||
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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const getSelector = element => { | ||
@@ -64,47 +55,2 @@ let selector = element.getAttribute('data-bs-target'); | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
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 isDisabled = element => { | ||
@@ -148,3 +94,3 @@ if (!element || element.nodeType !== Node.ELEMENT_NODE) { | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -155,2 +101,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -170,3 +117,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): tab.js | ||
* Bootstrap (v5.0.1): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -209,4 +156,4 @@ * -------------------------------------------------------------------------- | ||
// Getters | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -269,6 +216,5 @@ | ||
if (active && isTransitioning) { | ||
const transitionDuration = getTransitionDurationFromElement(active); | ||
active.classList.remove(CLASS_NAME_SHOW); | ||
EventHandler__default['default'].one(active, 'transitionend', complete); | ||
emulateTransitionEnd(active, transitionDuration); | ||
this._queueCallback(complete, element, true); | ||
} else { | ||
@@ -368,3 +314,3 @@ complete(); | ||
defineJQueryPlugin(NAME, Tab); | ||
defineJQueryPlugin(Tab); | ||
@@ -371,0 +317,0 @@ return Tab; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap toast.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap toast.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -25,11 +25,2 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
const toType = obj => { | ||
@@ -43,47 +34,12 @@ if (obj === null || obj === undefined) { | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const emulateTransitionEnd = (element, duration) => { | ||
let called = false; | ||
const durationPadding = 5; | ||
const emulatedDuration = duration + durationPadding; | ||
function listener() { | ||
called = true; | ||
element.removeEventListener(TRANSITION_END, listener); | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
element.addEventListener(TRANSITION_END, listener); | ||
setTimeout(() => { | ||
if (!called) { | ||
triggerTransitionEnd(element); | ||
} | ||
}, emulatedDuration); | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
@@ -125,3 +81,3 @@ | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -132,2 +88,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -147,3 +104,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): toast.js | ||
* Bootstrap (v5.0.1): toast.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -162,2 +119,6 @@ * -------------------------------------------------------------------------- | ||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; | ||
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; | ||
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; | ||
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; | ||
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`; | ||
const EVENT_HIDE = `hide${EVENT_KEY}`; | ||
@@ -193,2 +154,4 @@ const EVENT_HIDDEN = `hidden${EVENT_KEY}`; | ||
this._timeout = null; | ||
this._hasMouseInteraction = false; | ||
this._hasKeyboardInteraction = false; | ||
@@ -207,4 +170,4 @@ this._setListeners(); | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
static get NAME() { | ||
return NAME; | ||
} // Public | ||
@@ -233,7 +196,3 @@ | ||
if (this._config.autohide) { | ||
this._timeout = setTimeout(() => { | ||
this.hide(); | ||
}, this._config.delay); | ||
} | ||
this._maybeScheduleHide(); | ||
}; | ||
@@ -247,9 +206,3 @@ | ||
if (this._config.animation) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', complete); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
} else { | ||
complete(); | ||
} | ||
this._queueCallback(complete, this._element, this._config.animation); | ||
} | ||
@@ -276,9 +229,3 @@ | ||
if (this._config.animation) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element); | ||
EventHandler__default['default'].one(this._element, 'transitionend', complete); | ||
emulateTransitionEnd(this._element, transitionDuration); | ||
} else { | ||
complete(); | ||
} | ||
this._queueCallback(complete, this._element, this._config.animation); | ||
} | ||
@@ -294,3 +241,2 @@ | ||
super.dispose(); | ||
this._config = null; | ||
} // Private | ||
@@ -308,4 +254,50 @@ | ||
_maybeScheduleHide() { | ||
if (!this._config.autohide) { | ||
return; | ||
} | ||
if (this._hasMouseInteraction || this._hasKeyboardInteraction) { | ||
return; | ||
} | ||
this._timeout = setTimeout(() => { | ||
this.hide(); | ||
}, this._config.delay); | ||
} | ||
_onInteraction(event, isInteracting) { | ||
switch (event.type) { | ||
case 'mouseover': | ||
case 'mouseout': | ||
this._hasMouseInteraction = isInteracting; | ||
break; | ||
case 'focusin': | ||
case 'focusout': | ||
this._hasKeyboardInteraction = isInteracting; | ||
break; | ||
} | ||
if (isInteracting) { | ||
this._clearTimeout(); | ||
return; | ||
} | ||
const nextElement = event.relatedTarget; | ||
if (this._element === nextElement || this._element.contains(nextElement)) { | ||
return; | ||
} | ||
this._maybeScheduleHide(); | ||
} | ||
_setListeners() { | ||
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()); | ||
EventHandler__default['default'].on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); | ||
EventHandler__default['default'].on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); | ||
EventHandler__default['default'].on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); | ||
EventHandler__default['default'].on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false)); | ||
} | ||
@@ -348,3 +340,3 @@ | ||
defineJQueryPlugin(NAME, Toast); | ||
defineJQueryPlugin(Toast); | ||
@@ -351,0 +343,0 @@ return Toast; |
/*! | ||
* Boosted v5.0.0 (https://boosted.orange.com/) | ||
* Boosted v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2015-2021 The Boosted Authors | ||
@@ -7,3 +7,3 @@ * Copyright 2015-2021 Orange | ||
* This a fork of Bootstrap : Initial license below | ||
* Bootstrap tooltip.js v5.0.0 (https://boosted.orange.com/) | ||
* Bootstrap tooltip.js v5.0.1 (https://boosted.orange.com/) | ||
* Copyright 2011-2021 The Boosted Authors (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/graphs/contributors) | ||
@@ -13,6 +13,6 @@ * 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) : | ||
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base)); | ||
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; | ||
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.Tooltip = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base)); | ||
}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict'; | ||
@@ -42,6 +42,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
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 SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); | ||
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); | ||
@@ -51,9 +51,8 @@ | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Bootstrap (v5.0.1): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
const MAX_UID = 1000000; | ||
const MILLISECONDS_MULTIPLIER = 1000; | ||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) | ||
@@ -82,47 +81,25 @@ const toType = obj => { | ||
const getTransitionDurationFromElement = element => { | ||
if (!element) { | ||
return 0; | ||
} // Get transition-duration of the element | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false; | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0]; | ||
} | ||
let { | ||
transitionDuration, | ||
transitionDelay | ||
} = window.getComputedStyle(element); | ||
const floatTransitionDuration = Number.parseFloat(transitionDuration); | ||
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found | ||
if (!floatTransitionDuration && !floatTransitionDelay) { | ||
return 0; | ||
} // If multiple durations are defined, take the first | ||
transitionDuration = transitionDuration.split(',')[0]; | ||
transitionDelay = transitionDelay.split(',')[0]; | ||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; | ||
return typeof obj.nodeType !== 'undefined'; | ||
}; | ||
const triggerTransitionEnd = element => { | ||
element.dispatchEvent(new Event(TRANSITION_END)); | ||
}; | ||
const getElement = obj => { | ||
if (isElement(obj)) { | ||
// it's a jQuery object or a node element | ||
return obj.jquery ? obj[0] : obj; | ||
} | ||
const isElement = obj => (obj[0] || obj).nodeType; | ||
const emulateTransitionEnd = (element, duration) => { | ||
let called = false; | ||
const durationPadding = 5; | ||
const emulatedDuration = duration + durationPadding; | ||
function listener() { | ||
called = true; | ||
element.removeEventListener(TRANSITION_END, listener); | ||
if (typeof obj === 'string' && obj.length > 0) { | ||
return SelectorEngine__default['default'].findOne(obj); | ||
} | ||
element.addEventListener(TRANSITION_END, listener); | ||
setTimeout(() => { | ||
if (!called) { | ||
triggerTransitionEnd(element); | ||
} | ||
}, emulatedDuration); | ||
return null; | ||
}; | ||
@@ -189,3 +166,3 @@ | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -196,2 +173,3 @@ const $ = getjQuery(); | ||
if ($) { | ||
const name = plugin.NAME; | ||
const JQUERY_NO_CONFLICT = $.fn[name]; | ||
@@ -211,3 +189,3 @@ $.fn[name] = plugin.jQueryInterface; | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/sanitizer.js | ||
* Bootstrap (v5.0.1): util/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -325,3 +303,3 @@ * -------------------------------------------------------------------------- | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): tooltip.js | ||
* Bootstrap (v5.0.1): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -387,3 +365,3 @@ * -------------------------------------------------------------------------- | ||
}; | ||
const Event$1 = { | ||
const Event = { | ||
HIDE: `hide${EVENT_KEY}`, | ||
@@ -430,3 +408,3 @@ HIDDEN: `hidden${EVENT_KEY}`, | ||
this.config = this._getConfig(config); | ||
this._config = this._getConfig(config); | ||
this.tip = null; | ||
@@ -446,14 +424,6 @@ | ||
static get DATA_KEY() { | ||
return DATA_KEY; | ||
} | ||
static get Event() { | ||
return Event$1; | ||
return Event; | ||
} | ||
static get EVENT_KEY() { | ||
return EVENT_KEY; | ||
} | ||
static get DefaultType() { | ||
@@ -510,7 +480,2 @@ return DefaultType; | ||
this._isEnabled = null; | ||
this._timeout = null; | ||
this._hoverState = null; | ||
this._activeTrigger = null; | ||
if (this._popper) { | ||
@@ -520,5 +485,2 @@ this._popper.destroy(); | ||
this._popper = null; | ||
this.config = null; | ||
this.tip = null; | ||
super.dispose(); | ||
@@ -552,7 +514,7 @@ } | ||
if (this.config.animation) { | ||
if (this._config.animation) { | ||
tip.classList.add(CLASS_NAME_FADE); | ||
} | ||
const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement; | ||
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; | ||
@@ -563,4 +525,5 @@ const attachment = this._getAttachment(placement); | ||
const container = this._getContainer(); | ||
const { | ||
container | ||
} = this._config; | ||
Data__default['default'].set(tip, this.constructor.DATA_KEY, this); | ||
@@ -580,3 +543,3 @@ | ||
tip.classList.add(CLASS_NAME_SHOW); | ||
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass; | ||
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass; | ||
@@ -607,9 +570,5 @@ if (customClass) { | ||
if (this.tip.classList.contains(CLASS_NAME_FADE)) { | ||
const transitionDuration = getTransitionDurationFromElement(this.tip); | ||
EventHandler__default['default'].one(this.tip, 'transitionend', complete); | ||
emulateTransitionEnd(this.tip, transitionDuration); | ||
} else { | ||
complete(); | ||
} | ||
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE); | ||
this._queueCallback(complete, this.tip, isAnimated); | ||
} | ||
@@ -662,10 +621,5 @@ | ||
this._activeTrigger[TRIGGER_HOVER] = false; | ||
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE); | ||
if (this.tip.classList.contains(CLASS_NAME_FADE)) { | ||
const transitionDuration = getTransitionDurationFromElement(tip); | ||
EventHandler__default['default'].one(tip, 'transitionend', complete); | ||
emulateTransitionEnd(tip, transitionDuration); | ||
} else { | ||
complete(); | ||
} | ||
this._queueCallback(complete, this.tip, isAnimated); | ||
@@ -692,3 +646,3 @@ this._hoverState = ''; | ||
const element = document.createElement('div'); | ||
element.innerHTML = this.config.template; | ||
element.innerHTML = this._config.template; | ||
this.tip = element.children[0]; | ||
@@ -709,9 +663,6 @@ return this.tip; | ||
if (typeof content === 'object' && isElement(content)) { | ||
if (content.jquery) { | ||
content = content[0]; | ||
} // content is a DOM node or a jQuery | ||
if (isElement(content)) { | ||
content = getElement(content); // content is a DOM node or a jQuery | ||
if (this.config.html) { | ||
if (this._config.html) { | ||
if (content.parentNode !== element) { | ||
@@ -728,5 +679,5 @@ element.innerHTML = ''; | ||
if (this.config.html) { | ||
if (this.config.sanitize) { | ||
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn); | ||
if (this._config.html) { | ||
if (this._config.sanitize) { | ||
content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn); | ||
} | ||
@@ -744,3 +695,3 @@ | ||
if (!title) { | ||
title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title; | ||
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title; | ||
} | ||
@@ -779,3 +730,3 @@ | ||
offset | ||
} = this.config; | ||
} = this._config; | ||
@@ -799,3 +750,3 @@ if (typeof offset === 'string') { | ||
options: { | ||
fallbackPlacements: this.config.fallbackPlacements | ||
fallbackPlacements: this._config.fallbackPlacements | ||
} | ||
@@ -810,3 +761,3 @@ }, { | ||
options: { | ||
boundary: this.config.boundary | ||
boundary: this._config.boundary | ||
} | ||
@@ -831,3 +782,3 @@ }, { | ||
return { ...defaultBsPopperConfig, | ||
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) | ||
...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) | ||
}; | ||
@@ -840,14 +791,2 @@ } | ||
_getContainer() { | ||
if (this.config.container === false) { | ||
return document.body; | ||
} | ||
if (isElement(this.config.container)) { | ||
return this.config.container; | ||
} | ||
return SelectorEngine__default['default'].findOne(this.config.container); | ||
} | ||
_getAttachment(placement) { | ||
@@ -858,11 +797,12 @@ return AttachmentMap[placement.toUpperCase()]; | ||
_setListeners() { | ||
const triggers = this.config.trigger.split(' '); | ||
const triggers = this._config.trigger.split(' '); | ||
triggers.forEach(trigger => { | ||
if (trigger === 'click') { | ||
EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)); | ||
EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event)); | ||
} else if (trigger !== TRIGGER_MANUAL) { | ||
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; | ||
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; | ||
EventHandler__default['default'].on(this._element, eventIn, this.config.selector, event => this._enter(event)); | ||
EventHandler__default['default'].on(this._element, eventOut, this.config.selector, event => this._leave(event)); | ||
EventHandler__default['default'].on(this._element, eventIn, this._config.selector, event => this._enter(event)); | ||
EventHandler__default['default'].on(this._element, eventOut, this._config.selector, event => this._leave(event)); | ||
} | ||
@@ -879,4 +819,4 @@ }); | ||
if (this.config.selector) { | ||
this.config = { ...this.config, | ||
if (this._config.selector) { | ||
this._config = { ...this._config, | ||
trigger: 'manual', | ||
@@ -921,3 +861,3 @@ selector: '' | ||
if (!context.config.delay || !context.config.delay.show) { | ||
if (!context._config.delay || !context._config.delay.show) { | ||
context.show(); | ||
@@ -931,3 +871,3 @@ return; | ||
} | ||
}, context.config.delay.show); | ||
}, context._config.delay.show); | ||
} | ||
@@ -949,3 +889,3 @@ | ||
if (!context.config.delay || !context.config.delay.hide) { | ||
if (!context._config.delay || !context._config.delay.hide) { | ||
context.hide(); | ||
@@ -959,3 +899,3 @@ return; | ||
} | ||
}, context.config.delay.hide); | ||
}, context._config.delay.hide); | ||
} | ||
@@ -980,7 +920,2 @@ | ||
}); | ||
if (config && typeof config.container === 'object' && config.container.jquery) { | ||
config.container = config.container[0]; | ||
} | ||
config = { ...this.constructor.Default, | ||
@@ -990,2 +925,3 @@ ...dataAttributes, | ||
}; | ||
config.container = config.container === false ? document.body : getElement(config.container); | ||
@@ -1019,6 +955,6 @@ if (typeof config.delay === 'number') { | ||
if (this.config) { | ||
for (const key in this.config) { | ||
if (this.constructor.Default[key] !== this.config[key]) { | ||
config[key] = this.config[key]; | ||
if (this._config) { | ||
for (const key in this._config) { | ||
if (this.constructor.Default[key] !== this._config[key]) { | ||
config[key] = this._config[key]; | ||
} | ||
@@ -1090,3 +1026,3 @@ } | ||
defineJQueryPlugin(NAME, Tooltip); | ||
defineJQueryPlugin(Tooltip); | ||
@@ -1093,0 +1029,0 @@ return Tooltip; |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): alert.js | ||
* Bootstrap (v5.0.1): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -10,5 +10,3 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getElementFromSelector, | ||
getTransitionDurationFromElement | ||
getElementFromSelector | ||
} from './util/index' | ||
@@ -49,4 +47,4 @@ import Data from './dom/data' | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -80,11 +78,4 @@ | ||
if (!element.classList.contains(CLASS_NAME_FADE)) { | ||
this._destroyElement(element) | ||
return | ||
} | ||
const transitionDuration = getTransitionDurationFromElement(element) | ||
EventHandler.one(element, 'transitionend', () => this._destroyElement(element)) | ||
emulateTransitionEnd(element, transitionDuration) | ||
const isAnimated = element.classList.contains(CLASS_NAME_FADE) | ||
this._queueCallback(() => this._destroyElement(element), element, isAnimated) | ||
} | ||
@@ -142,4 +133,4 @@ | ||
defineJQueryPlugin(NAME, Alert) | ||
defineJQueryPlugin(Alert) | ||
export default Alert |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): base-component.js | ||
* Bootstrap (v5.0.1): base-component.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -9,2 +9,8 @@ * -------------------------------------------------------------------------- | ||
import Data from './dom/data' | ||
import { | ||
emulateTransitionEnd, | ||
execute, | ||
getElement, | ||
getTransitionDurationFromElement | ||
} from './util/index' | ||
import EventHandler from './dom/event-handler' | ||
@@ -18,7 +24,7 @@ | ||
const VERSION = '5.0.0' | ||
const VERSION = '5.0.1' | ||
class BaseComponent { | ||
constructor(element) { | ||
element = typeof element === 'string' ? document.querySelector(element) : element | ||
element = getElement(element) | ||
@@ -35,6 +41,21 @@ if (!element) { | ||
Data.remove(this._element, this.constructor.DATA_KEY) | ||
EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`) | ||
this._element = null | ||
EventHandler.off(this._element, this.constructor.EVENT_KEY) | ||
Object.getOwnPropertyNames(this).forEach(propertyName => { | ||
this[propertyName] = null | ||
}) | ||
} | ||
_queueCallback(callback, element, isAnimated = true) { | ||
if (!isAnimated) { | ||
execute(callback) | ||
return | ||
} | ||
const transitionDuration = getTransitionDurationFromElement(element) | ||
EventHandler.one(element, 'transitionend', () => execute(callback)) | ||
emulateTransitionEnd(element, transitionDuration) | ||
} | ||
/** Static */ | ||
@@ -49,4 +70,16 @@ | ||
} | ||
static get NAME() { | ||
throw new Error('You have to implement the static method "NAME", for each component!') | ||
} | ||
static get DATA_KEY() { | ||
return `bs.${this.NAME}` | ||
} | ||
static get EVENT_KEY() { | ||
return `.${this.DATA_KEY}` | ||
} | ||
} | ||
export default BaseComponent |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): button.js | ||
* Bootstrap (v5.0.1): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -39,4 +39,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -94,4 +94,4 @@ | ||
defineJQueryPlugin(NAME, Button) | ||
defineJQueryPlugin(Button) | ||
export default Button |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): carousel.js | ||
* Bootstrap (v5.0.1): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -10,5 +10,3 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getElementFromSelector, | ||
getTransitionDurationFromElement, | ||
isRTL, | ||
@@ -139,4 +137,4 @@ isVisible, | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -244,14 +242,2 @@ | ||
dispose() { | ||
this._items = null | ||
this._config = null | ||
this._interval = null | ||
this._isPaused = null | ||
this._isSliding = null | ||
this._activeElement = null | ||
this._indicatorsElement = null | ||
super.dispose() | ||
} | ||
// Private | ||
@@ -526,2 +512,11 @@ | ||
const triggerSlidEvent = () => { | ||
EventHandler.trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}) | ||
} | ||
// Boosted mod: enable/disable prev/next controls when wrap=false | ||
@@ -551,5 +546,3 @@ if (!this._config.wrap) { | ||
const transitionDuration = getTransitionDurationFromElement(activeElement) | ||
EventHandler.one(activeElement, 'transitionend', () => { | ||
const completeCallBack = () => { | ||
nextElement.classList.remove(directionalClassName, orderClassName) | ||
@@ -562,13 +555,6 @@ nextElement.classList.add(CLASS_NAME_ACTIVE) | ||
setTimeout(() => { | ||
EventHandler.trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}) | ||
}, 0) | ||
}) | ||
setTimeout(triggerSlidEvent, 0) | ||
} | ||
emulateTransitionEnd(activeElement, transitionDuration) | ||
this._queueCallback(completeCallBack, activeElement, true) | ||
} else { | ||
@@ -579,8 +565,3 @@ activeElement.classList.remove(CLASS_NAME_ACTIVE) | ||
this._isSliding = false | ||
EventHandler.trigger(this._element, EVENT_SLID, { | ||
relatedTarget: nextElement, | ||
direction: eventDirectionName, | ||
from: activeElementIndex, | ||
to: nextElementIndex | ||
}) | ||
triggerSlidEvent() | ||
} | ||
@@ -709,4 +690,4 @@ | ||
defineJQueryPlugin(NAME, Carousel) | ||
defineJQueryPlugin(Carousel) | ||
export default Carousel |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): collapse.js | ||
* Bootstrap (v5.0.1): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -10,7 +10,5 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getElement, | ||
getSelectorFromElement, | ||
getElementFromSelector, | ||
getTransitionDurationFromElement, | ||
isElement, | ||
reflow, | ||
@@ -111,4 +109,4 @@ typeCheckConfig | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -205,7 +203,4 @@ | ||
const scrollSize = `scroll${capitalizedDimension}` | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', complete) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
this._queueCallback(complete, this._element, true) | ||
this._element.style[dimension] = `${this._element[scrollSize]}px` | ||
@@ -256,6 +251,4 @@ } | ||
this._element.style[dimension] = '' | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', complete) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
this._queueCallback(complete, this._element, true) | ||
} | ||
@@ -267,10 +260,2 @@ | ||
dispose() { | ||
super.dispose() | ||
this._config = null | ||
this._parent = null | ||
this._triggerArray = null | ||
this._isTransitioning = null | ||
} | ||
// Private | ||
@@ -295,10 +280,3 @@ | ||
if (isElement(parent)) { | ||
// it's a jQuery object | ||
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') { | ||
parent = parent[0] | ||
} | ||
} else { | ||
parent = SelectorEngine.findOne(parent) | ||
} | ||
parent = getElement(parent) | ||
@@ -414,4 +392,4 @@ const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]` | ||
defineJQueryPlugin(NAME, Collapse) | ||
defineJQueryPlugin(Collapse) | ||
export default Collapse |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/data.js | ||
* Bootstrap (v5.0.1): dom/data.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/event-handler.js | ||
* Bootstrap (v5.0.1): dom/event-handler.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/manipulator.js | ||
* Bootstrap (v5.0.1): dom/manipulator.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dom/selector-engine.js | ||
* Bootstrap (v5.0.1): dom/selector-engine.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): dropdown.js | ||
* Bootstrap (v5.0.1): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -12,2 +12,3 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
getElement, | ||
getElementFromSelector, | ||
@@ -120,4 +121,4 @@ isDisabled, | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -171,8 +172,3 @@ | ||
} else if (isElement(this._config.reference)) { | ||
referenceElement = this._config.reference | ||
// Check if it's jQuery element | ||
if (typeof this._config.reference.jquery !== 'undefined') { | ||
referenceElement = this._config.reference[0] | ||
} | ||
referenceElement = getElement(this._config.reference) | ||
} else if (typeof this._config.reference === 'object') { | ||
@@ -223,7 +219,4 @@ referenceElement = this._config.reference | ||
dispose() { | ||
this._menu = null | ||
if (this._popper) { | ||
this._popper.destroy() | ||
this._popper = null | ||
} | ||
@@ -418,10 +411,4 @@ | ||
static clearMenus(event) { | ||
if (event) { | ||
if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) { | ||
return | ||
} | ||
if (/input|select|option|textarea|form/i.test(event.target.tagName)) { | ||
return | ||
} | ||
if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) { | ||
return | ||
} | ||
@@ -456,4 +443,4 @@ | ||
// Tab navigation through the dropdown menu shouldn't close the menu | ||
if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) { | ||
// Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu | ||
if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) { | ||
continue | ||
@@ -548,4 +535,4 @@ } | ||
defineJQueryPlugin(NAME, Dropdown) | ||
defineJQueryPlugin(Dropdown) | ||
export default Dropdown |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): modal.js | ||
* Bootstrap (v5.0.1): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -96,4 +96,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -180,10 +180,3 @@ | ||
if (isAnimated) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', event => this._hideModal(event)) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
} else { | ||
this._hideModal() | ||
} | ||
this._queueCallback(() => this._hideModal(), this._element, isAnimated) | ||
} | ||
@@ -195,2 +188,3 @@ | ||
this._backdrop.dispose() | ||
super.dispose() | ||
@@ -204,10 +198,2 @@ | ||
EventHandler.off(document, EVENT_FOCUSIN) | ||
this._config = null | ||
this._dialog = null | ||
this._backdrop.dispose() | ||
this._backdrop = null | ||
this._isShown = null | ||
this._ignoreBackdropClick = null | ||
this._isTransitioning = null | ||
} | ||
@@ -278,10 +264,3 @@ | ||
if (isAnimated) { | ||
const transitionDuration = getTransitionDurationFromElement(this._dialog) | ||
EventHandler.one(this._dialog, 'transitionend', transitionComplete) | ||
emulateTransitionEnd(this._dialog, transitionDuration) | ||
} else { | ||
transitionComplete() | ||
} | ||
this._queueCallback(transitionComplete, this._dialog, isAnimated) | ||
} | ||
@@ -470,4 +449,4 @@ | ||
defineJQueryPlugin(NAME, Modal) | ||
defineJQueryPlugin(Modal) | ||
export default Modal |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): offcanvas.js | ||
* Bootstrap (v5.0.1): offcanvas.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -10,5 +10,3 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getElementFromSelector, | ||
getTransitionDurationFromElement, | ||
isDisabled, | ||
@@ -84,2 +82,6 @@ isVisible, | ||
static get NAME() { | ||
return NAME | ||
} | ||
static get Default() { | ||
@@ -89,6 +91,2 @@ return Default | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
} | ||
// Public | ||
@@ -130,5 +128,3 @@ | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', completeCallBack) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
this._queueCallback(completeCallBack, this._element, true) | ||
} | ||
@@ -166,5 +162,3 @@ | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', completeCallback) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
this._queueCallback(completeCallback, this._element, true) | ||
} | ||
@@ -176,5 +170,2 @@ | ||
EventHandler.off(document, EVENT_FOCUSIN) | ||
this._config = null | ||
this._backdrop = null | ||
} | ||
@@ -289,4 +280,4 @@ | ||
defineJQueryPlugin(NAME, Offcanvas) | ||
defineJQueryPlugin(Offcanvas) | ||
export default Offcanvas |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): popover.js | ||
* Bootstrap (v5.0.1): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -79,6 +79,2 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
} | ||
static get Event() { | ||
@@ -88,6 +84,2 @@ return Event | ||
static get EVENT_KEY() { | ||
return EVENT_KEY | ||
} | ||
static get DefaultType() { | ||
@@ -125,3 +117,3 @@ return DefaultType | ||
_getContent() { | ||
return this._element.getAttribute('data-bs-content') || this.config.content | ||
return this._element.getAttribute('data-bs-content') || this._config.content | ||
} | ||
@@ -172,4 +164,4 @@ | ||
defineJQueryPlugin(NAME, Popover) | ||
defineJQueryPlugin(Popover) | ||
export default Popover |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): scrollspy.js | ||
* Bootstrap (v5.0.1): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -90,4 +90,4 @@ * -------------------------------------------------------------------------- | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -141,12 +141,4 @@ | ||
dispose() { | ||
EventHandler.off(this._scrollElement, EVENT_KEY) | ||
super.dispose() | ||
EventHandler.off(this._scrollElement, EVENT_KEY) | ||
this._scrollElement = null | ||
this._config = null | ||
this._selector = null | ||
this._offsets = null | ||
this._targets = null | ||
this._activeTarget = null | ||
this._scrollHeight = null | ||
} | ||
@@ -316,4 +308,4 @@ | ||
defineJQueryPlugin(NAME, ScrollSpy) | ||
defineJQueryPlugin(ScrollSpy) | ||
export default ScrollSpy |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): tab.js | ||
* Bootstrap (v5.0.1): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -10,5 +10,3 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getElementFromSelector, | ||
getTransitionDurationFromElement, | ||
isDisabled, | ||
@@ -61,4 +59,4 @@ reflow | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -130,7 +128,4 @@ | ||
if (active && isTransitioning) { | ||
const transitionDuration = getTransitionDurationFromElement(active) | ||
active.classList.remove(CLASS_NAME_SHOW) | ||
EventHandler.one(active, 'transitionend', complete) | ||
emulateTransitionEnd(active, transitionDuration) | ||
this._queueCallback(complete, element, true) | ||
} else { | ||
@@ -231,4 +226,4 @@ complete() | ||
defineJQueryPlugin(NAME, Tab) | ||
defineJQueryPlugin(Tab) | ||
export default Tab |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): toast.js | ||
* Bootstrap (v5.0.1): toast.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -10,4 +10,2 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
getTransitionDurationFromElement, | ||
reflow, | ||
@@ -32,2 +30,6 @@ typeCheckConfig | ||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}` | ||
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}` | ||
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}` | ||
const EVENT_FOCUSIN = `focusin${EVENT_KEY}` | ||
const EVENT_FOCUSOUT = `focusout${EVENT_KEY}` | ||
const EVENT_HIDE = `hide${EVENT_KEY}` | ||
@@ -69,2 +71,4 @@ const EVENT_HIDDEN = `hidden${EVENT_KEY}` | ||
this._timeout = null | ||
this._hasMouseInteraction = false | ||
this._hasKeyboardInteraction = false | ||
this._setListeners() | ||
@@ -83,4 +87,4 @@ } | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
static get NAME() { | ||
return NAME | ||
} | ||
@@ -109,7 +113,3 @@ | ||
if (this._config.autohide) { | ||
this._timeout = setTimeout(() => { | ||
this.hide() | ||
}, this._config.delay) | ||
} | ||
this._maybeScheduleHide() | ||
} | ||
@@ -120,10 +120,4 @@ | ||
this._element.classList.add(CLASS_NAME_SHOWING) | ||
if (this._config.animation) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', complete) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
} else { | ||
complete() | ||
} | ||
this._queueCallback(complete, this._element, this._config.animation) | ||
} | ||
@@ -148,10 +142,3 @@ | ||
this._element.classList.remove(CLASS_NAME_SHOW) | ||
if (this._config.animation) { | ||
const transitionDuration = getTransitionDurationFromElement(this._element) | ||
EventHandler.one(this._element, 'transitionend', complete) | ||
emulateTransitionEnd(this._element, transitionDuration) | ||
} else { | ||
complete() | ||
} | ||
this._queueCallback(complete, this._element, this._config.animation) | ||
} | ||
@@ -167,3 +154,2 @@ | ||
super.dispose() | ||
this._config = null | ||
} | ||
@@ -185,4 +171,49 @@ | ||
_maybeScheduleHide() { | ||
if (!this._config.autohide) { | ||
return | ||
} | ||
if (this._hasMouseInteraction || this._hasKeyboardInteraction) { | ||
return | ||
} | ||
this._timeout = setTimeout(() => { | ||
this.hide() | ||
}, this._config.delay) | ||
} | ||
_onInteraction(event, isInteracting) { | ||
switch (event.type) { | ||
case 'mouseover': | ||
case 'mouseout': | ||
this._hasMouseInteraction = isInteracting | ||
break | ||
case 'focusin': | ||
case 'focusout': | ||
this._hasKeyboardInteraction = isInteracting | ||
break | ||
default: | ||
break | ||
} | ||
if (isInteracting) { | ||
this._clearTimeout() | ||
return | ||
} | ||
const nextElement = event.relatedTarget | ||
if (this._element === nextElement || this._element.contains(nextElement)) { | ||
return | ||
} | ||
this._maybeScheduleHide() | ||
} | ||
_setListeners() { | ||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()) | ||
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)) | ||
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)) | ||
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)) | ||
EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false)) | ||
} | ||
@@ -224,4 +255,4 @@ | ||
defineJQueryPlugin(NAME, Toast) | ||
defineJQueryPlugin(Toast) | ||
export default Toast |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): tooltip.js | ||
* Bootstrap (v5.0.1): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -12,5 +12,4 @@ * -------------------------------------------------------------------------- | ||
defineJQueryPlugin, | ||
emulateTransitionEnd, | ||
findShadowRoot, | ||
getTransitionDurationFromElement, | ||
getElement, | ||
getUID, | ||
@@ -145,3 +144,3 @@ isElement, | ||
// Protected | ||
this.config = this._getConfig(config) | ||
this._config = this._getConfig(config) | ||
this.tip = null | ||
@@ -162,6 +161,2 @@ | ||
static get DATA_KEY() { | ||
return DATA_KEY | ||
} | ||
static get Event() { | ||
@@ -171,6 +166,2 @@ return Event | ||
static get EVENT_KEY() { | ||
return EVENT_KEY | ||
} | ||
static get DefaultType() { | ||
@@ -228,6 +219,2 @@ return DefaultType | ||
this._isEnabled = null | ||
this._timeout = null | ||
this._hoverState = null | ||
this._activeTrigger = null | ||
if (this._popper) { | ||
@@ -237,5 +224,2 @@ this._popper.destroy() | ||
this._popper = null | ||
this.config = null | ||
this.tip = null | ||
super.dispose() | ||
@@ -271,9 +255,9 @@ } | ||
if (this.config.animation) { | ||
if (this._config.animation) { | ||
tip.classList.add(CLASS_NAME_FADE) | ||
} | ||
const placement = typeof this.config.placement === 'function' ? | ||
this.config.placement.call(this, tip, this._element) : | ||
this.config.placement | ||
const placement = typeof this._config.placement === 'function' ? | ||
this._config.placement.call(this, tip, this._element) : | ||
this._config.placement | ||
@@ -283,3 +267,3 @@ const attachment = this._getAttachment(placement) | ||
const container = this._getContainer() | ||
const { container } = this._config | ||
Data.set(tip, this.constructor.DATA_KEY, this) | ||
@@ -300,3 +284,3 @@ | ||
const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass | ||
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass | ||
if (customClass) { | ||
@@ -327,9 +311,4 @@ tip.classList.add(...customClass.split(' ')) | ||
if (this.tip.classList.contains(CLASS_NAME_FADE)) { | ||
const transitionDuration = getTransitionDurationFromElement(this.tip) | ||
EventHandler.one(this.tip, 'transitionend', complete) | ||
emulateTransitionEnd(this.tip, transitionDuration) | ||
} else { | ||
complete() | ||
} | ||
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE) | ||
this._queueCallback(complete, this.tip, isAnimated) | ||
} | ||
@@ -380,11 +359,4 @@ | ||
if (this.tip.classList.contains(CLASS_NAME_FADE)) { | ||
const transitionDuration = getTransitionDurationFromElement(tip) | ||
EventHandler.one(tip, 'transitionend', complete) | ||
emulateTransitionEnd(tip, transitionDuration) | ||
} else { | ||
complete() | ||
} | ||
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE) | ||
this._queueCallback(complete, this.tip, isAnimated) | ||
this._hoverState = '' | ||
@@ -411,3 +383,3 @@ } | ||
const element = document.createElement('div') | ||
element.innerHTML = this.config.template | ||
element.innerHTML = this._config.template | ||
@@ -429,9 +401,7 @@ this.tip = element.children[0] | ||
if (typeof content === 'object' && isElement(content)) { | ||
if (content.jquery) { | ||
content = content[0] | ||
} | ||
if (isElement(content)) { | ||
content = getElement(content) | ||
// content is a DOM node or a jQuery | ||
if (this.config.html) { | ||
if (this._config.html) { | ||
if (content.parentNode !== element) { | ||
@@ -448,5 +418,5 @@ element.innerHTML = '' | ||
if (this.config.html) { | ||
if (this.config.sanitize) { | ||
content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn) | ||
if (this._config.html) { | ||
if (this._config.sanitize) { | ||
content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn) | ||
} | ||
@@ -464,5 +434,5 @@ | ||
if (!title) { | ||
title = typeof this.config.title === 'function' ? | ||
this.config.title.call(this._element) : | ||
this.config.title | ||
title = typeof this._config.title === 'function' ? | ||
this._config.title.call(this._element) : | ||
this._config.title | ||
} | ||
@@ -500,3 +470,3 @@ | ||
_getOffset() { | ||
const { offset } = this.config | ||
const { offset } = this._config | ||
@@ -521,3 +491,3 @@ if (typeof offset === 'string') { | ||
options: { | ||
fallbackPlacements: this.config.fallbackPlacements | ||
fallbackPlacements: this._config.fallbackPlacements | ||
} | ||
@@ -534,3 +504,3 @@ }, | ||
options: { | ||
boundary: this.config.boundary | ||
boundary: this._config.boundary | ||
} | ||
@@ -560,3 +530,3 @@ }, | ||
...defaultBsPopperConfig, | ||
...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig) | ||
...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) | ||
} | ||
@@ -569,14 +539,2 @@ } | ||
_getContainer() { | ||
if (this.config.container === false) { | ||
return document.body | ||
} | ||
if (isElement(this.config.container)) { | ||
return this.config.container | ||
} | ||
return SelectorEngine.findOne(this.config.container) | ||
} | ||
_getAttachment(placement) { | ||
@@ -587,7 +545,7 @@ return AttachmentMap[placement.toUpperCase()] | ||
_setListeners() { | ||
const triggers = this.config.trigger.split(' ') | ||
const triggers = this._config.trigger.split(' ') | ||
triggers.forEach(trigger => { | ||
if (trigger === 'click') { | ||
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)) | ||
EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event)) | ||
} else if (trigger !== TRIGGER_MANUAL) { | ||
@@ -601,4 +559,4 @@ const eventIn = trigger === TRIGGER_HOVER ? | ||
EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event)) | ||
EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event)) | ||
EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event)) | ||
EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event)) | ||
} | ||
@@ -615,5 +573,5 @@ }) | ||
if (this.config.selector) { | ||
this.config = { | ||
...this.config, | ||
if (this._config.selector) { | ||
this._config = { | ||
...this._config, | ||
trigger: 'manual', | ||
@@ -659,3 +617,3 @@ selector: '' | ||
if (!context.config.delay || !context.config.delay.show) { | ||
if (!context._config.delay || !context._config.delay.show) { | ||
context.show() | ||
@@ -669,3 +627,3 @@ return | ||
} | ||
}, context.config.delay.show) | ||
}, context._config.delay.show) | ||
} | ||
@@ -690,3 +648,3 @@ | ||
if (!context.config.delay || !context.config.delay.hide) { | ||
if (!context._config.delay || !context._config.delay.hide) { | ||
context.hide() | ||
@@ -700,3 +658,3 @@ return | ||
} | ||
}, context.config.delay.hide) | ||
}, context._config.delay.hide) | ||
} | ||
@@ -723,6 +681,2 @@ | ||
if (config && typeof config.container === 'object' && config.container.jquery) { | ||
config.container = config.container[0] | ||
} | ||
config = { | ||
@@ -734,2 +688,4 @@ ...this.constructor.Default, | ||
config.container = config.container === false ? document.body : getElement(config.container) | ||
if (typeof config.delay === 'number') { | ||
@@ -762,6 +718,6 @@ config.delay = { | ||
if (this.config) { | ||
for (const key in this.config) { | ||
if (this.constructor.Default[key] !== this.config[key]) { | ||
config[key] = this.config[key] | ||
if (this._config) { | ||
for (const key in this._config) { | ||
if (this.constructor.Default[key] !== this._config[key]) { | ||
config[key] = this._config[key] | ||
} | ||
@@ -828,4 +784,4 @@ } | ||
defineJQueryPlugin(NAME, Tooltip) | ||
defineJQueryPlugin(Tooltip) | ||
export default Tooltip |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/backdrop.js | ||
* Bootstrap (v5.0.1): util/backdrop.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -92,2 +92,4 @@ * -------------------------------------------------------------------------- | ||
} | ||
config.rootElement = config.rootElement || document.body | ||
typeCheckConfig(NAME, config, DefaultType) | ||
@@ -94,0 +96,0 @@ return config |
@@ -0,4 +1,6 @@ | ||
import SelectorEngine from '../dom/selector-engine' | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/index.js | ||
* Bootstrap (v5.0.1): util/index.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -103,4 +105,26 @@ * -------------------------------------------------------------------------- | ||
const isElement = obj => (obj[0] || obj).nodeType | ||
const isElement = obj => { | ||
if (!obj || typeof obj !== 'object') { | ||
return false | ||
} | ||
if (typeof obj.jquery !== 'undefined') { | ||
obj = obj[0] | ||
} | ||
return typeof obj.nodeType !== 'undefined' | ||
} | ||
const getElement = obj => { | ||
if (isElement(obj)) { // it's a jQuery object or a node element | ||
return obj.jquery ? obj[0] : obj | ||
} | ||
if (typeof obj === 'string' && obj.length > 0) { | ||
return SelectorEngine.findOne(obj) | ||
} | ||
return null | ||
} | ||
const emulateTransitionEnd = (element, duration) => { | ||
@@ -218,3 +242,3 @@ let called = false | ||
const defineJQueryPlugin = (name, plugin) => { | ||
const defineJQueryPlugin = plugin => { | ||
onDOMContentLoaded(() => { | ||
@@ -224,2 +248,3 @@ const $ = getjQuery() | ||
if ($) { | ||
const name = plugin.NAME | ||
const JQUERY_NO_CONFLICT = $.fn[name] | ||
@@ -243,2 +268,3 @@ $.fn[name] = plugin.jQueryInterface | ||
export { | ||
getElement, | ||
getUID, | ||
@@ -245,0 +271,0 @@ getSelectorFromElement, |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/sanitizer.js | ||
* Bootstrap (v5.0.1): util/sanitizer.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v5.0.0): util/scrollBar.js | ||
* Bootstrap (v5.0.1): util/scrollBar.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
{ | ||
"name": "boosted", | ||
"description": "Orange Boosted with Bootstrap is a Bootstrap based, Orange branded accessible and ergonomic components library.", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"config": { | ||
@@ -107,8 +107,8 @@ "version_short": "5.0" | ||
"@babel/cli": "^7.13.16", | ||
"@babel/core": "^7.14.0", | ||
"@babel/preset-env": "^7.14.1", | ||
"@babel/core": "^7.14.2", | ||
"@babel/preset-env": "^7.14.2", | ||
"@popperjs/core": "^2.9.2", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@rollup/plugin-replace": "^2.4.2", | ||
@@ -120,3 +120,3 @@ "autoprefixer": "^10.2.5", | ||
"delay-cli": "^1.1.0", | ||
"eslint": "^7.25.0", | ||
"eslint": "^7.26.0", | ||
"eslint-config-xo": "^0.36.0", | ||
@@ -127,3 +127,3 @@ "eslint-plugin-import": "^2.22.1", | ||
"focus-visible": "^5.2.0", | ||
"glob": "^7.1.6", | ||
"glob": "^7.1.7", | ||
"globby": "^11.0.3", | ||
@@ -141,3 +141,3 @@ "hammer-simulator": "0.0.1", | ||
"karma-jasmine": "^4.0.1", | ||
"karma-jasmine-html-reporter": "^1.5.4", | ||
"karma-jasmine-html-reporter": "^1.6.0", | ||
"karma-rollup-preprocessor": "^7.0.7", | ||
@@ -150,3 +150,3 @@ "linkinator": "2.13.6", | ||
"pa11y-ci-reporter-html": "^2.0.3", | ||
"postcss": "^8.2.13", | ||
"postcss": "^8.2.15", | ||
"postcss-cli": "^8.3.1", | ||
@@ -156,3 +156,3 @@ "rollup": "^2.47.0", | ||
"rtlcss": "^3.1.2", | ||
"sass": "^1.32.12", | ||
"sass": "^1.32.13", | ||
"shelljs": "^0.8.4", | ||
@@ -159,0 +159,0 @@ "stylelint": "^13.13.1", |
@@ -39,7 +39,7 @@ <p align="center"> | ||
- [Download the latest release](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.0.zip) | ||
- [Download the latest release](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/archive/v5.0.1.zip) | ||
- Clone the repo: `git clone https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap.git` | ||
- Install with [npm](https://www.npmjs.com/): `npm install boosted` | ||
- Install with [yarn](https://yarnpkg.com/): `yarn add boosted` | ||
- Install with [Composer](https://getcomposer.org/): `composer require Orange-OpenSource/Orange-Boosted-Bootstrap:5.0.0` | ||
- Install with [Composer](https://getcomposer.org/): `composer require Orange-OpenSource/Orange-Boosted-Bootstrap:5.0.1` | ||
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package boosted` Sass: `Install-Package boosted.sass` | ||
@@ -165,3 +165,5 @@ | ||
Our default branch is for development of our Boosted 5 release. Head to the [`v4-dev` branch](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Boosted 4. | ||
## Creators | ||
@@ -168,0 +170,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210
8854370
62316