moved js files

This commit is contained in:
pvictor 2021-05-11 10:06:51 +02:00
parent 36a537a79b
commit 28931d2887
No known key found for this signature in database
GPG Key ID: 31124C9F3F9268B8
96 changed files with 6 additions and 6 deletions

View File

@ -56,7 +56,7 @@ apexchart <- function(ax_opts = list(), auto_update = TRUE, width = NULL, height
)
}
# dput(tools::file_path_sans_ext(list.files("inst/htmlwidgets/lib/apexcharts-locales/")))
# dput(tools::file_path_sans_ext(list.files("inst/htmlwidgets/assets/apexcharts-locales/")))
#' @importFrom jsonlite fromJSON
add_locale_apex <- function(widget) {
if (!is.null(widget$x$ax_opts$chart$defaultLocale)) {
@ -75,7 +75,7 @@ add_locale_apex <- function(widget) {
)
} else {
path <- system.file(
file.path("htmlwidgets/lib/apexcharts-locales", paste0(defaultLocale, ".json")),
file.path("htmlwidgets/assets/apexcharts-locales", paste0(defaultLocale, ".json")),
package = "apexcharter"
)
locale <- jsonlite::fromJSON(txt = path)

View File

@ -16,7 +16,7 @@
#' @example examples/format.R
format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
check_locale_d3(locale)
path <- system.file(file.path("htmlwidgets/lib/d3-format/locale", paste0(locale, ".json")), package = "apexcharter")
path <- system.file(file.path("htmlwidgets/assets/d3-format/locale", paste0(locale, ".json")), package = "apexcharter")
if (path != "") {
locale <- paste(readLines(con = path, encoding = "UTF-8"), collapse = "")
}
@ -28,7 +28,7 @@ format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
check_locale_d3 <- function(x) {
json <- list.files(system.file("htmlwidgets/lib/d3-format/locale", package = "apexcharter"))
json <- list.files(system.file("htmlwidgets/assets/d3-format/locale", package = "apexcharter"))
njson <- gsub("\\.json", "", json)
if (!x %in% njson) {
stop(paste(

View File

@ -1,7 +1,7 @@
dependencies:
- name: apexcharts
version: 3.26.2
src: htmlwidgets/lib/apexcharts-3.26
src: htmlwidgets/assets/apexcharts-3.26
script: apexcharts.min.js
- name: apexcharter-css
version: 0.1.0
@ -9,6 +9,6 @@ dependencies:
stylesheet: apexcharter.css
- name: d3-format
version: 1.4.2
src: htmlwidgets/lib/d3-format
src: htmlwidgets/assets/d3-format
script: d3-format.min.js
all_files: false