Skip to content

Commit

Permalink
version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Joedean31 authored and cran-robot committed Apr 5, 2023
1 parent 6e75c52 commit ab569c0
Show file tree
Hide file tree
Showing 14 changed files with 376 additions and 214 deletions.
13 changes: 7 additions & 6 deletions DESCRIPTION
@@ -1,7 +1,8 @@
Package: shinyStorePlus
Type: Package
Title: Secure in-Browser Storage for 'Shiny' Inputs and Variables
Version: 0.9
Title: Secure in-Browser Storage for 'Shiny' Inputs, Outputs and
Variables
Version: 1.1
Authors@R: c(
person("Obinna", "Obianom", email = "idonshayo@gmail.com", role = c("aut", "cre")))
Maintainer: Obinna Obianom <idonshayo@gmail.com>
Expand All @@ -10,15 +11,15 @@ License: MIT + file LICENSE
URL: https://shinystoreplus.obi.obianom.com
BugReports: https://github.com/oobianom/shinyStorePlus
Depends: R (>= 3.6)
Imports: shiny, jsonlite, utils, htmltools
Imports: shiny, jsonlite, utils, htmltools, shinyWidgets
Suggests: rmarkdown, knitr, qpdf
Encoding: UTF-8
VignetteBuilder: knitr
Language: en-US
LazyData: false
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
NeedsCompilation: no
Packaged: 2023-02-15 11:42:08 UTC; in198
Packaged: 2023-04-05 15:09:56 UTC; in198
Author: Obinna Obianom [aut, cre]
Repository: CRAN
Date/Publication: 2023-02-15 11:50:02 UTC
Date/Publication: 2023-04-05 15:50:02 UTC
25 changes: 13 additions & 12 deletions MD5
@@ -1,37 +1,38 @@
e803c37f41edcb943422b68dab93848b *DESCRIPTION
a3cc78fd871d4c72562b7e27fe7cd89e *DESCRIPTION
8ab64ed62f653af571a1146937596c7b *LICENSE
28695d1faad09673fd50b5cda2ee7dc4 *NAMESPACE
a89ff6284d46b0f4e248118722459a77 *NEWS.md
5f60f6f0d25a17479a84b3ed15b2208b *NEWS.md
c54735e0f89a76de59a673f067f54975 *R/clearStore.R
6491bcb5e842a1e9ef27d089c8db78f4 *R/includes.R
7e76abe95fabf9c57addf2e8f6d956b9 *R/includes.R
7d6d1556239a6a492b3b04de7c11aef3 *R/locationParms.R
b43866279b82822c84b5529295ba244f *R/seeex.R
54923558217f4c16b54c050966bb2fbe *R/setup.R
92ed1c924f741ce13255724014194f31 *R/seeex.R
83a9b69a0b2930fb543235f0ad8e09bf *R/setup.R
36909710e27750e6559681e116ff9e80 *R/shinyStorePlus-package.R
3cc7900c579f0864ee1ebb0e3a2e88be *R/zzz.R
aeb326563c6957373df9487ac1179392 *README.md
8bf4b18c987df6ffdde686ac25e5c485 *README.md
859911ced023839a541f79730b823bbf *build/vignette.rds
b0979064b15697f4ad2de09c8629d903 *inst/doc/introduction_to_shinystoreplus.R
4e69ea1b1f26f7405eac36c48a61824e *inst/doc/introduction_to_shinystoreplus.Rmd
5e3588e229122839539c6a4affb12d20 *inst/doc/introduction_to_shinystoreplus.html
bb3e6e7b2599fe4aa5ee5ad073012b4f *inst/doc/introduction_to_shinystoreplus.html
58461e1d4df58a9d455fd7725c5416e5 *inst/doc/shinystoreplus_v08.R
9b820ec3176993fc49140cd25891778d *inst/doc/shinystoreplus_v08.Rmd
9b9e1e63488bc55e2b5f4279c86e8d35 *inst/doc/shinystoreplus_v08.html
e1d0d48273887edd3f96b190749f788f *inst/doc/shinystoreplus_v08.html
37fac86ba6186694ee58246ce9ec4b30 *inst/doc/using_shinystoreplus.R
7c558fca03fffda9cc6795f85a15a464 *inst/doc/using_shinystoreplus.Rmd
9b3119ac83df69ec16f11fff3ce8dc9f *inst/doc/using_shinystoreplus.html
a4bb62d8a27b8006d5cad52cc3112f67 *inst/doc/using_shinystoreplus.html
bf255004c4a6f421660d4d1a93730357 *inst/example/browserLinkToInput/server.R
7367d24bf34594cf22e5bd46e61810f7 *inst/example/browserLinkToInput/ui.R
1b1957bc9f7ae0b06d90d2503f7b7d9c *inst/example/shinyWidgetsExamples/app.R
18c5ced14b1183559255f42e12f7f154 *inst/example/storeInputs/server.R
8caee1f58c11a5f85d0382ad5abdf042 *inst/example/storeInputs/ui.R
a259c8d46c354b2a3be505905e603142 *inst/scripts/dexie.js
d5e6831668797944e02689df3bdfae81 *inst/scripts/shinystoreplus.js
34b6dfbeb2383f1de850195e92e4fdb8 *inst/scripts/shinystoreplus.js
e0816ea380cc8cc584a7fc27ab0f67ff *man/clearStore.Rd
a444e5f35413dd6c929c34b89ffc3548 *man/initStore.Rd
9a5b8b246a31c6391054e09b8b78e749 *man/link2input.Rd
02b9dc397108187a4d476c93319abfce *man/seeexample.Rd
e354985122e69807e9a3b549fdf569d8 *man/seeexample.Rd
8341d74e3cf89f693b7e66ee2c613559 *man/setupStorage.Rd
e4ddbc746c6a4a12a3407315f66b7ca1 *man/shinyStorePlus-package.Rd
69cb1f73d5a898b159b9157f1a62be27 *man/shinyStorePlus-package.Rd
4e69ea1b1f26f7405eac36c48a61824e *vignettes/introduction_to_shinystoreplus.Rmd
9b820ec3176993fc49140cd25891778d *vignettes/shinystoreplus_v08.Rmd
7c558fca03fffda9cc6795f85a15a464 *vignettes/using_shinystoreplus.Rmd
11 changes: 9 additions & 2 deletions NEWS.md
@@ -1,18 +1,25 @@
# shinyStorePlus 1.0
# shinyStorePlus 1.2
--------------------------------------------------------------------------
## Planned Features

- [ ] Store outputs for DT and rhandsontable tables automatically
- [ ] Store specific variables
- [ ] Retrieve all stored specific variables & outputs

# shinyStorePlus 1.1
--------------------------------------------------------------------------
## Features

- [x] Compatibility for shinyWidgets package



# shinyStorePlus 0.9
--------------------------------------------------------------------------
## Features

- [x] Store some outputs automatically
- [x] An updated example of the package in action, see https://github.com/oobianom/aagarw30_shinyapps_to-shinyStorePlus
- [x] Updated examples of the package in action, see https://github.com/oobianom/aagarw30_shinyapps_to-shinyStorePlus

# shinyStorePlus 0.8
--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/includes.R
Expand Up @@ -62,7 +62,7 @@

initStore <- function() {
ssp <- "shinyStorePlus"
vs <- "0.6"
vs <- "1.1"
template.loc1 <- file.path(find.package(package = ssp), "scripts")
htmltools::htmlDependency(
ssp, vs,
Expand Down
4 changes: 2 additions & 2 deletions R/seeex.R
Expand Up @@ -2,7 +2,7 @@
#'
#' Example of a shiny application with secure in-browser storage of inputs when changed
#'
#' @param name the name of example to view. choices include storeInputs or browserLinkToInput
#' @param name the name of example to view. choices include storeInputs or browserLinkToInput or shinyWidgetsExamples
#'
#' @note Changes made to the input or putputs will be saved and returned when the page is refresh within the same browser over different sessions. More examples are located at https://github.com/oobianom/aagarw30_shinyapps_to-shinyStorePlus
#' @return An example of inputs persistently stored when changed and the page refreshed
Expand All @@ -16,7 +16,7 @@
#'
#' @export

seeexample <- function(name = c("storeInputs","browserLinkToInput")) {
seeexample <- function(name = c("storeInputs","browserLinkToInput","shinyWidgetsExamples")) {
name <- match.arg(name) #get the example to view
ssp <- "shinyStorePlus" #set the name of the package
ex.dir <- file.path(find.package(package = ssp), "example",name) #path to the example
Expand Down
9 changes: 6 additions & 3 deletions R/setup.R
Expand Up @@ -168,7 +168,8 @@ setupStorage <- function(appId, inputs = TRUE, outputs = FALSE, session = getDef
shiny::updateSelectInput(session, inputId = thisrow$var, selected = selrange)
},
"checkboxgroup" = {
shiny::updateCheckboxGroupInput(session, inputId = thisrow$var, selected = selrange)
try(shinyWidgets::updateCheckboxGroupButtons(session, inputId = thisrow$var, selected = selrange),silent = TRUE)
try(shiny::updateCheckboxGroupInput(session, inputId = thisrow$var, selected = selrange),silent = TRUE)
},
"dateinput" = {
if (length(selrange) == 1) {
Expand All @@ -181,10 +182,12 @@ setupStorage <- function(appId, inputs = TRUE, outputs = FALSE, session = getDef
shiny::updateDateRangeInput(session, start = selrange[1], end = selrange[2], inputId = thisrow$var)
},
"checkbox" = {
shiny::updateCheckboxInput(session, inputId = thisrow$var, value = as.logical(thisrow$value))
try(shinyWidgets::updateSwitchInput(session, inputId = thisrow$var, value = as.logical(thisrow$value)), silent = TRUE)
try(shiny::updateCheckboxInput(session, inputId = thisrow$var, value = as.logical(thisrow$value)), silent = TRUE)
},
"radio" = {
shiny::updateRadioButtons(session, inputId = thisrow$var, selected = thisrow$value)
try(shinyWidgets::updateRadioGroupButtons(session, inputId = thisrow$var, selected = thisrow$value), silent = TRUE)
try(shiny::updateRadioButtons(session, inputId = thisrow$var, selected = thisrow$value), silent = TRUE)
},
{
shiny::updateTextInput(session, inputId = thisrow$var, value = selrange)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -15,7 +15,7 @@

### Start with more simple example code #3: https://github.com/oobianom/shinyStorePlus/tree/main/inst/example/browserLinkToInput


### Teaser video: https://www.youtube.com/watch?v=gkZfCF4Kr7I

### Other packages required for shinyStorePlus: https://depends.rpkg.net/package/shinyStorePlus

Expand Down
128 changes: 67 additions & 61 deletions inst/doc/introduction_to_shinystoreplus.html
Expand Up @@ -12,7 +12,7 @@

<meta name="author" content="Obinna N. Obianom" />

<meta name="date" content="2023-02-15" />
<meta name="date" content="2023-04-05" />

<title>shinyStorePlus: An in-browser secure storage for persistent and synchronized data from the Shiny inputs using IndexedDB</title>

Expand All @@ -31,23 +31,23 @@
</script>

<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>



<style type="text/css">
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
Expand All @@ -65,55 +65,54 @@
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */

code span.al { color: #ff0000; font-weight: bold; }
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.at { color: #7d9029; }
code span.bn { color: #40a070; }
code span.bu { color: #008000; }
code span.cf { color: #007020; font-weight: bold; }
code span.ch { color: #4070a0; }
code span.cn { color: #880000; }
code span.co { color: #60a0b0; font-style: italic; }
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.do { color: #ba2121; font-style: italic; }
code span.dt { color: #902000; }
code span.dv { color: #40a070; }
code span.er { color: #ff0000; font-weight: bold; }
code span.ex { }
code span.fl { color: #40a070; }
code span.fu { color: #06287e; }
code span.im { color: #008000; font-weight: bold; }
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.kw { color: #007020; font-weight: bold; }
code span.op { color: #666666; }
code span.ot { color: #007020; }
code span.pp { color: #bc7a00; }
code span.sc { color: #4070a0; }
code span.ss { color: #bb6688; }
code span.st { color: #4070a0; }
code span.va { color: #19177c; }
code span.vs { color: #4070a0; }
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; }
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
Expand All @@ -122,13 +121,20 @@
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
for (var j = 0; j < rules.length; j++) {
var j = 0;
while (j < rules.length) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
j++;
continue;
}
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
if (rule.style.color === '' && rule.style.backgroundColor === '') {
j++;
continue;
}
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
Expand Down Expand Up @@ -336,7 +342,7 @@ <h1 class="title toc-ignore">shinyStorePlus: An in-browser secure
storage for persistent and synchronized data from the Shiny inputs using
IndexedDB</h1>
<h4 class="author">Obinna N. Obianom</h4>
<h4 class="date">2023-02-15</h4>
<h4 class="date">2023-04-05</h4>



Expand Down

0 comments on commit ab569c0

Please sign in to comment.