Skip to content

Commit

Permalink
chore: bump superset-ui and update references to queriesData (#22)
Browse files Browse the repository at this point in the history
* chore: update references to queriesData

* fix: add legacy time sections

* fix: add missing deps
  • Loading branch information
villebro authored and zhaoyongjie committed Nov 30, 2021
1 parent 687b70d commit 9e10e04
Show file tree
Hide file tree
Showing 23 changed files with 3,878 additions and 4,057 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"@airbnb/config-typescript": "^2.1.2",
"@airbnb/nimbus": "^2.1.3",
"@superset-ui/commit-config": "^0.0.9",
"@superset-ui/chart-controls": "^0.15.0",
"@superset-ui/core": "^0.15.0",
"@superset-ui/chart-controls": "^0.16.3",
"@superset-ui/core": "^0.16.3",
"@types/enzyme": "^3.10.5",
"@types/jest": "^25.1.1",
"@types/jsdom": "^12.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Then use it via `SuperChart`. See [storybook](https://apache-superset.github.io/
width={600}
height={600}
formData={...}
queryData={{
queriesData={[{
data: {...},
}}
}]}
/>
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"xss": "^1.0.6"
},
"peerDependencies": {
"@superset-ui/chart-controls": "^0.15.0",
"@superset-ui/core": "^0.15.0",
"@superset-ui/chart-controls": "^0.16.3",
"@superset-ui/core": "^0.16.3",
"react": "^15 || ^16"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty, legacyValidateInteger } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides, {
columnChoices,
Expand All @@ -38,6 +39,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty, legacyValidateInteger } from '@superset-ui/core';
import { formatSelectOptions } from '../../utilities/utils';
import { columnChoices } from '../../utilities/controls';
Expand All @@ -36,6 +37,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty } from '@superset-ui/core';
import {
filterNulls,
Expand All @@ -33,6 +34,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty, legacyValidateInteger } from '@superset-ui/core';
import { formatSelectOptions } from '../../utilities/utils';
import { columnChoices } from '../../utilities/controls';
Expand All @@ -36,6 +37,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t } from '@superset-ui/core';
import {
filterNulls,
Expand All @@ -34,6 +35,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides from '../../utilities/controls';
import { formatSelectOptions } from '../../utilities/utils';
Expand Down Expand Up @@ -45,6 +46,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides from '../../utilities/controls';
import {
Expand Down Expand Up @@ -48,6 +49,7 @@ export default {
},
}),
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, validateNonEmpty } from '@superset-ui/core';
import timeGrainSqlaAnimationOverrides from '../../utilities/controls';
import {
Expand All @@ -33,6 +34,7 @@ import {

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
const NOOP = () => {};

export default function transformProps(chartProps) {
const { width, height, rawFormData, queryData, hooks } = chartProps;
const { width, height, rawFormData, queriesData, hooks } = chartProps;
const { onAddFilter = NOOP, setControlValue = NOOP } = hooks;

return {
formData: rawFormData,
height,
onAddFilter,
payload: queryData,
payload: queriesData[0],
setControlValue,
viewport: {
...rawFormData.viewport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"viewport-mercator-project": "^6.1.1"
},
"peerDependencies": {
"@superset-ui/chart-controls": "^0.15.0",
"@superset-ui/core": "^0.15.0",
"@superset-ui/chart-controls": "^0.16.3",
"@superset-ui/core": "^0.16.3",
"react": "^15 || ^16"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/
export default function transformProps(chartProps) {
const { formData, height, width, queryData, hooks } = chartProps;
const { mapboxApiAccessToken, features } = queryData.data;
const { formData, height, width, queriesData, hooks } = chartProps;
const { mapboxApiAccessToken, features } = queriesData[0].data;
const { config, autozoom, readonly } = formData;

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
"@types/storybook__react": "3.0.7",
"bootstrap": "^4.3.1",
"react": "^16.6.0",
"react-bootstrap": "^0.33.1",
"react-loadable": "^5.5.0",
"storybook-addon-jsx": "^7.1.0"
},
"devDependencies": {
Expand All @@ -51,7 +53,7 @@
"terser-webpack-plugin": "^2.1.0"
},
"peerDependencies": {
"@superset-ui/chart-controls": "^0.15.0",
"@superset-ui/core": "^0.15.0"
"@superset-ui/chart-controls": "^0.16.3",
"@superset-ui/core": "^0.16.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '10__table',
viz_type: 'deck_arc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '5__table',
viz_type: 'deck_grid',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '5__table',
viz_type: 'deck_hex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '11__table',
viz_type: 'deck_path',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '9__table',
viz_type: 'deck_polygon',
Expand Down Expand Up @@ -80,7 +80,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={geojsonPayload}
queriesData={[geojsonPayload]}
formData={{
datasource: '9__table',
viz_type: 'deck_polygon',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '5__table',
viz_type: 'deck_scatter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
width={400}
height={400}
datasource={dummyDatasource}
queryData={payload}
queriesData={[payload]}
formData={{
datasource: '5__table',
viz_type: 'deck_screengrid',
Expand Down
Loading

0 comments on commit 9e10e04

Please sign in to comment.