diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 381fad404ca73..9a09ea1de6943 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,12 +26,12 @@ /src/plugins/kibana_legacy/ @elastic/kibana-vis-editors /src/plugins/timelion/ @elastic/kibana-vis-editors /src/plugins/vis_default_editor/ @elastic/kibana-vis-editors -/src/plugins/vis_type_metric/ @elastic/kibana-vis-editors +/src/plugins/vis_types/metric/ @elastic/kibana-vis-editors /src/plugins/vis_type_table/ @elastic/kibana-vis-editors -/src/plugins/vis_type_tagcloud/ @elastic/kibana-vis-editors +/src/plugins/vis_types/tagcloud/ @elastic/kibana-vis-editors /src/plugins/vis_type_timelion/ @elastic/kibana-vis-editors /src/plugins/vis_type_timeseries/ @elastic/kibana-vis-editors -/src/plugins/vis_type_vega/ @elastic/kibana-vis-editors +/src/plugins/vis_types/vega/ @elastic/kibana-vis-editors /src/plugins/vis_types/vislib/ @elastic/kibana-vis-editors /src/plugins/vis_types/xy/ @elastic/kibana-vis-editors /src/plugins/vis_types/pie/ @elastic/kibana-vis-editors diff --git a/.i18nrc.json b/.i18nrc.json index f38d6b8faae7e..77c57ded8242b 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -60,11 +60,11 @@ "uiActions": "src/plugins/ui_actions", "visDefaultEditor": "src/plugins/vis_default_editor", "visTypeMarkdown": "src/plugins/vis_type_markdown", - "visTypeMetric": "src/plugins/vis_type_metric", + "visTypeMetric": "src/plugins/vis_types/metric", "visTypeTable": "src/plugins/vis_type_table", - "visTypeTagCloud": "src/plugins/vis_type_tagcloud", + "visTypeTagCloud": "src/plugins/vis_types/tagcloud", "visTypeTimeseries": "src/plugins/vis_type_timeseries", - "visTypeVega": "src/plugins/vis_type_vega", + "visTypeVega": "src/plugins/vis_types/vega", "visTypeVislib": "src/plugins/vis_types/vislib", "visTypeXy": "src/plugins/vis_types/xy", "visTypePie": "src/plugins/vis_types/pie", diff --git a/api_docs/core.json b/api_docs/core.json index 8edb5d3b7ce63..93a84eb38f5c6 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -1125,7 +1125,7 @@ "references": [ { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/plugin.ts" + "path": "src/plugins/vis_types/vega/public/plugin.ts" } ] }, @@ -1423,15 +1423,15 @@ }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/data_model/search_api.ts" + "path": "src/plugins/vis_types/vega/public/data_model/search_api.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/plugin.ts" + "path": "src/plugins/vis_types/vega/public/plugin.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/target/types/public/data_model/search_api.d.ts" + "path": "src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts" } ] } diff --git a/api_docs/data.json b/api_docs/data.json index d0cbb6851a8fe..d76adbc36a7c4 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -16157,11 +16157,11 @@ }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "dashboard", @@ -20282,15 +20282,15 @@ }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" } ], "children": [ @@ -22396,7 +22396,7 @@ }, { "plugin": "visTypeMetric", - "path": "src/plugins/vis_type_metric/public/plugin.ts" + "path": "src/plugins/vis_types/metric/public/plugin.ts" }, { "plugin": "visTypeTable", @@ -30417,11 +30417,11 @@ }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "dashboard", @@ -36898,11 +36898,11 @@ }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "visTypeVega", - "path": "src/plugins/vis_type_vega/public/vega_request_handler.ts" + "path": "src/plugins/vis_types/vega/public/vega_request_handler.ts" }, { "plugin": "dashboard", diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 24cfe1e5342a7..de62579ee05dc 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -679,7 +679,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_metric/public/plugin.ts#:~:text=fieldFormats) | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/metric/public/plugin.ts#:~:text=fieldFormats) | - | @@ -738,12 +738,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery) | 8.1 | -| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | -| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | -| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | -| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/plugin.ts#:~:text=injectedMetadata) | - | -| | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | - | +| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery) | 8.1 | +| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | +| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | +| | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | - | +| | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | - | diff --git a/api_docs/vis_type_vega.json b/api_docs/vis_type_vega.json index 88a5bda07a2f2..1ecbc7c48f289 100644 --- a/api_docs/vis_type_vega.json +++ b/api_docs/vis_type_vega.json @@ -22,7 +22,7 @@ "tags": [], "label": "VisTypeVegaPluginStart", "description": [], - "path": "src/plugins/vis_type_vega/server/types.ts", + "path": "src/plugins/vis_types/vega/server/types.ts", "deprecated": false, "children": [], "lifecycle": "start", @@ -35,7 +35,7 @@ "tags": [], "label": "VisTypeVegaPluginSetup", "description": [], - "path": "src/plugins/vis_type_vega/server/types.ts", + "path": "src/plugins/vis_types/vega/server/types.ts", "deprecated": false, "children": [], "lifecycle": "setup", diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index e9925014d5a71..d2d543ff59d59 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -286,7 +286,7 @@ The plugin exposes the static DefaultEditorController class to consume. |The markdown visualization that can be used to place text panels on dashboards. -|{kib-repo}blob/{branch}/src/plugins/vis_type_metric[visTypeMetric] +|{kib-repo}blob/{branch}/src/plugins/vis_types/metric[visTypeMetric] |WARNING: Missing README. @@ -298,7 +298,7 @@ The plugin exposes the static DefaultEditorController class to consume. |Contains the data table visualization, that allows presenting data in a simple table format. -|{kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud[visTypeTagcloud] +|{kib-repo}blob/{branch}/src/plugins/vis_types/tagcloud[visTypeTagcloud] |WARNING: Missing README. @@ -310,7 +310,7 @@ The plugin exposes the static DefaultEditorController class to consume. |WARNING: Missing README. -|{kib-repo}blob/{branch}/src/plugins/vis_type_vega[visTypeVega] +|{kib-repo}blob/{branch}/src/plugins/vis_types/vega[visTypeVega] |WARNING: Missing README. diff --git a/src/plugins/vis_type_metric/tsconfig.json b/src/plugins/vis_type_metric/tsconfig.json deleted file mode 100644 index e430ec2460796..0000000000000 --- a/src/plugins/vis_type_metric/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": ["public/**/*", "server/**/*", "*.ts"], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../charts/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../kibana_utils/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - { "path": "../field_formats/tsconfig.json" } - ] -} diff --git a/src/plugins/vis_type_tagcloud/tsconfig.json b/src/plugins/vis_type_tagcloud/tsconfig.json deleted file mode 100644 index 043eed06c6bcb..0000000000000 --- a/src/plugins/vis_type_tagcloud/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "public/**/*", - "server/**/*", - "*.ts" - ], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../charts/tsconfig.json" }, - { "path": "../kibana_react/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - ] -} diff --git a/src/plugins/vis_type_vega/tsconfig.json b/src/plugins/vis_type_vega/tsconfig.json deleted file mode 100644 index 62bdd0262b4a5..0000000000000 --- a/src/plugins/vis_type_vega/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true, - "strictNullChecks": false - }, - "include": [ - "server/**/*", - "public/**/*", - "*.ts", - // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 - "public/test_utils/vega_map_test.json" - ], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../maps_ems/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../inspector/tsconfig.json" }, - { "path": "../home/tsconfig.json" }, - { "path": "../usage_collection/tsconfig.json" }, - { "path": "../kibana_utils/tsconfig.json" }, - { "path": "../kibana_react/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - { "path": "../es_ui_shared/tsconfig.json" }, - ] -} diff --git a/src/plugins/vis_type_metric/config.ts b/src/plugins/vis_types/metric/config.ts similarity index 100% rename from src/plugins/vis_type_metric/config.ts rename to src/plugins/vis_types/metric/config.ts diff --git a/src/plugins/vis_type_vega/jest.config.js b/src/plugins/vis_types/metric/jest.config.js similarity index 83% rename from src/plugins/vis_type_vega/jest.config.js rename to src/plugins/vis_types/metric/jest.config.js index c3e2ea5203364..a84929a3805b8 100644 --- a/src/plugins/vis_type_vega/jest.config.js +++ b/src/plugins/vis_types/metric/jest.config.js @@ -8,6 +8,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/vis_type_vega'], + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/metric'], }; diff --git a/src/plugins/vis_type_metric/kibana.json b/src/plugins/vis_types/metric/kibana.json similarity index 100% rename from src/plugins/vis_type_metric/kibana.json rename to src/plugins/vis_types/metric/kibana.json diff --git a/src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap b/src/plugins/vis_types/metric/public/__snapshots__/metric_vis_fn.test.ts.snap similarity index 100% rename from src/plugins/vis_type_metric/public/__snapshots__/metric_vis_fn.test.ts.snap rename to src/plugins/vis_types/metric/public/__snapshots__/metric_vis_fn.test.ts.snap diff --git a/src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_types/metric/public/__snapshots__/to_ast.test.ts.snap similarity index 100% rename from src/plugins/vis_type_metric/public/__snapshots__/to_ast.test.ts.snap rename to src/plugins/vis_types/metric/public/__snapshots__/to_ast.test.ts.snap diff --git a/src/plugins/vis_type_metric/public/components/__snapshots__/metric_vis_component.test.tsx.snap b/src/plugins/vis_types/metric/public/components/__snapshots__/metric_vis_component.test.tsx.snap similarity index 100% rename from src/plugins/vis_type_metric/public/components/__snapshots__/metric_vis_component.test.tsx.snap rename to src/plugins/vis_types/metric/public/components/__snapshots__/metric_vis_component.test.tsx.snap diff --git a/src/plugins/vis_type_metric/public/components/metric_vis.scss b/src/plugins/vis_types/metric/public/components/metric_vis.scss similarity index 100% rename from src/plugins/vis_type_metric/public/components/metric_vis.scss rename to src/plugins/vis_types/metric/public/components/metric_vis.scss diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_component.test.tsx b/src/plugins/vis_types/metric/public/components/metric_vis_component.test.tsx similarity index 100% rename from src/plugins/vis_type_metric/public/components/metric_vis_component.test.tsx rename to src/plugins/vis_types/metric/public/components/metric_vis_component.test.tsx diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_component.tsx b/src/plugins/vis_types/metric/public/components/metric_vis_component.tsx similarity index 95% rename from src/plugins/vis_type_metric/public/components/metric_vis_component.tsx rename to src/plugins/vis_types/metric/public/components/metric_vis_component.tsx index 87ca902f6c090..c3735bdc0d79a 100644 --- a/src/plugins/vis_type_metric/public/components/metric_vis_component.tsx +++ b/src/plugins/vis_types/metric/public/components/metric_vis_component.tsx @@ -11,13 +11,13 @@ import React, { Component } from 'react'; import { isColorDark } from '@elastic/eui'; import { MetricVisValue } from './metric_vis_value'; import { Input } from '../metric_vis_fn'; -import type { FieldFormatsContentType, IFieldFormat } from '../../../field_formats/common'; -import { Datatable } from '../../../expressions/public'; -import { getHeatmapColors } from '../../../charts/public'; +import type { FieldFormatsContentType, IFieldFormat } from '../../../../field_formats/common'; +import { Datatable } from '../../../../expressions/public'; +import { getHeatmapColors } from '../../../../charts/public'; import { VisParams, MetricVisMetric } from '../types'; import { getFormatService } from '../services'; -import { SchemaConfig } from '../../../visualizations/public'; -import { Range } from '../../../expressions/public'; +import { SchemaConfig } from '../../../../visualizations/public'; +import { Range } from '../../../../expressions/public'; import './metric_vis.scss'; diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx b/src/plugins/vis_types/metric/public/components/metric_vis_options.tsx similarity index 98% rename from src/plugins/vis_type_metric/public/components/metric_vis_options.tsx rename to src/plugins/vis_types/metric/public/components/metric_vis_options.tsx index 5c6c4bf95b4f2..22152b331a907 100644 --- a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx +++ b/src/plugins/vis_types/metric/public/components/metric_vis_options.tsx @@ -27,8 +27,8 @@ import { ColorSchemaOptions, RangeOption, PercentageModeOption, -} from '../../../vis_default_editor/public'; -import { ColorMode, colorSchemas } from '../../../charts/public'; +} from '../../../../vis_default_editor/public'; +import { ColorMode, colorSchemas } from '../../../../charts/public'; import { MetricVisParam, VisParams } from '../types'; const metricColorMode = [ diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_value.test.tsx b/src/plugins/vis_types/metric/public/components/metric_vis_value.test.tsx similarity index 100% rename from src/plugins/vis_type_metric/public/components/metric_vis_value.test.tsx rename to src/plugins/vis_types/metric/public/components/metric_vis_value.test.tsx diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_value.tsx b/src/plugins/vis_types/metric/public/components/metric_vis_value.tsx similarity index 100% rename from src/plugins/vis_type_metric/public/components/metric_vis_value.tsx rename to src/plugins/vis_types/metric/public/components/metric_vis_value.tsx diff --git a/src/plugins/vis_type_metric/public/index.ts b/src/plugins/vis_types/metric/public/index.ts similarity index 100% rename from src/plugins/vis_type_metric/public/index.ts rename to src/plugins/vis_types/metric/public/index.ts diff --git a/src/plugins/vis_type_metric/public/metric_vis_fn.test.ts b/src/plugins/vis_types/metric/public/metric_vis_fn.test.ts similarity index 90% rename from src/plugins/vis_type_metric/public/metric_vis_fn.test.ts rename to src/plugins/vis_types/metric/public/metric_vis_fn.test.ts index 432b1f2fe02b7..3844c0f21ed05 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_fn.test.ts +++ b/src/plugins/vis_types/metric/public/metric_vis_fn.test.ts @@ -7,8 +7,8 @@ */ import { createMetricVisFn } from './metric_vis_fn'; -import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; -import { Datatable } from '../../expressions/common/expression_types/specs'; +import { functionWrapper } from '../../../expressions/common/expression_functions/specs/tests/utils'; +import { Datatable } from '../../../expressions/common/expression_types/specs'; describe('interpreter/functions#metric', () => { const fn = functionWrapper(createMetricVisFn()); diff --git a/src/plugins/vis_type_metric/public/metric_vis_fn.ts b/src/plugins/vis_types/metric/public/metric_vis_fn.ts similarity index 97% rename from src/plugins/vis_type_metric/public/metric_vis_fn.ts rename to src/plugins/vis_types/metric/public/metric_vis_fn.ts index ab62c3e941e28..9a144defed4e7 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_fn.ts +++ b/src/plugins/vis_types/metric/public/metric_vis_fn.ts @@ -14,10 +14,10 @@ import { Range, Render, Style, -} from '../../expressions/public'; +} from '../../../expressions/public'; import { visType, DimensionsVisParam, VisParams } from './types'; -import { prepareLogTable, Dimension } from '../../visualizations/public'; -import { ColorSchemas, vislibColorMaps, ColorMode } from '../../charts/public'; +import { prepareLogTable, Dimension } from '../../../visualizations/public'; +import { ColorSchemas, vislibColorMaps, ColorMode } from '../../../charts/public'; export type Input = Datatable; diff --git a/src/plugins/vis_type_metric/public/metric_vis_renderer.tsx b/src/plugins/vis_types/metric/public/metric_vis_renderer.tsx similarity index 88% rename from src/plugins/vis_type_metric/public/metric_vis_renderer.tsx rename to src/plugins/vis_types/metric/public/metric_vis_renderer.tsx index 0fc904a325a99..0bd2efbfe2efb 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_renderer.tsx +++ b/src/plugins/vis_types/metric/public/metric_vis_renderer.tsx @@ -9,8 +9,8 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { VisualizationContainer } from '../../visualizations/public'; -import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers'; +import { VisualizationContainer } from '../../../visualizations/public'; +import { ExpressionRenderDefinition } from '../../../expressions/common/expression_renderers'; import { MetricVisRenderValue } from './metric_vis_fn'; // @ts-ignore const MetricVisComponent = lazy(() => import('./components/metric_vis_component')); diff --git a/src/plugins/vis_type_metric/public/metric_vis_type.ts b/src/plugins/vis_types/metric/public/metric_vis_type.ts similarity index 93% rename from src/plugins/vis_type_metric/public/metric_vis_type.ts rename to src/plugins/vis_types/metric/public/metric_vis_type.ts index 382ef925c5282..9fc3856ba0edf 100644 --- a/src/plugins/vis_type_metric/public/metric_vis_type.ts +++ b/src/plugins/vis_types/metric/public/metric_vis_type.ts @@ -8,9 +8,9 @@ import { i18n } from '@kbn/i18n'; import { MetricVisOptions } from './components/metric_vis_options'; -import { ColorSchemas, ColorMode } from '../../charts/public'; -import { VisTypeDefinition } from '../../visualizations/public'; -import { AggGroupNames } from '../../data/public'; +import { ColorSchemas, ColorMode } from '../../../charts/public'; +import { VisTypeDefinition } from '../../../visualizations/public'; +import { AggGroupNames } from '../../../data/public'; import { toExpressionAst } from './to_ast'; import { VisParams } from './types'; diff --git a/src/plugins/vis_type_metric/public/plugin.ts b/src/plugins/vis_types/metric/public/plugin.ts similarity index 86% rename from src/plugins/vis_type_metric/public/plugin.ts rename to src/plugins/vis_types/metric/public/plugin.ts index 051a10eb3c72f..205c02d8e9c3b 100644 --- a/src/plugins/vis_type_metric/public/plugin.ts +++ b/src/plugins/vis_types/metric/public/plugin.ts @@ -7,13 +7,13 @@ */ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'kibana/public'; -import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public'; -import { VisualizationsSetup } from '../../visualizations/public'; +import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public'; +import { VisualizationsSetup } from '../../../visualizations/public'; import { createMetricVisFn } from './metric_vis_fn'; import { createMetricVisTypeDefinition } from './metric_vis_type'; -import { ChartsPluginSetup } from '../../charts/public'; -import { DataPublicPluginStart } from '../../data/public'; +import { ChartsPluginSetup } from '../../../charts/public'; +import { DataPublicPluginStart } from '../../../data/public'; import { setFormatService } from './services'; import { ConfigSchema } from '../config'; import { metricVisRenderer } from './metric_vis_renderer'; diff --git a/src/plugins/vis_type_metric/public/services.ts b/src/plugins/vis_types/metric/public/services.ts similarity index 79% rename from src/plugins/vis_type_metric/public/services.ts rename to src/plugins/vis_types/metric/public/services.ts index 96d6b0f7a1cd3..e705513675e71 100644 --- a/src/plugins/vis_type_metric/public/services.ts +++ b/src/plugins/vis_types/metric/public/services.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { createGetterSetter } from '../../kibana_utils/common'; -import { DataPublicPluginStart } from '../../data/public'; +import { createGetterSetter } from '../../../kibana_utils/common'; +import { DataPublicPluginStart } from '../../../data/public'; export const [getFormatService, setFormatService] = createGetterSetter< DataPublicPluginStart['fieldFormats'] diff --git a/src/plugins/vis_type_metric/public/to_ast.test.ts b/src/plugins/vis_types/metric/public/to_ast.test.ts similarity index 100% rename from src/plugins/vis_type_metric/public/to_ast.test.ts rename to src/plugins/vis_types/metric/public/to_ast.test.ts diff --git a/src/plugins/vis_type_metric/public/to_ast.ts b/src/plugins/vis_types/metric/public/to_ast.ts similarity index 97% rename from src/plugins/vis_type_metric/public/to_ast.ts rename to src/plugins/vis_types/metric/public/to_ast.ts index ec9c2b3b0157e..10c782c9a50fb 100644 --- a/src/plugins/vis_type_metric/public/to_ast.ts +++ b/src/plugins/vis_types/metric/public/to_ast.ts @@ -7,13 +7,13 @@ */ import { get } from 'lodash'; -import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public'; -import { buildExpression, buildExpressionFunction } from '../../expressions/public'; +import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../../visualizations/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; import { MetricVisExpressionFunctionDefinition } from './metric_vis_fn'; import { EsaggsExpressionFunctionDefinition, IndexPatternLoadExpressionFunctionDefinition, -} from '../../data/public'; +} from '../../../data/public'; import { VisParams } from './types'; const prepareDimension = (params: SchemaConfig) => { diff --git a/src/plugins/vis_type_metric/public/types.ts b/src/plugins/vis_types/metric/public/types.ts similarity index 84% rename from src/plugins/vis_type_metric/public/types.ts rename to src/plugins/vis_types/metric/public/types.ts index 45b8e17425891..1baaa25959f31 100644 --- a/src/plugins/vis_type_metric/public/types.ts +++ b/src/plugins/vis_types/metric/public/types.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { Range } from '../../expressions/public'; -import { SchemaConfig } from '../../visualizations/public'; -import { ColorMode, Labels, Style, ColorSchemas } from '../../charts/public'; +import { Range } from '../../../expressions/public'; +import { SchemaConfig } from '../../../visualizations/public'; +import { ColorMode, Labels, Style, ColorSchemas } from '../../../charts/public'; export const visType = 'metric'; diff --git a/src/plugins/vis_type_metric/server/index.ts b/src/plugins/vis_types/metric/server/index.ts similarity index 100% rename from src/plugins/vis_type_metric/server/index.ts rename to src/plugins/vis_types/metric/server/index.ts diff --git a/src/plugins/vis_types/metric/tsconfig.json b/src/plugins/vis_types/metric/tsconfig.json new file mode 100644 index 0000000000000..e8c878425ff70 --- /dev/null +++ b/src/plugins/vis_types/metric/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["public/**/*", "server/**/*", "*.ts"], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../data/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + { "path": "../../charts/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../kibana_utils/tsconfig.json" }, + { "path": "../../vis_default_editor/tsconfig.json" }, + { "path": "../../field_formats/tsconfig.json" } + ] +} diff --git a/src/plugins/vis_type_tagcloud/config.ts b/src/plugins/vis_types/tagcloud/config.ts similarity index 100% rename from src/plugins/vis_type_tagcloud/config.ts rename to src/plugins/vis_types/tagcloud/config.ts diff --git a/src/plugins/vis_type_tagcloud/jest.config.js b/src/plugins/vis_types/tagcloud/jest.config.js similarity index 84% rename from src/plugins/vis_type_tagcloud/jest.config.js rename to src/plugins/vis_types/tagcloud/jest.config.js index 3d24c536792bb..20dfd8ad0d11c 100644 --- a/src/plugins/vis_type_tagcloud/jest.config.js +++ b/src/plugins/vis_types/tagcloud/jest.config.js @@ -8,7 +8,7 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/vis_type_tagcloud'], + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/tagcloud'], testRunner: 'jasmine2', }; diff --git a/src/plugins/vis_type_tagcloud/kibana.json b/src/plugins/vis_types/tagcloud/kibana.json similarity index 100% rename from src/plugins/vis_type_tagcloud/kibana.json rename to src/plugins/vis_types/tagcloud/kibana.json diff --git a/src/plugins/vis_type_tagcloud/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_types/tagcloud/public/__snapshots__/to_ast.test.ts.snap similarity index 100% rename from src/plugins/vis_type_tagcloud/public/__snapshots__/to_ast.test.ts.snap rename to src/plugins/vis_types/tagcloud/public/__snapshots__/to_ast.test.ts.snap diff --git a/src/plugins/vis_type_tagcloud/public/components/collections.ts b/src/plugins/vis_types/tagcloud/public/components/collections.ts similarity index 100% rename from src/plugins/vis_type_tagcloud/public/components/collections.ts rename to src/plugins/vis_types/tagcloud/public/components/collections.ts diff --git a/src/plugins/vis_type_tagcloud/public/components/get_tag_cloud_options.tsx b/src/plugins/vis_types/tagcloud/public/components/get_tag_cloud_options.tsx similarity index 100% rename from src/plugins/vis_type_tagcloud/public/components/get_tag_cloud_options.tsx rename to src/plugins/vis_types/tagcloud/public/components/get_tag_cloud_options.tsx diff --git a/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx b/src/plugins/vis_types/tagcloud/public/components/tag_cloud_options.tsx similarity index 92% rename from src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx rename to src/plugins/vis_types/tagcloud/public/components/tag_cloud_options.tsx index 6682799a8038a..ff5f1e6edd6f8 100644 --- a/src/plugins/vis_type_tagcloud/public/components/tag_cloud_options.tsx +++ b/src/plugins/vis_types/tagcloud/public/components/tag_cloud_options.tsx @@ -9,10 +9,10 @@ import React, { useState, useEffect } from 'react'; import { EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import type { PaletteRegistry } from '../../../charts/public'; -import { VisEditorOptionsProps } from '../../../visualizations/public'; -import { SelectOption, SwitchOption, PalettePicker } from '../../../vis_default_editor/public'; -import { ValidatedDualRange } from '../../../kibana_react/public'; +import type { PaletteRegistry } from '../../../../charts/public'; +import { VisEditorOptionsProps } from '../../../../visualizations/public'; +import { SelectOption, SwitchOption, PalettePicker } from '../../../../vis_default_editor/public'; +import { ValidatedDualRange } from '../../../../kibana_react/public'; import { TagCloudVisParams, TagCloudTypeProps } from '../types'; import { collections } from './collections'; diff --git a/src/plugins/vis_type_tagcloud/public/index.ts b/src/plugins/vis_types/tagcloud/public/index.ts similarity index 100% rename from src/plugins/vis_type_tagcloud/public/index.ts rename to src/plugins/vis_types/tagcloud/public/index.ts diff --git a/src/plugins/vis_type_tagcloud/public/plugin.ts b/src/plugins/vis_types/tagcloud/public/plugin.ts similarity index 91% rename from src/plugins/vis_type_tagcloud/public/plugin.ts rename to src/plugins/vis_types/tagcloud/public/plugin.ts index 06e1c516d9e61..cc99480de7099 100644 --- a/src/plugins/vis_type_tagcloud/public/plugin.ts +++ b/src/plugins/vis_types/tagcloud/public/plugin.ts @@ -7,8 +7,8 @@ */ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'kibana/public'; -import { VisualizationsSetup } from '../../visualizations/public'; -import { ChartsPluginSetup } from '../../charts/public'; +import { VisualizationsSetup } from '../../../visualizations/public'; +import { ChartsPluginSetup } from '../../../charts/public'; import { getTagCloudVisTypeDefinition } from './tag_cloud_type'; import { ConfigSchema } from '../config'; diff --git a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts b/src/plugins/vis_types/tagcloud/public/tag_cloud_type.ts similarity index 94% rename from src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts rename to src/plugins/vis_types/tagcloud/public/tag_cloud_type.ts index b3ab5cd3d7af7..a193a7fecc1fd 100644 --- a/src/plugins/vis_type_tagcloud/public/tag_cloud_type.ts +++ b/src/plugins/vis_types/tagcloud/public/tag_cloud_type.ts @@ -7,8 +7,8 @@ */ import { i18n } from '@kbn/i18n'; -import { AggGroupNames } from '../../data/public'; -import { VIS_EVENT_TO_TRIGGER } from '../../visualizations/public'; +import { AggGroupNames } from '../../../data/public'; +import { VIS_EVENT_TO_TRIGGER } from '../../../visualizations/public'; import { getTagCloudOptions } from './components/get_tag_cloud_options'; import { toExpressionAst } from './to_ast'; diff --git a/src/plugins/vis_type_tagcloud/public/to_ast.test.ts b/src/plugins/vis_types/tagcloud/public/to_ast.test.ts similarity index 97% rename from src/plugins/vis_type_tagcloud/public/to_ast.test.ts rename to src/plugins/vis_types/tagcloud/public/to_ast.test.ts index 4da9c525a4f93..c70448ab113cb 100644 --- a/src/plugins/vis_type_tagcloud/public/to_ast.test.ts +++ b/src/plugins/vis_types/tagcloud/public/to_ast.test.ts @@ -30,7 +30,7 @@ const mockSchemas = { ], }; -jest.mock('../../visualizations/public', () => ({ +jest.mock('../../../visualizations/public', () => ({ getVisSchemas: () => mockSchemas, })); diff --git a/src/plugins/vis_type_tagcloud/public/to_ast.ts b/src/plugins/vis_types/tagcloud/public/to_ast.ts similarity index 95% rename from src/plugins/vis_type_tagcloud/public/to_ast.ts rename to src/plugins/vis_types/tagcloud/public/to_ast.ts index c8810aa0397ee..b5256c586d1da 100644 --- a/src/plugins/vis_type_tagcloud/public/to_ast.ts +++ b/src/plugins/vis_types/tagcloud/public/to_ast.ts @@ -9,9 +9,9 @@ import { EsaggsExpressionFunctionDefinition, IndexPatternLoadExpressionFunctionDefinition, -} from '../../data/public'; -import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public'; +} from '../../../data/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../../visualizations/public'; import { TagCloudVisParams } from './types'; const prepareDimension = (params: SchemaConfig) => { diff --git a/src/plugins/vis_type_tagcloud/public/types.ts b/src/plugins/vis_types/tagcloud/public/types.ts similarity index 85% rename from src/plugins/vis_type_tagcloud/public/types.ts rename to src/plugins/vis_types/tagcloud/public/types.ts index d855ae5ab65c6..28a7c6506eb31 100644 --- a/src/plugins/vis_type_tagcloud/public/types.ts +++ b/src/plugins/vis_types/tagcloud/public/types.ts @@ -5,8 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { ChartsPluginSetup, PaletteOutput } from '../../charts/public'; -import type { SerializedFieldFormat } from '../../expressions/public'; +import type { ChartsPluginSetup, PaletteOutput } from '../../../charts/public'; +import type { SerializedFieldFormat } from '../../../expressions/public'; interface Dimension { accessor: number; diff --git a/src/plugins/vis_type_tagcloud/server/index.ts b/src/plugins/vis_types/tagcloud/server/index.ts similarity index 100% rename from src/plugins/vis_type_tagcloud/server/index.ts rename to src/plugins/vis_types/tagcloud/server/index.ts diff --git a/src/plugins/vis_types/tagcloud/tsconfig.json b/src/plugins/vis_types/tagcloud/tsconfig.json new file mode 100644 index 0000000000000..4087f9f04c92b --- /dev/null +++ b/src/plugins/vis_types/tagcloud/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../data/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + { "path": "../../charts/tsconfig.json" }, + { "path": "../../kibana_react/tsconfig.json" }, + { "path": "../../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_vega/config.ts b/src/plugins/vis_types/vega/config.ts similarity index 100% rename from src/plugins/vis_type_vega/config.ts rename to src/plugins/vis_types/vega/config.ts diff --git a/src/plugins/vis_type_metric/jest.config.js b/src/plugins/vis_types/vega/jest.config.js similarity index 83% rename from src/plugins/vis_type_metric/jest.config.js rename to src/plugins/vis_types/vega/jest.config.js index 3029320d2e4d4..d7e1653e891a5 100644 --- a/src/plugins/vis_type_metric/jest.config.js +++ b/src/plugins/vis_types/vega/jest.config.js @@ -8,6 +8,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/vis_type_metric'], + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/vega'], }; diff --git a/src/plugins/vis_type_vega/kibana.json b/src/plugins/vis_types/vega/kibana.json similarity index 100% rename from src/plugins/vis_type_vega/kibana.json rename to src/plugins/vis_types/vega/kibana.json diff --git a/src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap b/src/plugins/vis_types/vega/public/__snapshots__/vega_visualization.test.js.snap similarity index 100% rename from src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap rename to src/plugins/vis_types/vega/public/__snapshots__/vega_visualization.test.js.snap diff --git a/src/plugins/vis_type_vega/public/components/experimental_map_vis_info.tsx b/src/plugins/vis_types/vega/public/components/experimental_map_vis_info.tsx similarity index 96% rename from src/plugins/vis_type_vega/public/components/experimental_map_vis_info.tsx rename to src/plugins/vis_types/vega/public/components/experimental_map_vis_info.tsx index ca0cb0f0ff797..2de6eb490196c 100644 --- a/src/plugins/vis_type_vega/public/components/experimental_map_vis_info.tsx +++ b/src/plugins/vis_types/vega/public/components/experimental_map_vis_info.tsx @@ -10,7 +10,7 @@ import { parse } from 'hjson'; import React from 'react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { Vis } from '../../../visualizations/public'; +import { Vis } from '../../../../visualizations/public'; function ExperimentalMapLayerInfo() { const title = ( diff --git a/src/plugins/vis_type_vega/public/components/vega_actions_menu.tsx b/src/plugins/vis_types/vega/public/components/vega_actions_menu.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_actions_menu.tsx rename to src/plugins/vis_types/vega/public/components/vega_actions_menu.tsx diff --git a/src/plugins/vis_type_vega/public/components/vega_editor.scss b/src/plugins/vis_types/vega/public/components/vega_editor.scss similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_editor.scss rename to src/plugins/vis_types/vega/public/components/vega_editor.scss diff --git a/src/plugins/vis_type_vega/public/components/vega_help_menu.tsx b/src/plugins/vis_types/vega/public/components/vega_help_menu.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_help_menu.tsx rename to src/plugins/vis_types/vega/public/components/vega_help_menu.tsx diff --git a/src/plugins/vis_type_vega/public/components/vega_vis.scss b/src/plugins/vis_types/vega/public/components/vega_vis.scss similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_vis.scss rename to src/plugins/vis_types/vega/public/components/vega_vis.scss diff --git a/src/plugins/vis_type_vega/public/components/vega_vis_component.tsx b/src/plugins/vis_types/vega/public/components/vega_vis_component.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_vis_component.tsx rename to src/plugins/vis_types/vega/public/components/vega_vis_component.tsx diff --git a/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx b/src/plugins/vis_types/vega/public/components/vega_vis_editor.tsx similarity index 97% rename from src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx rename to src/plugins/vis_types/vega/public/components/vega_vis_editor.tsx index 9150b31343799..d2f586eac9885 100644 --- a/src/plugins/vis_type_vega/public/components/vega_vis_editor.tsx +++ b/src/plugins/vis_types/vega/public/components/vega_vis_editor.tsx @@ -13,7 +13,7 @@ import 'brace/mode/hjson'; import { i18n } from '@kbn/i18n'; import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; -import { EuiCodeEditor } from '../../../es_ui_shared/public'; +import { EuiCodeEditor } from '../../../../es_ui_shared/public'; import { getNotifications } from '../services'; import { VisParams } from '../vega_fn'; import { VegaHelpMenu } from './vega_help_menu'; diff --git a/src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx b/src/plugins/vis_types/vega/public/components/vega_vis_editor_lazy.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/components/vega_vis_editor_lazy.tsx rename to src/plugins/vis_types/vega/public/components/vega_vis_editor_lazy.tsx diff --git a/src/plugins/vis_type_vega/public/data_model/ems_file_parser.ts b/src/plugins/vis_types/vega/public/data_model/ems_file_parser.ts similarity index 97% rename from src/plugins/vis_type_vega/public/data_model/ems_file_parser.ts rename to src/plugins/vis_types/vega/public/data_model/ems_file_parser.ts index c79ebe02c0d3f..3001da2008e40 100644 --- a/src/plugins/vis_type_vega/public/data_model/ems_file_parser.ts +++ b/src/plugins/vis_types/vega/public/data_model/ems_file_parser.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; // @ts-ignore import { bypassExternalUrlCheck } from '../vega_view/vega_base_view'; -import { IServiceSettings, FileLayer } from '../../../maps_ems/public'; +import { IServiceSettings, FileLayer } from '../../../../maps_ems/public'; import { Data, UrlObject, EmsQueryRequest } from './types'; /** diff --git a/src/plugins/vis_type_vega/public/data_model/es_query_parser.test.js b/src/plugins/vis_types/vega/public/data_model/es_query_parser.test.js similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/es_query_parser.test.js rename to src/plugins/vis_types/vega/public/data_model/es_query_parser.test.js diff --git a/src/plugins/vis_type_vega/public/data_model/es_query_parser.ts b/src/plugins/vis_types/vega/public/data_model/es_query_parser.ts similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/es_query_parser.ts rename to src/plugins/vis_types/vega/public/data_model/es_query_parser.ts diff --git a/src/plugins/vis_type_vega/public/data_model/search_api.test.ts b/src/plugins/vis_types/vega/public/data_model/search_api.test.ts similarity index 95% rename from src/plugins/vis_type_vega/public/data_model/search_api.test.ts rename to src/plugins/vis_types/vega/public/data_model/search_api.test.ts index d0739453e43ec..27dc1627ae229 100644 --- a/src/plugins/vis_type_vega/public/data_model/search_api.test.ts +++ b/src/plugins/vis_types/vega/public/data_model/search_api.test.ts @@ -7,9 +7,9 @@ */ import { extendSearchParamsWithRuntimeFields } from './search_api'; -import { dataPluginMock } from '../../../data/public/mocks'; +import { dataPluginMock } from '../../../../data/public/mocks'; -import { getSearchParamsFromRequest, DataPublicPluginStart } from '../../../data/public'; +import { getSearchParamsFromRequest, DataPublicPluginStart } from '../../../../data/public'; const mockComputedFields = ( dataStart: DataPublicPluginStart, diff --git a/src/plugins/vis_type_vega/public/data_model/search_api.ts b/src/plugins/vis_types/vega/public/data_model/search_api.ts similarity index 95% rename from src/plugins/vis_type_vega/public/data_model/search_api.ts rename to src/plugins/vis_types/vega/public/data_model/search_api.ts index efdbf96e54f05..e00cf647930a8 100644 --- a/src/plugins/vis_type_vega/public/data_model/search_api.ts +++ b/src/plugins/vis_types/vega/public/data_model/search_api.ts @@ -14,10 +14,10 @@ import { SearchRequest, DataPublicPluginStart, IEsSearchResponse, -} from '../../../data/public'; -import { search as dataPluginSearch } from '../../../data/public'; +} from '../../../../data/public'; +import { search as dataPluginSearch } from '../../../../data/public'; import type { VegaInspectorAdapters } from '../vega_inspector'; -import type { RequestResponder } from '../../../inspector/public'; +import type { RequestResponder } from '../../../../inspector/public'; /** @internal **/ export const extendSearchParamsWithRuntimeFields = async ( diff --git a/src/plugins/vis_type_vega/public/data_model/time_cache.test.js b/src/plugins/vis_types/vega/public/data_model/time_cache.test.js similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/time_cache.test.js rename to src/plugins/vis_types/vega/public/data_model/time_cache.test.js diff --git a/src/plugins/vis_type_vega/public/data_model/time_cache.ts b/src/plugins/vis_types/vega/public/data_model/time_cache.ts similarity index 95% rename from src/plugins/vis_type_vega/public/data_model/time_cache.ts rename to src/plugins/vis_types/vega/public/data_model/time_cache.ts index 13c01b5fe83bc..cc9619e143437 100644 --- a/src/plugins/vis_type_vega/public/data_model/time_cache.ts +++ b/src/plugins/vis_types/vega/public/data_model/time_cache.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { TimefilterContract } from '../../../data/public'; -import { TimeRange } from '../../../data/common'; +import { TimefilterContract } from '../../../../data/public'; +import { TimeRange } from '../../../../data/common'; import { CacheBounds } from './types'; /** diff --git a/src/plugins/vis_type_vega/public/data_model/types.ts b/src/plugins/vis_types/vega/public/data_model/types.ts similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/types.ts rename to src/plugins/vis_types/vega/public/data_model/types.ts diff --git a/src/plugins/vis_type_vega/public/data_model/url_parser.ts b/src/plugins/vis_types/vega/public/data_model/url_parser.ts similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/url_parser.ts rename to src/plugins/vis_types/vega/public/data_model/url_parser.ts diff --git a/src/plugins/vis_type_vega/public/data_model/utils.ts b/src/plugins/vis_types/vega/public/data_model/utils.ts similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/utils.ts rename to src/plugins/vis_types/vega/public/data_model/utils.ts diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.test.js b/src/plugins/vis_types/vega/public/data_model/vega_parser.test.js similarity index 100% rename from src/plugins/vis_type_vega/public/data_model/vega_parser.test.js rename to src/plugins/vis_types/vega/public/data_model/vega_parser.test.js diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts b/src/plugins/vis_types/vega/public/data_model/vega_parser.ts similarity index 99% rename from src/plugins/vis_type_vega/public/data_model/vega_parser.ts rename to src/plugins/vis_types/vega/public/data_model/vega_parser.ts index bc7d72c042841..3ae95c0393b5a 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts +++ b/src/plugins/vis_types/vega/public/data_model/vega_parser.ts @@ -22,7 +22,7 @@ import { EmsFileParser } from './ems_file_parser'; import { UrlParser } from './url_parser'; import { SearchAPI } from './search_api'; import { TimeCache } from './time_cache'; -import { IServiceSettings } from '../../../maps_ems/public'; +import { IServiceSettings } from '../../../../maps_ems/public'; import { Bool, Data, diff --git a/src/plugins/vis_type_vega/public/default.spec.hjson b/src/plugins/vis_types/vega/public/default.spec.hjson similarity index 100% rename from src/plugins/vis_type_vega/public/default.spec.hjson rename to src/plugins/vis_types/vega/public/default.spec.hjson diff --git a/src/plugins/vis_type_vega/public/default_spec.ts b/src/plugins/vis_types/vega/public/default_spec.ts similarity index 100% rename from src/plugins/vis_type_vega/public/default_spec.ts rename to src/plugins/vis_types/vega/public/default_spec.ts diff --git a/src/plugins/vis_type_vega/public/index.ts b/src/plugins/vis_types/vega/public/index.ts similarity index 100% rename from src/plugins/vis_type_vega/public/index.ts rename to src/plugins/vis_types/vega/public/index.ts diff --git a/src/plugins/vis_type_vega/public/lib/extract_index_pattern.test.ts b/src/plugins/vis_types/vega/public/lib/extract_index_pattern.test.ts similarity index 97% rename from src/plugins/vis_type_vega/public/lib/extract_index_pattern.test.ts rename to src/plugins/vis_types/vega/public/lib/extract_index_pattern.test.ts index 6feb8fce9c5a3..39aadc009b93c 100644 --- a/src/plugins/vis_type_vega/public/lib/extract_index_pattern.test.ts +++ b/src/plugins/vis_types/vega/public/lib/extract_index_pattern.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { dataPluginMock } from '../../../data/public/mocks'; +import { dataPluginMock } from '../../../../data/public/mocks'; import { extractIndexPatternsFromSpec } from './extract_index_pattern'; import { setData } from '../services'; diff --git a/src/plugins/vis_type_vega/public/lib/extract_index_pattern.ts b/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts similarity index 94% rename from src/plugins/vis_type_vega/public/lib/extract_index_pattern.ts rename to src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts index 81f30ca9bbe2c..0d25db665ce7f 100644 --- a/src/plugins/vis_type_vega/public/lib/extract_index_pattern.ts +++ b/src/plugins/vis_types/vega/public/lib/extract_index_pattern.ts @@ -10,7 +10,7 @@ import { flatten } from 'lodash'; import { getData } from '../services'; import type { Data, VegaSpec } from '../data_model/types'; -import type { IndexPattern } from '../../../data/public'; +import type { IndexPattern } from '../../../../data/public'; export const extractIndexPatternsFromSpec = async (spec: VegaSpec) => { const { indexPatterns } = getData(); diff --git a/src/plugins/vis_type_vega/public/lib/vega_state_restorer.test.ts b/src/plugins/vis_types/vega/public/lib/vega_state_restorer.test.ts similarity index 100% rename from src/plugins/vis_type_vega/public/lib/vega_state_restorer.test.ts rename to src/plugins/vis_types/vega/public/lib/vega_state_restorer.test.ts diff --git a/src/plugins/vis_type_vega/public/lib/vega_state_restorer.ts b/src/plugins/vis_types/vega/public/lib/vega_state_restorer.ts similarity index 100% rename from src/plugins/vis_type_vega/public/lib/vega_state_restorer.ts rename to src/plugins/vis_types/vega/public/lib/vega_state_restorer.ts diff --git a/src/plugins/vis_type_vega/public/plugin.ts b/src/plugins/vis_types/vega/public/plugin.ts similarity index 89% rename from src/plugins/vis_type_vega/public/plugin.ts rename to src/plugins/vis_types/vega/public/plugin.ts index f935362d21604..942c1673ad202 100644 --- a/src/plugins/vis_type_vega/public/plugin.ts +++ b/src/plugins/vis_types/vega/public/plugin.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../core/public'; -import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public'; -import { DataPublicPluginSetup, DataPublicPluginStart } from '../../data/public'; -import { VisualizationsSetup } from '../../visualizations/public'; -import { Setup as InspectorSetup } from '../../inspector/public'; +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/public'; +import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public'; +import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../data/public'; +import { VisualizationsSetup } from '../../../visualizations/public'; +import { Setup as InspectorSetup } from '../../../inspector/public'; import { setNotifications, @@ -24,7 +24,7 @@ import { import { createVegaFn } from './vega_fn'; import { createVegaTypeDefinition } from './vega_type'; -import { IServiceSettings, MapsEmsPluginSetup } from '../../maps_ems/public'; +import { IServiceSettings, MapsEmsPluginSetup } from '../../../maps_ems/public'; import { ConfigSchema } from '../config'; import { getVegaInspectorView } from './vega_inspector'; diff --git a/src/plugins/vis_type_vega/public/services.ts b/src/plugins/vis_types/vega/public/services.ts similarity index 91% rename from src/plugins/vis_type_vega/public/services.ts rename to src/plugins/vis_types/vega/public/services.ts index f67fe4794e783..1cdb24ff7b02c 100644 --- a/src/plugins/vis_type_vega/public/services.ts +++ b/src/plugins/vis_types/vega/public/services.ts @@ -8,8 +8,8 @@ import { CoreStart, NotificationsStart, IUiSettingsClient, DocLinksStart } from 'src/core/public'; -import { DataPublicPluginStart } from '../../data/public'; -import { createGetterSetter } from '../../kibana_utils/public'; +import { DataPublicPluginStart } from '../../../data/public'; +import { createGetterSetter } from '../../../kibana_utils/public'; import { MapServiceSettings } from './vega_view/vega_map_view/map_service_settings'; export const [getData, setData] = createGetterSetter('Data'); diff --git a/src/plugins/vis_type_vega/public/test_utils/default.spec.json b/src/plugins/vis_types/vega/public/test_utils/default.spec.json similarity index 100% rename from src/plugins/vis_type_vega/public/test_utils/default.spec.json rename to src/plugins/vis_types/vega/public/test_utils/default.spec.json diff --git a/src/plugins/vis_type_vega/public/test_utils/vega_graph.json b/src/plugins/vis_types/vega/public/test_utils/vega_graph.json similarity index 100% rename from src/plugins/vis_type_vega/public/test_utils/vega_graph.json rename to src/plugins/vis_types/vega/public/test_utils/vega_graph.json diff --git a/src/plugins/vis_type_vega/public/test_utils/vega_map_test.json b/src/plugins/vis_types/vega/public/test_utils/vega_map_test.json similarity index 100% rename from src/plugins/vis_type_vega/public/test_utils/vega_map_test.json rename to src/plugins/vis_types/vega/public/test_utils/vega_map_test.json diff --git a/src/plugins/vis_type_vega/public/test_utils/vegalite_graph.json b/src/plugins/vis_types/vega/public/test_utils/vegalite_graph.json similarity index 100% rename from src/plugins/vis_type_vega/public/test_utils/vegalite_graph.json rename to src/plugins/vis_types/vega/public/test_utils/vegalite_graph.json diff --git a/src/plugins/vis_type_vega/public/to_ast.ts b/src/plugins/vis_types/vega/public/to_ast.ts similarity index 90% rename from src/plugins/vis_type_vega/public/to_ast.ts rename to src/plugins/vis_types/vega/public/to_ast.ts index 8f0bd952bc54e..f9ff7effafe49 100644 --- a/src/plugins/vis_type_vega/public/to_ast.ts +++ b/src/plugins/vis_types/vega/public/to_ast.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { buildExpression, buildExpressionFunction } from '../../expressions/public'; -import { Vis } from '../../visualizations/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { Vis } from '../../../visualizations/public'; import { VegaExpressionFunctionDefinition, VisParams } from './vega_fn'; export const toExpressionAst = (vis: Vis) => { diff --git a/src/plugins/vis_type_vega/public/vega_fn.ts b/src/plugins/vis_types/vega/public/vega_fn.ts similarity index 89% rename from src/plugins/vis_type_vega/public/vega_fn.ts rename to src/plugins/vis_types/vega/public/vega_fn.ts index 775bd2623028b..cbdc131ab7e2a 100644 --- a/src/plugins/vis_type_vega/public/vega_fn.ts +++ b/src/plugins/vis_types/vega/public/vega_fn.ts @@ -8,12 +8,16 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { ExecutionContextSearch } from '../../data/public'; -import { ExecutionContext, ExpressionFunctionDefinition, Render } from '../../expressions/public'; +import { ExecutionContextSearch } from '../../../data/public'; +import { + ExecutionContext, + ExpressionFunctionDefinition, + Render, +} from '../../../expressions/public'; import { VegaVisualizationDependencies } from './plugin'; import { createVegaRequestHandler } from './vega_request_handler'; import { VegaInspectorAdapters } from './vega_inspector/index'; -import { KibanaContext, TimeRange, Query } from '../../data/public'; +import { KibanaContext, TimeRange, Query } from '../../../data/public'; import { VegaParser } from './data_model/vega_parser'; type Input = KibanaContext | { type: 'null' }; diff --git a/src/plugins/vis_type_vega/public/vega_inspector/components/data_viewer.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/data_viewer.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/components/data_viewer.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/components/data_viewer.tsx diff --git a/src/plugins/vis_type_vega/public/vega_inspector/components/index.ts b/src/plugins/vis_types/vega/public/vega_inspector/components/index.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/components/index.ts rename to src/plugins/vis_types/vega/public/vega_inspector/components/index.ts diff --git a/src/plugins/vis_type_vega/public/vega_inspector/components/inspector_data_grid.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/components/inspector_data_grid.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx diff --git a/src/plugins/vis_type_vega/public/vega_inspector/components/signal_viewer.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/signal_viewer.tsx similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/components/signal_viewer.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/components/signal_viewer.tsx diff --git a/src/plugins/vis_type_vega/public/vega_inspector/components/spec_viewer.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/spec_viewer.tsx similarity index 97% rename from src/plugins/vis_type_vega/public/vega_inspector/components/spec_viewer.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/components/spec_viewer.tsx index 135c23b21d7d4..9c13857076d8b 100644 --- a/src/plugins/vis_type_vega/public/vega_inspector/components/spec_viewer.tsx +++ b/src/plugins/vis_types/vega/public/vega_inspector/components/spec_viewer.tsx @@ -19,7 +19,7 @@ import { CommonProps, } from '@elastic/eui'; import { VegaAdapter } from '../vega_adapter'; -import { CodeEditor } from '../../../../kibana_react/public'; +import { CodeEditor } from '../../../../../kibana_react/public'; interface SpecViewerProps extends CommonProps { vegaAdapter: VegaAdapter; diff --git a/src/plugins/vis_type_vega/public/vega_inspector/index.ts b/src/plugins/vis_types/vega/public/vega_inspector/index.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/index.ts rename to src/plugins/vis_types/vega/public/vega_inspector/index.ts diff --git a/src/plugins/vis_type_vega/public/vega_inspector/vega_adapter.ts b/src/plugins/vis_types/vega/public/vega_inspector/vega_adapter.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/vega_adapter.ts rename to src/plugins/vis_types/vega/public/vega_inspector/vega_adapter.ts diff --git a/src/plugins/vis_type_vega/public/vega_inspector/vega_data_inspector.scss b/src/plugins/vis_types/vega/public/vega_inspector/vega_data_inspector.scss similarity index 100% rename from src/plugins/vis_type_vega/public/vega_inspector/vega_data_inspector.scss rename to src/plugins/vis_types/vega/public/vega_inspector/vega_data_inspector.scss diff --git a/src/plugins/vis_type_vega/public/vega_inspector/vega_data_inspector.tsx b/src/plugins/vis_types/vega/public/vega_inspector/vega_data_inspector.tsx similarity index 96% rename from src/plugins/vis_type_vega/public/vega_inspector/vega_data_inspector.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/vega_data_inspector.tsx index 497c8a9ed1af3..75618df307150 100644 --- a/src/plugins/vis_type_vega/public/vega_inspector/vega_data_inspector.tsx +++ b/src/plugins/vis_types/vega/public/vega_inspector/vega_data_inspector.tsx @@ -14,7 +14,7 @@ import { EuiTabbedContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { VegaInspectorAdapters } from './vega_inspector'; import { DataViewer, SignalViewer, SpecViewer } from './components'; -import { InspectorViewProps } from '../../../inspector/public'; +import { InspectorViewProps } from '../../../../inspector/public'; export type VegaDataInspectorProps = InspectorViewProps; diff --git a/src/plugins/vis_type_vega/public/vega_inspector/vega_inspector.tsx b/src/plugins/vis_types/vega/public/vega_inspector/vega_inspector.tsx similarity index 94% rename from src/plugins/vis_type_vega/public/vega_inspector/vega_inspector.tsx rename to src/plugins/vis_types/vega/public/vega_inspector/vega_inspector.tsx index e02ae780acab1..1ca95b84f53ae 100644 --- a/src/plugins/vis_type_vega/public/vega_inspector/vega_inspector.tsx +++ b/src/plugins/vis_types/vega/public/vega_inspector/vega_inspector.tsx @@ -11,8 +11,8 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { IUiSettingsClient } from 'kibana/public'; -import { KibanaContextProvider } from '../../../kibana_react/public'; -import { Adapters, RequestAdapter, InspectorViewDescription } from '../../../inspector/public'; +import { KibanaContextProvider } from '../../../../kibana_react/public'; +import { Adapters, RequestAdapter, InspectorViewDescription } from '../../../../inspector/public'; import { VegaAdapter } from './vega_adapter'; import type { VegaDataInspectorProps } from './vega_data_inspector'; diff --git a/src/plugins/vis_type_vega/public/vega_request_handler.ts b/src/plugins/vis_types/vega/public/vega_request_handler.ts similarity index 96% rename from src/plugins/vis_type_vega/public/vega_request_handler.ts rename to src/plugins/vis_types/vega/public/vega_request_handler.ts index 4f07785f43c4f..2ae7169c2f732 100644 --- a/src/plugins/vis_type_vega/public/vega_request_handler.ts +++ b/src/plugins/vis_types/vega/public/vega_request_handler.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ import type { KibanaExecutionContext } from 'src/core/public'; -import { Filter, esQuery, TimeRange, Query } from '../../data/public'; +import { Filter, esQuery, TimeRange, Query } from '../../../data/public'; import { SearchAPI } from './data_model/search_api'; import { TimeCache } from './data_model/time_cache'; diff --git a/src/plugins/vis_type_vega/public/vega_type.ts b/src/plugins/vis_types/vega/public/vega_type.ts similarity index 95% rename from src/plugins/vis_type_vega/public/vega_type.ts rename to src/plugins/vis_types/vega/public/vega_type.ts index 902f79d03e680..74899f5cfb3a4 100644 --- a/src/plugins/vis_type_vega/public/vega_type.ts +++ b/src/plugins/vis_types/vega/public/vega_type.ts @@ -9,8 +9,8 @@ import { i18n } from '@kbn/i18n'; import { parse } from 'hjson'; -import { DefaultEditorSize } from '../../vis_default_editor/public'; -import { VIS_EVENT_TO_TRIGGER, VisGroups, VisTypeDefinition } from '../../visualizations/public'; +import { DefaultEditorSize } from '../../../vis_default_editor/public'; +import { VIS_EVENT_TO_TRIGGER, VisGroups, VisTypeDefinition } from '../../../visualizations/public'; import { getDefaultSpec } from './default_spec'; import { extractIndexPatternsFromSpec } from './lib/extract_index_pattern'; diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_base_view.d.ts b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_base_view.d.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_base_view.d.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js similarity index 99% rename from src/plugins/vis_type_vega/public/vega_view/vega_base_view.js rename to src/plugins/vis_types/vega/public/vega_view/vega_base_view.js index 0cf3f16c3d20c..a41197293bbdc 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_base_view.js +++ b/src/plugins/vis_types/vega/public/vega_view/vega_base_view.js @@ -16,7 +16,7 @@ import { Utils } from '../data_model/utils'; import { euiPaletteColorBlind } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TooltipHandler } from './vega_tooltip'; -import { esFilters } from '../../../data/public'; +import { esFilters } from '../../../../data/public'; import { getEnableExternalUrls, getData } from '../services'; import { extractIndexPatternsFromSpec } from '../lib/extract_index_pattern'; diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/constants.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/constants.ts similarity index 94% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/constants.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/constants.ts index 04957fda5b8ff..a2a3cd464276f 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/constants.ts +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/constants.ts @@ -7,7 +7,7 @@ */ import type { Style } from '@kbn/mapbox-gl'; -import { TMS_IN_YML_ID } from '../../../../maps_ems/public'; +import { TMS_IN_YML_ID } from '../../../../../maps_ems/public'; export const vegaLayerId = 'vega'; export const userConfiguredLayerId = TMS_IN_YML_ID; diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/index.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/index.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/index.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/index.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/tms_raster_layer.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/tms_raster_layer.test.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/tms_raster_layer.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/tms_raster_layer.test.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/tms_raster_layer.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/tms_raster_layer.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/tms_raster_layer.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/tms_raster_layer.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/types.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/types.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/types.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/types.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/vega_layer.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/vega_layer.test.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/vega_layer.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/vega_layer.test.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/vega_layer.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/vega_layer.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/layers/vega_layer.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/layers/vega_layer.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.test.ts similarity index 98% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.test.ts index c459220d4aa86..95fee2ea3820d 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.test.ts +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.test.ts @@ -10,7 +10,7 @@ import { get } from 'lodash'; import { uiSettingsServiceMock } from 'src/core/public/mocks'; import { MapServiceSettings, getAttributionsForTmsService } from './map_service_settings'; -import type { MapsEmsConfig } from '../../../../maps_ems/public'; +import type { MapsEmsConfig } from '../../../../../maps_ems/public'; import { EMSClient, TMSService } from '@elastic/ems-client'; import { setUISettings } from '../../services'; diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.ts similarity index 97% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.ts index 8874db7737a4e..3399d0628ad65 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/map_service_settings.ts +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/map_service_settings.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import type { EMSClient, TMSService } from '@elastic/ems-client'; import { getUISettings } from '../../services'; import { userConfiguredLayerId } from './constants'; -import type { MapsEmsConfig } from '../../../../maps_ems/public'; +import type { MapsEmsConfig } from '../../../../../maps_ems/public'; type EmsClientConfig = ConstructorParameters[0]; diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/index.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/index.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/index.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/index.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/validation_helper.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/validation_helper.test.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/validation_helper.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/validation_helper.test.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/validation_helper.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/validation_helper.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/validation_helper.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/validation_helper.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/vsi_helper.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/vsi_helper.test.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/vsi_helper.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/vsi_helper.test.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/vsi_helper.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/vsi_helper.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/vsi_helper.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/utils/vsi_helper.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/vega_map_view.scss b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/vega_map_view.scss rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.test.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts similarity index 97% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.test.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts index 17a098649ebbf..e4bf4977094fd 100644 --- a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.test.ts +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.test.ts @@ -15,9 +15,9 @@ import { VegaParser } from '../../data_model/vega_parser'; import { TimeCache } from '../../data_model/time_cache'; import { SearchAPI } from '../../data_model/search_api'; import vegaMap from '../../test_utils/vega_map_test.json'; -import { coreMock } from '../../../../../core/public/mocks'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import type { IServiceSettings, MapsEmsConfig } from '../../../../maps_ems/public'; +import { coreMock } from '../../../../../../core/public/mocks'; +import { dataPluginMock } from '../../../../../data/public/mocks'; +import type { IServiceSettings, MapsEmsConfig } from '../../../../../maps_ems/public'; import { MapServiceSettings } from './map_service_settings'; import { userConfiguredLayerId } from './constants'; import { diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_map_view/view.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_tooltip.js b/src/plugins/vis_types/vega/public/vega_view/vega_tooltip.js similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_tooltip.js rename to src/plugins/vis_types/vega/public/vega_view/vega_tooltip.js diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_view.d.ts b/src/plugins/vis_types/vega/public/vega_view/vega_view.d.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_view.d.ts rename to src/plugins/vis_types/vega/public/vega_view/vega_view.d.ts diff --git a/src/plugins/vis_type_vega/public/vega_view/vega_view.js b/src/plugins/vis_types/vega/public/vega_view/vega_view.js similarity index 100% rename from src/plugins/vis_type_vega/public/vega_view/vega_view.js rename to src/plugins/vis_types/vega/public/vega_view/vega_view.js diff --git a/src/plugins/vis_type_vega/public/vega_vis_renderer.tsx b/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx similarity index 94% rename from src/plugins/vis_type_vega/public/vega_vis_renderer.tsx rename to src/plugins/vis_types/vega/public/vega_vis_renderer.tsx index 0d9ba493281fa..77af6dfdcf042 100644 --- a/src/plugins/vis_type_vega/public/vega_vis_renderer.tsx +++ b/src/plugins/vis_types/vega/public/vega_vis_renderer.tsx @@ -10,7 +10,7 @@ import React, { lazy } from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { ExpressionRenderDefinition } from 'src/plugins/expressions'; -import { VisualizationContainer } from '../../visualizations/public'; +import { VisualizationContainer } from '../../../visualizations/public'; import { VegaVisualizationDependencies } from './plugin'; import { RenderValue } from './vega_fn'; const VegaVisComponent = lazy(() => import('./components/vega_vis_component')); diff --git a/src/plugins/vis_type_vega/public/vega_visualization.test.js b/src/plugins/vis_types/vega/public/vega_visualization.test.js similarity index 97% rename from src/plugins/vis_type_vega/public/vega_visualization.test.js rename to src/plugins/vis_types/vega/public/vega_visualization.test.js index ba1121b8894e0..8c47b2fdfd7c0 100644 --- a/src/plugins/vis_type_vega/public/vega_visualization.test.js +++ b/src/plugins/vis_types/vega/public/vega_visualization.test.js @@ -19,8 +19,8 @@ import { VegaParser } from './data_model/vega_parser'; import { SearchAPI } from './data_model/search_api'; import { setInjectedVars, setData, setNotifications } from './services'; -import { coreMock } from '../../../core/public/mocks'; -import { dataPluginMock } from '../../data/public/mocks'; +import { coreMock } from '../../../../core/public/mocks'; +import { dataPluginMock } from '../../../data/public/mocks'; jest.mock('./default_spec', () => ({ getDefaultSpec: () => jest.requireActual('./test_utils/default.spec.json'), diff --git a/src/plugins/vis_type_vega/public/vega_visualization.ts b/src/plugins/vis_types/vega/public/vega_visualization.ts similarity index 100% rename from src/plugins/vis_type_vega/public/vega_visualization.ts rename to src/plugins/vis_types/vega/public/vega_visualization.ts diff --git a/src/plugins/vis_type_vega/server/index.ts b/src/plugins/vis_types/vega/server/index.ts similarity index 100% rename from src/plugins/vis_type_vega/server/index.ts rename to src/plugins/vis_types/vega/server/index.ts diff --git a/src/plugins/vis_type_vega/server/plugin.ts b/src/plugins/vis_types/vega/server/plugin.ts similarity index 97% rename from src/plugins/vis_type_vega/server/plugin.ts rename to src/plugins/vis_types/vega/server/plugin.ts index b884dcd1a1d15..51a783456d6b2 100644 --- a/src/plugins/vis_type_vega/server/plugin.ts +++ b/src/plugins/vis_types/vega/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../core/server'; +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../../core/server'; import { registerVegaUsageCollector } from './usage_collector'; import { ConfigObservable, diff --git a/src/plugins/vis_type_vega/server/types.ts b/src/plugins/vis_types/vega/server/types.ts similarity index 87% rename from src/plugins/vis_type_vega/server/types.ts rename to src/plugins/vis_types/vega/server/types.ts index affd93dedb8ca..626d22b59181a 100644 --- a/src/plugins/vis_type_vega/server/types.ts +++ b/src/plugins/vis_types/vega/server/types.ts @@ -8,8 +8,8 @@ import { Observable } from 'rxjs'; import { SharedGlobalConfig } from 'kibana/server'; -import { HomeServerPluginSetup } from '../../home/server'; -import { UsageCollectionSetup } from '../../usage_collection/server'; +import { HomeServerPluginSetup } from '../../../home/server'; +import { UsageCollectionSetup } from '../../../usage_collection/server'; export type ConfigObservable = Observable; diff --git a/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.mock.ts b/src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.mock.ts similarity index 100% rename from src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.mock.ts rename to src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.mock.ts diff --git a/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.test.ts b/src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.test.ts similarity index 94% rename from src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.test.ts rename to src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.test.ts index 82aba087dedc1..aa1b8e447bbca 100644 --- a/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.test.ts +++ b/src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.test.ts @@ -7,9 +7,9 @@ */ import { getStats } from './get_usage_collector'; -import { createCollectorFetchContextMock } from '../../../usage_collection/server/mocks'; -import type { HomeServerPluginSetup } from '../../../home/server'; -import type { SavedObjectsClientContract } from '../../../../core/server'; +import { createCollectorFetchContextMock } from '../../../../usage_collection/server/mocks'; +import type { HomeServerPluginSetup } from '../../../../home/server'; +import type { SavedObjectsClientContract } from '../../../../../core/server'; const mockedSavedObjects = [ // vega-lite lib spec diff --git a/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.ts b/src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.ts similarity index 95% rename from src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.ts rename to src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.ts index ae99021745a0c..67fcb742c4240 100644 --- a/src/plugins/vis_type_vega/server/usage_collector/get_usage_collector.ts +++ b/src/plugins/vis_types/vega/server/usage_collector/get_usage_collector.ts @@ -8,8 +8,11 @@ import { parse } from 'hjson'; -import type { SavedObjectsClientContract, SavedObjectsFindResult } from '../../../../core/server'; -import type { SavedVisState } from '../../../visualizations/common'; +import type { + SavedObjectsClientContract, + SavedObjectsFindResult, +} from '../../../../../core/server'; +import type { SavedVisState } from '../../../../visualizations/common'; import type { VegaSavedObjectAttributes, VisTypeVegaPluginSetupDependencies } from '../types'; type UsageCollectorDependencies = Pick; diff --git a/src/plugins/vis_type_vega/server/usage_collector/index.ts b/src/plugins/vis_types/vega/server/usage_collector/index.ts similarity index 100% rename from src/plugins/vis_type_vega/server/usage_collector/index.ts rename to src/plugins/vis_types/vega/server/usage_collector/index.ts diff --git a/src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.test.ts b/src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.test.ts similarity index 95% rename from src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.test.ts rename to src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.test.ts index fc488540293ad..137dd2f17375c 100644 --- a/src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.test.ts +++ b/src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.test.ts @@ -9,11 +9,11 @@ import { createUsageCollectionSetupMock, createCollectorFetchContextMock, -} from '../../../usage_collection/server/mocks'; +} from '../../../../usage_collection/server/mocks'; import { mockStats, mockGetStats } from './get_usage_collector.mock'; import { registerVegaUsageCollector } from './register_vega_collector'; -import type { HomeServerPluginSetup } from '../../../home/server'; +import type { HomeServerPluginSetup } from '../../../../home/server'; import type { ConfigObservable } from '../types'; describe('registerVegaUsageCollector', () => { diff --git a/src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.ts b/src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.ts similarity index 93% rename from src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.ts rename to src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.ts index ef65b58a8315b..27af5aa57e38b 100644 --- a/src/plugins/vis_type_vega/server/usage_collector/register_vega_collector.ts +++ b/src/plugins/vis_types/vega/server/usage_collector/register_vega_collector.ts @@ -7,7 +7,7 @@ */ import { getStats, VegaUsage } from './get_usage_collector'; -import type { UsageCollectionSetup } from '../../../usage_collection/server'; +import type { UsageCollectionSetup } from '../../../../usage_collection/server'; import type { ConfigObservable, VisTypeVegaPluginSetupDependencies } from '../types'; export function registerVegaUsageCollector( diff --git a/src/plugins/vis_types/vega/tsconfig.json b/src/plugins/vis_types/vega/tsconfig.json new file mode 100644 index 0000000000000..ed7690ac70d1a --- /dev/null +++ b/src/plugins/vis_types/vega/tsconfig.json @@ -0,0 +1,31 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "strictNullChecks": false + }, + "include": [ + "server/**/*", + "public/**/*", + "*.ts", + // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 + "public/test_utils/vega_map_test.json" + ], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../data/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + { "path": "../../maps_ems/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../inspector/tsconfig.json" }, + { "path": "../../home/tsconfig.json" }, + { "path": "../../usage_collection/tsconfig.json" }, + { "path": "../../kibana_utils/tsconfig.json" }, + { "path": "../../kibana_react/tsconfig.json" }, + { "path": "../../vis_default_editor/tsconfig.json" }, + { "path": "../../es_ui_shared/tsconfig.json" }, + ] +}