This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/core/static/js/patternfly.min.js

2 lines
37 KiB
JavaScript
Raw Normal View History

2018-11-11 12:41:48 +00:00
!function(window){"use strict";var patternfly={version:"0.0.0-semantically-released"};patternfly.pfBreakpoints={tablet:768,desktop:1200},window.patternfly=patternfly}("undefined"!=typeof window?window:global),function(window){"use strict";window.patternfly.pfPaletteColors={black:"#030303",black100:"#fafafa",black200:"#ededed",black300:"#d1d1d1",black400:"#bbbbbb",black500:"#8b8d8f",black600:"#72767b",black700:"#4d5258",black800:"#393f44",black900:"#292e34",blue:"#0088ce",blue100:"#bee1f4",blue200:"#7dc3e8",blue300:"#39a5dc",blue400:"#0088ce",blue500:"#00659c",blue600:"#004368",blue700:"#002235",gold:"#f0ab00",gold100:"#fbeabc",gold200:"#f9d67a",gold300:"#f5c12e",gold400:"#f0ab00",gold500:"#b58100",gold600:"#795600",gold700:"#3d2c00",orange:"#ec7a08",orange100:"#fbdebf",orange200:"#f7bd7f",orange300:"#f39d3c",orange400:"#ec7a08",orange500:"#b35c00",orange600:"#773d00",orange700:"#3b1f00",lightBlue:"#00b9e4",lightBlue100:"#beedf9",lightBlue200:"#7cdbf3",lightBlue300:"#35caed",lightBlue400:"#00b9e4",lightBlue500:"#008bad",lightBlue600:"#005c73",lightBlue700:"#002d39",green:"#3f9c35",green100:"#cfe7cd",green200:"#9ecf99",green300:"#6ec664",green400:"#3f9c35",green500:"#2d7623",green600:"#1e4f18",green700:"#0f280d",lightGreen:"#92d400",lightGreen100:"#e4f5bc",lightGreen200:"#c8eb79",lightGreen300:"#ace12e",lightGreen400:"#92d400",lightGreen500:"#6ca100",lightGreen600:"#486b00",lightGreen700:"#253600",cyan:"#007a87",cyan100:"#bedee1",cyan200:"#7dbdc3",cyan300:"#3a9ca6",cyan400:"#007a87",cyan500:"#005c66",cyan600:"#003d44",cyan700:"#001f22",purple:"#703fec",purple100:"#c7bfff",purple200:"#a18fff",purple300:"#8461f7",purple400:"#703fec",purple500:"#582fc0",purple600:"#40199a",purple700:"#1f0066",red:"#cc0000",red100:"#cc0000",red200:"#a30000",red300:"#8b0000",red400:"#470000",red500:"#2c0000"}}("undefined"!=typeof window?window:global),function(window){"use strict";var patternfly=window.patternfly;patternfly.pfSetDonutChartTitle=function(selector,primary,secondary){var donutChartRightTitle=window.d3.select(selector).select("text.c3-chart-arcs-title");donutChartRightTitle.text(""),donutChartRightTitle.insert("tspan").text(primary).classed("donut-title-big-pf",!0).attr("dy",0).attr("x",0),donutChartRightTitle.insert("tspan").text(secondary).classed("donut-title-small-pf",!0).attr("dy",20).attr("x",0)},patternfly.pfDonutTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return'<table class="c3-tooltip"> <tr> <td><span style="background-color:'+color(d[0].id)+'"></span><strong>'+d[0].value+"</strong> "+d[0].name+"</td> <td>"+Math.round(1e3*d[0].ratio)/10+"%</td> </tr></table>"},patternfly.pfGetUtilizationDonutTooltipContentsFn=function(units){return function(d){return'<span class="donut-tooltip-pf" style="white-space: nowrap;">'+Math.round(1e3*d[0].ratio)/10+"% "+units+" "+d[0].name+"</span>"}},patternfly.pfGetBarChartTooltipContentsFn=function(categories){return function(d){return'<table class="c3-tooltip"> <tr> <td><strong>'+(categories?categories[d[0].index]:d[0].index)+":</td> <td>"+d[0].value+"</td> </tr></table>"}},patternfly.pfSingleLineChartTooltipContentsFn=function(categories){return function(d){return'<table class="c3-tooltip"> <tr> <td><strong>'+(categories?categories[d[0].index]:d[0].index)+":</td> <td>"+d[0].value+"</td> </tr></table>"}},patternfly.pfPieTooltipContents=function(d,defaultTitleFormat,defaultValueFormat,color){return patternfly.pfDonutTooltipContents(d,defaultTitleFormat,defaultValueFormat,color)},patternfly.c3ChartDefaults=function(){var getDefaultColors=function(){return{pattern:[patternfly.pfPaletteColors.blue,patternfly.pfPaletteColors.blue300,patternfly.pfPaletteColors.green,patternfly.pfPaletteColors.orange,patternfly.pfPaletteColors.red]}},getDefaultBarGrid=function(){return{y:{show:!0}}},getDefaultBarTooltip=function(categories){return{contents:patternfly.pfGetBarChartTooltipContentsFn(categories)}},getDefaultBarLegend=function(){return{show:!1}},getDefaultBarConfig=function(categories){return{color:this.getDefaultColors(),grid:this.getDefaultBarGrid()
}:$nav.hasClass("nav-pf-secondary-nav")?onClickFn=function(event){var $tertiaryItem,$primaryItem,$this=$(this);$this.hasClass("tertiary-nav-item-pf")?inMobileState()?($primaryItem=$item.parents(".list-group-item"),updateMobileMenu($this,$primaryItem),event.stopImmediatePropagation()):handleSelection&&($tertiaryItem=$item.find(".nav-pf-tertiary-nav > .list-group > .list-group-item").eq(0),setActiveItem($tertiaryItem),event.stopImmediatePropagation()):(inMobileState()&&(updateMobileMenu(),navElement.removeClass("show-mobile-nav")),updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setActiveItem($item),hideSecondaryMenu(),event.stopImmediatePropagation()))}:$nav.hasClass("nav-pf-tertiary-nav")&&(onClickFn=function(event){inMobileState()&&(updateMobileMenu(),navElement.removeClass("show-mobile-nav")),updateSecondaryMenuDisplayAfterSelection(),handleSelection&&(setActiveItem($item),hideTertiaryMenu(),hideSecondaryMenu(),event.stopImmediatePropagation())}),$item.on("click.pf.secondarynav.data-api",onClickFn)}),$(document).find(".secondary-nav-item-pf").each(function(index,secondaryItem){var $secondaryItem=$(secondaryItem);$secondaryItem.on("click.pf.secondarynav.data-api",'[data-toggle="collapse-secondary-nav"]',function(e){var $this=$(this);inMobileState()?(updateMobileMenu(),e.stopImmediatePropagation()):$this.hasClass("collapsed")?(options.rememberOpenState&&(window[storageLocation].setItem("patternfly-navigation-secondary","expanded"),window[storageLocation].setItem("patternfly-navigation-tertiary","expanded")),updateSecondaryCollapsedState(!1,$this),forceHideSecondaryMenu()):(options.rememberOpenState&&window[storageLocation].setItem("patternfly-navigation-secondary","collapsed"),updateSecondaryCollapsedState(!0,$this)),navElement.removeClass("hover-secondary-nav-pf"),handleSelection&&e.stopImmediatePropagation()}),$secondaryItem.find(".tertiary-nav-item-pf").each(function(index,primaryItem){$(primaryItem).on("click.pf.tertiarynav.data-api",'[data-toggle="collapse-tertiary-nav"]',function(e){var $this=$(this);inMobileState()?(updateMobileMenu($secondaryItem),e.stopImmediatePropagation()):$this.hasClass("collapsed")?(options.rememberOpenState&&(window[storageLocation].setItem("patternfly-navigation-secondary","expanded"),window[storageLocation].setItem("patternfly-navigation-tertiary","expanded")),updateTertiaryCollapsedState(!1,$this),forceHideSecondaryMenu()):(options.rememberOpenState&&window[storageLocation].setItem("patternfly-navigation-tertiary","collapsed"),updateTertiaryCollapsedState(!0,$this)),navElement.removeClass("hover-secondary-nav-pf"),navElement.removeClass("hover-tertiary-nav-pf"),handleSelection&&e.stopImmediatePropagation()})})}),$(document).on("mouseenter.pf.tertiarynav.data-api",".secondary-nav-item-pf",function(e){var $this=$(this);inMobileState()||(void 0!==$this[0].navUnHoverTimeout?(clearTimeout($this[0].navUnHoverTimeout),$this[0].navUnHoverTimeout=void 0):void 0===$this[0].navHoverTimeout&&($this[0].navHoverTimeout=setTimeout(function(){navElement.addClass("hover-secondary-nav-pf"),$this.addClass("is-hover"),$this[0].navHoverTimeout=void 0},options.hoverDelay)))}),$(document).on("mouseleave.pf.tertiarynav.data-api",".secondary-nav-item-pf",function(e){var $this=$(this);void 0!==$this[0].navHoverTimeout?(clearTimeout($this[0].navHoverTimeout),$this[0].navHoverTimeout=void 0):void 0===$this[0].navUnHoverTimeout&&navElement.find(".secondary-nav-item-pf.is-hover").length>0&&($this[0].navUnHoverTimeout=setTimeout(function(){navElement.find(".secondary-nav-item-pf.is-hover").length<=1&&navElement.removeClass("hover-secondary-nav-pf"),$this.removeClass("is-hover"),$this[0].navUnHoverTimeout=void 0},options.hideDelay))}),$(document).on("mouseover.pf.tertiarynav.data-api",".tertiary-nav-item-pf",function(e){var $this=$(this);inMobileState()||(void 0!==$this[0].navUnHoverTimeout?(clearTimeout($this[0].navUnHoverTimeout),$this[0].navUnHoverTimeout=void 0):void 0===$this[0].navHoverTimeout&&($this[0].navHoverTimeout=setTimeout(function(){navElement.addClass("hover-tertiary-nav-pf"),$this.addClas