diff --git a/NEWS.md b/NEWS.md index a113cf7..36731b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,7 +7,8 @@ broken `userBox()` in 2.0.0. - Fix #132: Option to disable the "scroll to top" button. ## Bug fix -- Fix #112: `userBox()` is not working. Introduced in 2.0.0 +- Fix #127: `shiny::navlistPanel()` in `dashboardControlbar()` not behaving as expected. +- Fix #112: `userBox()` is not working. Introduced in 2.0.0. # shinydashboardPlus 2.0.0 diff --git a/R/useful-items.R b/R/useful-items.R index d3c6360..a65cc9c 100644 --- a/R/useful-items.R +++ b/R/useful-items.R @@ -964,7 +964,7 @@ loadingState <- function() { #' @rdname navPills navPills <- function(..., id = NULL) { shiny::tags$ul( - class = "nav nav-pills nav-stacked", + class = "nav nav-pills nav-stacked shinydashboardplus-custom", id = if (!is.null(id)) id, ... ) diff --git a/docs/news/index.html b/docs/news/index.html index 67d9335..2750eb2 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -175,7 +175,8 @@

Bug fix

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index c8debdf..9b2d15f 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,5 +10,5 @@ articles: improved-boxes: improved-boxes.html more-skins: more-skins.html shinydashboardPlus: shinydashboardPlus.html -last_built: 2021-04-26T10:23Z +last_built: 2021-04-26T10:51Z diff --git a/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.js b/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.js index 85551a8..d6e7f0f 100644 --- a/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.js +++ b/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.js @@ -1336,7 +1336,7 @@ var navPillsBinding = new Shiny.InputBinding(); $.extend(navPillsBinding, { find: function(scope) { - return $(scope).find(".nav.nav-pills.nav-stacked"); + return $(scope).find(".nav.nav-pills.nav-stacked.shinydashboardplus-custom"); }, // Given the DOM element for the input, return the value getValue: function(el) { diff --git a/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.min.js b/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.min.js index 69788d2..2704f1d 100644 --- a/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.min.js +++ b/inst/shinydashboardPlus-2.0.0/js/shinydashboardPlus.min.js @@ -1,2 +1,2 @@ -var accordionBinding=new Shiny.InputBinding;$.extend(accordionBinding,{find:function(t){return $(t).find(".box-group.accordion")},getValue:function(t){var e=$(t).find(".active").index()+1;if(0!==e)return e},setValue:function(t,e){$(t).find(".active").removeClass("active"),$(t).children().eq(e-1).addClass("active"),$(t).children().eq(e-1).find('[data-toggle="collapse"]').click(),$(t).trigger("change")},receiveMessage:function(t,e){this.setValue(t,e)},subscribe:function(t,e){$(t).on("change",(function(t){e()})),$(t).find('[data-toggle="collapse"]').on("click",(function(n){$(this).closest(".panel").hasClass("active")||$(t).find(".active").removeClass("active"),$(this).closest(".panel").addClass("active"),e()}))},unsubscribe:function(t){$(t).off(".accordionBinding")}}),Shiny.inputBindings.register(accordionBinding,"accordion-input");const validStatuses=["primary","success","info","warning","danger"],validColors=["red","yellow","aqua","blue","light-blue","green","navy","teal","olive","lime","orange","fuchsia","purple","maroon","black","gray"],validStatusesPlus=["navy","teal","purple","orange","maroon","black"],status_2_color=t=>{switch(t){case"primary":return"light-blue";case"success":return"green";case"danger":return"red";case"warning":return"yellow";case"info":return"aqua";case"navy":return"navy";case"teal":return"teal";case"purple":return"purple";case"orange":return"orange";case"maroon":return"maroon";case"black":return"black"}},color_2_status=t=>{switch(t){case"light-blue":return"primary";case"green":return"success";case"red":return"danger";case"yellow":return"warning";case"aqua":return"info";case"navy":return"navy";case"teal":return"teal";case"purple":return"purple";case"orange":return"orange";case"maroon":return"maroon";case"black":return"black"}};var boxBinding=new Shiny.InputBinding;$.extend(boxBinding,{find:function(t){return $(t).find(".box")},getValue:function(t){var e=$(t).parent().find("script[data-for='"+t.id+"']");e=JSON.parse(e.html());var n,i=$(t).hasClass("collapsed-box");return n="none"!==$(t).css("display"),{collapsible:e.collapsible,collapsed:i,closable:e.closable,visible:n,status:e.status,solidHeader:e.solidHeader,background:e.background,width:e.width,height:e.height}},_updateWidth:function(t,e,n){$(t).parent().toggleClass("col-sm-"+e),$(t).parent().addClass("col-sm-"+n),$(t).trigger("resize")},setValue:function(t,e){var n=$(t).parent().find("script[data-for='"+t.id+"']");if(n=JSON.parse(n.html()),"update"===e.action){var i=$(t).hasClass("user-card"),a=$(t).hasClass("social-card");if(e.options.hasOwnProperty("title")&&e.options.title!==n.title){var s;s="string"!=typeof e.options.title?$.parseHTML(e.options.title[0]):$.parseHTML(e.options.title);var o=$(t).find(".box-tools");a?$(t).find(".user-block").replaceWith($(s)):i?("string"==typeof e.options.title?(s=[s[0],s[2]],$(t).removeClass("widget-user-2").addClass("widget-user"),$(t).find(".widget-user-header").replaceWith($(s[0])),$(s[1]).insertAfter($(t).find(".widget-user-header"))):($(t).removeClass("widget-user").addClass("widget-user-2"),$(t).find(".widget-user-image").remove(),$(t).find(".widget-user-header").replaceWith($(s))),$(t).find(".widget-user-header").prepend($(o))):($(s).hasClass("box-title")||$(s).addClass("box-title"),$(t).find(".box-title").replaceWith($(s))),n.title=e.options.title}if(e.options.hasOwnProperty("collapsible")&&e.options.collapsible!==n.collapsible&&(e.options.collapsible?0===$(t).find('[data-widget = "collapse"]').length&&($(t).find(".box-tools.pull-right").prepend($('')),n.collapsible=!0):($(t).find('[data-widget = "collapse"]').remove(),n.collapsible=!1)),e.options.hasOwnProperty("closable")&&e.options.closable!==n.closable&&(e.options.closable?0===$(t).find('[data-widget = "remove"]').length&&($(t).find(".box-tools.pull-right").append($('')),n.closable=!0):($(t).find('[data-widget = "remove"]').remove(),n.closable=!1)),e.options.hasOwnProperty("solidHeader")&&!a&&!i)if(e.options.solidHeader===n.solidHeader||$(t).hasClass("box-solid")){if($(t).hasClass("box-solid")&&!e.options.solidHeader){var r=n.status||e.options.status;e.options.background&&r&&(null!==e.options.background||n.background&&r)||($(t).removeClass("box-solid"),n.solidHeader=!1)}else if(!$(t).hasClass("box-solid")){r=n.status||e.options.status;e.options.background&&r?($(t).addClass("box-solid"),n.solidHeader=!0):n.background&&r&&($(t).addClass("box-solid"),n.solidHeader=!1)}}else $(t).addClass("box-solid"),n.solidHeader=!0;if(e.options.hasOwnProperty("status")&&!a&&e.options.status!==n.status){var d,l,c;if(null===e.options.status&&null!==n.status){if(i||$(t).removeClass("box-"+n.status),$(t).hasClass("box-solid")||i||$(t).addClass("box-solid"),e.options.background){var u=color_2_status(e.options.background);validStatusesPlus.indexOf(u)>-1?$(t).find(".btn-box-tool").addClass("bg-"+u):validStatuses.indexOf(u)>-1&&$(t).find(".btn-box-tool").addClass("btn-"+u)}}else e.options.status&&(i?(l="bg-"+status_2_color(e.options.status),e.options.gradient&&(l+="-gradient"),$(t).find(".widget-user-header").addClass(l)):(l="box-"+e.options.status,$(t).addClass(l)),n.status&&(i?(d="bg-"+status_2_color(n.status),n.gradient&&(d+="-gradient"),$(t).find(".widget-user-header").removeClass(d)):(d="box-"+n.status,$(t).removeClass(d))),($(t).hasClass("box-solid")||i)&&(i?$(t).find(".btn-box-tool").addClass("bg-"+status_2_color(e.options.status)):validStatusesPlus.indexOf(e.options.status)>-1?$(t).find(".btn-box-tool").addClass("bg-"+e.options.status):validStatuses.indexOf(e.options.status)>-1&&$(t).find(".btn-box-tool").addClass("btn-"+e.options.status)));(n.status||n.background)&&(n.status?c=n.status:n.background&&(c=n.background),i?$(t).find(".btn-box-tool").removeClass("bg-"+status_2_color(c)):validStatusesPlus.indexOf(c)>-1?$(t).find(".btn-box-tool").removeClass("bg-"+c):validStatuses.indexOf(c)>-1&&$(t).find(".btn-box-tool").removeClass("btn-"+c)),n.status=e.options.status}if(e.options.hasOwnProperty("background")&&e.options.background!==n.background){var g="bg-",f=g;if(n.background){if(g+=n.background,n.gradient&&(g+="-gradient"),i&&!n.status&&!e.options.status){var b=$(t).find(".widget-user-header");$(b).removeClass(g)}$(t).removeClass(g)}if(e.options.background){if(f+=e.options.background,(n.gradient||e.options.gradient)&&(f+="-gradient"),i&&!n.status&&!e.options.status){b=$(t).find(".widget-user-header");$(b).addClass(f)}$(t).addClass(f)}n.gradient!==e.options.gradient&&void 0!==e.options.gradient&&(n.gradient=e.options.gradient),n.background=e.options.background}e.options.hasOwnProperty("width")&&e.options.width!==n.width&&(this._updateWidth(t,n.width,e.options.width),n.width=e.options.width),e.options.hasOwnProperty("height")&&e.options.height!==n.height&&(null===e.options.height?$(t).find(".box-body").css("height",""):$(t).find(".box-body").css("height",e.options.height),n.height=e.options.height),$(t).parent().find("script[data-for='"+t.id+"']").replaceWith('\"\n );\n } else {\n if (value === \"restore\") {\n // only restore if not visible\n if ($(el).css(\"display\") == \"none\") {\n $(el).show();\n } else {\n console.warn(\"This box is already visible!\");\n }\n } else if (value === \"toggle\") {\n if ($(el).css(\"display\") !== \"none\") {\n $(el).toggleBox();\n } else {\n console.warn(\n \"This box is not visible. It does not make sense to collapse it!\"\n );\n }\n } else {\n if ($(el).css(\"display\") !== \"none\") {\n $(el).removeBox();\n } else {\n console.warn(\"This box is not visible!\");\n }\n }\n }\n },\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n $(el).trigger(\"change\");\n },\n subscribe: function(el, callback) {\n // handle manual click on collapse button\n $(el).on(\"click\", '[data-widget=\"collapse\"]', function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n\n // handle manual click on remove button\n $(el).on(\"click\", '[data-widget=\"remove\"]', function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n\n // handle change event triggered in the setValue method\n $(el).on(\"change\", function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".boxBinding\");\n }\n});\n\nShiny.inputBindings.register(boxBinding, \"box-input\");\n\n// boxSidebarBinding\n// ------------------------------------------------------------------\n// This code creates an input binding for the boxPlus sidebar component\nvar boxSidebarBinding = new Shiny.InputBinding();\n$.extend(boxSidebarBinding, {\n initialize: function(el) {\n // erase default to avoid seeing moving sidebars on initialization\n $(\".direct-chat-contacts, .direct-chat-messages\").css({\n transition: \"transform .0s ease-in-out\"\n });\n\n var background = $(el).attr(\"data-background\")\n ? $(el).attr(\"data-background\")\n : \"#343a40\";\n var width = $(el).attr(\"data-width\")\n ? parseInt($(el).attr(\"data-width\"))\n : 100;\n var closeTranslationRate = (100 * 100) / width;\n var contacts = $(el)\n .closest(\".direct-chat\")\n .find(\".direct-chat-contacts\");\n\n // apply width and background\n $(contacts).css({\n background: `${background}`,\n width: `${width}%`\n });\n\n // If start open, apply openTranslationRate else apply closeTranslationRate ...\n if ($(el).attr(\"data-start-open\") === \"true\") {\n var openTranslationRate = closeTranslationRate - 100;\n $(contacts).css({ transform: `translate(${openTranslationRate}%, 0)` });\n } else {\n $(contacts).css({ transform: `translate(${closeTranslationRate}%, 0)` });\n }\n\n // Restore for better transitions\n setTimeout(function() {\n $(\".direct-chat-contacts, .direct-chat-messages\").css({\n transition: \"transform .5s ease-in-out\"\n });\n }, 300);\n },\n\n find: function(scope) {\n return $(scope).find('[data-widget=\"chat-pane-toggle\"]');\n },\n\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n var boxWrapper = $(el).closest(\".box\");\n return $(boxWrapper).hasClass(\"direct-chat-contacts-open\");\n },\n\n // see updateBoxSidebar\n receiveMessage: function(el, data) {\n $(el).trigger(\"click\");\n $(el).trigger(\"shown\");\n },\n\n subscribe: function(el, callback) {\n var self = this;\n $(el).on(\"click\", function(e) {\n var width = $(el).attr(\"data-width\")\n ? parseInt($(el).attr(\"data-width\"))\n : 100;\n var closeTranslationRate = (100 * 100) / width;\n var openTranslationRate = closeTranslationRate - 100;\n // set a delay so that Shiny get the input value when the collapse animation\n // is finished.\n var target = e.currentTarget;\n setTimeout(function(e = target) {\n // apply correct translation rate depending on current state\n var contacts = $(e)\n .closest(\".direct-chat\")\n .find(\".direct-chat-contacts\");\n if (self.getValue(el)) {\n $(contacts).css({\n transform: `translate(${openTranslationRate}%, 0)`\n });\n } else {\n $(contacts).css({\n transform: `translate(${closeTranslationRate}%, 0)`\n });\n }\n callback();\n }, 10);\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".boxSidebarBinding\");\n }\n});\n\nShiny.inputBindings.register(boxSidebarBinding, \"box-sidebar-input\");\n\n// flipbox\n// ------------------------------------------------------------------\n// This code creates an input binding for the flipbox component\nvar flipBoxBinding = new Shiny.InputBinding();\n\n$.extend(flipBoxBinding, {\n find: function(scope) {\n return $(scope).find(\".flipbox\");\n },\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n return $(el)\n .find(\".card-front\")\n .hasClass(\"active\");\n },\n\n setValue: function(el, value) {\n var currentSide = $(el).find(\".active\");\n if ($(el).data(\"rotate\") === \"hover\") {\n if ($(currentSide).hasClass(\"card-front\")) {\n $(currentSide).trigger(\"mouseenter\");\n } else {\n $(currentSide).trigger(\"mouseleave\");\n }\n } else if ($(el).data(\"rotate\") === \"click\") {\n $(currentSide).trigger(\"click\");\n }\n },\n\n // see updateAccordion\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n },\n _clickOnFront: function(el) {\n $(el)\n .find(\".card-front\")\n .css({\n \"-webkit-transform\": \"perspective(1600px) rotateY(-180deg)\",\n transform: \"perspective(1600px) rotateY(-180deg)\"\n })\n .toggleClass(\"active\");\n $(el)\n .find(\".card-back\")\n .css({\n \"-webkit-transform\": \"perspective(1600px) rotateY(0deg)\",\n transform: \"perspective(1600px) rotateY(0deg)\"\n })\n .toggleClass(\"active\");\n },\n _clickOnBack: function(el) {\n $(el)\n .find(\".card-front\")\n .css({ \"-webkit-transform\": \"\", transform: \"\" })\n .toggleClass(\"active\");\n $(el)\n .find(\".card-back\")\n .css({ \"-webkit-transform\": \"\", transform: \"\" })\n .toggleClass(\"active\");\n },\n subscribe: function(el, callback) {\n var self = this; // this will not work inside event listeners since it will\n // refer to the element we clicked on and not the input binding object!!!\n\n // use the data object to identify the trigger\n if ($(el).data(\"rotate\") === \"hover\") {\n $(el)\n .find(\".card-front\")\n .on(\"mouseenter\", function() {\n self._clickOnFront(el);\n callback();\n });\n\n $(el)\n .find(\".card-back\")\n .on(\"mouseleave\", function() {\n self._clickOnBack(el);\n callback();\n });\n } else if ($(el).data(\"rotate\") === \"click\") {\n // click front\n $(el).on(\"click\", \".card-front\", function(e) {\n self._clickOnFront(el);\n callback();\n });\n\n // click back\n $(el).on(\"click\", \".card-back\", function(e) {\n self._clickOnBack(el);\n callback();\n });\n }\n },\n\n unsubscribe: function(el) {\n $(el).off(\".flipBoxBinding\");\n }\n});\n\nShiny.inputBindings.register(flipBoxBinding, \"flipbox-input\");\n","$(function() {\n // boxSidebarBinding\n // ------------------------------------------------------------------\n // This code creates an input binding for the dashboard controlbar component\n var controlbarBinding = new Shiny.InputBinding();\n\n $.extend(controlbarBinding, {\n find: function(scope) {\n return $(scope).find(\".control-sidebar\");\n },\n\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n // this handles the case where the controlbar is not collapsed at start\n var controlbarCollapsed = $(el).attr('data-collapsed');\n var overlay = $(\".control-sidebar\").attr(\"data-overlay\") === \"true\";\n // We have to overwrite the existing options by the user provided.\n $.AdminLTE.options.controlSidebarOptions.slide = overlay;\n if (controlbarCollapsed === \"false\") {\n $(\"[data-toggle='control-sidebar']\").click();\n $(el).attr('data-collapsed', \"true\");\n return true;\n } else {\n if (!overlay) {\n return $(\"body\").hasClass(\"control-sidebar-open\"); \n } else {\n return $(el).hasClass(\"control-sidebar-open\");\n }\n }\n },\n\n // see updateControlbar\n receiveMessage: function(el, data) {\n $(\"[data-toggle='control-sidebar']\").click();\n },\n\n subscribe: function(el, callback) {\n $(\"[data-toggle='control-sidebar']\").on(\"click\", function(e) {\n callback();\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".controlbarBinding\");\n }\n });\n\n Shiny.inputBindings.register(controlbarBinding, \"controlbar-input\");\n\n // This prevent box content from going outside their container \n // when the control-bar is on push mode\n $(\"[data-toggle='control-sidebar']\").on(\"click\",\n function() {\n if (!$.AdminLTE.options.controlSidebarOptions.slide) {\n $(window).trigger(\"resize\"); \n }\n });\n\n // hide the right sidebar toggle\n // if no right sidebar is specified\n var noControlbar = $(\".control-sidebar\").length === 0;\n if (noControlbar) {\n $(\"[data-toggle='control-sidebar']\").hide();\n }\n\n // hide the right sidebar toggle if the controlbar is disable\n var disableControlbar = $(\".control-sidebar\").attr(\"data-show\");\n if (disableControlbar === \"false\") {\n $(\"[data-toggle='control-sidebar']\").hide();\n }\n});\n","var ensureActivatedTab = function() {\n var $tablinks = $(\".sidebar-menu a[data-toggle='tab']\");\n\n // If there's a `data-start-selected` attribute and we can find a tab with\n // that name, activate it.\n var $startTab = $tablinks.filter(\"[data-start-selected='1']\");\n if ($startTab.length === 0) {\n // If no tab starts selected, use the first one, if present\n $startTab = $tablinks.first();\n }\n\n // If there are no tabs, $startTab.length will be 0.\n if ($startTab.length !== 0) {\n $startTab.tab(\"show\");\n\n // This is indirectly setting the value of the Shiny input by setting\n // an attribute on the html element it is bound to. We cannot use the\n // inputBinding's setValue() method here because this is called too\n // early (before Shiny has fully initialized)\n $(\".sidebarMenuSelectedTabItem\").attr(\n \"data-value\",\n $startTab.attr(\"data-value\")\n );\n }\n};\n\n$(function() {\n // tabItemInputBinding\n // ------------------------------------------------------------------\n // Based on Shiny.tabItemInputBinding, but customized for tabItems in\n // shinydashboard, which have a slightly different structure.\n var tabItemInputBinding = new Shiny.InputBinding();\n $.extend(tabItemInputBinding, {\n find: function(scope) {\n return $(scope).find(\".sidebarMenuSelectedTabItem\");\n },\n getValue: function(el) {\n var value = $(el).attr(\"data-value\");\n if (value === \"null\") return null;\n return value;\n },\n setValue: function(el, value) {\n var self = this;\n var anchors = $(el)\n .parent(\"ul.sidebar-menu\")\n .find(\"li:not(.treeview)\")\n .children(\"a\");\n anchors.each(function() {\n // eslint-disable-line consistent-return\n if (self._getTabName($(this)) === value) {\n $(this).tab(\"show\");\n $(el).attr(\"data-value\", self._getTabName($(this)));\n return false;\n }\n });\n },\n receiveMessage: function(el, data) {\n if (data.hasOwnProperty(\"value\")) this.setValue(el, data.value);\n },\n subscribe: function(el, callback) {\n // This event is triggered by deactivateOtherTabs, which is triggered by\n // shown. The deactivation of other tabs must occur before Shiny gets the\n // input value.\n $(el).on(\"change.tabItemInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".tabItemInputBinding\");\n },\n _getTabName: function(anchor) {\n return anchor.attr(\"data-value\");\n }\n });\n\n Shiny.inputBindings.register(\n tabItemInputBinding,\n \"shinydashboard.tabItemInput\"\n );\n\n // sidebarCollapsedInputBinding\n // ------------------------------------------------------------------\n // This keeps tracks of whether the sidebar is expanded (default)\n // or collapsed\n var sidebarCollapsedInputBinding = new Shiny.InputBinding();\n $.extend(sidebarCollapsedInputBinding, {\n find: function(scope) {\n // This will also have id=\"sidebarCollapsed\"\n return $(scope)\n .find(\".main-sidebar\")\n .first();\n },\n getValue: function(el) {\n if ($(el).attr(\"id\") === \"sidebarCollapsed\") {\n return $(el).attr(\"data-collapsed\") === \"true\";\n } else {\n return $(el).attr(\"data-collapsed\") === \"false\";\n }\n },\n setValue: function(el, value) {\n $(el).attr(\"data-collapsed\", value);\n },\n toggleValue: function(el) {\n var current = this.getValue(el);\n var newVal = current ? \"false\" : \"true\";\n this.setValue(el, newVal);\n },\n receiveMessage: function(el, data) {\n if (data.hasOwnProperty(\"value\")) this.setValue(el, data.value);\n $(\"[data-toggle='offcanvas']\").click();\n },\n subscribe: function(el, callback) {\n $(el).on(\"change.sidebarCollapsedInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".sidebarCollapsedInputBinding\");\n }\n });\n Shiny.inputBindings.register(\n sidebarCollapsedInputBinding,\n \"shinydashboard.sidebarCollapsedInputBinding\"\n );\n\n // sidebarmenuExpandedInputBinding\n // ------------------------------------------------------------------\n // This keeps tracks of what menuItem (if any) is expanded\n $(\"section.sidebar a i\").click(function() {\n if ($(this).hasClass(\"fa-angle-down\")) {\n self = $(this);\n setTimeout(function() {\n self.removeClass(\"fa-angle-down\").addClass(\"fa-angle-left\");\n }, 500);\n }\n });\n\n var sidebarmenuExpandedInputBinding = new Shiny.InputBinding();\n $.extend(sidebarmenuExpandedInputBinding, {\n find: function(scope) {\n // This will also have id=\"sidebarItemExpanded\"\n return $(scope).find(\"section.sidebar\");\n },\n getValue: function(el) {\n var $open = $(el).find(\"li ul.menu-open\");\n var icon = $(el)\n .find(\".treeview.active > a i\")\n .eq(1);\n if ($open.length === 1) {\n $(icon)\n .toggleClass(\"fa-angle-left\")\n .addClass(\"fa-angle-down\");\n return $open.attr(\"data-expanded\");\n } else {\n return null;\n }\n },\n setValue: function(el, value) {\n var $menuItem = $(el).find(\"[data-expanded='\" + value + \"']\");\n // This will trigger actions defined by AdminLTE, as well as actions\n // defined in sidebar.js.\n $menuItem.prev().trigger(\"click\");\n },\n subscribe: function(el, callback) {\n $(el).on(\"change.sidebarmenuExpandedInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".sidebarmenuExpandedInputBinding\");\n }\n });\n Shiny.inputBindings.register(\n sidebarmenuExpandedInputBinding,\n \"shinydashboard.sidebarmenuExpandedInputBinding\"\n );\n\n // Optionally disable sidebar (set through the `disable` argument\n // to the `dashboardSidebar` function)\n if ($(\"section.sidebar\").data(\"disable\")) {\n $(\"body\").addClass(\"sidebar-collapse\");\n $(\".navbar > .sidebar-toggle\").hide();\n }\n\n // toggle sidebar at start depending on the body class\n var sidebarCollapsed = $(\".main-sidebar\").attr(\"data-collapsed\");\n if (sidebarCollapsed === \"true\") {\n $(\"body\").addClass(\"sidebar-collapse\");\n }\n\n // handle the sidebar partial collapse feature\n var sidebarMinified = $(\".main-sidebar\").attr(\"data-minified\");\n if (sidebarMinified === \"true\") {\n $(\"body\").addClass(\"sidebar-mini\");\n }\n\n // Get the correct value for `input$sidebarCollapsed`, depending on\n // whether or not the left offset on the sidebar is negative (hidden\n // - so `input$sidebarCollapsed` should be TRUE) or 0 (shown - so\n // `input$sidebarCollapsed` should be FALSE). That we know of,\n // `$(\".main-sidebar\").is(\":visible\")` is always true, so there is\n // no need to check for that.\n // Determine whether the sidebar should be minified instead of fully collapsed\n var sidebarCollapsedValue = function() {\n if ($(\"body\").hasClass(\"sidebar-collapse\")) return true;\n else return false;\n };\n\n // Whenever the sidebar changes from collapsed to expanded and vice versa,\n // call this function, so that we can trigger the resize event on the rest\n // of the window and also update the value for the sidebar's input binding.\n var sidebarChange = function() {\n // 1) Trigger the resize event (so images are responsive and resize)\n $(window).trigger(\"resize\");\n\n // 2) Update the value for the sidebar's input binding\n var $obj = $(\".main-sidebar.shiny-bound-input\");\n var inputBinding = $obj.data(\"shiny-input-binding\");\n inputBinding.setValue($obj, sidebarCollapsedValue());\n $obj.trigger(\"change\");\n };\n\n // Whenever the sidebar finishes a transition (which it does every time it\n // changes from collapsed to expanded and vice versa), call sidebarChange()\n $(\".main-sidebar\").on(\n \"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend\",\n sidebarChange\n );\n\n // This fixes an edge case: when the app starts up with the sidebar already\n // collapsed (either because the screen is small or because\n // `dashboardSidebar(disable = TRUE`), make sure that `input$sidebarCollapsed`\n // is set to `FALSE`. Whenever this is the case, `$(\".main-sidebar\").offset().left`\n // is negative. That we know of, `$(\".main-sidebar\").is(\":visible\")` is always\n // true, so there is no need to check for that.\n if ($(\"body\").hasClass(\"sidebar-collapse\")) {\n // This is indirectly setting the value of the Shiny input by setting\n // an attribute on the html element it is bound to. We cannot use the\n // inputBinding's setValue() method here because this is called too\n // early (before Shiny has fully initialized)\n $(\".main-sidebar\").attr(\"data-collapsed\", \"true\");\n }\n\n // Whenever we expand a menuItem (to be expandable, it must have children),\n // update the value for the expandedItem's input binding (this is the\n // tabName of the fist subMenuItem inside the menuItem that is currently\n // expanded)\n $(document).on(\"click\", \".treeview > a\", function() {\n var $menu = $(this).next();\n // If this menuItem was already open, then clicking on it again,\n // should trigger the \"hidden\" event, so Shiny doesn't worry about\n // it while it's hidden (and vice versa).\n if ($menu.hasClass(\"menu-open\")) $menu.trigger(\"hidden\");\n else if ($menu.hasClass(\"treeview-menu\")) $menu.trigger(\"shown\");\n\n // need to set timeout to account for the slideUp/slideDown animation\n var $obj = $(\"section.sidebar.shiny-bound-input\");\n setTimeout(function() {\n $obj.trigger(\"change\");\n }, 600);\n });\n\n // This function handles a special case in the AdminLTE sidebar: when there\n // is a sidebar-menu with items, and one of those items has sub-items, and\n // they are used for tab navigation. Normally, if one of the items is\n // selected and then a sub-item is clicked, both the item and sub-item will\n // retain the \"active\" class, so they will both be highlighted. This happens\n // because they're not designed to be used together for tab panels. This\n // code ensures that only one item will have the \"active\" class.\n var deactivateOtherTabs = function() {\n // Find all tab links under sidebar-menu even if they don't have a\n // tabName (which is why the second selector is necessary)\n var $tablinks = $(\n \".sidebar-menu a[data-toggle='tab'],\" + \".sidebar-menu li.treeview > a\"\n );\n\n // If any other items are active, deactivate them\n $tablinks\n .not($(this))\n .parent(\"li\")\n .removeClass(\"active\");\n\n // Trigger event for the tabItemInputBinding\n var $obj = $(\".sidebarMenuSelectedTabItem\");\n var inputBinding = $obj.data(\"shiny-input-binding\");\n if (typeof inputBinding !== \"undefined\") {\n inputBinding.setValue($obj, $(this).attr(\"data-value\"));\n $obj.trigger(\"change\");\n }\n };\n\n $(document).on(\n \"shown.bs.tab\",\n '.sidebar-menu a[data-toggle=\"tab\"]',\n deactivateOtherTabs\n );\n\n // When document is ready, if there is a sidebar menu with no activated tabs,\n // activate the one specified by `data-start-selected`, or if that's not\n // present, the first one.\n ensureActivatedTab();\n});\n","$(function() {\n // box vertical overflow\n $(\".content-wrapper\").css(\"overflow-y\", \"auto\");\n\n // slide to top button\n if ($(\"body\").attr(\"data-scrollToTop\") == 1) {\n var $slideToTop = $(\"
\");\n\n $slideToTop.html('');\n\n $slideToTop.css({\n position: \"fixed\",\n bottom: \"20px\",\n right: \"25px\",\n width: \"40px\",\n height: \"40px\",\n color: \"#eee\",\n \"font-size\": \"\",\n \"line-height\": \"40px\",\n \"text-align\": \"center\",\n \"background-color\": \"#222d32\",\n cursor: \"pointer\",\n \"border-radius\": \"5px\",\n \"z-index\": \"99999\",\n opacity: \".7\",\n display: \"none\"\n });\n\n $slideToTop.on(\"mouseenter\", function() {\n $(this).css(\"opacity\", \"1\");\n });\n\n $slideToTop.on(\"mouseout\", function() {\n $(this).css(\"opacity\", \".7\");\n });\n\n $(\".wrapper\").append($slideToTop);\n\n $(window).scroll(function() {\n if ($(window).scrollTop() >= 150) {\n if (!$($slideToTop).is(\":visible\")) {\n $($slideToTop).fadeIn(500);\n }\n } else {\n $($slideToTop).fadeOut(500);\n }\n });\n\n $($slideToTop).click(function() {\n $(\"html, body\").animate(\n {\n scrollTop: 0\n },\n 500\n );\n });\n }\n\n // code to make sure that a carousel item is displayed\n // when it is generated via a shiny Output function\n // Thanks Dean Attali for the report\n $(\".carousel\").on(\"slide.bs.carousel\", function() {\n $(this).trigger(\"shown\");\n });\n\n /**\n * List of all the available skins\n *\n * @type Array\n */\n var mySkins = [\n \"skin-blue\",\n \"skin-black\",\n \"skin-red\",\n \"skin-yellow\",\n \"skin-purple\",\n \"skin-green\",\n \"skin-blue-light\",\n \"skin-black-light\",\n \"skin-red-light\",\n \"skin-yellow-light\",\n \"skin-purple-light\",\n \"skin-green-light\"\n ];\n\n /**\n * Store a new settings in the browser\n *\n * @param String name Name of the setting\n * @param String val Value of the setting\n * @returns void\n */\n function store(name, val) {\n if (typeof Storage !== \"undefined\") {\n localStorage.setItem(name, val);\n } else {\n window.alert(\n \"Please use a modern browser to properly view this template!\"\n );\n }\n }\n\n /**\n * Replaces the old skin with the new skin\n * @param String cls the new skin class\n * @returns Boolean false to prevent link's default action\n */\n changeSkin = function(cls) {\n $.each(mySkins, function(i) {\n $(\"body\").removeClass(mySkins[i]);\n });\n\n $(\"body\").addClass(cls);\n store(\"skin\", cls);\n return false;\n };\n});\n","// navPills\n// ------------------------------------------------------------------\n// This code creates an input binding for the navPills component\nvar navPillsBinding = new Shiny.InputBinding();\n\n$.extend(navPillsBinding, {\n find: function(scope) {\n return $(scope).find(\".nav.nav-pills.nav-stacked\");\n },\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n var activeItem =\n $(el)\n .find(\".active\")\n .index() + 1;\n if (activeItem === 0) {\n $(el)\n .children()\n .first()\n .addClass(\"active\");\n activeItem = 1;\n }\n // returns the index of the active item from the R point of view\n return activeItem;\n },\n\n setValue: function(el, value) {\n $(el)\n .children()\n .eq(value - 1)\n .trigger(\"click\");\n },\n\n // see updateControlbar\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n },\n\n subscribe: function(el, callback) {\n $(el).on(\"click\", \"li\", function(e) {\n if (!$(this).hasClass(\"active\")) {\n $(el)\n .find(\".active\")\n .removeClass(\"active\");\n $(this).addClass(\"active\");\n callback();\n } else {\n return;\n }\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".navPillsBinding\");\n }\n});\n\nShiny.inputBindings.register(navPillsBinding, \"navPills-input\");\n","// menuOutputBinding\n// ------------------------------------------------------------------\n// Based on Shiny.htmlOutputBinding, but instead of putting the result in a\n// wrapper div, it replaces the origin DOM element with the new DOM elements,\n// copying over the ID and class.\nvar menuOutputBinding = new Shiny.OutputBinding();\n$.extend(menuOutputBinding, {\n find: function(scope) {\n return $(scope).find(\".shinydashboard-menu-output\");\n },\n onValueError: function(el, err) {\n Shiny.unbindAll(el);\n this.renderError(el, err);\n },\n renderValue: function(el, data) {\n Shiny.unbindAll(el);\n\n var html;\n var dependencies = [];\n if (data === null) {\n return;\n } else if (typeof data === \"string\") {\n html = data;\n } else if (typeof data === \"object\") {\n html = data.html;\n dependencies = data.deps;\n }\n\n var $html = $($.parseHTML(html));\n\n // Convert the inner contents to HTML, and pass to renderHtml\n Shiny.renderHtml($html.html(), el, dependencies);\n\n // Extract class of wrapper, and add them to the wrapper element\n el.className =\n \"shinydashboard-menu-output shiny-bound-output \" + $html.attr(\"class\");\n\n Shiny.initializeInputs(el);\n Shiny.bindAll(el);\n if ($(el).hasClass(\"sidebar-menu\")) ensureActivatedTab(); // eslint-disable-line\n }\n});\nShiny.outputBindings.register(\n menuOutputBinding,\n \"shinydashboard.menuOutputBinding\"\n);\n","// This code creates acustom handler for userMessages\nShiny.addCustomMessageHandler(\"user-messages\", function(message) {\n var id = message.id,\n action = message.action,\n content = message.body,\n index = message.index;\n\n // message text\n // We use Shiny.renderHtml to handle the case where the user pass input/outputs in the updated content that require a new dependency not available in the\n // page at startup.\n if (content.hasOwnProperty(\"text\")) {\n var text;\n if (content.text.html === undefined) {\n text = content.text;\n } else {\n text = Shiny.renderHtml(content.text.html, $([]), content.text.deps).html;\n }\n }\n\n // unbind all\n Shiny.unbindAll();\n\n if (action === \"remove\") {\n $(\"#\" + id)\n .find(\".direct-chat-msg\")\n .eq(index - 1)\n .remove();\n } else if (action === \"add\") {\n var author = content.author,\n date = content.date,\n image = content.image,\n type = content.type;\n\n // build the new message\n var newMessage =\n '
' +\n '' +\n author +\n \"\" +\n '' +\n date +\n \"\" +\n \"
\" +\n '' +\n '
' +\n text +\n \"
\";\n\n // build wrapper\n var newMessageWrapper;\n if (type === \"sent\") {\n newMessageWrapper =\n '
' + newMessage + \"
\";\n } else {\n newMessageWrapper =\n '
' + newMessage + \"
\";\n }\n\n // append message\n $(\"#\" + id)\n .find(\".direct-chat-messages\")\n .append(newMessageWrapper);\n } else if (action === \"update\") {\n // today's date\n var d = new Date();\n var month = d.getMonth() + 1;\n var day = d.getDate();\n var today =\n d.getFullYear() +\n \"/\" +\n ((\"\" + month).length < 2 ? \"0\" : \"\") +\n month +\n \"/\" +\n ((\"\" + day).length < 2 ? \"0\" : \"\") +\n day;\n\n // we assume only text may be updated. Does not make sense to modify author/date\n\n $(\"#\" + id)\n .find(\".direct-chat-text\")\n .eq(index - 1)\n .replaceWith(\n '
(modified: ' +\n today +\n \")
\" +\n text +\n \"
\"\n );\n }\n\n // Calls .initialize() for all of the input objects in all input bindings,\n // in the given scope (document)\n Shiny.initializeInputs();\n Shiny.bindAll(); // bind all inputs/outputs\n});\n"]} +{"version":3,"sources":["accordions.js","cards.js","controlbar.js","leftSidebar.js","miscellaneous.js","navs.js","output-bindings.js","userMessages.js"],"names":["accordionBinding","Shiny","InputBinding","$","extend","find","scope","getValue","el","activeItem","index","setValue","value","removeClass","children","eq","addClass","click","trigger","receiveMessage","data","this","subscribe","callback","on","e","closest","hasClass","unsubscribe","off","inputBindings","register","validStatuses","validColors","validStatusesPlus","status_2_color","status","color_2_status","color","boxBinding","config","parent","id","JSON","parse","html","visible","isCollapsed","css","collapsible","collapsed","closable","solidHeader","background","width","height","_updateWidth","o","n","toggleClass","action","isUserCard","isSocialCard","options","hasOwnProperty","title","newTitle","parseHTML","tools","replaceWith","insertAfter","remove","prepend","length","append","cond","oldClass","newClass","indexOf","gradient","oldBgClass","newBgClass","header","undefined","stringify","show","console","warn","toggleBox","removeBox","event","setTimeout","boxSidebarBinding","initialize","transition","attr","parseInt","closeTranslationRate","contacts","openTranslationRate","transform","boxWrapper","self","target","currentTarget","flipBoxBinding","currentSide","_clickOnFront","-webkit-transform","_clickOnBack","controlbarBinding","controlbarCollapsed","overlay","AdminLTE","controlSidebarOptions","slide","window","hide","ensureActivatedTab","$tablinks","$startTab","filter","first","tab","tabItemInputBinding","each","_getTabName","anchor","sidebarCollapsedInputBinding","toggleValue","newVal","sidebarmenuExpandedInputBinding","$open","icon","prev","$obj","document","$menu","next","not","inputBinding","$slideToTop","position","bottom","right","font-size","line-height","text-align","background-color","cursor","border-radius","z-index","opacity","display","scroll","scrollTop","is","fadeIn","fadeOut","animate","mySkins","changeSkin","cls","name","val","i","Storage","localStorage","setItem","alert","navPillsBinding","menuOutputBinding","OutputBinding","onValueError","err","unbindAll","renderError","renderValue","dependencies","deps","$html","renderHtml","className","initializeInputs","bindAll","outputBindings","addCustomMessageHandler","message","text","content","body","newMessageWrapper","newMessage","author","date","image","type","d","Date","month","getMonth","day","getDate","today","getFullYear"],"mappings":"AAGA,IAAIA,iBAAmB,IAAIC,MAAMC,aAEjCC,EAAEC,OAAOJ,iBAAkB,CACzBK,KAAM,SAASC,GACb,OAAOH,EAAEG,GAAOD,KAAK,yBAGvBE,SAAU,SAASC,GAEjB,IAAIC,EACFN,EAAEK,GACCH,KAAK,WACLK,QAAU,EACf,GAAmB,IAAfD,EAGJ,OAAOA,GAGTE,SAAU,SAASH,EAAII,GAErBT,EAAEK,GACCH,KAAK,WACLQ,YAAY,UAGfV,EAAEK,GACCM,WACAC,GAAGH,EAAQ,GACXI,SAAS,UAGZb,EAAEK,GACCM,WACAC,GAAGH,EAAQ,GACXP,KAAK,4BACLY,QAGHd,EAAEK,GAAIU,QAAQ,WAIhBC,eAAgB,SAASX,EAAIY,GAC3BC,KAAKV,SAASH,EAAIY,IAGpBE,UAAW,SAASd,EAAIe,GAEtBpB,EAAEK,GAAIgB,GAAG,UAAU,SAASC,GAC1BF,OAIFpB,EAAEK,GACCH,KAAK,4BACLmB,GAAG,SAAS,SAASC,GAEjBtB,EAAEkB,MACAK,QAAQ,UACRC,SAAS,WAEZxB,EAAEK,GACCH,KAAK,WACLQ,YAAY,UAEjBV,EAAEkB,MACCK,QAAQ,UACRV,SAAS,UACZO,QAINK,YAAa,SAASpB,GACpBL,EAAEK,GAAIqB,IAAI,wBAId5B,MAAM6B,cAAcC,SAAS/B,iBAAkB,mBChF/C,MAAMgC,cAAgB,CAAC,UAAW,UAAW,OAAQ,UAAW,UAG1DC,YAAc,CAClB,MACA,SACA,OACA,OACA,aACA,QACA,OACA,OACA,QACA,OACA,SACA,UACA,SACA,SACA,QACA,QAIIC,kBAAoB,CACxB,OACA,OACA,SACA,SACA,SACA,SAGIC,eAAiBC,IACrB,OAAQA,GACN,IAAK,UACH,MAAO,aAET,IAAK,UACH,MAAO,QAET,IAAK,SACH,MAAO,MAET,IAAK,UACH,MAAO,SAET,IAAK,OACH,MAAO,OAET,IAAK,O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AAiB,SAASC,GACtD,IASMC,EATFlJ,EAAKiJ,EAAQjJ,GACfkB,EAAS+H,EAAQ/H,OACjBiI,EAAUF,EAAQG,KAClBpL,EAAQiL,EAAQjL,MAKdmL,EAAQ7H,eAAe,UAGvB4H,OADwBzG,IAAtB0G,EAAQD,KAAK/I,KACRgJ,EAAQD,KAER3L,MAAMoL,WAAWQ,EAAQD,KAAK/I,KAAM1C,EAAE,IAAK0L,EAAQD,KAAKT,MAAMtI,MAOzE,GAFA5C,MAAM8K,YAES,WAAXnH,EACFzD,EAAE,IAAMuC,GACLrC,KAAK,oBACLU,GAAGL,EAAQ,GACX6D,cACE,GAAe,QAAXX,EAAkB,CAC3B,IAuBImI,EAjBAC,EACF,yEAPWH,EAAQI,OAUnB,uEATOJ,EAAQK,KAYf,kDAXQL,EAAQM,MAehB,oCAEAP,EACA,SAKAG,EADW,SArBJF,EAAQO,KAuBb,sCAAwCJ,EAAa,SAGrD,gCAAkCA,EAAa,SAInD7L,EAAE,IAAMuC,GACLrC,KAAK,yBACLqE,OAAOqH,QACL,GAAe,WAAXnI,EAAqB,CAE9B,IAAIyI,EAAI,IAAIC,KACRC,EAAQF,EAAEG,WAAa,EACvBC,EAAMJ,EAAEK,UACRC,EACFN,EAAEO,cACF,MACE,GAAKL,GAAO9H,OAAS,EAAI,IAAM,IACjC8H,EACA,MACE,GAAKE,GAAKhI,OAAS,EAAI,IAAM,IAC/BgI,EAIFtM,EAAE,IAAMuC,GACLrC,KAAK,qBACLU,GAAGL,EAAQ,GACX2D,YACC,oEACEsI,EACA,gBACAf,EACA,UAMR3L,MAAMsL,mBACNtL,MAAMuL","file":"shinydashboardPlus.min.js","sourceRoot":"../../shinydashboardPlus-build","sourcesContent":["// accordion\n// ------------------------------------------------------------------\n// This code creates an input binding for the accordion component\nvar accordionBinding = new Shiny.InputBinding();\n\n$.extend(accordionBinding, {\n find: function(scope) {\n return $(scope).find(\".box-group.accordion\");\n },\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n // active is given by the setValue method\n var activeItem =\n $(el)\n .find(\".active\")\n .index() + 1;\n if (activeItem === 0) return;\n // returns the index of the active item from the R point of view. It is possible\n // that no item is shown at start. In this case, NULL is returned\n return activeItem;\n },\n\n setValue: function(el, value) {\n // remove active class from all other panels\n $(el)\n .find(\".active\")\n .removeClass(\"active\");\n\n // add active class to current panel\n $(el)\n .children()\n .eq(value - 1)\n .addClass(\"active\");\n\n // click on the header to trigger a collapse\n $(el)\n .children()\n .eq(value - 1)\n .find('[data-toggle=\"collapse\"]')\n .click();\n\n // trigger change to tell Shiny to update the value\n $(el).trigger(\"change\");\n },\n\n // see updateAccordion\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n },\n\n subscribe: function(el, callback) {\n // cf setValue\n $(el).on(\"change\", function(e) {\n callback();\n });\n\n // manual click will update\n $(el)\n .find('[data-toggle=\"collapse\"]')\n .on(\"click\", function(e) {\n if (\n !$(this)\n .closest(\".panel\")\n .hasClass(\"active\")\n ) {\n $(el)\n .find(\".active\")\n .removeClass(\"active\");\n }\n $(this)\n .closest(\".panel\")\n .addClass(\"active\");\n callback();\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".accordionBinding\");\n }\n});\n\nShiny.inputBindings.register(accordionBinding, \"accordion-input\");\n","// Buttons valid colors are part of statuses\nconst validStatuses = [\"primary\", \"success\", \"info\", \"warning\", \"danger\"];\n\n// Background goes in colors\nconst validColors = [\n \"red\",\n \"yellow\",\n \"aqua\",\n \"blue\",\n \"light-blue\",\n \"green\",\n \"navy\",\n \"teal\",\n \"olive\",\n \"lime\",\n \"orange\",\n \"fuchsia\",\n \"purple\",\n \"maroon\",\n \"black\",\n \"gray\"\n];\n\n// Cards may have 6 additional statuses\nconst validStatusesPlus = [\n \"navy\",\n \"teal\",\n \"purple\",\n \"orange\",\n \"maroon\",\n \"black\"\n];\n\nconst status_2_color = status => {\n switch (status) {\n case \"primary\":\n return \"light-blue\";\n break;\n case \"success\":\n return \"green\";\n break;\n case \"danger\":\n return \"red\";\n break;\n case \"warning\":\n return \"yellow\";\n break;\n case \"info\":\n return \"aqua\";\n break;\n case \"navy\":\n return \"navy\";\n break;\n case \"teal\":\n return \"teal\";\n break;\n case \"purple\":\n return \"purple\";\n break;\n case \"orange\":\n return \"orange\";\n break;\n case \"maroon\":\n return \"maroon\";\n break;\n case \"black\":\n return \"black\";\n break;\n }\n};\n\nconst color_2_status = color => {\n switch (color) {\n case \"light-blue\":\n return \"primary\";\n break;\n case \"green\":\n return \"success\";\n break;\n case \"red\":\n return \"danger\";\n break;\n case \"yellow\":\n return \"warning\";\n break;\n case \"aqua\":\n return \"info\";\n break;\n case \"navy\":\n return \"navy\";\n break;\n case \"teal\":\n return \"teal\";\n break;\n case \"purple\":\n return \"purple\";\n break;\n case \"orange\":\n return \"orange\";\n break;\n case \"maroon\":\n return \"maroon\";\n break;\n case \"black\":\n return \"black\";\n break;\n }\n};\n// boxBinding\n// ------------------------------------------------------------------\n// This code creates an input binding for the boxPlus component\nvar boxBinding = new Shiny.InputBinding();\n$.extend(boxBinding, {\n find: function(scope) {\n return $(scope).find(\".box\");\n },\n getValue: function(el) {\n var config = $(el)\n .parent()\n .find(\"script[data-for='\" + el.id + \"']\");\n config = JSON.parse(config.html());\n\n var isCollapsed = $(el).hasClass(\"collapsed-box\");\n var display = $(el).css(\"display\");\n\n var visible;\n if (display === \"none\") {\n visible = false;\n } else {\n visible = true;\n }\n return {\n collapsible: config.collapsible,\n collapsed: isCollapsed,\n closable: config.closable,\n visible: visible,\n status: config.status,\n solidHeader: config.solidHeader,\n background: config.background,\n width: config.width,\n height: config.height\n }; // this will be a list in R\n },\n _updateWidth: function(el, o, n) {\n $(el)\n .parent()\n .toggleClass(\"col-sm-\" + o);\n $(el)\n .parent()\n .addClass(\"col-sm-\" + n);\n // trigger resize so that output resize\n $(el).trigger(\"resize\");\n },\n setValue: function(el, value) {\n var config = $(el)\n .parent()\n .find(\"script[data-for='\" + el.id + \"']\");\n config = JSON.parse(config.html());\n\n if (value.action === \"update\") {\n var isUserCard = $(el).hasClass(\"user-card\");\n var isSocialCard = $(el).hasClass(\"social-card\");\n\n // handle HTML tags (harder)\n if (value.options.hasOwnProperty(\"title\")) {\n if (value.options.title !== config.title) {\n var newTitle;\n if (typeof value.options.title !== \"string\") {\n newTitle = $.parseHTML(value.options.title[0]);\n } else {\n newTitle = $.parseHTML(value.options.title);\n }\n\n var tools = $(el).find(\".box-tools\");\n // social box\n if (isSocialCard) {\n $(el)\n .find(\".user-block\")\n .replaceWith($(newTitle));\n } else if (isUserCard) {\n // handle 2 cards types\n if (typeof value.options.title === \"string\") {\n // don't take newTitle[1] (contains some text)\n newTitle = [newTitle[0], newTitle[2]];\n // change widget-use class\n $(el)\n .removeClass(\"widget-user-2\")\n .addClass(\"widget-user\");\n // insert header and image after\n $(el)\n .find(\".widget-user-header\")\n .replaceWith($(newTitle[0]));\n $(newTitle[1]).insertAfter($(el).find(\".widget-user-header\"));\n } else {\n $(el)\n .removeClass(\"widget-user\")\n .addClass(\"widget-user-2\");\n // remove old user inage if old type was 1\n $(el)\n .find(\".widget-user-image\")\n .remove();\n $(el)\n .find(\".widget-user-header\")\n .replaceWith($(newTitle));\n }\n // add tools as first child of widget-user-header\n $(el)\n .find(\".widget-user-header\")\n .prepend($(tools));\n } else {\n if (!$(newTitle).hasClass(\"box-title\"))\n $(newTitle).addClass(\"box-title\");\n $(el)\n .find(\".box-title\")\n .replaceWith($(newTitle));\n }\n config.title = value.options.title;\n }\n }\n\n // Box tools must come before status, background as they are being changed after\n // to add background or status color, depending on user options.\n if (value.options.hasOwnProperty(\"collapsible\")) {\n if (value.options.collapsible !== config.collapsible) {\n if (!value.options.collapsible) {\n $(el)\n .find('[data-widget = \"collapse\"]')\n .remove();\n config.collapsible = false;\n } else {\n // only add if no collapsible\n if ($(el).find('[data-widget = \"collapse\"]').length === 0) {\n $(el)\n .find(\".box-tools.pull-right\")\n .prepend(\n $(\n ''\n )\n );\n config.collapsible = true;\n }\n }\n }\n }\n\n if (value.options.hasOwnProperty(\"closable\")) {\n if (value.options.closable !== config.closable) {\n if (!value.options.closable) {\n $(el)\n .find('[data-widget = \"remove\"]')\n .remove();\n config.closable = false;\n } else {\n if ($(el).find('[data-widget = \"remove\"]').length === 0) {\n $(el)\n .find(\".box-tools.pull-right\")\n .append(\n $(\n ''\n )\n );\n config.closable = true;\n }\n }\n }\n }\n\n // Must come before status and background since status relies on soliHeader\n // Don't apply to userBox and socialBox in AdminLTE2!!!\n if (value.options.hasOwnProperty(\"solidHeader\")) {\n // only update if config an new value are different\n if (!isSocialCard && !isUserCard) {\n if (\n value.options.solidHeader !== config.solidHeader &&\n !$(el).hasClass(\"box-solid\")\n ) {\n $(el).addClass(\"box-solid\");\n config.solidHeader = true;\n } else {\n if ($(el).hasClass(\"box-solid\") && !value.options.solidHeader) {\n var cond = config.status || value.options.status;\n // solidheader cannot be removed if status and background exist or if status is null\n if (!(value.options.background && cond)) {\n $(el).removeClass(\"box-solid\");\n config.solidHeader = false;\n } else if (\n value.options.background === null &&\n !(config.background && cond)\n ) {\n $(el).removeClass(\"box-solid\");\n config.solidHeader = false;\n }\n } else if (!$(el).hasClass(\"box-solid\")) {\n var cond = config.status || value.options.status;\n // solidheader cannot be removed if status and background exist or if status is null\n if (value.options.background && cond) {\n $(el).addClass(\"box-solid\");\n config.solidHeader = true;\n } else if (config.background && cond) {\n $(el).addClass(\"box-solid\");\n config.solidHeader = false;\n }\n }\n }\n }\n }\n\n // To remove status explicitly set status = NULL in updateBox. Don't apply\n // to socialBox in AdminLTE2!!!\n if (value.options.hasOwnProperty(\"status\")) {\n if (!isSocialCard) {\n if (value.options.status !== config.status) {\n var oldClass, newClass;\n // If there was a status and the user decide to remove any status\n if (value.options.status === null && config.status !== null) {\n if (!isUserCard) $(el).removeClass(\"box-\" + config.status);\n // add class box-solid for better render (status = NULL)\n // renders with grey border which is not nice\n if (!$(el).hasClass(\"box-solid\") && !isUserCard) {\n $(el).addClass(\"box-solid\");\n }\n\n // Apply new background color to buttons if any\n if (value.options.background) {\n var background = color_2_status(value.options.background);\n if (validStatusesPlus.indexOf(background) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .addClass(\"bg-\" + background);\n } else if (validStatuses.indexOf(background) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .addClass(\"btn-\" + background);\n }\n }\n\n // in case there is a status and it is not null (indeed we can send null through R)\n } else if (value.options.status) {\n // apply new status\n if (isUserCard) {\n newClass = \"bg-\" + status_2_color(value.options.status);\n if (value.options.gradient) {\n newClass = newClass + \"-gradient\";\n }\n $(el)\n .find(\".widget-user-header\")\n .addClass(newClass);\n } else {\n newClass = \"box-\" + value.options.status;\n $(el).addClass(newClass);\n }\n \n // remove old status, if there was one ...\n if (config.status) {\n if (isUserCard) {\n oldClass = \"bg-\" + status_2_color(config.status);\n if (config.gradient) {\n oldClass = oldClass + \"-gradient\";\n }\n $(el)\n .find(\".widget-user-header\")\n .removeClass(oldClass);\n } else {\n oldClass = \"box-\" + config.status;\n $(el).removeClass(oldClass);\n }\n }\n\n // Add new color for Buttons. We handle extra statuses in which case\n // the button class changes. Only if solidHeader\n if ($(el).hasClass(\"box-solid\") || isUserCard) {\n if (isUserCard) {\n $(el)\n .find(\".btn-box-tool\")\n .addClass(\"bg-\" + status_2_color(value.options.status));\n } else {\n if (validStatusesPlus.indexOf(value.options.status) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .addClass(\"bg-\" + value.options.status);\n } else if (validStatuses.indexOf(value.options.status) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .addClass(\"btn-\" + value.options.status);\n }\n }\n \n }\n }\n\n // If there was a status or background, we must cleanup the old button status\n // since status predominate over background. We also handle extra\n // statuses ...\n var status;\n if (config.status || config.background) {\n // status dominates\n if (config.status) {\n status = config.status;\n } else if (config.background) {\n status = config.background;\n }\n\n if (isUserCard) {\n $(el)\n .find(\".btn-box-tool\")\n .removeClass(\"bg-\" + status_2_color(status));\n } else {\n if (validStatusesPlus.indexOf(status) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .removeClass(\"bg-\" + status);\n } else if (validStatuses.indexOf(status) > -1) {\n $(el)\n .find(\".btn-box-tool\")\n .removeClass(\"btn-\" + status);\n }\n }\n }\n config.status = value.options.status;\n }\n }\n }\n\n // To remove background explicitly set background = NULL in updateBox\n if (value.options.hasOwnProperty(\"background\")) {\n if (value.options.background !== config.background) {\n var oldBgClass = \"bg-\",\n newBgClass = oldBgClass;\n // don't touch if null\n if (config.background) {\n // if gradient, the class has a gradient at the end!\n oldBgClass = oldBgClass + config.background;\n if (config.gradient) {\n oldBgClass = oldBgClass + \"-gradient\";\n }\n // handle userBox\n // for which we also have to toggle the header bg color\n // and the box tools buttons color\n if (isUserCard && !(config.status || value.options.status)) {\n var header = $(el).find(\".widget-user-header\");\n $(header).removeClass(oldBgClass);\n }\n\n $(el).removeClass(oldBgClass);\n }\n if (value.options.background) {\n newBgClass = newBgClass + value.options.background;\n if (config.gradient || value.options.gradient) {\n newBgClass = newBgClass + \"-gradient\";\n }\n if (isUserCard && !(config.status || value.options.status)) {\n var header = $(el).find(\".widget-user-header\");\n $(header).addClass(newBgClass);\n }\n $(el).addClass(newBgClass);\n }\n if (config.gradient !== value.options.gradient &&\n value.options.gradient !== undefined) {\n config.gradient = value.options.gradient;\n }\n config.background = value.options.background;\n }\n }\n\n if (value.options.hasOwnProperty(\"width\")) {\n if (value.options.width !== config.width) {\n this._updateWidth(el, config.width, value.options.width);\n config.width = value.options.width;\n }\n }\n\n if (value.options.hasOwnProperty(\"height\")) {\n if (value.options.height !== config.height) {\n if (value.options.height === null) {\n $(el)\n .find(\".box-body\")\n .css(\"height\", \"\");\n } else {\n $(el)\n .find(\".box-body\")\n .css(\"height\", value.options.height);\n }\n\n config.height = value.options.height;\n // don't need to trigger resize since the output height\n // is not controlled by the box size ...\n }\n }\n\n // replace the old JSON config by the new one to update the input value\n $(el)\n .parent()\n .find(\"script[data-for='\" + el.id + \"']\")\n .replaceWith(\n '\"\n );\n } else {\n if (value === \"restore\") {\n // only restore if not visible\n if ($(el).css(\"display\") == \"none\") {\n $(el).show();\n } else {\n console.warn(\"This box is already visible!\");\n }\n } else if (value === \"toggle\") {\n if ($(el).css(\"display\") !== \"none\") {\n $(el).toggleBox();\n } else {\n console.warn(\n \"This box is not visible. It does not make sense to collapse it!\"\n );\n }\n } else {\n if ($(el).css(\"display\") !== \"none\") {\n $(el).removeBox();\n } else {\n console.warn(\"This box is not visible!\");\n }\n }\n }\n },\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n $(el).trigger(\"change\");\n },\n subscribe: function(el, callback) {\n // handle manual click on collapse button\n $(el).on(\"click\", '[data-widget=\"collapse\"]', function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n\n // handle manual click on remove button\n $(el).on(\"click\", '[data-widget=\"remove\"]', function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n\n // handle change event triggered in the setValue method\n $(el).on(\"change\", function(event) {\n setTimeout(function() {\n callback();\n }, 550);\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".boxBinding\");\n }\n});\n\nShiny.inputBindings.register(boxBinding, \"box-input\");\n\n// boxSidebarBinding\n// ------------------------------------------------------------------\n// This code creates an input binding for the boxPlus sidebar component\nvar boxSidebarBinding = new Shiny.InputBinding();\n$.extend(boxSidebarBinding, {\n initialize: function(el) {\n // erase default to avoid seeing moving sidebars on initialization\n $(\".direct-chat-contacts, .direct-chat-messages\").css({\n transition: \"transform .0s ease-in-out\"\n });\n\n var background = $(el).attr(\"data-background\")\n ? $(el).attr(\"data-background\")\n : \"#343a40\";\n var width = $(el).attr(\"data-width\")\n ? parseInt($(el).attr(\"data-width\"))\n : 100;\n var closeTranslationRate = (100 * 100) / width;\n var contacts = $(el)\n .closest(\".direct-chat\")\n .find(\".direct-chat-contacts\");\n\n // apply width and background\n $(contacts).css({\n background: `${background}`,\n width: `${width}%`\n });\n\n // If start open, apply openTranslationRate else apply closeTranslationRate ...\n if ($(el).attr(\"data-start-open\") === \"true\") {\n var openTranslationRate = closeTranslationRate - 100;\n $(contacts).css({ transform: `translate(${openTranslationRate}%, 0)` });\n } else {\n $(contacts).css({ transform: `translate(${closeTranslationRate}%, 0)` });\n }\n\n // Restore for better transitions\n setTimeout(function() {\n $(\".direct-chat-contacts, .direct-chat-messages\").css({\n transition: \"transform .5s ease-in-out\"\n });\n }, 300);\n },\n\n find: function(scope) {\n return $(scope).find('[data-widget=\"chat-pane-toggle\"]');\n },\n\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n var boxWrapper = $(el).closest(\".box\");\n return $(boxWrapper).hasClass(\"direct-chat-contacts-open\");\n },\n\n // see updateBoxSidebar\n receiveMessage: function(el, data) {\n $(el).trigger(\"click\");\n $(el).trigger(\"shown\");\n },\n\n subscribe: function(el, callback) {\n var self = this;\n $(el).on(\"click\", function(e) {\n var width = $(el).attr(\"data-width\")\n ? parseInt($(el).attr(\"data-width\"))\n : 100;\n var closeTranslationRate = (100 * 100) / width;\n var openTranslationRate = closeTranslationRate - 100;\n // set a delay so that Shiny get the input value when the collapse animation\n // is finished.\n var target = e.currentTarget;\n setTimeout(function(e = target) {\n // apply correct translation rate depending on current state\n var contacts = $(e)\n .closest(\".direct-chat\")\n .find(\".direct-chat-contacts\");\n if (self.getValue(el)) {\n $(contacts).css({\n transform: `translate(${openTranslationRate}%, 0)`\n });\n } else {\n $(contacts).css({\n transform: `translate(${closeTranslationRate}%, 0)`\n });\n }\n callback();\n }, 10);\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".boxSidebarBinding\");\n }\n});\n\nShiny.inputBindings.register(boxSidebarBinding, \"box-sidebar-input\");\n\n// flipbox\n// ------------------------------------------------------------------\n// This code creates an input binding for the flipbox component\nvar flipBoxBinding = new Shiny.InputBinding();\n\n$.extend(flipBoxBinding, {\n find: function(scope) {\n return $(scope).find(\".flipbox\");\n },\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n return $(el)\n .find(\".card-front\")\n .hasClass(\"active\");\n },\n\n setValue: function(el, value) {\n var currentSide = $(el).find(\".active\");\n if ($(el).data(\"rotate\") === \"hover\") {\n if ($(currentSide).hasClass(\"card-front\")) {\n $(currentSide).trigger(\"mouseenter\");\n } else {\n $(currentSide).trigger(\"mouseleave\");\n }\n } else if ($(el).data(\"rotate\") === \"click\") {\n $(currentSide).trigger(\"click\");\n }\n },\n\n // see updateAccordion\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n },\n _clickOnFront: function(el) {\n $(el)\n .find(\".card-front\")\n .css({\n \"-webkit-transform\": \"perspective(1600px) rotateY(-180deg)\",\n transform: \"perspective(1600px) rotateY(-180deg)\"\n })\n .toggleClass(\"active\");\n $(el)\n .find(\".card-back\")\n .css({\n \"-webkit-transform\": \"perspective(1600px) rotateY(0deg)\",\n transform: \"perspective(1600px) rotateY(0deg)\"\n })\n .toggleClass(\"active\");\n },\n _clickOnBack: function(el) {\n $(el)\n .find(\".card-front\")\n .css({ \"-webkit-transform\": \"\", transform: \"\" })\n .toggleClass(\"active\");\n $(el)\n .find(\".card-back\")\n .css({ \"-webkit-transform\": \"\", transform: \"\" })\n .toggleClass(\"active\");\n },\n subscribe: function(el, callback) {\n var self = this; // this will not work inside event listeners since it will\n // refer to the element we clicked on and not the input binding object!!!\n\n // use the data object to identify the trigger\n if ($(el).data(\"rotate\") === \"hover\") {\n $(el)\n .find(\".card-front\")\n .on(\"mouseenter\", function() {\n self._clickOnFront(el);\n callback();\n });\n\n $(el)\n .find(\".card-back\")\n .on(\"mouseleave\", function() {\n self._clickOnBack(el);\n callback();\n });\n } else if ($(el).data(\"rotate\") === \"click\") {\n // click front\n $(el).on(\"click\", \".card-front\", function(e) {\n self._clickOnFront(el);\n callback();\n });\n\n // click back\n $(el).on(\"click\", \".card-back\", function(e) {\n self._clickOnBack(el);\n callback();\n });\n }\n },\n\n unsubscribe: function(el) {\n $(el).off(\".flipBoxBinding\");\n }\n});\n\nShiny.inputBindings.register(flipBoxBinding, \"flipbox-input\");\n","$(function() {\n // boxSidebarBinding\n // ------------------------------------------------------------------\n // This code creates an input binding for the dashboard controlbar component\n var controlbarBinding = new Shiny.InputBinding();\n\n $.extend(controlbarBinding, {\n find: function(scope) {\n return $(scope).find(\".control-sidebar\");\n },\n\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n // this handles the case where the controlbar is not collapsed at start\n var controlbarCollapsed = $(el).attr('data-collapsed');\n var overlay = $(\".control-sidebar\").attr(\"data-overlay\") === \"true\";\n // We have to overwrite the existing options by the user provided.\n $.AdminLTE.options.controlSidebarOptions.slide = overlay;\n if (controlbarCollapsed === \"false\") {\n $(\"[data-toggle='control-sidebar']\").click();\n $(el).attr('data-collapsed', \"true\");\n return true;\n } else {\n if (!overlay) {\n return $(\"body\").hasClass(\"control-sidebar-open\"); \n } else {\n return $(el).hasClass(\"control-sidebar-open\");\n }\n }\n },\n\n // see updateControlbar\n receiveMessage: function(el, data) {\n $(\"[data-toggle='control-sidebar']\").click();\n },\n\n subscribe: function(el, callback) {\n $(\"[data-toggle='control-sidebar']\").on(\"click\", function(e) {\n callback();\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".controlbarBinding\");\n }\n });\n\n Shiny.inputBindings.register(controlbarBinding, \"controlbar-input\");\n\n // This prevent box content from going outside their container \n // when the control-bar is on push mode\n $(\"[data-toggle='control-sidebar']\").on(\"click\",\n function() {\n if (!$.AdminLTE.options.controlSidebarOptions.slide) {\n $(window).trigger(\"resize\"); \n }\n });\n\n // hide the right sidebar toggle\n // if no right sidebar is specified\n var noControlbar = $(\".control-sidebar\").length === 0;\n if (noControlbar) {\n $(\"[data-toggle='control-sidebar']\").hide();\n }\n\n // hide the right sidebar toggle if the controlbar is disable\n var disableControlbar = $(\".control-sidebar\").attr(\"data-show\");\n if (disableControlbar === \"false\") {\n $(\"[data-toggle='control-sidebar']\").hide();\n }\n});\n","var ensureActivatedTab = function() {\n var $tablinks = $(\".sidebar-menu a[data-toggle='tab']\");\n\n // If there's a `data-start-selected` attribute and we can find a tab with\n // that name, activate it.\n var $startTab = $tablinks.filter(\"[data-start-selected='1']\");\n if ($startTab.length === 0) {\n // If no tab starts selected, use the first one, if present\n $startTab = $tablinks.first();\n }\n\n // If there are no tabs, $startTab.length will be 0.\n if ($startTab.length !== 0) {\n $startTab.tab(\"show\");\n\n // This is indirectly setting the value of the Shiny input by setting\n // an attribute on the html element it is bound to. We cannot use the\n // inputBinding's setValue() method here because this is called too\n // early (before Shiny has fully initialized)\n $(\".sidebarMenuSelectedTabItem\").attr(\n \"data-value\",\n $startTab.attr(\"data-value\")\n );\n }\n};\n\n$(function() {\n // tabItemInputBinding\n // ------------------------------------------------------------------\n // Based on Shiny.tabItemInputBinding, but customized for tabItems in\n // shinydashboard, which have a slightly different structure.\n var tabItemInputBinding = new Shiny.InputBinding();\n $.extend(tabItemInputBinding, {\n find: function(scope) {\n return $(scope).find(\".sidebarMenuSelectedTabItem\");\n },\n getValue: function(el) {\n var value = $(el).attr(\"data-value\");\n if (value === \"null\") return null;\n return value;\n },\n setValue: function(el, value) {\n var self = this;\n var anchors = $(el)\n .parent(\"ul.sidebar-menu\")\n .find(\"li:not(.treeview)\")\n .children(\"a\");\n anchors.each(function() {\n // eslint-disable-line consistent-return\n if (self._getTabName($(this)) === value) {\n $(this).tab(\"show\");\n $(el).attr(\"data-value\", self._getTabName($(this)));\n return false;\n }\n });\n },\n receiveMessage: function(el, data) {\n if (data.hasOwnProperty(\"value\")) this.setValue(el, data.value);\n },\n subscribe: function(el, callback) {\n // This event is triggered by deactivateOtherTabs, which is triggered by\n // shown. The deactivation of other tabs must occur before Shiny gets the\n // input value.\n $(el).on(\"change.tabItemInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".tabItemInputBinding\");\n },\n _getTabName: function(anchor) {\n return anchor.attr(\"data-value\");\n }\n });\n\n Shiny.inputBindings.register(\n tabItemInputBinding,\n \"shinydashboard.tabItemInput\"\n );\n\n // sidebarCollapsedInputBinding\n // ------------------------------------------------------------------\n // This keeps tracks of whether the sidebar is expanded (default)\n // or collapsed\n var sidebarCollapsedInputBinding = new Shiny.InputBinding();\n $.extend(sidebarCollapsedInputBinding, {\n find: function(scope) {\n // This will also have id=\"sidebarCollapsed\"\n return $(scope)\n .find(\".main-sidebar\")\n .first();\n },\n getValue: function(el) {\n if ($(el).attr(\"id\") === \"sidebarCollapsed\") {\n return $(el).attr(\"data-collapsed\") === \"true\";\n } else {\n return $(el).attr(\"data-collapsed\") === \"false\";\n }\n },\n setValue: function(el, value) {\n $(el).attr(\"data-collapsed\", value);\n },\n toggleValue: function(el) {\n var current = this.getValue(el);\n var newVal = current ? \"false\" : \"true\";\n this.setValue(el, newVal);\n },\n receiveMessage: function(el, data) {\n if (data.hasOwnProperty(\"value\")) this.setValue(el, data.value);\n $(\"[data-toggle='offcanvas']\").click();\n },\n subscribe: function(el, callback) {\n $(el).on(\"change.sidebarCollapsedInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".sidebarCollapsedInputBinding\");\n }\n });\n Shiny.inputBindings.register(\n sidebarCollapsedInputBinding,\n \"shinydashboard.sidebarCollapsedInputBinding\"\n );\n\n // sidebarmenuExpandedInputBinding\n // ------------------------------------------------------------------\n // This keeps tracks of what menuItem (if any) is expanded\n $(\"section.sidebar a i\").click(function() {\n if ($(this).hasClass(\"fa-angle-down\")) {\n self = $(this);\n setTimeout(function() {\n self.removeClass(\"fa-angle-down\").addClass(\"fa-angle-left\");\n }, 500);\n }\n });\n\n var sidebarmenuExpandedInputBinding = new Shiny.InputBinding();\n $.extend(sidebarmenuExpandedInputBinding, {\n find: function(scope) {\n // This will also have id=\"sidebarItemExpanded\"\n return $(scope).find(\"section.sidebar\");\n },\n getValue: function(el) {\n var $open = $(el).find(\"li ul.menu-open\");\n var icon = $(el)\n .find(\".treeview.active > a i\")\n .eq(1);\n if ($open.length === 1) {\n $(icon)\n .toggleClass(\"fa-angle-left\")\n .addClass(\"fa-angle-down\");\n return $open.attr(\"data-expanded\");\n } else {\n return null;\n }\n },\n setValue: function(el, value) {\n var $menuItem = $(el).find(\"[data-expanded='\" + value + \"']\");\n // This will trigger actions defined by AdminLTE, as well as actions\n // defined in sidebar.js.\n $menuItem.prev().trigger(\"click\");\n },\n subscribe: function(el, callback) {\n $(el).on(\"change.sidebarmenuExpandedInputBinding\", function() {\n callback();\n });\n },\n unsubscribe: function(el) {\n $(el).off(\".sidebarmenuExpandedInputBinding\");\n }\n });\n Shiny.inputBindings.register(\n sidebarmenuExpandedInputBinding,\n \"shinydashboard.sidebarmenuExpandedInputBinding\"\n );\n\n // Optionally disable sidebar (set through the `disable` argument\n // to the `dashboardSidebar` function)\n if ($(\"section.sidebar\").data(\"disable\")) {\n $(\"body\").addClass(\"sidebar-collapse\");\n $(\".navbar > .sidebar-toggle\").hide();\n }\n\n // toggle sidebar at start depending on the body class\n var sidebarCollapsed = $(\".main-sidebar\").attr(\"data-collapsed\");\n if (sidebarCollapsed === \"true\") {\n $(\"body\").addClass(\"sidebar-collapse\");\n }\n\n // handle the sidebar partial collapse feature\n var sidebarMinified = $(\".main-sidebar\").attr(\"data-minified\");\n if (sidebarMinified === \"true\") {\n $(\"body\").addClass(\"sidebar-mini\");\n }\n\n // Get the correct value for `input$sidebarCollapsed`, depending on\n // whether or not the left offset on the sidebar is negative (hidden\n // - so `input$sidebarCollapsed` should be TRUE) or 0 (shown - so\n // `input$sidebarCollapsed` should be FALSE). That we know of,\n // `$(\".main-sidebar\").is(\":visible\")` is always true, so there is\n // no need to check for that.\n // Determine whether the sidebar should be minified instead of fully collapsed\n var sidebarCollapsedValue = function() {\n if ($(\"body\").hasClass(\"sidebar-collapse\")) return true;\n else return false;\n };\n\n // Whenever the sidebar changes from collapsed to expanded and vice versa,\n // call this function, so that we can trigger the resize event on the rest\n // of the window and also update the value for the sidebar's input binding.\n var sidebarChange = function() {\n // 1) Trigger the resize event (so images are responsive and resize)\n $(window).trigger(\"resize\");\n\n // 2) Update the value for the sidebar's input binding\n var $obj = $(\".main-sidebar.shiny-bound-input\");\n var inputBinding = $obj.data(\"shiny-input-binding\");\n inputBinding.setValue($obj, sidebarCollapsedValue());\n $obj.trigger(\"change\");\n };\n\n // Whenever the sidebar finishes a transition (which it does every time it\n // changes from collapsed to expanded and vice versa), call sidebarChange()\n $(\".main-sidebar\").on(\n \"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend\",\n sidebarChange\n );\n\n // This fixes an edge case: when the app starts up with the sidebar already\n // collapsed (either because the screen is small or because\n // `dashboardSidebar(disable = TRUE`), make sure that `input$sidebarCollapsed`\n // is set to `FALSE`. Whenever this is the case, `$(\".main-sidebar\").offset().left`\n // is negative. That we know of, `$(\".main-sidebar\").is(\":visible\")` is always\n // true, so there is no need to check for that.\n if ($(\"body\").hasClass(\"sidebar-collapse\")) {\n // This is indirectly setting the value of the Shiny input by setting\n // an attribute on the html element it is bound to. We cannot use the\n // inputBinding's setValue() method here because this is called too\n // early (before Shiny has fully initialized)\n $(\".main-sidebar\").attr(\"data-collapsed\", \"true\");\n }\n\n // Whenever we expand a menuItem (to be expandable, it must have children),\n // update the value for the expandedItem's input binding (this is the\n // tabName of the fist subMenuItem inside the menuItem that is currently\n // expanded)\n $(document).on(\"click\", \".treeview > a\", function() {\n var $menu = $(this).next();\n // If this menuItem was already open, then clicking on it again,\n // should trigger the \"hidden\" event, so Shiny doesn't worry about\n // it while it's hidden (and vice versa).\n if ($menu.hasClass(\"menu-open\")) $menu.trigger(\"hidden\");\n else if ($menu.hasClass(\"treeview-menu\")) $menu.trigger(\"shown\");\n\n // need to set timeout to account for the slideUp/slideDown animation\n var $obj = $(\"section.sidebar.shiny-bound-input\");\n setTimeout(function() {\n $obj.trigger(\"change\");\n }, 600);\n });\n\n // This function handles a special case in the AdminLTE sidebar: when there\n // is a sidebar-menu with items, and one of those items has sub-items, and\n // they are used for tab navigation. Normally, if one of the items is\n // selected and then a sub-item is clicked, both the item and sub-item will\n // retain the \"active\" class, so they will both be highlighted. This happens\n // because they're not designed to be used together for tab panels. This\n // code ensures that only one item will have the \"active\" class.\n var deactivateOtherTabs = function() {\n // Find all tab links under sidebar-menu even if they don't have a\n // tabName (which is why the second selector is necessary)\n var $tablinks = $(\n \".sidebar-menu a[data-toggle='tab'],\" + \".sidebar-menu li.treeview > a\"\n );\n\n // If any other items are active, deactivate them\n $tablinks\n .not($(this))\n .parent(\"li\")\n .removeClass(\"active\");\n\n // Trigger event for the tabItemInputBinding\n var $obj = $(\".sidebarMenuSelectedTabItem\");\n var inputBinding = $obj.data(\"shiny-input-binding\");\n if (typeof inputBinding !== \"undefined\") {\n inputBinding.setValue($obj, $(this).attr(\"data-value\"));\n $obj.trigger(\"change\");\n }\n };\n\n $(document).on(\n \"shown.bs.tab\",\n '.sidebar-menu a[data-toggle=\"tab\"]',\n deactivateOtherTabs\n );\n\n // When document is ready, if there is a sidebar menu with no activated tabs,\n // activate the one specified by `data-start-selected`, or if that's not\n // present, the first one.\n ensureActivatedTab();\n});\n","$(function() {\n // box vertical overflow\n $(\".content-wrapper\").css(\"overflow-y\", \"auto\");\n\n // slide to top button\n if ($(\"body\").attr(\"data-scrollToTop\") == 1) {\n var $slideToTop = $(\"
\");\n\n $slideToTop.html('');\n\n $slideToTop.css({\n position: \"fixed\",\n bottom: \"20px\",\n right: \"25px\",\n width: \"40px\",\n height: \"40px\",\n color: \"#eee\",\n \"font-size\": \"\",\n \"line-height\": \"40px\",\n \"text-align\": \"center\",\n \"background-color\": \"#222d32\",\n cursor: \"pointer\",\n \"border-radius\": \"5px\",\n \"z-index\": \"99999\",\n opacity: \".7\",\n display: \"none\"\n });\n\n $slideToTop.on(\"mouseenter\", function() {\n $(this).css(\"opacity\", \"1\");\n });\n\n $slideToTop.on(\"mouseout\", function() {\n $(this).css(\"opacity\", \".7\");\n });\n\n $(\".wrapper\").append($slideToTop);\n\n $(window).scroll(function() {\n if ($(window).scrollTop() >= 150) {\n if (!$($slideToTop).is(\":visible\")) {\n $($slideToTop).fadeIn(500);\n }\n } else {\n $($slideToTop).fadeOut(500);\n }\n });\n\n $($slideToTop).click(function() {\n $(\"html, body\").animate(\n {\n scrollTop: 0\n },\n 500\n );\n });\n }\n\n // code to make sure that a carousel item is displayed\n // when it is generated via a shiny Output function\n // Thanks Dean Attali for the report\n $(\".carousel\").on(\"slide.bs.carousel\", function() {\n $(this).trigger(\"shown\");\n });\n\n /**\n * List of all the available skins\n *\n * @type Array\n */\n var mySkins = [\n \"skin-blue\",\n \"skin-black\",\n \"skin-red\",\n \"skin-yellow\",\n \"skin-purple\",\n \"skin-green\",\n \"skin-blue-light\",\n \"skin-black-light\",\n \"skin-red-light\",\n \"skin-yellow-light\",\n \"skin-purple-light\",\n \"skin-green-light\"\n ];\n\n /**\n * Store a new settings in the browser\n *\n * @param String name Name of the setting\n * @param String val Value of the setting\n * @returns void\n */\n function store(name, val) {\n if (typeof Storage !== \"undefined\") {\n localStorage.setItem(name, val);\n } else {\n window.alert(\n \"Please use a modern browser to properly view this template!\"\n );\n }\n }\n\n /**\n * Replaces the old skin with the new skin\n * @param String cls the new skin class\n * @returns Boolean false to prevent link's default action\n */\n changeSkin = function(cls) {\n $.each(mySkins, function(i) {\n $(\"body\").removeClass(mySkins[i]);\n });\n\n $(\"body\").addClass(cls);\n store(\"skin\", cls);\n return false;\n };\n});\n","// navPills\n// ------------------------------------------------------------------\n// This code creates an input binding for the navPills component\nvar navPillsBinding = new Shiny.InputBinding();\n\n$.extend(navPillsBinding, {\n find: function(scope) {\n return $(scope).find(\".nav.nav-pills.nav-stacked.shinydashboardplus-custom\");\n },\n // Given the DOM element for the input, return the value\n getValue: function(el) {\n var activeItem =\n $(el)\n .find(\".active\")\n .index() + 1;\n if (activeItem === 0) {\n $(el)\n .children()\n .first()\n .addClass(\"active\");\n activeItem = 1;\n }\n // returns the index of the active item from the R point of view\n return activeItem;\n },\n\n setValue: function(el, value) {\n $(el)\n .children()\n .eq(value - 1)\n .trigger(\"click\");\n },\n\n // see updateControlbar\n receiveMessage: function(el, data) {\n this.setValue(el, data);\n },\n\n subscribe: function(el, callback) {\n $(el).on(\"click\", \"li\", function(e) {\n if (!$(this).hasClass(\"active\")) {\n $(el)\n .find(\".active\")\n .removeClass(\"active\");\n $(this).addClass(\"active\");\n callback();\n } else {\n return;\n }\n });\n },\n\n unsubscribe: function(el) {\n $(el).off(\".navPillsBinding\");\n }\n});\n\nShiny.inputBindings.register(navPillsBinding, \"navPills-input\");\n","// menuOutputBinding\n// ------------------------------------------------------------------\n// Based on Shiny.htmlOutputBinding, but instead of putting the result in a\n// wrapper div, it replaces the origin DOM element with the new DOM elements,\n// copying over the ID and class.\nvar menuOutputBinding = new Shiny.OutputBinding();\n$.extend(menuOutputBinding, {\n find: function(scope) {\n return $(scope).find(\".shinydashboard-menu-output\");\n },\n onValueError: function(el, err) {\n Shiny.unbindAll(el);\n this.renderError(el, err);\n },\n renderValue: function(el, data) {\n Shiny.unbindAll(el);\n\n var html;\n var dependencies = [];\n if (data === null) {\n return;\n } else if (typeof data === \"string\") {\n html = data;\n } else if (typeof data === \"object\") {\n html = data.html;\n dependencies = data.deps;\n }\n\n var $html = $($.parseHTML(html));\n\n // Convert the inner contents to HTML, and pass to renderHtml\n Shiny.renderHtml($html.html(), el, dependencies);\n\n // Extract class of wrapper, and add them to the wrapper element\n el.className =\n \"shinydashboard-menu-output shiny-bound-output \" + $html.attr(\"class\");\n\n Shiny.initializeInputs(el);\n Shiny.bindAll(el);\n if ($(el).hasClass(\"sidebar-menu\")) ensureActivatedTab(); // eslint-disable-line\n }\n});\nShiny.outputBindings.register(\n menuOutputBinding,\n \"shinydashboard.menuOutputBinding\"\n);\n","// This code creates acustom handler for userMessages\nShiny.addCustomMessageHandler(\"user-messages\", function(message) {\n var id = message.id,\n action = message.action,\n content = message.body,\n index = message.index;\n\n // message text\n // We use Shiny.renderHtml to handle the case where the user pass input/outputs in the updated content that require a new dependency not available in the\n // page at startup.\n if (content.hasOwnProperty(\"text\")) {\n var text;\n if (content.text.html === undefined) {\n text = content.text;\n } else {\n text = Shiny.renderHtml(content.text.html, $([]), content.text.deps).html;\n }\n }\n\n // unbind all\n Shiny.unbindAll();\n\n if (action === \"remove\") {\n $(\"#\" + id)\n .find(\".direct-chat-msg\")\n .eq(index - 1)\n .remove();\n } else if (action === \"add\") {\n var author = content.author,\n date = content.date,\n image = content.image,\n type = content.type;\n\n // build the new message\n var newMessage =\n '
' +\n '' +\n author +\n \"\" +\n '' +\n date +\n \"\" +\n \"
\" +\n '' +\n '
' +\n text +\n \"
\";\n\n // build wrapper\n var newMessageWrapper;\n if (type === \"sent\") {\n newMessageWrapper =\n '
' + newMessage + \"
\";\n } else {\n newMessageWrapper =\n '
' + newMessage + \"
\";\n }\n\n // append message\n $(\"#\" + id)\n .find(\".direct-chat-messages\")\n .append(newMessageWrapper);\n } else if (action === \"update\") {\n // today's date\n var d = new Date();\n var month = d.getMonth() + 1;\n var day = d.getDate();\n var today =\n d.getFullYear() +\n \"/\" +\n ((\"\" + month).length < 2 ? \"0\" : \"\") +\n month +\n \"/\" +\n ((\"\" + day).length < 2 ? \"0\" : \"\") +\n day;\n\n // we assume only text may be updated. Does not make sense to modify author/date\n\n $(\"#\" + id)\n .find(\".direct-chat-text\")\n .eq(index - 1)\n .replaceWith(\n '
(modified: ' +\n today +\n \")
\" +\n text +\n \"
\"\n );\n }\n\n // Calls .initialize() for all of the input objects in all input bindings,\n // in the given scope (document)\n Shiny.initializeInputs();\n Shiny.bindAll(); // bind all inputs/outputs\n});\n"]} diff --git a/srcjs/shinydashboardPlus-2.0.0/navs.js b/srcjs/shinydashboardPlus-2.0.0/navs.js index cf7e5de..7c6e4f5 100644 --- a/srcjs/shinydashboardPlus-2.0.0/navs.js +++ b/srcjs/shinydashboardPlus-2.0.0/navs.js @@ -5,7 +5,7 @@ var navPillsBinding = new Shiny.InputBinding(); $.extend(navPillsBinding, { find: function(scope) { - return $(scope).find(".nav.nav-pills.nav-stacked"); + return $(scope).find(".nav.nav-pills.nav-stacked.shinydashboardplus-custom"); }, // Given the DOM element for the input, return the value getValue: function(el) {