diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/alert.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/alert.js | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/alert.js b/vendor/twbs/bootstrap/js/dist/alert.js index 7a443da46..3c3b376cf 100644 --- a/vendor/twbs/bootstrap/js/dist/alert.js +++ b/vendor/twbs/bootstrap/js/dist/alert.js @@ -1,5 +1,5 @@ /*! - * Bootstrap alert.js v4.5.2 (https://getbootstrap.com/) + * Bootstrap alert.js v4.5.3 (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/main/LICENSE) */ @@ -9,8 +9,10 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util)); }(this, (function ($, Util) { 'use strict'; - $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; - Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util; + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var $__default = /*#__PURE__*/_interopDefaultLegacy($); + var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util); 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); } } @@ -22,11 +24,11 @@ */ var NAME = 'alert'; - var VERSION = '4.5.2'; + var VERSION = '4.5.3'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME]; var SELECTOR_DISMISS = '[data-dismiss="alert"]'; var EVENT_CLOSE = "close" + EVENT_KEY; var EVENT_CLOSED = "closed" + EVENT_KEY; @@ -66,13 +68,13 @@ }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); + $__default['default'].removeData(this._element, DATA_KEY); this._element = null; } // Private ; _proto._getRootElement = function _getRootElement(element) { - var selector = Util.getSelectorFromElement(element); + var selector = Util__default['default'].getSelectorFromElement(element); var parent = false; if (selector) { @@ -80,43 +82,43 @@ } if (!parent) { - parent = $(element).closest("." + CLASS_NAME_ALERT)[0]; + parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0]; } return parent; }; _proto._triggerCloseEvent = function _triggerCloseEvent(element) { - var closeEvent = $.Event(EVENT_CLOSE); - $(element).trigger(closeEvent); + var closeEvent = $__default['default'].Event(EVENT_CLOSE); + $__default['default'](element).trigger(closeEvent); return closeEvent; }; _proto._removeElement = function _removeElement(element) { var _this = this; - $(element).removeClass(CLASS_NAME_SHOW); + $__default['default'](element).removeClass(CLASS_NAME_SHOW); - if (!$(element).hasClass(CLASS_NAME_FADE)) { + if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) { this._destroyElement(element); return; } - var transitionDuration = Util.getTransitionDurationFromElement(element); - $(element).one(Util.TRANSITION_END, function (event) { + var transitionDuration = Util__default['default'].getTransitionDurationFromElement(element); + $__default['default'](element).one(Util__default['default'].TRANSITION_END, function (event) { return _this._destroyElement(element, event); }).emulateTransitionEnd(transitionDuration); }; _proto._destroyElement = function _destroyElement(element) { - $(element).detach().trigger(EVENT_CLOSED).remove(); + $__default['default'](element).detach().trigger(EVENT_CLOSED).remove(); } // Static ; Alert._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var $element = $(this); + var $element = $__default['default'](this); var data = $element.data(DATA_KEY); if (!data) { @@ -156,18 +158,18 @@ */ - $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert())); + $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert())); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ - $.fn[NAME] = Alert._jQueryInterface; - $.fn[NAME].Constructor = Alert; + $__default['default'].fn[NAME] = Alert._jQueryInterface; + $__default['default'].fn[NAME].Constructor = Alert; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $__default['default'].fn[NAME].noConflict = function () { + $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT; return Alert._jQueryInterface; }; |