diff --git a/Project.toml b/Project.toml index d983611..ec90109 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TableView" uuid = "40c74d1a-b44c-5b06-a7c1-6cbea58ea978" -version = "0.7.2" +version = "0.8.0" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -12,7 +12,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" [compat] -JSExpr = "0.4, 0.5" +JSExpr = "0.4, 0.5, 1" JSON = "0.18, 0.19, 0.20, 0.21" Observables = "0.2, 0.3, 0.4, 0.5" Tables = "1" diff --git a/ag-grid.version b/ag-grid.version index baa90a6..4f3a069 100644 --- a/ag-grid.version +++ b/ag-grid.version @@ -1 +1 @@ -25.2.0 +30.0.2 diff --git a/deps/build.jl b/deps/build.jl index 3e42890..9478e16 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -8,10 +8,7 @@ ag_grid_base = joinpath(@__DIR__, "ag-grid-$(version)", "ag-grid.js") isfile(ag_grid_base) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/dist/ag-grid-$(distribution).min.noStyle.js", ag_grid_base) ag_grid_base_style = joinpath(@__DIR__, "ag-grid-$(version)", "ag-grid.css") -isfile(ag_grid_base_style) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/dist/styles/ag-grid.css", ag_grid_base_style) +isfile(ag_grid_base_style) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/styles/ag-grid.css", ag_grid_base_style) -ag_grid_light = joinpath(@__DIR__, "ag-grid-$(version)", "ag-grid-light.css") -isfile(ag_grid_light) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/dist/styles/ag-theme-balham.css", ag_grid_light) - -ag_grid_dark = joinpath(@__DIR__, "ag-grid-$(version)", "ag-grid-dark.css") -isfile(ag_grid_dark) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/dist/styles/ag-theme-balham-dark.css", ag_grid_dark) +ag_grid_light = joinpath(@__DIR__, "ag-grid-$(version)", "ag-theme-balham.css") +isfile(ag_grid_light) || download("https://cdn.jsdelivr.net/npm/ag-grid-$(distribution)@$(version)/styles/ag-theme-balham.css", ag_grid_light) diff --git a/src/TableView.jl b/src/TableView.jl index 881dd19..9c16d4b 100644 --- a/src/TableView.jl +++ b/src/TableView.jl @@ -11,7 +11,7 @@ const ag_grid_imports = [] function __init__() version = readchomp(joinpath(@__DIR__, "..", "ag-grid.version")) empty!(ag_grid_imports) - for f in ["ag-grid.js", "ag-grid.css", "ag-grid-light.css", "ag-grid-dark.css"] + for f in ["ag-grid.js", "ag-grid.css", "ag-theme-balham.css"] push!(ag_grid_imports, normpath(joinpath(@__DIR__, "..", "deps", "ag-grid-$(version)", f))) end pushfirst!(ag_grid_imports, normpath(joinpath(@__DIR__, "rowNumberRenderer.js"))) @@ -74,7 +74,8 @@ function showtable(table; title::String = "", height = :auto, width = "100%", - cell_changed = nothing + cell_changed = nothing, + async_threshold = 10_000, ) rows = Tables.rows(table) it_sz = Base.IteratorSize(rows) @@ -110,7 +111,7 @@ function showtable(table; types = schema.types end - async = tablelength === nothing || tablelength > 10_000 + async = tablelength === nothing || tablelength > async_threshold w = Scope(imports = ag_grid_imports)