Skip to content

Commit

Permalink
[Maps] migrate maps, maps_file_upload, and maps_legacy_licensing to T…
Browse files Browse the repository at this point in the history
…S projects
  • Loading branch information
nreese committed Jan 27, 2021
1 parent 007e7e4 commit c281dd5
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { ReactElement } from 'react';

import { i18n } from '@kbn/i18n';
// @ts-expect-error
import rison from 'rison-node';
import { Feature } from 'geojson';
import { SearchResponse } from 'elasticsearch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import _ from 'lodash';
import React, { ReactElement } from 'react';
// @ts-expect-error
import rison from 'rison-node';

import { i18n } from '@kbn/i18n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
euiPaletteGray,
// @ts-ignore
euiPaletteColorBlind,
// @ts-expect-error
} from '@elastic/eui/lib/services';
import { EuiColorPalettePickerPaletteProps } from '@elastic/eui';
import { PercentilesFieldMeta } from '../../../common/descriptor_types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ADD_LAYER_STEP_LABEL = i18n.translate('xpack.maps.addLayerPanel.addLayer',
});
const SELECT_WIZARD_LABEL = ADD_LAYER_STEP_LABEL;

interface Props {
export interface Props {
addPreviewLayers: (layerDescriptors: LayerDescriptor[]) => void;
closeFlyout: () => void;
hasPreviewLayers: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ILayer } from '../../../classes/layers/layer';
import { JoinDescriptor } from '../../../../common/descriptor_types';
import { IField } from '../../../classes/fields/field';

interface Props {
export interface Props {
joins: JoinDescriptor[];
layer: ILayer;
layerDisplayName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { AlphaSlider } from '../../../components/alpha_slider';
import { ValidatedDualRange } from '../../../../../../../src/plugins/kibana_react/public';
import { ILayer } from '../../../classes/layers/layer';

interface Props {
export interface Props {
layer: ILayer;
updateLabel: (layerId: string, label: string) => void;
updateMinZoom: (layerId: string, minZoom: number) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import 'mapbox-gl/dist/mapbox-gl.css';

const RENDER_COMPLETE_EVENT = 'renderComplete';

interface Props {
export interface Props {
addFilters: ((filters: Filter[]) => Promise<void>) | null;
getFilterActions?: () => Promise<Action[]>;
getActionContext?: () => ActionExecutionContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { SpatialFiltersPanel } from './spatial_filters_panel';
import { DisplayPanel } from './display_panel';
import { MapCenter } from '../../../common/descriptor_types';

interface Props {
export interface Props {
cancelChanges: () => void;
center: MapCenter;
hasMapSettingsChanges: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { Map as MapboxMap, MapboxOptions, MapMouseEvent } from 'mapbox-gl';
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
// @ts-expect-error
import { spritesheet } from '@elastic/maki';
// @ts-expect-error
import sprites1 from '@elastic/maki/dist/sprite@1.png';
// @ts-expect-error
import sprites2 from '@elastic/maki/dist/sprite@2.png';
import { Adapters } from 'src/plugins/inspector/public';
import { Filter } from 'src/plugins/data/public';
Expand Down Expand Up @@ -49,7 +51,7 @@ import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
mapboxgl.workerUrl = mbWorkerUrl;
mapboxgl.setRTLTextPlugin(mbRtlPlugin);

interface Props {
export interface Props {
isMapReady: boolean;
settings: MapSettings;
layerList: ILayer[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { EuiButtonIcon } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { ILayer } from '../../../classes/layers/layer';

interface Props {
export interface Props {
layerList: ILayer[];
fitToBounds: () => void;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const DRAW_DISTANCE_LABEL_SHORT = i18n.translate(
}
);

interface Props {
export interface Props {
cancelDraw: () => void;
geoFields: GeoFieldWithIndex[];
initiateDraw: (drawState: DrawState) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n';
import { ILayer } from '../../../../../../classes/layers/layer';
import { TOCEntryButton } from '../toc_entry_button';

interface Props {
export interface Props {
cloneLayer: (layerId: string) => void;
displayName: string;
editLayer: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {
unsavedChangesWarning,
} from '../saved_map';

interface Props {
export interface Props {
savedMap: SavedMap;
// saveCounter used to trigger MapApp render after SaveMap.save
saveCounter: number;
Expand Down Expand Up @@ -83,7 +83,7 @@ interface Props {
setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'];
}

interface State {
export interface State {
initialized: boolean;
indexPatterns: IndexPattern[];
savedQuery?: SavedQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

// @ts-expect-error
import rison from 'rison-node';
import { i18n } from '@kbn/i18n';
import '../../../classes/sources/wms_source';
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/maps/public/url_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

// @ts-expect-error
import rison from 'rison-node';
import {
TimeRange,
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/maps/server/mvt/mvt_routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

// @ts-expect-error
import rison from 'rison-node';
import { schema } from '@kbn/config-schema';
import {
Expand Down
19 changes: 19 additions & 0 deletions x-pack/plugins/maps/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*", "config.ts"],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/maps_legacy/tsconfig.json" },
{ "path": "../features/tsconfig.json" },
{ "path": "../licensing/tsconfig.json" },
{ "path": "../maps_file_upload/tsconfig.json" },
{ "path": "../saved_objects_tagging/tsconfig.json" },
]
}
15 changes: 15 additions & 0 deletions x-pack/plugins/maps_file_upload/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": ["common/**/*", "public/**/*", "server/**/*"],
"references": [
{ "path": "../../../src/plugins/data/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" }
]
}
14 changes: 14 additions & 0 deletions x-pack/plugins/maps_legacy_licensing/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": ["public/**/*"],
"references": [
{ "path": "../licensing/tsconfig.json" },
]
}
6 changes: 6 additions & 0 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"plugins/event_log/**/*",
"plugins/licensing/**/*",
"plugins/lens/**/*",
"plugins/maps/**/*",
"plugins/maps_file_upload/**/*",
"plugins/maps_legacy_licensing/**/*",
"plugins/searchprofiler/**/*",
"plugins/security_solution/cypress/**/*",
"plugins/task_manager/**/*",
Expand Down Expand Up @@ -86,6 +89,9 @@
{ "path": "./plugins/event_log/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/lens/tsconfig.json" },
{ "path": "./plugins/maps/tsconfig.json" },
{ "path": "./plugins/maps_file_upload/tsconfig.json" },
{ "path": "./plugins/maps_legacy_licensing/tsconfig.json" },
{ "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
Expand Down
3 changes: 3 additions & 0 deletions x-pack/tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
{ "path": "./plugins/features/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/embeddable_enhanced/tsconfig.json" },
{ "path": "./plugins/maps/tsconfig.json" },
{ "path": "./plugins/maps_file_upload/tsconfig.json" },
{ "path": "./plugins/maps_legacy_licensing/tsconfig.json" },
{ "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
Expand Down

0 comments on commit c281dd5

Please sign in to comment.