Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table Vis] Shim new platform #40732

Merged
merged 12 commits into from
Jul 24, 2019
11 changes: 5 additions & 6 deletions src/legacy/core_plugins/table_vis/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import { VisualizationsSetup } from '../../visualizations/public';
import { Plugin as DataPublicPlugin } from '../../../../plugins/data/public';

import {
PluginInitializerContext,
Expand All @@ -24,15 +26,13 @@ import {
Plugin,
UiSettingsClientContract,
} from '../../../../core/public';
import { LegacyDependenciesPluginSetup } from './shim';

import { LegacyDependenciesPluginSetup, LegacyDependenciesPlugin } from './shim';

// @ts-ignore
import { createTableVisFn } from './table_vis_fn';
// @ts-ignore
import { createTableVisTypeDefinition } from './table_vis_type';
import { DataSetup } from '../../data/public';
import { VisualizationsSetup } from '../../visualizations/public';
import { LegacyDependenciesPlugin } from './shim';

/** @private */
export interface TableVisualizationDependencies extends LegacyDependenciesPluginSetup {
Expand All @@ -41,8 +41,7 @@ export interface TableVisualizationDependencies extends LegacyDependenciesPlugin

/** @internal */
export interface TablePluginSetupDependencies {
// TODO: Remove `any` as functionsRegistry will be added to the DataSetup.
data: DataSetup | any;
data: ReturnType<DataPublicPlugin['setup']>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 As discussed we'll update this later when we sort out the discrepancy between the src/plugins/data and src/legacy/core_plugins/data interfaces

visualizations: VisualizationsSetup;
__LEGACY: LegacyDependenciesPlugin;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ import { PaginatedTable } from '../paginated_table/paginated_table';
/** @internal */
export const initTableVisLegacyModule = once((): void => {
uiModules
.get('kibana/table_vis', ['kibana'])
.get('kibana/table_vis', ['kibana', 'RecursionHelper'])
.controller('KbnTableVisController', TableVisController)
.directive('tableVisParams', TableVisParams);

// todo: not sure that "kibana" is a right module for that directives
uiModules
.get('kibana', ['RecursionHelper'])
.directive('tableVisParams', TableVisParams)
.directive('kbnAggTable', KbnAggTable)
.directive('kbnAggTableGroup', KbnAggTableGroup)
.directive('kbnRows', KbnRows)
Expand Down