mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[maps] restructure layers folder (#118395)
* [maps] restructure layers folder * eslint Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
76b38f2da5
commit
d5e2e78d90
65 changed files with 135 additions and 111 deletions
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type { SourceRegistryEntry } from '../classes/sources/source_registry';
|
||||
import type { LayerWizard } from '../classes/layers/layer_wizard_registry';
|
||||
import type { LayerWizard } from '../classes/layers';
|
||||
|
||||
export interface MapsSetupApi {
|
||||
registerLayerWizard(layerWizard: LayerWizard): void;
|
||||
|
|
9
x-pack/plugins/maps/public/classes/layers/index.ts
Normal file
9
x-pack/plugins/maps/public/classes/layers/index.ts
Normal file
|
@ -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
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export type { LayerWizard, LayerWizardWithMeta, RenderWizardArguments } from './wizards';
|
||||
export { getLayerWizards, registerLayerWizard } from './wizards';
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../common/constants';
|
||||
import { LayerWizard, RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { LayerTemplate } from './layer_template';
|
||||
import { ChoroplethLayerIcon } from '../icons/cloropleth_layer_icon';
|
|
@ -14,20 +14,20 @@ import {
|
|||
SOURCE_TYPES,
|
||||
STYLE_TYPE,
|
||||
VECTOR_STYLES,
|
||||
} from '../../../../common/constants';
|
||||
import { getJoinAggKey } from '../../../../common/get_agg_key';
|
||||
} from '../../../../../common/constants';
|
||||
import { getJoinAggKey } from '../../../../../common/get_agg_key';
|
||||
import {
|
||||
ColorDynamicOptions,
|
||||
CountAggDescriptor,
|
||||
EMSFileSourceDescriptor,
|
||||
ESSearchSourceDescriptor,
|
||||
} from '../../../../common/descriptor_types';
|
||||
import { VectorStyle } from '../../styles/vector/vector_style';
|
||||
import { GeoJsonVectorLayer } from '../vector_layer';
|
||||
import { EMSFileSource } from '../../sources/ems_file_source';
|
||||
} from '../../../../../common/descriptor_types';
|
||||
import { VectorStyle } from '../../../styles/vector/vector_style';
|
||||
import { GeoJsonVectorLayer } from '../../vector_layer';
|
||||
import { EMSFileSource } from '../../../sources/ems_file_source';
|
||||
// @ts-ignore
|
||||
import { ESSearchSource } from '../../sources/es_search_source';
|
||||
import { getDefaultDynamicProperties } from '../../styles/vector/vector_style_defaults';
|
||||
import { ESSearchSource } from '../../../sources/es_search_source';
|
||||
import { getDefaultDynamicProperties } from '../../../styles/vector/vector_style_defaults';
|
||||
|
||||
const defaultDynamicProperties = getDefaultDynamicProperties();
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
jest.mock('../../../kibana_services', () => {
|
||||
jest.mock('../../../../kibana_services', () => {
|
||||
const MockIndexPatternSelect = (props: unknown) => {
|
||||
return <div />;
|
||||
};
|
|
@ -19,14 +19,17 @@ import {
|
|||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import { IndexPatternField, IndexPattern } from 'src/plugins/data/public';
|
||||
import { getDataViewLabel, getDataViewSelectPlaceholder } from '../../../../common/i18n_getters';
|
||||
import { getDataViewLabel, getDataViewSelectPlaceholder } from '../../../../../common/i18n_getters';
|
||||
import { RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { EMSFileSelect } from '../../../components/ems_file_select';
|
||||
import { GeoIndexPatternSelect } from '../../../components/geo_index_pattern_select';
|
||||
import { SingleFieldSelect } from '../../../components/single_field_select';
|
||||
import { getGeoFields, getSourceFields, getTermsFields } from '../../../index_pattern_util';
|
||||
import { getEmsFileLayers } from '../../../util';
|
||||
import { getIndexPatternSelectComponent, getIndexPatternService } from '../../../kibana_services';
|
||||
import { EMSFileSelect } from '../../../../components/ems_file_select';
|
||||
import { GeoIndexPatternSelect } from '../../../../components/geo_index_pattern_select';
|
||||
import { SingleFieldSelect } from '../../../../components/single_field_select';
|
||||
import { getGeoFields, getSourceFields, getTermsFields } from '../../../../index_pattern_util';
|
||||
import { getEmsFileLayers } from '../../../../util';
|
||||
import {
|
||||
getIndexPatternSelectComponent,
|
||||
getIndexPatternService,
|
||||
} from '../../../../kibana_services';
|
||||
import {
|
||||
createEmsChoroplethLayerDescriptor,
|
||||
createEsChoroplethLayerDescriptor,
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { ClientFileCreateSourceEditor, UPLOAD_STEPS } from './wizard';
|
||||
import { getFileUpload } from '../../../kibana_services';
|
||||
import { getFileUpload } from '../../../../kibana_services';
|
||||
|
||||
export const uploadLayerWizardConfig: LayerWizard = {
|
||||
categories: [],
|
|
@ -10,14 +10,14 @@ import { i18n } from '@kbn/i18n';
|
|||
import React, { Component } from 'react';
|
||||
import { FeatureCollection } from 'geojson';
|
||||
import { EuiPanel } from '@elastic/eui';
|
||||
import { DEFAULT_MAX_RESULT_WINDOW, SCALING_TYPES } from '../../../../common/constants';
|
||||
import { GeoJsonFileSource } from '../../sources/geojson_file_source';
|
||||
import { GeoJsonVectorLayer } from '../../layers/vector_layer';
|
||||
import { createDefaultLayerDescriptor } from '../../sources/es_search_source';
|
||||
import { RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { FileUploadGeoResults } from '../../../../../file_upload/public';
|
||||
import { ES_FIELD_TYPES } from '../../../../../../../src/plugins/data/public';
|
||||
import { getFileUploadComponent } from '../../../kibana_services';
|
||||
import { DEFAULT_MAX_RESULT_WINDOW, SCALING_TYPES } from '../../../../../common/constants';
|
||||
import { GeoJsonFileSource } from '../../../sources/geojson_file_source';
|
||||
import { GeoJsonVectorLayer } from '../../vector_layer';
|
||||
import { createDefaultLayerDescriptor } from '../../../sources/es_search_source';
|
||||
import { RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { FileUploadGeoResults } from '../../../../../../file_upload/public';
|
||||
import { ES_FIELD_TYPES } from '../../../../../../../../src/plugins/data/public';
|
||||
import { getFileUploadComponent } from '../../../../kibana_services';
|
||||
|
||||
export enum UPLOAD_STEPS {
|
||||
CONFIGURE_UPLOAD = 'CONFIGURE_UPLOAD',
|
13
x-pack/plugins/maps/public/classes/layers/wizards/index.ts
Normal file
13
x-pack/plugins/maps/public/classes/layers/wizards/index.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export type {
|
||||
LayerWizard,
|
||||
LayerWizardWithMeta,
|
||||
RenderWizardArguments,
|
||||
} from './layer_wizard_registry';
|
||||
export { getLayerWizards, registerLayerWizard } from './layer_wizard_registry';
|
|
@ -8,8 +8,8 @@
|
|||
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
||||
|
||||
import { ReactElement, FunctionComponent } from 'react';
|
||||
import type { LayerDescriptor } from '../../../common/descriptor_types';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../common/constants';
|
||||
import type { LayerDescriptor } from '../../../../common/descriptor_types';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
|
||||
export type RenderWizardArguments = {
|
||||
previewLayers: (layerDescriptors: LayerDescriptor[]) => void;
|
|
@ -10,21 +10,24 @@ import { uploadLayerWizardConfig } from './file_upload_wizard';
|
|||
import {
|
||||
esDocumentsLayerWizardConfig,
|
||||
esTopHitsLayerWizardConfig,
|
||||
} from '../sources/es_search_source';
|
||||
import { clustersLayerWizardConfig, heatmapLayerWizardConfig } from '../sources/es_geo_grid_source';
|
||||
import { geoLineLayerWizardConfig } from '../sources/es_geo_line_source';
|
||||
} from '../../sources/es_search_source';
|
||||
import {
|
||||
clustersLayerWizardConfig,
|
||||
heatmapLayerWizardConfig,
|
||||
} from '../../sources/es_geo_grid_source';
|
||||
import { geoLineLayerWizardConfig } from '../../sources/es_geo_line_source';
|
||||
// @ts-ignore
|
||||
import { point2PointLayerWizardConfig } from '../sources/es_pew_pew_source';
|
||||
import { point2PointLayerWizardConfig } from '../../sources/es_pew_pew_source';
|
||||
// @ts-ignore
|
||||
import { emsBoundariesLayerWizardConfig } from '../sources/ems_file_source';
|
||||
import { emsBoundariesLayerWizardConfig } from '../../sources/ems_file_source';
|
||||
// @ts-ignore
|
||||
import { emsBaseMapLayerWizardConfig } from '../sources/ems_tms_source';
|
||||
import { emsBaseMapLayerWizardConfig } from '../../sources/ems_tms_source';
|
||||
// @ts-ignore
|
||||
import { kibanaBasemapLayerWizardConfig } from '../sources/kibana_tilemap_source';
|
||||
import { tmsLayerWizardConfig } from '../sources/xyz_tms_source';
|
||||
import { kibanaBasemapLayerWizardConfig } from '../../sources/kibana_tilemap_source';
|
||||
import { tmsLayerWizardConfig } from '../../sources/xyz_tms_source';
|
||||
// @ts-ignore
|
||||
import { wmsLayerWizardConfig } from '../sources/wms_source';
|
||||
import { mvtVectorSourceWizardConfig } from '../sources/mvt_single_layer_vector_source';
|
||||
import { wmsLayerWizardConfig } from '../../sources/wms_source';
|
||||
import { mvtVectorSourceWizardConfig } from '../../sources/mvt_single_layer_vector_source';
|
||||
import { ObservabilityLayerWizardConfig } from './solution_layers/observability';
|
||||
import { SecurityLayerWizardConfig } from './solution_layers/security';
|
||||
import { choroplethLayerWizardConfig } from './choropleth_layer_wizard';
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { NewVectorLayerEditor } from './wizard';
|
||||
import { DrawLayerIcon } from '../../layers/icons/draw_layer_icon';
|
||||
import { getFileUpload } from '../../../kibana_services';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { DrawLayerIcon } from '../icons/draw_layer_icon';
|
||||
import { getFileUpload } from '../../../../kibana_services';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../common/constants';
|
||||
|
||||
const ADD_VECTOR_DRAWING_LAYER = 'ADD_VECTOR_DRAWING_LAYER';
|
||||
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getHttp } from '../../../kibana_services';
|
||||
import { CreateDocSourceResp, IndexSourceMappings } from '../../../../common/types';
|
||||
import { INDEX_SOURCE_API_PATH } from '../../../../common/constants';
|
||||
import { getHttp } from '../../../../kibana_services';
|
||||
import { CreateDocSourceResp, IndexSourceMappings } from '../../../../../common/types';
|
||||
import { INDEX_SOURCE_API_PATH } from '../../../../../common/constants';
|
||||
|
||||
export const createNewIndexAndPattern = async ({
|
||||
indexName,
|
|
@ -10,10 +10,10 @@ import { EuiPanel, EuiCallOut } from '@elastic/eui';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { createNewIndexAndPattern } from './create_new_index_pattern';
|
||||
import { RenderWizardArguments } from '../layer_wizard_registry';
|
||||
import { GeoJsonVectorLayer } from '../vector_layer';
|
||||
import { ESSearchSource } from '../../sources/es_search_source';
|
||||
import { ADD_LAYER_STEP_ID } from '../../../connected_components/add_layer_panel/view';
|
||||
import { getFileUpload, getIndexNameFormComponent } from '../../../kibana_services';
|
||||
import { GeoJsonVectorLayer } from '../../vector_layer';
|
||||
import { ESSearchSource } from '../../../sources/es_search_source';
|
||||
import { ADD_LAYER_STEP_ID } from '../../../../connected_components/add_layer_panel/view';
|
||||
import { getFileUpload, getIndexNameFormComponent } from '../../../../kibana_services';
|
||||
|
||||
interface State {
|
||||
indexName: string;
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { emsWorldLayerId } from '../../../../../common/constants';
|
||||
import { emsWorldLayerId } from '../../../../../../common/constants';
|
||||
|
||||
jest.mock('../../../../kibana_services', () => {
|
||||
jest.mock('../../../../../kibana_services', () => {
|
||||
return {
|
||||
getIsDarkMode() {
|
||||
return false;
|
|
@ -14,7 +14,7 @@ import {
|
|||
SizeDynamicOptions,
|
||||
StylePropertyField,
|
||||
VectorStylePropertiesDescriptor,
|
||||
} from '../../../../../common/descriptor_types';
|
||||
} from '../../../../../../common/descriptor_types';
|
||||
import {
|
||||
AGG_TYPE,
|
||||
COLOR_MAP_TYPE,
|
||||
|
@ -25,17 +25,17 @@ import {
|
|||
SOURCE_TYPES,
|
||||
STYLE_TYPE,
|
||||
VECTOR_STYLES,
|
||||
} from '../../../../../common/constants';
|
||||
import { getJoinAggKey, getSourceAggKey } from '../../../../../common/get_agg_key';
|
||||
} from '../../../../../../common/constants';
|
||||
import { getJoinAggKey, getSourceAggKey } from '../../../../../../common/get_agg_key';
|
||||
import { OBSERVABILITY_LAYER_TYPE } from './layer_select';
|
||||
import { OBSERVABILITY_METRIC_TYPE } from './metric_select';
|
||||
import { DISPLAY } from './display_select';
|
||||
import { VectorStyle } from '../../../styles/vector/vector_style';
|
||||
import { EMSFileSource } from '../../../sources/ems_file_source';
|
||||
import { ESGeoGridSource } from '../../../sources/es_geo_grid_source';
|
||||
import { GeoJsonVectorLayer } from '../../vector_layer';
|
||||
import { HeatmapLayer } from '../../heatmap_layer';
|
||||
import { getDefaultDynamicProperties } from '../../../styles/vector/vector_style_defaults';
|
||||
import { VectorStyle } from '../../../../styles/vector/vector_style';
|
||||
import { EMSFileSource } from '../../../../sources/ems_file_source';
|
||||
import { ESGeoGridSource } from '../../../../sources/es_geo_grid_source';
|
||||
import { GeoJsonVectorLayer } from '../../../vector_layer';
|
||||
import { HeatmapLayer } from '../../../heatmap_layer';
|
||||
import { getDefaultDynamicProperties } from '../../../../styles/vector/vector_style_defaults';
|
||||
|
||||
// redefining APM constant to avoid making maps app depend on APM plugin
|
||||
export const APM_INDEX_PATTERN_ID = 'apm_static_index_pattern_id';
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../common/constants';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../../common/constants';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layer_wizard_registry';
|
||||
import { ObservabilityLayerTemplate } from './observability_layer_template';
|
||||
import { APM_INDEX_PATTERN_ID } from './create_layer_descriptor';
|
||||
import { getIndexPatternService } from '../../../../kibana_services';
|
||||
import { getIndexPatternService } from '../../../../../kibana_services';
|
||||
|
||||
export const ObservabilityLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH, LAYER_WIZARD_CATEGORY.SOLUTIONS],
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
jest.mock('../../../../kibana_services', () => {
|
||||
jest.mock('../../../../../kibana_services', () => {
|
||||
return {
|
||||
getIsDarkMode() {
|
||||
return false;
|
|
@ -12,7 +12,7 @@ import {
|
|||
LayerDescriptor,
|
||||
SizeDynamicOptions,
|
||||
VectorStylePropertiesDescriptor,
|
||||
} from '../../../../../common/descriptor_types';
|
||||
} from '../../../../../../common/descriptor_types';
|
||||
import {
|
||||
AGG_TYPE,
|
||||
COUNT_PROP_NAME,
|
||||
|
@ -21,14 +21,14 @@ import {
|
|||
STYLE_TYPE,
|
||||
SYMBOLIZE_AS_TYPES,
|
||||
VECTOR_STYLES,
|
||||
} from '../../../../../common/constants';
|
||||
import { GeoJsonVectorLayer } from '../../vector_layer';
|
||||
import { VectorStyle } from '../../../styles/vector/vector_style';
|
||||
} from '../../../../../../common/constants';
|
||||
import { GeoJsonVectorLayer } from '../../../vector_layer';
|
||||
import { VectorStyle } from '../../../../styles/vector/vector_style';
|
||||
// @ts-ignore
|
||||
import { ESSearchSource } from '../../../sources/es_search_source';
|
||||
import { ESSearchSource } from '../../../../sources/es_search_source';
|
||||
// @ts-ignore
|
||||
import { ESPewPewSource } from '../../../sources/es_pew_pew_source';
|
||||
import { getDefaultDynamicProperties } from '../../../styles/vector/vector_style_defaults';
|
||||
import { ESPewPewSource } from '../../../../sources/es_pew_pew_source';
|
||||
import { getDefaultDynamicProperties } from '../../../../styles/vector/vector_style_defaults';
|
||||
import { APM_INDEX_PATTERN_TITLE } from '../observability';
|
||||
|
||||
const defaultDynamicProperties = getDefaultDynamicProperties();
|
|
@ -8,7 +8,7 @@
|
|||
import React, { ChangeEvent, Component } from 'react';
|
||||
import { EuiFormRow, EuiSelect, EuiSelectOption } from '@elastic/eui';
|
||||
import { getSecurityIndexPatterns, IndexPatternMeta } from './security_index_pattern_utils';
|
||||
import { getDataViewLabel } from '../../../../../common/i18n_getters';
|
||||
import { getDataViewLabel } from '../../../../../../common/i18n_getters';
|
||||
|
||||
interface Props {
|
||||
value: string;
|
|
@ -8,7 +8,7 @@
|
|||
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
||||
|
||||
import minimatch from 'minimatch';
|
||||
import { getIndexPatternService, getUiSettings } from '../../../../kibana_services';
|
||||
import { getIndexPatternService, getUiSettings } from '../../../../../kibana_services';
|
||||
|
||||
export type IndexPatternMeta = {
|
||||
id: string;
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../common/constants';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../../common/constants';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layer_wizard_registry';
|
||||
import { getSecurityIndexPatterns } from './security_index_pattern_utils';
|
||||
import { SecurityLayerTemplate } from './security_layer_template';
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { GeoJsonVectorLayer } from '../../layers/vector_layer';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { EMSFileCreateSourceEditor } from './create_source_editor';
|
||||
import { EMSFileSource, getSourceTitle } from './ems_file_source';
|
||||
|
||||
|
@ -16,7 +16,7 @@ import { EMSFileSource, getSourceTitle } from './ems_file_source';
|
|||
import { getEMSSettings } from '../../../kibana_services';
|
||||
import { EMSFileSourceDescriptor } from '../../../../common/descriptor_types';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { EMSBoundariesLayerIcon } from '../../layers/icons/ems_boundaries_layer_icon';
|
||||
import { EMSBoundariesLayerIcon } from '../../layers/wizards/icons/ems_boundaries_layer_icon';
|
||||
|
||||
function getDescription() {
|
||||
const emsSettings = getEMSSettings();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
// @ts-ignore
|
||||
import { EMSTMSSource, getSourceTitle } from './ems_tms_source';
|
||||
// @ts-ignore
|
||||
|
@ -16,7 +16,7 @@ import { EmsTmsSourceConfig } from './tile_service_select';
|
|||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { getEMSSettings } from '../../../kibana_services';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { WorldMapLayerIcon } from '../../layers/icons/world_map_layer_icon';
|
||||
import { WorldMapLayerIcon } from '../../layers/wizards/icons/world_map_layer_icon';
|
||||
|
||||
function getDescription() {
|
||||
const emsSettings = getEMSSettings();
|
||||
|
|
|
@ -10,7 +10,7 @@ import React from 'react';
|
|||
// @ts-ignore
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { ESGeoGridSource, clustersTitle } from './es_geo_grid_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { GeoJsonVectorLayer } from '../../layers/vector_layer';
|
||||
import {
|
||||
ESGeoGridSourceDescriptor,
|
||||
|
@ -29,7 +29,7 @@ import {
|
|||
STYLE_TYPE,
|
||||
} from '../../../../common/constants';
|
||||
import { NUMERICAL_COLOR_PALETTES } from '../../styles/color_palettes';
|
||||
import { ClustersLayerIcon } from '../../layers/icons/clusters_layer_icon';
|
||||
import { ClustersLayerIcon } from '../../layers/wizards/icons/clusters_layer_icon';
|
||||
|
||||
export const clustersLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
|
|
|
@ -10,11 +10,11 @@ import React from 'react';
|
|||
// @ts-ignore
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { ESGeoGridSource, heatmapTitle } from './es_geo_grid_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { HeatmapLayer } from '../../layers/heatmap_layer';
|
||||
import { ESGeoGridSourceDescriptor } from '../../../../common/descriptor_types';
|
||||
import { LAYER_WIZARD_CATEGORY, RENDER_AS } from '../../../../common/constants';
|
||||
import { HeatmapLayerIcon } from '../../layers/icons/heatmap_layer_icon';
|
||||
import { HeatmapLayerIcon } from '../../layers/wizards/icons/heatmap_layer_icon';
|
||||
|
||||
export const heatmapLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
|
|
|
@ -9,12 +9,12 @@ import { i18n } from '@kbn/i18n';
|
|||
import React from 'react';
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { ESGeoLineSource, geoLineTitle, REQUIRES_GOLD_LICENSE_MSG } from './es_geo_line_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { LAYER_WIZARD_CATEGORY, STYLE_TYPE, VECTOR_STYLES } from '../../../../common/constants';
|
||||
import { VectorStyle } from '../../styles/vector/vector_style';
|
||||
import { GeoJsonVectorLayer } from '../../layers/vector_layer';
|
||||
import { getIsGoldPlus } from '../../../licensed_features';
|
||||
import { TracksLayerIcon } from '../../layers/icons/tracks_layer_icon';
|
||||
import { TracksLayerIcon } from '../../layers/wizards/icons/tracks_layer_icon';
|
||||
|
||||
export const geoLineLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
|
|
|
@ -22,9 +22,9 @@ import {
|
|||
import { NUMERICAL_COLOR_PALETTES } from '../../styles/color_palettes';
|
||||
// @ts-ignore
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { ColorDynamicOptions, SizeDynamicOptions } from '../../../../common/descriptor_types';
|
||||
import { Point2PointLayerIcon } from '../../layers/icons/point_2_point_layer_icon';
|
||||
import { Point2PointLayerIcon } from '../../layers/wizards/icons/point_2_point_layer_icon';
|
||||
|
||||
export const point2PointLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
|
|
|
@ -9,11 +9,11 @@ import { i18n } from '@kbn/i18n';
|
|||
import React from 'react';
|
||||
// @ts-ignore
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { ESSearchSource, sourceTitle } from './es_search_source';
|
||||
import { BlendedVectorLayer, GeoJsonVectorLayer, MvtVectorLayer } from '../../layers/vector_layer';
|
||||
import { LAYER_WIZARD_CATEGORY, SCALING_TYPES } from '../../../../common/constants';
|
||||
import { DocumentsLayerIcon } from '../../layers/icons/documents_layer_icon';
|
||||
import { DocumentsLayerIcon } from '../../layers/wizards/icons/documents_layer_icon';
|
||||
import {
|
||||
ESSearchSourceDescriptor,
|
||||
VectorLayerDescriptor,
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import React from 'react';
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../../layers';
|
||||
import { GeoJsonVectorLayer } from '../../../layers/vector_layer';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../../common/constants';
|
||||
import { TopHitsLayerIcon } from '../../../layers/icons/top_hits_layer_icon';
|
||||
import { TopHitsLayerIcon } from '../../../layers/wizards/icons/top_hits_layer_icon';
|
||||
import { ESSearchSourceDescriptor } from '../../../../../common/descriptor_types';
|
||||
import { ESSearchSource } from '../es_search_source';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
// @ts-ignore
|
||||
import { CreateSourceEditor } from './create_source_editor';
|
||||
// @ts-ignore
|
||||
|
|
|
@ -9,11 +9,11 @@ import { i18n } from '@kbn/i18n';
|
|||
import React from 'react';
|
||||
import { MVTSingleLayerVectorSourceEditor } from './mvt_single_layer_vector_source_editor';
|
||||
import { MVTSingleLayerVectorSource, sourceTitle } from './mvt_single_layer_vector_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { MvtVectorLayer } from '../../layers/vector_layer';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { TiledSingleLayerVectorSourceSettings } from '../../../../common/descriptor_types';
|
||||
import { VectorTileLayerIcon } from '../../layers/icons/vector_tile_layer_icon';
|
||||
import { VectorTileLayerIcon } from '../../layers/wizards/icons/vector_tile_layer_icon';
|
||||
|
||||
export const mvtVectorSourceWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.REFERENCE],
|
||||
|
|
|
@ -11,10 +11,10 @@ import { i18n } from '@kbn/i18n';
|
|||
import { WMSCreateSourceEditor } from './wms_create_source_editor';
|
||||
// @ts-ignore
|
||||
import { sourceTitle, WMSSource } from './wms_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { TileLayer } from '../../layers/tile_layer/tile_layer';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { WebMapServiceLayerIcon } from '../../layers/icons/web_map_service_layer_icon';
|
||||
import { WebMapServiceLayerIcon } from '../../layers/wizards/icons/web_map_service_layer_icon';
|
||||
|
||||
export const wmsLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.REFERENCE],
|
||||
|
|
|
@ -9,10 +9,10 @@ import { i18n } from '@kbn/i18n';
|
|||
import React from 'react';
|
||||
import { XYZTMSEditor, XYZTMSSourceConfig } from './xyz_tms_editor';
|
||||
import { XYZTMSSource, sourceTitle } from './xyz_tms_source';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../layers';
|
||||
import { TileLayer } from '../../layers/tile_layer/tile_layer';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import { WorldMapLayerIcon } from '../../layers/icons/world_map_layer_icon';
|
||||
import { WorldMapLayerIcon } from '../../layers/wizards/icons/world_map_layer_icon';
|
||||
|
||||
export const tmsLayerWizardConfig: LayerWizard = {
|
||||
categories: [LAYER_WIZARD_CATEGORY.REFERENCE],
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { Fragment } from 'react';
|
|||
import { EuiButtonEmpty, EuiSpacer } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { LayerWizardSelect } from './layer_wizard_select';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../../classes/layers/layer_wizard_registry';
|
||||
import { LayerWizard, RenderWizardArguments } from '../../../classes/layers';
|
||||
|
||||
type Props = RenderWizardArguments & {
|
||||
layerWizard: LayerWizard | null;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
jest.mock('../../../classes/layers/layer_wizard_registry', () => ({}));
|
||||
jest.mock('../../../classes/layers', () => ({}));
|
||||
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
@ -19,7 +19,7 @@ const defaultProps = {
|
|||
describe('LayerWizardSelect', () => {
|
||||
beforeAll(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
require('../../../classes/layers/layer_wizard_registry').getLayerWizards = async () => {
|
||||
require('../../../classes/layers').getLayerWizards = async () => {
|
||||
return [
|
||||
{
|
||||
categories: [LAYER_WIZARD_CATEGORY.ELASTICSEARCH],
|
||||
|
|
|
@ -20,11 +20,7 @@ import {
|
|||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import {
|
||||
getLayerWizards,
|
||||
LayerWizard,
|
||||
LayerWizardWithMeta,
|
||||
} from '../../../classes/layers/layer_wizard_registry';
|
||||
import { getLayerWizards, LayerWizard, LayerWizardWithMeta } from '../../../classes/layers';
|
||||
import { LAYER_WIZARD_CATEGORY } from '../../../../common/constants';
|
||||
import './layer_wizard_select.scss';
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { FlyoutBody } from './flyout_body';
|
||||
import { LayerDescriptor } from '../../../common/descriptor_types';
|
||||
import { LayerWizard } from '../../classes/layers/layer_wizard_registry';
|
||||
import { LayerWizard } from '../../classes/layers';
|
||||
|
||||
export const ADD_LAYER_STEP_ID = 'ADD_LAYER_STEP_ID';
|
||||
const ADD_LAYER_STEP_LABEL = i18n.translate('xpack.maps.addLayerPanel.addLayer', {
|
||||
|
|
|
@ -26,7 +26,7 @@ import { RawValue } from '../../../common/constants';
|
|||
import { FLYOUT_STATE } from '../../reducers/ui';
|
||||
import { MapSettings } from '../../reducers/map';
|
||||
import { MapSettingsPanel } from '../map_settings_panel';
|
||||
import { registerLayerWizards } from '../../classes/layers/load_layer_wizards';
|
||||
import { registerLayerWizards } from '../../classes/layers/wizards/load_layer_wizards';
|
||||
import { RenderToolTipContent } from '../../classes/tooltips/tooltip_property';
|
||||
import { ILayer } from '../../classes/layers/layer';
|
||||
|
||||
|
|
|
@ -39,5 +39,5 @@ export type {
|
|||
SourceStatus,
|
||||
} from './classes/sources/vector_source/vector_source';
|
||||
export type { IField } from './classes/fields/field';
|
||||
export type { LayerWizard, RenderWizardArguments } from './classes/layers/layer_wizard_registry';
|
||||
export type { LayerWizard, RenderWizardArguments } from './classes/layers';
|
||||
export type { DataRequest } from './classes/util/data_request';
|
||||
|
|
|
@ -9,7 +9,7 @@ import '../../_index.scss';
|
|||
export * from '../../embeddable/map_embeddable';
|
||||
export * from '../../kibana_services';
|
||||
export { renderApp } from '../../render_app';
|
||||
export * from '../../classes/layers/solution_layers/security';
|
||||
export * from '../../classes/layers/wizards/solution_layers/security';
|
||||
export { createTileMapLayerDescriptor } from '../../classes/layers/create_tile_map_layer_descriptor';
|
||||
export { createRegionMapLayerDescriptor } from '../../classes/layers/create_region_map_layer_descriptor';
|
||||
export { createBasemapLayerDescriptor } from '../../classes/layers/create_basemap_layer_descriptor';
|
||||
|
|
|
@ -52,7 +52,7 @@ import {
|
|||
MapsStartApi,
|
||||
suggestEMSTermJoinConfig,
|
||||
} from './api';
|
||||
import { registerLayerWizard } from './classes/layers/layer_wizard_registry';
|
||||
import { registerLayerWizard } from './classes/layers';
|
||||
import { registerSource } from './classes/sources/source_registry';
|
||||
import type { SharePluginSetup, SharePluginStart } from '../../../../src/plugins/share/public';
|
||||
import type { MapsEmsPluginSetup } from '../../../../src/plugins/maps_ems/public';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue