assets/javascripts/bootstrap/popover.js in bootstrap-5.0.0 vs assets/javascripts/bootstrap/popover.js in bootstrap-5.0.1

- old
+ new

@@ -1,29 +1,22 @@ /*! - * Bootstrap popover.js v5.0.0 (https://getbootstrap.com/) + * Bootstrap popover.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) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); -}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./tooltip.js')) : + typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './tooltip'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Data, global.Tooltip)); +}(this, (function (SelectorEngine, Data, Tooltip) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine); + var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); - /** - * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0): util/index.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - * -------------------------------------------------------------------------- - */ - const getjQuery = () => { const { jQuery } = window; @@ -40,16 +33,17 @@ } else { callback(); } }; - 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; $.fn[name].noConflict = () => { @@ -60,11 +54,11 @@ }); }; /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0): popover.js + * Bootstrap (v5.0.1): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ @@ -117,22 +111,14 @@ static get NAME() { return NAME; } - static get DATA_KEY() { - return DATA_KEY; - } - static get Event() { return Event; } - static get EVENT_KEY() { - return EVENT_KEY; - } - static get DefaultType() { return DefaultType; } // Overrides @@ -159,11 +145,11 @@ _addAttachmentClass(attachment) { this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`); } _getContent() { - return this._element.getAttribute('data-bs-content') || this.config.content; + return this._element.getAttribute('data-bs-content') || this._config.content; } _cleanTipClass() { const tip = this.getTipElement(); const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX); @@ -206,10 +192,10 @@ * ------------------------------------------------------------------------ * add .Popover to jQuery only if jQuery is present */ - defineJQueryPlugin(NAME, Popover); + defineJQueryPlugin(Popover); return Popover; })));