-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from eodaGmbH/feature/pkgdown
Feature/pkgdown
- Loading branch information
Showing
38 changed files
with
483 additions
and
81 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 |
---|---|---|
|
@@ -9,3 +9,4 @@ _NAMESPACE | |
^docs$ | ||
^pkgdown$ | ||
^\.github$ | ||
images/ |
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 |
---|---|---|
@@ -1,15 +1,19 @@ | ||
Package: rtabulator | ||
Type: Package | ||
Title: R Bindings for Tabulator JS | ||
Version: 0.1.0 | ||
Date: 2024-09-08 | ||
Version: 0.1.1 | ||
Date: 2024-09-13 | ||
Authors@R: c( | ||
person("Stefan", "Kuethe", email = "[email protected]", role = c("aut", "cre")), | ||
person("Nico", "Friess", email = "[email protected]", role = c("aut")) | ||
) | ||
Maintainer: Stefan Kuethe <[email protected]> | ||
Description: Provides R bindings for 'Tabulator JS' <https://tabulator.info/>. | ||
Makes it a breeze to create beautiful interactive tables. | ||
URL: | ||
https://github.com/eodaGmbH/rtabulator | ||
https://eodagmbh.github.io/rtabulator/ | ||
BugReports: https://github.com/eodaGmbH/rtabulator/issues | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
|
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 |
---|---|---|
@@ -1,3 +1,12 @@ | ||
# rtabulator 0.1.1 | ||
|
||
* Update docs | ||
* Add pkgdown site | ||
* Add function to create multi column headers | ||
* Add a lot of examples | ||
* Update README | ||
* Make `devtools::check()` pass 🚀 | ||
|
||
# rtabulator 0.1.0 | ||
|
||
* Add NEWS.md to track changes. |
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 |
---|---|---|
@@ -1,4 +1,33 @@ | ||
# See example here: https://github.com/eodaGmbH/py-tabulator/blob/main/docs/examples/getting_started/shiny_core_multi_row_headers.py | ||
#' Multi Column Header | ||
#' @inheritParams set_formatter_html | ||
#' @param multi_columns (list): Multi column definitions | ||
#' @example examples/experimental/multi_column_header.R | ||
#' @export | ||
set_multi_column_header <- function(widget, multi_columns) { | ||
res <- list() | ||
for (key in names(multi_columns)) { | ||
column_names <- multi_columns[[key]] | ||
column_defs <- purrr::map(column_names, ~ find_column(widget, .x)) | ||
res <- append(res, list(list(title = key, columns = column_defs))) | ||
} | ||
|
||
# Add columns not used in multi_columns | ||
used_cols <- unlist(multi_columns) | ||
for (column_name in unlist(purrr::map(widget$x$options$columns, ~ .x$field))) { | ||
if (!column_name %in% used_cols) res <- append(res, list(find_column(widget, column_name))) | ||
} | ||
|
||
# return(res) | ||
widget$x$options$columns <- res | ||
return(widget) | ||
} | ||
|
||
find_column <- function(widget, column) { | ||
column_def <- NULL | ||
for (item in widget$x$options$columns) { | ||
if (item$field == column) column_def <- item | ||
} | ||
|
||
return(column_def) | ||
} |
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,25 @@ | ||
## #' @export | ||
# TODO: Is this useful? | ||
set_spreadsheet_mode <- function( | ||
widget, | ||
spreadsheet_rows = NULL, | ||
spreadsheet_columns = NULL, | ||
spreadsheet_column_definition = NULL, | ||
spreadsheet_sheets = NULL, | ||
spreadsheet_sheet_tabs = NULL, | ||
...) { | ||
spreadsheet_options <- list( | ||
spreadsheet = TRUE, | ||
spreadsheetRows = spreadsheet_rows, | ||
spreadsheetColumns = spreadsheet_columns, | ||
spreadsheetColumnDefinition = spreadsheet_column_definition, | ||
spreadsheetSheets = spreadsheet_sheets, | ||
spreadsheetSheetTabs = spreadsheet_sheet_tabs, | ||
... | ||
) | ||
widget$x$options <- keys_to_camel_case(utils::modifyList( | ||
utils::modifyList(widget$x$options, default_spreadsheet_options), | ||
compact(spreadsheet_options) | ||
)) | ||
return(widget) | ||
} |
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
Oops, something went wrong.