-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.npmignore | ||
.nyc_output | ||
package-lock.json | ||
node_modules | ||
|
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"use strict";const s=require("./base-component-CEXwoid1.js"),u=require("./fadeClass-Co6nOzNJ.js"),r=require("./showClass-D_Ms1FgG.js"),g=require("./dataBsDismiss-CMHF7If_.js"),h=require("./isDisabled-CST_xG4K.js"),o="alert",a="Alert",p=`.${o}`,v=`[${g.dataBsDismiss}="${o}"]`,C=e=>s.to(e,a),E=e=>new d(e),c=s.mo(`close.bs.${o}`),q=s.mo(`closed.bs.${o}`),l=e=>{const{element:t}=e;s.q(t,q),e._toggleEventListeners(),e.dispose(),t.remove()};class d extends s.BaseComponent{static selector=p;static init=E;static getInstance=C;dismiss;constructor(t){super(t),this.dismiss=s.Ro(v,this.element),this._toggleEventListeners(!0)}get name(){return a}close=t=>{const{element:n,dismiss:i}=this;!n||!s.Zn(n,r.showClass)||t&&i&&h.isDisabled(i)||(s.q(n,c),!c.defaultPrevented&&(s.Yn(n,r.showClass),s.Zn(n,u.fadeClass)?s.so(n,()=>l(this)):l(this)))};_toggleEventListeners=t=>{const n=t?s.E:s.r,{dismiss:i,close:m}=this;i&&n(i,s.vt,m)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=d; | ||
"use strict";const s=require("./base-component-4K-5H-MO.js"),u=require("./fadeClass-Co6nOzNJ.js"),r=require("./showClass-D_Ms1FgG.js"),g=require("./dataBsDismiss-CMHF7If_.js"),h=require("./isDisabled-BFPGF6I2.js"),o="alert",a="Alert",p=`.${o}`,C=`[${g.dataBsDismiss}="${o}"]`,v=e=>s.Xn(e,a),E=e=>new d(e),c=s.po(`close.bs.${o}`),b=s.po(`closed.bs.${o}`),l=e=>{const{element:t}=e;s.G(t,b),e._toggleEventListeners(),e.dispose(),t.remove()};class d extends s.BaseComponent{static selector=p;static init=E;static getInstance=v;dismiss;constructor(t){super(t),this.dismiss=s.Ho(C,this.element),this._toggleEventListeners(!0)}get name(){return a}close=t=>{const{element:n,dismiss:i}=this;!n||!s.Gn(n,r.showClass)||t&&i&&h.isDisabled(i)||(s.G(n,c),!c.defaultPrevented&&(s.qn(n,r.showClass),s.Gn(n,u.fadeClass)?s.no(n,()=>l(this)):l(this)))};_toggleEventListeners=t=>{const n=t?s.E:s.r,{dismiss:i,close:m}=this;i&&n(i,s.gt,m)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=d; | ||
//# sourceMappingURL=alert.cjs.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,43 @@ | ||
import { B as f, R as g, Z as i, q as c, Y as u, s as v, t as h, m, E, r as A, v as C } from "./base-component-DAxvn9am.mjs"; | ||
import { B as g, H as f, G as i, a as c, q as u, n as h, X as v, p as m, E, r as A, g as C } from "./base-component-LaJIjMhh.mjs"; | ||
import { f as $ } from "./fadeClass-CLIYI_zn.mjs"; | ||
import { s as r } from "./showClass-C8hdJfjQ.mjs"; | ||
import { d as b } from "./dataBsDismiss-DdNPQYa-.mjs"; | ||
import { i as L } from "./isDisabled-DRrRkHiq.mjs"; | ||
const n = "alert", d = "Alert", _ = `.${n}`, B = `[${b}="${n}"]`, D = (s) => h(s, d), I = (s) => new w(s), a = m( | ||
`close.bs.${n}` | ||
), S = m( | ||
`closed.bs.${n}` | ||
import { i as L } from "./isDisabled-DmmaKYeZ.mjs"; | ||
const o = "alert", d = "Alert", _ = `.${o}`, B = `[${b}="${o}"]`, D = (s) => v(s, d), G = (s) => new S(s), a = m( | ||
`close.bs.${o}` | ||
), I = m( | ||
`closed.bs.${o}` | ||
), l = (s) => { | ||
const { element: t } = s; | ||
c(t, S), s._toggleEventListeners(), s.dispose(), t.remove(); | ||
c(t, I), s._toggleEventListeners(), s.dispose(), t.remove(); | ||
}; | ||
class w extends f { | ||
class S extends g { | ||
static selector = _; | ||
static init = I; | ||
static init = G; | ||
static getInstance = D; | ||
dismiss; | ||
constructor(t) { | ||
super(t), this.dismiss = g( | ||
super(t), this.dismiss = f( | ||
B, | ||
this.element | ||
), this._toggleEventListeners(!0); | ||
} | ||
get name() { | ||
return d; | ||
} | ||
/** | ||
* Public method that hides the `.alert` element from the user, | ||
* disposes the instance once animation is complete, then | ||
* removes the element from the DOM. | ||
*/ | ||
close = (t) => { | ||
const { element: e, dismiss: o } = this; | ||
!e || !i(e, r) || t && o && L(o) || (c(e, a), !a.defaultPrevented && (u(e, r), i(e, $) ? v(e, () => l(this)) : l(this))); | ||
const { element: e, dismiss: n } = this; | ||
!e || !i(e, r) || t && n && L(n) || (c(e, a), !a.defaultPrevented && (u(e, r), i(e, $) ? h(e, () => l(this)) : l(this))); | ||
}; | ||
/** | ||
* Toggle on / off the `click` event listener. | ||
* | ||
* @param add when `true`, event listener is added | ||
*/ | ||
_toggleEventListeners = (t) => { | ||
const e = t ? E : A, { dismiss: o, close: p } = this; | ||
o && e(o, C, p); | ||
const e = t ? E : A, { dismiss: n, close: p } = this; | ||
n && e(n, C, p); | ||
}; | ||
dispose() { | ||
this._toggleEventListeners(), super.dispose(); | ||
} | ||
} | ||
export { | ||
w as default | ||
S as default | ||
}; | ||
//# sourceMappingURL=alert.mjs.map |