0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00
Bootstrap/js/dist/base-component.js.map
2021-02-11 17:22:18 +02:00

1 line
1.8 KiB
Plaintext

{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta2): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta2'\n\nclass BaseComponent {\n constructor(element) {\n if (!element) {\n return\n }\n\n this._element = element\n Data.setData(element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.removeData(this._element, this.constructor.DATA_KEY)\n this._element = null\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.getData(element, this.DATA_KEY)\n }\n\n static get VERSION() {\n return VERSION\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","element","_element","Data","setData","constructor","DATA_KEY","dispose","removeData","getInstance","getData"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,OAAO,GAAG,aAAhB;;MAEMC;EACJ,yBAAYC,OAAZ,EAAqB;EACnB,QAAI,CAACA,OAAL,EAAc;EACZ;EACD;;EAED,SAAKC,QAAL,GAAgBD,OAAhB;EACAE,IAAAA,wBAAI,CAACC,OAAL,CAAaH,OAAb,EAAsB,KAAKI,WAAL,CAAiBC,QAAvC,EAAiD,IAAjD;EACD;;;;WAEDC,UAAA,mBAAU;EACRJ,IAAAA,wBAAI,CAACK,UAAL,CAAgB,KAAKN,QAArB,EAA+B,KAAKG,WAAL,CAAiBC,QAAhD;EACA,SAAKJ,QAAL,GAAgB,IAAhB;EACD;EAED;;;kBAEOO,cAAP,qBAAmBR,OAAnB,EAA4B;EAC1B,WAAOE,wBAAI,CAACO,OAAL,CAAaT,OAAb,EAAsB,KAAKK,QAA3B,CAAP;EACD;;;;WAED,eAAqB;EACnB,aAAOP,OAAP;EACD;;;;;;;;;;;;"}