diff --git a/x-pack/plugins/data_visualizer/kibana.jsonc b/x-pack/plugins/data_visualizer/kibana.jsonc index 84fc98d3fb22f..06d37106c2480 100644 --- a/x-pack/plugins/data_visualizer/kibana.jsonc +++ b/x-pack/plugins/data_visualizer/kibana.jsonc @@ -33,7 +33,6 @@ "kibanaReact", "kibanaUtils", "maps", - "esUiShared", "fieldFormats", "uiActions", "lens", diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/json_editor/json_editor.tsx b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/json_editor/json_editor.tsx index e9dc536ff7af4..54894dddf6c52 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/json_editor/json_editor.tsx +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/json_editor/json_editor.tsx @@ -9,9 +9,8 @@ import type { FC } from 'react'; import React from 'react'; import { CodeEditor, type CodeEditorProps } from '@kbn/code-editor'; -import { expandLiteralStrings, XJsonMode } from '../../../shared_imports'; -export const EDITOR_MODE = { TEXT: 'text', JSON: 'json', XJSON: new XJsonMode() }; +export const EDITOR_MODE = { TEXT: 'text', JSON: 'json' }; interface JobEditorProps { value: string; @@ -30,10 +29,6 @@ export const JsonEditor: FC = ({ readOnly = false, onChange = () => {}, }) => { - if (mode === EDITOR_MODE.XJSON) { - value = expandLiteralStrings(value); - } - return ( ; interface Props { actions: CreateAnalyticsFormProps['actions']; @@ -176,7 +173,6 @@ export const RuntimeMappings: FC = ({ actions, state }) => { } setAdvancedRuntimeMappingsConfig={setAdvancedRuntimeMappingsConfig} convertToJson={convertToJson} - xJsonMode={xJsonMode} /> )} diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/runtime_mappings/runtime_mappings_editor.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/runtime_mappings/runtime_mappings_editor.tsx index dab89a3da3dd4..7315719a5009b 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/runtime_mappings/runtime_mappings_editor.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/runtime_mappings/runtime_mappings_editor.tsx @@ -12,7 +12,6 @@ import { i18n } from '@kbn/i18n'; import { CodeEditor } from '@kbn/code-editor'; import { isRuntimeMappings } from '@kbn/ml-runtime-field-utils'; -import type { XJsonModeType } from './runtime_mappings'; interface Props { convertToJson: (data: string) => string; @@ -20,13 +19,11 @@ interface Props { setIsRuntimeMappingsEditorApplyButtonEnabled: React.Dispatch>; advancedEditorRuntimeMappingsLastApplied: string | undefined; advancedRuntimeMappingsConfig: string; - xJsonMode: XJsonModeType; } export const RuntimeMappingsEditor: FC = memo( ({ convertToJson, - xJsonMode, setAdvancedRuntimeMappingsConfig, setIsRuntimeMappingsEditorApplyButtonEnabled, advancedEditorRuntimeMappingsLastApplied, diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/datafeed_preview_flyout/datafeed_preview.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/datafeed_preview_flyout/datafeed_preview.tsx index dc5bfc6003dd3..c81aa0a1bb127 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/datafeed_preview_flyout/datafeed_preview.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/datafeed_preview_flyout/datafeed_preview.tsx @@ -29,7 +29,7 @@ export const DatafeedPreview: FC<{ const { jobs: { datafeedPreview }, } = useMlApi(); - // the ace editor requires a fixed height + // the editor requires a fixed height const editorHeight = useMemo( () => `${window.innerHeight - 230 - heightOffset}px`, [heightOffset] diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx index 028cbc0e54f2a..6c128bcef12a0 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx @@ -298,7 +298,7 @@ const Contents: FC<{ heightOffset?: number; schema?: object; }> = ({ title, value, editJson, onChange, heightOffset = 0, schema }) => { - // the ace editor requires a fixed height + // the editor requires a fixed height const editorHeight = useMemo( () => `${window.innerHeight - 230 - heightOffset}px`, [heightOffset] diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json index 4f1d63728ab33..24ed35277b93a 100644 --- a/x-pack/plugins/ml/tsconfig.json +++ b/x-pack/plugins/ml/tsconfig.json @@ -24,7 +24,6 @@ "path": "../../../src/setup_node_env/tsconfig.json" }, // add references to other TypeScript projects the plugin depends on - "@kbn/ace", "@kbn/actions-plugin", "@kbn/aiops-plugin", "@kbn/alerting-plugin", diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_pivot_editor/advanced_pivot_editor.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_pivot_editor/advanced_pivot_editor.tsx index e0379ea26366a..f07f12be724f6 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_pivot_editor/advanced_pivot_editor.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_pivot_editor/advanced_pivot_editor.tsx @@ -18,7 +18,7 @@ import type { StepDefineFormHook } from '../step_define'; export const AdvancedPivotEditor: FC = memo( ({ actions: { convertToJson, setAdvancedEditorConfig, setAdvancedPivotEditorApplyButtonEnabled }, - state: { advancedEditorConfigLastApplied, advancedEditorConfig, xJsonMode }, + state: { advancedEditorConfigLastApplied, advancedEditorConfig }, }) => { return ( { return (
diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_pivot_editor.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_pivot_editor.ts index 7e7c9470704c2..ecdac54c2c790 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_pivot_editor.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_pivot_editor.ts @@ -6,7 +6,6 @@ */ import { useEffect, useState } from 'react'; -import { XJsonMode } from '@kbn/ace'; import { XJson } from '@kbn/es-ui-shared-plugin/public'; @@ -15,7 +14,6 @@ import type { PostTransformsPreviewRequestSchema } from '../../../../../../../se import type { StepDefineExposedState } from '../common'; const { useXJsonMode } = XJson; -const xJsonMode = new XJsonMode(); export const useAdvancedPivotEditor = ( defaults: StepDefineExposedState, @@ -71,7 +69,6 @@ export const useAdvancedPivotEditor = ( isAdvancedEditorSwitchModalVisible, isAdvancedPivotEditorApplyButtonEnabled, isAdvancedPivotEditorEnabled, - xJsonMode, }, }; }; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_runtime_mappings_editor.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_runtime_mappings_editor.ts index a4043fa4d81fb..62f19f720859e 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_runtime_mappings_editor.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_advanced_runtime_mappings_editor.ts @@ -6,12 +6,10 @@ */ import { useState } from 'react'; -import { XJsonMode } from '@kbn/ace'; import { XJson } from '@kbn/es-ui-shared-plugin/public'; import type { StepDefineExposedState } from '../common'; const { useXJsonMode } = XJson; -const xJsonMode = new XJsonMode(); export const useAdvancedRuntimeMappingsEditor = (defaults: StepDefineExposedState) => { const stringifiedRuntimeMappings = JSON.stringify(defaults.runtimeMappings, null, 2); @@ -81,7 +79,6 @@ export const useAdvancedRuntimeMappingsEditor = (defaults: StepDefineExposedStat isRuntimeMappingsEditorSwitchModalVisible, runtimeMappingsUpdated, advancedRuntimeMappingsConfig, - xJsonMode, runtimeMappings, }, }; diff --git a/x-pack/plugins/transform/tsconfig.json b/x-pack/plugins/transform/tsconfig.json index 45faf24223dbf..fbef3a777d5c0 100644 --- a/x-pack/plugins/transform/tsconfig.json +++ b/x-pack/plugins/transform/tsconfig.json @@ -30,7 +30,6 @@ "@kbn/triggers-actions-ui-plugin", "@kbn/i18n-react", "@kbn/kibana-react-plugin", - "@kbn/ace", "@kbn/es-ui-shared-plugin", "@kbn/discover-plugin", "@kbn/kibana-utils-plugin",