From 56f1c979dfa2316bc271d36e18e8c0028eb3e4eb Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Tue, 10 Feb 2026 18:17:01 +0000 Subject: [PATCH] Documentation added --- R/adminLTEApplication.R | 10 ++- R/frameApplication.R | 26 +++++- R/sessionLogger.R | 23 +++++ R/ufApplication.R | 10 +++ R/ufDashboardApplication.R | 15 ++++ R/ufFrameApplication.R | 2 + man/AdminLTEApplication.Rd | 95 ++++++++++++++++++++ man/FrameApplication.Rd | 164 ++++++++++++++++++++++++++++++++++ man/SessionLogger.Rd | 80 +++++++++++++++++ man/SessionLoggerConsole.Rd | 43 +++++++++ man/SessionLoggerDB.Rd | 67 ++++++++++++++ man/UFApplication.Rd | 95 ++++++++++++++++++++ man/UFDashboardApplication.Rd | 114 +++++++++++++++++++++++ man/UFFrameApplication.Rd | 53 +++++++++++ 14 files changed, 795 insertions(+), 2 deletions(-) create mode 100644 man/AdminLTEApplication.Rd create mode 100644 man/FrameApplication.Rd create mode 100644 man/SessionLogger.Rd create mode 100644 man/SessionLoggerConsole.Rd create mode 100644 man/SessionLoggerDB.Rd create mode 100644 man/UFApplication.Rd create mode 100644 man/UFDashboardApplication.Rd create mode 100644 man/UFFrameApplication.Rd diff --git a/R/adminLTEApplication.R b/R/adminLTEApplication.R index b03cce0..da1c1fc 100644 --- a/R/adminLTEApplication.R +++ b/R/adminLTEApplication.R @@ -1,17 +1,25 @@ - +#' AdminLTE (bootstrap dashboard) themed R shiny application +#' #' @export # nolint next: object_name_linter. R6Class AdminLTEApplication <- R6::R6Class( "AdminLTEApplication", inherit = FrameApplication, public = list( + #' @description Uses a specific AdminLTE skin colour + #' @param skin The AdminLTE skin colour to use withSkin = function(skin) { private$skin <- skin invisible(self) }, + #' @description Returns the basic FrameApplication UI without the AdminLTE + #' page body. + #' @returns R Shiny tagList for the frame UI frameUI = function() { super$ui() }, + #' @description AdminLTE ui for an R Shiny application + #' @returns R Shiny tagList for an AdminLTE UI ui = function() { ui <- shiny::tags$body( class = paste0("hold-transition skin-", private$skin), diff --git a/R/frameApplication.R b/R/frameApplication.R index e41b4f0..35bafa5 100644 --- a/R/frameApplication.R +++ b/R/frameApplication.R @@ -1,9 +1,15 @@ - +#' Basic R shiny application +#' #' @export # nolint next: object_name_linter. R6Class FrameApplication <- R6::R6Class( "FrameApplication", public = list( + #' @description Creates a new R Shiny application + #' @param appPage An application module (attempts to load + #' pages/application.R if not supplied) + #' @param language The language to use for the HTML page + #' (defaults to "en") initialize = function(appPage = NULL, language = NULL) { if (!is.null(appPage)) { private$appPage <- appPage @@ -15,6 +21,8 @@ FrameApplication <- R6::R6Class( } invisible(self) }, + #' @description Binds the application to a session logger + #' @param sessionLogger The session logger instance to use withSessionLogger = function(sessionLogger) { if (!inherits(sessionLogger, "SessionLogger")) { rlang::abort("sessionLogger is not an instance of SessionLogger class") @@ -22,10 +30,18 @@ FrameApplication <- R6::R6Class( private$sessionLogger <- sessionLogger invisible(self) }, + #' @description Loads with the Bootstrap 4 shim CSS file withBootstrap4Shim = function() { private$withBS4 <- TRUE invisible(self) }, + #' @description Returns a DBClient instance for the current session + #' @param session An R Shiny session + #' @param db_config The database configuration to use (will attempt to find + #' and load a global.R or .env.R file if not supploed) + #' @param allowFailure If a configuration cannot be loaded or a connection + #' to the database cannot be made, do not abort + #' @returns A DBClient instance which is useable for the session getSessionDBClient = function( session, db_config = NULL, allowFailure = FALSE ) { @@ -59,6 +75,7 @@ FrameApplication <- R6::R6Class( # Create the client instance AVSDevR.DBClient::DBClient$new(db_conn) }, + #' @description Creates the UI component for an R Shiny application ui = function() { if (file.exists("widgets/menu.R")) { # Multi-frame application @@ -119,6 +136,11 @@ FrameApplication <- R6::R6Class( # Set the language shiny:::setLang(ui, private$language) }, + #' @description Creates the server component for an R Shiny application + #' @param input The UI inputs bound for the session + #' @param output The UI outputs bound for the session + #' @param session The current session + #' @param ... Parameters passed into the inner application server = function(input, output, session, ...) { if (!is.null(private$sessionLogger)) { private$sessionLogger$attachSession(session) @@ -131,6 +153,8 @@ FrameApplication <- R6::R6Class( ... ) }, + #' @description Instantiates an R Shiny application + #' @returns An R Shiny application suitable for \link[shiny]{runApp} app = function() { shiny::shinyApp(self$ui(), self$server) } diff --git a/R/sessionLogger.R b/R/sessionLogger.R index 89535c0..b384ed8 100644 --- a/R/sessionLogger.R +++ b/R/sessionLogger.R @@ -1,8 +1,16 @@ +#' R shiny application session logger +#' +#' Wraps an R Shiny application or attaches to an R Shiny session to log session +#' start / end events +#' #' @export # nolint next: object_name_linter. R6Class SessionLogger <- R6::R6Class( "SessionLogger", public = list( + #' @description Wraps an existing R Shiny application with a session logger + #' @param app An R Shiny application (\link[shiny]{shinyApp}) + #' @returns The wrapped R Shiny application wrap = function(app) { wrapped_server <- function(input, output, session, ...) { self$attachSession(session) @@ -15,6 +23,10 @@ SessionLogger <- R6::R6Class( app }, + #' @description Attaches to an existing R Shiny session to log start / end + #' events. + #' @param session An R Shiny session to log start / end events for + #' @returns A function which can be called to cancel the "end" log attachSession = function(session) { private$onSessionStarted(session) session$onSessionEnded(function() { @@ -64,6 +76,10 @@ SessionLogger <- R6::R6Class( ) ) +#' R shiny application session console logger. +#' +#' Logs session start / stop events to console. +#' #' @export # nolint next: object_name_linter. R6Class SessionLoggerConsole <- R6::R6Class( @@ -92,12 +108,19 @@ SessionLoggerConsole <- R6::R6Class( ) ) +#' R shiny application session database logger +#' +#' Logs session start / stop events to database +#' #' @export # nolint next: object_name_linter. R6Class SessionLoggerDB <- R6::R6Class( "SessionLoggerDB", inherit = SessionLogger, public = list( + #' @description Initialises the instance with a database client + #' \link[AVSDevR.DBClient]{DBClient} + #' @param db_client <\link[AVSDevR.DBClient]{DBClient}> A DBClient instance initialize = function(db_client) { if (is.null(db_client) || !inherits(db_client, "DBClient")) { stop("DBClient instance required!") diff --git a/R/ufApplication.R b/R/ufApplication.R index 1af8741..a3d7d61 100644 --- a/R/ufApplication.R +++ b/R/ufApplication.R @@ -1,9 +1,16 @@ +#' Core UserFrosting (basic AdminLTE themed) R shiny application +#' #' @export # nolint next: object_name_linter. R6Class UFApplication <- R6::R6Class( "UFApplication", inherit = AdminLTEApplication, public = list( + #' @description Sets up the UserFrosting configuration for the application + #' @param uri The URI for the UserFrosting API instance + #' @param with_users Enable UF user API interaction + #' @param user_optional Are users optional? + #' @param app_name The shiny application name for the UF API configureUF = function( uri, with_users = TRUE, user_optional = FALSE, app_name = NULL ) { @@ -19,6 +26,9 @@ UFApplication <- R6::R6Class( } invisible(self) }, + #' @description Instantiates an R Shiny application with UserFrosting + #' support. + #' @returns An R Shiny application suitable for \link[shiny]{runApp} app = function() { AVSDevR.UserFrosting::ufWrapApplication( super$app(), private$ufURI, private$with_users, diff --git a/R/ufDashboardApplication.R b/R/ufDashboardApplication.R index 880f338..e45b26a 100644 --- a/R/ufDashboardApplication.R +++ b/R/ufDashboardApplication.R @@ -1,13 +1,20 @@ +#' UserFrosting full dashboard R shiny application +#' #' @export # nolint next: object_name_linter. R6Class UFDashboardApplication <- R6::R6Class( "UFDashboardApplication", inherit = UFApplication, public = list( + #' @description Starts the application with the UserFrosting sidebar + #' collapsed by default withSidebarCollapsed = function() { private$sidebar_collapsed <- TRUE invisible(self) }, + #' @description Creates the UserFrosting UI component for an R Shiny + #' application + #' @returns An R Shiny tagList for \link[shiny]{shinyApp} ui = function() { if (file.exists("widgets/help.R")) { private$mHelp <- modules::use("widgets/help.R") @@ -67,6 +74,14 @@ UFDashboardApplication <- R6::R6Class( # Set the language shiny:::setLang(ui, private$language) }, + #' @description Creates the UserFrosting server component for an R Shiny + #' application + #' @param input The UI inputs bound for the session + #' @param output The UI outputs bound for the session + #' @param session The current session + #' @param ufApi The UserFrosting API instance + #' @param ufUser The UserFrosting user if authenticated and verified + #' @param ... Parameters passed into the inner application server = function( input, output, session, ufApi = NULL, ufUser = NULL, ... ) { diff --git a/R/ufFrameApplication.R b/R/ufFrameApplication.R index f8dac55..8985b64 100644 --- a/R/ufFrameApplication.R +++ b/R/ufFrameApplication.R @@ -1,3 +1,5 @@ +#' UserFrosting frame only R shiny application +#' #' @export # nolint next: object_name_linter. R6Class UFFrameApplication <- R6::R6Class( diff --git a/man/AdminLTEApplication.Rd b/man/AdminLTEApplication.Rd new file mode 100644 index 0000000..ae76e0a --- /dev/null +++ b/man/AdminLTEApplication.Rd @@ -0,0 +1,95 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/adminLTEApplication.R +\name{AdminLTEApplication} +\alias{AdminLTEApplication} +\title{AdminLTE (bootstrap dashboard) themed R shiny application} +\value{ +R Shiny tagList for the frame UI + +R Shiny tagList for an AdminLTE UI +} +\description{ +AdminLTE (bootstrap dashboard) themed R shiny application + +AdminLTE (bootstrap dashboard) themed R shiny application +} +\section{Super class}{ +\code{AVSDevR.ShinyApplication::FrameApplication} -> \code{AdminLTEApplication} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-AdminLTEApplication-withSkin}{\code{AdminLTEApplication$withSkin()}} +\item \href{#method-AdminLTEApplication-frameUI}{\code{AdminLTEApplication$frameUI()}} +\item \href{#method-AdminLTEApplication-ui}{\code{AdminLTEApplication$ui()}} +\item \href{#method-AdminLTEApplication-clone}{\code{AdminLTEApplication$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AdminLTEApplication-withSkin}{}}} +\subsection{Method \code{withSkin()}}{ +Uses a specific AdminLTE skin colour +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{AdminLTEApplication$withSkin(skin)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{skin}}{\if{html}{\out{}} The AdminLTE skin colour to use} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AdminLTEApplication-frameUI}{}}} +\subsection{Method \code{frameUI()}}{ +Returns the basic FrameApplication UI without the AdminLTE +page body. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{AdminLTEApplication$frameUI()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AdminLTEApplication-ui}{}}} +\subsection{Method \code{ui()}}{ +AdminLTE ui for an R Shiny application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{AdminLTEApplication$ui()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-AdminLTEApplication-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{AdminLTEApplication$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/FrameApplication.Rd b/man/FrameApplication.Rd new file mode 100644 index 0000000..becabd0 --- /dev/null +++ b/man/FrameApplication.Rd @@ -0,0 +1,164 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/frameApplication.R +\name{FrameApplication} +\alias{FrameApplication} +\title{Basic R shiny application} +\value{ +A DBClient instance which is useable for the session + +An R Shiny application suitable for \link[shiny]{runApp} +} +\description{ +Basic R shiny application + +Basic R shiny application +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-FrameApplication-new}{\code{FrameApplication$new()}} +\item \href{#method-FrameApplication-withSessionLogger}{\code{FrameApplication$withSessionLogger()}} +\item \href{#method-FrameApplication-withBootstrap4Shim}{\code{FrameApplication$withBootstrap4Shim()}} +\item \href{#method-FrameApplication-getSessionDBClient}{\code{FrameApplication$getSessionDBClient()}} +\item \href{#method-FrameApplication-ui}{\code{FrameApplication$ui()}} +\item \href{#method-FrameApplication-server}{\code{FrameApplication$server()}} +\item \href{#method-FrameApplication-app}{\code{FrameApplication$app()}} +\item \href{#method-FrameApplication-clone}{\code{FrameApplication$clone()}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-new}{}}} +\subsection{Method \code{new()}}{ +Creates a new R Shiny application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$new(appPage = NULL, language = NULL)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{appPage}}{\if{html}{\out{}} An application module (attempts to load +pages/application.R if not supplied)} + +\item{\code{language}}{\if{html}{\out{}} The language to use for the HTML page +(defaults to "en")} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-withSessionLogger}{}}} +\subsection{Method \code{withSessionLogger()}}{ +Binds the application to a session logger +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$withSessionLogger(sessionLogger)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{sessionLogger}}{The session logger instance to use} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-withBootstrap4Shim}{}}} +\subsection{Method \code{withBootstrap4Shim()}}{ +Loads with the Bootstrap 4 shim CSS file +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$withBootstrap4Shim()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-getSessionDBClient}{}}} +\subsection{Method \code{getSessionDBClient()}}{ +Returns a DBClient instance for the current session +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$getSessionDBClient( + session, + db_config = NULL, + allowFailure = FALSE +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{session}}{An R Shiny session} + +\item{\code{db_config}}{The database configuration to use (will attempt to find +and load a global.R or .env.R file if not supploed)} + +\item{\code{allowFailure}}{If a configuration cannot be loaded or a connection +to the database cannot be made, do not abort} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-ui}{}}} +\subsection{Method \code{ui()}}{ +Creates the UI component for an R Shiny application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$ui()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-server}{}}} +\subsection{Method \code{server()}}{ +Creates the server component for an R Shiny application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$server(input, output, session, ...)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{input}}{The UI inputs bound for the session} + +\item{\code{output}}{The UI outputs bound for the session} + +\item{\code{session}}{The current session} + +\item{\code{...}}{Parameters passed into the inner application} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-app}{}}} +\subsection{Method \code{app()}}{ +Instantiates an R Shiny application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$app()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-FrameApplication-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{FrameApplication$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/SessionLogger.Rd b/man/SessionLogger.Rd new file mode 100644 index 0000000..9d79cd8 --- /dev/null +++ b/man/SessionLogger.Rd @@ -0,0 +1,80 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sessionLogger.R +\name{SessionLogger} +\alias{SessionLogger} +\title{R shiny application session logger} +\value{ +The wrapped R Shiny application + +A function which can be called to cancel the "end" log +} +\description{ +R shiny application session logger + +R shiny application session logger +} +\details{ +Wraps an R Shiny application or attaches to an R Shiny session to log session +start / end events +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-SessionLogger-wrap}{\code{SessionLogger$wrap()}} +\item \href{#method-SessionLogger-attachSession}{\code{SessionLogger$attachSession()}} +\item \href{#method-SessionLogger-clone}{\code{SessionLogger$clone()}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLogger-wrap}{}}} +\subsection{Method \code{wrap()}}{ +Wraps an existing R Shiny application with a session logger +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLogger$wrap(app)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{app}}{An R Shiny application (\link[shiny]{shinyApp})} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLogger-attachSession}{}}} +\subsection{Method \code{attachSession()}}{ +Attaches to an existing R Shiny session to log start / end +events. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLogger$attachSession(session)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{session}}{An R Shiny session to log start / end events for} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLogger-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLogger$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/SessionLoggerConsole.Rd b/man/SessionLoggerConsole.Rd new file mode 100644 index 0000000..9792a31 --- /dev/null +++ b/man/SessionLoggerConsole.Rd @@ -0,0 +1,43 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sessionLogger.R +\name{SessionLoggerConsole} +\alias{SessionLoggerConsole} +\title{R shiny application session console logger.} +\description{ +Logs session start / stop events to console. +} +\section{Super class}{ +\code{AVSDevR.ShinyApplication::SessionLogger} -> \code{SessionLoggerConsole} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-SessionLoggerConsole-clone}{\code{SessionLoggerConsole$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLoggerConsole-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLoggerConsole$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/SessionLoggerDB.Rd b/man/SessionLoggerDB.Rd new file mode 100644 index 0000000..424c1a5 --- /dev/null +++ b/man/SessionLoggerDB.Rd @@ -0,0 +1,67 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sessionLogger.R +\name{SessionLoggerDB} +\alias{SessionLoggerDB} +\title{R shiny application session database logger} +\description{ +R shiny application session database logger + +R shiny application session database logger +} +\details{ +Logs session start / stop events to database +} +\section{Super class}{ +\code{AVSDevR.ShinyApplication::SessionLogger} -> \code{SessionLoggerDB} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-SessionLoggerDB-new}{\code{SessionLoggerDB$new()}} +\item \href{#method-SessionLoggerDB-clone}{\code{SessionLoggerDB$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLoggerDB-new}{}}} +\subsection{Method \code{new()}}{ +Initialises the instance with a database client +\link[AVSDevR.DBClient]{DBClient} +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLoggerDB$new(db_client)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{db_client}}{<\link[AVSDevR.DBClient]{DBClient}> A DBClient instance} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-SessionLoggerDB-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{SessionLoggerDB$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/UFApplication.Rd b/man/UFApplication.Rd new file mode 100644 index 0000000..594d45a --- /dev/null +++ b/man/UFApplication.Rd @@ -0,0 +1,95 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ufApplication.R +\name{UFApplication} +\alias{UFApplication} +\title{Core UserFrosting (basic AdminLTE themed) R shiny application} +\value{ +An R Shiny application suitable for \link[shiny]{runApp} +} +\description{ +Core UserFrosting (basic AdminLTE themed) R shiny application + +Core UserFrosting (basic AdminLTE themed) R shiny application +} +\section{Super classes}{ +\code{AVSDevR.ShinyApplication::FrameApplication} -> \code{AVSDevR.ShinyApplication::AdminLTEApplication} -> \code{UFApplication} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-UFApplication-configureUF}{\code{UFApplication$configureUF()}} +\item \href{#method-UFApplication-app}{\code{UFApplication$app()}} +\item \href{#method-UFApplication-clone}{\code{UFApplication$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFApplication-configureUF}{}}} +\subsection{Method \code{configureUF()}}{ +Sets up the UserFrosting configuration for the application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFApplication$configureUF( + uri, + with_users = TRUE, + user_optional = FALSE, + app_name = NULL +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{uri}}{\if{html}{\out{}} The URI for the UserFrosting API instance} + +\item{\code{with_users}}{\if{html}{\out{}} Enable UF user API interaction} + +\item{\code{user_optional}}{\if{html}{\out{}} Are users optional?} + +\item{\code{app_name}}{\if{html}{\out{}} The shiny application name for the UF API} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFApplication-app}{}}} +\subsection{Method \code{app()}}{ +Instantiates an R Shiny application with UserFrosting +support. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFApplication$app()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFApplication-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFApplication$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/UFDashboardApplication.Rd b/man/UFDashboardApplication.Rd new file mode 100644 index 0000000..f207f80 --- /dev/null +++ b/man/UFDashboardApplication.Rd @@ -0,0 +1,114 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ufDashboardApplication.R +\name{UFDashboardApplication} +\alias{UFDashboardApplication} +\title{UserFrosting full dashboard R shiny application} +\value{ +An R Shiny tagList for \link[shiny]{shinyApp} +} +\description{ +UserFrosting full dashboard R shiny application + +UserFrosting full dashboard R shiny application +} +\section{Super classes}{ +\code{AVSDevR.ShinyApplication::FrameApplication} -> \code{AVSDevR.ShinyApplication::AdminLTEApplication} -> \code{AVSDevR.ShinyApplication::UFApplication} -> \code{UFDashboardApplication} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-UFDashboardApplication-withSidebarCollapsed}{\code{UFDashboardApplication$withSidebarCollapsed()}} +\item \href{#method-UFDashboardApplication-ui}{\code{UFDashboardApplication$ui()}} +\item \href{#method-UFDashboardApplication-server}{\code{UFDashboardApplication$server()}} +\item \href{#method-UFDashboardApplication-clone}{\code{UFDashboardApplication$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFDashboardApplication-withSidebarCollapsed}{}}} +\subsection{Method \code{withSidebarCollapsed()}}{ +Starts the application with the UserFrosting sidebar +collapsed by default +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFDashboardApplication$withSidebarCollapsed()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFDashboardApplication-ui}{}}} +\subsection{Method \code{ui()}}{ +Creates the UserFrosting UI component for an R Shiny +application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFDashboardApplication$ui()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFDashboardApplication-server}{}}} +\subsection{Method \code{server()}}{ +Creates the UserFrosting server component for an R Shiny +application +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFDashboardApplication$server( + input, + output, + session, + ufApi = NULL, + ufUser = NULL, + ... +)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{input}}{The UI inputs bound for the session} + +\item{\code{output}}{The UI outputs bound for the session} + +\item{\code{session}}{The current session} + +\item{\code{ufApi}}{The UserFrosting API instance} + +\item{\code{ufUser}}{The UserFrosting user if authenticated and verified} + +\item{\code{...}}{Parameters passed into the inner application} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFDashboardApplication-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFDashboardApplication$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/UFFrameApplication.Rd b/man/UFFrameApplication.Rd new file mode 100644 index 0000000..a69fc52 --- /dev/null +++ b/man/UFFrameApplication.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ufFrameApplication.R +\name{UFFrameApplication} +\alias{UFFrameApplication} +\title{UserFrosting frame only R shiny application} +\description{ +UserFrosting frame only R shiny application + +UserFrosting frame only R shiny application +} +\section{Super classes}{ +\code{AVSDevR.ShinyApplication::FrameApplication} -> \code{AVSDevR.ShinyApplication::AdminLTEApplication} -> \code{AVSDevR.ShinyApplication::UFApplication} -> \code{UFFrameApplication} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-UFFrameApplication-clone}{\code{UFFrameApplication$clone()}} +} +} +\if{html}{\out{ +
Inherited methods + +
+}} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-UFFrameApplication-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{UFFrameApplication$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +}