bump vegalite dep, fix dispose (#16335) (#16382)

This commit is contained in:
Yuri Astrakhan 2018-01-29 22:45:48 -05:00 committed by GitHub
parent cfcc03bb3f
commit 2d51c07a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 20 deletions

View file

@ -211,7 +211,7 @@
"uuid": "3.0.1",
"validate-npm-package-name": "2.2.2",
"vega-lib": "3.0.10",
"vega-lite": "2.1.0",
"vega-lite": "2.1.2",
"vega-schema-url-parser": "1.0.0",
"vision": "4.1.0",
"webpack": "3.6.0",

View file

@ -131,23 +131,25 @@ export class VegaBaseView {
}
if (window) {
if (!view) {
// disposing, get rid of the stale debug info
delete window.VEGA_DEBUG;
} else {
if (window.VEGA_DEBUG === undefined && console) {
console.log('%cWelcome to Kibana Vega Plugin!', 'font-size: 16px; font-weight: bold;');
console.log('You can access the Vega view with VEGA_DEBUG. ' +
'Learn more at https://vega.github.io/vega/docs/api/debugging/.');
}
window.VEGA_DEBUG = window.VEGA_DEBUG || {};
window.VEGA_DEBUG.VEGA_VERSION = vega.version;
window.VEGA_DEBUG.VEGA_LITE_VERSION = vegaLite.version;
window.VEGA_DEBUG.view = view;
window.VEGA_DEBUG.vega_spec = spec;
window.VEGA_DEBUG.vegalite_spec = vlspec;
if (window.VEGA_DEBUG === undefined && console) {
console.log('%cWelcome to Kibana Vega Plugin!', 'font-size: 16px; font-weight: bold;');
console.log('You can access the Vega view with VEGA_DEBUG. ' +
'Learn more at https://vega.github.io/vega/docs/api/debugging/.');
}
const debugObj = {};
window.VEGA_DEBUG = debugObj;
window.VEGA_DEBUG.VEGA_VERSION = vega.version;
window.VEGA_DEBUG.VEGA_LITE_VERSION = vegaLite.version;
window.VEGA_DEBUG.view = view;
window.VEGA_DEBUG.vega_spec = spec;
window.VEGA_DEBUG.vegalite_spec = vlspec;
// On dispose, clean up, but don't use undefined to prevent repeated debug statements
this._addDestroyHandler(() => {
if (debugObj === window.VEGA_DEBUG) {
window.VEGA_DEBUG = null;
}
});
}
}

View file

@ -122,6 +122,10 @@
version "0.2.3"
resolved "https://registry.yarnpkg.com/@elastic/ui-ace/-/ui-ace-0.2.3.tgz#5281aed47a79b7216c55542b0675e435692f20cd"
"@types/json-stable-stringify@^1.0.32":
version "1.0.32"
resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.32.tgz#121f6917c4389db3923640b2e68de5fa64dda88e"
"@types/node@*":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.3.0.tgz#3a129cda7c4e5df2409702626892cb4b96546dd5"
@ -11819,10 +11823,11 @@ vega-lib@3.0.10:
vega-voronoi "2"
vega-wordcloud "^2.1"
vega-lite@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-2.1.0.tgz#8e6c1d438da6400eebdb53f0da7f9801b9da96f9"
vega-lite@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-2.1.2.tgz#ca94eb1d9633763ec6465e40fec7ed040779f695"
dependencies:
"@types/json-stable-stringify" "^1.0.32"
json-stable-stringify "^1.0.1"
tslib "^1.9.0"
vega-event-selector "^2.0.0"