Skip to content

Commit

Permalink
[Embeddables Rebuild] Move legacy viusalize embeddable to legacy/embe…
Browse files Browse the repository at this point in the history
…ddable (elastic#192002)

## Summary

In visualize, renames the new `react_embeddable` folder to just
`embeddable`, and moves the previous `embeddable` folder to
`legacy/embeddable`.

Keeps a few constants and interfaces that are reused in the new
embeddable in the `embeddable` folder, and imports them into
`legacy/embeddable` where needed.

---------

Co-authored-by: Marco Liberati <[email protected]>
  • Loading branch information
Zacqary and dej611 authored Sep 12, 2024
1 parent f7dc057 commit cd970c6
Show file tree
Hide file tree
Showing 26 changed files with 1,276 additions and 1,261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
VisualizeEmbeddable,
VisualizeInput,
VisualizeOutput,
} from '@kbn/visualizations-plugin/public/embeddable/visualize_embeddable';
} from '@kbn/visualizations-plugin/public/legacy/embeddable/visualize_embeddable';

const INPUT_KEY = 'portableDashboard:saveExample:input';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { Action } from '@kbn/ui-actions-plugin/public';
import React from 'react';
import { take } from 'rxjs';
import { apiHasVisualizeConfig, HasVisualizeConfig } from '../embeddable';
import { apiHasVisualizeConfig, HasVisualizeConfig } from '../legacy/embeddable';
import {
apiHasExpressionVariables,
HasExpressionVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import type { KibanaExecutionContext } from '@kbn/core-execution-context-common';
import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query';
import { ExpressionRendererEvent, ExpressionRendererParams } from '@kbn/expressions-plugin/public';
import { toExpressionAst } from '../embeddable/to_ast';
import { toExpressionAst } from './to_ast';
import { getExecutionContext, getTimeFilter } from '../services';
import type { VisParams } from '../types';
import type { Vis } from '../vis';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export { getVisualizeEmbeddableFactory } from './visualize_embeddable';
export const getVisualizeEmbeddableFactoryLazy = async () => {
const { getVisualizeEmbeddableFactory } = await import('./visualize_embeddable');
return getVisualizeEmbeddableFactory;
};
8 changes: 1 addition & 7 deletions src/plugins/visualizations/public/embeddable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export { VisualizeEmbeddableFactory } from './visualize_embeddable_factory';
export { VISUALIZE_EMBEDDABLE_TYPE, COMMON_VISUALIZATION_GROUPING } from './constants';
export { getVisualizeEmbeddableFactoryLazy } from './get_visualize_embeddable_factory_lazy';
export { VIS_EVENT_TO_TRIGGER } from './events';
export { createVisEmbeddableFromObject } from './create_vis_embeddable_from_object';

export type { VisualizeEmbeddable, VisualizeInput } from './visualize_embeddable';

export { type HasVisualizeConfig, apiHasVisualizeConfig } from './interfaces/has_visualize_config';
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
SerializedTitles,
} from '@kbn/presentation-publishing';
import { DeepPartial } from '@kbn/utility-types';
import { HasVisualizeConfig } from '../embeddable';
import { HasVisualizeConfig } from '../legacy/embeddable';
import type { Vis, VisParams, VisSavedObject } from '../types';
import type { SerializedVis } from '../vis';

Expand Down
Loading

0 comments on commit cd970c6

Please sign in to comment.