aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/dist/carousel.js
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-02-28 21:06:16 +0100
committerHilmar R <u02@u29lx193>2021-03-01 18:48:11 +0100
commitc26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch)
tree3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /vendor/twbs/bootstrap/js/dist/carousel.js
parentea3390d626f85b7293a750958bfd1b5460958365 (diff)
downloadvolse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2
volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip
get dev
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/carousel.js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/carousel.js72
1 files changed, 56 insertions, 16 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/carousel.js b/vendor/twbs/bootstrap/js/dist/carousel.js
index b9d1ec6d8..4520f5409 100644
--- a/vendor/twbs/bootstrap/js/dist/carousel.js
+++ b/vendor/twbs/bootstrap/js/dist/carousel.js
@@ -1,11 +1,11 @@
/*!
- * Bootstrap carousel.js v4.5.3 (https://getbootstrap.com/)
- * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap carousel.js v4.6.0 (https://getbootstrap.com/)
+ * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
+ typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
@@ -14,11 +14,40 @@
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+
+ function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+ }
+
+ function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+ };
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+ return _extends.apply(this, arguments);
+ }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/**
* ------------------------------------------------------------------------
* Constants
@@ -26,7 +55,7 @@
*/
var NAME = 'carousel';
- var VERSION = '4.5.3';
+ var VERSION = '4.6.0';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -166,6 +195,8 @@
}
if (this._config.interval && !this._isPaused) {
+ this._updateInterval();
+
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@@ -407,6 +438,23 @@
}
};
+ _proto._updateInterval = function _updateInterval() {
+ var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+
+ if (!element) {
+ return;
+ }
+
+ var 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;
+ }
+ };
+
_proto._slide = function _slide(direction, element) {
var _this4 = this;
@@ -457,6 +505,7 @@
this._setActiveIndicatorElement(nextElement);
+ this._activeElement = nextElement;
var slidEvent = $__default['default'].Event(EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
@@ -469,15 +518,6 @@
Util__default['default'].reflow(nextElement);
$__default['default'](activeElement).addClass(directionalClassName);
$__default['default'](nextElement).addClass(directionalClassName);
- var 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;
- }
-
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(activeElement);
$__default['default'](activeElement).one(Util__default['default'].TRANSITION_END, function () {
$__default['default'](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);