diff --git a/src/app/dashapp.jl b/src/app/dashapp.jl index d745c5e..02c3966 100644 --- a/src/app/dashapp.jl +++ b/src/app/dashapp.jl @@ -34,10 +34,10 @@ mutable struct DashApp devtools ::DevTools callbacks ::Dict{Symbol, Callback} inline_scripts ::Vector{String} - - DashApp(root_path, is_interactive, config, index_string, title = "Dash") = + + DashApp(root_path, is_interactive, config, index_string, title = "Dash") = new(root_path, is_interactive, config, index_string, title, nothing, DevTools(dash_env(Bool, "debug", false)), Dict{Symbol, Callback}(), String[]) - + end #only name, index_string and layout are available to set @@ -70,7 +70,7 @@ get_layout(app::DashApp) = app.layout function check_index_string(index_string::AbstractString) validate_index( - "index_string", index_string, + "index_string", index_string, [ "{%app_entry%}"=>r"{%app_entry%}", "{%config%}"=>r"{%config%}", @@ -136,7 +136,7 @@ Available dev_tools environment variables: hash requests before failing and displaying a pop up. Default 8. env: ``DASH_HOT_RELOAD_MAX_RETRY`` """ -function enable_dev_tools!(app::DashApp; debug = nothing, +function enable_dev_tools!(app::DashApp; debug = nothing, dev_tools_ui = nothing, dev_tools_props_check = nothing, dev_tools_serve_dev_bundles = nothing, @@ -168,22 +168,22 @@ get_setting(app::DashApp, name::Symbol) = getproperty(app.config, name) get_assets_path(app::DashApp) = joinpath(app.root_path, get_setting(app, :assets_folder)) """ - dash(name::String; + dash(; external_stylesheets, external_scripts, - url_base_pathname, + url_base_pathname, requests_pathname_prefix, routes_pathname_prefix, assets_folder, assets_url_path, - assets_ignore, + assets_ignore, serve_locally, suppress_callback_exceptions, - eager_loading , - meta_tags, - index_string, - assets_external_path, - include_assets_files, + eager_loading , + meta_tags, + index_string, + assets_external_path, + include_assets_files, show_undo_redo, compress ) @@ -202,35 +202,35 @@ If a parameter can be set by an environment variable, that is listed as: ``requests_pathname_prefix * assets_url_path * "/" * asset_path`` where ``asset_path`` is the path to a file inside ``assets_folder``. Default ``'assets'`. - + - `assets_ignore::String` - [EXPERIMENTAL] A regex, as a string to pass to ``Regex``, for assets to omit from immediate loading. Ignored files will still be served if specifically requested. You cannot use this to prevent access - to sensitive files. + to sensitive files. :type assets_ignore: string - `assets_external_path::String` - [EXPERIMENTAL] an absolute URL from which to load assets. Use with ``serve_locally=false``. Dash can still find js and css to automatically load if you also keep local copies in your assets folder that Dash can index, but external serving can improve - performance and reduce load on the Dash server. - env: `DASH_ASSETS_EXTERNAL_PATH` + performance and reduce load on the Dash server. + env: `DASH_ASSETS_EXTERNAL_PATH` - `include_assets_files::Bool` - [EXPERIMENTAL] Default ``true``, set to ``false`` to prevent immediate loading of any assets. Assets will still be served if specifically requested. You cannot use this to prevent access - to sensitive files. - env: `DASH_INCLUDE_ASSETS_FILES` + to sensitive files. + env: `DASH_INCLUDE_ASSETS_FILES` - `url_base_pathname::String`: A local URL prefix to use app-wide. Default ``nothing``. Both `requests_pathname_prefix` and `routes_pathname_prefix` default to `url_base_pathname`. - env: `DASH_URL_BASE_PATHNAME` + env: `DASH_URL_BASE_PATHNAME` - `requests_pathname_prefix::String`: A local URL prefix for file requests. Defaults to `url_base_pathname`, and must end with `routes_pathname_prefix` - env: `DASH_REQUESTS_PATHNAME_PREFIX` + env: `DASH_REQUESTS_PATHNAME_PREFIX` - `routes_pathname_prefix::String`: A local URL prefix for JSON requests. Defaults to ``url_base_pathname``, and must start and end @@ -240,77 +240,77 @@ If a parameter can be set by an environment variable, that is listed as: - `serve_locally`: [EXPERIMENTAL] If `true` (default), assets and dependencies (Dash and Component js and css) will be served from local URLs. If `false` Dash will use CDN links where available. (Dash and Component js and css) will be served from local URLs. If ``false`` we will use CDN links where available. - + - `meta_tags::Vector{Dict{String, String}}`: html tags to be added to the index page. Each dict should have the attributes and values for one tag, eg: ``Dict("name"=>"description", "content" => "My App")`` - + - `index_string::String`: Override the standard Dash index page. Must contain the correct insertion markers to interpolate various content into it depending on the app config and components used. See https://dash.plotly.com/external-resources for details. - + - `external_scripts::Vector`: Additional JS files to load with the page. Each entry can be a String (the URL) or a Dict{String, String} with ``src`` (the URL) and optionally other ``