-
-
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.
- Loading branch information
Showing
300 changed files
with
15,729 additions
and
326 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 @@ inst/doc | |
*_.new.png | ||
|
||
config.yml | ||
.venv/ |
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,29 +1,115 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(add_external_resources) | ||
export(compile_styles) | ||
export(entrata_req_auth) | ||
export(entrata_req_body) | ||
export(entrata_req_endpoint) | ||
export(entrata_req_error) | ||
export(entrata_req_log) | ||
export(entrata_req_perform) | ||
export(entrata_request) | ||
export(entrata_resp_abort) | ||
export(entrata_resp_body_json) | ||
export(entrata_resp_check_status) | ||
export(entrata_resp_status) | ||
export(entrata_resp_status_desc) | ||
export(footer_client_section) | ||
export(footer_copyright_section) | ||
export(footer_logo_section) | ||
export(footer_top_section) | ||
export(get_entrata_config) | ||
export(get_entrata_report_info) | ||
export(get_entrata_reports_list) | ||
export(get_latest_report_version) | ||
export(icon_text) | ||
export(is_boolean_string) | ||
export(is_integer_string) | ||
export(is_integer_string_multi) | ||
export(mod_footer_server) | ||
export(mod_footer_ui) | ||
export(mod_home_server) | ||
export(mod_home_ui) | ||
export(mod_properties_ui) | ||
export(mod_sidebar_server) | ||
export(mod_sidebar_ui) | ||
export(pkg_sys) | ||
export(pkg_sys_assets) | ||
export(pkg_sys_config) | ||
export(pkg_sys_examples) | ||
export(pkg_sys_templates) | ||
export(validate_entrata_config) | ||
export(validate_entrata_endpoint_method_params) | ||
export(validate_entrata_method_version) | ||
export(validate_entrata_request) | ||
export(validate_entrata_request_endpoint) | ||
export(validate_entrata_request_endpoint_method) | ||
export(validate_image) | ||
importFrom(bsicons,bs_icon) | ||
importFrom(bslib,accordion) | ||
importFrom(bslib,accordion_panel) | ||
importFrom(bslib,card) | ||
importFrom(bslib,card_body) | ||
importFrom(bslib,card_footer) | ||
importFrom(bslib,card_title) | ||
importFrom(bslib,layout_column_wrap) | ||
importFrom(bslib,layout_columns) | ||
importFrom(bslib,sidebar) | ||
importFrom(bslib,value_box) | ||
importFrom(cli,cli_abort) | ||
importFrom(cli,cli_alert_danger) | ||
importFrom(cli,cli_alert_info) | ||
importFrom(cli,cli_alert_success) | ||
importFrom(cli,cli_alert_warning) | ||
importFrom(config,get) | ||
importFrom(dplyr,filter) | ||
importFrom(dplyr,left_join) | ||
importFrom(dplyr,pull) | ||
importFrom(dplyr,select) | ||
importFrom(fontawesome,fa) | ||
importFrom(glue,glue) | ||
importFrom(htmltools,HTML) | ||
importFrom(htmltools,tagList) | ||
importFrom(htmltools,tags) | ||
importFrom(httr2,req_auth_basic) | ||
importFrom(httr2,req_body_json) | ||
importFrom(httr2,req_dry_run) | ||
importFrom(httr2,req_error) | ||
importFrom(httr2,req_headers) | ||
importFrom(httr2,req_method) | ||
importFrom(httr2,req_perform) | ||
importFrom(httr2,req_url_path_append) | ||
importFrom(httr2,req_user_agent) | ||
importFrom(httr2,request) | ||
importFrom(httr2,resp_body_json) | ||
importFrom(logger,log_info) | ||
importFrom(purrr,list_rbind) | ||
importFrom(purrr,map) | ||
importFrom(purrr,pluck) | ||
importFrom(purrr,pluck_exists) | ||
importFrom(purrr,set_names) | ||
importFrom(rlang,.data) | ||
importFrom(rlang,.env) | ||
importFrom(rlang,arg_match) | ||
importFrom(rlang,caller_arg) | ||
importFrom(rlang,caller_env) | ||
importFrom(sass,output_template) | ||
importFrom(sass,sass) | ||
importFrom(sass,sass_file) | ||
importFrom(sass,sass_options) | ||
importFrom(shiny,NS) | ||
importFrom(shiny,icon) | ||
importFrom(shiny,includeCSS) | ||
importFrom(shiny,moduleServer) | ||
importFrom(shiny,reactive) | ||
importFrom(shiny,req) | ||
importFrom(shiny,textOutput) | ||
importFrom(shiny,uiOutput) | ||
importFrom(shinyWidgets,pickerInput) | ||
importFrom(tibblify,tib_chr) | ||
importFrom(tibblify,tib_df) | ||
importFrom(tibblify,tib_int) | ||
importFrom(tibblify,tib_lgl) | ||
importFrom(tibblify,tib_row) | ||
importFrom(tibblify,tspec_df) | ||
importFrom(yaml,read_yaml) |
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,116 @@ | ||
|
||
# ------------------------------------------------------------------------ | ||
# | ||
# Title : Assets | ||
# By : Jimmy Briggs | ||
# Date : 2024-11-11 | ||
# | ||
# ------------------------------------------------------------------------ | ||
|
||
|
||
# add external resources -------------------------------------------------- | ||
|
||
#' Add External Resources | ||
#' | ||
#' @description | ||
#' Add external resources to the shiny app. | ||
#' | ||
#' This function performs the following: | ||
#' | ||
#' - Adds this package's installed `www` folder to the shiny app resource paths | ||
#' via [shiny::addResourcePath()]. | ||
#' | ||
#' | ||
#' @return NULL | ||
#' @export | ||
add_external_resources <- function() { | ||
|
||
shiny::addResourcePath("www", pkg_sys("www")) | ||
|
||
htmltools::tags$head( | ||
htmltools::tags$link( | ||
rel = "shortcut icon", | ||
type = "image/x-icon", | ||
href = "www/favicon.ico" | ||
), | ||
golem::bundle_resources( | ||
path = system.file("www", package = "gmhdatahub"), | ||
app_title = "gmhdatahub" | ||
), | ||
shinyjs::useShinyjs(), | ||
waiter::use_waiter() | ||
) | ||
} | ||
|
||
|
||
# compile SASS ------------------------------------------------------------ | ||
|
||
#' Compile Styles | ||
#' | ||
#' @description | ||
#' Compile SASS files to CSS. | ||
#' | ||
#' @param path The path to the `styles` folder. Default is `pkg_sys("www", "styles")`. | ||
#' This folder must contain a `scss` folder with a `index.scss` file. | ||
#' | ||
#' @return The path to the compiled CSS file. | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' compile_styles() | ||
#' | ||
#' @importFrom sass sass sass_file sass_options output_template | ||
#' @importFrom cli cli_alert_danger cli_alert_success | ||
compile_styles <- function( | ||
path = pkg_sys("www", "styles"), | ||
source_map = TRUE, | ||
cache = FALSE | ||
) { | ||
|
||
# paths | ||
scss_dir <- file.path(path, "scss") | ||
css_dir <- file.path(path, "css") | ||
|
||
# create css directory if it doesn't exist | ||
if (!dir.exists(css_dir)) { | ||
dir.create(css_dir) | ||
} | ||
|
||
# output template | ||
sass_output_template <- sass::output_template( | ||
basename = "styles", | ||
dirname = "css", | ||
fileext = ".min.css", | ||
path = path | ||
) | ||
|
||
# main scss file | ||
scss_main <- file.path(scss_dir, "index.scss") | ||
output_file <- file.path(css_dir, "styles.min.css") | ||
|
||
# compile scss to css | ||
tryCatch({ | ||
sass::sass( | ||
sass::sass_file(scss_main), | ||
output = sass_output_template(suffix = ""), | ||
options = sass::sass_options( | ||
output_style = "compressed", | ||
include_path = list.files( | ||
scss_dir, | ||
full.names = TRUE | ||
), | ||
source_map_embed = source_map | ||
), | ||
cache = cache | ||
) | ||
}, error = function(e) { | ||
cli::cli_alert_danger("Error compiling SASS: {e$message}") | ||
}) | ||
|
||
cli::cli_alert_success("SASS compiled successfully: {.field {output_file}}") | ||
|
||
# return the path to the compiled css file | ||
return(output_file) | ||
|
||
} |
Oops, something went wrong.