{"version":3,"sources":["ey-design-system.js"],"names":["mediaValue","window","matchMedia","validateMediaScreen","matches","$","removeClass","addClass","removeMenu","hideDsMenu","document","undefined","pluginName","Plugin","element","options","this","_name","_defaults","fn","dsTextField","defaults","_variables","extend","init","prototype","buildCache","pReadOnly","$element","is","pDisabled","pClass","parent","bindEvents","destroy","unbindEvents","removeData","plugin","on","toolbar_options","search","siblings","lbl_selector","lblfloat_class","txtval","val","each","trim","length","hasClass","eye_selector","eyeShown","show_class","toggleClass","txt_selector","attr","parentId","id","pitemSelector","thisVal","finalSelect","str","toLowerCase","startsWith","res","replace","RegExp","x","children","html","itemhide_class","find","trigger","off","callback","onComplete","call","data","jQuery","dsDataTable","checboxAll","checkAllControl","actionsColumns","checbox","checkControl","event","sel","prop","checboxAllId","checboxes","dsFastFilter","toogleElement","classActive","dsGlobalHeader","click","evt","target","closest","container_search","button_search","hide","show","active_menu","menu_search","insertAfter","remove","dsInputFile","display_selector","fakePath","input_selector","toString","split","idSel","button_selector","txt_prefix_id","dsPagination","dsProgress","button","progress","bar","type","appendTo","setProgress","percentage","filter","width","height","e","absolute","finish","delay","fadeOut","preventDefault","progressTimed","seconds","cb","first","css","progressSet","setTimeout","progressFinish","isFunction","dsResizeElement","startX","startWidth","p","right","createElement","doDrag","style","clientX","stopDrag","documentElement","removeEventListener","className","append","addEventListener","parentPopup","clientY","parseInt","defaultView","getComputedStyle","dsSingleSelect","selectedMenuItems","value","setPageLabel","item_selector","text","checkboxOnClicked","menuitemOnClicked","keyCode","which","dropdowntoggleID","skipAll","checkboxOnChanged","multiselect_class","stopPropagation","cancelbtn_selector","cancelOnClicked","applybtn_selector","applyOnClicked","group_selector","grpid","groupbtn_selector","groupID","groupOnClicked","chkall","groupcheckboxOnChanged","multiSelect","pillclose_selector","closePillClicked","focusin","focusout","itmsel","lbl","textContent","checked","push","saveSelectedItem","showToolbar","selector","dropdown","itm","getElements","chk","chked","checkValues","updateCheckboxOnChanged","item","arr","some","arrVal","deleteElement","i","hideChild","chld","child_selector","updateGroupcheckboxOnChanged","inputCtr","setTextInput","roughScale","base","parsed","isNaN","resetElements","pid","pvalue","setLabelFloat","dn","float","pagelabel","pagelabel_html","pagelabelCtr","pagelabel_selector","err","cnt","data1","data2","updateSelectAllChkbox","isGroup","groupId","tog","pilll","pillv","chkval","chkallSel","updateSelectAllCheckInput","groupIdSel","chkValue","menu_selector","toggle_selector","dsToolbarComponent","display_parent_selector","countElements","btn_selector","close_display_selector","remove_all_selector","elements","map","a","b","forEach","elm","data_parent","render_pills","pill_class","c","d","template_options","countPills","max_elements_show","prepend","after","pill_class_count","pill_class_hidden","template_more","template_responsive","dsToolbarNavigation","settings","links","nav_link","breakpoint","activeLinks","$this","parents","methods","toggle","showModal","isVisible","el","hideToolbar","dsMobileMenuNavigation","apply","Array","slice","arguments","error","lastElement","clone","class","data-toggle","aria-expanded","role","aria-haspopup","data-target","aria-controls","prependTo","wrap","data-parent","aria-labelledby","collapse","firstElement","dsMobileMenuAddDOMElement","dsGetInitials","index","match","substring","toUpperCase","join","showMenu","hideMenu","toggleMenu","validateCallUrl","callUrl","hideFooter","initdsToolbarNavigation","active","$self","currentColor","counter","select","execCommand","dsCopyDataToClipboard","method","dsStepper","hasStarted","stepperContent","stepperControl","next","eq","prev","dsRangeSlider","currentPosition","opts","sliderHandles","sliderLine","sliderLeft","sliderRight","minVal","slider","doc","format","Intl","NumberFormat","getCurrentValue","step","max","min","showActiveControl","left","position","initialize","currentIndicator","changedTouches","pageX","offset","getValue","resize","dsTextAreaField","grp_selector","focus_classname","active_classname","dsAutocomplete","showResultBox","slideDown","input","resultBox","parentType","autoCompleteResult","reg","obj","title","matchTexts","currentValue","key","regex","mark","section","img","desc","subDesc"],"mappings":"AAAA,IAAIA,WAAaC,OAAOC,WAAW,sBAi+FnC,SAASC,sBACHH,WAAWI,QACbC,EAAE,YAAYC,YAAY,UAE1BD,EAAE,YAAYE,SAAS,UAI3B,SAASC,aACPH,EAAE,YAAYC,YAAY,UAC1BD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nDkV,EAAe1X,EAAEW,MAAM6B,MAC3B2U,EAAUjT,KAAK,yBAAyBkC,SACxC+Q,EAAUjT,KAAK,eAAekC,SAC9B,IAAI4G,EAAI,EACRhN,EAAEyC,KAAK4U,EAAoB,SAASM,EAAK5N,GACvC,IAAI6N,EAAQ,IAAI/T,OAAO6T,EAAc,MACjCG,EAAO9N,EAAMyN,MACd/T,cACAG,QAAQgU,EAAO,SAAWF,EAAe,UAAW,MAWvD,OATO,GAAL1K,GACiB,UAAjBjD,EAAM+N,SACNV,EAAWxU,SAAS,qBAEpBoK,IACAmK,EACGjT,KAAK,2BACLoF,OAAO,yCAEJS,EAAM+N,SACZ,IAAK,OACHX,EACGjT,KAAK,yBACLoF,OACC,uEACES,EAAMyN,MACN,UACAK,EACA,cAEN,MAEF,IAAK,SACH,IAAIlU,EACF,uEACAoG,EAAMyN,MACN,sFACAzN,EAAMgO,IACN,sCACAF,EACA,2BACA9N,EAAMiO,KACN,wBAEAjO,EAAMkO,QACN,0BAEFd,EAAUjT,KAAK,2BAA2BoF,OAAO3F,MAIvDqT,EAAcG,GAEdnX,EAAE,yBAAyBiC,GAAG,QAAS,WACrCiV,EAAM1U,IAAIxC,EAAEW,MAAMuC,KAAK,aACvBiU,EAAUjT,KAAK,yBAAyBkC,SACxC+Q,EAAUjT,KAAK,eAAekC,SAC9B4Q,EAAcG,OAIlBnX,EAAE,QAAQyF,MAAM,SAASC,GAClB1F,EAAE0F,EAAIC,QAAQC,QAAQsR,GAAOvU,QAChCuU,EACGvV,SACAuC,KAAK,mBACLkE,IAAI,UAAW,GACfrC,SAIApF,MAGFA,KAAKyV,cAEdpW,EAAEc,GAAGiW,eAAe/V,SAAW,CAC7BwD,KAAM,IA3IV,CA6IGC","sourcesContent":["var mediaValue = window.matchMedia(\"(max-width: 992px)\");\r\n// ---------------------------------\r\n// ---------- Text Field ----------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsTextField\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsTextField.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n\r\n this._variables.pReadOnly = this.$element.is(\"[readonly]\");\r\n this._variables.pDisabled = this.$element.is(\":disabled\");\r\n this._variables.pClass = \"\";\r\n if (!this._variables.pReadOnly && !this._variables.pDisabled) {\r\n this._variables.pClass = this.$element.parent();\r\n this.bindEvents();\r\n }\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n plugin.$element.on(\"focusin\" + \".\" + plugin._name, function() {\r\n if (!plugin.options.toolbar_options.search) {\r\n $(this)\r\n .siblings(plugin.options.lbl_selector)\r\n .addClass(plugin.options.lblfloat_class);\r\n }\r\n /*\r\n Use the \"call\" method so that inside of the method being\r\n called, ie: \"someOtherFunction\", the \"this\" keyword refers\r\n to the plugin instance, not the event handler.\r\n */\r\n });\r\n plugin.$element.on(\"focusout\" + \".\" + plugin._name, function() {\r\n var txtval = plugin.$element.val();\r\n plugin.$element.siblings(plugin.options.lbl_selector).each(function() {\r\n if (\r\n txtval.trim().length === 0 &&\r\n !plugin._variables.pClass.hasClass(\"dropdown-toggle--counter\")\r\n ) {\r\n $(this).removeClass(plugin.options.lblfloat_class);\r\n }\r\n });\r\n });\r\n\r\n plugin.$element\r\n .siblings(plugin.options.eye_selector)\r\n .on(\"click\" + \".\" + plugin._name, function() {\r\n var eyeShown = $(this).hasClass(plugin.options.show_class)\r\n ? \"password\"\r\n : \"text\";\r\n $(this).toggleClass(plugin.options.show_class);\r\n $(this)\r\n .siblings(plugin.options.txt_selector)\r\n .attr(\"type\", eyeShown);\r\n });\r\n\r\n if (\r\n !plugin._variables.pReadOnly &&\r\n plugin._variables.pClass.hasClass(\"dropdown-toggle\")\r\n ) {\r\n // parent is a drop down menu and textbox is not readonly\r\n var parentId = plugin.$element.parent()[0].id;\r\n var pitemSelector =\r\n '.dropdown-menu[aria-labelledby=\"' + parentId + '\"] .dropdown-item';\r\n plugin.$element.attr(\"items\", pitemSelector);\r\n plugin.$element.on(\"input\", function() {\r\n var thisVal = plugin.$element.val();\r\n var finalSelect = plugin.$element.attr(\"items\");\r\n\r\n $(finalSelect).each(function() {\r\n var str = $(this).attr(\"data-value\");\r\n if (str.toLowerCase().startsWith(thisVal.toLowerCase())) {\r\n var res = str.replace(new RegExp(thisVal, \"gi\"), function(x) {\r\n return \"\" + x + \"\";\r\n });\r\n if ($(this).hasClass(\"checkbox\")) {\r\n $(this)\r\n .children(\".checkbox__label\")\r\n .html(res);\r\n } else {\r\n $(this).html(res);\r\n }\r\n $(this).removeClass(plugin.options.itemhide_class);\r\n } else {\r\n if ($(this).hasClass(\"checkbox\")) {\r\n $(this)\r\n .children(\".checkbox__label\")\r\n .html(str);\r\n } else {\r\n $(this).html(str);\r\n }\r\n $(this).addClass(plugin.options.itemhide_class);\r\n }\r\n });\r\n });\r\n var dmSelector = '.dropdown-menu[aria-labelledby=\"' + parentId + '\"]';\r\n $(dmSelector)\r\n .parent()\r\n .on(\"shown.bs.dropdown\", function() {\r\n if (!plugin.options.toolbar_options.search) {\r\n plugin.$element\r\n .find(plugin.options.lbl_selector)\r\n .addClass(plugin.options.lblfloat_class);\r\n }\r\n plugin.$element.find(plugin.options.txt_selector).trigger(\"focus\");\r\n });\r\n }\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsTextField = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsTextField.defaults = {\r\n txt_selector: \".textinput-group__textinput\",\r\n lbl_selector: \".textinput-group__label\",\r\n eye_selector: \".textinput-group__togglepwdtext\",\r\n lblfloat_class: \"focus\",\r\n itemhide_class: \"hide\",\r\n show_class: \"show\",\r\n toolbar_options: {\r\n search: false\r\n }\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Data Table -----------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsDataTable\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsDataTable.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n\r\n plugin.$element\r\n .find(plugin.options.checboxAll)\r\n .on(\"change\", { plugin: plugin }, plugin.checkAllControl);\r\n\r\n plugin.$element\r\n .find(plugin.options.actionsColumns)\r\n .find(plugin.options.checbox)\r\n .on(\"change\", { plugin: plugin }, plugin.checkControl);\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n checkAllControl: function(event) {\r\n var plugin = event.data.plugin;\r\n var sel = plugin.options.checbox + \"[for='\" + $(this).attr(\"id\") + \"']\";\r\n $(sel).prop(\"checked\", $(this).is(\":checked\"));\r\n },\r\n checkControl: function(event) {\r\n var plugin = event.data.plugin;\r\n\r\n var checboxAllId = $(this).attr(\"for\");\r\n var checboxAllChk = $(this).is(\":checked\");\r\n var checboxAll = \"#\" + checboxAllId;\r\n if (!checboxAllChk) {\r\n $(checboxAll).prop(\"checked\", false);\r\n } else {\r\n var checboxes =\r\n plugin.options.checbox + \"[for='\" + checboxAllId + \"']:not(:checked)\";\r\n if ($(checboxes).length === 0) {\r\n $(checboxAll).prop(\"checked\", true);\r\n }\r\n }\r\n },\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsDataTable = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsDataTable.defaults = {\r\n checboxAll: \"#datatableChkAll\",\r\n checbox: \".checkbox__input\",\r\n actionsColumns: \".data-table-standard__actions\"\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Fast Filter ----------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsFastFilter\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsFastFilter.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n plugin.$element.on(\"click\", { plugin: plugin }, plugin.toogleElement);\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n toogleElement: function(event) {\r\n var plugin = event.data.plugin;\r\n\r\n $(this).toggleClass(plugin.options.classActive);\r\n },\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsFastFilter = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsFastFilter.defaults = {\r\n classActive: \"fastfilter--active\"\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Global Header --------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsGlobalHeader\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsGlobalHeader.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n $(\"body\").click(function(evt) {\r\n if (\r\n !$(evt.target).closest(plugin.options.container_search).length &&\r\n !$(evt.target).parent(plugin.options.button_search).length\r\n ) {\r\n if ($(plugin.options.container_search).is(\":visible\")) {\r\n $(plugin.options.container_search).hide();\r\n }\r\n }\r\n });\r\n\r\n plugin.$element.find(\r\n $(plugin.options.button_search).on(\"click\", function() {\r\n plugin.$element.find($(plugin.options.container_search).show());\r\n })\r\n );\r\n if (plugin.options.active_menu) {\r\n plugin.$element.find(\r\n $(plugin.options.menu_search).on(\"click\", function() {\r\n plugin.$element.find(\r\n $(\".global-header__search__menu\").addClass(\"showMobile\")\r\n );\r\n $(\"\")\r\n .insertAfter(\r\n plugin.$element.find($(\".global-header__search__menu\"))\r\n )\r\n .on(\"click\", function() {\r\n plugin.$element\r\n .find($(\".global-header__search__menu\"))\r\n .removeClass(\"showMobile\");\r\n plugin.$element\r\n .find($(\".navigation-bar-modal\"))\r\n .addClass(\"hideMobile\");\r\n $(this).remove();\r\n });\r\n })\r\n );\r\n }\r\n plugin.$element.find(\r\n $(\".btn-close\").on(\"click\", function() {\r\n plugin.$element.find(\r\n $(\".global-header__search__menu\").removeClass(\"showMobile\")\r\n );\r\n plugin.$element.find($(\".navigation-bar-modal\")).remove();\r\n })\r\n );\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsGlobalHeader = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsGlobalHeader.defaults = {\r\n container_search: \".global-header__search\",\r\n button_search: \".global-header__actions__button--search\",\r\n menu_search: \".global-header__actions__button--menu\",\r\n active_menu: true\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Input File ----------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsInputFile\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsInputFile.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n plugin.$element.on(\"change\" + \".\" + plugin._name, function() {\r\n $(this)\r\n .siblings(plugin.options.display_selector)\r\n .val(function() {\r\n var fakePath = $(this)\r\n .siblings(plugin.options.input_selector)\r\n .val()\r\n .toString()\r\n .split(\"\\\\\");\r\n return fakePath[fakePath.length - 1];\r\n });\r\n $(this)\r\n .siblings(plugin.options.dsTextField.lbl_selector)\r\n .addClass(plugin.options.dsTextField.lblfloat_class);\r\n /*\r\n Use the \"call\" method so that inside of the method being\r\n called, ie: \"someOtherFunction\", the \"this\" keyword refers\r\n to the plugin instance, not the event handler.\r\n */\r\n });\r\n plugin.$element\r\n .parent(\".textinput-group\")\r\n .siblings(\".textinput-group__button\")\r\n .on(\"click\", function() {\r\n var idSel = \"#\" + $(this).attr(\"for\");\r\n $(idSel).trigger(\"click\");\r\n });\r\n\r\n plugin.$element\r\n .siblings(\".textinput-group__textinput.fileinput\")\r\n .on(\"click\", function() {\r\n $(this)\r\n .siblings(plugin.options.input_selector)\r\n .trigger(\"click\");\r\n });\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsInputFile = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsInputFile.defaults = {\r\n input_selector: '.textinput-group__textinput[type=\"file\"]',\r\n button_selector: \".textinput-group__button\",\r\n display_selector: \".textinput-group__textinput.fileinput\",\r\n txt_prefix_id: \"#text-input-\",\r\n dsTextField: $.fn.dsTextField.defaults\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Pagination -----------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsPagination\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsPagination.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n plugin.$element\r\n .find(\"li .pagination-block__page, li .pagination-block__active\")\r\n .on(\"click\", function() {\r\n plugin.$element\r\n .find(\"li .pagination-block__active\")\r\n .removeClass(\"pagination-block__active\")\r\n .addClass(\"pagination-block__page\");\r\n $(this).addClass(\"pagination-block__active\");\r\n });\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsPagination = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsPagination.defaults = {};\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// ---------- Progress -------------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsProgress\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsProgress.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, $(this.element).data());\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n var button = plugin.$element,\r\n progress = 0;\r\n var bar = $('').appendTo(\r\n button\r\n );\r\n\r\n button.on(\"progress\", function(e, val, absolute, finish) {\r\n if (!button.hasClass(\"in-progress\")) {\r\n bar.show();\r\n progress = 0;\r\n button.removeClass(\"finished\").addClass(\"in-progress\");\r\n }\r\n if (absolute) {\r\n progress = val;\r\n } else {\r\n progress += val;\r\n }\r\n if (progress >= 100) {\r\n progress = 100;\r\n }\r\n if (finish) {\r\n button.removeClass(\"in-progress\").addClass(\"finished\");\r\n bar.delay(2000).fadeOut(function() {\r\n setProgress(0);\r\n });\r\n }\r\n setProgress(progress);\r\n });\r\n\r\n button.on(\"click\", function(e) {\r\n e.preventDefault();\r\n $(this).progressTimed(plugin.options.delay);\r\n });\r\n\r\n function setProgress(percentage) {\r\n bar\r\n .filter(\".background-horizontal,.background-bar\")\r\n .width(percentage + \"%\");\r\n bar.filter(\".background-vertical\").height(percentage + \"%\");\r\n }\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsProgress = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsProgress.defaults = {\r\n type: \"background-bar\",\r\n delay: 2\r\n };\r\n})(jQuery, window, document);\r\n\r\n$.fn.progressTimed = function(seconds, cb) {\r\n var button = this.first(),\r\n bar = button.find(\".tz-bar\");\r\n if (button.is(\".in-progress\")) {\r\n return this;\r\n }\r\n bar.css(\"transition\", seconds + \"s linear\");\r\n button.progressSet(99);\r\n window.setTimeout(function() {\r\n bar.css(\"transition\", \"\");\r\n button.progressFinish();\r\n\r\n if ($.isFunction(cb)) {\r\n cb();\r\n }\r\n }, seconds * 1000);\r\n};\r\n\r\n$.fn.progressSet = function(val) {\r\n val = val || 10;\r\n var finish = false;\r\n if (val >= 100) {\r\n finish = true;\r\n }\r\n return this.first().trigger(\"progress\", [val, true, finish]);\r\n};\r\n\r\n$.fn.progressFinish = function() {\r\n return this.first().progressSet(100);\r\n};\r\n// ---------------------------------\r\n// ---------- Progress -------------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsResizeElement\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsResizeElement.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, $(this.element).data());\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n //Here\r\n var p = plugin.$element;\r\n\r\n var element = null;\r\n var startX, startY, startWidth, startHeight;\r\n\r\n var right = document.createElement(\"div\");\r\n right.className = \"resizer-right\";\r\n p.append(right);\r\n right.addEventListener(\"mousedown\", initDrag, false);\r\n right.parentPopup = p;\r\n\r\n // var bottom = document.createElement(\"div\");\r\n // bottom.className = \"resizer-bottom\";\r\n // p.append(bottom);\r\n // bottom.addEventListener(\"mousedown\", initDrag, false);\r\n // bottom.parentPopup = p;\r\n\r\n // var both = document.createElement(\"div\");\r\n // both.className = \"resizer-both\";\r\n // p.append(both);\r\n // both.addEventListener(\"mousedown\", initDrag, false);\r\n // both.parentPopup = p;\r\n\r\n function initDrag(e) {\r\n $(\".example-container__iframe\").hide();\r\n element = this.parentPopup;\r\n\r\n startX = e.clientX;\r\n startY = e.clientY;\r\n startWidth = parseInt(\r\n document.defaultView.getComputedStyle(element[0]).width,\r\n 10\r\n );\r\n document.documentElement.addEventListener(\"mousemove\", doDrag, false);\r\n document.documentElement.addEventListener(\"mouseup\", stopDrag, false);\r\n }\r\n\r\n function doDrag(e) {\r\n element[0].style.width = startWidth + e.clientX - startX + \"px\";\r\n }\r\n\r\n function stopDrag() {\r\n $(\".example-container__iframe\").show();\r\n document.documentElement.removeEventListener(\r\n \"mousemove\",\r\n doDrag,\r\n false\r\n );\r\n document.documentElement.removeEventListener(\r\n \"mouseup\",\r\n stopDrag,\r\n false\r\n );\r\n }\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsResizeElement = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsResizeElement.defaults = {};\r\n})(jQuery, window, document);\r\n// ---------------------------------\r\n// ------ SingelSelect File --------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsSingleSelect\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsSingleSelect.defaults;\r\n this._variables = {};\r\n this.selectedMenuItems = { id: \"\", value: [] };\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element).find(\".dropdown-menu\");\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n var id = plugin.$element.attr(\"aria-labelledby\");\r\n plugin.setPageLabel(\".textinput-group__textinput\");\r\n plugin.$element\r\n .find(plugin.options.item_selector)\r\n // .find(\".checkbox__input\")\r\n .each(function() {\r\n $(this).attr(\r\n \"data-value\",\r\n $(this)\r\n .text()\r\n .trim()\r\n );\r\n $(this).on(\"click\", function() {\r\n if ($(this).hasClass(\"checkbox\")) {\r\n plugin.checkboxOnClicked($(this), id);\r\n } else {\r\n plugin.menuitemOnClicked($(this), id);\r\n }\r\n });\r\n $(this).on(\"keydown\", function(e) {\r\n var key = e.keyCode ? e.keyCode : e.which;\r\n if (key == 13) {\r\n $(this).trigger(\"click\");\r\n return false;\r\n }\r\n });\r\n $(this).on(\r\n \"change\",\r\n \".checkbox__input\",\r\n { dropdowntoggleID: id, skipAll: false, plugin: plugin },\r\n plugin.checkboxOnChanged\r\n );\r\n });\r\n\r\n plugin.$element.on(\"click\", function(e) {\r\n var sel = \"#\" + id;\r\n if (\r\n $(sel)\r\n .parent()\r\n .hasClass(plugin.options.multiselect_class)\r\n ) {\r\n e.stopPropagation(); //keep it open\r\n }\r\n });\r\n\r\n plugin.$element.on(\r\n \"click\",\r\n plugin.options.cancelbtn_selector,\r\n { dropdowntoggleID: id, plugin: plugin },\r\n plugin.cancelOnClicked\r\n );\r\n\r\n plugin.$element.on(\r\n \"click\",\r\n plugin.options.applybtn_selector,\r\n { dropdowntoggleID: id, plugin: plugin },\r\n plugin.applyOnClicked\r\n );\r\n\r\n plugin.$element.find(plugin.options.group_selector).each(function() {\r\n var grpid = $(this)[0].id;\r\n $(this).on(\r\n \"click\",\r\n plugin.options.groupbtn_selector,\r\n { groupID: grpid, plugin: plugin },\r\n plugin.groupOnClicked\r\n );\r\n $(this).on(\r\n \"change\",\r\n \".checkbox__input\",\r\n {\r\n groupID: grpid,\r\n dropdowntoggleID: id,\r\n chkall: false,\r\n plugin: plugin\r\n },\r\n plugin.groupcheckboxOnChanged\r\n );\r\n });\r\n\r\n if (plugin.options.multiSelect) {\r\n var id = plugin.$element\r\n .parent(\".dropdown--multi-select\")\r\n .find(\".dropdown-toggle\")\r\n .attr(\"id\");\r\n plugin.$element\r\n .parent(\".dropdown--multi-select\")\r\n .find(\".dropdown-toggle\")\r\n .on(\r\n \"click\",\r\n plugin.options.pillclose_selector,\r\n { dropdowntoggleID: id, plugin: plugin },\r\n plugin.closePillClicked\r\n );\r\n plugin.$element\r\n .find(\".dropdown-item.checkbox, .dropdown-header.checkbox\")\r\n .focusin(function() {\r\n $(this).addClass(\"focus\");\r\n })\r\n .focusout(function() {\r\n $(this).removeClass(\"focus\");\r\n });\r\n }\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n applyOnClicked: function(event) {\r\n var plugin = event.data.plugin;\r\n var val = [];\r\n var itmsel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n event.data.dropdowntoggleID +\r\n \"] .checkbox\";\r\n $(itmsel).each(function() {\r\n var lbl = $(this).children(\".checkbox__label\")[0].textContent;\r\n var chk = $(this).children(\".checkbox__input\")[0];\r\n if (chk.checked) {\r\n val.push(lbl);\r\n }\r\n });\r\n plugin.saveSelectedItem(event.data.dropdowntoggleID, val);\r\n if (plugin.options.toolbar_options.search) {\r\n $(\".navbar__form\")\r\n .data(\"plugin_dsToolbarComponent\")\r\n .showToolbar();\r\n }\r\n var selector = \"#\" + event.data.dropdowntoggleID;\r\n $(selector).dropdown(\"toggle\");\r\n },\r\n\r\n cancelOnClicked: function(event) {\r\n var plugin = event.data.plugin;\r\n\r\n var itm = plugin.getElements();\r\n if (itm) {\r\n itm = !itm ? [] : itm.value;\r\n var itmsel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n event.data.dropdowntoggleID +\r\n \"] .checkbox\";\r\n //reapply checked boxes\r\n $(itmsel).each(function() {\r\n //get label and chkbox\r\n //search label if in array and chk or unmark check box\r\n var lbl = $(this).children(\".checkbox__label\")[0].textContent;\r\n var chk = $(this).children(\".checkbox__input\")[0];\r\n\r\n var chked = plugin.checkValues(itm, lbl);\r\n if (chked != chk.checked) {\r\n chk.checked = chked;\r\n $(chk).trigger(\"change\");\r\n }\r\n });\r\n }\r\n var selector = \"#\" + event.data.dropdowntoggleID;\r\n $(selector).dropdown(\"toggle\");\r\n },\r\n\r\n checkboxOnChanged: function(event) {\r\n event.data.plugin.updateCheckboxOnChanged($(this), event.data);\r\n },\r\n\r\n checkboxOnClicked: function(item, dropdowntoggleID) {\r\n // var selector = \"#\" + dropdowntoggleID;\r\n // $(selector).dropdown(\"toggle\"); //keep it open\r\n },\r\n\r\n closePillClicked: function(event) {\r\n var plugin = event.data.plugin;\r\n var itmsel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n event.data.dropdowntoggleID +\r\n \"] .checkbox--all .checkbox__input\";\r\n $(itmsel).each(function() {\r\n this.checked = false;\r\n $(this).trigger(\"change\");\r\n });\r\n\r\n var val = [];\r\n plugin.saveSelectedItem(event.data.dropdowntoggleID, val);\r\n },\r\n\r\n checkValues: function(arr, val) {\r\n return arr.some(function(arrVal) {\r\n return val === arrVal;\r\n });\r\n },\r\n\r\n deleteElement: function(val) {\r\n this.selectedMenuItems.value = this.selectedMenuItems.value.filter(\r\n function(i) {\r\n return i !== val && i != \"Select All\";\r\n }\r\n );\r\n },\r\n\r\n getElements: function() {\r\n return this.selectedMenuItems;\r\n },\r\n\r\n groupOnClicked: function(event) {\r\n var plugin = event.data.plugin;\r\n\r\n var hideChild;\r\n if ($(this).hasClass(\"expand\")) {\r\n $(this).removeClass(\"expand\");\r\n $(this).addClass(\"collapse\");\r\n hideChild = true;\r\n } else {\r\n $(this).addClass(\"expand\");\r\n $(this).removeClass(\"collapse\");\r\n hideChild = false;\r\n }\r\n var chld =\r\n plugin.options.child_selector + '[for=\"' + event.data.groupID + '\"]';\r\n if (hideChild) {\r\n $(chld).addClass(\"hide\");\r\n } else {\r\n $(chld).removeClass(\"hide\");\r\n }\r\n },\r\n\r\n groupcheckboxOnChanged: function(event) {\r\n event.data.plugin.updateGroupcheckboxOnChanged(this, event.data);\r\n },\r\n\r\n menuitemOnClicked: function(item, dropdowntoggleID) {\r\n var plugin = this;\r\n\r\n var txtval = $(item).attr(\"data-value\");\r\n var selector = plugin.options.txt_prefix_id + dropdowntoggleID;\r\n var inputCtr = $(selector);\r\n inputCtr.val(txtval);\r\n inputCtr.siblings(\".textinput-group__label\").addClass(\"focus\");\r\n plugin.setPageLabel(selector);\r\n plugin.setTextInput(txtval);\r\n },\r\n\r\n roughScale: function(x, base) {\r\n var parsed = parseInt(x, base);\r\n if (isNaN(parsed)) {\r\n return 0;\r\n }\r\n return parsed;\r\n },\r\n\r\n resetElements: function() {\r\n this.selectedMenuItems = [];\r\n },\r\n\r\n saveSelectedItem: function(pid, pvalue) {\r\n this.selectedMenuItems = { id: pid, value: pvalue };\r\n },\r\n\r\n setLabelFloat: function(data) {\r\n var plugin = this;\r\n\r\n data.dn\r\n .children(plugin.options.dsTextField.txt_selector)\r\n .each(function() {\r\n if (data.float) {\r\n $(this)\r\n .siblings(plugin.options.dsTextField.lbl_selector)\r\n .addClass(plugin.options.dsTextField.lblfloat_class);\r\n } else if (\r\n $(this)\r\n .val()\r\n .trim().length === 0\r\n ) {\r\n $(this)\r\n .siblings(plugin.options.dsTextField.lbl_selector)\r\n .removeClass(plugin.options.dsTextField.lblfloat_class);\r\n }\r\n });\r\n },\r\n\r\n setPageLabel: function(selector) {\r\n var plugin = this;\r\n\r\n plugin.$element\r\n .parent()\r\n .find($(selector))\r\n .each(function() {\r\n try {\r\n var inputCtr = $(this);\r\n var pagelabel = plugin.options.pagelabel_html\r\n .replace(\"{0}\", inputCtr.val())\r\n .replace(\"{1}\", inputCtr.attr(\"max-page\"));\r\n var pagelabelCtr =\r\n plugin.options.pagelabel_selector +\r\n '[for=\"' +\r\n inputCtr[0].id +\r\n '\"]';\r\n $(pagelabelCtr).html(pagelabel);\r\n } catch (err) {}\r\n });\r\n },\r\n\r\n setTextInput: function(txtval) {\r\n var plugin = this;\r\n if (txtval) {\r\n plugin.$element\r\n .siblings(\"a.dropdown-toggle\")\r\n .find(\"input\")\r\n .val(txtval);\r\n }\r\n },\r\n\r\n updateCheckboxOnChanged: function(item, data) {\r\n var plugin = this;\r\n\r\n plugin.options.cnt++;\r\n if (\r\n $(item)\r\n .parent()\r\n .hasClass(\"checkbox--all\") &&\r\n !data.skipAll\r\n ) {\r\n var data1 = {\r\n dropdowntoggleID: data.dropdowntoggleID,\r\n skipAll: true,\r\n checked: $(item)[0].checked\r\n };\r\n $(item)\r\n .parent()\r\n .siblings(\".checkbox\")\r\n .children(\".checkbox__input\")\r\n .each(function() {\r\n if ($(this).checked != $(item)[0].checked) {\r\n plugin.updateCheckboxOnChanged($(this), data1);\r\n }\r\n });\r\n $(item)\r\n .parent()\r\n .siblings(\".dropdown__group\")\r\n .each(function() {\r\n var grpid = $(this)[0].id;\r\n $(this)\r\n .find(\".checkbox__input\")\r\n .each(function() {\r\n if (this.checked != $(item)[0].checked) {\r\n this.checked = $(item)[0].checked;\r\n //$(this).trigger(\"change\"); //trigger the group, not the item\r\n var data2 = {\r\n groupID: grpid,\r\n dropdowntoggleID: data.dropdowntoggleID,\r\n chkall: true\r\n };\r\n plugin.updateGroupcheckboxOnChanged($(item)[0], data2);\r\n }\r\n });\r\n });\r\n } else {\r\n if (data.skipAll) {\r\n if (item[0].checked != data.checked) {\r\n $(item)[0].checked = data.checked;\r\n } else {\r\n return;\r\n }\r\n } else {\r\n plugin.updateSelectAllChkbox({\r\n item: item[0],\r\n dropdowntoggleID: data.dropdowntoggleID,\r\n isGroup: false,\r\n groupId: \"\",\r\n chkall: false\r\n });\r\n }\r\n var selector = \"#\" + data.dropdowntoggleID;\r\n var tog = $(selector);\r\n var pill = tog.find(\".pill--dropdown\")[0];\r\n var pilll = tog.find(\".Pill__label\")[0];\r\n var pillv = plugin.roughScale(pilll.textContent, 10);\r\n var chk = $(item)[0].checked;\r\n if (chk == true) {\r\n pillv++;\r\n } else {\r\n pillv--;\r\n }\r\n pilll.textContent = pillv.toString();\r\n if (pillv > 0 && !tog.hasClass(\"dropdown-toggle--counter\")) {\r\n if (!plugin.options.toolbar_options.search) {\r\n tog.addClass(\"dropdown-toggle--counter\");\r\n plugin.setLabelFloat({\r\n dn: tog,\r\n float: true\r\n });\r\n } else {\r\n plugin.setLabelFloat({\r\n dn: tog,\r\n float: false\r\n });\r\n }\r\n } else if (pillv < 1 && tog.hasClass(\"dropdown-toggle--counter\")) {\r\n tog.removeClass(\"dropdown-toggle--counter\");\r\n plugin.setLabelFloat({ dn: tog, float: false });\r\n }\r\n\r\n //add Cheacked class to parent label element\r\n if (chk) {\r\n $(item[0])\r\n .parent(\"label.checkbox\")\r\n .addClass(\"checked\");\r\n } else {\r\n $(item[0])\r\n .parent(\"label.checkbox\")\r\n .removeClass(\"checked\");\r\n }\r\n }\r\n },\r\n\r\n updateGroupcheckboxOnChanged: function(item, data) {\r\n var plugin = this;\r\n var chld =\r\n plugin.options.child_selector +\r\n '[for=\"' +\r\n data.groupID +\r\n '\"] .checkbox__input';\r\n var chk = item.checked;\r\n var data1 = {\r\n dropdowntoggleID: data.dropdowntoggleID,\r\n skipAll: true,\r\n checked: chk,\r\n groupID: data.groupID\r\n };\r\n $(chld).each(function() {\r\n if (this.checked != chk) {\r\n plugin.updateCheckboxOnChanged($(this), data1);\r\n }\r\n });\r\n plugin.updateSelectAllChkbox({\r\n item: item,\r\n dropdowntoggleID: data.dropdowntoggleID,\r\n isGroup: true,\r\n groupId: data.groupID,\r\n chkall: data.chkall\r\n });\r\n // console.log(\"do check on check--all, triggered by \" + data.groupID);\r\n },\r\n\r\n updateSelectAllChkbox: function(data) {\r\n var plugin = this;\r\n //Data: item, dropdowntoggleID, isGroup, GroupId, chkall\r\n if (data.chkall) {\r\n return;\r\n }\r\n\r\n if (data.item.checked) {\r\n var chkval;\r\n var chkallSel;\r\n if (data.isGroup) {\r\n chkval = true;\r\n chkallSel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n data.dropdowntoggleID +\r\n \"] .dropdown__group .checkbox__input\";\r\n $(chkallSel).each(function() {\r\n chkval = chkval & this.checked;\r\n });\r\n plugin.updateSelectAllCheckInput(data.dropdowntoggleID, chkval);\r\n } else {\r\n chkval = true;\r\n chkallSel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n data.dropdowntoggleID +\r\n \"] .dropdown-item:not(.checkbox--all) .checkbox__input\";\r\n $(chkallSel).each(function() {\r\n chkval = chkval & this.checked;\r\n });\r\n plugin.updateSelectAllCheckInput(data.dropdowntoggleID, chkval);\r\n //checking item's group\r\n chkval = true;\r\n $(data.item)\r\n .closest(\".dropdown__group-child\")\r\n .each(function() {\r\n $(this)\r\n .find(\".checkbox__input\")\r\n .each(function() {\r\n chkval = chkval & this.checked;\r\n });\r\n\r\n chkallSel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n data.dropdowntoggleID +\r\n \"] #\" +\r\n $(this).attr(\"for\") +\r\n \" .checkbox__input\";\r\n\r\n $(chkallSel).each(function() {\r\n this.checked = chkval;\r\n });\r\n });\r\n }\r\n } else {\r\n //unchecking the Select All\r\n plugin.updateSelectAllCheckInput(data.dropdowntoggleID, false);\r\n\r\n //unchecking the group\r\n if (!data.isGroup) {\r\n $(data.item)\r\n .closest(\".dropdown__group-child\")\r\n .each(function() {\r\n var groupIdSel = \"#\" + $(this).attr(\"for\") + \" .checkbox__input\";\r\n $(groupIdSel).each(function() {\r\n this.checked = false;\r\n });\r\n });\r\n }\r\n }\r\n },\r\n\r\n updateSelectAllCheckInput: function(dropdowntoggleID, chkValue) {\r\n //unchecking the Select All\r\n var chkallSel =\r\n \".dropdown-menu[aria-labelledby=\" +\r\n dropdowntoggleID +\r\n \"] .checkbox--all .checkbox__input\";\r\n var chkall = $(chkallSel);\r\n\r\n $(chkall).each(function() {\r\n $(this)[0].checked = chkValue;\r\n });\r\n },\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsSingleSelect = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsSingleSelect.defaults = {\r\n cnt: 0,\r\n txt_prefix_id: \"#text-input-\",\r\n menu_selector: \".dropdown>.dropdown-menu\",\r\n toggle_selector: \".dropdown>.dropdown-toggle\",\r\n item_selector: \".dropdown-item\",\r\n multiSelect: false,\r\n pagelabel_selector: \".dropdown--pagination__label\",\r\n multiselect_class: \"dropdown--multi-select\",\r\n cancelbtn_selector: \".dropdown__cancelbutton\",\r\n applybtn_selector: \".dropdown__applybutton\",\r\n group_selector: \".dropdown__group\",\r\n groupbtn_selector: \".dropdown__group--btn\",\r\n child_selector: \".dropdown__group-child\",\r\n pillclose_selector: \".pill__close\",\r\n pagelabel_html:\r\n \"Items per page|Showing {0} of {1} items\",\r\n toolbar_options: {\r\n search: false\r\n },\r\n dsTextField: $.fn.dsTextField.defaults\r\n };\r\n})(jQuery, window, document);\r\n\r\n// ---------------------------------\r\n// -------- Toolbar Options --------\r\n// ---------------------------------\r\n// Brief plugin description\r\n// ------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsToolbarComponent\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsToolbarComponent.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n\r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n this.bindEvents();\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n\r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n\r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n\r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n $(\"body\").click(function(evt) {\r\n if (\r\n !$(evt.target).closest(\".navbar__form\").length &&\r\n !$(evt.target).parent(\".pill__close\").length\r\n ) {\r\n $(plugin.options.display_selector).hide();\r\n $(plugin.options.display_parent_selector).removeClass(\"active\");\r\n plugin.countElements() > 0\r\n ? $(plugin.options.input_selector).hide()\r\n : $(plugin.options.input_selector).show();\r\n }\r\n });\r\n plugin.$element\r\n .find($(plugin.options.input_selector))\r\n .on(\"click\", function() {\r\n if (!plugin.countElements() > 0) {\r\n if (!$(plugin.options.display_selector).is(\":visible\")) {\r\n $(plugin.options.display_selector).show();\r\n }\r\n $(plugin.options.display_parent_selector).addClass(\"active\");\r\n }\r\n });\r\n plugin.$element\r\n .find($(plugin.options.btn_selector))\r\n .on(\"click\", function() {\r\n if ($(plugin.options.display_parent_selector).hasClass(\"active\")) {\r\n $(plugin.options.display_selector).hide();\r\n if (plugin.countElements() > 0) {\r\n $(plugin.options.input_selector).hide();\r\n } else {\r\n $(plugin.options.input_selector).show();\r\n }\r\n $(plugin.options.display_parent_selector).removeClass(\"active\");\r\n } else {\r\n $(plugin.options.display_selector).show();\r\n $(plugin.options.input_selector).show();\r\n $(plugin.options.display_parent_selector).addClass(\"active\");\r\n }\r\n });\r\n plugin.$element\r\n .find($(plugin.options.close_display_selector))\r\n .on(\"click\", function() {\r\n $(plugin.options.display_selector).hide();\r\n });\r\n plugin.$element\r\n .find($(plugin.options.remove_all_selector))\r\n .on(\"click\", function() {\r\n plugin.resetElements();\r\n });\r\n\r\n plugin.$element.find(\r\n $(\".dropdown\").dsSingleSelect({\r\n multiSelect: true,\r\n toolbar_options: plugin.options.toolbar_options\r\n })\r\n );\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n countElements: function() {\r\n var plugin = this;\r\n var elements = [];\r\n var countElements = 0;\r\n $.each(plugin.$element.find($(\".dropdown\")), function() {\r\n elements.push(\r\n $(this)\r\n .data(\"plugin_dsSingleSelect\")\r\n .getElements()\r\n );\r\n });\r\n elements\r\n .map(function(i, e) {\r\n return i.value\r\n ? i.value.filter(function(a, b) {\r\n return a != \"Select All\";\r\n }).length\r\n : 0;\r\n })\r\n .forEach(function(i, e) {\r\n if (i) {\r\n countElements = countElements + i;\r\n }\r\n });\r\n return countElements;\r\n },\r\n\r\n deleteElement: function(elm, plugin) {\r\n var data_parent = $(elm).data(\"parent\");\r\n var value = $(elm)\r\n .find(\".Pill__label\")\r\n .text();\r\n $(\"#\" + data_parent)\r\n .siblings(\".dropdown-menu\")\r\n .find($(\".dropdown-item[data-value='\" + value + \"']\"))\r\n .find(\".checkbox__input\")\r\n .prop(\"checked\", false);\r\n\r\n $(\"#\" + data_parent)\r\n .siblings(\".dropdown-menu\")\r\n .find($(\".dropdown-item[data-value='\" + value + \"']\"))\r\n .removeClass(\"checked\");\r\n\r\n $(\"#\" + data_parent)\r\n .siblings(\".dropdown-menu\")\r\n .find($(\".dropdown-item[data-value='Select All']\"))\r\n .find(\".checkbox__input\")\r\n .prop(\"checked\", false);\r\n\r\n $(\"#\" + data_parent)\r\n .parent(\".dropdown--multi-select\")\r\n .data(\"plugin_dsSingleSelect\")\r\n .deleteElement(value);\r\n $(elm).remove();\r\n\r\n plugin.showToolbar();\r\n },\r\n\r\n getElements: function() {\r\n var plugin = this;\r\n var elements = [];\r\n\r\n $.each(plugin.$element.find($(\".dropdown\")), function() {\r\n elements.push(\r\n $(this)\r\n .data(\"plugin_dsSingleSelect\")\r\n .getElements()\r\n );\r\n });\r\n return elements.map(function(i, e) {\r\n return i ? i : { id: \"\", value: \"\" };\r\n });\r\n },\r\n\r\n showToolbar: function() {\r\n // get Elements of all dropdowns\r\n var plugin = this;\r\n\r\n var countElements = plugin.countElements();\r\n\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \"\"\r\n ).remove();\r\n\r\n $(\".dropdown-toggle\").removeClass(\"dropdown-filter\");\r\n $(plugin.options.remove_all_selector).hide();\r\n countElements > 0\r\n ? $(plugin.options.remove_all_selector).show()\r\n : $(plugin.options.remove_all_selector).hide();\r\n\r\n if (\r\n $(plugin.options.display_selector).is(\":visible\") ||\r\n countElements == 0\r\n ) {\r\n $(plugin.options.input_selector).show();\r\n }\r\n\r\n $(plugin.getElements()).each(function(a, b) {\r\n if (b) {\r\n $(b.value).each(function(c, d) {\r\n var html = \"\";\r\n if (d !== \"Select All\") {\r\n $(\"#\" + b.id).addClass(\"dropdown-filter\");\r\n html = plugin.options.toolbar_options.template_options\r\n .replace(\"{1}\", b.id)\r\n .replace(\"{2}\", d);\r\n var countPills = $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class\r\n ).length;\r\n\r\n if (\r\n countPills <=\r\n plugin.options.toolbar_options.max_elements_show - 1\r\n ) {\r\n if (countPills == 0) {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills\r\n ).prepend(html);\r\n } else {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \":last\"\r\n ).after(html);\r\n }\r\n } else {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class_count\r\n ).remove();\r\n if (\r\n countElements -\r\n plugin.options.toolbar_options.max_elements_show >\r\n 0\r\n ) {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \":not(.\" +\r\n plugin.options.toolbar_options.pill_class_hidden +\r\n \"):last\"\r\n ).after(\r\n plugin.options.toolbar_options.template_more.replace(\r\n \"{1}\",\r\n countElements -\r\n plugin.options.toolbar_options.max_elements_show\r\n )\r\n );\r\n }\r\n if (\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class_hidden\r\n ).length > 0\r\n ) {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \">.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class_hidden +\r\n \":last\"\r\n ).after(\r\n $(html).addClass(\r\n plugin.options.toolbar_options.pill_class_hidden\r\n )\r\n );\r\n } else {\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \" >.\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class_count +\r\n \":last\"\r\n ).after(\r\n $(html).addClass(\r\n plugin.options.toolbar_options.pill_class_hidden\r\n )\r\n );\r\n }\r\n }\r\n }\r\n });\r\n }\r\n });\r\n\r\n $(plugin.options.toolbar_options.display_selector).find(\r\n $(\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class_count\r\n ).on(\"click\", function() {\r\n if ($(plugin.options.display_selector).is(\":visible\")) {\r\n $(plugin.options.display_parent_selector).removeClass(\"active\");\r\n $(plugin.options.display_selector).hide();\r\n $(plugin.options.input_selector).hide();\r\n } else {\r\n $(plugin.options.display_parent_selector).addClass(\"active\");\r\n $(plugin.options.display_selector).show();\r\n $(plugin.options.input_selector).show();\r\n }\r\n })\r\n );\r\n\r\n $(plugin.options.toolbar_options.display_selector).find(\r\n $(\r\n \".\" + plugin.options.toolbar_options.pill_class + \">.pill__close>i\"\r\n ).on(\"click\", function() {\r\n plugin.deleteElement(\r\n $(this).closest(\".\" + plugin.options.toolbar_options.pill_class),\r\n plugin\r\n );\r\n })\r\n );\r\n\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills\r\n ).append(\r\n plugin.options.toolbar_options.template_responsive.replace(\r\n \"{1}\",\r\n countElements\r\n )\r\n );\r\n\r\n $(plugin.options.toolbar_options.display_selector).find(\r\n $(\r\n \".\" +\r\n plugin.options.toolbar_options.pill_class +\r\n \".responsive>.pill__close>i\"\r\n ).on(\"click\", function() {\r\n $(\".navbar__form\")\r\n .data(\"plugin_dsToolbarComponent\")\r\n .resetElements();\r\n })\r\n );\r\n },\r\n\r\n resetElements: function() {\r\n var plugin = this;\r\n\r\n plugin.$element.find(\".dropdown-item\").removeClass(\"checked\");\r\n\r\n $(\r\n plugin.options.toolbar_options.display_selector +\r\n \" \" +\r\n plugin.options.toolbar_options.render_pills +\r\n \" >.\" +\r\n plugin.options.toolbar_options.pill_class\r\n ).remove();\r\n $(\r\n plugin.options.toolbar_options.display_selector + \" .checkbox__input\"\r\n ).prop(\"checked\", false);\r\n $(\r\n plugin.options.toolbar_options.display_selector + \" .dropdown-toggle\"\r\n ).removeClass(\"dropdown-filter\");\r\n $(plugin.options.toolbar_options.remove_all_selector).hide();\r\n $(plugin.options.toolbar_options.input_selector).show();\r\n $.each(plugin.$element.find($(\".dropdown\")), function() {\r\n $(this)\r\n .data(\"plugin_dsSingleSelect\")\r\n .resetElements();\r\n });\r\n },\r\n\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsToolbarComponent = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n\r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsToolbarComponent.defaults = {\r\n display_parent_selector: \".navbar__form__content\",\r\n input_selector: \".navbar__form__input\",\r\n btn_selector: \".navbar__form__button\",\r\n display_selector: \".navbar__form__toolbar-menu\",\r\n close_display_selector: \".navbar__form__toolbar-menu__close\",\r\n remove_all_selector: \".navbar__form__toolbar-menu__remove-filters\",\r\n toolbar_options: {\r\n search: true,\r\n template_options:\r\n '{2}close',\r\n template_more:\r\n '+ {1} more',\r\n template_responsive:\r\n '{1}close',\r\n display_selector: \".navbar__form__content\",\r\n pill_class: \"pill\",\r\n max_elements_show: 3,\r\n pill_class_count: \"count\",\r\n pill_class_hidden: \"hidden\",\r\n render_pills: \".navbar__form__render-pills\",\r\n remove_all_selector: \".navbar__form__toolbar-menu__remove-filters\",\r\n input_selector: \".navbar__form__input\"\r\n }\r\n };\r\n})(jQuery, window, document);\r\n\r\nfunction validateMediaScreen() {\r\n if (mediaValue.matches) {\r\n $(\".sidebar\").removeClass(\"active\");\r\n } else {\r\n $(\".sidebar\").addClass(\"active\");\r\n }\r\n}\r\n\r\nfunction removeMenu() {\r\n $(\".sidebar\").removeClass(\"active\");\r\n $(\".overlay\").removeClass(\"active\");\r\n}\r\n\r\nfunction hideDsMenu() {\r\n if (mediaValue.matches) {\r\n removeMenu();\r\n }\r\n}\r\n\r\n/*\r\n * ------------------------------------------------------------------------\r\n * Navigation implementation\r\n * ------------------------------------------------------------------------\r\n */\r\n$.fn.dsToolbarNavigation = function(options) {\r\n // Establish our default settings\r\n var settings = $.extend(\r\n {\r\n links: false,\r\n nav_link: \"nav-link\",\r\n breakpoint: 992\r\n },\r\n options\r\n );\r\n //Active childrens\r\n activeLinks = function($this) {\r\n if ($(window).width() >= settings.breakpoint) {\r\n // Not a phone nor a tablet\r\n $(\".navigation-bar-primary__nav-link\").attr(\"data-toggle\", \"\"); // does not collapse\r\n } else {\r\n // The opposite\r\n $(\".navigation-bar-primary__nav-link\").attr(\"data-toggle\", \"collapse\");\r\n }\r\n if ($this.parent().children(\".navigation-bar-secondary\").length === 1) {\r\n $this\r\n .parents(\".navigation-bar-primary\")\r\n .find(\".navigation-bar-secondary\")\r\n .removeClass(\"active\");\r\n $(\"#\" + $this.attr(\"aria-controls\")).addClass(\"active\");\r\n }\r\n };\r\n return this.each(function() {\r\n var $this = $(this);\r\n if (!settings.links) {\r\n $this\r\n .find(\"a[class^='navigation-bar-'], button[class^='navigation-bar-']\")\r\n .on(\"click\", function() {\r\n if (!$(this).hasClass(\"disabled\")) {\r\n $(this)\r\n .parent(\"li\")\r\n .parent(\"ul\")\r\n .find(\"a, button\")\r\n .removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n }\r\n });\r\n } else {\r\n $this\r\n .find(\r\n \"a.navigation-bar-primary__nav-link, button.navigation-bar-primary__nav-link\"\r\n )\r\n .on(\"click\", function() {\r\n if (!$(this).hasClass(\"disabled\")) {\r\n $(this)\r\n .parents(\"ul\")\r\n .find(\r\n \"a.navigation-bar-primary__nav-link, button.navigation-bar-primary__nav-link\"\r\n )\r\n .removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n activeLinks($(this));\r\n }\r\n });\r\n $this.find(\"nav\").each(function() {\r\n $(this)\r\n .find(\r\n \"a.navigation-bar-secondary__nav-link, button.navigation-bar-secondary__nav-link\"\r\n )\r\n .on(\"click\", function() {\r\n if (!$(this).hasClass(\"disabled\")) {\r\n $(this)\r\n .parent(\"li\")\r\n .parent(\"ul\")\r\n .find(\"a, button\")\r\n .removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n }\r\n });\r\n });\r\n }\r\n });\r\n};\r\n\r\n/*\r\n * ------------------------------------------------------------------------\r\n * Right Side Menu Implementation\r\n * ------------------------------------------------------------------------\r\n */\r\n(function($) {\r\n var methods = {\r\n init: function(options) {},\r\n\r\n toggle: function() {\r\n this.toggleClass(function() {\r\n methods.showModal(true, this);\r\n if ($(this).is(\".hideMobile\")) {\r\n methods.showModal(false, this);\r\n methods.showModal(true, this);\r\n } else if ($(this).is(\".showMobile\")) {\r\n methods.showModal(false, this);\r\n }\r\n return $(this).is(\".showMobile, .hideMobile\")\r\n ? \"showMobile hideMobile\"\r\n : \"showMobile\";\r\n });\r\n },\r\n show: function() {\r\n this.removeClass(\"hideMobile\");\r\n this.addClass(\"showMobile\");\r\n methods.showModal(true, this);\r\n },\r\n hide: function() {\r\n this.removeClass(\"showMobile\");\r\n this.addClass(\"hideMobile\");\r\n methods.showModal(false, this);\r\n },\r\n showModal: function(isVisible, el) {\r\n if (isVisible) {\r\n $(\"\")\r\n .insertAfter(el)\r\n .on(\"click\", function() {\r\n $(el).removeClass(\"showMobile\");\r\n $(el).addClass(\"hideMobile\");\r\n $(this).remove();\r\n });\r\n } else {\r\n $(\".navigation-bar-modal\").remove();\r\n }\r\n },\r\n showToolbar: function() {\r\n var elm = this.find(\".navigation-bar-utility__button-container\");\r\n elm.removeClass(\"hideMobile\").addClass(\"showMobile\");\r\n methods.showModal(true, elm);\r\n },\r\n hideToolbar: function() {\r\n var elm = this.find(\".navigation-bar-utility__button-container\");\r\n elm.removeClass(\"showMobile\").addClass(\"hideMobile\");\r\n methods.showModal(false, elm);\r\n }\r\n };\r\n // Plugin declaration.\r\n $.fn.dsMobileMenuNavigation = function(options) {\r\n if (methods[options]) {\r\n return methods[options].apply(\r\n this,\r\n Array.prototype.slice.call(arguments, 1)\r\n );\r\n } else if (typeof options === \"object\" || !options) {\r\n // Default init\r\n return methods.init.apply(this, arguments);\r\n } else {\r\n $.error(\r\n \"This function \" +\r\n options +\r\n \" doesn't exist on jQuery.dsMobileMenuNavigation\"\r\n );\r\n }\r\n };\r\n})(jQuery);\r\n\r\n(function($) {\r\n var methods = {\r\n init: function(options) {\r\n // Move user link button\r\n $(options.lastElement)\r\n .children(\"a\")\r\n .clone()\r\n .attr({\r\n class: \"navigation-bar-primary__nav-link\",\r\n \"data-toggle\": \"collapse\",\r\n \"aria-expanded\": \"false\",\r\n role: \"button\",\r\n \"aria-haspopup\": \"\",\r\n \"data-target\": \"#linked-el\",\r\n \"aria-controls\": \"linked-el\"\r\n })\r\n .prependTo($(this))\r\n .wrap(\"
  • \");\r\n\r\n $(options.lastElement)\r\n .children(\"div\")\r\n .clone()\r\n .attr({\r\n class: \"navigation-bar-secondary collapse\",\r\n id: \"linked-el\",\r\n \"data-parent\": \"#usage-navigation-bar-primary\",\r\n \"aria-labelledby\": \"\"\r\n })\r\n .appendTo($(\"#init-pos\"))\r\n .find(\"a\")\r\n .attr(\"class\", \"navigation-bar-secondary__nav-link\")\r\n .wrap(\"
  • \");\r\n $(options.lastElement)\r\n .find($(\".navigation-bar-secondary\"))\r\n .collapse();\r\n\r\n // Move help link button\r\n $(options.firstElement)\r\n .clone()\r\n .attr({\r\n class: \"navigation-bar-secondary\"\r\n })\r\n .appendTo($(this))\r\n .wrap(\"
  • \");\r\n }\r\n };\r\n // Plugin declaration.\r\n $.fn.dsMobileMenuAddDOMElement = function(options) {\r\n if (methods[options]) {\r\n return methods[options].apply(\r\n this,\r\n Array.prototype.slice.call(arguments, 1)\r\n );\r\n } else if (typeof options === \"object\" || !options) {\r\n // Default init\r\n return methods.init.apply(this, arguments);\r\n } else {\r\n $.error(\r\n \"This function \" +\r\n options +\r\n \" doesn't exist on jQuery.dsMobileMenuNavigation\"\r\n );\r\n }\r\n };\r\n})(jQuery);\r\n\r\nvar dsGetInitials = (function($) {\r\n return {\r\n init: function(element) {\r\n $(element).each(function(index) {\r\n if (\r\n $(this)\r\n .text()\r\n .match(/\\s/i)\r\n ) {\r\n var res = Array.prototype.map\r\n .call(\r\n $(this)\r\n .text()\r\n .split(\" \"),\r\n function(x) {\r\n return x.substring(0, 1).toUpperCase();\r\n }\r\n )\r\n .join(\"\");\r\n $(this).text(res);\r\n }\r\n });\r\n }\r\n };\r\n})(jQuery);\r\n\r\n(function($) {\r\n var methods = {\r\n // PUBLIC FUNCTIONS\r\n init: function() {\r\n $(this).on(\"click\", function(e) {\r\n e.preventDefault();\r\n if (!settings.active) {\r\n settings.active = true;\r\n var $self = this;\r\n settings.currentColor = $(this)\r\n .find(\".colors__value:first\")\r\n .text();\r\n $(\".colors__hexval\").remove();\r\n $(this).append(\r\n \"\"\r\n );\r\n settings.element = $(\"#hex-\" + settings.counter);\r\n\r\n settings.element.val(settings.currentColor.slice(0, 7).toLowerCase());\r\n settings.element.select();\r\n document.execCommand(\"copy\");\r\n settings.counter++;\r\n $(this)\r\n .find(\"[class*='colors__chip-']\")\r\n .html(\r\n \"Copied!\"\r\n );\r\n // .text(\"Copied!\");\r\n setTimeout(function() {\r\n $(\".colors__hexval\").remove();\r\n $($self)\r\n .find(\"[class*='colors__chip-'] .colors__copied-text\")\r\n .remove();\r\n settings.active = false;\r\n }, 1000);\r\n }\r\n });\r\n }\r\n };\r\n\r\n $.fn.dsCopyDataToClipboard = function(method) {\r\n settings = {\r\n counter: 0,\r\n element: null,\r\n currentColor: \"\",\r\n active: false\r\n };\r\n\r\n if (methods[method]) {\r\n return methods[method].apply(\r\n this,\r\n Array.prototype.slice.call(arguments, 1)\r\n );\r\n } else if (typeof method === \"object\" || !method) {\r\n return methods.init.apply(this, arguments);\r\n } else {\r\n $.error(\"Method \" + method + \" does not exist\");\r\n }\r\n };\r\n})(jQuery);\r\n\r\nfunction showToolbar() {\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation(\"showToolbar\");\r\n}\r\nfunction hideToolbar() {\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation(\"hideToolbar\");\r\n}\r\nfunction showMenu() {\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation(\"show\");\r\n}\r\nfunction hideMenu() {\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation(\"hide\");\r\n}\r\nfunction toggleMenu() {\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation(\"toggle\");\r\n}\r\n\r\nfunction validateCallUrl(callUrl, hideFooter) {\r\n if (callUrl) {\r\n // $(\".loader-iframe\").show();\r\n $(\"body\").find($(\".sidebar\").hide());\r\n if (!hideFooter) {\r\n $(\"body\").find($(\".footer\").hide());\r\n }\r\n $(\"body\").find($(\".ey-page\").addClass(\"ey-page-100\"));\r\n $(\"body\").find($(\".sidebarCollapse\").hide());\r\n // setTimeout(function(){\r\n // $(\".loader-iframe\").hide();\r\n // },800);\r\n }\r\n}\r\nfunction initdsToolbarNavigation() {\r\n $(\"#usage-navigation-bar-primary\").dsToolbarNavigation({\r\n links: true\r\n });\r\n $(\"#navigation-bar-primary\").dsToolbarNavigation();\r\n $(\"#navigation-bar-secondary\").dsToolbarNavigation();\r\n $(\".navigation-bar-tertiary\").dsToolbarNavigation();\r\n\r\n $(\"#usage-navigation-bar-primary\").dsMobileMenuNavigation();\r\n $(\"#usage-navigation-bar-primary > ul\").dsMobileMenuAddDOMElement({\r\n firstElement: \".navigation-bar-stack-container .userprofile-group__help\",\r\n lastElement: \".navigation-bar-stack-container .userprofile__dropdown\"\r\n });\r\n}\r\nvar dsStepper = (function($) {\r\n var active = 0;\r\n var hasStarted = false;\r\n var stepperContent = null;\r\n var stepperControl = null;\r\n\r\n return {\r\n init: function() {\r\n stepperContent = $(\".stepper__slide\");\r\n stepperControl = $(\".stepper__control\");\r\n stepperContent.first().addClass(\"stepper__slide--active\");\r\n stepperControl.first().addClass(\"stepper__control--active\");\r\n },\r\n next: function() {\r\n if (active <= stepperContent.length - 2) {\r\n active++;\r\n hasStarted = true;\r\n stepperContent.each(function(index) {\r\n $(this).removeClass(\"stepper__slide--active\");\r\n });\r\n stepperContent.eq(active).addClass(\"stepper__slide--active\");\r\n\r\n stepperControl.each(function(index) {\r\n $(this).removeClass(\"stepper__control--active\");\r\n if (index <= active) {\r\n $(this).addClass(\"stepper__control--done\");\r\n }\r\n });\r\n stepperControl.eq(active).addClass(\"stepper__control--active\");\r\n }\r\n return hasStarted;\r\n },\r\n prev: function() {\r\n if (active >= 1) {\r\n active--;\r\n stepperContent.each(function(index) {\r\n $(this).removeClass(\"stepper__slide--active\");\r\n });\r\n stepperContent.eq(active).addClass(\"stepper__slide--active\");\r\n\r\n stepperControl.each(function(index) {\r\n $(this).removeClass(\"stepper__control--active\");\r\n });\r\n\r\n stepperControl.eq(active).addClass(\"stepper__control--active\");\r\n }\r\n if (active <= 0) {\r\n hasStarted = false;\r\n }\r\n return hasStarted;\r\n }\r\n };\r\n})(jQuery);\r\n\r\n(function($) {\r\n $.fn.dsRangeSlider = function(options) {\r\n var opts = $.extend({}, $.fn.dsRangeSlider.defaults, options);\r\n // support multiple elements\r\n if (this.length > 1) {\r\n this.each(function() {\r\n $(this).dsRangeSlider(opts);\r\n });\r\n return this;\r\n }\r\n\r\n // Private vars\r\n var currentPosition;\r\n var slider = $(this);\r\n var sliderHandles;\r\n var sliderLine;\r\n var sliderLeft;\r\n var sliderRight;\r\n var minVal;\r\n var maxVal;\r\n var doc = $(document);\r\n var settings = opts;\r\n var format = new Intl.NumberFormat(\"en-US\", settings.format);\r\n\r\n // private methods\r\n var getCurrentValue = function() {\r\n var step = parseInt(\r\n currentPosition / (sliderLine.width() / (settings.max - settings.min))\r\n );\r\n if (step <= 0) {\r\n step = 0;\r\n } else if (step + settings.min >= settings.max) {\r\n step = settings.max - settings.min;\r\n }\r\n\r\n return format.format(step + settings.min);\r\n };\r\n var showActiveControl = function() {\r\n var left = sliderLine.find(\".slider__line__left\");\r\n var right = sliderLine.find(\".slider__line__right\");\r\n if (sliderLeft.position().left <= sliderRight.position().left) {\r\n left.width(sliderLeft.position().left);\r\n } else {\r\n left.width(sliderRight.position().left);\r\n }\r\n if (sliderLeft.position().left <= sliderRight.position().left) {\r\n sliderLine;\r\n right.width(sliderLine.width() - sliderRight.position().left);\r\n } else {\r\n right.width(sliderLine.width() - sliderLeft.position().left);\r\n }\r\n };\r\n\r\n var restartHandlerPosition = function() {\r\n if (slider.length > 0) {\r\n if (sliderHandles.length == 2) {\r\n sliderLeft.css(\"left\", 0);\r\n sliderRight.css(\"left\", \"50%\");\r\n showActiveControl();\r\n } else {\r\n sliderLeft.css(\"left\", 0);\r\n }\r\n slider.find(\".slider__value-indicator\").text(\"\");\r\n minVal = settings.min;\r\n }\r\n };\r\n\r\n //Public methods\r\n this.initialize = function() {\r\n slider = $(this);\r\n sliderLine = slider.find(\".slider__line\");\r\n slider.find(\".slider__start\").text(format.format(settings.min));\r\n slider.find(\".slider__end\").text(format.format(settings.max));\r\n\r\n if (slider.hasClass(\"slider--range\")) {\r\n sliderLeft = slider.find(\".slider__control--left\");\r\n sliderRight = slider.find(\".slider__control--right\");\r\n sliderHandles = slider.find(\".slider__control\");\r\n } else {\r\n sliderLeft = slider.find(\".slider__control--left\");\r\n sliderHandles = slider.find(\".slider__control\");\r\n }\r\n //Define the default initial slider handles position\r\n if (sliderHandles.length == 2) {\r\n sliderLeft.css(\"left\", 0);\r\n sliderRight.css(\"left\", \"50%\");\r\n showActiveControl();\r\n }\r\n\r\n //Events\r\n sliderHandles.on(\"mouseenter\", function() {\r\n $(this).off(\"mousemove\");\r\n });\r\n sliderHandles.on(\"mousedown touchstart\", function() {\r\n var $self = $(this);\r\n var currentIndicator = $self.find(\".slider__value-indicator\");\r\n slider\r\n .find(\".slider__value-indicator\")\r\n .removeClass(\"slider__value-indicator--active\");\r\n currentIndicator.addClass(\"slider__value-indicator--active\");\r\n currentPosition = $self.position().left;\r\n doc.on(\"mousemove touchmove\", function(event) {\r\n if (sliderHandles.length == 2) {\r\n showActiveControl();\r\n }\r\n\r\n $self.find(\".slider__value-indicator\").text(getCurrentValue());\r\n minVal = getCurrentValue();\r\n $self\r\n .find(\".slider__value-indicator\")\r\n .css(\r\n \"margin-left\",\r\n \"-\" + $self.find(\".slider__value-indicator\").width() / 2 + \"px\"\r\n );\r\n if (event.type == \"touchmove\") {\r\n for (var i = 0; i < event.changedTouches.length; i++) {\r\n currentPosition =\r\n event.changedTouches[i].pageX - sliderLine.offset().left;\r\n }\r\n } else {\r\n currentPosition = event.pageX - sliderLine.offset().left;\r\n }\r\n\r\n //Define slider limits\r\n if (currentPosition >= 0 && currentPosition <= sliderLine.width()) {\r\n $self.css(\"left\", currentPosition);\r\n }\r\n if (currentPosition >= sliderLine.width()) {\r\n $self.css(\"left\", sliderLine.width());\r\n }\r\n if (currentPosition <= 0) {\r\n $self.css(\"left\", 0);\r\n }\r\n });\r\n });\r\n\r\n doc.on(\"mouseup touchend\", function() {\r\n if (sliderHandles.length == 2) {\r\n showActiveControl();\r\n }\r\n doc.off(\"mousemove touchmove\");\r\n });\r\n return this;\r\n };\r\n\r\n this.getValue = function() {\r\n return minVal;\r\n };\r\n $(window).resize(function() {\r\n restartHandlerPosition();\r\n });\r\n\r\n return this.initialize();\r\n };\r\n $.fn.dsRangeSlider.defaults = {\r\n min: 0,\r\n max: 100,\r\n format: {}\r\n };\r\n})(jQuery);\r\n\r\n// -------------------------------------\r\n// ---------- Text-Area Field ----------\r\n// -------------------------------------\r\n// Brief plugin description\r\n// -------------------------------------\r\n(function($, window, document, undefined) {\r\n var pluginName = \"dsTextAreaField\";\r\n // Create the plugin constructor\r\n function Plugin(element, options) {\r\n /*\r\n Provide local access to the DOM node(s) that called the plugin,\r\n as well local access to the plugin name and default options.\r\n */\r\n this.element = element;\r\n this._name = pluginName;\r\n this._defaults = $.fn.dsTextAreaField.defaults;\r\n this._variables = {};\r\n /*\r\n The \"$.extend\" method merges the contents of two or more objects,\r\n and stores the result in the first object. The first object is\r\n empty so that we don't alter the default options for future\r\n instances of the plugin.\r\n */\r\n this.options = $.extend({}, this._defaults, options);\r\n\r\n /*\r\n The \"init\" method is the starting point for all plugin logic.\r\n Calling the init method here in the \"Plugin\" constructor function\r\n allows us to store all methods (including the init method) in the\r\n plugin's prototype. Storing methods required by the plugin in its\r\n prototype lowers the memory footprint, as each instance of the\r\n plugin does not need to duplicate all of the same methods. Rather,\r\n each instance can inherit the methods from the constructor\r\n function's prototype.\r\n */\r\n this.init();\r\n }\r\n\r\n // Avoid Plugin.prototype conflicts\r\n $.extend(Plugin.prototype, {\r\n // Initialization logic\r\n init: function() {\r\n /*\r\n Create additional methods below and call them via\r\n \"this.myFunction(arg1, arg2)\", ie: \"this.buildCache();\".\r\n \r\n Note, you can cccess the DOM node(s), plugin name, default\r\n plugin options and custom plugin options for a each instance\r\n of the plugin by using the variables \"this.element\",\r\n \"this._name\", \"this._defaults\" and \"this.options\" created in\r\n the \"Plugin\" constructor function (as shown in the buildCache\r\n method below).\r\n */\r\n\r\n this.buildCache();\r\n\r\n this._variables.pReadOnly = this.$element.is(\"[readonly]\");\r\n this._variables.pDisabled = this.$element.is(\":disabled\");\r\n this._variables.pClass = \"\";\r\n if (!this._variables.pReadOnly && !this._variables.pDisabled) {\r\n this._variables.pClass = this.$element.parent();\r\n this.bindEvents();\r\n }\r\n },\r\n // Remove plugin instance completely\r\n destroy: function() {\r\n /*\r\n The destroy method unbinds all events for the specific instance\r\n of the plugin, then removes all plugin data that was stored in\r\n the plugin instance using jQuery's .removeData method.\r\n \r\n Since we store data for each instance of the plugin in its\r\n instantiating element using the $.data method (as explained\r\n in the plugin wrapper below), we can call methods directly on\r\n the instance outside of the plugin initalization, ie:\r\n $('selector').data('plugin_myPluginName').someOtherFunction();\r\n \r\n Consequently, the destroy method can be called using:\r\n $('selector').data('plugin_myPluginName').destroy();\r\n */\r\n this.unbindEvents();\r\n this.$element.removeData();\r\n },\r\n\r\n // Cache DOM nodes for performance\r\n buildCache: function() {\r\n /*\r\n Create variable(s) that can be accessed by other plugin\r\n functions. For example, \"this.$element = $(this.element);\"\r\n will cache a jQuery reference to the elementthat initialized\r\n the plugin. Cached variables can then be used in other methods. \r\n */\r\n this.$element = $(this.element);\r\n },\r\n\r\n // Bind events that trigger methods\r\n bindEvents: function() {\r\n var plugin = this;\r\n\r\n /*\r\n Bind event(s) to handlers that trigger other functions, ie:\r\n \"plugin.$element.on('click', function() {});\". Note the use of\r\n the cached variable we created in the buildCache method.\r\n \r\n All events are namespaced, ie:\r\n \".on('click'+'.'+this._name', function() {});\".\r\n This allows us to unbind plugin-specific events using the\r\n unbindEvents method below.\r\n */\r\n plugin.$element.on(\"focusin\" + \".\" + plugin._name, function() {\r\n $(this)\r\n .parents(plugin.options.grp_selector)\r\n .addClass(plugin.options.focus_classname);\r\n\r\n /*\r\n Use the \"call\" method so that inside of the method being\r\n called, ie: \"someOtherFunction\", the \"this\" keyword refers\r\n to the plugin instance, not the event handler.\r\n */\r\n });\r\n plugin.$element.on(\"focusout\" + \".\" + plugin._name, function() {\r\n var txtval = plugin.$element.val();\r\n plugin.$element.parents(plugin.options.grp_selector).each(function() {\r\n if (txtval.trim().length === 0) {\r\n $(this).removeClass(plugin.options.active_classname);\r\n } else if (\r\n $(this).hasClass(plugin.options.active_classname) == false\r\n ) {\r\n $(this).addClass(plugin.options.active_classname);\r\n }\r\n $(this).removeClass(plugin.options.focus_classname);\r\n });\r\n });\r\n },\r\n\r\n // Unbind events that trigger methods\r\n unbindEvents: function() {\r\n /*\r\n Unbind all events in our plugin's namespace that are attached\r\n to \"this.$element\".\r\n */\r\n this.$element.off(\".\" + this._name);\r\n },\r\n /*\r\n \"someOtherFunction\" is an example of a custom method in your\r\n plugin. Each method should perform a specific task. For example,\r\n the buildCache method exists only to create variables for other\r\n methods to access. The bindEvents method exists only to bind events\r\n to event handlers that trigger other methods. Creating custom\r\n plugin methods this way is less confusing (separation of concerns)\r\n and makes your code easier to test.\r\n */\r\n // Create custom methods\r\n callback: function() {\r\n // Cache onComplete option\r\n var onComplete = this.options.onComplete;\r\n\r\n if (typeof onComplete === \"function\") {\r\n /*\r\n Use the \"call\" method so that inside of the onComplete\r\n callback function the \"this\" keyword refers to the\r\n specific DOM node that called the plugin.\r\n */\r\n onComplete.call(this.element);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n Create a lightweight plugin wrapper around the \"Plugin\" constructor,\r\n preventing against multiple instantiations.\r\n */\r\n $.fn.dsTextAreaField = function(options) {\r\n this.each(function() {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n /*\r\n Use \"$.data\" to save each instance of the plugin in case\r\n the user wants to modify it. Using \"$.data\" in this way\r\n ensures the data is removed when the DOM element(s) are\r\n removed via jQuery methods, as well as when the userleaves\r\n the page. It's a smart way to prevent memory leaks.\r\n */\r\n $.data(this, \"plugin_\" + pluginName, new Plugin(this, options));\r\n }\r\n });\r\n /*\r\n \"return this;\" returns the original jQuery object. This allows\r\n additional jQuery methods to be chained.\r\n */\r\n return this;\r\n };\r\n\r\n /*\r\n Attach the default plugin options directly to the plugin object. This\r\n allows users to override default plugin options globally, instead of\r\n passing the same option(s) every time the plugin is initialized.\r\n \r\n For example, the user could set the \"property\" value once for all\r\n instances of the plugin with\r\n \"$.fn.pluginName.defaults.property = 'myValue';\". Then, every time\r\n plugin is initialized, \"property\" will be set to \"myValue\".\r\n */\r\n $.fn.dsTextAreaField.defaults = {\r\n grp_selector: \".textarea-group\",\r\n focus_classname: \"focus\",\r\n active_classname: \"active\"\r\n };\r\n})(jQuery, window, document);\r\n\r\n(function($) {\r\n $.fn.dsAutocomplete = function(options) {\r\n var opts = $.extend({}, $.fn.dsAutocomplete.defaults, options);\r\n // support multiple elements\r\n if (this.length > 1) {\r\n this.each(function() {\r\n $(this).dsAutocomplete(opts);\r\n });\r\n return this;\r\n }\r\n\r\n // private methods\r\n var matchTexts = function(data, input) {\r\n input = input.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\");\r\n if (input === \"\") return \"\";\r\n\r\n var reg = new RegExp(\r\n input\r\n .split(\"\")\r\n .join(\"\\\\w*\")\r\n .replace(/\\W/, \"\"),\r\n \"i\"\r\n );\r\n return data.filter(function(obj) {\r\n if (\"title\" in obj) {\r\n if (obj.title.match(reg)) {\r\n return obj.title;\r\n }\r\n }\r\n });\r\n };\r\n\r\n var showResultBox = function(el) {\r\n if (el.children().find(\".search__result__item\").length <= 0) {\r\n el.hide();\r\n el.parent().css(\"z-index\", 0);\r\n } else {\r\n el.slideDown(\"fast\");\r\n el.parent().css(\"z-index\", 2);\r\n }\r\n\r\n el.children()\r\n .find(\".search__result__item\")\r\n .on(\"focusout\", function(e) {\r\n if (\r\n el.children().find(\".search__result__item\").length - 1 ==\r\n $(this).index()\r\n ) {\r\n el.hide();\r\n el.css(\"z-index\", 0);\r\n }\r\n });\r\n };\r\n\r\n //Public methods\r\n this.initialize = function() {\r\n var input = $(this);\r\n var resultBox = $(this).siblings(\".search__result\");\r\n var parentType = $(this).parent(\".search\");\r\n showResultBox(resultBox);\r\n $(this).on(\"keyup\", function() {\r\n var autoCompleteResult = matchTexts(opts.data, $(this).val());\r\n var currentValue = $(this).val();\r\n resultBox.find(\".search__result__item\").remove();\r\n resultBox.find(\".main-title\").remove();\r\n var i = 0;\r\n $.each(autoCompleteResult, function(key, value) {\r\n var regex = new RegExp(currentValue, \"gi\");\r\n var mark = value.title\r\n .toLowerCase()\r\n .replace(regex, \"\" + currentValue + \"\", \"gi\");\r\n if (\r\n i == 0 &&\r\n value.section == \"people\" &&\r\n parentType.hasClass(\"search--filters\")\r\n ) {\r\n i++;\r\n resultBox\r\n .find(\".search__result__people\")\r\n .append('
    PEOPLE
    ');\r\n }\r\n switch (value.section) {\r\n case \"info\":\r\n resultBox\r\n .find(\".search__result__info\")\r\n .append(\r\n \"
    \" +\r\n mark +\r\n \"
    \"\r\n );\r\n break;\r\n\r\n case \"people\":\r\n var res =\r\n \"
    \" +\r\n mark +\r\n \"
    \" +\r\n value.desc +\r\n \" - \" +\r\n \"\" +\r\n value.subDesc +\r\n \"\" +\r\n \"
    \";\r\n resultBox.find(\".search__result__people\").append(res);\r\n break;\r\n }\r\n });\r\n showResultBox(resultBox);\r\n\r\n $(\".search__result__item\").on(\"click\", function() {\r\n input.val($(this).attr(\"data-val\"));\r\n resultBox.find(\".search__result__item\").remove();\r\n resultBox.find(\".main-title\").remove();\r\n showResultBox(resultBox);\r\n });\r\n });\r\n\r\n $(\"body\").click(function(evt) {\r\n if (!$(evt.target).closest(input).length) {\r\n input\r\n .parent()\r\n .find(\".search__result\")\r\n .css(\"z-index\", 0)\r\n .hide();\r\n }\r\n });\r\n\r\n return this;\r\n };\r\n\r\n return this.initialize();\r\n };\r\n $.fn.dsAutocomplete.defaults = {\r\n data: []\r\n };\r\n})(jQuery);\r\n\r\n//# sourceMappingURL=ey-design-system.js.map\r\n"],"file":"ey-design-system.min.js"}