Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new UI panel, the Status Bar, which replaces current
contextmenu
menu.<perspective-statusbar>
, the Custom Element which implements this feature, is written in Rust and lives in the confusingly-named@finos/perspective-vieux
package, which will someday replace@finos/perspective-viewer
. For now though, it is inlined similarly so@finos/perspective-cpp
package, so as not to pollute the project's NPM module namespace. Structurally, this package is very similar to the other Custom Elements packages in Perspective; there is a static HTML template which is render to the Shadow DOM at element instantiation, and small JavaScript API:set_table()
takes the PerspectiveTable()
object for this viewer.set_view()
takes the associatedView()
, must be called afterset_table()
but can be called multiple times.perspective-statusbar-reset
non-bubbling event when the reset button is clicked.In order to bind to the
customElements.register()
method, a short shim of the JavaScript-accessible methods and class structure lives insrc/js/boostrap.js
; this is possible to do in Rust also, butwasm-bindgen
does not (seem to?) have native ES6 class binders, which makes this a bit hacky. Within Rust isStatusBarElement
struct and methods, from which the JavaScript API dispatches.download
andcopy
modules, which re-create and replace this functionality from@finos/perspective-viewer
.typed-html
package a renderer and extractor.async
/fn
types into JavaScriptClosure
types that do not leak.wasm-bindgen
's headless support.