diff --git a/R/betterDateInput.R b/R/betterDateInput.R index 4d4865f..b0d2f72 100644 --- a/R/betterDateInput.R +++ b/R/betterDateInput.R @@ -29,6 +29,14 @@ formatDates <- function(value, min, max) { c(dates, list(value = value)) } +#' Improved shiny dateInput +#' +#' @inheritParams shiny::dateInput +#' @param display_format An ISO format for dates +#' @param multiple Allows multiple dates to be selected if TRUE +#' @param ... Ignored +#' @seealso [shiny::dateInput()], [shiny::updateDateInput()] +#' #' @export betterDateInput <- function( inputId, label, value = NULL, min = NULL, max = NULL, @@ -72,6 +80,11 @@ betterDateInput <- function( ) } +#' Improved shiny dateInput +#' +#' @inheritParams shiny::updateDateInput +#' @seealso [shiny::dateInput()], [shiny::updateDateInput()] +#' #' @export updateBetterDateInput <- function( session, inputId, label = NULL, min = NULL, max = NULL, value = NULL diff --git a/R/betterDateRangeInput.R b/R/betterDateRangeInput.R index c0a1704..168f79d 100644 --- a/R/betterDateRangeInput.R +++ b/R/betterDateRangeInput.R @@ -45,6 +45,14 @@ formatRangeDates <- function(start, end, min, max) { dates } +#' Improved shiny dateRangeInput +#' +#' @inheritParams shiny::dateRangeInput +#' @param display_format An ISO format for dates +#' @param autonext Automatically move to "end" when "start" is selected if TRUE +#' @param ... Ignored +#' @seealso [shiny::dateRangeInput()], [shiny::updateDateRangeInput()] +#' #' @export betterDateRangeInput <- function( inputId, label, start = NULL, end = NULL, min = NULL, max = NULL, @@ -114,6 +122,11 @@ betterDateRangeInput <- function( ) } +#' Improved shiny dateRangeInput +#' +#' @inheritParams shiny::updateDateRangeInput +#' @seealso [shiny::dateRangeInput()], [shiny::updateDateRangeInput()] +#' #' @export updateBetterDateRangeInput <- function( session, inputId, label = NULL, min = NULL, max = NULL, start = NULL, diff --git a/R/numericButtonInput.R b/R/numericButtonInput.R index 61f3e6b..558bc74 100644 --- a/R/numericButtonInput.R +++ b/R/numericButtonInput.R @@ -1,4 +1,12 @@ +#' A numeric input with an action button attached which can be used for clearing +#' or setting a value on trigger +#' +#' @inheritParams shiny::numericInput +#' @param buttonText The text to display in the action button +#' @param buttonIcon An icon to display in the action button +#' @seealso [shiny::numericInput()], [shiny::updateNumericInput()] +#' #' @export numericButtonInput <- function( inputId, label, buttonText = NULL, buttonIcon = NULL, min = NULL, max = NULL, @@ -54,6 +62,12 @@ numericButtonInput <- function( ) } +#' A numeric input with an action button attached which can be used for clearing +#' or setting a value on trigger +#' +#' @inheritParams shiny::updateNumericInput +#' @seealso [shiny::numericInput()], [shiny::updateNumericInput()] +#' #' @export updateNumericButtonInput <- function( session, inputId, label = NULL, min = NULL, max = NULL, step = NULL, diff --git a/R/toggleableTextInput.R b/R/toggleableTextInput.R index b3442da..38a30a5 100644 --- a/R/toggleableTextInput.R +++ b/R/toggleableTextInput.R @@ -1,4 +1,13 @@ +#' A text input with a checkbox to toggle editing +#' +#' @inheritParams shiny::textInput +#' @param checked Initial check state of the checkbox +#' @param text Initial value to display in the textInput +#' @param enableWhenChecked Enables the text input when checked = TRUE +#' (default), otherwise enables the input when checked = FALSE +#' @seealso [shiny::textInput()], [shiny::updateTextInput()] +#' #' @export togglableTextInput <- function( inputId, label, checked = FALSE, text = NULL, placeholder = NULL, @@ -62,6 +71,13 @@ togglableTextInput <- function( ) } +#' A text input with a checkbox to toggle editing +#' +#' @inheritParams shiny::updateTextInput +#' @param checked Initial check state of the checkbox +#' @param text Initial value to display in the textInput +#' @seealso [shiny::textInput()], [shiny::updateTextInput()] +#' #' @export updateTogglableTextInput <- function( session, inputId, label = NULL, checked = NULL, text = NULL, diff --git a/man/betterDateInput.Rd b/man/betterDateInput.Rd new file mode 100644 index 0000000..ecfc96d --- /dev/null +++ b/man/betterDateInput.Rd @@ -0,0 +1,70 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/betterDateInput.R +\name{betterDateInput} +\alias{betterDateInput} +\title{Improved shiny dateInput} +\usage{ +betterDateInput( + inputId, + label, + value = NULL, + min = NULL, + max = NULL, + display_format = "yyyy-mm-dd", + startview = "month", + weekstart = 0, + language = "en", + width = NULL, + multiple = FALSE, + autoclose = !multiple, + ... +) +} +\arguments{ +\item{inputId}{The \code{input} slot that will be used to access the value.} + +\item{label}{Display label for the control, or \code{NULL} for no label.} + +\item{value}{The starting date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current date +in the client's time zone.} + +\item{min}{The minimum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{max}{The maximum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{display_format}{An ISO format for dates} + +\item{startview}{The date range shown when the input object is first clicked. +Can be "month" (the default), "year", or "decade".} + +\item{weekstart}{Which day is the start of the week. Should be an integer +from 0 (Sunday) to 6 (Saturday).} + +\item{language}{The language used for month and day names. Default is "en". +Other valid values include "ar", "az", "bg", "bs", "ca", "cs", "cy", "da", +"de", "el", "en-AU", "en-GB", "eo", "es", "et", "eu", "fa", "fi", "fo", +"fr-CH", "fr", "gl", "he", "hr", "hu", "hy", "id", "is", "it-CH", "it", +"ja", "ka", "kh", "kk", "ko", "kr", "lt", "lv", "me", "mk", "mn", "ms", +"nb", "nl-BE", "nl", "no", "pl", "pt-BR", "pt", "ro", "rs-latin", "rs", +"ru", "sk", "sl", "sq", "sr-latin", "sr", "sv", "sw", "th", "tr", "uk", +"vi", "zh-CN", and "zh-TW".} + +\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'}; +see \code{\link[shiny:validateCssUnit]{validateCssUnit()}}.} + +\item{multiple}{Allows multiple dates to be selected if TRUE} + +\item{autoclose}{Whether or not to close the datepicker immediately when a +date is selected.} + +\item{...}{Ignored} +} +\description{ +Improved shiny dateInput +} +\seealso{ +\code{\link[shiny:dateInput]{shiny::dateInput()}}, \code{\link[shiny:updateDateInput]{shiny::updateDateInput()}} +} diff --git a/man/betterDateRangeInput.Rd b/man/betterDateRangeInput.Rd new file mode 100644 index 0000000..2baefe6 --- /dev/null +++ b/man/betterDateRangeInput.Rd @@ -0,0 +1,78 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/betterDateRangeInput.R +\name{betterDateRangeInput} +\alias{betterDateRangeInput} +\title{Improved shiny dateRangeInput} +\usage{ +betterDateRangeInput( + inputId, + label, + start = NULL, + end = NULL, + min = NULL, + max = NULL, + display_format = "yyyy-mm-dd", + startview = "month", + weekstart = 0, + language = "en", + separator = " to ", + width = NULL, + autoclose = TRUE, + autonext = TRUE, + ... +) +} +\arguments{ +\item{inputId}{The \code{input} slot that will be used to access the value.} + +\item{label}{Display label for the control, or \code{NULL} for no label.} + +\item{start}{The initial start date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current +date in the client's time zone.} + +\item{end}{The initial end date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current +date in the client's time zone.} + +\item{min}{The minimum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{max}{The maximum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{display_format}{An ISO format for dates} + +\item{startview}{The date range shown when the input object is first clicked. +Can be "month" (the default), "year", or "decade".} + +\item{weekstart}{Which day is the start of the week. Should be an integer +from 0 (Sunday) to 6 (Saturday).} + +\item{language}{The language used for month and day names. Default is "en". +Other valid values include "ar", "az", "bg", "bs", "ca", "cs", "cy", "da", +"de", "el", "en-AU", "en-GB", "eo", "es", "et", "eu", "fa", "fi", "fo", +"fr-CH", "fr", "gl", "he", "hr", "hu", "hy", "id", "is", "it-CH", "it", +"ja", "ka", "kh", "kk", "ko", "kr", "lt", "lv", "me", "mk", "mn", "ms", +"nb", "nl-BE", "nl", "no", "pl", "pt-BR", "pt", "ro", "rs-latin", "rs", +"ru", "sk", "sl", "sq", "sr-latin", "sr", "sv", "sw", "th", "tr", "uk", +"vi", "zh-CN", and "zh-TW".} + +\item{separator}{String to display between the start and end input boxes.} + +\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'}; +see \code{\link[shiny:validateCssUnit]{validateCssUnit()}}.} + +\item{autoclose}{Whether or not to close the datepicker immediately when a +date is selected.} + +\item{autonext}{Automatically move to "end" when "start" is selected if TRUE} + +\item{...}{Ignored} +} +\description{ +Improved shiny dateRangeInput +} +\seealso{ +\code{\link[shiny:dateRangeInput]{shiny::dateRangeInput()}}, \code{\link[shiny:updateDateRangeInput]{shiny::updateDateRangeInput()}} +} diff --git a/man/numericButtonInput.Rd b/man/numericButtonInput.Rd new file mode 100644 index 0000000..7da6ca9 --- /dev/null +++ b/man/numericButtonInput.Rd @@ -0,0 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/numericButtonInput.R +\name{numericButtonInput} +\alias{numericButtonInput} +\title{A numeric input with an action button attached which can be used for clearing +or setting a value on trigger} +\usage{ +numericButtonInput( + inputId, + label, + buttonText = NULL, + buttonIcon = NULL, + min = NULL, + max = NULL, + step = NULL, + value, + ... +) +} +\arguments{ +\item{inputId}{The \code{input} slot that will be used to access the value.} + +\item{label}{Display label for the control, or \code{NULL} for no label.} + +\item{buttonText}{The text to display in the action button} + +\item{buttonIcon}{An icon to display in the action button} + +\item{min}{Minimum allowed value} + +\item{max}{Maximum allowed value} + +\item{step}{Interval to use when stepping between min and max} + +\item{value}{Initial value.} + +\item{...}{Ignored, included to require named arguments and for future +feature expansion.} +} +\description{ +A numeric input with an action button attached which can be used for clearing +or setting a value on trigger +} +\seealso{ +\code{\link[shiny:numericInput]{shiny::numericInput()}}, \code{\link[shiny:updateNumericInput]{shiny::updateNumericInput()}} +} diff --git a/man/togglableTextInput.Rd b/man/togglableTextInput.Rd new file mode 100644 index 0000000..17eee73 --- /dev/null +++ b/man/togglableTextInput.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/toggleableTextInput.R +\name{togglableTextInput} +\alias{togglableTextInput} +\title{A text input with a checkbox to toggle editing} +\usage{ +togglableTextInput( + inputId, + label, + checked = FALSE, + text = NULL, + placeholder = NULL, + enableWhenChecked = TRUE, + ... +) +} +\arguments{ +\item{inputId}{The \code{input} slot that will be used to access the value.} + +\item{label}{Display label for the control, or \code{NULL} for no label.} + +\item{checked}{Initial check state of the checkbox} + +\item{text}{Initial value to display in the textInput} + +\item{placeholder}{A character string giving the user a hint as to what can +be entered into the control. Internet Explorer 8 and 9 do not support this +option.} + +\item{enableWhenChecked}{Enables the text input when checked = TRUE +(default), otherwise enables the input when checked = FALSE} + +\item{...}{Ignored, included to require named arguments and for future +feature expansion.} +} +\description{ +A text input with a checkbox to toggle editing +} +\seealso{ +\code{\link[shiny:textInput]{shiny::textInput()}}, \code{\link[shiny:updateTextInput]{shiny::updateTextInput()}} +} diff --git a/man/updateBetterDateInput.Rd b/man/updateBetterDateInput.Rd new file mode 100644 index 0000000..c053ffd --- /dev/null +++ b/man/updateBetterDateInput.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/betterDateInput.R +\name{updateBetterDateInput} +\alias{updateBetterDateInput} +\title{Improved shiny dateInput} +\usage{ +updateBetterDateInput( + session, + inputId, + label = NULL, + min = NULL, + max = NULL, + value = NULL +) +} +\arguments{ +\item{session}{The \code{session} object passed to function given to +\code{shinyServer}. Default is \code{getDefaultReactiveDomain()}.} + +\item{inputId}{The id of the input object.} + +\item{label}{The label to set for the input object.} + +\item{min}{The minimum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{max}{The maximum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{value}{The starting date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current date +in the client's time zone.} +} +\description{ +Improved shiny dateInput +} +\seealso{ +\code{\link[shiny:dateInput]{shiny::dateInput()}}, \code{\link[shiny:updateDateInput]{shiny::updateDateInput()}} +} diff --git a/man/updateBetterDateRangeInput.Rd b/man/updateBetterDateRangeInput.Rd new file mode 100644 index 0000000..22d6374 --- /dev/null +++ b/man/updateBetterDateRangeInput.Rd @@ -0,0 +1,44 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/betterDateRangeInput.R +\name{updateBetterDateRangeInput} +\alias{updateBetterDateRangeInput} +\title{Improved shiny dateRangeInput} +\usage{ +updateBetterDateRangeInput( + session, + inputId, + label = NULL, + min = NULL, + max = NULL, + start = NULL, + end = NULL +) +} +\arguments{ +\item{session}{The \code{session} object passed to function given to +\code{shinyServer}. Default is \code{getDefaultReactiveDomain()}.} + +\item{inputId}{The id of the input object.} + +\item{label}{The label to set for the input object.} + +\item{min}{The minimum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{max}{The maximum allowed date. Either a Date object, or a string in +\code{yyyy-mm-dd} format.} + +\item{start}{The initial start date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current +date in the client's time zone.} + +\item{end}{The initial end date. Either a Date object, or a string in +\code{yyyy-mm-dd} format. If NULL (the default), will use the current +date in the client's time zone.} +} +\description{ +Improved shiny dateRangeInput +} +\seealso{ +\code{\link[shiny:dateRangeInput]{shiny::dateRangeInput()}}, \code{\link[shiny:updateDateRangeInput]{shiny::updateDateRangeInput()}} +} diff --git a/man/updateNumericButtonInput.Rd b/man/updateNumericButtonInput.Rd new file mode 100644 index 0000000..90e2fd9 --- /dev/null +++ b/man/updateNumericButtonInput.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/numericButtonInput.R +\name{updateNumericButtonInput} +\alias{updateNumericButtonInput} +\title{A numeric input with an action button attached which can be used for clearing +or setting a value on trigger} +\usage{ +updateNumericButtonInput( + session, + inputId, + label = NULL, + min = NULL, + max = NULL, + step = NULL, + value = NULL +) +} +\arguments{ +\item{session}{The \code{session} object passed to function given to +\code{shinyServer}. Default is \code{getDefaultReactiveDomain()}.} + +\item{inputId}{The id of the input object.} + +\item{label}{The label to set for the input object.} + +\item{min}{Minimum allowed value} + +\item{max}{Maximum allowed value} + +\item{step}{Interval to use when stepping between min and max} + +\item{value}{Initial value.} +} +\description{ +A numeric input with an action button attached which can be used for clearing +or setting a value on trigger +} +\seealso{ +\code{\link[shiny:numericInput]{shiny::numericInput()}}, \code{\link[shiny:updateNumericInput]{shiny::updateNumericInput()}} +} diff --git a/man/updateTogglableTextInput.Rd b/man/updateTogglableTextInput.Rd new file mode 100644 index 0000000..2379f39 --- /dev/null +++ b/man/updateTogglableTextInput.Rd @@ -0,0 +1,37 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/toggleableTextInput.R +\name{updateTogglableTextInput} +\alias{updateTogglableTextInput} +\title{A text input with a checkbox to toggle editing} +\usage{ +updateTogglableTextInput( + session, + inputId, + label = NULL, + checked = NULL, + text = NULL, + placeholder = NULL +) +} +\arguments{ +\item{session}{The \code{session} object passed to function given to +\code{shinyServer}. Default is \code{getDefaultReactiveDomain()}.} + +\item{inputId}{The id of the input object.} + +\item{label}{The label to set for the input object.} + +\item{checked}{Initial check state of the checkbox} + +\item{text}{Initial value to display in the textInput} + +\item{placeholder}{A character string giving the user a hint as to what can +be entered into the control. Internet Explorer 8 and 9 do not support this +option.} +} +\description{ +A text input with a checkbox to toggle editing +} +\seealso{ +\code{\link[shiny:textInput]{shiny::textInput()}}, \code{\link[shiny:updateTextInput]{shiny::updateTextInput()}} +}