-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'f7-v8.3.2' of github.com:RinteRface/shinyMobile into f7…
…-v8.3.2
- Loading branch information
Showing
14 changed files
with
270 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ docs | |
inst/examples/chat_widget | ||
inst/tests/** | ||
node_modules | ||
_.new.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
library(shiny) | ||
library(shinyMobile) | ||
|
||
app <- shinyApp( | ||
ui = f7Page( | ||
title = "Validate inputs", | ||
f7SingleLayout( | ||
navbar = f7Navbar(title = "validateF7Input"), | ||
f7Text( | ||
inputId = "caption", | ||
label = "Caption", | ||
value = "Data Summary" | ||
), | ||
verbatimTextOutput("value"), | ||
hr(), | ||
f7Text( | ||
inputId = "caption2", | ||
label = "Enter a number", | ||
value = 1 | ||
), | ||
hr(), | ||
f7Password( | ||
inputId = "password", | ||
label = "Password" | ||
) | ||
) | ||
), | ||
server = function(input, output, session) { | ||
|
||
observe({ | ||
validateF7Input(inputId = "caption", info = "Whatever") | ||
validateF7Input( | ||
inputId = "caption2", | ||
pattern = "[0-9]*", | ||
error = "Only numbers please!" | ||
) | ||
validateF7Input( | ||
inputId = "password", | ||
pattern = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{8,}$", | ||
error = "Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" | ||
) | ||
}) | ||
|
||
output$value <- renderPrint({ | ||
input$caption | ||
}) | ||
} | ||
) | ||
|
||
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
tests/testthat/_snaps/mac-4.3/f7ColorPicker/colorpicker-app-001.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"input": { | ||
"mycolorpicker": { | ||
"hex": "#ff0000", | ||
"alpha": 1, | ||
"hue": 0, | ||
"rgb": [ | ||
255, | ||
0, | ||
0 | ||
], | ||
"hsl": [ | ||
0, | ||
1, | ||
0.5 | ||
], | ||
"hsb": [ | ||
0, | ||
1, | ||
1 | ||
], | ||
"rgba": [ | ||
255, | ||
0, | ||
0, | ||
1 | ||
], | ||
"hsla": [ | ||
0, | ||
1, | ||
0.5, | ||
1 | ||
] | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.