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

[7.x] Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (#89351) #89429

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/plugins/maps_legacy/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import { PluginInitializerContext } from 'kibana/public';
import { MapsLegacyPlugin } from './plugin';
// @ts-ignore
import * as colorUtil from './map/color_util';
// @ts-ignore
import { KibanaMapLayer } from './map/kibana_map_layer';
import {
VectorLayer,
Expand All @@ -19,7 +17,6 @@ import {
TmsLayer,
IServiceSettings,
} from './map/service_settings_types';
// @ts-ignore
import { mapTooltipProvider } from './tooltip_provider';

import './map/index.scss';
Expand Down
11 changes: 11 additions & 0 deletions src/plugins/maps_legacy/public/map/color_util.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* and the Server Side Public License, v 1; you may not use this file except in
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/

export function getLegendColors(colorRamp: unknown, numLegendColors?: number): string[];

export function getColor(colorRamp: unknown, i: number): string;
25 changes: 25 additions & 0 deletions src/plugins/maps_legacy/public/map/kibana_map_layer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* and the Server Side Public License, v 1; you may not use this file except in
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/

export class KibanaMapLayer {
constructor();

getBounds(): Promise<unknown>;

addToLeafletMap(leafletMap: unknown): void;

removeFromLeafletMap(leafletMap: unknown): void;

appendLegendContents(): void;

updateExtent(): void;

movePointer(): void;

getAttributions(): unknown;
}
9 changes: 9 additions & 0 deletions src/plugins/maps_legacy/public/tooltip_provider.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* and the Server Side Public License, v 1; you may not use this file except in
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/

export function mapTooltipProvider(element: unknown, formatter: unknown): () => unknown;
14 changes: 14 additions & 0 deletions src/plugins/maps_legacy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*", "config.ts"],
"references": [
{ "path": "../vis_default_editor/tsconfig.json" },
]
}
14 changes: 14 additions & 0 deletions src/plugins/maps_oss/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*", "config.ts"],
"references": [
{ "path": "../visualizations/tsconfig.json" },
]
}
15 changes: 15 additions & 0 deletions src/plugins/region_map/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["public/**/*", "server/**/*"],
"references": [
{ "path": "../maps_legacy/tsconfig.json" },
{ "path": "../vis_default_editor/tsconfig.json" },
]
}
15 changes: 15 additions & 0 deletions src/plugins/tile_map/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["public/**/*", "server/**/*"],
"references": [
{ "path": "../maps_legacy/tsconfig.json" },
{ "path": "../vis_default_editor/tsconfig.json" },
]
}
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
"src/plugins/kibana_usage_collection/**/*",
"src/plugins/kibana_utils/**/*",
"src/plugins/management/**/*",
"src/plugins/maps_legacy/**/*",
"src/plugins/maps_oss/**/*",
"src/plugins/navigation/**/*",
"src/plugins/newsfeed/**/*",
"src/plugins/region_map/**/*",
"src/plugins/saved_objects/**/*",
"src/plugins/saved_objects_management/**/*",
"src/plugins/saved_objects_tagging_oss/**/*",
Expand All @@ -37,6 +40,7 @@
"src/plugins/spaces_oss/**/*",
"src/plugins/telemetry/**/*",
"src/plugins/telemetry_collection_manager/**/*",
"src/plugins/tile_map/**/*",
"src/plugins/timelion/**/*",
"src/plugins/ui_actions/**/*",
"src/plugins/url_forwarding/**/*",
Expand Down Expand Up @@ -81,8 +85,11 @@
{ "path": "./src/plugins/kibana_usage_collection/tsconfig.json" },
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/management/tsconfig.json" },
{ "path": "./src/plugins/maps_legacy/tsconfig.json" },
{ "path": "./src/plugins/maps_oss/tsconfig.json" },
{ "path": "./src/plugins/navigation/tsconfig.json" },
{ "path": "./src/plugins/newsfeed/tsconfig.json" },
{ "path": "./src/plugins/region_map/tsconfig.json" },
{ "path": "./src/plugins/saved_objects/tsconfig.json" },
{ "path": "./src/plugins/saved_objects_management/tsconfig.json" },
{ "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" },
Expand All @@ -91,6 +98,7 @@
{ "path": "./src/plugins/spaces_oss/tsconfig.json" },
{ "path": "./src/plugins/telemetry/tsconfig.json" },
{ "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "./src/plugins/tile_map/tsconfig.json" },
{ "path": "./src/plugins/timelion/tsconfig.json" },
{ "path": "./src/plugins/ui_actions/tsconfig.json" },
{ "path": "./src/plugins/url_forwarding/tsconfig.json" },
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
{ "path": "./src/plugins/kibana_usage_collection/tsconfig.json" },
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/management/tsconfig.json" },
{ "path": "./src/plugins/maps_legacy/tsconfig.json" },
{ "path": "./src/plugins/maps_oss/tsconfig.json" },
{ "path": "./src/plugins/navigation/tsconfig.json" },
{ "path": "./src/plugins/newsfeed/tsconfig.json" },
{ "path": "./src/plugins/region_map/tsconfig.json" },
{ "path": "./src/plugins/saved_objects/tsconfig.json" },
{ "path": "./src/plugins/saved_objects_management/tsconfig.json" },
{ "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" },
Expand All @@ -34,6 +37,7 @@
{ "path": "./src/plugins/spaces_oss/tsconfig.json" },
{ "path": "./src/plugins/telemetry/tsconfig.json" },
{ "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "./src/plugins/tile_map/tsconfig.json" },
{ "path": "./src/plugins/timelion/tsconfig.json" },
{ "path": "./src/plugins/ui_actions/tsconfig.json" },
{ "path": "./src/plugins/url_forwarding/tsconfig.json" },
Expand Down