Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Oct 6, 2020
1 parent 86dcb26 commit ac4d7d4
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 170 deletions.
2 changes: 1 addition & 1 deletion R/bootstrap-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#'
#' @description Create a panel (box) with basic border and padding,
#' you can use Bootstrap status to style the panel,
#' see \url{http://getbootstrap.com/components/#panels}.
#' see \url{https://getbootstrap.com/docs/3.4/components/#panels}.
#'
#' @param ... UI elements to include inside the panel or alert.
#' @param heading Title for the panel in a plain header.
Expand Down
4 changes: 2 additions & 2 deletions R/drop-menu.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @param options Additional options, see \code{\link{dropMenuOptions}}.
#'
#' @seealso \link[=drop-menu-interaction]{dropMenu interaction} for functions
#' and exemples to interact with \code{dropMenu} from server.
#' and examples to interact with \code{dropMenu} from server.
#'
#' @return A UI definition.
#' @export
Expand Down Expand Up @@ -123,7 +123,7 @@ dropMenu <- function(tag, ...,
#' @param animation The type of transition animation.
#' @param flip Determines if the tippy flips so that it is placed within
#' the viewport as best it can be if there is not enough space.
#' @param ... Additional arguements.
#' @param ... Additional arguments.
#'
#' @return a \code{list} of options to be used in \code{\link{dropMenu}}.
#' @export
Expand Down
163 changes: 82 additions & 81 deletions R/input-autonumeric.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ updateFormatNumericInput <- function(session, inputId,
#' @param currencySymbolPlacement Defines where the currency symbol should be
#' placed, "p" for prefix or "s" for suffix (default).
#' @param decimalCharacter Defines what decimal separator character is used.
#' Must be one of c(',', '.', '·', '٫', '⎖'). Defaults to ",".
#' Defaults to ",".
#' @param digitGroupSeparator Defines what decimal separator character is used.
#' Must be one of c(',', '.', ' ', '', ''', '٬', '˙'). Defaults to ".".
#' Defaults to ".".
#' @param allowDecimalPadding Defines if decimal places should be padded with
#' zeros. Defaults to TRUE.
#' @param decimalPlaces Defines the default number of decimal places to show
Expand All @@ -249,140 +249,141 @@ updateFormatNumericInput <- function(session, inputId,
#' This function wraps the AutoNumeric.js library. The parameter documentation
#' provided here should be sufficient for most users, but for those wishing to
#' use advanced configurations it is advised to look at the documentation on
#' the \href{http://autonumeric.org/guide}{AutoNumeric website}. Alexandre
#' the \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository}. Alexandre
#' Bonneau has done a wonderful job of documenting all parameters and full
#' explanations of all parameters and their associated values can be found
#' there.
#'
#' The \code{...} parameter can take any of the arguments listed on the
#' \href{http://autonumeric.org/guide}{AutoNumeric website}. A quick reference
#' \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository}. A quick reference
#' follows:
#'
#' \itemize{
#' \item{decimalPlacesRawValue - Defines How many decimal places should be kept
#' \item decimalPlacesRawValue - Defines How many decimal places should be kept
#' for the raw value. If set to NULL (default) then \code{decimalPlaces} is
#' used.}
#' \item{decimalPlacesShownOnBlur - Defines how many decimal places should be
#' used.
#' \item decimalPlacesShownOnBlur - Defines how many decimal places should be
#' visible when the element is unfocused. If NULL (default) then
#' \code{decimalPlaces} is used.}
#' \item{decimalPlacesShownOnFocus - Defines how many decimal places should be
#' \code{decimalPlaces} is used.
#' \item decimalPlacesShownOnFocus - Defines how many decimal places should be
#' visible when the element has the focus. If NULL (default) then
#' \code{decimalPlaces} is used.}
#' \item{digitalGroupSpacing - Defines how many numbers should be grouped
#' \code{decimalPlaces} is used.
#' \item digitalGroupSpacing - Defines how many numbers should be grouped
#' together for the thousands separator groupings. Must be one of
#' c("2", "2s", "3", "4"). Defaults to 3.}
#' \item {alwaysAllowDecimalCharacter - Defines if the decimal character or
#' c("2", "2s", "3", "4"). Defaults to 3.
#' \item alwaysAllowDecimalCharacter - Defines if the decimal character or
#' decimal character alternative should be accepted when there is already
#' a decimal character shown in the element. If set to TRUE, any decimal
#' character input will be accepted and will subsequently modify the decimal
#' character position, as well as the rawValue. If set to FALSE, the decimal
#' character and its alternative key will be dropped. This is the default
#' setting.}
#' \item {createLocalList - Defines if a local list of AutoNumeric objects should
#' be kept when initializing this object. Defaults to TRUE.}
#' \item {decimalCharacterAlternative - Allow to declare an alternative decimal
#' setting.
#' \item createLocalList - Defines if a local list of AutoNumeric objects should
#' be kept when initializing this object. Defaults to TRUE.
#' \item decimalCharacterAlternative - Allow to declare an alternative decimal
#' separator which is automatically replaced by \code{decimalCharacter} when
#' typed. This is useful for countries that use a comma ',' as the decimal
#' character and have keyboards with numeric pads providing a period '.' as
#' the decimal character (in France or Spain for instance). Must be NULL
#' (default), ",", or ".".}
#' \item {emptyInputBehavior - Defines what should be displayed in the element if
#' (default), ",", or ".".
#' \item emptyInputBehavior - Defines what should be displayed in the element if
#' the raw value is missing. One of c(NULL, "focus", "press", "always", "min",
#' "max", "zero") or a custom value. Defaults to NULL. See
#' \href{http://autonumeric.org/guide}{AutoNumeric documentation} for full
#' details.}
#' \item {selectNumberOnly - Determine if the select all keyboard command will
#' \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository} for full
#' details.
#' \item selectNumberOnly - Determine if the select all keyboard command will
#' select the complete input text, or only the input numeric value.
#' Defaults to TRUE.}
#' \item {selectOnFocus - Defines if the element value should be selected on
#' Defaults to TRUE.
#' \item selectOnFocus - Defines if the element value should be selected on
#' focus. Note: The selection is done using the \code{selectNumberOnly} option.
#' Defaults to TRUE.}
#' \item {eventBubbles - Defines if the custom and native events triggered by
#' AutoNumeric should bubble up or not. Defaults to TRUE.}
#' \item {eventIsCancelable - Defines if the custom and native events triggered
#' by AutoNumeric should be cancelable. Defaults to TRUE.}
#' \item {formulaMode - Defines if the formula mode can be activated by the user.
#' Defaults to TRUE.
#' \item eventBubbles - Defines if the custom and native events triggered by
#' AutoNumeric should bubble up or not. Defaults to TRUE.
#' \item eventIsCancelable - Defines if the custom and native events triggered
#' by AutoNumeric should be cancelable. Defaults to TRUE.
#' \item formulaMode - Defines if the formula mode can be activated by the user.
#' If set to true, then the user can enter the formula mode by entering the '='
#' character. The user will then be allowed to enter any simple math formula
#' using numeric characters as well as the following operators: +, -, *, /, (
#' and ). The formula mode is exited when the user either validate their math
#' expression using the Enter key, or when the element is blurred. Defaults to
#' FALSE.}
#' \item {historySize - Set the undo/redo history table size. Defaults to 20.}
#' \item {isCancellable - Allow the user to cancel and undo the changes he made
#' FALSE.
#' \item historySize - Set the undo/redo history table size. Defaults to 20.
#' \item isCancellable - Allow the user to cancel and undo the changes he made
#' to the given autonumeric-managed element, by pressing the \code{Escape}
#' key. Defaults to TRUE.}
#' \item {leadingZero - This options describes if entering 0 on the far left of
#' key. Defaults to TRUE.
#' \item leadingZero - This options describes if entering 0 on the far left of
#' the numbers is allowed, and if the superfluous zeroes should be kept when
#' the input is blurred. One of c("allow", "deny", and "keep"). Defaults to
#' "deny". See \href{http://autonumeric.org/guide}{AutoNumeric documentation}
#' for full details.}
#' \item {wheelOn - Defines when the wheel event will increment or decrement
#' the element value. One of c("focus", "hover"). Defaults to "focus".}
#' \item {wheelStep - Defines by how much the element value should be
#' "deny". See \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository}
#' for full details.
#' \item wheelOn - Defines when the wheel event will increment or decrement
#' the element value. One of c("focus", "hover"). Defaults to "focus".
#' \item wheelStep - Defines by how much the element value should be
#' incremented/decremented on the wheel event. Can be a set value or the
#' string "progressive" which determines the step from the size of the input.
#' Defaults to "progressive".}
#' \item {negativeBracketsTypeOnBlur - Adds brackets-like characters on negative
#' Defaults to "progressive".
#' \item negativeBracketsTypeOnBlur - Adds brackets-like characters on negative
#' values when unfocused. Those brackets are visible only when the field does
#' not have the focus. The left and right symbols should be enclosed in
#' quotes and separated by a comma. Must be one of c("(,)", "[,]", "<,>",
#' "{,}", "〈,〉", "「,」", "⸤,⸥", "⟦,⟧', "‹,›", "«,»", NULL) Defaults to NULL.}
#' \item {negativePositiveSignPlacement - Placement of the negative/positive sign
#' quotes and separated by a comma. Defaults to NULL.
#' \item negativePositiveSignPlacement - Placement of the negative/positive sign
#' relative to the \code{currencySymbol} option. One of c("p", "s", "l",
#' "r", NULL), defaults to NULL. See
#' \href{http://autonumeric.org/guide}{AutoNumeric documentation} for further
#' documentation.}
#' \item {negativeSignCharacter - Defines the negative sign symbol to use. Must
#' be a single character and be non-numeric. Defaults to "-".}
#' \item {positiveSignCharacter - Defines the positive sign symbol to use. Must
#' be a single character and be non-numeric. Defaults to "+".}
#' \item {showPositiveSign - Allow the positive sign symbol}
#' \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository} for further
#' documentation.
#' \item negativeSignCharacter - Defines the negative sign symbol to use. Must
#' be a single character and be non-numeric. Defaults to "-".
#' \item positiveSignCharacter - Defines the positive sign symbol to use. Must
#' be a single character and be non-numeric. Defaults to "+".
#' \item showPositiveSign - Allow the positive sign symbol
#' \code{positiveSignCharacter} to be displayed for positive numbers.
#' Defaults to FALSE.
#' \item {onInvalidPaste - Manage how autoNumeric react when the user tries to
#' \item onInvalidPaste - Manage how autoNumeric react when the user tries to
#' paste an invalid number. One of c("error", "ignore", "clamp",
#' "truncate", "replace"). Defaults to "error".}
#' \item {overrideMinMaxLimits - Override the minimum and maximum limits. Must
#' be one of c("ceiling", "floor", "ignore", NULL). Defaults to "ceiling".}
#' \item {readOnly - Defines if the element (<input> or another allowed html tag)
#' should be set as read only on initialization. Defaults to FALSE.}
#' \item {roundingMethod - Defines the rounding method to use. One of c("S", "A",
#' "truncate", "replace"). Defaults to "error".
#' \item overrideMinMaxLimits - Override the minimum and maximum limits. Must
#' be one of c("ceiling", "floor", "ignore", NULL). Defaults to "ceiling".
#' \item readOnly - Defines if the element (<input> or another allowed html tag)
#' should be set as read only on initialization. Defaults to FALSE.
#' \item roundingMethod - Defines the rounding method to use. One of c("S", "A",
#' "s", "a", "B", "U", "D", "C", "F", "N05", "CHF", "U05", "D05"). Defaults
#' to "S". See \href{http://autonumeric.org/guide}{AutoNumeric documentation}
#' for further documentation.}
#' \item {saveValueToSessionStorage - Set to TRUE to allow the
#' to "S". See \href{https://github.com/autoNumeric/autoNumeric}{AutoNumeric GitHub repository}
#' for further documentation.
#' \item saveValueToSessionStorage - Set to TRUE to allow the
#' \code{decimalPlacesShownOnFocus} value to be saved with sessionStorage.
#' Defaults to FALSE.}
#' \item {serializeSpaces - Defines how the serialize functions should treat the
#' spaces. Either "+" (default) or "\%20" (the older behavior).}
#' \item {showOnlyNumbersOnFocus - Defines if the element value should be
#' Defaults to FALSE.
#' \item serializeSpaces - Defines how the serialize functions should treat the
#' spaces. Either "+" (default) or "\%20" (the older behavior).
#' \item showOnlyNumbersOnFocus - Defines if the element value should be
#' converted to the raw value on focus or mouseenter, (and back to the
#' formatted on blur or mouseleave). Defaults to FALSE.}
#' \item {showWarnings - Defines if warnings should be shown in the console.
#' Defaults to TRUE.}
#' \item {styleRules - Defines the rules that calculate the CSS class(es) to
#' formatted on blur or mouseleave). Defaults to FALSE.
#' \item showWarnings - Defines if warnings should be shown in the console.
#' Defaults to TRUE.
#' \item styleRules - Defines the rules that calculate the CSS class(es) to
#' apply on the element, based on the raw unformatted value. Defaults to
#' NULL.}
#' \item {suffixText - Add a text on the right hand side of the element value.
#' NULL.
#' \item suffixText - Add a text on the right hand side of the element value.
#' This suffix text can have any characters in its string, except numeric
#' characters and the negative or positive sign. Defaults to NULL.}
#' \item {symbolWhenUnfocused - Defines the symbol placed as a suffix when not
#' in focus or hovered. Defaults to NULL.}
#' \item {unformatOnHover - Defines if the element value should be unformatted
#' characters and the negative or positive sign. Defaults to NULL.
#' \item symbolWhenUnfocused - Defines the symbol placed as a suffix when not
#' in focus or hovered. Defaults to NULL.
#' \item unformatOnHover - Defines if the element value should be unformatted
#' when the user hover his mouse over it while holding the Alt key. Defaults
#' to TRUE.}
#' \item {valuesToStrings - Provides a way for automatically replacing the
#' to TRUE.
#' \item valuesToStrings - Provides a way for automatically replacing the
#' formatted value with a pre-defined string, when the raw value is equal
#' to a specific value. Defaults to NULL.}
#' \item {watchExternalChanges - Defines if the AutoNumeric element should watch
#' external changes made without using \code{.set()}. Defaults to FALSE.}
#' to a specific value. Defaults to NULL.
#' \item watchExternalChanges - Defines if the AutoNumeric element should watch
#' external changes made without using \code{.set()}. Defaults to FALSE.
#' }
#'
#' @return An autonumericInput object to be used in the UI function of a Shiny
#' App.
#' @export
#'
#' @encoding UTF-8
#'
#' @family autonumeric
#'
#' @references Bonneau, Alexandre. 2018. "AutoNumeric.js javascript Package".
Expand Down
4 changes: 3 additions & 1 deletion R/input-noUiSlider.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ noUiSliderInput <- function(inputId, label = NULL, min, max, value,
#' @param thousand Separator for large numbers. For example: \code{' '}
#' would result in a formatted number of 1 000 000.
#' @param prefix A string to prepend to the number. Use cases
#' include prefixing with money symbols such as \code{'$'} or \code{'€'}.
#' include prefixing with money symbols such as \code{'$'} or the euro sign.
#' @param suffix A number to append to a number. For example: \code{',-'}.
#' @param negative The prefix for negative values. Defaults to \code{'-'}.
#'
Expand All @@ -177,6 +177,8 @@ noUiSliderInput <- function(inputId, label = NULL, min, max, value,
#' @return a named list.
#' @export
#'
#' @encoding UTF-8
#'
#' @examples
#' if (interactive()) {
#'
Expand Down
Loading

0 comments on commit ac4d7d4

Please sign in to comment.