Skip to content

Commit

Permalink
[ML] Fix imports for lazy loadable VegaChart component.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Feb 15, 2021
1 parent 128456c commit 7caf108
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ import { useMlApiContext } from '../../contexts/kibana';

import { getProcessedFields } from '../data_grid';
import { useCurrentEuiTheme } from '../color_range_legend';
import { LegendType, VegaChart, VegaChartLoading } from '../vega_chart';

// Separate imports for lazy loadable VegaChart and related code
import { VegaChart } from '../vega_chart';
import type { LegendType } from '../vega_chart/common';
import { VegaChartLoading } from '../vega_chart/vega_chart_loading';

import {
getScatterplotMatrixVegaLiteSpec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { euiPaletteColorBlind, euiPaletteNegative, euiPalettePositive } from '@e

import { i18n } from '@kbn/i18n';

import { LegendType, LEGEND_TYPES } from '../vega_chart';
import { LegendType, LEGEND_TYPES } from '../vega_chart/common';

export const OUTLIER_SCORE_FIELD = 'outlier_score';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

export { LegendType, LEGEND_TYPES } from './common';
// Make sure to only export the component we can lazy load here.
// Code from other files in this directory should be imported directly from the file,
// otherwise we break the bundling approach using lazy loading.
export { VegaChart } from './vega_chart';
export { VegaChartLoading } from './vega_chart_loading';
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ import {
EuiTitle,
} from '@elastic/eui';
import { useMlKibana } from '../../../../../contexts/kibana';
import { VegaChart, VegaChartLoading } from '../../../../../components/vega_chart';

// Separate imports for lazy loadable VegaChart and related code
import { VegaChart } from '../../../../../components/vega_chart';
import { VegaChartLoading } from '../../../../../components/vega_chart/vega_chart_loading';

import { ErrorCallout } from '../error_callout';
import { getDependentVar, DataFrameAnalyticsConfig } from '../../../../common';
import { DataFrameTaskStateType } from '../../../analytics_management/components/analytics_list/common';
Expand Down

0 comments on commit 7caf108

Please sign in to comment.