diff --git a/packages/superset-ui-preset-chart-xy/package.json b/packages/superset-ui-preset-chart-xy/package.json index 0abed41b5..88c60209f 100644 --- a/packages/superset-ui-preset-chart-xy/package.json +++ b/packages/superset-ui-preset-chart-xy/package.json @@ -43,7 +43,7 @@ "prop-types": "^15.6.2", "reselect": "^4.0.0", "vega": "^5.2.0", - "vega-lite": "^3.0.0-rc15" + "vega-lite": "^3.1.0" }, "peerDependencies": { "@superset-ui/chart": "^0.10.2", diff --git a/packages/superset-ui-preset-chart-xy/src/components/ChartLegend.tsx b/packages/superset-ui-preset-chart-xy/src/components/ChartLegend.tsx index 0658a7685..fb288ce83 100644 --- a/packages/superset-ui-preset-chart-xy/src/components/ChartLegend.tsx +++ b/packages/superset-ui-preset-chart-xy/src/components/ChartLegend.tsx @@ -1,7 +1,7 @@ import React, { CSSProperties, PureComponent } from 'react'; import { scaleOrdinal } from '@vx/scale'; import { LegendOrdinal, LegendItem, LegendLabel } from '@vx/legend'; -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import AbstractEncoder from '../encodeable/AbstractEncoder'; import { Dataset } from '../encodeable/types/Data'; import { ObjectWithKeysFromAndValueType } from '../encodeable/types/Base'; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/AbstractEncoder.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/AbstractEncoder.ts index 4be464c00..c30451c13 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/AbstractEncoder.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/AbstractEncoder.ts @@ -1,8 +1,8 @@ -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import { ObjectWithKeysFromAndValueType } from './types/Base'; import { ChannelOptions, EncodingFromChannelsAndOutputs, ChannelType } from './types/Channel'; import { FullSpec, BaseOptions, PartialSpec } from './types/Specification'; -import { isFieldDef } from './types/FieldDef'; +import { isFieldDef } from './types/ChannelDef'; import ChannelEncoder from './ChannelEncoder'; export default abstract class AbstractEncoder< diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/AxisAgent.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/AxisAgent.ts index 0c60aeef7..5610e44df 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/AxisAgent.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/AxisAgent.ts @@ -1,11 +1,11 @@ /* eslint-disable no-magic-numbers */ import { CSSProperties } from 'react'; -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import { getTextDimension } from '@superset-ui/dimension'; import { CategoricalColorScale } from '@superset-ui/color'; import { extractFormatFromTypeAndFormat } from './parsers/extractFormat'; import { CoreAxis, LabelOverlapStrategy } from './types/Axis'; -import { PositionFieldDef, ChannelDef } from './types/FieldDef'; +import { PositionFieldDef, ChannelDef } from './types/ChannelDef'; import ChannelEncoder from './ChannelEncoder'; import { DEFAULT_LABEL_ANGLE } from '../utils/constants'; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/ChannelEncoder.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/ChannelEncoder.ts index b2fbb9548..e20254d24 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/ChannelEncoder.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/ChannelEncoder.ts @@ -1,4 +1,4 @@ -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import { extractFormatFromChannelDef } from './parsers/extractFormat'; import extractScale, { ScaleAgent } from './parsers/extractScale'; import extractGetter from './parsers/extractGetter'; @@ -11,7 +11,7 @@ import { isValueDef, isFieldDef, isNonValueDef, -} from './types/FieldDef'; +} from './types/ChannelDef'; import isEnabled from './utils/isEnabled'; import isDisabled from './utils/isDisabled'; import identity from './utils/identity'; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractFormat.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractFormat.ts index 996bd281d..ac00a0ef3 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractFormat.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractFormat.ts @@ -1,7 +1,7 @@ import { getNumberFormatter } from '@superset-ui/number-format'; import { getTimeFormatter } from '@superset-ui/time-format'; import { Type } from 'vega-lite/build/src/type'; -import { isTypedFieldDef, ChannelDef } from '../types/FieldDef'; +import { isTypedFieldDef, ChannelDef } from '../types/ChannelDef'; const fallbackFormatter = (v: any) => `${v}`; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractGetter.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractGetter.ts index a43933276..4690cf7a5 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractGetter.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractGetter.ts @@ -1,5 +1,5 @@ import { get } from 'lodash/fp'; -import { isValueDef, ChannelDef } from '../types/FieldDef'; +import { isValueDef, ChannelDef } from '../types/ChannelDef'; import identity from '../utils/identity'; export default function extractGetter(definition: ChannelDef) { diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts index 9de493a7e..ae342bcce 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts @@ -23,10 +23,10 @@ import { scalePoint, scaleBand, } from 'd3-scale'; -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import { Type } from 'vega-lite/build/src/type'; import { ScaleType } from 'vega-lite/build/src/scale'; -import { isNonValueDef, ChannelDef } from '../types/FieldDef'; +import { isNonValueDef, ChannelDef } from '../types/ChannelDef'; import isDisabled from '../utils/isDisabled'; import { ChannelType } from '../types/Channel'; import { Scale } from '../types/Scale'; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/types/Channel.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/types/Channel.ts index a680d7bb7..1c5d79d3f 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/types/Channel.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/types/Channel.ts @@ -1,5 +1,5 @@ -import { Value } from 'vega-lite/build/src/fielddef'; -import { XFieldDef, YFieldDef, ChannelDef, MarkPropChannelDef, TextChannelDef } from './FieldDef'; +import { Value } from 'vega-lite/build/src/channeldef'; +import { XFieldDef, YFieldDef, ChannelDef, MarkPropChannelDef, TextChannelDef } from './ChannelDef'; import { ObjectWithKeysFromAndValueType } from './Base'; // eslint-disable-next-line import/prefer-default-export diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/types/FieldDef.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/types/ChannelDef.ts similarity index 97% rename from packages/superset-ui-preset-chart-xy/src/encodeable/types/FieldDef.ts rename to packages/superset-ui-preset-chart-xy/src/encodeable/types/ChannelDef.ts index 6992f1121..700b67d1a 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/types/FieldDef.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/types/ChannelDef.ts @@ -1,5 +1,5 @@ // eslint-disable no-unused-vars -import { ValueDef, Value } from 'vega-lite/build/src/fielddef'; +import { ValueDef, Value } from 'vega-lite/build/src/channeldef'; import { Type } from 'vega-lite/build/src/type'; import { TimeFormatter } from '@superset-ui/time-format'; import { NumberFormatter } from '@superset-ui/number-format'; diff --git a/packages/superset-ui-preset-chart-xy/src/encodeable/types/Scale.ts b/packages/superset-ui-preset-chart-xy/src/encodeable/types/Scale.ts index 6be384976..2f8e58a6b 100644 --- a/packages/superset-ui-preset-chart-xy/src/encodeable/types/Scale.ts +++ b/packages/superset-ui-preset-chart-xy/src/encodeable/types/Scale.ts @@ -1,4 +1,4 @@ -import { Value } from 'vega-lite/build/src/fielddef'; +import { Value } from 'vega-lite/build/src/channeldef'; import { DateTime } from 'vega-lite/build/src/datetime'; import { SchemeParams, ScaleType } from 'vega-lite/build/src/scale'; diff --git a/packages/superset-ui-preset-chart-xy/src/utils/XYChartLayout.tsx b/packages/superset-ui-preset-chart-xy/src/utils/XYChartLayout.tsx index fd3f188c4..ad89c83bb 100644 --- a/packages/superset-ui-preset-chart-xy/src/utils/XYChartLayout.tsx +++ b/packages/superset-ui-preset-chart-xy/src/utils/XYChartLayout.tsx @@ -9,7 +9,7 @@ import { AxisOrient } from 'vega'; import createTickComponent from './createTickComponent'; import ChartFrame from '../components/ChartFrame'; import ChannelEncoder from '../encodeable/ChannelEncoder'; -import { XFieldDef, YFieldDef } from '../encodeable/types/FieldDef'; +import { XFieldDef, YFieldDef } from '../encodeable/types/ChannelDef'; import { PlainObject } from '../encodeable/types/Data'; import { DEFAULT_LABEL_ANGLE } from './constants';