diff --git a/build/js/dist/Search.js b/build/js/dist/Search.js new file mode 100644 index 000000000..884f9b334 --- /dev/null +++ b/build/js/dist/Search.js @@ -0,0 +1,193 @@ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * -------------------------------------------- + * AdminLTE Search.js + * License MIT + * -------------------------------------------- + */ + +var Search = function ($) { + + /** + * Constants + * ==================================================== + */ + + var NAME = 'Search'; + var DATA_KEY = 'lte.search'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Event = { + LOAD_DATA_API: 'load' + EVENT_KEY + }; + + var Selector = { + LI: '.nav-item', + LINK: '.nav-link', + OPEN: '.menu-open', + ACTIVE: '.active', + TREEVIEW_MENU: '[data-widget="treeview"]', + NAV_TREEVIEW: '.nav-treeview', + DATA_WIDGET: '[data-widget="search"]' + }; + + var ClassName = { + LI: 'nav-item', + LINK: 'nav-link', + NAV_TREEVIEW: 'nav-treeview', + OPEN: 'menu-open' + }; + + var Default = { + target: '', + case_sensitive: false + }; + + /** + * Class Definition + * ==================================================== + */ + + var Search = function () { + function Search(element, config) { + _classCallCheck(this, Search); + + this._config = config; + this._element = element; + this._open_menus = null; + } + + // Public + + _createClass(Search, [{ + key: 'init', + value: function init() { + if (this._config.target === '') { + this._config.target = this._element.closest(Selector.TREEVIEW_MENU); + } else { + this._config.target = $(this._config.target); + } + + // Set treeview original state + this._open_menus = this._config.target.find(Selector.OPEN); + + // Prevent form submission + this._element.parents('form').first().submit(function (event) { + event.preventDefault(); + }); + + // Setup search function + this._element.keyup(function (event) { + event.preventDefault(); + + var value = $(event.currentTarget).val(); + + if (!this._config.case_sensitive) { + value = value.toLowerCase(); + } + + this.search(value); + }.bind(this)); + } + }, { + key: 'search', + value: function search(value) { + var _that = this; + + // If the value is back to null + if (!value) { + // Close all treeviews + this._config.target.find(Selector.LI).css('display', 'block').find(Selector.NAV_TREEVIEW).css('display', 'none'); + + // Open the originally opened treeviews + this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block'); + this._open_menus.each(function () { + if (!$(this).hasClass(ClassName.OPEN)) { + $(this).addClass(Selector.OPEN).css('display', 'block'); + $(this).children(Selector.NAV_TREEVIEW).css('display', 'block'); + } + }); + return; + } + + // Search through the tree elements + this._config.target.find(Selector.LI).each(function () { + var text = $(this).children(Selector.LINK).first().text(); + + if (!_that._config.case_sensitive) { + text = text.toLowerCase(); + } + + if (text.search(value) == -1) { + // No results + $(this).css('display', 'none'); + } else { + // Found the result + // Make the parent LI visible + $(this).parents(Selector.LI).css('display', 'block'); + + // Make the parent nav-treeview visible + $(this).parents(Selector.NAV_TREEVIEW).addClass('menu-open').css('display', 'block'); + + // Make this element visible + $(this).css('display', 'block'); + } + }); + } + + // Static + + }], [{ + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (!data) { + data = new Search($(this), _config); + $(this).data(DATA_KEY, data); + } + + if (config === 'init') { + data[config](); + } + }); + } + }]); + + return Search; + }(); + + /** + * Data API + * ==================================================== + */ + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_WIDGET).each(function () { + Search._jQueryInterface.call($(this), 'init'); + }); + }); + + /** + * jQuery API + * ==================================================== + */ + + $.fn[NAME] = Search._jQueryInterface; + $.fn[NAME].Constructor = Search; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Search._jQueryInterface; + }; + + return Search; +}(jQuery); +//# sourceMappingURL=Search.js.map diff --git a/build/js/dist/Search.js.map b/build/js/dist/Search.js.map new file mode 100644 index 000000000..63ff64473 --- /dev/null +++ b/build/js/dist/Search.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/Search.js"],"names":["Search","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Event","LOAD_DATA_API","Selector","LI","LINK","OPEN","ACTIVE","TREEVIEW_MENU","NAV_TREEVIEW","DATA_WIDGET","ClassName","Default","target","case_sensitive","element","config","_config","_element","_open_menus","closest","find","parents","first","submit","event","preventDefault","keyup","value","currentTarget","val","toLowerCase","search","bind","_that","css","each","hasClass","addClass","children","text","data","extend","window","on","_jQueryInterface","call","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAAA;;;;;;;AAOA,IAAMA,SAAU,UAACC,CAAD,EAAO;;AAErB;;;;;AAKA,MAAMC,OAAqB,QAA3B;AACA,MAAMC,WAAqB,YAA3B;AACA,MAAMC,kBAAyBD,QAA/B;AACA,MAAME,qBAAqBJ,EAAEK,EAAF,CAAKJ,IAAL,CAA3B;;AAEA,MAAMK,QAAQ;AACZC,4BAAsBJ;AADV,GAAd;;AAIA,MAAMK,WAAW;AACfC,QAAe,WADA;AAEfC,UAAe,WAFA;AAGfC,UAAe,YAHA;AAIfC,YAAe,SAJA;AAKfC,mBAAe,0BALA;AAMfC,kBAAe,eANA;AAOfC,iBAAe;AAPA,GAAjB;;AAUA,MAAMC,YAAY;AAChBP,QAAc,UADE;AAEhBC,UAAc,UAFE;AAGhBI,kBAAc,cAHE;AAIhBH,UAAc;AAJE,GAAlB;;AAOA,MAAMM,UAAU;AACdC,YAAgB,EADF;AAEdC,oBAAgB;AAFF,GAAhB;;AAKA;;;;;AAtCqB,MA0CfpB,MA1Ce;AA4CnB,oBAAYqB,OAAZ,EAAqBC,MAArB,EAA6B;AAAA;;AAC3B,WAAKC,OAAL,GAAmBD,MAAnB;AACA,WAAKE,Q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KZuD,MA/KY,CAAf","file":"Search.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Search.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Search = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Search'\n const DATA_KEY = 'lte.search'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI : '.nav-item',\n LINK : '.nav-link',\n OPEN : '.menu-open',\n ACTIVE : '.active',\n TREEVIEW_MENU: '[data-widget=\"treeview\"]',\n NAV_TREEVIEW : '.nav-treeview',\n DATA_WIDGET : '[data-widget=\"search\"]'\n }\n\n const ClassName = {\n LI : 'nav-item',\n LINK : 'nav-link',\n NAV_TREEVIEW: 'nav-treeview',\n OPEN : 'menu-open'\n }\n\n const Default = {\n target : '',\n case_sensitive: false\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Search {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n this._open_menus = null\n }\n\n // Public\n\n init() {\n if (this._config.target === '') {\n this._config.target = this._element.closest(Selector.TREEVIEW_MENU)\n } else {\n this._config.target = $(this._config.target)\n }\n\n // Set treeview original state\n this._open_menus = this._config.target.find(Selector.OPEN)\n\n // Prevent form submission\n this._element.parents('form').first().submit(function (event) {\n event.preventDefault()\n })\n\n // Setup search function\n this._element.keyup(function (event) {\n event.preventDefault()\n\n let value = $(event.currentTarget).val()\n\n if (!this._config.case_sensitive) {\n value = value.toLowerCase()\n }\n\n this.search(value)\n }.bind(this))\n }\n\n search(value) {\n let _that = this\n\n // If the value is back to null\n if (!value) {\n // Close all treeviews\n this._config.target.find(Selector.LI)\n .css('display', 'block')\n .find(Selector.NAV_TREEVIEW)\n .css('display', 'none')\n\n // Open the originally opened treeviews\n this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block')\n this._open_menus.each(function () {\n if (!$(this).hasClass(ClassName.OPEN)) {\n $(this).addClass(Selector.OPEN).css('display', 'block')\n $(this).children(Selector.NAV_TREEVIEW).css('display', 'block')\n }\n })\n return\n }\n\n // Search through the tree elements\n this._config.target.find(Selector.LI).each(function () {\n let text = $(this).children(Selector.LINK).first().text()\n\n if (!_that._config.case_sensitive) {\n text = text.toLowerCase()\n }\n\n if (text.search(value) == -1) {\n // No results\n $(this).css('display', 'none')\n } else { // Found the result\n // Make the parent LI visible\n $(this).parents(Selector.LI)\n .css('display', 'block')\n\n // Make the parent nav-treeview visible\n $(this).parents(Selector.NAV_TREEVIEW)\n .addClass('menu-open')\n .css('display', 'block')\n\n // Make this element visible\n $(this).css('display', 'block')\n }\n })\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Search($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n Search._jQueryInterface.call($(this), 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Search._jQueryInterface\n $.fn[NAME].Constructor = Search\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Search._jQueryInterface\n }\n\n return Search\n\n})(jQuery)\n"]} \ No newline at end of file diff --git a/build/js/dist/Treeview.js.map b/build/js/dist/Treeview.js.map index 8a5e365a9..b65ef0ffd 100644 --- a/build/js/dist/Treeview.js.map +++ b/build/js/dist/Treeview.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/Treeview.js"],"names":["Treeview","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Event","SELECTED","EXPANDED","COLLAPSED","LOAD_DATA_API","Selector","LI","LINK","TREEVIEW_MENU","OPEN","DATA_WIDGET","ClassName","Default","trigger","animationSpeed","accordion","element","config","_config","_element","_setupListeners","treeviewMenu","parentLi","expandedEvent","openMenuLi","siblings","first","openTreeview","find","collapse","slideDown","addClass","collapsedEvent","slideUp","removeClass","event","$relativeTarget","currentTarget","next","is","preventDefault","parents","isOpen","hasClass","expand","document","on","toggle","each","data","extend","window","$treeview","_jQueryInterface","call","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAAA;;;;;;;AAOA,IAAMA,WAAY,UAACC,CAAD,EAAO;;AAEvB;;;;;AAKA,MAAMC,OAAqB,UAA3B;AACA,MAAMC,WAAqB,cAA3B;AACA,MAAMC,kBAAyBD,QAA/B;AACA,MAAME,qBAAqBJ,EAAEK,EAAF,CAAKJ,IAAL,CAA3B;;AAEA,MAAMK,QAAQ;AACZC,2BAAqBJ,SADT;AAEZK,2BAAqBL,SAFT;AAGZM,6BAAuBN,SAHX;AAIZO,4BAAsBP;AAJV,GAAd;;AAOA,MAAMQ,WAAW;AACfC,QAAI,WADW;AAEfC,UAAM,WAFS;AAGfC,mBAAe,eAHA;AAIfC,UAAM,YAJS;AAKfC,iBAAa;AALE,GAAjB;;AAQA,MAAMC,YAAY;AAChBL,QAAI,UADY;AAEhBC,UAAM,UAFU;AAGhBC,mBAAe,cAHC;AAIhBC,UAAM;AAJU,GAAlB;;AAOA,MAAMG,UAAU;AACdC,aAAYR,SAASK,WAArB,SAAoCL,SAASE,IAD/B;AAEdO,oBAAgB,GAFF;AAGdC,eAAW;AAHG,GAAhB;;AAMA;;;;;AAxCuB,MA4CjBtB,QA5CiB;AA8CrB,sBAAYuB,OAAZ,EAAqBC,MAArB,EAA6B;AAAA;;AAC3B,WAAKC,OAAL,GAAgBD,MAAhB;AACA,WAAKE,QAAL,GAAgBH,OAAhB;AACD;;AAED;;AAnDqB;AAAA;AAAA,6BAqDd;AACL,aAAKI,eAAL;AACD;AAvDoB;AAAA;AAAA,6BAyDdC,YAzDc,EAyDAC,QAzDA,EAyD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MAAF,EAAUL,EAAV,CAAa9C,MAAMI,aAAnB,EAAkC,YAAM;AACtCV,MAAEW,SAASK,WAAX,EAAwBsC,IAAxB,CAA6B,YAAY;AACvC,UAAII,YAAY1D,EAAE,IAAF,CAAhB;AACAD,eAAS4D,gBAAT,CAA0BC,IAA1B,CAA+BF,SAA/B,EAA0C,MAA1C;AACD,KAHD;AAID,GALD;;AAOA;;;;;AAKA1D,IAAEK,EAAF,CAAKJ,IAAL,IAAaF,SAAS4D,gBAAtB;AACA3D,IAAEK,EAAF,CAAKJ,IAAL,EAAW4D,WAAX,GAAyB9D,QAAzB;AACAC,IAAEK,EAAF,CAAKJ,IAAL,EAAW6D,UAAX,GAAyB,YAAY;AACnC9D,MAAEK,EAAF,CAAKJ,IAAL,IAAaG,kBAAb;AACA,WAAOL,SAAS4D,gBAAhB;AACD,GAHD;;AAKA,SAAO5D,QAAP;AAED,CArKgB,CAqKdgE,MArKc,CAAjB","file":"Treeview.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Treeview.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Treeview = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Treeview'\n const DATA_KEY = 'lte.treeview'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SELECTED: `selected${EVENT_KEY}`,\n EXPANDED: `expanded${EVENT_KEY}`,\n COLLAPSED: `collapsed${EVENT_KEY}`,\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI: '.nav-item',\n LINK: '.nav-link',\n TREEVIEW_MENU: '.nav-treeview',\n OPEN: '.menu-open',\n DATA_WIDGET: '[data-widget=\"treeview\"]'\n }\n\n const ClassName = {\n LI: 'nav-item',\n LINK: 'nav-link',\n TREEVIEW_MENU: 'nav-treeview',\n OPEN: 'menu-open'\n }\n\n const Default = {\n trigger: `${Selector.DATA_WIDGET} ${Selector.LINK}`,\n animationSpeed: 300,\n accordion: true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Treeview {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n init() {\n this._setupListeners()\n }\n\n expand(treeviewMenu, parentLi) {\n let expandedEvent = $.Event(Event.EXPANDED)\n\n if (this._config.accordion) {\n let openMenuLi = parentLi.siblings(Selector.OPEN).first()\n let openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()\n this.collapse(openTreeview, openMenuLi)\n }\n\n treeviewMenu.slideDown(this._config.animationSpeed, () => {\n parentLi.addClass(ClassName.OPEN)\n $(this._element).trigger(expandedEvent)\n })\n }\n\n collapse(treeviewMenu, parentLi) {\n let collapsedEvent = $.Event(Event.COLLAPSED)\n\n treeviewMenu.slideUp(this._config.animationSpeed, () => {\n parentLi.removeClass(ClassName.OPEN)\n $(this._element).trigger(collapsedEvent)\n treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()\n treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)\n })\n }\n\n collapseAll() {\n\n }\n\n expandAll() {\n\n }\n\n toggle(event) {\n let $relativeTarget = $(event.currentTarget)\n let treeviewMenu = $relativeTarget.next()\n\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\n return\n }\n\n event.preventDefault()\n\n let parentLi = $relativeTarget.parents(Selector.LI).first()\n let isOpen = parentLi.hasClass(ClassName.OPEN)\n\n if (isOpen) {\n this.collapse($(treeviewMenu), parentLi)\n } else {\n this.expand($(treeviewMenu), parentLi)\n }\n }\n\n // Private\n\n _setupListeners() {\n $(document).on('click', this._config.trigger, (event) => {\n this.toggle(event)\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Treeview($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n let $treeview = $(this)\n Treeview._jQueryInterface.call($treeview, 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Treeview._jQueryInterface\n $.fn[NAME].Constructor = Treeview\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Treeview._jQueryInterface\n }\n\n return Treeview\n\n})(jQuery)\n"]} \ No newline at end of file +{"version":3,"sources":["../src/Treeview.js"],"names":["Treeview","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Event","SELECTED","EXPANDED","COLLAPSED","LOAD_DATA_API","Selector","LI","LINK","TREEVIEW_MENU","OPEN","DATA_WIDGET","ClassName","Default","trigger","animationSpeed","accordion","element","config","_config","_element","_setupListeners","treeviewMenu","parentLi","expandedEvent","openMenuLi","siblings","first","openTreeview","find","collapse","slideDown","addClass","collapsedEvent","slideUp","removeClass","event","$relativeTarget","currentTarget","next","is","preventDefault","parents","isOpen","hasClass","expand","document","on","toggle","each","data","extend","window","$treeview","_jQueryInterface","call","Constructor","noConflict","jQuery"],"mappings":";;;;;;AAAA;;;;;;;AAOA,IAAMA,WAAY,UAACC,CAAD,EAAO;;AAEvB;;;;;AAKA,MAAMC,OAAqB,UAA3B;AACA,MAAMC,WAAqB,cAA3B;AACA,MAAMC,kBAAyBD,QAA/B;AACA,MAAME,qBAAqBJ,EAAEK,EAAF,CAAKJ,IAAL,CAA3B;;AAEA,MAAMK,QAAQ;AACZC,2BAA0BJ,SADd;AAEZK,2BAA0BL,SAFd;AAGZM,6BAA2BN,SAHf;AAIZO,4BAAsBP;AAJV,GAAd;;AAOA,MAAMQ,WAAW;AACfC,QAAe,WADA;AAEfC,UAAe,WAFA;AAGfC,mBAAe,eAHA;AAIfC,UAAe,YAJA;AAKfC,iBAAe;AALA,GAAjB;;AAQA,MAAMC,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Y;AAC3B,cAAIC,OAAUvD,EAAE,IAAF,EAAQuD,IAAR,CAAarD,QAAb,CAAd;AACA,cAAIsB,UAAUxB,EAAEwD,MAAF,CAAS,EAAT,EAAatC,OAAb,EAAsBlB,EAAE,IAAF,EAAQuD,IAAR,EAAtB,CAAd;;AAEA,cAAI,CAACA,IAAL,EAAW;AACTA,mBAAO,IAAIxD,QAAJ,CAAaC,EAAE,IAAF,CAAb,EAAsBwB,OAAtB,CAAP;AACAxB,cAAE,IAAF,EAAQuD,IAAR,CAAarD,QAAb,EAAuBqD,IAAvB;AACD;;AAED,cAAIhC,WAAW,MAAf,EAAuB;AACrBgC,iBAAKhC,MAAL;AACD;AACF,SAZM,CAAP;AAaD;AAvIoB;;AAAA;AAAA;;AA2IvB;;;;;AAKAvB,IAAEyD,MAAF,EAAUL,EAAV,CAAa9C,MAAMI,aAAnB,EAAkC,YAAM;AACtCV,MAAEW,SAASK,WAAX,EAAwBsC,IAAxB,CAA6B,YAAY;AACvC,UAAII,YAAY1D,EAAE,IAAF,CAAhB;AACAD,eAAS4D,gBAAT,CAA0BC,IAA1B,CAA+BF,SAA/B,EAA0C,MAA1C;AACD,KAHD;AAID,GALD;;AAOA;;;;;AAKA1D,IAAEK,EAAF,CAAKJ,IAAL,IAAaF,SAAS4D,gBAAtB;AACA3D,IAAEK,EAAF,CAAKJ,IAAL,EAAW4D,WAAX,GAAyB9D,QAAzB;AACAC,IAAEK,EAAF,CAAKJ,IAAL,EAAW6D,UAAX,GAAyB,YAAY;AACnC9D,MAAEK,EAAF,CAAKJ,IAAL,IAAaG,kBAAb;AACA,WAAOL,SAAS4D,gBAAhB;AACD,GAHD;;AAKA,SAAO5D,QAAP;AAED,CArKgB,CAqKdgE,MArKc,CAAjB","file":"Treeview.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Treeview.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Treeview = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Treeview'\n const DATA_KEY = 'lte.treeview'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SELECTED : `selected${EVENT_KEY}`,\n EXPANDED : `expanded${EVENT_KEY}`,\n COLLAPSED : `collapsed${EVENT_KEY}`,\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI : '.nav-item',\n LINK : '.nav-link',\n TREEVIEW_MENU: '.nav-treeview',\n OPEN : '.menu-open',\n DATA_WIDGET : '[data-widget=\"treeview\"]'\n }\n\n const ClassName = {\n LI : 'nav-item',\n LINK : 'nav-link',\n TREEVIEW_MENU: 'nav-treeview',\n OPEN : 'menu-open'\n }\n\n const Default = {\n trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,\n animationSpeed: 300,\n accordion : true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Treeview {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n init() {\n this._setupListeners()\n }\n\n expand(treeviewMenu, parentLi) {\n let expandedEvent = $.Event(Event.EXPANDED)\n\n if (this._config.accordion) {\n let openMenuLi = parentLi.siblings(Selector.OPEN).first()\n let openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()\n this.collapse(openTreeview, openMenuLi)\n }\n\n treeviewMenu.slideDown(this._config.animationSpeed, () => {\n parentLi.addClass(ClassName.OPEN)\n $(this._element).trigger(expandedEvent)\n })\n }\n\n collapse(treeviewMenu, parentLi) {\n let collapsedEvent = $.Event(Event.COLLAPSED)\n\n treeviewMenu.slideUp(this._config.animationSpeed, () => {\n parentLi.removeClass(ClassName.OPEN)\n $(this._element).trigger(collapsedEvent)\n treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()\n treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)\n })\n }\n\n collapseAll() {\n\n }\n\n expandAll() {\n\n }\n\n toggle(event) {\n let $relativeTarget = $(event.currentTarget)\n let treeviewMenu = $relativeTarget.next()\n\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\n return\n }\n\n event.preventDefault()\n\n let parentLi = $relativeTarget.parents(Selector.LI).first()\n let isOpen = parentLi.hasClass(ClassName.OPEN)\n\n if (isOpen) {\n this.collapse($(treeviewMenu), parentLi)\n } else {\n this.expand($(treeviewMenu), parentLi)\n }\n }\n\n // Private\n\n _setupListeners() {\n $(document).on('click', this._config.trigger, (event) => {\n this.toggle(event)\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Treeview($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n let $treeview = $(this)\n Treeview._jQueryInterface.call($treeview, 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Treeview._jQueryInterface\n $.fn[NAME].Constructor = Treeview\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Treeview._jQueryInterface\n }\n\n return Treeview\n\n})(jQuery)\n"]} \ No newline at end of file diff --git a/build/js/src/AdminLTE.js b/build/js/src/AdminLTE.js index 84c8e187c..b2ff63bb6 100644 --- a/build/js/src/AdminLTE.js +++ b/build/js/src/AdminLTE.js @@ -144,31 +144,31 @@ const Treeview = (($) => { const JQUERY_NO_CONFLICT = $.fn[NAME] const Event = { - SELECTED: `selected${EVENT_KEY}`, - EXPANDED: `expanded${EVENT_KEY}`, - COLLAPSED: `collapsed${EVENT_KEY}`, + SELECTED : `selected${EVENT_KEY}`, + EXPANDED : `expanded${EVENT_KEY}`, + COLLAPSED : `collapsed${EVENT_KEY}`, LOAD_DATA_API: `load${EVENT_KEY}` } const Selector = { - LI: '.nav-item', - LINK: '.nav-link', + LI : '.nav-item', + LINK : '.nav-link', TREEVIEW_MENU: '.nav-treeview', - OPEN: '.menu-open', - DATA_WIDGET: '[data-widget="treeview"]' + OPEN : '.menu-open', + DATA_WIDGET : '[data-widget="treeview"]' } const ClassName = { - LI: 'nav-item', - LINK: 'nav-link', + LI : 'nav-item', + LINK : 'nav-link', TREEVIEW_MENU: 'nav-treeview', - OPEN: 'menu-open' + OPEN : 'menu-open' } const Default = { - trigger: `${Selector.DATA_WIDGET} ${Selector.LINK}`, + trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`, animationSpeed: 300, - accordion: true + accordion : true } /** @@ -565,3 +565,180 @@ const ControlSidebar = (($) => { return ControlSidebar })(jQuery) + +const Search = (($) => { + + /** + * Constants + * ==================================================== + */ + + const NAME = 'Search' + const DATA_KEY = 'lte.search' + const EVENT_KEY = `.${DATA_KEY}` + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Event = { + LOAD_DATA_API: `load${EVENT_KEY}` + } + + const Selector = { + LI : '.nav-item', + LINK : '.nav-link', + OPEN : '.menu-open', + ACTIVE : '.active', + TREEVIEW_MENU: '[data-widget="treeview"]', + NAV_TREEVIEW : '.nav-treeview', + DATA_WIDGET : '[data-widget="search"]' + } + + const ClassName = { + LI : 'nav-item', + LINK : 'nav-link', + NAV_TREEVIEW: 'nav-treeview', + OPEN : 'menu-open' + } + + const Default = { + target : '', + case_sensitive: false + } + + /** + * Class Definition + * ==================================================== + */ + class Search { + + constructor(element, config) { + this._config = config + this._element = element + this._open_menus = null + } + + // Public + + init() { + if (this._config.target === '') { + this._config.target = this._element.closest(Selector.TREEVIEW_MENU) + } else { + this._config.target = $(this._config.target) + } + + // Set treeview original state + this._open_menus = this._config.target.find(Selector.OPEN) + + // Prevent form submission + this._element.parents('form').first().submit(function (event) { + event.preventDefault() + }) + + // Setup search function + this._element.keyup(function (event) { + event.preventDefault() + + let value = $(event.currentTarget).val() + + if (!this._config.case_sensitive) { + value = value.toLowerCase() + } + + this.search(value) + }.bind(this)) + } + + search(value) { + let _that = this + + // If the value is back to null + if (!value) { + // Close all treeviews + this._config.target.find(Selector.LI) + .css('display', 'block') + .find(Selector.NAV_TREEVIEW) + .css('display', 'none') + + // Open the originally opened treeviews + this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block') + this._open_menus.each(function () { + if (!$(this).hasClass(ClassName.OPEN)) { + $(this).addClass(Selector.OPEN).css('display', 'block') + $(this).children(Selector.NAV_TREEVIEW).css('display', 'block') + } + }) + return + } + + // Search through the tree elements + this._config.target.find(Selector.LI).each(function () { + let text = $(this).children(Selector.LINK).first().text() + + if (!_that._config.case_sensitive) { + text = text.toLowerCase() + } + + if (text.search(value) == -1) { + // No results + $(this).css('display', 'none') + } else { // Found the result + // Make the parent LI visible + $(this).parents(Selector.LI) + .css('display', 'block') + + // Make the parent nav-treeview visible + $(this).parents(Selector.NAV_TREEVIEW) + .addClass('menu-open') + .css('display', 'block') + + // Make this element visible + $(this).css('display', 'block') + } + }) + } + + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = $.extend({}, Default, $(this).data()) + + if (!data) { + data = new Search($(this), _config) + $(this).data(DATA_KEY, data) + } + + if (config === 'init') { + data[config]() + } + }) + } + } + + /** + * Data API + * ==================================================== + */ + + $(window).on(Event.LOAD_DATA_API, () => { + $(Selector.DATA_WIDGET).each(function () { + Search._jQueryInterface.call($(this), 'init') + }) + }) + + /** + * jQuery API + * ==================================================== + */ + + $.fn[NAME] = Search._jQueryInterface + $.fn[NAME].Constructor = Search + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Search._jQueryInterface + } + + return Search + +})(jQuery) diff --git a/build/js/src/Search.js b/build/js/src/Search.js new file mode 100644 index 000000000..4cfe1f0f8 --- /dev/null +++ b/build/js/src/Search.js @@ -0,0 +1,183 @@ +/** + * -------------------------------------------- + * AdminLTE Search.js + * License MIT + * -------------------------------------------- + */ + +const Search = (($) => { + + /** + * Constants + * ==================================================== + */ + + const NAME = 'Search' + const DATA_KEY = 'lte.search' + const EVENT_KEY = `.${DATA_KEY}` + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Event = { + LOAD_DATA_API: `load${EVENT_KEY}` + } + + const Selector = { + LI : '.nav-item', + LINK : '.nav-link', + OPEN : '.menu-open', + ACTIVE : '.active', + TREEVIEW_MENU: '[data-widget="treeview"]', + NAV_TREEVIEW : '.nav-treeview', + DATA_WIDGET : '[data-widget="search"]' + } + + const ClassName = { + LI : 'nav-item', + LINK : 'nav-link', + NAV_TREEVIEW: 'nav-treeview', + OPEN : 'menu-open' + } + + const Default = { + target : '', + case_sensitive: false + } + + /** + * Class Definition + * ==================================================== + */ + class Search { + + constructor(element, config) { + this._config = config + this._element = element + this._open_menus = null + } + + // Public + + init() { + if (this._config.target === '') { + this._config.target = this._element.closest(Selector.TREEVIEW_MENU) + } else { + this._config.target = $(this._config.target) + } + + // Set treeview original state + this._open_menus = this._config.target.find(Selector.OPEN) + + // Prevent form submission + this._element.parents('form').first().submit(function (event) { + event.preventDefault() + }) + + // Setup search function + this._element.keyup(function (event) { + event.preventDefault() + + let value = $(event.currentTarget).val() + + if (!this._config.case_sensitive) { + value = value.toLowerCase() + } + + this.search(value) + }.bind(this)) + } + + search(value) { + let _that = this + + // If the value is back to null + if (!value) { + // Close all treeviews + this._config.target.find(Selector.LI) + .css('display', 'block') + .find(Selector.NAV_TREEVIEW) + .css('display', 'none') + + // Open the originally opened treeviews + this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block') + this._open_menus.each(function () { + if (!$(this).hasClass(ClassName.OPEN)) { + $(this).addClass(Selector.OPEN).css('display', 'block') + $(this).children(Selector.NAV_TREEVIEW).css('display', 'block') + } + }) + return + } + + // Search through the tree elements + this._config.target.find(Selector.LI).each(function () { + let text = $(this).children(Selector.LINK).first().text() + + if (!_that._config.case_sensitive) { + text = text.toLowerCase() + } + + if (text.search(value) == -1) { + // No results + $(this).css('display', 'none') + } else { // Found the result + // Make the parent LI visible + $(this).parents(Selector.LI) + .css('display', 'block') + + // Make the parent nav-treeview visible + $(this).parents(Selector.NAV_TREEVIEW) + .addClass('menu-open') + .css('display', 'block') + + // Make this element visible + $(this).css('display', 'block') + } + }) + } + + + // Static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = $.extend({}, Default, $(this).data()) + + if (!data) { + data = new Search($(this), _config) + $(this).data(DATA_KEY, data) + } + + if (config === 'init') { + data[config]() + } + }) + } + } + + /** + * Data API + * ==================================================== + */ + + $(window).on(Event.LOAD_DATA_API, () => { + $(Selector.DATA_WIDGET).each(function () { + Search._jQueryInterface.call($(this), 'init') + }) + }) + + /** + * jQuery API + * ==================================================== + */ + + $.fn[NAME] = Search._jQueryInterface + $.fn[NAME].Constructor = Search + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Search._jQueryInterface + } + + return Search + +})(jQuery) diff --git a/build/js/src/Treeview.js b/build/js/src/Treeview.js index 4e45647c6..149fb72d8 100644 --- a/build/js/src/Treeview.js +++ b/build/js/src/Treeview.js @@ -18,31 +18,31 @@ const Treeview = (($) => { const JQUERY_NO_CONFLICT = $.fn[NAME] const Event = { - SELECTED: `selected${EVENT_KEY}`, - EXPANDED: `expanded${EVENT_KEY}`, - COLLAPSED: `collapsed${EVENT_KEY}`, + SELECTED : `selected${EVENT_KEY}`, + EXPANDED : `expanded${EVENT_KEY}`, + COLLAPSED : `collapsed${EVENT_KEY}`, LOAD_DATA_API: `load${EVENT_KEY}` } const Selector = { - LI: '.nav-item', - LINK: '.nav-link', + LI : '.nav-item', + LINK : '.nav-link', TREEVIEW_MENU: '.nav-treeview', - OPEN: '.menu-open', - DATA_WIDGET: '[data-widget="treeview"]' + OPEN : '.menu-open', + DATA_WIDGET : '[data-widget="treeview"]' } const ClassName = { - LI: 'nav-item', - LINK: 'nav-link', + LI : 'nav-item', + LINK : 'nav-link', TREEVIEW_MENU: 'nav-treeview', - OPEN: 'menu-open' + OPEN : 'menu-open' } const Default = { - trigger: `${Selector.DATA_WIDGET} ${Selector.LINK}`, + trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`, animationSpeed: 300, - accordion: true + accordion : true } /** diff --git a/dist/js/adminlte.js b/dist/js/adminlte.js index 16caf5bc5..cd0860ac9 100644 --- a/dist/js/adminlte.js +++ b/dist/js/adminlte.js @@ -616,4 +616,184 @@ var ControlSidebar = function ($) { return ControlSidebar; }(jQuery); + +var Search = function ($) { + + /** + * Constants + * ==================================================== + */ + + var NAME = 'Search'; + var DATA_KEY = 'lte.search'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Event = { + LOAD_DATA_API: 'load' + EVENT_KEY + }; + + var Selector = { + LI: '.nav-item', + LINK: '.nav-link', + OPEN: '.menu-open', + ACTIVE: '.active', + TREEVIEW_MENU: '[data-widget="treeview"]', + NAV_TREEVIEW: '.nav-treeview', + DATA_WIDGET: '[data-widget="search"]' + }; + + var ClassName = { + LI: 'nav-item', + LINK: 'nav-link', + NAV_TREEVIEW: 'nav-treeview', + OPEN: 'menu-open' + }; + + var Default = { + target: '', + case_sensitive: false + }; + + /** + * Class Definition + * ==================================================== + */ + + var Search = function () { + function Search(element, config) { + _classCallCheck(this, Search); + + this._config = config; + this._element = element; + this._open_menus = null; + } + + // Public + + _createClass(Search, [{ + key: 'init', + value: function init() { + if (this._config.target === '') { + this._config.target = this._element.closest(Selector.TREEVIEW_MENU); + } else { + this._config.target = $(this._config.target); + } + + // Set treeview original state + this._open_menus = this._config.target.find(Selector.OPEN); + + // Prevent form submission + this._element.parents('form').first().submit(function (event) { + event.preventDefault(); + }); + + // Setup search function + this._element.keyup(function (event) { + event.preventDefault(); + + var value = $(event.currentTarget).val(); + + if (!this._config.case_sensitive) { + value = value.toLowerCase(); + } + + this.search(value); + }.bind(this)); + } + }, { + key: 'search', + value: function search(value) { + var _that = this; + + // If the value is back to null + if (!value) { + // Close all treeviews + this._config.target.find(Selector.LI).css('display', 'block').find(Selector.NAV_TREEVIEW).css('display', 'none'); + + // Open the originally opened treeviews + this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block'); + this._open_menus.each(function () { + if (!$(this).hasClass(ClassName.OPEN)) { + $(this).addClass(Selector.OPEN).css('display', 'block'); + $(this).children(Selector.NAV_TREEVIEW).css('display', 'block'); + } + }); + return; + } + + // Search through the tree elements + this._config.target.find(Selector.LI).each(function () { + var text = $(this).children(Selector.LINK).first().text(); + + if (!_that._config.case_sensitive) { + text = text.toLowerCase(); + } + + if (text.search(value) == -1) { + // No results + $(this).css('display', 'none'); + } else { + // Found the result + // Make the parent LI visible + $(this).parents(Selector.LI).css('display', 'block'); + + // Make the parent nav-treeview visible + $(this).parents(Selector.NAV_TREEVIEW).addClass('menu-open').css('display', 'block'); + + // Make this element visible + $(this).css('display', 'block'); + } + }); + } + + // Static + + }], [{ + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (!data) { + data = new Search($(this), _config); + $(this).data(DATA_KEY, data); + } + + if (config === 'init') { + data[config](); + } + }); + } + }]); + + return Search; + }(); + + /** + * Data API + * ==================================================== + */ + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_WIDGET).each(function () { + Search._jQueryInterface.call($(this), 'init'); + }); + }); + + /** + * jQuery API + * ==================================================== + */ + + $.fn[NAME] = Search._jQueryInterface; + $.fn[NAME].Constructor = Search; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Search._jQueryInterface; + }; + + return Search; +}(jQuery); //# sourceMappingURL=adminlte.js.map diff --git a/dist/js/adminlte.js.map b/dist/js/adminlte.js.map index 882d30f33..062c9d26b 100644 --- a/dist/js/adminlte.js.map +++ b/dist/js/adminlte.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../build/js/src/AdminLTE.js"],"names":["Layout","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Event","SIDEBAR","Selector","HEADER","CONTENT","CONTENT_HEADER","WRAPPER","CONTROL_SIDEBAR","LAYOUT_FIXED","FOOTER","ClassName","HOLD","element","_element","_init","heights","window","height","outerHeight","max","_max","css","removeClass","fixLayoutHeight","on","resize","numbers","forEach","v","operation","each","data","_jQueryInterface","Constructor","noConflict","jQuery","Treeview","SELECTED","EXPANDED","COLLAPSED","LOAD_DATA_API","LI","LINK","TREEVIEW_MENU","OPEN","DATA_WIDGET","Default","trigger","animationSpeed","accordion","config","_config","_setupListeners","treeviewMenu","parentLi","expandedEvent","openMenuLi","siblings","first","openTreeview","find","collapse","slideDown","addClass","collapsedEvent","slideUp","event","$relativeTarget","currentTarget","next","is","preventDefault","parents","isOpen","hasClass","expand","document","toggle","extend","$treeview","call","PushMenu","SHOWN","TOGGLE_BUTTON","_isShown","shownEvent","show","button","closest","Widget","$this","ControlSidebar","DATA_API_KEY","CLICK_DATA_API","DATA_TOGGLE","CONTROL_SIDEBAR_OPEN","CONTROL_SIDEBAR_SLIDE","slide","_getConfig","undefined","Error"],"mappings":";;;;;;AAAA;;;;;;AAMA,IAAMA,SAAU,UAACC,CAAD,EAAO;AACrB;;AAEA;;;;;AAKA,MAAMC,OAAO,QAAb;AACA,MAAMC,WAAW,YAAjB;AACA,MAAMC,kBAAgBD,QAAtB;AACA,MAAME,qBAAqBJ,EAAEK,EAAF,CAAKJ,IAAL,CAA3B;;AAEA,MAAMK,QAAQ;AACZC,aAAS;AADG,GAAd;;AAIA,MAAMC,WAAW;AACfD,aAAS,eADM;AAEfE,YAAQ,cAFO;AAGfC,aAAS,kBAHM;AAIfC,oBAAgB,iBAJD;AAKfC,aAAS,UALM;AAMfC,qBAAiB,kBANF;AAOfC,kBAAc,eAPC;AAQfC,YAAQ;AARO,GAAjB;;AAWA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AbM,CAAP;AAcD;AAjG0B;;AAAA;AAAA;;AAoG7B;;;;;;AAMAnC,IAAEkF,QAAF,EAAYpD,EAAZ,CAAe,OAAf,EAAwBtB,SAAS4F,WAAjC,EAA8C,UAAU5B,KAAV,EAAiB;AAC7DA,UAAMK,cAAN;;AAEAoB,mBAAe3D,gBAAf,CAAgCgD,IAAhC,CAAqCtF,EAAE,IAAF,CAArC,EAA8C,QAA9C;AACD,GAJD;;AAMA;;;;;AAKAA,IAAEK,EAAF,CAAKJ,IAAL,IAAagG,eAAe3D,gBAA5B;AACAtC,IAAEK,EAAF,CAAKJ,IAAL,EAAWsC,WAAX,GAAyB0D,cAAzB;AACAjG,IAAEK,EAAF,CAAKJ,IAAL,EAAWuC,UAAX,GAAyB,YAAY;AACnCxC,MAAEK,EAAF,CAAKJ,IAAL,IAAaG,kBAAb;AACA,WAAO6F,eAAe3D,gBAAtB;AACD,GAHD;;AAKA,SAAO2D,cAAP;AAED,CA9HsB,CA8HpBxD,MA9HoB,CAAvB","file":"adminlte.js","sourcesContent":["/*!\n * AdminLTE v3.0.0-alpha (https://almsaeedstudio.com)\n * Copyright 2014-2016 Abdullah Almsaeed <abdullah@almsaeedstudio.com>\n * Project website Almsaeed Studio (https://almsaeedstudio.com)\n * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)\n */\nconst Layout = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Layout'\n const DATA_KEY = 'lte.layout'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SIDEBAR: 'sidebar'\n }\n\n const Selector = {\n SIDEBAR: '.main-sidebar',\n HEADER: '.main-header',\n CONTENT: '.content-wrapper',\n CONTENT_HEADER: '.content-header',\n WRAPPER: '.wrapper',\n CONTROL_SIDEBAR: '.control-sidebar',\n LAYOUT_FIXED: '.layout-fixed',\n FOOTER: '.main-footer'\n }\n\n const ClassName = {\n HOLD: 'hold-transition',\n SIDEBAR: 'main-sidebar',\n LAYOUT_FIXED: 'layout-fixed'\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class Layout {\n\n constructor(element) {\n this._element = element\n\n this._init()\n }\n\n // Public\n\n fixLayoutHeight() {\n let heights = [\n $(window).height(),\n $(Selector.HEADER).outerHeight(),\n $(Selector.FOOTER).outerHeight(),\n $(Selector.SIDEBAR).height()\n ],\n max = this._max(heights)\n\n $(Selector.CONTENT).css('min-height', max - (heights[1] + heights[2]))\n }\n\n // Private\n\n _init() {\n // Enable transitions\n $('body').removeClass(ClassName.HOLD)\n\n // Activate layout height watcher\n this.fixLayoutHeight()\n $(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu', () => {\n this.fixLayoutHeight()\n })\n $(window).resize(() => {\n this.fixLayoutHeight()\n })\n\n $('body, html').css('height', 'auto');\n }\n\n _max(numbers) {\n // Calculate the maximum number in a list\n let max = 0\n\n numbers.forEach((v) => {\n if (v > max) {\n max = v\n }\n })\n\n return max\n }\n\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Layout(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (operation) {\n data[operation]()\n }\n })\n }\n }\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Layout._jQueryInterface\n $.fn[NAME].Constructor = Layout\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Layout._jQueryInterface\n }\n\n return Layout\n\n})(jQuery)\n\nconst Treeview = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Treeview'\n const DATA_KEY = 'lte.treeview'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SELECTED: `selected${EVENT_KEY}`,\n EXPANDED: `expanded${EVENT_KEY}`,\n COLLAPSED: `collapsed${EVENT_KEY}`,\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI: '.nav-item',\n LINK: '.nav-link',\n TREEVIEW_MENU: '.nav-treeview',\n OPEN: '.menu-open',\n DATA_WIDGET: '[data-widget=\"treeview\"]'\n }\n\n const ClassName = {\n LI: 'nav-item',\n LINK: 'nav-link',\n TREEVIEW_MENU: 'nav-treeview',\n OPEN: 'menu-open'\n }\n\n const Default = {\n trigger: `${Selector.DATA_WIDGET} ${Selector.LINK}`,\n animationSpeed: 300,\n accordion: true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Treeview {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n init() {\n this._setupListeners()\n }\n\n expand(treeviewMenu, parentLi) {\n let expandedEvent = $.Event(Event.EXPANDED)\n\n if (this._config.accordion) {\n let openMenuLi = parentLi.siblings(Selector.OPEN).first()\n let openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()\n this.collapse(openTreeview, openMenuLi)\n }\n\n treeviewMenu.slideDown(this._config.animationSpeed, () => {\n parentLi.addClass(ClassName.OPEN)\n $(this._element).trigger(expandedEvent)\n })\n }\n\n collapse(treeviewMenu, parentLi) {\n let collapsedEvent = $.Event(Event.COLLAPSED)\n\n treeviewMenu.slideUp(this._config.animationSpeed, () => {\n parentLi.removeClass(ClassName.OPEN)\n $(this._element).trigger(collapsedEvent)\n treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()\n treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)\n })\n }\n\n collapseAll() {\n\n }\n\n expandAll() {\n\n }\n\n toggle(event) {\n let $relativeTarget = $(event.currentTarget)\n let treeviewMenu = $relativeTarget.next()\n\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\n return\n }\n\n event.preventDefault()\n\n let parentLi = $relativeTarget.parents(Selector.LI).first()\n let isOpen = parentLi.hasClass(ClassName.OPEN)\n\n if (isOpen) {\n this.collapse($(treeviewMenu), parentLi)\n } else {\n this.expand($(treeviewMenu), parentLi)\n }\n }\n\n // Private\n\n _setupListeners() {\n $(document).on('click', this._config.trigger, (event) => {\n this.toggle(event)\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Treeview($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n let $treeview = $(this)\n Treeview._jQueryInterface.call($treeview, 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Treeview._jQueryInterface\n $.fn[NAME].Constructor = Treeview\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Treeview._jQueryInterface\n }\n\n return Treeview\n\n})(jQuery)\n\nconst PushMenu = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'PushMenu'\n const DATA_KEY = 'lte.pushmenu'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n COLLAPSED: `collapsed${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`\n }\n\n const Selector = {\n COLLAPSED: 'sidebar-collapse',\n TOGGLE_BUTTON: '[data-widget=\"pushmenu\"]'\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class PushMenu {\n\n constructor(element) {\n this._element = element\n this._isShown = !$('body').hasClass(Selector.COLLAPSED) || $('body').hasClass('sidebar-open')\n }\n\n // Public\n\n show() {\n $('body').addClass('sidebar-open')\n .removeClass(Selector.COLLAPSED)\n\n this._isShown = true\n\n let shownEvent = $.Event(Event.SHOWN)\n $(this._element).trigger(shownEvent)\n }\n\n collapse() {\n $('body').removeClass('sidebar-open')\n .addClass(Selector.COLLAPSED)\n\n this._isShown = false\n\n let collapsedEvent = $.Event(Event.COLLAPSED)\n $(this._element).trigger(collapsedEvent)\n }\n\n toggle() {\n\n if (typeof this._isShown === 'undefined') {\n this._isShown = !$('body').hasClass(Selector.COLLAPSED) || $('body').hasClass('sidebar-open')\n }\n\n if (this._isShown) {\n this.collapse()\n } else {\n this.show()\n }\n }\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new PushMenu(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (operation) {\n data[operation]()\n }\n })\n }\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(document).on('click', Selector.TOGGLE_BUTTON, (event) => {\n event.preventDefault()\n\n let button = event.currentTarget\n\n if ($(button).data('widget') !== 'pushmenu') {\n button = $(button).closest(Selector.TOGGLE_BUTTON)\n }\n\n PushMenu._jQueryInterface.call($(button), 'toggle')\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = PushMenu._jQueryInterface\n $.fn[NAME].Constructor = PushMenu\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return PushMenu._jQueryInterface\n }\n\n return PushMenu\n\n})(jQuery)\n\nconst Widget = (($) => {\n 'use strict'\n\n class Widget {\n\n constructor(element) {\n this._element = element\n }\n\n static _jQueryInterface(element) {\n let $this = $(element)\n $this.show()\n }\n }\n\n return Widget\n\n})(jQuery)\n\nconst ControlSidebar = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'ControlSidebar'\n const DATA_KEY = 'lte.control.sidebar'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const DATA_API_KEY = '.data-api'\n\n const Event = {\n CLICK_DATA_API: `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const Selector = {\n CONTROL_SIDEBAR: '.control-sidebar',\n DATA_TOGGLE : '[data-widget=\"control-sidebar\"]'\n }\n\n const ClassName = {\n CONTROL_SIDEBAR_OPEN : 'control-sidebar-open',\n CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open'\n }\n\n const Default = {\n slide: true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class ControlSidebar {\n\n constructor(element, config) {\n this._element = element\n this._config = this._getConfig(config);\n }\n\n // Public\n\n show() {\n // Show the control sidebar\n if (this._config.slide) {\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE)\n } else {\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN)\n }\n }\n\n collapse() {\n // Collapse the control sidebar\n if (this._config.slide) {\n $('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE)\n } else {\n $('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN)\n }\n }\n\n toggle() {\n if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {\n // Open the control sidebar\n this.show()\n } else {\n // Close the control sidebar\n this.collapse()\n }\n }\n\n // Private\n\n _getConfig(config) {\n return $.extend({}, Default, config)\n }\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new ControlSidebar(this, $(this).data())\n $(this).data(DATA_KEY, data)\n }\n\n if(data[operation] === undefined) {\n throw new Error(`${operation} is not a function`)\n }\n\n data[operation]();\n })\n }\n }\n\n /**\n *\n * Data Api implementation\n * ====================================================\n */\n\n $(document).on('click', Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n ControlSidebar._jQueryInterface.call($(this), 'toggle')\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = ControlSidebar._jQueryInterface\n $.fn[NAME].Constructor = ControlSidebar\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ControlSidebar._jQueryInterface\n }\n\n return ControlSidebar\n\n})(jQuery)\n"]} \ No newline at end of file +{"version":3,"sources":["../../build/js/src/AdminLTE.js"],"names":["Layout","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","fn","Event","SIDEBAR","Selector","HEADER","CONTENT","CONTENT_HEADER","WRAPPER","CONTROL_SIDEBAR","LAYOUT_FIXED","FOOTER","ClassName","HOLD","element","_element","_init","heights","window","height","outerHeight","max","_max","css","removeClass","fixLayoutHeight","on","resize","numbers","forEach","v","operation","each","data","_jQueryInterface","Constructor","noConflict","jQuery","Treeview","SELECTED","EXPANDED","COLLAPSED","LOAD_DATA_API","LI","LINK","TREEVIEW_MENU","OPEN","DATA_WIDGET","Default","trigger","animationSpeed","accordion","config","_config","_setupListeners","treeviewMenu","parentLi","expandedEvent","openMenuLi","siblings","first","openTreeview","find","collapse","slideDown","addClass","collapsedEvent","slideUp","event","$relativeTarget","currentTarget","next","is","preventDefault","parents","isOpen","hasClass","expand","document","toggle","extend","$treeview","call","PushMenu","SHOWN","TOGGLE_BUTTON","_isShown","shownEvent","show","button","closest","Widget","$this","ControlSidebar","DATA_API_KEY","CLICK_DATA_API","DATA_TOGGLE","CONTROL_SIDEBAR_OPEN","CONTROL_SIDEBAR_SLIDE","slide","_getConfig","undefined","Error","Search","ACTIVE","NAV_TREEVIEW","target","case_sensitive","_open_menus","submit","keyup","value","val","toLowerCase","search","bind","_that","children","text"],"mappings":";;;;;;AAAA;;;;;;AAMA,IAAMA,SAAU,UAACC,CAAD,EAAO;AACrB;;AAEA;;;;;AAKA,MAAMC,OAAO,QAAb;AACA,MAAMC,WAAW,YAAjB;AACA,MAAMC,kBAAgBD,QAAtB;AACA,MAAME,qBAAqBJ,EAAEK,EAAF,CAAKJ,IAAL,CAA3B;;AAEA,MAAMK,QAAQ;AACZC,aAAS;AADG,GAAd;;AAIA,MAAMC,WAAW;AACfD,aAAS,eADM;AAEfE,YAAQ,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MA;;;;;AAKAA,IAAEK,EAAF,CAAKJ,IAAL,IAAa0G,OAAOrE,gBAApB;AACAtC,IAAEK,EAAF,CAAKJ,IAAL,EAAWsC,WAAX,GAAyBoE,MAAzB;AACA3G,IAAEK,EAAF,CAAKJ,IAAL,EAAWuC,UAAX,GAAyB,YAAY;AACnCxC,MAAEK,EAAF,CAAKJ,IAAL,IAAaG,kBAAb;AACA,WAAOuG,OAAOrE,gBAAd;AACD,GAHD;;AAKA,SAAOqE,MAAP;AAED,CA/Kc,CA+KZlE,MA/KY,CAAf","file":"adminlte.js","sourcesContent":["/*!\n * AdminLTE v3.0.0-alpha (https://almsaeedstudio.com)\n * Copyright 2014-2016 Abdullah Almsaeed <abdullah@almsaeedstudio.com>\n * Project website Almsaeed Studio (https://almsaeedstudio.com)\n * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)\n */\nconst Layout = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Layout'\n const DATA_KEY = 'lte.layout'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SIDEBAR: 'sidebar'\n }\n\n const Selector = {\n SIDEBAR: '.main-sidebar',\n HEADER: '.main-header',\n CONTENT: '.content-wrapper',\n CONTENT_HEADER: '.content-header',\n WRAPPER: '.wrapper',\n CONTROL_SIDEBAR: '.control-sidebar',\n LAYOUT_FIXED: '.layout-fixed',\n FOOTER: '.main-footer'\n }\n\n const ClassName = {\n HOLD: 'hold-transition',\n SIDEBAR: 'main-sidebar',\n LAYOUT_FIXED: 'layout-fixed'\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class Layout {\n\n constructor(element) {\n this._element = element\n\n this._init()\n }\n\n // Public\n\n fixLayoutHeight() {\n let heights = [\n $(window).height(),\n $(Selector.HEADER).outerHeight(),\n $(Selector.FOOTER).outerHeight(),\n $(Selector.SIDEBAR).height()\n ],\n max = this._max(heights)\n\n $(Selector.CONTENT).css('min-height', max - (heights[1] + heights[2]))\n }\n\n // Private\n\n _init() {\n // Enable transitions\n $('body').removeClass(ClassName.HOLD)\n\n // Activate layout height watcher\n this.fixLayoutHeight()\n $(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu', () => {\n this.fixLayoutHeight()\n })\n $(window).resize(() => {\n this.fixLayoutHeight()\n })\n\n $('body, html').css('height', 'auto');\n }\n\n _max(numbers) {\n // Calculate the maximum number in a list\n let max = 0\n\n numbers.forEach((v) => {\n if (v > max) {\n max = v\n }\n })\n\n return max\n }\n\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Layout(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (operation) {\n data[operation]()\n }\n })\n }\n }\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Layout._jQueryInterface\n $.fn[NAME].Constructor = Layout\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Layout._jQueryInterface\n }\n\n return Layout\n\n})(jQuery)\n\nconst Treeview = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Treeview'\n const DATA_KEY = 'lte.treeview'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n SELECTED : `selected${EVENT_KEY}`,\n EXPANDED : `expanded${EVENT_KEY}`,\n COLLAPSED : `collapsed${EVENT_KEY}`,\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI : '.nav-item',\n LINK : '.nav-link',\n TREEVIEW_MENU: '.nav-treeview',\n OPEN : '.menu-open',\n DATA_WIDGET : '[data-widget=\"treeview\"]'\n }\n\n const ClassName = {\n LI : 'nav-item',\n LINK : 'nav-link',\n TREEVIEW_MENU: 'nav-treeview',\n OPEN : 'menu-open'\n }\n\n const Default = {\n trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,\n animationSpeed: 300,\n accordion : true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Treeview {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n init() {\n this._setupListeners()\n }\n\n expand(treeviewMenu, parentLi) {\n let expandedEvent = $.Event(Event.EXPANDED)\n\n if (this._config.accordion) {\n let openMenuLi = parentLi.siblings(Selector.OPEN).first()\n let openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()\n this.collapse(openTreeview, openMenuLi)\n }\n\n treeviewMenu.slideDown(this._config.animationSpeed, () => {\n parentLi.addClass(ClassName.OPEN)\n $(this._element).trigger(expandedEvent)\n })\n }\n\n collapse(treeviewMenu, parentLi) {\n let collapsedEvent = $.Event(Event.COLLAPSED)\n\n treeviewMenu.slideUp(this._config.animationSpeed, () => {\n parentLi.removeClass(ClassName.OPEN)\n $(this._element).trigger(collapsedEvent)\n treeviewMenu.find(`${Selector.OPEN} > ${Selector.TREEVIEW_MENU}`).slideUp()\n treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN)\n })\n }\n\n collapseAll() {\n\n }\n\n expandAll() {\n\n }\n\n toggle(event) {\n let $relativeTarget = $(event.currentTarget)\n let treeviewMenu = $relativeTarget.next()\n\n if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {\n return\n }\n\n event.preventDefault()\n\n let parentLi = $relativeTarget.parents(Selector.LI).first()\n let isOpen = parentLi.hasClass(ClassName.OPEN)\n\n if (isOpen) {\n this.collapse($(treeviewMenu), parentLi)\n } else {\n this.expand($(treeviewMenu), parentLi)\n }\n }\n\n // Private\n\n _setupListeners() {\n $(document).on('click', this._config.trigger, (event) => {\n this.toggle(event)\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Treeview($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n let $treeview = $(this)\n Treeview._jQueryInterface.call($treeview, 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Treeview._jQueryInterface\n $.fn[NAME].Constructor = Treeview\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Treeview._jQueryInterface\n }\n\n return Treeview\n\n})(jQuery)\n\nconst PushMenu = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'PushMenu'\n const DATA_KEY = 'lte.pushmenu'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n COLLAPSED: `collapsed${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`\n }\n\n const Selector = {\n COLLAPSED: 'sidebar-collapse',\n TOGGLE_BUTTON: '[data-widget=\"pushmenu\"]'\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class PushMenu {\n\n constructor(element) {\n this._element = element\n this._isShown = !$('body').hasClass(Selector.COLLAPSED) || $('body').hasClass('sidebar-open')\n }\n\n // Public\n\n show() {\n $('body').addClass('sidebar-open')\n .removeClass(Selector.COLLAPSED)\n\n this._isShown = true\n\n let shownEvent = $.Event(Event.SHOWN)\n $(this._element).trigger(shownEvent)\n }\n\n collapse() {\n $('body').removeClass('sidebar-open')\n .addClass(Selector.COLLAPSED)\n\n this._isShown = false\n\n let collapsedEvent = $.Event(Event.COLLAPSED)\n $(this._element).trigger(collapsedEvent)\n }\n\n toggle() {\n\n if (typeof this._isShown === 'undefined') {\n this._isShown = !$('body').hasClass(Selector.COLLAPSED) || $('body').hasClass('sidebar-open')\n }\n\n if (this._isShown) {\n this.collapse()\n } else {\n this.show()\n }\n }\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new PushMenu(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (operation) {\n data[operation]()\n }\n })\n }\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(document).on('click', Selector.TOGGLE_BUTTON, (event) => {\n event.preventDefault()\n\n let button = event.currentTarget\n\n if ($(button).data('widget') !== 'pushmenu') {\n button = $(button).closest(Selector.TOGGLE_BUTTON)\n }\n\n PushMenu._jQueryInterface.call($(button), 'toggle')\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = PushMenu._jQueryInterface\n $.fn[NAME].Constructor = PushMenu\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return PushMenu._jQueryInterface\n }\n\n return PushMenu\n\n})(jQuery)\n\nconst Widget = (($) => {\n 'use strict'\n\n class Widget {\n\n constructor(element) {\n this._element = element\n }\n\n static _jQueryInterface(element) {\n let $this = $(element)\n $this.show()\n }\n }\n\n return Widget\n\n})(jQuery)\n\nconst ControlSidebar = (($) => {\n 'use strict'\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'ControlSidebar'\n const DATA_KEY = 'lte.control.sidebar'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const DATA_API_KEY = '.data-api'\n\n const Event = {\n CLICK_DATA_API: `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const Selector = {\n CONTROL_SIDEBAR: '.control-sidebar',\n DATA_TOGGLE : '[data-widget=\"control-sidebar\"]'\n }\n\n const ClassName = {\n CONTROL_SIDEBAR_OPEN : 'control-sidebar-open',\n CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open'\n }\n\n const Default = {\n slide: true\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n\n class ControlSidebar {\n\n constructor(element, config) {\n this._element = element\n this._config = this._getConfig(config);\n }\n\n // Public\n\n show() {\n // Show the control sidebar\n if (this._config.slide) {\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE)\n } else {\n $('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN)\n }\n }\n\n collapse() {\n // Collapse the control sidebar\n if (this._config.slide) {\n $('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE)\n } else {\n $('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN)\n }\n }\n\n toggle() {\n if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {\n // Open the control sidebar\n this.show()\n } else {\n // Close the control sidebar\n this.collapse()\n }\n }\n\n // Private\n\n _getConfig(config) {\n return $.extend({}, Default, config)\n }\n\n // Static\n\n static _jQueryInterface(operation) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new ControlSidebar(this, $(this).data())\n $(this).data(DATA_KEY, data)\n }\n\n if(data[operation] === undefined) {\n throw new Error(`${operation} is not a function`)\n }\n\n data[operation]();\n })\n }\n }\n\n /**\n *\n * Data Api implementation\n * ====================================================\n */\n\n $(document).on('click', Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n\n ControlSidebar._jQueryInterface.call($(this), 'toggle')\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = ControlSidebar._jQueryInterface\n $.fn[NAME].Constructor = ControlSidebar\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ControlSidebar._jQueryInterface\n }\n\n return ControlSidebar\n\n})(jQuery)\n\nconst Search = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Search'\n const DATA_KEY = 'lte.search'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n LOAD_DATA_API: `load${EVENT_KEY}`\n }\n\n const Selector = {\n LI : '.nav-item',\n LINK : '.nav-link',\n OPEN : '.menu-open',\n ACTIVE : '.active',\n TREEVIEW_MENU: '[data-widget=\"treeview\"]',\n NAV_TREEVIEW : '.nav-treeview',\n DATA_WIDGET : '[data-widget=\"search\"]'\n }\n\n const ClassName = {\n LI : 'nav-item',\n LINK : 'nav-link',\n NAV_TREEVIEW: 'nav-treeview',\n OPEN : 'menu-open'\n }\n\n const Default = {\n target : '',\n case_sensitive: false\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Search {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n this._open_menus = null\n }\n\n // Public\n\n init() {\n if (this._config.target === '') {\n this._config.target = this._element.closest(Selector.TREEVIEW_MENU)\n } else {\n this._config.target = $(this._config.target)\n }\n\n // Set treeview original state\n this._open_menus = this._config.target.find(Selector.OPEN)\n\n // Prevent form submission\n this._element.parents('form').first().submit(function (event) {\n event.preventDefault()\n })\n\n // Setup search function\n this._element.keyup(function (event) {\n event.preventDefault()\n\n let value = $(event.currentTarget).val()\n\n if (!this._config.case_sensitive) {\n value = value.toLowerCase()\n }\n\n this.search(value)\n }.bind(this))\n }\n\n search(value) {\n let _that = this\n\n // If the value is back to null\n if (!value) {\n // Close all treeviews\n this._config.target.find(Selector.LI)\n .css('display', 'block')\n .find(Selector.NAV_TREEVIEW)\n .css('display', 'none')\n\n // Open the originally opened treeviews\n this._config.target.find(Selector.OPEN).find(Selector.NAV_TREEVIEW).css('display', 'block')\n this._open_menus.each(function () {\n if (!$(this).hasClass(ClassName.OPEN)) {\n $(this).addClass(Selector.OPEN).css('display', 'block')\n $(this).children(Selector.NAV_TREEVIEW).css('display', 'block')\n }\n })\n return\n }\n\n // Search through the tree elements\n this._config.target.find(Selector.LI).each(function () {\n let text = $(this).children(Selector.LINK).first().text()\n\n if (!_that._config.case_sensitive) {\n text = text.toLowerCase()\n }\n\n if (text.search(value) == -1) {\n // No results\n $(this).css('display', 'none')\n } else { // Found the result\n // Make the parent LI visible\n $(this).parents(Selector.LI)\n .css('display', 'block')\n\n // Make the parent nav-treeview visible\n $(this).parents(Selector.NAV_TREEVIEW)\n .addClass('menu-open')\n .css('display', 'block')\n\n // Make this element visible\n $(this).css('display', 'block')\n }\n })\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 = $.extend({}, Default, $(this).data())\n\n if (!data) {\n data = new Search($(this), _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'init') {\n data[config]()\n }\n })\n }\n }\n\n /**\n * Data API\n * ====================================================\n */\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_WIDGET).each(function () {\n Search._jQueryInterface.call($(this), 'init')\n })\n })\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Search._jQueryInterface\n $.fn[NAME].Constructor = Search\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Search._jQueryInterface\n }\n\n return Search\n\n})(jQuery)\n"]} \ No newline at end of file diff --git a/dist/js/adminlte.min.js b/dist/js/adminlte.min.js index 0b655f4f3..755404b68 100644 --- a/dist/js/adminlte.min.js +++ b/dist/js/adminlte.min.js @@ -1 +1 @@ -"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),Layout=function(a){var b="Layout",c="lte.layout",d=a.fn[b],e={SIDEBAR:".main-sidebar",HEADER:".main-header",CONTENT:".content-wrapper",CONTENT_HEADER:".content-header",WRAPPER:".wrapper",CONTROL_SIDEBAR:".control-sidebar",LAYOUT_FIXED:".layout-fixed",FOOTER:".main-footer"},f={HOLD:"hold-transition",SIDEBAR:"main-sidebar",LAYOUT_FIXED:"layout-fixed"},g=function(){function b(a){_classCallCheck(this,b),this._element=a,this._init()}return _createClass(b,[{key:"fixLayoutHeight",value:function(){var b=[a(window).height(),a(e.HEADER).outerHeight(),a(e.FOOTER).outerHeight(),a(e.SIDEBAR).height()],c=this._max(b);a(e.CONTENT).css("min-height",c-(b[1]+b[2]))}},{key:"_init",value:function(){var b=this;a("body").removeClass(f.HOLD),this.fixLayoutHeight(),a(e.SIDEBAR).on("collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu",function(){b.fixLayoutHeight()}),a(window).resize(function(){b.fixLayoutHeight()}),a("body, html").css("height","auto")}},{key:"_max",value:function(a){var b=0;return a.forEach(function(a){a>b&&(b=a)}),b}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);e||(e=new b(this),a(this).data(c,e)),d&&e[d]()})}}]),b}();return a.fn[b]=g._jQueryInterface,a.fn[b].Constructor=g,a.fn[b].noConflict=function(){return a.fn[b]=d,g._jQueryInterface},g}(jQuery),Treeview=function(a){var b="Treeview",c="lte.treeview",d="."+c,e=a.fn[b],f={SELECTED:"selected"+d,EXPANDED:"expanded"+d,COLLAPSED:"collapsed"+d,LOAD_DATA_API:"load"+d},g={LI:".nav-item",LINK:".nav-link",TREEVIEW_MENU:".nav-treeview",OPEN:".menu-open",DATA_WIDGET:'[data-widget="treeview"]'},h={LI:"nav-item",LINK:"nav-link",TREEVIEW_MENU:"nav-treeview",OPEN:"menu-open"},i={trigger:g.DATA_WIDGET+" "+g.LINK,animationSpeed:300,accordion:!0},j=function(){function b(a,c){_classCallCheck(this,b),this._config=c,this._element=a}return _createClass(b,[{key:"init",value:function(){this._setupListeners()}},{key:"expand",value:function(b,c){var d=this,e=a.Event(f.EXPANDED);if(this._config.accordion){var i=c.siblings(g.OPEN).first(),j=i.find(g.TREEVIEW_MENU).first();this.collapse(j,i)}b.slideDown(this._config.animationSpeed,function(){c.addClass(h.OPEN),a(d._element).trigger(e)})}},{key:"collapse",value:function(b,c){var d=this,e=a.Event(f.COLLAPSED);b.slideUp(this._config.animationSpeed,function(){c.removeClass(h.OPEN),a(d._element).trigger(e),b.find(g.OPEN+" > "+g.TREEVIEW_MENU).slideUp(),b.find(g.OPEN).removeClass(h.OPEN)})}},{key:"collapseAll",value:function(){}},{key:"expandAll",value:function(){}},{key:"toggle",value:function(b){var c=a(b.currentTarget),d=c.next();if(d.is(g.TREEVIEW_MENU)){b.preventDefault();var e=c.parents(g.LI).first(),f=e.hasClass(h.OPEN);f?this.collapse(a(d),e):this.expand(a(d),e)}}},{key:"_setupListeners",value:function(){var b=this;a(document).on("click",this._config.trigger,function(a){b.toggle(a)})}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c),f=a.extend({},i,a(this).data());e||(e=new b(a(this),f),a(this).data(c,e)),"init"===d&&e[d]()})}}]),b}();return a(window).on(f.LOAD_DATA_API,function(){a(g.DATA_WIDGET).each(function(){var b=a(this);j._jQueryInterface.call(b,"init")})}),a.fn[b]=j._jQueryInterface,a.fn[b].Constructor=j,a.fn[b].noConflict=function(){return a.fn[b]=e,j._jQueryInterface},j}(jQuery),PushMenu=function(a){var b="PushMenu",c="lte.pushmenu",d="."+c,e=a.fn[b],f={COLLAPSED:"collapsed"+d,SHOWN:"shown"+d},g={COLLAPSED:"sidebar-collapse",TOGGLE_BUTTON:'[data-widget="pushmenu"]'},h=function(){function b(c){_classCallCheck(this,b),this._element=c,this._isShown=!a("body").hasClass(g.COLLAPSED)||a("body").hasClass("sidebar-open")}return _createClass(b,[{key:"show",value:function(){a("body").addClass("sidebar-open").removeClass(g.COLLAPSED),this._isShown=!0;var b=a.Event(f.SHOWN);a(this._element).trigger(b)}},{key:"collapse",value:function(){a("body").removeClass("sidebar-open").addClass(g.COLLAPSED),this._isShown=!1;var b=a.Event(f.COLLAPSED);a(this._element).trigger(b)}},{key:"toggle",value:function(){"undefined"==typeof this._isShown&&(this._isShown=!a("body").hasClass(g.COLLAPSED)||a("body").hasClass("sidebar-open")),this._isShown?this.collapse():this.show()}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);e||(e=new b(this),a(this).data(c,e)),d&&e[d]()})}}]),b}();return a(document).on("click",g.TOGGLE_BUTTON,function(b){b.preventDefault();var c=b.currentTarget;"pushmenu"!==a(c).data("widget")&&(c=a(c).closest(g.TOGGLE_BUTTON)),h._jQueryInterface.call(a(c),"toggle")}),a.fn[b]=h._jQueryInterface,a.fn[b].Constructor=h,a.fn[b].noConflict=function(){return a.fn[b]=e,h._jQueryInterface},h}(jQuery),Widget=function(a){var b=function(){function b(a){_classCallCheck(this,b),this._element=a}return _createClass(b,null,[{key:"_jQueryInterface",value:function(b){var c=a(b);c.show()}}]),b}();return b}(jQuery),ControlSidebar=function(a){var b="ControlSidebar",c="lte.control.sidebar",d=a.fn[b],e={CONTROL_SIDEBAR:".control-sidebar",DATA_TOGGLE:'[data-widget="control-sidebar"]'},f={CONTROL_SIDEBAR_OPEN:"control-sidebar-open",CONTROL_SIDEBAR_SLIDE:"control-sidebar-slide-open"},g={slide:!0},h=function(){function b(a,c){_classCallCheck(this,b),this._element=a,this._config=this._getConfig(c)}return _createClass(b,[{key:"show",value:function(){this._config.slide?a("body").removeClass(f.CONTROL_SIDEBAR_SLIDE):a("body").removeClass(f.CONTROL_SIDEBAR_OPEN)}},{key:"collapse",value:function(){this._config.slide?a("body").addClass(f.CONTROL_SIDEBAR_SLIDE):a("body").addClass(f.CONTROL_SIDEBAR_OPEN)}},{key:"toggle",value:function(){a("body").hasClass(f.CONTROL_SIDEBAR_OPEN)||a("body").hasClass(f.CONTROL_SIDEBAR_SLIDE)?this.show():this.collapse()}},{key:"_getConfig",value:function(b){return a.extend({},g,b)}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);if(e||(e=new b(this,a(this).data()),a(this).data(c,e)),void 0===e[d])throw new Error(d+" is not a function");e[d]()})}}]),b}();return a(document).on("click",e.DATA_TOGGLE,function(b){b.preventDefault(),h._jQueryInterface.call(a(this),"toggle")}),a.fn[b]=h._jQueryInterface,a.fn[b].Constructor=h,a.fn[b].noConflict=function(){return a.fn[b]=d,h._jQueryInterface},h}(jQuery); \ No newline at end of file +"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),Layout=function(a){var b="Layout",c="lte.layout",d=a.fn[b],e={SIDEBAR:".main-sidebar",HEADER:".main-header",CONTENT:".content-wrapper",CONTENT_HEADER:".content-header",WRAPPER:".wrapper",CONTROL_SIDEBAR:".control-sidebar",LAYOUT_FIXED:".layout-fixed",FOOTER:".main-footer"},f={HOLD:"hold-transition",SIDEBAR:"main-sidebar",LAYOUT_FIXED:"layout-fixed"},g=function(){function b(a){_classCallCheck(this,b),this._element=a,this._init()}return _createClass(b,[{key:"fixLayoutHeight",value:function(){var b=[a(window).height(),a(e.HEADER).outerHeight(),a(e.FOOTER).outerHeight(),a(e.SIDEBAR).height()],c=this._max(b);a(e.CONTENT).css("min-height",c-(b[1]+b[2]))}},{key:"_init",value:function(){var b=this;a("body").removeClass(f.HOLD),this.fixLayoutHeight(),a(e.SIDEBAR).on("collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu",function(){b.fixLayoutHeight()}),a(window).resize(function(){b.fixLayoutHeight()}),a("body, html").css("height","auto")}},{key:"_max",value:function(a){var b=0;return a.forEach(function(a){a>b&&(b=a)}),b}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);e||(e=new b(this),a(this).data(c,e)),d&&e[d]()})}}]),b}();return a.fn[b]=g._jQueryInterface,a.fn[b].Constructor=g,a.fn[b].noConflict=function(){return a.fn[b]=d,g._jQueryInterface},g}(jQuery),Treeview=function(a){var b="Treeview",c="lte.treeview",d="."+c,e=a.fn[b],f={SELECTED:"selected"+d,EXPANDED:"expanded"+d,COLLAPSED:"collapsed"+d,LOAD_DATA_API:"load"+d},g={LI:".nav-item",LINK:".nav-link",TREEVIEW_MENU:".nav-treeview",OPEN:".menu-open",DATA_WIDGET:'[data-widget="treeview"]'},h={LI:"nav-item",LINK:"nav-link",TREEVIEW_MENU:"nav-treeview",OPEN:"menu-open"},i={trigger:g.DATA_WIDGET+" "+g.LINK,animationSpeed:300,accordion:!0},j=function(){function b(a,c){_classCallCheck(this,b),this._config=c,this._element=a}return _createClass(b,[{key:"init",value:function(){this._setupListeners()}},{key:"expand",value:function(b,c){var d=this,e=a.Event(f.EXPANDED);if(this._config.accordion){var i=c.siblings(g.OPEN).first(),j=i.find(g.TREEVIEW_MENU).first();this.collapse(j,i)}b.slideDown(this._config.animationSpeed,function(){c.addClass(h.OPEN),a(d._element).trigger(e)})}},{key:"collapse",value:function(b,c){var d=this,e=a.Event(f.COLLAPSED);b.slideUp(this._config.animationSpeed,function(){c.removeClass(h.OPEN),a(d._element).trigger(e),b.find(g.OPEN+" > "+g.TREEVIEW_MENU).slideUp(),b.find(g.OPEN).removeClass(h.OPEN)})}},{key:"collapseAll",value:function(){}},{key:"expandAll",value:function(){}},{key:"toggle",value:function(b){var c=a(b.currentTarget),d=c.next();if(d.is(g.TREEVIEW_MENU)){b.preventDefault();var e=c.parents(g.LI).first(),f=e.hasClass(h.OPEN);f?this.collapse(a(d),e):this.expand(a(d),e)}}},{key:"_setupListeners",value:function(){var b=this;a(document).on("click",this._config.trigger,function(a){b.toggle(a)})}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c),f=a.extend({},i,a(this).data());e||(e=new b(a(this),f),a(this).data(c,e)),"init"===d&&e[d]()})}}]),b}();return a(window).on(f.LOAD_DATA_API,function(){a(g.DATA_WIDGET).each(function(){var b=a(this);j._jQueryInterface.call(b,"init")})}),a.fn[b]=j._jQueryInterface,a.fn[b].Constructor=j,a.fn[b].noConflict=function(){return a.fn[b]=e,j._jQueryInterface},j}(jQuery),PushMenu=function(a){var b="PushMenu",c="lte.pushmenu",d="."+c,e=a.fn[b],f={COLLAPSED:"collapsed"+d,SHOWN:"shown"+d},g={COLLAPSED:"sidebar-collapse",TOGGLE_BUTTON:'[data-widget="pushmenu"]'},h=function(){function b(c){_classCallCheck(this,b),this._element=c,this._isShown=!a("body").hasClass(g.COLLAPSED)||a("body").hasClass("sidebar-open")}return _createClass(b,[{key:"show",value:function(){a("body").addClass("sidebar-open").removeClass(g.COLLAPSED),this._isShown=!0;var b=a.Event(f.SHOWN);a(this._element).trigger(b)}},{key:"collapse",value:function(){a("body").removeClass("sidebar-open").addClass(g.COLLAPSED),this._isShown=!1;var b=a.Event(f.COLLAPSED);a(this._element).trigger(b)}},{key:"toggle",value:function(){"undefined"==typeof this._isShown&&(this._isShown=!a("body").hasClass(g.COLLAPSED)||a("body").hasClass("sidebar-open")),this._isShown?this.collapse():this.show()}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);e||(e=new b(this),a(this).data(c,e)),d&&e[d]()})}}]),b}();return a(document).on("click",g.TOGGLE_BUTTON,function(b){b.preventDefault();var c=b.currentTarget;"pushmenu"!==a(c).data("widget")&&(c=a(c).closest(g.TOGGLE_BUTTON)),h._jQueryInterface.call(a(c),"toggle")}),a.fn[b]=h._jQueryInterface,a.fn[b].Constructor=h,a.fn[b].noConflict=function(){return a.fn[b]=e,h._jQueryInterface},h}(jQuery),Widget=function(a){var b=function(){function b(a){_classCallCheck(this,b),this._element=a}return _createClass(b,null,[{key:"_jQueryInterface",value:function(b){var c=a(b);c.show()}}]),b}();return b}(jQuery),ControlSidebar=function(a){var b="ControlSidebar",c="lte.control.sidebar",d=a.fn[b],e={CONTROL_SIDEBAR:".control-sidebar",DATA_TOGGLE:'[data-widget="control-sidebar"]'},f={CONTROL_SIDEBAR_OPEN:"control-sidebar-open",CONTROL_SIDEBAR_SLIDE:"control-sidebar-slide-open"},g={slide:!0},h=function(){function b(a,c){_classCallCheck(this,b),this._element=a,this._config=this._getConfig(c)}return _createClass(b,[{key:"show",value:function(){this._config.slide?a("body").removeClass(f.CONTROL_SIDEBAR_SLIDE):a("body").removeClass(f.CONTROL_SIDEBAR_OPEN)}},{key:"collapse",value:function(){this._config.slide?a("body").addClass(f.CONTROL_SIDEBAR_SLIDE):a("body").addClass(f.CONTROL_SIDEBAR_OPEN)}},{key:"toggle",value:function(){a("body").hasClass(f.CONTROL_SIDEBAR_OPEN)||a("body").hasClass(f.CONTROL_SIDEBAR_SLIDE)?this.show():this.collapse()}},{key:"_getConfig",value:function(b){return a.extend({},g,b)}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);if(e||(e=new b(this,a(this).data()),a(this).data(c,e)),void 0===e[d])throw new Error(d+" is not a function");e[d]()})}}]),b}();return a(document).on("click",e.DATA_TOGGLE,function(b){b.preventDefault(),h._jQueryInterface.call(a(this),"toggle")}),a.fn[b]=h._jQueryInterface,a.fn[b].Constructor=h,a.fn[b].noConflict=function(){return a.fn[b]=d,h._jQueryInterface},h}(jQuery),Search=function(a){var b="Search",c="lte.search",d="."+c,e=a.fn[b],f={LOAD_DATA_API:"load"+d},g={LI:".nav-item",LINK:".nav-link",OPEN:".menu-open",ACTIVE:".active",TREEVIEW_MENU:'[data-widget="treeview"]',NAV_TREEVIEW:".nav-treeview",DATA_WIDGET:'[data-widget="search"]'},h={LI:"nav-item",LINK:"nav-link",NAV_TREEVIEW:"nav-treeview",OPEN:"menu-open"},i={target:"",case_sensitive:!1},j=function(){function b(a,c){_classCallCheck(this,b),this._config=c,this._element=a,this._open_menus=null}return _createClass(b,[{key:"init",value:function(){""===this._config.target?this._config.target=this._element.closest(g.TREEVIEW_MENU):this._config.target=a(this._config.target),this._open_menus=this._config.target.find(g.OPEN),this._element.parents("form").first().submit(function(a){a.preventDefault()}),this._element.keyup(function(b){b.preventDefault();var c=a(b.currentTarget).val();this._config.case_sensitive||(c=c.toLowerCase()),this.search(c)}.bind(this))}},{key:"search",value:function(b){var c=this;return b?void this._config.target.find(g.LI).each(function(){var d=a(this).children(g.LINK).first().text();c._config.case_sensitive||(d=d.toLowerCase()),d.search(b)==-1?a(this).css("display","none"):(a(this).parents(g.LI).css("display","block"),a(this).parents(g.NAV_TREEVIEW).addClass("menu-open").css("display","block"),a(this).css("display","block"))}):(this._config.target.find(g.LI).css("display","block").find(g.NAV_TREEVIEW).css("display","none"),this._config.target.find(g.OPEN).find(g.NAV_TREEVIEW).css("display","block"),void this._open_menus.each(function(){a(this).hasClass(h.OPEN)||(a(this).addClass(g.OPEN).css("display","block"),a(this).children(g.NAV_TREEVIEW).css("display","block"))}))}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c),f=a.extend({},i,a(this).data());e||(e=new b(a(this),f),a(this).data(c,e)),"init"===d&&e[d]()})}}]),b}();return a(window).on(f.LOAD_DATA_API,function(){a(g.DATA_WIDGET).each(function(){j._jQueryInterface.call(a(this),"init")})}),a.fn[b]=j._jQueryInterface,a.fn[b].Constructor=j,a.fn[b].noConflict=function(){return a.fn[b]=e,j._jQueryInterface},j}(jQuery); \ No newline at end of file diff --git a/starter.html b/starter.html index 7ea516364..d72339406 100644 --- a/starter.html +++ b/starter.html @@ -185,7 +185,7 @@ to get the desired effect <form action="#" method="get" class="sidebar-form"> <div class="form-group has-icon"> - <input type="search" name="q" class="form-control" placeholder="Search" data-widget="treeview-search" data-target="#searchable-treeview"> + <input type="search" name="q" class="form-control" placeholder="Search" data-widget="search" data-target="#searchable-treeview"> <button type="submit" class="form-icon"><i class="fa fa-search"></i></button> </div> </form><!-- /.sidebar-form -->