From c01c9406cb4b2f5ba8e600ee60b6442397e9522a Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 8 Sep 2021 20:39:51 +0300 Subject: [PATCH 01/23] Update label colors on the fly --- superset-frontend/src/chart/ChartRenderer.jsx | 1 + .../src/dashboard/actions/dashboardInfo.ts | 19 ++++++++++++++++++- .../src/dashboard/containers/Chart.jsx | 11 ++++++++++- .../charts/getFormDataWithExtraFilters.ts | 6 ++---- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/chart/ChartRenderer.jsx index bbc4213817c3..cbd0970f9195 100644 --- a/superset-frontend/src/chart/ChartRenderer.jsx +++ b/superset-frontend/src/chart/ChartRenderer.jsx @@ -100,6 +100,7 @@ class ChartRenderer extends React.Component { nextProps.height !== this.props.height || nextProps.width !== this.props.width || nextProps.triggerRender || + nextProps.formData.label_colors !== this.props.formData.label_colors || nextProps.formData.color_scheme !== this.props.formData.color_scheme || nextProps.cacheBusterProp !== this.props.cacheBusterProp ); diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 3aa30936dced..b539e8e39748 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -17,13 +17,30 @@ * under the License. */ import { Dispatch } from 'redux'; -import { makeApi } from '@superset-ui/core'; +import { makeApi, CategoricalColorNamespace } from '@superset-ui/core'; +import { isString } from 'lodash'; import { ChartConfiguration, DashboardInfo } from '../reducers/types'; export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED'; // updates partially changed dashboard info export function dashboardInfoChanged(newInfo: { metadata: any }) { + const { metadata } = newInfo; + + if (metadata?.label_colors) { + const scheme = metadata.color_scheme; + const namespace = metadata.color_namespace; + const colorMap = isString(metadata.label_colors) + ? JSON.parse(metadata.label_colors) + : metadata.label_colors; + Object.keys(colorMap).forEach(label => { + CategoricalColorNamespace.getScale(scheme, namespace).setColor( + label, + colorMap[label], + ); + }); + } + return { type: DASHBOARD_INFO_UPDATED, newInfo }; } export const SET_CHART_CONFIG_BEGIN = 'SET_CHART_CONFIG_BEGIN'; diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index c629209d4254..b3e9c368c4f2 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -19,6 +19,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import { CategoricalColorNamespace } from '@superset-ui/core'; import { toggleExpandSlice, setFocusedFilterField, @@ -59,7 +60,8 @@ function mapStateToProps( (chart && chart.form_data && datasources[chart.form_data.datasource]) || PLACEHOLDER_DATASOURCE; const { colorScheme, colorNamespace } = dashboardState; - + const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); + const scaleLabelColors = scale.getColorMap(); // note: this method caches filters if possible to prevent render cascades const formData = getFormDataWithExtraFilters({ layout: dashboardLayout.present, @@ -73,8 +75,15 @@ function mapStateToProps( sliceId: id, nativeFilters, dataMask, + labelColors: + Object.keys(dashboardInfo.metadata.label_colors).length > 0 + ? dashboardInfo.metadata.label_colors + : scaleLabelColors, }); + console.log('dashboardInfo', dashboardInfo); + console.log('formData', formData); + formData.dashboardId = dashboardInfo.id; return { diff --git a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts index ea5ef7b3aa0e..e90dcbde75c7 100644 --- a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts +++ b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts @@ -45,6 +45,7 @@ export interface GetFormDataWithExtraFiltersArguments { sliceId: number; dataMask: DataMaskStateWithId; nativeFilters: NativeFiltersState; + labelColors: Record; } // this function merge chart's formData with dashboard filters value, @@ -61,11 +62,8 @@ export default function getFormDataWithExtraFilters({ sliceId, layout, dataMask, + labelColors, }: GetFormDataWithExtraFiltersArguments) { - // Propagate color mapping to chart - const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); - const labelColors = scale.getColorMap(); - // if dashboard metadata + filters have not changed, use cache if possible const cachedFormData = cachedFormdataByChart[sliceId]; if ( From df8d585cdbd5bf69d2720687e49168f37ee6d54f Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 8 Sep 2021 20:42:28 +0300 Subject: [PATCH 02/23] Clean up --- superset-frontend/src/dashboard/containers/Chart.jsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index b3e9c368c4f2..38800f067fca 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -81,9 +81,6 @@ function mapStateToProps( : scaleLabelColors, }); - console.log('dashboardInfo', dashboardInfo); - console.log('formData', formData); - formData.dashboardId = dashboardInfo.id; return { From 8b607229e161fb4826533dd73d54c7b24d0f49af Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 8 Sep 2021 20:48:35 +0300 Subject: [PATCH 03/23] Improve getFormDataWithExtraFilters --- superset-frontend/src/dashboard/containers/Chart.jsx | 6 ++---- .../dashboard/util/charts/getFormDataWithExtraFilters.ts | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index 38800f067fca..837afef923e5 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -19,7 +19,6 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -import { CategoricalColorNamespace } from '@superset-ui/core'; import { toggleExpandSlice, setFocusedFilterField, @@ -60,8 +59,6 @@ function mapStateToProps( (chart && chart.form_data && datasources[chart.form_data.datasource]) || PLACEHOLDER_DATASOURCE; const { colorScheme, colorNamespace } = dashboardState; - const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); - const scaleLabelColors = scale.getColorMap(); // note: this method caches filters if possible to prevent render cascades const formData = getFormDataWithExtraFilters({ layout: dashboardLayout.present, @@ -76,9 +73,10 @@ function mapStateToProps( nativeFilters, dataMask, labelColors: + dashboardInfo?.metadata?.label_colors && Object.keys(dashboardInfo.metadata.label_colors).length > 0 ? dashboardInfo.metadata.label_colors - : scaleLabelColors, + : undefined, }); formData.dashboardId = dashboardInfo.id; diff --git a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts index e90dcbde75c7..97ed851cc707 100644 --- a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts +++ b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts @@ -45,7 +45,7 @@ export interface GetFormDataWithExtraFiltersArguments { sliceId: number; dataMask: DataMaskStateWithId; nativeFilters: NativeFiltersState; - labelColors: Record; + labelColors?: Record; } // this function merge chart's formData with dashboard filters value, @@ -64,6 +64,8 @@ export default function getFormDataWithExtraFilters({ dataMask, labelColors, }: GetFormDataWithExtraFiltersArguments) { + const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); + const scaleLabelColors = labelColors || scale.getColorMap(); // if dashboard metadata + filters have not changed, use cache if possible const cachedFormData = cachedFormdataByChart[sliceId]; if ( @@ -108,7 +110,7 @@ export default function getFormDataWithExtraFilters({ const formData = { ...chart.formData, ...(colorScheme && { color_scheme: colorScheme }), - label_colors: labelColors, + label_colors: scaleLabelColors, extra_filters: getEffectiveExtraFilters(filters), ...extraData, }; From f284259e62e3984551877aca52055094e34ea60b Mon Sep 17 00:00:00 2001 From: geido Date: Thu, 7 Oct 2021 12:02:19 +0000 Subject: [PATCH 04/23] Improve code structure --- .../src/dashboard/actions/dashboardInfo.ts | 13 ++++++++----- .../src/dashboard/containers/Chart.jsx | 8 +++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index b539e8e39748..51ab7c6ceaa8 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -28,11 +28,14 @@ export function dashboardInfoChanged(newInfo: { metadata: any }) { const { metadata } = newInfo; if (metadata?.label_colors) { - const scheme = metadata.color_scheme; - const namespace = metadata.color_namespace; - const colorMap = isString(metadata.label_colors) - ? JSON.parse(metadata.label_colors) - : metadata.label_colors; + const { + color_scheme: scheme, + color_namespace: namespace, + label_colors: labelColors, + } = metadata; + const colorMap = isString(labelColors) + ? JSON.parse(labelColors) + : labelColors; Object.keys(colorMap).forEach(label => { CategoricalColorNamespace.getScale(scheme, namespace).setColor( label, diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index f6c6a8d8bd28..cb692225ea6d 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -61,6 +61,8 @@ function mapStateToProps( (chart && chart.form_data && datasources[chart.form_data.datasource]) || PLACEHOLDER_DATASOURCE; const { colorScheme, colorNamespace } = dashboardState; + const { metadata } = dashboardInfo; + const labelColors = metadata?.label_colors; // note: this method caches filters if possible to prevent render cascades const formData = getFormDataWithExtraFilters({ layout: dashboardLayout.present, @@ -74,11 +76,7 @@ function mapStateToProps( sliceId: id, nativeFilters, dataMask, - labelColors: - dashboardInfo?.metadata?.label_colors && - Object.keys(dashboardInfo.metadata.label_colors).length > 0 - ? dashboardInfo.metadata.label_colors - : undefined, + labelColors: labelColors && Object.keys(labelColors).length && labelColors, }); formData.dashboardId = dashboardInfo.id; From 69b7b62a7e239808655c5517029a4f6f784460ff Mon Sep 17 00:00:00 2001 From: geido Date: Thu, 7 Oct 2021 12:59:55 +0000 Subject: [PATCH 05/23] Remove labelColors from formData --- superset-frontend/src/chart/Chart.jsx | 1 + superset-frontend/src/chart/ChartRenderer.jsx | 3 ++- .../dashboard/components/gridComponents/Chart.jsx | 3 +++ .../src/dashboard/containers/Chart.jsx | 2 +- .../util/charts/getFormDataWithExtraFilters.ts | 13 +------------ 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx index e5cfd72585ed..106cfcdcfaae 100644 --- a/superset-frontend/src/chart/Chart.jsx +++ b/superset-frontend/src/chart/Chart.jsx @@ -44,6 +44,7 @@ const propTypes = { // formData contains chart's own filter parameter // and merged with extra filter that current dashboard applying formData: PropTypes.object.isRequired, + labelColors: PropTypes.object, width: PropTypes.number, height: PropTypes.number, setControlValue: PropTypes.func, diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/chart/ChartRenderer.jsx index cbd0970f9195..ac8b8db2ddee 100644 --- a/superset-frontend/src/chart/ChartRenderer.jsx +++ b/superset-frontend/src/chart/ChartRenderer.jsx @@ -29,6 +29,7 @@ const propTypes = { datasource: PropTypes.object, initialValues: PropTypes.object, formData: PropTypes.object.isRequired, + labelColors: PropTypes.object, height: PropTypes.number, width: PropTypes.number, setControlValue: PropTypes.func, @@ -100,7 +101,7 @@ class ChartRenderer extends React.Component { nextProps.height !== this.props.height || nextProps.width !== this.props.width || nextProps.triggerRender || - nextProps.formData.label_colors !== this.props.formData.label_colors || + nextProps.labelColors !== this.props.labelColors || nextProps.formData.color_scheme !== this.props.formData.color_scheme || nextProps.cacheBusterProp !== this.props.cacheBusterProp ); diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 60cbab729530..2f3c556bf5d6 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -52,6 +52,7 @@ const propTypes = { // from redux chart: chartPropShape.isRequired, formData: PropTypes.object.isRequired, + labelColors: PropTypes.object, datasource: PropTypes.object, slice: slicePropShape.isRequired, sliceName: PropTypes.string.isRequired, @@ -274,6 +275,7 @@ export default class Chart extends React.Component { editMode, filters, formData, + labelColors, updateSliceName, sliceName, toggleExpandSlice, @@ -396,6 +398,7 @@ export default class Chart extends React.Component { dashboardId={dashboardId} initialValues={initialValues} formData={formData} + labelColors={labelColors} ownState={ownState} filterState={filterState} queriesResponse={chart.queriesResponse} diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index cb692225ea6d..830f30638de7 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -76,7 +76,6 @@ function mapStateToProps( sliceId: id, nativeFilters, dataMask, - labelColors: labelColors && Object.keys(labelColors).length && labelColors, }); formData.dashboardId = dashboardInfo.id; @@ -84,6 +83,7 @@ function mapStateToProps( return { chart, datasource, + labelColors: labelColors && Object.keys(labelColors).length && labelColors, slice: sliceEntities.slices[id], timeout: dashboardInfo.common.conf.SUPERSET_WEBSERVER_TIMEOUT, filters: getActiveFilters() || EMPTY_OBJECT, diff --git a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts index 97ed851cc707..cace8ddedf35 100644 --- a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts +++ b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts @@ -16,11 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { - CategoricalColorNamespace, - DataRecordFilters, - JsonObject, -} from '@superset-ui/core'; +import { DataRecordFilters, JsonObject } from '@superset-ui/core'; import { ChartQueryPayload, Charts, LayoutItem } from 'src/dashboard/types'; import { getExtraFormData } from 'src/dashboard/components/nativeFilters/utils'; import { DataMaskStateWithId } from 'src/dataMask/types'; @@ -62,10 +58,7 @@ export default function getFormDataWithExtraFilters({ sliceId, layout, dataMask, - labelColors, }: GetFormDataWithExtraFiltersArguments) { - const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); - const scaleLabelColors = labelColors || scale.getColorMap(); // if dashboard metadata + filters have not changed, use cache if possible const cachedFormData = cachedFormdataByChart[sliceId]; if ( @@ -76,9 +69,6 @@ export default function getFormDataWithExtraFilters({ areObjectsEqual(cachedFormData?.color_namespace, colorNamespace, { ignoreUndefined: true, }) && - areObjectsEqual(cachedFormData?.label_colors, labelColors, { - ignoreUndefined: true, - }) && !!cachedFormData && areObjectsEqual(cachedFormData?.dataMask, dataMask, { ignoreUndefined: true, @@ -110,7 +100,6 @@ export default function getFormDataWithExtraFilters({ const formData = { ...chart.formData, ...(colorScheme && { color_scheme: colorScheme }), - label_colors: scaleLabelColors, extra_filters: getEffectiveExtraFilters(filters), ...extraData, }; From 3f9ea8456327475b5f0bfc275d87115f11530e00 Mon Sep 17 00:00:00 2001 From: geido Date: Fri, 8 Oct 2021 16:29:34 +0000 Subject: [PATCH 06/23] Exclude label_colors from URL --- .../src/dashboard/containers/Chart.jsx | 1 + .../util/charts/getFormDataWithExtraFilters.ts | 14 +++++++++++++- .../src/explore/exploreUtils/index.js | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index 830f30638de7..ec80323bb276 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -76,6 +76,7 @@ function mapStateToProps( sliceId: id, nativeFilters, dataMask, + labelColors, }); formData.dashboardId = dashboardInfo.id; diff --git a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts index cace8ddedf35..3e705ce90a25 100644 --- a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts +++ b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts @@ -16,7 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -import { DataRecordFilters, JsonObject } from '@superset-ui/core'; +import { + CategoricalColorNamespace, + DataRecordFilters, + JsonObject, +} from '@superset-ui/core'; import { ChartQueryPayload, Charts, LayoutItem } from 'src/dashboard/types'; import { getExtraFormData } from 'src/dashboard/components/nativeFilters/utils'; import { DataMaskStateWithId } from 'src/dataMask/types'; @@ -58,7 +62,10 @@ export default function getFormDataWithExtraFilters({ sliceId, layout, dataMask, + labelColors, }: GetFormDataWithExtraFiltersArguments) { + const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); + const scaleLabelColors = labelColors || scale.getColorMap(); // if dashboard metadata + filters have not changed, use cache if possible const cachedFormData = cachedFormdataByChart[sliceId]; if ( @@ -69,6 +76,9 @@ export default function getFormDataWithExtraFilters({ areObjectsEqual(cachedFormData?.color_namespace, colorNamespace, { ignoreUndefined: true, }) && + areObjectsEqual(cachedFormData?.label_colors, scaleLabelColors, { + ignoreUndefined: true, + }) && !!cachedFormData && areObjectsEqual(cachedFormData?.dataMask, dataMask, { ignoreUndefined: true, @@ -99,10 +109,12 @@ export default function getFormDataWithExtraFilters({ const formData = { ...chart.formData, + label_colors: scaleLabelColors, ...(colorScheme && { color_scheme: colorScheme }), extra_filters: getEffectiveExtraFilters(filters), ...extraData, }; + cachedFiltersByChart[sliceId] = filters; cachedFormdataByChart[sliceId] = { ...formData, dataMask }; diff --git a/superset-frontend/src/explore/exploreUtils/index.js b/superset-frontend/src/explore/exploreUtils/index.js index ddcd95b82a43..d15ff372c9f4 100644 --- a/superset-frontend/src/explore/exploreUtils/index.js +++ b/superset-frontend/src/explore/exploreUtils/index.js @@ -103,6 +103,10 @@ export function getExploreLongUrl( return null; } + // label_colors should not pollute the URL + // eslint-disable-next-line no-param-reassign + delete formData.label_colors; + const uri = new URI('/'); const directory = getURIDirectory(endpointType); const search = uri.search(true); @@ -159,6 +163,11 @@ export function getExploreUrl({ if (!formData.datasource) { return null; } + + // label_colors should not pollute the URL + // eslint-disable-next-line no-param-reassign + delete formData.label_colors; + let uri = getChartDataUri({ path: '/', allowDomainSharding }); if (curUrl) { uri = URI(URI(curUrl).search()); From 70b477ece2593ebfc32281c069bafce6ebcfef8d Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 13 Oct 2021 14:13:31 +0000 Subject: [PATCH 07/23] Refactor color scheme implementation --- .../src/dashboard/actions/dashboardInfo.ts | 4 +- .../src/dashboard/actions/hydrate.js | 4 +- .../src/dashboard/components/Header/index.jsx | 19 ++---- .../components/PropertiesModal/index.jsx | 2 +- .../src/dashboard/components/SaveModal.tsx | 12 ++-- .../src/dashboard/containers/Chart.jsx | 5 +- .../charts/getFormDataWithExtraFilters.ts | 12 +--- .../explore/components/ExploreChartHeader.jsx | 59 ++++++++++++++++++- .../explore/components/ExploreChartPanel.jsx | 2 + .../components/ExploreViewContainer.jsx | 1 + .../components/PropertiesModal/index.tsx | 49 ++++++--------- superset/charts/api.py | 1 + 12 files changed, 104 insertions(+), 66 deletions(-) diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 51ab7c6ceaa8..48dafa4efd12 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -37,7 +37,9 @@ export function dashboardInfoChanged(newInfo: { metadata: any }) { ? JSON.parse(labelColors) : labelColors; Object.keys(colorMap).forEach(label => { - CategoricalColorNamespace.getScale(scheme, namespace).setColor( + CategoricalColorNamespace.setSchemeColor( + scheme, + namespace, label, colorMap[label], ); diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js index 9c524e2d05be..59a5704ad5af 100644 --- a/superset-frontend/src/dashboard/actions/hydrate.js +++ b/superset-frontend/src/dashboard/actions/hydrate.js @@ -94,7 +94,9 @@ export const hydrateDashboard = (dashboardData, chartData) => ( ? JSON.parse(metadata.label_colors) : metadata.label_colors; Object.keys(colorMap).forEach(label => { - CategoricalColorNamespace.getScale(scheme, namespace).setColor( + CategoricalColorNamespace.setSchemeColor( + scheme, + namespace, label, colorMap[label], ); diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 27dc4e7842c7..a5322b4bd9db 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -20,7 +20,7 @@ import moment from 'moment'; import React from 'react'; import PropTypes from 'prop-types'; -import { styled, CategoricalColorNamespace, t } from '@superset-ui/core'; +import { styled, t } from '@superset-ui/core'; import ButtonGroup from 'src/components/ButtonGroup'; import { @@ -333,19 +333,10 @@ class Header extends React.PureComponent { lastModifiedTime, } = this.props; - const scale = CategoricalColorNamespace.getScale( - colorScheme, - colorNamespace, - ); - - // use the colorScheme for default labels - let labelColors = colorScheme ? scale.getColorMap() : {}; - // but allow metadata to overwrite if it exists - // eslint-disable-next-line camelcase - const metadataLabelColors = dashboardInfo.metadata?.label_colors; - if (metadataLabelColors) { - labelColors = { ...labelColors, ...metadataLabelColors }; - } + const labelColors = + colorScheme && dashboardInfo?.metadata?.label_colors + ? dashboardInfo.metadata.label_colors + : {}; // check refresh frequency is for current session or persist const refreshFrequency = shouldPersistRefreshFrequency diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx index 4d464fe07f4d..d930c3fb0618 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx @@ -167,7 +167,7 @@ class PropertiesModal extends React.PureComponent { ).reduce( (prev, next) => ({ ...prev, - [next]: CategoricalColorNamespace.getScale(value)(next), + [next]: CategoricalColorNamespace.getExistingScale(value)(next), }), {}, ); diff --git a/superset-frontend/src/dashboard/components/SaveModal.tsx b/superset-frontend/src/dashboard/components/SaveModal.tsx index 7a87137a7eea..91c93b2b8851 100644 --- a/superset-frontend/src/dashboard/components/SaveModal.tsx +++ b/superset-frontend/src/dashboard/components/SaveModal.tsx @@ -21,7 +21,7 @@ import React from 'react'; import { Radio } from 'src/components/Radio'; import { RadioChangeEvent, Input } from 'src/common/components'; import Button from 'src/components/Button'; -import { t, CategoricalColorNamespace, JsonResponse } from '@superset-ui/core'; +import { t, JsonResponse } from '@superset-ui/core'; import ModalTrigger from 'src/components/ModalTrigger'; import Checkbox from 'src/components/Checkbox'; @@ -131,11 +131,11 @@ class SaveModal extends React.PureComponent { lastModifiedTime, } = this.props; - const scale = CategoricalColorNamespace.getScale( - colorScheme, - colorNamespace, - ); - const labelColors = colorScheme ? scale.getColorMap() : {}; + const labelColors = + colorScheme && dashboardInfo?.metadata?.label_colors + ? dashboardInfo.metadata.label_colors + : {}; + // check refresh frequency is for current session or persist const refreshFrequency = shouldPersistRefreshFrequency ? currentRefreshFrequency diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index ec80323bb276..b4bae9d1132b 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -61,8 +61,7 @@ function mapStateToProps( (chart && chart.form_data && datasources[chart.form_data.datasource]) || PLACEHOLDER_DATASOURCE; const { colorScheme, colorNamespace } = dashboardState; - const { metadata } = dashboardInfo; - const labelColors = metadata?.label_colors; + const labelColors = dashboardInfo?.metadata?.label_colors || {}; // note: this method caches filters if possible to prevent render cascades const formData = getFormDataWithExtraFilters({ layout: dashboardLayout.present, @@ -84,7 +83,7 @@ function mapStateToProps( return { chart, datasource, - labelColors: labelColors && Object.keys(labelColors).length && labelColors, + labelColors: labelColors || {}, slice: sliceEntities.slices[id], timeout: dashboardInfo.common.conf.SUPERSET_WEBSERVER_TIMEOUT, filters: getActiveFilters() || EMPTY_OBJECT, diff --git a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts index 3e705ce90a25..24aa2e821a29 100644 --- a/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts +++ b/superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts @@ -16,11 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { - CategoricalColorNamespace, - DataRecordFilters, - JsonObject, -} from '@superset-ui/core'; +import { DataRecordFilters, JsonObject } from '@superset-ui/core'; import { ChartQueryPayload, Charts, LayoutItem } from 'src/dashboard/types'; import { getExtraFormData } from 'src/dashboard/components/nativeFilters/utils'; import { DataMaskStateWithId } from 'src/dataMask/types'; @@ -64,8 +60,6 @@ export default function getFormDataWithExtraFilters({ dataMask, labelColors, }: GetFormDataWithExtraFiltersArguments) { - const scale = CategoricalColorNamespace.getScale(colorScheme, colorNamespace); - const scaleLabelColors = labelColors || scale.getColorMap(); // if dashboard metadata + filters have not changed, use cache if possible const cachedFormData = cachedFormdataByChart[sliceId]; if ( @@ -76,7 +70,7 @@ export default function getFormDataWithExtraFilters({ areObjectsEqual(cachedFormData?.color_namespace, colorNamespace, { ignoreUndefined: true, }) && - areObjectsEqual(cachedFormData?.label_colors, scaleLabelColors, { + areObjectsEqual(cachedFormData?.label_colors, labelColors, { ignoreUndefined: true, }) && !!cachedFormData && @@ -109,7 +103,7 @@ export default function getFormDataWithExtraFilters({ const formData = { ...chart.formData, - label_colors: scaleLabelColors, + label_colors: labelColors, ...(colorScheme && { color_scheme: colorScheme }), extra_filters: getEffectiveExtraFilters(filters), ...extraData, diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx b/superset-frontend/src/explore/components/ExploreChartHeader.jsx index 5d057cabaec7..ac76fd9a1841 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx @@ -21,7 +21,12 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import PropTypes from 'prop-types'; import Icons from 'src/components/Icons'; -import { styled, t } from '@superset-ui/core'; +import { + CategoricalColorNamespace, + SupersetClient, + styled, + t, +} from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; import ReportModal from 'src/components/ReportModal'; import { @@ -31,6 +36,7 @@ import { } from 'src/reports/actions/reports'; import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import HeaderReportActionsDropdown from 'src/components/ReportModal/HeaderReportActionsDropdown'; +import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { chartPropShape } from '../../dashboard/util/propShapes'; import ExploreActionButtons from './ExploreActionButtons'; import RowCountLabel from './RowCountLabel'; @@ -53,6 +59,7 @@ const propTypes = { addHistory: PropTypes.func, can_overwrite: PropTypes.bool.isRequired, can_download: PropTypes.bool.isRequired, + dashboardId: PropTypes.number, isStarred: PropTypes.bool.isRequired, slice: PropTypes.object, sliceName: PropTypes.string, @@ -108,12 +115,15 @@ export class ExploreChartHeader extends React.PureComponent { this.state = { isPropertiesModalOpen: false, showingReportModal: false, + existingOwners: [], + permissionsError: null, }; this.openPropertiesModal = this.openPropertiesModal.bind(this); this.closePropertiesModal = this.closePropertiesModal.bind(this); this.showReportModal = this.showReportModal.bind(this); this.hideReportModal = this.hideReportModal.bind(this); this.renderReportModal = this.renderReportModal.bind(this); + this.fetchChartData = this.fetchChartData.bind(this); } componentDidMount() { @@ -127,6 +137,51 @@ export class ExploreChartHeader extends React.PureComponent { chart.id, ); } + this.fetchChartData(); + } + + async fetchChartData() { + try { + const { dashboardId, form_data: formData, slice } = this.props; + const response = await SupersetClient.get({ + endpoint: `/api/v1/chart/${slice.slice_id}`, + }); + const chart = response.json.result; + const colorScheme = formData.color_scheme; + const dashboards = chart.dashboards || []; + const dashboard = + dashboardId && + dashboards.length && + dashboards.find(d => d.id === dashboardId); + + if (colorScheme && dashboard && dashboard.json_metadata) { + const labelColors = + JSON.parse(dashboard.json_metadata).label_colors || {}; + + Object.keys(labelColors).forEach(label => { + CategoricalColorNamespace.setSchemeColor( + colorScheme, + 'GLOBAL', + label, + labelColors[label], + ); + }); + } + + const existingOwners = chart.owners.map(owner => ({ + value: owner.id, + label: `${owner.first_name} ${owner.last_name}`, + })); + + this.setState({ + existingOwners, + }); + } catch (response) { + const clientError = await getClientErrorObject(response); + this.setState({ + permissionsError: clientError, + }); + } } getSliceName() { @@ -244,6 +299,8 @@ export class ExploreChartHeader extends React.PureComponent { onHide={this.closePropertiesModal} onSave={this.props.sliceUpdated} slice={this.props.slice} + error={this.state.permissionsError} + existingOwners={this.state.existingOwners} /> { addHistory={props.addHistory} can_overwrite={props.can_overwrite} can_download={props.can_download} + dashboardId={props.dashboardId} isStarred={props.isStarred} slice={props.slice} sliceName={props.sliceName} diff --git a/superset-frontend/src/explore/components/ExploreViewContainer.jsx b/superset-frontend/src/explore/components/ExploreViewContainer.jsx index 67682d12a829..097ab6ee6c87 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer.jsx @@ -591,6 +591,7 @@ function mapStateToProps(state) { ); const chartKey = Object.keys(charts)[0]; const chart = charts[chartKey]; + return { isDatasourceMetaLoading: explore.isDatasourceMetaLoading, datasource: explore.datasource, diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx index 723f77bfdc5b..3778dd287c05 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import React, { useMemo, useState, useEffect, useCallback } from 'react'; +import React, { useMemo, useState, useEffect } from 'react'; import Modal from 'src/components/Modal'; import { Row, Col, Input, TextArea } from 'src/common/components'; import Button from 'src/components/Button'; @@ -33,6 +33,8 @@ type PropertiesModalProps = { show: boolean; onHide: () => void; onSave: (chart: Chart) => void; + permissionsError?: string; + existingOwners?: SelectValue; }; export default function PropertiesModal({ @@ -40,18 +42,19 @@ export default function PropertiesModal({ onHide, onSave, show, + permissionsError, + existingOwners, }: PropertiesModalProps) { const [submitting, setSubmitting] = useState(false); - + const [selectedOwners, setSelectedOwners] = useState( + null, + ); // values of form inputs const [name, setName] = useState(slice.slice_name || ''); const [description, setDescription] = useState(slice.description || ''); const [cacheTimeout, setCacheTimeout] = useState( slice.cache_timeout != null ? slice.cache_timeout : '', ); - const [selectedOwners, setSelectedOwners] = useState( - null, - ); function showError({ error, statusText, message }: any) { let errorText = error || statusText || t('An error has occurred'); @@ -65,27 +68,6 @@ export default function PropertiesModal({ }); } - const fetchChartData = useCallback( - async function fetchChartData() { - try { - const response = await SupersetClient.get({ - endpoint: `/api/v1/chart/${slice.slice_id}`, - }); - const chart = response.json.result; - setSelectedOwners( - chart.owners.map((owner: any) => ({ - value: owner.id, - label: `${owner.first_name} ${owner.last_name}`, - })), - ); - } catch (response) { - const clientError = await getClientErrorObject(response); - showError(clientError); - } - }, - [slice.slice_id], - ); - const loadOptions = useMemo( () => (input = '', page: number, pageSize: number) => { const query = rison.encode({ filter: input, page, page_size: pageSize }); @@ -141,10 +123,17 @@ export default function PropertiesModal({ const ownersLabel = t('Owners'); - // get the owners of this slice useEffect(() => { - fetchChartData(); - }, [fetchChartData]); + if (permissionsError) { + showError(permissionsError); + } + }, [permissionsError]); + + useEffect(() => { + if (existingOwners) { + setSelectedOwners(existingOwners); + } + }, [existingOwners]); // update name after it's changed in another modal useEffect(() => { @@ -241,8 +230,8 @@ export default function PropertiesModal({ mode="multiple" name="owners" value={selectedOwners || []} - options={loadOptions} onChange={setSelectedOwners} + options={loadOptions} disabled={!selectedOwners} allowClear /> diff --git a/superset/charts/api.py b/superset/charts/api.py index 07fe642fbfb9..81e087c4d3d6 100644 --- a/superset/charts/api.py +++ b/superset/charts/api.py @@ -123,6 +123,7 @@ def ensure_thumbnails_enabled(self) -> Optional[Response]: "cache_timeout", "dashboards.dashboard_title", "dashboards.id", + "dashboards.json_metadata", "description", "owners.first_name", "owners.id", From 600e1e2a657a597e91b64f275bf9ac5a91e4f8dd Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 13 Oct 2021 14:16:42 +0000 Subject: [PATCH 08/23] Clean up --- superset-frontend/src/dashboard/containers/Chart.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/containers/Chart.jsx b/superset-frontend/src/dashboard/containers/Chart.jsx index b4bae9d1132b..22b14b81ea4a 100644 --- a/superset-frontend/src/dashboard/containers/Chart.jsx +++ b/superset-frontend/src/dashboard/containers/Chart.jsx @@ -83,7 +83,7 @@ function mapStateToProps( return { chart, datasource, - labelColors: labelColors || {}, + labelColors, slice: sliceEntities.slices[id], timeout: dashboardInfo.common.conf.SUPERSET_WEBSERVER_TIMEOUT, filters: getActiveFilters() || EMPTY_OBJECT, From c97cbc3a762a36bb4c080a261eef6adf3a6adea7 Mon Sep 17 00:00:00 2001 From: geido Date: Fri, 15 Oct 2021 15:31:42 +0000 Subject: [PATCH 09/23] Refactor and simplify --- .../src/dashboard/actions/dashboardInfo.ts | 19 ++++++++----------- .../src/dashboard/actions/hydrate.js | 12 +++++------- .../components/PropertiesModal/index.jsx | 19 +++++-------------- .../explore/components/ExploreChartHeader.jsx | 14 +++++--------- .../components/controls/ColorMapControl.jsx | 11 ++++++----- 5 files changed, 29 insertions(+), 46 deletions(-) diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 48dafa4efd12..2e2c862563ab 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -26,23 +26,20 @@ export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED'; // updates partially changed dashboard info export function dashboardInfoChanged(newInfo: { metadata: any }) { const { metadata } = newInfo; + const { color_namespace: namespace, label_colors: labelColors } = metadata; + + const categoricalNamespace = CategoricalColorNamespace.getNamespace( + namespace, + ); + + categoricalNamespace.resetColors(); if (metadata?.label_colors) { - const { - color_scheme: scheme, - color_namespace: namespace, - label_colors: labelColors, - } = metadata; const colorMap = isString(labelColors) ? JSON.parse(labelColors) : labelColors; Object.keys(colorMap).forEach(label => { - CategoricalColorNamespace.setSchemeColor( - scheme, - namespace, - label, - colorMap[label], - ); + categoricalNamespace.setColor(label, colorMap[label]); }); } diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js index 59a5704ad5af..cbed96ccb0ce 100644 --- a/superset-frontend/src/dashboard/actions/hydrate.js +++ b/superset-frontend/src/dashboard/actions/hydrate.js @@ -88,18 +88,16 @@ export const hydrateDashboard = (dashboardData, chartData) => ( // Priming the color palette with user's label-color mapping provided in // the dashboard's JSON metadata if (metadata?.label_colors) { - const scheme = metadata.color_scheme; const namespace = metadata.color_namespace; const colorMap = isString(metadata.label_colors) ? JSON.parse(metadata.label_colors) : metadata.label_colors; + const categoricalNamespace = CategoricalColorNamespace.getNamespace( + namespace, + ); + Object.keys(colorMap).forEach(label => { - CategoricalColorNamespace.setSchemeColor( - scheme, - namespace, - label, - colorMap[label], - ); + categoricalNamespace.setColor(label, colorMap[label]); }); } diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx index d930c3fb0618..c31b1d3cd568 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx @@ -29,7 +29,6 @@ import { t, SupersetClient, getCategoricalSchemeRegistry, - CategoricalColorNamespace, } from '@superset-ui/core'; import Modal from 'src/components/Modal'; @@ -140,14 +139,14 @@ class PropertiesModal extends React.PureComponent { JsonEditor.preload(); } - onColorSchemeChange(value, { updateMetadata = true } = {}) { + onColorSchemeChange(colorScheme, { updateMetadata = true } = {}) { // check that color_scheme is valid const colorChoices = getCategoricalSchemeRegistry().keys(); const { json_metadata: jsonMetadata } = this.state.values; const jsonMetadataObj = jsonMetadata?.length ? JSON.parse(jsonMetadata) : {}; - if (!colorChoices.includes(value)) { + if (!colorChoices.includes(colorScheme)) { Modal.error({ title: 'Error', content: t('A valid color scheme is required'), @@ -161,20 +160,12 @@ class PropertiesModal extends React.PureComponent { updateMetadata && Object.keys(jsonMetadataObj).includes('color_scheme') ) { - jsonMetadataObj.color_scheme = value; - jsonMetadataObj.label_colors = Object.keys( - jsonMetadataObj.label_colors ?? {}, - ).reduce( - (prev, next) => ({ - ...prev, - [next]: CategoricalColorNamespace.getExistingScale(value)(next), - }), - {}, - ); + jsonMetadataObj.color_scheme = colorScheme; + this.onMetadataChange(jsonStringify(jsonMetadataObj)); } - this.updateFormState('colorScheme', value); + this.updateFormState('colorScheme', colorScheme); } onOwnersChange(value) { diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx b/superset-frontend/src/explore/components/ExploreChartHeader.jsx index ac76fd9a1841..4d4c33c1e268 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx @@ -147,24 +147,20 @@ export class ExploreChartHeader extends React.PureComponent { endpoint: `/api/v1/chart/${slice.slice_id}`, }); const chart = response.json.result; - const colorScheme = formData.color_scheme; const dashboards = chart.dashboards || []; const dashboard = dashboardId && dashboards.length && dashboards.find(d => d.id === dashboardId); - - if (colorScheme && dashboard && dashboard.json_metadata) { + + if (dashboard && dashboard.json_metadata) { + // setting the chart to use the dashboard custom label colors if any const labelColors = JSON.parse(dashboard.json_metadata).label_colors || {}; + const categoricalNamespace = CategoricalColorNamespace.getNamespace(); Object.keys(labelColors).forEach(label => { - CategoricalColorNamespace.setSchemeColor( - colorScheme, - 'GLOBAL', - label, - labelColors[label], - ); + categoricalNamespace.setColor(label, labelColors[label]); }); } diff --git a/superset-frontend/src/explore/components/controls/ColorMapControl.jsx b/superset-frontend/src/explore/components/controls/ColorMapControl.jsx index 269780ff9344..76b6d4732b20 100644 --- a/superset-frontend/src/explore/components/controls/ColorMapControl.jsx +++ b/superset-frontend/src/explore/components/controls/ColorMapControl.jsx @@ -37,11 +37,12 @@ const defaultProps = { export default class ColorMapControl extends React.PureComponent { constructor(props) { super(props); - Object.keys(this.props.value).forEach(label => { - CategoricalColorNamespace.getScale( - this.props.colorScheme, - this.props.colorNamespace, - ).setColor(label, this.props.value[label]); + const colorMap = this.props.value; + const categoricalNamespace = CategoricalColorNamespace.getNamespace( + this.props.colorNamespace, + ); + Object.keys(colorMap).forEach(label => { + categoricalNamespace.setColor(label, colorMap[label]); }); } From 13aacf10e4028ac9f90a3889ed300a8c25dbdf60 Mon Sep 17 00:00:00 2001 From: geido Date: Fri, 15 Oct 2021 15:41:01 +0000 Subject: [PATCH 10/23] Fix lint --- superset-frontend/src/explore/components/ExploreChartHeader.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx b/superset-frontend/src/explore/components/ExploreChartHeader.jsx index 4d4c33c1e268..4dbee1c8cd1a 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx @@ -152,7 +152,7 @@ export class ExploreChartHeader extends React.PureComponent { dashboardId && dashboards.length && dashboards.find(d => d.id === dashboardId); - + if (dashboard && dashboard.json_metadata) { // setting the chart to use the dashboard custom label colors if any const labelColors = From 8b94bfe356b832b8e872eb5b66dcc03309a6733e Mon Sep 17 00:00:00 2001 From: geido Date: Mon, 18 Oct 2021 15:30:42 +0000 Subject: [PATCH 11/23] Remove unnecessary ColorMapControl --- .../src/explore/components/Control.tsx | 4 +- .../components/controls/ColorMapControl.jsx | 55 ------------------- .../src/explore/components/controls/index.js | 2 - superset-frontend/src/explore/controls.jsx | 11 ---- .../src/utils/getControlsForVizType.test.js | 13 +---- 5 files changed, 4 insertions(+), 81 deletions(-) delete mode 100644 superset-frontend/src/explore/components/controls/ColorMapControl.jsx diff --git a/superset-frontend/src/explore/components/Control.tsx b/superset-frontend/src/explore/components/Control.tsx index ecb050d773a5..5b39ee5649dc 100644 --- a/superset-frontend/src/explore/components/Control.tsx +++ b/superset-frontend/src/explore/components/Control.tsx @@ -69,7 +69,9 @@ export default function Control(props: ControlProps) { const ControlComponent = typeof type === 'string' ? controlMap[type] : type; if (!ControlComponent) { - return <>Unknown controlType: {type}; + // eslint-disable-next-line no-console + console.warn(`Unknown controlType: ${type}`); + return null; } return ( diff --git a/superset-frontend/src/explore/components/controls/ColorMapControl.jsx b/superset-frontend/src/explore/components/controls/ColorMapControl.jsx deleted file mode 100644 index 76b6d4732b20..000000000000 --- a/superset-frontend/src/explore/components/controls/ColorMapControl.jsx +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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. - */ -import PropTypes from 'prop-types'; -import React from 'react'; -import { CategoricalColorNamespace } from '@superset-ui/core'; - -const propTypes = { - onChange: PropTypes.func, - value: PropTypes.object, - colorScheme: PropTypes.string, - colorNamespace: PropTypes.string, -}; - -const defaultProps = { - onChange: () => {}, - value: {}, - colorScheme: undefined, - colorNamespace: undefined, -}; - -export default class ColorMapControl extends React.PureComponent { - constructor(props) { - super(props); - const colorMap = this.props.value; - const categoricalNamespace = CategoricalColorNamespace.getNamespace( - this.props.colorNamespace, - ); - Object.keys(colorMap).forEach(label => { - categoricalNamespace.setColor(label, colorMap[label]); - }); - } - - render() { - return null; - } -} - -ColorMapControl.propTypes = propTypes; -ColorMapControl.defaultProps = defaultProps; diff --git a/superset-frontend/src/explore/components/controls/index.js b/superset-frontend/src/explore/components/controls/index.js index a00a88f53dfc..23cd3a73d85b 100644 --- a/superset-frontend/src/explore/components/controls/index.js +++ b/superset-frontend/src/explore/components/controls/index.js @@ -21,7 +21,6 @@ import AnnotationLayerControl from './AnnotationLayerControl'; import BoundsControl from './BoundsControl'; import CheckboxControl from './CheckboxControl'; import CollectionControl from './CollectionControl'; -import ColorMapControl from './ColorMapControl'; import ColorPickerControl from './ColorPickerControl'; import ColorSchemeControl from './ColorSchemeControl'; import DatasourceControl from './DatasourceControl'; @@ -52,7 +51,6 @@ const controlMap = { BoundsControl, CheckboxControl, CollectionControl, - ColorMapControl, ColorPickerControl, ColorSchemeControl, DatasourceControl, diff --git a/superset-frontend/src/explore/controls.jsx b/superset-frontend/src/explore/controls.jsx index f28a1974ad94..640e0ad165fe 100644 --- a/superset-frontend/src/explore/controls.jsx +++ b/superset-frontend/src/explore/controls.jsx @@ -476,15 +476,4 @@ export const controls = { description: t('The color scheme for rendering chart'), schemes: () => categoricalSchemeRegistry.getMap(), }, - - label_colors: { - type: 'ColorMapControl', - label: t('Color map'), - default: {}, - renderTrigger: true, - mapStateToProps: state => ({ - colorNamespace: state.form_data.color_namespace, - colorScheme: state.form_data.color_scheme, - }), - }, }; diff --git a/superset-frontend/src/utils/getControlsForVizType.test.js b/superset-frontend/src/utils/getControlsForVizType.test.js index 6e06b1899857..65b2328c856e 100644 --- a/superset-frontend/src/utils/getControlsForVizType.test.js +++ b/superset-frontend/src/utils/getControlsForVizType.test.js @@ -17,7 +17,7 @@ * under the License. */ -import { getChartControlPanelRegistry, t } from '@superset-ui/core'; +import { getChartControlPanelRegistry } from '@superset-ui/core'; import getControlsForVizType from 'src/utils/getControlsForVizType'; const fakePluginControls = { @@ -26,7 +26,6 @@ const fakePluginControls = { label: 'Fake Control Panel Sections', expanded: true, controlSetRows: [ - ['label_colors'], [ { name: 'y_axis_bounds', @@ -81,16 +80,6 @@ describe('getControlsForVizType', () => { JSON.stringify(getControlsForVizType('chart_controls_inventory_fake')), ).toEqual( JSON.stringify({ - label_colors: { - type: 'ColorMapControl', - label: t('Color map'), - default: {}, - renderTrigger: true, - mapStateToProps: state => ({ - colorNamespace: state.form_data.color_namespace, - colorScheme: state.form_data.color_scheme, - }), - }, y_axis_bounds: { type: 'BoundsControl', label: 'Value bounds', From a327e74f2382379d027a747bb5c72cb4fcd02ac2 Mon Sep 17 00:00:00 2001 From: geido Date: Tue, 26 Oct 2021 12:44:17 +0000 Subject: [PATCH 12/23] Lint --- superset-frontend/src/explore/exploreUtils/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/exploreUtils/index.js b/superset-frontend/src/explore/exploreUtils/index.js index 600ad316074e..b9fbd12f681f 100644 --- a/superset-frontend/src/explore/exploreUtils/index.js +++ b/superset-frontend/src/explore/exploreUtils/index.js @@ -132,7 +132,11 @@ export function getExploreUrlFromDashboard(formData) { // These are present when generating explore urls from the dashboard page. // This should be superseded by some sort of "exploration context" system // where form data and other context is referenced by id. - const trimmedFormData = omit(formData, ['dataMask', 'url_params', 'label_colors']); + const trimmedFormData = omit(formData, [ + 'dataMask', + 'url_params', + 'label_colors', + ]); return getExploreLongUrl(trimmedFormData, null, false); } From c70d6bafde8b3a4e3da18f2e7bfaada87c0da124 Mon Sep 17 00:00:00 2001 From: geido Date: Tue, 26 Oct 2021 14:49:19 +0000 Subject: [PATCH 13/23] Give json color scheme precedence --- .../src/dashboard/actions/dashboardInfo.ts | 4 +-- .../components/PropertiesModal/index.jsx | 30 +++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts index 2e2c862563ab..4bc1c7984343 100644 --- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts +++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts @@ -26,15 +26,15 @@ export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED'; // updates partially changed dashboard info export function dashboardInfoChanged(newInfo: { metadata: any }) { const { metadata } = newInfo; - const { color_namespace: namespace, label_colors: labelColors } = metadata; const categoricalNamespace = CategoricalColorNamespace.getNamespace( - namespace, + metadata?.color_namespace, ); categoricalNamespace.resetColors(); if (metadata?.label_colors) { + const labelColors = metadata.label_colors; const colorMap = isString(labelColors) ? JSON.parse(labelColors) : labelColors; diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx index c31b1d3cd568..bade5148f4fe 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx @@ -146,7 +146,8 @@ class PropertiesModal extends React.PureComponent { const jsonMetadataObj = jsonMetadata?.length ? JSON.parse(jsonMetadata) : {}; - if (!colorChoices.includes(colorScheme)) { + + if (!colorScheme || !colorChoices.includes(colorScheme)) { Modal.error({ title: 'Error', content: t('A valid color scheme is required'), @@ -156,12 +157,8 @@ class PropertiesModal extends React.PureComponent { } // update metadata to match selection - if ( - updateMetadata && - Object.keys(jsonMetadataObj).includes('color_scheme') - ) { + if (updateMetadata) { jsonMetadataObj.color_scheme = colorScheme; - this.onMetadataChange(jsonStringify(jsonMetadataObj)); } @@ -252,21 +249,22 @@ class PropertiesModal extends React.PureComponent { roles: rolesValue, }, } = this.state; + const { onlyApply } = this.props; const owners = ownersValue?.map(o => o.value) ?? []; const roles = rolesValue?.map(o => o.value) ?? []; - let metadataColorScheme; + let currentColorScheme = colorScheme; - // update color scheme to match metadata + // color scheme in json metadata has precedence over selection if (jsonMetadata?.length) { - const { color_scheme: metadataColorScheme } = JSON.parse(jsonMetadata); - if (metadataColorScheme) { - this.onColorSchemeChange(metadataColorScheme, { - updateMetadata: false, - }); - } + const metadata = JSON.parse(jsonMetadata); + currentColorScheme = metadata?.color_scheme || colorScheme; } + this.onColorSchemeChange(currentColorScheme, { + updateMetadata: false, + }); + const moreProps = {}; const morePutProps = {}; if (isFeatureEnabled(FeatureFlag.DASHBOARD_RBAC)) { @@ -280,7 +278,7 @@ class PropertiesModal extends React.PureComponent { slug, jsonMetadata, ownerIds: owners, - colorScheme: metadataColorScheme || colorScheme, + colorScheme: currentColorScheme, ...moreProps, }); this.props.onHide(); @@ -307,7 +305,7 @@ class PropertiesModal extends React.PureComponent { slug: result.slug, jsonMetadata: result.json_metadata, ownerIds: result.owners, - colorScheme: metadataColorScheme || colorScheme, + colorScheme: currentColorScheme, ...moreResultProps, }); this.props.onHide(); From 40640c7b92d71caef5ec61f688dabdab900b2fdb Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 27 Oct 2021 11:34:03 +0000 Subject: [PATCH 14/23] Add label_colors prop in metadata --- .../src/dashboard/components/PropertiesModal/index.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx index bade5148f4fe..aa9bef7efd50 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.jsx @@ -159,6 +159,8 @@ class PropertiesModal extends React.PureComponent { // update metadata to match selection if (updateMetadata) { jsonMetadataObj.color_scheme = colorScheme; + jsonMetadataObj.label_colors = jsonMetadataObj.label_colors || {}; + this.onMetadataChange(jsonStringify(jsonMetadataObj)); } @@ -262,7 +264,7 @@ class PropertiesModal extends React.PureComponent { } this.onColorSchemeChange(currentColorScheme, { - updateMetadata: false, + updateMetadata: false, }); const moreProps = {}; From 56d9bc81cb42261e28b2e1c9423f0a483f4ccf85 Mon Sep 17 00:00:00 2001 From: geido Date: Tue, 2 Nov 2021 13:16:27 +0000 Subject: [PATCH 15/23] Separate owners and dashboard meta requests --- .../explore/components/ExploreChartHeader.jsx | 63 +++++++------------ .../components/PropertiesModal/index.tsx | 38 +++++++---- 2 files changed, 48 insertions(+), 53 deletions(-) diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx b/superset-frontend/src/explore/components/ExploreChartHeader.jsx index 818fcae11e97..3decfdcd1eed 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx @@ -115,18 +115,17 @@ export class ExploreChartHeader extends React.PureComponent { this.state = { isPropertiesModalOpen: false, showingReportModal: false, - existingOwners: [], - permissionsError: null, }; this.openPropertiesModal = this.openPropertiesModal.bind(this); this.closePropertiesModal = this.closePropertiesModal.bind(this); this.showReportModal = this.showReportModal.bind(this); this.hideReportModal = this.hideReportModal.bind(this); this.renderReportModal = this.renderReportModal.bind(this); - this.fetchChartData = this.fetchChartData.bind(this); + this.fetchChartDashboardData = this.fetchChartDashboardData.bind(this); } componentDidMount() { + const { dashboardId } = this.props; if (this.canAddReports()) { const { user, chart } = this.props; // this is in the case that there is an anonymous user. @@ -137,45 +136,31 @@ export class ExploreChartHeader extends React.PureComponent { chart.id, ); } - this.fetchChartData(); + if (dashboardId) { + this.fetchChartDashboardData(); + } } - async fetchChartData() { - try { - const { dashboardId, slice } = this.props; - const response = await SupersetClient.get({ - endpoint: `/api/v1/chart/${slice.slice_id}`, - }); - const chart = response.json.result; - const dashboards = chart.dashboards || []; - const dashboard = - dashboardId && - dashboards.length && - dashboards.find(d => d.id === dashboardId); - - if (dashboard && dashboard.json_metadata) { - // setting the chart to use the dashboard custom label colors if any - const labelColors = - JSON.parse(dashboard.json_metadata).label_colors || {}; - const categoricalNamespace = CategoricalColorNamespace.getNamespace(); - - Object.keys(labelColors).forEach(label => { - categoricalNamespace.setColor(label, labelColors[label]); - }); - } + async fetchChartDashboardData() { + const { dashboardId, slice } = this.props; + const response = await SupersetClient.get({ + endpoint: `/api/v1/chart/${slice.slice_id}`, + }); + const chart = response.json.result; + const dashboards = chart.dashboards || []; + const dashboard = + dashboardId && + dashboards.length && + dashboards.find(d => d.id === dashboardId); - const existingOwners = chart.owners.map(owner => ({ - value: owner.id, - label: `${owner.first_name} ${owner.last_name}`, - })); + if (dashboard && dashboard.json_metadata) { + // setting the chart to use the dashboard custom label colors if any + const labelColors = + JSON.parse(dashboard.json_metadata).label_colors || {}; + const categoricalNamespace = CategoricalColorNamespace.getNamespace(); - this.setState({ - existingOwners, - }); - } catch (response) { - const clientError = await getClientErrorObject(response); - this.setState({ - permissionsError: clientError, + Object.keys(labelColors).forEach(label => { + categoricalNamespace.setColor(label, labelColors[label]); }); } } @@ -301,8 +286,6 @@ export class ExploreChartHeader extends React.PureComponent { onHide={this.closePropertiesModal} onSave={this.props.sliceUpdated} slice={this.props.slice} - error={this.state.permissionsError} - existingOwners={this.state.existingOwners} /> ( @@ -68,6 +66,27 @@ export default function PropertiesModal({ }); } + const fetchChartOwners = useCallback( + async function fetchChartOwners() { + try { + const response = await SupersetClient.get({ + endpoint: `/api/v1/chart/${slice.slice_id}`, + }); + const chart = response.json.result; + setSelectedOwners( + chart.owners.map((owner: any) => ({ + value: owner.id, + label: `${owner.first_name} ${owner.last_name}`, + })), + ); + } catch (response) { + const clientError = await getClientErrorObject(response); + showError(clientError); + } + }, + [slice.slice_id], + ); + const loadOptions = useMemo( () => (input = '', page: number, pageSize: number) => { const query = rison.encode({ filter: input, page, page_size: pageSize }); @@ -123,17 +142,10 @@ export default function PropertiesModal({ const ownersLabel = t('Owners'); + // get the owners of this slice useEffect(() => { - if (permissionsError) { - showError(permissionsError); - } - }, [permissionsError]); - - useEffect(() => { - if (existingOwners) { - setSelectedOwners(existingOwners); - } - }, [existingOwners]); + fetchChartOwners(); + }, [fetchChartOwners]); // update name after it's changed in another modal useEffect(() => { From 81359c2825676b97b03328e9b5c0906fdec4cdca Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 07:50:35 +0000 Subject: [PATCH 16/23] Remove label_colors control --- superset-frontend/src/explore/components/ExploreChartHeader.jsx | 1 - superset-frontend/src/explore/controlPanels/sections.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx b/superset-frontend/src/explore/components/ExploreChartHeader.jsx index 3decfdcd1eed..709e8ebb047a 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx @@ -36,7 +36,6 @@ import { } from 'src/reports/actions/reports'; import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import HeaderReportActionsDropdown from 'src/components/ReportModal/HeaderReportActionsDropdown'; -import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { chartPropShape } from '../../dashboard/util/propShapes'; import ExploreActionButtons from './ExploreActionButtons'; import RowCountLabel from './RowCountLabel'; diff --git a/superset-frontend/src/explore/controlPanels/sections.tsx b/superset-frontend/src/explore/controlPanels/sections.tsx index 0a5f63a1c302..b231fd5f2b0a 100644 --- a/superset-frontend/src/explore/controlPanels/sections.tsx +++ b/superset-frontend/src/explore/controlPanels/sections.tsx @@ -77,7 +77,7 @@ export const datasourceAndVizType: ControlPanelSectionConfig = { export const colorScheme: ControlPanelSectionConfig = { label: t('Color scheme'), - controlSetRows: [['color_scheme', 'label_colors']], + controlSetRows: [['color_scheme']], }; export const sqlaTimeSeries: ControlPanelSectionConfig = { From f24d57ebe2a5a0d6d3b9824f60325ed4ea1c5ffd Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 07:51:14 +0000 Subject: [PATCH 17/23] bump superset-ui 0.18.19 --- superset-frontend/package-lock.json | 604 ++++++++++++++-------------- superset-frontend/package.json | 58 +-- 2 files changed, 331 insertions(+), 331 deletions(-) diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 3ebf50527305..c7566d34c4fe 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -16,35 +16,35 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@superset-ui/chart-controls": "^0.18.18", - "@superset-ui/core": "^0.18.18", - "@superset-ui/legacy-plugin-chart-calendar": "^0.18.18", - "@superset-ui/legacy-plugin-chart-chord": "^0.18.18", - "@superset-ui/legacy-plugin-chart-country-map": "^0.18.18", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.18", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.18", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.18", - "@superset-ui/legacy-plugin-chart-histogram": "^0.18.18", - "@superset-ui/legacy-plugin-chart-horizon": "^0.18.18", - "@superset-ui/legacy-plugin-chart-map-box": "^0.18.18", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.18", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.18", - "@superset-ui/legacy-plugin-chart-partition": "^0.18.18", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.18", - "@superset-ui/legacy-plugin-chart-rose": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sankey": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.18", - "@superset-ui/legacy-plugin-chart-treemap": "^0.18.18", - "@superset-ui/legacy-plugin-chart-world-map": "^0.18.18", - "@superset-ui/legacy-preset-chart-big-number": "^0.18.18", + "@superset-ui/chart-controls": "^0.18.19", + "@superset-ui/core": "^0.18.19", + "@superset-ui/legacy-plugin-chart-calendar": "^0.18.19", + "@superset-ui/legacy-plugin-chart-chord": "^0.18.19", + "@superset-ui/legacy-plugin-chart-country-map": "^0.18.19", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.19", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.19", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-histogram": "^0.18.19", + "@superset-ui/legacy-plugin-chart-horizon": "^0.18.19", + "@superset-ui/legacy-plugin-chart-map-box": "^0.18.19", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.19", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.19", + "@superset-ui/legacy-plugin-chart-partition": "^0.18.19", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/legacy-plugin-chart-rose": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.19", + "@superset-ui/legacy-plugin-chart-treemap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-world-map": "^0.18.19", + "@superset-ui/legacy-preset-chart-big-number": "^0.18.19", "@superset-ui/legacy-preset-chart-deckgl": "^0.4.13", - "@superset-ui/legacy-preset-chart-nvd3": "^0.18.18", - "@superset-ui/plugin-chart-echarts": "^0.18.18", - "@superset-ui/plugin-chart-pivot-table": "^0.18.18", - "@superset-ui/plugin-chart-table": "^0.18.18", - "@superset-ui/plugin-chart-word-cloud": "^0.18.18", - "@superset-ui/preset-chart-xy": "^0.18.18", + "@superset-ui/legacy-preset-chart-nvd3": "^0.18.19", + "@superset-ui/plugin-chart-echarts": "^0.18.19", + "@superset-ui/plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/plugin-chart-table": "^0.18.19", + "@superset-ui/plugin-chart-word-cloud": "^0.18.19", + "@superset-ui/preset-chart-xy": "^0.18.19", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", @@ -11788,12 +11788,12 @@ } }, "node_modules/@superset-ui/chart-controls": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.18.tgz", - "integrity": "sha512-QvQNi4QNi9l5+DUq0TEbi5mE4LyaJwTIyXuudTwHQUAxFH7TEUW+zJfj1+8hyjuoAPGWRMyMc+I0PbCUIsLXiA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.19.tgz", + "integrity": "sha512-Bn8FW9EhxivnRf/EBVjdjRHhDUzAB6mbUDgmthgKXn8u8un/W2R/SrV1kOKYDNn+BGM/ijZuqX439UZeNv70Ug==", "dependencies": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/core": "0.18.18", + "@superset-ui/core": "0.18.19", "lodash": "^4.17.15", "prop-types": "^15.7.2" }, @@ -11806,9 +11806,9 @@ } }, "node_modules/@superset-ui/core": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.18.tgz", - "integrity": "sha512-rOursdFhh4smTmI4LQpSvBjAM8MYJzfw/FY79T0LKW4v8GRA6ZXDTkyK9dmVRW0qY/1W+iTYLvPWzAirQQw8mA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.19.tgz", + "integrity": "sha512-DDdf1KNYkUl+xerZpb6H8KYp+2rDcSEdSEOSSMJFeCd7j183ZSz7UNIGpjjRnz3GInqC9ypTNboxmR7mWoXb1w==", "dependencies": { "@babel/runtime": "^7.1.2", "@types/d3-format": "^1.3.0", @@ -11893,12 +11893,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.18.tgz", - "integrity": "sha512-FXrm2axHC39x7ho2lH3l7jtbrHTYZDQ6RMnV0rb0gE89Kwz5MF8vW4+T8DJo1PMflYx9KI5VrERL/G4dFcfu+A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.19.tgz", + "integrity": "sha512-nYWM35/2eoJQ8IKKUZ0XdDngm7E3DX+IjvTlZGcqhN8p2qq7mSLhrQ3QB+oyMBfC6wKMBd2UET9ncRGPRjjbLQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", @@ -11917,24 +11917,24 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-chord": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.18.tgz", - "integrity": "sha512-FIbQP7DMl5DAfDbfqHm+jdrt374IQ35NJILAJbZAXna7j5SrqDMWVv4+2zDF7UkDXQKkEjusLI1Cp19xXN7Rzw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.19.tgz", + "integrity": "sha512-phLNZU4lTvMLb0Q45bVxQ3V+xLbCmpHRZ0yWCaR7WQmaU2ExtQmuKSPjKcyhCahqZE6l4T5RLSpWGDBcatJ5hQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "node_modules/@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.18.tgz", - "integrity": "sha512-KTwB/K5pZT5s5s3/kPKHPxtWtEe6cAbpPFVvtCnLySViFRZ1TWCRLrNpQ3pn4u/KUNJvrirHGPsNnUQtcNk1LQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.19.tgz", + "integrity": "sha512-UEKSvR5prV2KYnpm0REgRhFidNTuQ6NUCyZhmNQBZu68pQ93ePhUqI2UtZTdHmRnRxBZYEHOpbZpVLlGezlV0A==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -11949,13 +11949,13 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.18.tgz", - "integrity": "sha512-/RpHzVFfJX5R4IGr5O7fr4R1/8f9Ywx7hTQheq2MJ82gh5ryKmQaQVMoOtK88cxnd+N0AQnwKrLqg4E50GCHyA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.19.tgz", + "integrity": "sha512-zdyKIYh5CdOXHiO4C0Nhkn7CMV6+UqmL8r4RawM3H6Xc1eqajdrOgu9iGPSYKYDqLwlZR3EWuUMZIxTYTM1gpA==", "dependencies": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "prop-types": "^15.6.2" }, "peerDependencies": { @@ -11963,12 +11963,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.18.tgz", - "integrity": "sha512-HX2OBCwNGwp5FUc3riXOYATaFaz18faxfyoEeGJAK/CzSnv6NkDtexRGWEZlU6h9ZgxEPA/y8B7iNLJlzx18Tg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.19.tgz", + "integrity": "sha512-i3CzVzxYZ8R9soAOytan4brlTs1Oo2n//IJmhXYT45PZI6m0mf4T2TBtGU7hAIyKLx3zFe1/OYTXRbaBLrM5Jw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" }, @@ -11977,12 +11977,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.18.tgz", - "integrity": "sha512-hKWKU8JTX2TfDY0Pq7eSdC7eRlfR1UlNezqjcyRvnn8ZC+tsZJ0f3o7UC8y4Yd9E/hcRlWgXjT545WeKcDG7lQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.19.tgz", + "integrity": "sha512-TJ8ri24VKq67XiGjTapeGN1Tq//h6DnnCGvQUxdnwBwhKzTKqglxf9t2MOO+GnKVm4LTtXAM1gVXXZDzZClA/g==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -11990,14 +11990,14 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.18.tgz", - "integrity": "sha512-Lp0YvpCHgqZzeTYgWdQbHWfbQt3PIMzuH7EsX/vr3gZqJOnbjRy0hKM4yZraTOiOkxyy4D8/MXmzCmrhRodM7A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.19.tgz", + "integrity": "sha512-nrV1as8N0xsITaGxjDtaFTj95Hgzd8kcdxF/hxU/ZeFG5poo67DIqY21IGACL4nyx4yviwqkOBJEJ2/eSso4Eg==", "dependencies": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", @@ -12075,12 +12075,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.18.tgz", - "integrity": "sha512-gJtVRZBLjIMHHI5VtlRbHOJ9HUjb5ICyh9wbLuZnxN68sqJQyRwb4GtB0H1+gLizmvrcgFK0hy227TAkJdq33Q==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.19.tgz", + "integrity": "sha512-GEUeeEuBVN2fA7g0oDmKijWI3y+H+DWmX5WMr76CyTL0mKcQ3k2HvtV4N1mULugtnXDCnGO74Lae1Uhbrk2BwQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" @@ -12118,12 +12118,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.18.tgz", - "integrity": "sha512-aiDP+LTtd+7E9ghZGEHKT9Lh0spnYTeR0Su3OJDTZkyHkh8PzHFWqlG2yiOuPddjOw79z6b93+b6sSFqiUMw1w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.19.tgz", + "integrity": "sha512-kATV3Wg39GSgi8WQtIXrYyyZA8AXY2rSPNsYjL/OtlJFsmLVwoo8gLRPNs2w8NwKz5M2nx4iL9mEUcSsm4n+FQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", "react-map-gl": "^4.0.10", @@ -12135,12 +12135,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.18.tgz", - "integrity": "sha512-k+SWI2FheQ3BkCyWfXZp3ILgANCC7Cs8PZjUAKgok4InzidtqmSkRloq3XAnjOuBnJNf4UEwSGKnCjtu2YhyIA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.19.tgz", + "integrity": "sha512-9gmNLLdu4hV03NbzlTWZwO2JoF3IA67WP/9nzAG1vchRoIBKWvapjFrbqIb3D6acmLIjB9Trujk2oMVvIQhBnQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" @@ -12150,12 +12150,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.18.tgz", - "integrity": "sha512-rJDDrSbhP9wCNqNNEmBV9B4pnbzSmXfQCrk7vLP20DMDg2CLV65mJ8M79lk+fImO8vt01AAhtZFMWcjJM7D9Tg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.19.tgz", + "integrity": "sha512-T5YBNoBEIy3JxRZKgYPc8mXVTqrXjLanz5MQIpbogwNljhxKhASPBVKTlfChnv8oASAs0rxDqFHUWd48egaa5A==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" }, @@ -12164,12 +12164,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-partition": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.18.tgz", - "integrity": "sha512-l8YtdKSL31KR//x1DQ1XN2wGXV30uVTeo2SqGglbSWjR/VQAueIofkddKiZvyWVnIWcDGCaa6ZIhDoNL0Gp8QA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.19.tgz", + "integrity": "sha512-YHXAR2XF3PLS50KKin8ou2HaVLPsSVwaQ0WXkA+iW2thVCf6OP1BGXBwEDDHtSdL0A46UE8PLCEh5y20AP/eDw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" @@ -12179,24 +12179,24 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.18.tgz", - "integrity": "sha512-/ZFKzVj/Fe/1fJSnDuoh6uTL+LFCdSkrI7dCcunkTIvyQmEzdgtXtONjazVrUxbATNRiixRvURanD2TLDvk10w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-OVTQ/+lKL0F8/cxviLGtXUlMhhv+Lxpt1sFP1xDf39IOMZIcI4YYHdKJmTQiBDXG9+gTKkLhMnylfvPzDPGkng==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "datatables.net-bs": "^1.11.3", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-rose": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.18.tgz", - "integrity": "sha512-VscMzR80ikfd4iMKevrRh70jF+3wog64sTwyrTUdlTSWVq2VHyeYh8+lkHw1/lmeiDOVAAwwkhcUORHKWCrgxg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.19.tgz", + "integrity": "sha512-s4vfSeYUoI7dU1Zl7B7ddUDzZsahVwYJMXjQUY2NtpE71HGBCMINwnVGIc8hIHXwv2NyfdgAS2pzP9A0wv0TvA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" @@ -12206,12 +12206,12 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.18.tgz", - "integrity": "sha512-Lz9rIJYZfPFzNPJIOagNEEaK9tx594sAxMWOrKcIS764rVgpvI/nWG7yQBkH58nVuP1awzjt9WfD98PvrzF21w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.19.tgz", + "integrity": "sha512-0GUZARVhX5CEv8DY0YXMRm/4zttJOh77tP2wT7jWXHZtUdhYh6MjP08U4hZ98WuNpk/A6/dQtCkXE4Dy2GlPYQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" @@ -12221,47 +12221,47 @@ } }, "node_modules/@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.18.tgz", - "integrity": "sha512-mJIHHnLS5nel+0b6mcssHBBEXQ0N5fOXRi2J4v8sEiTS0GOYUXGpO+vNr13qo4C3QxAgZ14gdmoRIfPiiE2RCw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.19.tgz", + "integrity": "sha512-Do+K8ouCPLSLuILMpwm1FffPW/m0mRXtczjUjglpphajzdYjKh03dR1cMBc31AzOFQ2JBSbOLDKfT5cYYELTng==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.18.tgz", - "integrity": "sha512-638EKORCETRv5FxtmCbCKJn0C8P9/Fwxd8rwlzizl9mFBbcX3Lzs9MKS/5cPXVIoi8ROJuTY9Tw/HDhHF2eiKw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.19.tgz", + "integrity": "sha512-V3auS9QP61ewFaFcjUVQbo4ejb6hKV52eWZcAOIeelfPP+3OOGd78ZUvV/0ubk3llVexfP49Oq51Xj13smLRjA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.18.tgz", - "integrity": "sha512-IqyoOzIaNU8FRWmHo8DS1VQ1Yi6wSOLgVbNsI8N0Z1hXPBkMgNwYC7yjNb+6n8hhsI3rQsyNY1TduvqeBW3wOA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.19.tgz", + "integrity": "sha512-M4njV3Fu1dDzo3zB47CKV2A3UY9//ucjndY4mqRJk6MoI+4DKMXyJV+9vLYApmsEX30enRSHwTTXb1koCS971g==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "node_modules/@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.18.tgz", - "integrity": "sha512-Xlwbiknehz8cZOSoHUB810UwVJ4OjO0FZ/Rt5cuuskMIpefzx+3AeyggkZ/iwiJSVFLHOfWnLqFa88HI7ASVNg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.19.tgz", + "integrity": "sha512-YrUJZ82IGSyU4VKOJ3cPRT5hBDGBgxY6FmFwN0R4RClZ4ftj9i11BqvpWYHnI9zUwk3nu0HH2Yd7NfDGWuCzTQ==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -12281,13 +12281,13 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-big-number": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.18.tgz", - "integrity": "sha512-g8ibjs7DkYoj90Gjz4zt1sIsoIKOOt+bfyfst5y+/3mX4NYvB6l7SkijoKZ5rwQe14FGAVGCpyKjBSVAcAJlKw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.19.tgz", + "integrity": "sha512-8ujIoWDX39yV5nsh5iVQSvM5sbVrEX0j+zvohp0QzXkTa1tFFz1Qd4FrD0jhg3z0IzoeFWHzUMTHoVuDVzAbig==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", @@ -12463,13 +12463,13 @@ } }, "node_modules/@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.18.tgz", - "integrity": "sha512-GdpSurWZfsHQR9CF4Z34svKquvZX/tDQYdSeTxvWdo+a/yUf5BHEsGa3OUs7y4DFUY0ArY2gqAAdVYoVbYkotQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.19.tgz", + "integrity": "sha512-cCiCWmkDY09bBHrB/VT4S/2NQt5uQhiBorYwrCYc7Jx3nqfZQu81xQ1r4zzu/FETQaH4OLj+qK8iTYqP2pvnAg==", "dependencies": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -12485,12 +12485,12 @@ } }, "node_modules/@superset-ui/plugin-chart-echarts": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.18.tgz", - "integrity": "sha512-CvOF9jH/pML1SBw9CkqpenXUKgChpVP03pzgFYFJNKfSk8OxSdhp8pGbV2He3RiKAh0lvrkFT15izlrDdyZ0xQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.19.tgz", + "integrity": "sha512-qYNM//6b5+EewIejs+jSn76plahDFPlwHtyX1v0k2+WaSZM6GguT7sYW8a2dFG6mW4Jz7EchCSHwk7fs5DN7Iw==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^1.2.0", "echarts": "^5.2.2", "lodash": "^4.17.15" @@ -12500,12 +12500,12 @@ } }, "node_modules/@superset-ui/plugin-chart-pivot-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.18.tgz", - "integrity": "sha512-esbcxVWtfYoasUdhXXR/tyZH/RJ5bQJ3qg9ZbvMjx+ATtNpHNBdjcjurn/0ok1nO9zGC3w7sBgm4lsa/b4ruZA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-O3uqG6MSUaz/znxVeVI/fy8pzc72RHX5yCW7zn13Mny4bi1pZ76tgQ/JqGThwhuQC4U2fPM8ss6/fMoAyO0TJA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@superset-ui/react-pivottable": "^0.12.12" }, "peerDependencies": { @@ -12515,13 +12515,13 @@ } }, "node_modules/@superset-ui/plugin-chart-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.18.tgz", - "integrity": "sha512-IFTa7IiKjcn4gbmoHX9MCiohHGjziZwmK2F5TSR5QVEc9bo6ZM73S9JYLozMYY9QzHd2KgToJly0xJCvCTpARw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.19.tgz", + "integrity": "sha512-0lLvaYK4KHd6IX8DnWY20Oh2nzGbNDX6cJF3+C/w+S26xYGhYS6Ie8O1r6XxrL8YQdZPCY+oBWEAhIm7dKCtnw==", "dependencies": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-array": "^2.9.0", "@types/react-table": "^7.0.29", "d3-array": "^2.4.0", @@ -12546,12 +12546,12 @@ } }, "node_modules/@superset-ui/plugin-chart-word-cloud": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.18.tgz", - "integrity": "sha512-v5uckZpcqJwyMNh696xX0WsbhKX/0wtLKYHYWCfDvFC/SJpJoB8kzdpU9KDXVPNHaP2uOGU1y94/k8rmq38eFQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.19.tgz", + "integrity": "sha512-5VUg/rW2dAvYfcKC0cDCQtzebDExhdGAs9qlZfZIo3pqLBU0gVHleKP6ZVaw5cDUIKNjfyXifZdIn73EC0cdPA==", "dependencies": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -12592,14 +12592,14 @@ } }, "node_modules/@superset-ui/preset-chart-xy": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.18.tgz", - "integrity": "sha512-ynj+fydaBX+SCsUIsLmUrabxmkD3IsWg0x1ZHo4ssJoehDqSD2u6T78C45VyoLfwSJp0wrYqGuS0xVOmllvRlw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.19.tgz", + "integrity": "sha512-7DBTnd4x0jRyxMW0hhdjHKyRpH1odXJWiwbMdUIPMyd1xMiOnYMo22vfiU3u9Iz+wdsBzfCIWE7g2eFEkA+NiA==", "dependencies": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", @@ -53121,20 +53121,20 @@ } }, "@superset-ui/chart-controls": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.18.tgz", - "integrity": "sha512-QvQNi4QNi9l5+DUq0TEbi5mE4LyaJwTIyXuudTwHQUAxFH7TEUW+zJfj1+8hyjuoAPGWRMyMc+I0PbCUIsLXiA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/chart-controls/-/chart-controls-0.18.19.tgz", + "integrity": "sha512-Bn8FW9EhxivnRf/EBVjdjRHhDUzAB6mbUDgmthgKXn8u8un/W2R/SrV1kOKYDNn+BGM/ijZuqX439UZeNv70Ug==", "requires": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/core": "0.18.18", + "@superset-ui/core": "0.18.19", "lodash": "^4.17.15", "prop-types": "^15.7.2" } }, "@superset-ui/core": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.18.tgz", - "integrity": "sha512-rOursdFhh4smTmI4LQpSvBjAM8MYJzfw/FY79T0LKW4v8GRA6ZXDTkyK9dmVRW0qY/1W+iTYLvPWzAirQQw8mA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/core/-/core-0.18.19.tgz", + "integrity": "sha512-DDdf1KNYkUl+xerZpb6H8KYp+2rDcSEdSEOSSMJFeCd7j183ZSz7UNIGpjjRnz3GInqC9ypTNboxmR7mWoXb1w==", "requires": { "@babel/runtime": "^7.1.2", "@types/d3-format": "^1.3.0", @@ -53211,12 +53211,12 @@ } }, "@superset-ui/legacy-plugin-chart-calendar": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.18.tgz", - "integrity": "sha512-FXrm2axHC39x7ho2lH3l7jtbrHTYZDQ6RMnV0rb0gE89Kwz5MF8vW4+T8DJo1PMflYx9KI5VrERL/G4dFcfu+A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-calendar/-/legacy-plugin-chart-calendar-0.18.19.tgz", + "integrity": "sha512-nYWM35/2eoJQ8IKKUZ0XdDngm7E3DX+IjvTlZGcqhN8p2qq7mSLhrQ3QB+oyMBfC6wKMBd2UET9ncRGPRjjbLQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-selection": "^1.4.0", "d3-tip": "^0.9.1", @@ -53234,24 +53234,24 @@ } }, "@superset-ui/legacy-plugin-chart-chord": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.18.tgz", - "integrity": "sha512-FIbQP7DMl5DAfDbfqHm+jdrt374IQ35NJILAJbZAXna7j5SrqDMWVv4+2zDF7UkDXQKkEjusLI1Cp19xXN7Rzw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-chord/-/legacy-plugin-chart-chord-0.18.19.tgz", + "integrity": "sha512-phLNZU4lTvMLb0Q45bVxQ3V+xLbCmpHRZ0yWCaR7WQmaU2ExtQmuKSPjKcyhCahqZE6l4T5RLSpWGDBcatJ5hQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2", "react": "^16.13.1" } }, "@superset-ui/legacy-plugin-chart-country-map": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.18.tgz", - "integrity": "sha512-KTwB/K5pZT5s5s3/kPKHPxtWtEe6cAbpPFVvtCnLySViFRZ1TWCRLrNpQ3pn4u/KUNJvrirHGPsNnUQtcNk1LQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-country-map/-/legacy-plugin-chart-country-map-0.18.19.tgz", + "integrity": "sha512-UEKSvR5prV2KYnpm0REgRhFidNTuQ6NUCyZhmNQBZu68pQ93ePhUqI2UtZTdHmRnRxBZYEHOpbZpVLlGezlV0A==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.0.3", "prop-types": "^15.6.2" @@ -53268,34 +53268,34 @@ } }, "@superset-ui/legacy-plugin-chart-event-flow": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.18.tgz", - "integrity": "sha512-/RpHzVFfJX5R4IGr5O7fr4R1/8f9Ywx7hTQheq2MJ82gh5ryKmQaQVMoOtK88cxnd+N0AQnwKrLqg4E50GCHyA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-event-flow/-/legacy-plugin-chart-event-flow-0.18.19.tgz", + "integrity": "sha512-zdyKIYh5CdOXHiO4C0Nhkn7CMV6+UqmL8r4RawM3H6Xc1eqajdrOgu9iGPSYKYDqLwlZR3EWuUMZIxTYTM1gpA==", "requires": { "@data-ui/event-flow": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-force-directed": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.18.tgz", - "integrity": "sha512-HX2OBCwNGwp5FUc3riXOYATaFaz18faxfyoEeGJAK/CzSnv6NkDtexRGWEZlU6h9ZgxEPA/y8B7iNLJlzx18Tg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-force-directed/-/legacy-plugin-chart-force-directed-0.18.19.tgz", + "integrity": "sha512-i3CzVzxYZ8R9soAOytan4brlTs1Oo2n//IJmhXYT45PZI6m0mf4T2TBtGU7hAIyKLx3zFe1/OYTXRbaBLrM5Jw==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-heatmap": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.18.tgz", - "integrity": "sha512-hKWKU8JTX2TfDY0Pq7eSdC7eRlfR1UlNezqjcyRvnn8ZC+tsZJ0f3o7UC8y4Yd9E/hcRlWgXjT545WeKcDG7lQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-heatmap/-/legacy-plugin-chart-heatmap-0.18.19.tgz", + "integrity": "sha512-TJ8ri24VKq67XiGjTapeGN1Tq//h6DnnCGvQUxdnwBwhKzTKqglxf9t2MOO+GnKVm4LTtXAM1gVXXZDzZClA/g==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-svg-legend": "^1.x", "d3-tip": "^0.9.1", @@ -53303,14 +53303,14 @@ } }, "@superset-ui/legacy-plugin-chart-histogram": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.18.tgz", - "integrity": "sha512-Lp0YvpCHgqZzeTYgWdQbHWfbQt3PIMzuH7EsX/vr3gZqJOnbjRy0hKM4yZraTOiOkxyy4D8/MXmzCmrhRodM7A==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-histogram/-/legacy-plugin-chart-histogram-0.18.19.tgz", + "integrity": "sha512-nrV1as8N0xsITaGxjDtaFTj95Hgzd8kcdxF/hxU/ZeFG5poo67DIqY21IGACL4nyx4yviwqkOBJEJ2/eSso4Eg==", "requires": { "@data-ui/histogram": "^0.0.84", "@data-ui/theme": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/legend": "^0.0.198", "@vx/responsive": "^0.0.199", "@vx/scale": "^0.0.197", @@ -53378,12 +53378,12 @@ } }, "@superset-ui/legacy-plugin-chart-horizon": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.18.tgz", - "integrity": "sha512-gJtVRZBLjIMHHI5VtlRbHOJ9HUjb5ICyh9wbLuZnxN68sqJQyRwb4GtB0H1+gLizmvrcgFK0hy227TAkJdq33Q==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-horizon/-/legacy-plugin-chart-horizon-0.18.19.tgz", + "integrity": "sha512-GEUeeEuBVN2fA7g0oDmKijWI3y+H+DWmX5WMr76CyTL0mKcQ3k2HvtV4N1mULugtnXDCnGO74Lae1Uhbrk2BwQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^2.0.3", "d3-scale": "^3.0.1", "prop-types": "^15.6.2" @@ -53420,12 +53420,12 @@ } }, "@superset-ui/legacy-plugin-chart-map-box": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.18.tgz", - "integrity": "sha512-aiDP+LTtd+7E9ghZGEHKT9Lh0spnYTeR0Su3OJDTZkyHkh8PzHFWqlG2yiOuPddjOw79z6b93+b6sSFqiUMw1w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-map-box/-/legacy-plugin-chart-map-box-0.18.19.tgz", + "integrity": "sha512-kATV3Wg39GSgi8WQtIXrYyyZA8AXY2rSPNsYjL/OtlJFsmLVwoo8gLRPNs2w8NwKz5M2nx4iL9mEUcSsm4n+FQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "mapbox-gl": "^0.53.0", "prop-types": "^15.6.2", "react-map-gl": "^4.0.10", @@ -53434,118 +53434,118 @@ } }, "@superset-ui/legacy-plugin-chart-paired-t-test": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.18.tgz", - "integrity": "sha512-k+SWI2FheQ3BkCyWfXZp3ILgANCC7Cs8PZjUAKgok4InzidtqmSkRloq3XAnjOuBnJNf4UEwSGKnCjtu2YhyIA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-paired-t-test/-/legacy-plugin-chart-paired-t-test-0.18.19.tgz", + "integrity": "sha512-9gmNLLdu4hV03NbzlTWZwO2JoF3IA67WP/9nzAG1vchRoIBKWvapjFrbqIb3D6acmLIjB9Trujk2oMVvIQhBnQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "distributions": "^1.0.0", "prop-types": "^15.6.2", "reactable": "^1.1.0" } }, "@superset-ui/legacy-plugin-chart-parallel-coordinates": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.18.tgz", - "integrity": "sha512-rJDDrSbhP9wCNqNNEmBV9B4pnbzSmXfQCrk7vLP20DMDg2CLV65mJ8M79lk+fImO8vt01AAhtZFMWcjJM7D9Tg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-parallel-coordinates/-/legacy-plugin-chart-parallel-coordinates-0.18.19.tgz", + "integrity": "sha512-T5YBNoBEIy3JxRZKgYPc8mXVTqrXjLanz5MQIpbogwNljhxKhASPBVKTlfChnv8oASAs0rxDqFHUWd48egaa5A==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.7.2" } }, "@superset-ui/legacy-plugin-chart-partition": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.18.tgz", - "integrity": "sha512-l8YtdKSL31KR//x1DQ1XN2wGXV30uVTeo2SqGglbSWjR/VQAueIofkddKiZvyWVnIWcDGCaa6ZIhDoNL0Gp8QA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-partition/-/legacy-plugin-chart-partition-0.18.19.tgz", + "integrity": "sha512-YHXAR2XF3PLS50KKin8ou2HaVLPsSVwaQ0WXkA+iW2thVCf6OP1BGXBwEDDHtSdL0A46UE8PLCEh5y20AP/eDw==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-hierarchy": "^1.1.8", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-pivot-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.18.tgz", - "integrity": "sha512-/ZFKzVj/Fe/1fJSnDuoh6uTL+LFCdSkrI7dCcunkTIvyQmEzdgtXtONjazVrUxbATNRiixRvURanD2TLDvk10w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-pivot-table/-/legacy-plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-OVTQ/+lKL0F8/cxviLGtXUlMhhv+Lxpt1sFP1xDf39IOMZIcI4YYHdKJmTQiBDXG9+gTKkLhMnylfvPzDPGkng==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "datatables.net-bs": "^1.11.3", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-rose": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.18.tgz", - "integrity": "sha512-VscMzR80ikfd4iMKevrRh70jF+3wog64sTwyrTUdlTSWVq2VHyeYh8+lkHw1/lmeiDOVAAwwkhcUORHKWCrgxg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-rose/-/legacy-plugin-chart-rose-0.18.19.tgz", + "integrity": "sha512-s4vfSeYUoI7dU1Zl7B7ddUDzZsahVwYJMXjQUY2NtpE71HGBCMINwnVGIc8hIHXwv2NyfdgAS2pzP9A0wv0TvA==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "nvd3": "1.8.6", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.18.tgz", - "integrity": "sha512-Lz9rIJYZfPFzNPJIOagNEEaK9tx594sAxMWOrKcIS764rVgpvI/nWG7yQBkH58nVuP1awzjt9WfD98PvrzF21w==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey/-/legacy-plugin-chart-sankey-0.18.19.tgz", + "integrity": "sha512-0GUZARVhX5CEv8DY0YXMRm/4zttJOh77tP2wT7jWXHZtUdhYh6MjP08U4hZ98WuNpk/A6/dQtCkXE4Dy2GlPYQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-sankey": "^0.4.2", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sankey-loop": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.18.tgz", - "integrity": "sha512-mJIHHnLS5nel+0b6mcssHBBEXQ0N5fOXRi2J4v8sEiTS0GOYUXGpO+vNr13qo4C3QxAgZ14gdmoRIfPiiE2RCw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sankey-loop/-/legacy-plugin-chart-sankey-loop-0.18.19.tgz", + "integrity": "sha512-Do+K8ouCPLSLuILMpwm1FffPW/m0mRXtczjUjglpphajzdYjKh03dR1cMBc31AzOFQ2JBSbOLDKfT5cYYELTng==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-sankey-diagram": "^0.7.3", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-sunburst": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.18.tgz", - "integrity": "sha512-638EKORCETRv5FxtmCbCKJn0C8P9/Fwxd8rwlzizl9mFBbcX3Lzs9MKS/5cPXVIoi8ROJuTY9Tw/HDhHF2eiKw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-sunburst/-/legacy-plugin-chart-sunburst-0.18.19.tgz", + "integrity": "sha512-V3auS9QP61ewFaFcjUVQbo4ejb6hKV52eWZcAOIeelfPP+3OOGd78ZUvV/0ubk3llVexfP49Oq51Xj13smLRjA==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-treemap": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.18.tgz", - "integrity": "sha512-IqyoOzIaNU8FRWmHo8DS1VQ1Yi6wSOLgVbNsI8N0Z1hXPBkMgNwYC7yjNb+6n8hhsI3rQsyNY1TduvqeBW3wOA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-treemap/-/legacy-plugin-chart-treemap-0.18.19.tgz", + "integrity": "sha512-M4njV3Fu1dDzo3zB47CKV2A3UY9//ucjndY4mqRJk6MoI+4DKMXyJV+9vLYApmsEX30enRSHwTTXb1koCS971g==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-hierarchy": "^1.1.8", "d3-selection": "^1.4.0", "prop-types": "^15.6.2" } }, "@superset-ui/legacy-plugin-chart-world-map": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.18.tgz", - "integrity": "sha512-Xlwbiknehz8cZOSoHUB810UwVJ4OjO0FZ/Rt5cuuskMIpefzx+3AeyggkZ/iwiJSVFLHOfWnLqFa88HI7ASVNg==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-plugin-chart-world-map/-/legacy-plugin-chart-world-map-0.18.19.tgz", + "integrity": "sha512-YrUJZ82IGSyU4VKOJ3cPRT5hBDGBgxY6FmFwN0R4RClZ4ftj9i11BqvpWYHnI9zUwk3nu0HH2Yd7NfDGWuCzTQ==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-array": "^2.4.0", "d3-color": "^1.4.1", @@ -53564,13 +53564,13 @@ } }, "@superset-ui/legacy-preset-chart-big-number": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.18.tgz", - "integrity": "sha512-g8ibjs7DkYoj90Gjz4zt1sIsoIKOOt+bfyfst5y+/3mX4NYvB6l7SkijoKZ5rwQe14FGAVGCpyKjBSVAcAJlKw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-big-number/-/legacy-preset-chart-big-number-0.18.19.tgz", + "integrity": "sha512-8ujIoWDX39yV5nsh5iVQSvM5sbVrEX0j+zvohp0QzXkTa1tFFz1Qd4FrD0jhg3z0IzoeFWHzUMTHoVuDVzAbig==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-color": "^1.2.2", "@types/shortid": "^0.0.29", "d3-color": "^1.2.3", @@ -53725,13 +53725,13 @@ } }, "@superset-ui/legacy-preset-chart-nvd3": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.18.tgz", - "integrity": "sha512-GdpSurWZfsHQR9CF4Z34svKquvZX/tDQYdSeTxvWdo+a/yUf5BHEsGa3OUs7y4DFUY0ArY2gqAAdVYoVbYkotQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/legacy-preset-chart-nvd3/-/legacy-preset-chart-nvd3-0.18.19.tgz", + "integrity": "sha512-cCiCWmkDY09bBHrB/VT4S/2NQt5uQhiBorYwrCYc7Jx3nqfZQu81xQ1r4zzu/FETQaH4OLj+qK8iTYqP2pvnAg==", "requires": { "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3": "^3.5.17", "d3-tip": "^0.9.1", "dompurify": "^2.0.6", @@ -53744,35 +53744,35 @@ } }, "@superset-ui/plugin-chart-echarts": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.18.tgz", - "integrity": "sha512-CvOF9jH/pML1SBw9CkqpenXUKgChpVP03pzgFYFJNKfSk8OxSdhp8pGbV2He3RiKAh0lvrkFT15izlrDdyZ0xQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-echarts/-/plugin-chart-echarts-0.18.19.tgz", + "integrity": "sha512-qYNM//6b5+EewIejs+jSn76plahDFPlwHtyX1v0k2+WaSZM6GguT7sYW8a2dFG6mW4Jz7EchCSHwk7fs5DN7Iw==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "d3-array": "^1.2.0", "echarts": "^5.2.2", "lodash": "^4.17.15" } }, "@superset-ui/plugin-chart-pivot-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.18.tgz", - "integrity": "sha512-esbcxVWtfYoasUdhXXR/tyZH/RJ5bQJ3qg9ZbvMjx+ATtNpHNBdjcjurn/0ok1nO9zGC3w7sBgm4lsa/b4ruZA==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-pivot-table/-/plugin-chart-pivot-table-0.18.19.tgz", + "integrity": "sha512-O3uqG6MSUaz/znxVeVI/fy8pzc72RHX5yCW7zn13Mny4bi1pZ76tgQ/JqGThwhuQC4U2fPM8ss6/fMoAyO0TJA==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@superset-ui/react-pivottable": "^0.12.12" } }, "@superset-ui/plugin-chart-table": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.18.tgz", - "integrity": "sha512-IFTa7IiKjcn4gbmoHX9MCiohHGjziZwmK2F5TSR5QVEc9bo6ZM73S9JYLozMYY9QzHd2KgToJly0xJCvCTpARw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-table/-/plugin-chart-table-0.18.19.tgz", + "integrity": "sha512-0lLvaYK4KHd6IX8DnWY20Oh2nzGbNDX6cJF3+C/w+S26xYGhYS6Ie8O1r6XxrL8YQdZPCY+oBWEAhIm7dKCtnw==", "requires": { "@react-icons/all-files": "^4.1.0", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-array": "^2.9.0", "@types/react-table": "^7.0.29", "d3-array": "^2.4.0", @@ -53794,12 +53794,12 @@ } }, "@superset-ui/plugin-chart-word-cloud": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.18.tgz", - "integrity": "sha512-v5uckZpcqJwyMNh696xX0WsbhKX/0wtLKYHYWCfDvFC/SJpJoB8kzdpU9KDXVPNHaP2uOGU1y94/k8rmq38eFQ==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.18.19.tgz", + "integrity": "sha512-5VUg/rW2dAvYfcKC0cDCQtzebDExhdGAs9qlZfZIo3pqLBU0gVHleKP6ZVaw5cDUIKNjfyXifZdIn73EC0cdPA==", "requires": { - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@types/d3-cloud": "^1.2.1", "@types/d3-scale": "^2.0.2", "d3-cloud": "^1.2.5", @@ -53838,14 +53838,14 @@ } }, "@superset-ui/preset-chart-xy": { - "version": "0.18.18", - "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.18.tgz", - "integrity": "sha512-ynj+fydaBX+SCsUIsLmUrabxmkD3IsWg0x1ZHo4ssJoehDqSD2u6T78C45VyoLfwSJp0wrYqGuS0xVOmllvRlw==", + "version": "0.18.19", + "resolved": "https://registry.npmjs.org/@superset-ui/preset-chart-xy/-/preset-chart-xy-0.18.19.tgz", + "integrity": "sha512-7DBTnd4x0jRyxMW0hhdjHKyRpH1odXJWiwbMdUIPMyd1xMiOnYMo22vfiU3u9Iz+wdsBzfCIWE7g2eFEkA+NiA==", "requires": { "@data-ui/theme": "^0.0.84", "@data-ui/xy-chart": "^0.0.84", - "@superset-ui/chart-controls": "0.18.18", - "@superset-ui/core": "0.18.18", + "@superset-ui/chart-controls": "0.18.19", + "@superset-ui/core": "0.18.19", "@vx/axis": "^0.0.198", "@vx/legend": "^0.0.198", "@vx/scale": "^0.0.197", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 7c5da5eb0bce..719c5bcf154e 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -68,35 +68,35 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@superset-ui/chart-controls": "^0.18.18", - "@superset-ui/core": "^0.18.18", - "@superset-ui/legacy-plugin-chart-calendar": "^0.18.18", - "@superset-ui/legacy-plugin-chart-chord": "^0.18.18", - "@superset-ui/legacy-plugin-chart-country-map": "^0.18.18", - "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.18", - "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.18", - "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.18", - "@superset-ui/legacy-plugin-chart-histogram": "^0.18.18", - "@superset-ui/legacy-plugin-chart-horizon": "^0.18.18", - "@superset-ui/legacy-plugin-chart-map-box": "^0.18.18", - "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.18", - "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.18", - "@superset-ui/legacy-plugin-chart-partition": "^0.18.18", - "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.18", - "@superset-ui/legacy-plugin-chart-rose": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sankey": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.18", - "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.18", - "@superset-ui/legacy-plugin-chart-treemap": "^0.18.18", - "@superset-ui/legacy-plugin-chart-world-map": "^0.18.18", - "@superset-ui/legacy-preset-chart-big-number": "^0.18.18", + "@superset-ui/chart-controls": "^0.18.19", + "@superset-ui/core": "^0.18.19", + "@superset-ui/legacy-plugin-chart-calendar": "^0.18.19", + "@superset-ui/legacy-plugin-chart-chord": "^0.18.19", + "@superset-ui/legacy-plugin-chart-country-map": "^0.18.19", + "@superset-ui/legacy-plugin-chart-event-flow": "^0.18.19", + "@superset-ui/legacy-plugin-chart-force-directed": "^0.18.19", + "@superset-ui/legacy-plugin-chart-heatmap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-histogram": "^0.18.19", + "@superset-ui/legacy-plugin-chart-horizon": "^0.18.19", + "@superset-ui/legacy-plugin-chart-map-box": "^0.18.19", + "@superset-ui/legacy-plugin-chart-paired-t-test": "^0.18.19", + "@superset-ui/legacy-plugin-chart-parallel-coordinates": "^0.18.19", + "@superset-ui/legacy-plugin-chart-partition": "^0.18.19", + "@superset-ui/legacy-plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/legacy-plugin-chart-rose": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sankey-loop": "^0.18.19", + "@superset-ui/legacy-plugin-chart-sunburst": "^0.18.19", + "@superset-ui/legacy-plugin-chart-treemap": "^0.18.19", + "@superset-ui/legacy-plugin-chart-world-map": "^0.18.19", + "@superset-ui/legacy-preset-chart-big-number": "^0.18.19", "@superset-ui/legacy-preset-chart-deckgl": "^0.4.13", - "@superset-ui/legacy-preset-chart-nvd3": "^0.18.18", - "@superset-ui/plugin-chart-echarts": "^0.18.18", - "@superset-ui/plugin-chart-pivot-table": "^0.18.18", - "@superset-ui/plugin-chart-table": "^0.18.18", - "@superset-ui/plugin-chart-word-cloud": "^0.18.18", - "@superset-ui/preset-chart-xy": "^0.18.18", + "@superset-ui/legacy-preset-chart-nvd3": "^0.18.19", + "@superset-ui/plugin-chart-echarts": "^0.18.19", + "@superset-ui/plugin-chart-pivot-table": "^0.18.19", + "@superset-ui/plugin-chart-table": "^0.18.19", + "@superset-ui/plugin-chart-word-cloud": "^0.18.19", + "@superset-ui/preset-chart-xy": "^0.18.19", "@vx/responsive": "^0.0.195", "abortcontroller-polyfill": "^1.1.9", "antd": "^4.9.4", @@ -329,4 +329,4 @@ ] } } -} +} \ No newline at end of file From 98650af0c1cdc200f0903713797a15dcd715a43f Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 08:02:12 +0000 Subject: [PATCH 18/23] Fix end of file --- superset-frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 719c5bcf154e..243a71935388 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -329,4 +329,4 @@ ] } } -} \ No newline at end of file +} From 398849608eb9c6e1921f66e6f0c5cef8cb0823b8 Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 11:02:53 +0000 Subject: [PATCH 19/23] Update tests --- .../cypress/integration/dashboard/edit_properties.test.ts | 4 ++++ .../dashboard/components/PropertiesModal_spec.jsx | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts index c5cbfb7bba66..025fc25f63cc 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts @@ -94,6 +94,10 @@ describe('Dashboard edit action', () => { .get('[data-test="dashboard-title-input"]') .type(`{selectall}{backspace}${dashboardTitle}`); + cy.wait('@dashboardGet').then(() => { + selectColorScheme('d3Category20b'); + }); + // save edit changes cy.get('.ant-modal-footer') .contains('Save') diff --git a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx index df2a03637fa5..9685277228dd 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx @@ -94,10 +94,10 @@ describe('PropertiesModal', () => { describe('without metadata', () => { const wrapper = setup({ colorScheme: 'SUPERSET_DEFAULT' }); const modalInstance = wrapper.find('PropertiesModal').instance(); - it('does not update the color scheme in the metadata', () => { + it('updates the color scheme in the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).not.toHaveBeenCalled(); + expect(spy).toHaveBeenCalledWith('{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}'); }); }); describe('with metadata', () => { @@ -125,10 +125,10 @@ describe('PropertiesModal', () => { json_metadata: '{"timed_refresh_immune_slices": []}', }, }); - it('will not update the metadata', () => { + it('will update the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).not.toHaveBeenCalled(); + expect(spy).toHaveBeenCalledWith('{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}'); }); }); }); From 364e39b48ef9f5d15e140e3b468bb7d243bd6ceb Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 11:24:55 +0000 Subject: [PATCH 20/23] Fix lint --- .../dashboard/components/PropertiesModal_spec.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx index 9685277228dd..efd33802f057 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/PropertiesModal_spec.jsx @@ -97,7 +97,9 @@ describe('PropertiesModal', () => { it('updates the color scheme in the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).toHaveBeenCalledWith('{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}'); + expect(spy).toHaveBeenCalledWith( + '{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}', + ); }); }); describe('with metadata', () => { @@ -128,7 +130,9 @@ describe('PropertiesModal', () => { it('will update the metadata', () => { const spy = jest.spyOn(modalInstance, 'onMetadataChange'); modalInstance.onColorSchemeChange('SUPERSET_DEFAULT'); - expect(spy).toHaveBeenCalledWith('{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}'); + expect(spy).toHaveBeenCalledWith( + '{"something": "foo", "color_scheme": "SUPERSET_DEFAULT", "label_colors": {}}', + ); }); }); }); From 65ba9855c3bffd95253053f85ed571f46f1ce7f4 Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 12:08:48 +0000 Subject: [PATCH 21/23] Update Cypress --- .../cypress/integration/dashboard/edit_properties.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts index 025fc25f63cc..bd8b193b33ad 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts @@ -25,7 +25,7 @@ import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper'; function selectColorScheme(color: string) { // open color scheme dropdown cy.get('.modal-body') - .contains('Color Scheme') + .contains('Color scheme') .parents('.ControlHeader') .next('.Select') .click() From 3fccee63ef0cea80d82a6f5a1ed330d0de44f4ae Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 13:19:57 +0000 Subject: [PATCH 22/23] Update setColorScheme method --- .../cypress/integration/dashboard/edit_properties.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts index bd8b193b33ad..c75fe2ac4256 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts @@ -27,7 +27,7 @@ function selectColorScheme(color: string) { cy.get('.modal-body') .contains('Color scheme') .parents('.ControlHeader') - .next('.Select') + .next('.ant-select') .click() .then($colorSelect => { // select a new color scheme From acacba5cb9a84ceb15cca920cad0bd39e4d9e3db Mon Sep 17 00:00:00 2001 From: geido Date: Wed, 3 Nov 2021 13:44:38 +0000 Subject: [PATCH 23/23] Use Antd modal body --- .../integration/dashboard/edit_properties.test.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts index c75fe2ac4256..9e2fe4928862 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts @@ -24,7 +24,7 @@ import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper'; function selectColorScheme(color: string) { // open color scheme dropdown - cy.get('.modal-body') + cy.get('.ant-modal-body') .contains('Color scheme') .parents('.ControlHeader') .next('.ant-select') @@ -37,7 +37,7 @@ function selectColorScheme(color: string) { function assertMetadata(text: string) { const regex = new RegExp(text); - cy.get('.modal-body') + cy.get('.ant-modal-body') .find('#json_metadata') .should('be.visible') .then(() => { @@ -50,12 +50,15 @@ function assertMetadata(text: string) { } function typeMetadata(text: string) { - cy.get('.modal-body').find('#json_metadata').should('be.visible').type(text); + cy.get('.ant-modal-body') + .find('#json_metadata') + .should('be.visible') + .type(text); } function openAdvancedProperties() { return cy - .get('.modal-body') + .get('.ant-modal-body') .contains('Advanced') .should('be.visible') .click(); @@ -150,7 +153,7 @@ describe('Dashboard edit action', () => { .click() .then(() => { // assert that modal edit window has closed - cy.get('.modal-body').should('not.exist'); + cy.get('.ant-modal-body').should('not.exist'); // assert color has been updated openDashboardEditProperties(); @@ -181,7 +184,7 @@ describe('Dashboard edit action', () => { .click() .then(() => { // assert that modal edit window has closed - cy.get('.modal-body') + cy.get('.ant-modal-body') .contains('A valid color scheme is required') .should('be.visible'); });