From 574eb26cc70e36274384d82c36d9d6aa20ed7cc7 Mon Sep 17 00:00:00 2001 From: Hannah Mudge Date: Fri, 20 Sep 2024 14:08:18 -0600 Subject: [PATCH] [Embeddable Rebuild] [Controls] Remove `react_controls` top-level folder (#193451) Final part of https://github.com/elastic/kibana/issues/192005 ## Summary This PR marks the "final" major cleanup step for the control group refactor. This one is the simplest and does two things: 1. It removes the outer `react_controls` folder so that the new controls live directly under the `public` folder 2. It moves the `external_api` folder under the `control_group` folder Any files marked as "new" were not actually modified - this PR contains **no** logic changes. It **only** contains import changes due to the folder structure changing. ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../public/actions/delete_control_action.test.tsx | 11 ++++------- .../public/actions/edit_control_action.test.tsx | 11 ++++------- .../edit_control_action_compatibility_check.ts | 5 +++-- .../{react_controls => }/control_factory_registry.ts | 0 .../control_group/components/control_clone.tsx | 2 +- .../control_group/components/control_error.tsx | 0 .../control_group/components/control_group.scss | 0 .../control_group/components/control_group.tsx | 2 +- .../components/control_group_editor.test.tsx | 4 ++-- .../control_group/components/control_group_editor.tsx | 2 +- .../control_group/components/control_panel.scss | 0 .../control_group/components/control_panel.test.tsx | 2 +- .../control_group/components/control_panel.tsx | 2 +- .../control_group/components/control_renderer.tsx | 2 +- .../components/control_setting_tooltip_label.tsx | 0 .../control_group/control_fetch/chaining.test.ts | 2 +- .../control_group/control_fetch/chaining.ts | 2 +- .../control_group/control_fetch/control_fetch.ts | 0 .../control_fetch/control_group_fetch.ts | 2 +- .../control_group/control_fetch/index.ts | 0 .../control_group_renderer.test.tsx | 2 +- .../control_group_renderer.tsx | 4 ++-- .../control_group_renderer_lazy.tsx | 0 .../control_group_renderer}/index.ts | 0 .../control_group_renderer}/types.ts | 0 .../control_group/control_group_strings.tsx | 0 .../control_group_unsaved_changes_api.ts | 2 +- .../control_group/get_control_group_factory.tsx | 6 +++--- .../control_group/init_controls_manager.test.ts | 8 ++------ .../control_group/init_controls_manager.ts | 4 ++-- .../control_group/open_edit_control_group_flyout.tsx | 2 +- .../register_control_group_embeddable.ts | 4 ++-- .../control_group/selections_manager.test.ts | 0 .../control_group/selections_manager.ts | 0 .../{react_controls => }/control_group/types.ts | 2 +- .../utils/control_group_state_builder.ts | 6 +++--- .../control_group/utils/initialization_utils.ts | 2 +- .../control_group/utils/serialization_utils.ts | 2 +- .../public/{react_controls => }/controls/constants.ts | 0 .../controls/data_controls/data_control_constants.tsx | 2 +- .../data_controls/data_control_editor.test.tsx | 4 ++-- .../controls/data_controls/data_control_editor.tsx | 4 ++-- .../data_controls/data_control_editor_utils.ts | 0 .../controls/data_controls/editor_constants.ts | 0 .../data_controls/initialize_data_control.test.tsx | 2 +- .../controls/data_controls/initialize_data_control.ts | 4 ++-- .../controls/data_controls/mocks/api_mocks.tsx | 2 +- .../controls/data_controls/mocks/factory_mocks.tsx | 0 .../data_controls/open_data_control_editor.tsx | 4 ++-- .../options_list_control/components/options_list.scss | 0 .../components/options_list_control.test.tsx | 0 .../components/options_list_control.tsx | 2 +- .../components/options_list_editor_options.test.tsx | 4 ++-- .../components/options_list_editor_options.tsx | 4 ++-- .../components/options_list_popover.test.tsx | 2 +- .../components/options_list_popover.tsx | 0 .../components/options_list_popover_action_bar.tsx | 2 +- .../components/options_list_popover_empty_message.tsx | 0 .../components/options_list_popover_footer.tsx | 0 .../options_list_popover_invalid_selections.tsx | 0 .../options_list_popover_sorting_button.test.tsx | 0 .../options_list_popover_sorting_button.tsx | 2 +- .../options_list_popover_suggestion_badge.tsx | 0 .../components/options_list_popover_suggestions.tsx | 4 ++-- .../data_controls/options_list_control/constants.ts | 2 +- .../options_list_control/fetch_and_validate.tsx | 6 +++--- .../get_options_list_control_factory.test.tsx | 2 +- .../get_options_list_control_factory.tsx | 6 +++--- .../options_list_context_provider.tsx | 2 +- .../options_list_control_selections.ts | 4 ++-- .../options_list_control/options_list_fetch_cache.ts | 4 ++-- .../options_list_control/options_list_strings.ts | 2 +- .../register_options_list_control.ts | 4 ++-- .../data_controls/options_list_control/types.ts | 2 +- .../controls/data_controls/publishes_async_filters.ts | 0 .../range_slider/components/range_slider.styles.ts | 0 .../range_slider/components/range_slider_control.tsx | 0 .../get_range_slider_control_factory.test.tsx | 2 +- .../range_slider/get_range_slider_control_factory.tsx | 2 +- .../data_controls/range_slider/has_no_results.ts | 2 +- .../controls/data_controls/range_slider/min_max.ts | 2 +- .../range_slider/range_control_selections.ts | 0 .../range_slider/range_slider_strings.ts | 0 .../range_slider/register_range_slider_control.ts | 4 ++-- .../controls/data_controls/range_slider/types.ts | 2 +- .../controls/data_controls/reference_name_utils.ts | 0 .../controls/data_controls/types.ts | 2 +- .../controls/initialize_default_control_api.tsx | 2 +- .../controls/mocks/control_mocks.ts | 2 +- .../controls/timeslider_control/components/index.scss | 0 .../timeslider_control/components/play_button.tsx | 0 .../components/time_slider_anchored_range.tsx | 0 .../components/time_slider_popover_button.tsx | 0 .../components/time_slider_popover_content.tsx | 0 .../components/time_slider_prepend.tsx | 0 .../components/time_slider_sliding_window_range.tsx | 0 .../components/time_slider_strings.ts | 0 .../timeslider_control/get_time_range_meta.ts | 2 +- .../get_timeslider_control_factory.test.tsx | 2 +- .../get_timeslider_control_factory.tsx | 2 +- .../timeslider_control/init_time_range_percentage.ts | 0 .../init_time_range_subscription.ts | 0 .../timeslider_control/register_timeslider_control.ts | 4 ++-- .../controls/timeslider_control/time_utils.tsx | 0 .../controls/timeslider_control/types.ts | 2 +- .../public/{react_controls => }/controls/types.ts | 4 ++-- src/plugins/controls/public/index.ts | 11 ++++------- src/plugins/controls/public/plugin.ts | 8 ++++---- .../dashboard_control_group_integration.test.ts | 2 -- 109 files changed, 106 insertions(+), 120 deletions(-) rename src/plugins/controls/public/{react_controls => }/control_factory_registry.ts (100%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_clone.tsx (97%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_error.tsx (100%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group.scss (100%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group.tsx (98%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group_editor.test.tsx (96%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group_editor.tsx (99%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.scss (100%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.tsx (99%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_renderer.tsx (98%) rename src/plugins/controls/public/{react_controls => }/control_group/components/control_setting_tooltip_label.tsx (100%) rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/chaining.test.ts (99%) rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/chaining.ts (98%) rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/control_fetch.ts (100%) rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/control_group_fetch.ts (97%) rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/index.ts (100%) rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer.test.tsx (97%) rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer.tsx (97%) rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer_lazy.tsx (100%) rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/index.ts (100%) rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/types.ts (100%) rename src/plugins/controls/public/{react_controls => }/control_group/control_group_strings.tsx (100%) rename src/plugins/controls/public/{react_controls => }/control_group/control_group_unsaved_changes_api.ts (99%) rename src/plugins/controls/public/{react_controls => }/control_group/get_control_group_factory.tsx (98%) rename src/plugins/controls/public/{react_controls => }/control_group/init_controls_manager.test.ts (98%) rename src/plugins/controls/public/{react_controls => }/control_group/init_controls_manager.ts (99%) rename src/plugins/controls/public/{react_controls => }/control_group/open_edit_control_group_flyout.tsx (98%) rename src/plugins/controls/public/{react_controls => }/control_group/register_control_group_embeddable.ts (87%) rename src/plugins/controls/public/{react_controls => }/control_group/selections_manager.test.ts (100%) rename src/plugins/controls/public/{react_controls => }/control_group/selections_manager.ts (100%) rename src/plugins/controls/public/{react_controls => }/control_group/types.ts (99%) rename src/plugins/controls/public/{react_controls => }/control_group/utils/control_group_state_builder.ts (95%) rename src/plugins/controls/public/{react_controls => }/control_group/utils/initialization_utils.ts (96%) rename src/plugins/controls/public/{react_controls => }/control_group/utils/serialization_utils.ts (98%) rename src/plugins/controls/public/{react_controls => }/controls/constants.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_constants.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor_utils.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/editor_constants.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/initialize_data_control.test.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/initialize_data_control.ts (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/mocks/api_mocks.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/mocks/factory_mocks.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/open_data_control_editor.tsx (96%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list.scss (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_control.test.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_control.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_editor_options.tsx (97%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx (97%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/constants.ts (94%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/fetch_and_validate.tsx (94%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/get_options_list_control_factory.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_context_provider.tsx (97%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_control_selections.ts (93%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_fetch_cache.ts (96%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_strings.ts (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/register_options_list_control.ts (85%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/types.ts (97%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/publishes_async_filters.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/components/range_slider.styles.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/components/range_slider_control.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/get_range_slider_control_factory.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/has_no_results.ts (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/min_max.ts (98%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/range_control_selections.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/range_slider_strings.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/register_range_slider_control.ts (85%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/types.ts (91%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/reference_name_utils.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/data_controls/types.ts (97%) rename src/plugins/controls/public/{react_controls => }/controls/initialize_default_control_api.tsx (96%) rename src/plugins/controls/public/{react_controls => }/controls/mocks/control_mocks.ts (97%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/index.scss (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/play_button.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_anchored_range.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_popover_button.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_popover_content.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_prepend.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_sliding_window_range.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_strings.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_time_range_meta.ts (96%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_timeslider_control_factory.test.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_timeslider_control_factory.tsx (99%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/init_time_range_percentage.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/init_time_range_subscription.ts (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/register_timeslider_control.ts (85%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/time_utils.tsx (100%) rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/types.ts (94%) rename src/plugins/controls/public/{react_controls => }/controls/types.ts (96%) diff --git a/src/plugins/controls/public/actions/delete_control_action.test.tsx b/src/plugins/controls/public/actions/delete_control_action.test.tsx index c158d743f69ae..56b020962a9f7 100644 --- a/src/plugins/controls/public/actions/delete_control_action.test.tsx +++ b/src/plugins/controls/public/actions/delete_control_action.test.tsx @@ -10,14 +10,11 @@ import { BehaviorSubject } from 'rxjs'; import { ViewMode } from '@kbn/presentation-publishing'; -import { getOptionsListControlFactory } from '../react_controls/controls/data_controls/options_list_control/get_options_list_control_factory'; -import { OptionsListControlApi } from '../react_controls/controls/data_controls/options_list_control/types'; -import { - getMockedBuildApi, - getMockedControlGroupApi, -} from '../react_controls/controls/mocks/control_mocks'; -import { DeleteControlAction } from './delete_control_action'; +import { getOptionsListControlFactory } from '../controls/data_controls/options_list_control/get_options_list_control_factory'; +import { OptionsListControlApi } from '../controls/data_controls/options_list_control/types'; +import { getMockedBuildApi, getMockedControlGroupApi } from '../controls/mocks/control_mocks'; import { coreServices } from '../services/kibana_services'; +import { DeleteControlAction } from './delete_control_action'; const dashboardApi = { viewMode: new BehaviorSubject('view'), diff --git a/src/plugins/controls/public/actions/edit_control_action.test.tsx b/src/plugins/controls/public/actions/edit_control_action.test.tsx index b1c24d779aaf6..497223d9f0889 100644 --- a/src/plugins/controls/public/actions/edit_control_action.test.tsx +++ b/src/plugins/controls/public/actions/edit_control_action.test.tsx @@ -13,13 +13,10 @@ import dateMath from '@kbn/datemath'; import type { TimeRange } from '@kbn/es-query'; import type { ViewMode } from '@kbn/presentation-publishing'; -import { getOptionsListControlFactory } from '../react_controls/controls/data_controls/options_list_control/get_options_list_control_factory'; -import type { OptionsListControlApi } from '../react_controls/controls/data_controls/options_list_control/types'; -import { - getMockedBuildApi, - getMockedControlGroupApi, -} from '../react_controls/controls/mocks/control_mocks'; -import { getTimesliderControlFactory } from '../react_controls/controls/timeslider_control/get_timeslider_control_factory'; +import { getOptionsListControlFactory } from '../controls/data_controls/options_list_control/get_options_list_control_factory'; +import type { OptionsListControlApi } from '../controls/data_controls/options_list_control/types'; +import { getMockedBuildApi, getMockedControlGroupApi } from '../controls/mocks/control_mocks'; +import { getTimesliderControlFactory } from '../controls/timeslider_control/get_timeslider_control_factory'; import { dataService } from '../services/kibana_services'; import { EditControlAction } from './edit_control_action'; diff --git a/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts b/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts index f74c6b0103c9d..0af5a942dd032 100644 --- a/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts +++ b/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts @@ -7,6 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +import { ViewMode } from '@kbn/embeddable-plugin/public'; import { apiIsPresentationContainer } from '@kbn/presentation-containers'; import { apiCanAccessViewMode, @@ -17,9 +18,9 @@ import { getInheritedViewMode, hasEditCapabilities, } from '@kbn/presentation-publishing'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; + import { CONTROL_GROUP_TYPE } from '../../common'; -import { DataControlApi } from '../react_controls/controls/data_controls/types'; +import { DataControlApi } from '../controls/data_controls/types'; export const compatibilityCheck = (api: unknown): api is DataControlApi => { return Boolean( diff --git a/src/plugins/controls/public/react_controls/control_factory_registry.ts b/src/plugins/controls/public/control_factory_registry.ts similarity index 100% rename from src/plugins/controls/public/react_controls/control_factory_registry.ts rename to src/plugins/controls/public/control_factory_registry.ts diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx b/src/plugins/controls/public/control_group/components/control_clone.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx rename to src/plugins/controls/public/control_group/components/control_clone.tsx index 38cb7b1703559..7002bbf78d5d4 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx +++ b/src/plugins/controls/public/control_group/components/control_clone.tsx @@ -13,7 +13,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiFormLabel, EuiIcon } from '@elastic/eui'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { BehaviorSubject } from 'rxjs'; -import { DEFAULT_CONTROL_GROW } from '../../../../common'; +import { DEFAULT_CONTROL_GROW } from '../../../common'; import { DefaultControlApi } from '../../controls/types'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_error.tsx b/src/plugins/controls/public/control_group/components/control_error.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/components/control_error.tsx rename to src/plugins/controls/public/control_group/components/control_error.tsx diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group.scss b/src/plugins/controls/public/control_group/components/control_group.scss similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/components/control_group.scss rename to src/plugins/controls/public/control_group/components/control_group.scss diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx b/src/plugins/controls/public/control_group/components/control_group.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/components/control_group.tsx rename to src/plugins/controls/public/control_group/components/control_group.tsx index 54e778684806a..6453474aa8ff2 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx +++ b/src/plugins/controls/public/control_group/components/control_group.tsx @@ -30,7 +30,7 @@ import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiToolTip } from ' import { css } from '@emotion/react'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; -import type { ControlLabelPosition } from '../../../../common'; +import type { ControlLabelPosition } from '../../../common'; import type { DefaultControlApi } from '../../controls/types'; import { ControlGroupStrings } from '../control_group_strings'; import { ControlsInOrder } from '../init_controls_manager'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx b/src/plugins/controls/public/control_group/components/control_group_editor.test.tsx similarity index 96% rename from src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx rename to src/plugins/controls/public/control_group/components/control_group_editor.test.tsx index b3705106afe2c..a17068228f9a8 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx +++ b/src/plugins/controls/public/control_group/components/control_group_editor.test.tsx @@ -12,13 +12,13 @@ import { BehaviorSubject } from 'rxjs'; import { render } from '@testing-library/react'; -import { ControlGroupApi } from '../../..'; +import { ControlGroupApi } from '../..'; import { ControlGroupChainingSystem, ControlLabelPosition, DEFAULT_CONTROL_LABEL_POSITION, ParentIgnoreSettings, -} from '../../../../common'; +} from '../../../common'; import { DefaultControlApi } from '../../controls/types'; import { ControlGroupEditor } from './control_group_editor'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx b/src/plugins/controls/public/control_group/components/control_group_editor.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx rename to src/plugins/controls/public/control_group/components/control_group_editor.tsx index c4e7dc61476ba..8f1ccb4d699b0 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx +++ b/src/plugins/controls/public/control_group/components/control_group_editor.tsx @@ -27,7 +27,7 @@ import { } from '@elastic/eui'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; -import type { ControlLabelPosition, ParentIgnoreSettings } from '../../../../common'; +import type { ControlLabelPosition, ParentIgnoreSettings } from '../../../common'; import { CONTROL_LAYOUT_OPTIONS } from '../../controls/data_controls/editor_constants'; import type { ControlStateManager } from '../../controls/types'; import { ControlGroupStrings } from '../control_group_strings'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.scss b/src/plugins/controls/public/control_group/components/control_panel.scss similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.scss rename to src/plugins/controls/public/control_group/components/control_panel.scss diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx b/src/plugins/controls/public/control_group/components/control_panel.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx rename to src/plugins/controls/public/control_group/components/control_panel.test.tsx index 365c896bb908e..116e268afe208 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx +++ b/src/plugins/controls/public/control_group/components/control_panel.test.tsx @@ -14,7 +14,7 @@ import { pluginServices as presentationUtilPluginServices } from '@kbn/presentat import { registry as presentationUtilServicesRegistry } from '@kbn/presentation-util-plugin/public/services/plugin_services.story'; import { render, waitFor } from '@testing-library/react'; -import type { ControlLabelPosition, ControlWidth } from '../../../../common'; +import type { ControlLabelPosition, ControlWidth } from '../../../common'; import { ControlPanel } from './control_panel'; describe('render', () => { diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx b/src/plugins/controls/public/control_group/components/control_panel.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx rename to src/plugins/controls/public/control_group/components/control_panel.tsx index 7936ebc896c12..73eee5c5146ae 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx +++ b/src/plugins/controls/public/control_group/components/control_panel.tsx @@ -28,7 +28,7 @@ import { useBatchedOptionalPublishingSubjects, } from '@kbn/presentation-publishing'; import { FloatingActions } from '@kbn/presentation-util-plugin/public'; -import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../../common'; +import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../common'; import { ControlPanelProps, DefaultControlApi } from '../../controls/types'; import { ControlError } from './control_error'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx b/src/plugins/controls/public/control_group/components/control_renderer.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx rename to src/plugins/controls/public/control_group/components/control_renderer.tsx index e2a09012c7df2..a30c39f1dfe2a 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx +++ b/src/plugins/controls/public/control_group/components/control_renderer.tsx @@ -13,7 +13,7 @@ import { BehaviorSubject } from 'rxjs'; import { initializeUnsavedChanges } from '@kbn/presentation-containers'; import { StateComparators } from '@kbn/presentation-publishing'; -import type { DefaultControlState } from '../../../../common'; +import type { DefaultControlState } from '../../../common'; import { getControlFactory } from '../../control_factory_registry'; import type { ControlApiRegistration, DefaultControlApi } from '../../controls/types'; import type { ControlGroupApi } from '../types'; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_setting_tooltip_label.tsx b/src/plugins/controls/public/control_group/components/control_setting_tooltip_label.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/components/control_setting_tooltip_label.tsx rename to src/plugins/controls/public/control_group/components/control_setting_tooltip_label.tsx diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts b/src/plugins/controls/public/control_group/control_fetch/chaining.test.ts similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts rename to src/plugins/controls/public/control_group/control_fetch/chaining.test.ts index cb8dfe1d922ce..7c8650a104afe 100644 --- a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts +++ b/src/plugins/controls/public/control_group/control_fetch/chaining.test.ts @@ -11,7 +11,7 @@ import { BehaviorSubject, skip } from 'rxjs'; import { Filter } from '@kbn/es-query'; -import { ControlGroupChainingSystem } from '../../../../common'; +import { ControlGroupChainingSystem } from '../../../common'; import { chaining$ } from './chaining'; const FILTER_ALPHA = { diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts b/src/plugins/controls/public/control_group/control_fetch/chaining.ts similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts rename to src/plugins/controls/public/control_group/control_fetch/chaining.ts index d25a0b5d24cf6..5c82b0eaddf1b 100644 --- a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts +++ b/src/plugins/controls/public/control_group/control_fetch/chaining.ts @@ -24,7 +24,7 @@ import { apiPublishesTimeslice, } from '@kbn/presentation-publishing'; -import type { ControlGroupChainingSystem } from '../../../../common'; +import type { ControlGroupChainingSystem } from '../../../common'; export interface ChainingContext { chainingFilters?: Filter[] | undefined; diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_fetch.ts b/src/plugins/controls/public/control_group/control_fetch/control_fetch.ts similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/control_fetch/control_fetch.ts rename to src/plugins/controls/public/control_group/control_fetch/control_fetch.ts diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts b/src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts similarity index 97% rename from src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts rename to src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts index 0339a1a6ac716..ef6da75caa135 100644 --- a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts +++ b/src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts @@ -11,7 +11,7 @@ import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import { PublishesUnifiedSearch, PublishingSubject } from '@kbn/presentation-publishing'; import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { BehaviorSubject, debounceTime, map, merge, Observable, switchMap } from 'rxjs'; -import { ParentIgnoreSettings } from '../../../../common'; +import { ParentIgnoreSettings } from '../../../common'; export interface ControlGroupFetchContext { unifiedSearchFilters?: Filter[] | undefined; diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/index.ts b/src/plugins/controls/public/control_group/control_fetch/index.ts similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/control_fetch/index.ts rename to src/plugins/controls/public/control_group/control_fetch/index.ts diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx index e034ca817908e..a0ca9b74f222f 100644 --- a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx +++ b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx @@ -16,7 +16,7 @@ import { act, render, waitFor } from '@testing-library/react'; import { ControlGroupRendererApi } from '.'; import { CONTROL_GROUP_TYPE } from '../..'; -import { getControlGroupEmbeddableFactory } from '../control_group/get_control_group_factory'; +import { getControlGroupEmbeddableFactory } from '../get_control_group_factory'; import { ControlGroupRenderer, ControlGroupRendererProps } from './control_group_renderer'; type ParentApiType = PublishesUnifiedSearch & { diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx index 74d477c48f23a..728c8ca551a28 100644 --- a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx +++ b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx @@ -25,8 +25,8 @@ import { import { type ControlGroupStateBuilder, controlGroupStateBuilder, -} from '../control_group/utils/control_group_state_builder'; -import { getDefaultControlGroupRuntimeState } from '../control_group/utils/initialization_utils'; +} from '../utils/control_group_state_builder'; +import { getDefaultControlGroupRuntimeState } from '../utils/initialization_utils'; import type { ControlGroupCreationOptions, ControlGroupRendererApi } from './types'; export interface ControlGroupRendererProps { diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx diff --git a/src/plugins/controls/public/react_controls/external_api/index.ts b/src/plugins/controls/public/control_group/control_group_renderer/index.ts similarity index 100% rename from src/plugins/controls/public/react_controls/external_api/index.ts rename to src/plugins/controls/public/control_group/control_group_renderer/index.ts diff --git a/src/plugins/controls/public/react_controls/external_api/types.ts b/src/plugins/controls/public/control_group/control_group_renderer/types.ts similarity index 100% rename from src/plugins/controls/public/react_controls/external_api/types.ts rename to src/plugins/controls/public/control_group/control_group_renderer/types.ts diff --git a/src/plugins/controls/public/react_controls/control_group/control_group_strings.tsx b/src/plugins/controls/public/control_group/control_group_strings.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/control_group_strings.tsx rename to src/plugins/controls/public/control_group/control_group_strings.tsx diff --git a/src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts b/src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts rename to src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts index d26812cdd0b8f..5f01410a85718 100644 --- a/src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts +++ b/src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts @@ -21,7 +21,7 @@ import { type StateComparators, } from '@kbn/presentation-publishing'; -import type { ControlGroupRuntimeState, ControlPanelsState } from '../../../common'; +import type { ControlGroupRuntimeState, ControlPanelsState } from '../../common'; import { apiPublishesAsyncFilters } from '../controls/data_controls/publishes_async_filters'; import { getControlsInOrder, type ControlsInOrder } from './init_controls_manager'; diff --git a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx b/src/plugins/controls/public/control_group/get_control_group_factory.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx rename to src/plugins/controls/public/control_group/get_control_group_factory.tsx index 77da1480eb494..62af1d1f868a9 100644 --- a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx +++ b/src/plugins/controls/public/control_group/get_control_group_factory.tsx @@ -32,9 +32,10 @@ import type { ControlLabelPosition, ControlPanelsState, ParentIgnoreSettings, -} from '../../../common'; -import { CONTROL_GROUP_TYPE, DEFAULT_CONTROL_LABEL_POSITION } from '../../../common'; +} from '../../common'; +import { CONTROL_GROUP_TYPE, DEFAULT_CONTROL_LABEL_POSITION } from '../../common'; import { openDataControlEditor } from '../controls/data_controls/open_data_control_editor'; +import { coreServices, dataViewsService } from '../services/kibana_services'; import { ControlGroup } from './components/control_group'; import { chaining$, controlFetch$, controlGroupFetch$ } from './control_fetch'; import { initializeControlGroupUnsavedChanges } from './control_group_unsaved_changes_api'; @@ -43,7 +44,6 @@ import { openEditControlGroupFlyout } from './open_edit_control_group_flyout'; import { initSelectionsManager } from './selections_manager'; import type { ControlGroupApi } from './types'; import { deserializeControlGroup } from './utils/serialization_utils'; -import { coreServices, dataViewsService } from '../../services/kibana_services'; const DEFAULT_CHAINING_SYSTEM = 'HIERARCHICAL'; diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts b/src/plugins/controls/public/control_group/init_controls_manager.test.ts similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts rename to src/plugins/controls/public/control_group/init_controls_manager.test.ts index 2137c502c2e64..29998325664bb 100644 --- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts +++ b/src/plugins/controls/public/control_group/init_controls_manager.test.ts @@ -8,13 +8,9 @@ */ import { BehaviorSubject } from 'rxjs'; +import type { ControlPanelState, ControlPanelsState, DefaultDataControlState } from '../../common'; import type { DefaultControlApi } from '../controls/types'; -import { initControlsManager, getLastUsedDataViewId } from './init_controls_manager'; -import type { - ControlPanelState, - DefaultDataControlState, - ControlPanelsState, -} from '../../../common'; +import { getLastUsedDataViewId, initControlsManager } from './init_controls_manager'; jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('delta'), diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts b/src/plugins/controls/public/control_group/init_controls_manager.ts similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts rename to src/plugins/controls/public/control_group/init_controls_manager.ts index 5b499f1924f1a..ee020bf1fbd59 100644 --- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts +++ b/src/plugins/controls/public/control_group/init_controls_manager.ts @@ -26,8 +26,8 @@ import type { ControlWidth, DefaultControlState, DefaultDataControlState, -} from '../../../common'; -import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../common'; +} from '../../common'; +import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../common'; import type { DefaultControlApi } from '../controls/types'; import type { ControlGroupComparatorState } from './control_group_unsaved_changes_api'; import type { ControlGroupApi } from './types'; diff --git a/src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx b/src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx rename to src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx index 5e7baf1f73e5d..54e35ab271b34 100644 --- a/src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx +++ b/src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx @@ -18,7 +18,7 @@ import { BehaviorSubject } from 'rxjs'; import { ControlStateManager } from '../controls/types'; import { ControlGroupEditor } from './components/control_group_editor'; import { ControlGroupApi, ControlGroupEditorState } from './types'; -import { coreServices } from '../../services/kibana_services'; +import { coreServices } from '../services/kibana_services'; export const openEditControlGroupFlyout = ( controlGroupApi: ControlGroupApi, diff --git a/src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts b/src/plugins/controls/public/control_group/register_control_group_embeddable.ts similarity index 87% rename from src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts rename to src/plugins/controls/public/control_group/register_control_group_embeddable.ts index a64faa63e8efc..f93458ab6bc4a 100644 --- a/src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts +++ b/src/plugins/controls/public/control_group/register_control_group_embeddable.ts @@ -8,8 +8,8 @@ */ import type { EmbeddableSetup } from '@kbn/embeddable-plugin/public'; -import { CONTROL_GROUP_TYPE } from '../../../common'; -import { untilPluginStartServicesReady } from '../../services/kibana_services'; +import { CONTROL_GROUP_TYPE } from '../../common'; +import { untilPluginStartServicesReady } from '../services/kibana_services'; export function registerControlGroupEmbeddable(embeddableSetup: EmbeddableSetup) { embeddableSetup.registerReactEmbeddableFactory(CONTROL_GROUP_TYPE, async () => { diff --git a/src/plugins/controls/public/react_controls/control_group/selections_manager.test.ts b/src/plugins/controls/public/control_group/selections_manager.test.ts similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/selections_manager.test.ts rename to src/plugins/controls/public/control_group/selections_manager.test.ts diff --git a/src/plugins/controls/public/react_controls/control_group/selections_manager.ts b/src/plugins/controls/public/control_group/selections_manager.ts similarity index 100% rename from src/plugins/controls/public/react_controls/control_group/selections_manager.ts rename to src/plugins/controls/public/control_group/selections_manager.ts diff --git a/src/plugins/controls/public/react_controls/control_group/types.ts b/src/plugins/controls/public/control_group/types.ts similarity index 99% rename from src/plugins/controls/public/react_controls/control_group/types.ts rename to src/plugins/controls/public/control_group/types.ts index 37f9f40c4079f..7a2bf74b5a27d 100644 --- a/src/plugins/controls/public/react_controls/control_group/types.ts +++ b/src/plugins/controls/public/control_group/types.ts @@ -38,7 +38,7 @@ import { ControlPanelState, DefaultControlState, ParentIgnoreSettings, -} from '../../../common'; +} from '../../common'; import { ControlFetchContext } from './control_fetch/control_fetch'; /** diff --git a/src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts b/src/plugins/controls/public/control_group/utils/control_group_state_builder.ts similarity index 95% rename from src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts rename to src/plugins/controls/public/control_group/utils/control_group_state_builder.ts index 1c051e58af46f..9c1dce024168e 100644 --- a/src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts +++ b/src/plugins/controls/public/control_group/utils/control_group_state_builder.ts @@ -16,9 +16,9 @@ import { type ControlGroupRuntimeState, type ControlPanelsState, type DefaultDataControlState, -} from '../../../../common'; -import type { OptionsListControlState } from '../../../../common/options_list'; -import { dataViewsService } from '../../../services/kibana_services'; +} from '../../../common'; +import type { OptionsListControlState } from '../../../common/options_list'; +import { dataViewsService } from '../../services/kibana_services'; import { getDataControlFieldRegistry } from '../../controls/data_controls/data_control_editor_utils'; import type { RangesliderControlState } from '../../controls/data_controls/range_slider/types'; diff --git a/src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts b/src/plugins/controls/public/control_group/utils/initialization_utils.ts similarity index 96% rename from src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts rename to src/plugins/controls/public/control_group/utils/initialization_utils.ts index ef81b4e30b361..ea785d05ac735 100644 --- a/src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts +++ b/src/plugins/controls/public/control_group/utils/initialization_utils.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { DEFAULT_CONTROL_LABEL_POSITION, type ControlGroupRuntimeState } from '../../../../common'; +import { DEFAULT_CONTROL_LABEL_POSITION, type ControlGroupRuntimeState } from '../../../common'; export const getDefaultControlGroupRuntimeState = (): ControlGroupRuntimeState => ({ initialChildControlState: {}, diff --git a/src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts b/src/plugins/controls/public/control_group/utils/serialization_utils.ts similarity index 98% rename from src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts rename to src/plugins/controls/public/control_group/utils/serialization_utils.ts index 4762d3aa9ce81..ad7dea5827507 100644 --- a/src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts +++ b/src/plugins/controls/public/control_group/utils/serialization_utils.ts @@ -10,7 +10,7 @@ import { omit } from 'lodash'; import { SerializedPanelState } from '@kbn/presentation-containers'; -import type { ControlGroupRuntimeState, ControlGroupSerializedState } from '../../../../common'; +import type { ControlGroupRuntimeState, ControlGroupSerializedState } from '../../../common'; import { parseReferenceName } from '../../controls/data_controls/reference_name_utils'; export const deserializeControlGroup = ( diff --git a/src/plugins/controls/public/react_controls/controls/constants.ts b/src/plugins/controls/public/controls/constants.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/constants.ts rename to src/plugins/controls/public/controls/constants.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx b/src/plugins/controls/public/controls/data_controls/data_control_constants.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx rename to src/plugins/controls/public/controls/data_controls/data_control_constants.tsx index 2c7f5a02b6b5a..6b06bd8a52439 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx +++ b/src/plugins/controls/public/controls/data_controls/data_control_constants.tsx @@ -8,7 +8,7 @@ */ import { i18n } from '@kbn/i18n'; -import { RANGE_SLIDER_CONTROL } from '../../../../common'; +import { RANGE_SLIDER_CONTROL } from '../../../common'; export const DataControlEditorStrings = { manageControl: { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx b/src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx rename to src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx index 8d8385d603fb3..23f9b053d23b2 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx @@ -20,8 +20,8 @@ import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH, type DefaultDataControlState, -} from '../../../../common'; -import { dataViewsService } from '../../../services/kibana_services'; +} from '../../../common'; +import { dataViewsService } from '../../services/kibana_services'; import { getAllControlTypes, getControlFactory } from '../../control_factory_registry'; import type { ControlGroupApi } from '../../control_group/types'; import type { ControlFactory } from '../types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx b/src/plugins/controls/public/controls/data_controls/data_control_editor.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx rename to src/plugins/controls/public/controls/data_controls/data_control_editor.tsx index 35e21ca3b407a..43d0f46324557 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx +++ b/src/plugins/controls/public/controls/data_controls/data_control_editor.tsx @@ -44,8 +44,8 @@ import { DEFAULT_CONTROL_WIDTH, type ControlWidth, type DefaultDataControlState, -} from '../../../../common'; -import { dataViewsService } from '../../../services/kibana_services'; +} from '../../../common'; +import { dataViewsService } from '../../services/kibana_services'; import { getAllControlTypes, getControlFactory } from '../../control_factory_registry'; import type { ControlGroupApi } from '../../control_group/types'; import { DataControlEditorStrings } from './data_control_constants'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor_utils.ts b/src/plugins/controls/public/controls/data_controls/data_control_editor_utils.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor_utils.ts rename to src/plugins/controls/public/controls/data_controls/data_control_editor_utils.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/editor_constants.ts b/src/plugins/controls/public/controls/data_controls/editor_constants.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/editor_constants.ts rename to src/plugins/controls/public/controls/data_controls/editor_constants.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx b/src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx rename to src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx index d189d0aaa1ae9..c3c4dd0d6da77 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx @@ -9,7 +9,7 @@ import type { DataView } from '@kbn/data-views-plugin/public'; import { first, skip } from 'rxjs'; -import { dataViewsService } from '../../../services/kibana_services'; +import { dataViewsService } from '../../services/kibana_services'; import { ControlGroupApi } from '../../control_group/types'; import { initializeDataControl } from './initialize_data_control'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts b/src/plugins/controls/public/controls/data_controls/initialize_data_control.ts similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts rename to src/plugins/controls/public/controls/data_controls/initialize_data_control.ts index 11fb453d56350..71cb6cfb78245 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts +++ b/src/plugins/controls/public/controls/data_controls/initialize_data_control.ts @@ -20,8 +20,8 @@ import { SerializedPanelState } from '@kbn/presentation-containers'; import { StateComparators } from '@kbn/presentation-publishing'; import { i18n } from '@kbn/i18n'; -import type { DefaultControlState, DefaultDataControlState } from '../../../../common'; -import { dataViewsService } from '../../../services/kibana_services'; +import type { DefaultControlState, DefaultDataControlState } from '../../../common'; +import { dataViewsService } from '../../services/kibana_services'; import type { ControlGroupApi } from '../../control_group/types'; import { initializeDefaultControlApi } from '../initialize_default_control_api'; import type { ControlApiInitialization, ControlStateManager } from '../types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx b/src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx rename to src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx index 9abf7f6c67c87..ade12fda012d6 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx +++ b/src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx @@ -18,7 +18,7 @@ import type { OptionsListSelection, OptionsListSortingType, OptionsListSuggestions, -} from '../../../../../common/options_list'; +} from '../../../../common/options_list'; export const getOptionsListMocks = () => { const selectedOptions$ = new BehaviorSubject(undefined); diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/factory_mocks.tsx b/src/plugins/controls/public/controls/data_controls/mocks/factory_mocks.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/mocks/factory_mocks.tsx rename to src/plugins/controls/public/controls/data_controls/mocks/factory_mocks.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx b/src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx similarity index 96% rename from src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx rename to src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx index 08118702a003e..1c1be2e121a17 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx +++ b/src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx @@ -16,8 +16,8 @@ import { tracksOverlays } from '@kbn/presentation-containers'; import { apiHasParentApi } from '@kbn/presentation-publishing'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import type { DefaultDataControlState } from '../../../../common'; -import { coreServices } from '../../../services/kibana_services'; +import type { DefaultDataControlState } from '../../../common'; +import { coreServices } from '../../services/kibana_services'; import type { ControlGroupApi } from '../../control_group/types'; import { DataControlEditor } from './data_control_editor'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list.scss b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list.scss similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list.scss rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list.scss diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.test.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.test.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.test.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx index b82258cb510c4..da9aa000dcef0 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx @@ -25,7 +25,7 @@ import { useBatchedPublishingSubjects, } from '@kbn/presentation-publishing'; -import { OptionsListSelection } from '../../../../../../common/options_list/options_list_selections'; +import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; import { MIN_POPOVER_WIDTH } from '../../../constants'; import { useOptionsListContext } from '../options_list_context_provider'; import { OptionsListPopover } from './options_list_popover'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx index e7660ff2ec9b6..079a857f7c090 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx @@ -14,8 +14,8 @@ import { DataViewField } from '@kbn/data-views-plugin/common'; import { act, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import type { DefaultDataControlState } from '../../../../../../common'; -import type { OptionsListControlState } from '../../../../../../common/options_list'; +import type { DefaultDataControlState } from '../../../../../common'; +import type { OptionsListControlState } from '../../../../../common/options_list'; import type { ControlGroupApi } from '../../../../control_group/types'; import { getMockedControlGroupApi } from '../../../mocks/control_mocks'; import type { CustomOptionsComponentProps } from '../../types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx index 27f12e6d0f2e8..e9dad12be5623 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx @@ -15,8 +15,8 @@ import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; import type { OptionsListControlState, OptionsListSearchTechnique, -} from '../../../../../../common/options_list'; -import { getCompatibleSearchTechniques } from '../../../../../../common/options_list/suggestions_searching'; +} from '../../../../../common/options_list'; +import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching'; import { ControlSettingTooltipLabel } from '../../../../control_group/components/control_setting_tooltip_label'; import { CustomOptionsComponentProps } from '../../types'; import { DEFAULT_SEARCH_TECHNIQUE } from '../constants'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx index 1f18e229bef3b..0cf3ca5b7da23 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx @@ -14,7 +14,7 @@ import { DataViewField } from '@kbn/data-views-plugin/common'; import { act, render, RenderResult, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import type { OptionsListDisplaySettings } from '../../../../../../common/options_list'; +import type { OptionsListDisplaySettings } from '../../../../../common/options_list'; import { getOptionsListMocks } from '../../mocks/api_mocks'; import { ContextStateManager, OptionsListControlContext } from '../options_list_context_provider'; import type { OptionsListComponentApi } from '../types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx index d9502e781ab06..ccf0ce857b783 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; -import { getCompatibleSearchTechniques } from '../../../../../../common/options_list/suggestions_searching'; +import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching'; import { useOptionsListContext } from '../options_list_context_provider'; import { OptionsListPopoverSortingButton } from './options_list_popover_sorting_button'; import { OptionsListStrings } from '../options_list_strings'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx index a48df361e50e4..5a82614e77df9 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx @@ -28,7 +28,7 @@ import { getCompatibleSortingTypes, OptionsListSortBy, OPTIONS_LIST_DEFAULT_SORT, -} from '../../../../../../common/options_list/suggestions_sorting'; +} from '../../../../../common/options_list/suggestions_sorting'; import { useOptionsListContext } from '../options_list_context_provider'; import { OptionsListStrings } from '../options_list_strings'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx index 8883ac43b6e41..9372c2a091de3 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx @@ -14,8 +14,8 @@ import { EuiSelectableOption } from '@elastic/eui/src/components/selectable/sele import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { euiThemeVars } from '@kbn/ui-theme'; -import { OptionsListSuggestions } from '../../../../../../common/options_list/types'; -import { OptionsListSelection } from '../../../../../../common/options_list/options_list_selections'; +import { OptionsListSuggestions } from '../../../../../common/options_list/types'; +import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; import { MAX_OPTIONS_LIST_REQUEST_SIZE } from '../constants'; import { useOptionsListContext } from '../options_list_context_provider'; import { OptionsListStrings } from '../options_list_strings'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts similarity index 94% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts index 0d4a92b6734a9..87415dff252b0 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts @@ -10,7 +10,7 @@ import type { OptionsListSortingType, OptionsListSearchTechnique, -} from '../../../../../common/options_list'; +} from '../../../../common/options_list'; export const DEFAULT_SEARCH_TECHNIQUE: OptionsListSearchTechnique = 'prefix'; export const OPTIONS_LIST_DEFAULT_SORT: OptionsListSortingType = { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx similarity index 94% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx index 2e2cd341e8704..ca71fc46a72c1 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx @@ -21,9 +21,9 @@ import { import { PublishingSubject } from '@kbn/presentation-publishing'; import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; -import { OptionsListSuccessResponse } from '../../../../../common/options_list/types'; -import { isValidSearch } from '../../../../../common/options_list/is_valid_search'; -import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; +import { OptionsListSuccessResponse } from '../../../../common/options_list/types'; +import { isValidSearch } from '../../../../common/options_list/is_valid_search'; +import { OptionsListSelection } from '../../../../common/options_list/options_list_selections'; import { ControlFetchContext } from '../../../control_group/control_fetch'; import { ControlStateManager } from '../../types'; import { OptionsListFetchCache } from './options_list_fetch_cache'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx index 20911d1cdb872..20aad3e260983 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx @@ -14,7 +14,7 @@ import { createStubDataView } from '@kbn/data-views-plugin/common/data_view.stub import { act, render, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { coreServices, dataViewsService } from '../../../../services/kibana_services'; +import { coreServices, dataViewsService } from '../../../services/kibana_services'; import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks'; import { getOptionsListControlFactory } from './get_options_list_control_factory'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx index 2a23ac9341ab9..de4811f0220d6 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx @@ -14,7 +14,7 @@ import { BehaviorSubject, combineLatest, debounceTime, filter, map, skip } from import { buildExistsFilter, buildPhraseFilter, buildPhrasesFilter, Filter } from '@kbn/es-query'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; -import { OPTIONS_LIST_CONTROL } from '../../../../../common'; +import { OPTIONS_LIST_CONTROL } from '../../../../common'; import type { OptionsListControlState, OptionsListSearchTechnique, @@ -22,8 +22,8 @@ import type { OptionsListSortingType, OptionsListSuccessResponse, OptionsListSuggestions, -} from '../../../../../common/options_list'; -import { getSelectionAsFieldType, isValidSearch } from '../../../../../common/options_list'; +} from '../../../../common/options_list'; +import { getSelectionAsFieldType, isValidSearch } from '../../../../common/options_list'; import { initializeDataControl } from '../initialize_data_control'; import type { DataControlFactory } from '../types'; import { OptionsListControl } from './components/options_list_control'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx similarity index 97% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx index d0acec2f0d683..b594b21116cf2 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx @@ -14,7 +14,7 @@ import { PublishingSubject } from '@kbn/presentation-publishing'; import type { OptionsListDisplaySettings, OptionsListSelection, -} from '../../../../../common/options_list'; +} from '../../../../common/options_list'; import type { ControlStateManager } from '../../types'; import type { OptionsListComponentApi, OptionsListComponentState } from './types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts similarity index 93% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts index d766b564d0212..94d46c1d59a84 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts @@ -12,8 +12,8 @@ import { BehaviorSubject } from 'rxjs'; import { PublishingSubject, StateComparators } from '@kbn/presentation-publishing'; -import { OptionsListControlState } from '../../../../../common/options_list'; -import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; +import { OptionsListControlState } from '../../../../common/options_list'; +import { OptionsListSelection } from '../../../../common/options_list/options_list_selections'; export function initializeOptionsListSelections( initialState: OptionsListControlState, diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts similarity index 96% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts index 60b1463118733..55d613e0afc19 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts @@ -19,8 +19,8 @@ import type { OptionsListRequest, OptionsListResponse, OptionsListSuccessResponse, -} from '../../../../../common/options_list/types'; -import { coreServices, dataService } from '../../../../services/kibana_services'; +} from '../../../../common/options_list/types'; +import { coreServices, dataService } from '../../../services/kibana_services'; const REQUEST_CACHE_SIZE = 50; // only store a max of 50 responses const REQUEST_CACHE_TTL = 1000 * 60; // time to live = 1 minute diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts index eef121b8b3574..b910b217063e6 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts @@ -8,7 +8,7 @@ */ import { i18n } from '@kbn/i18n'; -import { OptionsListSearchTechnique } from '../../../../../common/options_list/suggestions_searching'; +import { OptionsListSearchTechnique } from '../../../../common/options_list/suggestions_searching'; export const OptionsListStrings = { control: { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts similarity index 85% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts index b58189a75daca..45f430598fa50 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts @@ -7,8 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { OPTIONS_LIST_CONTROL } from '../../../../../common'; -import { untilPluginStartServicesReady } from '../../../../services/kibana_services'; +import { OPTIONS_LIST_CONTROL } from '../../../../common'; +import { untilPluginStartServicesReady } from '../../../services/kibana_services'; import { registerControlFactory } from '../../../control_factory_registry'; export function registerOptionsListControl() { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/types.ts similarity index 97% rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts rename to src/plugins/controls/public/controls/data_controls/options_list_control/types.ts index 1d34c082eb8a6..3cdb79f78a98d 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts +++ b/src/plugins/controls/public/controls/data_controls/options_list_control/types.ts @@ -15,7 +15,7 @@ import type { OptionsListDisplaySettings, OptionsListSelection, OptionsListSuggestions, -} from '../../../../../common/options_list'; +} from '../../../../common/options_list'; import type { DataControlApi } from '../types'; export type OptionsListControlApi = DataControlApi; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/publishes_async_filters.ts b/src/plugins/controls/public/controls/data_controls/publishes_async_filters.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/publishes_async_filters.ts rename to src/plugins/controls/public/controls/data_controls/publishes_async_filters.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider.styles.ts b/src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider.styles.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider.styles.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider.styles.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider_control.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider_control.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider_control.tsx rename to src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider_control.tsx diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx rename to src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx index 925ec3443849a..03ebe50969d05 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx +++ b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx @@ -15,7 +15,7 @@ import { DataViewField } from '@kbn/data-views-plugin/common'; import { SerializedPanelState } from '@kbn/presentation-containers'; import { fireEvent, render, waitFor } from '@testing-library/react'; -import { dataService, dataViewsService } from '../../../../services/kibana_services'; +import { dataService, dataViewsService } from '../../../services/kibana_services'; import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks'; import { getRangesliderControlFactory } from './get_range_slider_control_factory'; import { RangesliderControlState } from './types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx rename to src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx index 3ad3b97af7414..0605fe4586abb 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx +++ b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx @@ -14,7 +14,7 @@ import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; import { Filter, RangeFilterParams, buildRangeFilter } from '@kbn/es-query'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; -import { RANGE_SLIDER_CONTROL } from '../../../../../common'; +import { RANGE_SLIDER_CONTROL } from '../../../../common'; import { initializeDataControl } from '../initialize_data_control'; import type { DataControlFactory } from '../types'; import { RangeSliderControl } from './components/range_slider_control'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts b/src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts index 24d4510b3fc22..5b5cfd33788cb 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts +++ b/src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts @@ -12,7 +12,7 @@ import { DataView } from '@kbn/data-views-plugin/public'; import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import { PublishesDataViews } from '@kbn/presentation-publishing'; import { Observable, combineLatest, lastValueFrom, switchMap, tap } from 'rxjs'; -import { dataService } from '../../../../services/kibana_services'; +import { dataService } from '../../../services/kibana_services'; import { ControlFetchContext } from '../../../control_group/control_fetch'; import { ControlGroupApi } from '../../../control_group/types'; import { DataControlApi } from '../types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts b/src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts similarity index 98% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts index 8e4d5e00374af..f118e2da24c9b 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts +++ b/src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts @@ -13,7 +13,7 @@ import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import { PublishesDataViews, PublishingSubject } from '@kbn/presentation-publishing'; import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { Observable, combineLatest, lastValueFrom, of, startWith, switchMap, tap } from 'rxjs'; -import { dataService } from '../../../../services/kibana_services'; +import { dataService } from '../../../services/kibana_services'; import { ControlFetchContext } from '../../../control_group/control_fetch'; import { ControlGroupApi } from '../../../control_group/types'; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_control_selections.ts b/src/plugins/controls/public/controls/data_controls/range_slider/range_control_selections.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_control_selections.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/range_control_selections.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_slider_strings.ts b/src/plugins/controls/public/controls/data_controls/range_slider/range_slider_strings.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_slider_strings.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/range_slider_strings.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts b/src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts similarity index 85% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts index 0e1c0fd925792..9f7af0ccae2c3 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts +++ b/src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts @@ -7,8 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { RANGE_SLIDER_CONTROL } from '../../../../../common'; -import { untilPluginStartServicesReady } from '../../../../services/kibana_services'; +import { RANGE_SLIDER_CONTROL } from '../../../../common'; +import { untilPluginStartServicesReady } from '../../../services/kibana_services'; import { registerControlFactory } from '../../../control_factory_registry'; export function registerRangeSliderControl() { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts b/src/plugins/controls/public/controls/data_controls/range_slider/types.ts similarity index 91% rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts rename to src/plugins/controls/public/controls/data_controls/range_slider/types.ts index 459220a9dd166..bbbf75e5730b5 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts +++ b/src/plugins/controls/public/controls/data_controls/range_slider/types.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { DefaultDataControlState } from '../../../../../common'; +import type { DefaultDataControlState } from '../../../../common'; import type { DataControlApi } from '../types'; export type RangeValue = [string, string]; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/reference_name_utils.ts b/src/plugins/controls/public/controls/data_controls/reference_name_utils.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/data_controls/reference_name_utils.ts rename to src/plugins/controls/public/controls/data_controls/reference_name_utils.ts diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts b/src/plugins/controls/public/controls/data_controls/types.ts similarity index 97% rename from src/plugins/controls/public/react_controls/controls/data_controls/types.ts rename to src/plugins/controls/public/controls/data_controls/types.ts index 89912e6eabb03..24eb9e73fb49e 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts +++ b/src/plugins/controls/public/controls/data_controls/types.ts @@ -16,7 +16,7 @@ import { PublishingSubject, } from '@kbn/presentation-publishing'; -import { DefaultDataControlState } from '../../../../common'; +import { DefaultDataControlState } from '../../../common'; import { ControlGroupApi } from '../../control_group/types'; import { ControlFactory, DefaultControlApi } from '../types'; import { PublishesAsyncFilters } from './publishes_async_filters'; diff --git a/src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx b/src/plugins/controls/public/controls/initialize_default_control_api.tsx similarity index 96% rename from src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx rename to src/plugins/controls/public/controls/initialize_default_control_api.tsx index 558595a877f64..06d7f3e4028f5 100644 --- a/src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx +++ b/src/plugins/controls/public/controls/initialize_default_control_api.tsx @@ -12,7 +12,7 @@ import { BehaviorSubject } from 'rxjs'; import { SerializedPanelState } from '@kbn/presentation-containers'; import { StateComparators } from '@kbn/presentation-publishing'; -import type { ControlWidth, DefaultControlState } from '../../../common'; +import type { ControlWidth, DefaultControlState } from '../../common'; import type { ControlApiInitialization, ControlStateManager, DefaultControlApi } from './types'; export type ControlApi = ControlApiInitialization; diff --git a/src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts b/src/plugins/controls/public/controls/mocks/control_mocks.ts similarity index 97% rename from src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts rename to src/plugins/controls/public/controls/mocks/control_mocks.ts index 5e3156e5d732b..e71ecb12e030b 100644 --- a/src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts +++ b/src/plugins/controls/public/controls/mocks/control_mocks.ts @@ -11,7 +11,7 @@ import { BehaviorSubject } from 'rxjs'; import { StateComparators } from '@kbn/presentation-publishing'; -import { CONTROL_GROUP_TYPE } from '../../../../common'; +import { CONTROL_GROUP_TYPE } from '../../../common'; import type { ControlFetchContext } from '../../control_group/control_fetch/control_fetch'; import type { ControlGroupApi } from '../../control_group/types'; import type { ControlApiRegistration, ControlFactory, DefaultControlApi } from '../types'; diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/index.scss b/src/plugins/controls/public/controls/timeslider_control/components/index.scss similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/index.scss rename to src/plugins/controls/public/controls/timeslider_control/components/index.scss diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/play_button.tsx b/src/plugins/controls/public/controls/timeslider_control/components/play_button.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/play_button.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/play_button.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_anchored_range.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_anchored_range.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_anchored_range.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_anchored_range.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_button.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_button.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_button.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_button.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_content.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_content.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_content.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_content.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_prepend.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_prepend.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_prepend.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_prepend.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_sliding_window_range.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_sliding_window_range.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_sliding_window_range.tsx rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_sliding_window_range.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_strings.ts b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_strings.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_strings.ts rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_strings.ts diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts b/src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts similarity index 96% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts rename to src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts index 5c84cfbdef508..a9fe07c9bf3b9 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts +++ b/src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts @@ -9,7 +9,7 @@ import { EuiRangeTick } from '@elastic/eui'; import { TimeRange } from '@kbn/es-query'; -import { coreServices, dataService } from '../../../services/kibana_services'; +import { coreServices, dataService } from '../../services/kibana_services'; import { FROM_INDEX, getStepSize, diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx rename to src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx index d4b8ff6c13461..a49f1489d31d1 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx +++ b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx @@ -15,7 +15,7 @@ import { TimeRange } from '@kbn/es-query'; import { StateComparators } from '@kbn/presentation-publishing'; import { fireEvent, render } from '@testing-library/react'; -import { dataService } from '../../../services/kibana_services'; +import { dataService } from '../../services/kibana_services'; import { getMockedControlGroupApi } from '../mocks/control_mocks'; import { ControlApiRegistration } from '../types'; import { getTimesliderControlFactory } from './get_timeslider_control_factory'; diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx similarity index 99% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx rename to src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx index cfc8e50bee1b5..b7d5b6f077080 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx +++ b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx @@ -21,7 +21,7 @@ import { useBatchedPublishingSubjects, } from '@kbn/presentation-publishing'; -import { TIME_SLIDER_CONTROL } from '../../../../common'; +import { TIME_SLIDER_CONTROL } from '../../../common'; import { initializeDefaultControlApi } from '../initialize_default_control_api'; import { ControlFactory } from '../types'; import './components/index.scss'; diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_percentage.ts b/src/plugins/controls/public/controls/timeslider_control/init_time_range_percentage.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_percentage.ts rename to src/plugins/controls/public/controls/timeslider_control/init_time_range_percentage.ts diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_subscription.ts b/src/plugins/controls/public/controls/timeslider_control/init_time_range_subscription.ts similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_subscription.ts rename to src/plugins/controls/public/controls/timeslider_control/init_time_range_subscription.ts diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts b/src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts similarity index 85% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts rename to src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts index 338a52631c931..93f30fe4b07d3 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts +++ b/src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts @@ -7,8 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { TIME_SLIDER_CONTROL } from '../../../../common'; -import { untilPluginStartServicesReady } from '../../../services/kibana_services'; +import { TIME_SLIDER_CONTROL } from '../../../common'; +import { untilPluginStartServicesReady } from '../../services/kibana_services'; import { registerControlFactory } from '../../control_factory_registry'; export function registerTimeSliderControl() { diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/time_utils.tsx b/src/plugins/controls/public/controls/timeslider_control/time_utils.tsx similarity index 100% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/time_utils.tsx rename to src/plugins/controls/public/controls/timeslider_control/time_utils.tsx diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts b/src/plugins/controls/public/controls/timeslider_control/types.ts similarity index 94% rename from src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts rename to src/plugins/controls/public/controls/timeslider_control/types.ts index 634e0351e77eb..48c7a5a76469c 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts +++ b/src/plugins/controls/public/controls/timeslider_control/types.ts @@ -8,7 +8,7 @@ */ import type { PublishesPanelTitle, PublishesTimeslice } from '@kbn/presentation-publishing'; -import type { DefaultControlState } from '../../../../common'; +import type { DefaultControlState } from '../../../common'; import type { DefaultControlApi } from '../types'; export type Timeslice = [number, number]; diff --git a/src/plugins/controls/public/react_controls/controls/types.ts b/src/plugins/controls/public/controls/types.ts similarity index 96% rename from src/plugins/controls/public/react_controls/controls/types.ts rename to src/plugins/controls/public/controls/types.ts index ce4ad9f194fa3..e79c20c99f150 100644 --- a/src/plugins/controls/public/react_controls/controls/types.ts +++ b/src/plugins/controls/public/controls/types.ts @@ -24,9 +24,9 @@ import { StateComparators, } from '@kbn/presentation-publishing'; -import { ControlWidth, DefaultControlState } from '../../../common/types'; +import { ControlWidth, DefaultControlState } from '../../common/types'; import { ControlGroupApi } from '../control_group/types'; -import { CanClearSelections } from '../../types'; +import { CanClearSelections } from '../types'; export interface HasCustomPrepend { CustomPrependComponent: React.FC<{}>; diff --git a/src/plugins/controls/public/index.ts b/src/plugins/controls/public/index.ts index 6c7a548cb091d..eaa800387759b 100644 --- a/src/plugins/controls/public/index.ts +++ b/src/plugins/controls/public/index.ts @@ -12,23 +12,20 @@ import { ControlsPlugin } from './plugin'; export { controlGroupStateBuilder, type ControlGroupStateBuilder, -} from './react_controls/control_group/utils/control_group_state_builder'; +} from './control_group/utils/control_group_state_builder'; -export type { ControlGroupApi, ControlStateTransform } from './react_controls/control_group/types'; +export type { ControlGroupApi, ControlStateTransform } from './control_group/types'; export { ACTION_CLEAR_CONTROL, ACTION_DELETE_CONTROL, ACTION_EDIT_CONTROL } from './actions'; -export type { - DataControlApi, - DataControlFactory, -} from './react_controls/controls/data_controls/types'; +export type { DataControlApi, DataControlFactory } from './controls/data_controls/types'; export { ControlGroupRenderer, type ControlGroupCreationOptions, type ControlGroupRendererApi, type ControlGroupRendererProps, -} from './react_controls/external_api'; +} from './control_group/control_group_renderer'; export { CONTROL_GROUP_TYPE, diff --git a/src/plugins/controls/public/plugin.ts b/src/plugins/controls/public/plugin.ts index c6e1a2873b169..3e915e958d111 100644 --- a/src/plugins/controls/public/plugin.ts +++ b/src/plugins/controls/public/plugin.ts @@ -13,10 +13,10 @@ import { PANEL_HOVER_TRIGGER } from '@kbn/embeddable-plugin/public'; import { ClearControlAction } from './actions/clear_control_action'; import { DeleteControlAction } from './actions/delete_control_action'; import { EditControlAction } from './actions/edit_control_action'; -import { registerControlGroupEmbeddable } from './react_controls/control_group/register_control_group_embeddable'; -import { registerOptionsListControl } from './react_controls/controls/data_controls/options_list_control/register_options_list_control'; -import { registerRangeSliderControl } from './react_controls/controls/data_controls/range_slider/register_range_slider_control'; -import { registerTimeSliderControl } from './react_controls/controls/timeslider_control/register_timeslider_control'; +import { registerControlGroupEmbeddable } from './control_group/register_control_group_embeddable'; +import { registerOptionsListControl } from './controls/data_controls/options_list_control/register_options_list_control'; +import { registerRangeSliderControl } from './controls/data_controls/range_slider/register_range_slider_control'; +import { registerTimeSliderControl } from './controls/timeslider_control/register_timeslider_control'; import { setKibanaServices, untilPluginStartServicesReady } from './services/kibana_services'; import type { ControlsPluginSetupDeps, ControlsPluginStartDeps } from './types'; diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts index 1659d3673e43d..3a18acd242e4f 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts @@ -11,8 +11,6 @@ import { Filter } from '@kbn/es-query'; import { combineDashboardFiltersWithControlGroupFilters } from './dashboard_control_group_integration'; import { BehaviorSubject } from 'rxjs'; -jest.mock('@kbn/controls-plugin/public/react_controls/control_group/get_control_group_factory'); - const testFilter1: Filter = { meta: { key: 'testfield',