fix(embedded): download chart as image (#19339)

This commit is contained in:
Lily Kuang 2022-03-23 14:04:07 -07:00 committed by GitHub
parent a08f83bc60
commit 0ad692511e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,12 @@
{ {
"name": "@superset-ui/embedded-sdk", "name": "@superset-ui/embedded-sdk",
"version": "0.1.0-alpha.3", "version": "0.1.0-alpha.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@superset-ui/embedded-sdk", "name": "@superset-ui/embedded-sdk",
"version": "0.1.0-alpha.3", "version": "0.1.0-alpha.6",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@superset-ui/switchboard": "^0.18.26-0" "@superset-ui/switchboard": "^0.18.26-0"

View File

@ -1,6 +1,6 @@
{ {
"name": "@superset-ui/embedded-sdk", "name": "@superset-ui/embedded-sdk",
"version": "0.1.0-alpha.5", "version": "0.1.0-alpha.6",
"description": "SDK for embedding resources from Superset into your own application", "description": "SDK for embedding resources from Superset into your own application",
"access": "public", "access": "public",
"keywords": [ "keywords": [

View File

@ -104,6 +104,7 @@ export async function embedDashboard({
iframe.sandbox.add("allow-same-origin"); // needed for postMessage to work iframe.sandbox.add("allow-same-origin"); // needed for postMessage to work
iframe.sandbox.add("allow-scripts"); // obviously the iframe needs scripts iframe.sandbox.add("allow-scripts"); // obviously the iframe needs scripts
iframe.sandbox.add("allow-presentation"); // for fullscreen charts iframe.sandbox.add("allow-presentation"); // for fullscreen charts
iframe.sandbox.add("allow-downloads"); // for downloading charts as image
// add these ones if it turns out we need them: // add these ones if it turns out we need them:
// iframe.sandbox.add("allow-top-navigation"); // iframe.sandbox.add("allow-top-navigation");
// iframe.sandbox.add("allow-forms"); // iframe.sandbox.add("allow-forms");