R/interaction_S3.R

Defines functions jqui_interaction.htmlwidget jqui_interaction.shiny.tag.list jqui_interaction.shiny.tag jqui_interaction.JS_EVAL jqui_interaction.character jqui_interaction

jqui_interaction <- function(ui, interaction,
                             operation = c("enable",
                                           "disable",
                                           "destroy",
                                           "save",
                                           "load"),
                             options = NULL) {
  UseMethod("jqui_interaction")
}

jqui_interaction.character <- function(ui, interaction,
                                       operation = c("enable",
                                                     "disable",
                                                     "destroy",
                                                     "save",
                                                     "load"),
                                       options = NULL) {
  type <- "interaction"

  func <- interaction
  rm(interaction)

  operation <- match.arg(operation)

  # debug <- getOption("shinyjqui.debug")

  sendMsg()

  return(ui)
}

jqui_interaction.JS_EVAL <- function(ui, interaction,
                                     operation = c("enable",
                                                   "disable",
                                                   "destroy",
                                                   "save", "
                                                   load"),
                                     options = NULL
) {
  jqui_interaction.character(ui, interaction, operation, options)
}

jqui_interaction.shiny.tag <- function(ui, interaction,
                                       operation = c("enable",
                                                     "disable",
                                                     "destroy",
                                                     "save",
                                                     "load"),
                                       options = NULL) {
  addInteractJSShiny(ui, interaction, options)
}

jqui_interaction.shiny.tag.list <- function(ui, interaction,
                                            operation = c("enable",
                                                          "disable",
                                                          "destroy",
                                                          "save",
                                                          "load"),
                                            options = NULL) {
  ui[] <- lapply(ui, addInteractJSShiny,
                 func = interaction, options = options)
  return(ui)
}

jqui_interaction.htmlwidget <- function(ui, interaction,
                                        operation = c("enable",
                                                      "disable",
                                                      "destroy",
                                                      "save",
                                                      "load"),
                                        options = NULL) {
  addInteractJSHTMLWidget(ui, interaction, options)
}

Try the shinyjqui package in your browser

Any scripts or data that you put into this service are public.

shinyjqui documentation built on Feb. 23, 2021, 9:06 a.m.