forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugin-word-cloud): change how wordcloud is exported (apache#418)
* feat(plugin-word-cloud): change how wordcloud is exported * docs: fix storybook
- Loading branch information
1 parent
2a728d5
commit 3708ade
Showing
12 changed files
with
50 additions
and
35 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
...i/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-word-cloud/Stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 3 additions & 24 deletions
27
...t-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-word-cloud/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
import { t } from '@superset-ui/translation'; | ||
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart'; | ||
import buildQuery from './buildQuery'; | ||
import { WordCloudFormData } from './types'; | ||
import transformProps from './transformProps'; | ||
import thumbnail from './images/thumbnail.png'; | ||
|
||
const metadata = new ChartMetadata({ | ||
credits: ['https://github.com/jasondavies/d3-cloud'], | ||
description: '', | ||
name: t('Word Cloud'), | ||
thumbnail, | ||
}); | ||
|
||
export default class WordCloudChartPlugin extends ChartPlugin<WordCloudFormData> { | ||
constructor() { | ||
super({ | ||
buildQuery, | ||
loadChart: () => import('./chart/WordCloud'), | ||
metadata, | ||
transformProps, | ||
}); | ||
} | ||
} | ||
export { default as WordCloudChartPlugin } from './plugin'; | ||
export { default as LegacyWordCloudChartPlugin } from './legacyPlugin'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...plugin-chart-word-cloud/src/buildQuery.ts → ...chart-word-cloud/src/plugin/buildQuery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...end/temporary_superset_ui/superset-ui/plugins/plugin-chart-word-cloud/src/plugin/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { t } from '@superset-ui/translation'; | ||
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart'; | ||
import buildQuery from './buildQuery'; | ||
import { WordCloudFormData } from '../types'; | ||
import transformProps from './transformProps'; | ||
import thumbnail from '../images/thumbnail.png'; | ||
|
||
const metadata = new ChartMetadata({ | ||
credits: ['https://github.com/jasondavies/d3-cloud'], | ||
description: '', | ||
name: t('Word Cloud'), | ||
thumbnail, | ||
}); | ||
|
||
export default class WordCloudChartPlugin extends ChartPlugin<WordCloudFormData> { | ||
constructor() { | ||
super({ | ||
buildQuery, | ||
loadChart: () => import('../chart/WordCloud'), | ||
metadata, | ||
transformProps, | ||
}); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...in-chart-word-cloud/src/transformProps.ts → ...t-word-cloud/src/plugin/transformProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...tend/temporary_superset_ui/superset-ui/plugins/plugin-chart-word-cloud/test/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { WordCloudChartPlugin, LegacyWordCloudChartPlugin } from '../src'; | ||
|
||
describe('plugin-chart-word-cloud', () => { | ||
it('exports WordCloudChartPlugin', () => { | ||
expect(WordCloudChartPlugin).toBeDefined(); | ||
}); | ||
it('exports LegacyWordCloudChartPlugin', () => { | ||
expect(LegacyWordCloudChartPlugin).toBeDefined(); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
...-cloud/test/legacy/transformProps.test.ts → .../test/legacyPlugin/transformProps.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-chart-word-cloud/test/buildQuery.test.ts → ...word-cloud/test/plugin/buildQuery.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters