diff options
author | Mark Otto <markdotto@gmail.com> | 2016-10-27 19:51:22 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2016-10-27 19:51:22 +0300 |
commit | 9dbfc90eae7b1eda2b0e0b501a7e223d0cce688c (patch) | |
tree | 12614406d4259c56cadf1c3f46b21ab93c67c551 /js/dist | |
parent | a26080c04723e23da352e8115a108130725faff2 (diff) |
grunt
Diffstat (limited to 'js/dist')
-rw-r--r-- | js/dist/alert.js | 4 | ||||
-rw-r--r-- | js/dist/alert.js.map | 2 | ||||
-rw-r--r-- | js/dist/collapse.js | 18 | ||||
-rw-r--r-- | js/dist/collapse.js.map | 2 | ||||
-rw-r--r-- | js/dist/dropdown.js | 12 | ||||
-rw-r--r-- | js/dist/dropdown.js.map | 2 | ||||
-rw-r--r-- | js/dist/modal.js | 10 | ||||
-rw-r--r-- | js/dist/modal.js.map | 2 | ||||
-rw-r--r-- | js/dist/popover.js | 4 | ||||
-rw-r--r-- | js/dist/popover.js.map | 2 | ||||
-rw-r--r-- | js/dist/tab.js | 10 | ||||
-rw-r--r-- | js/dist/tab.js.map | 2 | ||||
-rw-r--r-- | js/dist/tooltip.js | 22 | ||||
-rw-r--r-- | js/dist/tooltip.js.map | 2 |
14 files changed, 47 insertions, 47 deletions
diff --git a/js/dist/alert.js b/js/dist/alert.js index fc3d6f3a68..6c70501fc8 100644 --- a/js/dist/alert.js +++ b/js/dist/alert.js @@ -38,7 +38,7 @@ var Alert = function ($) { var ClassName = { ALERT: 'alert', FADE: 'fade', - IN: 'in' + ACTIVE: 'active' }; /** @@ -101,7 +101,7 @@ var Alert = function ($) { }; Alert.prototype._removeElement = function _removeElement(element) { - $(element).removeClass(ClassName.IN); + $(element).removeClass(ClassName.ACTIVE); if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { this._destroyElement(element); diff --git a/js/dist/alert.js.map b/js/dist/alert.js.map index de5dca95e2..6a366001d7 100644 --- a/js/dist/alert.js.map +++ b/js/dist/alert.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/alert.js"],"names":["Alert","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Selector","DISMISS","Event","CLOSE","CLOSED","CLICK_DATA_API","ClassName","ALERT","FADE","IN","element","_element","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","selector","Util","getSelectorFromElement","parent","closest","closeEvent","trigger","removeClass","supportsTransitionEnd","hasClass","_destroyElement","one","TRANSITION_END","proxy","emulateTransitionEnd","detach","remove","_jQueryInterface","config","each","$element","data","_handleDismiss","alertInstance","event","preventDefault","document","on","Constructor","noConflict","jQuery"],"mappings":";;;;AAGA;;;;;;;AAOA,IAAMA,QAAS,UAACC,CAAD,EAAO;;AAGpB;;;;;;AAMA,MAAMC,OAAsB,OAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,UAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,eAAsB,WAA5B;AACA,MAAMC,qBAAsBN,EAAEO,EAAF,CAAKN,IAAL,CAA5B;AACA,MAAMO,sBAAsB,GAA5B;;AAEA,MAAMC,WAAW;AACfC,aAAU;AADK,GAAjB;;AAIA,MAAMC,QAAQ;AACZC,qBAAyBR,SADb;AAEZS,uBAA0BT,SAFd;AAGZU,8BAAyBV,SAAzB,GAAqCC;AAHzB,GAAd;;AAMA,MAAMU,YAAY;AAChBC,WAAQ,OADQ;AAEhBC,UAAQ,MAFQ;AAGhBC,QAAQ;AAHQ,GAAlB;;AAOA;;;;;;AAlCoB,MAwCdnB,KAxCc;AA0ClB,mBAAYoB,OAAZ,EAAqB;AAAA;;AACnB,WAAKC,QAAL,GAAgBD,OAAhB;AACD;;AAGD;;AAOA;;AAtDkB,oBAwDlBE,KAxDkB,kBAwDZF,OAxDY,EAwDH;AACbA,gBAAUA,WAAW,KAAKC,QAA1B;;AAEA,UAAIE,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CAAKN,IAAL,EAAWyD,WAAX,GAAyB3D,KAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAW0D,UAAX,GAAyB,YAAY;AACnC3D,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,MAAMgD,gBAAb;AACD,GAHD;;AAKA,SAAOhD,KAAP;AAED,CApLa,CAoLX6D,MApLW,CAAd","file":"alert.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Alert = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'alert'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.alert'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n }\n\n const Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n IN : 'in'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n close(element) {\n element = element || this._element\n\n let rootElement = this._getRootElement(element)\n let customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n\n // private\n\n _getRootElement(element) {\n let selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n let closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.IN)\n\n if (!Util.supportsTransitionEnd() ||\n !$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n $(element)\n .one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element))\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n )\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Alert._jQueryInterface\n $.fn[NAME].Constructor = Alert\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n }\n\n return Alert\n\n})(jQuery)\n\nexport default Alert\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/alert.js"],"names":["Alert","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Selector","DISMISS","Event","CLOSE","CLOSED","CLICK_DATA_API","ClassName","ALERT","FADE","ACTIVE","element","_element","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","selector","Util","getSelectorFromElement","parent","closest","closeEvent","trigger","removeClass","supportsTransitionEnd","hasClass","_destroyElement","one","TRANSITION_END","proxy","emulateTransitionEnd","detach","remove","_jQueryInterface","config","each","$element","data","_handleDismiss","alertInstance","event","preventDefault","document","on","Constructor","noConflict","jQuery"],"mappings":";;;;AAGA;;;;;;;AAOA,IAAMA,QAAS,UAACC,CAAD,EAAO;;AAGpB;;;;;;AAMA,MAAMC,OAAsB,OAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,UAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,eAAsB,WAA5B;AACA,MAAMC,qBAAsBN,EAAEO,EAAF,CAAKN,IAAL,CAA5B;AACA,MAAMO,sBAAsB,GAA5B;;AAEA,MAAMC,WAAW;AACfC,aAAU;AADK,GAAjB;;AAIA,MAAMC,QAAQ;AACZC,qBAAyBR,SADb;AAEZS,uBAA0BT,SAFd;AAGZU,8BAAyBV,SAAzB,GAAqCC;AAHzB,GAAd;;AAMA,MAAMU,YAAY;AAChBC,WAAS,OADO;AAEhBC,UAAS,MAFO;AAGhBC,YAAS;AAHO,GAAlB;;AAOA;;;;;;AAlCoB,MAwCdnB,KAxCc;AA0ClB,mBAAYoB,OAAZ,EAAqB;AAAA;;AACnB,WAAKC,QAAL,GAAgBD,OAAhB;AACD;;AAGD;;AAOA;;AAtDkB,oBAwDlBE,KAxDkB,kBAwDZF,OAxDY,EAwDH;AACbA,gBAAUA,WAAW,KAAKC,QAA1B;;AAEA,UAAIE,cAAc,KAAKC,eAAL,CAAqBJ,OAArB,CAAlB;AACA,UAAIK,cAAc,KAAKC,kBAAL,CAAwBH,WAAxB,CAAlB;;AAEA,UAAIE,YAAYE,kBAAZ,EAAJ,EAAsC;AACpC;AACD;;AAED,WAAK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P,MAAMgD,gBAAb;AACD,GAHD;;AAKA,SAAOhD,KAAP;AAED,CApLa,CAoLX6D,MApLW,CAAd","file":"alert.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Alert = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'alert'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.alert'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n }\n\n const Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n ACTIVE : 'active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n close(element) {\n element = element || this._element\n\n let rootElement = this._getRootElement(element)\n let customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n\n // private\n\n _getRootElement(element) {\n let selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n let closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.ACTIVE)\n\n if (!Util.supportsTransitionEnd() ||\n !$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n $(element)\n .one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element))\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n )\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Alert._jQueryInterface\n $.fn[NAME].Constructor = Alert\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n }\n\n return Alert\n\n})(jQuery)\n\nexport default Alert\n"]}
\ No newline at end of file diff --git a/js/dist/collapse.js b/js/dist/collapse.js index d1e641e914..f4a25a11ca 100644 --- a/js/dist/collapse.js +++ b/js/dist/collapse.js @@ -46,7 +46,7 @@ var Collapse = function ($) { }; var ClassName = { - IN: 'in', + ACTIVE: 'active', COLLAPSE: 'collapse', COLLAPSING: 'collapsing', COLLAPSED: 'collapsed' @@ -58,7 +58,7 @@ var Collapse = function ($) { }; var Selector = { - ACTIVES: '.card > .in, .card > .collapsing', + ACTIVES: '.card > .active, .card > .collapsing', DATA_TOGGLE: '[data-toggle="collapse"]' }; @@ -93,7 +93,7 @@ var Collapse = function ($) { // public Collapse.prototype.toggle = function toggle() { - if ($(this._element).hasClass(ClassName.IN)) { + if ($(this._element).hasClass(ClassName.ACTIVE)) { this.hide(); } else { this.show(); @@ -103,7 +103,7 @@ var Collapse = function ($) { Collapse.prototype.show = function show() { var _this = this; - if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { + if (this._isTransitioning || $(this._element).hasClass(ClassName.ACTIVE)) { return; } @@ -111,7 +111,7 @@ var Collapse = function ($) { var activesData = void 0; if (this._parent) { - actives = $.makeArray($(Selector.ACTIVES)); + actives = $.makeArray($(this._parent).find(Selector.ACTIVES)); if (!actives.length) { actives = null; } @@ -151,7 +151,7 @@ var Collapse = function ($) { this.setTransitioning(true); var complete = function complete() { - $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); + $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.ACTIVE); _this._element.style[dimension] = ''; @@ -176,7 +176,7 @@ var Collapse = function ($) { Collapse.prototype.hide = function hide() { var _this2 = this; - if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { + if (this._isTransitioning || !$(this._element).hasClass(ClassName.ACTIVE)) { return; } @@ -193,7 +193,7 @@ var Collapse = function ($) { Util.reflow(this._element); - $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.ACTIVE); this._element.setAttribute('aria-expanded', false); @@ -261,7 +261,7 @@ var Collapse = function ($) { Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { if (element) { - var isOpen = $(element).hasClass(ClassName.IN); + var isOpen = $(element).hasClass(ClassName.ACTIVE); element.setAttribute('aria-expanded', isOpen); if (triggerArray.length) { diff --git a/js/dist/collapse.js.map b/js/dist/collapse.js.map index 43fb395b70..d92f5a0c91 100644 --- a/js/dist/collapse.js.map +++ b/js/dist/collapse.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/collapse.js"],"names":["Collapse","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Default","toggle","parent","DefaultType","Event","SHOW","SHOWN","HIDE","HIDDEN","CLICK_DATA_API","ClassName","IN","COLLAPSE","COLLAPSING","COLLAPSED","Dimension","WIDTH","HEIGHT","Selector","ACTIVES","DATA_TOGGLE","element","config","_isTransitioning","_element","_config","_getConfig","_triggerArray","makeArray","id","_parent","_getParent","_addAriaAndCollapsedClass","hasClass","hide","show","actives","activesData","length","data","startEvent","trigger","isDefaultPrevented","_jQueryInterface","call","dimension","_getDimension","removeClass","addClass","style","setAttribute","attr","setTransitioning","complete","Util","supportsTransitionEnd","capitalizedDimension","toUpperCase","slice","scrollSize","one","TRANSITION_END","emulateTransitionEnd","offsetDimension","reflow","isTransitioning","dispose","removeData","extend","Boolean","typeCheckConfig","hasWidth","selector","find","each","i","_getTargetFromElement","triggerArray","isOpen","toggleClass","getSelectorFromElement","$this","test","undefined","Error","document","on","event","preventDefault","target","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAGA;;;;;;;AAOA,IAAMA,WAAY,UAACC,CAAD,EAAO;;AAGvB;;;;;;AAMA,MAAMC,OAAsB,UAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,aAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,eAAsB,WAA5B;AACA,MAAMC,qBAAsBN,EAAEO,EAAF,CAAKN,IAAL,CAA5B;AACA,MAAMO,sBAAsB,GAA5B;;AAEA,MAAMC,UAAU;AACdC,YAAS,IADK;AAEdC,YAAS;AAFK,GAAhB;;AAKA,MAAMC,cAAc;AAClBF,YAAS,SADS;AAElBC,YAAS;AAFS,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CAAW7C,QAAX,EAAqB6C,IAArB;AACD;;AAED,YAAI,OAAOjB,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,cAAIiB,KAAKjB,MAAL,MAAiB6D,SAArB,EAAgC;AAC9B,kBAAM,IAAIC,KAAJ,uBAA8B9D,MAA9B,OAAN;AACD;AACDiB,eAAKjB,MAAL;AACD;AACF,OAzBM,CAAP;AA0BD,KA3UoB;;AAAA;AAAA;AAAA,0BAoFA;AACnB,eAAO7B,OAAP;AACD;AAtFoB;AAAA;AAAA,0BAwFA;AACnB,eAAOO,OAAP;AACD;AA1FoB;;AAAA;AAAA;;AAgVvB;;;;;;AAMAT,IAAE8F,QAAF,EAAYC,EAAZ,CAAelF,MAAMK,cAArB,EAAqCS,SAASE,WAA9C,EAA2D,UAAUmE,KAAV,EAAiB;AAC1EA,UAAMC,cAAN;;AAEA,QAAIC,SAASnG,SAASsF,qBAAT,CAA+B,IAA/B,CAAb;AACA,QAAIrC,OAAShD,EAAEkG,MAAF,EAAUlD,IAAV,CAAe7C,QAAf,CAAb;AACA,QAAI4B,SAASiB,OAAO,QAAP,GAAkBhD,EAAE,IAAF,EAAQgD,IAAR,EAA/B;;AAEAjD,aAASqD,gBAAT,CAA0BC,IAA1B,CAA+BrD,EAAEkG,MAAF,CAA/B,EAA0CnE,MAA1C;AACD,GARD;;AAWA;;;;;;AAMA/B,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,SAASqD,gBAAlC;AACApD,IAAEO,EAAF,CAAKN,IAAL,EAAWkG,WAAX,GAAyBpG,QAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWmG,UAAX,GAAyB,YAAY;AACnCpG,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,SAASqD,gBAAhB;AACD,GAHD;;AAKA,SAAOrD,QAAP;AAED,CAhXgB,CAgXdsG,MAhXc,CAAjB","file":"collapse.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : 'string'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n IN : 'in',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.card > .in, .card > .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.IN)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray($(Selector.ACTIVES))\n if (!actives.length) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n let startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n let dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n this._element.setAttribute('aria-expanded', true)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.IN)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n let capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n let scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n let dimension = this._getDimension()\n let offsetDimension = dimension === Dimension.WIDTH ?\n 'offsetWidth' : 'offsetHeight'\n\n this._element.style[dimension] = `${this._element[offsetDimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.IN)\n\n this._element.setAttribute('aria-expanded', false)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n config.toggle = Boolean(config.toggle) // coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n let hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = $(this._config.parent)[0]\n let selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n let isOpen = $(element).hasClass(ClassName.IN)\n element.setAttribute('aria-expanded', isOpen)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n\n // static\n\n static _getTargetFromElement(element) {\n let selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n let _config = $.extend(\n {},\n Default,\n $this.data(),\n typeof config === 'object' && config\n )\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n let target = Collapse._getTargetFromElement(this)\n let data = $(target).data(DATA_KEY)\n let config = data ? 'toggle' : $(this).data()\n\n Collapse._jQueryInterface.call($(target), config)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n\n})(jQuery)\n\nexport default Collapse\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/collapse.js"],"names":["Collapse","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Default","toggle","parent","DefaultType","Event","SHOW","SHOWN","HIDE","HIDDEN","CLICK_DATA_API","ClassName","ACTIVE","COLLAPSE","COLLAPSING","COLLAPSED","Dimension","WIDTH","HEIGHT","Selector","ACTIVES","DATA_TOGGLE","element","config","_isTransitioning","_element","_config","_getConfig","_triggerArray","makeArray","id","_parent","_getParent","_addAriaAndCollapsedClass","hasClass","hide","show","actives","activesData","find","length","data","startEvent","trigger","isDefaultPrevented","_jQueryInterface","call","dimension","_getDimension","removeClass","addClass","style","setAttribute","attr","setTransitioning","complete","Util","supportsTransitionEnd","capitalizedDimension","toUpperCase","slice","scrollSize","one","TRANSITION_END","emulateTransitionEnd","offsetDimension","reflow","isTransitioning","dispose","removeData","extend","Boolean","typeCheckConfig","hasWidth","selector","each","i","_getTargetFromElement","triggerArray","isOpen","toggleClass","getSelectorFromElement","$this","test","undefined","Error","document","on","event","preventDefault","target","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAGA;;;;;;;AAOA,IAAMA,WAAY,UAACC,CAAD,EAAO;;AAGvB;;;;;;AAMA,MAAMC,OAAsB,UAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,aAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,eAAsB,WAA5B;AACA,MAAMC,qBAAsBN,EAAEO,EAAF,CAAKN,IAAL,CAA5B;AACA,MAAMO,sBAAsB,GAA5B;;AAEA,MAAMC,UAAU;AACdC,YAAS,IADK;AAEdC,YAAS;AAFK,GAAhB;;AAKA,MAAMC,cAAc;AAClBF,YAAS,SADS;AAElBC,YAAS;AAFS,GAApB;;AAKA,MAAME,QAAQ;AACZC,mBAAwBV,SADZ;AAEZW,qBAAyBX,SAFb;AAGZY,mBAAwBZ,SAHZ;AAIZa,uBAA0Bb,SAJd;AAKZc,8BAAyBd,SAAzB,GAAqCC;AALzB,GAAd;;AAQA,MAAMc,YAAY;AAChBC,YAAa,QADG;AAEhBC,cAAa,UAFG;AAGhBC,gBAAa,YAHG;AAIhBC,eAAa;AAJG,GAAlB;;AAOA,MAAMC,YAAY;AAChBC,WAAS,OADO;AAEhBC,YAAS;AAFO,GAAlB;;AAKA,MAAMC,WAAW;AACfC,aAAc,sCADC;AAEfC,iBAAc;AAFC,GAAjB;;AAMA;;;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AAAA;;AAgVvB;;;;;;AAMAT,IAAE8F,QAAF,EAAYC,EAAZ,CAAelF,MAAMK,cAArB,EAAqCS,SAASE,WAA9C,EAA2D,UAAUmE,KAAV,EAAiB;AAC1EA,UAAMC,cAAN;;AAEA,QAAIC,SAASnG,SAASsF,qBAAT,CAA+B,IAA/B,CAAb;AACA,QAAIpC,OAASjD,EAAEkG,MAAF,EAAUjD,IAAV,CAAe9C,QAAf,CAAb;AACA,QAAI4B,SAASkB,OAAO,QAAP,GAAkBjD,EAAE,IAAF,EAAQiD,IAAR,EAA/B;;AAEAlD,aAASsD,gBAAT,CAA0BC,IAA1B,CAA+BtD,EAAEkG,MAAF,CAA/B,EAA0CnE,MAA1C;AACD,GARD;;AAWA;;;;;;AAMA/B,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,SAASsD,gBAAlC;AACArD,IAAEO,EAAF,CAAKN,IAAL,EAAWkG,WAAX,GAAyBpG,QAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWmG,UAAX,GAAyB,YAAY;AACnCpG,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,SAASsD,gBAAhB;AACD,GAHD;;AAKA,SAAOtD,QAAP;AAED,CAhXgB,CAgXdsG,MAhXc,CAAjB","file":"collapse.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : 'string'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n ACTIVE : 'active',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.card > .active, .card > .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.ACTIVE)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.ACTIVE)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray($(this._parent).find(Selector.ACTIVES))\n if (!actives.length) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n let startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n let dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n this._element.setAttribute('aria-expanded', true)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.ACTIVE)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n let capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n let scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.ACTIVE)) {\n return\n }\n\n let startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n let dimension = this._getDimension()\n let offsetDimension = dimension === Dimension.WIDTH ?\n 'offsetWidth' : 'offsetHeight'\n\n this._element.style[dimension] = `${this._element[offsetDimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.ACTIVE)\n\n this._element.setAttribute('aria-expanded', false)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n config.toggle = Boolean(config.toggle) // coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n let hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = $(this._config.parent)[0]\n let selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n let isOpen = $(element).hasClass(ClassName.ACTIVE)\n element.setAttribute('aria-expanded', isOpen)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n\n // static\n\n static _getTargetFromElement(element) {\n let selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n let _config = $.extend(\n {},\n Default,\n $this.data(),\n typeof config === 'object' && config\n )\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n let target = Collapse._getTargetFromElement(this)\n let data = $(target).data(DATA_KEY)\n let config = data ? 'toggle' : $(this).data()\n\n Collapse._jQueryInterface.call($(target), config)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n\n})(jQuery)\n\nexport default Collapse\n"]}
\ No newline at end of file diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js index b144cf6308..2470d67f1a 100644 --- a/js/dist/dropdown.js +++ b/js/dist/dropdown.js @@ -41,7 +41,7 @@ var Dropdown = function ($) { var ClassName = { BACKDROP: 'dropdown-backdrop', DISABLED: 'disabled', - OPEN: 'open' + ACTIVE: 'active' }; var Selector = { @@ -79,7 +79,7 @@ var Dropdown = function ($) { } var parent = Dropdown._getParentFromElement(this); - var isActive = $(parent).hasClass(ClassName.OPEN); + var isActive = $(parent).hasClass(ClassName.ACTIVE); Dropdown._clearMenus(); @@ -108,7 +108,7 @@ var Dropdown = function ($) { this.focus(); this.setAttribute('aria-expanded', 'true'); - $(parent).toggleClass(ClassName.OPEN); + $(parent).toggleClass(ClassName.ACTIVE); $(parent).trigger($.Event(Event.SHOWN, relatedTarget)); return false; @@ -161,7 +161,7 @@ var Dropdown = function ($) { var parent = Dropdown._getParentFromElement(toggles[i]); var relatedTarget = { relatedTarget: toggles[i] }; - if (!$(parent).hasClass(ClassName.OPEN)) { + if (!$(parent).hasClass(ClassName.ACTIVE)) { continue; } @@ -177,7 +177,7 @@ var Dropdown = function ($) { toggles[i].setAttribute('aria-expanded', 'false'); - $(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); + $(parent).removeClass(ClassName.ACTIVE).trigger($.Event(Event.HIDDEN, relatedTarget)); } }; @@ -205,7 +205,7 @@ var Dropdown = function ($) { } var parent = Dropdown._getParentFromElement(this); - var isActive = $(parent).hasClass(ClassName.OPEN); + var isActive = $(parent).hasClass(ClassName.ACTIVE); if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { diff --git a/js/dist/dropdown.js.map b/js/dist/dropdown.js.map index 4cc429e36f..044adde336 100644 --- a/js/dist/dropdown.js.map +++ b/js/dist/dropdown.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/dropdown.js"],"names":["Dropdown","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","ESCAPE_KEYCODE","ARROW_UP_KEYCODE","ARROW_DOWN_KEYCODE","RIGHT_MOUSE_BUTTON_WHICH","Event","HIDE","HIDDEN","SHOW","SHOWN","CLICK","CLICK_DATA_API","KEYDOWN_DATA_API","ClassName","BACKDROP","DISABLED","OPEN","Selector","DATA_TOGGLE","FORM_CHILD","ROLE_MENU","ROLE_LISTBOX","NAVBAR_NAV","VISIBLE_ITEMS","element","_element","_addEventListeners","toggle","disabled","hasClass","parent","_getParentFromElement","isActive","_clearMenus","document","documentElement","closest","length","dropdown","createElement","className","insertBefore","on","relatedTarget","showEvent","trigger","isDefaultPrevented","focus","setAttribute","toggleClass","dispose","removeData","off","_jQueryInterface","config","each","data","undefined","Error","call","event","which","backdrop","parentNode","removeChild","toggles","makeArray","i","type","test","target","tagName","contains","hideEvent","removeClass","selector","Util","getSelectorFromElement","_dataApiKeydownHandler","preventDefault","stopPropagation","find","items","filter","item","offsetWidth","offsetHeight","index","indexOf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D;;AAED,UAAIA,QAAQ,CAAZ,EAAe;AACbA,gBAAQ,CAAR;AACD;;AAEDL,YAAMK,KAAN,EAAaxC,KAAb;AACD,KA3PoB;;AAAA;AAAA;AAAA,0BAiEA;AACnB,eAAOpD,OAAP;AACD;AAnEoB;;AAAA;AAAA;;AAgQvB;;;;;;AAMAF,IAAEyC,QAAF,EACGQ,EADH,CACMrC,MAAMO,gBADZ,EAC8BK,SAASC,WADvC,EACqD1B,SAASsF,sBAD9D,EAEGpC,EAFH,CAEMrC,MAAMO,gBAFZ,EAE8BK,SAASG,SAFvC,EAEqD5B,SAASsF,sBAF9D,EAGGpC,EAHH,CAGMrC,MAAMO,gBAHZ,EAG8BK,SAASI,YAHvC,EAGqD7B,SAASsF,sBAH9D,EAIGpC,EAJH,CAIMrC,MAAMM,cAJZ,EAI4BnB,SAASyC,WAJrC,EAKGS,EALH,CAKMrC,MAAMM,cALZ,EAK4BM,SAASC,WALrC,EAKkD1B,SAASiG,SAAT,CAAmB9D,MALrE,EAMGe,EANH,CAMMrC,MAAMM,cANZ,EAM4BM,SAASE,UANrC,EAMiD,UAACuE,CAAD,EAAO;AACpDA,MAAEV,eAAF;AACD,GARH;;AAWA;;;;;;AAMAvF,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,SAAS6D,gBAAlC;AACA5D,IAAEO,EAAF,CAAKN,IAAL,EAAWiG,WAAX,GAAyBnG,QAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWkG,UAAX,GAAyB,YAAY;AACnCnG,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,SAAS6D,gBAAhB;AACD,GAHD;;AAKA,SAAO7D,QAAP;AAED,CAhSgB,CAgSdqG,MAhSc,CAAjB","file":"dropdown.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\n const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\n const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n BACKDROP : 'dropdown-backdrop',\n DISABLED : 'disabled',\n OPEN : 'open'\n }\n\n const Selector = {\n BACKDROP : '.dropdown-backdrop',\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n ROLE_MENU : '[role=\"menu\"]',\n ROLE_LISTBOX : '[role=\"listbox\"]',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '[role=\"menu\"] li:not(.disabled) a, '\n + '[role=\"listbox\"] li:not(.disabled) a'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n\n constructor(element) {\n this._element = element\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n toggle() {\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return false\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return false\n }\n\n if ('ontouchstart' in document.documentElement &&\n (!$(parent).closest(Selector.NAVBAR_NAV).length)) {\n\n // if mobile we use a backdrop because click events don't delegate\n let dropdown = document.createElement('div')\n dropdown.className = ClassName.BACKDROP\n $(dropdown).insertBefore(this)\n $(dropdown).on('click', Dropdown._clearMenus)\n }\n\n let relatedTarget = { relatedTarget : this }\n let showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return false\n }\n\n this.focus()\n this.setAttribute('aria-expanded', 'true')\n\n $(parent).toggleClass(ClassName.OPEN)\n $(parent).trigger($.Event(Event.SHOWN, relatedTarget))\n\n return false\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n }\n\n\n // private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, this.toggle)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n $(this).data(DATA_KEY, (data = new Dropdown(this)))\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config].call(this)\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {\n return\n }\n\n let backdrop = $(Selector.BACKDROP)[0]\n if (backdrop) {\n backdrop.parentNode.removeChild(backdrop)\n }\n\n let toggles = $.makeArray($(Selector.DATA_TOGGLE))\n\n for (let i = 0; i < toggles.length; i++) {\n let parent = Dropdown._getParentFromElement(toggles[i])\n let relatedTarget = { relatedTarget : toggles[i] }\n\n if (!$(parent).hasClass(ClassName.OPEN)) {\n continue\n }\n\n if (event && event.type === 'click' &&\n (/input|textarea/i.test(event.target.tagName)) &&\n ($.contains(parent, event.target))) {\n continue\n }\n\n let hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(parent)\n .removeClass(ClassName.OPEN)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n let selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n static _dataApiKeydownHandler(event) {\n if (!/(38|40|27|32)/.test(event.which) ||\n /input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n if ((!isActive && event.which !== ESCAPE_KEYCODE) ||\n (isActive && event.which === ESCAPE_KEYCODE)) {\n\n if (event.which === ESCAPE_KEYCODE) {\n let toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n let items = $.makeArray($(Selector.VISIBLE_ITEMS))\n\n items = items.filter((item) => {\n return item.offsetWidth || item.offsetHeight\n })\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler)\n .on(Event.CLICK_DATA_API, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle)\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n\n})(jQuery)\n\nexport default Dropdown\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/dropdown.js"],"names":["Dropdown","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","ESCAPE_KEYCODE","ARROW_UP_KEYCODE","ARROW_DOWN_KEYCODE","RIGHT_MOUSE_BUTTON_WHICH","Event","HIDE","HIDDEN","SHOW","SHOWN","CLICK","CLICK_DATA_API","KEYDOWN_DATA_API","ClassName","BACKDROP","DISABLED","ACTIVE","Selector","DATA_TOGGLE","FORM_CHILD","ROLE_MENU","ROLE_LISTBOX","NAVBAR_NAV","VISIBLE_ITEMS","element","_element","_addEventListeners","toggle","disabled","hasClass","parent","_getParentFromElement","isActive","_clearMenus","document","documentElement","closest","length","dropdown","createElement","className","insertBefore","on","relatedTarget","showEvent","trigger","isDefaultPrevented","focus","setAttribute","toggleClass","dispose","removeData","off","_jQueryInterface","config","each","data","undefined","Error","call","event","which","backdrop","parentNode","removeChild","toggles","makeArray","i","type","test","target","tagName","contains","hideEvent","removeClass","selector","Util","getSelectorFromElement","_dataApiKeydownHandler","preventDefault","stopPropagation","find","items","filter","item","offsetWidth","offsetHeight","index","indexOf","prototype","e","Constructor","noConflict","jQuery"],"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,EAAe;AACbA,gBAAQ,CAAR;AACD;;AAEDL,YAAMK,KAAN,EAAaxC,KAAb;AACD,KA3PoB;;AAAA;AAAA;AAAA,0BAiEA;AACnB,eAAOpD,OAAP;AACD;AAnEoB;;AAAA;AAAA;;AAgQvB;;;;;;AAMAF,IAAEyC,QAAF,EACGQ,EADH,CACMrC,MAAMO,gBADZ,EAC8BK,SAASC,WADvC,EACqD1B,SAASsF,sBAD9D,EAEGpC,EAFH,CAEMrC,MAAMO,gBAFZ,EAE8BK,SAASG,SAFvC,EAEqD5B,SAASsF,sBAF9D,EAGGpC,EAHH,CAGMrC,MAAMO,gBAHZ,EAG8BK,SAASI,YAHvC,EAGqD7B,SAASsF,sBAH9D,EAIGpC,EAJH,CAIMrC,MAAMM,cAJZ,EAI4BnB,SAASyC,WAJrC,EAKGS,EALH,CAKMrC,MAAMM,cALZ,EAK4BM,SAASC,WALrC,EAKkD1B,SAASiG,SAAT,CAAmB9D,MALrE,EAMGe,EANH,CAMMrC,MAAMM,cANZ,EAM4BM,SAASE,UANrC,EAMiD,UAACuE,CAAD,EAAO;AACpDA,MAAEV,eAAF;AACD,GARH;;AAWA;;;;;;AAMAvF,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,SAAS6D,gBAAlC;AACA5D,IAAEO,EAAF,CAAKN,IAAL,EAAWiG,WAAX,GAAyBnG,QAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWkG,UAAX,GAAyB,YAAY;AACnCnG,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,SAAS6D,gBAAhB;AACD,GAHD;;AAKA,SAAO7D,QAAP;AAED,CAhSgB,CAgSdqG,MAhSc,CAAjB","file":"dropdown.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\n const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\n const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n BACKDROP : 'dropdown-backdrop',\n DISABLED : 'disabled',\n ACTIVE : 'active'\n }\n\n const Selector = {\n BACKDROP : '.dropdown-backdrop',\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n ROLE_MENU : '[role=\"menu\"]',\n ROLE_LISTBOX : '[role=\"listbox\"]',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '[role=\"menu\"] li:not(.disabled) a, '\n + '[role=\"listbox\"] li:not(.disabled) a'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n\n constructor(element) {\n this._element = element\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n toggle() {\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return false\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.ACTIVE)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return false\n }\n\n if ('ontouchstart' in document.documentElement &&\n (!$(parent).closest(Selector.NAVBAR_NAV).length)) {\n\n // if mobile we use a backdrop because click events don't delegate\n let dropdown = document.createElement('div')\n dropdown.className = ClassName.BACKDROP\n $(dropdown).insertBefore(this)\n $(dropdown).on('click', Dropdown._clearMenus)\n }\n\n let relatedTarget = { relatedTarget : this }\n let showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return false\n }\n\n this.focus()\n this.setAttribute('aria-expanded', 'true')\n\n $(parent).toggleClass(ClassName.ACTIVE)\n $(parent).trigger($.Event(Event.SHOWN, relatedTarget))\n\n return false\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n }\n\n\n // private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, this.toggle)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n $(this).data(DATA_KEY, (data = new Dropdown(this)))\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config].call(this)\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {\n return\n }\n\n let backdrop = $(Selector.BACKDROP)[0]\n if (backdrop) {\n backdrop.parentNode.removeChild(backdrop)\n }\n\n let toggles = $.makeArray($(Selector.DATA_TOGGLE))\n\n for (let i = 0; i < toggles.length; i++) {\n let parent = Dropdown._getParentFromElement(toggles[i])\n let relatedTarget = { relatedTarget : toggles[i] }\n\n if (!$(parent).hasClass(ClassName.ACTIVE)) {\n continue\n }\n\n if (event && event.type === 'click' &&\n (/input|textarea/i.test(event.target.tagName)) &&\n ($.contains(parent, event.target))) {\n continue\n }\n\n let hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(parent)\n .removeClass(ClassName.ACTIVE)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n let selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n static _dataApiKeydownHandler(event) {\n if (!/(38|40|27|32)/.test(event.which) ||\n /input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.ACTIVE)\n\n if ((!isActive && event.which !== ESCAPE_KEYCODE) ||\n (isActive && event.which === ESCAPE_KEYCODE)) {\n\n if (event.which === ESCAPE_KEYCODE) {\n let toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n let items = $.makeArray($(Selector.VISIBLE_ITEMS))\n\n items = items.filter((item) => {\n return item.offsetWidth || item.offsetHeight\n })\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler)\n .on(Event.CLICK_DATA_API, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle)\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n\n})(jQuery)\n\nexport default Dropdown\n"]}
\ No newline at end of file diff --git a/js/dist/modal.js b/js/dist/modal.js index b7631af661..3ddd84fcbf 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -62,7 +62,7 @@ var Modal = function ($) { BACKDROP: 'modal-backdrop', OPEN: 'modal-open', FADE: 'fade', - IN: 'in' + ACTIVE: 'active' }; var Selector = { @@ -157,7 +157,7 @@ var Modal = function ($) { $(document).off(Event.FOCUSIN); - $(this._element).removeClass(ClassName.IN); + $(this._element).removeClass(ClassName.ACTIVE); $(this._element).off(Event.CLICK_DISMISS); $(this._dialog).off(Event.MOUSEDOWN_DISMISS); @@ -215,7 +215,7 @@ var Modal = function ($) { Util.reflow(this._element); } - $(this._element).addClass(ClassName.IN); + $(this._element).addClass(ClassName.ACTIVE); if (this._config.focus) { this._enforceFocus(); @@ -328,7 +328,7 @@ var Modal = function ($) { Util.reflow(this._backdrop); } - $(this._backdrop).addClass(ClassName.IN); + $(this._backdrop).addClass(ClassName.ACTIVE); if (!callback) { return; @@ -341,7 +341,7 @@ var Modal = function ($) { $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); } else if (!this._isShown && this._backdrop) { - $(this._backdrop).removeClass(ClassName.IN); + $(this._backdrop).removeClass(ClassName.ACTIVE); var callbackRemove = function callbackRemove() { _this6._removeBackdrop(); diff --git a/js/dist/modal.js.map b/js/dist/modal.js.map index 65442ae1f3..b625c7577d 100644 --- a/js/dist/modal.js.map +++ b/js/dist/modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/modal.js"],"names":["Modal","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","BACKDROP_TRANSITION_DURATION","ESCAPE_KEYCODE","Default","backdrop","keyboard","focus","show","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","FOCUSIN","RESIZE","CLICK_DISMISS","KEYDOWN_DISMISS","MOUSEUP_DISMISS","MOUSEDOWN_DISMISS","CLICK_DATA_API","ClassName","SCROLLBAR_MEASURER","BACKDROP","OPEN","FADE","IN","Selector","DIALOG","DATA_TOGGLE","DATA_DISMISS","FIXED_CONTENT","element","config","_config","_getConfig","_element","_dialog","find","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_originalBodyPadding","_scrollbarWidth","toggle","relatedTarget","hide","showEvent","trigger","isDefaultPrevented","_checkScrollbar","_setScrollbar","document","body","addClass","_setEscapeEvent","_setResizeEvent","on","proxy","one","event","target","is","_showBackdrop","_showElement","preventDefault","hideEvent","off","removeClass","Util","supportsTransitionEnd","hasClass","TRANSITION_END","_hideModal","emulateTransitionEnd","dispose","removeData","window","extend","typeCheckConfig","transition","parentNode","nodeType","Node","ELEMENT_NODE","appendChild","style","display","removeAttribute","scrollTop","reflow","_enforceFocus","shownEvent","transitionComplete","has","length","which","_handleUpdate","setAttribute","_resetAdjustments","_resetScrollbar","_removeBackdrop","remove","callback","animate","doAnimate","createElement","className","appendTo","currentTarget","callbackRemove","_adjustDialog","isModalOverflowing","scrollHeight","documentElement","clientHeight","paddingLeft","paddingRight","clientWidth","innerWidth","_getScrollbarWidth","bodyPadding","parseInt","css","scrollDiv","scrollbarWidth","offsetWidth","removeChild","_jQueryInterface","each","data","undefined","Error","selector","getSelectorFromElement","tagName","$target","call","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAGA;;;;;;;AAOA,IAAMA,QAAS,UAACC,CAAD,EAAO;;AAGpB;;;;;;AAMA,MAAMC,OAA+B,OAArC;AACA,MAAMC,UAA+B,eAArC;AACA,MAAMC,WAA+B,UAArC;AACA,MAAMC,kBAAmCD,QAAzC;AACA,MAAME,eAA+B,WAArC;AACA,MAAMC,qBAA+BN,EAAEO,EAAF,CAAKN,IAAL,CAArC;AACA,MAAMO,sBAA+B,GAArC;AACA,MAAMC,+BAA+B,GAArC;AACA,MAAMC,iBAA+B,EAArC,CAjBoB,CAiBoB;;AAExC,MAAMC,UAAU;AACdC,cAAW,IADG;AAEdC,cAAW,IAFG;AAGdC,WAAW,IAHG;AAIdC,UAAW;AAJG,GAAhB;;AAOA,MAAMC,cAAc;AAClBJ,cAAW,kBADO;AAElBC,cAAW,SAFO;AAGlBC,WAAW,SAHO;AAIlBC,UAAW;AAJO,GAApB;;AAOA,MAAME,QAAQ;AACZC,mBAA2Bd,SADf;AAEZe,uBAA6Bf,SAFjB;AAGZgB,mBAA2BhB,SAHf;AAIZiB,qBAA4BjB,SAJhB;AAKZkB,yBAA8BlB,SALlB;AAMZmB,uBAA6BnB,SANjB;AAOZoB,qCAAoCpB,SAPxB;AAQZqB,yCAAsCrB,SAR1B;AASZsB,yCAAsCtB,SAT1B;AAUZuB,6CAAwCvB,SAV5B;AAWZwB,8BAA4BxB,SAA5B,GAAwCC;AAX5B,GAAd;;AAcA,MAAMwB,YAAY;AAChBC,wBAAqB,yBADL;AAEhBC,cAAqB,gBAFL;AAGhBC,UAAqB,YAHL;AAIhBC,UAAqB,MAJL;AAKhBC,QAAqB;AALL,GAAlB;;AAQA,MAAMC,WAAW;AACfC,YAAqB,eADN;AAEfC,iBAAqB,uBAFN;AAGfC,kBAAqB,wBAHN;AAIfC,mBAAqB;AAJN,GAAjB;;AAQA;;;;;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AAOP,MAAM0I,gBAAb;AACD,GAHD;;AAKA,SAAO1I,KAAP;AAED,CAvgBa,CAugBXsJ,MAvgBW,CAAd","file":"modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n $.proxy(this.hide, this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n $.proxy(this._showElement, this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.IN)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window).off(EVENT_KEY)\n $(document).off(EVENT_KEY)\n $(this._element).off(EVENT_KEY)\n $(this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._originalBodyPadding = null\n this._scrollbarWidth = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.IN)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n let transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === ESCAPE_KEYCODE) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', 'true')\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.IN)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.IN)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n this._isBodyOverflowing = document.body.clientWidth < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(Selector.FIXED_CONTENT).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n `${bodyPadding + this._scrollbarWidth}px`\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/modal.js"],"names":["Modal","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","BACKDROP_TRANSITION_DURATION","ESCAPE_KEYCODE","Default","backdrop","keyboard","focus","show","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","FOCUSIN","RESIZE","CLICK_DISMISS","KEYDOWN_DISMISS","MOUSEUP_DISMISS","MOUSEDOWN_DISMISS","CLICK_DATA_API","ClassName","SCROLLBAR_MEASURER","BACKDROP","OPEN","FADE","ACTIVE","Selector","DIALOG","DATA_TOGGLE","DATA_DISMISS","FIXED_CONTENT","element","config","_config","_getConfig","_element","_dialog","find","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_originalBodyPadding","_scrollbarWidth","toggle","relatedTarget","hide","showEvent","trigger","isDefaultPrevented","_checkScrollbar","_setScrollbar","document","body","addClass","_setEscapeEvent","_setResizeEvent","on","proxy","one","event","target","is","_showBackdrop","_showElement","preventDefault","hideEvent","off","removeClass","Util","supportsTransitionEnd","hasClass","TRANSITION_END","_hideModal","emulateTransitionEnd","dispose","removeData","window","extend","typeCheckConfig","transition","parentNode","nodeType","Node","ELEMENT_NODE","appendChild","style","display","removeAttribute","scrollTop","reflow","_enforceFocus","shownEvent","transitionComplete","has","length","which","_handleUpdate","setAttribute","_resetAdjustments","_resetScrollbar","_removeBackdrop","remove","callback","animate","doAnimate","createElement","className","appendTo","currentTarget","callbackRemove","_adjustDialog","isModalOverflowing","scrollHeight","documentElement","clientHeight","paddingLeft","paddingRight","clientWidth","innerWidth","_getScrollbarWidth","bodyPadding","parseInt","css","scrollDiv","scrollbarWidth","offsetWidth","removeChild","_jQueryInterface","each","data","undefined","Error","selector","getSelectorFromElement","tagName","$target","call","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAGA;;;;;;;AAOA,IAAMA,QAAS,UAACC,CAAD,EAAO;;AAGpB;;;;;;AAMA,MAAMC,OAA+B,OAArC;AACA,MAAMC,UAA+B,eAArC;AACA,MAAMC,WAA+B,UAArC;AACA,MAAMC,kBAAmCD,QAAzC;AACA,MAAME,eAA+B,WAArC;AACA,MAAMC,qBAA+BN,EAAEO,EAAF,CAAKN,IAAL,CAArC;AACA,MAAMO,sBAA+B,GAArC;AACA,MAAMC,+BAA+B,GAArC;AACA,MAAMC,iBAA+B,EAArC,CAjBoB,CAiBoB;;AAExC,MAAMC,UAAU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GA,QAAI,KAAKK,OAAL,KAAiB,GAArB,EAA0B;AACxB3E,YAAMK,cAAN;AACD;;AAED,QAAIuE,UAAUjJ,EAAEsE,MAAF,EAAUF,GAAV,CAAcnD,MAAMG,IAApB,EAA0B,UAACoC,SAAD,EAAe;AACrD,UAAIA,UAAUE,kBAAV,EAAJ,EAAoC;AAClC;AACA;AACD;;AAEDuF,cAAQ7E,GAAR,CAAYnD,MAAME,MAAlB,EAA0B,YAAM;AAC9B,YAAInB,UAAQuE,EAAR,CAAW,UAAX,CAAJ,EAA4B;AAC1B,iBAAKzD,KAAL;AACD;AACF,OAJD;AAKD,KAXa,CAAd;;AAaAf,UAAM0I,gBAAN,CAAuBS,IAAvB,CAA4BlJ,EAAEsE,MAAF,CAA5B,EAAuC7B,MAAvC,EAA+C,IAA/C;AACD,GA7BD;;AAgCA;;;;;;AAMAzC,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,MAAM0I,gBAA/B;AACAzI,IAAEO,EAAF,CAAKN,IAAL,EAAWkJ,WAAX,GAAyBpJ,KAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWmJ,UAAX,GAAyB,YAAY;AACnCpJ,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,MAAM0I,gBAAb;AACD,GAHD;;AAKA,SAAO1I,KAAP;AAED,CAvgBa,CAugBXsJ,MAvgBW,CAAd","file":"modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n ACTIVE : 'active'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n $.proxy(this.hide, this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n $.proxy(this._showElement, this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.ACTIVE)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window).off(EVENT_KEY)\n $(document).off(EVENT_KEY)\n $(this._element).off(EVENT_KEY)\n $(this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._originalBodyPadding = null\n this._scrollbarWidth = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.ACTIVE)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n let transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === ESCAPE_KEYCODE) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', 'true')\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.ACTIVE)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.ACTIVE)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n this._isBodyOverflowing = document.body.clientWidth < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(Selector.FIXED_CONTENT).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n `${bodyPadding + this._scrollbarWidth}px`\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]}
\ No newline at end of file diff --git a/js/dist/popover.js b/js/dist/popover.js index 52f39dea55..3b81cae0de 100644 --- a/js/dist/popover.js +++ b/js/dist/popover.js @@ -42,7 +42,7 @@ var Popover = function ($) { var ClassName = { FADE: 'fade', - IN: 'in' + ACTIVE: 'active' }; var Selector = { @@ -95,7 +95,7 @@ var Popover = function ($) { this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); - $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); + $tip.removeClass(ClassName.FADE).removeClass(ClassName.ACTIVE); this.cleanupTether(); }; diff --git a/js/dist/popover.js.map b/js/dist/popover.js.map index acf60a2ea3..919fcf233d 100644 --- a/js/dist/popover.js.map +++ b/js/dist/popover.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/popover.js"],"names":["Popover","$","NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Default","extend","Tooltip","placement","trigger","content","template","DefaultType","ClassName","FADE","IN","Selector","TITLE","CONTENT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","isWithContent","getTitle","_getContent","getTipElement","tip","config","setContent","$tip","setElementContent","find","removeClass","cleanupTether","element","getAttribute","call","_jQueryInterface","each","data","_config","test","undefined","Error","Constructor","noConflict","jQuery"],"mappings":";;;;;;;;;;AAGA;;;;;;;AAOA,IAAMA,UAAW,UAACC,CAAD,EAAO;;AAGtB;;;;;;AAMA,MAAMC,OAAsB,SAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,YAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,qBAAsBL,EAAEM,EAAF,CAAKL,IAAL,CAA5B;;AAEA,MAAMM,UAAUP,EAAEQ,MAAF,CAAS,EAAT,EAAaC,QAAQF,OAArB,EAA8B;AAC5CG,eAAY,OADgC;AAE5CC,aAAY,OAFgC;AAG5CC,aAAY,EAHgC;AAI5CC,cAAY,yCACA,iCADA,GAEA;AANgC,GAA9B,CAAhB;;AASA,MAAMC,cAAcd,EAAEQ,MAAF,CAAS,EAAT,EAAaC,QAAQK,WAArB,EAAkC;AACpDF,aAAU;AAD0C,GAAlC,CAApB;;AAIA,MAAMG,YAAY;AAChBC,UAAO,MADS;AAEhBC,QAAM;AAFU,GAAlB;;AAKA,MAAMC,WAAW;AACfC,WAAU,gBADK;AAEfC,aAAU;AAFK,GAAjB;;AAKA,MAAMC,QAAQ;AACZC,mBAAoBlB,SADR;AAEZmB,uBAAsBnB,SAFV;AAGZoB,mBAAoBpB,SAHR;AAIZqB,qBAAqBrB,SAJT;AAKZsB,2BAAwBtB,SALZ;AAMZuB,qBAAqBvB,SANT;AAOZwB,yBAAuBxB,SAPX;AAQZyB,2BAAwBzB,SARZ;AASZ0B,+BAA0B1B,SATd;AAUZ2B,+BAA0B3B;AAVd,GAAd;;AAcA;;;;;;AApDsB,MA0DhBL,OA1DgB;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AA4FpB;;AA5FoB,sBA8FpBiC,aA9FoB,4BA8FJ;AACd,aAAO,KAA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D;;AAED,YAAI,CAACY,IAAL,EAAW;AACTA,iBAAO,IAAIlD,OAAJ,CAAY,IAAZ,EAAkBmD,OAAlB,CAAP;AACAlD,YAAE,IAAF,EAAQiD,IAAR,CAAa9C,QAAb,EAAuB8C,IAAvB;AACD;;AAED,YAAI,OAAOZ,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,cAAIY,KAAKZ,MAAL,MAAiBe,SAArB,EAAgC;AAC9B,kBAAM,IAAIC,KAAJ,uBAA8BhB,MAA9B,OAAN;AACD;AACDY,eAAKZ,MAAL;AACD;AACF,OAnBM,CAAP;AAoBD,KArJmB;;AAAA;AAAA;;;AA6DpB;;AA7DoB,0BA+DC;AACnB,eAAOnC,OAAP;AACD;AAjEmB;AAAA;AAAA,0BAmEC;AACnB,eAAOK,OAAP;AACD;AArEmB;AAAA;AAAA,0BAuEF;AAChB,eAAON,IAAP;AACD;AAzEmB;AAAA;AAAA,0BA2EE;AACpB,eAAOE,QAAP;AACD;AA7EmB;AAAA;AAAA,0BA+ED;AACjB,eAAOkB,KAAP;AACD;AAjFmB;AAAA;AAAA,0BAmFG;AACrB,eAAOjB,SAAP;AACD;AArFmB;AAAA;AAAA,0BAuFK;AACvB,eAAOU,WAAP;AACD;AAzFmB;;AAAA;AAAA,IA0DAL,OA1DA;;AAyJtB;;;;;;AAMAT,IAAEM,EAAF,CAAKL,IAAL,IAAyBF,QAAQgD,gBAAjC;AACA/C,IAAEM,EAAF,CAAKL,IAAL,EAAWqD,WAAX,GAAyBvD,OAAzB;AACAC,IAAEM,EAAF,CAAKL,IAAL,EAAWsD,UAAX,GAAyB,YAAY;AACnCvD,MAAEM,EAAF,CAAKL,IAAL,IAAaI,kBAAb;AACA,WAAON,QAAQgD,gBAAf;AACD,GAHD;;AAKA,SAAOhD,OAAP;AAED,CAxKe,CAwKbyD,MAxKa,CAAhB","file":"popover.js","sourcesContent":["import Tooltip from './tooltip'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.popover'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = $.extend({}, Tooltip.Default, {\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '<div class=\"popover\" role=\"tooltip\">'\n + '<h3 class=\"popover-title\"></h3>'\n + '<div class=\"popover-content\"></div></div>'\n })\n\n const DefaultType = $.extend({}, Tooltip.DefaultType, {\n content : '(string|element|function)'\n })\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TITLE : '.popover-title',\n CONTENT : '.popover-content'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n\n // overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let $tip = $(this.getTipElement())\n\n // we use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n this.setElementContent($tip.find(Selector.CONTENT), this._getContent())\n\n $tip\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n // private\n\n _getContent() {\n return this.element.getAttribute('data-content')\n || (typeof this.config.content === 'function' ?\n this.config.content.call(this.element) :\n this.config.content)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n\n})(jQuery)\n\nexport default Popover\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/popover.js"],"names":["Popover","$","NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Default","extend","Tooltip","placement","trigger","content","template","DefaultType","ClassName","FADE","ACTIVE","Selector","TITLE","CONTENT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","isWithContent","getTitle","_getContent","getTipElement","tip","config","setContent","$tip","setElementContent","find","removeClass","cleanupTether","element","getAttribute","call","_jQueryInterface","each","data","_config","test","undefined","Error","Constructor","noConflict","jQuery"],"mappings":";;;;;;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AAvB;AACD;;AAED,YAAI,OAAOZ,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,cAAIY,KAAKZ,MAAL,MAAiBe,SAArB,EAAgC;AAC9B,kBAAM,IAAIC,KAAJ,uBAA8BhB,MAA9B,OAAN;AACD;AACDY,eAAKZ,MAAL;AACD;AACF,OAnBM,CAAP;AAoBD,KArJmB;;AAAA;AAAA;;;AA6DpB;;AA7DoB,0BA+DC;AACnB,eAAOnC,OAAP;AACD;AAjEmB;AAAA;AAAA,0BAmEC;AACnB,eAAOK,OAAP;AACD;AArEmB;AAAA;AAAA,0BAuEF;AAChB,eAAON,IAAP;AACD;AAzEmB;AAAA;AAAA,0BA2EE;AACpB,eAAOE,QAAP;AACD;AA7EmB;AAAA;AAAA,0BA+ED;AACjB,eAAOkB,KAAP;AACD;AAjFmB;AAAA;AAAA,0BAmFG;AACrB,eAAOjB,SAAP;AACD;AArFmB;AAAA;AAAA,0BAuFK;AACvB,eAAOU,WAAP;AACD;AAzFmB;;AAAA;AAAA,IA0DAL,OA1DA;;AAyJtB;;;;;;AAMAT,IAAEM,EAAF,CAAKL,IAAL,IAAyBF,QAAQgD,gBAAjC;AACA/C,IAAEM,EAAF,CAAKL,IAAL,EAAWqD,WAAX,GAAyBvD,OAAzB;AACAC,IAAEM,EAAF,CAAKL,IAAL,EAAWsD,UAAX,GAAyB,YAAY;AACnCvD,MAAEM,EAAF,CAAKL,IAAL,IAAaI,kBAAb;AACA,WAAON,QAAQgD,gBAAf;AACD,GAHD;;AAKA,SAAOhD,OAAP;AAED,CAxKe,CAwKbyD,MAxKa,CAAhB","file":"popover.js","sourcesContent":["import Tooltip from './tooltip'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.popover'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = $.extend({}, Tooltip.Default, {\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '<div class=\"popover\" role=\"tooltip\">'\n + '<h3 class=\"popover-title\"></h3>'\n + '<div class=\"popover-content\"></div></div>'\n })\n\n const DefaultType = $.extend({}, Tooltip.DefaultType, {\n content : '(string|element|function)'\n })\n\n const ClassName = {\n FADE : 'fade',\n ACTIVE : 'active'\n }\n\n const Selector = {\n TITLE : '.popover-title',\n CONTENT : '.popover-content'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n\n // overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let $tip = $(this.getTipElement())\n\n // we use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n this.setElementContent($tip.find(Selector.CONTENT), this._getContent())\n\n $tip\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.ACTIVE)\n\n this.cleanupTether()\n }\n\n // private\n\n _getContent() {\n return this.element.getAttribute('data-content')\n || (typeof this.config.content === 'function' ?\n this.config.content.call(this.element) :\n this.config.content)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n\n})(jQuery)\n\nexport default Popover\n"]}
\ No newline at end of file diff --git a/js/dist/tab.js b/js/dist/tab.js index 44f3ad3c66..d0c5e39a5d 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -44,7 +44,7 @@ var Tab = function ($) { A: 'a', LI: 'li', DROPDOWN: '.dropdown', - UL: 'ul:not(.dropdown-menu)', + LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu)', FADE_CHILD: '> .nav-item .fade, > .fade', ACTIVE: '.active', ACTIVE_CHILD: '> .nav-item > .active, > .active', @@ -79,11 +79,11 @@ var Tab = function ($) { var target = void 0; var previous = void 0; - var ulElement = $(this._element).closest(Selector.UL)[0]; + var listElement = $(this._element).closest(Selector.LIST)[0]; var selector = Util.getSelectorFromElement(this._element); - if (ulElement) { - previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); + if (listElement) { + previous = $.makeArray($(listElement).find(Selector.ACTIVE)); previous = previous[previous.length - 1]; } @@ -109,7 +109,7 @@ var Tab = function ($) { target = $(selector)[0]; } - this._activate(this._element, ulElement); + this._activate(this._element, listElement); var complete = function complete() { var hiddenEvent = $.Event(Event.HIDDEN, { diff --git a/js/dist/tab.js.map b/js/dist/tab.js.map index 637485c2ff..d97edf5ef1 100644 --- a/js/dist/tab.js.map +++ b/js/dist/tab.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/tab.js"],"names":["Tab","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Event","HIDE","HIDDEN","SHOW","SHOWN","CLICK_DATA_API","ClassName","DROPDOWN_MENU","ACTIVE","FADE","IN","Selector","A","LI","DROPDOWN","UL","FADE_CHILD","ACTIVE_CHILD","DATA_TOGGLE","DROPDOWN_TOGGLE","DROPDOWN_ACTIVE_CHILD","element","_element","show","parentNode","nodeType","Node","ELEMENT_NODE","hasClass","target","previous","ulElement","closest","selector","Util","getSelectorFromElement","makeArray","find","length","hideEvent","relatedTarget","showEvent","trigger","isDefaultPrevented","_activate","complete","hiddenEvent","shownEvent","dispose","removeClass","container","callback","active","isTransitioning","supportsTransitionEnd","Boolean","proxy","_transitionComplete","one","TRANSITION_END","emulateTransitionEnd","dropdownChild","setAttribute","addClass","reflow","dropdownElement","_jQueryInterface","config","each","$this","data","undefined","Error","document","on","event","preventDefault","call","Constructor","noConflict","jQuery"],"mappings":";;;;AAGA;;;;;;;AAOA,IAAMA,MAAO,UAACC,CAAD,EAAO;;AAGlB;;;;;;AAMA,MAAMC,OAAsB,KAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,QAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA,MAAME,eAAsB,WAA5B;AACA,MAAMC,qBAAsBN,EAAEO,EAAF,CAAKN,IAAL,CAA5B;AACA,MAAMO,sBAAsB,GAA5B;;AAEA,MAAMC,QAAQ;AACZC,mBAAwBN,SADZ;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BAA8BL,MAA9B,OAAN;AACD;AACDG,eAAKH,MAAL;AACD;AACF,OAfM,CAAP;AAgBD,KAxOe;;AAAA;AAAA;AAAA,0BA6DK;AACnB,eAAO1E,OAAP;AACD;AA/De;;AAAA;AAAA;;AA6OlB;;;;;;AAMAF,IAAEkF,QAAF,EACGC,EADH,CACM1E,MAAMK,cADZ,EAC4BM,SAASO,WADrC,EACkD,UAAUyD,KAAV,EAAiB;AAC/DA,UAAMC,cAAN;AACAtF,QAAI4E,gBAAJ,CAAqBW,IAArB,CAA0BtF,EAAE,IAAF,CAA1B,EAAmC,MAAnC;AACD,GAJH;;AAOA;;;;;;AAMAA,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,IAAI4E,gBAA7B;AACA3E,IAAEO,EAAF,CAAKN,IAAL,EAAWsF,WAAX,GAAyBxF,GAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWuF,UAAX,GAAyB,YAAY;AACnCxF,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,IAAI4E,gBAAX;AACD,GAHD;;AAKA,SAAO5E,GAAP;AAED,CAzQW,CAyQT0F,MAzQS,CAAZ","file":"tab.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.tab'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n DROPDOWN : '.dropdown',\n UL : 'ul:not(.dropdown-menu)',\n FADE_CHILD : '> .nav-item .fade, > .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .nav-item > .active, > .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_TOGGLE : '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType === Node.ELEMENT_NODE) &&\n ($(this._element).hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let ulElement = $(this._element).closest(Selector.UL)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (ulElement) {\n previous = $.makeArray($(ulElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n this._element,\n ulElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeClass(this._element, DATA_KEY)\n this._element = null\n }\n\n\n // private\n\n _activate(element, container, callback) {\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || Boolean($(container).find(Selector.FADE_CHILD)[0]))\n\n let complete = $.proxy(\n this._transitionComplete,\n this,\n element,\n active,\n isTransitioning,\n callback\n )\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n active.setAttribute('aria-expanded', false)\n }\n\n $(element).addClass(ClassName.ACTIVE)\n element.setAttribute('aria-expanded', true)\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\n return Tab\n\n})(jQuery)\n\nexport default Tab\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/tab.js"],"names":["Tab","$","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","Event","HIDE","HIDDEN","SHOW","SHOWN","CLICK_DATA_API","ClassName","DROPDOWN_MENU","ACTIVE","FADE","IN","Selector","A","LI","DROPDOWN","LIST","FADE_CHILD","ACTIVE_CHILD","DATA_TOGGLE","DROPDOWN_TOGGLE","DROPDOWN_ACTIVE_CHILD","element","_element","show","parentNode","nodeType","Node","ELEMENT_NODE","hasClass","target","previous","listElement","closest","selector","Util","getSelectorFromElement","makeArray","find","length","hideEvent","relatedTarget","showEvent","trigger","isDefaultPrevented","_activate","complete","hiddenEvent","shownEvent","dispose","removeClass","container","callback","active","isTransitioning","supportsTransitionEnd","Boolean","proxy","_transitionComplete","one","TRANSITION_END","emulateTransitionEnd","dropdownChild","setAttribute","addClass","reflow","dropdownElement","_jQueryInterface","config","each","$this","data","undefined","Error","document","on","event","preventDefault","call","Constructor","noConflict","jQuery"],"mappings":";;;;AAGA;;;;;;;AAOA,IAAMA,MAAO,UAACC,CAAD,EAAO;;AAGlB;;;;;;AAMA,MAAMC,OAAsB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AAW;AACTA,iBAAOA,OAAO,IAAIhF,GAAJ,CAAQ,IAAR,CAAd;AACA+E,gBAAMC,IAAN,CAAW5E,QAAX,EAAqB4E,IAArB;AACD;;AAED,YAAI,OAAOH,MAAP,KAAkB,QAAtB,EAAgC;AAC9B,cAAIG,KAAKH,MAAL,MAAiBI,SAArB,EAAgC;AAC9B,kBAAM,IAAIC,KAAJ,uBAA8BL,MAA9B,OAAN;AACD;AACDG,eAAKH,MAAL;AACD;AACF,OAfM,CAAP;AAgBD,KAxOe;;AAAA;AAAA;AAAA,0BA6DK;AACnB,eAAO1E,OAAP;AACD;AA/De;;AAAA;AAAA;;AA6OlB;;;;;;AAMAF,IAAEkF,QAAF,EACGC,EADH,CACM1E,MAAMK,cADZ,EAC4BM,SAASO,WADrC,EACkD,UAAUyD,KAAV,EAAiB;AAC/DA,UAAMC,cAAN;AACAtF,QAAI4E,gBAAJ,CAAqBW,IAArB,CAA0BtF,EAAE,IAAF,CAA1B,EAAmC,MAAnC;AACD,GAJH;;AAOA;;;;;;AAMAA,IAAEO,EAAF,CAAKN,IAAL,IAAyBF,IAAI4E,gBAA7B;AACA3E,IAAEO,EAAF,CAAKN,IAAL,EAAWsF,WAAX,GAAyBxF,GAAzB;AACAC,IAAEO,EAAF,CAAKN,IAAL,EAAWuF,UAAX,GAAyB,YAAY;AACnCxF,MAAEO,EAAF,CAAKN,IAAL,IAAaK,kBAAb;AACA,WAAOP,IAAI4E,gBAAX;AACD,GAHD;;AAKA,SAAO5E,GAAP;AAED,CAzQW,CAyQT0F,MAzQS,CAAZ","file":"tab.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.tab'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n DROPDOWN : '.dropdown',\n LIST : 'ul:not(.dropdown-menu), ol:not(.dropdown-menu)',\n FADE_CHILD : '> .nav-item .fade, > .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .nav-item > .active, > .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_TOGGLE : '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType === Node.ELEMENT_NODE) &&\n ($(this._element).hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let listElement = $(this._element).closest(Selector.LIST)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (listElement) {\n previous = $.makeArray($(listElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n this._element,\n listElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeClass(this._element, DATA_KEY)\n this._element = null\n }\n\n\n // private\n\n _activate(element, container, callback) {\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || Boolean($(container).find(Selector.FADE_CHILD)[0]))\n\n let complete = $.proxy(\n this._transitionComplete,\n this,\n element,\n active,\n isTransitioning,\n callback\n )\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n active.setAttribute('aria-expanded', false)\n }\n\n $(element).addClass(ClassName.ACTIVE)\n element.setAttribute('aria-expanded', true)\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\n return Tab\n\n})(jQuery)\n\nexport default Tab\n"]}
\ No newline at end of file diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index 546425be1f..25011aff3d 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -69,7 +69,7 @@ var Tooltip = function ($) { }; var HoverState = { - IN: 'in', + ACTIVE: 'active', OUT: 'out' }; @@ -88,7 +88,7 @@ var Tooltip = function ($) { var ClassName = { FADE: 'fade', - IN: 'in' + ACTIVE: 'active' }; var Selector = { @@ -168,7 +168,7 @@ var Tooltip = function ($) { } } else { - if ($(this.getTipElement()).hasClass(ClassName.IN)) { + if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) { this._leave(null, this); return; } @@ -249,7 +249,7 @@ var Tooltip = function ($) { Util.reflow(tip); this._tether.position(); - $(tip).addClass(ClassName.IN); + $(tip).addClass(ClassName.ACTIVE); var complete = function complete() { var prevHoverState = _this._hoverState; @@ -277,7 +277,7 @@ var Tooltip = function ($) { var tip = this.getTipElement(); var hideEvent = $.Event(this.constructor.Event.HIDE); var complete = function complete() { - if (_this2._hoverState !== HoverState.IN && tip.parentNode) { + if (_this2._hoverState !== HoverState.ACTIVE && tip.parentNode) { tip.parentNode.removeChild(tip); } @@ -296,7 +296,7 @@ var Tooltip = function ($) { return; } - $(tip).removeClass(ClassName.IN); + $(tip).removeClass(ClassName.ACTIVE); if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { @@ -323,7 +323,7 @@ var Tooltip = function ($) { this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); - $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); + $tip.removeClass(ClassName.FADE).removeClass(ClassName.ACTIVE); this.cleanupTether(); }; @@ -414,14 +414,14 @@ var Tooltip = function ($) { context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; } - if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { - context._hoverState = HoverState.IN; + if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) || context._hoverState === HoverState.ACTIVE) { + context._hoverState = HoverState.ACTIVE; return; } clearTimeout(context._timeout); - context._hoverState = HoverState.IN; + context._hoverState = HoverState.ACTIVE; if (!context.config.delay || !context.config.delay.show) { context.show(); @@ -429,7 +429,7 @@ var Tooltip = function ($) { } context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.IN) { + if (context._hoverState === HoverState.ACTIVE) { context.show(); } }, context.config.delay.show); diff --git a/js/dist/tooltip.js.map b/js/dist/tooltip.js.map index 7f05f3bbc5..6f5dc94e78 100644 --- a/js/dist/tooltip.js.map +++ b/js/dist/tooltip.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/tooltip.js"],"names":["Tooltip","$","window","Tether","undefined","Error","NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","CLASS_PREFIX","Default","animation","template","trigger","title","delay","html","selector","placement","offset","constraints","DefaultType","AttachmentMap","TOP","RIGHT","BOTTOM","LEFT","HoverState","IN","OUT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","ClassName","FADE","Selector","TOOLTIP","TOOLTIP_INNER","TetherClass","element","enabled","Trigger","HOVER","FOCUS","MANUAL","config","_isEnabled","_timeout","_hoverState","_activeTrigger","_tether","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","dataKey","constructor","context","currentTarget","data","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","hasClass","dispose","clearTimeout","cleanupTether","removeData","off","remove","show","showEvent","isWithContent","isInTheDom","contains","ownerDocument","documentElement","isDefaultPrevented","tipId","Util","getUID","setAttribute","setContent","addClass","call","attachment","_getAttachment","appendTo","document","body","target","classes","classPrefix","addTargetClasses","reflow","position","complete","prevHoverState","supportsTransitionEnd","one","TRANSITION_END","emulateTransitionEnd","_TRANSITION_DURATION","hide","callback","hideEvent","parentNode","removeChild","removeAttribute","removeClass","Boolean","getTitle","$tip","setElementContent","find","$element","content","nodeType","jquery","parent","is","empty","append","text","getAttribute","destroy","toUpperCase","triggers","split","forEach","on","proxy","eventIn","eventOut","extend","_fixTitle","titleType","type","setTimeout","typeCheckConfig","key","_jQueryInterface","each","_config","test","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAKA;;;;;;;AAOA,IAAMA,UAAW,UAACC,CAAD,EAAO;;AAEtB;;;;AAIA,MAAIC,OAAOC,MAAP,KAAkBC,SAAtB,EAAiC;AAC/B,UAAM,IAAIC,KAAJ,CAAU,uDAAV,CAAN;AACD;;AAGD;;;;;;AAMA,MAAMC,OAAsB,SAA5B;AACA,MAAMC,UAAsB,eAA5B;AACA,MAAMC,WAAsB,YAA5B;AACA,MAAMC,kBAA0BD,QAAhC;AACA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AL,IAAyBN,QAAQgK,gBAAjC;AACA/J,IAAEU,EAAF,CAAKL,IAAL,EAAW8J,WAAX,GAAyBpK,OAAzB;AACAC,IAAEU,EAAF,CAAKL,IAAL,EAAW+J,UAAX,GAAyB,YAAY;AACnCpK,MAAEU,EAAF,CAAKL,IAAL,IAAaI,kBAAb;AACA,WAAOV,QAAQgK,gBAAf;AACD,GAHD;;AAKA,SAAOhK,OAAP;AAED,CA5nBe,CA4nBbsK,MA5nBa,CAAhB,C,CAZA","file":"tooltip.js","sourcesContent":["/* global Tether */\n\nimport Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n\n /**\n * Check for Tether dependency\n * Tether - http://tether.io/\n */\n if (window.Tether === undefined) {\n throw new Error('Bootstrap tooltips require Tether (http://tether.io/)')\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.tooltip'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tether'\n\n const Default = {\n animation : true,\n template : '<div class=\"tooltip\" role=\"tooltip\">'\n + '<div class=\"tooltip-inner\"></div></div>',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : '0 0',\n constraints : []\n }\n\n const DefaultType = {\n animation : 'boolean',\n template : 'string',\n title : '(string|element|function)',\n trigger : 'string',\n delay : '(number|object)',\n html : 'boolean',\n selector : '(string|boolean)',\n placement : '(string|function)',\n offset : 'string',\n constraints : 'array'\n }\n\n const AttachmentMap = {\n TOP : 'bottom center',\n RIGHT : 'middle left',\n BOTTOM : 'top center',\n LEFT : 'middle right'\n }\n\n const HoverState = {\n IN : 'in',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner'\n }\n\n const TetherClass = {\n element : false,\n enabled : false\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n\n constructor(element, config) {\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._tether = null\n\n // protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n\n // public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (event) {\n let dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n\n } else {\n\n if ($(this.getTipElement()).hasClass(ClassName.IN)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n this.cleanupTether()\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n this._tether = null\n\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n let showEvent = $.Event(this.constructor.Event.SHOW)\n\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n let isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n let tip = this.getTipElement()\n let tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n let placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this.element) :\n this.config.placement\n\n let attachment = this._getAttachment(placement)\n\n $(tip)\n .data(this.constructor.DATA_KEY, this)\n .appendTo(document.body)\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._tether = new Tether({\n attachment,\n element : tip,\n target : this.element,\n classes : TetherClass,\n classPrefix : CLASS_PREFIX,\n offset : this.config.offset,\n constraints : this.config.constraints,\n addTargetClasses: false\n })\n\n Util.reflow(tip)\n this._tether.position()\n\n $(tip).addClass(ClassName.IN)\n\n let complete = () => {\n let prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION)\n return\n }\n\n complete()\n }\n }\n\n hide(callback) {\n let tip = this.getTipElement()\n let hideEvent = $.Event(this.constructor.Event.HIDE)\n let complete = () => {\n if (this._hoverState !== HoverState.IN && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n this.cleanupTether()\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.IN)\n\n if (Util.supportsTransitionEnd() &&\n ($(this.tip).hasClass(ClassName.FADE))) {\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n\n // protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let $tip = $(this.getTipElement())\n\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())\n\n $tip\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n setElementContent($element, content) {\n let html = this.config.html\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // content is a DOM node or a jQuery\n if (html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n } else {\n $element[html ? 'html' : 'text'](content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this.element) :\n this.config.title\n }\n\n return title\n }\n\n cleanupTether() {\n if (this._tether) {\n this._tether.destroy()\n }\n }\n\n\n // private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n let triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n $.proxy(this.toggle, this)\n )\n\n } else if (trigger !== Trigger.MANUAL) {\n let eventIn = trigger === Trigger.HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n let eventOut = trigger === Trigger.HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n $.proxy(this._enter, this)\n )\n .on(\n eventOut,\n this.config.selector,\n $.proxy(this._leave, this)\n )\n }\n })\n\n if (this.config.selector) {\n this.config = $.extend({}, this.config, {\n trigger : 'manual',\n selector : ''\n })\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n let titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n (titleType !== 'string')) {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.IN) ||\n (context._hoverState === HoverState.IN)) {\n context._hoverState = HoverState.IN\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.IN\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.IN) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (let trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = $.extend(\n {},\n this.constructor.Default,\n $(this.element).data(),\n config\n )\n\n if (config.delay && typeof config.delay === 'number') {\n config.delay = {\n show : config.delay,\n hide : config.delay\n }\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getDelegateConfig() {\n let config = {}\n\n if (this.config) {\n for (let key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ?\n config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n\n})(jQuery)\n\nexport default Tooltip\n"]}
\ No newline at end of file +{"version":3,"sources":["../src/tooltip.js"],"names":["Tooltip","$","window","Tether","undefined","Error","NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","TRANSITION_DURATION","CLASS_PREFIX","Default","animation","template","trigger","title","delay","html","selector","placement","offset","constraints","DefaultType","AttachmentMap","TOP","RIGHT","BOTTOM","LEFT","HoverState","ACTIVE","OUT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","ClassName","FADE","Selector","TOOLTIP","TOOLTIP_INNER","TetherClass","element","enabled","Trigger","HOVER","FOCUS","MANUAL","config","_isEnabled","_timeout","_hoverState","_activeTrigger","_tether","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","dataKey","constructor","context","currentTarget","data","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","hasClass","dispose","clearTimeout","cleanupTether","removeData","off","remove","show","showEvent","isWithContent","isInTheDom","contains","ownerDocument","documentElement","isDefaultPrevented","tipId","Util","getUID","setAttribute","setContent","addClass","call","attachment","_getAttachment","appendTo","document","body","target","classes","classPrefix","addTargetClasses","reflow","position","complete","prevHoverState","supportsTransitionEnd","one","TRANSITION_END","emulateTransitionEnd","_TRANSITION_DURATION","hide","callback","hideEvent","parentNode","removeChild","removeAttribute","removeClass","Boolean","getTitle","$tip","setElementContent","find","$element","content","nodeType","jquery","parent","is","empty","append","text","getAttribute","destroy","toUpperCase","triggers","split","forEach","on","proxy","eventIn","eventOut","extend","_fixTitle","titleType","type","setTimeout","typeCheckConfig","key","_jQueryInterface","each","_config","test","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAKA;;;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AA3ImB;AAAA;AAAA,0BA6IE;AACpB,eAAOE,QAAP;AACD;AA/ImB;AAAA;AAAA,0BAiJD;AACjB,eAAO0B,KAAP;AACD;AAnJmB;AAAA;AAAA,0BAqJG;AACrB,eAAOzB,SAAP;AACD;AAvJmB;AAAA;AAAA,0BAyJK;AACvB,eAAOgB,WAAP;AACD;AA3JmB;;AAAA;AAAA;;AA6mBtB;;;;;;AAMAxB,IAAEU,EAAF,CAAKL,IAAL,IAAyBN,QAAQgK,gBAAjC;AACA/J,IAAEU,EAAF,CAAKL,IAAL,EAAW8J,WAAX,GAAyBpK,OAAzB;AACAC,IAAEU,EAAF,CAAKL,IAAL,EAAW+J,UAAX,GAAyB,YAAY;AACnCpK,MAAEU,EAAF,CAAKL,IAAL,IAAaI,kBAAb;AACA,WAAOV,QAAQgK,gBAAf;AACD,GAHD;;AAKA,SAAOhK,OAAP;AAED,CA5nBe,CA4nBbsK,MA5nBa,CAAhB,C,CAZA","file":"tooltip.js","sourcesContent":["/* global Tether */\n\nimport Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n\n /**\n * Check for Tether dependency\n * Tether - http://tether.io/\n */\n if (window.Tether === undefined) {\n throw new Error('Bootstrap tooltips require Tether (http://tether.io/)')\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0-alpha.5'\n const DATA_KEY = 'bs.tooltip'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tether'\n\n const Default = {\n animation : true,\n template : '<div class=\"tooltip\" role=\"tooltip\">'\n + '<div class=\"tooltip-inner\"></div></div>',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : '0 0',\n constraints : []\n }\n\n const DefaultType = {\n animation : 'boolean',\n template : 'string',\n title : '(string|element|function)',\n trigger : 'string',\n delay : '(number|object)',\n html : 'boolean',\n selector : '(string|boolean)',\n placement : '(string|function)',\n offset : 'string',\n constraints : 'array'\n }\n\n const AttachmentMap = {\n TOP : 'bottom center',\n RIGHT : 'middle left',\n BOTTOM : 'top center',\n LEFT : 'middle right'\n }\n\n const HoverState = {\n ACTIVE : 'active',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n const ClassName = {\n FADE : 'fade',\n ACTIVE : 'active'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner'\n }\n\n const TetherClass = {\n element : false,\n enabled : false\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n\n constructor(element, config) {\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._tether = null\n\n // protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n\n // public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (event) {\n let dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n\n } else {\n\n if ($(this.getTipElement()).hasClass(ClassName.ACTIVE)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n this.cleanupTether()\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n this._tether = null\n\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n let showEvent = $.Event(this.constructor.Event.SHOW)\n\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n let isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n let tip = this.getTipElement()\n let tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n let placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this.element) :\n this.config.placement\n\n let attachment = this._getAttachment(placement)\n\n $(tip)\n .data(this.constructor.DATA_KEY, this)\n .appendTo(document.body)\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._tether = new Tether({\n attachment,\n element : tip,\n target : this.element,\n classes : TetherClass,\n classPrefix : CLASS_PREFIX,\n offset : this.config.offset,\n constraints : this.config.constraints,\n addTargetClasses: false\n })\n\n Util.reflow(tip)\n this._tether.position()\n\n $(tip).addClass(ClassName.ACTIVE)\n\n let complete = () => {\n let prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION)\n return\n }\n\n complete()\n }\n }\n\n hide(callback) {\n let tip = this.getTipElement()\n let hideEvent = $.Event(this.constructor.Event.HIDE)\n let complete = () => {\n if (this._hoverState !== HoverState.ACTIVE && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n this.cleanupTether()\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.ACTIVE)\n\n if (Util.supportsTransitionEnd() &&\n ($(this.tip).hasClass(ClassName.FADE))) {\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n\n // protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let $tip = $(this.getTipElement())\n\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())\n\n $tip\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.ACTIVE)\n\n this.cleanupTether()\n }\n\n setElementContent($element, content) {\n let html = this.config.html\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // content is a DOM node or a jQuery\n if (html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n } else {\n $element[html ? 'html' : 'text'](content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this.element) :\n this.config.title\n }\n\n return title\n }\n\n cleanupTether() {\n if (this._tether) {\n this._tether.destroy()\n }\n }\n\n\n // private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n let triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n $.proxy(this.toggle, this)\n )\n\n } else if (trigger !== Trigger.MANUAL) {\n let eventIn = trigger === Trigger.HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n let eventOut = trigger === Trigger.HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n $.proxy(this._enter, this)\n )\n .on(\n eventOut,\n this.config.selector,\n $.proxy(this._leave, this)\n )\n }\n })\n\n if (this.config.selector) {\n this.config = $.extend({}, this.config, {\n trigger : 'manual',\n selector : ''\n })\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n let titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n (titleType !== 'string')) {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) ||\n (context._hoverState === HoverState.ACTIVE)) {\n context._hoverState = HoverState.ACTIVE\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.ACTIVE\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.ACTIVE) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (let trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = $.extend(\n {},\n this.constructor.Default,\n $(this.element).data(),\n config\n )\n\n if (config.delay && typeof config.delay === 'number') {\n config.delay = {\n show : config.delay,\n hide : config.delay\n }\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getDelegateConfig() {\n let config = {}\n\n if (this.config) {\n for (let key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ?\n config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n\n})(jQuery)\n\nexport default Tooltip\n"]}
\ No newline at end of file |