Skip to content

Commit 775c33a

Browse files
committed
Do not clutter public documentation with internal functions
@Keywords internal
1 parent 407dfc9 commit 775c33a

64 files changed

Lines changed: 111 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

editbl/DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: editbl
22
Type: Package
3-
Version: 1.3.0
3+
Version: 1.3.1
44
Date: 2025-04-23
55
Title: 'DT' Extension for CRUD (Create, Read, Update, Delete) Applications in 'shiny'
66
Authors@R: c(person("Jasper", "Schelfhout", "", "jasper.schelfhout@openanalytics.eu",

editbl/R/demoApp.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ runDemoApp <- function(app = "database", ...){
4040
#' Run a demo app
4141
#' @importFrom shiny shinyApp
4242
#' @inherit shiny::shinyApp return
43+
#' @keywords internal
4344
runDemoApp_DB <- function(){
4445
tmpFile <- tempfile(fileext = ".sqlite")
4546
file.copy(system.file("extdata", "chinook.sqlite", package = 'editbl'), tmpFile)
@@ -55,6 +56,7 @@ runDemoApp_DB <- function(){
5556
#' Run a demo app
5657
#' @importFrom shiny shinyApp
5758
#' @inherit shiny::shinyApp return
59+
#' @keywords internal
5860
runDemoApp_mtcars <- function(){
5961
ui <- demoUI_mtcars(id = "app")
6062
server <- function(input, output, session) {
@@ -67,6 +69,7 @@ runDemoApp_mtcars <- function(){
6769
#' @param x `tbl`
6870
#' @importFrom shiny shinyApp
6971
#' @inherit shiny::shinyApp return
72+
#' @keywords internal
7073
runDemoApp_custom <- function(x){
7174
ui <- demoUI_custom(id = "app")
7275
server <- function(input, output, session) {
@@ -82,6 +85,7 @@ runDemoApp_custom <- function(x){
8285
#' @return HTML
8386
#'
8487
#' @author Jasper Schelfhout
88+
#' @keywords internal
8589
demoUI_DB <- function(id, conn) {
8690
ns <- NS(id)
8791
tagList(
@@ -100,6 +104,7 @@ demoUI_DB <- function(id, conn) {
100104
#' @importFrom dplyr tbl
101105
#' @return NULL, just executes the module server.
102106
#' @author Jasper Schelfhout
107+
#' @keywords internal
103108
demoServer_DB <- function(id, conn) {
104109
moduleServer(
105110
id,
@@ -125,6 +130,7 @@ demoServer_DB <- function(id, conn) {
125130
#' @return HTML
126131
#'
127132
#' @author Jasper Schelfhout
133+
#' @keywords internal
128134
demoUI_mtcars <- function(id) {
129135
demoUI_custom(id)
130136
}
@@ -134,6 +140,7 @@ demoUI_mtcars <- function(id) {
134140
#' @importFrom dplyr tibble
135141
#' @inherit demoServer_custom return
136142
#' @author Jasper Schelfhout
143+
#' @keywords internal
137144
demoServer_mtcars <- function(id) {
138145
demoServer_custom(id, dplyr::tibble(datasets::mtcars))
139146
}
@@ -144,6 +151,7 @@ demoServer_mtcars <- function(id) {
144151
#' @return HTML
145152
#'
146153
#' @author Jasper Schelfhout
154+
#' @keywords internal
147155
demoUI_custom <- function(id) {
148156
ns <- NS(id)
149157
tagList(
@@ -156,6 +164,7 @@ demoUI_custom <- function(id) {
156164
#' @param x `tbl`
157165
#' @return NULL, just executes the module server.
158166
#' @author Jasper Schelfhout
167+
#' @keywords internal
159168
demoServer_custom <- function(id, x) {
160169
moduleServer(
161170
id,

editbl/R/devApp.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#'
55
#' @importFrom shiny shinyApp
66
#' @inherit shiny::shinyApp return
7+
#' @keywords internal
78
runDevApp <- function(){
89
conn <- connectDB()
910
ui <- devUI(id = "app", conn = conn)
@@ -20,6 +21,7 @@ runDevApp <- function(){
2021
#' @return HTML
2122
#'
2223
#' @author Jasper Schelfhout
24+
#' @keywords internal
2325
devUI <- function(id, conn) {
2426
ns <- NS(id)
2527
tagList(
@@ -40,6 +42,7 @@ devUI <- function(id, conn) {
4042
#' @importFrom dplyr tbl
4143
#' @return NULL, just executes the module server.
4244
#' @author Jasper Schelfhout
45+
#' @keywords internal
4346
devServer <- function(id, conn) {
4447
moduleServer(
4548
id,

editbl/R/eDT.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,7 @@ eDTServer <- function(
13041304
#' @return `boolean`
13051305
#'
13061306
#' @author Jasper Schelfhout
1307+
#' @keywords internal
13071308
evalCanDeleteRow <- function(
13081309
row,
13091310
canDeleteRow = TRUE,
@@ -1343,6 +1344,7 @@ evalCanDeleteRow <- function(
13431344
#' @return `boolean`
13441345
#'
13451346
#' @author Jasper Schelfhout
1347+
#' @keywords internal
13461348
evalCanEditRow <- function(row, canEditRow = TRUE, statusCol='_editbl_status'){
13471349

13481350
# Prevent evaluating logic and speed up for most common use-case
@@ -1380,6 +1382,7 @@ evalCanEditRow <- function(row, canEditRow = TRUE, statusCol='_editbl_status'){
13801382
#' @return `boolean`
13811383
#'
13821384
#' @author Saar Junius
1385+
#' @keywords internal
13831386
evalCanCloneRow <- function(row, canCloneRow = TRUE, statusCol='_editbl_status'){
13841387

13851388
# Prevent evaluating logic and speed up for most common use-case
@@ -1416,6 +1419,7 @@ evalCanCloneRow <- function(row, canCloneRow = TRUE, statusCol='_editbl_status')
14161419
#' @importFrom dplyr relocate all_of
14171420
#' @importFrom uuid UUIDgenerate
14181421
#' @author Jasper Schelfhout
1422+
#' @keywords internal
14191423
initData <- function(
14201424
data,
14211425
ns,
@@ -1461,6 +1465,7 @@ initData <- function(
14611465
#' @importFrom rlang :=
14621466
#'
14631467
#' @author Jasper Schelfhout
1468+
#' @keywords internal
14641469
addButtons <- function(
14651470
df,
14661471
columnName,
@@ -1502,6 +1507,7 @@ addButtons <- function(
15021507
#' is faster.
15031508
#' @importFrom shiny div actionButton icon
15041509
#' @seealso createEditButtonHTML
1510+
#' @keywords internal
15051511
createDeleteButtonHTML_shiny <- function(
15061512
ns = "%1$s",
15071513
suffix = "%2$s",
@@ -1528,6 +1534,7 @@ createDeleteButtonHTML_shiny <- function(
15281534
#' is faster.
15291535
#' @seealso createEditButtonHTML
15301536
#' @importFrom shiny div actionButton icon
1537+
#' @keywords internal
15311538
createEditButtonHTML_shiny <- function(
15321539
ns = "%1$s",
15331540
suffix = "%2$s",
@@ -1553,6 +1560,7 @@ createEditButtonHTML_shiny <- function(
15531560
#' is faster.
15541561
#' @seealso createCloneButtonHTML
15551562
#' @importFrom shiny div actionButton icon
1563+
#' @keywords internal
15561564
createCloneButtonHTML_shiny <- function(
15571565
ns = "%1$s",
15581566
suffix = "%2$s",
@@ -1577,6 +1585,7 @@ createCloneButtonHTML_shiny <- function(
15771585
#' @param ns `character(1)` namespace
15781586
#' @param disabled `logical(1)` wether or not the button has to be disabled
15791587
#' @return `character(1)` HTML
1588+
#' @keywords internal
15801589
createEditButtonHTML <- function(
15811590
ns,
15821591
suffix,
@@ -1597,6 +1606,7 @@ createEditButtonHTML <- function(
15971606
#' @param ns `character(1)` namespace
15981607
#' @param disabled `logical(1)` wether or not the button has to be disabled
15991608
#' @return `character(1)` HTML
1609+
#' @keywords internal
16001610
createDeleteButtonHTML <- function(
16011611
ns = "%1$s",
16021612
suffix = "%2$s",
@@ -1616,6 +1626,7 @@ createDeleteButtonHTML <- function(
16161626
#' @param ns `character(1)` namespace
16171627
#' @param disabled `logical(1)` wether or not the button has to be disabled
16181628
#' @return `character(1)` HTML
1629+
#' @keywords internal
16191630
createCloneButtonHTML <- function(
16201631
ns = "%1$s",
16211632
suffix = "%2$s",
@@ -1641,6 +1652,7 @@ createCloneButtonHTML <- function(
16411652
#' @param canDeleteRow can be either of the following:
16421653
#' - `logical`, e.g. TRUE or FALSE
16431654
#' - `function`. Needs as input an argument `row` which accepts a single row `tibble` and as output TRUE/FALSE.
1655+
#' @keywords internal
16441656
canXXXRowTemplate <- function(canEditRow, canCloneRow, canDeleteRow){
16451657
NULL
16461658
}
@@ -1654,6 +1666,7 @@ canXXXRowTemplate <- function(canEditRow, canCloneRow, canDeleteRow){
16541666
#' if `NULL`, the data is interpreted as 'unmodified'.
16551667
#' @inheritParams canXXXRowTemplate
16561668
#' @return `character(1)` HTML
1669+
#' @keywords internal
16571670
createButtons <- function(
16581671
row,
16591672
suffix,
@@ -1690,6 +1703,7 @@ createButtons <- function(
16901703
#' @details <https://stackoverflow.com/questions/60406027/how-to-disable-double-click-reactivity-for-specific-columns-in-r-datatable>
16911704
#' @details <https://stackoverflow.com/questions/75406546/apply-css-styling-to-a-single-dt-datatable>
16921705
#' @return `character` CSS
1706+
#' @keywords internal
16931707
disableDoubleClickButtonCss <- function(id){
16941708
sprintf("
16951709
#%1$s > .dataTables_wrapper > table tbody td:nth-child(1) {pointer-events: none;}

editbl/R/eDT_app.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#' @param ... arguments past to \code{\link{eDT}}
88
#' @importFrom shiny shinyApp
99
#' @return data (or a modified version thereof) once you click 'close'
10+
#' @keywords internal
1011
eDT_app <- function(...){
1112
args <- list(...)
1213
ui <- eDT_app_ui(eDTId = args$id)
@@ -23,6 +24,7 @@ eDT_app <- function(...){
2324
#' @return HTML
2425
#'
2526
#' @author Jasper Schelfhout
27+
#' @keywords internal
2628
eDT_app_ui <- function(moduleId = "nevergonnagiveyouup", eDTId = "nevergonnaletyoudown") {
2729
ns <- NS(moduleId)
2830
tagList(
@@ -39,6 +41,7 @@ eDT_app_ui <- function(moduleId = "nevergonnagiveyouup", eDTId = "nevergonnalety
3941
#' @return moduleServer which on application stop returns version of x with made changes
4042
#'
4143
#' @author Jasper Schelfhout
44+
#' @keywords internal
4245
eDT_app_server <- function(moduleId = "nevergonnagiveyouup",...) {
4346
args <- list(...)
4447
moduleServer(

editbl/R/foreignTbl.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ joinForeignTbl <- function(
176176
#' @return tbl
177177
#'
178178
#' @author Jasper Schelfhout
179+
#' @keywords internal
179180
fillDeductedColumns <- function(tbl, foreignTbls){
180181
columnOrder <- names(tbl)
181182
nrow <- nrow(tbl)
@@ -207,6 +208,7 @@ fillDeductedColumns <- function(tbl, foreignTbls){
207208
#' @importFrom dplyr count pull anti_join filter if_any all_of
208209
#'
209210
#' @author Jasper Schelfhout
211+
#' @keywords internal
210212
checkForeignTbls <- function(tbl, foreignTbls){
211213
n <- NULL # R CMD CHECK fix
212214

@@ -244,6 +246,7 @@ checkForeignTbls <- function(tbl, foreignTbls){
244246
#' @return data.frame
245247
#'
246248
#' @author Jasper Schelfhout
249+
#' @keywords internal
247250
castToFactor <- function(data, foreignTbls){
248251
levels <- list()
249252
for(foreignTbl in foreignTbls){
@@ -269,6 +272,7 @@ castToFactor <- function(data, foreignTbls){
269272
#' @return `character`
270273
#'
271274
#' @author Jasper Schelfhout
275+
#' @keywords internal
272276
getNonNaturalKeyCols <- function(foreignTbls){
273277
result <- c()
274278
for(foreignTbl in foreignTbls){

editbl/R/shinyInput.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ inputServer.default <- function(id, data, colnames, notEditable, foreignTbls, ..
216216
#' @return shiny input
217217
#'
218218
#' @author Jasper Schelfhout
219+
#' @keywords internal
219220
shinyInput <- function(x, inputId, label, selected){
220221
if(inherits(x, "logical")){
221222
selectInput(inputId = inputId, label = label, choices = c(" " = NA, "TRUE" = TRUE, "FALSE" = FALSE), selected = selected)

editbl/R/tbl.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ e_rows_update.default <- function(
9090
#' @param tbl `tbl`
9191
#'
9292
#' @author Jasper Schelfhout
93+
#' @keywords internal
9394
beginTransaction <- function(tbl){
9495
if(inherits(tbl, "tbl_dbi")){
9596
DBI::dbBegin(tbl$src$con)
@@ -100,6 +101,7 @@ beginTransaction <- function(tbl){
100101
#' @param tbl `tbl`
101102
#'
102103
#' @author Jasper Schelfhout
104+
#' @keywords internal
103105
commitTransaction <- function(tbl){
104106
if(inherits(tbl, "tbl_dbi")){
105107
DBI::dbCommit(tbl$src$con)
@@ -110,6 +112,7 @@ commitTransaction <- function(tbl){
110112
#' @param tbl `tbl`
111113
#'
112114
#' @author Jasper Schelfhout
115+
#' @keywords internal
113116
rollbackTransaction <- function(tbl){
114117
if(inherits(tbl, "tbl_dbi")){
115118
DBI::dbRollback(tbl$src$con)

editbl/R/tbl_dbi.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ get_db_table_name <- function(x){
171171
#' @param table character
172172
#' @param values named list, row to add. Names are database column names. Unspecified columns will get database defaults.
173173
#' @return integer number of affected rows.
174+
#' @keywords internal
174175
rowInsert <- function (
175176
conn,
176177
table,
@@ -206,6 +207,7 @@ rowInsert <- function (
206207
#' @param values named list, values to be set. Names are database column names.
207208
#' @param where named list, values to filter on. Names are database column names. If NULL no filter is applied.
208209
#' @return integer number of affected rows.
210+
#' @keywords internal
209211
rowUpdate <- function (
210212
conn,
211213
table,
@@ -247,6 +249,7 @@ rowUpdate <- function (
247249
#' @return x, possibly cast to different type
248250
#'
249251
#' @author Jasper Schelfhout
252+
#' @keywords internal
250253
castToSQLSupportedType <- function(x){
251254
if(!inherits(x, c("numeric", "character"))){
252255
x <- as.character(x)
@@ -264,6 +267,7 @@ castToSQLSupportedType <- function(x){
264267
#' @return character sql
265268
#'
266269
#' @author Jasper Schelfhout
270+
#' @keywords internal
267271
whereSQL <- function(
268272
conn,
269273
table,

0 commit comments

Comments
 (0)