├── .Rbuildignore ├── .babelrc ├── .github ├── .gitignore └── workflows │ └── R-CMD-check.yaml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── DESCRIPTION ├── LICENSE ├── LICENSE.md ├── NAMESPACE ├── NEWS.md ├── R ├── app_config.R ├── app_server.R ├── app_ui.R ├── models.R ├── run_app.R └── sysdata.rda ├── README.Rmd ├── README.md ├── app.R ├── dev ├── 01_start.R ├── 02_dev.R ├── 03_deploy.R └── run_dev.R ├── inst ├── WORDLIST ├── app │ └── www │ │ ├── favicon.ico │ │ ├── index.js │ │ ├── index.js.LICENSE.txt │ │ ├── srcjs_components_extra_f7_html.js │ │ └── srcjs_components_extra_f7_jsx.js └── golem-config.yml ├── jsdoc.conf.json ├── jsdoc ├── fonts │ ├── OpenSans-Bold-webfont.eot │ ├── OpenSans-Bold-webfont.svg │ ├── OpenSans-Bold-webfont.woff │ ├── OpenSans-BoldItalic-webfont.eot │ ├── OpenSans-BoldItalic-webfont.svg │ ├── OpenSans-BoldItalic-webfont.woff │ ├── OpenSans-Italic-webfont.eot │ ├── OpenSans-Italic-webfont.svg │ ├── OpenSans-Italic-webfont.woff │ ├── OpenSans-Light-webfont.eot │ ├── OpenSans-Light-webfont.svg │ ├── OpenSans-Light-webfont.woff │ ├── OpenSans-LightItalic-webfont.eot │ ├── OpenSans-LightItalic-webfont.svg │ ├── OpenSans-LightItalic-webfont.woff │ ├── OpenSans-Regular-webfont.eot │ ├── OpenSans-Regular-webfont.svg │ └── OpenSans-Regular-webfont.woff ├── global.html ├── index.html ├── index.js.html ├── scripts │ ├── linenumber.js │ └── prettify │ │ ├── Apache-License-2.0.txt │ │ ├── lang-css.js │ │ └── prettify.js └── styles │ ├── jsdoc-default.css │ ├── prettify-jsdoc.css │ └── prettify-tomorrow.css ├── man ├── figures │ └── README-pressure-1.png ├── run_app.Rd ├── solve_model.Rd └── vdp.Rd ├── package-lock.json ├── package.json ├── shinyComponent.Rproj ├── srcjs ├── components │ ├── app.f7.html │ ├── app.f7.jsx │ ├── custom-list.f7.jsx │ ├── extra.f7.html │ ├── extra.f7.jsx │ ├── vdp.f7.jsx │ └── widget.f7.jsx ├── config │ ├── entry_points.json │ ├── externals.json │ ├── loaders.json │ ├── misc.json │ └── output_path.json ├── index.js └── modules │ └── routes.js ├── tests ├── spelling.R ├── testthat.R └── testthat │ └── test-golem-recommended.R ├── tutorials └── .gitkeep ├── webpack.common.js ├── webpack.dev.js └── webpack.prod.js /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^data-raw$ 4 | dev_history.R 5 | ^dev$ 6 | $run_dev.* 7 | ^srcjs$ 8 | ^node_modules$ 9 | ^package\.json$ 10 | ^package-lock\.json$ 11 | ^webpack\.dev\.js$ 12 | ^webpack\.prod\.js$ 13 | ^webpack\.common\.js$ 14 | ^\.babelrc$ 15 | ^LICENSE\.md$ 16 | ^README\.Rmd$ 17 | ^CODE_OF_CONDUCT\.md$ 18 | ^\.github$ 19 | ^app\.R$ 20 | rsconnect$ 21 | ^jsdoc\.conf\.json$ 22 | ^jsdoc$ 23 | ^tutorials$ 24 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /.github/workflows/R-CMD-check.yaml: -------------------------------------------------------------------------------- 1 | # Workflow derived from https://github.com/r-lib/actions/tree/master/examples 2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help 3 | # 4 | # NOTE: This workflow is overkill for most R packages and 5 | # check-standard.yaml is likely a better choice. 6 | # usethis::use_github_action("check-standard") will install it. 7 | on: 8 | push: 9 | branches: [main, master] 10 | pull_request: 11 | branches: [main, master] 12 | 13 | name: R-CMD-check 14 | 15 | jobs: 16 | R-CMD-check: 17 | runs-on: ${{ matrix.config.os }} 18 | 19 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) 20 | 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | config: 25 | - {os: macOS-latest, r: 'release'} 26 | - {os: windows-latest, r: 'release'} 27 | - {os: windows-latest, r: '3.6'} 28 | # Deliberately check on older ubuntu to maximise backward compatibility 29 | - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} 30 | - {os: ubuntu-18.04, r: 'release'} 31 | - {os: ubuntu-18.04, r: 'oldrel/1'} 32 | - {os: ubuntu-18.04, r: 'oldrel/2'} 33 | - {os: ubuntu-18.04, r: 'oldrel/3'} 34 | - {os: ubuntu-18.04, r: 'oldrel/4'} 35 | 36 | env: 37 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 38 | 39 | steps: 40 | - uses: actions/checkout@v2 41 | 42 | - uses: r-lib/actions/setup-pandoc@v1 43 | 44 | - uses: r-lib/actions/setup-r@v1 45 | with: 46 | r-version: ${{ matrix.config.r }} 47 | http-user-agent: ${{ matrix.config.http-user-agent }} 48 | use-public-rspm: true 49 | 50 | - uses: r-lib/actions/setup-r-dependencies@v1 51 | with: 52 | extra-packages: rcmdcheck 53 | 54 | - name: Check 55 | env: 56 | _R_CHECK_CRAN_INCOMING_: false 57 | run: | 58 | options(crayon.enabled = TRUE) 59 | rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") 60 | shell: Rscript {0} 61 | 62 | - name: Show testthat output 63 | if: always() 64 | run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true 65 | shell: bash 66 | 67 | - name: Upload check results 68 | if: failure() 69 | uses: actions/upload-artifact@main 70 | with: 71 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results 72 | path: check 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .Rproj.user 3 | .Rhistory 4 | .Rdata 5 | .httr-oauth 6 | .DS_Store 7 | rsconnect 8 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the overall 26 | community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards 42 | of acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies 54 | when an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail 56 | address, posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at [INSERT CONTACT 63 | METHOD]. All complaints will be reviewed and investigated promptly and fairly. 64 | 65 | All community leaders are obligated to respect the privacy and security of the 66 | reporter of any incident. 67 | 68 | ## Enforcement Guidelines 69 | 70 | Community leaders will follow these Community Impact Guidelines in determining 71 | the consequences for any action they deem in violation of this Code of Conduct: 72 | 73 | ### 1. Correction 74 | 75 | **Community Impact**: Use of inappropriate language or other behavior deemed 76 | unprofessional or unwelcome in the community. 77 | 78 | **Consequence**: A private, written warning from community leaders, providing 79 | clarity around the nature of the violation and an explanation of why the 80 | behavior was inappropriate. A public apology may be requested. 81 | 82 | ### 2. Warning 83 | 84 | **Community Impact**: A violation through a single incident or series of 85 | actions. 86 | 87 | **Consequence**: A warning with consequences for continued behavior. No 88 | interaction with the people involved, including unsolicited interaction with 89 | those enforcing the Code of Conduct, for a specified period of time. This 90 | includes avoiding interactions in community spaces as well as external channels 91 | like social media. Violating these terms may lead to a temporary or permanent 92 | ban. 93 | 94 | ### 3. Temporary Ban 95 | 96 | **Community Impact**: A serious violation of community standards, including 97 | sustained inappropriate behavior. 98 | 99 | **Consequence**: A temporary ban from any sort of interaction or public 100 | communication with the community for a specified period of time. No public or 101 | private interaction with the people involved, including unsolicited interaction 102 | with those enforcing the Code of Conduct, is allowed during this period. 103 | Violating these terms may lead to a permanent ban. 104 | 105 | ### 4. Permanent Ban 106 | 107 | **Community Impact**: Demonstrating a pattern of violation of community 108 | standards, including sustained inappropriate behavior, harassment of an 109 | individual, or aggression toward or disparagement of classes of individuals. 110 | 111 | **Consequence**: A permanent ban from any sort of public interaction within the 112 | community. 113 | 114 | ## Attribution 115 | 116 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 117 | version 2.0, 118 | available at https://www.contributor-covenant.org/version/2/0/ 119 | code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at https:// 128 | www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: shinyComponent 2 | Title: Component powered app 3 | Version: 0.0.0.9000 4 | Authors@R: person('David', 'Granjon', email = 'dgranjon@ymail.com', role = c('cre', 'aut')) 5 | Description: App powered by {golem}, webpack, Framework7 components (esm). Shows how 6 | to mostly built the app with JS on the UI and R for data management, modeling, ... 7 | License: MIT + file LICENSE 8 | Imports: 9 | config, 10 | deSolve, 11 | golem, 12 | jsonlite, 13 | processx, 14 | shiny 15 | Encoding: UTF-8 16 | LazyData: true 17 | RoxygenNote: 7.1.2 18 | Suggests: 19 | spelling, 20 | testthat (>= 3.0.0) 21 | Config/testthat/edition: 3 22 | Language: en-US 23 | Depends: 24 | R (>= 2.10) 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2021 2 | COPYRIGHT HOLDER: Golem User 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2021 Golem User 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(run_app) 4 | import(shiny) 5 | importFrom(golem,activate_js) 6 | importFrom(golem,add_resource_path) 7 | importFrom(golem,bundle_resources) 8 | importFrom(golem,favicon) 9 | importFrom(golem,with_golem_options) 10 | importFrom(shiny,shinyApp) 11 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # shinyComponent 0.0.0.9000 2 | 3 | * Added a `NEWS.md` file to track changes to the package. 4 | -------------------------------------------------------------------------------- /R/app_config.R: -------------------------------------------------------------------------------- 1 | #' Access files in the current app 2 | #' 3 | #' NOTE: If you manually change your package name in the DESCRIPTION, 4 | #' don't forget to change it here too, and in the config file. 5 | #' For a safer name change mechanism, use the `golem::set_golem_name()` function. 6 | #' 7 | #' @param ... character vectors, specifying subdirectory and file(s) 8 | #' within your package. The default, none, returns the root of the app. 9 | #' 10 | #' @noRd 11 | app_sys <- function(...){ 12 | system.file(..., package = "shinyComponent") 13 | } 14 | 15 | 16 | #' Read App Config 17 | #' 18 | #' @param value Value to retrieve from the config file. 19 | #' @param config GOLEM_CONFIG_ACTIVE value. If unset, R_CONFIG_ACTIVE. 20 | #' If unset, "default". 21 | #' @param use_parent Logical, scan the parent directory for config file. 22 | #' 23 | #' @noRd 24 | get_golem_config <- function( 25 | value, 26 | config = Sys.getenv( 27 | "GOLEM_CONFIG_ACTIVE", 28 | Sys.getenv( 29 | "R_CONFIG_ACTIVE", 30 | "default" 31 | ) 32 | ), 33 | use_parent = TRUE 34 | ){ 35 | config::get( 36 | value = value, 37 | config = config, 38 | # Modify this if your config file is somewhere else: 39 | file = app_sys("golem-config.yml"), 40 | use_parent = use_parent 41 | ) 42 | } 43 | 44 | -------------------------------------------------------------------------------- /R/app_server.R: -------------------------------------------------------------------------------- 1 | #' The application server-side 2 | #' 3 | #' @param input,output,session Internal parameters for {shiny}. 4 | #' DO NOT REMOVE. 5 | #' @import shiny 6 | #' @noRd 7 | app_server <- function( input, output, session ) { 8 | 9 | pars <- reactive({ 10 | req(input$mu) 11 | c(mu = input$mu) 12 | }) 13 | 14 | model_output <- reactive({ 15 | req(pars()) 16 | solve_model( 17 | Y0 = c(X=1, Y=1), 18 | t = seq(0, 100, .1), 19 | vdp, 20 | pars() 21 | ) 22 | }) 23 | 24 | observeEvent(model_output(), { 25 | data <- data.frame(model_output()) 26 | modelData <- list(t = data$time, X = data$X, Y = data$Y) 27 | grid <- seq(-10, 10) 28 | trajectoryData <- data.frame(model_output()[, "X"], model_output()[, "Y"]) 29 | names(trajectoryData) <- NULL 30 | phaseData <- build_phase_data(grid, grid, pars()) 31 | names(phaseData) <- NULL 32 | session$sendCustomMessage( 33 | "model-data", 34 | list( 35 | lineData = modelData, 36 | phaseData = jsonlite::toJSON(phaseData, pretty = TRUE), 37 | trajectoryData = jsonlite::toJSON(trajectoryData, pretty = TRUE) 38 | ) 39 | ) 40 | }) 41 | 42 | # Your application server logic 43 | observeEvent(TRUE, { 44 | session$sendCustomMessage("init", colnames(mtcars)) 45 | }) 46 | 47 | observeEvent(input$alert, { 48 | message(sprintf("Received from JS: %s", input$alert$message)) 49 | message(sprintf("App title is %s", input$alert$title)) 50 | }) 51 | 52 | observe({ 53 | print(input$alert_opened) 54 | print(input$mu) 55 | }) 56 | } 57 | -------------------------------------------------------------------------------- /R/app_ui.R: -------------------------------------------------------------------------------- 1 | #' The application User-Interface 2 | #' 3 | #' @param request Internal parameter for `{shiny}`. 4 | #' DO NOT REMOVE. 5 | #' @inheritParams golem_add_external_resources 6 | #' @import shiny 7 | #' @noRd 8 | app_ui <- function(request, title = NULL) { 9 | tagList( 10 | # Leave this function for adding external resources 11 | golem_add_external_resources(title), 12 | # Your application UI logic 13 | tags$body( 14 | div(id = "app"), 15 | tags$script(src = "www/index.js") 16 | ) 17 | ) 18 | } 19 | 20 | #' Add external Resources to the Application 21 | #' 22 | #' This function is internally used to add external 23 | #' resources inside the Shiny application. 24 | #' 25 | #' @import shiny 26 | #' @param title App title 27 | #' @importFrom golem add_resource_path activate_js favicon bundle_resources 28 | #' @noRd 29 | golem_add_external_resources <- function(title){ 30 | 31 | add_resource_path( 32 | 'www', app_sys('app/www') 33 | ) 34 | 35 | tags$head( 36 | favicon(), 37 | tags$meta(charset = "utf-8"), 38 | tags$meta( 39 | name = "viewport", 40 | content = "width=device-width, initial-scale=1, 41 | maximum-scale=1, minimum-scale=1, user-scalable=no, 42 | viewport-fit=cover" 43 | ), 44 | tags$meta( 45 | name = "apple-mobile-web-app-capable", 46 | content = "yes" 47 | ), 48 | tags$meta( 49 | name = "theme-color", 50 | content = "#2196f3" 51 | ), 52 | tags$title(title) 53 | #bundle_resources( 54 | # path = app_sys('app/www'), 55 | # app_title = 'shinyFramework7' 56 | #) 57 | # Add here other external resources 58 | # for example, you can add shinyalert::useShinyalert() 59 | ) 60 | } 61 | 62 | -------------------------------------------------------------------------------- /R/models.R: -------------------------------------------------------------------------------- 1 | vdp_equations <- c( 2 | "Y", 3 | "p['mu'] * (1 - X^2) * Y - X" 4 | ) 5 | 6 | 7 | #' Brusselator model example 8 | #' 9 | #' 2D ODE model 10 | #' 11 | #' @keywords internal 12 | vdp <- function(t, y, p) { 13 | with(as.list(y), { 14 | dX <- eval(parse(text = vdp_equations[1])) 15 | dY <- eval(parse(text = vdp_equations[2])) 16 | list(c(X=dX, Y=dY)) 17 | }) 18 | } 19 | 20 | #' Solve 2D ODE model 21 | #' 22 | #' Leverage deSolve package 23 | #' 24 | #' @keywords internal 25 | solve_model <- function(Y0, t, model, parms) { 26 | deSolve::ode(y = Y0, times = t, model, parms) 27 | } 28 | 29 | 30 | build_phase_data <- function(xgrid, ygrid, p) { 31 | vectors <- expand.grid(x = xgrid, y = ygrid) 32 | X <- vectors$x 33 | Y <- vectors$y 34 | vectors$dx <- eval(parse(text = vdp_equations[1])) 35 | vectors$dy <- eval(parse(text = vdp_equations[2])) 36 | vectors$mag <- sqrt(vectors$dx * vectors$dx + vectors$dy * vectors$dy) 37 | vectors 38 | } 39 | -------------------------------------------------------------------------------- /R/run_app.R: -------------------------------------------------------------------------------- 1 | #' Run the Shiny Application 2 | #' 3 | #' @param ... arguments to pass to golem_opts. 4 | #' See `?golem::get_golem_options` for more details. 5 | #' @inheritParams shiny::shinyApp 6 | #' 7 | #' @export 8 | #' @importFrom shiny shinyApp 9 | #' @importFrom golem with_golem_options 10 | run_app <- function( 11 | onStart = NULL, 12 | options = list(), 13 | enableBookmarking = NULL, 14 | uiPattern = "/", 15 | ... 16 | ) { 17 | with_golem_options( 18 | app = shinyApp( 19 | ui = app_ui, 20 | server = app_server, 21 | onStart = onStart, 22 | options = options, 23 | enableBookmarking = enableBookmarking, 24 | uiPattern = uiPattern 25 | ), 26 | golem_opts = list(...) 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /R/sysdata.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/R/sysdata.rda -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: github_document 3 | --- 4 | 5 | 6 | 7 | ```{r, include = FALSE} 8 | knitr::opts_chunk$set( 9 | collapse = TRUE, 10 | comment = "#>", 11 | fig.path = "man/figures/README-", 12 | out.width = "100%" 13 | ) 14 | ``` 15 | 16 | # shinyComponent 17 | 18 | 19 | [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) 20 | [![R-CMD-check](https://github.com/RinteRface/shinyComponent/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/shinyComponent/actions) 21 | 22 | 23 | App powered by {golem}, webpack, Framework7 components (esm). WIP 24 | App is deployed on [shinyapps.io](https://dgranjon.shinyapps.io/shinyComponent/). 25 | 26 | ## Installation 27 | 28 | You can install the released version of shinyComponent from [CRAN](https://CRAN.R-project.org) with: 29 | 30 | ``` r 31 | remotes::install_github("RinteRface/shinyComponent") 32 | ``` 33 | 34 | ## Proof of Concept 35 | Interface is built with Framework 7 from JS, powered by webpack. We leverage 36 | Template components to create the app root and subroutes. On the server side, we process data from R and send them back to JS to update the components. 37 | 38 | ### UI 39 | Components may be written with JSX (supported by the framework7-loader, no need to install `React`!), which is more convenient than the classic template syntax. Components have either the old/new syntax so you can compare both approaches. 40 | 41 | ### Main page 42 | App component is driven by: 43 | 44 | ```jsx 45 | import ListItem from './custom-list.f7.jsx'; 46 | 47 | export default (props, {$f7, $f7ready, $on, $update }) => { 48 | const title = 'Hello World'; 49 | let names = ['John', 'Vladimir', 'Timo']; 50 | 51 | Shiny.addCustomMessageHandler('init', function(message) { 52 | names = message; 53 | $update(); 54 | }); 55 | 56 | // App events callback 57 | $on('click', () => { 58 | // callback 59 | }); 60 | 61 | // This method need to be used only when you use Main App Component 62 | // to make sure to call Framework7 APIs when app initialized. 63 | $f7ready(() => { 64 | // do stuff 65 | console.log('Hello'); 66 | }); 67 | 68 | const openAlert = () => { 69 | $f7.dialog.alert(title, function() { 70 | // ok button callback 71 | Shiny.setInputValue('alert_opened', false); 72 | }); 73 | Shiny.setInputValue('alert_opened', true); 74 | Shiny.setInputValue( 75 | 'alert', 76 | { 77 | message: 'Alert dialog was triggered!', 78 | title: title, 79 | }, 80 | {priority: 'event'} 81 | ); 82 | } 83 | 84 | const openPanel = () => { 85 | $f7.panel.open('.panel-left'); 86 | } 87 | 88 | return () => ( 89 |
90 |
91 |
"Hello"
92 |
93 |
94 |
95 | 101 |
102 | 107 |
108 |
109 |
    110 | 111 | 112 | 113 |
114 |
115 |
    116 | {names.map((name) => 117 |
  • {name}
  • 118 | )} 119 |
120 |
121 |
122 |
123 |
124 |
125 | ) 126 | } 127 | ``` 128 | 129 | Below is the code a of local sub-component, being invoked in the main App template: 130 | 131 | ```jsx 132 | const ListItem = (props) => { 133 | return () =>
  • {props.title}
  • ; 134 | } 135 | 136 | export default ListItem 137 | ``` 138 | 139 | ### Router 140 | This app requires a router to navigate between pages. This is done with the Framework7 builtin feature. You may pass entire app components to the router, as shown below. 141 | 142 | ```js 143 | import Extra from '../components/extra.f7.jsx'; 144 | 145 | export default [ 146 | //{ 147 | // path: '/' 148 | //}, 149 | { 150 | path: '/extra/', 151 | asyncComponent: () => Extra 152 | } 153 | ] 154 | ``` 155 | 156 | ### App init 157 | Importantly, we only import Framework7 modules we need, to lighten the final bundle: 158 | 159 | ```js 160 | import Dialog from 'framework7/esm/components/dialog/dialog.js'; 161 | import Gauge from 'framework7/esm/components/gauge/gauge.js'; 162 | import Panel from 'framework7/esm/components/panel/panel.js'; 163 | import View from 'framework7/esm/components/view/view.js'; 164 | Framework7.use([Dialog, Gauge, Panel, View]); 165 | ``` 166 | 167 | App UI is initialized passing the main app component, the routes and targeting the `#app` element, located within the `app_ui()` function: 168 | 169 | ```r 170 | app_ui <- function(request) { 171 | tagList( 172 | # Leave this function for adding external resources 173 | golem_add_external_resources(), 174 | # Your application UI logic 175 | tags$body( 176 | div(id = "app"), 177 | tags$script(src = "www/index.js") 178 | ) 179 | ) 180 | } 181 | ``` 182 | 183 | Since the JS assets have to go after the `#app` element in the `body` tag, we had to comment out the `{golem}` predefined script: 184 | 185 | ```r 186 | tags$head( 187 | favicon(), 188 | #bundle_resources( 189 | # path = app_sys('app/www'), 190 | # app_title = 'shinyFramework7' 191 | #) 192 | # Add here other external resources 193 | # for example, you can add shinyalert::useShinyalert() 194 | ) 195 | ``` 196 | 197 | Whole `index.js` code: 198 | 199 | ```js 200 | import 'shiny'; 201 | // Import Framework7 202 | import Framework7 from 'framework7'; 203 | // Import Framework7 Styles 204 | import 'framework7/framework7-bundle.min.css'; 205 | 206 | // Install F7 Components using .use() method on class: 207 | import Dialog from 'framework7/esm/components/dialog/dialog.js'; 208 | import Gauge from 'framework7/esm/components/gauge/gauge.js'; 209 | import Panel from 'framework7/esm/components/panel/panel.js'; 210 | import View from 'framework7/esm/components/view/view.js'; 211 | Framework7.use([Dialog, Gauge, Panel, View]); 212 | 213 | // Import App component 214 | import App from './components/app.f7.jsx'; 215 | 216 | // Import other routes 217 | import routes from './modules/routes.js'; 218 | 219 | // Initialize app 220 | var app = new Framework7({ 221 | el: '#app', 222 | theme: 'ios', 223 | // specify main app component 224 | routes: routes, 225 | component: App 226 | }); 227 | ``` 228 | 229 | ### Server 230 | 231 | On the server side (R): 232 | 233 | ```r 234 | observeEvent(TRUE, { 235 | session$sendCustomMessage("init", colnames(mtcars)) 236 | }) 237 | 238 | observeEvent(input$alert, { 239 | message(sprintf("Received from JS: %s", input$alert$message)) 240 | message(sprintf("App title is %s", input$alert$title)) 241 | }) 242 | 243 | observe({print(input$alert_opened)}) 244 | ``` 245 | 246 | ## Example 247 | 248 | This is a basic example which shows you how to solve a common problem: 249 | 250 | ### Run app 251 | ```{r, eval=FALSE} 252 | library(shinyComponent) 253 | ## basic example code 254 | run_app() 255 | ``` 256 | 257 | ### Dev mode 258 | ```{r, eval=FALSE} 259 | library(shinyComponent) 260 | ## basic example code 261 | packer::bundle_dev() 262 | devtools::load_all() 263 | run_app() 264 | ``` 265 | 266 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # shinyComponent 5 | 6 | 7 | 8 | [![Lifecycle: 9 | experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) 10 | [![R-CMD-check](https://github.com/RinteRface/shinyComponent/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/shinyComponent/actions) 11 | 12 | 13 | App powered by {golem}, webpack, Framework7 components (esm). 14 | 15 | ## Installation 16 | 17 | You can install the released version of shinyComponent from 18 | [CRAN](https://CRAN.R-project.org) with: 19 | 20 | ``` r 21 | remotes::install_github("RinteRface/shinyComponent") 22 | ``` 23 | 24 | ## Proof of Concept 25 | 26 | Interface is built with Framework 7 from JS, powered by webpack. We 27 | leverage Template components to create the app root and subroutes. On 28 | the server side, we process data from R and send them back to JS to 29 | update the components. 30 | 31 | ### UI 32 | 33 | Components may be written with JSX (supported by the framework7-loader, 34 | no need to install `React`\!), which is more convenient than the classic 35 | template syntax. Components have either the old/new syntax so you can 36 | compare both approaches. 37 | 38 | ### Main page 39 | 40 | App component is driven by: 41 | 42 | ``` jsx 43 | import ListItem from './custom-list.f7.jsx'; 44 | 45 | export default (props, {$f7, $f7ready, $on, $update }) => { 46 | const title = 'Hello World'; 47 | let names = ['John', 'Vladimir', 'Timo']; 48 | 49 | Shiny.addCustomMessageHandler('init', function(message) { 50 | names = message; 51 | $update(); 52 | }); 53 | 54 | // App events callback 55 | $on('click', () => { 56 | // callback 57 | }); 58 | 59 | // This method need to be used only when you use Main App Component 60 | // to make sure to call Framework7 APIs when app initialized. 61 | $f7ready(() => { 62 | // do stuff 63 | console.log('Hello'); 64 | }); 65 | 66 | const openAlert = () => { 67 | $f7.dialog.alert(title, function() { 68 | // ok button callback 69 | Shiny.setInputValue('alert_opened', false); 70 | }); 71 | Shiny.setInputValue('alert_opened', true); 72 | Shiny.setInputValue( 73 | 'alert', 74 | { 75 | message: 'Alert dialog was triggered!', 76 | title: title, 77 | }, 78 | {priority: 'event'} 79 | ); 80 | } 81 | 82 | const openPanel = () => { 83 | $f7.panel.open('.panel-left'); 84 | } 85 | 86 | return () => ( 87 |
    88 |
    89 |
    "Hello"
    90 |
    91 |
    92 |
    93 | 99 |
    100 | 105 |
    106 |
    107 |
      108 | 109 | 110 | 111 |
    112 |
    113 |
      114 | {names.map((name) => 115 |
    • {name}
    • 116 | )} 117 |
    118 |
    119 |
    120 |
    121 |
    122 |
    123 | ) 124 | } 125 | ``` 126 | 127 | Below is the code a of local sub-component, being invoked in the main 128 | App template: 129 | 130 | ``` jsx 131 | const ListItem = (props) => { 132 | return () =>
  • {props.title}
  • ; 133 | } 134 | 135 | export default ListItem 136 | ``` 137 | 138 | ### Router 139 | 140 | This app requires a router to navigate between pages. This is done with 141 | the Framework7 builtin feature. You may pass entire app components to 142 | the router, as shown below. 143 | 144 | ``` js 145 | import Extra from '../components/extra.f7.jsx'; 146 | 147 | export default [ 148 | //{ 149 | // path: '/' 150 | //}, 151 | { 152 | path: '/extra/', 153 | asyncComponent: () => Extra 154 | } 155 | ] 156 | ``` 157 | 158 | ### App init 159 | 160 | Importantly, we only import Framework7 modules we need, to lighten the 161 | final bundle: 162 | 163 | ``` js 164 | import Dialog from 'framework7/esm/components/dialog/dialog.js'; 165 | import Gauge from 'framework7/esm/components/gauge/gauge.js'; 166 | import Panel from 'framework7/esm/components/panel/panel.js'; 167 | import View from 'framework7/esm/components/view/view.js'; 168 | Framework7.use([Dialog, Gauge, Panel, View]); 169 | ``` 170 | 171 | App UI is initialized passing the main app component, the routes and 172 | targeting the `#app` element, located within the `app_ui()` function: 173 | 174 | ``` r 175 | app_ui <- function(request) { 176 | tagList( 177 | # Leave this function for adding external resources 178 | golem_add_external_resources(), 179 | # Your application UI logic 180 | tags$body( 181 | div(id = "app"), 182 | tags$script(src = "www/index.js") 183 | ) 184 | ) 185 | } 186 | ``` 187 | 188 | Since the JS assets have to go after the `#app` element in the `body` 189 | tag, we had to comment out the `{golem}` predefined script: 190 | 191 | ``` r 192 | tags$head( 193 | favicon(), 194 | #bundle_resources( 195 | # path = app_sys('app/www'), 196 | # app_title = 'shinyFramework7' 197 | #) 198 | # Add here other external resources 199 | # for example, you can add shinyalert::useShinyalert() 200 | ) 201 | ``` 202 | 203 | Whole `index.js` code: 204 | 205 | ``` js 206 | import 'shiny'; 207 | // Import Framework7 208 | import Framework7 from 'framework7'; 209 | // Import Framework7 Styles 210 | import 'framework7/framework7-bundle.min.css'; 211 | 212 | // Install F7 Components using .use() method on class: 213 | import Dialog from 'framework7/esm/components/dialog/dialog.js'; 214 | import Gauge from 'framework7/esm/components/gauge/gauge.js'; 215 | import Panel from 'framework7/esm/components/panel/panel.js'; 216 | import View from 'framework7/esm/components/view/view.js'; 217 | Framework7.use([Dialog, Gauge, Panel, View]); 218 | 219 | // Import App component 220 | import App from './components/app.f7.jsx'; 221 | 222 | // Import other routes 223 | import routes from './modules/routes.js'; 224 | 225 | // Initialize app 226 | var app = new Framework7({ 227 | el: '#app', 228 | theme: 'ios', 229 | // specify main app component 230 | routes: routes, 231 | component: App 232 | }); 233 | ``` 234 | 235 | ### Server 236 | 237 | On the server side (R): 238 | 239 | ``` r 240 | observeEvent(TRUE, { 241 | session$sendCustomMessage("init", colnames(mtcars)) 242 | }) 243 | 244 | observeEvent(input$alert, { 245 | message(sprintf("Received from JS: %s", input$alert$message)) 246 | message(sprintf("App title is %s", input$alert$title)) 247 | }) 248 | 249 | observe({print(input$alert_opened)}) 250 | ``` 251 | 252 | ## Example 253 | 254 | This is a basic example which shows you how to solve a common problem: 255 | 256 | ### Run app 257 | 258 | ``` r 259 | library(shinyComponent) 260 | ## basic example code 261 | run_app() 262 | ``` 263 | 264 | ### Dev mode 265 | 266 | ``` r 267 | library(shinyComponent) 268 | ## basic example code 269 | packer::bundle_dev() 270 | devtools::load_all() 271 | run_app() 272 | ``` 273 | -------------------------------------------------------------------------------- /app.R: -------------------------------------------------------------------------------- 1 | # Launch the ShinyApp (Do not remove this comment) 2 | # To deploy, run: rsconnect::deployApp() 3 | # Or use the blue button on top of this file 4 | 5 | #pkgload::load_all() 6 | options( "golem.app.prod" = TRUE) 7 | 8 | # Obviously, the chat feature is disabled in local mode. 9 | shinyComponent::run_app() 10 | -------------------------------------------------------------------------------- /dev/01_start.R: -------------------------------------------------------------------------------- 1 | # Building a Prod-Ready, Robust Shiny Application. 2 | # 3 | # README: each step of the dev files is optional, and you don't have to 4 | # fill every dev scripts before getting started. 5 | # 01_start.R should be filled at start. 6 | # 02_dev.R should be used to keep track of your development during the project. 7 | # 03_deploy.R should be used once you need to deploy your app. 8 | # 9 | # 10 | ######################################## 11 | #### CURRENT FILE: ON START SCRIPT ##### 12 | ######################################## 13 | 14 | ## Fill the DESCRIPTION ---- 15 | ## Add meta data about your application 16 | ## 17 | ## /!\ Note: if you want to change the name of your app during development, 18 | ## either re-run this function, call golem::set_golem_name(), or don't forget 19 | ## to change the name in the app_sys() function in app_config.R /!\ 20 | ## 21 | golem::fill_desc( 22 | pkg_name = "shinyComponent", # The Name of the package containing the App 23 | pkg_title = "Component powered app", # The Title of the package containing the App 24 | pkg_description = "App powered by {golem}, webpack, Framework7 components (esm). WIP", # The Description of the package containing the App 25 | author_first_name = "David", # Your First Name 26 | author_last_name = "Granjon", # Your Last Name 27 | author_email = "dgranjon@ymail.com", # Your Email 28 | repo_url = NULL # The URL of the GitHub Repo (optional) 29 | ) 30 | 31 | ## Set {golem} options ---- 32 | golem::set_golem_options() 33 | 34 | ## Create Common Files ---- 35 | ## See ?usethis for more information 36 | usethis::use_mit_license( "Golem User" ) # You can set another license here 37 | usethis::use_readme_rmd( open = FALSE ) 38 | usethis::use_code_of_conduct() 39 | usethis::use_lifecycle_badge( "Experimental" ) 40 | usethis::use_news_md( open = FALSE ) 41 | 42 | ## Use git ---- 43 | usethis::use_git() 44 | 45 | ## Init Testing Infrastructure ---- 46 | ## Create a template for tests 47 | golem::use_recommended_tests() 48 | 49 | ## Use Recommended Packages ---- 50 | golem::use_recommended_deps() 51 | 52 | ## Favicon ---- 53 | # If you want to change the favicon (default is golem's one) 54 | golem::use_favicon() # path = "path/to/ico". Can be an online file. 55 | golem::remove_favicon() 56 | 57 | ## Add helper functions ---- 58 | golem::use_utils_ui() 59 | golem::use_utils_server() 60 | 61 | # You're now set! ---- 62 | 63 | # go to dev/02_dev.R 64 | rstudioapi::navigateToFile( "dev/02_dev.R" ) 65 | 66 | -------------------------------------------------------------------------------- /dev/02_dev.R: -------------------------------------------------------------------------------- 1 | # Building a Prod-Ready, Robust Shiny Application. 2 | # 3 | # README: each step of the dev files is optional, and you don't have to 4 | # fill every dev scripts before getting started. 5 | # 01_start.R should be filled at start. 6 | # 02_dev.R should be used to keep track of your development during the project. 7 | # 03_deploy.R should be used once you need to deploy your app. 8 | # 9 | # 10 | ################################### 11 | #### CURRENT FILE: DEV SCRIPT ##### 12 | ################################### 13 | 14 | # Engineering 15 | 16 | ## Dependencies ---- 17 | ## Add one line by package you want to add as dependency 18 | usethis::use_package( "thinkr" ) 19 | 20 | ## Add modules ---- 21 | ## Create a module infrastructure in R/ 22 | golem::add_module( name = "name_of_module1" ) # Name of the module 23 | golem::add_module( name = "name_of_module2" ) # Name of the module 24 | 25 | ## Add helper functions ---- 26 | ## Creates fct_* and utils_* 27 | golem::add_fct( "helpers" ) 28 | golem::add_utils( "helpers" ) 29 | 30 | ## External resources 31 | ## Creates .js and .css files at inst/app/www 32 | golem::add_js_file( "script" ) 33 | golem::add_js_handler( "handlers" ) 34 | golem::add_css_file( "custom" ) 35 | 36 | ## Add internal datasets ---- 37 | ## If you have data in your package 38 | usethis::use_data_raw( name = "my_dataset", open = FALSE ) 39 | 40 | ## Tests ---- 41 | ## Add one line by test you want to create 42 | usethis::use_test( "app" ) 43 | 44 | # Documentation 45 | 46 | ## Vignette ---- 47 | usethis::use_vignette("shinyFramework7") 48 | devtools::build_vignettes() 49 | 50 | ## Code Coverage---- 51 | ## Set the code coverage service ("codecov" or "coveralls") 52 | usethis::use_coverage() 53 | 54 | # Create a summary readme for the testthat subdirectory 55 | covrpage::covrpage() 56 | 57 | ## CI ---- 58 | ## Use this part of the script if you need to set up a CI 59 | ## service for your application 60 | ## 61 | ## (You'll need GitHub there) 62 | usethis::use_github() 63 | 64 | # GitHub Actions 65 | usethis::use_github_action() 66 | # Chose one of the three 67 | # See https://usethis.r-lib.org/reference/use_github_action.html 68 | usethis::use_github_action_check_release() 69 | usethis::use_github_action_check_standard() 70 | usethis::use_github_action_check_full() 71 | # Add action for PR 72 | usethis::use_github_action_pr_commands() 73 | 74 | # Travis CI 75 | usethis::use_travis() 76 | usethis::use_travis_badge() 77 | 78 | # AppVeyor 79 | usethis::use_appveyor() 80 | usethis::use_appveyor_badge() 81 | 82 | # Circle CI 83 | usethis::use_circleci() 84 | usethis::use_circleci_badge() 85 | 86 | # Jenkins 87 | usethis::use_jenkins() 88 | 89 | # GitLab CI 90 | usethis::use_gitlab_ci() 91 | 92 | # You're now set! ---- 93 | # go to dev/03_deploy.R 94 | rstudioapi::navigateToFile("dev/03_deploy.R") 95 | 96 | -------------------------------------------------------------------------------- /dev/03_deploy.R: -------------------------------------------------------------------------------- 1 | # Building a Prod-Ready, Robust Shiny Application. 2 | # 3 | # README: each step of the dev files is optional, and you don't have to 4 | # fill every dev scripts before getting started. 5 | # 01_start.R should be filled at start. 6 | # 02_dev.R should be used to keep track of your development during the project. 7 | # 03_deploy.R should be used once you need to deploy your app. 8 | # 9 | # 10 | ###################################### 11 | #### CURRENT FILE: DEPLOY SCRIPT ##### 12 | ###################################### 13 | 14 | # Test your app 15 | 16 | ## Run checks ---- 17 | ## Check the package before sending to prod 18 | devtools::check() 19 | rhub::check_for_cran() 20 | 21 | # Deploy 22 | 23 | ## Local, CRAN or Package Manager ---- 24 | ## This will build a tar.gz that can be installed locally, 25 | ## sent to CRAN, or to a package manager 26 | devtools::build() 27 | 28 | ## RStudio ---- 29 | ## If you want to deploy on RStudio related platforms 30 | golem::add_rstudioconnect_file() 31 | golem::add_shinyappsio_file() 32 | golem::add_shinyserver_file() 33 | 34 | ## Docker ---- 35 | ## If you want to deploy via a generic Dockerfile 36 | golem::add_dockerfile() 37 | 38 | ## If you want to deploy to ShinyProxy 39 | golem::add_dockerfile_shinyproxy() 40 | 41 | ## If you want to deploy to Heroku 42 | golem::add_dockerfile_heroku() 43 | -------------------------------------------------------------------------------- /dev/run_dev.R: -------------------------------------------------------------------------------- 1 | # Set options here 2 | options(golem.app.prod = FALSE) # TRUE = production mode, FALSE = development mode 3 | 4 | # Detach all loaded packages and clean your environment 5 | golem::detach_all_attached() 6 | # rm(list=ls(all.names = TRUE)) 7 | 8 | # Document and reload your package 9 | golem::document_and_reload() 10 | 11 | # Run the application 12 | run_app() 13 | -------------------------------------------------------------------------------- /inst/WORDLIST: -------------------------------------------------------------------------------- 1 | Lifecycle 2 | WIP 3 | esm 4 | github 5 | golem 6 | https 7 | webpack 8 | -------------------------------------------------------------------------------- /inst/app/www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/inst/app/www/favicon.ico -------------------------------------------------------------------------------- /inst/app/www/index.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZRender, a high performance 2d drawing library. 3 | * 4 | * Copyright (c) 2013, Baidu Inc. 5 | * All rights reserved. 6 | * 7 | * LICENSE 8 | * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt 9 | */ 10 | 11 | /*! ***************************************************************************** 12 | Copyright (c) Microsoft Corporation. 13 | 14 | Permission to use, copy, modify, and/or distribute this software for any 15 | purpose with or without fee is hereby granted. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 18 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 19 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 20 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 21 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 22 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 23 | PERFORMANCE OF THIS SOFTWARE. 24 | ***************************************************************************** */ 25 | -------------------------------------------------------------------------------- /inst/app/www/srcjs_components_extra_f7_html.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | (self["webpackChunkshinyFramework7"] = self["webpackChunkshinyFramework7"] || []).push([["srcjs_components_extra_f7_html"],{ 3 | 4 | /***/ "./srcjs/components/extra.f7.html": 5 | /*!****************************************!*\ 6 | !*** ./srcjs/components/extra.f7.html ***! 7 | \****************************************/ 8 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 | 10 | __webpack_require__.r(__webpack_exports__); 11 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { 12 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 13 | /* harmony export */ }); 14 | /* harmony import */ var _babel_runtime_helpers_taggedTemplateLiteral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/taggedTemplateLiteral */ "./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js"); 15 | 16 | 17 | var _templateObject; 18 | 19 | /** @jsx $jsx */ 20 | 21 | 22 | function framework7Component(props, _ref) { 23 | var $f7router = _ref.$f7router; 24 | 25 | var back = function back() { 26 | $f7router.back(); 27 | }; 28 | 29 | return function ($ctx) { 30 | var $ = $ctx.$; 31 | var $h = $ctx.$h; 32 | var $root = $ctx.$root; 33 | var $f7 = $ctx.$f7; 34 | var $f7route = $ctx.$f7route; 35 | var $f7router = $ctx.$f7router; 36 | var $theme = $ctx.$theme; 37 | var $update = $ctx.$update; 38 | var $store = $ctx.$store; 39 | return $h(_templateObject || (_templateObject = (0,_babel_runtime_helpers_taggedTemplateLiteral__WEBPACK_IMPORTED_MODULE_0__.default)(["\n
    \n
    \n
    \n
    \n
    Prout
    \n
    \n
    \n \n
    \n
    \n \n Nothing\n Back\n
    \n
    \n
    ...
    \n
    \n"])), back); 40 | }; 41 | } 42 | 43 | framework7Component.id = '1e21f7d54c'; 44 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (framework7Component); 45 | 46 | /***/ }), 47 | 48 | /***/ "./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js": 49 | /*!**************************************************************************!*\ 50 | !*** ./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js ***! 51 | \**************************************************************************/ 52 | /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 53 | 54 | __webpack_require__.r(__webpack_exports__); 55 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { 56 | /* harmony export */ "default": () => (/* binding */ _taggedTemplateLiteral) 57 | /* harmony export */ }); 58 | function _taggedTemplateLiteral(strings, raw) { 59 | if (!raw) { 60 | raw = strings.slice(0); 61 | } 62 | 63 | return Object.freeze(Object.defineProperties(strings, { 64 | raw: { 65 | value: Object.freeze(raw) 66 | } 67 | })); 68 | } 69 | 70 | /***/ }) 71 | 72 | }]); 73 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjanNfY29tcG9uZW50c19leHRyYV9mN19odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQ0E7O0FBRUEsU0FBU0MsbUJBQVQsQ0FBNkJDLEtBQTdCLFFBRUc7QUFBQSxNQUREQyxTQUNDLFFBRERBLFNBQ0M7O0FBQ0QsTUFBTUMsSUFBSSxHQUFHLFNBQVBBLElBQU8sR0FBTTtBQUNqQkQsSUFBQUEsU0FBUyxDQUFDQyxJQUFWO0FBQ0QsR0FGRDs7QUFJQSxTQUFPLFVBQVVDLElBQVYsRUFBZ0I7QUFDbkIsUUFBSUMsQ0FBQyxHQUFHRCxJQUFJLENBQUNDLENBQWI7QUFDQSxRQUFJQyxFQUFFLEdBQUdGLElBQUksQ0FBQ0UsRUFBZDtBQUNBLFFBQUlDLEtBQUssR0FBR0gsSUFBSSxDQUFDRyxLQUFqQjtBQUNBLFFBQUlDLEdBQUcsR0FBR0osSUFBSSxDQUFDSSxHQUFmO0FBQ0EsUUFBSUMsUUFBUSxHQUFHTCxJQUFJLENBQUNLLFFBQXBCO0FBQ0EsUUFBSVAsU0FBUyxHQUFHRSxJQUFJLENBQUNGLFNBQXJCO0FBQ0EsUUFBSVEsTUFBTSxHQUFHTixJQUFJLENBQUNNLE1BQWxCO0FBQ0EsUUFBSUMsT0FBTyxHQUFHUCxJQUFJLENBQUNPLE9BQW5CO0FBQ0EsUUFBSUMsTUFBTSxHQUFHUixJQUFJLENBQUNRLE1BQWxCO0FBRUEsV0FBT04sRUFBUCw2bkJBYWNILElBYmQ7QUFtQkQsR0E5Qkg7QUFnQ0Q7O0FBRURILG1CQUFtQixDQUFDYSxFQUFwQixHQUF5QixZQUF6QjtBQUNBLGlFQUFlYixtQkFBZjs7Ozs7Ozs7Ozs7Ozs7QUM3Q2UsU0FBU2Msc0JBQVQsQ0FBZ0NDLE9BQWhDLEVBQXlDQyxHQUF6QyxFQUE4QztBQUMzRCxNQUFJLENBQUNBLEdBQUwsRUFBVTtBQUNSQSxJQUFBQSxHQUFHLEdBQUdELE9BQU8sQ0FBQ0UsS0FBUixDQUFjLENBQWQsQ0FBTjtBQUNEOztBQUVELFNBQU9DLE1BQU0sQ0FBQ0MsTUFBUCxDQUFjRCxNQUFNLENBQUNFLGdCQUFQLENBQXdCTCxPQUF4QixFQUFpQztBQUNwREMsSUFBQUEsR0FBRyxFQUFFO0FBQ0hLLE1BQUFBLEtBQUssRUFBRUgsTUFBTSxDQUFDQyxNQUFQLENBQWNILEdBQWQ7QUFESjtBQUQrQyxHQUFqQyxDQUFkLENBQVA7QUFLRCIsInNvdXJjZXMiOlsid2VicGFjazovL3NoaW55RnJhbWV3b3JrNy8uL3NyY2pzL2NvbXBvbmVudHMvZXh0cmEuZjcuaHRtbCIsIndlYnBhY2s6Ly9zaGlueUZyYW1ld29yazcvLi9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vdGFnZ2VkVGVtcGxhdGVMaXRlcmFsLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4ICRqc3ggKi9cbmltcG9ydCB7ICRqc3ggfSBmcm9tICdmcmFtZXdvcms3JztcblxuZnVuY3Rpb24gZnJhbWV3b3JrN0NvbXBvbmVudChwcm9wcywge1xuICAkZjdyb3V0ZXJcbn0pIHtcbiAgY29uc3QgYmFjayA9ICgpID0+IHtcbiAgICAkZjdyb3V0ZXIuYmFjaygpO1xuICB9O1xuXG4gIHJldHVybiBmdW5jdGlvbiAoJGN0eCkge1xuICAgICAgdmFyICQgPSAkY3R4LiQ7XG4gICAgICB2YXIgJGggPSAkY3R4LiRoO1xuICAgICAgdmFyICRyb290ID0gJGN0eC4kcm9vdDtcbiAgICAgIHZhciAkZjcgPSAkY3R4LiRmNztcbiAgICAgIHZhciAkZjdyb3V0ZSA9ICRjdHguJGY3cm91dGU7XG4gICAgICB2YXIgJGY3cm91dGVyID0gJGN0eC4kZjdyb3V0ZXI7XG4gICAgICB2YXIgJHRoZW1lID0gJGN0eC4kdGhlbWU7XG4gICAgICB2YXIgJHVwZGF0ZSA9ICRjdHguJHVwZGF0ZTtcbiAgICAgIHZhciAkc3RvcmUgPSAkY3R4LiRzdG9yZTtcblxuICAgICAgcmV0dXJuICRoYFxuICA8ZGl2IGNsYXNzPVwicGFnZVwiPlxuICAgIDxkaXYgY2xhc3M9XCJuYXZiYXJcIj5cbiAgICAgIDxkaXYgY2xhc3M9XCJuYXZiYXItYmdcIj48L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3M9XCJuYXZiYXItaW5uZXJcIj5cbiAgICAgICAgPGRpdiBjbGFzcz1cInRpdGxlXCI+UHJvdXQ8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICAgIDwhLS0gQm90dG9tIFRvb2xiYXIgLS0+XG4gICAgPGRpdiBjbGFzcz1cInRvb2xiYXIgdG9vbGJhci1ib3R0b21cIj5cbiAgICAgIDxkaXYgY2xhc3M9XCJ0b29sYmFyLWlubmVyXCI+XG4gICAgICAgIDwhLS0gVG9vbGJhciBsaW5rcyAtLT5cbiAgICAgICAgPGE+Tm90aGluZzwvYT5cbiAgICAgICAgPGEgQGNsaWNrPSR7YmFja30gZGF0YS10cmFuc2l0aW9uPVwiZjctY292ZXJcIj5CYWNrPC9hPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gICAgPGRpdiBjbGFzcz1cInBhZ2UtY29udGVudFwiPi4uLjwvZGl2PlxuICA8L2Rpdj5cbmBcbiAgICB9XG4gICAgO1xufVxuXG5mcmFtZXdvcms3Q29tcG9uZW50LmlkID0gJzFlMjFmN2Q1NGMnO1xuZXhwb3J0IGRlZmF1bHQgZnJhbWV3b3JrN0NvbXBvbmVudDsiLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfdGFnZ2VkVGVtcGxhdGVMaXRlcmFsKHN0cmluZ3MsIHJhdykge1xuICBpZiAoIXJhdykge1xuICAgIHJhdyA9IHN0cmluZ3Muc2xpY2UoMCk7XG4gIH1cblxuICByZXR1cm4gT2JqZWN0LmZyZWV6ZShPYmplY3QuZGVmaW5lUHJvcGVydGllcyhzdHJpbmdzLCB7XG4gICAgcmF3OiB7XG4gICAgICB2YWx1ZTogT2JqZWN0LmZyZWV6ZShyYXcpXG4gICAgfVxuICB9KSk7XG59Il0sIm5hbWVzIjpbIiRqc3giLCJmcmFtZXdvcms3Q29tcG9uZW50IiwicHJvcHMiLCIkZjdyb3V0ZXIiLCJiYWNrIiwiJGN0eCIsIiQiLCIkaCIsIiRyb290IiwiJGY3IiwiJGY3cm91dGUiLCIkdGhlbWUiLCIkdXBkYXRlIiwiJHN0b3JlIiwiaWQiLCJfdGFnZ2VkVGVtcGxhdGVMaXRlcmFsIiwic3RyaW5ncyIsInJhdyIsInNsaWNlIiwiT2JqZWN0IiwiZnJlZXplIiwiZGVmaW5lUHJvcGVydGllcyIsInZhbHVlIl0sInNvdXJjZVJvb3QiOiIifQ== -------------------------------------------------------------------------------- /inst/app/www/srcjs_components_extra_f7_jsx.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | (self["webpackChunkshinyFramework7"] = self["webpackChunkshinyFramework7"] || []).push([["srcjs_components_extra_f7_jsx"],{ 3 | 4 | /***/ "./srcjs/components/extra.f7.jsx": 5 | /*!***************************************!*\ 6 | !*** ./srcjs/components/extra.f7.jsx ***! 7 | \***************************************/ 8 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 | 10 | __webpack_require__.r(__webpack_exports__); 11 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { 12 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 13 | /* harmony export */ }); 14 | /* harmony import */ var framework7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framework7 */ "./node_modules/framework7/esm/modules/component/$jsx.js"); 15 | /** @jsx $jsx */ 16 | 17 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (props, _ref) { 18 | var $f7router = _ref.$f7router; 19 | 20 | var back = function back() { 21 | $f7router.back(); 22 | }; 23 | 24 | return function () { 25 | return (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 26 | "class": "page" 27 | }, (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 28 | "class": "navbar" 29 | }, (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 30 | "class": "navbar-bg" 31 | }), (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 32 | "class": "navbar-inner" 33 | }, (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 34 | "class": "title" 35 | }, "Prout"))), (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 36 | "class": "toolbar toolbar-bottom" 37 | }, (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 38 | "class": "toolbar-inner" 39 | }, (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("a", null, "Nothing"), (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("a", { 40 | onClick: function onClick() { 41 | return back(); 42 | }, 43 | "data-transition": "f7-cover" 44 | }, "Back"))), (0,framework7__WEBPACK_IMPORTED_MODULE_0__.default)("div", { 45 | "class": "page-content" 46 | }, "...")); 47 | }; 48 | }); 49 | 50 | /***/ }) 51 | 52 | }]); 53 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjanNfY29tcG9uZW50c19leHRyYV9mN19qc3guanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0EsaUVBQWUsdUJBQTBCO0FBQUEsTUFBaEJBLFNBQWdCLFFBQWhCQSxTQUFnQjs7QUFDdkMsTUFBTUMsSUFBSSxHQUFHLFNBQVBBLElBQU8sR0FBTTtBQUNqQkQsSUFBQUEsU0FBUyxDQUFUQSxJQUFBQTtBQURGOztBQUlBLFNBQU87QUFBQSxXQUNMO0FBQUssZUFBTTtBQUFYLE9BQ0U7QUFBSyxlQUFNO0FBQVgsT0FDRTtBQUFLLGVBQU07QUFBWCxNQURGLEVBRUU7QUFBSyxlQUFNO0FBQVgsT0FDRTtBQUFLLGVBQU07QUFBWCxPQUpOLE9BSU0sQ0FERixDQUZGLENBREYsRUFPRTtBQUFLLGVBQU07QUFBWCxPQUNFO0FBQUssZUFBTTtBQUFYLE9BQ0UsK0RBREYsU0FDRSxDQURGLEVBRUU7QUFBRyxhQUFPLEVBQUU7QUFBQSxlQUFNQyxJQUFOO0FBQVo7QUFBMEIseUJBQWdCO0FBQTFDLE9BVk4sTUFVTSxDQUZGLENBREYsQ0FQRixFQWFFO0FBQUssZUFBTTtBQUFYLE9BZEcsS0FjSCxDQWJGLENBREs7QUFBUDtBQUxGIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vc2hpbnlGcmFtZXdvcms3Ly4vc3JjanMvY29tcG9uZW50cy9leHRyYS5mNy5qc3giXSwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3ggJGpzeCAqL1xuaW1wb3J0IHsgJGpzeCB9IGZyb20gJ2ZyYW1ld29yazcnO1xuZXhwb3J0IGRlZmF1bHQgKHByb3BzLCB7ICRmN3JvdXRlciB9KSA9PiB7XG4gIGNvbnN0IGJhY2sgPSAoKSA9PiB7XG4gICAgJGY3cm91dGVyLmJhY2soKTtcbiAgfVxuXG4gIHJldHVybiAoKSA9PiAoXG4gICAgPGRpdiBjbGFzcz1cInBhZ2VcIj5cbiAgICAgIDxkaXYgY2xhc3M9XCJuYXZiYXJcIj5cbiAgICAgICAgPGRpdiBjbGFzcz1cIm5hdmJhci1iZ1wiPjwvZGl2PlxuICAgICAgICA8ZGl2IGNsYXNzPVwibmF2YmFyLWlubmVyXCI+XG4gICAgICAgICAgPGRpdiBjbGFzcz1cInRpdGxlXCI+UHJvdXQ8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3M9XCJ0b29sYmFyIHRvb2xiYXItYm90dG9tXCI+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJ0b29sYmFyLWlubmVyXCI+XG4gICAgICAgICAgPGE+Tm90aGluZzwvYT5cbiAgICAgICAgICA8YSBvbkNsaWNrPXsoKSA9PiBiYWNrKCl9IGRhdGEtdHJhbnNpdGlvbj1cImY3LWNvdmVyXCI+QmFjazwvYT5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3M9XCJwYWdlLWNvbnRlbnRcIj4uLi48L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5cbiJdLCJuYW1lcyI6WyIkZjdyb3V0ZXIiLCJiYWNrIl0sInNvdXJjZVJvb3QiOiIifQ== -------------------------------------------------------------------------------- /inst/golem-config.yml: -------------------------------------------------------------------------------- 1 | default: 2 | golem_name: shinyComponent 3 | golem_version: 0.0.0.9000 4 | app_prod: no 5 | production: 6 | app_prod: yes 7 | dev: 8 | golem_wd: /Users/granjda1/Desktop/test/shinyFramework7 9 | -------------------------------------------------------------------------------- /jsdoc.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "opts" : { 3 | "destination": "./jsdoc" 4 | }, 5 | "source": { 6 | "include": "srcjs/", 7 | "exclude": "/node_modules", 8 | "includePattern": ".+\\.js(doc|x)?$" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /jsdoc/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/jsdoc/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /jsdoc/global.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Global 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | 20 |

    Global

    21 | 22 | 23 | 24 | 25 | 26 | 27 |
    28 | 29 |
    30 | 31 |

    32 | 33 | 34 |
    35 | 36 |
    37 |
    38 | 39 | 40 | 41 | 42 | 43 | 44 |
    45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
    78 | 79 | 80 | 81 | 82 |
    83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |

    Members

    98 | 99 | 100 | 101 |

    (constant) fn

    102 | 103 | 104 | 105 | 106 |
    107 | Adds 1 to a number. 108 |
    109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 |
    117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 |
    Source:
    144 |
    147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 |
    155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 |
    170 | 171 |
    172 | 173 | 174 | 175 | 176 |
    177 | 178 | 181 | 182 |
    183 | 184 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /jsdoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Home 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | 20 |

    Home

    21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |

    30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
    51 | 52 | 55 | 56 |
    57 | 58 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /jsdoc/index.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JSDoc: Source: index.js 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | 20 |

    Source: index.js

    21 | 22 | 23 | 24 | 25 | 26 | 27 |
    28 |
    29 |
    import 'shiny';
    30 | // Import Framework7
    31 | import Framework7 from 'framework7';
    32 | // Import Framework7 Styles
    33 | import 'framework7/framework7-bundle.min.css';
    34 | 
    35 | // Install F7 Components using .use() method on class:
    36 | import Dialog from 'framework7/esm/components/dialog/dialog.js';
    37 | import Range from 'framework7/esm/components/range/range.js';
    38 | import Gauge from 'framework7/esm/components/gauge/gauge.js';
    39 | import Panel from 'framework7/esm/components/panel/panel.js';
    40 | import Toast from 'framework7/esm/components/toast/toast.js';
    41 | Framework7.use([Dialog, Range, Panel, Gauge, Toast]);
    42 | 
    43 | // Import App component
    44 | import App from './components/app.f7.jsx';
    45 | 
    46 | // Import other routes
    47 | import routes from './modules/routes.js';
    48 | 
    49 | // Initialize app
    50 | var app = new Framework7({
    51 |   el: '#app',
    52 |   theme: 'ios',
    53 |   // specify main app component
    54 |   routes: routes,
    55 |   component: App
    56 | });
    57 | 
    58 | 
    59 | // REMOVE THIS
    60 | 
    61 | /**
    62 |  * Adds 1 to a number.
    63 |  * 
    64 |  * @param  {Number} x Number to add one to
    65 |  */
    66 | export const fn = (x) => {
    67 |   return x + 1;
    68 | } 
    69 | 
    70 |
    71 |
    72 | 73 | 74 | 75 | 76 |
    77 | 78 | 81 | 82 |
    83 | 84 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /jsdoc/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (() => { 3 | const source = document.getElementsByClassName('prettyprint source linenums'); 4 | let i = 0; 5 | let lineNumber = 0; 6 | let lineId; 7 | let lines; 8 | let totalLines; 9 | let anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = `line${lineNumber}`; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /jsdoc/scripts/prettify/Apache-License-2.0.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /jsdoc/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /jsdoc/scripts/prettify/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p th:last-child { border-right: 1px solid #ddd; } 224 | 225 | .ancestors, .attribs { color: #999; } 226 | .ancestors a, .attribs a 227 | { 228 | color: #999 !important; 229 | text-decoration: none; 230 | } 231 | 232 | .clear 233 | { 234 | clear: both; 235 | } 236 | 237 | .important 238 | { 239 | font-weight: bold; 240 | color: #950B02; 241 | } 242 | 243 | .yes-def { 244 | text-indent: -1000px; 245 | } 246 | 247 | .type-signature { 248 | color: #aaa; 249 | } 250 | 251 | .name, .signature { 252 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 253 | } 254 | 255 | .details { margin-top: 14px; border-left: 2px solid #DDD; } 256 | .details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } 257 | .details dd { margin-left: 70px; } 258 | .details ul { margin: 0; } 259 | .details ul { list-style-type: none; } 260 | .details li { margin-left: 30px; padding-top: 6px; } 261 | .details pre.prettyprint { margin: 0 } 262 | .details .object-value { padding-top: 0; } 263 | 264 | .description { 265 | margin-bottom: 1em; 266 | margin-top: 1em; 267 | } 268 | 269 | .code-caption 270 | { 271 | font-style: italic; 272 | font-size: 107%; 273 | margin: 0; 274 | } 275 | 276 | .source 277 | { 278 | border: 1px solid #ddd; 279 | width: 80%; 280 | overflow: auto; 281 | } 282 | 283 | .prettyprint.source { 284 | width: inherit; 285 | } 286 | 287 | .source code 288 | { 289 | font-size: 100%; 290 | line-height: 18px; 291 | display: block; 292 | padding: 4px 12px; 293 | margin: 0; 294 | background-color: #fff; 295 | color: #4D4E53; 296 | } 297 | 298 | .prettyprint code span.line 299 | { 300 | display: inline-block; 301 | } 302 | 303 | .prettyprint.linenums 304 | { 305 | padding-left: 70px; 306 | -webkit-user-select: none; 307 | -moz-user-select: none; 308 | -ms-user-select: none; 309 | user-select: none; 310 | } 311 | 312 | .prettyprint.linenums ol 313 | { 314 | padding-left: 0; 315 | } 316 | 317 | .prettyprint.linenums li 318 | { 319 | border-left: 3px #ddd solid; 320 | } 321 | 322 | .prettyprint.linenums li.selected, 323 | .prettyprint.linenums li.selected * 324 | { 325 | background-color: lightyellow; 326 | } 327 | 328 | .prettyprint.linenums li * 329 | { 330 | -webkit-user-select: text; 331 | -moz-user-select: text; 332 | -ms-user-select: text; 333 | user-select: text; 334 | } 335 | 336 | .params .name, .props .name, .name code { 337 | color: #4D4E53; 338 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 339 | font-size: 100%; 340 | } 341 | 342 | .params td.description > p:first-child, 343 | .props td.description > p:first-child 344 | { 345 | margin-top: 0; 346 | padding-top: 0; 347 | } 348 | 349 | .params td.description > p:last-child, 350 | .props td.description > p:last-child 351 | { 352 | margin-bottom: 0; 353 | padding-bottom: 0; 354 | } 355 | 356 | .disabled { 357 | color: #454545; 358 | } 359 | -------------------------------------------------------------------------------- /jsdoc/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: #006400; 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /jsdoc/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #718c00; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #8959a8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #8e908c; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #4271ae; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #f5871f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #4d4d4c; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #4d4d4c; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #4d4d4c; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /man/figures/README-pressure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/man/figures/README-pressure-1.png -------------------------------------------------------------------------------- /man/run_app.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/run_app.R 3 | \name{run_app} 4 | \alias{run_app} 5 | \title{Run the Shiny Application} 6 | \usage{ 7 | run_app( 8 | onStart = NULL, 9 | options = list(), 10 | enableBookmarking = NULL, 11 | uiPattern = "/", 12 | ... 13 | ) 14 | } 15 | \arguments{ 16 | \item{onStart}{A function that will be called before the app is actually run. 17 | This is only needed for \code{shinyAppObj}, since in the \code{shinyAppDir} 18 | case, a \code{global.R} file can be used for this purpose.} 19 | 20 | \item{options}{Named options that should be passed to the \code{runApp} call 21 | (these can be any of the following: "port", "launch.browser", "host", "quiet", 22 | "display.mode" and "test.mode"). You can also specify \code{width} and 23 | \code{height} parameters which provide a hint to the embedding environment 24 | about the ideal height/width for the app.} 25 | 26 | \item{enableBookmarking}{Can be one of \code{"url"}, \code{"server"}, or 27 | \code{"disable"}. The default value, \code{NULL}, will respect the setting from 28 | any previous calls to \code{\link[shiny:enableBookmarking]{enableBookmarking()}}. See \code{\link[shiny:enableBookmarking]{enableBookmarking()}} 29 | for more information on bookmarking your app.} 30 | 31 | \item{uiPattern}{A regular expression that will be applied to each \code{GET} 32 | request to determine whether the \code{ui} should be used to handle the 33 | request. Note that the entire request path must match the regular 34 | expression in order for the match to be considered successful.} 35 | 36 | \item{...}{arguments to pass to golem_opts. 37 | See `?golem::get_golem_options` for more details.} 38 | } 39 | \description{ 40 | Run the Shiny Application 41 | } 42 | -------------------------------------------------------------------------------- /man/solve_model.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/models.R 3 | \name{solve_model} 4 | \alias{solve_model} 5 | \title{Solve 2D ODE model} 6 | \usage{ 7 | solve_model(Y0, t, model, parms) 8 | } 9 | \description{ 10 | Leverage deSolve package 11 | } 12 | \keyword{internal} 13 | -------------------------------------------------------------------------------- /man/vdp.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/models.R 3 | \name{vdp} 4 | \alias{vdp} 5 | \title{Brusselator model example} 6 | \usage{ 7 | vdp(t, y, p) 8 | } 9 | \description{ 10 | 2D ODE model 11 | } 12 | \keyword{internal} 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shinyFramework7", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "directories": { 7 | "man": "man" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "none": "webpack --config webpack.dev.js --mode=none", 12 | "development": "webpack --config webpack.dev.js", 13 | "production": "webpack --config webpack.prod.js", 14 | "watch": "webpack --config webpack.config.js -d --watch" 15 | }, 16 | "keywords": [], 17 | "author": "", 18 | "license": "ISC", 19 | "devDependencies": { 20 | "@babel/core": "^7.15.0", 21 | "@babel/preset-env": "^7.15.0", 22 | "@babel/preset-react": "^7.14.5", 23 | "babel": "^6.23.0", 24 | "babel-loader": "^8.2.2", 25 | "css-loader": "^6.2.0", 26 | "framework7-loader": "^3.0.2", 27 | "html-loader": "^2.1.2", 28 | "jsdoc": "^3.6.7", 29 | "jsdoc-webpack-plugin": "^0.3.0", 30 | "style-loader": "^3.2.1", 31 | "webpack": "^5.51.1", 32 | "webpack-cli": "^4.8.0", 33 | "webpack-merge": "^5.8.0" 34 | }, 35 | "dependencies": { 36 | "echarts": "^5.1.2", 37 | "echarts-gl": "^2.0.8", 38 | "framework7": "^6.3.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /shinyComponent.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: XeLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | PackageRoxygenize: rd,collate,namespace 22 | -------------------------------------------------------------------------------- /srcjs/components/app.f7.html: -------------------------------------------------------------------------------- 1 | 2 | 46 | 47 | 88 | -------------------------------------------------------------------------------- /srcjs/components/app.f7.jsx: -------------------------------------------------------------------------------- 1 | import ListItem from './custom-list.f7.jsx'; 2 | import { VdpWidget, initializeVdpWidget } from './vdp.f7.jsx'; 3 | 4 | export default (props, {$, $f7, $f7ready, $on, $update }) => { 5 | const title = 'Hello World'; 6 | let names = ['John', 'Vladimir', 'Timo']; 7 | 8 | Shiny.addCustomMessageHandler('init', function(message) { 9 | names = message; 10 | $update(); 11 | }); 12 | 13 | // App events callback 14 | $on('click', () => { 15 | // callback 16 | }); 17 | 18 | // This method need to be used only when you use Main App Component 19 | // to make sure to call Framework7 APIs when app initialized. 20 | $f7ready(() => { 21 | // do stuff 22 | console.log('Hello'); 23 | }); 24 | 25 | const openAlert = () => { 26 | $f7.dialog.alert(title, function() { 27 | // ok button callback 28 | Shiny.setInputValue('alert_opened', false); 29 | }); 30 | Shiny.setInputValue('alert_opened', true); 31 | Shiny.setInputValue( 32 | 'alert', 33 | { 34 | message: 'Alert dialog was triggered!', 35 | title: title, 36 | }, 37 | {priority: 'event'} 38 | ); 39 | } 40 | 41 | const openPanel = () => { 42 | $f7.panel.open('.panel-left'); 43 | } 44 | 45 | initializeVdpWidget($f7); 46 | 47 | return () => ( 48 |
    49 |
    50 |
    "Hello"
    51 |
    52 |
    53 |
    54 | 60 |
    61 | 66 |
    67 |
    68 | 69 |
      70 | 71 | 72 | 73 |
    74 |
    75 |
      76 | {names.map((name) => 77 |
    • {name}
    • 78 | )} 79 |
    80 |
    81 |
    82 |
    83 |
    84 |
    85 | ) 86 | } 87 | 88 | 89 | -------------------------------------------------------------------------------- /srcjs/components/custom-list.f7.jsx: -------------------------------------------------------------------------------- 1 | const ListItem = (props) => { 2 | return () =>
  • {props.title}
  • ; 3 | } 4 | 5 | export default ListItem 6 | -------------------------------------------------------------------------------- /srcjs/components/extra.f7.html: -------------------------------------------------------------------------------- 1 | 20 | 29 | -------------------------------------------------------------------------------- /srcjs/components/extra.f7.jsx: -------------------------------------------------------------------------------- 1 | import { Widget, initializeWidget } from './widget.f7.jsx'; 2 | 3 | export default (props, { $, $f7, $f7router, $onMounted, $update }) => { 4 | const back = () => { 5 | $f7router.back(); 6 | } 7 | 8 | initializeWidget('customWidget', $onMounted, $f7, $update); 9 | 10 | return () => ( 11 |
    12 | 18 | 24 |
    25 | 26 |
    27 |
    28 | ) 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /srcjs/components/vdp.f7.jsx: -------------------------------------------------------------------------------- 1 | // Import plotting library 2 | import * as echarts from 'echarts'; 3 | import 'echarts-gl'; 4 | 5 | const VdpWidget = (props, { $f7, $update}) => { 6 | 7 | // Handle range change for ODE model computation 8 | const getRangeValue = (e) => { 9 | const range = $f7.range.get(e.target); 10 | Shiny.setInputValue(range.el.id, range.value); 11 | $update(); 12 | }; 13 | 14 | return () => ( 15 |
    16 |
    {props.label}
    17 |
    18 |

    The below model is computed by R. R receives the slider value, solves the system and returns 19 | data as JSON. JS creates the chart with echartsJS and provided data. 20 |

    21 |
    Parameter value (mu)
    22 |
    23 |
    getRangeValue(e)} 34 | >
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 |
    46 | ) 47 | } 48 | 49 | const initializeVdpWidget = (app) => { 50 | let linePlot, phasePlot; 51 | $(document).on('shiny:connected', () => { 52 | // Init vals for ODE model computation 53 | Shiny.setInputValue( 54 | 'mu', 55 | parseFloat($('#mu').attr('data-value'), 10), 56 | {priority: 'event'} 57 | ); 58 | // prepare echarts plot 59 | linePlot = echarts.init(document.getElementById('line-plot')); 60 | phasePlot = echarts.init(document.getElementById('phase-plot')); 61 | }); 62 | 63 | // Recover ODE data from R 64 | let lineData, phaseData, trajectoryData, linePlotOptions, phasePlotOptions; 65 | 66 | Shiny.addCustomMessageHandler( 67 | 'model-data', (message) => { 68 | lineData = message.lineData; 69 | phaseData = message.phaseData; 70 | trajectoryData = message.trajectoryData; 71 | 72 | linePlotOptions = { 73 | title: { 74 | text: 'Van der Pol oscillator: line plot' 75 | }, 76 | tooltip: {}, 77 | legend: { 78 | data:['X', 'Y'] 79 | }, 80 | xAxis: { 81 | data: lineData['t'] 82 | }, 83 | yAxis: { 84 | type: 'value' 85 | }, 86 | series: [ 87 | { 88 | name: 'X', 89 | type: 'line', 90 | data: lineData['X'] 91 | }, 92 | { 93 | name: 'Y', 94 | type: 'line', 95 | data: lineData['Y'] 96 | } 97 | ] 98 | }; 99 | 100 | phasePlotOptions = { 101 | title: { 102 | text: 'Van der Pol oscillator: phase plot' 103 | }, 104 | visualMap: { 105 | show: false, 106 | min: 0, 107 | max: 8, 108 | dimension: 4, 109 | inRange: { 110 | color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026'] 111 | } 112 | }, 113 | xAxis: { 114 | type: 'value', 115 | axisLine: { 116 | lineStyle: { 117 | color: '#fff' 118 | } 119 | }, 120 | splitLine: { 121 | show: false, 122 | lineStyle: { 123 | color: 'rgba(255,255,255,0.2)' 124 | } 125 | } 126 | }, 127 | yAxis: { 128 | type: 'value', 129 | axisLine: { 130 | lineStyle: { 131 | color: '#fff' 132 | } 133 | }, 134 | splitLine: { 135 | show: false, 136 | lineStyle: { 137 | color: 'rgba(255,255,255,0.2)' 138 | } 139 | } 140 | }, 141 | series: [ 142 | { 143 | type: 'flowGL', 144 | data: phaseData, 145 | particleDensity: 64, 146 | particleSize: 5, 147 | particleSpeed: 4, 148 | supersampling: 4, 149 | particleType: 'point', 150 | itemStyle: { 151 | opacity: 0.5 152 | } 153 | }, 154 | { 155 | type: 'line', 156 | data: trajectoryData, 157 | symbol: 'none' 158 | } 159 | ] 160 | }; 161 | 162 | // use configuration item and data specified to show chart 163 | linePlot.setOption(linePlotOptions); 164 | phasePlot.setOption(phasePlotOptions); 165 | 166 | // Notify plot update 167 | app.toast.create({ 168 | text: 'Model successfuly computed', 169 | closeTimeout: 2000, 170 | }).open(); 171 | 172 | }); 173 | } 174 | 175 | export { VdpWidget, initializeVdpWidget }; -------------------------------------------------------------------------------- /srcjs/components/widget.f7.jsx: -------------------------------------------------------------------------------- 1 | const Widget = (props) => { 2 | 3 | return () => ( 4 |
    5 |
    {props.label}
    6 |
    7 |

    Move me!

    8 |
    9 |

    10 |
    11 |
    12 |
    13 | ) 14 | } 15 | 16 | // This method has to be called inside the parent component 17 | // Cannot be called inside widget 18 | const initializeWidget = (id, event, app, refresh) => { 19 | let gaugeEl, sliderEl; 20 | 21 | event(() => { 22 | // Init gauge el 23 | gaugeEl = app.gauge.create({ 24 | el: '#' + id + '_gauge', 25 | type: 'circle', 26 | value: 0.5, 27 | size: 250, 28 | borderColor: '#2196f3', 29 | borderWidth: 10, 30 | valueText: '50%', 31 | valueFontSize: 41, 32 | valueTextColor: '#2196f3' 33 | }); 34 | 35 | // access range instance to get value 36 | // and update gauge on drag 37 | const sliderId = id + '_range'; 38 | sliderEl = app.range.create({ 39 | el: '#' + sliderId, 40 | min: 0, 41 | max: 100, 42 | value: 50, 43 | scale: true, 44 | on: { 45 | changed: function(_range, value) { 46 | gaugeEl.update({ 47 | value: value / 100, 48 | valueText: value + '%' 49 | }); 50 | Shiny.setInputValue(sliderId, value); 51 | refresh(); 52 | } 53 | } 54 | }); 55 | }); 56 | } 57 | 58 | export { Widget, initializeWidget}; -------------------------------------------------------------------------------- /srcjs/config/entry_points.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "./srcjs/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /srcjs/config/externals.json: -------------------------------------------------------------------------------- 1 | { 2 | "shiny": "Shiny", 3 | "jquery": "jQuery" 4 | } 5 | -------------------------------------------------------------------------------- /srcjs/config/loaders.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "test": "\\.(js|jsx)$", 4 | "use": [ 5 | "babel-loader" 6 | ], 7 | "exclude": "/node_modules/" 8 | }, 9 | { 10 | "test": "\\.f7.(html|js|jsx)$", 11 | "use": [ 12 | "babel-loader", 13 | "framework7-loader" 14 | ] 15 | }, 16 | { 17 | "test": "\\.html$/i", 18 | "use": [ 19 | "html-loader" 20 | ] 21 | }, 22 | { 23 | "test": "\\.css$", 24 | "use": [ 25 | "style-loader", 26 | "css-loader" 27 | ] 28 | } 29 | ] 30 | -------------------------------------------------------------------------------- /srcjs/config/misc.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /srcjs/config/output_path.json: -------------------------------------------------------------------------------- 1 | "./inst/app/www" 2 | -------------------------------------------------------------------------------- /srcjs/index.js: -------------------------------------------------------------------------------- 1 | import 'shiny'; 2 | // Import Framework7 3 | import Framework7 from 'framework7'; 4 | // Import Framework7 Styles 5 | import 'framework7/framework7-bundle.min.css'; 6 | 7 | // Install F7 Components using .use() method on class: 8 | import Dialog from 'framework7/esm/components/dialog/dialog.js'; 9 | import Range from 'framework7/esm/components/range/range.js'; 10 | import Gauge from 'framework7/esm/components/gauge/gauge.js'; 11 | import Panel from 'framework7/esm/components/panel/panel.js'; 12 | import Toast from 'framework7/esm/components/toast/toast.js'; 13 | Framework7.use([Dialog, Range, Panel, Gauge, Toast]); 14 | 15 | // Import App component 16 | import App from './components/app.f7.jsx'; 17 | 18 | // Import other routes 19 | import routes from './modules/routes.js'; 20 | 21 | // Initialize app 22 | var app = new Framework7({ 23 | el: '#app', 24 | theme: 'ios', 25 | // specify main app component 26 | routes: routes, 27 | component: App 28 | }); 29 | 30 | 31 | // REMOVE THIS 32 | 33 | /** 34 | * Adds 1 to a number. 35 | * 36 | * @param {Number} x Number to add one to 37 | */ 38 | export const fn = (x) => { 39 | return x + 1; 40 | } 41 | -------------------------------------------------------------------------------- /srcjs/modules/routes.js: -------------------------------------------------------------------------------- 1 | import Extra from '../components/extra.f7.jsx'; 2 | 3 | export default [ 4 | { 5 | path: '/' 6 | }, 7 | { 8 | path: '/extra/', 9 | component: Extra 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /tests/spelling.R: -------------------------------------------------------------------------------- 1 | if(requireNamespace('spelling', quietly = TRUE)) 2 | spelling::spell_check_test(vignettes = TRUE, error = FALSE, 3 | skip_on_cran = TRUE) 4 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(shinyComponent) 3 | 4 | test_check("shinyComponent") 5 | -------------------------------------------------------------------------------- /tests/testthat/test-golem-recommended.R: -------------------------------------------------------------------------------- 1 | test_that("app ui", { 2 | ui <- app_ui() 3 | golem::expect_shinytaglist(ui) 4 | # Check that formals have not been removed 5 | fmls <- formals(app_ui) 6 | for (i in c("request")){ 7 | expect_true(i %in% names(fmls)) 8 | } 9 | }) 10 | 11 | test_that("app server", { 12 | server <- app_server 13 | expect_is(server, "function") 14 | # Check that formals have not been removed 15 | fmls <- formals(app_server) 16 | for (i in c("input", "output", "session")){ 17 | expect_true(i %in% names(fmls)) 18 | } 19 | }) 20 | 21 | # Configure this test to fit your need 22 | test_that( 23 | "app launches",{ 24 | golem::expect_running(sleep = 5) 25 | } 26 | ) 27 | -------------------------------------------------------------------------------- /tutorials/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RinteRface/shinyComponent/f55db32f3e97119ab68ed94f5b161232e1837170/tutorials/.gitkeep -------------------------------------------------------------------------------- /webpack.common.js: -------------------------------------------------------------------------------- 1 | const JsDocPlugin = require('jsdoc-webpack-plugin'); 2 | const path = require('path'); 3 | const fs = require('fs'); 4 | 5 | // Read config files 6 | var outputPath = fs.readFileSync('./srcjs/config/output_path.json'); 7 | var entryPoints = fs.readFileSync('./srcjs/config/entry_points.json'); 8 | var externals = fs.readFileSync('./srcjs/config/externals.json'); 9 | var misc = fs.readFileSync('./srcjs/config/misc.json'); 10 | var loaders = fs.readFileSync('./srcjs/config/loaders.json', 'utf8'); 11 | 12 | // parse 13 | loaders = JSON.parse(loaders); 14 | misc = JSON.parse(misc); 15 | externals = JSON.parse(externals); 16 | entryPoints = JSON.parse(entryPoints); 17 | 18 | // parse regex 19 | loaders.forEach((loader) => { 20 | loader.test = RegExp(loader.test); 21 | return(loader); 22 | }) 23 | 24 | // placeholder for plugins 25 | var plugins = [ 26 | new JsDocPlugin({conf: 'jsdoc.conf.json', cwd: '.', preserveTmpFile: false, recursive: true}), 27 | ] 28 | 29 | // define options 30 | var options = { 31 | entry: entryPoints, 32 | output: { 33 | filename: '[name].js', 34 | path: path.resolve(__dirname, JSON.parse(outputPath)), 35 | }, 36 | externals: externals, 37 | module: { 38 | rules: loaders 39 | }, 40 | plugins: plugins 41 | }; 42 | 43 | // add misc 44 | if(misc.resolve) 45 | options.resolve = misc.resolve; 46 | 47 | // export 48 | module.exports = options; 49 | -------------------------------------------------------------------------------- /webpack.dev.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'development', 6 | devtool: 'inline-source-map' 7 | }); 8 | -------------------------------------------------------------------------------- /webpack.prod.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'production', 6 | }); 7 | --------------------------------------------------------------------------------