From 109bed0768945fbd04625d13e19638e62a25b199 Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Wed, 13 Jan 2021 08:34:30 -0600 Subject: [PATCH] revert runtime fields editor plugin (#88132) --- docs/developer/plugin-list.asciidoc | 8 ++--- packages/kbn-optimizer/limits.yml | 3 +- src/plugins/runtime_fields/README.mdx | 4 --- .../runtime_fields/common/constants.ts | 20 ------------- src/plugins/runtime_fields/common/index.ts | 21 -------------- src/plugins/runtime_fields/common/types.ts | 29 ------------------- src/plugins/runtime_fields/kibana.json | 6 ---- src/plugins/runtime_fields/public/index.ts | 28 ------------------ x-pack/.i18nrc.json | 2 +- x-pack/plugins/index_management/kibana.json | 2 +- .../mappings_editor/shared_imports.ts | 2 +- .../README.md | 4 +-- .../jest.config.js | 2 +- .../kibana.json | 2 +- .../public/__jest__/setup_environment.tsx | 0 .../public/components/index.ts | 0 .../components/runtime_field_editor/index.ts | 0 .../runtime_field_editor.test.tsx | 0 .../runtime_field_editor.tsx | 0 .../index.ts | 0 ...ntime_field_editor_flyout_content.test.tsx | 0 .../runtime_field_editor_flyout_content.tsx | 0 .../components/runtime_field_form/index.ts | 0 .../runtime_field_form.test.tsx | 0 .../runtime_field_form/runtime_field_form.tsx | 0 .../components/runtime_field_form/schema.ts | 0 .../public/constants.ts | 6 +++- .../public/index.ts | 0 .../public/lib/documentation.ts | 0 .../public/lib/index.ts | 0 .../public/load_editor.tsx | 0 .../public/plugin.test.ts | 0 .../public/plugin.ts | 0 .../public/shared_imports.ts | 0 .../public/test_utils.ts | 0 .../public/types.ts | 16 ++++++---- 36 files changed, 26 insertions(+), 129 deletions(-) delete mode 100644 src/plugins/runtime_fields/README.mdx delete mode 100644 src/plugins/runtime_fields/common/constants.ts delete mode 100644 src/plugins/runtime_fields/common/index.ts delete mode 100644 src/plugins/runtime_fields/common/types.ts delete mode 100644 src/plugins/runtime_fields/kibana.json delete mode 100644 src/plugins/runtime_fields/public/index.ts rename x-pack/plugins/{runtime_field_editor => runtime_fields}/README.md (98%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/jest.config.js (83%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/kibana.json (88%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/__jest__/setup_environment.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor/runtime_field_editor.test.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor/runtime_field_editor.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor_flyout_content/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_form/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_form/runtime_field_form.test.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_form/runtime_field_form.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/components/runtime_field_form/schema.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/constants.ts (75%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/lib/documentation.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/lib/index.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/load_editor.tsx (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/plugin.test.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/plugin.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/shared_imports.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/test_utils.ts (100%) rename x-pack/plugins/{runtime_field_editor => runtime_fields}/public/types.ts (80%) diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index ba2ea98cad5e..642713e48e83 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -168,10 +168,6 @@ Content is fetched from the remote (https://feeds.elastic.co and https://feeds-s |Create choropleth maps. Display the results of a term-aggregation as e.g. countries, zip-codes, states. -|{kib-repo}blob/{branch}/src/plugins/runtime_fields/README.mdx[runtimeFields] -|The runtime fields plugin provides types and constants for OSS and xpack runtime field related code. - - |{kib-repo}blob/{branch}/src/plugins/saved_objects/README.md[savedObjects] |The savedObjects plugin exposes utilities to manipulate saved objects on the client side. @@ -491,8 +487,8 @@ Elastic. |Welcome to the Kibana rollup plugin! This plugin provides Kibana support for Elasticsearch's rollup feature. Please refer to the Elasticsearch documentation to understand rollup indices and how to create rollup jobs. -|{kib-repo}blob/{branch}/x-pack/plugins/runtime_field_editor/README.md[runtimeFieldEditor] -|Welcome to the home of the runtime field editor! +|{kib-repo}blob/{branch}/x-pack/plugins/runtime_fields/README.md[runtimeFields] +|Welcome to the home of the runtime field editor and everything related to runtime fields! |{kib-repo}blob/{branch}/x-pack/plugins/saved_objects_tagging/README.md[savedObjectsTagging] diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 485481e2a7f1..44cc4fdabb25 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -102,8 +102,7 @@ pageLoadAssetSize: visualizations: 295025 visualize: 57431 watcher: 43598 - runtimeFields: 10000 + runtimeFields: 41752 stackAlerts: 29684 presentationUtil: 28545 - runtimeFieldEditor: 46986 spacesOss: 18817 diff --git a/src/plugins/runtime_fields/README.mdx b/src/plugins/runtime_fields/README.mdx deleted file mode 100644 index 15985b07caf9..000000000000 --- a/src/plugins/runtime_fields/README.mdx +++ /dev/null @@ -1,4 +0,0 @@ - -# Runtime Fields - -The runtime fields plugin provides types and constants for OSS and xpack runtime field related code. diff --git a/src/plugins/runtime_fields/common/constants.ts b/src/plugins/runtime_fields/common/constants.ts deleted file mode 100644 index 568003508f4b..000000000000 --- a/src/plugins/runtime_fields/common/constants.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export const RUNTIME_FIELD_TYPES = ['keyword', 'long', 'double', 'date', 'ip', 'boolean'] as const; diff --git a/src/plugins/runtime_fields/common/index.ts b/src/plugins/runtime_fields/common/index.ts deleted file mode 100644 index b08ac661a4bd..000000000000 --- a/src/plugins/runtime_fields/common/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from './constants'; -export * from './types'; diff --git a/src/plugins/runtime_fields/common/types.ts b/src/plugins/runtime_fields/common/types.ts deleted file mode 100644 index f16d3d75d6ec..000000000000 --- a/src/plugins/runtime_fields/common/types.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { RUNTIME_FIELD_TYPES } from './constants'; - -export type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; -export interface RuntimeField { - name: string; - type: RuntimeType; - script: { - source: string; - }; -} diff --git a/src/plugins/runtime_fields/kibana.json b/src/plugins/runtime_fields/kibana.json deleted file mode 100644 index e71116f81532..000000000000 --- a/src/plugins/runtime_fields/kibana.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "runtimeFields", - "version": "kibana", - "server": false, - "ui": true -} diff --git a/src/plugins/runtime_fields/public/index.ts b/src/plugins/runtime_fields/public/index.ts deleted file mode 100644 index a7a94b07ac6e..000000000000 --- a/src/plugins/runtime_fields/public/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from '../common'; - -export function plugin() { - return { - setup() {}, - start() {}, - stop() {}, - }; -} diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 7380d25930bc..6937862d2053 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -42,7 +42,7 @@ "xpack.remoteClusters": "plugins/remote_clusters", "xpack.reporting": ["plugins/reporting"], "xpack.rollupJobs": ["plugins/rollup"], - "xpack.runtimeFields": "plugins/runtime_field_editor", + "xpack.runtimeFields": "plugins/runtime_fields", "xpack.searchProfiler": "plugins/searchprofiler", "xpack.security": "plugins/security", "xpack.server": "legacy/server", diff --git a/x-pack/plugins/index_management/kibana.json b/x-pack/plugins/index_management/kibana.json index af3d61c8808e..5dcff0ba942e 100644 --- a/x-pack/plugins/index_management/kibana.json +++ b/x-pack/plugins/index_management/kibana.json @@ -9,6 +9,6 @@ "requiredBundles": [ "kibanaReact", "esUiShared", - "runtimeFieldEditor" + "runtimeFields" ] } diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts index 652925a977fa..36f7fecbcff2 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts @@ -58,7 +58,7 @@ export { RuntimeField, RuntimeFieldEditorFlyoutContent, RuntimeFieldEditorFlyoutContentProps, -} from '../../../../../runtime_field_editor/public'; +} from '../../../../../runtime_fields/public'; export { createKibanaReactContext } from '../../../../../../../src/plugins/kibana_react/public'; diff --git a/x-pack/plugins/runtime_field_editor/README.md b/x-pack/plugins/runtime_fields/README.md similarity index 98% rename from x-pack/plugins/runtime_field_editor/README.md rename to x-pack/plugins/runtime_fields/README.md index 1eddfd75a39f..eb7b31e6e115 100644 --- a/x-pack/plugins/runtime_field_editor/README.md +++ b/x-pack/plugins/runtime_fields/README.md @@ -1,6 +1,6 @@ -# Runtime fields editor +# Runtime fields -Welcome to the home of the runtime field editor! +Welcome to the home of the runtime field editor and everything related to runtime fields! ## The runtime field editor diff --git a/x-pack/plugins/runtime_field_editor/jest.config.js b/x-pack/plugins/runtime_fields/jest.config.js similarity index 83% rename from x-pack/plugins/runtime_field_editor/jest.config.js rename to x-pack/plugins/runtime_fields/jest.config.js index f5a9e988fd86..9c4ec56593c8 100644 --- a/x-pack/plugins/runtime_field_editor/jest.config.js +++ b/x-pack/plugins/runtime_fields/jest.config.js @@ -7,5 +7,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', - roots: ['/x-pack/plugins/runtime_field_editor'], + roots: ['/x-pack/plugins/runtime_fields'], }; diff --git a/x-pack/plugins/runtime_field_editor/kibana.json b/x-pack/plugins/runtime_fields/kibana.json similarity index 88% rename from x-pack/plugins/runtime_field_editor/kibana.json rename to x-pack/plugins/runtime_fields/kibana.json index 3270ada544ba..65932c723c47 100644 --- a/x-pack/plugins/runtime_field_editor/kibana.json +++ b/x-pack/plugins/runtime_fields/kibana.json @@ -1,5 +1,5 @@ { - "id": "runtimeFieldEditor", + "id": "runtimeFields", "version": "kibana", "server": false, "ui": true, diff --git a/x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx b/x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx rename to x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/index.ts b/x-pack/plugins/runtime_fields/public/components/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/index.ts rename to x-pack/plugins/runtime_fields/public/components/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts diff --git a/x-pack/plugins/runtime_field_editor/public/constants.ts b/x-pack/plugins/runtime_fields/public/constants.ts similarity index 75% rename from x-pack/plugins/runtime_field_editor/public/constants.ts rename to x-pack/plugins/runtime_fields/public/constants.ts index eebc3007d79d..017b58c246af 100644 --- a/x-pack/plugins/runtime_field_editor/public/constants.ts +++ b/x-pack/plugins/runtime_fields/public/constants.ts @@ -3,7 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { ComboBoxOption, RuntimeType } from './types'; +import { ComboBoxOption } from './types'; + +export const RUNTIME_FIELD_TYPES = ['keyword', 'long', 'double', 'date', 'ip', 'boolean'] as const; + +type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; export const RUNTIME_FIELD_OPTIONS: Array> = [ { diff --git a/x-pack/plugins/runtime_field_editor/public/index.ts b/x-pack/plugins/runtime_fields/public/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/index.ts rename to x-pack/plugins/runtime_fields/public/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/lib/documentation.ts b/x-pack/plugins/runtime_fields/public/lib/documentation.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/lib/documentation.ts rename to x-pack/plugins/runtime_fields/public/lib/documentation.ts diff --git a/x-pack/plugins/runtime_field_editor/public/lib/index.ts b/x-pack/plugins/runtime_fields/public/lib/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/lib/index.ts rename to x-pack/plugins/runtime_fields/public/lib/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/load_editor.tsx b/x-pack/plugins/runtime_fields/public/load_editor.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/load_editor.tsx rename to x-pack/plugins/runtime_fields/public/load_editor.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.test.ts b/x-pack/plugins/runtime_fields/public/plugin.test.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/plugin.test.ts rename to x-pack/plugins/runtime_fields/public/plugin.test.ts diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.ts b/x-pack/plugins/runtime_fields/public/plugin.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/plugin.ts rename to x-pack/plugins/runtime_fields/public/plugin.ts diff --git a/x-pack/plugins/runtime_field_editor/public/shared_imports.ts b/x-pack/plugins/runtime_fields/public/shared_imports.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/shared_imports.ts rename to x-pack/plugins/runtime_fields/public/shared_imports.ts diff --git a/x-pack/plugins/runtime_field_editor/public/test_utils.ts b/x-pack/plugins/runtime_fields/public/test_utils.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/test_utils.ts rename to x-pack/plugins/runtime_fields/public/test_utils.ts diff --git a/x-pack/plugins/runtime_field_editor/public/types.ts b/x-pack/plugins/runtime_fields/public/types.ts similarity index 80% rename from x-pack/plugins/runtime_field_editor/public/types.ts rename to x-pack/plugins/runtime_fields/public/types.ts index 984d6ab9f865..b1bbb06d7965 100644 --- a/x-pack/plugins/runtime_field_editor/public/types.ts +++ b/x-pack/plugins/runtime_fields/public/types.ts @@ -4,12 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { DataPublicPluginStart } from 'src/plugins/data/public'; -export type { - RuntimeField, - RuntimeType, - RUNTIME_FIELD_TYPES, -} from 'src/plugins/runtime_fields/common'; +import { RUNTIME_FIELD_TYPES } from './constants'; import { OpenRuntimeFieldEditorProps } from './load_editor'; export interface LoadEditorResponse { @@ -30,6 +26,16 @@ export interface StartPlugins { data: DataPublicPluginStart; } +export type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; + +export interface RuntimeField { + name: string; + type: RuntimeType; + script: { + source: string; + }; +} + export interface ComboBoxOption { label: string; value?: T;