Package: shinyEvents 2.3

shinyEvents: Shiny wrapper with event handlers instead of reactivity

Shiny is a great package. Yet, for more complex projects, with much dynamic UI, I find it hard to write clean code with its reactivity paradigm. This package wraps shiny into a more traditional programming approach: - event handlers for input changes and button clicks - explicit update functions to change outputs - no explicit server function

Authors:Sebastian Kranz

shinyEvents_2.3.tar.gz
shinyEvents_2.3.zip(r-4.5)shinyEvents_2.3.zip(r-4.4)shinyEvents_2.3.zip(r-4.3)
shinyEvents_2.3.tgz(r-4.4-any)shinyEvents_2.3.tgz(r-4.3-any)
shinyEvents_2.3.tar.gz(r-4.5-noble)shinyEvents_2.3.tar.gz(r-4.4-noble)
shinyEvents_2.3.tgz(r-4.4-emscripten)shinyEvents_2.3.tgz(r-4.3-emscripten)
shinyEvents.pdf |shinyEvents.html
shinyEvents/json (API)

# Install 'shinyEvents' in R:
install.packages('shinyEvents', repos = c('https://skranz.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/skranz/shinyevents/issues

On CRAN:

shiny

105 exports 36 stars 3.11 score 31 dependencies 7 dependents 26 scripts

Last updated 2 years agofrom:092ea663d7 (on master). Checks:OK: 1 WARNING: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 06 2024
R-4.5-winWARNINGSep 06 2024
R-4.5-linuxWARNINGSep 06 2024
R-4.4-winWARNINGSep 06 2024
R-4.4-macWARNINGSep 06 2024
R-4.3-winWARNINGSep 06 2024
R-4.3-macWARNINGSep 06 2024

Exports:aceHotkeyHandleraddCssClassaddEventHandlerToAppaddEventsAppExtraTagsaddEventsToSessionaddHandlersToSessionaddShinyEventsRessourcePathappendToHTMLappInitHandlerappReadyToRunautcomp.function.argsautocomp.colsautocomp.find.current.functionautocomp.jsautocomp.varsbottomScriptbuttonHandlerbuttonHandlerJScallJSchangeHandlercheckboxChangeHandlerclassEventHandlercustomEventHandlerdestroyHandlerObserverdisplaydocumentClickHandlerdocumentClickHandlerJSdsetUIevalJSeventHandlereventsAppexamples.clickexamples.form.widgetsexamples.to.styleexamples.widgetsfind.varname.at.end.of.stringfun.arg.namesgetAppgetAppEventgetAppSessiongetCurrentSessiongetDefaultAppEventsgetInputValuehasUpdaterhasWidgetValueChangedidEventHandlerids2selimageClickHandlerinitHandlerCallEnvinitialQueryDispatchjs.event.triggeredmakeEventsIdmoveBottomScriptsopen.url.from.appprependToHTMLrandom.stringregisterEventremoveCssClassremoveEventHandlerrunEventsAppscselectChangeHandlerselectChangeHandlerJSset.autocomplete.listsetAppsetAppHasBottomScriptsetAppIsAuthenticatedsetAppSessionsetAppUIsetDataTablesetDownloadHandlersetHtmlAttributesetHtmlCSSsetHtmlHidesetHtmlShowsetImagesetInnerHTMLsetPlotsetPrintsetRHandsontablesetTablesetTextsetUIsetWidgetValuessimpleButtonsimpleCheckboxsingletonBottomScriptslimCollapsePanelsmallButtonsvgClickHandlerswapCssClasstest.event.authenticationtimerHandlerto.styleupdateDataTableupdateDownloadHandlerupdateImageupdatePlotupdatePrintupdateRHandsontableupdateTableupdateTextupdateUIviewAppwasAceHotkeyPressed

Dependencies:base64encbslibcachemclicommonmarkcrayondigestfastmapfontawesomefsgluehtmltoolshttpuvjquerylibjsonlitelaterlifecyclemagrittrmemoisemimepromisesR6rappdirsRcpprestorepointrlangsassshinysourcetoolswithrxtable

Readme and manuals

Help Manual

Help pageTopics
Add an handler to a hotkey in an aceEditor componentaceHotkeyHandler
Append HTML code to a DOM elementappendToHTML
Set a function that will be called when a new session of an app is initialized.appInitHandler
set the app ready to runappReadyToRun
If app is not running, mark script to be added at the bottom and return NULL If app is already running return script directlybottomScript
A more efficient version of button handler via global eventId handlerbuttonHandler
Call a javascript function or method with R argumentscallJS
Add an handler to an input that is called when the input value changeschangeHandler
An event handler for objects with given classclassEventHandler
A custom event handler. Need to write correct css.locatorcustomEventHandler
Directly setUI , also works for hidden UIdsetUI
Evaluate arbitrary java script code in the client's web browserevalJS
Generate an empty shiny events appeventsApp
get the current app objectgetApp
Get the session associated with the app objectgetAppSession
Get the current session objectgetCurrentSession
Get an input value from the current sessiongetInputValue
Checks whether the value of an input item has been changed (internal function)hasWidgetValueChanged
An event handler for an object with given ididEventHandler
Transform a vector of ids to a jQuery selector stringids2sel
Handler for an image clickimageClickHandler
Can be called inside initApp handler fun is a function that gets an argument query and can do some initial dispatch depending on the query. For some reason we need to use the observer trick to get access to the query object. This means dispatch takes place after other commands in the initApp handler.initialQueryDispatch
Given a tag object, extract out any children of tags$head and return them separate from the body.moveBottomScripts
Prpend HTML code to a DOM elementprependToHTML
run shiny events apprunEventsApp
Add an handler to an input or select that is called when the input value changesselectChangeHandler
set the current appsetApp
set the main ui object for the appsetAppUI
Update an dataTableOutput object.setDataTable
Shiny events version of downloadHandlersetDownloadHandler
Set attributes of HTML elementssetHtmlAttribute
Set css style of HTML elementssetHtmlCSS
Hide HTML elementssetHtmlHide
Show HTML elementssetHtmlShow
Update an output object. Can be used instead of renderImagesetImage
update an plotOutput object. Can be used instead of renderPlot.setPlot
Update an textOutput object. Can be used instead of renderPrintsetPrint
Update an RHandsontable object. Can be used instead of renderRHandsontablesetRHandsontable
Update an tableOutput object. Can be used instead of renderTablesetTable
Update an textOutput object. Can be used instead of renderTextsetText
Update an uiOutput object. Can be used instead of renderUIsetUI
If app is not running, mark script to be added at the bottom and return NULL If app is already running return script directlysingletonBottomScript
Handler for an image clicksvgClickHandler
Add an handler that triggers every intervalMs millisecondstimerHandler
Update an dataTableOutput object. Can be used instead of renderDataTableupdateDataTable
Shiny events version of downloadHandlerupdateDownloadHandler
Update an output object. Can be used instead of renderImageupdateImage
update an plotOutput object. Can be used instead of renderPlot.updatePlot
Update an textOutput object. Can be used instead of renderPrintupdatePrint
Update an RHandsontable object. Can be used instead of renderRHandsontableupdateRHandsontable
Update an tableOutput object. Can be used instead of renderTableupdateTable
Update an textOutput object. Can be used instead of renderTextupdateText
Update an uiOutput object. Can be used instead of renderUIupdateUI
view shiny events app in RStudio viewerviewApp
Checks whether a button has been pressed again (internal function)wasAceHotkeyPressed