diff options
author | Mario Vavti <mario@mariovavti.com> | 2020-08-22 19:40:57 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2020-08-22 19:40:57 +0200 |
commit | a9e19cb89ed08689dc58c92b3d5491318a703f0e (patch) | |
tree | 468e236e5cb4927a4fd01f650fab7ad9f6cfc895 /vendor/twbs/bootstrap/dist/js/bootstrap.js | |
parent | 48786119871aaf1029fac12a37d212afddafc757 (diff) | |
download | volse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.tar.gz volse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.tar.bz2 volse-hubzilla-a9e19cb89ed08689dc58c92b3d5491318a703f0e.zip |
composer update bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/dist/js/bootstrap.js')
-rw-r--r-- | vendor/twbs/bootstrap/dist/js/bootstrap.js | 168 |
1 files changed, 79 insertions, 89 deletions
diff --git a/vendor/twbs/bootstrap/dist/js/bootstrap.js b/vendor/twbs/bootstrap/dist/js/bootstrap.js index 363e0013b..0fb3f46e8 100644 --- a/vendor/twbs/bootstrap/dist/js/bootstrap.js +++ b/vendor/twbs/bootstrap/dist/js/bootstrap.js @@ -1,12 +1,12 @@ /*! - * Bootstrap v4.5.0 (https://getbootstrap.com/) + * Bootstrap v4.5.2 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : - (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper)); + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper)); }(this, (function (exports, $, Popper) { 'use strict'; $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; @@ -28,53 +28,22 @@ return Constructor; } - function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - } - - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - return keys; - } - - function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } } - } - return target; + return target; + }; + + return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { @@ -85,8 +54,8 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.5.0): util.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Bootstrap (v4.5.2): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** @@ -266,7 +235,7 @@ */ var NAME = 'alert'; - var VERSION = '4.5.0'; + var VERSION = '4.5.2'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -422,7 +391,7 @@ */ var NAME$1 = 'button'; - var VERSION$1 = '4.5.0'; + var VERSION$1 = '4.5.2'; var DATA_KEY$1 = 'bs.button'; var EVENT_KEY$1 = "." + DATA_KEY$1; var DATA_API_KEY$1 = '.data-api'; @@ -557,11 +526,9 @@ return; } - if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') { - event.preventDefault(); // work around event sent to label and input + if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') { + Button._jQueryInterface.call($(button), 'toggle'); } - - Button._jQueryInterface.call($(button), 'toggle'); } }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { var button = $(event.target).closest(SELECTOR_BUTTON)[0]; @@ -617,7 +584,7 @@ */ var NAME$2 = 'carousel'; - var VERSION$2 = '4.5.0'; + var VERSION$2 = '4.5.2'; var DATA_KEY$2 = 'bs.carousel'; var EVENT_KEY$2 = "." + DATA_KEY$2; var DATA_API_KEY$2 = '.data-api'; @@ -804,7 +771,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2({}, Default), config); + config = _extends({}, Default, config); Util.typeCheckConfig(NAME$2, config, DefaultType); return config; }; @@ -1094,10 +1061,10 @@ return this.each(function () { var data = $(this).data(DATA_KEY$2); - var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data()); + var _config = _extends({}, Default, $(this).data()); if (typeof config === 'object') { - _config = _objectSpread2(_objectSpread2({}, _config), config); + _config = _extends({}, _config, config); } var action = typeof config === 'string' ? config : _config.slide; @@ -1135,7 +1102,7 @@ return; } - var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); + var config = _extends({}, $(target).data(), $(this).data()); var slideIndex = this.getAttribute('data-slide-to'); @@ -1204,7 +1171,7 @@ */ var NAME$3 = 'collapse'; - var VERSION$3 = '4.5.0'; + var VERSION$3 = '4.5.2'; var DATA_KEY$3 = 'bs.collapse'; var EVENT_KEY$3 = "." + DATA_KEY$3; var DATA_API_KEY$3 = '.data-api'; @@ -1419,7 +1386,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2({}, Default$1), config); + config = _extends({}, Default$1, config); config.toggle = Boolean(config.toggle); // Coerce string values Util.typeCheckConfig(NAME$3, config, DefaultType$1); @@ -1473,7 +1440,7 @@ var $this = $(this); var data = $this.data(DATA_KEY$3); - var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$1), $this.data()), typeof config === 'object' && config ? config : {}); + var _config = _extends({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { _config.toggle = false; @@ -1553,7 +1520,7 @@ */ var NAME$4 = 'dropdown'; - var VERSION$4 = '4.5.0'; + var VERSION$4 = '4.5.2'; var DATA_KEY$4 = 'bs.dropdown'; var EVENT_KEY$4 = "." + DATA_KEY$4; var DATA_API_KEY$4 = '.data-api'; @@ -1780,7 +1747,7 @@ }; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config); + config = _extends({}, this.constructor.Default, $(this._element).data(), config); Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); return config; }; @@ -1825,7 +1792,7 @@ if (typeof this._config.offset === 'function') { offset.fn = function (data) { - data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {}); + data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { @@ -1855,7 +1822,7 @@ }; } - return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig); + return _extends({}, popperConfig, this._config.popperConfig); } // Static ; @@ -2067,7 +2034,7 @@ */ var NAME$5 = 'modal'; - var VERSION$5 = '4.5.0'; + var VERSION$5 = '4.5.2'; var DATA_KEY$5 = 'bs.modal'; var EVENT_KEY$5 = "." + DATA_KEY$5; var DATA_API_KEY$5 = '.data-api'; @@ -2259,7 +2226,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2({}, Default$3), config); + config = _extends({}, Default$3, config); Util.typeCheckConfig(NAME$5, config, DefaultType$3); return config; }; @@ -2275,11 +2242,24 @@ return; } + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + + if (!isModalOverflowing) { + this._element.style.overflowY = 'hidden'; + } + this._element.classList.add(CLASS_NAME_STATIC); - var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element); + var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog); + $(this._element).off(Util.TRANSITION_END); $(this._element).one(Util.TRANSITION_END, function () { _this3._element.classList.remove(CLASS_NAME_STATIC); + + if (!isModalOverflowing) { + $(_this3._element).one(Util.TRANSITION_END, function () { + _this3._element.style.overflowY = ''; + }).emulateTransitionEnd(_this3._element, modalTransitionDuration); + } }).emulateTransitionEnd(modalTransitionDuration); this._element.focus(); @@ -2305,6 +2285,8 @@ this._element.setAttribute('aria-modal', true); + this._element.setAttribute('role', 'dialog'); + if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) { modalBody.scrollTop = 0; } else { @@ -2392,6 +2374,8 @@ this._element.removeAttribute('aria-modal'); + this._element.removeAttribute('role'); + this._isTransitioning = false; this._showBackdrop(function () { @@ -2573,7 +2557,7 @@ return this.each(function () { var data = $(this).data(DATA_KEY$5); - var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$3), $(this).data()), typeof config === 'object' && config ? config : {}); + var _config = _extends({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); if (!data) { data = new Modal(this, _config); @@ -2623,7 +2607,7 @@ target = document.querySelector(selector); } - var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data()); + var config = $(target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $(target).data(), $(this).data()); if (this.tagName === 'A' || this.tagName === 'AREA') { event.preventDefault(); @@ -2660,8 +2644,8 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.5.0): tools/sanitizer.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Bootstrap (v4.5.2): tools/sanitizer.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; @@ -2786,7 +2770,7 @@ */ var NAME$6 = 'tooltip'; - var VERSION$6 = '4.5.0'; + var VERSION$6 = '4.5.2'; var DATA_KEY$6 = 'bs.tooltip'; var EVENT_KEY$6 = "." + DATA_KEY$6; var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; @@ -3174,7 +3158,7 @@ return _this3._handlePopperPlacementChange(data); } }; - return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig); + return _extends({}, defaultBsConfig, this.config.popperConfig); }; _proto._getOffset = function _getOffset() { @@ -3184,7 +3168,7 @@ if (typeof this.config.offset === 'function') { offset.fn = function (data) { - data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {}); + data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {}); return data; }; } else { @@ -3239,7 +3223,7 @@ $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler); if (this.config.selector) { - this.config = _objectSpread2(_objectSpread2({}, this.config), {}, { + this.config = _extends({}, this.config, { trigger: 'manual', selector: '' }); @@ -3339,7 +3323,7 @@ delete dataAttributes[dataAttr]; } }); - config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {}); + config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { @@ -3498,21 +3482,21 @@ */ var NAME$7 = 'popover'; - var VERSION$7 = '4.5.0'; + var VERSION$7 = '4.5.2'; var DATA_KEY$7 = 'bs.popover'; var EVENT_KEY$7 = "." + DATA_KEY$7; var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; var CLASS_PREFIX$1 = 'bs-popover'; var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); - var Default$5 = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, { + var Default$5 = _extends({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' }); - var DefaultType$5 = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, { + var DefaultType$5 = _extends({}, Tooltip.DefaultType, { content: '(string|element|function)' }); @@ -3678,7 +3662,7 @@ */ var NAME$8 = 'scrollspy'; - var VERSION$8 = '4.5.0'; + var VERSION$8 = '4.5.2'; var DATA_KEY$8 = 'bs.scrollspy'; var EVENT_KEY$8 = "." + DATA_KEY$8; var DATA_API_KEY$6 = '.data-api'; @@ -3792,7 +3776,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2({}, Default$6), typeof config === 'object' && config ? config : {}); + config = _extends({}, Default$6, typeof config === 'object' && config ? config : {}); if (typeof config.target !== 'string' && Util.isElement(config.target)) { var id = $(config.target).attr('id'); @@ -3970,7 +3954,7 @@ */ var NAME$9 = 'tab'; - var VERSION$9 = '4.5.0'; + var VERSION$9 = '4.5.2'; var DATA_KEY$9 = 'bs.tab'; var EVENT_KEY$9 = "." + DATA_KEY$9; var DATA_API_KEY$7 = '.data-api'; @@ -4196,7 +4180,7 @@ */ var NAME$a = 'toast'; - var VERSION$a = '4.5.0'; + var VERSION$a = '4.5.2'; var DATA_KEY$a = 'bs.toast'; var EVENT_KEY$a = "." + DATA_KEY$a; var JQUERY_NO_CONFLICT$a = $.fn[NAME$a]; @@ -4249,6 +4233,8 @@ return; } + this._clearTimeout(); + if (this._config.animation) { this._element.classList.add(CLASS_NAME_FADE$5); } @@ -4297,8 +4283,7 @@ }; _proto.dispose = function dispose() { - clearTimeout(this._timeout); - this._timeout = null; + this._clearTimeout(); if (this._element.classList.contains(CLASS_NAME_SHOW$7)) { this._element.classList.remove(CLASS_NAME_SHOW$7); @@ -4312,7 +4297,7 @@ ; _proto._getConfig = function _getConfig(config) { - config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$7), $(this._element).data()), typeof config === 'object' && config ? config : {}); + config = _extends({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {}); Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType); return config; }; @@ -4342,6 +4327,11 @@ } else { complete(); } + }; + + _proto._clearTimeout = function _clearTimeout() { + clearTimeout(this._timeout); + this._timeout = null; } // Static ; |