CoreFiles by mySites.guru
alert.min.js1 lines, 1,631 bytes, from Joomla_4.0.0-rc2-Release_Candidate-Full_Package.zip
Raw History Compare with 4.0.0-rc1
md5
7fa682d53eb24b76e76b1b6d309a9795
sha1
fb3630259ce3f892041a7261867cf412e65cf7e9
sha256
6de62896cafdc8d6ef34c4487a33bcfd98070450f4c1272ebeae3394bfc92ef5
import{B as BaseComponent,g as getElementFromSelector,E as EventHandler,D as Data,d as defineJQueryPlugin}from"./dom.min.js?1623769888";const NAME="alert",DATA_KEY="bs.alert",EVENT_KEY=".bs.alert",DATA_API_KEY=".data-api",SELECTOR_DISMISS='[data-bs-dismiss="alert"]',EVENT_CLOSE="close.bs.alert",EVENT_CLOSED="closed.bs.alert",EVENT_CLICK_DATA_API="click.bs.alert.data-api",CLASS_NAME_ALERT="alert",CLASS_NAME_FADE="fade",CLASS_NAME_SHOW="show";class Alert extends BaseComponent{static get NAME(){return NAME}close(e){const t=e?this._getRootElement(e):this._element,r=this._triggerCloseEvent(t);null===r||r.defaultPrevented||this._removeElement(t)}_getRootElement(e){return getElementFromSelector(e)||e.closest(".alert")}_triggerCloseEvent(e){return EventHandler.trigger(e,EVENT_CLOSE)}_removeElement(e){e.classList.remove("show");const t=e.classList.contains("fade");this._queueCallback((()=>this._destroyElement(e)),e,t)}_destroyElement(e){e.parentNode&&e.parentNode.removeChild(e),EventHandler.trigger(e,EVENT_CLOSED)}static jQueryInterface(e){return this.each((function(){let t=Data.get(this,DATA_KEY);t||(t=new Alert(this)),"close"===e&&t[e](this)}))}static handleDismiss(e){return function(t){t&&t.preventDefault(),e.close(this)}}}if(EventHandler.on(document,EVENT_CLICK_DATA_API,SELECTOR_DISMISS,Alert.handleDismiss(new Alert)),defineJQueryPlugin(Alert),window.bootstrap=window.bootstrap||{},window.bootstrap.Alert=Alert,Joomla&&Joomla.getOptions){const e=Joomla.getOptions("bootstrap.alert");e&&e.length&&e.forEach((e=>{Array.from(document.querySelectorAll(e)).map((e=>new window.bootstrap.Alert(e)))}))}export{Alert as A};

No other release has this exact content. See every version of this file.