[Maps] rename connected_components/map folder to mb_map (#82897)

This commit is contained in:
Nathan Reese 2020-11-07 06:46:49 -07:00 committed by GitHub
parent 215a561ab7
commit b8e2e85578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 33 additions and 35 deletions

View file

@ -11,7 +11,7 @@ import { isRetina } from '../../../meta';
import {
addSpriteSheetToMapFromImageData,
loadSpriteSheetImageData,
} from '../../../connected_components/map/mb/utils'; //todo move this implementation
} from '../../../connected_components/mb_map/utils'; //todo move this implementation
const MB_STYLE_TYPE_TO_OPACITY = {
fill: ['fill-opacity'],

View file

@ -2,4 +2,4 @@
@import 'layer_panel/index';
@import 'widget_overlay/index';
@import 'toolbar_overlay/index';
@import 'map/features_tooltip/index';
@import 'mb_map/features_tooltip/index';

View file

@ -13,7 +13,7 @@ import uuid from 'uuid/v4';
import { Filter } from 'src/plugins/data/public';
import { ActionExecutionContext, Action } from 'src/plugins/ui_actions/public';
// @ts-expect-error
import { MBMap } from '../map/mb';
import { MBMap } from '../mb_map';
// @ts-expect-error
import { WidgetOverlay } from '../widget_overlay';
// @ts-expect-error

View file

@ -6,7 +6,7 @@
import _ from 'lodash';
import React from 'react';
import { DRAW_TYPE } from '../../../../../common/constants';
import { DRAW_TYPE } from '../../../../common/constants';
import MapboxDraw from '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw-unminified';
import DrawRectangle from 'mapbox-gl-draw-rectangle-mode';
import { DrawCircle } from './draw_circle';
@ -15,7 +15,7 @@ import {
createSpatialFilterWithGeometry,
getBoundingBoxGeometry,
roundCoordinates,
} from '../../../../../common/elasticsearch_util';
} from '../../../../common/elasticsearch_util';
import { DrawTooltip } from './draw_tooltip';
const DRAW_RECTANGLE = 'draw_rectangle';

View file

@ -8,7 +8,7 @@ import _ from 'lodash';
import React, { Component } from 'react';
import { EuiPopover, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DRAW_TYPE } from '../../../../../common/constants';
import { DRAW_TYPE } from '../../../../common/constants';
const noop = () => {};

View file

@ -6,8 +6,8 @@
import { connect } from 'react-redux';
import { DrawControl } from './draw_control';
import { updateDrawState } from '../../../../actions';
import { getDrawState, isDrawingFilter } from '../../../../selectors/map_selectors';
import { updateDrawState } from '../../../actions';
import { getDrawState, isDrawingFilter } from '../../../selectors/map_selectors';
function mapStateToProps(state = {}) {
return {

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { INITIAL_LOCATION } from '../../../../common/constants';
import { Goto, MapCenterAndZoom } from '../../../../common/descriptor_types';
import { MapSettings } from '../../../reducers/map';
import { INITIAL_LOCATION } from '../../../common/constants';
import { Goto, MapCenterAndZoom } from '../../../common/descriptor_types';
import { MapSettings } from '../../reducers/map';
export async function getInitialView(
goto: Goto | null,

View file

@ -5,7 +5,7 @@
*/
import { connect } from 'react-redux';
import { MBMap } from './view';
import { MBMap } from './mb_map';
import {
mapExtentChanged,
mapReady,
@ -14,7 +14,7 @@ import {
clearMouseCoordinates,
clearGoto,
setMapInitError,
} from '../../../actions';
} from '../../actions';
import {
getLayerList,
getMapReady,
@ -25,9 +25,9 @@ import {
isViewControlHidden,
getSpatialFiltersLayer,
getMapSettings,
} from '../../../selectors/map_selectors';
} from '../../selectors/map_selectors';
import { getInspectorAdapters } from '../../../reducers/non_serializable_instances';
import { getInspectorAdapters } from '../../reducers/non_serializable_instances';
function mapStateToProps(state = {}) {
return {
@ -72,7 +72,5 @@ function mapDispatchToProps(dispatch) {
};
}
const connectedMBMap = connect(mapStateToProps, mapDispatchToProps, null, {
forwardRef: true,
})(MBMap);
export { connectedMBMap as MBMap };
const connected = connect(mapStateToProps, mapDispatchToProps)(MBMap);
export { connected as MBMap };

View file

@ -5,7 +5,7 @@
*/
import { removeOrphanedSourcesAndLayers } from './utils';
import { SPATIAL_FILTERS_LAYER_ID } from '../../../../common/constants';
import { SPATIAL_FILTERS_LAYER_ID } from '../../../common/constants';
import _ from 'lodash';
class MockMbMap {

View file

@ -6,15 +6,15 @@
import _ from 'lodash';
import React from 'react';
import { ResizeChecker } from '../../../../../../../src/plugins/kibana_utils/public';
import { ResizeChecker } from '../../../../../../src/plugins/kibana_utils/public';
import { removeOrphanedSourcesAndLayers, addSpritesheetToMap } from './utils';
import { syncLayerOrder } from './sort_layers';
import { getGlyphUrl, isRetina } from '../../../meta';
import { getGlyphUrl, isRetina } from '../../meta';
import {
DECIMAL_DEGREES_PRECISION,
KBN_TOO_MANY_FEATURES_IMAGE_ID,
ZOOM_PRECISION,
} from '../../../../common/constants';
} from '../../../common/constants';
import mapboxgl from 'mapbox-gl/dist/mapbox-gl-csp';
import mbWorkerUrl from '!!file-loader!mapbox-gl/dist/mapbox-gl-csp-worker';
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
@ -23,9 +23,9 @@ import sprites1 from '@elastic/maki/dist/sprite@1.png';
import sprites2 from '@elastic/maki/dist/sprite@2.png';
import { DrawControl } from './draw_control';
import { TooltipControl } from './tooltip_control';
import { clampToLatBounds, clampToLonBounds } from '../../../../common/elasticsearch_util';
import { clampToLatBounds, clampToLonBounds } from '../../../common/elasticsearch_util';
import { getInitialView } from './get_initial_view';
import { getPreserveDrawingBuffer } from '../../../kibana_services';
import { getPreserveDrawingBuffer } from '../../kibana_services';
mapboxgl.workerUrl = mbWorkerUrl;
mapboxgl.setRTLTextPlugin(mbRtlPlugin);

View file

@ -8,8 +8,8 @@
import _ from 'lodash';
import { Map as MbMap, Layer as MbLayer, Style as MbStyle } from 'mapbox-gl';
import { getIsTextLayer, syncLayerOrder } from './sort_layers';
import { SPATIAL_FILTERS_LAYER_ID } from '../../../../common/constants';
import { ILayer } from '../../../classes/layers/layer';
import { SPATIAL_FILTERS_LAYER_ID } from '../../../common/constants';
import { ILayer } from '../../classes/layers/layer';
let moveCounter = 0;

View file

@ -5,7 +5,7 @@
*/
import { Map as MbMap, Layer as MbLayer } from 'mapbox-gl';
import { ILayer } from '../../../classes/layers/layer';
import { ILayer } from '../../classes/layers/layer';
// "Layer" is overloaded and can mean the following
// 1) Map layer (ILayer): A single map layer consists of one to many mapbox layers.

View file

@ -11,13 +11,13 @@ import {
openOnClickTooltip,
closeOnHoverTooltip,
openOnHoverTooltip,
} from '../../../../actions';
} from '../../../actions';
import {
getLayerList,
getOpenTooltips,
getHasLockedTooltips,
isDrawingFilter,
} from '../../../../selectors/map_selectors';
} from '../../../selectors/map_selectors';
function mapStateToProps(state = {}) {
return {

View file

@ -6,9 +6,9 @@
import _ from 'lodash';
import React from 'react';
import { FEATURE_ID_PROPERTY_NAME, LON_INDEX } from '../../../../../common/constants';
import { FEATURE_ID_PROPERTY_NAME, LON_INDEX } from '../../../../common/constants';
import { TooltipPopover } from './tooltip_popover';
import { EXCLUDE_TOO_MANY_FEATURES_BOX } from '../../../../classes/util/mb_filter_expressions';
import { EXCLUDE_TOO_MANY_FEATURES_BOX } from '../../../classes/util/mb_filter_expressions';
function justifyAnchorLocation(mbLngLat, targetFeature) {
let popupAnchorLocation = [mbLngLat.lng, mbLngLat.lat]; // default popup location to mouse location

View file

@ -5,8 +5,8 @@
*/
import React, { Component } from 'react';
import { LAT_INDEX, LON_INDEX } from '../../../../../common/constants';
import { FeaturesTooltip } from '../../features_tooltip/features_tooltip';
import { LAT_INDEX, LON_INDEX } from '../../../../common/constants';
import { FeaturesTooltip } from '../features_tooltip/features_tooltip';
import { EuiPopover, EuiText } from '@elastic/eui';
const noop = () => {};

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
jest.mock('../../features_tooltip/features_tooltip', () => ({
jest.mock('../features_tooltip/features_tooltip', () => ({
FeaturesTooltip: () => {
return <div>mockFeaturesTooltip</div>;
},