diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/util/component-functions.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/util/component-functions.js | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/util/component-functions.js b/vendor/twbs/bootstrap/js/dist/util/component-functions.js index 24100305d..27e555d78 100644 --- a/vendor/twbs/bootstrap/js/dist/util/component-functions.js +++ b/vendor/twbs/bootstrap/js/dist/util/component-functions.js @@ -1,47 +1,41 @@ /*! - * Bootstrap component-functions.js v5.2.2 (https://getbootstrap.com/) + * Bootstrap component-functions.js v5.3.0-alpha1 (https://getbootstrap.com/) * Copyright 2011-2022 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' ? factory(exports, require('../dom/event-handler'), require('./index')) : - typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', './index'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.Index)); -})(this, (function (exports, EventHandler, index) { 'use strict'; - - const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e }; - - const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('../dom/event-handler.js'), require('./index.js'), require('../dom/selector-engine.js')) : + typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', './index', '../dom/selector-engine'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.Index, global.SelectorEngine)); +})(this, (function (exports, EventHandler, index_js, SelectorEngine) { 'use strict'; /** * -------------------------------------------------------------------------- - * Bootstrap (v5.2.2): util/component-functions.js + * Bootstrap (v5.3.0-alpha1): util/component-functions.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ - const enableDismissTrigger = (component, method = 'hide') => { const clickEvent = `click.dismiss${component.EVENT_KEY}`; const name = component.NAME; - EventHandler__default.default.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { + EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { if (['A', 'AREA'].includes(this.tagName)) { event.preventDefault(); } - - if (index.isDisabled(this)) { + if (index_js.isDisabled(this)) { return; } + const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`); + const instance = component.getOrCreateInstance(target); - const target = index.getElementFromSelector(this) || this.closest(`.${name}`); - const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method - + // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method instance[method](); }); }; exports.enableDismissTrigger = enableDismissTrigger; - Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); + Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); })); //# sourceMappingURL=component-functions.js.map |