|
55 | 55 | #' \describe{ |
56 | 56 | #' \item{`layout(...)`}{ |
57 | 57 | #' Set the layout (i.e., user interface). The layout should be either a |
58 | | -#' collection of dash components (e.g., [coreSlider], [htmlDiv], etc) or |
| 58 | +#' collection of DashR components (e.g., [dccSlider], [htmlDiv], etc) or |
59 | 59 | #' a function which returns a collection of components. |
60 | 60 | #' } |
61 | 61 | #' \item{`layout_get(render = TRUE)`}{ |
|
69 | 69 | #' provide [input] (and/or [state]) object(s) (which should reference |
70 | 70 | #' layout components) as argument value(s) to `func`. |
71 | 71 | #' } |
72 | | -#' \item{`dependencies_set(dependencies = NULL, add = TRUE)`}{ |
73 | | -#' Adds additional HTML dependencies to your dash application (beyond the 'internal' dependencies). |
74 | | -#' The `dependencies` argument accepts [htmltools::htmlDependency] or |
75 | | -#' [htmltools::htmlDependencies]. The `section` argument determines whether |
76 | | -#' your dependencies are placed inside `<head>` or `<footer>`. |
77 | | -#' } |
78 | | -#' \item{`dependencies_get(all = FALSE)`}{ |
79 | | -#' Retrieve (just user-defined or all) HTML dependencies. |
80 | | -#' } |
81 | 72 | #' \item{`run_server(host = NULL, port = NULL, block = TRUE, showcase = FALSE, ...)`}{ |
82 | 73 | #' Launch the application. If provided, `host`/`port` set |
83 | 74 | #' the `host`/`port` fields of the underlying [fiery::Fire] web |
@@ -420,37 +411,6 @@ Dash <- R6::R6Class( |
420 | 411 | invisible(private$layout_render()) |
421 | 412 | }, |
422 | 413 |
|
423 | | - # ------------------------------------------------------------------------ |
424 | | - # HTML dependency management |
425 | | - # ------------------------------------------------------------------------ |
426 | | - dependencies_get = function() { |
427 | | - c(private$dependencies_user, private$dependencies) |
428 | | - }, |
429 | | - dependencies_get_internal = function() { |
430 | | - private$dependencies_internal |
431 | | - }, |
432 | | - dependencies_set = function(dependencies = list(), add = TRUE) { |
433 | | - |
434 | | - if (!length(dependencies)) return() |
435 | | - |
436 | | - # do a sensible thing if just a single dependency is provided |
437 | | - if (inherits(dependencies, "html_dependency")) { |
438 | | - dependencies <- list(dependencies) |
439 | | - } |
440 | | - |
441 | | - # ensure we have a list of htmltools::htmlDependency |
442 | | - is_dep <- vapply(dependencies, inherits, logical(1), "html_dependency") |
443 | | - if (any(!is_dep)) { |
444 | | - stop("`dependencies` must be a *list* of htmltools::htmlDependency objects", call. = FALSE) |
445 | | - } |
446 | | - |
447 | | - if (add) { |
448 | | - dependencies <- c(private$dependencies_user, dependencies) |
449 | | - } |
450 | | - |
451 | | - private$dependencies_user <- dependencies |
452 | | - }, |
453 | | - |
454 | 414 | react_version_set = function(version) { |
455 | 415 | versions <- private$react_versions() |
456 | 416 | idx <- versions %in% version |
|
0 commit comments