Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into newFeatureFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi authored Jun 17, 2021
2 parents ff4b999 + 7aec0a4 commit ce30cc3
Show file tree
Hide file tree
Showing 50 changed files with 241 additions and 149 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"plugins/*"
],
"useWorkspaces": true,
"version": "0.17.52",
"version": "0.17.58",
"ignoreChanges": [
"**/*.md",
"**/*.spec.tsx?",
Expand Down
4 changes: 2 additions & 2 deletions packages/superset-ui-chart-controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/chart-controls",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset UI control-utils",
"sideEffects": false,
"main": "lib/index.js",
Expand All @@ -26,7 +26,7 @@
"access": "public"
},
"dependencies": {
"@superset-ui/core": "0.17.52",
"@superset-ui/core": "0.17.58",
"lodash": "^4.17.15",
"prop-types": "^15.7.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ const datasourceControl: SharedControlConfig<'DatasourceControl'> = {
label: t('Datasource'),
default: null,
description: null,
mapStateToProps: ({ datasource }) => ({
mapStateToProps: ({ datasource, form_data }) => ({
datasource,
form_data,
}),
};

Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/core",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset UI core",
"sideEffects": false,
"main": "lib/index.js",
Expand Down
2 changes: 0 additions & 2 deletions packages/superset-ui-core/src/chart/components/SuperChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ export default class SuperChart extends React.PureComponent<Props, {}> {
<BoundingBox>
<ParentSize debounceTime={debounceTime}>
{({ width, height }) =>
width > 0 &&
height > 0 &&
this.renderChart(
widthInfo.isDynamic ? Math.floor(width) : widthInfo.value,
heightInfo.isDynamic ? Math.floor(height) : heightInfo.value,
Expand Down
39 changes: 26 additions & 13 deletions packages/superset-ui-core/src/chart/models/ChartMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ interface LookupTable {
[key: string]: boolean;
}

export interface ExampleImage {
url: string;
caption?: string;
}

export interface ChartMetadataConfig {
name: string;
canBeAnnotationTypes?: string[];
Expand All @@ -16,6 +21,10 @@ export interface ChartMetadataConfig {
thumbnail: string;
useLegacyApi?: boolean;
behaviors?: Behavior[];
deprecated?: boolean;
exampleGallery?: ExampleImage[];
tags?: string[];
category?: string | null;
}

export default class ChartMetadata {
Expand Down Expand Up @@ -43,6 +52,14 @@ export default class ChartMetadata {

enableNoResults: boolean;

deprecated: boolean;

exampleGallery: ExampleImage[];

tags: string[];

category: string | null;

constructor(config: ChartMetadataConfig) {
const {
name,
Expand All @@ -56,6 +73,10 @@ export default class ChartMetadata {
behaviors = [],
datasourceCount = 1,
enableNoResults = true,
deprecated = false,
exampleGallery = [],
tags = [],
category = null,
} = config;

this.name = name;
Expand All @@ -78,25 +99,17 @@ export default class ChartMetadata {
this.behaviors = behaviors;
this.datasourceCount = datasourceCount;
this.enableNoResults = enableNoResults;
this.deprecated = deprecated;
this.exampleGallery = exampleGallery;
this.tags = tags;
this.category = category;
}

canBeAnnotationType(type: string): boolean {
return this.canBeAnnotationTypesLookup[type] || false;
}

clone() {
return new ChartMetadata({
canBeAnnotationTypes: this.canBeAnnotationTypes,
credits: this.credits,
description: this.description,
name: this.name,
show: this.show,
supportedAnnotationTypes: this.supportedAnnotationTypes,
thumbnail: this.thumbnail,
useLegacyApi: this.useLegacyApi,
behaviors: this.behaviors,
datasourceCount: this.datasourceCount,
enableNoResults: this.enableNoResults,
});
return new ChartMetadata(this);
}
}
2 changes: 1 addition & 1 deletion packages/superset-ui-core/src/utils/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export enum FeatureFlag {
GLOBAL_ASYNC_QUERIES = 'GLOBAL_ASYNC_QUERIES',
ENABLE_TEMPLATE_PROCESSING = 'ENABLE_TEMPLATE_PROCESSING',
ENABLE_EXPLORE_DRAG_AND_DROP = 'ENABLE_EXPLORE_DRAG_AND_DROP',
// FORCE_DATABASE_CONNECTIONS_SSL is a depreciated flag
FORCE_DATABASE_CONNECTIONS_SSL = 'FORCE_DATABASE_CONNECTIONS_SSL',
ENFORCE_DB_ENCRYPTION_UI = 'ENFORCE_DB_ENCRYPTION_UI',
ENABLE_TEMPLATE_REMOVE_FILTERS = 'ENABLE_TEMPLATE_REMOVE_FILTERS',
DASHBOARD_RBAC = 'DASHBOARD_RBAC',
ALERTS_ATTACH_REPORTS = 'ALERTS_ATTACH_REPORTS',
ALLOW_FULL_CSV_EXPORT = 'ALLOW_FULL_CSV_EXPORT',
}
export type ScheduleQueriesProps = {
JSONSCHEMA: {
Expand Down
50 changes: 25 additions & 25 deletions packages/superset-ui-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/demo",
"version": "0.17.52",
"version": "0.17.58",
"description": "Storybook for Superset UI ✨",
"private": true,
"main": "index.js",
Expand Down Expand Up @@ -39,31 +39,31 @@
"@storybook/preset-typescript": "^3.0.0",
"@storybook/react": "^5.3.18",
"@superset-ui/core": "file:../superset-ui-core/src",
"@superset-ui/legacy-plugin-chart-calendar": "0.17.52",
"@superset-ui/legacy-plugin-chart-chord": "0.17.52",
"@superset-ui/legacy-plugin-chart-country-map": "0.17.52",
"@superset-ui/legacy-plugin-chart-event-flow": "0.17.52",
"@superset-ui/legacy-plugin-chart-force-directed": "0.17.52",
"@superset-ui/legacy-plugin-chart-heatmap": "0.17.52",
"@superset-ui/legacy-plugin-chart-histogram": "0.17.52",
"@superset-ui/legacy-plugin-chart-horizon": "0.17.52",
"@superset-ui/legacy-plugin-chart-map-box": "0.17.52",
"@superset-ui/legacy-plugin-chart-paired-t-test": "0.17.52",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "0.17.52",
"@superset-ui/legacy-plugin-chart-partition": "0.17.52",
"@superset-ui/legacy-plugin-chart-pivot-table": "0.17.52",
"@superset-ui/legacy-plugin-chart-rose": "0.17.52",
"@superset-ui/legacy-plugin-chart-sankey": "0.17.52",
"@superset-ui/legacy-plugin-chart-sankey-loop": "0.17.52",
"@superset-ui/legacy-plugin-chart-sunburst": "0.17.52",
"@superset-ui/legacy-plugin-chart-time-table": "0.17.52",
"@superset-ui/legacy-plugin-chart-treemap": "0.17.52",
"@superset-ui/legacy-plugin-chart-calendar": "0.17.58",
"@superset-ui/legacy-plugin-chart-chord": "0.17.58",
"@superset-ui/legacy-plugin-chart-country-map": "0.17.58",
"@superset-ui/legacy-plugin-chart-event-flow": "0.17.58",
"@superset-ui/legacy-plugin-chart-force-directed": "0.17.58",
"@superset-ui/legacy-plugin-chart-heatmap": "0.17.58",
"@superset-ui/legacy-plugin-chart-histogram": "0.17.58",
"@superset-ui/legacy-plugin-chart-horizon": "0.17.58",
"@superset-ui/legacy-plugin-chart-map-box": "0.17.58",
"@superset-ui/legacy-plugin-chart-paired-t-test": "0.17.58",
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "0.17.58",
"@superset-ui/legacy-plugin-chart-partition": "0.17.58",
"@superset-ui/legacy-plugin-chart-pivot-table": "0.17.58",
"@superset-ui/legacy-plugin-chart-rose": "0.17.58",
"@superset-ui/legacy-plugin-chart-sankey": "0.17.58",
"@superset-ui/legacy-plugin-chart-sankey-loop": "0.17.58",
"@superset-ui/legacy-plugin-chart-sunburst": "0.17.58",
"@superset-ui/legacy-plugin-chart-time-table": "0.17.58",
"@superset-ui/legacy-plugin-chart-treemap": "0.17.58",
"@superset-ui/legacy-plugin-chart-word-cloud": "^0.11.15",
"@superset-ui/legacy-plugin-chart-world-map": "0.17.52",
"@superset-ui/legacy-preset-chart-big-number": "0.17.52",
"@superset-ui/plugin-chart-echarts": "0.17.52",
"@superset-ui/plugin-chart-table": "0.17.52",
"@superset-ui/plugin-chart-word-cloud": "0.17.52",
"@superset-ui/legacy-plugin-chart-world-map": "0.17.58",
"@superset-ui/legacy-preset-chart-big-number": "0.17.58",
"@superset-ui/plugin-chart-echarts": "0.17.58",
"@superset-ui/plugin-chart-table": "0.17.58",
"@superset-ui/plugin-chart-word-cloud": "0.17.58",
"@types/react-loadable": "^5.5.3",
"@types/react-resizable": "^1.7.2",
"@types/storybook__react": "5.2.1",
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-calendar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-calendar",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Calendar Heatmap",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3-array": "^2.0.3",
"d3-selection": "^1.4.0",
"d3-tip": "^0.9.1",
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-chord/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-chord",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Chord Diagram",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3": "^3.5.17",
"prop-types": "^15.6.2",
"react": "^16.13.1"
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-country-map/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-country-map",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Country Map",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3": "^3.5.17",
"d3-array": "^2.0.3",
"prop-types": "^15.6.2"
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-event-flow/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-event-flow",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Event Flow",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -29,8 +29,8 @@
},
"dependencies": {
"@data-ui/event-flow": "^0.0.84",
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"prop-types": "^15.6.2"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-force-directed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-force-directed",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Force-directed Graph",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3": "^3.5.17",
"prop-types": "^15.7.2"
},
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-heatmap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-heatmap",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Heatmap",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3": "^3.5.17",
"d3-svg-legend": "^1.x",
"d3-tip": "^0.9.1",
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-histogram/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-histogram",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Histogram",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -30,8 +30,8 @@
"dependencies": {
"@data-ui/histogram": "^0.0.84",
"@data-ui/theme": "^0.0.84",
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"@vx/legend": "^0.0.198",
"@vx/responsive": "^0.0.199",
"@vx/scale": "^0.0.197",
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-horizon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-horizon",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - Horizon",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"d3-array": "^2.0.3",
"d3-scale": "^3.0.1",
"prop-types": "^15.6.2"
Expand Down
6 changes: 3 additions & 3 deletions plugins/legacy-plugin-chart-map-box/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superset-ui/legacy-plugin-chart-map-box",
"version": "0.17.52",
"version": "0.17.58",
"description": "Superset Legacy Chart - MapBox",
"sideEffects": [
"*.css"
Expand Down Expand Up @@ -28,8 +28,8 @@
"access": "public"
},
"dependencies": {
"@superset-ui/chart-controls": "0.17.52",
"@superset-ui/core": "0.17.52",
"@superset-ui/chart-controls": "0.17.58",
"@superset-ui/core": "0.17.58",
"immutable": "^3.8.2",
"mapbox-gl": "^0.53.0",
"prop-types": "^15.6.2",
Expand Down
Loading

0 comments on commit ce30cc3

Please sign in to comment.