From 25ec8f18d06e101b9144172d2e350fbf0ed7b636 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Wed, 11 Mar 2020 12:33:27 -0600 Subject: [PATCH] Review feedback. Remove redundant portions. Export from NP where possible. General clean up --- .../legacy/plugins/maps/common/constants.ts | 182 +----------------- .../plugins/maps/common/i18n_getters.ts | 51 +---- .../plugins/maps/common/parse_xml_string.js | 21 +- .../maps/public/actions/map_actions.js | 91 ++++----- .../plugins/maps/public/actions/ui_actions.js | 28 +-- x-pack/legacy/plugins/maps/public/plugin.ts | 8 +- x-pack/plugins/maps/common/constants.ts | 34 ++-- x-pack/plugins/maps/common/i18n_getters.ts | 3 - .../plugins/maps/common/parse_xml_string.js | 3 - .../maps/common/parse_xml_string.test.js | 3 - .../maps/public/actions/map_actions.js | 4 - .../plugins/maps/public/actions/ui_actions.js | 3 - 12 files changed, 95 insertions(+), 336 deletions(-) diff --git a/x-pack/legacy/plugins/maps/common/constants.ts b/x-pack/legacy/plugins/maps/common/constants.ts index c9e73b2d685455..98945653c25dc8 100644 --- a/x-pack/legacy/plugins/maps/common/constants.ts +++ b/x-pack/legacy/plugins/maps/common/constants.ts @@ -4,183 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -// NP Migration -// Temporarily redundant with x-pack/plugins/maps/common/constants.ts -import { i18n } from '@kbn/i18n'; -export const EMS_CATALOGUE_PATH = 'ems/catalogue'; - -export const EMS_FILES_CATALOGUE_PATH = 'ems/files'; -export const EMS_FILES_API_PATH = 'ems/files'; -export const EMS_FILES_DEFAULT_JSON_PATH = 'file'; -export const EMS_GLYPHS_PATH = 'fonts'; -export const EMS_SPRITES_PATH = 'sprites'; - -export const EMS_TILES_CATALOGUE_PATH = 'ems/tiles'; -export const EMS_TILES_API_PATH = 'ems/tiles'; -export const EMS_TILES_RASTER_STYLE_PATH = 'raster/style'; -export const EMS_TILES_RASTER_TILE_PATH = 'raster/tile'; - -export const EMS_TILES_VECTOR_STYLE_PATH = 'vector/style'; -export const EMS_TILES_VECTOR_SOURCE_PATH = 'vector/source'; -export const EMS_TILES_VECTOR_TILE_PATH = 'vector/tile'; - -export const MAP_SAVED_OBJECT_TYPE = 'map'; -export const APP_ID = 'maps'; -export const APP_ICON = 'gisApp'; -export const TELEMETRY_TYPE = 'maps-telemetry'; - -export const MAP_APP_PATH = `app/${APP_ID}`; -export const GIS_API_PATH = `api/${APP_ID}`; -export const INDEX_SETTINGS_API_PATH = `${GIS_API_PATH}/indexSettings`; - -export const MAP_BASE_URL = `/${MAP_APP_PATH}#/${MAP_SAVED_OBJECT_TYPE}`; - -export function createMapPath(id: string) { - return `${MAP_BASE_URL}/${id}`; -} - -export const LAYER_TYPE = { - TILE: 'TILE', - VECTOR: 'VECTOR', - VECTOR_TILE: 'VECTOR_TILE', - HEATMAP: 'HEATMAP', -}; - -export enum SORT_ORDER { - ASC = 'asc', - DESC = 'desc', -} - -export const EMS_TMS = 'EMS_TMS'; -export const EMS_FILE = 'EMS_FILE'; -export const ES_GEO_GRID = 'ES_GEO_GRID'; -export const ES_SEARCH = 'ES_SEARCH'; -export const ES_PEW_PEW = 'ES_PEW_PEW'; -export const EMS_XYZ = 'EMS_XYZ'; // identifies a custom TMS source. Name is a little unfortunate. - -export enum FIELD_ORIGIN { - SOURCE = 'source', - JOIN = 'join', -} - -export const SOURCE_DATA_ID_ORIGIN = 'source'; -export const META_ID_ORIGIN_SUFFIX = 'meta'; -export const SOURCE_META_ID_ORIGIN = `${SOURCE_DATA_ID_ORIGIN}_${META_ID_ORIGIN_SUFFIX}`; -export const FORMATTERS_ID_ORIGIN_SUFFIX = 'formatters'; -export const SOURCE_FORMATTERS_ID_ORIGIN = `${SOURCE_DATA_ID_ORIGIN}_${FORMATTERS_ID_ORIGIN_SUFFIX}`; - -export const GEOJSON_FILE = 'GEOJSON_FILE'; - -export const MIN_ZOOM = 0; -export const MAX_ZOOM = 24; - -export const DECIMAL_DEGREES_PRECISION = 5; // meters precision -export const ZOOM_PRECISION = 2; -export const DEFAULT_MAX_RESULT_WINDOW = 10000; -export const DEFAULT_MAX_INNER_RESULT_WINDOW = 100; -export const DEFAULT_MAX_BUCKETS_LIMIT = 10000; - -export const FEATURE_ID_PROPERTY_NAME = '__kbn__feature_id__'; -export const FEATURE_VISIBLE_PROPERTY_NAME = '__kbn_isvisibleduetojoin__'; - -export const MB_SOURCE_ID_LAYER_ID_PREFIX_DELIMITER = '_'; - -export const ES_GEO_FIELD_TYPE = { - GEO_POINT: 'geo_point', - GEO_SHAPE: 'geo_shape', -}; - -export const ES_SPATIAL_RELATIONS = { - INTERSECTS: 'INTERSECTS', - DISJOINT: 'DISJOINT', - WITHIN: 'WITHIN', -}; - -export const GEO_JSON_TYPE = { - POINT: 'Point', - MULTI_POINT: 'MultiPoint', - LINE_STRING: 'LineString', - MULTI_LINE_STRING: 'MultiLineString', - POLYGON: 'Polygon', - MULTI_POLYGON: 'MultiPolygon', - GEOMETRY_COLLECTION: 'GeometryCollection', -}; - -export const POLYGON_COORDINATES_EXTERIOR_INDEX = 0; -export const LON_INDEX = 0; -export const LAT_INDEX = 1; - -export const EMPTY_FEATURE_COLLECTION = { - type: 'FeatureCollection', - features: [], -}; - -export const DRAW_TYPE = { - BOUNDS: 'BOUNDS', - POLYGON: 'POLYGON', -}; - -export enum AGG_TYPE { - AVG = 'avg', - COUNT = 'count', - MAX = 'max', - MIN = 'min', - SUM = 'sum', - TERMS = 'terms', - UNIQUE_COUNT = 'cardinality', -} - -export enum RENDER_AS { - HEATMAP = 'heatmap', - POINT = 'point', - GRID = 'grid', -} - -export enum GRID_RESOLUTION { - COARSE = 'COARSE', - FINE = 'FINE', - MOST_FINE = 'MOST_FINE', -} - -export const TOP_TERM_PERCENTAGE_SUFFIX = '__percentage'; - -export const COUNT_PROP_LABEL = i18n.translate('xpack.maps.aggs.defaultCountLabel', { - defaultMessage: 'count', -}); - -export const COUNT_PROP_NAME = 'doc_count'; - -export const STYLE_TYPE = { - STATIC: 'STATIC', - DYNAMIC: 'DYNAMIC', -}; - -export const LAYER_STYLE_TYPE = { - VECTOR: 'VECTOR', - HEATMAP: 'HEATMAP', -}; - -export const COLOR_MAP_TYPE = { - CATEGORICAL: 'CATEGORICAL', - ORDINAL: 'ORDINAL', -}; - -export const COLOR_PALETTE_MAX_SIZE = 10; - -export const CATEGORICAL_DATA_TYPES = ['string', 'ip', 'boolean']; -export const ORDINAL_DATA_TYPES = ['number', 'date']; - -export enum SYMBOLIZE_AS_TYPES { - CIRCLE = 'circle', - ICON = 'icon', -} - -export enum LABEL_BORDER_SIZES { - NONE = 'NONE', - SMALL = 'SMALL', - MEDIUM = 'MEDIUM', - LARGE = 'LARGE', -} - -export const DEFAULT_ICON = 'airfield'; -// End temporary redundancy +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +export * from '../../../../plugins/maps/common/constants'; diff --git a/x-pack/legacy/plugins/maps/common/i18n_getters.ts b/x-pack/legacy/plugins/maps/common/i18n_getters.ts index 6a7d53b8c82fac..f9d186dea2e2b9 100644 --- a/x-pack/legacy/plugins/maps/common/i18n_getters.ts +++ b/x-pack/legacy/plugins/maps/common/i18n_getters.ts @@ -4,52 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -import { i18n } from '@kbn/i18n'; - -import { $Values } from '@kbn/utility-types'; -import { ES_SPATIAL_RELATIONS } from './constants'; - -// NP Migration -// Temporarily redundant with x-pack/plugins/maps/common/i18n_getters.ts -export function getAppTitle() { - return i18n.translate('xpack.maps.appTitle', { - defaultMessage: 'Maps', - }); -} - -export function getDataSourceLabel() { - return i18n.translate('xpack.maps.source.dataSourceLabel', { - defaultMessage: 'Data source', - }); -} - -export function getUrlLabel() { - return i18n.translate('xpack.maps.source.urlLabel', { - defaultMessage: 'Url', - }); -} - -export function getEsSpatialRelationLabel(spatialRelation: $Values) { - switch (spatialRelation) { - case ES_SPATIAL_RELATIONS.INTERSECTS: - return i18n.translate('xpack.maps.common.esSpatialRelation.intersectsLabel', { - defaultMessage: 'intersects', - }); - case ES_SPATIAL_RELATIONS.DISJOINT: - return i18n.translate('xpack.maps.common.esSpatialRelation.disjointLabel', { - defaultMessage: 'disjoint', - }); - case ES_SPATIAL_RELATIONS.WITHIN: - return i18n.translate('xpack.maps.common.esSpatialRelation.withinLabel', { - defaultMessage: 'within', - }); - // @ts-ignore - case ES_SPATIAL_RELATIONS.CONTAINS: - return i18n.translate('xpack.maps.common.esSpatialRelation.containsLabel', { - defaultMessage: 'contains', - }); - default: - return spatialRelation; - } -} -// End temporary redundancy +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +export * from '../../../../plugins/maps/common/i18n_getters'; diff --git a/x-pack/legacy/plugins/maps/common/parse_xml_string.js b/x-pack/legacy/plugins/maps/common/parse_xml_string.js index 62a2f2a4c1d6b7..34ec1444728281 100644 --- a/x-pack/legacy/plugins/maps/common/parse_xml_string.js +++ b/x-pack/legacy/plugins/maps/common/parse_xml_string.js @@ -4,22 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -import { parseString } from 'xml2js'; - -// NP Migration -// Temporarily redundant with x-pack/plugins/maps/common/parse_xml_string.js -// promise based wrapper around parseString -export async function parseXmlString(xmlString) { - const parsePromise = new Promise((resolve, reject) => { - parseString(xmlString, (error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - }); - - return await parsePromise; -} -// End temporary redundancy +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +export * from '../../../../plugins/maps/common/parse_xml_string'; diff --git a/x-pack/legacy/plugins/maps/public/actions/map_actions.js b/x-pack/legacy/plugins/maps/public/actions/map_actions.js index 2c420a69c486af..7a1e5e5266246d 100644 --- a/x-pack/legacy/plugins/maps/public/actions/map_actions.js +++ b/x-pack/legacy/plugins/maps/public/actions/map_actions.js @@ -36,51 +36,52 @@ import { SOURCE_DATA_ID_ORIGIN, } from '../../common/constants'; -// NP Migration -// Temporarily redundant with x-pack/plugins/maps/public/actions/map_actions.js -export const SET_SELECTED_LAYER = 'SET_SELECTED_LAYER'; -export const SET_TRANSIENT_LAYER = 'SET_TRANSIENT_LAYER'; -export const UPDATE_LAYER_ORDER = 'UPDATE_LAYER_ORDER'; -export const ADD_LAYER = 'ADD_LAYER'; -export const SET_LAYER_ERROR_STATUS = 'SET_LAYER_ERROR_STATUS'; -export const ADD_WAITING_FOR_MAP_READY_LAYER = 'ADD_WAITING_FOR_MAP_READY_LAYER'; -export const CLEAR_WAITING_FOR_MAP_READY_LAYER_LIST = 'CLEAR_WAITING_FOR_MAP_READY_LAYER_LIST'; -export const REMOVE_LAYER = 'REMOVE_LAYER'; -export const SET_LAYER_VISIBILITY = 'SET_LAYER_VISIBILITY'; -export const MAP_EXTENT_CHANGED = 'MAP_EXTENT_CHANGED'; -export const MAP_READY = 'MAP_READY'; -export const MAP_DESTROYED = 'MAP_DESTROYED'; -export const LAYER_DATA_LOAD_STARTED = 'LAYER_DATA_LOAD_STARTED'; -export const LAYER_DATA_LOAD_ENDED = 'LAYER_DATA_LOAD_ENDED'; -export const LAYER_DATA_LOAD_ERROR = 'LAYER_DATA_LOAD_ERROR'; -export const UPDATE_SOURCE_DATA_REQUEST = 'UPDATE_SOURCE_DATA_REQUEST'; -export const SET_JOINS = 'SET_JOINS'; -export const SET_QUERY = 'SET_QUERY'; -export const TRIGGER_REFRESH_TIMER = 'TRIGGER_REFRESH_TIMER'; -export const UPDATE_LAYER_PROP = 'UPDATE_LAYER_PROP'; -export const UPDATE_LAYER_STYLE = 'UPDATE_LAYER_STYLE'; -export const SET_LAYER_STYLE_META = 'SET_LAYER_STYLE_META'; -export const TOUCH_LAYER = 'TOUCH_LAYER'; -export const UPDATE_SOURCE_PROP = 'UPDATE_SOURCE_PROP'; -export const SET_REFRESH_CONFIG = 'SET_REFRESH_CONFIG'; -export const SET_MOUSE_COORDINATES = 'SET_MOUSE_COORDINATES'; -export const CLEAR_MOUSE_COORDINATES = 'CLEAR_MOUSE_COORDINATES'; -export const SET_GOTO = 'SET_GOTO'; -export const CLEAR_GOTO = 'CLEAR_GOTO'; -export const TRACK_CURRENT_LAYER_STATE = 'TRACK_CURRENT_LAYER_STATE'; -export const ROLLBACK_TO_TRACKED_LAYER_STATE = 'ROLLBACK_TO_TRACKED_LAYER_STATE'; -export const REMOVE_TRACKED_LAYER_STATE = 'REMOVE_TRACKED_LAYER_STATE'; -export const SET_OPEN_TOOLTIPS = 'SET_OPEN_TOOLTIPS'; -export const UPDATE_DRAW_STATE = 'UPDATE_DRAW_STATE'; -export const SET_SCROLL_ZOOM = 'SET_SCROLL_ZOOM'; -export const SET_MAP_INIT_ERROR = 'SET_MAP_INIT_ERROR'; -export const SET_INTERACTIVE = 'SET_INTERACTIVE'; -export const DISABLE_TOOLTIP_CONTROL = 'DISABLE_TOOLTIP_CONTROL'; -export const HIDE_TOOLBAR_OVERLAY = 'HIDE_TOOLBAR_OVERLAY'; -export const HIDE_LAYER_CONTROL = 'HIDE_LAYER_CONTROL'; -export const HIDE_VIEW_CONTROL = 'HIDE_VIEW_CONTROL'; -export const SET_WAITING_FOR_READY_HIDDEN_LAYERS = 'SET_WAITING_FOR_READY_HIDDEN_LAYERS'; -// End temporary redundancy +import { + SET_SELECTED_LAYER, + SET_TRANSIENT_LAYER, + UPDATE_LAYER_ORDER, + ADD_LAYER, + SET_LAYER_ERROR_STATUS, + ADD_WAITING_FOR_MAP_READY_LAYER, + CLEAR_WAITING_FOR_MAP_READY_LAYER_LIST, + REMOVE_LAYER, + SET_LAYER_VISIBILITY, + MAP_EXTENT_CHANGED, + MAP_READY, + MAP_DESTROYED, + LAYER_DATA_LOAD_STARTED, + LAYER_DATA_LOAD_ENDED, + LAYER_DATA_LOAD_ERROR, + UPDATE_SOURCE_DATA_REQUEST, + SET_JOINS, + SET_QUERY, + TRIGGER_REFRESH_TIMER, + UPDATE_LAYER_PROP, + UPDATE_LAYER_STYLE, + SET_LAYER_STYLE_META, + UPDATE_SOURCE_PROP, + SET_REFRESH_CONFIG, + SET_MOUSE_COORDINATES, + CLEAR_MOUSE_COORDINATES, + SET_GOTO, + CLEAR_GOTO, + TRACK_CURRENT_LAYER_STATE, + ROLLBACK_TO_TRACKED_LAYER_STATE, + REMOVE_TRACKED_LAYER_STATE, + SET_OPEN_TOOLTIPS, + UPDATE_DRAW_STATE, + SET_SCROLL_ZOOM, + SET_MAP_INIT_ERROR, + SET_INTERACTIVE, + DISABLE_TOOLTIP_CONTROL, + HIDE_TOOLBAR_OVERLAY, + HIDE_LAYER_CONTROL, + HIDE_VIEW_CONTROL, + SET_WAITING_FOR_READY_HIDDEN_LAYERS, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths +} from '../../../../../plugins/maps/public/actions/map_actions'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +export * from '../../../../../plugins/maps/public/actions/map_actions'; function getLayerLoadingCallbacks(dispatch, getState, layerId) { return { diff --git a/x-pack/legacy/plugins/maps/public/actions/ui_actions.js b/x-pack/legacy/plugins/maps/public/actions/ui_actions.js index 9a6003be1d8900..33ab2fd74122a6 100644 --- a/x-pack/legacy/plugins/maps/public/actions/ui_actions.js +++ b/x-pack/legacy/plugins/maps/public/actions/ui_actions.js @@ -4,19 +4,21 @@ * you may not use this file except in compliance with the Elastic License. */ -// NP Migration -// Temporarily redundant with x-pack/plugins/maps/public/actions/ui_actions.js -export const UPDATE_FLYOUT = 'UPDATE_FLYOUT'; -export const CLOSE_SET_VIEW = 'CLOSE_SET_VIEW'; -export const OPEN_SET_VIEW = 'OPEN_SET_VIEW'; -export const SET_IS_LAYER_TOC_OPEN = 'SET_IS_LAYER_TOC_OPEN'; -export const SET_FULL_SCREEN = 'SET_FULL_SCREEN'; -export const SET_READ_ONLY = 'SET_READ_ONLY'; -export const SET_OPEN_TOC_DETAILS = 'SET_OPEN_TOC_DETAILS'; -export const SHOW_TOC_DETAILS = 'SHOW_TOC_DETAILS'; -export const HIDE_TOC_DETAILS = 'HIDE_TOC_DETAILS'; -export const UPDATE_INDEXING_STAGE = 'UPDATE_INDEXING_STAGE'; -// End temporary redundancy +import { + UPDATE_FLYOUT, + CLOSE_SET_VIEW, + OPEN_SET_VIEW, + SET_IS_LAYER_TOC_OPEN, + SET_FULL_SCREEN, + SET_READ_ONLY, + SET_OPEN_TOC_DETAILS, + SHOW_TOC_DETAILS, + HIDE_TOC_DETAILS, + UPDATE_INDEXING_STAGE, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths +} from '../../../../../plugins/maps/public/actions/ui_actions'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +export * from '../../../../../plugins/maps/public/actions/ui_actions'; export function exitFullScreen() { return { diff --git a/x-pack/legacy/plugins/maps/public/plugin.ts b/x-pack/legacy/plugins/maps/public/plugin.ts index d923854ab1e350..e2d1d432956466 100644 --- a/x-pack/legacy/plugins/maps/public/plugin.ts +++ b/x-pack/legacy/plugins/maps/public/plugin.ts @@ -4,12 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -// @ts-nocheck import { Plugin, CoreStart, CoreSetup } from 'src/core/public'; +// @ts-ignore import { wrapInI18nContext } from 'ui/i18n'; +// @ts-ignore import { MapListing } from './components/map_listing'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { setInjectedVarFunc } from '../../../../plugins/maps/public/kibana_services'; +// @ts-ignore +import { setInjectedVarFunc } from '../../../../plugins/maps/public/kibana_services'; // eslint-disable-line @kbn/eslint/no-restricted-paths +// @ts-ignore import { setLicenseId, setInspector, setFileUpload } from './kibana_services'; import { HomePublicPluginSetup } from '../../../../../src/plugins/home/public'; import { LicensingPluginSetup } from '../../../../plugins/licensing/public'; diff --git a/x-pack/plugins/maps/common/constants.ts b/x-pack/plugins/maps/common/constants.ts index a51bbd3b938f21..ae3e164ffb2bc1 100644 --- a/x-pack/plugins/maps/common/constants.ts +++ b/x-pack/plugins/maps/common/constants.ts @@ -4,8 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -// NP Migration -// Temporarily redundant with x-pack/legacy/plugins/maps/common/constants.ts +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ import { i18n } from '@kbn/i18n'; export const EMS_CATALOGUE_PATH = 'ems/catalogue'; @@ -58,10 +61,10 @@ export const ES_SEARCH = 'ES_SEARCH'; export const ES_PEW_PEW = 'ES_PEW_PEW'; export const EMS_XYZ = 'EMS_XYZ'; // identifies a custom TMS source. Name is a little unfortunate. -export const FIELD_ORIGIN = { - SOURCE: 'source', - JOIN: 'join', -}; +export enum FIELD_ORIGIN { + SOURCE = 'source', + JOIN = 'join', +} export const SOURCE_DATA_ID_ORIGIN = 'source'; export const META_ID_ORIGIN_SUFFIX = 'meta'; @@ -142,6 +145,8 @@ export enum GRID_RESOLUTION { MOST_FINE = 'MOST_FINE', } +export const TOP_TERM_PERCENTAGE_SUFFIX = '__percentage'; + export const COUNT_PROP_LABEL = i18n.translate('xpack.maps.aggs.defaultCountLabel', { defaultMessage: 'count', }); @@ -166,11 +171,18 @@ export const COLOR_MAP_TYPE = { export const COLOR_PALETTE_MAX_SIZE = 10; export const CATEGORICAL_DATA_TYPES = ['string', 'ip', 'boolean']; +export const ORDINAL_DATA_TYPES = ['number', 'date']; -export const SYMBOLIZE_AS_TYPES = { - CIRCLE: 'circle', - ICON: 'icon', -}; +export enum SYMBOLIZE_AS_TYPES { + CIRCLE = 'circle', + ICON = 'icon', +} + +export enum LABEL_BORDER_SIZES { + NONE = 'NONE', + SMALL = 'SMALL', + MEDIUM = 'MEDIUM', + LARGE = 'LARGE', +} export const DEFAULT_ICON = 'airfield'; -// End temporary redundancy diff --git a/x-pack/plugins/maps/common/i18n_getters.ts b/x-pack/plugins/maps/common/i18n_getters.ts index e7296c807b0652..0008a119f1c7cc 100644 --- a/x-pack/plugins/maps/common/i18n_getters.ts +++ b/x-pack/plugins/maps/common/i18n_getters.ts @@ -9,8 +9,6 @@ import { i18n } from '@kbn/i18n'; import { $Values } from '@kbn/utility-types'; import { ES_SPATIAL_RELATIONS } from './constants'; -// NP Migration -// Temporarily redundant with x-pack/legacy/plugins/maps/common/i18n_getters.ts export function getAppTitle() { return i18n.translate('xpack.maps.appTitle', { defaultMessage: 'Maps', @@ -52,4 +50,3 @@ export function getEsSpatialRelationLabel(spatialRelation: $Values { @@ -22,4 +20,3 @@ export async function parseXmlString(xmlString) { return await parsePromise; } -// End temporary redundancy diff --git a/x-pack/plugins/maps/common/parse_xml_string.test.js b/x-pack/plugins/maps/common/parse_xml_string.test.js index bee8625f1aeac2..cfd6235667aae1 100644 --- a/x-pack/plugins/maps/common/parse_xml_string.test.js +++ b/x-pack/plugins/maps/common/parse_xml_string.test.js @@ -6,8 +6,6 @@ import { parseXmlString } from './parse_xml_string'; -// NP Migration -// Temporarily redundant with x-pack/legacy/plugins/maps/common/parse_xml_string.test.js describe('parseXmlString', () => { it('Should parse xml string into JS object', async () => { const xmlAsObject = await parseXmlString('bar'); @@ -16,4 +14,3 @@ describe('parseXmlString', () => { }); }); }); -// End temporary redundancy diff --git a/x-pack/plugins/maps/public/actions/map_actions.js b/x-pack/plugins/maps/public/actions/map_actions.js index eddc5fcf924b97..13cb3d5f898601 100644 --- a/x-pack/plugins/maps/public/actions/map_actions.js +++ b/x-pack/plugins/maps/public/actions/map_actions.js @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// NP Migration -// Temporarily redundant with x-pack/legacy/plugins/maps/public/actions/map_actions.js export const SET_SELECTED_LAYER = 'SET_SELECTED_LAYER'; export const SET_TRANSIENT_LAYER = 'SET_TRANSIENT_LAYER'; export const UPDATE_LAYER_ORDER = 'UPDATE_LAYER_ORDER'; @@ -28,7 +26,6 @@ export const TRIGGER_REFRESH_TIMER = 'TRIGGER_REFRESH_TIMER'; export const UPDATE_LAYER_PROP = 'UPDATE_LAYER_PROP'; export const UPDATE_LAYER_STYLE = 'UPDATE_LAYER_STYLE'; export const SET_LAYER_STYLE_META = 'SET_LAYER_STYLE_META'; -export const TOUCH_LAYER = 'TOUCH_LAYER'; export const UPDATE_SOURCE_PROP = 'UPDATE_SOURCE_PROP'; export const SET_REFRESH_CONFIG = 'SET_REFRESH_CONFIG'; export const SET_MOUSE_COORDINATES = 'SET_MOUSE_COORDINATES'; @@ -48,4 +45,3 @@ export const HIDE_TOOLBAR_OVERLAY = 'HIDE_TOOLBAR_OVERLAY'; export const HIDE_LAYER_CONTROL = 'HIDE_LAYER_CONTROL'; export const HIDE_VIEW_CONTROL = 'HIDE_VIEW_CONTROL'; export const SET_WAITING_FOR_READY_HIDDEN_LAYERS = 'SET_WAITING_FOR_READY_HIDDEN_LAYERS'; -// End temporary redundancy diff --git a/x-pack/plugins/maps/public/actions/ui_actions.js b/x-pack/plugins/maps/public/actions/ui_actions.js index b5caf4d75d6b18..59ae56c15056a0 100644 --- a/x-pack/plugins/maps/public/actions/ui_actions.js +++ b/x-pack/plugins/maps/public/actions/ui_actions.js @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// NP Migration -// Temporarily redundant with x-pack/legacy/plugins/maps/public/actions/ui_actions.js export const UPDATE_FLYOUT = 'UPDATE_FLYOUT'; export const CLOSE_SET_VIEW = 'CLOSE_SET_VIEW'; export const OPEN_SET_VIEW = 'OPEN_SET_VIEW'; @@ -16,4 +14,3 @@ export const SET_OPEN_TOC_DETAILS = 'SET_OPEN_TOC_DETAILS'; export const SHOW_TOC_DETAILS = 'SHOW_TOC_DETAILS'; export const HIDE_TOC_DETAILS = 'HIDE_TOC_DETAILS'; export const UPDATE_INDEXING_STAGE = 'UPDATE_INDEXING_STAGE'; -// End temporary redundancy