; }; pageSize: number; }"
+ ],
+ "path": "packages/shared-ux/table_persist/src/table_persist_hoc.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
}
],
- "interfaces": [],
"enums": [],
"misc": [
{
@@ -79,6 +336,57 @@
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/shared-ux-table-persist",
+ "id": "def-common.EuiTablePersistPropsGetter",
+ "type": "Type",
+ "tags": [],
+ "label": "EuiTablePersistPropsGetter",
+ "description": [],
+ "signature": [
+ "(props: Omit) => ",
+ "EuiTablePersistProps",
+ ""
+ ],
+ "path": "packages/shared-ux/table_persist/src/table_persist_hoc.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/shared-ux-table-persist",
+ "id": "def-common.EuiTablePersistPropsGetter.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "{ [P in Exclude]: P[P]; }"
+ ],
+ "path": "packages/shared-ux/table_persist/src/table_persist_hoc.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/shared-ux-table-persist",
+ "id": "def-common.HOCProps",
+ "type": "Type",
+ "tags": [],
+ "label": "HOCProps",
+ "description": [],
+ "signature": [
+ "P & { euiTablePersistProps?: Partial<",
+ "EuiTablePersistProps",
+ "> | undefined; }"
+ ],
+ "path": "packages/shared-ux/table_persist/src/table_persist_hoc.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
}
],
"objects": []
diff --git a/api_docs/kbn_shared_ux_table_persist.mdx b/api_docs/kbn_shared_ux_table_persist.mdx
index 0522c15beb2ab..06ed280a7243c 100644
--- a/api_docs/kbn_shared_ux_table_persist.mdx
+++ b/api_docs/kbn_shared_ux_table_persist.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-table-persist
title: "@kbn/shared-ux-table-persist"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-table-persist plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-table-persist']
---
import kbnSharedUxTablePersistObj from './kbn_shared_ux_table_persist.devdocs.json';
@@ -21,13 +21,16 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3 | 0 | 2 | 2 |
+| 17 | 0 | 16 | 2 |
## Common
### Functions
+### Interfaces
+
+
### Consts, variables and types
diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx
index b551a950c4253..1cf9823de35f1 100644
--- a/api_docs/kbn_shared_ux_utility.mdx
+++ b/api_docs/kbn_shared_ux_utility.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility
title: "@kbn/shared-ux-utility"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-utility plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility']
---
import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json';
diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx
index 32453973c879e..5849842e95def 100644
--- a/api_docs/kbn_slo_schema.mdx
+++ b/api_docs/kbn_slo_schema.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema
title: "@kbn/slo-schema"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/slo-schema plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema']
---
import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json';
diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx
index 2b943b2710c2a..86c0a5b60bb34 100644
--- a/api_docs/kbn_some_dev_log.mdx
+++ b/api_docs/kbn_some_dev_log.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log
title: "@kbn/some-dev-log"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/some-dev-log plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log']
---
import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json';
diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx
index d7254a9438d21..58808bafb8c26 100644
--- a/api_docs/kbn_sort_predicates.mdx
+++ b/api_docs/kbn_sort_predicates.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates
title: "@kbn/sort-predicates"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/sort-predicates plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates']
---
import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json';
diff --git a/api_docs/kbn_sse_utils.mdx b/api_docs/kbn_sse_utils.mdx
index 082c2e61243c4..97f887d6916e9 100644
--- a/api_docs/kbn_sse_utils.mdx
+++ b/api_docs/kbn_sse_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils
title: "@kbn/sse-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/sse-utils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils']
---
import kbnSseUtilsObj from './kbn_sse_utils.devdocs.json';
diff --git a/api_docs/kbn_sse_utils_client.mdx b/api_docs/kbn_sse_utils_client.mdx
index 1e1fa5b24e048..01be6b681684d 100644
--- a/api_docs/kbn_sse_utils_client.mdx
+++ b/api_docs/kbn_sse_utils_client.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils-client
title: "@kbn/sse-utils-client"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/sse-utils-client plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils-client']
---
import kbnSseUtilsClientObj from './kbn_sse_utils_client.devdocs.json';
diff --git a/api_docs/kbn_sse_utils_server.mdx b/api_docs/kbn_sse_utils_server.mdx
index 1ab926f56fd45..224cc31048ac4 100644
--- a/api_docs/kbn_sse_utils_server.mdx
+++ b/api_docs/kbn_sse_utils_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils-server
title: "@kbn/sse-utils-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/sse-utils-server plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils-server']
---
import kbnSseUtilsServerObj from './kbn_sse_utils_server.devdocs.json';
diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx
index 8c9b9d36989a7..febd634486838 100644
--- a/api_docs/kbn_std.mdx
+++ b/api_docs/kbn_std.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std
title: "@kbn/std"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/std plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std']
---
import kbnStdObj from './kbn_std.devdocs.json';
diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx
index c4efb27932985..58880300d5bde 100644
--- a/api_docs/kbn_stdio_dev_helpers.mdx
+++ b/api_docs/kbn_stdio_dev_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers
title: "@kbn/stdio-dev-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/stdio-dev-helpers plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers']
---
import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json';
diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx
index 09b4b3e349f55..8ebca570d046e 100644
--- a/api_docs/kbn_storybook.mdx
+++ b/api_docs/kbn_storybook.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook
title: "@kbn/storybook"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/storybook plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook']
---
import kbnStorybookObj from './kbn_storybook.devdocs.json';
diff --git a/api_docs/kbn_synthetics_e2e.mdx b/api_docs/kbn_synthetics_e2e.mdx
index 02e8b982aa0e0..010d69a1b8aa7 100644
--- a/api_docs/kbn_synthetics_e2e.mdx
+++ b/api_docs/kbn_synthetics_e2e.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-e2e
title: "@kbn/synthetics-e2e"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/synthetics-e2e plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-e2e']
---
import kbnSyntheticsE2eObj from './kbn_synthetics_e2e.devdocs.json';
diff --git a/api_docs/kbn_synthetics_private_location.mdx b/api_docs/kbn_synthetics_private_location.mdx
index bdaa2514a88bd..b7851081801d0 100644
--- a/api_docs/kbn_synthetics_private_location.mdx
+++ b/api_docs/kbn_synthetics_private_location.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-private-location
title: "@kbn/synthetics-private-location"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/synthetics-private-location plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-private-location']
---
import kbnSyntheticsPrivateLocationObj from './kbn_synthetics_private_location.devdocs.json';
diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx
index 5231cd4e3c458..36b2444bb48a1 100644
--- a/api_docs/kbn_telemetry_tools.mdx
+++ b/api_docs/kbn_telemetry_tools.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools
title: "@kbn/telemetry-tools"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/telemetry-tools plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools']
---
import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json';
diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx
index 492a87573f63d..40461c7c08ff8 100644
--- a/api_docs/kbn_test.mdx
+++ b/api_docs/kbn_test.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test
title: "@kbn/test"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test']
---
import kbnTestObj from './kbn_test.devdocs.json';
diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx
index 130509125034f..1a69ab75edb2e 100644
--- a/api_docs/kbn_test_eui_helpers.mdx
+++ b/api_docs/kbn_test_eui_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers
title: "@kbn/test-eui-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test-eui-helpers plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers']
---
import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json';
diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx
index 8b32345859485..6796757558f19 100644
--- a/api_docs/kbn_test_jest_helpers.mdx
+++ b/api_docs/kbn_test_jest_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers
title: "@kbn/test-jest-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test-jest-helpers plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers']
---
import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json';
diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx
index 079d2d63a454d..1522caa831c31 100644
--- a/api_docs/kbn_test_subj_selector.mdx
+++ b/api_docs/kbn_test_subj_selector.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector
title: "@kbn/test-subj-selector"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test-subj-selector plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector']
---
import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json';
diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx
index 5a3daf0b3a51d..ea5afd5d95344 100644
--- a/api_docs/kbn_timerange.mdx
+++ b/api_docs/kbn_timerange.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange
title: "@kbn/timerange"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/timerange plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange']
---
import kbnTimerangeObj from './kbn_timerange.devdocs.json';
diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx
index 30405402bbba9..beb39dd02b954 100644
--- a/api_docs/kbn_tooling_log.mdx
+++ b/api_docs/kbn_tooling_log.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log
title: "@kbn/tooling-log"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/tooling-log plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log']
---
import kbnToolingLogObj from './kbn_tooling_log.devdocs.json';
diff --git a/api_docs/kbn_transpose_utils.mdx b/api_docs/kbn_transpose_utils.mdx
index 5fe0d46e8f6bb..f7c50e163efdd 100644
--- a/api_docs/kbn_transpose_utils.mdx
+++ b/api_docs/kbn_transpose_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-transpose-utils
title: "@kbn/transpose-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/transpose-utils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/transpose-utils']
---
import kbnTransposeUtilsObj from './kbn_transpose_utils.devdocs.json';
diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx
index 58a81829af635..7f18eac98ec52 100644
--- a/api_docs/kbn_triggers_actions_ui_types.mdx
+++ b/api_docs/kbn_triggers_actions_ui_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types
title: "@kbn/triggers-actions-ui-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/triggers-actions-ui-types plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types']
---
import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json';
diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx
index d40d2431e7053..a6dd8c821d8ab 100644
--- a/api_docs/kbn_try_in_console.mdx
+++ b/api_docs/kbn_try_in_console.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console
title: "@kbn/try-in-console"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/try-in-console plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console']
---
import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json';
diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx
index 6f313c8e8b059..ecfda351e476a 100644
--- a/api_docs/kbn_ts_projects.mdx
+++ b/api_docs/kbn_ts_projects.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects
title: "@kbn/ts-projects"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ts-projects plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects']
---
import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json';
diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx
index 21d0e0b9959b8..87d01260b4357 100644
--- a/api_docs/kbn_typed_react_router_config.mdx
+++ b/api_docs/kbn_typed_react_router_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config
title: "@kbn/typed-react-router-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/typed-react-router-config plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config']
---
import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json';
diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx
index aa691e7e43d71..6b26b2ad9952f 100644
--- a/api_docs/kbn_ui_actions_browser.mdx
+++ b/api_docs/kbn_ui_actions_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser
title: "@kbn/ui-actions-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ui-actions-browser plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser']
---
import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json';
diff --git a/api_docs/kbn_ui_shared_deps_src.devdocs.json b/api_docs/kbn_ui_shared_deps_src.devdocs.json
index ed0f25116b66d..2a61ae29701c1 100644
--- a/api_docs/kbn_ui_shared_deps_src.devdocs.json
+++ b/api_docs/kbn_ui_shared_deps_src.devdocs.json
@@ -699,6 +699,17 @@
"path": "packages/kbn-ui-shared-deps-src/src/definitions.js",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/ui-shared-deps-src",
+ "id": "def-common.externals.kbnreactkibanacontexttheme",
+ "type": "string",
+ "tags": [],
+ "label": "'@kbn/react-kibana-context-theme'",
+ "description": [],
+ "path": "packages/kbn-ui-shared-deps-src/src/definitions.js",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx
index a856843a787f7..c9249e50d8971 100644
--- a/api_docs/kbn_ui_shared_deps_src.mdx
+++ b/api_docs/kbn_ui_shared_deps_src.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src
title: "@kbn/ui-shared-deps-src"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ui-shared-deps-src plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src']
---
import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 59 | 0 | 50 | 0 |
+| 60 | 0 | 51 | 0 |
## Common
diff --git a/api_docs/kbn_ui_theme.devdocs.json b/api_docs/kbn_ui_theme.devdocs.json
index b7c9d0a6f2831..79750b38df53b 100644
--- a/api_docs/kbn_ui_theme.devdocs.json
+++ b/api_docs/kbn_ui_theme.devdocs.json
@@ -69,14 +69,6 @@
"deprecated": true,
"trackAdoption": false,
"references": [
- {
- "plugin": "@kbn/monaco",
- "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts"
- },
- {
- "plugin": "@kbn/monaco",
- "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts"
- },
{
"plugin": "@kbn/monaco",
"path": "packages/kbn-monaco/src/console/theme.ts"
diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx
index d17a315c77e03..c9a665af3aacf 100644
--- a/api_docs/kbn_ui_theme.mdx
+++ b/api_docs/kbn_ui_theme.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme
title: "@kbn/ui-theme"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ui-theme plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme']
---
import kbnUiThemeObj from './kbn_ui_theme.devdocs.json';
diff --git a/api_docs/kbn_unified_data_table.devdocs.json b/api_docs/kbn_unified_data_table.devdocs.json
index 3c035dc025739..1398b8b7116ac 100644
--- a/api_docs/kbn_unified_data_table.devdocs.json
+++ b/api_docs/kbn_unified_data_table.devdocs.json
@@ -2056,9 +2056,9 @@
"{ theme: ",
{
"pluginId": "@kbn/react-kibana-context-common",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextCommonPluginApi",
- "section": "def-public.ThemeServiceStart",
+ "section": "def-common.ThemeServiceStart",
"text": "ThemeServiceStart"
},
"; fieldFormats: ",
diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx
index 7ed91c3de9c8c..6e92450416f2c 100644
--- a/api_docs/kbn_unified_data_table.mdx
+++ b/api_docs/kbn_unified_data_table.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table
title: "@kbn/unified-data-table"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/unified-data-table plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table']
---
import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json';
diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx
index e625f00480d16..e73502404b937 100644
--- a/api_docs/kbn_unified_doc_viewer.mdx
+++ b/api_docs/kbn_unified_doc_viewer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer
title: "@kbn/unified-doc-viewer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/unified-doc-viewer plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer']
---
import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json';
diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx
index b0036b160ebae..679c8a1a627bf 100644
--- a/api_docs/kbn_unified_field_list.mdx
+++ b/api_docs/kbn_unified_field_list.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list
title: "@kbn/unified-field-list"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/unified-field-list plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list']
---
import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json';
diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx
index 1131276f7e27d..69b103c013ea3 100644
--- a/api_docs/kbn_unsaved_changes_badge.mdx
+++ b/api_docs/kbn_unsaved_changes_badge.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge
title: "@kbn/unsaved-changes-badge"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/unsaved-changes-badge plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge']
---
import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json';
diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx
index 478c5f526b6e9..743ab3d4ff54a 100644
--- a/api_docs/kbn_unsaved_changes_prompt.mdx
+++ b/api_docs/kbn_unsaved_changes_prompt.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt
title: "@kbn/unsaved-changes-prompt"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/unsaved-changes-prompt plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt']
---
import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json';
diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx
index ecfa81ba34e7b..08e527d88a14c 100644
--- a/api_docs/kbn_use_tracked_promise.mdx
+++ b/api_docs/kbn_use_tracked_promise.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise
title: "@kbn/use-tracked-promise"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/use-tracked-promise plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise']
---
import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json';
diff --git a/api_docs/kbn_user_profile_components.devdocs.json b/api_docs/kbn_user_profile_components.devdocs.json
index c5a703d4e9cc2..34214d8791833 100644
--- a/api_docs/kbn_user_profile_components.devdocs.json
+++ b/api_docs/kbn_user_profile_components.devdocs.json
@@ -976,9 +976,9 @@
", \"reportEvent\"> | undefined; theme: ",
{
"pluginId": "@kbn/react-kibana-context-common",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextCommonPluginApi",
- "section": "def-public.ThemeServiceStart",
+ "section": "def-common.ThemeServiceStart",
"text": "ThemeServiceStart"
},
"; }"
diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx
index e02e491845484..c60ec0e607d48 100644
--- a/api_docs/kbn_user_profile_components.mdx
+++ b/api_docs/kbn_user_profile_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components
title: "@kbn/user-profile-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/user-profile-components plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components']
---
import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json';
diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx
index 09b257552bcd8..ae809e17f6738 100644
--- a/api_docs/kbn_utility_types.mdx
+++ b/api_docs/kbn_utility_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types
title: "@kbn/utility-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utility-types plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types']
---
import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json';
diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx
index ec4ba8727bb39..fd12297b5b8c9 100644
--- a/api_docs/kbn_utility_types_jest.mdx
+++ b/api_docs/kbn_utility_types_jest.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest
title: "@kbn/utility-types-jest"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utility-types-jest plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest']
---
import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json';
diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx
index bd042e4e6b8f2..3d49b2cf72612 100644
--- a/api_docs/kbn_utils.mdx
+++ b/api_docs/kbn_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils
title: "@kbn/utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils']
---
import kbnUtilsObj from './kbn_utils.devdocs.json';
diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx
index 81e865b3d66ba..0710e42dc8eba 100644
--- a/api_docs/kbn_visualization_ui_components.mdx
+++ b/api_docs/kbn_visualization_ui_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components
title: "@kbn/visualization-ui-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/visualization-ui-components plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components']
---
import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json';
diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx
index b9d07c5b6d7f7..5f8fa23f162c4 100644
--- a/api_docs/kbn_visualization_utils.mdx
+++ b/api_docs/kbn_visualization_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils
title: "@kbn/visualization-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/visualization-utils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils']
---
import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json';
diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx
index ec2f50b60f4d3..1aaae7295b988 100644
--- a/api_docs/kbn_xstate_utils.mdx
+++ b/api_docs/kbn_xstate_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils
title: "@kbn/xstate-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/xstate-utils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils']
---
import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json';
diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx
index 45003d0ffa2af..6aa5f611d5ce0 100644
--- a/api_docs/kbn_yarn_lock_validator.mdx
+++ b/api_docs/kbn_yarn_lock_validator.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator
title: "@kbn/yarn-lock-validator"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/yarn-lock-validator plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator']
---
import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json';
diff --git a/api_docs/kbn_zod.mdx b/api_docs/kbn_zod.mdx
index 3e199bcf7f782..a53a340bc5e8e 100644
--- a/api_docs/kbn_zod.mdx
+++ b/api_docs/kbn_zod.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod
title: "@kbn/zod"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/zod plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod']
---
import kbnZodObj from './kbn_zod.devdocs.json';
diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx
index afb2b519ce418..5c179412886ef 100644
--- a/api_docs/kbn_zod_helpers.mdx
+++ b/api_docs/kbn_zod_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers
title: "@kbn/zod-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/zod-helpers plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers']
---
import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json';
diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx
index c54abc7675927..fefc3fbc8e142 100644
--- a/api_docs/kibana_overview.mdx
+++ b/api_docs/kibana_overview.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview
title: "kibanaOverview"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaOverview plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview']
---
import kibanaOverviewObj from './kibana_overview.devdocs.json';
diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json
index faca5278b8eba..99e4d8fe29755 100644
--- a/api_docs/kibana_react.devdocs.json
+++ b/api_docs/kibana_react.devdocs.json
@@ -1455,9 +1455,9 @@
"<",
{
"pluginId": "@kbn/react-kibana-context-common",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextCommonPluginApi",
- "section": "def-public.KibanaTheme",
+ "section": "def-common.KibanaTheme",
"text": "KibanaTheme"
},
">) => React.JSX.Element"
@@ -1493,9 +1493,9 @@
"<",
{
"pluginId": "@kbn/react-kibana-context-common",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextCommonPluginApi",
- "section": "def-public.KibanaTheme",
+ "section": "def-common.KibanaTheme",
"text": "KibanaTheme"
},
">"
@@ -2653,17 +2653,17 @@
"Pick<",
{
"pluginId": "@kbn/react-kibana-context-theme",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextThemePluginApi",
- "section": "def-public.KibanaThemeProviderProps",
+ "section": "def-common.KibanaThemeProviderProps",
"text": "KibanaThemeProviderProps"
},
", \"children\" | \"modify\"> & ",
{
"pluginId": "@kbn/react-kibana-context-common",
- "scope": "public",
+ "scope": "common",
"docId": "kibKbnReactKibanaContextCommonPluginApi",
- "section": "def-public.ThemeServiceStart",
+ "section": "def-common.ThemeServiceStart",
"text": "ThemeServiceStart"
}
],
diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx
index 1ad3660508d8e..bf766ea8f113f 100644
--- a/api_docs/kibana_react.mdx
+++ b/api_docs/kibana_react.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact
title: "kibanaReact"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaReact plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact']
---
import kibanaReactObj from './kibana_react.devdocs.json';
diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx
index 0cce259cdd89c..f2caa5e23d7b3 100644
--- a/api_docs/kibana_utils.mdx
+++ b/api_docs/kibana_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils
title: "kibanaUtils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaUtils plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils']
---
import kibanaUtilsObj from './kibana_utils.devdocs.json';
diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx
index 506c852537a97..a9db4da2dc551 100644
--- a/api_docs/kubernetes_security.mdx
+++ b/api_docs/kubernetes_security.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity
title: "kubernetesSecurity"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kubernetesSecurity plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity']
---
import kubernetesSecurityObj from './kubernetes_security.devdocs.json';
diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx
index e56ed576b7bca..373bbe2f38835 100644
--- a/api_docs/lens.mdx
+++ b/api_docs/lens.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens
title: "lens"
image: https://source.unsplash.com/400x175/?github
description: API docs for the lens plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens']
---
import lensObj from './lens.devdocs.json';
diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx
index a4265684dbd16..384de74cedc5c 100644
--- a/api_docs/license_api_guard.mdx
+++ b/api_docs/license_api_guard.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard
title: "licenseApiGuard"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licenseApiGuard plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard']
---
import licenseApiGuardObj from './license_api_guard.devdocs.json';
diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx
index fe2780566ae03..d7749a9229353 100644
--- a/api_docs/license_management.mdx
+++ b/api_docs/license_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement
title: "licenseManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licenseManagement plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement']
---
import licenseManagementObj from './license_management.devdocs.json';
diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx
index 30e23c7819503..5344bf70f5584 100644
--- a/api_docs/licensing.mdx
+++ b/api_docs/licensing.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing
title: "licensing"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licensing plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing']
---
import licensingObj from './licensing.devdocs.json';
diff --git a/api_docs/links.mdx b/api_docs/links.mdx
index 92a7c7b0fd092..311c805a8d2ed 100644
--- a/api_docs/links.mdx
+++ b/api_docs/links.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links
title: "links"
image: https://source.unsplash.com/400x175/?github
description: API docs for the links plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links']
---
import linksObj from './links.devdocs.json';
diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx
index 5cd3e710ae0a3..08c95634e190a 100644
--- a/api_docs/lists.mdx
+++ b/api_docs/lists.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists
title: "lists"
image: https://source.unsplash.com/400x175/?github
description: API docs for the lists plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists']
---
import listsObj from './lists.devdocs.json';
diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx
index 8c6add22b15eb..78b3a7e9b4bc5 100644
--- a/api_docs/logs_data_access.mdx
+++ b/api_docs/logs_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess
title: "logsDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the logsDataAccess plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess']
---
import logsDataAccessObj from './logs_data_access.devdocs.json';
diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx
index beb564b9117ab..af8344bcb022e 100644
--- a/api_docs/logs_explorer.mdx
+++ b/api_docs/logs_explorer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer
title: "logsExplorer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the logsExplorer plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer']
---
import logsExplorerObj from './logs_explorer.devdocs.json';
diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx
index 8cc82045d002f..7894519385f1e 100644
--- a/api_docs/logs_shared.mdx
+++ b/api_docs/logs_shared.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared
title: "logsShared"
image: https://source.unsplash.com/400x175/?github
description: API docs for the logsShared plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared']
---
import logsSharedObj from './logs_shared.devdocs.json';
diff --git a/api_docs/management.mdx b/api_docs/management.mdx
index be42f94512a3b..158469eae5cd5 100644
--- a/api_docs/management.mdx
+++ b/api_docs/management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management
title: "management"
image: https://source.unsplash.com/400x175/?github
description: API docs for the management plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management']
---
import managementObj from './management.devdocs.json';
diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx
index b376211b961a6..8a2518435d53d 100644
--- a/api_docs/maps.mdx
+++ b/api_docs/maps.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps
title: "maps"
image: https://source.unsplash.com/400x175/?github
description: API docs for the maps plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps']
---
import mapsObj from './maps.devdocs.json';
diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx
index 7ab0692dbbd43..fde7bdc426948 100644
--- a/api_docs/maps_ems.mdx
+++ b/api_docs/maps_ems.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms
title: "mapsEms"
image: https://source.unsplash.com/400x175/?github
description: API docs for the mapsEms plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms']
---
import mapsEmsObj from './maps_ems.devdocs.json';
diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx
index 21baf958548b0..5a252eaae4b4d 100644
--- a/api_docs/metrics_data_access.mdx
+++ b/api_docs/metrics_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess
title: "metricsDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the metricsDataAccess plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess']
---
import metricsDataAccessObj from './metrics_data_access.devdocs.json';
diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx
index 98625d6fb49d6..ea44e1ec9a966 100644
--- a/api_docs/ml.mdx
+++ b/api_docs/ml.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml
title: "ml"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ml plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml']
---
import mlObj from './ml.devdocs.json';
diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx
index 23919b5a11c67..f944972b77892 100644
--- a/api_docs/mock_idp_plugin.mdx
+++ b/api_docs/mock_idp_plugin.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin
title: "mockIdpPlugin"
image: https://source.unsplash.com/400x175/?github
description: API docs for the mockIdpPlugin plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin']
---
import mockIdpPluginObj from './mock_idp_plugin.devdocs.json';
diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx
index e83bc4ee0d86e..7ae60fd1f5356 100644
--- a/api_docs/monitoring.mdx
+++ b/api_docs/monitoring.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring
title: "monitoring"
image: https://source.unsplash.com/400x175/?github
description: API docs for the monitoring plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring']
---
import monitoringObj from './monitoring.devdocs.json';
diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx
index 709e49ac0ff87..5b62e6e0d1283 100644
--- a/api_docs/monitoring_collection.mdx
+++ b/api_docs/monitoring_collection.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection
title: "monitoringCollection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the monitoringCollection plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection']
---
import monitoringCollectionObj from './monitoring_collection.devdocs.json';
diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx
index 60ff383c817e9..496072f43a492 100644
--- a/api_docs/navigation.mdx
+++ b/api_docs/navigation.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation
title: "navigation"
image: https://source.unsplash.com/400x175/?github
description: API docs for the navigation plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation']
---
import navigationObj from './navigation.devdocs.json';
diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx
index 256a7f3d73776..c7f9280661b62 100644
--- a/api_docs/newsfeed.mdx
+++ b/api_docs/newsfeed.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed
title: "newsfeed"
image: https://source.unsplash.com/400x175/?github
description: API docs for the newsfeed plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed']
---
import newsfeedObj from './newsfeed.devdocs.json';
diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx
index 37ae968514a0f..119862d079f69 100644
--- a/api_docs/no_data_page.mdx
+++ b/api_docs/no_data_page.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage
title: "noDataPage"
image: https://source.unsplash.com/400x175/?github
description: API docs for the noDataPage plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage']
---
import noDataPageObj from './no_data_page.devdocs.json';
diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx
index c49241d716fa5..605975c60b42b 100644
--- a/api_docs/notifications.mdx
+++ b/api_docs/notifications.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications
title: "notifications"
image: https://source.unsplash.com/400x175/?github
description: API docs for the notifications plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications']
---
import notificationsObj from './notifications.devdocs.json';
diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx
index 43d81b9fe5ae6..f728ea4fa7e9b 100644
--- a/api_docs/observability.mdx
+++ b/api_docs/observability.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability
title: "observability"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observability plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability']
---
import observabilityObj from './observability.devdocs.json';
diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx
index 0ad44a6888fb2..d9cce36dffe60 100644
--- a/api_docs/observability_a_i_assistant.mdx
+++ b/api_docs/observability_a_i_assistant.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant
title: "observabilityAIAssistant"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityAIAssistant plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant']
---
import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json';
diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx
index 3fdb21b1ed3ce..3536df0a49b49 100644
--- a/api_docs/observability_a_i_assistant_app.mdx
+++ b/api_docs/observability_a_i_assistant_app.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp
title: "observabilityAIAssistantApp"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityAIAssistantApp plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp']
---
import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json';
diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx
index 7dab03b59c44e..d4567385c8703 100644
--- a/api_docs/observability_ai_assistant_management.mdx
+++ b/api_docs/observability_ai_assistant_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement
title: "observabilityAiAssistantManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityAiAssistantManagement plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement']
---
import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json';
diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx
index 045420af299ae..4afb5190018cf 100644
--- a/api_docs/observability_logs_explorer.mdx
+++ b/api_docs/observability_logs_explorer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer
title: "observabilityLogsExplorer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityLogsExplorer plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer']
---
import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json';
diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx
index dbe4026fff641..306031fa78045 100644
--- a/api_docs/observability_onboarding.mdx
+++ b/api_docs/observability_onboarding.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding
title: "observabilityOnboarding"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityOnboarding plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding']
---
import observabilityOnboardingObj from './observability_onboarding.devdocs.json';
diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx
index 197de9a7572fc..8dd043f350144 100644
--- a/api_docs/observability_shared.mdx
+++ b/api_docs/observability_shared.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared
title: "observabilityShared"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observabilityShared plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared']
---
import observabilitySharedObj from './observability_shared.devdocs.json';
diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx
index 3a87bea6e1b75..46cd632977208 100644
--- a/api_docs/osquery.mdx
+++ b/api_docs/osquery.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery
title: "osquery"
image: https://source.unsplash.com/400x175/?github
description: API docs for the osquery plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery']
---
import osqueryObj from './osquery.devdocs.json';
diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx
index c698e85725780..f4bccf19eb2aa 100644
--- a/api_docs/painless_lab.mdx
+++ b/api_docs/painless_lab.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab
title: "painlessLab"
image: https://source.unsplash.com/400x175/?github
description: API docs for the painlessLab plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab']
---
import painlessLabObj from './painless_lab.devdocs.json';
diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx
index 245663b0c8643..b250a83cfafaa 100644
--- a/api_docs/plugin_directory.mdx
+++ b/api_docs/plugin_directory.mdx
@@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory
slug: /kibana-dev-docs/api-meta/plugin-api-directory
title: Directory
description: Directory of public APIs available through plugins or packages.
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Count | Plugins or Packages with a
public API | Number of teams |
|--------------|----------|------------------------|
-| 883 | 753 | 47 |
+| 884 | 754 | 47 |
### Public API health stats
| API Count | Any Count | Missing comments | Missing exports |
|--------------|----------|-----------------|--------|
-| 54324 | 247 | 40789 | 2009 |
+| 54380 | 247 | 40840 | 2011 |
## Plugin Directory
@@ -48,7 +48,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| cloudLinks | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Adds the links to the Elastic Cloud console | 0 | 0 | 0 | 0 |
| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | The cloud security posture plugin | 13 | 0 | 2 | 2 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 39 | 0 | 30 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 149 | 0 | 125 | 6 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 150 | 0 | 126 | 6 |
| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 135 | 0 | 131 | 15 |
| crossClusterReplication | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 |
| customBranding | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Enables customization of Kibana | 0 | 0 | 0 | 0 |
@@ -103,7 +103,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 89 | 0 | 89 | 8 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 240 | 0 | 24 | 9 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 3 | 0 | 3 | 0 |
-| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1422 | 5 | 1297 | 81 |
+| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1427 | 5 | 1302 | 81 |
| ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 72 | 0 | 14 | 5 |
| globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 |
@@ -114,7 +114,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 149 | 0 | 111 | 1 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 1 | 0 | 1 | 0 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 |
-| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 243 | 0 | 238 | 1 |
+| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 244 | 0 | 239 | 1 |
| | [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) | - | 33 | 0 | 28 | 4 |
| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 24 | 0 | 24 | 5 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 |
@@ -171,7 +171,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 263 | 0 | 226 | 10 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 114 | 2 | 109 | 5 |
-| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 |
+| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 1 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 148 | 0 | 139 | 2 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 36 | 0 | 30 | 3 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 105 | 0 | 58 | 0 |
@@ -187,7 +187,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 22 | 0 | 16 | 1 |
| searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 |
| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 455 | 0 | 238 | 0 |
-| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 188 | 0 | 120 | 33 |
+| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 187 | 0 | 119 | 33 |
| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 |
| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 7 | 0 | 7 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 25 | 0 | 24 | 0 |
@@ -291,8 +291,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 8 | 4 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 28 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 9 | 0 | 6 | 2 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 45 | 0 | 44 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 7 | 0 | 7 | 0 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 1 | 0 | 1 | 0 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 43 | 0 | 42 | 1 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 13 | 0 | 13 | 1 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 10 | 0 |
@@ -417,6 +418,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 0 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 |
+| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 2 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 2 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 2 | 1 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 1 |
@@ -445,8 +447,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 146 | 1 | 63 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 16 | 0 | 16 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 15 | 2 |
-| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 12 | 0 | 2 | 0 |
-| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 21 | 0 | 20 | 0 |
+| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 33 | 0 | 22 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 3 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 24 | 0 | 24 | 3 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 |
@@ -456,12 +457,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 29 | 0 | 4 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 14 | 1 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 |
-| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 2 | 0 |
+| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 2 | 0 |
| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 33 | 2 | 20 | 1 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 1 | 11 | 3 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 8 | 0 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 48 | 0 | 20 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 1 | 24 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 20 | 1 | 19 | 3 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 |
@@ -513,7 +514,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 16 | 0 | 8 | 0 |
| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 42 | 0 | 41 | 0 |
| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 169 | 0 | 140 | 10 |
-| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 401 | 0 | 370 | 0 |
+| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 400 | 0 | 369 | 0 |
| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 45 | 0 | 45 | 0 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 55 | 0 | 40 | 7 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 |
@@ -550,7 +551,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 47 | 0 | 40 | 0 |
| | [@elastic/security-threat-hunting](https://github.com/orgs/elastic/teams/security-threat-hunting) | - | 85 | 0 | 80 | 2 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 75 | 0 | 73 | 0 |
-| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 124 | 3 | 124 | 0 |
+| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 126 | 3 | 126 | 0 |
| | [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) | - | 124 | 0 | 41 | 1 |
| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 7 | 1 | 7 | 1 |
| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 9 | 0 | 9 | 0 |
@@ -578,7 +579,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 7 | 0 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 2 | 3 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 45 | 0 | 0 | 0 |
-| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 139 | 0 | 138 | 0 |
+| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 140 | 0 | 139 | 0 |
| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 20 | 0 | 11 | 0 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 88 | 0 | 10 | 0 |
| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 56 | 0 | 6 | 0 |
@@ -616,7 +617,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 42 | 1 | 35 | 1 |
| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 32 | 0 | 0 | 0 |
| | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 22 | 0 | 16 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 123 | 0 | 123 | 3 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 124 | 0 | 124 | 3 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 55 | 1 | 50 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 |
| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 10 | 0 | 10 | 2 |
@@ -627,7 +628,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 4 | 0 | 4 | 1 |
| | [@elastic/security-detection-rule-management](https://github.com/orgs/elastic/teams/security-detection-rule-management) | - | 12 | 0 | 12 | 0 |
| | [@elastic/security-detection-rule-management](https://github.com/orgs/elastic/teams/security-detection-rule-management) | - | 15 | 0 | 15 | 0 |
-| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 45 | 0 | 45 | 10 |
+| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 45 | 0 | 45 | 9 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 51 | 5 | 34 | 0 |
| | [@elastic/security-asset-management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 66 | 0 | 66 | 0 |
| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 5 | 0 | 5 | 0 |
@@ -641,12 +642,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 0 |
| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 |
| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 |
-| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 8 | 0 | 7 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 2 | 0 |
+| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 9 | 0 | 8 | 0 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 15 | 0 | 8 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 1 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 4 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 18 | 0 | 3 | 0 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 2 | 0 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 13 | 0 | 3 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 8 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 14 | 0 | 7 | 0 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 18 | 0 | 18 | 0 |
@@ -765,7 +766,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 0 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 15 | 0 | 4 | 0 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 4 |
-| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 2 | 2 |
+| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 17 | 0 | 16 | 2 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 16 | 0 | 6 | 0 |
| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 182 | 0 | 182 | 0 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 20 | 0 | 12 | 0 |
@@ -791,7 +792,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 39 | 0 | 25 | 1 |
| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 86 | 0 | 86 | 1 |
| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 0 | 28 | 0 |
-| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 59 | 0 | 50 | 0 |
+| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 60 | 0 | 51 | 0 |
| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 |
| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 184 | 0 | 108 | 1 |
| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 0 | 17 | 5 |
diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx
index d51877a9b2bc3..fcdb0202034e3 100644
--- a/api_docs/presentation_panel.mdx
+++ b/api_docs/presentation_panel.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel
title: "presentationPanel"
image: https://source.unsplash.com/400x175/?github
description: API docs for the presentationPanel plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel']
---
import presentationPanelObj from './presentation_panel.devdocs.json';
diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx
index 5745d55a9b379..d31ed581bc93b 100644
--- a/api_docs/presentation_util.mdx
+++ b/api_docs/presentation_util.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil
title: "presentationUtil"
image: https://source.unsplash.com/400x175/?github
description: API docs for the presentationUtil plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil']
---
import presentationUtilObj from './presentation_util.devdocs.json';
diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx
index 38efb7720b14c..182321a4503db 100644
--- a/api_docs/profiling.mdx
+++ b/api_docs/profiling.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling
title: "profiling"
image: https://source.unsplash.com/400x175/?github
description: API docs for the profiling plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling']
---
import profilingObj from './profiling.devdocs.json';
diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx
index 7cc1f64e2755c..fe9da1d9da48c 100644
--- a/api_docs/profiling_data_access.mdx
+++ b/api_docs/profiling_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess
title: "profilingDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the profilingDataAccess plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess']
---
import profilingDataAccessObj from './profiling_data_access.devdocs.json';
diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx
index ff432fcd2a533..85dd281521417 100644
--- a/api_docs/remote_clusters.mdx
+++ b/api_docs/remote_clusters.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters
title: "remoteClusters"
image: https://source.unsplash.com/400x175/?github
description: API docs for the remoteClusters plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters']
---
import remoteClustersObj from './remote_clusters.devdocs.json';
diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx
index 908f8b9b0e194..db7489c8e0f67 100644
--- a/api_docs/reporting.mdx
+++ b/api_docs/reporting.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting
title: "reporting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the reporting plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting']
---
import reportingObj from './reporting.devdocs.json';
diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx
index acfe380ba50f3..82eb5d37a29f3 100644
--- a/api_docs/rollup.mdx
+++ b/api_docs/rollup.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup
title: "rollup"
image: https://source.unsplash.com/400x175/?github
description: API docs for the rollup plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup']
---
import rollupObj from './rollup.devdocs.json';
diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx
index 221610e06519f..7472749738569 100644
--- a/api_docs/rule_registry.mdx
+++ b/api_docs/rule_registry.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry
title: "ruleRegistry"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ruleRegistry plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry']
---
import ruleRegistryObj from './rule_registry.devdocs.json';
diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx
index 3f0297e5ab6a7..4122d9f383e73 100644
--- a/api_docs/runtime_fields.mdx
+++ b/api_docs/runtime_fields.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields
title: "runtimeFields"
image: https://source.unsplash.com/400x175/?github
description: API docs for the runtimeFields plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields']
---
import runtimeFieldsObj from './runtime_fields.devdocs.json';
diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx
index dcb2a4cc3702b..1de39b0c710aa 100644
--- a/api_docs/saved_objects.mdx
+++ b/api_docs/saved_objects.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects
title: "savedObjects"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjects plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects']
---
import savedObjectsObj from './saved_objects.devdocs.json';
diff --git a/api_docs/saved_objects_finder.devdocs.json b/api_docs/saved_objects_finder.devdocs.json
index d33b50de2badc..866969ae30c37 100644
--- a/api_docs/saved_objects_finder.devdocs.json
+++ b/api_docs/saved_objects_finder.devdocs.json
@@ -36,6 +36,16 @@
"text": "SavedObjectsTaggingApi"
},
" | undefined) => (props: ",
+ {
+ "pluginId": "@kbn/shared-ux-table-persist",
+ "scope": "common",
+ "docId": "kibKbnSharedUxTablePersistPluginApi",
+ "section": "def-common.HOCProps",
+ "text": "HOCProps"
+ },
+ "<",
+ "SavedObjectFinderItem",
+ ", ",
{
"pluginId": "savedObjectsFinder",
"scope": "public",
@@ -43,7 +53,7 @@
"section": "def-public.SavedObjectFinderProps",
"text": "SavedObjectFinderProps"
},
- ") => React.JSX.Element"
+ ">) => React.JSX.Element"
],
"path": "src/plugins/saved_objects_finder/public/finder/index.tsx",
"deprecated": false,
@@ -126,6 +136,16 @@
"description": [],
"signature": [
"(props: ",
+ {
+ "pluginId": "@kbn/shared-ux-table-persist",
+ "scope": "common",
+ "docId": "kibKbnSharedUxTablePersistPluginApi",
+ "section": "def-common.HOCProps",
+ "text": "HOCProps"
+ },
+ "<",
+ "SavedObjectFinderItem",
+ ", ",
{
"pluginId": "savedObjectsFinder",
"scope": "public",
@@ -133,7 +153,7 @@
"section": "def-public.SavedObjectFinderProps",
"text": "SavedObjectFinderProps"
},
- ") => React.JSX.Element"
+ ">) => React.JSX.Element"
],
"path": "src/plugins/saved_objects_finder/public/finder/index.tsx",
"deprecated": false,
@@ -147,13 +167,24 @@
"label": "props",
"description": [],
"signature": [
+ {
+ "pluginId": "@kbn/shared-ux-table-persist",
+ "scope": "common",
+ "docId": "kibKbnSharedUxTablePersistPluginApi",
+ "section": "def-common.HOCProps",
+ "text": "HOCProps"
+ },
+ "<",
+ "SavedObjectFinderItem",
+ ", ",
{
"pluginId": "savedObjectsFinder",
"scope": "public",
"docId": "kibSavedObjectsFinderPluginApi",
"section": "def-public.SavedObjectFinderProps",
"text": "SavedObjectFinderProps"
- }
+ },
+ ">"
],
"path": "src/plugins/saved_objects_finder/public/finder/index.tsx",
"deprecated": false,
diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx
index afa8c637e6c6f..8cf1ce9957e37 100644
--- a/api_docs/saved_objects_finder.mdx
+++ b/api_docs/saved_objects_finder.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder
title: "savedObjectsFinder"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsFinder plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder']
---
import savedObjectsFinderObj from './saved_objects_finder.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 25 | 0 | 25 | 0 |
+| 25 | 0 | 25 | 1 |
## Client
diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx
index c06046f2617c9..925106bd8d08c 100644
--- a/api_docs/saved_objects_management.mdx
+++ b/api_docs/saved_objects_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement
title: "savedObjectsManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsManagement plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement']
---
import savedObjectsManagementObj from './saved_objects_management.devdocs.json';
diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx
index 86960a5703c9e..ca588d2b735f8 100644
--- a/api_docs/saved_objects_tagging.mdx
+++ b/api_docs/saved_objects_tagging.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging
title: "savedObjectsTagging"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsTagging plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging']
---
import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json';
diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx
index 9c2c3e272efc7..74da07b00bf00 100644
--- a/api_docs/saved_objects_tagging_oss.mdx
+++ b/api_docs/saved_objects_tagging_oss.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss
title: "savedObjectsTaggingOss"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsTaggingOss plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss']
---
import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json';
diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx
index 84589f3c20cb2..8e33b2a2c1702 100644
--- a/api_docs/saved_search.mdx
+++ b/api_docs/saved_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch
title: "savedSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedSearch plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch']
---
import savedSearchObj from './saved_search.devdocs.json';
diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx
index 39fd37382dd99..461ebbc12aa3b 100644
--- a/api_docs/screenshot_mode.mdx
+++ b/api_docs/screenshot_mode.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode
title: "screenshotMode"
image: https://source.unsplash.com/400x175/?github
description: API docs for the screenshotMode plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode']
---
import screenshotModeObj from './screenshot_mode.devdocs.json';
diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx
index 0de6d6950cf11..e80ec2240e25d 100644
--- a/api_docs/screenshotting.mdx
+++ b/api_docs/screenshotting.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting
title: "screenshotting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the screenshotting plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting']
---
import screenshottingObj from './screenshotting.devdocs.json';
diff --git a/api_docs/search_assistant.mdx b/api_docs/search_assistant.mdx
index b009eba970833..8dd97cd61ed81 100644
--- a/api_docs/search_assistant.mdx
+++ b/api_docs/search_assistant.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchAssistant
title: "searchAssistant"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchAssistant plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchAssistant']
---
import searchAssistantObj from './search_assistant.devdocs.json';
diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx
index 45419b1da492b..6cb52a719810d 100644
--- a/api_docs/search_connectors.mdx
+++ b/api_docs/search_connectors.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors
title: "searchConnectors"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchConnectors plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors']
---
import searchConnectorsObj from './search_connectors.devdocs.json';
diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx
index 6df692b002699..399d01272324e 100644
--- a/api_docs/search_homepage.mdx
+++ b/api_docs/search_homepage.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage
title: "searchHomepage"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchHomepage plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage']
---
import searchHomepageObj from './search_homepage.devdocs.json';
diff --git a/api_docs/search_indices.devdocs.json b/api_docs/search_indices.devdocs.json
index 11be05829ab55..a50dd817dbf4d 100644
--- a/api_docs/search_indices.devdocs.json
+++ b/api_docs/search_indices.devdocs.json
@@ -194,7 +194,7 @@
"label": "privileges",
"description": [],
"signature": [
- "{ canCreateApiKeys: boolean; canCreateIndex: boolean; }"
+ "{ canCreateApiKeys: boolean; canManageIndex: boolean; canDeleteDocuments: boolean; }"
],
"path": "x-pack/plugins/search_indices/common/types.ts",
"deprecated": false,
diff --git a/api_docs/search_indices.mdx b/api_docs/search_indices.mdx
index 00126b6ee6544..df245f5f03571 100644
--- a/api_docs/search_indices.mdx
+++ b/api_docs/search_indices.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchIndices
title: "searchIndices"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchIndices plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchIndices']
---
import searchIndicesObj from './search_indices.devdocs.json';
diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx
index b8c6196aeb200..157d2776a67e7 100644
--- a/api_docs/search_inference_endpoints.mdx
+++ b/api_docs/search_inference_endpoints.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints
title: "searchInferenceEndpoints"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchInferenceEndpoints plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints']
---
import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json';
diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx
index 0d1aac7785924..ddb5240a9c75c 100644
--- a/api_docs/search_notebooks.mdx
+++ b/api_docs/search_notebooks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks
title: "searchNotebooks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchNotebooks plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks']
---
import searchNotebooksObj from './search_notebooks.devdocs.json';
diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx
index 61a6f99f5999d..6b8495406fab3 100644
--- a/api_docs/search_playground.mdx
+++ b/api_docs/search_playground.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground
title: "searchPlayground"
image: https://source.unsplash.com/400x175/?github
description: API docs for the searchPlayground plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground']
---
import searchPlaygroundObj from './search_playground.devdocs.json';
diff --git a/api_docs/security.mdx b/api_docs/security.mdx
index 2e9342a74b11c..f3ebd9cff5f9e 100644
--- a/api_docs/security.mdx
+++ b/api_docs/security.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security
title: "security"
image: https://source.unsplash.com/400x175/?github
description: API docs for the security plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security']
---
import securityObj from './security.devdocs.json';
diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json
index 34c21c3ec482d..be3a215235f75 100644
--- a/api_docs/security_solution.devdocs.json
+++ b/api_docs/security_solution.devdocs.json
@@ -1622,17 +1622,6 @@
"deprecated": false,
"trackAdoption": false
},
- {
- "parentPluginId": "securitySolution",
- "id": "def-public.TimelineModel.isLoading",
- "type": "boolean",
- "tags": [],
- "label": "isLoading",
- "description": [],
- "path": "x-pack/plugins/security_solution/public/timelines/store/model.ts",
- "deprecated": false,
- "trackAdoption": false
- },
{
"parentPluginId": "securitySolution",
"id": "def-public.TimelineModel.selectAll",
diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx
index 373338937bc0e..eabc79c042d67 100644
--- a/api_docs/security_solution.mdx
+++ b/api_docs/security_solution.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution
title: "securitySolution"
image: https://source.unsplash.com/400x175/?github
description: API docs for the securitySolution plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution']
---
import securitySolutionObj from './security_solution.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 188 | 0 | 120 | 33 |
+| 187 | 0 | 119 | 33 |
## Client
diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx
index 559c09dbf06e2..94fdf277f8368 100644
--- a/api_docs/security_solution_ess.mdx
+++ b/api_docs/security_solution_ess.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss
title: "securitySolutionEss"
image: https://source.unsplash.com/400x175/?github
description: API docs for the securitySolutionEss plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss']
---
import securitySolutionEssObj from './security_solution_ess.devdocs.json';
diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx
index e0065df4ecacc..e70dcc4730fc3 100644
--- a/api_docs/security_solution_serverless.mdx
+++ b/api_docs/security_solution_serverless.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless
title: "securitySolutionServerless"
image: https://source.unsplash.com/400x175/?github
description: API docs for the securitySolutionServerless plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless']
---
import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json';
diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx
index 8749fe4d92660..d2d0f195fa048 100644
--- a/api_docs/serverless.mdx
+++ b/api_docs/serverless.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless
title: "serverless"
image: https://source.unsplash.com/400x175/?github
description: API docs for the serverless plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless']
---
import serverlessObj from './serverless.devdocs.json';
diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx
index 00ee21ea02b09..6210a8772fd0e 100644
--- a/api_docs/serverless_observability.mdx
+++ b/api_docs/serverless_observability.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability
title: "serverlessObservability"
image: https://source.unsplash.com/400x175/?github
description: API docs for the serverlessObservability plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability']
---
import serverlessObservabilityObj from './serverless_observability.devdocs.json';
diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx
index 2db46e3c68490..2d7e7a0e7d7c4 100644
--- a/api_docs/serverless_search.mdx
+++ b/api_docs/serverless_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch
title: "serverlessSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the serverlessSearch plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch']
---
import serverlessSearchObj from './serverless_search.devdocs.json';
diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx
index 7b62a224989d0..8b40bb2dd322e 100644
--- a/api_docs/session_view.mdx
+++ b/api_docs/session_view.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView
title: "sessionView"
image: https://source.unsplash.com/400x175/?github
description: API docs for the sessionView plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView']
---
import sessionViewObj from './session_view.devdocs.json';
diff --git a/api_docs/share.mdx b/api_docs/share.mdx
index 45774f7e2d842..2139cb04491bb 100644
--- a/api_docs/share.mdx
+++ b/api_docs/share.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share
title: "share"
image: https://source.unsplash.com/400x175/?github
description: API docs for the share plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share']
---
import shareObj from './share.devdocs.json';
diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx
index 7b3f527a49f9d..b22401ebe551a 100644
--- a/api_docs/slo.mdx
+++ b/api_docs/slo.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo
title: "slo"
image: https://source.unsplash.com/400x175/?github
description: API docs for the slo plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo']
---
import sloObj from './slo.devdocs.json';
diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx
index a9e05d6cdfd98..46db8d0a9994e 100644
--- a/api_docs/snapshot_restore.mdx
+++ b/api_docs/snapshot_restore.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore
title: "snapshotRestore"
image: https://source.unsplash.com/400x175/?github
description: API docs for the snapshotRestore plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore']
---
import snapshotRestoreObj from './snapshot_restore.devdocs.json';
diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx
index 55be4bf34542e..1d7f1b0c7bfc6 100644
--- a/api_docs/spaces.mdx
+++ b/api_docs/spaces.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces
title: "spaces"
image: https://source.unsplash.com/400x175/?github
description: API docs for the spaces plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces']
---
import spacesObj from './spaces.devdocs.json';
diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx
index 9c71d4cda67db..15d17a8701e2a 100644
--- a/api_docs/stack_alerts.mdx
+++ b/api_docs/stack_alerts.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts
title: "stackAlerts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the stackAlerts plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts']
---
import stackAlertsObj from './stack_alerts.devdocs.json';
diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx
index 94587d12e043b..a77013bb1792d 100644
--- a/api_docs/stack_connectors.mdx
+++ b/api_docs/stack_connectors.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors
title: "stackConnectors"
image: https://source.unsplash.com/400x175/?github
description: API docs for the stackConnectors plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors']
---
import stackConnectorsObj from './stack_connectors.devdocs.json';
diff --git a/api_docs/streams.mdx b/api_docs/streams.mdx
index 7a5b3130362ce..51481a76fb2b0 100644
--- a/api_docs/streams.mdx
+++ b/api_docs/streams.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/streams
title: "streams"
image: https://source.unsplash.com/400x175/?github
description: API docs for the streams plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'streams']
---
import streamsObj from './streams.devdocs.json';
diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx
index a3357e3e444b1..7a13f204d27d5 100644
--- a/api_docs/task_manager.mdx
+++ b/api_docs/task_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager
title: "taskManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the taskManager plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager']
---
import taskManagerObj from './task_manager.devdocs.json';
diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx
index 6ab5a230f505f..bfb78a2f949e4 100644
--- a/api_docs/telemetry.mdx
+++ b/api_docs/telemetry.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry
title: "telemetry"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetry plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry']
---
import telemetryObj from './telemetry.devdocs.json';
diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx
index 76d235e1138da..5861a8251a767 100644
--- a/api_docs/telemetry_collection_manager.mdx
+++ b/api_docs/telemetry_collection_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager
title: "telemetryCollectionManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetryCollectionManager plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager']
---
import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json';
diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx
index 87cfd065698b6..b92670a8084b8 100644
--- a/api_docs/telemetry_management_section.mdx
+++ b/api_docs/telemetry_management_section.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection
title: "telemetryManagementSection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetryManagementSection plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection']
---
import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json';
diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx
index b10fbeff24ed9..ed0ce98e5da82 100644
--- a/api_docs/threat_intelligence.mdx
+++ b/api_docs/threat_intelligence.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence
title: "threatIntelligence"
image: https://source.unsplash.com/400x175/?github
description: API docs for the threatIntelligence plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence']
---
import threatIntelligenceObj from './threat_intelligence.devdocs.json';
diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx
index 6502ee5852668..50635b3ce597b 100644
--- a/api_docs/timelines.mdx
+++ b/api_docs/timelines.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines
title: "timelines"
image: https://source.unsplash.com/400x175/?github
description: API docs for the timelines plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines']
---
import timelinesObj from './timelines.devdocs.json';
diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx
index 3399b36b2eb68..d1d34de64765d 100644
--- a/api_docs/transform.mdx
+++ b/api_docs/transform.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform
title: "transform"
image: https://source.unsplash.com/400x175/?github
description: API docs for the transform plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform']
---
import transformObj from './transform.devdocs.json';
diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx
index 61879a7949cb9..2ab50bd744c93 100644
--- a/api_docs/triggers_actions_ui.mdx
+++ b/api_docs/triggers_actions_ui.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi
title: "triggersActionsUi"
image: https://source.unsplash.com/400x175/?github
description: API docs for the triggersActionsUi plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi']
---
import triggersActionsUiObj from './triggers_actions_ui.devdocs.json';
diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx
index dcc35afa83f5c..33176238a3d4c 100644
--- a/api_docs/ui_actions.mdx
+++ b/api_docs/ui_actions.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions
title: "uiActions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the uiActions plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions']
---
import uiActionsObj from './ui_actions.devdocs.json';
diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx
index ef8269a852d2d..2bd93d9aac558 100644
--- a/api_docs/ui_actions_enhanced.mdx
+++ b/api_docs/ui_actions_enhanced.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced
title: "uiActionsEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the uiActionsEnhanced plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced']
---
import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json';
diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx
index 9930ef3ff36ee..a44fb45c590f5 100644
--- a/api_docs/unified_doc_viewer.mdx
+++ b/api_docs/unified_doc_viewer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer
title: "unifiedDocViewer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedDocViewer plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer']
---
import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json';
diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx
index 5b7119ff1e357..ca05464f6756d 100644
--- a/api_docs/unified_histogram.mdx
+++ b/api_docs/unified_histogram.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram
title: "unifiedHistogram"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedHistogram plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram']
---
import unifiedHistogramObj from './unified_histogram.devdocs.json';
diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx
index e72d80dde3808..18690587f94c9 100644
--- a/api_docs/unified_search.mdx
+++ b/api_docs/unified_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch
title: "unifiedSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedSearch plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch']
---
import unifiedSearchObj from './unified_search.devdocs.json';
diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx
index 36376743a819c..a3918a98aeaf0 100644
--- a/api_docs/unified_search_autocomplete.mdx
+++ b/api_docs/unified_search_autocomplete.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete
title: "unifiedSearch.autocomplete"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedSearch.autocomplete plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete']
---
import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json';
diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx
index 1f29ed363a8ef..1f30689e4767a 100644
--- a/api_docs/uptime.mdx
+++ b/api_docs/uptime.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime
title: "uptime"
image: https://source.unsplash.com/400x175/?github
description: API docs for the uptime plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime']
---
import uptimeObj from './uptime.devdocs.json';
diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx
index 98bdd8f04d112..1da3998e7d737 100644
--- a/api_docs/url_forwarding.mdx
+++ b/api_docs/url_forwarding.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding
title: "urlForwarding"
image: https://source.unsplash.com/400x175/?github
description: API docs for the urlForwarding plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding']
---
import urlForwardingObj from './url_forwarding.devdocs.json';
diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx
index e1e458adc9a5d..8b5f81cd130c9 100644
--- a/api_docs/usage_collection.mdx
+++ b/api_docs/usage_collection.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection
title: "usageCollection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the usageCollection plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection']
---
import usageCollectionObj from './usage_collection.devdocs.json';
diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx
index ec6e8a643f54a..d2c6eb2eac9fb 100644
--- a/api_docs/ux.mdx
+++ b/api_docs/ux.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux
title: "ux"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ux plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux']
---
import uxObj from './ux.devdocs.json';
diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx
index 44ee4694e5f4b..28d6baa8e07b6 100644
--- a/api_docs/vis_default_editor.mdx
+++ b/api_docs/vis_default_editor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor
title: "visDefaultEditor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visDefaultEditor plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor']
---
import visDefaultEditorObj from './vis_default_editor.devdocs.json';
diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx
index 0919f05d411c8..82630aad9287a 100644
--- a/api_docs/vis_type_gauge.mdx
+++ b/api_docs/vis_type_gauge.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge
title: "visTypeGauge"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeGauge plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge']
---
import visTypeGaugeObj from './vis_type_gauge.devdocs.json';
diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx
index 162be3f2d6e9f..8ecee7156cd84 100644
--- a/api_docs/vis_type_heatmap.mdx
+++ b/api_docs/vis_type_heatmap.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap
title: "visTypeHeatmap"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeHeatmap plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap']
---
import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json';
diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx
index d6cafc8e57a8e..2fed52ab7e710 100644
--- a/api_docs/vis_type_pie.mdx
+++ b/api_docs/vis_type_pie.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie
title: "visTypePie"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypePie plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie']
---
import visTypePieObj from './vis_type_pie.devdocs.json';
diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx
index b25c97eac561f..f9106d16c532f 100644
--- a/api_docs/vis_type_table.mdx
+++ b/api_docs/vis_type_table.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable
title: "visTypeTable"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTable plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable']
---
import visTypeTableObj from './vis_type_table.devdocs.json';
diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx
index 4e5d25eff1a7b..599a402469c0f 100644
--- a/api_docs/vis_type_timelion.mdx
+++ b/api_docs/vis_type_timelion.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion
title: "visTypeTimelion"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTimelion plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion']
---
import visTypeTimelionObj from './vis_type_timelion.devdocs.json';
diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx
index 32d6bae3fb8ee..b87b3c9886a1f 100644
--- a/api_docs/vis_type_timeseries.mdx
+++ b/api_docs/vis_type_timeseries.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries
title: "visTypeTimeseries"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTimeseries plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries']
---
import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json';
diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx
index a57d4eda79831..8aaa38ef75b15 100644
--- a/api_docs/vis_type_vega.mdx
+++ b/api_docs/vis_type_vega.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega
title: "visTypeVega"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeVega plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega']
---
import visTypeVegaObj from './vis_type_vega.devdocs.json';
diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx
index f8bebd50bbaae..f4cde283ff9d8 100644
--- a/api_docs/vis_type_vislib.mdx
+++ b/api_docs/vis_type_vislib.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib
title: "visTypeVislib"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeVislib plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib']
---
import visTypeVislibObj from './vis_type_vislib.devdocs.json';
diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx
index e4ef617635c0e..55367e6537d98 100644
--- a/api_docs/vis_type_xy.mdx
+++ b/api_docs/vis_type_xy.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy
title: "visTypeXy"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeXy plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy']
---
import visTypeXyObj from './vis_type_xy.devdocs.json';
diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx
index cd03c879191db..c11feff9f4f74 100644
--- a/api_docs/visualizations.mdx
+++ b/api_docs/visualizations.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations
title: "visualizations"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visualizations plugin
-date: 2024-11-18
+date: 2024-11-19
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations']
---
import visualizationsObj from './visualizations.devdocs.json';
diff --git a/config/serverless.security.yml b/config/serverless.security.yml
index 5057fa193bef4..d7c1a13822ccf 100644
--- a/config/serverless.security.yml
+++ b/config/serverless.security.yml
@@ -92,6 +92,9 @@ xpack.fleet.internal.registry.excludePackages: [
# ML integrations
'dga',
+
+ # Unsupported in serverless
+ 'cloud-defend',
]
# fleet_server package installed to publish agent metrics
xpack.fleet.packages:
diff --git a/config/serverless.yml b/config/serverless.yml
index 75be6151e3bb2..0967df966f61a 100644
--- a/config/serverless.yml
+++ b/config/serverless.yml
@@ -7,6 +7,7 @@ xpack.fleet.internal.disableILMPolicies: true
xpack.fleet.internal.activeAgentsSoftLimit: 25000
xpack.fleet.internal.onlyAllowAgentUpgradeToKnownVersions: true
xpack.fleet.internal.retrySetupOnBoot: true
+xpack.fleet.internal.useMeteringApi: true
## Fine-tune the feature privileges.
xpack.features.overrides:
diff --git a/docs/upgrade-notes.asciidoc b/docs/upgrade-notes.asciidoc
index c2d866f90eed3..4d4208b2253f7 100644
--- a/docs/upgrade-notes.asciidoc
+++ b/docs/upgrade-notes.asciidoc
@@ -49,6 +49,32 @@ For Elastic Security release information, refer to {security-guide}/release-note
[float]
==== Kibana APIs
+[discrete]
+[[breaking-199656]]
+.Removed all security v1 endpoints (9.0.0)
+[%collapsible]
+====
+*Details* +
+All `v1` Kibana security HTTP endpoints have been removed.
+
+`GET /api/security/v1/logout` has been replaced by `GET /api/security/logout`
+`GET /api/security/v1/oidc/implicit` has been replaced by `GET /api/security/oidc/implicit`
+`GET /api/security/v1/oidc` has been replaced by GET `/api/security/oidc/callback`
+`POST /api/security/v1/oidc` has been replaced by POST `/api/security/oidc/initiate_login`
+`POST /api/security/v1/saml` has been replaced by POST `/api/security/saml/callback`
+`GET /api/security/v1/me` has been removed with no replacement.
+
+For more information, refer to {kibana-pull}199656[#199656].
+
+*Impact* +
+Any HTTP API calls to the `v1` Kibana security endpoints will fail with a 404 status code starting from version 9.0.0.
+Third party OIDC and SAML identity providers configured with `v1` endpoints will no longer work.
+
+*Action* +
+Update any OIDC and SAML identity providers to reference the corresponding replacement endpoint listed above.
+Remove references to the `/api/security/v1/me` endpoint from any automations, applications, tooling, and scripts.
+====
+
[discrete]
[[breaking-193792]]
.Access to all internal APIs is blocked (9.0.0)
@@ -814,18 +840,6 @@ The legacy audit logger has been removed. For more information, refer to {kibana
Audit logs will be written to the default location in the new ECS format. To change the output file, filter events, and more, use the <>.
====
-[discrete]
-[[breaking-47929]]
-.[Security] Removed `/api/security/v1/saml` route. (8.0)
-[%collapsible]
-====
-*Details* +
-The `/api/security/v1/saml` route has been removed and is reflected in the kibana.yml `server.xsrf.whitelist` setting, {es}, and the Identity Provider SAML settings. For more information, refer to {kibana-pull}47929[#47929]
-
-*Impact* +
-Use the `/api/security/saml/callback` route, or wait to upgrade to 8.0.0-alpha2 when the `/api/security/saml/callback` route breaking change is reverted.
-====
-
[discrete]
[[breaking-41700]]
.[Security] Legacy browsers rejected by default. (8.0)
diff --git a/examples/content_management_examples/public/examples/finder/finder_app.tsx b/examples/content_management_examples/public/examples/finder/finder_app.tsx
index 99ec949fac7d1..b8aaa6fe5f34b 100644
--- a/examples/content_management_examples/public/examples/finder/finder_app.tsx
+++ b/examples/content_management_examples/public/examples/finder/finder_app.tsx
@@ -23,6 +23,7 @@ export const FinderApp = (props: {
/packages/content-management/favorites/favorites_common'],
+};
diff --git a/packages/content-management/favorites/favorites_common/kibana.jsonc b/packages/content-management/favorites/favorites_common/kibana.jsonc
new file mode 100644
index 0000000000000..69e13e656639b
--- /dev/null
+++ b/packages/content-management/favorites/favorites_common/kibana.jsonc
@@ -0,0 +1,5 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/content-management-favorites-common",
+ "owner": "@elastic/appex-sharedux"
+}
diff --git a/packages/content-management/favorites/favorites_common/package.json b/packages/content-management/favorites/favorites_common/package.json
new file mode 100644
index 0000000000000..cb3a685ebc064
--- /dev/null
+++ b/packages/content-management/favorites/favorites_common/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "@kbn/content-management-favorites-common",
+ "private": true,
+ "version": "1.0.0",
+ "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0"
+}
\ No newline at end of file
diff --git a/packages/content-management/favorites/favorites_common/tsconfig.json b/packages/content-management/favorites/favorites_common/tsconfig.json
new file mode 100644
index 0000000000000..0d78dace105e1
--- /dev/null
+++ b/packages/content-management/favorites/favorites_common/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "target/types",
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ ],
+ "exclude": [
+ "target/**/*"
+ ],
+ "kbn_references": []
+}
diff --git a/packages/content-management/favorites/favorites_public/src/favorites_client.ts b/packages/content-management/favorites/favorites_public/src/favorites_client.ts
index 3b3d439caecda..84c44db5fd64c 100644
--- a/packages/content-management/favorites/favorites_public/src/favorites_client.ts
+++ b/packages/content-management/favorites/favorites_public/src/favorites_client.ts
@@ -9,36 +9,52 @@
import type { HttpStart } from '@kbn/core-http-browser';
import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
-import type { GetFavoritesResponse } from '@kbn/content-management-favorites-server';
+import type {
+ GetFavoritesResponse as GetFavoritesResponseServer,
+ AddFavoriteResponse,
+ RemoveFavoriteResponse,
+} from '@kbn/content-management-favorites-server';
-export interface FavoritesClientPublic {
- getFavorites(): Promise;
- addFavorite({ id }: { id: string }): Promise;
- removeFavorite({ id }: { id: string }): Promise;
+export interface GetFavoritesResponse
+ extends GetFavoritesResponseServer {
+ favoriteMetadata: Metadata extends object ? Record : never;
+}
+
+type AddFavoriteRequest = Metadata extends object
+ ? { id: string; metadata: Metadata }
+ : { id: string };
+
+export interface FavoritesClientPublic {
+ getFavorites(): Promise>;
+ addFavorite(params: AddFavoriteRequest): Promise;
+ removeFavorite(params: { id: string }): Promise;
getFavoriteType(): string;
reportAddFavoriteClick(): void;
reportRemoveFavoriteClick(): void;
}
-export class FavoritesClient implements FavoritesClientPublic {
+export class FavoritesClient
+ implements FavoritesClientPublic
+{
constructor(
private readonly appName: string,
private readonly favoriteObjectType: string,
private readonly deps: { http: HttpStart; usageCollection?: UsageCollectionStart }
) {}
- public async getFavorites(): Promise {
+ public async getFavorites(): Promise> {
return this.deps.http.get(`/internal/content_management/favorites/${this.favoriteObjectType}`);
}
- public async addFavorite({ id }: { id: string }): Promise {
+ public async addFavorite(params: AddFavoriteRequest): Promise {
return this.deps.http.post(
- `/internal/content_management/favorites/${this.favoriteObjectType}/${id}/favorite`
+ `/internal/content_management/favorites/${this.favoriteObjectType}/${params.id}/favorite`,
+ { body: 'metadata' in params ? JSON.stringify({ metadata: params.metadata }) : undefined }
);
}
- public async removeFavorite({ id }: { id: string }): Promise {
+ public async removeFavorite({ id }: { id: string }): Promise {
return this.deps.http.post(
`/internal/content_management/favorites/${this.favoriteObjectType}/${id}/unfavorite`
);
diff --git a/packages/content-management/favorites/favorites_public/src/favorites_query.tsx b/packages/content-management/favorites/favorites_public/src/favorites_query.tsx
index e3ca1e4ed202d..63e8ad3a7ef75 100644
--- a/packages/content-management/favorites/favorites_public/src/favorites_query.tsx
+++ b/packages/content-management/favorites/favorites_public/src/favorites_query.tsx
@@ -11,6 +11,7 @@ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { i18n } from '@kbn/i18n';
import React from 'react';
+import type { IHttpFetchError } from '@kbn/core-http-browser';
import { useFavoritesClient, useFavoritesContext } from './favorites_context';
const favoritesKeys = {
@@ -54,14 +55,14 @@ export const useAddFavorite = () => {
onSuccess: (data) => {
queryClient.setQueryData(favoritesKeys.byType(favoritesClient!.getFavoriteType()), data);
},
- onError: (error: Error) => {
+ onError: (error: IHttpFetchError<{ message?: string }>) => {
notifyError?.(
<>
{i18n.translate('contentManagement.favorites.addFavoriteError', {
defaultMessage: 'Error adding to Starred',
})}
>,
- error?.message
+ error?.body?.message ?? error.message
);
},
}
diff --git a/packages/content-management/favorites/favorites_server/index.ts b/packages/content-management/favorites/favorites_server/index.ts
index bcb8d0bffba8c..2810102d9165c 100644
--- a/packages/content-management/favorites/favorites_server/index.ts
+++ b/packages/content-management/favorites/favorites_server/index.ts
@@ -7,4 +7,10 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { registerFavorites, type GetFavoritesResponse } from './src';
+export {
+ registerFavorites,
+ type GetFavoritesResponse,
+ type FavoritesSetup,
+ type AddFavoriteResponse,
+ type RemoveFavoriteResponse,
+} from './src';
diff --git a/packages/content-management/favorites/favorites_server/src/favorites_registry.ts b/packages/content-management/favorites/favorites_server/src/favorites_registry.ts
new file mode 100644
index 0000000000000..53fc6dc4b5260
--- /dev/null
+++ b/packages/content-management/favorites/favorites_server/src/favorites_registry.ts
@@ -0,0 +1,50 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+import { ObjectType } from '@kbn/config-schema';
+
+interface FavoriteTypeConfig {
+ typeMetadataSchema?: ObjectType;
+}
+
+export type FavoritesRegistrySetup = Pick;
+
+export class FavoritesRegistry {
+ private favoriteTypes = new Map();
+
+ registerFavoriteType(type: string, config: FavoriteTypeConfig = {}) {
+ if (this.favoriteTypes.has(type)) {
+ throw new Error(`Favorite type ${type} is already registered`);
+ }
+
+ this.favoriteTypes.set(type, config);
+ }
+
+ hasType(type: string) {
+ return this.favoriteTypes.has(type);
+ }
+
+ validateMetadata(type: string, metadata?: object) {
+ if (!this.hasType(type)) {
+ throw new Error(`Favorite type ${type} is not registered`);
+ }
+
+ const typeConfig = this.favoriteTypes.get(type)!;
+ const typeMetadataSchema = typeConfig.typeMetadataSchema;
+
+ if (typeMetadataSchema) {
+ typeMetadataSchema.validate(metadata);
+ } else {
+ if (metadata === undefined) {
+ return; /* ok */
+ } else {
+ throw new Error(`Favorite type ${type} does not support metadata`);
+ }
+ }
+ }
+}
diff --git a/packages/content-management/favorites/favorites_server/src/favorites_routes.ts b/packages/content-management/favorites/favorites_server/src/favorites_routes.ts
index 663d0181f3806..512b2cbe1260e 100644
--- a/packages/content-management/favorites/favorites_server/src/favorites_routes.ts
+++ b/packages/content-management/favorites/favorites_server/src/favorites_routes.ts
@@ -14,12 +14,9 @@ import {
SECURITY_EXTENSION_ID,
} from '@kbn/core/server';
import { schema } from '@kbn/config-schema';
-import { FavoritesService } from './favorites_service';
+import { FavoritesService, FavoritesLimitExceededError } from './favorites_service';
import { favoritesSavedObjectType } from './favorites_saved_object';
-
-// only dashboard is supported for now
-// TODO: make configurable or allow any string
-const typeSchema = schema.oneOf([schema.literal('dashboard')]);
+import { FavoritesRegistry } from './favorites_registry';
/**
* @public
@@ -27,9 +24,45 @@ const typeSchema = schema.oneOf([schema.literal('dashboard')]);
*/
export interface GetFavoritesResponse {
favoriteIds: string[];
+ favoriteMetadata?: Record;
+}
+
+export interface AddFavoriteResponse {
+ favoriteIds: string[];
}
-export function registerFavoritesRoutes({ core, logger }: { core: CoreSetup; logger: Logger }) {
+export interface RemoveFavoriteResponse {
+ favoriteIds: string[];
+}
+
+export function registerFavoritesRoutes({
+ core,
+ logger,
+ favoritesRegistry,
+}: {
+ core: CoreSetup;
+ logger: Logger;
+ favoritesRegistry: FavoritesRegistry;
+}) {
+ const typeSchema = schema.string({
+ validate: (type) => {
+ if (!favoritesRegistry.hasType(type)) {
+ return `Unknown favorite type: ${type}`;
+ }
+ },
+ });
+
+ const metadataSchema = schema.maybe(
+ schema.object(
+ {
+ // validated later by the registry depending on the type
+ },
+ {
+ unknowns: 'allow',
+ }
+ )
+ );
+
const router = core.http.createRouter();
const getSavedObjectClient = (coreRequestHandlerContext: CoreRequestHandlerContext) => {
@@ -49,6 +82,13 @@ export function registerFavoritesRoutes({ core, logger }: { core: CoreSetup; log
id: schema.string(),
type: typeSchema,
}),
+ body: schema.maybe(
+ schema.nullable(
+ schema.object({
+ metadata: metadataSchema,
+ })
+ )
+ ),
},
// we don't protect the route with any access tags as
// we only give access to the current user's favorites ids
@@ -67,13 +107,35 @@ export function registerFavoritesRoutes({ core, logger }: { core: CoreSetup; log
const favorites = new FavoritesService(type, userId, {
savedObjectClient: getSavedObjectClient(coreRequestHandlerContext),
logger,
+ favoritesRegistry,
});
- const favoriteIds: GetFavoritesResponse = await favorites.addFavorite({
- id: request.params.id,
- });
+ const id = request.params.id;
+ const metadata = request.body?.metadata;
- return response.ok({ body: favoriteIds });
+ try {
+ favoritesRegistry.validateMetadata(type, metadata);
+ } catch (e) {
+ return response.badRequest({ body: { message: e.message } });
+ }
+
+ try {
+ const favoritesResult = await favorites.addFavorite({
+ id,
+ metadata,
+ });
+ const addFavoritesResponse: AddFavoriteResponse = {
+ favoriteIds: favoritesResult.favoriteIds,
+ };
+
+ return response.ok({ body: addFavoritesResponse });
+ } catch (e) {
+ if (e instanceof FavoritesLimitExceededError) {
+ return response.forbidden({ body: { message: e.message } });
+ }
+
+ throw e; // unexpected error, let the global error handler deal with it
+ }
}
);
@@ -102,12 +164,18 @@ export function registerFavoritesRoutes({ core, logger }: { core: CoreSetup; log
const favorites = new FavoritesService(type, userId, {
savedObjectClient: getSavedObjectClient(coreRequestHandlerContext),
logger,
+ favoritesRegistry,
});
- const favoriteIds: GetFavoritesResponse = await favorites.removeFavorite({
+ const favoritesResult: GetFavoritesResponse = await favorites.removeFavorite({
id: request.params.id,
});
- return response.ok({ body: favoriteIds });
+
+ const removeFavoriteResponse: RemoveFavoriteResponse = {
+ favoriteIds: favoritesResult.favoriteIds,
+ };
+
+ return response.ok({ body: removeFavoriteResponse });
}
);
@@ -135,12 +203,18 @@ export function registerFavoritesRoutes({ core, logger }: { core: CoreSetup; log
const favorites = new FavoritesService(type, userId, {
savedObjectClient: getSavedObjectClient(coreRequestHandlerContext),
logger,
+ favoritesRegistry,
});
- const getFavoritesResponse: GetFavoritesResponse = await favorites.getFavorites();
+ const favoritesResult = await favorites.getFavorites();
+
+ const favoritesResponse: GetFavoritesResponse = {
+ favoriteIds: favoritesResult.favoriteIds,
+ favoriteMetadata: favoritesResult.favoriteMetadata,
+ };
return response.ok({
- body: getFavoritesResponse,
+ body: favoritesResponse,
});
}
);
diff --git a/packages/content-management/favorites/favorites_server/src/favorites_saved_object.ts b/packages/content-management/favorites/favorites_server/src/favorites_saved_object.ts
index 73cd3b3ca185f..776133f408975 100644
--- a/packages/content-management/favorites/favorites_server/src/favorites_saved_object.ts
+++ b/packages/content-management/favorites/favorites_server/src/favorites_saved_object.ts
@@ -14,6 +14,7 @@ export interface FavoritesSavedObjectAttributes {
userId: string;
type: string;
favoriteIds: string[];
+ favoriteMetadata?: Record;
}
const schemaV1 = schema.object({
@@ -22,6 +23,10 @@ const schemaV1 = schema.object({
favoriteIds: schema.arrayOf(schema.string()),
});
+const schemaV3 = schemaV1.extends({
+ favoriteMetadata: schema.maybe(schema.object({}, { unknowns: 'allow' })),
+});
+
export const favoritesSavedObjectName = 'favorites';
export const favoritesSavedObjectType: SavedObjectsType = {
@@ -34,6 +39,7 @@ export const favoritesSavedObjectType: SavedObjectsType = {
userId: { type: 'keyword' },
type: { type: 'keyword' },
favoriteIds: { type: 'keyword' },
+ favoriteMetadata: { type: 'object', dynamic: false },
},
},
modelVersions: {
@@ -65,5 +71,19 @@ export const favoritesSavedObjectType: SavedObjectsType = {
create: schemaV1,
},
},
+ 3: {
+ changes: [
+ {
+ type: 'mappings_addition',
+ addedMappings: {
+ favoriteMetadata: { type: 'object', dynamic: false },
+ },
+ },
+ ],
+ schemas: {
+ forwardCompatibility: schemaV3.extends({}, { unknowns: 'ignore' }),
+ create: schemaV3,
+ },
+ },
},
};
diff --git a/packages/content-management/favorites/favorites_server/src/favorites_service.ts b/packages/content-management/favorites/favorites_server/src/favorites_service.ts
index 41c9b10f05507..6258e66897fa3 100644
--- a/packages/content-management/favorites/favorites_server/src/favorites_service.ts
+++ b/packages/content-management/favorites/favorites_server/src/favorites_service.ts
@@ -7,9 +7,17 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
+// eslint-disable-next-line max-classes-per-file
import type { SavedObject, SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server';
+import { FAVORITES_LIMIT } from '@kbn/content-management-favorites-common';
import { Logger, SavedObjectsErrorHelpers } from '@kbn/core/server';
import { favoritesSavedObjectType, FavoritesSavedObjectAttributes } from './favorites_saved_object';
+import { FavoritesRegistry } from './favorites_registry';
+
+export interface FavoritesState {
+ favoriteIds: string[];
+ favoriteMetadata?: Record;
+}
export class FavoritesService {
constructor(
@@ -18,23 +26,38 @@ export class FavoritesService {
private readonly deps: {
savedObjectClient: SavedObjectsClientContract;
logger: Logger;
+ favoritesRegistry: FavoritesRegistry;
}
) {
if (!this.userId || !this.type) {
// This should never happen, but just in case let's do a runtime check
throw new Error('userId and object type are required to use a favorite service');
}
+
+ if (!this.deps.favoritesRegistry.hasType(this.type)) {
+ throw new Error(`Favorite type ${this.type} is not registered`);
+ }
}
- public async getFavorites(): Promise<{ favoriteIds: string[] }> {
+ public async getFavorites(): Promise {
const favoritesSavedObject = await this.getFavoritesSavedObject();
const favoriteIds = favoritesSavedObject?.attributes?.favoriteIds ?? [];
+ const favoriteMetadata = favoritesSavedObject?.attributes?.favoriteMetadata;
- return { favoriteIds };
+ return { favoriteIds, favoriteMetadata };
}
- public async addFavorite({ id }: { id: string }): Promise<{ favoriteIds: string[] }> {
+ /**
+ * @throws {FavoritesLimitExceededError}
+ */
+ public async addFavorite({
+ id,
+ metadata,
+ }: {
+ id: string;
+ metadata?: object;
+ }): Promise {
let favoritesSavedObject = await this.getFavoritesSavedObject();
if (!favoritesSavedObject) {
@@ -44,14 +67,28 @@ export class FavoritesService {
userId: this.userId,
type: this.type,
favoriteIds: [id],
+ ...(metadata
+ ? {
+ favoriteMetadata: {
+ [id]: metadata,
+ },
+ }
+ : {}),
},
{
id: this.getFavoriteSavedObjectId(),
}
);
- return { favoriteIds: favoritesSavedObject.attributes.favoriteIds };
+ return {
+ favoriteIds: favoritesSavedObject.attributes.favoriteIds,
+ favoriteMetadata: favoritesSavedObject.attributes.favoriteMetadata,
+ };
} else {
+ if ((favoritesSavedObject.attributes.favoriteIds ?? []).length >= FAVORITES_LIMIT) {
+ throw new FavoritesLimitExceededError();
+ }
+
const newFavoriteIds = [
...(favoritesSavedObject.attributes.favoriteIds ?? []).filter(
(favoriteId) => favoriteId !== id
@@ -59,22 +96,34 @@ export class FavoritesService {
id,
];
+ const newFavoriteMetadata = metadata
+ ? {
+ ...favoritesSavedObject.attributes.favoriteMetadata,
+ [id]: metadata,
+ }
+ : undefined;
+
await this.deps.savedObjectClient.update(
favoritesSavedObjectType.name,
favoritesSavedObject.id,
{
favoriteIds: newFavoriteIds,
+ ...(newFavoriteMetadata
+ ? {
+ favoriteMetadata: newFavoriteMetadata,
+ }
+ : {}),
},
{
version: favoritesSavedObject.version,
}
);
- return { favoriteIds: newFavoriteIds };
+ return { favoriteIds: newFavoriteIds, favoriteMetadata: newFavoriteMetadata };
}
}
- public async removeFavorite({ id }: { id: string }): Promise<{ favoriteIds: string[] }> {
+ public async removeFavorite({ id }: { id: string }): Promise {
const favoritesSavedObject = await this.getFavoritesSavedObject();
if (!favoritesSavedObject) {
@@ -85,19 +134,36 @@ export class FavoritesService {
(favoriteId) => favoriteId !== id
);
+ const newFavoriteMetadata = favoritesSavedObject.attributes.favoriteMetadata
+ ? { ...favoritesSavedObject.attributes.favoriteMetadata }
+ : undefined;
+
+ if (newFavoriteMetadata) {
+ delete newFavoriteMetadata[id];
+ }
+
await this.deps.savedObjectClient.update(
favoritesSavedObjectType.name,
favoritesSavedObject.id,
{
+ ...favoritesSavedObject.attributes,
favoriteIds: newFavoriteIds,
+ ...(newFavoriteMetadata
+ ? {
+ favoriteMetadata: newFavoriteMetadata,
+ }
+ : {}),
},
{
version: favoritesSavedObject.version,
+ // We don't want to merge the attributes here because we want to remove the keys from the metadata
+ mergeAttributes: false,
}
);
return {
favoriteIds: newFavoriteIds,
+ favoriteMetadata: newFavoriteMetadata,
};
}
@@ -123,3 +189,14 @@ export class FavoritesService {
return `${this.type}:${this.userId}`;
}
}
+
+export class FavoritesLimitExceededError extends Error {
+ constructor() {
+ super(
+ `Limit reached: This list can contain a maximum of ${FAVORITES_LIMIT} items. Please remove an item before adding a new one.`
+ );
+
+ this.name = 'FavoritesLimitExceededError';
+ Object.setPrototypeOf(this, FavoritesLimitExceededError.prototype); // For TypeScript compatibility
+ }
+}
diff --git a/packages/content-management/favorites/favorites_server/src/index.ts b/packages/content-management/favorites/favorites_server/src/index.ts
index d6cdd51285b38..44e3b9f259a33 100644
--- a/packages/content-management/favorites/favorites_server/src/index.ts
+++ b/packages/content-management/favorites/favorites_server/src/index.ts
@@ -12,8 +12,19 @@ import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
import { registerFavoritesRoutes } from './favorites_routes';
import { favoritesSavedObjectType } from './favorites_saved_object';
import { registerFavoritesUsageCollection } from './favorites_usage_collection';
+import { FavoritesRegistry, FavoritesRegistrySetup } from './favorites_registry';
-export type { GetFavoritesResponse } from './favorites_routes';
+export type {
+ GetFavoritesResponse,
+ AddFavoriteResponse,
+ RemoveFavoriteResponse,
+} from './favorites_routes';
+
+/**
+ * @public
+ * Setup contract for the favorites feature.
+ */
+export type FavoritesSetup = FavoritesRegistrySetup;
/**
* @public
@@ -31,11 +42,14 @@ export function registerFavorites({
core: CoreSetup;
logger: Logger;
usageCollection?: UsageCollectionSetup;
-}) {
+}): FavoritesSetup {
+ const favoritesRegistry = new FavoritesRegistry();
core.savedObjects.registerType(favoritesSavedObjectType);
- registerFavoritesRoutes({ core, logger });
+ registerFavoritesRoutes({ core, logger, favoritesRegistry });
if (usageCollection) {
registerFavoritesUsageCollection({ core, usageCollection });
}
+
+ return favoritesRegistry;
}
diff --git a/packages/content-management/favorites/favorites_server/tsconfig.json b/packages/content-management/favorites/favorites_server/tsconfig.json
index 5a9ae392c875b..bbab19ade978b 100644
--- a/packages/content-management/favorites/favorites_server/tsconfig.json
+++ b/packages/content-management/favorites/favorites_server/tsconfig.json
@@ -19,5 +19,6 @@
"@kbn/core-saved-objects-api-server",
"@kbn/core-lifecycle-server",
"@kbn/usage-collection-plugin",
+ "@kbn/content-management-favorites-common",
]
}
diff --git a/packages/content-management/table_list_view_table/src/mocks.tsx b/packages/content-management/table_list_view_table/src/mocks.tsx
index 5d387096d829d..0697e5b14ad83 100644
--- a/packages/content-management/table_list_view_table/src/mocks.tsx
+++ b/packages/content-management/table_list_view_table/src/mocks.tsx
@@ -9,6 +9,7 @@
import React from 'react';
import { from } from 'rxjs';
+import type { IStorage } from '@kbn/kibana-utils-plugin/public';
import type { Services, TagListProps } from './services';
@@ -149,3 +150,22 @@ export const getStoryArgTypes = () => ({
defaultValue: false,
},
});
+
+export const localStorageMock = (): IStorage => {
+ let store: Record = {};
+
+ return {
+ getItem: (key: string) => {
+ return store[key] || null;
+ },
+ setItem: (key: string, value: unknown) => {
+ store[key] = value;
+ },
+ clear() {
+ store = {};
+ },
+ removeItem(key: string) {
+ delete store[key];
+ },
+ };
+};
diff --git a/packages/content-management/table_list_view_table/src/table_list_view.test.tsx b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx
index 38229399f2ec8..aebaca335db5f 100644
--- a/packages/content-management/table_list_view_table/src/table_list_view.test.tsx
+++ b/packages/content-management/table_list_view_table/src/table_list_view.test.tsx
@@ -18,7 +18,7 @@ import type { LocationDescriptor, History } from 'history';
import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view-common';
import { WithServices } from './__jest__';
-import { getTagList } from './mocks';
+import { getTagList, localStorageMock } from './mocks';
import { TableListViewTable, type TableListViewTableProps } from './table_list_view_table';
import { getActions } from './table_list_view.test.helpers';
import type { Services } from './services';
@@ -335,6 +335,12 @@ describe('TableListView', () => {
const totalItems = 30;
const updatedAt = new Date().toISOString();
+ beforeEach(() => {
+ Object.defineProperty(window, 'localStorage', {
+ value: localStorageMock(),
+ });
+ });
+
const hits: UserContentCommonSchema[] = [...Array(totalItems)].map((_, i) => ({
id: `item${i}`,
type: 'dashboard',
@@ -429,6 +435,54 @@ describe('TableListView', () => {
expect(firstRowTitle).toBe('Item 20');
expect(lastRowTitle).toBe('Item 29');
});
+
+ test('should persist the number of rows in the table', async () => {
+ let testBed: TestBed;
+
+ const tableId = 'myTable';
+
+ await act(async () => {
+ testBed = await setup({
+ initialPageSize,
+ findItems: jest.fn().mockResolvedValue({ total: hits.length, hits: [...hits] }),
+ id: tableId,
+ });
+ });
+
+ {
+ const { component, table, find } = testBed!;
+ component.update();
+
+ const { tableCellsValues } = table.getMetaData('itemsInMemTable');
+ expect(tableCellsValues.length).toBe(20); // 20 by default
+
+ let storageValue = localStorage.getItem(`tablePersist:${tableId}`);
+ expect(storageValue).toBe(null);
+
+ find('tablePaginationPopoverButton').simulate('click');
+ find('tablePagination-10-rows').simulate('click');
+
+ storageValue = localStorage.getItem(`tablePersist:${tableId}`);
+ expect(storageValue).not.toBe(null);
+ expect(JSON.parse(storageValue!).pageSize).toBe(10);
+ }
+
+ // Mount a second table and verify that is shows only 10 rows
+ {
+ await act(async () => {
+ testBed = await setup({
+ initialPageSize,
+ findItems: jest.fn().mockResolvedValue({ total: hits.length, hits: [...hits] }),
+ id: tableId,
+ });
+ });
+
+ const { component, table } = testBed!;
+ component.update();
+ const { tableCellsValues } = table.getMetaData('itemsInMemTable');
+ expect(tableCellsValues.length).toBe(10); // 10 items this time
+ }
+ });
});
describe('column sorting', () => {
diff --git a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx
index 1fe5123d54151..c7653c668f0df 100644
--- a/packages/content-management/table_list_view_table/src/table_list_view_table.tsx
+++ b/packages/content-management/table_list_view_table/src/table_list_view_table.tsx
@@ -43,6 +43,7 @@ import {
ContentInsightsProvider,
useContentInsightsServices,
} from '@kbn/content-management-content-insights-public';
+import { useEuiTablePersist } from '@kbn/shared-ux-table-persist';
import {
Table,
@@ -443,7 +444,7 @@ function TableListViewTableComp({
hasUpdatedAtMetadata,
hasCreatedByMetadata,
hasRecentlyAccessedMetadata,
- pagination,
+ pagination: _pagination,
tableSort,
tableFilter,
} = state;
@@ -903,7 +904,7 @@ function TableListViewTableComp({
[updateTableSortFilterAndPagination]
);
- const onTableChange = useCallback(
+ const customOnTableChange = useCallback(
(criteria: CriteriaWithPagination) => {
const data: {
sort?: State['tableSort'];
@@ -1038,6 +1039,20 @@ function TableListViewTableComp({
);
}, [entityName, fetchError]);
+ const { pageSize, onTableChange } = useEuiTablePersist({
+ tableId: listingId,
+ initialPageSize,
+ customOnTableChange,
+ pageSizeOptions: uniq([10, 20, 50, initialPageSize]).sort(),
+ });
+
+ const pagination = useMemo(() => {
+ return {
+ ..._pagination,
+ pageSize,
+ };
+ }, [_pagination, pageSize]);
+
// ------------
// Effects
// ------------
diff --git a/packages/content-management/table_list_view_table/tsconfig.json b/packages/content-management/table_list_view_table/tsconfig.json
index a5530ee717e49..90a96953570fb 100644
--- a/packages/content-management/table_list_view_table/tsconfig.json
+++ b/packages/content-management/table_list_view_table/tsconfig.json
@@ -37,7 +37,9 @@
"@kbn/content-management-user-profiles",
"@kbn/recently-accessed",
"@kbn/content-management-content-insights-public",
- "@kbn/content-management-favorites-public"
+ "@kbn/content-management-favorites-public",
+ "@kbn/kibana-utils-plugin",
+ "@kbn/shared-ux-table-persist"
],
"exclude": [
"target/**/*"
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx
index 38d69311d741e..b9949a6decf44 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx
+++ b/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx
@@ -9,7 +9,7 @@
import React from 'react';
import { shallow } from 'enzyme';
-import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common-internal';
+import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common';
import { StatusTable } from './status_table';
const state = {
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx
index 62e48467ae51f..6180860df780d 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx
+++ b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx
@@ -9,7 +9,7 @@
import React from 'react';
import { mountWithIntl, findTestSubject } from '@kbn/test-jest-helpers';
-import type { ServerVersion } from '@kbn/core-status-common-internal';
+import type { ServerVersion } from '@kbn/core-status-common';
import { VersionHeader } from './version_header';
const buildServerVersion = (parts: Partial = {}): ServerVersion => ({
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx
index 0dc64a3cb7db0..15c1f9d07a273 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx
+++ b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx
@@ -10,7 +10,7 @@
import React, { FC } from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
-import type { ServerVersion } from '@kbn/core-status-common-internal';
+import type { ServerVersion } from '@kbn/core-status-common';
interface VersionHeaderProps {
version: ServerVersion;
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts
index a63c5011dcaf8..c37db930de789 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts
+++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts
@@ -8,7 +8,7 @@
*/
import { httpServiceMock } from '@kbn/core-http-browser-mocks';
-import type { StatusResponse } from '@kbn/core-status-common-internal';
+import type { StatusResponse } from '@kbn/core-status-common';
import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks';
import { mocked } from '@kbn/core-metrics-collectors-server-mocks';
import { loadStatus } from './load_status';
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts
index f89e2196d2122..e8519030c3fdf 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts
+++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts
@@ -11,11 +11,11 @@ import numeral from '@elastic/numeral';
import { i18n } from '@kbn/i18n';
import type { HttpSetup } from '@kbn/core-http-browser';
import type { NotificationsSetup } from '@kbn/core-notifications-browser';
-import type { ServiceStatusLevelId } from '@kbn/core-status-common';
import type {
+ ServiceStatusLevelId,
StatusResponse,
StatusInfoServiceStatus as ServiceStatus,
-} from '@kbn/core-status-common-internal';
+} from '@kbn/core-status-common';
import type { DataType } from './format_number';
interface MetricMeta {
diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts
index 3d393bd8e4719..290845c4bdd08 100644
--- a/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts
+++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common-internal';
+import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common';
import { getLevelSortValue, groupByLevel, getHighestStatus } from './status_level';
import { FormattedStatus, StatusState } from './load_status';
diff --git a/packages/core/apps/core-apps-browser-internal/tsconfig.json b/packages/core/apps/core-apps-browser-internal/tsconfig.json
index a18bb3421a1f4..9902b12732760 100644
--- a/packages/core/apps/core-apps-browser-internal/tsconfig.json
+++ b/packages/core/apps/core-apps-browser-internal/tsconfig.json
@@ -24,7 +24,6 @@
"@kbn/core-application-browser",
"@kbn/core-application-browser-internal",
"@kbn/core-mount-utils-browser-internal",
- "@kbn/core-status-common-internal",
"@kbn/core-http-browser-internal",
"@kbn/core-application-browser-mocks",
"@kbn/core-notifications-browser-mocks",
diff --git a/packages/core/base/core-base-common/BUILD.bazel b/packages/core/base/core-base-common/BUILD.bazel
new file mode 100644
index 0000000000000..30c3b1ae616f4
--- /dev/null
+++ b/packages/core/base/core-base-common/BUILD.bazel
@@ -0,0 +1,35 @@
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
+
+SRCS = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ ],
+ exclude = [
+ "**/test_helpers.ts",
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+DEPS = [
+ "@npm//react",
+ "@npm//tslib",
+]
+
+js_library(
+ name = "core-base-common",
+ package_name = "@kbn/core-base-common",
+ srcs = ["package.json"] + SRCS,
+ deps = DEPS,
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts b/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts
index 804134cabd4b9..68fa84022ce34 100644
--- a/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts
+++ b/packages/core/injected-metadata/core-injected-metadata-browser-mocks/src/injected_metadata_service.mock.ts
@@ -57,6 +57,7 @@ const createSetupContractMock = () => {
setupContract.getPlugins.mockReturnValue([]);
setupContract.getTheme.mockReturnValue({
darkMode: false,
+ name: 'amsterdam',
version: 'v8',
stylesheetPaths: {
default: ['light-1.css'],
diff --git a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts
index 1ee75dbfc0d5d..e988420720900 100644
--- a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts
+++ b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts
@@ -41,6 +41,7 @@ export interface InjectedMetadataExternalUrlPolicy {
/** @internal */
export interface InjectedMetadataTheme {
darkMode: DarkModeValue;
+ name: string;
version: ThemeVersion;
stylesheetPaths: {
default: string[];
diff --git a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/date.ts b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/date.ts
index 53dadaafde667..e78ba6b62a7e3 100644
--- a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/date.ts
+++ b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/date.ts
@@ -12,7 +12,7 @@ import { last } from 'lodash';
import { LogRecord } from '@kbn/logging';
import { Conversion } from './types';
-const dateRegExp = /%date({(?[^}]+)})?({(?[^}]+)})?/g;
+const dateRegExp = /%date(?:\{(?[^}]+)\})?(?:\{(?[A-Za-z/_+-]+)\})?/g;
const formats = {
ISO8601: 'ISO8601',
@@ -29,7 +29,6 @@ function formatDate(
): string {
const momentDate = moment(date);
momentDate.tz(timezone ?? moment.tz.guess());
-
switch (dateFormat) {
case formats.ISO8601:
return momentDate.toISOString();
diff --git a/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.test.ts b/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.test.ts
index 2965703eda5d7..53409a5851bd6 100644
--- a/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.test.ts
+++ b/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.test.ts
@@ -326,6 +326,21 @@ describe('schema', () => {
`"Date format expected one of ISO8601, ISO8601_TZ, ABSOLUTE, UNIX, UNIX_MILLIS, but given: HH"`
);
});
+
+ it('fails on %date with schema too long', () => {
+ const generateLongFormat = () => {
+ const longFormat = [];
+ for (let i = 1; i < 1001; i++) {
+ longFormat.push(`${i}`);
+ }
+ return longFormat.join('');
+ };
+ expect(() =>
+ patternSchema.validate(`%date${generateLongFormat()}`)
+ ).toThrowErrorMatchingInlineSnapshot(
+ `"value has length [2898] but it must have a maximum length of [1000]."`
+ );
+ });
});
});
});
diff --git a/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.ts b/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.ts
index d4ee822b27f93..758dcc65af637 100644
--- a/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.ts
+++ b/packages/core/logging/core-logging-server-internal/src/layouts/pattern_layout.ts
@@ -24,6 +24,7 @@ import {
const DEFAULT_PATTERN = `[%date][%level][%logger] %message`;
export const patternSchema = schema.string({
+ maxLength: 1000,
validate: (string) => {
DateConversion.validate!(string);
},
diff --git a/packages/core/rendering/core-rendering-browser-internal/src/rendering_service.tsx b/packages/core/rendering/core-rendering-browser-internal/src/rendering_service.tsx
index 700dad544cd2b..12a597ba9318f 100644
--- a/packages/core/rendering/core-rendering-browser-internal/src/rendering_service.tsx
+++ b/packages/core/rendering/core-rendering-browser-internal/src/rendering_service.tsx
@@ -18,6 +18,7 @@ import type { I18nStart } from '@kbn/core-i18n-browser';
import type { OverlayStart } from '@kbn/core-overlays-browser';
import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
+import { APP_FIXED_VIEWPORT_ID } from '@kbn/core-rendering-browser';
import { AppWrapper } from './app_containers';
interface StartServices {
@@ -68,7 +69,7 @@ export class RenderingService {
{/* The App Wrapper outside of the fixed headers that accepts custom class names from apps */}
{/* Affixes a div to restrict the position of charts tooltip to the visible viewport minus the header */}
-
+
{/* The actual plugin/app */}
{appComponent}
diff --git a/packages/core/rendering/core-rendering-browser-internal/tsconfig.json b/packages/core/rendering/core-rendering-browser-internal/tsconfig.json
index 42c59f96b2471..4b0c009a0a033 100644
--- a/packages/core/rendering/core-rendering-browser-internal/tsconfig.json
+++ b/packages/core/rendering/core-rendering-browser-internal/tsconfig.json
@@ -26,7 +26,8 @@
"@kbn/core-analytics-browser-mocks",
"@kbn/core-analytics-browser",
"@kbn/core-i18n-browser",
- "@kbn/core-theme-browser"
+ "@kbn/core-theme-browser",
+ "@kbn/core-rendering-browser"
],
"exclude": [
"target/**/*",
diff --git a/packages/core/rendering/core-rendering-browser/README.md b/packages/core/rendering/core-rendering-browser/README.md
new file mode 100644
index 0000000000000..40141d7611e72
--- /dev/null
+++ b/packages/core/rendering/core-rendering-browser/README.md
@@ -0,0 +1,4 @@
+# @kbn/core-rendering-browser
+
+This package contains the types and implementation for Core's browser-side rendering service.
+
diff --git a/packages/core/status/core-status-common-internal/src/index.ts b/packages/core/rendering/core-rendering-browser/index.ts
similarity index 75%
rename from packages/core/status/core-status-common-internal/src/index.ts
rename to packages/core/rendering/core-rendering-browser/index.ts
index 60c51dcf47632..d8ccea264df05 100644
--- a/packages/core/status/core-status-common-internal/src/index.ts
+++ b/packages/core/rendering/core-rendering-browser/index.ts
@@ -7,11 +7,4 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export type {
- StatusInfo,
- StatusInfoCoreStatus,
- StatusInfoServiceStatus,
- StatusResponse,
- ServerVersion,
- ServerMetrics,
-} from './status';
+export { APP_FIXED_VIEWPORT_ID, useAppFixedViewport } from './src';
diff --git a/packages/core/status/core-status-common-internal/jest.config.js b/packages/core/rendering/core-rendering-browser/jest.config.js
similarity index 88%
rename from packages/core/status/core-status-common-internal/jest.config.js
rename to packages/core/rendering/core-rendering-browser/jest.config.js
index bc848cd656199..13f1819553812 100644
--- a/packages/core/status/core-status-common-internal/jest.config.js
+++ b/packages/core/rendering/core-rendering-browser/jest.config.js
@@ -10,5 +10,5 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
- roots: ['/packages/core/status/core-status-common-internal'],
+ roots: ['/packages/core/rendering/core-rendering-browser'],
};
diff --git a/packages/core/rendering/core-rendering-browser/kibana.jsonc b/packages/core/rendering/core-rendering-browser/kibana.jsonc
new file mode 100644
index 0000000000000..4b43c11865134
--- /dev/null
+++ b/packages/core/rendering/core-rendering-browser/kibana.jsonc
@@ -0,0 +1,5 @@
+{
+ "type": "shared-browser",
+ "id": "@kbn/core-rendering-browser",
+ "owner": "@elastic/kibana-core"
+}
diff --git a/packages/core/status/core-status-common-internal/package.json b/packages/core/rendering/core-rendering-browser/package.json
similarity index 74%
rename from packages/core/status/core-status-common-internal/package.json
rename to packages/core/rendering/core-rendering-browser/package.json
index d2c456b6dc96a..4f1fa6f68ef01 100644
--- a/packages/core/status/core-status-common-internal/package.json
+++ b/packages/core/rendering/core-rendering-browser/package.json
@@ -1,5 +1,5 @@
{
- "name": "@kbn/core-status-common-internal",
+ "name": "@kbn/core-rendering-browser",
"private": true,
"version": "1.0.0",
"author": "Kibana Core",
diff --git a/packages/core/status/core-status-common/src/index.ts b/packages/core/rendering/core-rendering-browser/src/index.ts
similarity index 69%
rename from packages/core/status/core-status-common/src/index.ts
rename to packages/core/rendering/core-rendering-browser/src/index.ts
index 7cfcc7dbf79a8..aad756d296561 100644
--- a/packages/core/status/core-status-common/src/index.ts
+++ b/packages/core/rendering/core-rendering-browser/src/index.ts
@@ -7,6 +7,4 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { ServiceStatusLevels } from './service_status';
-export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId } from './service_status';
-export type { CoreStatus } from './core_status';
+export { APP_FIXED_VIEWPORT_ID, useAppFixedViewport } from './use_app_fixed_viewport';
diff --git a/packages/core/rendering/core-rendering-browser/src/use_app_fixed_viewport.ts b/packages/core/rendering/core-rendering-browser/src/use_app_fixed_viewport.ts
new file mode 100644
index 0000000000000..ecf44a0018b49
--- /dev/null
+++ b/packages/core/rendering/core-rendering-browser/src/use_app_fixed_viewport.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import { useRef } from 'react';
+
+export const APP_FIXED_VIEWPORT_ID = 'app-fixed-viewport';
+
+export function useAppFixedViewport() {
+ const ref = useRef(document.getElementById(APP_FIXED_VIEWPORT_ID) ?? undefined);
+ return ref.current;
+}
diff --git a/packages/core/status/core-status-common-internal/tsconfig.json b/packages/core/rendering/core-rendering-browser/tsconfig.json
similarity index 65%
rename from packages/core/status/core-status-common-internal/tsconfig.json
rename to packages/core/rendering/core-rendering-browser/tsconfig.json
index 7d31fa090eb0f..3a932605dfa75 100644
--- a/packages/core/status/core-status-common-internal/tsconfig.json
+++ b/packages/core/rendering/core-rendering-browser/tsconfig.json
@@ -4,18 +4,15 @@
"outDir": "target/types",
"types": [
"jest",
- "node"
+ "node",
+ "react"
]
},
"include": [
"**/*.ts",
"**/*.tsx",
],
- "kbn_references": [
- "@kbn/core-status-common",
- "@kbn/core-metrics-server",
- "@kbn/config"
- ],
+ "kbn_references": [],
"exclude": [
"target/**/*",
]
diff --git a/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap b/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap
index c858b6a8470d2..8b1dc7ef53e15 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap
+++ b/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap
@@ -68,6 +68,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -149,6 +150,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -234,6 +236,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -315,6 +318,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -396,6 +400,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -481,6 +486,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -562,6 +568,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -643,6 +650,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -724,6 +732,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -814,6 +823,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -895,6 +905,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -985,6 +996,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1071,6 +1083,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1152,6 +1165,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1242,6 +1256,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1328,6 +1343,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1414,6 +1430,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
@@ -1502,6 +1519,7 @@ Object {
"serverBasePath": "/mock-server-basepath",
"theme": Object {
"darkMode": "theme:darkMode",
+ "name": "theme:name",
"stylesheetPaths": Object {
"dark": Array [
"/style-1.css",
diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
index 597e4159e4cc7..25d7e241325f3 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
@@ -34,6 +34,18 @@ const createPackageInfo = (parts: Partial = {}): PackageInfo => ({
...parts,
});
+const getClientGetMockImplementation =
+ ({ darkMode, name }: { darkMode?: boolean; name?: string } = {}) =>
+ (key: string) => {
+ switch (key) {
+ case 'theme:darkMode':
+ return Promise.resolve(darkMode ?? false);
+ case 'theme:name':
+ return Promise.resolve(name ?? 'amsterdam');
+ }
+ return Promise.resolve();
+ };
+
const createUiPlugins = (): UiPlugins => ({
public: new Map(),
internal: new Map(),
@@ -59,6 +71,7 @@ describe('bootstrapRenderer', () => {
getPluginsBundlePathsMock.mockReturnValue(new Map());
renderTemplateMock.mockReturnValue('__rendered__');
getJsDependencyPathsMock.mockReturnValue([]);
+ uiSettingsClient.get.mockImplementation(getClientGetMockImplementation());
renderer = bootstrapRendererFactory({
auth,
@@ -91,13 +104,17 @@ describe('bootstrapRenderer', () => {
uiSettingsClient,
});
- expect(uiSettingsClient.get).toHaveBeenCalledTimes(1);
+ expect(uiSettingsClient.get).toHaveBeenCalledTimes(2);
expect(uiSettingsClient.get).toHaveBeenCalledWith('theme:darkMode');
+ expect(uiSettingsClient.get).toHaveBeenCalledWith('theme:name');
});
it('calls getThemeTag with the values from the UiSettingsClient (true/dark) when the UserSettingsService is not provided', async () => {
- uiSettingsClient.get.mockResolvedValue(true);
-
+ uiSettingsClient.get.mockImplementation(
+ getClientGetMockImplementation({
+ darkMode: true,
+ })
+ );
const request = httpServerMock.createKibanaRequest();
await renderer({
@@ -107,13 +124,13 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: true,
});
});
it('calls getThemeTag with the values from the UiSettingsClient (false/light) when the UserSettingsService is not provided', async () => {
- uiSettingsClient.get.mockResolvedValue(false);
+ uiSettingsClient.get.mockImplementation(getClientGetMockImplementation({}));
const request = httpServerMock.createKibanaRequest();
@@ -124,7 +141,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: false,
});
});
@@ -150,7 +167,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: true,
});
});
@@ -166,7 +183,6 @@ describe('bootstrapRenderer', () => {
userSettingsService,
});
- uiSettingsClient.get.mockResolvedValue(true);
const request = httpServerMock.createKibanaRequest();
await renderer({
@@ -176,7 +192,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: false,
});
});
@@ -192,7 +208,6 @@ describe('bootstrapRenderer', () => {
userSettingsService,
});
- uiSettingsClient.get.mockResolvedValue(false);
const request = httpServerMock.createKibanaRequest();
await renderer({
@@ -202,7 +217,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: false,
});
});
@@ -218,7 +233,11 @@ describe('bootstrapRenderer', () => {
userSettingsService,
});
- uiSettingsClient.get.mockResolvedValue(true);
+ uiSettingsClient.get.mockImplementation(
+ getClientGetMockImplementation({
+ darkMode: true,
+ })
+ );
const request = httpServerMock.createKibanaRequest();
await renderer({
@@ -228,7 +247,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: true,
});
});
@@ -250,12 +269,17 @@ describe('bootstrapRenderer', () => {
uiSettingsClient,
});
- expect(uiSettingsClient.get).toHaveBeenCalledTimes(1);
+ expect(uiSettingsClient.get).toHaveBeenCalledTimes(2);
expect(uiSettingsClient.get).toHaveBeenCalledWith('theme:darkMode');
+ expect(uiSettingsClient.get).toHaveBeenCalledWith('theme:name');
});
it('calls getThemeTag with the correct parameters', async () => {
- uiSettingsClient.get.mockResolvedValue(true);
+ uiSettingsClient.get.mockImplementation(
+ getClientGetMockImplementation({
+ darkMode: true,
+ })
+ );
const request = httpServerMock.createKibanaRequest();
@@ -266,7 +290,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: true,
});
});
@@ -283,7 +307,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'system',
darkMode: false,
});
});
@@ -318,7 +342,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: false,
});
});
diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
index 8aa0d2a6c0387..5b8c267532d0b 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
@@ -9,7 +9,6 @@
import { createHash } from 'crypto';
import { PackageInfo } from '@kbn/config';
-import { ThemeVersion } from '@kbn/ui-shared-deps-npm';
import type { KibanaRequest, HttpAuth } from '@kbn/core-http-server';
import { type DarkModeValue, parseDarkModeValue } from '@kbn/core-ui-settings-common';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
@@ -59,7 +58,7 @@ export const bootstrapRendererFactory: BootstrapRendererFactory = ({
return async function bootstrapRenderer({ uiSettingsClient, request, isAnonymousPage = false }) {
let darkMode: DarkModeValue = false;
- const themeVersion: ThemeVersion = 'v8';
+ let themeName: string = 'amsterdam';
try {
const authenticated = isAuthenticated(request);
@@ -72,6 +71,8 @@ export const bootstrapRendererFactory: BootstrapRendererFactory = ({
} else {
darkMode = parseDarkModeValue(await uiSettingsClient.get('theme:darkMode'));
}
+
+ themeName = await uiSettingsClient.get('theme:name');
}
} catch (e) {
// just use the default values in case of connectivity issues with ES
@@ -83,7 +84,7 @@ export const bootstrapRendererFactory: BootstrapRendererFactory = ({
}
const themeTag = getThemeTag({
- themeVersion,
+ name: !themeName || themeName === 'amsterdam' ? 'v8' : themeName,
darkMode,
});
const bundlesHref = getBundlesHref(baseHref);
diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts
index 0f9839e8cda89..216e87269818b 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts
@@ -10,18 +10,18 @@
import { getThemeTag } from './get_theme_tag';
describe('getThemeTag', () => {
- it('returns the correct value for version:v8 and darkMode:false', () => {
+ it('returns the correct value for name:v8 and darkMode:false', () => {
expect(
getThemeTag({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: false,
})
).toEqual('v8light');
});
- it('returns the correct value for version:v8 and darkMode:true', () => {
+ it('returns the correct value for name:v8 and darkMode:true', () => {
expect(
getThemeTag({
- themeVersion: 'v8',
+ name: 'v8',
darkMode: true,
})
).toEqual('v8dark');
diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts
index 97f5c17ef240b..f89bd41404633 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts
@@ -7,18 +7,10 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import type { ThemeVersion } from '@kbn/ui-shared-deps-npm';
-
/**
* Computes the themeTag that will be used on the client-side as `__kbnThemeTag__`
* @see `packages/kbn-ui-shared-deps-src/theme.ts`
*/
-export const getThemeTag = ({
- themeVersion,
- darkMode,
-}: {
- themeVersion: ThemeVersion;
- darkMode: boolean;
-}) => {
- return `${themeVersion}${darkMode ? 'dark' : 'light'}`;
+export const getThemeTag = ({ name, darkMode }: { name: string; darkMode: boolean }) => {
+ return `${name}${darkMode ? 'dark' : 'light'}`;
};
diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
index ace0399f242af..a92c3dac485b5 100644
--- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
+++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
@@ -22,6 +22,7 @@ import type { CustomBranding } from '@kbn/core-custom-branding-common';
import {
type DarkModeValue,
parseDarkModeValue,
+ parseThemeNameValue,
type UiSettingsParams,
type UserProvidedValues,
} from '@kbn/core-ui-settings-common';
@@ -211,6 +212,8 @@ export class RenderingService {
darkMode = getSettingValue('theme:darkMode', settings, parseDarkModeValue);
}
+ const themeName = getSettingValue('theme:name', settings, parseThemeNameValue);
+
const themeStylesheetPaths = (mode: boolean) =>
getThemeStylesheetPaths({
darkMode: mode,
@@ -274,6 +277,7 @@ export class RenderingService {
},
theme: {
darkMode,
+ name: themeName,
version: themeVersion,
stylesheetPaths: {
default: themeStylesheetPaths(false),
diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.test.ts
index 3702b46fdd790..6e3198f153df1 100644
--- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.test.ts
+++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.test.ts
@@ -267,4 +267,36 @@ describe('validateReferences()', () => {
'Error fetching references for imported objects'
);
});
+
+ // test that when references are missing returns only deduplicated errors
+ test('returns only deduplicated errors when references are missing', async () => {
+ const params = setup({
+ objects: [
+ {
+ id: '2',
+ type: 'visualization',
+ attributes: { title: 'My Visualization 2' },
+ references: [
+ { name: 'ref_0', type: 'index-pattern', id: '3' },
+ { name: 'ref_0', type: 'index-pattern', id: '3' },
+ ],
+ },
+ ],
+ });
+ params.savedObjectsClient.bulkGet.mockResolvedValue({
+ saved_objects: [createNotFoundError({ type: 'index-pattern', id: '3' })],
+ });
+
+ const result = await validateReferences(params);
+ expect(result).toEqual([
+ expect.objectContaining({
+ type: 'visualization',
+ id: '2',
+ error: {
+ type: 'missing_references',
+ references: [{ type: 'index-pattern', id: '3' }],
+ },
+ }),
+ ]);
+ });
});
diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts
index e83fafe3348f7..b482bceb8ae0a 100644
--- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts
+++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts
@@ -102,30 +102,35 @@ export async function validateReferences(params: ValidateReferencesParams) {
const nonExistingReferenceKeys = await getNonExistingReferenceAsKeys(params);
// Filter out objects with missing references, add to error object
- objects.forEach(({ type, id, references, attributes }) => {
- if (objectsToSkip.has(`${type}:${id}`)) {
+ for (const obj of objects) {
+ const { type, id, references, attributes } = obj;
+ const objectKey = `${type}:${id}`;
+ if (objectsToSkip.has(objectKey)) {
// skip objects with retries that have specified `ignoreMissingReferences`
- return;
+ continue;
}
- const missingReferences = [];
- const enforcedTypeReferences = (references || []).filter(filterReferencesToValidate);
+ const missingReferences: Array<{ type: string; id: string }> = [];
+ const enforcedTypeReferences = references?.filter(filterReferencesToValidate) || [];
+
+ const seenReferences = new Set();
for (const { type: refType, id: refId } of enforcedTypeReferences) {
- if (nonExistingReferenceKeys.includes(`${refType}:${refId}`)) {
+ const refKey = `${refType}:${refId}`;
+
+ if (nonExistingReferenceKeys.includes(refKey) && !seenReferences.has(refKey)) {
missingReferences.push({ type: refType, id: refId });
+ seenReferences.add(refKey);
}
}
- if (missingReferences.length === 0) {
- return;
+ if (missingReferences.length > 0) {
+ errorMap[objectKey] = {
+ id,
+ type,
+ meta: { title: attributes.title },
+ error: { type: 'missing_references', references: missingReferences },
+ };
}
- const { title } = attributes;
- errorMap[`${type}:${id}`] = {
- id,
- type,
- meta: { title },
- error: { type: 'missing_references', references: missingReferences },
- };
- });
+ }
return Object.values(errorMap);
}
diff --git a/packages/core/status/core-status-common-internal/README.md b/packages/core/status/core-status-common-internal/README.md
deleted file mode 100644
index f4e4af7fd3b3a..0000000000000
--- a/packages/core/status/core-status-common-internal/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# @kbn/core-status-common-internal
-
-This package contains the common internal types for Core's `status` domain.
diff --git a/packages/core/status/core-status-common-internal/kibana.jsonc b/packages/core/status/core-status-common-internal/kibana.jsonc
deleted file mode 100644
index 20ce17ae3cefa..0000000000000
--- a/packages/core/status/core-status-common-internal/kibana.jsonc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "type": "shared-common",
- "id": "@kbn/core-status-common-internal",
- "owner": "@elastic/kibana-core"
-}
diff --git a/packages/core/status/core-status-common/index.ts b/packages/core/status/core-status-common/index.ts
index 50eb85608522e..1aae83558016a 100644
--- a/packages/core/status/core-status-common/index.ts
+++ b/packages/core/status/core-status-common/index.ts
@@ -7,5 +7,14 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { ServiceStatusLevels } from './src';
-export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId, CoreStatus } from './src';
+export { ServiceStatusLevels } from './src/service_status';
+export type { CoreStatus } from './src/core_status';
+export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId } from './src/service_status';
+export type {
+ StatusInfo,
+ StatusInfoCoreStatus,
+ StatusInfoServiceStatus,
+ StatusResponse,
+ ServerVersion,
+ ServerMetrics,
+} from './src/status';
diff --git a/packages/core/status/core-status-common/jest.config.js b/packages/core/status/core-status-common/jest.config.js
index bc848cd656199..48ce844bb7d3f 100644
--- a/packages/core/status/core-status-common/jest.config.js
+++ b/packages/core/status/core-status-common/jest.config.js
@@ -10,5 +10,5 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
- roots: ['/packages/core/status/core-status-common-internal'],
+ roots: ['/packages/core/status/core-status-common'],
};
diff --git a/packages/core/status/core-status-common-internal/src/status.ts b/packages/core/status/core-status-common/src/status.ts
similarity index 92%
rename from packages/core/status/core-status-common-internal/src/status.ts
rename to packages/core/status/core-status-common/src/status.ts
index 370d2c9ac6e5d..7c981c56ceeb3 100644
--- a/packages/core/status/core-status-common-internal/src/status.ts
+++ b/packages/core/status/core-status-common/src/status.ts
@@ -8,8 +8,9 @@
*/
import type { BuildFlavor } from '@kbn/config';
-import type { ServiceStatusLevelId, ServiceStatus, CoreStatus } from '@kbn/core-status-common';
import type { OpsMetrics } from '@kbn/core-metrics-server';
+import type { ServiceStatusLevelId, ServiceStatus } from './service_status';
+import type { CoreStatus } from './core_status';
export interface StatusInfoServiceStatus extends Omit {
level: ServiceStatusLevelId;
diff --git a/packages/core/status/core-status-common/tsconfig.json b/packages/core/status/core-status-common/tsconfig.json
index a63f70f93043d..3b61a574a06bb 100644
--- a/packages/core/status/core-status-common/tsconfig.json
+++ b/packages/core/status/core-status-common/tsconfig.json
@@ -12,7 +12,9 @@
"**/*.tsx",
],
"kbn_references": [
- "@kbn/std"
+ "@kbn/std",
+ "@kbn/config",
+ "@kbn/core-metrics-server"
],
"exclude": [
"target/**/*",
diff --git a/packages/core/status/core-status-server-internal/src/routes/status.ts b/packages/core/status/core-status-server-internal/src/routes/status.ts
index 87e0e6e745a92..bafda87c2b08d 100644
--- a/packages/core/status/core-status-server-internal/src/routes/status.ts
+++ b/packages/core/status/core-status-server-internal/src/routes/status.ts
@@ -15,7 +15,7 @@ import type { IRouter } from '@kbn/core-http-server';
import type { MetricsServiceSetup } from '@kbn/core-metrics-server';
import type { CoreIncrementUsageCounter } from '@kbn/core-usage-data-server';
import { type ServiceStatus, type CoreStatus, ServiceStatusLevels } from '@kbn/core-status-common';
-import { StatusResponse } from '@kbn/core-status-common-internal';
+import type { StatusResponse } from '@kbn/core-status-common';
import { calculateLegacyStatus, type LegacyStatusInfo } from '../legacy_status';
import { statusResponse, type RedactedStatusHttpBody } from './status_response_schemas';
diff --git a/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts
index a2dcbcf7d21b6..68cebab4392e0 100644
--- a/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts
+++ b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts
@@ -9,15 +9,15 @@
import { schema, type Type, type TypeOf } from '@kbn/config-schema';
import type { BuildFlavor } from '@kbn/config';
-import type { ServiceStatusLevelId, ServiceStatus } from '@kbn/core-status-common';
-
import type {
+ ServiceStatusLevelId,
+ ServiceStatus,
StatusResponse,
StatusInfoCoreStatus,
ServerMetrics,
StatusInfo,
ServerVersion,
-} from '@kbn/core-status-common-internal';
+} from '@kbn/core-status-common';
const serviceStatusLevelId: () => Type = () =>
schema.oneOf(
diff --git a/packages/core/status/core-status-server-internal/tsconfig.json b/packages/core/status/core-status-server-internal/tsconfig.json
index bda646809e414..5ca46556cac33 100644
--- a/packages/core/status/core-status-server-internal/tsconfig.json
+++ b/packages/core/status/core-status-server-internal/tsconfig.json
@@ -29,7 +29,6 @@
"@kbn/core-saved-objects-server-internal",
"@kbn/core-status-server",
"@kbn/core-status-common",
- "@kbn/core-status-common-internal",
"@kbn/core-usage-data-base-server-internal",
"@kbn/core-base-server-mocks",
"@kbn/core-environment-server-mocks",
diff --git a/packages/core/theme/core-theme-browser-internal/src/core_theme_provider.test.tsx b/packages/core/theme/core-theme-browser-internal/src/core_theme_provider.test.tsx
index 3f4aebe797172..a3e4516b07510 100644
--- a/packages/core/theme/core-theme-browser-internal/src/core_theme_provider.test.tsx
+++ b/packages/core/theme/core-theme-browser-internal/src/core_theme_provider.test.tsx
@@ -50,7 +50,7 @@ describe('CoreThemeProvider', () => {
};
it('exposes the EUI theme provider', async () => {
- const coreTheme: CoreTheme = { darkMode: true };
+ const coreTheme: CoreTheme = { darkMode: true, name: 'amsterdam' };
const wrapper = mountWithIntl(
@@ -64,7 +64,7 @@ describe('CoreThemeProvider', () => {
});
it('propagates changes of the coreTheme observable', async () => {
- const coreTheme$ = new BehaviorSubject({ darkMode: true });
+ const coreTheme$ = new BehaviorSubject({ darkMode: true, name: 'amsterdam' });
const wrapper = mountWithIntl(
@@ -77,7 +77,7 @@ describe('CoreThemeProvider', () => {
expect(euiTheme!.colorMode).toEqual('DARK');
await act(async () => {
- coreTheme$.next({ darkMode: false });
+ coreTheme$.next({ darkMode: false, name: 'amsterdam' });
});
await refresh(wrapper);
diff --git a/packages/core/theme/core-theme-browser-internal/src/theme_service.test.ts b/packages/core/theme/core-theme-browser-internal/src/theme_service.test.ts
index 45c90d90d522a..575d98fe40c8d 100644
--- a/packages/core/theme/core-theme-browser-internal/src/theme_service.test.ts
+++ b/packages/core/theme/core-theme-browser-internal/src/theme_service.test.ts
@@ -45,6 +45,7 @@ describe('ThemeService', () => {
beforeEach(() => {
injectedMetadata.getTheme.mockReturnValue({
version: 'v8',
+ name: 'amsterdam',
darkMode: false,
stylesheetPaths: {
dark: ['dark-1.css'],
@@ -58,6 +59,7 @@ describe('ThemeService', () => {
const theme = await firstValueFrom(theme$);
expect(theme).toEqual({
darkMode: false,
+ name: 'amsterdam',
});
});
@@ -88,6 +90,7 @@ describe('ThemeService', () => {
beforeEach(() => {
injectedMetadata.getTheme.mockReturnValue({
version: 'v8',
+ name: 'amsterdam',
darkMode: true,
stylesheetPaths: {
dark: ['dark-1.css'],
@@ -101,6 +104,7 @@ describe('ThemeService', () => {
const theme = await firstValueFrom(theme$);
expect(theme).toEqual({
darkMode: true,
+ name: 'amsterdam',
});
});
@@ -131,6 +135,7 @@ describe('ThemeService', () => {
beforeEach(() => {
injectedMetadata.getTheme.mockReturnValue({
version: 'v8',
+ name: 'amsterdam',
darkMode: 'system',
stylesheetPaths: {
dark: ['dark-1.css'],
@@ -150,6 +155,7 @@ describe('ThemeService', () => {
expect(theme).toEqual({
darkMode: false,
+ name: 'amsterdam',
});
expect(window.__kbnThemeTag__).toEqual('v8light');
@@ -177,6 +183,7 @@ describe('ThemeService', () => {
expect(theme).toEqual({
darkMode: false,
+ name: 'amsterdam',
});
expect(window.__kbnThemeTag__).toEqual('v8light');
@@ -196,6 +203,7 @@ describe('ThemeService', () => {
expect(theme).toEqual({
darkMode: true,
+ name: 'amsterdam',
});
expect(window.__kbnThemeTag__).toEqual('v8dark');
@@ -244,6 +252,7 @@ describe('ThemeService', () => {
it('exposes a `theme$` observable with the values provided by the injected metadata', async () => {
injectedMetadata.getTheme.mockReturnValue({
version: 'v8',
+ name: 'amsterdam',
darkMode: true,
stylesheetPaths: {
dark: [],
@@ -255,6 +264,7 @@ describe('ThemeService', () => {
const theme = await firstValueFrom(theme$);
expect(theme).toEqual({
darkMode: true,
+ name: 'amsterdam',
});
});
});
diff --git a/packages/core/theme/core-theme-browser-internal/src/theme_service.ts b/packages/core/theme/core-theme-browser-internal/src/theme_service.ts
index 7bc51c9a0c34a..e79a19550bb8d 100644
--- a/packages/core/theme/core-theme-browser-internal/src/theme_service.ts
+++ b/packages/core/theme/core-theme-browser-internal/src/theme_service.ts
@@ -28,16 +28,21 @@ export class ThemeService {
public setup({ injectedMetadata }: ThemeServiceSetupDeps): ThemeServiceSetup {
const themeMetadata = injectedMetadata.getTheme();
+
this.themeMetadata = themeMetadata;
- let theme: CoreTheme;
+ let darkMode: boolean;
if (themeMetadata.darkMode === 'system' && browsersSupportsSystemTheme()) {
- theme = { darkMode: systemThemeIsDark() };
+ darkMode = systemThemeIsDark();
} else {
- const darkMode = themeMetadata.darkMode === 'system' ? false : themeMetadata.darkMode;
- theme = { darkMode };
+ darkMode = themeMetadata.darkMode === 'system' ? false : themeMetadata.darkMode;
}
+ const theme: CoreTheme = {
+ darkMode,
+ name: themeMetadata.name,
+ };
+
this.applyTheme(theme);
this.contract = {
@@ -73,11 +78,13 @@ export class ThemeService {
});
_setDarkMode(darkMode);
- updateKbnThemeTag(darkMode);
+ updateKbnThemeTag(theme);
}
}
-const updateKbnThemeTag = (darkMode: boolean) => {
+const updateKbnThemeTag = (theme: CoreTheme) => {
+ const name = theme.name === 'amsterdam' ? 'v8' : theme.name;
+
const globals: any = typeof window === 'undefined' ? {} : window;
- globals.__kbnThemeTag__ = darkMode ? 'v8dark' : 'v8light';
+ globals.__kbnThemeTag__ = `${name}${theme.darkMode ? 'dark' : 'light'}`;
};
diff --git a/packages/core/theme/core-theme-browser-mocks/src/theme_service.mock.ts b/packages/core/theme/core-theme-browser-mocks/src/theme_service.mock.ts
index beee2320d7cca..e3d2b66645794 100644
--- a/packages/core/theme/core-theme-browser-mocks/src/theme_service.mock.ts
+++ b/packages/core/theme/core-theme-browser-mocks/src/theme_service.mock.ts
@@ -14,6 +14,7 @@ import type { ThemeService } from '@kbn/core-theme-browser-internal';
const mockTheme: CoreTheme = {
darkMode: false,
+ name: 'amsterdam',
};
const createThemeMock = (): CoreTheme => {
diff --git a/packages/core/theme/core-theme-browser/src/types.ts b/packages/core/theme/core-theme-browser/src/types.ts
index 161758ec362f3..365cde9f814ac 100644
--- a/packages/core/theme/core-theme-browser/src/types.ts
+++ b/packages/core/theme/core-theme-browser/src/types.ts
@@ -17,6 +17,10 @@ import { Observable } from 'rxjs';
export interface CoreTheme {
/** is dark mode enabled or not */
readonly darkMode: boolean;
+ /**
+ * Name of the active theme
+ */
+ readonly name: string;
}
/**
diff --git a/packages/core/ui-settings/core-ui-settings-common/index.ts b/packages/core/ui-settings/core-ui-settings-common/index.ts
index b7adb288008df..d290b9065c546 100644
--- a/packages/core/ui-settings/core-ui-settings-common/index.ts
+++ b/packages/core/ui-settings/core-ui-settings-common/index.ts
@@ -17,5 +17,18 @@ export type {
GetUiSettingsContext,
} from './src/ui_settings';
export { type DarkModeValue, parseDarkModeValue } from './src/dark_mode';
+export {
+ DEFAULT_THEME_TAGS,
+ SUPPORTED_THEME_TAGS,
+ DEFAULT_THEME_NAME,
+ SUPPORTED_THEME_NAMES,
+ FALLBACK_THEME_TAG,
+ parseThemeTags,
+ hasNonDefaultThemeTags,
+ parseThemeNameValue,
+ type ThemeName,
+ type ThemeTag,
+ type ThemeTags,
+} from './src/theme';
export { TIMEZONE_OPTIONS } from './src/timezones';
diff --git a/packages/core/ui-settings/core-ui-settings-common/src/theme.ts b/packages/core/ui-settings/core-ui-settings-common/src/theme.ts
new file mode 100644
index 0000000000000..7bf9cbfe9486a
--- /dev/null
+++ b/packages/core/ui-settings/core-ui-settings-common/src/theme.ts
@@ -0,0 +1,97 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+export const DEFAULT_THEME_NAME = 'amsterdam';
+export const SUPPORTED_THEME_NAMES = ['amsterdam', 'borealis'];
+
+export type ThemeName = (typeof SUPPORTED_THEME_NAMES)[number];
+
+/**
+ * Theme tags of the Amsterdam theme
+ */
+export const ThemeAmsterdamTags = ['v8light', 'v8dark'] as const;
+
+/**
+ * Theme tags of the experimental Borealis theme
+ */
+export const ThemeBorealisTags = ['borealislight', 'borealisdark'] as const;
+
+/**
+ * An array of all theme tags supported by Kibana. Note that this list doesn't
+ * reflect what theme tags are available in a Kibana build.
+ */
+export const SUPPORTED_THEME_TAGS = [...ThemeAmsterdamTags, ...ThemeBorealisTags] as const;
+
+export type ThemeTag = (typeof SUPPORTED_THEME_TAGS)[number];
+export type ThemeTags = readonly ThemeTag[];
+
+/**
+ * An array of theme tags available in Kibana by default when not customized
+ * using KBN_OPTIMIZER_THEMES environment variable.
+ */
+export const DEFAULT_THEME_TAGS: ThemeTags = ThemeAmsterdamTags;
+
+export const FALLBACK_THEME_TAG: ThemeTag = 'v8light';
+
+const isValidTag = (tag: unknown) =>
+ SUPPORTED_THEME_TAGS.includes(tag as (typeof SUPPORTED_THEME_TAGS)[number]);
+
+export function parseThemeTags(input?: unknown): ThemeTags {
+ if (!input) {
+ return DEFAULT_THEME_TAGS;
+ }
+
+ if (input === '*') {
+ // TODO: Replace with SUPPORTED_THEME_TAGS when Borealis is in public beta
+ return DEFAULT_THEME_TAGS;
+ }
+
+ let rawTags: string[];
+ if (typeof input === 'string') {
+ rawTags = input.split(',').map((tag) => tag.trim());
+ } else if (Array.isArray(input)) {
+ rawTags = input;
+ } else {
+ throw new Error('Invalid theme tags, must be an array of strings');
+ }
+
+ if (!rawTags.length) {
+ throw new Error(
+ `Invalid theme tags, you must specify at least one of [${SUPPORTED_THEME_TAGS.join(', ')}]`
+ );
+ }
+
+ const invalidTags = rawTags.filter((t) => !isValidTag(t));
+ if (invalidTags.length) {
+ throw new Error(
+ `Invalid theme tags [${invalidTags.join(', ')}], options: [${SUPPORTED_THEME_TAGS.join(
+ ', '
+ )}]`
+ );
+ }
+
+ return rawTags as ThemeTags;
+}
+
+export const hasNonDefaultThemeTags = (tags: ThemeTags) =>
+ tags.length !== DEFAULT_THEME_TAGS.length ||
+ tags.some((tag) => !DEFAULT_THEME_TAGS.includes(tag as (typeof DEFAULT_THEME_TAGS)[number]));
+
+export const parseThemeNameValue = (value: unknown): ThemeName => {
+ if (typeof value !== 'string') {
+ return DEFAULT_THEME_NAME;
+ }
+
+ const themeName = value.toLowerCase();
+ if (SUPPORTED_THEME_NAMES.includes(themeName.toLowerCase() as ThemeName)) {
+ return themeName as ThemeName;
+ }
+
+ return DEFAULT_THEME_NAME;
+};
diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/index.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/index.ts
index f74977af04b8b..093b4eef9a6de 100644
--- a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/index.ts
+++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/index.ts
@@ -18,6 +18,7 @@ import { getAnnouncementsSettings } from './announcements';
interface GetCoreSettingsOptions {
isDist?: boolean;
+ isThemeSwitcherEnabled?: boolean;
}
export const getCoreSettings = (
diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts
index 5701694f97abc..36324f951952e 100644
--- a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts
+++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts
@@ -10,15 +10,11 @@
import { schema } from '@kbn/config-schema';
import { i18n } from '@kbn/i18n';
import type { ThemeVersion } from '@kbn/ui-shared-deps-npm';
-import type { UiSettingsParams } from '@kbn/core-ui-settings-common';
-
-function parseThemeTags() {
- if (!process.env.KBN_OPTIMIZER_THEMES || process.env.KBN_OPTIMIZER_THEMES === '*') {
- return ['v8light', 'v8dark'];
- }
-
- return process.env.KBN_OPTIMIZER_THEMES.split(',').map((t) => t.trim());
-}
+import {
+ type UiSettingsParams,
+ parseThemeTags,
+ SUPPORTED_THEME_NAMES,
+} from '@kbn/core-ui-settings-common';
function getThemeInfo(options: GetThemeSettingsOptions) {
if (options?.isDist ?? true) {
@@ -27,7 +23,7 @@ function getThemeInfo(options: GetThemeSettingsOptions) {
};
}
- const themeTags = parseThemeTags();
+ const themeTags = parseThemeTags(process.env.KBN_OPTIMIZER_THEMES);
return {
defaultDarkMode: themeTags[0].endsWith('dark'),
};
@@ -35,6 +31,7 @@ function getThemeInfo(options: GetThemeSettingsOptions) {
interface GetThemeSettingsOptions {
isDist?: boolean;
+ isThemeSwitcherEnabled?: boolean;
}
export const getThemeSettings = (
@@ -89,5 +86,34 @@ export const getThemeSettings = (
readonly: true,
schema: schema.literal('v8'),
},
+ /**
+ * Theme name is the (upcoming) replacement for theme versions.
+ */
+ 'theme:name': {
+ name: i18n.translate('core.ui_settings.params.themeName', {
+ defaultMessage: 'Theme',
+ }),
+ type: 'select',
+ options: SUPPORTED_THEME_NAMES,
+ optionLabels: {
+ amsterdam: i18n.translate('core.ui_settings.params.themeName.options.amsterdam', {
+ defaultMessage: 'Amsterdam',
+ }),
+ borealis: i18n.translate('core.ui_settings.params.themeName.options.borealis', {
+ defaultMessage: 'Borealis',
+ }),
+ },
+ value: 'amsterdam',
+ readonly: Object.hasOwn(options, 'isThemeSwitcherEnabled')
+ ? !options.isThemeSwitcherEnabled
+ : true,
+ requiresPageReload: true,
+ schema: schema.oneOf([
+ schema.literal('amsterdam'),
+ schema.literal('borealis'),
+ // Allow experimental themes
+ schema.string(),
+ ]),
+ },
};
};
diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_config.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_config.ts
index 6563ffff78949..04b7ff6b0f558 100644
--- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_config.ts
+++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_config.ts
@@ -19,6 +19,11 @@ const deprecations: ConfigDeprecationProvider = ({ unused, renameFromRoot }) =>
const configSchema = schema.object({
overrides: schema.object({}, { unknowns: 'allow' }),
publicApiEnabled: offeringBasedSchema({ serverless: schema.boolean({ defaultValue: false }) }),
+ experimental: schema.maybe(
+ schema.object({
+ themeSwitcherEnabled: schema.maybe(schema.boolean({ defaultValue: false })),
+ })
+ ),
});
export type UiSettingsConfigType = TypeOf;
diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts
index 958391b5fc725..70c880c85594f 100644
--- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts
+++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts
@@ -68,10 +68,15 @@ export class UiSettingsService
public async preboot(): Promise {
this.log.debug('Prebooting ui settings service');
- const { overrides } = await firstValueFrom(this.config$);
+ const { overrides, experimental } = await firstValueFrom(this.config$);
this.overrides = overrides;
- this.register(getCoreSettings({ isDist: this.isDist }));
+ this.register(
+ getCoreSettings({
+ isDist: this.isDist,
+ isThemeSwitcherEnabled: experimental?.themeSwitcherEnabled,
+ })
+ );
return {
createDefaultsClient: () =>
diff --git a/packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx b/packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx
index 3f3940e98bf4a..3da86b5f848f7 100644
--- a/packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx
+++ b/packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx
@@ -13,12 +13,13 @@ import {
EuiTabbedContent,
EuiTabbedContentProps,
useEuiOverflowScroll,
+ EuiBasicTableColumn,
} from '@elastic/eui';
import { css } from '@emotion/react';
-import React, { memo, useCallback, useMemo, useState } from 'react';
+import React, { memo, useMemo } from 'react';
import { Alert } from '@kbn/alerting-types';
import { euiThemeVars } from '@kbn/ui-theme';
-import { EuiBasicTableColumn } from '@elastic/eui/src/components/basic_table/basic_table';
+import { useEuiTablePersist } from '@kbn/shared-ux-table-persist';
export const search = {
box: {
@@ -66,28 +67,6 @@ export const ScrollableFlyoutTabbedContent = (props: EuiTabbedContentProps) => (
const COUNT_PER_PAGE_OPTIONS = [25, 50, 100];
-const useFieldBrowserPagination = () => {
- const [pagination, setPagination] = useState<{ pageIndex: number }>({
- pageIndex: 0,
- });
-
- const onTableChange = useCallback(({ page: { index } }: { page: { index: number } }) => {
- setPagination({ pageIndex: index });
- }, []);
- const paginationTableProp = useMemo(
- () => ({
- ...pagination,
- pageSizeOptions: COUNT_PER_PAGE_OPTIONS,
- }),
- [pagination]
- );
-
- return {
- onTableChange,
- paginationTableProp,
- };
-};
-
type AlertField = Exclude<
{
[K in keyof Alert]: { key: K; value: Alert[K] };
@@ -111,7 +90,11 @@ export interface AlertFieldsTableProps {
* A paginated, filterable table to show alert object fields
*/
export const AlertFieldsTable = memo(({ alert, fields }: AlertFieldsTableProps) => {
- const { onTableChange, paginationTableProp } = useFieldBrowserPagination();
+ const { pageSize, sorting, onTableChange } = useEuiTablePersist({
+ tableId: 'obltAlertFields',
+ initialPageSize: 25,
+ });
+
const items = useMemo(() => {
let _items = Object.entries(alert).map(
([key, value]) =>
@@ -131,7 +114,11 @@ export const AlertFieldsTable = memo(({ alert, fields }: AlertFieldsTableProps)
itemId="key"
columns={columns}
onTableChange={onTableChange}
- pagination={paginationTableProp}
+ pagination={{
+ pageSize,
+ pageSizeOptions: COUNT_PER_PAGE_OPTIONS,
+ }}
+ sorting={sorting}
search={search}
css={css`
& .euiTableRow {
diff --git a/packages/kbn-alerts-ui-shared/tsconfig.json b/packages/kbn-alerts-ui-shared/tsconfig.json
index 0da17dfe3d1ac..317f80dd209f3 100644
--- a/packages/kbn-alerts-ui-shared/tsconfig.json
+++ b/packages/kbn-alerts-ui-shared/tsconfig.json
@@ -49,6 +49,7 @@
"@kbn/core-ui-settings-browser",
"@kbn/core-http-browser-mocks",
"@kbn/core-notifications-browser-mocks",
- "@kbn/kibana-react-plugin"
+ "@kbn/kibana-react-plugin",
+ "@kbn/shared-ux-table-persist"
]
}
diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json
index 5493b8dc3bbdb..a5642cee10958 100644
--- a/packages/kbn-check-mappings-update-cli/current_fields.json
+++ b/packages/kbn-check-mappings-update-cli/current_fields.json
@@ -443,6 +443,7 @@
],
"favorites": [
"favoriteIds",
+ "favoriteMetadata",
"type",
"userId"
],
diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json
index 726b6e9e1d4c5..61f680509c133 100644
--- a/packages/kbn-check-mappings-update-cli/current_mappings.json
+++ b/packages/kbn-check-mappings-update-cli/current_mappings.json
@@ -1509,6 +1509,10 @@
"favoriteIds": {
"type": "keyword"
},
+ "favoriteMetadata": {
+ "dynamic": false,
+ "type": "object"
+ },
"type": {
"type": "keyword"
},
diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts
index 251d08dde715a..c7d714ebfbbb7 100644
--- a/packages/kbn-doc-links/src/get_doc_links.ts
+++ b/packages/kbn-doc-links/src/get_doc_links.ts
@@ -470,6 +470,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
securitySolution: {
artifactControl: `${SECURITY_SOLUTION_DOCS}artifact-control.html`,
avcResults: `${ELASTIC_WEBSITE_URL}blog/elastic-av-comparatives-business-security-test`,
+ bidirectionalIntegrations: `${SECURITY_SOLUTION_DOCS}third-party-actions.html`,
trustedApps: `${SECURITY_SOLUTION_DOCS}trusted-apps-ov.html`,
eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`,
blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`,
@@ -716,6 +717,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`,
mappingRolesFieldRules: `${ELASTICSEARCH_DOCS}role-mapping-resources.html#mapping-roles-rule-field`,
runAsPrivilege: `${ELASTICSEARCH_DOCS}security-privileges.html#_run_as_privilege`,
+ deprecatedV1Endpoints: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-199656`,
},
spaces: {
kibanaLegacyUrlAliases: `${KIBANA_DOCS}legacy-url-aliases.html`,
diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts
index f1a6a8d4b578d..ac0f66d83b705 100644
--- a/packages/kbn-doc-links/src/types.ts
+++ b/packages/kbn-doc-links/src/types.ts
@@ -340,6 +340,7 @@ export interface DocLinks {
readonly aiAssistant: string;
readonly artifactControl: string;
readonly avcResults: string;
+ readonly bidirectionalIntegrations: string;
readonly trustedApps: string;
readonly eventFilters: string;
readonly eventMerging: string;
@@ -504,6 +505,7 @@ export interface DocLinks {
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
+ deprecatedV1Endpoints: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
diff --git a/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/discard_starred_query_modal.tsx b/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/discard_starred_query_modal.tsx
new file mode 100644
index 0000000000000..5efa3a1469354
--- /dev/null
+++ b/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/discard_starred_query_modal.tsx
@@ -0,0 +1,109 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import React, { useState, useCallback } from 'react';
+import { i18n } from '@kbn/i18n';
+import {
+ EuiModal,
+ EuiModalBody,
+ EuiModalFooter,
+ EuiModalHeader,
+ EuiModalHeaderTitle,
+ EuiButton,
+ EuiButtonEmpty,
+ EuiText,
+ EuiCheckbox,
+ EuiFlexItem,
+ EuiFlexGroup,
+ EuiHorizontalRule,
+} from '@elastic/eui';
+
+export interface DiscardStarredQueryModalProps {
+ onClose: (dismissFlag?: boolean, removeQuery?: boolean) => Promise;
+}
+// Needed for React.lazy
+// eslint-disable-next-line import/no-default-export
+export default function DiscardStarredQueryModal({ onClose }: DiscardStarredQueryModalProps) {
+ const [dismissModalChecked, setDismissModalChecked] = useState(false);
+ const onTransitionModalDismiss = useCallback((e: React.ChangeEvent) => {
+ setDismissModalChecked(e.target.checked);
+ }, []);
+
+ return (
+ onClose()}
+ style={{ width: 700 }}
+ data-test-subj="discard-starred-query-modal"
+ >
+
+
+ {i18n.translate('esqlEditor.discardStarredQueryModal.title', {
+ defaultMessage: 'Discard starred query',
+ })}
+
+
+
+
+
+ {i18n.translate('esqlEditor.discardStarredQueryModal.body', {
+ defaultMessage:
+ 'Removing a starred query will remove it from the list. This has no impact on the recent query history.',
+ })}
+
+
+
+
+
+
+
+
+
+
+
+ {
+ await onClose(dismissModalChecked, false);
+ }}
+ color="primary"
+ data-test-subj="esqlEditor-discard-starred-query-cancel-btn"
+ >
+ {i18n.translate('esqlEditor.discardStarredQueryModal.cancelLabel', {
+ defaultMessage: 'Cancel',
+ })}
+
+
+
+ {
+ await onClose(dismissModalChecked, true);
+ }}
+ color="danger"
+ iconType="trash"
+ data-test-subj="esqlEditor-discard-starred-query-discard-btn"
+ >
+ {i18n.translate('esqlEditor.discardStarredQueryModal.discardQueryLabel', {
+ defaultMessage: 'Discard query',
+ })}
+
+
+
+
+
+
+
+ );
+}
diff --git a/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/index.tsx b/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/index.tsx
new file mode 100644
index 0000000000000..544b251c76754
--- /dev/null
+++ b/packages/kbn-esql-editor/src/editor_footer/discard_starred_query/index.tsx
@@ -0,0 +1,20 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import React from 'react';
+import type { DiscardStarredQueryModalProps } from './discard_starred_query_modal';
+
+const Fallback = () => ;
+
+const LazyDiscardStarredQueryModal = React.lazy(() => import('./discard_starred_query_modal'));
+export const DiscardStarredQueryModal = (props: DiscardStarredQueryModalProps) => (
+ }>
+
+
+);
diff --git a/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.test.tsx b/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.test.tsx
new file mode 100644
index 0000000000000..fca4d95c6f6cb
--- /dev/null
+++ b/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.test.tsx
@@ -0,0 +1,203 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import { EsqlStarredQueriesService } from './esql_starred_queries_service';
+import { coreMock } from '@kbn/core/public/mocks';
+import type { Storage } from '@kbn/kibana-utils-plugin/public';
+
+class LocalStorageMock {
+ public store: Record;
+ constructor(defaultStore: Record) {
+ this.store = defaultStore;
+ }
+ clear() {
+ this.store = {};
+ }
+ get(key: string) {
+ return this.store[key] || null;
+ }
+ set(key: string, value: unknown) {
+ this.store[key] = String(value);
+ }
+ remove(key: string) {
+ delete this.store[key];
+ }
+}
+
+describe('EsqlStarredQueriesService', () => {
+ const core = coreMock.createStart();
+ const storage = new LocalStorageMock({}) as unknown as Storage;
+
+ it('should initialize', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ expect(service).toBeDefined();
+ expect(service.queries$.value).toEqual([]);
+ });
+
+ it('should add a new starred query', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: 'SELECT * FROM test',
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'success' as const,
+ };
+
+ await service.addStarredQuery(query);
+ expect(service.queries$.value).toEqual([
+ {
+ id: expect.any(String),
+ ...query,
+ // stores now()
+ timeRan: expect.any(String),
+ },
+ ]);
+ });
+
+ it('should not add the same query twice', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: 'SELECT * FROM test',
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'success' as const,
+ };
+
+ const expected = {
+ id: expect.any(String),
+ ...query,
+ // stores now()
+ timeRan: expect.any(String),
+ // trimmed query
+ queryString: 'SELECT * FROM test',
+ };
+
+ await service.addStarredQuery(query);
+ expect(service.queries$.value).toEqual([expected]);
+
+ // second time
+ await service.addStarredQuery(query);
+ expect(service.queries$.value).toEqual([expected]);
+ });
+
+ it('should add the query trimmed', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: `SELECT * FROM test |
+ WHERE field != 'value'`,
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'error' as const,
+ };
+
+ await service.addStarredQuery(query);
+ expect(service.queries$.value).toEqual([
+ {
+ id: expect.any(String),
+ ...query,
+ timeRan: expect.any(String),
+ // trimmed query
+ queryString: `SELECT * FROM test | WHERE field != 'value'`,
+ },
+ ]);
+ });
+
+ it('should remove a query', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: `SELECT * FROM test | WHERE field != 'value'`,
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'error' as const,
+ };
+
+ await service.addStarredQuery(query);
+ expect(service.queries$.value).toEqual([
+ {
+ id: expect.any(String),
+ ...query,
+ timeRan: expect.any(String),
+ // trimmed query
+ queryString: `SELECT * FROM test | WHERE field != 'value'`,
+ },
+ ]);
+
+ await service.removeStarredQuery(query.queryString);
+ expect(service.queries$.value).toEqual([]);
+ });
+
+ it('should return the button correctly', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: 'SELECT * FROM test',
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'success' as const,
+ };
+
+ await service.addStarredQuery(query);
+ const buttonWithTooltip = service.renderStarredButton(query);
+ const button = buttonWithTooltip.props.children;
+ expect(button.props.title).toEqual('Remove ES|QL query from Starred');
+ expect(button.props.iconType).toEqual('starFilled');
+ });
+
+ it('should display the modal when the Remove button is clicked', async () => {
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: 'SELECT * FROM test',
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'success' as const,
+ };
+
+ await service.addStarredQuery(query);
+ const buttonWithTooltip = service.renderStarredButton(query);
+ const button = buttonWithTooltip.props.children;
+ expect(button.props.title).toEqual('Remove ES|QL query from Starred');
+ button.props.onClick();
+
+ expect(service.discardModalVisibility$.value).toEqual(true);
+ });
+
+ it('should NOT display the modal when Remove the button is clicked but the user has dismissed the modal permanently', async () => {
+ storage.set('esqlEditor.starredQueriesDiscard', true);
+ const service = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ storage,
+ });
+ const query = {
+ queryString: 'SELECT * FROM test',
+ timeRan: '2021-09-01T00:00:00Z',
+ status: 'success' as const,
+ };
+
+ await service.addStarredQuery(query);
+ const buttonWithTooltip = service.renderStarredButton(query);
+ const button = buttonWithTooltip.props.children;
+ button.props.onClick();
+
+ expect(service.discardModalVisibility$.value).toEqual(false);
+ });
+});
diff --git a/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.tsx b/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.tsx
new file mode 100644
index 0000000000000..80ef716cfd4b0
--- /dev/null
+++ b/packages/kbn-esql-editor/src/editor_footer/esql_starred_queries_service.tsx
@@ -0,0 +1,241 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+import React from 'react';
+import { BehaviorSubject } from 'rxjs';
+import { i18n } from '@kbn/i18n';
+import { v4 as uuidv4 } from 'uuid';
+import type { CoreStart } from '@kbn/core/public';
+import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
+import type { Storage } from '@kbn/kibana-utils-plugin/public';
+import { EuiButtonIcon } from '@elastic/eui';
+import { FavoritesClient } from '@kbn/content-management-favorites-public';
+import { FAVORITES_LIMIT as ESQL_STARRED_QUERIES_LIMIT } from '@kbn/content-management-favorites-common';
+import { type QueryHistoryItem, getTrimmedQuery } from '../history_local_storage';
+import { TooltipWrapper } from './tooltip_wrapper';
+
+const STARRED_QUERIES_DISCARD_KEY = 'esqlEditor.starredQueriesDiscard';
+
+/**
+ * EsqlStarredQueriesService is a service that manages the starred queries in the ES|QL editor.
+ * It provides methods to add and remove queries from the starred list.
+ * It also provides a method to render the starred button in the editor list table.
+ *
+ * @param client - The FavoritesClient instance.
+ * @param starredQueries - The list of starred queries.
+ * @param queries$ - The BehaviorSubject that emits the starred queries list.
+ * @method initialize - Initializes the service and retrieves the starred queries from the favoriteService.
+ * @method checkIfQueryIsStarred - Checks if a query is already starred.
+ * @method addStarredQuery - Adds a query to the starred list.
+ * @method removeStarredQuery - Removes a query from the starred list.
+ * @method renderStarredButton - Renders the starred button in the editor list table.
+ * @returns EsqlStarredQueriesService instance.
+ *
+ */
+export interface StarredQueryItem extends QueryHistoryItem {
+ id: string;
+}
+
+interface EsqlStarredQueriesServices {
+ http: CoreStart['http'];
+ storage: Storage;
+ usageCollection?: UsageCollectionStart;
+}
+
+interface EsqlStarredQueriesParams {
+ client: FavoritesClient;
+ starredQueries: StarredQueryItem[];
+ storage: Storage;
+}
+
+function generateId() {
+ return uuidv4();
+}
+
+interface StarredQueryMetadata {
+ queryString: string;
+ createdAt: string;
+ status: 'success' | 'warning' | 'error';
+}
+
+export class EsqlStarredQueriesService {
+ private client: FavoritesClient;
+ private starredQueries: StarredQueryItem[] = [];
+ private queryToEdit: string = '';
+ private storage: Storage;
+ queries$: BehaviorSubject;
+ discardModalVisibility$: BehaviorSubject = new BehaviorSubject(false);
+
+ constructor({ client, starredQueries, storage }: EsqlStarredQueriesParams) {
+ this.client = client;
+ this.starredQueries = starredQueries;
+ this.queries$ = new BehaviorSubject(starredQueries);
+ this.storage = storage;
+ }
+
+ static async initialize(services: EsqlStarredQueriesServices) {
+ const client = new FavoritesClient('esql_editor', 'esql_query', {
+ http: services.http,
+ usageCollection: services.usageCollection,
+ });
+
+ const { favoriteMetadata } = (await client?.getFavorites()) || {};
+ const retrievedQueries: StarredQueryItem[] = [];
+
+ if (!favoriteMetadata) {
+ return new EsqlStarredQueriesService({
+ client,
+ starredQueries: [],
+ storage: services.storage,
+ });
+ }
+ Object.keys(favoriteMetadata).forEach((id) => {
+ const item = favoriteMetadata[id];
+ const { queryString, createdAt, status } = item;
+ retrievedQueries.push({ id, queryString, timeRan: createdAt, status });
+ });
+
+ return new EsqlStarredQueriesService({
+ client,
+ starredQueries: retrievedQueries,
+ storage: services.storage,
+ });
+ }
+
+ private checkIfQueryIsStarred(queryString: string) {
+ return this.starredQueries.some((item) => item.queryString === queryString);
+ }
+
+ private checkIfStarredQueriesLimitReached() {
+ return this.starredQueries.length >= ESQL_STARRED_QUERIES_LIMIT;
+ }
+
+ async addStarredQuery(item: Pick) {
+ const favoriteItem: { id: string; metadata: StarredQueryMetadata } = {
+ id: generateId(),
+ metadata: {
+ queryString: getTrimmedQuery(item.queryString),
+ createdAt: new Date().toISOString(),
+ status: item.status ?? 'success',
+ },
+ };
+
+ // do not add the query if it's already starred or has reached the limit
+ if (
+ this.checkIfQueryIsStarred(favoriteItem.metadata.queryString) ||
+ this.checkIfStarredQueriesLimitReached()
+ ) {
+ return;
+ }
+
+ const starredQueries = [...this.starredQueries];
+
+ starredQueries.push({
+ queryString: favoriteItem.metadata.queryString,
+ timeRan: favoriteItem.metadata.createdAt,
+ status: favoriteItem.metadata.status,
+ id: favoriteItem.id,
+ });
+ this.queries$.next(starredQueries);
+ this.starredQueries = starredQueries;
+ await this.client.addFavorite(favoriteItem);
+
+ // telemetry, add favorite click event
+ this.client.reportAddFavoriteClick();
+ }
+
+ async removeStarredQuery(queryString: string) {
+ const trimmedQueryString = getTrimmedQuery(queryString);
+ const favoriteItem = this.starredQueries.find(
+ (item) => item.queryString === trimmedQueryString
+ );
+
+ if (!favoriteItem) {
+ return;
+ }
+
+ this.starredQueries = this.starredQueries.filter(
+ (item) => item.queryString !== trimmedQueryString
+ );
+ this.queries$.next(this.starredQueries);
+
+ await this.client.removeFavorite({ id: favoriteItem.id });
+
+ // telemetry, remove favorite click event
+ this.client.reportRemoveFavoriteClick();
+ }
+
+ async onDiscardModalClose(shouldDismissModal?: boolean, removeQuery?: boolean) {
+ if (shouldDismissModal) {
+ // set the local storage flag to not show the modal again
+ this.storage.set(STARRED_QUERIES_DISCARD_KEY, true);
+ }
+ this.discardModalVisibility$.next(false);
+
+ if (removeQuery) {
+ // remove the query
+ await this.removeStarredQuery(this.queryToEdit);
+ }
+ }
+
+ renderStarredButton(item: QueryHistoryItem) {
+ const trimmedQueryString = getTrimmedQuery(item.queryString);
+ const isStarred = this.checkIfQueryIsStarred(trimmedQueryString);
+ return (
+
+ {
+ this.queryToEdit = trimmedQueryString;
+ if (isStarred) {
+ // show the discard modal only if the user has not dismissed it
+ if (!this.storage.get(STARRED_QUERIES_DISCARD_KEY)) {
+ this.discardModalVisibility$.next(true);
+ } else {
+ await this.removeStarredQuery(item.queryString);
+ }
+ } else {
+ await this.addStarredQuery(item);
+ }
+ }}
+ data-test-subj="ESQLFavoriteButton"
+ />
+
+ );
+ }
+}
diff --git a/packages/kbn-esql-editor/src/editor_footer/query_history.test.tsx b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries.test.tsx
similarity index 52%
rename from packages/kbn-esql-editor/src/editor_footer/query_history.test.tsx
rename to packages/kbn-esql-editor/src/editor_footer/history_starred_queries.test.tsx
index df41e2a2d3b91..9e0d586622c31 100644
--- a/packages/kbn-esql-editor/src/editor_footer/query_history.test.tsx
+++ b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries.test.tsx
@@ -8,8 +8,15 @@
*/
import React from 'react';
-import { QueryHistoryAction, getTableColumns, QueryColumn } from './query_history';
+import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
+import { coreMock } from '@kbn/core/public/mocks';
import { render, screen } from '@testing-library/react';
+import {
+ QueryHistoryAction,
+ getTableColumns,
+ QueryColumn,
+ HistoryAndStarredQueriesTabs,
+} from './history_starred_queries';
jest.mock('../history_local_storage', () => {
const module = jest.requireActual('../history_local_storage');
@@ -18,7 +25,6 @@ jest.mock('../history_local_storage', () => {
getHistoryItems: () => [
{
queryString: 'from kibana_sample_data_flights | limit 10',
- timeZone: 'Browser',
timeRan: 'Mar. 25, 24 08:45:27',
queryRunning: false,
status: 'success',
@@ -27,7 +33,7 @@ jest.mock('../history_local_storage', () => {
};
});
-describe('QueryHistory', () => {
+describe('Starred and History queries components', () => {
describe('QueryHistoryAction', () => {
it('should render the history action component as a button if is spaceReduced is undefined', () => {
render();
@@ -47,9 +53,14 @@ describe('QueryHistory', () => {
});
describe('getTableColumns', () => {
- it('should get the history table columns correctly', async () => {
+ it('should get the table columns correctly', async () => {
const columns = getTableColumns(50, false, []);
expect(columns).toEqual([
+ {
+ 'data-test-subj': 'favoriteBtn',
+ render: expect.anything(),
+ width: '40px',
+ },
{
css: {
height: '100%',
@@ -64,7 +75,7 @@ describe('QueryHistory', () => {
{
'data-test-subj': 'queryString',
field: 'queryString',
- name: 'Recent queries',
+ name: 'Query',
render: expect.anything(),
},
{
@@ -83,11 +94,58 @@ describe('QueryHistory', () => {
},
]);
});
+
+ it('should get the table columns correctly for the starred list', async () => {
+ const columns = getTableColumns(50, false, [], true);
+ expect(columns).toEqual([
+ {
+ 'data-test-subj': 'favoriteBtn',
+ render: expect.anything(),
+ width: '40px',
+ },
+ {
+ css: {
+ height: '100%',
+ },
+ 'data-test-subj': 'status',
+ field: 'status',
+ name: '',
+ render: expect.anything(),
+ sortable: false,
+ width: '40px',
+ },
+ {
+ 'data-test-subj': 'queryString',
+ field: 'queryString',
+ name: 'Query',
+ render: expect.anything(),
+ },
+ {
+ 'data-test-subj': 'timeRan',
+ field: 'timeRan',
+ name: 'Date Added',
+ render: expect.anything(),
+ sortable: true,
+ width: '240px',
+ },
+ {
+ actions: [],
+ 'data-test-subj': 'actions',
+ name: '',
+ width: '60px',
+ },
+ ]);
+ });
});
it('should get the history table columns correctly for reduced space', async () => {
const columns = getTableColumns(50, true, []);
expect(columns).toEqual([
+ {
+ 'data-test-subj': 'favoriteBtn',
+ render: expect.anything(),
+ width: 'auto',
+ },
{
css: {
height: '100%',
@@ -110,7 +168,7 @@ describe('QueryHistory', () => {
{
'data-test-subj': 'queryString',
field: 'queryString',
- name: 'Recent queries',
+ name: 'Query',
render: expect.anything(),
},
{
@@ -132,7 +190,7 @@ describe('QueryHistory', () => {
/>
);
expect(
- screen.queryByTestId('ESQLEditor-queryHistory-queryString-expanded')
+ screen.queryByTestId('ESQLEditor-queryList-queryString-expanded')
).not.toBeInTheDocument();
});
@@ -152,9 +210,66 @@ describe('QueryHistory', () => {
isOnReducedSpaceLayout={true}
/>
);
- expect(
- screen.getByTestId('ESQLEditor-queryHistory-queryString-expanded')
- ).toBeInTheDocument();
+ expect(screen.getByTestId('ESQLEditor-queryList-queryString-expanded')).toBeInTheDocument();
+ });
+ });
+
+ describe('HistoryAndStarredQueriesTabs', () => {
+ const services = {
+ core: coreMock.createStart(),
+ };
+ it('should render two tabs', () => {
+ render(
+
+
+
+ );
+ expect(screen.getByTestId('history-queries-tab')).toBeInTheDocument();
+ expect(screen.getByTestId('history-queries-tab')).toHaveTextContent('Recent');
+ expect(screen.getByTestId('starred-queries-tab')).toBeInTheDocument();
+ expect(screen.getByTestId('starred-queries-tab')).toHaveTextContent('Starred');
+ });
+
+ it('should render the history queries tab by default', () => {
+ render(
+
+
+
+ );
+ expect(screen.getByTestId('ESQLEditor-queryHistory')).toBeInTheDocument();
+ expect(screen.getByTestId('ESQLEditor-history-starred-queries-helpText')).toHaveTextContent(
+ 'Showing last 20 queries'
+ );
+ });
+
+ it('should render the starred queries if the corresponding btn is clicked', () => {
+ render(
+
+
+
+ );
+ // click the starred queries tab
+ screen.getByTestId('starred-queries-tab').click();
+
+ expect(screen.getByTestId('ESQLEditor-starredQueries')).toBeInTheDocument();
+ expect(screen.getByTestId('ESQLEditor-history-starred-queries-helpText')).toHaveTextContent(
+ 'Showing 0 queries (max 100)'
+ );
});
});
});
diff --git a/packages/kbn-esql-editor/src/editor_footer/query_history.tsx b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries.tsx
similarity index 53%
rename from packages/kbn-esql-editor/src/editor_footer/query_history.tsx
rename to packages/kbn-esql-editor/src/editor_footer/history_starred_queries.tsx
index 864306737e9ca..c24d0a0b1817b 100644
--- a/packages/kbn-esql-editor/src/editor_footer/query_history.tsx
+++ b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries.tsx
@@ -6,8 +6,8 @@
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-
-import React, { useState, useRef, useEffect, useMemo } from 'react';
+import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
+import moment from 'moment';
import { i18n } from '@kbn/i18n';
import {
EuiFlexGroup,
@@ -17,16 +17,31 @@ import {
EuiInMemoryTable,
EuiBasicTableColumn,
EuiButtonEmpty,
- Criteria,
EuiButtonIcon,
CustomItemAction,
EuiCopy,
EuiToolTip,
euiScrollBarStyles,
+ EuiTab,
+ EuiTabs,
+ EuiNotificationBadge,
+ EuiText,
} from '@elastic/eui';
+import { useKibana } from '@kbn/kibana-react-plugin/public';
+import { cssFavoriteHoverWithinEuiTableRow } from '@kbn/content-management-favorites-public';
+import { FAVORITES_LIMIT as ESQL_STARRED_QUERIES_LIMIT } from '@kbn/content-management-favorites-common';
import { css, Interpolation, Theme } from '@emotion/react';
-import { type QueryHistoryItem, getHistoryItems } from '../history_local_storage';
-import { getReducedSpaceStyling, swapArrayElements } from './query_history_helpers';
+import { useEuiTablePersist } from '@kbn/shared-ux-table-persist';
+import {
+ type QueryHistoryItem,
+ getHistoryItems,
+ MAX_HISTORY_QUERIES_NUMBER,
+ dateFormat,
+} from '../history_local_storage';
+import type { ESQLEditorDeps } from '../types';
+import { getReducedSpaceStyling, swapArrayElements } from './history_starred_queries_helpers';
+import { EsqlStarredQueriesService, StarredQueryItem } from './esql_starred_queries_service';
+import { DiscardStarredQueryModal } from './discard_starred_query';
export function QueryHistoryAction({
toggleHistory,
@@ -99,9 +114,22 @@ export function QueryHistoryAction({
export const getTableColumns = (
width: number,
isOnReducedSpaceLayout: boolean,
- actions: Array>
+ actions: Array>,
+ isStarredTab = false,
+ starredQueriesService?: EsqlStarredQueriesService
): Array> => {
const columnsArray = [
+ {
+ 'data-test-subj': 'favoriteBtn',
+ render: (item: QueryHistoryItem) => {
+ const StarredQueryButton = starredQueriesService?.renderStarredButton(item);
+ if (!StarredQueryButton) {
+ return null;
+ }
+ return StarredQueryButton;
+ },
+ width: isOnReducedSpaceLayout ? 'auto' : '40px',
+ },
{
field: 'status',
name: '',
@@ -167,7 +195,7 @@ export const getTableColumns = (
field: 'queryString',
'data-test-subj': 'queryString',
name: i18n.translate('esqlEditor.query.recentQueriesColumnLabel', {
- defaultMessage: 'Recent queries',
+ defaultMessage: 'Query',
}),
render: (queryString: QueryHistoryItem['queryString']) => (
timeRan,
+ render: (timeRan: QueryHistoryItem['timeRan']) => moment(timeRan).format(dateFormat),
width: isOnReducedSpaceLayout ? 'auto' : '240px',
},
{
@@ -196,24 +228,41 @@ export const getTableColumns = (
];
// I need to swap the elements here to get the desired design
- return isOnReducedSpaceLayout ? swapArrayElements(columnsArray, 1, 2) : columnsArray;
+ return isOnReducedSpaceLayout ? swapArrayElements(columnsArray, 2, 3) : columnsArray;
};
-export function QueryHistory({
+export function QueryList({
containerCSS,
containerWidth,
onUpdateAndSubmit,
height,
+ listItems,
+ starredQueriesService,
+ tableCaption,
+ dataTestSubj,
+ isStarredTab = false,
}: {
+ listItems: QueryHistoryItem[];
containerCSS: Interpolation;
containerWidth: number;
onUpdateAndSubmit: (qs: string) => void;
height: number;
+ starredQueriesService?: EsqlStarredQueriesService;
+ tableCaption?: string;
+ dataTestSubj?: string;
+ isStarredTab?: boolean;
}) {
const theme = useEuiTheme();
const scrollBarStyles = euiScrollBarStyles(theme);
- const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('desc');
- const historyItems: QueryHistoryItem[] = getHistoryItems(sortDirection);
+ const [isDiscardQueryModalVisible, setIsDiscardQueryModalVisible] = useState(false);
+
+ const { sorting, onTableChange } = useEuiTablePersist({
+ tableId: 'esqlQueryHistory',
+ initialSort: {
+ field: 'timeRan',
+ direction: 'desc',
+ },
+ });
const actions: Array> = useMemo(() => {
return [
@@ -224,16 +273,16 @@ export function QueryHistory({
onUpdateAndSubmit(item.queryString)}
@@ -246,7 +295,7 @@ export function QueryHistory({
@@ -258,7 +307,7 @@ export function QueryHistory({
css={css`
cursor: pointer;
`}
- aria-label={i18n.translate('esqlEditor.query.querieshistoryCopy', {
+ aria-label={i18n.translate('esqlEditor.query.esqlQueriesCopy', {
defaultMessage: 'Copy query to clipboard',
})}
/>
@@ -271,27 +320,23 @@ export function QueryHistory({
},
];
}, [onUpdateAndSubmit]);
+
const isOnReducedSpaceLayout = containerWidth < 560;
const columns = useMemo(() => {
- return getTableColumns(containerWidth, isOnReducedSpaceLayout, actions);
- }, [actions, containerWidth, isOnReducedSpaceLayout]);
-
- const onTableChange = ({ page, sort }: Criteria) => {
- if (sort) {
- const { direction } = sort;
- setSortDirection(direction);
- }
- };
+ return getTableColumns(
+ containerWidth,
+ isOnReducedSpaceLayout,
+ actions,
+ isStarredTab,
+ starredQueriesService
+ );
+ }, [containerWidth, isOnReducedSpaceLayout, actions, isStarredTab, starredQueriesService]);
- const sorting = {
- sort: {
- field: 'timeRan',
- direction: sortDirection,
- },
- };
const { euiTheme } = theme;
const extraStyling = isOnReducedSpaceLayout ? getReducedSpaceStyling() : '';
+ const starredQueriesCellStyling = cssFavoriteHoverWithinEuiTableRow(theme.euiTheme);
+
const tableStyling = css`
.euiTable {
background-color: ${euiTheme.colors.lightestShade};
@@ -310,22 +355,40 @@ export function QueryHistory({
overflow-y: auto;
${scrollBarStyles}
${extraStyling}
+ ${starredQueriesCellStyling}
`;
+ starredQueriesService?.discardModalVisibility$.subscribe((nextVisibility) => {
+ if (isDiscardQueryModalVisible !== nextVisibility) {
+ setIsDiscardQueryModalVisible(nextVisibility);
+ }
+ });
+
return (
-
+
+ {isDiscardQueryModalVisible && (
+
+ (await starredQueriesService?.onDiscardModalClose(dismissFlag, removeQuery)) ??
+ Promise.resolve()
+ }
+ />
+ )}
);
}
@@ -359,7 +422,7 @@ export function QueryColumn({
onClick={() => {
setIsRowExpanded(!isRowExpanded);
}}
- data-test-subj="ESQLEditor-queryHistory-queryString-expanded"
+ data-test-subj="ESQLEditor-queryList-queryString-expanded"
aria-label={
isRowExpanded
? i18n.translate('esqlEditor.query.collapseLabel', {
@@ -392,3 +455,171 @@ export function QueryColumn({
>
);
}
+
+export function HistoryAndStarredQueriesTabs({
+ containerCSS,
+ containerWidth,
+ onUpdateAndSubmit,
+ height,
+}: {
+ containerCSS: Interpolation
;
+ containerWidth: number;
+ onUpdateAndSubmit: (qs: string) => void;
+ height: number;
+}) {
+ const kibana = useKibana();
+ const { core, usageCollection, storage } = kibana.services;
+
+ const [starredQueriesService, setStarredQueriesService] = useState();
+ const [starredQueries, setStarredQueries] = useState([]);
+
+ useEffect(() => {
+ const initializeService = async () => {
+ const starredService = await EsqlStarredQueriesService.initialize({
+ http: core.http,
+ usageCollection,
+ storage,
+ });
+ setStarredQueriesService(starredService);
+ };
+ if (!starredQueriesService) {
+ initializeService();
+ }
+ }, [core.http, starredQueriesService, storage, usageCollection]);
+
+ starredQueriesService?.queries$.subscribe((nextQueries) => {
+ if (nextQueries.length !== starredQueries.length) {
+ setStarredQueries(nextQueries);
+ }
+ });
+
+ const { euiTheme } = useEuiTheme();
+ const tabs = useMemo(() => {
+ return [
+ {
+ id: 'history-queries-tab',
+ name: i18n.translate('esqlEditor.query.historyQueriesTabLabel', {
+ defaultMessage: 'Recent',
+ }),
+ dataTestSubj: 'history-queries-tab',
+ content: (
+
+ ),
+ },
+ {
+ id: 'starred-queries-tab',
+ dataTestSubj: 'starred-queries-tab',
+ name: i18n.translate('esqlEditor.query.starredQueriesTabLabel', {
+ defaultMessage: 'Starred',
+ }),
+ append: (
+
+ {starredQueries?.length}
+
+ ),
+ content: (
+
+ ),
+ },
+ ];
+ }, [
+ containerCSS,
+ containerWidth,
+ height,
+ onUpdateAndSubmit,
+ starredQueries,
+ starredQueriesService,
+ ]);
+
+ const [selectedTabId, setSelectedTabId] = useState('history-queries-tab');
+ const selectedTabContent = useMemo(() => {
+ return tabs.find((obj) => obj.id === selectedTabId)?.content;
+ }, [selectedTabId, tabs]);
+
+ const onSelectedTabChanged = (id: string) => {
+ setSelectedTabId(id);
+ };
+
+ const renderTabs = useCallback(() => {
+ return tabs.map((tab, index) => (
+ onSelectedTabChanged(tab.id)}
+ isSelected={tab.id === selectedTabId}
+ append={tab.append}
+ data-test-subj={tab.dataTestSubj}
+ >
+ {tab.name}
+
+ ));
+ }, [selectedTabId, tabs]);
+
+ return (
+ <>
+
+
+ {renderTabs()}
+
+
+
+
+
+ {selectedTabId === 'history-queries-tab'
+ ? i18n.translate('esqlEditor.history.historyItemslimit', {
+ defaultMessage: 'Showing last {historyItemsLimit} queries',
+ values: { historyItemsLimit: MAX_HISTORY_QUERIES_NUMBER },
+ })
+ : i18n.translate('esqlEditor.history.starredItemslimit', {
+ defaultMessage:
+ 'Showing {starredItemsCount} queries (max {starredItemsLimit})',
+ values: {
+ starredItemsLimit: ESQL_STARRED_QUERIES_LIMIT,
+ starredItemsCount: starredQueries.length ?? 0,
+ },
+ })}
+
+
+
+
+
+ {selectedTabContent}
+ >
+ );
+}
diff --git a/packages/kbn-esql-editor/src/editor_footer/query_history_helpers.test.ts b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.test.ts
similarity index 93%
rename from packages/kbn-esql-editor/src/editor_footer/query_history_helpers.test.ts
rename to packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.test.ts
index 43a676aba56b5..ad33cd3687fae 100644
--- a/packages/kbn-esql-editor/src/editor_footer/query_history_helpers.test.ts
+++ b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.test.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { swapArrayElements } from './query_history_helpers';
+import { swapArrayElements } from './history_starred_queries_helpers';
describe('query history helpers', function () {
it('should swap 2 elements in an array', function () {
diff --git a/packages/kbn-esql-editor/src/editor_footer/query_history_helpers.ts b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.ts
similarity index 86%
rename from packages/kbn-esql-editor/src/editor_footer/query_history_helpers.ts
rename to packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.ts
index c55bc0801ec66..2f7d4419d13c9 100644
--- a/packages/kbn-esql-editor/src/editor_footer/query_history_helpers.ts
+++ b/packages/kbn-esql-editor/src/editor_footer/history_starred_queries_helpers.ts
@@ -19,16 +19,19 @@ export const getReducedSpaceStyling = () => {
}
.euiTable thead tr {
display: grid;
- grid-template-columns: 40px 1fr 0 auto;
+ grid-template-columns: 40px 40px 1fr 0 auto;
}
.euiTable tbody tr {
display: grid;
- grid-template-columns: 40px 1fr auto;
+ grid-template-columns: 40px 40px 1fr auto;
grid-template-areas:
- 'status timeRan lastDuration actions'
- '. queryString queryString queryString';
+ 'favoriteBtn status timeRan lastDuration actions'
+ '. . queryString queryString queryString';
}
/* Set grid template areas */
+ .euiTable td[data-test-subj='favoriteBtn'] {
+ grid-area: favoriteBtn;
+ }
.euiTable td[data-test-subj='status'] {
grid-area: status;
}
diff --git a/packages/kbn-esql-editor/src/editor_footer/index.tsx b/packages/kbn-esql-editor/src/editor_footer/index.tsx
index d898d2c52c9c7..4e60e65f19ca4 100644
--- a/packages/kbn-esql-editor/src/editor_footer/index.tsx
+++ b/packages/kbn-esql-editor/src/editor_footer/index.tsx
@@ -8,7 +8,6 @@
*/
import React, { memo, useState, useCallback, useMemo } from 'react';
-
import { i18n } from '@kbn/i18n';
import {
EuiText,
@@ -27,7 +26,7 @@ import {
import { getLimitFromESQLQuery } from '@kbn/esql-utils';
import { type MonacoMessage } from '../helpers';
import { ErrorsWarningsFooterPopover } from './errors_warnings_popover';
-import { QueryHistoryAction, QueryHistory } from './query_history';
+import { QueryHistoryAction, HistoryAndStarredQueriesTabs } from './history_starred_queries';
import { SubmitFeedbackComponent } from './feedback_component';
import { QueryWrapComponent } from './query_wrap_component';
import type { ESQLEditorDeps } from '../types';
@@ -60,7 +59,6 @@ interface EditorFooterProps {
isSpaceReduced?: boolean;
hideTimeFilterInfo?: boolean;
hideQueryHistory?: boolean;
- isInCompactMode?: boolean;
displayDocumentationAsFlyout?: boolean;
}
@@ -84,7 +82,6 @@ export const EditorFooter = memo(function EditorFooter({
isLanguageComponentOpen,
setIsLanguageComponentOpen,
hideQueryHistory,
- isInCompactMode,
displayDocumentationAsFlyout,
measuredContainerWidth,
code,
@@ -310,7 +307,7 @@ export const EditorFooter = memo(function EditorFooter({
{isHistoryOpen && (
- > & {
+ tooltipContent: string;
+ /** When the condition is truthy, the tooltip will be shown */
+ condition: boolean;
+};
+
+export const TooltipWrapper: React.FunctionComponent = ({
+ children,
+ condition,
+ tooltipContent,
+ ...tooltipProps
+}) => {
+ return (
+ <>
+ {condition ? (
+
+ <>{children}>
+
+ ) : (
+ children
+ )}
+ >
+ );
+};
diff --git a/packages/kbn-esql-editor/src/esql_editor.test.tsx b/packages/kbn-esql-editor/src/esql_editor.test.tsx
index ac00604e5508b..c572ff5355585 100644
--- a/packages/kbn-esql-editor/src/esql_editor.test.tsx
+++ b/packages/kbn-esql-editor/src/esql_editor.test.tsx
@@ -16,23 +16,20 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import { ESQLEditor } from './esql_editor';
import type { ESQLEditorProps } from './types';
import { ReactWrapper } from 'enzyme';
-import { of } from 'rxjs';
+import { coreMock } from '@kbn/core/server/mocks';
describe('ESQLEditor', () => {
const uiConfig: Record = {};
const uiSettings = {
get: (key: string) => uiConfig[key],
} as IUiSettingsClient;
- const theme = {
- theme$: of({ darkMode: false }),
- };
const services = {
uiSettings,
settings: {
client: uiSettings,
},
- theme,
+ core: coreMock.createStart(),
};
function renderESQLEditorComponent(testProps: ESQLEditorProps) {
diff --git a/packages/kbn-esql-editor/src/esql_editor.tsx b/packages/kbn-esql-editor/src/esql_editor.tsx
index e8ca582ac5229..767bc9026348c 100644
--- a/packages/kbn-esql-editor/src/esql_editor.tsx
+++ b/packages/kbn-esql-editor/src/esql_editor.tsx
@@ -25,7 +25,14 @@ import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import type { AggregateQuery } from '@kbn/es-query';
import type { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { useKibana } from '@kbn/kibana-react-plugin/public';
-import { ESQLLang, ESQL_LANG_ID, ESQL_THEME_ID, monaco, type ESQLCallbacks } from '@kbn/monaco';
+import {
+ ESQLLang,
+ ESQL_LANG_ID,
+ ESQL_DARK_THEME_ID,
+ ESQL_LIGHT_THEME_ID,
+ monaco,
+ type ESQLCallbacks,
+} from '@kbn/monaco';
import memoize from 'lodash/memoize';
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
@@ -91,7 +98,8 @@ export const ESQLEditor = memo(function ESQLEditor({
fieldsMetadata,
uiSettings,
} = kibana.services;
- const timeZone = core?.uiSettings?.get('dateFormat:tz');
+ const darkMode = core.theme?.getTheme().darkMode;
+
const histogramBarTarget = uiSettings?.get('histogram:barTarget') ?? 50;
const [code, setCode] = useState(query.esql ?? '');
// To make server side errors less "sticky", register the state of the code when submitting
@@ -456,11 +464,10 @@ export const ESQLEditor = memo(function ESQLEditor({
validateQuery();
addQueriesToCache({
queryString: code,
- timeZone,
status: clientParserStatus,
});
}
- }, [clientParserStatus, isLoading, isQueryLoading, parseMessages, code, timeZone]);
+ }, [clientParserStatus, isLoading, isQueryLoading, parseMessages, code]);
const queryValidation = useCallback(
async ({ active }: { active: boolean }) => {
@@ -597,7 +604,7 @@ export const ESQLEditor = memo(function ESQLEditor({
vertical: 'auto',
},
scrollBeyondLastLine: false,
- theme: ESQL_THEME_ID,
+ theme: darkMode ? ESQL_DARK_THEME_ID : ESQL_LIGHT_THEME_ID,
wordWrap: 'on',
wrappingIndent: 'none',
};
diff --git a/packages/kbn-esql-editor/src/history_local_storage.test.ts b/packages/kbn-esql-editor/src/history_local_storage.test.ts
index c149dada84894..4632bd124f80d 100644
--- a/packages/kbn-esql-editor/src/history_local_storage.test.ts
+++ b/packages/kbn-esql-editor/src/history_local_storage.test.ts
@@ -20,7 +20,6 @@ describe('history local storage', function () {
it('should add queries to cache correctly ', function () {
addQueriesToCache({
queryString: 'from kibana_sample_data_flights | limit 10',
- timeZone: 'Browser',
});
const historyItems = getCachedQueries();
expect(historyItems.length).toBe(1);
@@ -31,7 +30,6 @@ describe('history local storage', function () {
it('should update queries to cache correctly ', function () {
addQueriesToCache({
queryString: 'from kibana_sample_data_flights \n | limit 10 \n | stats meow = avg(woof)',
- timeZone: 'Browser',
status: 'success',
});
@@ -49,7 +47,6 @@ describe('history local storage', function () {
it('should update queries to cache correctly if they are the same with different format', function () {
addQueriesToCache({
queryString: 'from kibana_sample_data_flights | limit 10 | stats meow = avg(woof) ',
- timeZone: 'Browser',
status: 'success',
});
@@ -68,7 +65,6 @@ describe('history local storage', function () {
addQueriesToCache(
{
queryString: 'row 1',
- timeZone: 'Browser',
status: 'success',
},
2
diff --git a/packages/kbn-esql-editor/src/history_local_storage.ts b/packages/kbn-esql-editor/src/history_local_storage.ts
index c79561d5d3875..46dd770d8d897 100644
--- a/packages/kbn-esql-editor/src/history_local_storage.ts
+++ b/packages/kbn-esql-editor/src/history_local_storage.ts
@@ -7,10 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import moment from 'moment';
import 'moment-timezone';
const QUERY_HISTORY_ITEM_KEY = 'QUERY_HISTORY_ITEM_KEY';
-const dateFormat = 'MMM. D, YY HH:mm:ss.SSS';
+export const dateFormat = 'MMM. D, YY HH:mm:ss';
/**
* We show maximum 20 ES|QL queries in the Query history component
@@ -19,32 +18,35 @@ const dateFormat = 'MMM. D, YY HH:mm:ss.SSS';
export interface QueryHistoryItem {
status?: 'success' | 'error' | 'warning';
queryString: string;
- startDateMilliseconds?: number;
timeRan?: string;
- timeZone?: string;
}
-const MAX_QUERIES_NUMBER = 20;
+export const MAX_HISTORY_QUERIES_NUMBER = 20;
-const getKey = (queryString: string) => {
+export const getTrimmedQuery = (queryString: string) => {
return queryString.replaceAll('\n', '').trim().replace(/\s\s+/g, ' ');
};
-const getMomentTimeZone = (timeZone?: string) => {
- return !timeZone || timeZone === 'Browser' ? moment.tz.guess() : timeZone;
-};
-
-const sortDates = (date1?: number, date2?: number) => {
- return moment(date1)?.valueOf() - moment(date2)?.valueOf();
+const sortDates = (date1?: string, date2?: string) => {
+ if (!date1 || !date2) return 0;
+ return date1 < date2 ? 1 : date1 > date2 ? -1 : 0;
};
export const getHistoryItems = (sortDirection: 'desc' | 'asc'): QueryHistoryItem[] => {
const localStorageString = localStorage.getItem(QUERY_HISTORY_ITEM_KEY) ?? '[]';
- const historyItems: QueryHistoryItem[] = JSON.parse(localStorageString);
+ const localStorageItems: QueryHistoryItem[] = JSON.parse(localStorageString);
+ const historyItems: QueryHistoryItem[] = localStorageItems.map((item) => {
+ return {
+ status: item.status,
+ queryString: item.queryString,
+ timeRan: item.timeRan ? new Date(item.timeRan).toISOString() : undefined,
+ };
+ });
+
const sortedByDate = historyItems.sort((a, b) => {
return sortDirection === 'desc'
- ? sortDates(b.startDateMilliseconds, a.startDateMilliseconds)
- : sortDates(a.startDateMilliseconds, b.startDateMilliseconds);
+ ? sortDates(b.timeRan, a.timeRan)
+ : sortDates(a.timeRan, b.timeRan);
});
return sortedByDate;
};
@@ -58,24 +60,22 @@ export const getCachedQueries = (): QueryHistoryItem[] => {
// Adding the maxQueriesAllowed here for testing purposes
export const addQueriesToCache = (
item: QueryHistoryItem,
- maxQueriesAllowed = MAX_QUERIES_NUMBER
+ maxQueriesAllowed = MAX_HISTORY_QUERIES_NUMBER
) => {
// if the user is working on multiple tabs
// the cachedQueries Map might not contain all
// the localStorage queries
const queries = getHistoryItems('desc');
queries.forEach((queryItem) => {
- const trimmedQueryString = getKey(queryItem.queryString);
+ const trimmedQueryString = getTrimmedQuery(queryItem.queryString);
cachedQueries.set(trimmedQueryString, queryItem);
});
- const trimmedQueryString = getKey(item.queryString);
+ const trimmedQueryString = getTrimmedQuery(item.queryString);
if (item.queryString) {
- const tz = getMomentTimeZone(item.timeZone);
cachedQueries.set(trimmedQueryString, {
...item,
- timeRan: moment().tz(tz).format(dateFormat),
- startDateMilliseconds: moment().valueOf(),
+ timeRan: new Date().toISOString(),
status: item.status,
});
}
@@ -83,9 +83,7 @@ export const addQueriesToCache = (
let allQueries = [...getCachedQueries()];
if (allQueries.length >= maxQueriesAllowed + 1) {
- const sortedByDate = allQueries.sort((a, b) =>
- sortDates(b?.startDateMilliseconds, a?.startDateMilliseconds)
- );
+ const sortedByDate = allQueries.sort((a, b) => sortDates(b.timeRan, a.timeRan));
// queries to store in the localstorage
allQueries = sortedByDate.slice(0, maxQueriesAllowed);
diff --git a/packages/kbn-esql-editor/src/types.ts b/packages/kbn-esql-editor/src/types.ts
index 339ac7a506430..a5fcaba885b0a 100644
--- a/packages/kbn-esql-editor/src/types.ts
+++ b/packages/kbn-esql-editor/src/types.ts
@@ -13,6 +13,8 @@ import type { AggregateQuery } from '@kbn/es-query';
import type { ExpressionsStart } from '@kbn/expressions-plugin/public';
import type { IndexManagementPluginSetup } from '@kbn/index-management-shared-types';
import type { FieldsMetadataPublicStart } from '@kbn/fields-metadata-plugin/public';
+import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';
+import type { Storage } from '@kbn/kibana-utils-plugin/public';
export interface ESQLEditorProps {
/** The aggregate type query */
@@ -70,6 +72,8 @@ export interface ESQLEditorDeps {
core: CoreStart;
dataViews: DataViewsPublicPluginStart;
expressions: ExpressionsStart;
+ storage: Storage;
indexManagementApiService?: IndexManagementPluginSetup['apiService'];
fieldsMetadata?: FieldsMetadataPublicStart;
+ usageCollection?: UsageCollectionStart;
}
diff --git a/packages/kbn-esql-editor/tsconfig.json b/packages/kbn-esql-editor/tsconfig.json
index c26b971e5231c..5131dd90fb0a5 100644
--- a/packages/kbn-esql-editor/tsconfig.json
+++ b/packages/kbn-esql-editor/tsconfig.json
@@ -28,6 +28,11 @@
"@kbn/fields-metadata-plugin",
"@kbn/esql-validation-autocomplete",
"@kbn/esql-utils",
+ "@kbn/content-management-favorites-public",
+ "@kbn/usage-collection-plugin",
+ "@kbn/content-management-favorites-common",
+ "@kbn/kibana-utils-plugin",
+ "@kbn/shared-ux-table-persist",
],
"exclude": [
"target/**/*",
diff --git a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts
index 2f46356acee37..02d2c062ccca7 100644
--- a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts
@@ -12,9 +12,7 @@ import { ESQLRealField } from '../validation/types';
import { fieldTypes } from '../definitions/types';
export const fields: ESQLRealField[] = [
- ...fieldTypes
- .map((type) => ({ name: `${camelCase(type)}Field`, type }))
- .filter((f) => f.type !== 'unsupported'),
+ ...fieldTypes.map((type) => ({ name: `${camelCase(type)}Field`, type })),
{ name: 'any#Char$Field', type: 'double' },
{ name: 'kubernetes.something.something', type: 'double' },
{ name: '@timestamp', type: 'date' },
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts
index 2221f4dc1582f..c49b05985c86a 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/helpers.ts
@@ -11,6 +11,7 @@ import { camelCase } from 'lodash';
import { parse } from '@kbn/esql-ast';
import { scalarFunctionDefinitions } from '../../definitions/generated/scalar_functions';
import { builtinFunctions } from '../../definitions/builtin';
+import { NOT_SUGGESTED_TYPES } from '../../shared/resources_helpers';
import { aggregationFunctionDefinitions } from '../../definitions/generated/aggregation_functions';
import { timeUnitsToSuggest } from '../../definitions/literals';
import { groupingFunctionDefinitions } from '../../definitions/grouping';
@@ -229,7 +230,11 @@ export function getFieldNamesByType(
) {
const requestedType = Array.isArray(_requestedType) ? _requestedType : [_requestedType];
return fields
- .filter(({ type }) => requestedType.includes('any') || requestedType.includes(type))
+ .filter(
+ ({ type }) =>
+ (requestedType.includes('any') || requestedType.includes(type)) &&
+ !NOT_SUGGESTED_TYPES.includes(type)
+ )
.map(({ name, suggestedAs }) => suggestedAs || name);
}
@@ -267,7 +272,9 @@ export function createCustomCallbackMocks(
enrichFields: string[];
}>
) {
- const finalColumnsSinceLastCommand = customColumnsSinceLastCommand || fields;
+ const finalColumnsSinceLastCommand =
+ customColumnsSinceLastCommand ||
+ fields.filter(({ type }) => !NOT_SUGGESTED_TYPES.includes(type));
const finalSources = customSources || indexes;
const finalPolicies = customPolicies || policies;
return {
diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
index 5f3a2e45f9e1f..f8d72fecf229a 100644
--- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts
@@ -887,6 +887,7 @@ describe('autocomplete', () => {
'FROM a | ENRICH policy /',
['ON $0', 'WITH $0', '| '].map(attachTriggerCommand)
);
+
testSuggestions(
'FROM a | ENRICH policy ON /',
getFieldNamesByType('any')
diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/resources_helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/resources_helpers.ts
index 5e7d951d8bdbf..5659a585ed758 100644
--- a/packages/kbn-esql-validation-autocomplete/src/shared/resources_helpers.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/shared/resources_helpers.ts
@@ -12,6 +12,8 @@ import type { ESQLCallbacks } from './types';
import type { ESQLRealField } from '../validation/types';
import { enrichFieldsWithECSInfo } from '../autocomplete/utils/ecs_metadata_helper';
+export const NOT_SUGGESTED_TYPES = ['unsupported'];
+
export function buildQueryUntilPreviousCommand(ast: ESQLAst, queryString: string) {
const prevCommand = ast[Math.max(ast.length - 2, 0)];
return prevCommand ? queryString.substring(0, prevCommand.location.max + 1) : queryString;
@@ -54,7 +56,11 @@ export function getFieldsByTypeHelper(queryText: string, resourceRetriever?: ESQ
return (
Array.from(cacheFields.values())?.filter(({ name, type }) => {
const ts = Array.isArray(type) ? type : [type];
- return !ignored.includes(name) && ts.some((t) => types[0] === 'any' || types.includes(t));
+ return (
+ !ignored.includes(name) &&
+ ts.some((t) => types[0] === 'any' || types.includes(t)) &&
+ !NOT_SUGGESTED_TYPES.includes(type)
+ );
}) || []
);
},
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
index bf0e9782a3395..fee9f90f38c93 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json
@@ -76,6 +76,10 @@
"name": "counterDoubleField",
"type": "counter_double"
},
+ {
+ "name": "unsupportedField",
+ "type": "unsupported"
+ },
{
"name": "dateNanosField",
"type": "date_nanos"
@@ -9690,6 +9694,13 @@
],
"warning": []
},
+ {
+ "query": "from a_index | keep unsupportedField",
+ "error": [],
+ "warning": [
+ "Field [unsupportedField] cannot be retrieved, it is unsupported or not indexed; returning null"
+ ]
+ },
{
"query": "f",
"error": [
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
index 9d737d542bd1a..68d8ebb233f5e 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
@@ -1695,6 +1695,16 @@ describe('validation logic', () => {
['Argument of [trim] must be [keyword], found value [doubleField] type [double]']
);
});
+
+ describe('unsupported fields', () => {
+ testErrorsAndWarnings(
+ `from a_index | keep unsupportedField`,
+ [],
+ [
+ 'Field [unsupportedField] cannot be retrieved, it is unsupported or not indexed; returning null',
+ ]
+ );
+ });
});
describe('Ignoring errors based on callbacks', () => {
diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
index b4d095e2c0442..b3076d107f850 100644
--- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
+++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts
@@ -1223,21 +1223,24 @@ function validateFieldsShadowing(
return messages;
}
-function validateUnsupportedTypeFields(fields: Map) {
+function validateUnsupportedTypeFields(fields: Map, ast: ESQLAst) {
+ const usedColumnsInQuery: string[] = [];
+
+ walk(ast, {
+ visitColumn: (node) => usedColumnsInQuery.push(node.name),
+ });
const messages: ESQLMessage[] = [];
- for (const field of fields.values()) {
- if (field.type === 'unsupported') {
- // Removed temporarily to supress all these warnings
- // Issue to re-enable in a better way: https://github.com/elastic/kibana/issues/189666
- // messages.push(
- // getMessageFromId({
- // messageId: 'unsupportedFieldType',
- // values: {
- // field: field.name,
- // },
- // locations: { min: 1, max: 1 },
- // })
- // );
+ for (const column of usedColumnsInQuery) {
+ if (fields.has(column) && fields.get(column)!.type === 'unsupported') {
+ messages.push(
+ getMessageFromId({
+ messageId: 'unsupportedFieldType',
+ values: {
+ field: column,
+ },
+ locations: { min: 1, max: 1 },
+ })
+ );
}
}
return messages;
@@ -1350,7 +1353,7 @@ async function validateAst(
const variables = collectVariables(ast, availableFields, queryString);
// notify if the user is rewriting a column as variable with another type
messages.push(...validateFieldsShadowing(availableFields, variables));
- messages.push(...validateUnsupportedTypeFields(availableFields));
+ messages.push(...validateUnsupportedTypeFields(availableFields, ast));
for (const [index, command] of ast.entries()) {
const references: ReferenceMaps = {
diff --git a/packages/kbn-event-annotation-components/components/event_annotation_group_saved_object_finder.tsx b/packages/kbn-event-annotation-components/components/event_annotation_group_saved_object_finder.tsx
index 2f9c7afcd2190..38a701abdd81c 100644
--- a/packages/kbn-event-annotation-components/components/event_annotation_group_saved_object_finder.tsx
+++ b/packages/kbn-event-annotation-components/components/event_annotation_group_saved_object_finder.tsx
@@ -100,6 +100,7 @@ export const EventAnnotationGroupSavedObjectFinder = ({
) : (
{
onChoose({ id, type, fullName, savedObject });
diff --git a/packages/kbn-lens-embeddable-utils/attribute_builder/utils.ts b/packages/kbn-lens-embeddable-utils/attribute_builder/utils.ts
index 6418023586084..9c6ea500c97c7 100644
--- a/packages/kbn-lens-embeddable-utils/attribute_builder/utils.ts
+++ b/packages/kbn-lens-embeddable-utils/attribute_builder/utils.ts
@@ -28,7 +28,7 @@ export type DateHistogramColumnParams = DateHistogramIndexPatternColumn['params'
export type TopValuesColumnParams = Pick<
TermsIndexPatternColumn['params'],
- 'size' | 'orderDirection' | 'orderBy' | 'secondaryFields' | 'accuracyMode'
+ 'size' | 'orderDirection' | 'orderBy' | 'secondaryFields' | 'accuracyMode' | 'orderAgg'
>;
export const getHistogramColumn = ({
diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts
index bc0f7206a2835..9a7c95917878a 100644
--- a/packages/kbn-management/settings/setting_ids/index.ts
+++ b/packages/kbn-management/settings/setting_ids/index.ts
@@ -45,6 +45,7 @@ export const SHORT_DOTS_ENABLE_ID = 'shortDots:enable';
export const SORT_OPTIONS_ID = 'sort:options';
export const STATE_STORE_IN_SESSION_STORAGE_ID = 'state:storeInSessionStorage';
export const THEME_DARK_MODE_ID = 'theme:darkMode';
+export const THEME_NAME_ID = 'theme:name';
export const TIMEPICKER_QUICK_RANGES_ID = 'timepicker:quickRanges';
export const TIMEPICKER_REFRESH_INTERVAL_DEFAULTS_ID = 'timepicker:refreshIntervalDefaults';
export const TIMEPICKER_TIME_DEFAULTS_ID = 'timepicker:timeDefaults';
diff --git a/packages/kbn-manifest/index.ts b/packages/kbn-manifest/index.ts
index 5fc4727a1a72d..ce890742ea61f 100644
--- a/packages/kbn-manifest/index.ts
+++ b/packages/kbn-manifest/index.ts
@@ -37,7 +37,7 @@ export const runKbnManifestCli = () => {
--list all List all the manifests
--package [packageId] Select a package to update.
--plugin [pluginId] Select a plugin to update.
- --set [property] [value] Set the desired "[property]": "[value]"
+ --set [property]=[value] Set the desired "[property]": "[value]"
--unset [property] Removes the desired "[property]: value" from the manifest
`,
},
diff --git a/packages/kbn-monaco/index.ts b/packages/kbn-monaco/index.ts
index ba8b0edb68e1a..283c3150302b7 100644
--- a/packages/kbn-monaco/index.ts
+++ b/packages/kbn-monaco/index.ts
@@ -20,7 +20,7 @@ export {
} from './src/monaco_imports';
export { XJsonLang } from './src/xjson';
export { SQLLang } from './src/sql';
-export { ESQL_LANG_ID, ESQL_THEME_ID, ESQLLang } from './src/esql';
+export { ESQL_LANG_ID, ESQL_DARK_THEME_ID, ESQL_LIGHT_THEME_ID, ESQLLang } from './src/esql';
export type { ESQLCallbacks } from '@kbn/esql-validation-autocomplete';
export * from './src/painless';
diff --git a/packages/kbn-monaco/src/esql/index.ts b/packages/kbn-monaco/src/esql/index.ts
index b14a2ab18ba75..64d49b155cc42 100644
--- a/packages/kbn-monaco/src/esql/index.ts
+++ b/packages/kbn-monaco/src/esql/index.ts
@@ -7,6 +7,6 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { ESQL_LANG_ID, ESQL_THEME_ID } from './lib/constants';
+export { ESQL_LANG_ID, ESQL_DARK_THEME_ID, ESQL_LIGHT_THEME_ID } from './lib/constants';
export { ESQLLang } from './language';
-export { buildESQlTheme } from './lib/esql_theme';
+export { buildESQLTheme } from './lib/esql_theme';
diff --git a/packages/kbn-monaco/src/esql/lib/constants.ts b/packages/kbn-monaco/src/esql/lib/constants.ts
index b0b0588b3ff4a..56f2f85ab074e 100644
--- a/packages/kbn-monaco/src/esql/lib/constants.ts
+++ b/packages/kbn-monaco/src/esql/lib/constants.ts
@@ -8,6 +8,7 @@
*/
export const ESQL_LANG_ID = 'esql';
-export const ESQL_THEME_ID = 'esqlTheme';
+export const ESQL_LIGHT_THEME_ID = 'esqlThemeLight';
+export const ESQL_DARK_THEME_ID = 'esqlThemeDark';
export const ESQL_TOKEN_POSTFIX = '.esql';
diff --git a/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts b/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts
index 237996a7fbcaa..c2a200e650804 100644
--- a/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts
+++ b/packages/kbn-monaco/src/esql/lib/esql_theme.test.ts
@@ -9,12 +9,12 @@
import { ESQLErrorListener, getLexer as _getLexer } from '@kbn/esql-ast';
import { ESQL_TOKEN_POSTFIX } from './constants';
-import { buildESQlTheme } from './esql_theme';
+import { buildESQLTheme } from './esql_theme';
import { CharStreams } from 'antlr4';
describe('ESQL Theme', () => {
it('should not have multiple rules for a single token', () => {
- const theme = buildESQlTheme();
+ const theme = buildESQLTheme({ darkMode: false });
const seen = new Set();
const duplicates: string[] = [];
@@ -40,7 +40,7 @@ describe('ESQL Theme', () => {
.map((name) => name!.toLowerCase());
it('every rule should apply to a valid lexical name', () => {
- const theme = buildESQlTheme();
+ const theme = buildESQLTheme({ darkMode: false });
// These names aren't from the lexer... they are added on our side
// see packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts
@@ -62,7 +62,7 @@ describe('ESQL Theme', () => {
});
it('every valid lexical name should have a corresponding rule', () => {
- const theme = buildESQlTheme();
+ const theme = buildESQLTheme({ darkMode: false });
const tokenIDs = theme.rules.map((rule) => rule.token.replace(ESQL_TOKEN_POSTFIX, ''));
const validExceptions = [
diff --git a/packages/kbn-monaco/src/esql/lib/esql_theme.ts b/packages/kbn-monaco/src/esql/lib/esql_theme.ts
index 330e55de86155..07a4d723b63e8 100644
--- a/packages/kbn-monaco/src/esql/lib/esql_theme.ts
+++ b/packages/kbn-monaco/src/esql/lib/esql_theme.ts
@@ -7,169 +7,177 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { euiThemeVars, darkMode } from '@kbn/ui-theme';
+import { euiDarkVars, euiLightVars } from '@kbn/ui-theme';
import { themeRuleGroupBuilderFactory } from '../../common/theme';
import { ESQL_TOKEN_POSTFIX } from './constants';
import { monaco } from '../../monaco_imports';
const buildRuleGroup = themeRuleGroupBuilderFactory(ESQL_TOKEN_POSTFIX);
-export const buildESQlTheme = (): monaco.editor.IStandaloneThemeData => ({
- base: darkMode ? 'vs-dark' : 'vs',
- inherit: true,
- rules: [
- // base
- ...buildRuleGroup(
- [
- 'explain',
- 'ws',
- 'assign',
- 'comma',
- 'dot',
- 'opening_bracket',
- 'closing_bracket',
- 'quoted_identifier',
- 'unquoted_identifier',
- 'pipe',
- ],
- euiThemeVars.euiTextColor
- ),
+export const buildESQLTheme = ({
+ darkMode,
+}: {
+ darkMode: boolean;
+}): monaco.editor.IStandaloneThemeData => {
+ const euiThemeVars = darkMode ? euiDarkVars : euiLightVars;
- // source commands
- ...buildRuleGroup(
- ['from', 'row', 'show'],
- euiThemeVars.euiColorPrimaryText,
- true // isBold
- ),
+ return {
+ base: darkMode ? 'vs-dark' : 'vs',
+ inherit: true,
+ rules: [
+ // base
+ ...buildRuleGroup(
+ [
+ 'explain',
+ 'ws',
+ 'assign',
+ 'comma',
+ 'dot',
+ 'opening_bracket',
+ 'closing_bracket',
+ 'quoted_identifier',
+ 'unquoted_identifier',
+ 'pipe',
+ ],
+ euiThemeVars.euiTextColor
+ ),
- // commands
- ...buildRuleGroup(
- [
- 'dev_metrics',
- 'metadata',
- 'mv_expand',
- 'stats',
- 'dev_inlinestats',
- 'dissect',
- 'grok',
- 'keep',
- 'rename',
- 'drop',
- 'eval',
- 'sort',
- 'by',
- 'where',
- 'not',
- 'is',
- 'like',
- 'rlike',
- 'in',
- 'as',
- 'limit',
- 'dev_lookup',
- 'null',
- 'enrich',
- 'on',
- 'with',
- 'asc',
- 'desc',
- 'nulls_order',
- ],
- euiThemeVars.euiColorAccentText,
- true // isBold
- ),
+ // source commands
+ ...buildRuleGroup(
+ ['from', 'row', 'show'],
+ euiThemeVars.euiColorPrimaryText,
+ true // isBold
+ ),
- // functions
- ...buildRuleGroup(['functions'], euiThemeVars.euiColorPrimaryText),
+ // commands
+ ...buildRuleGroup(
+ [
+ 'dev_metrics',
+ 'metadata',
+ 'mv_expand',
+ 'stats',
+ 'dev_inlinestats',
+ 'dissect',
+ 'grok',
+ 'keep',
+ 'rename',
+ 'drop',
+ 'eval',
+ 'sort',
+ 'by',
+ 'where',
+ 'not',
+ 'is',
+ 'like',
+ 'rlike',
+ 'in',
+ 'as',
+ 'limit',
+ 'dev_lookup',
+ 'null',
+ 'enrich',
+ 'on',
+ 'with',
+ 'asc',
+ 'desc',
+ 'nulls_order',
+ ],
+ euiThemeVars.euiColorAccentText,
+ true // isBold
+ ),
- // operators
- ...buildRuleGroup(
- [
- 'or',
- 'and',
- 'rp', // ')'
- 'lp', // '('
- 'eq', // '=='
- 'cieq', // '=~'
- 'neq', // '!='
- 'lt', // '<'
- 'lte', // '<='
- 'gt', // '>'
- 'gte', // '>='
- 'plus', // '+'
- 'minus', // '-'
- 'asterisk', // '*'
- 'slash', // '/'
- 'percent', // '%'
- 'cast_op', // '::'
- ],
- euiThemeVars.euiColorPrimaryText
- ),
+ // functions
+ ...buildRuleGroup(['functions'], euiThemeVars.euiColorPrimaryText),
- // comments
- ...buildRuleGroup(
- [
- 'line_comment',
- 'multiline_comment',
- 'expr_line_comment',
- 'expr_multiline_comment',
- 'explain_line_comment',
- 'explain_multiline_comment',
- 'project_line_comment',
- 'project_multiline_comment',
- 'rename_line_comment',
- 'rename_multiline_comment',
- 'from_line_comment',
- 'from_multiline_comment',
- 'enrich_line_comment',
- 'enrich_multiline_comment',
- 'mvexpand_line_comment',
- 'mvexpand_multiline_comment',
- 'enrich_field_line_comment',
- 'enrich_field_multiline_comment',
- 'lookup_line_comment',
- 'lookup_multiline_comment',
- 'lookup_field_line_comment',
- 'lookup_field_multiline_comment',
- 'show_line_comment',
- 'show_multiline_comment',
- 'setting',
- 'setting_line_comment',
- 'settting_multiline_comment',
- 'metrics_line_comment',
- 'metrics_multiline_comment',
- 'closing_metrics_line_comment',
- 'closing_metrics_multiline_comment',
- ],
- euiThemeVars.euiColorDisabledText
- ),
+ // operators
+ ...buildRuleGroup(
+ [
+ 'or',
+ 'and',
+ 'rp', // ')'
+ 'lp', // '('
+ 'eq', // '=='
+ 'cieq', // '=~'
+ 'neq', // '!='
+ 'lt', // '<'
+ 'lte', // '<='
+ 'gt', // '>'
+ 'gte', // '>='
+ 'plus', // '+'
+ 'minus', // '-'
+ 'asterisk', // '*'
+ 'slash', // '/'
+ 'percent', // '%'
+ 'cast_op', // '::'
+ ],
+ euiThemeVars.euiColorPrimaryText
+ ),
- // values
- ...buildRuleGroup(
- [
- 'quoted_string',
- 'integer_literal',
- 'decimal_literal',
- 'named_or_positional_param',
- 'param',
- 'timespan_literal',
- ],
- euiThemeVars.euiColorSuccessText
- ),
- ],
- colors: {
- 'editor.foreground': euiThemeVars.euiTextColor,
- 'editor.background': euiThemeVars.euiColorEmptyShade,
- 'editor.lineHighlightBackground': euiThemeVars.euiColorLightestShade,
- 'editor.lineHighlightBorder': euiThemeVars.euiColorLightestShade,
- 'editor.selectionHighlightBackground': euiThemeVars.euiColorLightestShade,
- 'editor.selectionHighlightBorder': euiThemeVars.euiColorLightShade,
- 'editorSuggestWidget.background': euiThemeVars.euiColorEmptyShade,
- 'editorSuggestWidget.border': euiThemeVars.euiColorEmptyShade,
- 'editorSuggestWidget.focusHighlightForeground': euiThemeVars.euiColorEmptyShade,
- 'editorSuggestWidget.foreground': euiThemeVars.euiTextColor,
- 'editorSuggestWidget.highlightForeground': euiThemeVars.euiColorPrimary,
- 'editorSuggestWidget.selectedBackground': euiThemeVars.euiColorPrimary,
- 'editorSuggestWidget.selectedForeground': euiThemeVars.euiColorEmptyShade,
- },
-});
+ // comments
+ ...buildRuleGroup(
+ [
+ 'line_comment',
+ 'multiline_comment',
+ 'expr_line_comment',
+ 'expr_multiline_comment',
+ 'explain_line_comment',
+ 'explain_multiline_comment',
+ 'project_line_comment',
+ 'project_multiline_comment',
+ 'rename_line_comment',
+ 'rename_multiline_comment',
+ 'from_line_comment',
+ 'from_multiline_comment',
+ 'enrich_line_comment',
+ 'enrich_multiline_comment',
+ 'mvexpand_line_comment',
+ 'mvexpand_multiline_comment',
+ 'enrich_field_line_comment',
+ 'enrich_field_multiline_comment',
+ 'lookup_line_comment',
+ 'lookup_multiline_comment',
+ 'lookup_field_line_comment',
+ 'lookup_field_multiline_comment',
+ 'show_line_comment',
+ 'show_multiline_comment',
+ 'setting',
+ 'setting_line_comment',
+ 'settting_multiline_comment',
+ 'metrics_line_comment',
+ 'metrics_multiline_comment',
+ 'closing_metrics_line_comment',
+ 'closing_metrics_multiline_comment',
+ ],
+ euiThemeVars.euiColorDisabledText
+ ),
+
+ // values
+ ...buildRuleGroup(
+ [
+ 'quoted_string',
+ 'integer_literal',
+ 'decimal_literal',
+ 'named_or_positional_param',
+ 'param',
+ 'timespan_literal',
+ ],
+ euiThemeVars.euiColorSuccessText
+ ),
+ ],
+ colors: {
+ 'editor.foreground': euiThemeVars.euiTextColor,
+ 'editor.background': euiThemeVars.euiColorEmptyShade,
+ 'editor.lineHighlightBackground': euiThemeVars.euiColorLightestShade,
+ 'editor.lineHighlightBorder': euiThemeVars.euiColorLightestShade,
+ 'editor.selectionHighlightBackground': euiThemeVars.euiColorLightestShade,
+ 'editor.selectionHighlightBorder': euiThemeVars.euiColorLightShade,
+ 'editorSuggestWidget.background': euiThemeVars.euiColorEmptyShade,
+ 'editorSuggestWidget.border': euiThemeVars.euiColorEmptyShade,
+ 'editorSuggestWidget.focusHighlightForeground': euiThemeVars.euiColorEmptyShade,
+ 'editorSuggestWidget.foreground': euiThemeVars.euiTextColor,
+ 'editorSuggestWidget.highlightForeground': euiThemeVars.euiColorPrimary,
+ 'editorSuggestWidget.selectedBackground': euiThemeVars.euiColorPrimary,
+ 'editorSuggestWidget.selectedForeground': euiThemeVars.euiColorEmptyShade,
+ },
+ };
+};
diff --git a/packages/kbn-monaco/src/register_globals.ts b/packages/kbn-monaco/src/register_globals.ts
index b4d9c07f78c79..32b8fb0ef2ece 100644
--- a/packages/kbn-monaco/src/register_globals.ts
+++ b/packages/kbn-monaco/src/register_globals.ts
@@ -11,7 +11,7 @@ import { XJsonLang } from './xjson';
import { PainlessLang } from './painless';
import { SQLLang } from './sql';
import { monaco } from './monaco_imports';
-import { ESQL_THEME_ID, ESQLLang, buildESQlTheme } from './esql';
+import { ESQL_DARK_THEME_ID, ESQL_LIGHT_THEME_ID, ESQLLang, buildESQLTheme } from './esql';
import { YAML_LANG_ID } from './yaml';
import { registerLanguage, registerTheme } from './helpers';
import { ConsoleLang, ConsoleOutputLang, CONSOLE_THEME_ID, buildConsoleTheme } from './console';
@@ -50,7 +50,8 @@ registerLanguage(ConsoleOutputLang);
/**
* Register custom themes
*/
-registerTheme(ESQL_THEME_ID, buildESQlTheme());
+registerTheme(ESQL_LIGHT_THEME_ID, buildESQLTheme({ darkMode: false }));
+registerTheme(ESQL_DARK_THEME_ID, buildESQLTheme({ darkMode: true }));
registerTheme(CONSOLE_THEME_ID, buildConsoleTheme());
registerTheme(CODE_EDITOR_LIGHT_THEME_ID, buildLightTheme());
registerTheme(CODE_EDITOR_DARK_THEME_ID, buildDarkTheme());
diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml
index 8e1cd3e8fb7a1..58424700d9bf6 100644
--- a/packages/kbn-optimizer/limits.yml
+++ b/packages/kbn-optimizer/limits.yml
@@ -2,7 +2,7 @@ pageLoadAssetSize:
actions: 20000
advancedSettings: 27596
aiAssistantManagementSelection: 19146
- aiops: 16526
+ aiops: 16600
alerting: 106936
apm: 64385
banners: 17946
diff --git a/packages/kbn-optimizer/src/common/index.ts b/packages/kbn-optimizer/src/common/index.ts
index 112e677c9d713..543991a92065d 100644
--- a/packages/kbn-optimizer/src/common/index.ts
+++ b/packages/kbn-optimizer/src/common/index.ts
@@ -18,7 +18,6 @@ export * from './rxjs_helpers';
export * from './array_helpers';
export * from './event_stream_helpers';
export * from './parse_path';
-export * from './theme_tags';
export * from './obj_helpers';
export * from './hashes';
export * from './dll_manifest';
diff --git a/packages/kbn-optimizer/src/common/theme_tags.test.ts b/packages/kbn-optimizer/src/common/theme_tags.test.ts
deleted file mode 100644
index edf58797587f6..0000000000000
--- a/packages/kbn-optimizer/src/common/theme_tags.test.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the "Elastic License
- * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
- * Public License v 1"; you may not use this file except in compliance with, at
- * your election, the "Elastic License 2.0", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { parseThemeTags } from './theme_tags';
-
-it('returns default tags when passed undefined', () => {
- expect(parseThemeTags()).toMatchInlineSnapshot(`
- Array [
- "v8dark",
- "v8light",
- ]
- `);
-});
-
-it('returns all tags when passed *', () => {
- expect(parseThemeTags('*')).toMatchInlineSnapshot(`
- Array [
- "v8dark",
- "v8light",
- ]
- `);
-});
-
-it('returns specific tag when passed a single value', () => {
- expect(parseThemeTags('v8light')).toMatchInlineSnapshot(`
- Array [
- "v8light",
- ]
- `);
-});
-
-it('returns specific tags when passed a comma separated list', () => {
- expect(parseThemeTags('v8light,v8dark')).toMatchInlineSnapshot(`
- Array [
- "v8dark",
- "v8light",
- ]
- `);
-});
-
-it('returns specific tags when passed an array', () => {
- expect(parseThemeTags(['v8light', 'v8dark'])).toMatchInlineSnapshot(`
- Array [
- "v8dark",
- "v8light",
- ]
- `);
-});
-
-it('throws when an invalid tag is in the array', () => {
- expect(() => parseThemeTags(['v8light', 'v7light'])).toThrowErrorMatchingInlineSnapshot(
- `"Invalid theme tags [v7light], options: [v8dark, v8light]"`
- );
-});
-
-it('throws when an invalid tags in comma separated list', () => {
- expect(() => parseThemeTags('v8light ,v7light')).toThrowErrorMatchingInlineSnapshot(
- `"Invalid theme tags [v7light], options: [v8dark, v8light]"`
- );
-});
-
-it('returns tags in alphabetical order', () => {
- const tags = parseThemeTags(['v8dark', 'v8light']);
- expect(tags).toEqual(tags.slice().sort((a, b) => a.localeCompare(b)));
-});
-
-it('returns an immutable array', () => {
- expect(() => {
- const tags = parseThemeTags('v8light');
- // @ts-expect-error
- tags.push('foo');
- }).toThrowErrorMatchingInlineSnapshot(`"Cannot add property 1, object is not extensible"`);
-});
diff --git a/packages/kbn-optimizer/src/common/theme_tags.ts b/packages/kbn-optimizer/src/common/theme_tags.ts
deleted file mode 100644
index fc126d55a4330..0000000000000
--- a/packages/kbn-optimizer/src/common/theme_tags.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the "Elastic License
- * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
- * Public License v 1"; you may not use this file except in compliance with, at
- * your election, the "Elastic License 2.0", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { ascending } from './array_helpers';
-
-const tags = (...themeTags: string[]) =>
- Object.freeze(themeTags.sort(ascending((tag) => tag)) as ThemeTag[]);
-
-const validTag = (tag: any): tag is ThemeTag => ALL_THEMES.includes(tag);
-const isArrayOfStrings = (input: unknown): input is string[] =>
- Array.isArray(input) && input.every((v) => typeof v === 'string');
-
-export type ThemeTags = readonly ThemeTag[];
-export type ThemeTag = 'v8light' | 'v8dark';
-export const DEFAULT_THEMES = tags('v8light', 'v8dark');
-export const ALL_THEMES = tags('v8light', 'v8dark');
-
-export function parseThemeTags(input?: any): ThemeTags {
- if (!input) {
- return DEFAULT_THEMES;
- }
-
- if (input === '*') {
- return ALL_THEMES;
- }
-
- if (typeof input === 'string') {
- input = input.split(',').map((tag) => tag.trim());
- }
-
- if (!isArrayOfStrings(input)) {
- throw new Error(`Invalid theme tags, must be an array of strings`);
- }
-
- if (!input.length) {
- throw new Error(
- `Invalid theme tags, you must specify at least one of [${ALL_THEMES.join(', ')}]`
- );
- }
-
- const invalidTags = input.filter((t) => !validTag(t));
- if (invalidTags.length) {
- throw new Error(
- `Invalid theme tags [${invalidTags.join(', ')}], options: [${ALL_THEMES.join(', ')}]`
- );
- }
-
- return tags(...input);
-}
diff --git a/packages/kbn-optimizer/src/common/worker_config.ts b/packages/kbn-optimizer/src/common/worker_config.ts
index 8881d2354740b..6a61c3a99af07 100644
--- a/packages/kbn-optimizer/src/common/worker_config.ts
+++ b/packages/kbn-optimizer/src/common/worker_config.ts
@@ -9,8 +9,8 @@
import Path from 'path';
+import { ThemeTags, parseThemeTags } from '@kbn/core-ui-settings-common';
import { UnknownVals } from './ts_helpers';
-import { ThemeTags, parseThemeTags } from './theme_tags';
export interface WorkerConfig {
readonly repoRoot: string;
diff --git a/packages/kbn-optimizer/src/log_optimizer_state.ts b/packages/kbn-optimizer/src/log_optimizer_state.ts
index 3173ef2a05980..2bb810f45d240 100644
--- a/packages/kbn-optimizer/src/log_optimizer_state.ts
+++ b/packages/kbn-optimizer/src/log_optimizer_state.ts
@@ -10,11 +10,12 @@
import { inspect } from 'util';
import { ToolingLog } from '@kbn/tooling-log';
+import { hasNonDefaultThemeTags } from '@kbn/core-ui-settings-common';
import { tap } from 'rxjs';
import { OptimizerConfig } from './optimizer';
import { OptimizerUpdate$ } from './run_optimizer';
-import { CompilerMsg, pipeClosure, ALL_THEMES } from './common';
+import { CompilerMsg, pipeClosure } from './common';
export function logOptimizerState(log: ToolingLog, config: OptimizerConfig) {
return pipeClosure((update$: OptimizerUpdate$) => {
@@ -80,9 +81,9 @@ export function logOptimizerState(log: ToolingLog, config: OptimizerConfig) {
);
}
- if (config.themeTags.length !== ALL_THEMES.length) {
+ if (hasNonDefaultThemeTags(config.themeTags)) {
log.warning(
- `only building [${config.themeTags}] themes, customize with the KBN_OPTIMIZER_THEMES environment variable`
+ `running with non-default [${config.themeTags}] set of themes, customize with the KBN_OPTIMIZER_THEMES environment variable`
);
}
}
diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_cache_key.test.ts b/packages/kbn-optimizer/src/optimizer/optimizer_cache_key.test.ts
index 6d520836ac4b2..f08849005e971 100644
--- a/packages/kbn-optimizer/src/optimizer/optimizer_cache_key.test.ts
+++ b/packages/kbn-optimizer/src/optimizer/optimizer_cache_key.test.ts
@@ -90,8 +90,8 @@ describe('getOptimizerCacheKey()', () => {
"optimizerCacheKey": "♻",
"repoRoot": ,
"themeTags": Array [
- "v8dark",
"v8light",
+ "v8dark",
],
},
}
diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts
index a3329dcc3d57f..5fd2318953a8c 100644
--- a/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts
+++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts
@@ -8,10 +8,10 @@
*/
jest.mock('@kbn/repo-packages');
+jest.mock('@kbn/core-ui-settings-common');
jest.mock('./assign_bundles_to_workers');
jest.mock('./kibana_platform_plugins');
jest.mock('./get_plugin_bundles');
-jest.mock('../common/theme_tags');
jest.mock('./filter_by_id');
jest.mock('./focus_bundles');
jest.mock('../limits');
@@ -29,7 +29,7 @@ import { REPO_ROOT } from '@kbn/repo-info';
import { createAbsolutePathSerializer } from '@kbn/jest-serializers';
import { OptimizerConfig, ParsedOptions } from './optimizer_config';
-import { parseThemeTags } from '../common';
+import { parseThemeTags } from '@kbn/core-ui-settings-common';
expect.addSnapshotSerializer(createAbsolutePathSerializer());
diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts
index b09650c0708da..1b04a6fbd25a3 100644
--- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts
+++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts
@@ -10,16 +10,9 @@
import Path from 'path';
import Os from 'os';
import { getPackages, getPluginPackagesFilter, type PluginSelector } from '@kbn/repo-packages';
+import { ThemeTag, ThemeTags, parseThemeTags } from '@kbn/core-ui-settings-common';
-import {
- Bundle,
- WorkerConfig,
- CacheableWorkerConfig,
- ThemeTag,
- ThemeTags,
- parseThemeTags,
- omit,
-} from '../common';
+import { Bundle, WorkerConfig, CacheableWorkerConfig, omit } from '../common';
import { toKibanaPlatformPlugin, KibanaPlatformPlugin } from './kibana_platform_plugins';
import { getPluginBundles } from './get_plugin_bundles';
diff --git a/packages/kbn-optimizer/src/worker/theme_loader.ts b/packages/kbn-optimizer/src/worker/theme_loader.ts
index 92a728f17f5cb..3bce12d94e974 100644
--- a/packages/kbn-optimizer/src/worker/theme_loader.ts
+++ b/packages/kbn-optimizer/src/worker/theme_loader.ts
@@ -9,12 +9,11 @@
import { stringifyRequest, getOptions } from 'loader-utils';
import webpack from 'webpack';
-import { parseThemeTags, ALL_THEMES, ThemeTag } from '../common';
-
-const getVersion = (tag: ThemeTag) => 8;
-const getIsDark = (tag: ThemeTag) => tag.includes('dark');
-const compare = (a: ThemeTag, b: ThemeTag) =>
- (getVersion(a) === getVersion(b) ? 1 : 0) + (getIsDark(a) === getIsDark(b) ? 1 : 0);
+import {
+ FALLBACK_THEME_TAG,
+ parseThemeTags,
+ hasNonDefaultThemeTags,
+} from '@kbn/core-ui-settings-common';
// eslint-disable-next-line import/no-default-export
export default function (this: webpack.loader.LoaderContext) {
@@ -23,27 +22,34 @@ export default function (this: webpack.loader.LoaderContext) {
const options = getOptions(this);
const bundleId = options.bundleId as string;
const themeTags = parseThemeTags(options.themeTags);
-
- const cases = ALL_THEMES.map((tag) => {
- if (themeTags.includes(tag)) {
- return `
- case '${tag}':
- return require(${stringifyRequest(this, `${this.resourcePath}?${tag}`)});`;
- }
-
- const fallback = themeTags
- .slice()
- .sort((a, b) => compare(b, tag) - compare(a, tag))
- .shift()!;
-
- const message = `SASS files in [${bundleId}] were not built for theme [${tag}]. Styles were compiled using the [${fallback}] theme instead to keep Kibana somewhat usable. Please adjust the advanced settings to make use of [${themeTags}] or make sure the KBN_OPTIMIZER_THEMES environment variable includes [${tag}] in a comma separated list of themes you want to compile. You can also set it to "*" to build all themes.`;
- return `
- case '${tag}':
- console.error(new Error(${JSON.stringify(message)}));
- return require(${stringifyRequest(this, `${this.resourcePath}?${fallback}`)})`;
- }).join('\n');
+ const isFallbackNeeded = hasNonDefaultThemeTags(themeTags);
+
+ /**
+ * The following piece of code generates a `switch` statement that gets injected into the output
+ * bundle for all `.scss` file imports. The generated `switch` contains:
+ * - a `case` clause for each of the bundled theme tags,
+ * - an optional `default` clause for the theme fallback logic, included when some of the default
+ * Kibana theme tags are omitted and the fallback logic might be needed. The fallback logic
+ * should never have to run and is added as an extra precaution layer.
+ */
+
+ let defaultClause = '';
+ if (isFallbackNeeded) {
+ defaultClause = `
+ default:
+ console.error(new Error("SASS files in [${bundleId}] were not built for theme [" + window.__kbnThemeTag__ + "]. Styles were compiled using the [${FALLBACK_THEME_TAG}] theme instead to keep Kibana somewhat usable. Please adjust the advanced settings to make use of [${themeTags}] or make sure the KBN_OPTIMIZER_THEMES environment variable includes [" + window.__kbnThemeTag__ + "] in a comma-separated list of themes you want to compile. You can also set it to \'*\' to build all themes."));
+ return require(${stringifyRequest(this, `${this.resourcePath}?${FALLBACK_THEME_TAG}`)});`;
+ }
return `
-switch (window.__kbnThemeTag__) {${cases}
+switch (window.__kbnThemeTag__) {
+${themeTags
+ .map(
+ (tag) => `
+ case '${tag}':
+ return require(${stringifyRequest(this, `${this.resourcePath}?${tag}`)});`
+ )
+ .join('\n')}
+ ${defaultClause}
}`;
}
diff --git a/packages/kbn-optimizer/tsconfig.json b/packages/kbn-optimizer/tsconfig.json
index f8cb993537be7..d6e79f66a561a 100644
--- a/packages/kbn-optimizer/tsconfig.json
+++ b/packages/kbn-optimizer/tsconfig.json
@@ -18,6 +18,7 @@
"kbn_references": [
"@kbn/config-schema",
"@kbn/dev-utils",
+ "@kbn/core-ui-settings-common",
"@kbn/optimizer-webpack-helpers",
"@kbn/std",
"@kbn/ui-shared-deps-npm",
diff --git a/packages/kbn-react-hooks/README.md b/packages/kbn-react-hooks/README.md
index 792df6534c8d8..6eba8db3641d6 100644
--- a/packages/kbn-react-hooks/README.md
+++ b/packages/kbn-react-hooks/README.md
@@ -4,7 +4,7 @@ A utility package, `@kbn/react-hooks`, provides custom react hooks for simple ab
## Custom Hooks
-### [useBoolean](./src/useBoolean)
+### [useBoolean](./src/use_boolean/use_boolean.ts)
Simplify handling boolean value with predefined handlers.
@@ -25,4 +25,20 @@ function App() {
);
}
-```
\ No newline at end of file
+```
+
+### [useErrorTextStyle](./src/use_error_text_style/use_error_text_style.ts)
+
+Returns styles used for styling error text.
+
+```tsx
+function App() {
+ const errorTextStyle = useErrorTextStyle();
+
+ return (
+
+ Error message
+
+ );
+}
+```
diff --git a/packages/kbn-react-hooks/index.ts b/packages/kbn-react-hooks/index.ts
index 51c15bd0f10d2..0c8550091ef5a 100644
--- a/packages/kbn-react-hooks/index.ts
+++ b/packages/kbn-react-hooks/index.ts
@@ -8,4 +8,5 @@
*/
export { useBoolean } from './src/use_boolean';
+export { useErrorTextStyle } from './src/use_error_text_style';
export type { UseBooleanHandlers, UseBooleanResult } from './src/use_boolean';
diff --git a/packages/kbn-react-hooks/src/use_error_text_style/index.ts b/packages/kbn-react-hooks/src/use_error_text_style/index.ts
new file mode 100644
index 0000000000000..3cbc69f2b988d
--- /dev/null
+++ b/packages/kbn-react-hooks/src/use_error_text_style/index.ts
@@ -0,0 +1,10 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+export * from './use_error_text_style';
diff --git a/packages/kbn-react-hooks/src/use_error_text_style/use_error_text_style.ts b/packages/kbn-react-hooks/src/use_error_text_style/use_error_text_style.ts
new file mode 100644
index 0000000000000..cb21a95c6ae71
--- /dev/null
+++ b/packages/kbn-react-hooks/src/use_error_text_style/use_error_text_style.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import { css } from '@emotion/react';
+import { useEuiTheme } from '@elastic/eui';
+
+export const useErrorTextStyle = () => {
+ const { euiTheme } = useEuiTheme();
+ const errorTextStyle = css`
+ font-family: ${euiTheme.font.familyCode};
+ white-space: break-spaces;
+ `;
+
+ return errorTextStyle;
+};
diff --git a/packages/kbn-search-index-documents/components/result/result.tsx b/packages/kbn-search-index-documents/components/result/result.tsx
index 14b6c58ebf861..ff3447229d8ed 100644
--- a/packages/kbn-search-index-documents/components/result/result.tsx
+++ b/packages/kbn-search-index-documents/components/result/result.tsx
@@ -37,6 +37,7 @@ export interface ResultProps {
compactCard?: boolean;
onDocumentClick?: () => void;
onDocumentDelete?: () => void;
+ hasDeleteDocumentsPrivilege?: boolean;
}
export const Result: React.FC = ({
@@ -47,6 +48,7 @@ export const Result: React.FC = ({
showScore = false,
onDocumentClick,
onDocumentDelete,
+ hasDeleteDocumentsPrivilege,
}) => {
const [isExpanded, setIsExpanded] = useState(false);
const tooltipText =
@@ -97,6 +99,7 @@ export const Result: React.FC = ({
metaData={{
...metaData,
onDocumentDelete,
+ hasDeleteDocumentsPrivilege,
}}
/>
)}
@@ -121,6 +124,7 @@ export const Result: React.FC = ({
diff --git a/packages/kbn-search-index-documents/components/result/result_field.tsx b/packages/kbn-search-index-documents/components/result/result_field.tsx
index e82991032afbc..acd495f71cd44 100644
--- a/packages/kbn-search-index-documents/components/result/result_field.tsx
+++ b/packages/kbn-search-index-documents/components/result/result_field.tsx
@@ -7,11 +7,19 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import React from 'react';
+import React, { useState } from 'react';
-import { EuiTableRow, EuiTableRowCell, EuiText, EuiToken } from '@elastic/eui';
+import {
+ EuiButtonIcon,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiPopover,
+ EuiTableRow,
+ EuiTableRowCell,
+ EuiText,
+} from '@elastic/eui';
-import { euiThemeVars } from '@kbn/ui-theme';
+import { i18n } from '@kbn/i18n';
import { ResultFieldProps } from './result_types';
import { PERMANENTLY_TRUNCATED_FIELDS } from './constants';
import { ResultFieldValue } from './result_field_value';
@@ -63,26 +71,35 @@ export const ResultField: React.FC = ({
isExpanded,
}) => {
const shouldTruncate = !isExpanded || PERMANENTLY_TRUNCATED_FIELDS.includes(fieldType);
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+ const fieldTypeLabel = i18n.translate('searchIndexDocuments.result.fieldTypeAriaLabel', {
+ defaultMessage: 'This field is of the type {fieldType}',
+ values: { fieldType },
+ });
return (
-
-
-
-
-
-
-
- {fieldName}
-
+
+
+
+ setIsPopoverOpen(!isPopoverOpen)}
+ iconType={iconType || (fieldType ? iconMap[fieldType] : defaultToken)}
+ />
+ }
+ isOpen={isPopoverOpen}
+ >
+ {fieldTypeLabel}
+
+
+
+
+ {fieldName}
+
+
+
diff --git a/packages/kbn-search-index-documents/components/result/result_types.ts b/packages/kbn-search-index-documents/components/result/result_types.ts
index 420951333a05d..fd132b8d30069 100644
--- a/packages/kbn-search-index-documents/components/result/result_types.ts
+++ b/packages/kbn-search-index-documents/components/result/result_types.ts
@@ -23,6 +23,7 @@ export interface MetaDataProps {
title?: string;
score?: SearchHit['_score'];
showScore?: boolean;
+ hasDeleteDocumentsPrivilege?: boolean;
}
export interface FieldProps {
diff --git a/packages/kbn-search-index-documents/components/result/results_fields.tsx b/packages/kbn-search-index-documents/components/result/results_fields.tsx
index e25ede0fe0463..9684d41d28c6b 100644
--- a/packages/kbn-search-index-documents/components/result/results_fields.tsx
+++ b/packages/kbn-search-index-documents/components/result/results_fields.tsx
@@ -9,19 +9,39 @@
import React from 'react';
-import { EuiTable, EuiTableBody } from '@elastic/eui';
+import { EuiTable, EuiTableBody, EuiTableHeader, EuiTableHeaderCell } from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
import { ResultField } from './result_field';
import { ResultFieldProps } from './result_types';
interface Props {
+ documentId: string;
fields: ResultFieldProps[];
isExpanded: boolean;
}
-export const ResultFields: React.FC = ({ fields, isExpanded }) => {
+export const ResultFields: React.FC = ({ documentId, fields, isExpanded }) => {
return (
-
+
+
+
+ {i18n.translate('searchIndexDocuments.resultFields.fieldTypeHeaderLabel', {
+ defaultMessage: 'Field',
+ })}
+
+
+ {i18n.translate('searchIndexDocuments.resultFields.contentstableHeaderLabel', {
+ defaultMessage: 'Contents',
+ })}
+
+
+
{fields.map((field) => (
= ({
onDocumentDelete,
score,
showScore = false,
+ hasDeleteDocumentsPrivilege,
}) => {
const [popoverIsOpen, setPopoverIsOpen] = useState(false);
const closePopover = () => setPopoverIsOpen(false);
@@ -85,9 +88,10 @@ const MetadataPopover: React.FC = ({
return (
- {i18n.translate('searchIndexDocuments.result.header.metadata.title', {
- defaultMessage: 'Document metadata',
- })}
+
= ({
@@ -118,22 +125,40 @@ const MetadataPopover: React.FC = ({
{onDocumentDelete && (
- ) => {
- e.stopPropagation();
- onDocumentDelete();
- closePopover();
- }}
- fullWidth
+
- {i18n.translate('searchIndexDocuments.result.header.metadata.deleteDocument', {
- defaultMessage: 'Delete document',
- })}
-
+ ) => {
+ e.stopPropagation();
+ onDocumentDelete();
+ closePopover();
+ }}
+ fullWidth
+ >
+
+
+
)}
diff --git a/packages/kbn-search-index-documents/tsconfig.json b/packages/kbn-search-index-documents/tsconfig.json
index cffc6f03fbbd5..4290e62de320a 100644
--- a/packages/kbn-search-index-documents/tsconfig.json
+++ b/packages/kbn-search-index-documents/tsconfig.json
@@ -18,7 +18,6 @@
"kbn_references": [
"@kbn/i18n",
"@kbn/i18n-react",
- "@kbn/ui-theme",
"@kbn/core",
"@kbn/core-elasticsearch-server",
]
diff --git a/packages/kbn-securitysolution-utils/src/path_validations/index.ts b/packages/kbn-securitysolution-utils/src/path_validations/index.ts
index 0609129349b60..1f1eaf0b01423 100644
--- a/packages/kbn-securitysolution-utils/src/path_validations/index.ts
+++ b/packages/kbn-securitysolution-utils/src/path_validations/index.ts
@@ -21,19 +21,22 @@ export enum ConditionEntryField {
HASH = 'process.hash.*',
PATH = 'process.executable.caseless',
SIGNER = 'process.Ext.code_signature',
+ SIGNER_MAC = 'process.code_signature',
}
export enum EntryFieldType {
HASH = '.hash.',
EXECUTABLE = '.executable.caseless',
PATH = '.path',
- SIGNER = '.Ext.code_signature',
+ SIGNER = '.code_signature',
}
export type TrustedAppConditionEntryField =
| 'process.hash.*'
| 'process.executable.caseless'
- | 'process.Ext.code_signature';
+ | 'process.Ext.code_signature'
+ | 'process.code_signature';
+
export type BlocklistConditionEntryField =
| 'file.hash.*'
| 'file.path'
diff --git a/packages/kbn-storybook/src/lib/decorators.tsx b/packages/kbn-storybook/src/lib/decorators.tsx
index d6b3c6abf2f40..270da371172eb 100644
--- a/packages/kbn-storybook/src/lib/decorators.tsx
+++ b/packages/kbn-storybook/src/lib/decorators.tsx
@@ -21,7 +21,7 @@ import type { AnalyticsServiceStart } from '@kbn/core-analytics-browser';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
import { i18n } from '@kbn/i18n';
-const theme$ = new BehaviorSubject({ darkMode: false });
+const theme$ = new BehaviorSubject({ darkMode: false, name: 'amsterdam' });
const i18nStart: I18nStart = {
Context: ({ children }) => {children},
@@ -43,7 +43,7 @@ const KibanaContextDecorator: DecoratorFn = (storyFn, { globals }) => {
const colorMode = globals.euiTheme === 'v8.dark' ? 'dark' : 'light';
useEffect(() => {
- theme$.next({ darkMode: colorMode === 'dark' });
+ theme$.next({ darkMode: colorMode === 'dark', name: 'amsterdam' });
}, [colorMode]);
return (
diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel
index d2e67ccd14ac6..b0d7bb65843d9 100644
--- a/packages/kbn-ui-shared-deps-src/BUILD.bazel
+++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel
@@ -39,6 +39,7 @@ webpack_cli(
"//packages/shared-ux/error_boundary",
"//packages/kbn-rison",
"//packages/shared-ux/code_editor/impl:code_editor",
+ "//packages/react/kibana_context/theme",
],
output_dir = True,
args = [
diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js
index f56baf1731ac9..2c391dd18d1bc 100644
--- a/packages/kbn-ui-shared-deps-src/src/definitions.js
+++ b/packages/kbn-ui-shared-deps-src/src/definitions.js
@@ -105,6 +105,7 @@ const externals = {
'@kbn/esql-ast': '__kbnSharedDeps__.KbnEsqlAst',
'@kbn/ebt-tools': '__kbnSharedDeps__.KbnEbtTools',
'@elastic/apm-rum-core': '__kbnSharedDeps__.ElasticApmRumCore',
+ '@kbn/react-kibana-context-theme': '__kbnSharedDeps__.KbnReactKibanaContextTheme',
};
module.exports = { distDir, jsFilename, cssDistFilename, externals };
diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js
index f87c2e7d75ead..25432fcfe399e 100644
--- a/packages/kbn-ui-shared-deps-src/src/entry.js
+++ b/packages/kbn-ui-shared-deps-src/src/entry.js
@@ -78,3 +78,4 @@ export const KbnCodeEditor = require('@kbn/code-editor');
export const KbnEsqlAst = require('@kbn/esql-ast');
export const KbnEbtTools = require('@kbn/ebt-tools');
export const ElasticApmRumCore = require('@elastic/apm-rum-core');
+export const KbnReactKibanaContextTheme = require('@kbn/react-kibana-context-theme');
diff --git a/packages/kbn-ui-theme/src/theme.ts b/packages/kbn-ui-theme/src/theme.ts
index 0d8f7fb789c2a..3718c7dfb9d64 100644
--- a/packages/kbn-ui-theme/src/theme.ts
+++ b/packages/kbn-ui-theme/src/theme.ts
@@ -7,6 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
+// TODO(tkajtoch): Add support for multiple themes
+
/* eslint-disable-next-line @kbn/eslint/module_migration */
import { default as v8Light } from '@elastic/eui/dist/eui_theme_light.json';
/* eslint-disable-next-line @kbn/eslint/module_migration */
diff --git a/packages/kbn-unified-data-table/__mocks__/services.ts b/packages/kbn-unified-data-table/__mocks__/services.ts
index c4bafef861afb..8a3f9568ba5e9 100644
--- a/packages/kbn-unified-data-table/__mocks__/services.ts
+++ b/packages/kbn-unified-data-table/__mocks__/services.ts
@@ -43,7 +43,7 @@ export function createServicesMock() {
...uiSettingsMock,
};
- const theme = themeServiceMock.createSetupContract({ darkMode: false });
+ const theme = themeServiceMock.createSetupContract({ darkMode: false, name: 'amsterdam' });
corePluginMock.theme = theme;
const dataPlugin = dataPluginMock.createStartContract();
diff --git a/packages/react/kibana_context/common/BUILD.bazel b/packages/react/kibana_context/common/BUILD.bazel
new file mode 100644
index 0000000000000..43f20a833d07f
--- /dev/null
+++ b/packages/react/kibana_context/common/BUILD.bazel
@@ -0,0 +1,36 @@
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
+
+SRCS = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ ],
+ exclude = [
+ "**/test_helpers.ts",
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+DEPS = [
+ "@npm//react",
+ "@npm//tslib",
+ "@npm//@elastic/eui",
+]
+
+js_library(
+ name = "common",
+ package_name = "@kbn/react-kibana-context-common",
+ srcs = ["package.json"] + SRCS,
+ deps = DEPS,
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/react/kibana_context/common/color_mode.test.ts b/packages/react/kibana_context/common/color_mode.test.ts
index 2062f628b54ae..8fcd75f49d45a 100644
--- a/packages/react/kibana_context/common/color_mode.test.ts
+++ b/packages/react/kibana_context/common/color_mode.test.ts
@@ -11,10 +11,10 @@ import { getColorMode } from './color_mode';
describe('getColorMode', () => {
it('returns the correct `colorMode` when `darkMode` is enabled', () => {
- expect(getColorMode({ darkMode: true })).toEqual('DARK');
+ expect(getColorMode({ name: 'amsterdam', darkMode: true })).toEqual('DARK');
});
it('returns the correct `colorMode` when `darkMode` is disabled', () => {
- expect(getColorMode({ darkMode: false })).toEqual('LIGHT');
+ expect(getColorMode({ name: 'amsterdam', darkMode: false })).toEqual('LIGHT');
});
});
diff --git a/packages/react/kibana_context/common/index.ts b/packages/react/kibana_context/common/index.ts
index 77edac36e7912..541e804b788c7 100644
--- a/packages/react/kibana_context/common/index.ts
+++ b/packages/react/kibana_context/common/index.ts
@@ -8,6 +8,7 @@
*/
export { getColorMode } from './color_mode';
+export { getThemeConfigByName, DEFAULT_THEME_CONFIG, type ThemeConfig } from './theme';
export type { KibanaTheme, ThemeServiceStart } from './types';
import type { KibanaTheme } from './types';
@@ -18,4 +19,5 @@ import type { KibanaTheme } from './types';
*/
export const defaultTheme: KibanaTheme = {
darkMode: false,
+ name: 'amsterdam',
};
diff --git a/packages/react/kibana_context/common/kibana.jsonc b/packages/react/kibana_context/common/kibana.jsonc
index 90fde56f05df6..b52bc6a40d0cc 100644
--- a/packages/react/kibana_context/common/kibana.jsonc
+++ b/packages/react/kibana_context/common/kibana.jsonc
@@ -1,5 +1,5 @@
{
- "type": "shared-browser",
+ "type": "shared-common",
"id": "@kbn/react-kibana-context-common",
"owner": "@elastic/appex-sharedux"
}
diff --git a/packages/react/kibana_context/common/theme.ts b/packages/react/kibana_context/common/theme.ts
new file mode 100644
index 0000000000000..45c89172cf187
--- /dev/null
+++ b/packages/react/kibana_context/common/theme.ts
@@ -0,0 +1,26 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import { EuiThemeSystem, EuiThemeAmsterdam } from '@elastic/eui';
+
+export interface ThemeConfig {
+ euiTheme: EuiThemeSystem;
+}
+
+const THEMES: Record = {
+ amsterdam: {
+ euiTheme: EuiThemeAmsterdam,
+ },
+};
+
+export const getThemeConfigByName = (name: string): ThemeConfig | null => {
+ return THEMES[name as keyof typeof THEMES] || null;
+};
+
+export const DEFAULT_THEME_CONFIG = THEMES.amsterdam;
diff --git a/packages/react/kibana_context/common/types.ts b/packages/react/kibana_context/common/types.ts
index 2118c797d8be6..05e7ab7a0c7d5 100644
--- a/packages/react/kibana_context/common/types.ts
+++ b/packages/react/kibana_context/common/types.ts
@@ -20,6 +20,10 @@ import { Observable } from 'rxjs';
export interface KibanaTheme {
/** is dark mode enabled or not */
readonly darkMode: boolean;
+ /**
+ * Name of the active theme
+ */
+ readonly name: string;
}
// To avoid a circular dependency with the deprecation of `CoreThemeProvider`,
diff --git a/packages/react/kibana_context/root/BUILD.bazel b/packages/react/kibana_context/root/BUILD.bazel
new file mode 100644
index 0000000000000..1c47c25bc20a9
--- /dev/null
+++ b/packages/react/kibana_context/root/BUILD.bazel
@@ -0,0 +1,37 @@
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
+
+SRCS = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ ],
+ exclude = [
+ "**/test_helpers.ts",
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+DEPS = [
+ "@npm//react",
+ "@npm//tslib",
+ "@npm//@elastic/eui",
+ "//packages/core/base/core-base-common",
+]
+
+js_library(
+ name = "root",
+ package_name = "@kbn/react-kibana-context-root",
+ srcs = ["package.json"] + SRCS,
+ deps = DEPS,
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/react/kibana_context/root/eui_provider.test.tsx b/packages/react/kibana_context/root/eui_provider.test.tsx
index 069954b09fc60..d7486be2d4798 100644
--- a/packages/react/kibana_context/root/eui_provider.test.tsx
+++ b/packages/react/kibana_context/root/eui_provider.test.tsx
@@ -54,7 +54,7 @@ describe('KibanaEuiProvider', () => {
};
it('exposes the EUI theme provider', async () => {
- const coreTheme: KibanaTheme = { darkMode: true };
+ const coreTheme: KibanaTheme = { darkMode: true, name: 'amsterdam' };
const wrapper = mountWithIntl(
@@ -70,7 +70,7 @@ describe('KibanaEuiProvider', () => {
});
it('propagates changes of the coreTheme observable', async () => {
- const coreTheme$ = new BehaviorSubject({ darkMode: true });
+ const coreTheme$ = new BehaviorSubject({ darkMode: true, name: 'amsterdam' });
const wrapper = mountWithIntl(
@@ -83,7 +83,7 @@ describe('KibanaEuiProvider', () => {
expect(euiTheme!.colorMode).toEqual('DARK');
await act(async () => {
- coreTheme$.next({ darkMode: false });
+ coreTheme$.next({ darkMode: false, name: 'amsterdam' });
});
await refresh(wrapper);
diff --git a/packages/react/kibana_context/root/eui_provider.tsx b/packages/react/kibana_context/root/eui_provider.tsx
index 74b2f6d8605ab..1e4e45c9f36f1 100644
--- a/packages/react/kibana_context/root/eui_provider.tsx
+++ b/packages/react/kibana_context/root/eui_provider.tsx
@@ -13,7 +13,12 @@ import createCache from '@emotion/cache';
import { EuiProvider, EuiProviderProps, euiStylisPrefixer } from '@elastic/eui';
import { EUI_STYLES_GLOBAL, EUI_STYLES_UTILS } from '@kbn/core-base-common';
-import { getColorMode, defaultTheme } from '@kbn/react-kibana-context-common';
+import {
+ getColorMode,
+ defaultTheme,
+ getThemeConfigByName,
+ DEFAULT_THEME_CONFIG,
+} from '@kbn/react-kibana-context-common';
import { ThemeServiceStart } from '@kbn/react-kibana-context-common';
/**
@@ -64,8 +69,13 @@ export const KibanaEuiProvider: FC> =
modify,
children,
}) => {
- const theme = useObservable(theme$, defaultTheme);
- const themeColorMode = useMemo(() => getColorMode(theme), [theme]);
+ const kibanaTheme = useObservable(theme$, defaultTheme);
+ const themeColorMode = useMemo(() => getColorMode(kibanaTheme), [kibanaTheme]);
+
+ const theme = useMemo(() => {
+ const config = getThemeConfigByName(kibanaTheme.name) || DEFAULT_THEME_CONFIG;
+ return config.euiTheme;
+ }, [kibanaTheme.name]);
// In some cases-- like in Storybook or testing-- we want to explicitly override the
// colorMode provided by the `theme`.
@@ -76,7 +86,9 @@ export const KibanaEuiProvider: FC> =
const globalStyles = globalStylesProp === false ? false : undefined;
return (
-
+
{children}
);
diff --git a/packages/react/kibana_context/root/kibana.jsonc b/packages/react/kibana_context/root/kibana.jsonc
index 80a029c6ed487..740d92da927c9 100644
--- a/packages/react/kibana_context/root/kibana.jsonc
+++ b/packages/react/kibana_context/root/kibana.jsonc
@@ -1,5 +1,5 @@
{
- "type": "shared-browser",
+ "type": "shared-common",
"id": "@kbn/react-kibana-context-root",
"owner": "@elastic/appex-sharedux"
}
diff --git a/packages/react/kibana_context/root/root_provider.test.tsx b/packages/react/kibana_context/root/root_provider.test.tsx
index df4bdf14c5c22..919adb09581d5 100644
--- a/packages/react/kibana_context/root/root_provider.test.tsx
+++ b/packages/react/kibana_context/root/root_provider.test.tsx
@@ -58,7 +58,7 @@ describe('KibanaRootContextProvider', () => {
};
it('exposes the EUI theme provider', async () => {
- const coreTheme: KibanaTheme = { darkMode: true };
+ const coreTheme: KibanaTheme = { darkMode: true, name: 'amsterdam' };
const wrapper = mountWithIntl(
{
});
it('propagates changes of the coreTheme observable', async () => {
- const coreTheme$ = new BehaviorSubject({ darkMode: true });
+ const coreTheme$ = new BehaviorSubject({ darkMode: true, name: 'amsterdam' });
const wrapper = mountWithIntl(
{
expect(euiTheme!.colorMode).toEqual('DARK');
await act(async () => {
- coreTheme$.next({ darkMode: false });
+ coreTheme$.next({ darkMode: false, name: 'amsterdam' });
});
await refresh(wrapper);
diff --git a/packages/react/kibana_context/theme/BUILD.bazel b/packages/react/kibana_context/theme/BUILD.bazel
new file mode 100644
index 0000000000000..504477ad7a0ed
--- /dev/null
+++ b/packages/react/kibana_context/theme/BUILD.bazel
@@ -0,0 +1,38 @@
+load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
+
+SRCS = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ ],
+ exclude = [
+ "**/test_helpers.ts",
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+BUNDLER_DEPS = [
+ "@npm//react",
+ "@npm//tslib",
+ "@npm//react-use",
+ "//packages/react/kibana_context/common",
+ "//packages/react/kibana_context/root",
+]
+
+js_library(
+ name = "theme",
+ package_name = "@kbn/react-kibana-context-theme",
+ srcs = ["package.json"] + SRCS,
+ deps = BUNDLER_DEPS,
+ visibility = ["//visibility:public"],
+)
diff --git a/packages/react/kibana_context/theme/kibana.jsonc b/packages/react/kibana_context/theme/kibana.jsonc
index b3f8ba25cc5d3..56ae8b57a6682 100644
--- a/packages/react/kibana_context/theme/kibana.jsonc
+++ b/packages/react/kibana_context/theme/kibana.jsonc
@@ -1,5 +1,5 @@
{
- "type": "shared-browser",
+ "type": "shared-common",
"id": "@kbn/react-kibana-context-theme",
"owner": "@elastic/appex-sharedux"
}
diff --git a/packages/react/kibana_context/theme/theme_provider.test.tsx b/packages/react/kibana_context/theme/theme_provider.test.tsx
index a20af098d857d..9889da9a689a3 100644
--- a/packages/react/kibana_context/theme/theme_provider.test.tsx
+++ b/packages/react/kibana_context/theme/theme_provider.test.tsx
@@ -52,7 +52,7 @@ describe('KibanaThemeProvider', () => {
};
it('exposes the EUI theme provider', async () => {
- const coreTheme$ = new BehaviorSubject({ darkMode: true });
+ const coreTheme$ = new BehaviorSubject({ darkMode: true, name: 'amsterdam' });
const wrapper = mountWithIntl(
@@ -66,7 +66,10 @@ describe('KibanaThemeProvider', () => {
});
it('propagates changes of the coreTheme observable', async () => {
- const coreTheme$ = new BehaviorSubject({ darkMode: true });
+ const coreTheme$ = new BehaviorSubject({
+ darkMode: true,
+ name: 'amsterdam',
+ });
const wrapper = mountWithIntl(
@@ -79,7 +82,7 @@ describe('KibanaThemeProvider', () => {
expect(euiTheme!.colorMode).toEqual('DARK');
await act(async () => {
- coreTheme$.next({ darkMode: false });
+ coreTheme$.next({ darkMode: false, name: 'amsterdam' });
});
await refresh(wrapper);
diff --git a/packages/react/kibana_mount/to_mount_point.test.tsx b/packages/react/kibana_mount/to_mount_point.test.tsx
index 2232551877750..50a49263e2532 100644
--- a/packages/react/kibana_mount/to_mount_point.test.tsx
+++ b/packages/react/kibana_mount/to_mount_point.test.tsx
@@ -41,7 +41,7 @@ describe('toMountPoint', () => {
};
it('exposes the euiTheme when `theme$` is provided', async () => {
- const theme = { theme$: of({ darkMode: true }) };
+ const theme = { theme$: of({ darkMode: true, name: 'amsterdam' }) };
const mount = toMountPoint(, { theme, i18n, analytics });
const targetEl = document.createElement('div');
@@ -53,7 +53,7 @@ describe('toMountPoint', () => {
});
it('propagates changes of the theme$ observable', async () => {
- const theme$ = new BehaviorSubject({ darkMode: true });
+ const theme$ = new BehaviorSubject({ darkMode: true, name: 'amsterdam' });
const mount = toMountPoint(, { theme: { theme$ }, i18n, analytics });
@@ -65,7 +65,7 @@ describe('toMountPoint', () => {
expect(euiTheme!.colorMode).toEqual('DARK');
await act(async () => {
- theme$.next({ darkMode: false });
+ theme$.next({ darkMode: false, name: 'amsterdam' });
});
await flushPromises();
diff --git a/packages/shared-ux/table_persist/index.ts b/packages/shared-ux/table_persist/index.ts
index da2596dac14ab..c46f6a8e8a00a 100644
--- a/packages/shared-ux/table_persist/index.ts
+++ b/packages/shared-ux/table_persist/index.ts
@@ -7,4 +7,5 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { useEuiTablePersist, DEFAULT_PAGE_SIZE_OPTIONS } from './src';
+export { useEuiTablePersist, DEFAULT_PAGE_SIZE_OPTIONS, withEuiTablePersist } from './src';
+export type { EuiTablePersistInjectedProps, EuiTablePersistPropsGetter, HOCProps } from './src';
diff --git a/packages/shared-ux/table_persist/src/index.ts b/packages/shared-ux/table_persist/src/index.ts
index 20416b5cec902..33ac8b18d1d34 100644
--- a/packages/shared-ux/table_persist/src/index.ts
+++ b/packages/shared-ux/table_persist/src/index.ts
@@ -9,3 +9,9 @@
export { useEuiTablePersist } from './use_table_persist';
export { DEFAULT_PAGE_SIZE_OPTIONS } from './constants';
+export { withEuiTablePersist } from './table_persist_hoc';
+export type {
+ EuiTablePersistInjectedProps,
+ EuiTablePersistPropsGetter,
+ HOCProps,
+} from './table_persist_hoc';
diff --git a/packages/shared-ux/table_persist/src/table_persist_hoc.test.tsx b/packages/shared-ux/table_persist/src/table_persist_hoc.test.tsx
new file mode 100644
index 0000000000000..bed84111379bb
--- /dev/null
+++ b/packages/shared-ux/table_persist/src/table_persist_hoc.test.tsx
@@ -0,0 +1,113 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+import React, { PureComponent } from 'react';
+import { render, screen } from '@testing-library/react';
+
+import { withEuiTablePersist, type EuiTablePersistInjectedProps } from './table_persist_hoc';
+
+const mockUseEuiTablePersist = jest.fn().mockReturnValue({
+ pageSize: 'mockPageSize',
+ sorting: 'mockSorting',
+ onTableChange: 'mockOnTableChange',
+});
+
+jest.mock('./use_table_persist', () => {
+ const original = jest.requireActual('./use_table_persist');
+
+ return {
+ ...original,
+ useEuiTablePersist: (...args: unknown[]) => mockUseEuiTablePersist(...args),
+ };
+});
+
+class TestComponent extends PureComponent> {
+ constructor(props: EuiTablePersistInjectedProps) {
+ super(props);
+ }
+
+ render() {
+ return {JSON.stringify(this.props.euiTablePersist)}
;
+ }
+}
+
+describe('withEuiTablePersist', () => {
+ it('should call useEuiTablePersist and return its values', () => {
+ const customOnTableChange = jest.fn();
+ const pageSizeOptions = [5, 10, 25, 50];
+
+ const WrappedComponent = withEuiTablePersist(TestComponent, {
+ tableId: 'testTableId',
+ initialPageSize: 10,
+ initialSort: { field: 'testField', direction: 'asc' },
+ customOnTableChange,
+ pageSizeOptions,
+ });
+
+ render();
+
+ expect(mockUseEuiTablePersist).toHaveBeenCalledWith({
+ tableId: 'testTableId',
+ customOnTableChange,
+ initialPageSize: 10,
+ initialSort: { field: 'testField', direction: 'asc' },
+ pageSizeOptions,
+ });
+
+ expect(screen.getByTestId('value').textContent).toBe(
+ JSON.stringify({
+ pageSize: 'mockPageSize',
+ sorting: 'mockSorting',
+ onTableChange: 'mockOnTableChange',
+ })
+ );
+ });
+
+ it('should allow override through props', () => {
+ const customOnTableChangeDefault = jest.fn();
+ const customOnTableChangeProp = jest.fn();
+ const pageSizeOptions = [5, 10, 25, 50];
+
+ const WrappedComponent = withEuiTablePersist(TestComponent, {
+ tableId: 'testTableId',
+ initialPageSize: 10,
+ initialSort: { field: 'testField', direction: 'asc' },
+ customOnTableChange: customOnTableChangeDefault,
+ pageSizeOptions,
+ });
+
+ render(
+
+ );
+
+ expect(mockUseEuiTablePersist).toHaveBeenCalledWith({
+ tableId: 'testTableIdChanged',
+ customOnTableChange: customOnTableChangeProp,
+ initialPageSize: 20,
+ initialSort: { field: 'testFieldChanged', direction: 'desc' },
+ pageSizeOptions: [5],
+ });
+
+ expect(screen.getByTestId('value').textContent).toBe(
+ JSON.stringify({
+ pageSize: 'mockPageSize',
+ sorting: 'mockSorting',
+ onTableChange: 'mockOnTableChange',
+ })
+ );
+ });
+});
diff --git a/packages/shared-ux/table_persist/src/table_persist_hoc.tsx b/packages/shared-ux/table_persist/src/table_persist_hoc.tsx
new file mode 100644
index 0000000000000..313cf1a1a21a2
--- /dev/null
+++ b/packages/shared-ux/table_persist/src/table_persist_hoc.tsx
@@ -0,0 +1,74 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
+ * Public License v 1"; you may not use this file except in compliance with, at
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+import React from 'react';
+import { type CriteriaWithPagination } from '@elastic/eui';
+import { EuiTablePersistProps, useEuiTablePersist } from './use_table_persist';
+import { PropertySort } from './types';
+
+export interface EuiTablePersistInjectedProps {
+ euiTablePersist: {
+ /** The EuiInMemoryTable onTableChange prop */
+ onTableChange: (change: CriteriaWithPagination) => void;
+ /** The EuiInMemoryTable sorting prop */
+ sorting: { sort: PropertySort } | true;
+ /** The EuiInMemoryTable pagination.pageSize value */
+ pageSize: number;
+ };
+}
+
+export type EuiTablePersistPropsGetter = (
+ props: Omit>
+) => EuiTablePersistProps;
+
+export type HOCProps = P & {
+ /** Custom value for the EuiTablePersist HOC */
+ euiTablePersistProps?: Partial>;
+};
+
+export function withEuiTablePersist(
+ WrappedComponent: React.ComponentClass>,
+ euiTablePersistDefault:
+ | (EuiTablePersistProps & { get?: undefined })
+ | {
+ get: EuiTablePersistPropsGetter;
+ }
+) {
+ const HOC: React.FC>>> = (
+ props
+ ) => {
+ const getterOverride = euiTablePersistDefault.get ? euiTablePersistDefault.get(props) : {};
+
+ const mergedProps = {
+ ...euiTablePersistDefault,
+ ...props.euiTablePersistProps,
+ ...getterOverride, // Getter override other props
+ };
+
+ const { tableId, customOnTableChange, initialSort, initialPageSize, pageSizeOptions } =
+ mergedProps;
+
+ if (!tableId) {
+ throw new Error('tableId is required');
+ }
+
+ const euiTablePersist = useEuiTablePersist({
+ tableId,
+ customOnTableChange,
+ initialSort,
+ initialPageSize,
+ pageSizeOptions,
+ });
+
+ const { euiTablePersistProps, ...rest } = props;
+
+ return ;
+ };
+
+ return HOC;
+}
diff --git a/packages/shared-ux/table_persist/src/use_table_persist.test.ts b/packages/shared-ux/table_persist/src/use_table_persist.test.ts
index 235777aa5d294..51fbd93f7a214 100644
--- a/packages/shared-ux/table_persist/src/use_table_persist.test.ts
+++ b/packages/shared-ux/table_persist/src/use_table_persist.test.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { Criteria } from '@elastic/eui';
+import { CriteriaWithPagination } from '@elastic/eui';
import { renderHook, act } from '@testing-library/react-hooks';
import { useEuiTablePersist } from './use_table_persist';
import { createStorage } from './storage'; // Mock this if it's external
@@ -58,7 +58,7 @@ describe('useEuiTablePersist', () => {
};
act(() => {
- result.current.onTableChange(nextCriteria as Criteria);
+ result.current.onTableChange(nextCriteria as CriteriaWithPagination);
});
expect(result.current.pageSize).toBe(100);
@@ -85,7 +85,7 @@ describe('useEuiTablePersist', () => {
};
act(() => {
- result.current.onTableChange(nextCriteria as Criteria);
+ result.current.onTableChange(nextCriteria as CriteriaWithPagination);
});
expect(customOnTableChange).toHaveBeenCalledWith(nextCriteria);
@@ -98,7 +98,7 @@ describe('useEuiTablePersist', () => {
const { result } = renderHook(() => useEuiTablePersist({ tableId: 'testTable' }));
act(() => {
- result.current.onTableChange({}); // Empty change
+ result.current.onTableChange({} as CriteriaWithPagination); // Empty change
});
expect(result.current.pageSize).toBe(25);
@@ -118,7 +118,7 @@ describe('useEuiTablePersist', () => {
};
act(() => {
- result.current.onTableChange(nextCriteria as Criteria);
+ result.current.onTableChange(nextCriteria as CriteriaWithPagination);
});
expect(result.current.pageSize).toBe(100);
diff --git a/packages/shared-ux/table_persist/src/use_table_persist.ts b/packages/shared-ux/table_persist/src/use_table_persist.ts
index 9c3b7a75788b0..bf91f66beb292 100644
--- a/packages/shared-ux/table_persist/src/use_table_persist.ts
+++ b/packages/shared-ux/table_persist/src/use_table_persist.ts
@@ -8,7 +8,7 @@
*/
import { useState, useCallback } from 'react';
-import { Criteria } from '@elastic/eui';
+import type { CriteriaWithPagination } from '@elastic/eui';
import { DEFAULT_INITIAL_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS } from './constants';
import { createStorage } from './storage';
import { validatePersistData } from './validate_persist_data';
@@ -18,7 +18,7 @@ export interface EuiTablePersistProps {
/** A unique id that will be included in the local storage variable for this table. */
tableId: string;
/** (Optional) Specifies a custom onTableChange handler. */
- customOnTableChange?: (change: Criteria) => void;
+ customOnTableChange?: (change: CriteriaWithPagination) => void;
/** (Optional) Specifies a custom initial table sorting. */
initialSort?: PropertySort;
/** (Optional) Specifies a custom initial page size for the table. Defaults to 50. */
@@ -33,13 +33,37 @@ export interface EuiTablePersistProps {
* Returns the persisting page size and sort and the onTableChange handler that should be passed
* as props to an Eui table component.
*/
-export const useEuiTablePersist = ({
+export function useEuiTablePersist(
+ props: EuiTablePersistProps & { initialSort: PropertySort }
+): {
+ sorting: { sort: PropertySort };
+ pageSize: number;
+ onTableChange: (nextValues: CriteriaWithPagination) => void;
+};
+
+export function useEuiTablePersist(
+ props: EuiTablePersistProps & { initialSort?: undefined }
+): {
+ sorting: true;
+ pageSize: number;
+ onTableChange: (nextValues: CriteriaWithPagination) => void;
+};
+
+export function useEuiTablePersist(
+ props: EuiTablePersistProps
+): {
+ sorting: true | { sort: PropertySort };
+ pageSize: number;
+ onTableChange: (nextValues: CriteriaWithPagination) => void;
+};
+
+export function useEuiTablePersist({
tableId,
customOnTableChange,
initialSort,
initialPageSize,
pageSizeOptions,
-}: EuiTablePersistProps) => {
+}: EuiTablePersistProps) {
const storage = createStorage();
const storedPersistData = storage.get(tableId, undefined);
@@ -55,7 +79,7 @@ export const useEuiTablePersist = ({
const sorting = sort ? { sort } : true; // If sort is undefined, return true to allow sorting
const onTableChange = useCallback(
- (nextValues: Criteria) => {
+ (nextValues: CriteriaWithPagination) => {
if (customOnTableChange) {
customOnTableChange(nextValues);
}
@@ -92,4 +116,4 @@ export const useEuiTablePersist = ({
);
return { pageSize, sorting, onTableChange };
-};
+}
diff --git a/renovate.json b/renovate.json
index 6a762330029cc..e7ab31d95f756 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,9 +1,24 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": ["config:recommended", "helpers:pinGitHubActionDigests", "helpers:pinGitHubActionDigestsToSemver"],
- "ignorePaths": ["**/__fixtures__/**", "**/fixtures/**"],
- "enabledManagers": ["npm", "github-actions", "custom.regex", "devcontainer"],
- "baseBranches": ["main", "7.17"],
+ "extends": [
+ "config:recommended",
+ "helpers:pinGitHubActionDigests",
+ "helpers:pinGitHubActionDigestsToSemver"
+ ],
+ "ignorePaths": [
+ "**/__fixtures__/**",
+ "**/fixtures/**"
+ ],
+ "enabledManagers": [
+ "npm",
+ "github-actions",
+ "custom.regex",
+ "devcontainer"
+ ],
+ "baseBranches": [
+ "main",
+ "7.17"
+ ],
"prConcurrentLimit": 0,
"prHourlyLimit": 0,
"separateMajorMinor": false,
@@ -17,28 +32,51 @@
},
"packageRules": [
{
- "matchDepPatterns": [".*"],
+ "matchDepPatterns": [
+ ".*"
+ ],
"enabled": false
},
{
"groupName": "devcontainer",
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip", "backport:current-major"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip",
+ "backport:current-major"
+ ],
"enabled": true,
- "matchManagers": ["devcontainer"]
+ "matchManagers": [
+ "devcontainer"
+ ]
},
{
"groupName": "chainguard",
- "matchPackageNames": ["docker.elastic.co/wolfi/chainguard-base"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchPackageNames": [
+ "docker.elastic.co/wolfi/chainguard-base"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"enabled": true
},
{
"groupName": "operations actions",
- "matchManagers": ["github-actions"],
+ "matchManagers": [
+ "github-actions"
+ ],
"matchPackageNames": [
"actions/checkout",
"actions/github-script",
@@ -48,33 +86,111 @@
"sergeysova/jq-action",
"sourenlouv/backport"
],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "backport:all-open", "release_note:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "backport:all-open",
+ "release_note:skip"
+ ],
+ "enabled": true
+ },
+ {
+ "groupName": "@elastic/appex-ai-infra",
+ "matchDepNames": [
+ "@aws-crypto/sha256-js",
+ "@aws-crypto/util",
+ "@langtrase/trace-attributes",
+ "@opentelemetry/sdk-trace-base",
+ "@smithy/eventstream-serde-node",
+ "@smithy/protocol-http",
+ "@smithy/signature-v4",
+ "@smithy/types",
+ "ajv",
+ "aws4",
+ "eventsource-parser",
+ "fast-glob",
+ "gpt-tokenizer",
+ "langsmith",
+ "openai",
+ "@types/json-schema",
+ "table"
+ ],
+ "reviewers": [
+ "team:appex-ai-infra"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:AI Infra",
+ "release_note:skip",
+ "backport:all-open"
+ ],
"enabled": true
},
{
"groupName": "@elastic/charts",
- "matchDepNames": ["@elastic/charts"],
- "reviewers": ["team:visualizations", "markov00", "nickofthyme"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:prev-minor", "Team:Visualizations"],
+ "matchDepNames": [
+ "@elastic/charts"
+ ],
+ "reviewers": [
+ "team:visualizations",
+ "markov00",
+ "nickofthyme"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:prev-minor",
+ "Team:Visualizations"
+ ],
"enabled": true
},
{
"groupName": "@elastic/elasticsearch",
- "matchDepNames": ["@elastic/elasticsearch"],
- "reviewers": ["team:kibana-operations", "team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip", "Team:Operations", "Team:Core"],
+ "matchDepNames": [
+ "@elastic/elasticsearch"
+ ],
+ "reviewers": [
+ "team:kibana-operations",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip",
+ "Team:Operations",
+ "Team:Core"
+ ],
"enabled": true
},
{
"groupName": "@elastic/elasticsearch",
- "matchDepNames": ["@elastic/elasticsearch"],
- "reviewers": ["team:kibana-operations", "team:kibana-core"],
- "matchBaseBranches": ["7.17"],
- "labels": ["release_note:skip", "Team:Operations", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "@elastic/elasticsearch"
+ ],
+ "reviewers": [
+ "team:kibana-operations",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "7.17"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Operations",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
@@ -86,178 +202,392 @@
"@launchdarkly/openfeature-node-server",
"launchdarkly/find-code-references"
],
- "reviewers": ["team:kibana-security", "team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Security", "Team:Core", "backport:prev-minor"],
+ "reviewers": [
+ "team:kibana-security",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Security",
+ "Team:Core",
+ "backport:prev-minor"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "OpenFeature",
- "matchDepNames": ["@openfeature/core", "@openfeature/server-sdk", "@openfeature/web-sdk"],
- "reviewers": ["team:kibana-security", "team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Security", "Team:Core", "backport:prev-minor"],
+ "matchDepNames": [
+ "@openfeature/core",
+ "@openfeature/server-sdk",
+ "@openfeature/web-sdk"
+ ],
+ "reviewers": [
+ "team:kibana-security",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Security",
+ "Team:Core",
+ "backport:prev-minor"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "APM",
- "matchDepNames": ["elastic-apm-node", "@elastic/apm-rum", "@elastic/apm-rum-react", "@elastic/apm-rum-core"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "elastic-apm-node",
+ "@elastic/apm-rum",
+ "@elastic/apm-rum-react",
+ "@elastic/apm-rum-core"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
"groupName": "RxJS",
- "matchDepNames": ["rxjs"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "rxjs"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
"groupName": "stack traces",
- "matchDepNames": ["trace", "clarify"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "trace",
+ "clarify"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
"groupName": "@elastic/ebt",
- "matchDepNames": ["@elastic/ebt"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "@elastic/ebt"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
"groupName": "lodash",
- "matchDepNames": ["lodash", "@types/lodash"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "lodash",
+ "@types/lodash"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"enabled": true
},
{
"groupName": "ansi-regex",
- "matchDepNames": ["ansi-regex"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "ansi-regex"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "OpenAPI Spec",
- "matchDepNames": ["@redocly/cli"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:skip"],
+ "matchDepNames": [
+ "@redocly/cli"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "HAPI ecosystem",
- "matchDepNames": ["@hapi/**", "brok", "joi"],
- "reviewers": ["team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "Team:Core", "backport:prev-minor"],
+ "matchDepNames": [
+ "@hapi/**",
+ "brok",
+ "joi"
+ ],
+ "reviewers": [
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "Team:Core",
+ "backport:prev-minor"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "babel",
- "matchDepNames": ["@types/babel__core"],
- "matchDepPatterns": ["^@babel", "^babel-plugin"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepNames": [
+ "@types/babel__core"
+ ],
+ "matchDepPatterns": [
+ "^@babel",
+ "^babel-plugin"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "typescript",
- "matchDepNames": ["typescript", "@types/jsdom"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepNames": [
+ "typescript",
+ "@types/jsdom"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "prettier",
- "matchDepNames": ["prettier", "eslint-plugin-prettier", "eslint-config-prettier"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepNames": [
+ "prettier",
+ "eslint-plugin-prettier",
+ "eslint-config-prettier"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"allowedVersions": "<3.0",
"enabled": true
},
{
"groupName": "typescript-eslint",
- "matchDepPatterns": ["^@typescript-eslint"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepPatterns": [
+ "^@typescript-eslint"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "eslint-plugin-depend",
- "matchDepPatterns": ["eslint-plugin-depend"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepPatterns": [
+ "eslint-plugin-depend"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "polyfills",
- "matchDepNames": ["core-js"],
- "matchDepPatterns": ["polyfill"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepNames": [
+ "core-js"
+ ],
+ "matchDepPatterns": [
+ "polyfill"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "CLI tooling",
- "matchDepNames": ["listr2"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "backport:all-open", "release_note:skip"],
+ "matchDepNames": [
+ "listr2"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "backport:all-open",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "vega related modules",
- "matchDepNames": ["vega", "vega-lite", "vega-schema-url-parser", "vega-tooltip"],
- "reviewers": ["team:kibana-visualizations"],
- "matchBaseBranches": ["main"],
- "labels": ["Feature:Vega", "Team:Visualizations"],
+ "matchDepNames": [
+ "vega",
+ "vega-lite",
+ "vega-schema-url-parser",
+ "vega-tooltip"
+ ],
+ "reviewers": [
+ "team:kibana-visualizations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Feature:Vega",
+ "Team:Visualizations"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "cypress",
- "matchDepPatterns": ["cypress"],
- "reviewers": ["Team:apm", "Team: SecuritySolution"],
- "matchBaseBranches": ["main"],
- "labels": ["buildkite-ci", "ci:all-cypress-suites"],
+ "matchDepPatterns": [
+ "cypress"
+ ],
+ "reviewers": [
+ "Team:apm",
+ "Team: SecuritySolution"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "buildkite-ci",
+ "ci:all-cypress-suites"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "security solution modules",
- "matchDepNames": ["zod", "langchain"],
- "reviewers": ["Team: SecuritySolution"],
- "matchBaseBranches": ["main"],
- "labels": ["Team: SecuritySolution"],
+ "matchDepNames": [
+ "zod",
+ "langchain"
+ ],
+ "reviewers": [
+ "Team: SecuritySolution"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team: SecuritySolution"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
@@ -275,9 +605,17 @@
"@types/xml-crypto",
"@kayahr/text-encoding"
],
- "reviewers": ["team:kibana-security"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Security", "release_note:skip", "backport:all-open"],
+ "reviewers": [
+ "team:kibana-security"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Security",
+ "release_note:skip",
+ "backport:all-open"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
@@ -287,9 +625,17 @@
"github/codeql-action/analyze",
"github/codeql-action/init"
],
- "reviewers": ["team:kibana-security"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Security", "release_note:skip", "backport:all-open"],
+ "reviewers": [
+ "team:kibana-security"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Security",
+ "release_note:skip",
+ "backport:all-open"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
@@ -303,27 +649,54 @@
"ms-chromium-edge-driver",
"selenium-webdriver"
],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "scss",
- "matchDepNames": ["sass-embedded"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip", "backport:all-open"],
+ "matchDepNames": [
+ "sass-embedded"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip",
+ "backport:all-open"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "minify",
- "matchDepNames": ["gulp-terser", "terser"],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "matchDepNames": [
+ "gulp-terser",
+ "terser"
+ ],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
@@ -336,9 +709,16 @@
"@testing-library/react-hooks",
"@testing-library/user-event"
],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
@@ -360,36 +740,70 @@
"jest-runtime",
"jest-snapshot"
],
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Operations", "release_note:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "@storybook",
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "matchDepPatterns": ["^@storybook"],
- "excludeDepNames": ["@storybook/testing-react"],
- "labels": ["Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "matchDepPatterns": [
+ "^@storybook"
+ ],
+ "excludeDepNames": [
+ "@storybook/testing-react"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip",
+ "ci:build-storybooks",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"allowedVersions": "<7.0",
"enabled": true
},
{
"groupName": "@storybook/testing-react",
- "reviewers": ["team:kibana-operations"],
- "matchBaseBranches": ["main"],
- "matchDepNames": ["@storybook/testing-react"],
- "labels": ["Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip"],
+ "reviewers": [
+ "team:kibana-operations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "matchDepNames": [
+ "@storybook/testing-react"
+ ],
+ "labels": [
+ "Team:Operations",
+ "release_note:skip",
+ "ci:build-storybooks",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"allowedVersions": "<2.0",
"enabled": true
},
{
"groupName": "react-query",
- "matchDepNames": ["@tanstack/react-query", "@tanstack/react-query-devtools"],
+ "matchDepNames": [
+ "@tanstack/react-query",
+ "@tanstack/react-query-devtools"
+ ],
"reviewers": [
"team:response-ops",
"team:kibana-cloud-security-posture",
@@ -398,23 +812,43 @@
"team:awp-platform",
"team:security-onboarding-and-lifecycle-mgt"
],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip",
+ "ci:all-cypress-suites"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "react-hook-form",
- "matchDepNames": ["react-hook-form"],
- "reviewers": ["team:security-asset-management", "team:uptime"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"],
+ "matchDepNames": [
+ "react-hook-form"
+ ],
+ "reviewers": [
+ "team:security-asset-management",
+ "team:uptime"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip",
+ "ci:all-cypress-suites"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "redux",
- "matchDepNames": ["redux", "react-redux"],
+ "matchDepNames": [
+ "redux",
+ "react-redux"
+ ],
"reviewers": [
"team:search-kibana",
"team:kibana-presentation",
@@ -422,151 +856,321 @@
"team:kibana-management",
"team:security-solution"
],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip",
+ "ci:all-cypress-suites"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "Profiling",
- "matchDepNames": ["peggy", "@types/dagre"],
- "reviewers": ["team:obs-ux-infra_services-team"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip"],
+ "matchDepNames": [
+ "peggy",
+ "@types/dagre"
+ ],
+ "reviewers": [
+ "team:obs-ux-infra_services-team"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "TTY Output",
- "matchDepNames": ["xterm", "byte-size", "@types/byte-size"],
- "reviewers": ["team:sec-cloudnative-integrations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team: AWP: Visualization", "release_note:skip", "backport:skip"],
+ "matchDepNames": [
+ "xterm",
+ "byte-size",
+ "@types/byte-size"
+ ],
+ "reviewers": [
+ "team:sec-cloudnative-integrations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team: AWP: Visualization",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "Cloud Defend",
- "matchDepNames": ["monaco-yaml"],
- "reviewers": ["team:sec-cloudnative-integrations"],
- "matchBaseBranches": ["main"],
- "labels": ["Team: Cloud Native Integrations", "release_note:skip", "backport:skip"],
+ "matchDepNames": [
+ "monaco-yaml"
+ ],
+ "reviewers": [
+ "team:sec-cloudnative-integrations"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team: Cloud Native Integrations",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "JSON Web Token",
- "matchDepNames": ["jsonwebtoken"],
- "reviewers": ["team:response-ops", "team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:all-open"],
+ "matchDepNames": [
+ "jsonwebtoken"
+ ],
+ "reviewers": [
+ "team:response-ops",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:all-open"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "XState",
- "matchDepNames": ["xstate"],
- "matchDepPrefixes": ["@xstate/"],
- "reviewers": ["team:obs-ux-logs-team"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Obs UX Logs", "release_note:skip"],
+ "matchDepNames": [
+ "xstate"
+ ],
+ "matchDepPrefixes": [
+ "@xstate/"
+ ],
+ "reviewers": [
+ "team:obs-ux-logs-team"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Obs UX Logs",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "OpenTelemetry modules",
- "matchDepPrefixes": ["@opentelemetry/"],
- "reviewers": ["team:stack-monitoring"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Monitoring"],
+ "matchDepPrefixes": [
+ "@opentelemetry/"
+ ],
+ "reviewers": [
+ "team:stack-monitoring"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Monitoring"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "csp",
- "matchDepNames": ["content-security-policy-parser"],
- "reviewers": ["team:kibana-security", "team:kibana-core"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:skip", "ci:serverless-test-all"],
+ "matchDepNames": [
+ "content-security-policy-parser"
+ ],
+ "reviewers": [
+ "team:kibana-security",
+ "team:kibana-core"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:skip",
+ "ci:serverless-test-all"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "AlertingEmails",
- "matchDepNames": ["nodemailer"],
- "reviewers": ["team:response-ops"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:prev-minor"],
+ "matchDepNames": [
+ "nodemailer"
+ ],
+ "reviewers": [
+ "team:response-ops"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:prev-minor"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "Kibana ES|QL Team",
- "matchDepNames": ["recast"],
- "reviewers": ["team:kibana-esql"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:ESQL", "release_note:skip"],
+ "matchDepNames": [
+ "recast"
+ ],
+ "reviewers": [
+ "team:kibana-esql"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:ESQL",
+ "release_note:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "MSW",
- "matchPackageNames": ["msw"],
- "reviewers": ["team:kibana-cloud-security-posture"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Cloud Security", "release_note:skip", "backport:skip"],
+ "matchPackageNames": [
+ "msw"
+ ],
+ "reviewers": [
+ "team:kibana-cloud-security-posture"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Cloud Security",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "re2js",
- "matchDepNames": ["re2js"],
- "reviewers": ["team:visualizations", "dej611"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "backport:all-open", "Team:Visualizations"],
+ "matchDepNames": [
+ "re2js"
+ ],
+ "reviewers": [
+ "team:visualizations",
+ "dej611"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "backport:all-open",
+ "Team:Visualizations"
+ ],
"enabled": true
},
{
"groupName": "Serve swagger docs",
- "matchDepNames": ["express", "swagger-jsdoc", "swagger-ui-express"],
- "reviewers": ["team:obs-entities"],
- "matchBaseBranches": ["main"],
- "labels": ["release_note:skip", "team:obs-entities"],
+ "matchDepNames": [
+ "express",
+ "swagger-jsdoc",
+ "swagger-ui-express"
+ ],
+ "reviewers": [
+ "team:obs-entities"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "release_note:skip",
+ "team:obs-entities"
+ ],
"enabled": true
},
{
"groupName": "Security Engineering Productivity",
- "matchDepNames": ["dotenv", "playwright-chromium", "@playwright/test"],
- "reviewers": ["team:security-engineering-productivity"],
- "matchBaseBranches": ["main"],
- "labels": ["Team: Sec Eng Productivity", "release_note:skip", "backport:all-open"],
+ "matchDepNames": [
+ "dotenv",
+ "playwright-chromium",
+ "@playwright/test"
+ ],
+ "reviewers": [
+ "team:security-engineering-productivity"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team: Sec Eng Productivity",
+ "release_note:skip",
+ "backport:all-open"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "@mswjs/http-middleware",
- "matchPackageNames": ["@mswjs/http-middleware"],
- "reviewers": ["team:kibana-cloud-security-posture"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Cloud Security", "release_note:skip", "backport:skip"],
+ "matchPackageNames": [
+ "@mswjs/http-middleware"
+ ],
+ "reviewers": [
+ "team:kibana-cloud-security-posture"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Cloud Security",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "@xyflow/react",
- "matchPackageNames": ["@xyflow/react"],
- "reviewers": ["team:kibana-cloud-security-posture"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Cloud Security", "release_note:skip", "backport:skip"],
+ "matchPackageNames": [
+ "@xyflow/react"
+ ],
+ "reviewers": [
+ "team:kibana-cloud-security-posture"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Cloud Security",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "@dagrejs/dagre",
- "matchPackageNames": ["@dagrejs/dagre"],
- "reviewers": ["team:kibana-cloud-security-posture"],
- "matchBaseBranches": ["main"],
- "labels": ["Team:Cloud Security", "release_note:skip", "backport:skip"],
+ "matchPackageNames": [
+ "@dagrejs/dagre"
+ ],
+ "reviewers": [
+ "team:kibana-cloud-security-posture"
+ ],
+ "matchBaseBranches": [
+ "main"
+ ],
+ "labels": [
+ "Team:Cloud Security",
+ "release_note:skip",
+ "backport:skip"
+ ],
"minimumReleaseAge": "7 days",
"enabled": true
}
@@ -596,4 +1200,4 @@
"datasourceTemplate": "docker"
}
]
-}
+}
\ No newline at end of file
diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
index 02f7007b51202..28a1e8e1eb538 100644
--- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
+++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
@@ -100,7 +100,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"event_loop_delays_daily": "01b967e8e043801357503de09199dfa3853bab88",
"exception-list": "4aebc4e61fb5d608cae48eaeb0977e8db21c61a4",
"exception-list-agnostic": "6d3262d58eee28ac381ec9654f93126a58be6f5d",
- "favorites": "a68c7c8ae22eaddcca324d8b3bfc80a94e3eec3a",
+ "favorites": "e9773d802932ea85547b120e0efdd9a4f11ff4c6",
"file": "6b65ae5899b60ebe08656fd163ea532e557d3c98",
"file-upload-usage-collection-telemetry": "06e0a8c04f991e744e09d03ab2bd7f86b2088200",
"fileShare": "5be52de1747d249a221b5241af2838264e19aaa1",
diff --git a/src/dev/prs/kibana_qa_pr_list.json b/src/dev/prs/kibana_qa_pr_list.json
index a6e5b9a4f933f..5115959da9f61 100644
--- a/src/dev/prs/kibana_qa_pr_list.json
+++ b/src/dev/prs/kibana_qa_pr_list.json
@@ -1,8 +1,17 @@
{
"include": [
-"v8.13.0"
+"v8.16.0"
],
"exclude": [
+"v8.15.3",
+"v8.15.2",
+"v8.15.1",
+"v8.15.0",
+"v7.17.25",
+"v8.15.3",
+"v8.15.2",
+"v8.15.1",
+"v8.15.0",
"v8.12.0",
"v8.3.3",
"v8.3.2",
@@ -20,9 +29,10 @@
"Feature:Endpoint",
"Feature:Observability Landing - Milestone 1",
"Feature:Osquery",
-"Feature:Transforms",
+"Feature:EEM",
"Feature:Unified Integrations",
"Synthetics",
+"Feature: Observability Onboarding",
"Team: AWL: Platform",
"Team: AWP: Visualization",
"Team: Actionable Observability",
@@ -57,15 +67,19 @@
"Team:apm",
"Team:logs-metrics-ui",
"Team:uptime",
-"Team: Protections Experience",
+"Team:Protections Experience",
"Team:obs-ux-infra_services",
"Team:obs-ux-management",
"Team:Cloud Security",
+"Team:Security Generative AI",
"Team:obs-ux-logs",
"Team:Defend Workflows",
"Team:Entity Analytics",
"Team:Obs AI Assistant",
"Team:Search",
+"Team:Security-Scalability",
+"Team:Detection Engine",
+"Team:Cloud Security",
"bump",
"docs",
"failed-test",
diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts b/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts
index d91f31e243783..01c40ecc53d2d 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts
+++ b/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts
@@ -11,6 +11,6 @@ import { themeServiceMock } from '@kbn/core/public/mocks';
import { ThemeService } from '@kbn/charts-plugin/public/services';
const theme = new ThemeService();
-theme.init(themeServiceMock.createSetupContract({ darkMode: false }));
+theme.init(themeServiceMock.createSetupContract({ darkMode: false, name: 'amsterdam' }));
export { theme };
diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx
index 5baf582877a68..816a10509b425 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx
+++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/partition_vis_component.tsx
@@ -41,6 +41,7 @@ import {
} from '@kbn/expressions-plugin/public';
import type { FieldFormat } from '@kbn/field-formats-plugin/common';
import { getOverridesFor } from '@kbn/chart-expressions-common';
+import { useAppFixedViewport } from '@kbn/core-rendering-browser';
import { consolidateMetricColumns } from '../../common/utils';
import { DEFAULT_PERCENT_DECIMALS } from '../../common/constants';
import {
@@ -385,7 +386,7 @@ const PartitionVisComponent = (props: PartitionVisComponentProps) => {
[visType, visParams, containerDimensions, rescaleFactor, hasOpenedOnAggBasedEditor]
);
- const fixedViewPort = document.getElementById('app-fixed-viewport');
+ const fixedViewPort = useAppFixedViewport();
const legendPosition = visParams.legendPosition ?? Position.Right;
diff --git a/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json b/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json
index 7669646f40a6b..1d8c4c4098728 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json
+++ b/src/plugins/chart_expressions/expression_partition_vis/tsconfig.json
@@ -30,6 +30,7 @@
"@kbn/chart-expressions-common",
"@kbn/cell-actions",
"@kbn/react-kibana-context-render",
+ "@kbn/core-rendering-browser",
],
"exclude": [
"target/**/*",
diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
index e1c428dd15c72..349af46eb101a 100644
--- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
+++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
@@ -55,6 +55,7 @@ import {
} from '@kbn/visualizations-plugin/common/constants';
import { PersistedState } from '@kbn/visualizations-plugin/public';
import { getOverridesFor, ChartSizeSpec } from '@kbn/chart-expressions-common';
+import { useAppFixedViewport } from '@kbn/core-rendering-browser';
import type {
FilterEvent,
BrushEvent,
@@ -232,6 +233,7 @@ export function XYChart({
const chartRef = useRef(null);
const chartBaseTheme = chartsThemeService.useChartsBaseTheme();
const darkMode = chartsThemeService.useDarkMode();
+ const appFixedViewport = useAppFixedViewport();
const filteredLayers = getFilteredLayers(layers);
const layersById = filteredLayers.reduce>(
(hashMap, layer) => ({ ...hashMap, [layer.layerId]: layer }),
@@ -767,7 +769,7 @@ export function XYChart({
>
, XYChartSeriesIdentifier>
- boundary={document.getElementById('app-fixed-viewport') ?? undefined}
+ boundary={appFixedViewport}
headerFormatter={
!args.detailedTooltip && xAxisColumn
? ({ value }) => (
diff --git a/src/plugins/chart_expressions/expression_xy/tsconfig.json b/src/plugins/chart_expressions/expression_xy/tsconfig.json
index efa65a7f28a7d..cd8bd4db90b89 100644
--- a/src/plugins/chart_expressions/expression_xy/tsconfig.json
+++ b/src/plugins/chart_expressions/expression_xy/tsconfig.json
@@ -35,6 +35,7 @@
"@kbn/es-query",
"@kbn/cell-actions",
"@kbn/react-kibana-context-render",
+ "@kbn/core-rendering-browser",
],
"exclude": [
"target/**/*",
diff --git a/src/plugins/charts/public/services/theme/theme.test.tsx b/src/plugins/charts/public/services/theme/theme.test.tsx
index ef8594e200dca..ef77405edf27e 100644
--- a/src/plugins/charts/public/services/theme/theme.test.tsx
+++ b/src/plugins/charts/public/services/theme/theme.test.tsx
@@ -19,7 +19,7 @@ import { ThemeService } from './theme';
import { coreMock } from '@kbn/core/public/mocks';
const createTheme$Mock = (mode: boolean) => {
- return from([{ darkMode: mode }]);
+ return from([{ darkMode: mode, name: 'amsterdam' }]);
};
const { theme: setUpMockTheme } = coreMock.createSetup();
@@ -37,6 +37,7 @@ describe('ThemeService', () => {
expect(await themeService.darkModeEnabled$.pipe(take(1)).toPromise()).toStrictEqual({
darkMode: false,
+ name: 'amsterdam',
});
});
@@ -47,6 +48,7 @@ describe('ThemeService', () => {
expect(await themeService.darkModeEnabled$.pipe(take(1)).toPromise()).toStrictEqual({
darkMode: true,
+ name: 'amsterdam',
});
});
});
diff --git a/src/plugins/console/common/constants/index.ts b/src/plugins/console/common/constants/index.ts
index a00bcebcf38cc..b4d6a594241ce 100644
--- a/src/plugins/console/common/constants/index.ts
+++ b/src/plugins/console/common/constants/index.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { MAJOR_VERSION } from './plugin';
+export { MAJOR_VERSION, WELCOME_TOUR_DELAY } from './plugin';
export { API_BASE_PATH, KIBANA_API_PREFIX } from './api';
export { DEFAULT_VARIABLES } from './variables';
export {
diff --git a/src/plugins/console/common/constants/plugin.ts b/src/plugins/console/common/constants/plugin.ts
index 27ddb7d5dff1d..bb87e300c138d 100644
--- a/src/plugins/console/common/constants/plugin.ts
+++ b/src/plugins/console/common/constants/plugin.ts
@@ -8,3 +8,5 @@
*/
export const MAJOR_VERSION = '8.0.0';
+
+export const WELCOME_TOUR_DELAY = 250;
diff --git a/src/plugins/console/public/application/components/console_tour_step.tsx b/src/plugins/console/public/application/components/console_tour_step.tsx
index 578d590bfff4a..97e999b0090aa 100644
--- a/src/plugins/console/public/application/components/console_tour_step.tsx
+++ b/src/plugins/console/public/application/components/console_tour_step.tsx
@@ -7,8 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import React, { ReactNode, ReactElement } from 'react';
+import React, { ReactNode, ReactElement, useState, useEffect } from 'react';
import { EuiTourStep, PopoverAnchorPosition } from '@elastic/eui';
+import { WELCOME_TOUR_DELAY } from '../../../common/constants';
export interface ConsoleTourStepProps {
step: number;
@@ -44,11 +45,31 @@ export const ConsoleTourStep = ({ tourStepProps, children }: Props) => {
css,
} = tourStepProps;
+ const [popoverVisible, setPopoverVisible] = useState(false);
+
+ useEffect(() => {
+ let timeoutId: any;
+
+ if (isStepOpen) {
+ timeoutId = setTimeout(() => {
+ setPopoverVisible(true);
+ }, WELCOME_TOUR_DELAY);
+ } else {
+ setPopoverVisible(false);
+ }
+
+ return () => {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ };
+ }, [isStepOpen]);
+
return (
{
+ const debouncedResize = debounce(() => {
+ window.dispatchEvent(new Event('resize'));
+ }, WELCOME_TOUR_DELAY);
+
+ debouncedResize();
+
+ // Cleanup the debounce instance on unmount or dependency change
+ return () => {
+ debouncedResize.cancel();
+ };
+ }, [consoleHeight]);
+
useEffect(() => {
function handleResize() {
const newMaxConsoleHeight = getCurrentConsoleMaxSize(euiTheme);
diff --git a/src/plugins/content_management/server/plugin.test.ts b/src/plugins/content_management/server/plugin.test.ts
index 30bbc57ee0159..de077a3f6d4de 100644
--- a/src/plugins/content_management/server/plugin.test.ts
+++ b/src/plugins/content_management/server/plugin.test.ts
@@ -91,7 +91,7 @@ describe('ContentManagementPlugin', () => {
const { plugin, coreSetup, pluginsSetup } = setup();
const api = plugin.setup(coreSetup, pluginsSetup);
- expect(Object.keys(api).sort()).toEqual(['crud', 'eventBus', 'register']);
+ expect(Object.keys(api).sort()).toEqual(['crud', 'eventBus', 'favorites', 'register']);
expect(api.crud('')).toBe('mockedCrud');
expect(api.register({} as any)).toBe('mockedRegister');
expect(api.eventBus.emit({} as any)).toBe('mockedEventBusEmit');
diff --git a/src/plugins/content_management/server/plugin.ts b/src/plugins/content_management/server/plugin.ts
index c82ed1c66fee2..0215f3d36771b 100755
--- a/src/plugins/content_management/server/plugin.ts
+++ b/src/plugins/content_management/server/plugin.ts
@@ -76,10 +76,15 @@ export class ContentManagementPlugin
contentRegistry,
});
- registerFavorites({ core, logger: this.logger, usageCollection: plugins.usageCollection });
+ const favoritesSetup = registerFavorites({
+ core,
+ logger: this.logger,
+ usageCollection: plugins.usageCollection,
+ });
return {
...coreApi,
+ favorites: favoritesSetup,
};
}
diff --git a/src/plugins/content_management/server/types.ts b/src/plugins/content_management/server/types.ts
index 22d1d57e38ba8..020f135a7d080 100644
--- a/src/plugins/content_management/server/types.ts
+++ b/src/plugins/content_management/server/types.ts
@@ -9,6 +9,7 @@
import type { Version } from '@kbn/object-versioning';
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
+import type { FavoritesSetup } from '@kbn/content-management-favorites-server';
import type { CoreApi, StorageContextGetTransformFn } from './core';
export interface ContentManagementServerSetupDependencies {
@@ -18,8 +19,9 @@ export interface ContentManagementServerSetupDependencies {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementServerStartDependencies {}
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface ContentManagementServerSetup extends CoreApi {}
+export interface ContentManagementServerSetup extends CoreApi {
+ favorites: FavoritesSetup;
+}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ContentManagementServerStart {}
diff --git a/src/plugins/controls/public/control_group/components/control_error.tsx b/src/plugins/controls/public/control_group/components/control_error.tsx
index 2ef6b06faeedd..80d33d8225b3b 100644
--- a/src/plugins/controls/public/control_group/components/control_error.tsx
+++ b/src/plugins/controls/public/control_group/components/control_error.tsx
@@ -12,12 +12,14 @@ import React, { useState } from 'react';
import { EuiButtonEmpty, EuiPopover } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { Markdown } from '@kbn/shared-ux-markdown';
+import { useErrorTextStyle } from '@kbn/react-hooks';
interface ControlErrorProps {
error: Error | string;
}
export const ControlError = ({ error }: ControlErrorProps) => {
+ const errorTextStyle = useErrorTextStyle();
const [isPopoverOpen, setPopoverOpen] = useState(false);
const errorMessage = error instanceof Error ? error.message : error;
@@ -47,7 +49,7 @@ export const ControlError = ({ error }: ControlErrorProps) => {
className="controlPanel errorEmbeddableCompact__popover"
closePopover={() => setPopoverOpen(false)}
>
-
+
{errorMessage}
diff --git a/src/plugins/controls/tsconfig.json b/src/plugins/controls/tsconfig.json
index 41ab33dc18969..7759a0fdc7935 100644
--- a/src/plugins/controls/tsconfig.json
+++ b/src/plugins/controls/tsconfig.json
@@ -39,6 +39,7 @@
"@kbn/presentation-panel-plugin",
"@kbn/shared-ux-utility",
"@kbn/std",
+ "@kbn/react-hooks",
],
"exclude": ["target/**/*"]
}
diff --git a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx
index 5f23b21dc9155..5433646e3db8e 100644
--- a/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx
+++ b/src/plugins/dashboard/public/dashboard_actions/filters_notification_popover.tsx
@@ -62,8 +62,7 @@ export function FiltersNotificationPopover({ api }: { api: FiltersNotificationAc
}
}, [api, setDisableEditButton]);
- const [hasLockedHoverActions, dataViews, parentViewMode] = useBatchedOptionalPublishingSubjects(
- api.hasLockedHoverActions$,
+ const [dataViews, parentViewMode] = useBatchedOptionalPublishingSubjects(
api.parentApi?.dataViews,
getViewModeSubject(api ?? undefined)
);
@@ -77,7 +76,7 @@ export function FiltersNotificationPopover({ api }: { api: FiltersNotificationAc
onClick={() => {
setIsPopoverOpen(!isPopoverOpen);
if (apiCanLockHoverActions(api)) {
- api?.lockHoverActions(!hasLockedHoverActions);
+ api?.lockHoverActions(!api.hasLockedHoverActions$.value);
}
}}
data-test-subj={`embeddablePanelNotification-${api.uuid}`}
diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx
index 0ef976af51eb6..76a545d1ea9fc 100644
--- a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx
+++ b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx
@@ -18,6 +18,7 @@ import { Layout, Responsive as ResponsiveReactGridLayout } from 'react-grid-layo
import { ViewMode } from '@kbn/embeddable-plugin/public';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
+import { useAppFixedViewport } from '@kbn/core-rendering-browser';
import { DashboardPanelState } from '../../../../common';
import { DashboardGridItem } from './dashboard_grid_item';
import { useDashboardGridSettings } from './use_dashboard_grid_settings';
@@ -25,7 +26,13 @@ import { useDashboardApi } from '../../../dashboard_api/use_dashboard_api';
import { getPanelLayoutsAreEqual } from '../../state/diffing/dashboard_diffing_utils';
import { DASHBOARD_GRID_HEIGHT, DASHBOARD_MARGIN_SIZE } from '../../../dashboard_constants';
-export const DashboardGrid = ({ viewportWidth }: { viewportWidth: number }) => {
+export const DashboardGrid = ({
+ dashboardContainer,
+ viewportWidth,
+}: {
+ dashboardContainer?: HTMLElement;
+ viewportWidth: number;
+}) => {
const dashboardApi = useDashboardApi();
const [animatePanelTransforms, expandedPanelId, focusedPanelId, panels, useMargins, viewMode] =
@@ -51,6 +58,8 @@ export const DashboardGrid = ({ viewportWidth }: { viewportWidth: number }) => {
}
}, [expandedPanelId]);
+ const appFixedViewport = useAppFixedViewport();
+
const panelsInOrder: string[] = useMemo(() => {
return Object.keys(panels).sort((embeddableIdA, embeddableIdB) => {
const panelA = panels[embeddableIdA];
@@ -72,6 +81,8 @@ export const DashboardGrid = ({ viewportWidth }: { viewportWidth: number }) => {
const type = panels[embeddableId].type;
return (
{
/>
);
});
- }, [expandedPanelId, panels, panelsInOrder, focusedPanelId]);
+ }, [
+ appFixedViewport,
+ dashboardContainer,
+ expandedPanelId,
+ panels,
+ panelsInOrder,
+ focusedPanelId,
+ ]);
const onLayoutChange = useCallback(
(newLayout: Array) => {
diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx
index 9b5a00c628608..5ad1363e6f8af 100644
--- a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx
+++ b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid_item.tsx
@@ -23,6 +23,8 @@ import { embeddableService, presentationUtilService } from '../../../services/ki
type DivProps = Pick, 'className' | 'style' | 'children'>;
export interface Props extends DivProps {
+ appFixedViewport?: HTMLElement;
+ dashboardContainer?: HTMLElement;
id: DashboardPanelState['explicitInput']['id'];
index?: number;
type: DashboardPanelState['type'];
@@ -35,6 +37,8 @@ export interface Props extends DivProps {
export const Item = React.forwardRef(
(
{
+ appFixedViewport,
+ dashboardContainer,
expandedPanelId,
focusedPanelId,
id,
@@ -92,10 +96,8 @@ export const Item = React.forwardRef(
}
}, [id, dashboardApi, scrollToPanelId, highlightPanelId, ref, blurPanel]);
- const dashboardContainerTopOffset =
- (document.querySelector('.dashboardContainer') as HTMLDivElement)?.offsetTop || 0;
- const globalNavTopOffset =
- (document.querySelector('#app-fixed-viewport') as HTMLDivElement)?.offsetTop || 0;
+ const dashboardContainerTopOffset = dashboardContainer?.offsetTop || 0;
+ const globalNavTopOffset = appFixedViewport?.offsetTop || 0;
const focusStyles = blurPanel
? css`
diff --git a/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx
index 027d2aee62b15..51f414bfcc298 100644
--- a/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx
+++ b/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx
@@ -41,7 +41,7 @@ export const useDebouncedWidthObserver = (skipDebounce = false, wait = 100) => {
return { ref, width };
};
-export const DashboardViewport = () => {
+export const DashboardViewport = ({ dashboardContainer }: { dashboardContainer?: HTMLElement }) => {
const dashboardApi = useDashboardApi();
const [hasControls, setHasControls] = useState(false);
const [
@@ -160,7 +160,9 @@ export const DashboardViewport = () => {
otherwise, there is a race condition where the panels can end up being squashed
TODO only render when dashboardInitialized
*/}
- {viewportWidth !== 0 && }
+ {viewportWidth !== 0 && (
+
+ )}
);
diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx
index e21a2f94bfc51..99f4fb7c2fa90 100644
--- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx
+++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx
@@ -470,7 +470,7 @@ export class DashboardContainer
coreStart={{ chrome: coreServices.chrome, customBranding: coreServices.customBranding }}
>
-
+
,
diff --git a/src/plugins/dashboard/server/plugin.ts b/src/plugins/dashboard/server/plugin.ts
index e3d67ca10716b..7762e7da0da96 100644
--- a/src/plugins/dashboard/server/plugin.ts
+++ b/src/plugins/dashboard/server/plugin.ts
@@ -75,6 +75,8 @@ export class DashboardPlugin
},
});
+ plugins.contentManagement.favorites.registerFavoriteType('dashboard');
+
if (plugins.taskManager) {
initializeDashboardTelemetryTask(this.logger, core, plugins.taskManager, plugins.embeddable);
}
diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json
index 3e95675ea64c3..1bf6827433b66 100644
--- a/src/plugins/dashboard/tsconfig.json
+++ b/src/plugins/dashboard/tsconfig.json
@@ -81,6 +81,7 @@
"@kbn/core-custom-branding-browser-mocks",
"@kbn/core-mount-utils-browser",
"@kbn/visualization-utils",
+ "@kbn/core-rendering-browser",
],
"exclude": ["target/**/*"]
}
diff --git a/src/plugins/data/public/search/session/sessions_mgmt/components/table/table.tsx b/src/plugins/data/public/search/session/sessions_mgmt/components/table/table.tsx
index 211fcdcd50235..3e41263c8750f 100644
--- a/src/plugins/data/public/search/session/sessions_mgmt/components/table/table.tsx
+++ b/src/plugins/data/public/search/session/sessions_mgmt/components/table/table.tsx
@@ -13,6 +13,7 @@ import { CoreStart } from '@kbn/core/public';
import moment from 'moment';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import useDebounce from 'react-use/lib/useDebounce';
+import { useEuiTablePersist } from '@kbn/shared-ux-table-persist';
import { TableText } from '..';
import { SEARCH_SESSIONS_TABLE_ID } from '../../../../../../common';
import { SearchSessionsMgmtAPI } from '../../lib/api';
@@ -45,7 +46,6 @@ export function SearchSessionsMgmtTable({
const [tableData, setTableData] = useState([]);
const [isLoading, setIsLoading] = useState(false);
const [debouncedIsLoading, setDebouncedIsLoading] = useState(false);
- const [pagination, setPagination] = useState({ pageIndex: 0 });
const showLatestResultsHandler = useRef();
const refreshTimeoutRef = useRef(null);
const refreshInterval = useMemo(
@@ -53,6 +53,14 @@ export function SearchSessionsMgmtTable({
[config.management.refreshInterval]
);
+ const { pageSize, sorting, onTableChange } = useEuiTablePersist({
+ tableId: 'searchSessionsMgmt',
+ initialSort: {
+ field: 'created',
+ direction: 'desc',
+ },
+ });
+
// Debounce rendering the state of the Refresh button
useDebounce(
() => {
@@ -148,12 +156,12 @@ export function SearchSessionsMgmtTable({
searchUsageCollector
)}
items={tableData}
- pagination={pagination}
- search={search}
- sorting={{ sort: { field: 'created', direction: 'desc' } }}
- onTableChange={({ page: { index } }) => {
- setPagination({ pageIndex: index });
+ pagination={{
+ pageSize,
}}
+ search={search}
+ sorting={sorting}
+ onTableChange={onTableChange}
tableLayout="auto"
/>
);
diff --git a/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx b/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx
index ebb97fd210f85..10d95bcc46906 100644
--- a/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx
+++ b/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx
@@ -22,11 +22,17 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { IUiSettingsClient } from '@kbn/core/public';
-import { Datatable, DatatableColumn } from '@kbn/expressions-plugin/public';
+import { Datatable, DatatableColumn, DatatableRow } from '@kbn/expressions-plugin/public';
import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
import { UiActionsStart } from '@kbn/ui-actions-plugin/public';
+import {
+ withEuiTablePersist,
+ type EuiTablePersistInjectedProps,
+} from '@kbn/shared-ux-table-persist/src';
import { DataViewRow, DataViewColumn } from '../types';
+const PAGE_SIZE_OPTIONS = [10, 20, 50];
+
interface DataTableFormatState {
columns: DataViewColumn[];
rows: DataViewRow[];
@@ -49,7 +55,10 @@ interface RenderCellArguments {
isFilterable: boolean;
}
-export class DataTableFormat extends Component {
+class DataTableFormatClass extends Component<
+ DataTableFormatProps & EuiTablePersistInjectedProps,
+ DataTableFormatState
+> {
static propTypes = {
data: PropTypes.object.isRequired,
uiSettings: PropTypes.object.isRequired,
@@ -169,7 +178,7 @@ export class DataTableFormat extends Component row[dataColumn.id] === value) || 0;
- return DataTableFormat.renderCell({
+ return DataTableFormatClass.renderCell({
table: data,
columnIndex: index,
rowIndex,
@@ -186,9 +195,10 @@ export class DataTableFormat extends Component {},
+ sorting: { sort: { direction: 'asc' as const, field: 'name' as const } },
+ },
+};
+
const renderTable = (
{ editField } = {
editField: () => {},
@@ -87,6 +100,7 @@ const renderTable = (
) =>
shallow(
{
+const PAGE_SIZE_OPTIONS = [5, 10, 25, 50];
+
+class TableClass extends PureComponent<
+ IndexedFieldProps & EuiTablePersistInjectedProps
+> {
renderBooleanTemplate(value: string, arialLabel: string) {
return value ? : ;
}
@@ -403,11 +411,17 @@ export class Table extends PureComponent {
}
render() {
- const { items, editField, deleteField, indexPattern } = this.props;
+ const {
+ items,
+ editField,
+ deleteField,
+ indexPattern,
+ euiTablePersist: { pageSize, sorting, onTableChange },
+ } = this.props;
const pagination = {
- initialPageSize: 10,
- pageSizeOptions: [5, 10, 25, 50],
+ pageSize,
+ pageSizeOptions: PAGE_SIZE_OPTIONS,
};
const columns: Array> = [
@@ -508,8 +522,18 @@ export class Table extends PureComponent {
items={items}
columns={columns}
pagination={pagination}
- sorting={{ sort: { field: 'displayName', direction: 'asc' } }}
+ sorting={sorting}
+ onTableChange={onTableChange}
/>
);
}
}
+
+export const TableWithoutPersist = TableClass; // For testing purposes
+
+export const Table = withEuiTablePersist(TableClass, {
+ tableId: 'dataViewsIndexedFields',
+ pageSizeOptions: PAGE_SIZE_OPTIONS,
+ initialSort: { field: 'displayName', direction: 'asc' },
+ initialPageSize: 10,
+});
diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/relationships_table/relationships_table.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/relationships_table/relationships_table.tsx
index 06991b2081639..5fb2adf8697ab 100644
--- a/src/plugins/data_view_management/public/components/edit_index_pattern/relationships_table/relationships_table.tsx
+++ b/src/plugins/data_view_management/public/components/edit_index_pattern/relationships_table/relationships_table.tsx
@@ -18,6 +18,7 @@ import {
import { CoreStart } from '@kbn/core/public';
import { get } from 'lodash';
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
+import { useEuiTablePersist } from '@kbn/shared-ux-table-persist';
import {
SavedObjectRelation,
@@ -139,12 +140,20 @@ export const RelationshipsTable = ({
] as SearchFilterConfig[],
};
+ const { pageSize, onTableChange } = useEuiTablePersist({
+ tableId: 'dataViewMgmtRelationships',
+ initialPageSize: 10,
+ });
+
return (
items={relationships}
columns={columns}
- pagination={true}
+ pagination={{
+ pageSize,
+ }}
+ onTableChange={onTableChange}
search={search}
rowProps={() => ({
'data-test-subj': `relationshipsTableRow`,
diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/__snapshots__/table.test.tsx.snap b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/__snapshots__/table.test.tsx.snap
index 5f8e34d0776ec..f3fee53256c67 100644
--- a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/__snapshots__/table.test.tsx.snap
+++ b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/__snapshots__/table.test.tsx.snap
@@ -75,9 +75,10 @@ exports[`Table should render normally 1`] = `
},
]
}
+ onTableChange={[Function]}
pagination={
Object {
- "initialPageSize": 10,
+ "pageSize": 10,
"pageSizeOptions": Array [
5,
10,
@@ -87,7 +88,14 @@ exports[`Table should render normally 1`] = `
}
}
searchFormat="eql"
- sorting={true}
+ sorting={
+ Object {
+ "sort": Object {
+ "direction": "asc",
+ "field": "name",
+ },
+ }
+ }
tableLayout="fixed"
/>
`;
diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx
index 9ef16a1cb1531..29b51160e4730 100644
--- a/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx
+++ b/src/plugins/data_view_management/public/components/edit_index_pattern/scripted_fields_table/components/table/table.test.tsx
@@ -10,7 +10,7 @@
import React from 'react';
import { shallow } from 'enzyme';
-import { Table } from '.';
+import { TableWithoutPersist as Table } from './table';
import { ScriptedFieldItem } from '../../types';
import { DataView } from '@kbn/data-views-plugin/public';
@@ -21,6 +21,14 @@ const items: ScriptedFieldItem[] = [
{ name: '2', lang: 'painless', script: '', isUserEditable: false },
];
+const baseProps = {
+ euiTablePersist: {
+ pageSize: 10,
+ onTableChange: () => {},
+ sorting: { sort: { direction: 'asc' as const, field: 'name' as const } },
+ },
+};
+
describe('Table', () => {
let indexPattern: DataView;
@@ -37,8 +45,9 @@ describe('Table', () => {
});
test('should render normally', () => {
- const component = shallow