diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2021-05-15 04:20:49 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2021-05-15 04:20:49 +0300 |
commit | 73f9c09beb6143c1dcd8dca369982769307b44a8 (patch) | |
tree | 87e939a1e28e7d6326e90ebfd53661598f5209f5 /assets/javascripts/bootstrap/offcanvas.js | |
parent | 73ff03814293da40780b7a858f5f853bc4494280 (diff) |
Update to v5.0.1v5.0.1
1. `bundle exec rake 'update[v5.0.0]'
2. Update version numbers.
Diffstat (limited to 'assets/javascripts/bootstrap/offcanvas.js')
-rw-r--r-- | assets/javascripts/bootstrap/offcanvas.js | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/assets/javascripts/bootstrap/offcanvas.js b/assets/javascripts/bootstrap/offcanvas.js index 0e0032d..929cb17 100644 --- a/assets/javascripts/bootstrap/offcanvas.js +++ b/assets/javascripts/bootstrap/offcanvas.js @@ -1,5 +1,5 @@ /*! - * Bootstrap offcanvas.js v5.0.0 (https://getbootstrap.com/) + * Bootstrap offcanvas.js v5.0.1 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -17,12 +17,6 @@ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); 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) @@ -90,7 +84,17 @@ element.dispatchEvent(new Event(TRANSITION_END)); }; - 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) => { let called = false; @@ -174,12 +178,13 @@ } }; - const defineJQueryPlugin = (name, plugin) => { + const defineJQueryPlugin = plugin => { onDOMContentLoaded(() => { const $ = getjQuery(); /* istanbul ignore if */ if ($) { + const name = plugin.NAME; const JQUERY_NO_CONFLICT = $.fn[name]; $.fn[name] = plugin.jQueryInterface; $.fn[name].Constructor = plugin; @@ -200,7 +205,7 @@ /** * -------------------------------------------------------------------------- - * 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) * -------------------------------------------------------------------------- */ @@ -274,7 +279,7 @@ /** * -------------------------------------------------------------------------- - * 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,6 +363,7 @@ config = { ...Default$1, ...(typeof config === 'object' ? config : {}) }; + config.rootElement = config.rootElement || document.body; typeCheckConfig(NAME$1, config, DefaultType$1); return config; } @@ -402,7 +408,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0): offcanvas.js + * Bootstrap (v5.0.1): offcanvas.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -457,12 +463,12 @@ } // Getters - static get Default() { - return Default; + static get NAME() { + return NAME; } - static get DATA_KEY() { - return DATA_KEY; + static get Default() { + return Default; } // Public @@ -508,9 +514,7 @@ }); }; - const transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, 'transitionend', completeCallBack); - emulateTransitionEnd(this._element, transitionDuration); + this._queueCallback(completeCallBack, this._element, true); } hide() { @@ -550,9 +554,7 @@ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN); }; - const transitionDuration = getTransitionDurationFromElement(this._element); - EventHandler__default['default'].one(this._element, 'transitionend', completeCallback); - emulateTransitionEnd(this._element, transitionDuration); + this._queueCallback(completeCallback, this._element, true); } dispose() { @@ -560,8 +562,6 @@ super.dispose(); EventHandler__default['default'].off(document, EVENT_FOCUSIN); - this._config = null; - this._backdrop = null; } // Private @@ -664,7 +664,7 @@ * ------------------------------------------------------------------------ */ - defineJQueryPlugin(NAME, Offcanvas); + defineJQueryPlugin(Offcanvas); return Offcanvas; |