This repository has been archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 271
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 (#418)
* feat(plugin-word-cloud): change how wordcloud is exported * docs: fix storybook
- Loading branch information
Showing
12 changed files
with
50 additions
and
35 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
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
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
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
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
c5d3893
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: