aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 18:41:44 +0000
committerMario <mario@mariovavti.com>2021-02-15 18:41:44 +0000
commite8c2e17bc901ab139377e759f5ef931f8649b8c1 (patch)
treebebbeae1760c0cb5b5dea88fb268153a38938fab /vendor/twbs/bootstrap/js/src
parent6fae291cc8ec69a74d0c1673186b3d8f319378d4 (diff)
downloadvolse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.tar.gz
volse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.tar.bz2
volse-hubzilla-e8c2e17bc901ab139377e759f5ef931f8649b8c1.zip
compser update twbs/bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/js/src')
-rw-r--r--vendor/twbs/bootstrap/js/src/alert.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/button.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/carousel.js32
-rw-r--r--vendor/twbs/bootstrap/js/src/collapse.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/dropdown.js10
-rw-r--r--vendor/twbs/bootstrap/js/src/index.js34
-rw-r--r--vendor/twbs/bootstrap/js/src/modal.js60
-rw-r--r--vendor/twbs/bootstrap/js/src/popover.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/scrollspy.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/tab.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/toast.js4
-rw-r--r--vendor/twbs/bootstrap/js/src/tools/sanitizer.js2
-rw-r--r--vendor/twbs/bootstrap/js/src/tooltip.js9
-rw-r--r--vendor/twbs/bootstrap/js/src/util.js2
14 files changed, 79 insertions, 98 deletions
diff --git a/vendor/twbs/bootstrap/js/src/alert.js b/vendor/twbs/bootstrap/js/src/alert.js
index 421da7435..afd7736c7 100644
--- a/vendor/twbs/bootstrap/js/src/alert.js
+++ b/vendor/twbs/bootstrap/js/src/alert.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): alert.js
+ * Bootstrap (v4.6.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'alert'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
diff --git a/vendor/twbs/bootstrap/js/src/button.js b/vendor/twbs/bootstrap/js/src/button.js
index ec40af333..316387e8e 100644
--- a/vendor/twbs/bootstrap/js/src/button.js
+++ b/vendor/twbs/bootstrap/js/src/button.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): button.js
+ * Bootstrap (v4.6.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14,7 +14,7 @@ import $ from 'jquery'
*/
const NAME = 'button'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
diff --git a/vendor/twbs/bootstrap/js/src/carousel.js b/vendor/twbs/bootstrap/js/src/carousel.js
index 5f738fd92..b63d406bd 100644
--- a/vendor/twbs/bootstrap/js/src/carousel.js
+++ b/vendor/twbs/bootstrap/js/src/carousel.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): carousel.js
+ * Bootstrap (v4.6.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'carousel'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -169,6 +169,8 @@ class Carousel {
}
if (this._config.interval && !this._isPaused) {
+ this._updateInterval()
+
this._interval = setInterval(
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this),
this._config.interval
@@ -401,6 +403,23 @@ class Carousel {
}
}
+ _updateInterval() {
+ const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)
+
+ if (!element) {
+ return
+ }
+
+ const elementInterval = parseInt(element.getAttribute('data-interval'), 10)
+
+ if (elementInterval) {
+ this._config.defaultInterval = this._config.defaultInterval || this._config.interval
+ this._config.interval = elementInterval
+ } else {
+ this._config.interval = this._config.defaultInterval || this._config.interval
+ }
+ }
+
_slide(direction, element) {
const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
const activeElementIndex = this._getItemIndex(activeElement)
@@ -445,6 +464,7 @@ class Carousel {
}
this._setActiveIndicatorElement(nextElement)
+ this._activeElement = nextElement
const slidEvent = $.Event(EVENT_SLID, {
relatedTarget: nextElement,
@@ -461,14 +481,6 @@ class Carousel {
$(activeElement).addClass(directionalClassName)
$(nextElement).addClass(directionalClassName)
- const nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10)
- if (nextElementInterval) {
- this._config.defaultInterval = this._config.defaultInterval || this._config.interval
- this._config.interval = nextElementInterval
- } else {
- this._config.interval = this._config.defaultInterval || this._config.interval
- }
-
const transitionDuration = Util.getTransitionDurationFromElement(activeElement)
$(activeElement)
diff --git a/vendor/twbs/bootstrap/js/src/collapse.js b/vendor/twbs/bootstrap/js/src/collapse.js
index 0ec037704..af3163be9 100644
--- a/vendor/twbs/bootstrap/js/src/collapse.js
+++ b/vendor/twbs/bootstrap/js/src/collapse.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): collapse.js
+ * Bootstrap (v4.6.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'collapse'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
diff --git a/vendor/twbs/bootstrap/js/src/dropdown.js b/vendor/twbs/bootstrap/js/src/dropdown.js
index c2779f05f..76dda8f57 100644
--- a/vendor/twbs/bootstrap/js/src/dropdown.js
+++ b/vendor/twbs/bootstrap/js/src/dropdown.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): dropdown.js
+ * Bootstrap (v4.6.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,7 +16,7 @@ import Util from './util'
*/
const NAME = 'dropdown'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -143,14 +143,14 @@ class Dropdown {
return
}
- // Disable totally Popper.js for Dropdown in Navbar
+ // Totally disable Popper for Dropdowns in Navbar
if (!this._inNavbar && usePopper) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)')
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)')
}
let referenceElement = this._element
@@ -334,7 +334,7 @@ class Dropdown {
}
}
- // Disable Popper.js if we have a static display
+ // Disable Popper if we have a static display
if (this._config.display === 'static') {
popperConfig.modifiers.applyStyle = {
enabled: false
diff --git a/vendor/twbs/bootstrap/js/src/index.js b/vendor/twbs/bootstrap/js/src/index.js
deleted file mode 100644
index f407cffa5..000000000
--- a/vendor/twbs/bootstrap/js/src/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import Alert from './alert'
-import Button from './button'
-import Carousel from './carousel'
-import Collapse from './collapse'
-import Dropdown from './dropdown'
-import Modal from './modal'
-import Popover from './popover'
-import Scrollspy from './scrollspy'
-import Tab from './tab'
-import Toast from './toast'
-import Tooltip from './tooltip'
-import Util from './util'
-
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
-export {
- Util,
- Alert,
- Button,
- Carousel,
- Collapse,
- Dropdown,
- Modal,
- Popover,
- Scrollspy,
- Tab,
- Toast,
- Tooltip
-}
diff --git a/vendor/twbs/bootstrap/js/src/modal.js b/vendor/twbs/bootstrap/js/src/modal.js
index 975a20be6..2e3017024 100644
--- a/vendor/twbs/bootstrap/js/src/modal.js
+++ b/vendor/twbs/bootstrap/js/src/modal.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): modal.js
+ * Bootstrap (v4.6.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'modal'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
@@ -230,39 +230,35 @@ class Modal {
}
_triggerBackdropTransition() {
- if (this._config.backdrop === 'static') {
- const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
+ const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
- $(this._element).trigger(hideEventPrevented)
- if (hideEventPrevented.isDefaultPrevented()) {
- return
- }
+ $(this._element).trigger(hideEventPrevented)
+ if (hideEventPrevented.isDefaultPrevented()) {
+ return
+ }
- const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
- if (!isModalOverflowing) {
- this._element.style.overflowY = 'hidden'
- }
+ if (!isModalOverflowing) {
+ this._element.style.overflowY = 'hidden'
+ }
- this._element.classList.add(CLASS_NAME_STATIC)
+ this._element.classList.add(CLASS_NAME_STATIC)
- const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)
- $(this._element).off(Util.TRANSITION_END)
+ const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)
+ $(this._element).off(Util.TRANSITION_END)
- $(this._element).one(Util.TRANSITION_END, () => {
- this._element.classList.remove(CLASS_NAME_STATIC)
- if (!isModalOverflowing) {
- $(this._element).one(Util.TRANSITION_END, () => {
- this._element.style.overflowY = ''
- })
- .emulateTransitionEnd(this._element, modalTransitionDuration)
- }
- })
- .emulateTransitionEnd(modalTransitionDuration)
- this._element.focus()
- } else {
- this.hide()
- }
+ $(this._element).one(Util.TRANSITION_END, () => {
+ this._element.classList.remove(CLASS_NAME_STATIC)
+ if (!isModalOverflowing) {
+ $(this._element).one(Util.TRANSITION_END, () => {
+ this._element.style.overflowY = ''
+ })
+ .emulateTransitionEnd(this._element, modalTransitionDuration)
+ }
+ })
+ .emulateTransitionEnd(modalTransitionDuration)
+ this._element.focus()
}
_showElement(relatedTarget) {
@@ -400,7 +396,11 @@ class Modal {
return
}
- this._triggerBackdropTransition()
+ if (this._config.backdrop === 'static') {
+ this._triggerBackdropTransition()
+ } else {
+ this.hide()
+ }
})
if (animate) {
diff --git a/vendor/twbs/bootstrap/js/src/popover.js b/vendor/twbs/bootstrap/js/src/popover.js
index ee7a4ca9a..4e2c260b9 100644
--- a/vendor/twbs/bootstrap/js/src/popover.js
+++ b/vendor/twbs/bootstrap/js/src/popover.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): popover.js
+ * Bootstrap (v4.6.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Tooltip from './tooltip'
*/
const NAME = 'popover'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
diff --git a/vendor/twbs/bootstrap/js/src/scrollspy.js b/vendor/twbs/bootstrap/js/src/scrollspy.js
index 7daa51e86..351df0649 100644
--- a/vendor/twbs/bootstrap/js/src/scrollspy.js
+++ b/vendor/twbs/bootstrap/js/src/scrollspy.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): scrollspy.js
+ * Bootstrap (v4.6.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'scrollspy'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
diff --git a/vendor/twbs/bootstrap/js/src/tab.js b/vendor/twbs/bootstrap/js/src/tab.js
index 512016483..e9a6f555f 100644
--- a/vendor/twbs/bootstrap/js/src/tab.js
+++ b/vendor/twbs/bootstrap/js/src/tab.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): tab.js
+ * Bootstrap (v4.6.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'tab'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
diff --git a/vendor/twbs/bootstrap/js/src/toast.js b/vendor/twbs/bootstrap/js/src/toast.js
index 953879ebd..0c2186908 100644
--- a/vendor/twbs/bootstrap/js/src/toast.js
+++ b/vendor/twbs/bootstrap/js/src/toast.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): toast.js
+ * Bootstrap (v4.6.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'toast'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
diff --git a/vendor/twbs/bootstrap/js/src/tools/sanitizer.js b/vendor/twbs/bootstrap/js/src/tools/sanitizer.js
index 57768e45f..45fd6106c 100644
--- a/vendor/twbs/bootstrap/js/src/tools/sanitizer.js
+++ b/vendor/twbs/bootstrap/js/src/tools/sanitizer.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): tools/sanitizer.js
+ * Bootstrap (v4.6.0): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
diff --git a/vendor/twbs/bootstrap/js/src/tooltip.js b/vendor/twbs/bootstrap/js/src/tooltip.js
index 4b58f3156..fd6ceea67 100644
--- a/vendor/twbs/bootstrap/js/src/tooltip.js
+++ b/vendor/twbs/bootstrap/js/src/tooltip.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): tooltip.js
+ * Bootstrap (v4.6.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@ import Util from './util'
*/
const NAME = 'tooltip'
-const VERSION = '4.5.3'
+const VERSION = '4.6.0'
const DATA_KEY = 'bs.tooltip'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
@@ -41,6 +41,7 @@ const DefaultType = {
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)',
boundary: '(string|element)',
+ customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
whiteList: 'object',
@@ -70,6 +71,7 @@ const Default = {
container: false,
fallbackPlacement: 'flip',
boundary: 'scrollParent',
+ customClass: '',
sanitize: true,
sanitizeFn: null,
whiteList: DefaultWhitelist,
@@ -112,7 +114,7 @@ const TRIGGER_MANUAL = 'manual'
class Tooltip {
constructor(element, config) {
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)')
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)')
}
// private
@@ -284,6 +286,7 @@ class Tooltip {
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))
$(tip).addClass(CLASS_NAME_SHOW)
+ $(tip).addClass(this.config.customClass)
// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
diff --git a/vendor/twbs/bootstrap/js/src/util.js b/vendor/twbs/bootstrap/js/src/util.js
index 6ce6ca50b..cd9d5e3b8 100644
--- a/vendor/twbs/bootstrap/js/src/util.js
+++ b/vendor/twbs/bootstrap/js/src/util.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.3): util.js
+ * Bootstrap (v4.6.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/