diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 648937c9fed39..7590c3ecf4188 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -630,6 +630,7 @@ src/platform/plugins/shared/expression_reveal_image @elastic/kibana-presentation src/platform/plugins/shared/expression_shape @elastic/kibana-presentation src/platform/plugins/shared/inspector @elastic/kibana-presentation src/platform/plugins/shared/management @elastic/kibana-management +src/platform/plugins/shared/presentation_util @elastic/kibana-presentation src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management src/plugins/chart_expressions/common @elastic/kibana-visualizations src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations @@ -667,7 +668,6 @@ src/plugins/kibana_utils @elastic/appex-sharedux src/plugins/navigation @elastic/appex-sharedux src/plugins/newsfeed @elastic/kibana-core src/plugins/no_data_page @elastic/appex-sharedux -src/plugins/presentation_util @elastic/kibana-presentation src/plugins/saved_objects @elastic/appex-sharedux src/plugins/saved_objects_finder @elastic/kibana-data-discovery src/plugins/saved_objects_management @elastic/kibana-core diff --git a/.i18nrc.json b/.i18nrc.json index 3f17af9d7901d..a7aa52c26dc11 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -98,7 +98,7 @@ "navigation": ["src/plugins/navigation", "packages/solution-nav"], "links": "src/platform/plugins/private/links", "newsfeed": "src/plugins/newsfeed", - "presentationUtil": "src/plugins/presentation_util", + "presentationUtil": "src/platform/plugins/shared/presentation_util", "randomSampling": "x-pack/packages/kbn-random-sampling", "reactPackages": "packages/react", "esqlEditor": "src/platform/packages/private/kbn-esql-editor", diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 75936d1fcf933..77be8634424ef 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -282,7 +282,7 @@ Content is fetched from the remote (https://feeds.elastic.co) once a day, with p |The Presentation Panel is the point of contact between any React component and any registered UI actions. Components provided to the Presentation Panel should use an imperative handle to expose methods and state. -|{kib-repo}blob/{branch}/src/plugins/presentation_util/README.mdx[presentationUtil] +|{kib-repo}blob/{branch}/src/platform/plugins/shared/presentation_util/README.mdx[presentationUtil] |The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). diff --git a/package.json b/package.json index 6007eba44bd0d..f1a326bf84655 100644 --- a/package.json +++ b/package.json @@ -725,7 +725,7 @@ "@kbn/presentation-containers": "link:src/platform/packages/shared/presentation/presentation_containers", "@kbn/presentation-panel-plugin": "link:src/platform/plugins/private/presentation_panel", "@kbn/presentation-publishing": "link:src/platform/packages/shared/presentation/presentation_publishing", - "@kbn/presentation-util-plugin": "link:src/plugins/presentation_util", + "@kbn/presentation-util-plugin": "link:src/platform/plugins/shared/presentation_util", "@kbn/product-doc-base-plugin": "link:x-pack/platform/plugins/shared/ai_infra/product_doc_base", "@kbn/product-doc-common": "link:x-pack/platform/packages/shared/ai-infra/product-doc-common", "@kbn/profiling-data-access-plugin": "link:x-pack/plugins/observability_solution/profiling_data_access", diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 84410aabb5e7d..42b0dff2046ee 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -61,7 +61,7 @@ export const storybookAliases = { observability_inventory: 'x-pack/plugins/observability_solution/inventory/.storybook', observability_shared: 'x-pack/plugins/observability_solution/observability_shared/.storybook', observability_slo: 'x-pack/solutions/observability/plugins/slo/.storybook', - presentation: 'src/plugins/presentation_util/storybook', + presentation: 'src/platform/plugins/shared/presentation_util/storybook', random_sampling: 'x-pack/packages/kbn-random-sampling/.storybook', esql_editor: 'src/platform/packages/private/kbn-esql-editor/.storybook', security_solution: 'x-pack/solutions/security/plugins/security_solution/.storybook', diff --git a/src/plugins/presentation_util/README.mdx b/src/platform/plugins/shared/presentation_util/README.mdx similarity index 100% rename from src/plugins/presentation_util/README.mdx rename to src/platform/plugins/shared/presentation_util/README.mdx diff --git a/src/plugins/presentation_util/common/index.ts b/src/platform/plugins/shared/presentation_util/common/index.ts similarity index 100% rename from src/plugins/presentation_util/common/index.ts rename to src/platform/plugins/shared/presentation_util/common/index.ts diff --git a/src/plugins/presentation_util/common/labs.ts b/src/platform/plugins/shared/presentation_util/common/labs.ts similarity index 100% rename from src/plugins/presentation_util/common/labs.ts rename to src/platform/plugins/shared/presentation_util/common/labs.ts diff --git a/src/plugins/presentation_util/common/lib/index.ts b/src/platform/plugins/shared/presentation_util/common/lib/index.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/index.ts rename to src/platform/plugins/shared/presentation_util/common/lib/index.ts diff --git a/src/plugins/presentation_util/common/lib/utils/dataurl.test.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/dataurl.test.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/dataurl.test.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/dataurl.test.ts diff --git a/src/plugins/presentation_util/common/lib/utils/dataurl.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/dataurl.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/dataurl.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/dataurl.ts diff --git a/src/plugins/presentation_util/common/lib/utils/elastic_logo.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/elastic_logo.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/elastic_logo.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/elastic_logo.ts diff --git a/src/plugins/presentation_util/common/lib/utils/elastic_outline.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/elastic_outline.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/elastic_outline.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/elastic_outline.ts diff --git a/src/plugins/presentation_util/common/lib/utils/httpurl.test.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/httpurl.test.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/httpurl.test.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/httpurl.test.ts diff --git a/src/plugins/presentation_util/common/lib/utils/httpurl.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/httpurl.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/httpurl.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/httpurl.ts diff --git a/src/plugins/presentation_util/common/lib/utils/index.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/index.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/index.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/index.ts diff --git a/src/plugins/presentation_util/common/lib/utils/missing_asset.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/missing_asset.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/missing_asset.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/missing_asset.ts diff --git a/src/plugins/presentation_util/common/lib/utils/resolve_dataurl.test.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/resolve_dataurl.test.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/resolve_dataurl.test.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/resolve_dataurl.test.ts diff --git a/src/plugins/presentation_util/common/lib/utils/resolve_dataurl.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/resolve_dataurl.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/resolve_dataurl.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/resolve_dataurl.ts diff --git a/src/plugins/presentation_util/common/lib/utils/url.test.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/url.test.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/url.test.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/url.test.ts diff --git a/src/plugins/presentation_util/common/lib/utils/url.ts b/src/platform/plugins/shared/presentation_util/common/lib/utils/url.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/utils/url.ts rename to src/platform/plugins/shared/presentation_util/common/lib/utils/url.ts diff --git a/src/plugins/presentation_util/jest.config.js b/src/platform/plugins/shared/presentation_util/jest.config.js similarity index 72% rename from src/plugins/presentation_util/jest.config.js rename to src/platform/plugins/shared/presentation_util/jest.config.js index 5c94c3289bf82..9b40440271ad0 100644 --- a/src/plugins/presentation_util/jest.config.js +++ b/src/platform/plugins/shared/presentation_util/jest.config.js @@ -9,11 +9,11 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/src/plugins/presentation_util'], - coverageDirectory: '/target/kibana-coverage/jest/src/plugins/presentation_util', + rootDir: '../../../../..', + roots: ['/src/platform/plugins/shared/presentation_util'], + coverageDirectory: '/target/kibana-coverage/jest/src/platform/plugins/shared/presentation_util', coverageReporters: ['text', 'html'], collectCoverageFrom: [ - '/src/plugins/presentation_util/{common,public,server}/**/*.{ts,tsx}', + '/src/platform/plugins/shared/presentation_util/{common,public,server}/**/*.{ts,tsx}', ], }; diff --git a/src/plugins/presentation_util/kibana.jsonc b/src/platform/plugins/shared/presentation_util/kibana.jsonc similarity index 100% rename from src/plugins/presentation_util/kibana.jsonc rename to src/platform/plugins/shared/presentation_util/kibana.jsonc diff --git a/src/plugins/presentation_util/public/__stories__/fixtures/flights.ts b/src/platform/plugins/shared/presentation_util/public/__stories__/fixtures/flights.ts similarity index 100% rename from src/plugins/presentation_util/public/__stories__/fixtures/flights.ts rename to src/platform/plugins/shared/presentation_util/public/__stories__/fixtures/flights.ts diff --git a/src/plugins/presentation_util/public/__stories__/fixtures/flights_data.ts b/src/platform/plugins/shared/presentation_util/public/__stories__/fixtures/flights_data.ts similarity index 100% rename from src/plugins/presentation_util/public/__stories__/fixtures/flights_data.ts rename to src/platform/plugins/shared/presentation_util/public/__stories__/fixtures/flights_data.ts diff --git a/src/plugins/presentation_util/public/__stories__/index.tsx b/src/platform/plugins/shared/presentation_util/public/__stories__/index.tsx similarity index 100% rename from src/plugins/presentation_util/public/__stories__/index.tsx rename to src/platform/plugins/shared/presentation_util/public/__stories__/index.tsx diff --git a/src/plugins/presentation_util/public/__stories__/render.tsx b/src/platform/plugins/shared/presentation_util/public/__stories__/render.tsx similarity index 100% rename from src/plugins/presentation_util/public/__stories__/render.tsx rename to src/platform/plugins/shared/presentation_util/public/__stories__/render.tsx diff --git a/src/plugins/presentation_util/public/__stories__/wait_for.tsx b/src/platform/plugins/shared/presentation_util/public/__stories__/wait_for.tsx similarity index 100% rename from src/plugins/presentation_util/public/__stories__/wait_for.tsx rename to src/platform/plugins/shared/presentation_util/public/__stories__/wait_for.tsx diff --git a/src/plugins/presentation_util/public/components/dashboard_drilldown_options/dashboard_drilldown_options.tsx b/src/platform/plugins/shared/presentation_util/public/components/dashboard_drilldown_options/dashboard_drilldown_options.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/dashboard_drilldown_options/dashboard_drilldown_options.tsx rename to src/platform/plugins/shared/presentation_util/public/components/dashboard_drilldown_options/dashboard_drilldown_options.tsx diff --git a/src/plugins/presentation_util/public/components/dashboard_drilldown_options/types.ts b/src/platform/plugins/shared/presentation_util/public/components/dashboard_drilldown_options/types.ts similarity index 100% rename from src/plugins/presentation_util/public/components/dashboard_drilldown_options/types.ts rename to src/platform/plugins/shared/presentation_util/public/components/dashboard_drilldown_options/types.ts diff --git a/src/plugins/presentation_util/public/components/dashboard_picker/dashboard_picker.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/dashboard_picker/dashboard_picker.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/dashboard_picker/dashboard_picker.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/dashboard_picker/dashboard_picker.stories.tsx diff --git a/src/plugins/presentation_util/public/components/dashboard_picker/dashboard_picker.tsx b/src/platform/plugins/shared/presentation_util/public/components/dashboard_picker/dashboard_picker.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/dashboard_picker/dashboard_picker.tsx rename to src/platform/plugins/shared/presentation_util/public/components/dashboard_picker/dashboard_picker.tsx diff --git a/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/data_view_picker/data_view_picker.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/data_view_picker/data_view_picker.stories.tsx diff --git a/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx b/src/platform/plugins/shared/presentation_util/public/components/data_view_picker/data_view_picker.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx rename to src/platform/plugins/shared/presentation_util/public/components/data_view_picker/data_view_picker.tsx diff --git a/src/plugins/presentation_util/public/components/expression_input/autocomplete.ts b/src/platform/plugins/shared/presentation_util/public/components/expression_input/autocomplete.ts similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/autocomplete.ts rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/autocomplete.ts diff --git a/src/plugins/presentation_util/public/components/expression_input/constants.ts b/src/platform/plugins/shared/presentation_util/public/components/expression_input/constants.ts similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/constants.ts rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/constants.ts diff --git a/src/plugins/presentation_util/public/components/expression_input/expression_input.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/expression_input/expression_input.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/expression_input.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/expression_input.stories.tsx diff --git a/src/plugins/presentation_util/public/components/expression_input/expression_input.tsx b/src/platform/plugins/shared/presentation_util/public/components/expression_input/expression_input.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/expression_input.tsx rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/expression_input.tsx diff --git a/src/plugins/presentation_util/public/components/expression_input/index.tsx b/src/platform/plugins/shared/presentation_util/public/components/expression_input/index.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/index.tsx rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/index.tsx diff --git a/src/plugins/presentation_util/public/components/expression_input/language.ts b/src/platform/plugins/shared/presentation_util/public/components/expression_input/language.ts similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/language.ts rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/language.ts diff --git a/src/plugins/presentation_util/public/components/expression_input/providers.ts b/src/platform/plugins/shared/presentation_util/public/components/expression_input/providers.ts similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/providers.ts rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/providers.ts diff --git a/src/plugins/presentation_util/public/components/expression_input/reference.ts b/src/platform/plugins/shared/presentation_util/public/components/expression_input/reference.ts similarity index 100% rename from src/plugins/presentation_util/public/components/expression_input/reference.ts rename to src/platform/plugins/shared/presentation_util/public/components/expression_input/reference.ts diff --git a/src/plugins/presentation_util/public/components/field_picker/field_picker.scss b/src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.scss similarity index 100% rename from src/plugins/presentation_util/public/components/field_picker/field_picker.scss rename to src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.scss diff --git a/src/plugins/presentation_util/public/components/field_picker/field_picker.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/field_picker/field_picker.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.stories.tsx diff --git a/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx b/src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/field_picker/field_picker.tsx rename to src/platform/plugins/shared/presentation_util/public/components/field_picker/field_picker.tsx diff --git a/src/plugins/presentation_util/public/components/field_picker/field_type_filter.tsx b/src/platform/plugins/shared/presentation_util/public/components/field_picker/field_type_filter.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/field_picker/field_type_filter.tsx rename to src/platform/plugins/shared/presentation_util/public/components/field_picker/field_type_filter.tsx diff --git a/src/plugins/presentation_util/public/components/floating_actions/floating_actions.scss b/src/platform/plugins/shared/presentation_util/public/components/floating_actions/floating_actions.scss similarity index 100% rename from src/plugins/presentation_util/public/components/floating_actions/floating_actions.scss rename to src/platform/plugins/shared/presentation_util/public/components/floating_actions/floating_actions.scss diff --git a/src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx b/src/platform/plugins/shared/presentation_util/public/components/floating_actions/floating_actions.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/floating_actions/floating_actions.tsx rename to src/platform/plugins/shared/presentation_util/public/components/floating_actions/floating_actions.tsx diff --git a/src/plugins/presentation_util/public/components/index.tsx b/src/platform/plugins/shared/presentation_util/public/components/index.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/index.tsx rename to src/platform/plugins/shared/presentation_util/public/components/index.tsx diff --git a/src/plugins/presentation_util/public/components/labs/environment_switch.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/environment_switch.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/environment_switch.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/environment_switch.tsx diff --git a/src/plugins/presentation_util/public/components/labs/labs.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/labs.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/labs.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/labs.stories.tsx diff --git a/src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/labs_beaker_button.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/labs_beaker_button.tsx diff --git a/src/plugins/presentation_util/public/components/labs/labs_flyout.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/labs_flyout.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/labs_flyout.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/labs_flyout.tsx diff --git a/src/plugins/presentation_util/public/components/labs/project_list.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/project_list.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/project_list.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/project_list.tsx diff --git a/src/plugins/presentation_util/public/components/labs/project_list_item.scss b/src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.scss similarity index 100% rename from src/plugins/presentation_util/public/components/labs/project_list_item.scss rename to src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.scss diff --git a/src/plugins/presentation_util/public/components/labs/project_list_item.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/project_list_item.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.stories.tsx diff --git a/src/plugins/presentation_util/public/components/labs/project_list_item.tsx b/src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/labs/project_list_item.tsx rename to src/platform/plugins/shared/presentation_util/public/components/labs/project_list_item.tsx diff --git a/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx b/src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx rename to src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard.tsx diff --git a/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard_selector.stories.tsx b/src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard_selector.stories.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard_selector.stories.tsx rename to src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard_selector.stories.tsx diff --git a/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard_selector.tsx b/src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard_selector.tsx similarity index 100% rename from src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard_selector.tsx rename to src/platform/plugins/shared/presentation_util/public/components/saved_object_save_modal_dashboard_selector.tsx diff --git a/src/plugins/presentation_util/public/components/types.ts b/src/platform/plugins/shared/presentation_util/public/components/types.ts similarity index 100% rename from src/plugins/presentation_util/public/components/types.ts rename to src/platform/plugins/shared/presentation_util/public/components/types.ts diff --git a/src/plugins/presentation_util/public/i18n/dashboard_drilldown_config.tsx b/src/platform/plugins/shared/presentation_util/public/i18n/dashboard_drilldown_config.tsx similarity index 100% rename from src/plugins/presentation_util/public/i18n/dashboard_drilldown_config.tsx rename to src/platform/plugins/shared/presentation_util/public/i18n/dashboard_drilldown_config.tsx diff --git a/src/plugins/presentation_util/public/i18n/index.ts b/src/platform/plugins/shared/presentation_util/public/i18n/index.ts similarity index 100% rename from src/plugins/presentation_util/public/i18n/index.ts rename to src/platform/plugins/shared/presentation_util/public/i18n/index.ts diff --git a/src/plugins/presentation_util/public/i18n/labs.tsx b/src/platform/plugins/shared/presentation_util/public/i18n/labs.tsx similarity index 100% rename from src/plugins/presentation_util/public/i18n/labs.tsx rename to src/platform/plugins/shared/presentation_util/public/i18n/labs.tsx diff --git a/src/plugins/presentation_util/public/index.ts b/src/platform/plugins/shared/presentation_util/public/index.ts similarity index 100% rename from src/plugins/presentation_util/public/index.ts rename to src/platform/plugins/shared/presentation_util/public/index.ts diff --git a/src/plugins/presentation_util/public/mocks.ts b/src/platform/plugins/shared/presentation_util/public/mocks.ts similarity index 100% rename from src/plugins/presentation_util/public/mocks.ts rename to src/platform/plugins/shared/presentation_util/public/mocks.ts diff --git a/src/plugins/presentation_util/public/plugin.ts b/src/platform/plugins/shared/presentation_util/public/plugin.ts similarity index 100% rename from src/plugins/presentation_util/public/plugin.ts rename to src/platform/plugins/shared/presentation_util/public/plugin.ts diff --git a/src/plugins/presentation_util/public/services/kibana_services.ts b/src/platform/plugins/shared/presentation_util/public/services/kibana_services.ts similarity index 100% rename from src/plugins/presentation_util/public/services/kibana_services.ts rename to src/platform/plugins/shared/presentation_util/public/services/kibana_services.ts diff --git a/src/plugins/presentation_util/public/services/mocks.ts b/src/platform/plugins/shared/presentation_util/public/services/mocks.ts similarity index 100% rename from src/plugins/presentation_util/public/services/mocks.ts rename to src/platform/plugins/shared/presentation_util/public/services/mocks.ts diff --git a/src/plugins/presentation_util/public/services/presentation_labs_service.ts b/src/platform/plugins/shared/presentation_util/public/services/presentation_labs_service.ts similarity index 100% rename from src/plugins/presentation_util/public/services/presentation_labs_service.ts rename to src/platform/plugins/shared/presentation_util/public/services/presentation_labs_service.ts diff --git a/src/plugins/presentation_util/public/types.ts b/src/platform/plugins/shared/presentation_util/public/types.ts similarity index 100% rename from src/plugins/presentation_util/public/types.ts rename to src/platform/plugins/shared/presentation_util/public/types.ts diff --git a/src/plugins/presentation_util/public/utils/get_presentation_capabilities.ts b/src/platform/plugins/shared/presentation_util/public/utils/get_presentation_capabilities.ts similarity index 100% rename from src/plugins/presentation_util/public/utils/get_presentation_capabilities.ts rename to src/platform/plugins/shared/presentation_util/public/utils/get_presentation_capabilities.ts diff --git a/src/plugins/presentation_util/server/index.ts b/src/platform/plugins/shared/presentation_util/server/index.ts similarity index 100% rename from src/plugins/presentation_util/server/index.ts rename to src/platform/plugins/shared/presentation_util/server/index.ts diff --git a/src/plugins/presentation_util/server/plugin.ts b/src/platform/plugins/shared/presentation_util/server/plugin.ts similarity index 100% rename from src/plugins/presentation_util/server/plugin.ts rename to src/platform/plugins/shared/presentation_util/server/plugin.ts diff --git a/src/plugins/presentation_util/server/ui_settings.ts b/src/platform/plugins/shared/presentation_util/server/ui_settings.ts similarity index 100% rename from src/plugins/presentation_util/server/ui_settings.ts rename to src/platform/plugins/shared/presentation_util/server/ui_settings.ts diff --git a/src/plugins/presentation_util/storybook/decorator.tsx b/src/platform/plugins/shared/presentation_util/storybook/decorator.tsx similarity index 100% rename from src/plugins/presentation_util/storybook/decorator.tsx rename to src/platform/plugins/shared/presentation_util/storybook/decorator.tsx diff --git a/src/plugins/presentation_util/storybook/main.ts b/src/platform/plugins/shared/presentation_util/storybook/main.ts similarity index 92% rename from src/plugins/presentation_util/storybook/main.ts rename to src/platform/plugins/shared/presentation_util/storybook/main.ts index c51873a09b7f2..07c1304620aa0 100644 --- a/src/plugins/presentation_util/storybook/main.ts +++ b/src/platform/plugins/shared/presentation_util/storybook/main.ts @@ -14,5 +14,5 @@ module.exports = { define: { global: 'window', }, - stories: ['../../**/*.stories.+(tsx|mdx)'], + stories: ['../../../../**/*.stories.+(tsx|mdx)'], }; diff --git a/src/plugins/presentation_util/storybook/manager.ts b/src/platform/plugins/shared/presentation_util/storybook/manager.ts similarity index 95% rename from src/plugins/presentation_util/storybook/manager.ts rename to src/platform/plugins/shared/presentation_util/storybook/manager.ts index f336acb689a53..dc31e523e41d3 100644 --- a/src/plugins/presentation_util/storybook/manager.ts +++ b/src/platform/plugins/shared/presentation_util/storybook/manager.ts @@ -15,7 +15,7 @@ addons.setConfig({ theme: create({ base: 'light', brandTitle: 'Kibana Presentation Utility Storybook', - brandUrl: 'https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util', + brandUrl: 'https://github.com/elastic/kibana/tree/main/src/platform/plugins/shared/presentation_util', }), showPanel: true.valueOf, selectedPanel: PANEL_ID, diff --git a/src/plugins/presentation_util/storybook/preview.tsx b/src/platform/plugins/shared/presentation_util/storybook/preview.tsx similarity index 100% rename from src/plugins/presentation_util/storybook/preview.tsx rename to src/platform/plugins/shared/presentation_util/storybook/preview.tsx diff --git a/src/plugins/presentation_util/test_helpers/function_wrapper.ts b/src/platform/plugins/shared/presentation_util/test_helpers/function_wrapper.ts similarity index 100% rename from src/plugins/presentation_util/test_helpers/function_wrapper.ts rename to src/platform/plugins/shared/presentation_util/test_helpers/function_wrapper.ts diff --git a/src/plugins/presentation_util/test_helpers/index.ts b/src/platform/plugins/shared/presentation_util/test_helpers/index.ts similarity index 100% rename from src/plugins/presentation_util/test_helpers/index.ts rename to src/platform/plugins/shared/presentation_util/test_helpers/index.ts diff --git a/src/plugins/presentation_util/test_helpers/test_styles.ts b/src/platform/plugins/shared/presentation_util/test_helpers/test_styles.ts similarity index 100% rename from src/plugins/presentation_util/test_helpers/test_styles.ts rename to src/platform/plugins/shared/presentation_util/test_helpers/test_styles.ts diff --git a/src/plugins/presentation_util/tsconfig.json b/src/platform/plugins/shared/presentation_util/tsconfig.json similarity index 92% rename from src/plugins/presentation_util/tsconfig.json rename to src/platform/plugins/shared/presentation_util/tsconfig.json index 45b258a2a3733..44f61e43b1c24 100644 --- a/src/plugins/presentation_util/tsconfig.json +++ b/src/platform/plugins/shared/presentation_util/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types" }, @@ -10,7 +10,7 @@ "server/**/*", "test_helpers/**/*", "storybook/**/*", - "../../../typings/**/*" + "../../../../../typings/**/*" ], "kbn_references": [ "@kbn/core", diff --git a/tsconfig.base.json b/tsconfig.base.json index ea3da0ef3242a..a081bdd302a6d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1406,8 +1406,8 @@ "@kbn/presentation-panel-plugin/*": ["src/platform/plugins/private/presentation_panel/*"], "@kbn/presentation-publishing": ["src/platform/packages/shared/presentation/presentation_publishing"], "@kbn/presentation-publishing/*": ["src/platform/packages/shared/presentation/presentation_publishing/*"], - "@kbn/presentation-util-plugin": ["src/plugins/presentation_util"], - "@kbn/presentation-util-plugin/*": ["src/plugins/presentation_util/*"], + "@kbn/presentation-util-plugin": ["src/platform/plugins/shared/presentation_util"], + "@kbn/presentation-util-plugin/*": ["src/platform/plugins/shared/presentation_util/*"], "@kbn/product-doc-artifact-builder": ["x-pack/packages/ai-infra/product-doc-artifact-builder"], "@kbn/product-doc-artifact-builder/*": ["x-pack/packages/ai-infra/product-doc-artifact-builder/*"], "@kbn/product-doc-base-plugin": ["x-pack/platform/plugins/shared/ai_infra/product_doc_base"], diff --git a/yarn.lock b/yarn.lock index 790d6fd34fc6e..ec460ff826610 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6629,7 +6629,7 @@ version "0.0.0" uid "" -"@kbn/presentation-util-plugin@link:src/plugins/presentation_util": +"@kbn/presentation-util-plugin@link:src/platform/plugins/shared/presentation_util": version "0.0.0" uid ""