From 4fbb2a70aad7d5c1456e06b4965d6b519e4a9790 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Wed, 10 Feb 2021 16:45:11 +0200 Subject: [PATCH] fix(explore): pie chart label bugs --- superset-frontend/package-lock.json | 783 ++++++++++++++---- superset-frontend/package.json | 54 +- .../components/controls/VizTypeControl.jsx | 12 +- .../components/Range/AntdRangeFilter.tsx | 7 +- .../src/filters/components/Range/index.ts | 4 +- .../components/Select/AntdSelectFilter.tsx | 2 - .../src/filters/components/Select/index.ts | 4 +- ...e_you_an_ethnic_minority_in_your_city.yaml | 2 +- .../configs/charts/First_Time_Developer.yaml | 2 +- superset/examples/configs/charts/Gender.yaml | 2 +- .../charts/Most_Dominant_Platforms.yaml | 2 +- .../charts/Overall_Sales_By_Product_Line.yaml | 2 +- .../configs/charts/Relocation_ability.yaml | 2 +- .../charts/Vaccine_Candidates_per_Phase.yaml | 2 +- .../charts/Work_Location_Preference.yaml | 2 +- .../41ce8799acc3_rename_pie_label_type.py | 102 +++ 16 files changed, 799 insertions(+), 185 deletions(-) create mode 100644 superset/migrations/versions/41ce8799acc3_rename_pie_label_type.py diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 0e793e4ae523e..a4687662b3179 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -12929,19 +12929,19 @@ } }, "@superset-ui/chart-controls": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.5.tgz", - "integrity": "sha512-GRvC0JPK6XEZIr680fVE1FUdf9KvCHwLKF29aoXz9V16aQltNS53Ost+gYm9K7HESD5lfDJyol2avwxeZxdTYg==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", "requires": { - "@superset-ui/core": "0.17.5", + "@superset-ui/core": "0.17.8", "lodash": "^4.17.15", "prop-types": "^15.7.2" } }, "@superset-ui/core": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.5.tgz", - "integrity": "sha512-9yNsskd+4XHcEI8YVJ2+aS+kun/HQx2p7ssBggfRR5ponOHoudLtNbDLxDtO1C1l+eMabr3YpWaebGB3xQd96w==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.8.tgz", + "integrity": "sha512-wmDPQJFkN/V/vRM4/3mI7v6bYQGMiCEdKfzdaXJU3hZcV9pGPwLkIVP+Ck4UL7uNP+rO384PNQ6GOZBGswcnCw==", "requires": { "@babel/runtime": "^7.1.2", "@emotion/core": "^10.0.28", @@ -13024,18 +13024,28 @@ } }, "@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.5.tgz", - "integrity": "sha512-Rf5nEQ1z0lSCW6k8AqVQMifeFi6HAeXYHIFCltt/egCKYlyz3Pra8SBW/L5c0hH4mdSua9UZmKraTUd4ITsFtQ==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.17.8.tgz", + "integrity": "sha512-hvA96mQS7E44w29l9uIRDhs/pThEWMwLbjAedtTYDtVV6onCSjANG7E3swRAHv7kZqUXLBjRXmaTkQeTP1fFCw==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", "prop-types": "^15.6.2" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13047,29 +13057,98 @@ } }, "@superset-ui/legacy-plugin-chart-chord": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.5.tgz", - "integrity": "sha512-EUbnX2Hah3z353SyUWWqk19R8pIWz26nvjvO4Y6a2i/0I9ukKUGgpQlyhgIFLL4SPyRwGjdStcsFNQeoMGLheQ==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.17.8.tgz", + "integrity": "sha512-JkUY7DmogjZ7wGAV9viH25O6Bwxy/SD+q4PhqGuKGeTn1b/V4AsIifrLbwQA5tSWVQHj+FNmM8oCX+BbFXQuiA==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.5.tgz", - "integrity": "sha512-dzqTZtx1oKrKT4JFGsGAx2aEmGsx7VziDo4SUaLiq1W7W7S/ABjCq2Mu9M4NRT8lkowJq3WAEgVtMy+DzONkmg==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.17.8.tgz", + "integrity": "sha512-L5gpibNqCFsGxdI0YYGEYl9EfooM4SJzhAUN8N1RwXUIPq6Dc196CiL/gPMH4yc4EfmBNltoU3GSeATQNi5Yeg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, + "@superset-ui/core": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.8.tgz", + "integrity": "sha512-wmDPQJFkN/V/vRM4/3mI7v6bYQGMiCEdKfzdaXJU3hZcV9pGPwLkIVP+Ck4UL7uNP+rO384PNQ6GOZBGswcnCw==", + "requires": { + "@babel/runtime": "^7.1.2", + "@emotion/core": "^10.0.28", + "@emotion/styled": "^10.0.27", + "@types/d3-format": "^1.3.0", + "@types/d3-interpolate": "^1.3.1", + "@types/d3-scale": "^2.1.1", + "@types/d3-time": "^1.0.9", + "@types/d3-time-format": "^2.1.0", + "@types/lodash": "^4.14.149", + "@types/rison": "0.0.6", + "@types/seedrandom": "^2.4.28", + "@vx/responsive": "^0.0.199", + "csstype": "^2.6.4", + "d3-format": "^1.3.2", + "d3-interpolate": "^1.4.0", + "d3-scale": "^3.0.0", + "d3-time": "^1.0.10", + "d3-time-format": "^2.2.0", + "emotion-theming": "^10.0.27", + "fetch-retry": "^4.0.1", + "jed": "^1.1.1", + "lodash": "^4.17.11", + "pretty-ms": "^7.0.0", + "react-error-boundary": "^1.2.5", + "reselect": "^4.0.0", + "rison": "^0.1.1", + "seedrandom": "^3.0.5", + "whatwg-fetch": "^3.0.0" + } + }, + "@vx/responsive": { + "version": "0.0.199", + "resolved": "https://registry.npmjs.org/@vx/responsive/-/responsive-0.0.199.tgz", + "integrity": "sha512-ONrmLUAG+8wzD3cn/EmsuZh6JHeyejqup3ZsV25t04VaVJAVQAJukAfNdH8YiwSJu0zSo+txkBTfrnOmFyQLOw==", + "requires": { + "@types/lodash": "^4.14.146", + "@types/react": "*", + "lodash": "^4.17.10", + "prop-types": "^15.6.1", + "resize-observer-polyfill": "1.5.1" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13077,59 +13156,133 @@ "requires": { "internmap": "^1.0.0" } + }, + "d3-interpolate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz", + "integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==", + "requires": { + "d3-color": "1" + } + }, + "d3-scale": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", + "integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==", + "requires": { + "d3-array": "^2.3.0", + "d3-format": "1 - 2", + "d3-interpolate": "1.2.0 - 2", + "d3-time": "1 - 2", + "d3-time-format": "2 - 3" + } + }, + "d3-time-format": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz", + "integrity": "sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==", + "requires": { + "d3-time": "1" + } } } }, "@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.5.tgz", - "integrity": "sha512-zjC5PLRaimevhZxAAjy/oAtvKxNi0cWSwdy05p//1k/ypuVsmjws+k1SlEbB8ZZwMYBVz1WbYKy+u5uqcc+O8g==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.17.8.tgz", + "integrity": "sha512-cLa1Yi0bPb4q1nCiSSw1p91ouywMrdJvA/JhyZ9Vy5HqXvVdCkAq/glc+5ufUX5osRhE9e18zc91XwMHSsx4Vw==", "requires": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.5.tgz", - "integrity": "sha512-kvU0xW23aWB/QUl6JgbyGJ52b4mFhdoUo92YdKicbKsI2rcZ+VEFDwJLCmIe3oosrQID0d9fnZQ/XctqeORB1Q==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.17.8.tgz", + "integrity": "sha512-rFXaqw9UHZRB//7PrtY+wP3E6C3HFyDwbeGRQB38n1xXzuVeTCAHN6acjk9VZTyJBagrm2opngw0u1BTy3mz+g==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "prop-types": "^15.7.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.5.tgz", - "integrity": "sha512-wsfmyyToMDWOBLrPa71RWJ4NLTzCZ/FscKVHYYyYJltpDr/PGhPeiHp2Ma5RxglMJivdBxgewONKjVjm1tloRw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.17.8.tgz", + "integrity": "sha512-RH90ZshoeIFn3UzK78jc11napuhFlEPSN8I0PI0eDicAk9goPToltpoez9j2Tw1egdTatY61Wb/kqE0B7uIktA==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.5.tgz", - "integrity": "sha512-fcLzgpjospFLfplvGbMZIX7iys5ULNabDa+CAI+9tF+e+v3ZaYWYvNo7BXJrmW1Hn9ufNwDmL2CN8J5V5qGWiA==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.17.8.tgz", + "integrity": "sha512-stnr7O+B+vf0i7jRcTcOYw8TbletzgKdpFKRS0L1SuXMQXjYY9/5yY58MteDQCZoI90srQotrffuRNgMCp/98g==", "requires": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", "prop-types": "^15.6.2" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "@vx/group": { "version": "0.0.198", "resolved": "https://registry.npmjs.org/@vx/group/-/group-0.0.198.tgz", @@ -13191,17 +13344,27 @@ } }, "@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.5.tgz", - "integrity": "sha512-1rkv+sbC6VKl5f0m/CtnYRueplr+bl5lLuseZRks0DPjO5m1VUGQrWsa2wCrCui0GmAdqogdJCQVcQF3I2aZxQ==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.17.8.tgz", + "integrity": "sha512-Vvkhq5aNdQEwKRV2herF9bYW+pn8lTd+i+GpG7h5pSNlS0hkfVLQ6tqRldHm6AV/3aYk63/pT1YMc1ZcDBxpqg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13225,12 +13388,12 @@ } }, "@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.5.tgz", - "integrity": "sha512-gDhmAL8qULqhHdDRRYsfMbqEmx3m3ND2sjPtFGtAZa5HOUGWqBzHtW6vAgRetO6e2EU//6EZRa/MO1KNykPm1w==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.17.8.tgz", + "integrity": "sha512-BevdH3FCA5nmbuyyMGyAhy65U904+WDrk21E1ZpspN+NptravSaOmuCKQlzr2LU5nEfCb5C4UcLUrChMrbTq8w==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "immutable": "^3.8.2", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", @@ -13239,6 +13402,16 @@ "viewport-mercator-project": "^6.1.1" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", @@ -13247,118 +13420,226 @@ } }, "@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.5.tgz", - "integrity": "sha512-3MR1OsZ+NQixK5iSjTUmM5NKvNWqB3wq3h5RdS5VfpmjjiJzMqB3ntKr6jwvc+9BY/UR0ffgwMjSe7Vg3RZZIg==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.17.8.tgz", + "integrity": "sha512-eBjUYRwBK4L8NSaeAU8u1DfxlMy8TEeQ9DewixrK9qOoDDBCuh5BUT9AJeRFp6hvNUzWBAYjEJ60nu4ZiqoaBA==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable-arc": "0.15.0" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.5.tgz", - "integrity": "sha512-aXlmOs8JGdaoq+3XnSMTK8Kj8YRKdgGxB54Kr3uI16aw7vgwO8iBq0YgI88+XLJqiKHAsJ57mmDrtCV9UxB7Aw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.17.8.tgz", + "integrity": "sha512-XJPqu41vW3Sy3c266bbhzUfi9+dWOIQ1FmzZj+5bV7YPJKjIudn/4wEAMNhg47EMGw7euATfwcz96WQd3/l70A==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "prop-types": "^15.7.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-partition": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.5.tgz", - "integrity": "sha512-LKtJ7+chkL9Vz0hKX0no+a/9/fa4n4fQO5CMSICwlNcxvURznhkKddYn5QD5fFjdFXM/JUv+jXEX9zniq/0KyA==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.17.8.tgz", + "integrity": "sha512-i0gRq/+zdIcG5BduLb3lwhUAhqmRut/fcQk6meqDts4BdrBxA16czgz6dRibl8nhjZxINgkd3k0IjlsT37stzw==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.5.tgz", - "integrity": "sha512-7e/8J16ZIyOe006XDieOpJ5ajk4C0OGkbA7m/OaFqH7cjgpWsfM7lL4SgWtmSmn8vJlidpnIy0J1BLM9Lnh67A==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.17.8.tgz", + "integrity": "sha512-elHPrhQ/Mq0/TlRhuFf/PPUFDWUizj72OBaMbbPRF2jrAHDmDqPfpixJU27mMBvkuHAUTnK5waf2scGDhvuhGg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "datatables.net-bs": "^1.10.15", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-rose": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.5.tgz", - "integrity": "sha512-r6ztR7M6WD7BywPM5pmqlb6+exB1sUE4vIScs3h80eeAQsWtaGMevzTvkNetYv3t4vZiSvelcl1Z9OpcJgar6Q==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.17.8.tgz", + "integrity": "sha512-OtKSB6W83aK+b2LriopYjfiGPhUD/qcouieu/y0A/HCSmI4VMEyoB/yc8qD15cKtHKdv6KipoKSWnelvDFIq6g==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.5.tgz", - "integrity": "sha512-HYKbeqRfJYTiGenv36U6rcNg/gRepeEMwGTWYjevVg6UNNkR5e+/efbFeX+ypMePHRtkaYX+TIe3oAFzkpk9gw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.17.8.tgz", + "integrity": "sha512-WhlSfJ9Kcoxyo9964sigdMsG3tGq1pKtOW53xg6tu5V+GHyTMX9zJhGZv0YWgocPYPgnVnNQIuujGy11fTfAGg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.5.tgz", - "integrity": "sha512-6YrhvSMSB8c7UhCVP0taLONK5dNkwxNEiGSOjuFdxqElPE/8mTPHUAPHlG+NIYECV8tcJq76/8C7V/RUIj0Hcw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.17.8.tgz", + "integrity": "sha512-7kJXUtIj2eMBYP23BcPh4nrAvscSaVEPFCfktRHmb90wzT0ihGewjMESUgSVeVhz7ZwKAoni4slsYCx1+vdKvg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.5.tgz", - "integrity": "sha512-rw5QqAbx7BeHdnJDM9nYVyTHH6Yzp2hHB2C0bHXVPIBe4L2zu71s/T8vRpGqdgFpumdpo1TgZhnrNqx4fgo3yw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.17.8.tgz", + "integrity": "sha512-+plxhWms4RPGnA/mb4THkqwBioDRmyQBUXISs3uIPFDOe7pT7Xf7rfaoEYLKxO513RZzWNMuhkhCfvJdROnM/w==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.5.tgz", - "integrity": "sha512-HCv4EiKdu8NLcW4YjXcYUSKfoj+Wj+E3UIHvz9YNh3unO2fe926DohWEQO/y24xz59s1Ha4FmJuPS4cFD5bq6w==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.17.8.tgz", + "integrity": "sha512-iha7ZfumZPdeoNK3WQARct5w3D88xv8V25ChW5ecC2n0arJTLRC0BP4IZFG0eIc7nK3LXc56Y5QVabx1CO7q5w==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.5.tgz", - "integrity": "sha512-aOJvC9uhHaJuwGWoxjB70VIG8fDljXG1skVPX7m7fjvrw2QIanv3c6mENWFYjCXjtTNjXj3XXly8d8BAv94Emw==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.17.8.tgz", + "integrity": "sha512-m0Ml4G8x9Hr8FLQVUo4packNEAE5Z0GSxJMpvP6W0FMWGw6xUirwoGBBOjceZtVqnfWQoJ49hZweDqxZfnrYsg==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -13366,6 +13647,16 @@ "prop-types": "^15.6.2" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13382,17 +13673,29 @@ } }, "@superset-ui/legacy-preset-chart-big-number": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.5.tgz", - "integrity": "sha512-dhXXSR20ekNgzVysT0LuyKgTF9Kr8wM9tceQK/zSNdpcJu4zBPuau1wSKKNm0uuuB9KrwYTNMd4JgtgrrGDqYQ==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.17.8.tgz", + "integrity": "sha512-2IJVov2w0iW5AahNOKhJf2FiLVg+VRd+UZ2aHfj7lfXwwRgmgfP7xFd9jMs91U7XOVB96OKXSDRu9GAKiORnIg==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", "shortid": "^2.2.14" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/legacy-preset-chart-deckgl": { @@ -13421,13 +13724,13 @@ } }, "@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.5.tgz", - "integrity": "sha512-0+xxCz97Yg8bA/2uN4CHrhfzSyPQViB0p1lxKVgi8S8Gd/AX3oDD3XCn84kyAFzo3aNmD27KpFfZN/GwzDJDGg==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.17.8.tgz", + "integrity": "sha512-8qCkzK0pBsI7YKvFlTE6b+Mb89AnijfpWBufMepRDyEgwCkMPc0ykRr/rPRqwxNy/N2CFd8shugFjgm3hJ/DEw==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -13438,28 +13741,135 @@ "nvd3-fork": "^2.0.5", "prop-types": "^15.6.2", "urijs": "^1.18.10" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + } } }, "@superset-ui/plugin-chart-echarts": { - "version": "0.17.6", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.6.tgz", - "integrity": "sha512-C0OXO7yrkVbHhILVb8fvxbM8O/+iB6eA8NCwwOiYNJZ/HfToZGr+ebbA6uCTf/A/WWdl8Qh/lIX8vz+GJe8d/A==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.17.8.tgz", + "integrity": "sha512-3Geqvu6R+82jZYps0OW+P8gzN2TjSWFFUo1la6ICKe6vokzwQPCaEe0EqOHJBCoX2qLTX+rtRK/YTZGOd2bb2Q==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@types/mathjs": "^6.0.7", - "echarts": "^5.0.1", + "echarts": "^5.0.2", "mathjs": "^8.0.1" + }, + "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, + "@superset-ui/core": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.8.tgz", + "integrity": "sha512-wmDPQJFkN/V/vRM4/3mI7v6bYQGMiCEdKfzdaXJU3hZcV9pGPwLkIVP+Ck4UL7uNP+rO384PNQ6GOZBGswcnCw==", + "requires": { + "@babel/runtime": "^7.1.2", + "@emotion/core": "^10.0.28", + "@emotion/styled": "^10.0.27", + "@types/d3-format": "^1.3.0", + "@types/d3-interpolate": "^1.3.1", + "@types/d3-scale": "^2.1.1", + "@types/d3-time": "^1.0.9", + "@types/d3-time-format": "^2.1.0", + "@types/lodash": "^4.14.149", + "@types/rison": "0.0.6", + "@types/seedrandom": "^2.4.28", + "@vx/responsive": "^0.0.199", + "csstype": "^2.6.4", + "d3-format": "^1.3.2", + "d3-interpolate": "^1.4.0", + "d3-scale": "^3.0.0", + "d3-time": "^1.0.10", + "d3-time-format": "^2.2.0", + "emotion-theming": "^10.0.27", + "fetch-retry": "^4.0.1", + "jed": "^1.1.1", + "lodash": "^4.17.11", + "pretty-ms": "^7.0.0", + "react-error-boundary": "^1.2.5", + "reselect": "^4.0.0", + "rison": "^0.1.1", + "seedrandom": "^3.0.5", + "whatwg-fetch": "^3.0.0" + } + }, + "@vx/responsive": { + "version": "0.0.199", + "resolved": "https://registry.npmjs.org/@vx/responsive/-/responsive-0.0.199.tgz", + "integrity": "sha512-ONrmLUAG+8wzD3cn/EmsuZh6JHeyejqup3ZsV25t04VaVJAVQAJukAfNdH8YiwSJu0zSo+txkBTfrnOmFyQLOw==", + "requires": { + "@types/lodash": "^4.14.146", + "@types/react": "*", + "lodash": "^4.17.10", + "prop-types": "^15.6.1", + "resize-observer-polyfill": "1.5.1" + } + }, + "d3-array": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", + "integrity": "sha512-26clcwmHQEdsLv34oNKq5Ia9tQ26Y/4HqS3dQzF42QBUqymZJ+9PORcN1G52bt37NsL2ABoX4lvyYZc+A9Y0zw==", + "requires": { + "internmap": "^1.0.0" + } + }, + "d3-interpolate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz", + "integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==", + "requires": { + "d3-color": "1" + } + }, + "d3-scale": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", + "integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==", + "requires": { + "d3-array": "^2.3.0", + "d3-format": "1 - 2", + "d3-interpolate": "1.2.0 - 2", + "d3-time": "1 - 2", + "d3-time-format": "2 - 3" + } + }, + "d3-time-format": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz", + "integrity": "sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==", + "requires": { + "d3-time": "1" + } + } } }, "@superset-ui/plugin-chart-table": { - "version": "0.17.6", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.6.tgz", - "integrity": "sha512-s5pfX1/AxKuiTlBOovBjI8fmMjkn2gcjxWsrhjrvo9sfeCtZ64PObTobNiKHlKrc43YLf2ZKiNY9MiWBlsT3ZA==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.17.8.tgz", + "integrity": "sha512-UbYy8aikU5+lfrTcxn3dBjv/QQmQIHEAcECJIyTcEB6pZDKKzn9jGZ84bNyzDkK4rcs2hfaKDZ9R/yKtcwwkiQ==", "requires": { "@emotion/core": "^10.0.28", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@types/d3-array": "^2.0.0", "@types/react-table": "^7.0.19", "d3-array": "^2.4.0", @@ -13471,6 +13881,16 @@ "xss": "^1.0.6" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13482,12 +13902,12 @@ } }, "@superset-ui/plugin-chart-word-cloud": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.5.tgz", - "integrity": "sha512-jUE2RTKeLQcpKmk3ktxn7NwJOUIg7n4GCQFR0meFCJqH5TRV4E9UEfmZSo0FXhSzcUUerJSyfmXdxtzcCQMC3Q==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.17.8.tgz", + "integrity": "sha512-rjXA2r7unQJcmJv1i2wfoY/HsMygVALKeO3Zf3p8ls4BIIXgsMlQgnoEOD4XJmfclB85i7/5dbTW6XMuxzB2pA==", "requires": { - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -13496,6 +13916,63 @@ "encodable": "^0.7.6" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, + "@superset-ui/core": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.17.8.tgz", + "integrity": "sha512-wmDPQJFkN/V/vRM4/3mI7v6bYQGMiCEdKfzdaXJU3hZcV9pGPwLkIVP+Ck4UL7uNP+rO384PNQ6GOZBGswcnCw==", + "requires": { + "@babel/runtime": "^7.1.2", + "@emotion/core": "^10.0.28", + "@emotion/styled": "^10.0.27", + "@types/d3-format": "^1.3.0", + "@types/d3-interpolate": "^1.3.1", + "@types/d3-scale": "^2.1.1", + "@types/d3-time": "^1.0.9", + "@types/d3-time-format": "^2.1.0", + "@types/lodash": "^4.14.149", + "@types/rison": "0.0.6", + "@types/seedrandom": "^2.4.28", + "@vx/responsive": "^0.0.199", + "csstype": "^2.6.4", + "d3-format": "^1.3.2", + "d3-interpolate": "^1.4.0", + "d3-scale": "^3.0.0", + "d3-time": "^1.0.10", + "d3-time-format": "^2.2.0", + "emotion-theming": "^10.0.27", + "fetch-retry": "^4.0.1", + "jed": "^1.1.1", + "lodash": "^4.17.11", + "pretty-ms": "^7.0.0", + "react-error-boundary": "^1.2.5", + "reselect": "^4.0.0", + "rison": "^0.1.1", + "seedrandom": "^3.0.5", + "whatwg-fetch": "^3.0.0" + } + }, + "@vx/responsive": { + "version": "0.0.199", + "resolved": "https://registry.npmjs.org/@vx/responsive/-/responsive-0.0.199.tgz", + "integrity": "sha512-ONrmLUAG+8wzD3cn/EmsuZh6JHeyejqup3ZsV25t04VaVJAVQAJukAfNdH8YiwSJu0zSo+txkBTfrnOmFyQLOw==", + "requires": { + "@types/lodash": "^4.14.146", + "@types/react": "*", + "lodash": "^4.17.10", + "prop-types": "^15.6.1", + "resize-observer-polyfill": "1.5.1" + } + }, "d3-array": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.11.0.tgz", @@ -13504,6 +13981,14 @@ "internmap": "^1.0.0" } }, + "d3-interpolate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz", + "integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==", + "requires": { + "d3-color": "1" + } + }, "d3-scale": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", @@ -13515,18 +14000,26 @@ "d3-time": "1 - 2", "d3-time-format": "2 - 3" } + }, + "d3-time-format": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz", + "integrity": "sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==", + "requires": { + "d3-time": "1" + } } } }, "@superset-ui/preset-chart-xy": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.5.tgz", - "integrity": "sha512-hFPVjc7IfgFEmh3Vqt2OYGawbRu1hdbQzo/Q/p0u9Q1lKdW6TNXBkATEKTBSTbVqFxgQSGktalAW3gzlpYKK/A==", + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.17.8.tgz", + "integrity": "sha512-GhbmK4W6mTzqlPxOF3MiS5r1onskn/zKI0EYKnRiD87VEAPrSK5UdgnlaAyf+xwUni8xkHBUY4/zAzDxrN2pcw==", "requires": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.17.5", - "@superset-ui/core": "0.17.5", + "@superset-ui/chart-controls": "0.17.8", + "@superset-ui/core": "0.17.8", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -13536,6 +14029,16 @@ "reselect": "^4.0.0" }, "dependencies": { + "@superset-ui/chart-controls": { + "version": "0.17.8", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.17.8.tgz", + "integrity": "sha512-fdXwKPXv+nFuuPzUaQ0LvTny9sVj046FoEAxo7PIEDEFXh9iCWj0Jcb6UaJMhtDD//KNkXkgcAyZMX9Yu3FLBA==", + "requires": { + "@superset-ui/core": "0.17.8", + "lodash": "^4.17.15", + "prop-types": "^15.7.2" + } + }, "@vx/axis": { "version": "0.0.198", "resolved": "https://registry.npmjs.org/@vx/axis/-/axis-0.0.198.tgz", @@ -23289,12 +23792,12 @@ } }, "echarts": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.0.1.tgz", - "integrity": "sha512-JYn22Dolt2esY2jEzUsw1OxbobuW67oGjIoTjZO3rW89SWkfJ4kbrmC2OW9JjsBrD1rdkmaWBuZZ2HgmThyxJw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.0.2.tgz", + "integrity": "sha512-En0VYpc96nw2/2AZoBWPHsGi471zMublttj50kfFpYAeR4geup0Tj9iVgEXh7QYZFPnRiruDJEjcB5PXZ+BYzQ==", "requires": { "tslib": "2.0.3", - "zrender": "5.0.3" + "zrender": "5.0.4" }, "dependencies": { "tslib": { @@ -49206,9 +49709,9 @@ "dev": true }, "zrender": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.3.tgz", - "integrity": "sha512-TVcN2IMdo7je3GEq/E4CER4AGBe/n50/izILdupppyHf/hVHuiXCRliqdu8+32Z1OmGg6RfKt5qQlkX+bOtU0g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.4.tgz", + "integrity": "sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw==", "requires": { "tslib": "2.0.3" }, diff --git a/superset-frontend/package.json b/superset-frontend/package.json index f29760cf5875f..e141572777ec2 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -65,34 +65,34 @@ "@babel/runtime-corejs3": "^7.12.5", "@data-ui/sparkline": "^0.0.84", "@emotion/core": "^10.0.35", - "@superset-ui/chart-controls": "^0.17.5", - "@superset-ui/core": "^0.17.5", - "@superset-ui/legacy-plugin-chart-calendar": "^0.17.5", - "@superset-ui/legacy-plugin-chart-chord": "^0.17.5", - "@superset-ui/legacy-plugin-chart-country-map": "^0.17.5", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.5", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.5", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.5", - "@superset-ui/legacy-plugin-chart-histogram": "^0.17.5", - "@superset-ui/legacy-plugin-chart-horizon": "^0.17.5", - "@superset-ui/legacy-plugin-chart-map-box": "^0.17.5", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.5", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.5", - "@superset-ui/legacy-plugin-chart-partition": "^0.17.5", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.5", - "@superset-ui/legacy-plugin-chart-rose": "^0.17.5", - "@superset-ui/legacy-plugin-chart-sankey": "^0.17.5", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.5", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.5", - "@superset-ui/legacy-plugin-chart-treemap": "^0.17.5", - "@superset-ui/legacy-plugin-chart-world-map": "^0.17.5", - "@superset-ui/legacy-preset-chart-big-number": "^0.17.5", + "@superset-ui/chart-controls": "^0.17.8", + "@superset-ui/core": "^0.17.8", + "@superset-ui/legacy-plugin-chart-calendar": "^0.17.8", + "@superset-ui/legacy-plugin-chart-chord": "^0.17.8", + "@superset-ui/legacy-plugin-chart-country-map": "^0.17.8", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.17.8", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.17.8", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.17.8", + "@superset-ui/legacy-plugin-chart-histogram": "^0.17.8", + "@superset-ui/legacy-plugin-chart-horizon": "^0.17.8", + "@superset-ui/legacy-plugin-chart-map-box": "^0.17.8", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.17.8", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.17.8", + "@superset-ui/legacy-plugin-chart-partition": "^0.17.8", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.17.8", + "@superset-ui/legacy-plugin-chart-rose": "^0.17.8", + "@superset-ui/legacy-plugin-chart-sankey": "^0.17.8", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.17.8", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.17.8", + "@superset-ui/legacy-plugin-chart-treemap": "^0.17.8", + "@superset-ui/legacy-plugin-chart-world-map": "^0.17.8", + "@superset-ui/legacy-preset-chart-big-number": "^0.17.8", "@superset-ui/legacy-preset-chart-deckgl": "^0.4.1", - "@superset-ui/legacy-preset-chart-nvd3": "^0.17.5", - "@superset-ui/plugin-chart-echarts": "^0.17.6", - "@superset-ui/plugin-chart-table": "^0.17.6", - "@superset-ui/plugin-chart-word-cloud": "^0.17.5", - "@superset-ui/preset-chart-xy": "^0.17.5", + "@superset-ui/legacy-preset-chart-nvd3": "^0.17.8", + "@superset-ui/plugin-chart-echarts": "^0.17.8", + "@superset-ui/plugin-chart-table": "^0.17.8", + "@superset-ui/plugin-chart-word-cloud": "^0.17.8", + "@superset-ui/preset-chart-xy": "^0.17.8", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl.jsx b/superset-frontend/src/explore/components/controls/VizTypeControl.jsx index 1f82080831cad..af30ce86a6efa 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl.jsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl.jsx @@ -19,7 +19,7 @@ import React, { useEffect, useRef, useState } from 'react'; import PropTypes from 'prop-types'; import { Row, Col, FormControl } from 'react-bootstrap'; -import { t, getChartMetadataRegistry } from '@superset-ui/core'; +import { Behavior, t, getChartMetadataRegistry } from '@superset-ui/core'; import { useDynamicPluginContext } from 'src/components/DynamicPlugins'; import { Tooltip } from 'src/common/components/Tooltip'; import Modal from 'src/common/components/Modal'; @@ -166,7 +166,10 @@ const VizTypeControl = props => { const filterString = filter.toLowerCase(); const filteredTypes = DEFAULT_ORDER.filter(type => registry.has(type)) - .filter(type => !registry.get(type).isNativeFilter) + .filter(type => { + const behaviors = registry.get(type)?.behaviors || []; + return behaviors.includes(Behavior.CROSS_FILTER) || !behaviors.length; + }) .map(type => ({ key: type, value: registry.get(type), @@ -174,7 +177,10 @@ const VizTypeControl = props => { .concat( registry .entries() - .filter(entry => !entry.value.isNativeFilter) + .filter(entry => { + const behaviors = entry.value?.behaviors || []; + return behaviors.includes(Behavior.CROSS_FILTER) || !behaviors.length; + }) .filter(({ key }) => !typesWithDefaultOrder.has(key)), ) .filter(entry => entry.value.name.toLowerCase().includes(filterString)); diff --git a/superset-frontend/src/filters/components/Range/AntdRangeFilter.tsx b/superset-frontend/src/filters/components/Range/AntdRangeFilter.tsx index 5fb047136620d..82ae289ba2fee 100644 --- a/superset-frontend/src/filters/components/Range/AntdRangeFilter.tsx +++ b/superset-frontend/src/filters/components/Range/AntdRangeFilter.tsx @@ -39,7 +39,12 @@ export default function AntdRangeFilter(props: AntdPluginFilterRangeProps) { const handleChange = (value: [number, number]) => { const [lower, upper] = value; - setExtraFormData(getRangeExtraFormData(col, lower, upper)); + setExtraFormData({ + extraFormData: getRangeExtraFormData(col, lower, upper), + currentState: { + value, + }, + }); }; return ( diff --git a/superset-frontend/src/filters/components/Range/index.ts b/superset-frontend/src/filters/components/Range/index.ts index 73fbfa7f6b76c..a3715eb821320 100644 --- a/superset-frontend/src/filters/components/Range/index.ts +++ b/superset-frontend/src/filters/components/Range/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; @@ -27,7 +27,7 @@ export default class AntdRangeFilterPlugin extends ChartPlugin { const metadata = new ChartMetadata({ name: t('Range filter plugin'), description: 'Range filter plugin using AntD', - isNativeFilter: true, + behaviors: [Behavior.CROSS_FILTER, Behavior.NATIVE_FILTER], thumbnail, }); diff --git a/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx b/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx index d9f89c9aec902..85f567ac5d5d5 100644 --- a/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx +++ b/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx @@ -67,14 +67,12 @@ export default function AntdPluginFilterSelect( const emptyFilter = enableEmptyFilter && !inverseSelection && resultValue?.length === 0; setExtraFormData({ - // @ts-ignore extraFormData: getSelectExtraFormData( col, resultValue, emptyFilter, inverseSelection, ), - // @ts-ignore (add to superset-ui/core) currentState: { value: resultValue, }, diff --git a/superset-frontend/src/filters/components/Select/index.ts b/superset-frontend/src/filters/components/Select/index.ts index 7f3cb2ab8ba52..15ba0579ac9a2 100644 --- a/superset-frontend/src/filters/components/Select/index.ts +++ b/superset-frontend/src/filters/components/Select/index.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core'; +import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; @@ -27,7 +27,7 @@ export default class AntdFilterSelectPlugin extends ChartPlugin { const metadata = new ChartMetadata({ name: t('Select filter plugin'), description: 'Select filter plugin using AntD', - isNativeFilter: true, + behaviors: [Behavior.CROSS_FILTER, Behavior.NATIVE_FILTER], thumbnail, }); diff --git a/superset/examples/configs/charts/Are_you_an_ethnic_minority_in_your_city.yaml b/superset/examples/configs/charts/Are_you_an_ethnic_minority_in_your_city.yaml index b170d6ab3c881..2a8b7ed460aa2 100644 --- a/superset/examples/configs/charts/Are_you_an_ethnic_minority_in_your_city.yaml +++ b/superset/examples/configs/charts/Are_you_an_ethnic_minority_in_your_city.yaml @@ -30,7 +30,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 69 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/First_Time_Developer.yaml b/superset/examples/configs/charts/First_Time_Developer.yaml index d1c0902f0e003..35632033c5c97 100644 --- a/superset/examples/configs/charts/First_Time_Developer.yaml +++ b/superset/examples/configs/charts/First_Time_Developer.yaml @@ -38,7 +38,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 69 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Gender.yaml b/superset/examples/configs/charts/Gender.yaml index c20d02e7b0ba9..bfa464ec9ab7e 100644 --- a/superset/examples/configs/charts/Gender.yaml +++ b/superset/examples/configs/charts/Gender.yaml @@ -30,7 +30,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 69 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Most_Dominant_Platforms.yaml b/superset/examples/configs/charts/Most_Dominant_Platforms.yaml index 0ba3c70db263b..d02491efcd6e1 100644 --- a/superset/examples/configs/charts/Most_Dominant_Platforms.yaml +++ b/superset/examples/configs/charts/Most_Dominant_Platforms.yaml @@ -58,7 +58,7 @@ params: sqlExpression: null number_format: SMART_NUMBER outerRadius: 67 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Overall_Sales_By_Product_Line.yaml b/superset/examples/configs/charts/Overall_Sales_By_Product_Line.yaml index e7c6797eec0cc..5fafb777ef59e 100644 --- a/superset/examples/configs/charts/Overall_Sales_By_Product_Line.yaml +++ b/superset/examples/configs/charts/Overall_Sales_By_Product_Line.yaml @@ -49,7 +49,7 @@ params: sqlExpression: null number_format: SMART_NUMBER outerRadius: 65 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Relocation_ability.yaml b/superset/examples/configs/charts/Relocation_ability.yaml index 4d5111ce60ac7..82fb80dd2de53 100644 --- a/superset/examples/configs/charts/Relocation_ability.yaml +++ b/superset/examples/configs/charts/Relocation_ability.yaml @@ -38,7 +38,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 69 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Vaccine_Candidates_per_Phase.yaml b/superset/examples/configs/charts/Vaccine_Candidates_per_Phase.yaml index 180f0b44bc4f8..041033a3f953e 100644 --- a/superset/examples/configs/charts/Vaccine_Candidates_per_Phase.yaml +++ b/superset/examples/configs/charts/Vaccine_Candidates_per_Phase.yaml @@ -29,7 +29,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 61 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/examples/configs/charts/Work_Location_Preference.yaml b/superset/examples/configs/charts/Work_Location_Preference.yaml index bbf08911fb737..62f80cb323add 100644 --- a/superset/examples/configs/charts/Work_Location_Preference.yaml +++ b/superset/examples/configs/charts/Work_Location_Preference.yaml @@ -38,7 +38,7 @@ params: metric: count number_format: SMART_NUMBER outerRadius: 69 - pie_label_type: key + label_type: key queryFields: groupby: groupby metric: metrics diff --git a/superset/migrations/versions/41ce8799acc3_rename_pie_label_type.py b/superset/migrations/versions/41ce8799acc3_rename_pie_label_type.py new file mode 100644 index 0000000000000..4328eb29108e0 --- /dev/null +++ b/superset/migrations/versions/41ce8799acc3_rename_pie_label_type.py @@ -0,0 +1,102 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""rename pie label type + +Revision ID: 41ce8799acc3 +Revises: e11ccdd12658 +Create Date: 2021-02-10 12:32:27.385579 + +""" + +# revision identifiers, used by Alembic. +revision = "41ce8799acc3" +down_revision = "e11ccdd12658" + +import json + +from alembic import op +from sqlalchemy import and_, Column, Integer, String, Text +from sqlalchemy.ext.declarative import declarative_base + +from superset import db + +Base = declarative_base() + + +class Slice(Base): + """Declarative class to do query in upgrade""" + + __tablename__ = "slices" + id = Column(Integer, primary_key=True) + viz_type = Column(String(250)) + params = Column(Text) + + +def upgrade(): + bind = op.get_bind() + session = db.Session(bind=bind) + + slices = ( + session.query(Slice) + .filter(and_(Slice.viz_type == "pie", Slice.params.like("%pie_label_type%"))) + .all() + ) + changes = 0 + for slc in slices: + try: + params = json.loads(slc.params) + pie_label_type = params.pop("pie_label_type", None) + if pie_label_type: + changes += 1 + params["label_type"] = pie_label_type + slc.params = json.dumps(params, sort_keys=True) + except Exception as e: + print(e) + print(f"Parsing params for slice {slc.id} failed.") + pass + + session.commit() + session.close() + print(f"Updated {changes} pie chart labels.") + + +def downgrade(): + bind = op.get_bind() + session = db.Session(bind=bind) + + slices = ( + session.query(Slice) + .filter(and_(Slice.viz_type == "pie", Slice.params.like("%label_type%"))) + .all() + ) + changes = 0 + for slc in slices: + try: + params = json.loads(slc.params) + label_type = params.pop("label_type", None) + if label_type: + changes += 1 + params["pie_label_type"] = label_type + slc.params = json.dumps(params, sort_keys=True) + except Exception as e: + print(e) + print(f"Parsing params for slice {slc.id} failed.") + pass + + session.commit() + session.close() + print(f"Updated {changes} pie chart labels.")