Skip to content

Commit

Permalink
Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to T…
Browse files Browse the repository at this point in the history
…S projects
  • Loading branch information
nreese committed Jan 26, 2021
1 parent 3938fa6 commit 0c90092
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 3 deletions.
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 @@ -28,8 +28,11 @@
"src/plugins/kibana_utils/**/*",
"src/plugins/lens_oss/**/*",
"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 @@ -38,6 +41,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 @@ -83,8 +87,11 @@
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/lens_oss/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 @@ -93,6 +100,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 @@ -24,8 +24,11 @@
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/lens_oss/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 @@ -35,6 +38,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

0 comments on commit 0c90092

Please sign in to comment.