diff --git a/.telemetryrc.json b/.telemetryrc.json index d3446b45033eec..3d1b0df1d8f93b 100644 --- a/.telemetryrc.json +++ b/.telemetryrc.json @@ -5,8 +5,7 @@ "exclude": [ "src/plugins/kibana_react/", "src/plugins/testbed/", - "src/plugins/kibana_utils/", - "src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts" + "src/plugins/kibana_utils/" ] } ] diff --git a/docs/developer/architecture/code-exploration.asciidoc b/docs/developer/architecture/code-exploration.asciidoc deleted file mode 100644 index 4a390336da34fc..00000000000000 --- a/docs/developer/architecture/code-exploration.asciidoc +++ /dev/null @@ -1,598 +0,0 @@ -//// - -NOTE: - This is an automatically generated file. Please do not edit directly. Instead, run the - following from within the kibana repository: - - node scripts/build_plugin_list_docs - - You can update the template within packages/kbn-dev-utils/target/plugin_list/generate_plugin_list.js - -//// - -[[code-exploration]] -== Exploring Kibana code - -The goals of our folder heirarchy are: - -- Easy for developers to know where to add new services, plugins and applications. -- Easy for developers to know where to find the code from services, plugins and applications. -- Easy to browse and understand our folder structure. - -To that aim, we strive to: - -- Avoid too many files in any given folder. -- Choose clear, unambigious folder names. -- Organize by domain. -- Every folder should contain a README that describes the contents of that folder. - -[discrete] -[[kibana-services-applications]] -=== Services and Applications - -[discrete] -==== src/plugins - -- {kib-repo}blob/{branch}/src/plugins/advanced_settings[advancedSettings] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/apm_oss[apmOss] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/bfetch/README.md[bfetch] - -bfetch allows to batch HTTP requests and streams responses back. - - -- {kib-repo}blob/{branch}/src/plugins/charts/README.md[charts] - -The Charts plugin is a way to create easier integration of shared colors, themes, types and other utilities across all Kibana charts and visualizations. - - -- {kib-repo}blob/{branch}/src/plugins/console[console] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/dashboard/README.md[dashboard] - -Contains the dashboard application. - - -- {kib-repo}blob/{branch}/src/plugins/data/README.md[data] - -data plugin provides common data access services. - - -- {kib-repo}blob/{branch}/src/plugins/dev_tools/README.md[devTools] - -The ui/registry/dev_tools is removed in favor of the devTools plugin which exposes a register method in the setup contract. -Registering app works mostly the same as registering apps in core.application.register. -Routing will be handled by the id of the dev tool - your dev tool will be mounted when the URL matches /app/dev_tools#/. -This API doesn't support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element. - - -- {kib-repo}blob/{branch}/src/plugins/discover/README.md[discover] - -Contains the Discover application and the saved search embeddable. - - -- {kib-repo}blob/{branch}/src/plugins/embeddable/README.md[embeddable] - -Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable containers. - - -- {kib-repo}blob/{branch}/src/plugins/es_ui_shared/README.md[esUiShared] - -This plugin contains reusable code in the form of self-contained modules (or libraries). Each of these modules exports a set of functionality relevant to the domain of the module. - - -- {kib-repo}blob/{branch}/src/plugins/expressions/README.md[expressions] - -This plugin provides methods which will parse & execute an expression pipeline -string for you, as well as a series of registries for advanced users who might -want to incorporate their own functions, types, and renderers into the service -for use in their own application. - - -- {kib-repo}blob/{branch}/src/plugins/home/README.md[home] - -Moves the legacy ui/registry/feature_catalogue module for registering "features" that should be shown in the home page's feature catalogue to a service within a "home" plugin. The feature catalogue refered to here should not be confused with the "feature" plugin for registering features used to derive UI capabilities for feature controls. - - -- {kib-repo}blob/{branch}/src/plugins/index_pattern_management[indexPatternManagement] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/input_control_vis/README.md[inputControlVis] - -Contains the input control visualization allowing to place custom filter controls on a dashboard. - - -- {kib-repo}blob/{branch}/src/plugins/inspector/README.md[inspector] - -The inspector is a contextual tool to gain insights into different elements -in Kibana, e.g. visualizations. It has the form of a flyout panel. - - -- {kib-repo}blob/{branch}/src/plugins/kibana_legacy/README.md[kibanaLegacy] - -This plugin will contain several helpers and services to integrate pieces of the legacy Kibana app with the new Kibana platform. - - -- {kib-repo}blob/{branch}/src/plugins/kibana_react/README.md[kibanaReact] - -Tools for building React applications in Kibana. - - -- {kib-repo}blob/{branch}/src/plugins/kibana_usage_collection/README.md[kibanaUsageCollection] - -This plugin registers the basic usage collectors from Kibana: - - -- {kib-repo}blob/{branch}/src/plugins/kibana_utils/README.md[kibanaUtils] - -Utilities for building Kibana plugins. - - -- {kib-repo}blob/{branch}/src/plugins/legacy_export[legacyExport] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/management[management] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/maps_legacy[mapsLegacy] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/navigation/README.md[navigation] - -The navigation plugins exports the TopNavMenu component. -It also provides a stateful version of it on the start contract. - - -- {kib-repo}blob/{branch}/src/plugins/newsfeed[newsfeed] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/region_map[regionMap] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/saved_objects[savedObjects] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/saved_objects_management[savedObjectsManagement] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/share/README.md[share] - -Replaces the legacy ui/share module for registering share context menus. - - -- {kib-repo}blob/{branch}/src/plugins/telemetry/README.md[telemetry] - -Telemetry allows Kibana features to have usage tracked in the wild. The general term "telemetry" refers to multiple things: - - -- {kib-repo}blob/{branch}/src/plugins/telemetry_collection_manager/README.md[telemetryCollectionManager] - -Telemetry's collection manager to go through all the telemetry sources when fetching it before reporting. - - -- {kib-repo}blob/{branch}/src/plugins/telemetry_management_section/README.md[telemetryManagementSection] - -This plugin adds the Advanced Settings section for the Usage Data collection (aka Telemetry). - - -- {kib-repo}blob/{branch}/src/plugins/tile_map[tileMap] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/src/plugins/timelion/README.md[timelion] - -Contains the deprecated timelion application. For the timelion visualization, -which also contains the timelion APIs and backend, look at the vis_type_timelion plugin. - - -- {kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions] - -An API for: - - -- {kib-repo}blob/{branch}/src/plugins/usage_collection/README.md[usageCollection] - -Usage Collection allows collecting usage data for other services to consume (telemetry and monitoring). -To integrate with the telemetry services for usage collection of your feature, there are 2 steps: - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_markdown/README.md[visTypeMarkdown] - -The markdown visualization that can be used to place text panels on dashboards. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_metric/README.md[visTypeMetric] - -Contains the metric visualization. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable] - -Contains the data table visualization, that allows presenting data in a simple table format. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud/README.md[visTypeTagcloud] - -Contains the tagcloud visualization. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion] - -Contains the timelion visualization and the timelion backend. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_timeseries/README.md[visTypeTimeseries] - -Contains everything around TSVB (the editor, visualizatin implementations and backends). - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_vega/README.md[visTypeVega] - -Contains the Vega visualization. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_vislib/README.md[visTypeVislib] - -Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and -heatmap charts. - - -- {kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy] - -Contains the new xy-axis chart using the elastic-charts library, which will eventually -replace the vislib xy-axis (bar, area, line) charts. - - -- {kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations] - -Contains most of the visualization infrastructure, e.g. the visualization type registry or the -visualization embeddable. - - -- {kib-repo}blob/{branch}/src/plugins/visualize/README.md[visualize] - -Contains the visualize application which includes the listing page and the app frame, -which will load the visualization's editor. - - -[discrete] -==== x-pack/plugins - -- {kib-repo}blob/{branch}/x-pack/plugins/actions/README.md[actions] - -The Kibana actions plugin provides a framework to create executable actions. You can: - - -- {kib-repo}blob/{branch}/x-pack/plugins/alerting_builtins/README.md[alertingBuiltins] - -This plugin provides alertTypes shipped with Kibana for use with the -the alerts plugin. When enabled, it will register -the built-in alertTypes with the alerting plugin, register associated HTTP -routes, etc. - - -- {kib-repo}blob/{branch}/x-pack/plugins/alerts/README.md[alerts] - -The Kibana alerting plugin provides a common place to set up alerts. You can: - - -- {kib-repo}blob/{branch}/x-pack/plugins/apm/readme.md[apm] - -To access an elasticsearch instance that has live data you have two options: - - -- {kib-repo}blob/{branch}/x-pack/plugins/audit_trail[auditTrail] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/beats_management/readme.md[beatsManagement] - -Notes: -Failure to have auth enabled in Kibana will make for a broken UI. UI-based errors not yet in place - - -- {kib-repo}blob/{branch}/x-pack/plugins/canvas/README.md[canvas] - -"Never look back. The past is done. The future is a blank canvas." ― Suzy Kassem, Rise Up and Salute the Sun - - -- {kib-repo}blob/{branch}/x-pack/plugins/case/README.md[case] - -Experimental Feature - - -- {kib-repo}blob/{branch}/x-pack/plugins/cloud[cloud] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/code[code] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/console_extensions[consoleExtensions] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/cross_cluster_replication/README.md[crossClusterReplication] - -You can run a local cluster and simulate a remote cluster within a single Kibana directory. - - -- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_enhanced/README.md[dashboardEnhanced] - -Contains the enhancements to the OSS dashboard app. - - -- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode/README.md[dashboardMode] - -The deprecated dashboard only mode. - - -- {kib-repo}blob/{branch}/x-pack/plugins/data_enhanced[dataEnhanced] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced] - -Contains the enhancements to the OSS discover app. - - -- {kib-repo}blob/{branch}/x-pack/plugins/embeddable_enhanced[embeddableEnhanced] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/encrypted_saved_objects/README.md[encryptedSavedObjects] - -The purpose of this plugin is to provide a way to encrypt/decrypt attributes on the custom Saved Objects that works with -security and spaces filtering as well as performing audit logging. - - -- {kib-repo}blob/{branch}/x-pack/plugins/enterprise_search/README.md[enterpriseSearch] - -This plugin's goal is to provide a Kibana user interface to the Enterprise Search solution's products (App Search and Workplace Search). In it's current MVP state, the plugin provides the following with the goal of gathering user feedback and raising product awareness: - - -- {kib-repo}blob/{branch}/x-pack/plugins/event_log/README.md[eventLog] - -The purpose of this plugin is to provide a way to persist a history of events -occuring in Kibana, initially just for the Make It Action project - alerts -and actions. - - -- {kib-repo}blob/{branch}/x-pack/plugins/features[features] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/file_upload[fileUpload] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch] - -The GlobalSearch plugin provides an easy way to search for various objects, such as applications -or dashboards from the Kibana instance, from both server and client-side plugins - - -- {kib-repo}blob/{branch}/x-pack/plugins/global_search_bar/README.md[globalSearchBar] - -The GlobalSearchBar plugin provides a search interface for navigating Kibana. (It is the UI to the GlobalSearch plugin.) - - -- {kib-repo}blob/{branch}/x-pack/plugins/global_search_providers[globalSearchProviders] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/graph/README.md[graph] - -This is the main source folder of the Graph plugin. It contains all of the Kibana server and client source code. x-pack/test/functional/apps/graph contains additional functional tests. - - -- {kib-repo}blob/{branch}/x-pack/plugins/grokdebugger/README.md[grokdebugger] - -- {kib-repo}blob/{branch}/x-pack/plugins/index_lifecycle_management/README.md[indexLifecycleManagement] - -You can test that the Frozen badge, phase filtering, and lifecycle information is surfaced in -Index Management by running this series of requests in Console: - - -- {kib-repo}blob/{branch}/x-pack/plugins/index_management[indexManagement] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/infra/README.md[infra] - -This is the home of the infra plugin, which aims to provide a solution for -the infrastructure monitoring use-case within Kibana. - - -- {kib-repo}blob/{branch}/x-pack/plugins/ingest_manager/README.md[ingestManager] - -Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.ingestManager.fleet.tlsCheckDisabled=false) - - -- {kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines] - -The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details. - - -- {kib-repo}blob/{branch}/x-pack/plugins/lens/readme.md[lens] - -Run all tests from the x-pack root directory - - -- {kib-repo}blob/{branch}/x-pack/plugins/license_management[licenseManagement] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/licensing/README.md[licensing] - -The licensing plugin retrieves license data from Elasticsearch at regular configurable intervals. - - -- {kib-repo}blob/{branch}/x-pack/plugins/lists/README.md[lists] - -README.md for developers working on the backend lists on how to get started -using the CURL scripts in the scripts folder. - - -- {kib-repo}blob/{branch}/x-pack/plugins/logstash[logstash] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/maps/README.md[maps] - -Visualize geo data from Elasticsearch or 3rd party geo-services. - - -- {kib-repo}blob/{branch}/x-pack/plugins/maps_legacy_licensing/README.md[mapsLegacyLicensing] - -This plugin provides access to the detailed tile map services from Elastic. - - -- {kib-repo}blob/{branch}/x-pack/plugins/ml[ml] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/monitoring[monitoring] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/observability/README.md[observability] - -This plugin provides shared components and services for use across observability solutions, as well as the observability landing page UI. - - -- {kib-repo}blob/{branch}/x-pack/plugins/oss_telemetry[ossTelemetry] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/painless_lab[painlessLab] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/remote_clusters[remoteClusters] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/reporting/README.md[reporting] - -An awesome Kibana reporting plugin - - -- {kib-repo}blob/{branch}/x-pack/plugins/rollup/README.md[rollup] - -Welcome to the Kibana rollup plugin! This plugin provides Kibana support for Elasticsearch's rollup feature. Please refer to the Elasticsearch documentation to understand rollup indices and how to create rollup jobs. - - -- {kib-repo}blob/{branch}/x-pack/plugins/searchprofiler[searchprofiler] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/security/README.md[security] - -See Configuring security in Kibana. - - -- {kib-repo}blob/{branch}/x-pack/plugins/security_solution/README.md[securitySolution] - -Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing. - - -- {kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore] - -or - - -- {kib-repo}blob/{branch}/x-pack/plugins/spaces[spaces] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/task_manager[taskManager] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/telemetry_collection_xpack/README.md[telemetryCollectionXpack] - -Gathers all usage collection, retrieving them from both: OSS and X-Pack plugins. - - -- {kib-repo}blob/{branch}/x-pack/plugins/transform[transform] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/translations[translations] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/triggers_actions_ui/README.md[triggers_actions_ui] - -The Kibana alerts and actions UI plugin provides a user interface for managing alerts and actions. -As a developer you can reuse and extend built-in alerts and actions UI functionality: - - -- {kib-repo}blob/{branch}/x-pack/plugins/ui_actions_enhanced/README.md[uiActionsEnhanced] - -- {kib-repo}blob/{branch}/x-pack/plugins/upgrade_assistant[upgradeAssistant] - -WARNING: Missing README. - - -- {kib-repo}blob/{branch}/x-pack/plugins/uptime/README.md[uptime] - -The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening -in their infrastructure. - - -- {kib-repo}blob/{branch}/x-pack/plugins/watcher/README.md[watcher] - -This plugins adopts some conventions in addition to or in place of conventions in Kibana (at the time of the plugin's creation): - diff --git a/docs/developer/contributing/development-github.asciidoc b/docs/developer/contributing/development-github.asciidoc index 84f51843098a70..c5a3d942f2af36 100644 --- a/docs/developer/contributing/development-github.asciidoc +++ b/docs/developer/contributing/development-github.asciidoc @@ -25,7 +25,7 @@ Pull requests are made into the `master` branch and then backported when it is s * Breaking changes do not get backported and only go into `master`. * All non-breaking changes can be backported to the `.x` branch. * Features should not be backported to a `.` branch. -* Bugs can be backported to a `.` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description. +* Bug fixes can be backported to a `.` branch if the changes are safe and appropriate. Safety is a judgment call you make based on factors like the bug's severity, test coverage, confidence in the changes, etc. Your reasoning should be included in the pull request description. * Documentation changes can be backported to any branch at any time. [discrete] diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 4918a87a3ff762..ed58e77427d47d 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -48,7 +48,7 @@ NOTE: |{kib-repo}blob/{branch}/src/plugins/data/README.md[data] -|data plugin provides common data access services. +|The data plugin provides common data access services, such as search and query, for solutions and application developers. |{kib-repo}blob/{branch}/src/plugins/dev_tools/README.md[devTools] @@ -62,8 +62,8 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a |Contains the Discover application and the saved search embeddable. -|{kib-repo}blob/{branch}/src/plugins/embeddable/README.md[embeddable] -|Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable containers. +|<> +|Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable _containers_. |{kib-repo}blob/{branch}/src/plugins/es_ui_shared/README.md[esUiShared] @@ -180,9 +180,16 @@ It also provides a stateful version of it on the start contract. which also contains the timelion APIs and backend, look at the vis_type_timelion plugin. -|{kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions] +|<> |An API for: +- creating custom functionality (`actions`) +- creating custom user interaction events (`triggers`) +- attaching and detaching `actions` to `triggers`. +- emitting `trigger` events +- executing `actions` attached to a given `trigger`. +- exposing a context menu for the user to choose the appropriate action when there are multiple actions attached to a single trigger. + |{kib-repo}blob/{branch}/src/plugins/url_forwarding/README.md[urlForwarding] |This plugins contains helpers to redirect legacy URLs. It can be used to forward old URLs to their new counterparts. @@ -523,6 +530,8 @@ in their infrastructure. |=== include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1] +include::{kibana-root}/src/plugins/embeddable/README.asciidoc[leveloffset=+1] include::{kibana-root}/src/plugins/expressions/README.asciidoc[leveloffset=+1] +include::{kibana-root}/src/plugins/ui_actions/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/dashboard_enhanced/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/embeddable_enhanced/README.asciidoc[leveloffset=+1] diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md index 055ad9f37e654f..1eaf00c7a678d6 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.geturlforapp.md @@ -4,9 +4,11 @@ ## ApplicationStart.getUrlForApp() method -Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the `absolute` option to generate an absolute url (http://host:port/basePath/app/my-app) +Returns the absolute path (or URL) to a given app, including the global base path. -Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's location. +By default, it returns the absolute path of the application (e.g `/basePath/app/my-app`). Use the `absolute` option to generate an absolute url instead (e.g `http://host:port/basePath/app/my-app`) + +Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's current location. Signature: diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.md index 00318f32984e9b..ae62a7767a0e99 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.md @@ -23,8 +23,8 @@ export interface ApplicationStart | Method | Description | | --- | --- | -| [getUrlForApp(appId, options)](./kibana-plugin-core-public.applicationstart.geturlforapp.md) | Returns an URL to a given app, including the global base path. By default, the URL is relative (/basePath/app/my-app). Use the absolute option to generate an absolute url (http://host:port/basePath/app/my-app)Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's location. | +| [getUrlForApp(appId, options)](./kibana-plugin-core-public.applicationstart.geturlforapp.md) | Returns the absolute path (or URL) to a given app, including the global base path.By default, it returns the absolute path of the application (e.g /basePath/app/my-app). Use the absolute option to generate an absolute url instead (e.g http://host:port/basePath/app/my-app)Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's current location. | | [navigateToApp(appId, options)](./kibana-plugin-core-public.applicationstart.navigatetoapp.md) | Navigate to a given app | -| [navigateToUrl(url)](./kibana-plugin-core-public.applicationstart.navigatetourl.md) | Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible.If all these criteria are true for the given url: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app// or any application's appRoute configuration)Then a SPA navigation will be performed using navigateToApp using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using window.location.assign | +| [navigateToUrl(url)](./kibana-plugin-core-public.applicationstart.navigatetourl.md) | Navigate to given URL in a SPA friendly way when possible (when the URL will redirect to a valid application within the current basePath).The method resolves pathnames the same way browsers do when resolving a <a href> value. The provided url can be: - an absolute URL - an absolute path - a path relative to the current URL (window.location.href)If all these criteria are true for the given URL: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The resolved pathname of the provided URL/path starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app// or any application's appRoute configuration)Then a SPA navigation will be performed using navigateToApp using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using window.location.assign | | [registerMountContext(contextName, provider)](./kibana-plugin-core-public.applicationstart.registermountcontext.md) | Register a context provider for application mounting. Will only be available to applications that depend on the plugin that registered this context. Deprecated, use [CoreSetup.getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md). | diff --git a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md index 86b86776b0b12c..8639394cbc4212 100644 --- a/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md +++ b/docs/development/core/public/kibana-plugin-core-public.applicationstart.navigatetourl.md @@ -4,9 +4,11 @@ ## ApplicationStart.navigateToUrl() method -Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible. +Navigate to given URL in a SPA friendly way when possible (when the URL will redirect to a valid application within the current basePath). -If all these criteria are true for the given url: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app// or any application's `appRoute` configuration) +The method resolves pathnames the same way browsers do when resolving a `` value. The provided `url` can be: - an absolute URL - an absolute path - a path relative to the current URL (window.location.href) + +If all these criteria are true for the given URL: - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - The resolved pathname of the provided URL/path starts with the current basePath (eg. /mybasepath/s/my-space) - The pathname segment after the basePath matches any known application route (eg. /app// or any application's `appRoute` configuration) Then a SPA navigation will be performed using `navigateToApp` using the corresponding application and path. Otherwise, fallback to a full page reload to navigate to the url using `window.location.assign` @@ -20,7 +22,7 @@ navigateToUrl(url: string): Promise; | Parameter | Type | Description | | --- | --- | --- | -| url | string | an absolute url, or a relative path, to navigate to. | +| url | string | an absolute URL, an absolute path or a relative path, to navigate to. | Returns: @@ -35,11 +37,14 @@ navigateToUrl(url: string): Promise; // will call `application.navigateToApp('discover', { path: '/some-path?foo=bar'})` application.navigateToUrl('https://kibana:8080/base-path/s/my-space/app/discover/some-path?foo=bar') application.navigateToUrl('/base-path/s/my-space/app/discover/some-path?foo=bar') +application.navigateToUrl('./discover/some-path?foo=bar') // will perform a full page reload using `window.location.assign` application.navigateToUrl('https://elsewhere:8080/base-path/s/my-space/app/discover/some-path') // origin does not match application.navigateToUrl('/app/discover/some-path') // does not include the current basePath application.navigateToUrl('/base-path/s/my-space/app/unknown-app/some-path') // unknown application +application.navigateToUrl('../discover') // resolve to `/base-path/s/my-space/discover` which is not a path of a known app. +application.navigateToUrl('../../other-space/discover') // resolve to `/base-path/s/other-space/discover` which is not within the current basePath. ``` diff --git a/docs/development/plugins/embeddable/public/index.md b/docs/development/plugins/embeddable/public/index.md new file mode 100644 index 00000000000000..5de9666f6d0b96 --- /dev/null +++ b/docs/development/plugins/embeddable/public/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_add_panel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_add_panel.md new file mode 100644 index 00000000000000..37c7a546d11edd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_add_panel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ACTION\_ADD\_PANEL](./kibana-plugin-plugins-embeddable-public.action_add_panel.md) + +## ACTION\_ADD\_PANEL variable + +Signature: + +```typescript +ACTION_ADD_PANEL = "ACTION_ADD_PANEL" +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_edit_panel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_edit_panel.md new file mode 100644 index 00000000000000..89f02e69f22601 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.action_edit_panel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ACTION\_EDIT\_PANEL](./kibana-plugin-plugins-embeddable-public.action_edit_panel.md) + +## ACTION\_EDIT\_PANEL variable + +Signature: + +```typescript +ACTION_EDIT_PANEL = "editPanel" +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.adapters.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.adapters.md new file mode 100644 index 00000000000000..9635b36cdf05a4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.adapters.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Adapters](./kibana-plugin-plugins-embeddable-public.adapters.md) + +## Adapters interface + +The interface that the adapters used to open an inspector have to fullfill. + +Signature: + +```typescript +export interface Adapters +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md new file mode 100644 index 00000000000000..388f0e064d8661 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md) + +## AddPanelAction.(constructor) + +Constructs a new instance of the `AddPanelAction` class + +Signature: + +```typescript +constructor(getFactory: EmbeddableStart['getEmbeddableFactory'], getAllFactories: EmbeddableStart['getEmbeddableFactories'], overlays: OverlayStart, notifications: NotificationsStart, SavedObjectFinder: React.ComponentType); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| getFactory | EmbeddableStart['getEmbeddableFactory'] | | +| getAllFactories | EmbeddableStart['getEmbeddableFactories'] | | +| overlays | OverlayStart | | +| notifications | NotificationsStart | | +| SavedObjectFinder | React.ComponentType<any> | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.execute.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.execute.md new file mode 100644 index 00000000000000..46629f3c654f8f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.execute.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [execute](./kibana-plugin-plugins-embeddable-public.addpanelaction.execute.md) + +## AddPanelAction.execute() method + +Signature: + +```typescript +execute(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<ActionContext> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.getdisplayname.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.getdisplayname.md new file mode 100644 index 00000000000000..b3a181861572b2 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.getdisplayname.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [getDisplayName](./kibana-plugin-plugins-embeddable-public.addpanelaction.getdisplayname.md) + +## AddPanelAction.getDisplayName() method + +Signature: + +```typescript +getDisplayName(): string; +``` +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.geticontype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.geticontype.md new file mode 100644 index 00000000000000..c02aa6613630b6 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.geticontype.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [getIconType](./kibana-plugin-plugins-embeddable-public.addpanelaction.geticontype.md) + +## AddPanelAction.getIconType() method + +Signature: + +```typescript +getIconType(): string; +``` +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.id.md new file mode 100644 index 00000000000000..781fb8ed293727 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [id](./kibana-plugin-plugins-embeddable-public.addpanelaction.id.md) + +## AddPanelAction.id property + +Signature: + +```typescript +readonly id = "ACTION_ADD_PANEL"; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.iscompatible.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.iscompatible.md new file mode 100644 index 00000000000000..c8349b86cf348e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.iscompatible.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [isCompatible](./kibana-plugin-plugins-embeddable-public.addpanelaction.iscompatible.md) + +## AddPanelAction.isCompatible() method + +Signature: + +```typescript +isCompatible(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<ActionContext> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.md new file mode 100644 index 00000000000000..74a6c2b2183a2e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) + +## AddPanelAction class + +Signature: + +```typescript +export declare class AddPanelAction implements Action +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(getFactory, getAllFactories, overlays, notifications, SavedObjectFinder)](./kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md) | | Constructs a new instance of the AddPanelAction class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-public.addpanelaction.id.md) | | | | +| [type](./kibana-plugin-plugins-embeddable-public.addpanelaction.type.md) | | | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [execute(context)](./kibana-plugin-plugins-embeddable-public.addpanelaction.execute.md) | | | +| [getDisplayName()](./kibana-plugin-plugins-embeddable-public.addpanelaction.getdisplayname.md) | | | +| [getIconType()](./kibana-plugin-plugins-embeddable-public.addpanelaction.geticontype.md) | | | +| [isCompatible(context)](./kibana-plugin-plugins-embeddable-public.addpanelaction.iscompatible.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.type.md new file mode 100644 index 00000000000000..d57974c984025a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) > [type](./kibana-plugin-plugins-embeddable-public.addpanelaction.type.md) + +## AddPanelAction.type property + +Signature: + +```typescript +readonly type = "ACTION_ADD_PANEL"; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.chartactioncontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.chartactioncontext.md new file mode 100644 index 00000000000000..1c9fc27d53f19e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.chartactioncontext.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ChartActionContext](./kibana-plugin-plugins-embeddable-public.chartactioncontext.md) + +## ChartActionContext type + +Signature: + +```typescript +export declare type ChartActionContext = ValueClickContext | RangeSelectContext; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container._constructor_.md new file mode 100644 index 00000000000000..c571bae7c76133 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container._constructor_.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.container._constructor_.md) + +## Container.(constructor) + +Constructs a new instance of the `Container` class + +Signature: + +```typescript +constructor(input: TContainerInput, output: TContainerOutput, getFactory: EmbeddableStart['getEmbeddableFactory'], parent?: Container); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| input | TContainerInput | | +| output | TContainerOutput | | +| getFactory | EmbeddableStart['getEmbeddableFactory'] | | +| parent | Container | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.addnewembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.addnewembeddable.md new file mode 100644 index 00000000000000..1a7b32fea5361a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.addnewembeddable.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [addNewEmbeddable](./kibana-plugin-plugins-embeddable-public.container.addnewembeddable.md) + +## Container.addNewEmbeddable() method + +Signature: + +```typescript +addNewEmbeddable = IEmbeddable>(type: string, explicitInput: Partial): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| type | string | | +| explicitInput | Partial<EEI> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.children.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.children.md new file mode 100644 index 00000000000000..e8f140219ed9c3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.children.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [children](./kibana-plugin-plugins-embeddable-public.container.children.md) + +## Container.children property + +Signature: + +```typescript +protected readonly children: { + [key: string]: IEmbeddable | ErrorEmbeddable; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.createnewpanelstate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.createnewpanelstate.md new file mode 100644 index 00000000000000..cb084192ccf236 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.createnewpanelstate.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [createNewPanelState](./kibana-plugin-plugins-embeddable-public.container.createnewpanelstate.md) + +## Container.createNewPanelState() method + +Signature: + +```typescript +protected createNewPanelState>(factory: EmbeddableFactory, partial?: Partial): PanelState; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| factory | EmbeddableFactory<TEmbeddableInput, any, TEmbeddable> | | +| partial | Partial<TEmbeddableInput> | | + +Returns: + +`PanelState` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.destroy.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.destroy.md new file mode 100644 index 00000000000000..d2776fb9e59441 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.destroy.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [destroy](./kibana-plugin-plugins-embeddable-public.container.destroy.md) + +## Container.destroy() method + +Signature: + +```typescript +destroy(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchild.md new file mode 100644 index 00000000000000..56d6a8a105bc71 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchild.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getChild](./kibana-plugin-plugins-embeddable-public.container.getchild.md) + +## Container.getChild() method + +Signature: + +```typescript +getChild(id: string): E; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`E` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchildids.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchildids.md new file mode 100644 index 00000000000000..83a9b134cad3fb --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getchildids.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getChildIds](./kibana-plugin-plugins-embeddable-public.container.getchildids.md) + +## Container.getChildIds() method + +Signature: + +```typescript +getChildIds(): string[]; +``` +Returns: + +`string[]` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getfactory.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getfactory.md new file mode 100644 index 00000000000000..f4ac95abbf372d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getfactory.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getFactory](./kibana-plugin-plugins-embeddable-public.container.getfactory.md) + +## Container.getFactory property + +Signature: + +```typescript +protected readonly getFactory: EmbeddableStart['getEmbeddableFactory']; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinheritedinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinheritedinput.md new file mode 100644 index 00000000000000..4c5823b890e65e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinheritedinput.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getInheritedInput](./kibana-plugin-plugins-embeddable-public.container.getinheritedinput.md) + +## Container.getInheritedInput() method + +Return state that comes from the container and is passed down to the child. For instance, time range and filters are common inherited input state. Note that any state stored in `this.input.panels[embeddableId].explicitInput` will override inherited input. + +Signature: + +```typescript +protected abstract getInheritedInput(id: string): TChildInput; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`TChildInput` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinputforchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinputforchild.md new file mode 100644 index 00000000000000..803356d5540127 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getinputforchild.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getInputForChild](./kibana-plugin-plugins-embeddable-public.container.getinputforchild.md) + +## Container.getInputForChild() method + +Signature: + +```typescript +getInputForChild(embeddableId: string): TEmbeddableInput; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| embeddableId | string | | + +Returns: + +`TEmbeddableInput` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getpanelstate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getpanelstate.md new file mode 100644 index 00000000000000..5981284e0497cc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.getpanelstate.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [getPanelState](./kibana-plugin-plugins-embeddable-public.container.getpanelstate.md) + +## Container.getPanelState() method + +Signature: + +```typescript +protected getPanelState(embeddableId: string): PanelState; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| embeddableId | string | | + +Returns: + +`PanelState` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.iscontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.iscontainer.md new file mode 100644 index 00000000000000..af65381de78f79 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.iscontainer.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [isContainer](./kibana-plugin-plugins-embeddable-public.container.iscontainer.md) + +## Container.isContainer property + +Signature: + +```typescript +readonly isContainer: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.md new file mode 100644 index 00000000000000..d14adc31e4123a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.md @@ -0,0 +1,43 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) + +## Container class + +Signature: + +```typescript +export declare abstract class Container = {}, TContainerInput extends ContainerInput = ContainerInput, TContainerOutput extends ContainerOutput = ContainerOutput> extends Embeddable implements IContainer +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(input, output, getFactory, parent)](./kibana-plugin-plugins-embeddable-public.container._constructor_.md) | | Constructs a new instance of the Container class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [children](./kibana-plugin-plugins-embeddable-public.container.children.md) | | {
[key: string]: IEmbeddable<any, any> | ErrorEmbeddable;
} | | +| [getFactory](./kibana-plugin-plugins-embeddable-public.container.getfactory.md) | | EmbeddableStart['getEmbeddableFactory'] | | +| [isContainer](./kibana-plugin-plugins-embeddable-public.container.iscontainer.md) | | boolean | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [addNewEmbeddable(type, explicitInput)](./kibana-plugin-plugins-embeddable-public.container.addnewembeddable.md) | | | +| [createNewPanelState(factory, partial)](./kibana-plugin-plugins-embeddable-public.container.createnewpanelstate.md) | | | +| [destroy()](./kibana-plugin-plugins-embeddable-public.container.destroy.md) | | | +| [getChild(id)](./kibana-plugin-plugins-embeddable-public.container.getchild.md) | | | +| [getChildIds()](./kibana-plugin-plugins-embeddable-public.container.getchildids.md) | | | +| [getInheritedInput(id)](./kibana-plugin-plugins-embeddable-public.container.getinheritedinput.md) | | Return state that comes from the container and is passed down to the child. For instance, time range and filters are common inherited input state. Note that any state stored in this.input.panels[embeddableId].explicitInput will override inherited input. | +| [getInputForChild(embeddableId)](./kibana-plugin-plugins-embeddable-public.container.getinputforchild.md) | | | +| [getPanelState(embeddableId)](./kibana-plugin-plugins-embeddable-public.container.getpanelstate.md) | | | +| [reload()](./kibana-plugin-plugins-embeddable-public.container.reload.md) | | | +| [removeEmbeddable(embeddableId)](./kibana-plugin-plugins-embeddable-public.container.removeembeddable.md) | | | +| [untilEmbeddableLoaded(id)](./kibana-plugin-plugins-embeddable-public.container.untilembeddableloaded.md) | | | +| [updateInputForChild(id, changes)](./kibana-plugin-plugins-embeddable-public.container.updateinputforchild.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.reload.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.reload.md new file mode 100644 index 00000000000000..902da827ac46c6 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.reload.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [reload](./kibana-plugin-plugins-embeddable-public.container.reload.md) + +## Container.reload() method + +Signature: + +```typescript +reload(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.removeembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.removeembeddable.md new file mode 100644 index 00000000000000..44594c0649d462 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.removeembeddable.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [removeEmbeddable](./kibana-plugin-plugins-embeddable-public.container.removeembeddable.md) + +## Container.removeEmbeddable() method + +Signature: + +```typescript +removeEmbeddable(embeddableId: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| embeddableId | string | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.untilembeddableloaded.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.untilembeddableloaded.md new file mode 100644 index 00000000000000..45c115f3706943 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.untilembeddableloaded.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [untilEmbeddableLoaded](./kibana-plugin-plugins-embeddable-public.container.untilembeddableloaded.md) + +## Container.untilEmbeddableLoaded() method + +Signature: + +```typescript +untilEmbeddableLoaded(id: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.updateinputforchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.updateinputforchild.md new file mode 100644 index 00000000000000..ae25f373a907bf --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.container.updateinputforchild.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Container](./kibana-plugin-plugins-embeddable-public.container.md) > [updateInputForChild](./kibana-plugin-plugins-embeddable-public.container.updateinputforchild.md) + +## Container.updateInputForChild() method + +Signature: + +```typescript +updateInputForChild(id: string, changes: Partial): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | +| changes | Partial<EEI> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.hidepaneltitles.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.hidepaneltitles.md new file mode 100644 index 00000000000000..5bb80ae411a78b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.hidepaneltitles.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ContainerInput](./kibana-plugin-plugins-embeddable-public.containerinput.md) > [hidePanelTitles](./kibana-plugin-plugins-embeddable-public.containerinput.hidepaneltitles.md) + +## ContainerInput.hidePanelTitles property + +Signature: + +```typescript +hidePanelTitles?: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.md new file mode 100644 index 00000000000000..dc24507b71cfb5 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ContainerInput](./kibana-plugin-plugins-embeddable-public.containerinput.md) + +## ContainerInput interface + +Signature: + +```typescript +export interface ContainerInput extends EmbeddableInput +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [hidePanelTitles](./kibana-plugin-plugins-embeddable-public.containerinput.hidepaneltitles.md) | boolean | | +| [panels](./kibana-plugin-plugins-embeddable-public.containerinput.panels.md) | {
[key: string]: PanelState<PanelExplicitInput & EmbeddableInput & {
id: string;
}>;
} | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.panels.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.panels.md new file mode 100644 index 00000000000000..82d45ebe9a10e4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containerinput.panels.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ContainerInput](./kibana-plugin-plugins-embeddable-public.containerinput.md) > [panels](./kibana-plugin-plugins-embeddable-public.containerinput.panels.md) + +## ContainerInput.panels property + +Signature: + +```typescript +panels: { + [key: string]: PanelState; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.embeddableloaded.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.embeddableloaded.md new file mode 100644 index 00000000000000..3f0db4eba0bc36 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.embeddableloaded.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ContainerOutput](./kibana-plugin-plugins-embeddable-public.containeroutput.md) > [embeddableLoaded](./kibana-plugin-plugins-embeddable-public.containeroutput.embeddableloaded.md) + +## ContainerOutput.embeddableLoaded property + +Signature: + +```typescript +embeddableLoaded: { + [key: string]: boolean; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.md new file mode 100644 index 00000000000000..f448f0f3ac0595 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.containeroutput.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ContainerOutput](./kibana-plugin-plugins-embeddable-public.containeroutput.md) + +## ContainerOutput interface + +Signature: + +```typescript +export interface ContainerOutput extends EmbeddableOutput +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [embeddableLoaded](./kibana-plugin-plugins-embeddable-public.containeroutput.embeddableloaded.md) | {
[key: string]: boolean;
} | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.context_menu_trigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.context_menu_trigger.md new file mode 100644 index 00000000000000..bcfcf6a3216619 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.context_menu_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [CONTEXT\_MENU\_TRIGGER](./kibana-plugin-plugins-embeddable-public.context_menu_trigger.md) + +## CONTEXT\_MENU\_TRIGGER variable + +Signature: + +```typescript +CONTEXT_MENU_TRIGGER = "CONTEXT_MENU_TRIGGER" +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.contextmenutrigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.contextmenutrigger.md new file mode 100644 index 00000000000000..0a88e1e0a2ea8e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.contextmenutrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [contextMenuTrigger](./kibana-plugin-plugins-embeddable-public.contextmenutrigger.md) + +## contextMenuTrigger variable + +Signature: + +```typescript +contextMenuTrigger: Trigger<'CONTEXT_MENU_TRIGGER'> +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md new file mode 100644 index 00000000000000..08047a7a441b85 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [defaultEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md) + +## defaultEmbeddableFactoryProvider variable + +Signature: + +```typescript +defaultEmbeddableFactoryProvider: = IEmbeddable, T extends SavedObjectAttributes = SavedObjectAttributes>(def: EmbeddableFactoryDefinition) => EmbeddableFactory +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction._constructor_.md new file mode 100644 index 00000000000000..55bb3d76b99d87 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction._constructor_.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.editpanelaction._constructor_.md) + +## EditPanelAction.(constructor) + +Constructs a new instance of the `EditPanelAction` class + +Signature: + +```typescript +constructor(getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory'], application: ApplicationStart, stateTransfer?: EmbeddableStateTransfer | undefined); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| getEmbeddableFactory | EmbeddableStart['getEmbeddableFactory'] | | +| application | ApplicationStart | | +| stateTransfer | EmbeddableStateTransfer | undefined | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.currentappid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.currentappid.md new file mode 100644 index 00000000000000..db94b1482d8b50 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.currentappid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [currentAppId](./kibana-plugin-plugins-embeddable-public.editpanelaction.currentappid.md) + +## EditPanelAction.currentAppId property + +Signature: + +```typescript +currentAppId: string | undefined; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.execute.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.execute.md new file mode 100644 index 00000000000000..6cfd88f17ba85b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.execute.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [execute](./kibana-plugin-plugins-embeddable-public.editpanelaction.execute.md) + +## EditPanelAction.execute() method + +Signature: + +```typescript +execute(context: ActionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionContext | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getapptarget.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getapptarget.md new file mode 100644 index 00000000000000..c9ede0f48b2853 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getapptarget.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [getAppTarget](./kibana-plugin-plugins-embeddable-public.editpanelaction.getapptarget.md) + +## EditPanelAction.getAppTarget() method + +Signature: + +```typescript +getAppTarget({ embeddable }: ActionContext): NavigationContext | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { embeddable } | ActionContext | | + +Returns: + +`NavigationContext | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getdisplayname.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getdisplayname.md new file mode 100644 index 00000000000000..227fdb8877149b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.getdisplayname.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [getDisplayName](./kibana-plugin-plugins-embeddable-public.editpanelaction.getdisplayname.md) + +## EditPanelAction.getDisplayName() method + +Signature: + +```typescript +getDisplayName({ embeddable }: ActionContext): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { embeddable } | ActionContext | | + +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.gethref.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.gethref.md new file mode 100644 index 00000000000000..1139278ab781fd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.gethref.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [getHref](./kibana-plugin-plugins-embeddable-public.editpanelaction.gethref.md) + +## EditPanelAction.getHref() method + +Signature: + +```typescript +getHref({ embeddable }: ActionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { embeddable } | ActionContext | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.geticontype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.geticontype.md new file mode 100644 index 00000000000000..bc5a1f054ca751 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.geticontype.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [getIconType](./kibana-plugin-plugins-embeddable-public.editpanelaction.geticontype.md) + +## EditPanelAction.getIconType() method + +Signature: + +```typescript +getIconType(): string; +``` +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.id.md new file mode 100644 index 00000000000000..d8b0888b518012 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [id](./kibana-plugin-plugins-embeddable-public.editpanelaction.id.md) + +## EditPanelAction.id property + +Signature: + +```typescript +readonly id = "editPanel"; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.iscompatible.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.iscompatible.md new file mode 100644 index 00000000000000..7f2714f14f0e9b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.iscompatible.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [isCompatible](./kibana-plugin-plugins-embeddable-public.editpanelaction.iscompatible.md) + +## EditPanelAction.isCompatible() method + +Signature: + +```typescript +isCompatible({ embeddable }: ActionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { embeddable } | ActionContext | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.md new file mode 100644 index 00000000000000..a39eae812ebfcd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.md @@ -0,0 +1,38 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) + +## EditPanelAction class + +Signature: + +```typescript +export declare class EditPanelAction implements Action +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(getEmbeddableFactory, application, stateTransfer)](./kibana-plugin-plugins-embeddable-public.editpanelaction._constructor_.md) | | Constructs a new instance of the EditPanelAction class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [currentAppId](./kibana-plugin-plugins-embeddable-public.editpanelaction.currentappid.md) | | string | undefined | | +| [id](./kibana-plugin-plugins-embeddable-public.editpanelaction.id.md) | | | | +| [order](./kibana-plugin-plugins-embeddable-public.editpanelaction.order.md) | | number | | +| [type](./kibana-plugin-plugins-embeddable-public.editpanelaction.type.md) | | | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [execute(context)](./kibana-plugin-plugins-embeddable-public.editpanelaction.execute.md) | | | +| [getAppTarget({ embeddable })](./kibana-plugin-plugins-embeddable-public.editpanelaction.getapptarget.md) | | | +| [getDisplayName({ embeddable })](./kibana-plugin-plugins-embeddable-public.editpanelaction.getdisplayname.md) | | | +| [getHref({ embeddable })](./kibana-plugin-plugins-embeddable-public.editpanelaction.gethref.md) | | | +| [getIconType()](./kibana-plugin-plugins-embeddable-public.editpanelaction.geticontype.md) | | | +| [isCompatible({ embeddable })](./kibana-plugin-plugins-embeddable-public.editpanelaction.iscompatible.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.order.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.order.md new file mode 100644 index 00000000000000..0ec5cde54b279b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.order.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [order](./kibana-plugin-plugins-embeddable-public.editpanelaction.order.md) + +## EditPanelAction.order property + +Signature: + +```typescript +order: number; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.type.md new file mode 100644 index 00000000000000..329f08abaaa3cd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.editpanelaction.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) > [type](./kibana-plugin-plugins-embeddable-public.editpanelaction.type.md) + +## EditPanelAction.type property + +Signature: + +```typescript +readonly type = "editPanel"; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable._constructor_.md new file mode 100644 index 00000000000000..c5e8788bf5d4dd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable._constructor_.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddable._constructor_.md) + +## Embeddable.(constructor) + +Constructs a new instance of the `Embeddable` class + +Signature: + +```typescript +constructor(input: TEmbeddableInput, output: TEmbeddableOutput, parent?: IContainer); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| input | TEmbeddableInput | | +| output | TEmbeddableOutput | | +| parent | IContainer | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.destroy.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.destroy.md new file mode 100644 index 00000000000000..1ff16eec0b7506 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.destroy.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [destroy](./kibana-plugin-plugins-embeddable-public.embeddable.destroy.md) + +## Embeddable.destroy() method + +Called when this embeddable is no longer used, this should be the place for implementors to add any additional clean up tasks, like unmounting and unsubscribing. + +Signature: + +```typescript +destroy(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput.md new file mode 100644 index 00000000000000..f4a0724d426805 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getInput](./kibana-plugin-plugins-embeddable-public.embeddable.getinput.md) + +## Embeddable.getInput() method + +Signature: + +```typescript +getInput(): Readonly; +``` +Returns: + +`Readonly` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput_.md new file mode 100644 index 00000000000000..e4910d3eb1bf2b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinput_.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getInput$](./kibana-plugin-plugins-embeddable-public.embeddable.getinput_.md) + +## Embeddable.getInput$() method + +Signature: + +```typescript +getInput$(): Readonly>; +``` +Returns: + +`Readonly>` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinspectoradapters.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinspectoradapters.md new file mode 100644 index 00000000000000..490eaca32e685e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getinspectoradapters.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getInspectorAdapters](./kibana-plugin-plugins-embeddable-public.embeddable.getinspectoradapters.md) + +## Embeddable.getInspectorAdapters() method + +An embeddable can return inspector adapters if it want the inspector to be available via the context menu of that panel. Inspector adapters that will be used to open an inspector for. + +Signature: + +```typescript +getInspectorAdapters(): Adapters | undefined; +``` +Returns: + +`Adapters | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getiscontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getiscontainer.md new file mode 100644 index 00000000000000..cb9945ea312933 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getiscontainer.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getIsContainer](./kibana-plugin-plugins-embeddable-public.embeddable.getiscontainer.md) + +## Embeddable.getIsContainer() method + +Signature: + +```typescript +getIsContainer(): this is IContainer; +``` +Returns: + +`this is IContainer` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput.md new file mode 100644 index 00000000000000..b24c5aefddb402 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getOutput](./kibana-plugin-plugins-embeddable-public.embeddable.getoutput.md) + +## Embeddable.getOutput() method + +Signature: + +```typescript +getOutput(): Readonly; +``` +Returns: + +`Readonly` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput_.md new file mode 100644 index 00000000000000..34b5f864dd0c8a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getoutput_.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getOutput$](./kibana-plugin-plugins-embeddable-public.embeddable.getoutput_.md) + +## Embeddable.getOutput$() method + +Signature: + +```typescript +getOutput$(): Readonly>; +``` +Returns: + +`Readonly>` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getroot.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getroot.md new file mode 100644 index 00000000000000..79397911d5bc72 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.getroot.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getRoot](./kibana-plugin-plugins-embeddable-public.embeddable.getroot.md) + +## Embeddable.getRoot() method + +Returns the top most parent embeddable, or itself if this embeddable is not within a parent. + +Signature: + +```typescript +getRoot(): IEmbeddable | IContainer; +``` +Returns: + +`IEmbeddable | IContainer` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.gettitle.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.gettitle.md new file mode 100644 index 00000000000000..4dc1900b4b0110 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.gettitle.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [getTitle](./kibana-plugin-plugins-embeddable-public.embeddable.gettitle.md) + +## Embeddable.getTitle() method + +Signature: + +```typescript +getTitle(): string; +``` +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.id.md new file mode 100644 index 00000000000000..348934b9fb65c5 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [id](./kibana-plugin-plugins-embeddable-public.embeddable.id.md) + +## Embeddable.id property + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.input.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.input.md new file mode 100644 index 00000000000000..4541aeacd5bc89 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.input.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [input](./kibana-plugin-plugins-embeddable-public.embeddable.input.md) + +## Embeddable.input property + +Signature: + +```typescript +protected input: TEmbeddableInput; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.iscontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.iscontainer.md new file mode 100644 index 00000000000000..db15653d40c4c3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.iscontainer.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [isContainer](./kibana-plugin-plugins-embeddable-public.embeddable.iscontainer.md) + +## Embeddable.isContainer property + +Signature: + +```typescript +readonly isContainer: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.md new file mode 100644 index 00000000000000..295cc10b1bb193 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.md @@ -0,0 +1,51 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) + +## Embeddable class + +Signature: + +```typescript +export declare abstract class Embeddable implements IEmbeddable +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(input, output, parent)](./kibana-plugin-plugins-embeddable-public.embeddable._constructor_.md) | | Constructs a new instance of the Embeddable class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-public.embeddable.id.md) | | string | | +| [input](./kibana-plugin-plugins-embeddable-public.embeddable.input.md) | | TEmbeddableInput | | +| [isContainer](./kibana-plugin-plugins-embeddable-public.embeddable.iscontainer.md) | | boolean | | +| [output](./kibana-plugin-plugins-embeddable-public.embeddable.output.md) | | TEmbeddableOutput | | +| [parent](./kibana-plugin-plugins-embeddable-public.embeddable.parent.md) | | IContainer | | +| [renderComplete](./kibana-plugin-plugins-embeddable-public.embeddable.rendercomplete.md) | | RenderCompleteDispatcher | | +| [runtimeId](./kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md) | | number | | +| [runtimeId](./kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md) | static | number | | +| [type](./kibana-plugin-plugins-embeddable-public.embeddable.type.md) | | string | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [destroy()](./kibana-plugin-plugins-embeddable-public.embeddable.destroy.md) | | Called when this embeddable is no longer used, this should be the place for implementors to add any additional clean up tasks, like unmounting and unsubscribing. | +| [getInput()](./kibana-plugin-plugins-embeddable-public.embeddable.getinput.md) | | | +| [getInput$()](./kibana-plugin-plugins-embeddable-public.embeddable.getinput_.md) | | | +| [getInspectorAdapters()](./kibana-plugin-plugins-embeddable-public.embeddable.getinspectoradapters.md) | | An embeddable can return inspector adapters if it want the inspector to be available via the context menu of that panel. Inspector adapters that will be used to open an inspector for. | +| [getIsContainer()](./kibana-plugin-plugins-embeddable-public.embeddable.getiscontainer.md) | | | +| [getOutput()](./kibana-plugin-plugins-embeddable-public.embeddable.getoutput.md) | | | +| [getOutput$()](./kibana-plugin-plugins-embeddable-public.embeddable.getoutput_.md) | | | +| [getRoot()](./kibana-plugin-plugins-embeddable-public.embeddable.getroot.md) | | Returns the top most parent embeddable, or itself if this embeddable is not within a parent. | +| [getTitle()](./kibana-plugin-plugins-embeddable-public.embeddable.gettitle.md) | | | +| [reload()](./kibana-plugin-plugins-embeddable-public.embeddable.reload.md) | | Reload will be called when there is a request to refresh the data or view, even if the input data did not change. | +| [render(el)](./kibana-plugin-plugins-embeddable-public.embeddable.render.md) | | | +| [supportedTriggers()](./kibana-plugin-plugins-embeddable-public.embeddable.supportedtriggers.md) | | | +| [updateInput(changes)](./kibana-plugin-plugins-embeddable-public.embeddable.updateinput.md) | | | +| [updateOutput(outputChanges)](./kibana-plugin-plugins-embeddable-public.embeddable.updateoutput.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.output.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.output.md new file mode 100644 index 00000000000000..db854e2a69cecf --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.output.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [output](./kibana-plugin-plugins-embeddable-public.embeddable.output.md) + +## Embeddable.output property + +Signature: + +```typescript +protected output: TEmbeddableOutput; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.parent.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.parent.md new file mode 100644 index 00000000000000..bfd82f53e96f16 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.parent.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [parent](./kibana-plugin-plugins-embeddable-public.embeddable.parent.md) + +## Embeddable.parent property + +Signature: + +```typescript +readonly parent?: IContainer; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.reload.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.reload.md new file mode 100644 index 00000000000000..e3b06f414cb5b4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.reload.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [reload](./kibana-plugin-plugins-embeddable-public.embeddable.reload.md) + +## Embeddable.reload() method + +Reload will be called when there is a request to refresh the data or view, even if the input data did not change. + +Signature: + +```typescript +abstract reload(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.render.md new file mode 100644 index 00000000000000..171a3c6a30a855 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.render.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [render](./kibana-plugin-plugins-embeddable-public.embeddable.render.md) + +## Embeddable.render() method + +Signature: + +```typescript +render(el: HTMLElement): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.rendercomplete.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.rendercomplete.md new file mode 100644 index 00000000000000..c86bb2e998044c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.rendercomplete.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [renderComplete](./kibana-plugin-plugins-embeddable-public.embeddable.rendercomplete.md) + +## Embeddable.renderComplete property + +Signature: + +```typescript +protected renderComplete: RenderCompleteDispatcher; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md new file mode 100644 index 00000000000000..a5cdd12b6f198b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [runtimeId](./kibana-plugin-plugins-embeddable-public.embeddable.runtimeid.md) + +## Embeddable.runtimeId property + +Signature: + +```typescript +static runtimeId: number; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.supportedtriggers.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.supportedtriggers.md new file mode 100644 index 00000000000000..16676bc732b1ce --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.supportedtriggers.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [supportedTriggers](./kibana-plugin-plugins-embeddable-public.embeddable.supportedtriggers.md) + +## Embeddable.supportedTriggers() method + +Signature: + +```typescript +supportedTriggers(): Array; +``` +Returns: + +`Array` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.type.md new file mode 100644 index 00000000000000..bb3ae7384686c3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [type](./kibana-plugin-plugins-embeddable-public.embeddable.type.md) + +## Embeddable.type property + +Signature: + +```typescript +abstract readonly type: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateinput.md new file mode 100644 index 00000000000000..36c46bb71c6b62 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateinput.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [updateInput](./kibana-plugin-plugins-embeddable-public.embeddable.updateinput.md) + +## Embeddable.updateInput() method + +Signature: + +```typescript +updateInput(changes: Partial): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| changes | Partial<TEmbeddableInput> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateoutput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateoutput.md new file mode 100644 index 00000000000000..0b0244e7a58531 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddable.updateoutput.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) > [updateOutput](./kibana-plugin-plugins-embeddable-public.embeddable.updateoutput.md) + +## Embeddable.updateOutput() method + +Signature: + +```typescript +protected updateOutput(outputChanges: Partial): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| outputChanges | Partial<TEmbeddableOutput> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel._constructor_.md new file mode 100644 index 00000000000000..76412de0d54199 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel._constructor_.md) + +## EmbeddableChildPanel.(constructor) + +Constructs a new instance of the `EmbeddableChildPanel` class + +Signature: + +```typescript +constructor(props: EmbeddableChildPanelProps); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| props | EmbeddableChildPanelProps | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentdidmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentdidmount.md new file mode 100644 index 00000000000000..5302d3e986d947 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentdidmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [componentDidMount](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentdidmount.md) + +## EmbeddableChildPanel.componentDidMount() method + +Signature: + +```typescript +componentDidMount(): Promise; +``` +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentwillunmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentwillunmount.md new file mode 100644 index 00000000000000..17c23a5ba2fd1e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentwillunmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [componentWillUnmount](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentwillunmount.md) + +## EmbeddableChildPanel.componentWillUnmount() method + +Signature: + +```typescript +componentWillUnmount(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.embeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.embeddable.md new file mode 100644 index 00000000000000..298697167e1274 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.embeddable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.embeddable.md) + +## EmbeddableChildPanel.embeddable property + +Signature: + +```typescript +embeddable: IEmbeddable | ErrorEmbeddable; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md new file mode 100644 index 00000000000000..d52033b4fd6ad1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md @@ -0,0 +1,35 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) + +## EmbeddableChildPanel class + +This component can be used by embeddable containers using react to easily render children. It waits for the child to be initialized, showing a loading indicator until that is complete. + +Signature: + +```typescript +export declare class EmbeddableChildPanel extends React.Component +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(props)](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel._constructor_.md) | | Constructs a new instance of the EmbeddableChildPanel class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.embeddable.md) | | IEmbeddable | ErrorEmbeddable | | +| [mounted](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.mounted.md) | | boolean | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [componentDidMount()](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentdidmount.md) | | | +| [componentWillUnmount()](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.componentwillunmount.md) | | | +| [render()](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.render.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.mounted.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.mounted.md new file mode 100644 index 00000000000000..169f27ea5afa62 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.mounted.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [mounted](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.mounted.md) + +## EmbeddableChildPanel.mounted property + +Signature: + +```typescript +mounted: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.render.md new file mode 100644 index 00000000000000..01d70eb5f628fd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanel.render.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) > [render](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.render.md) + +## EmbeddableChildPanel.render() method + +Signature: + +```typescript +render(): JSX.Element; +``` +Returns: + +`JSX.Element` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.classname.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.classname.md new file mode 100644 index 00000000000000..d18dea31545d9f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.classname.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) > [className](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.classname.md) + +## EmbeddableChildPanelProps.className property + +Signature: + +```typescript +className?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.container.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.container.md new file mode 100644 index 00000000000000..91120f955b15e6 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.container.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) > [container](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.container.md) + +## EmbeddableChildPanelProps.container property + +Signature: + +```typescript +container: IContainer; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.embeddableid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.embeddableid.md new file mode 100644 index 00000000000000..6765010e1b6967 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.embeddableid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) > [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.embeddableid.md) + +## EmbeddableChildPanelProps.embeddableId property + +Signature: + +```typescript +embeddableId: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md new file mode 100644 index 00000000000000..7ed3bd1e207686 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) + +## EmbeddableChildPanelProps interface + +Signature: + +```typescript +export interface EmbeddableChildPanelProps +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [className](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.classname.md) | string | | +| [container](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.container.md) | IContainer | | +| [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.embeddableid.md) | string | | +| [PanelComponent](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.panelcomponent.md) | EmbeddableStart['EmbeddablePanel'] | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.panelcomponent.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.panelcomponent.md new file mode 100644 index 00000000000000..e1bb6b41d38879 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.panelcomponent.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) > [PanelComponent](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.panelcomponent.md) + +## EmbeddableChildPanelProps.PanelComponent property + +Signature: + +```typescript +PanelComponent: EmbeddableStart['EmbeddablePanel']; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md new file mode 100644 index 00000000000000..06e51958a2d1e5 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableContext](./kibana-plugin-plugins-embeddable-public.embeddablecontext.md) > [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md) + +## EmbeddableContext.embeddable property + +Signature: + +```typescript +embeddable: IEmbeddable; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.md new file mode 100644 index 00000000000000..a2c2d9245eabe3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablecontext.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableContext](./kibana-plugin-plugins-embeddable-public.embeddablecontext.md) + +## EmbeddableContext interface + +Signature: + +```typescript +export interface EmbeddableContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md) | IEmbeddable | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md new file mode 100644 index 00000000000000..d998e982cc9d58 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) > [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md) + +## EmbeddableEditorState.embeddableId property + +Signature: + +```typescript +embeddableId?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md new file mode 100644 index 00000000000000..63302f50204fed --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) + +## EmbeddableEditorState interface + +A state package that contains information an editor will need to create or edit an embeddable then redirect back. + +Signature: + +```typescript +export interface EmbeddableEditorState +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.embeddableid.md) | string | | +| [originatingApp](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md) | string | | +| [valueInput](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md) | EmbeddableInput | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md new file mode 100644 index 00000000000000..640b0894ef2c7f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) > [originatingApp](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.originatingapp.md) + +## EmbeddableEditorState.originatingApp property + +Signature: + +```typescript +originatingApp: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md new file mode 100644 index 00000000000000..61ebfc61634b8b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) > [valueInput](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.valueinput.md) + +## EmbeddableEditorState.valueInput property + +Signature: + +```typescript +valueInput?: EmbeddableInput; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.cancreatenew.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.cancreatenew.md new file mode 100644 index 00000000000000..78bcb4f31a5be8 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.cancreatenew.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [canCreateNew](./kibana-plugin-plugins-embeddable-public.embeddablefactory.cancreatenew.md) + +## EmbeddableFactory.canCreateNew() method + +If false, this type of embeddable can't be created with the "createNew" functionality. Instead, use createFromSavedObject, where an existing saved object must first exist. + +Signature: + +```typescript +canCreateNew(): boolean; +``` +Returns: + +`boolean` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.create.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.create.md new file mode 100644 index 00000000000000..130c8cb7606257 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.create.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [create](./kibana-plugin-plugins-embeddable-public.embeddablefactory.create.md) + +## EmbeddableFactory.create() method + +Resolves to undefined if a new Embeddable cannot be directly created and the user will instead be redirected elsewhere. + +This will likely change in future iterations when we improve in place editing capabilities. + +Signature: + +```typescript +create(initialInput: TEmbeddableInput, parent?: IContainer): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| initialInput | TEmbeddableInput | | +| parent | IContainer | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.createfromsavedobject.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.createfromsavedobject.md new file mode 100644 index 00000000000000..7a411988ca3b04 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.createfromsavedobject.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [createFromSavedObject](./kibana-plugin-plugins-embeddable-public.embeddablefactory.createfromsavedobject.md) + +## EmbeddableFactory.createFromSavedObject() method + +Creates a new embeddable instance based off the saved object id. + +Signature: + +```typescript +createFromSavedObject(savedObjectId: string, input: Partial, parent?: IContainer): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| savedObjectId | string | | +| input | Partial<TEmbeddableInput> | some input may come from a parent, or user, if it's not stored with the saved object. For example, the time range of the parent container. | +| parent | IContainer | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdefaultinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdefaultinput.md new file mode 100644 index 00000000000000..bf1ca6abd9ba0c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdefaultinput.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [getDefaultInput](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getdefaultinput.md) + +## EmbeddableFactory.getDefaultInput() method + +Can be used to get any default input, to be passed in to during the creation process. Default input will not be stored in a parent container, so any inherited input from a container will trump default input parameters. + +Signature: + +```typescript +getDefaultInput(partial: Partial): Partial; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| partial | Partial<TEmbeddableInput> | | + +Returns: + +`Partial` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdisplayname.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdisplayname.md new file mode 100644 index 00000000000000..5b97645d4947d7 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getdisplayname.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [getDisplayName](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getdisplayname.md) + +## EmbeddableFactory.getDisplayName() method + +Returns a display name for this type of embeddable. Used in "Create new... " options in the add panel for containers. + +Signature: + +```typescript +getDisplayName(): string; +``` +Returns: + +`string` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getexplicitinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getexplicitinput.md new file mode 100644 index 00000000000000..3ec05f50005d06 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.getexplicitinput.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [getExplicitInput](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getexplicitinput.md) + +## EmbeddableFactory.getExplicitInput() method + +Can be used to request explicit input from the user, to be passed in to `EmbeddableFactory:create`. Explicit input is stored on the parent container for this embeddable. It overrides any inherited input passed down from the parent container. + +Signature: + +```typescript +getExplicitInput(): Promise>; +``` +Returns: + +`Promise>` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iscontainertype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iscontainertype.md new file mode 100644 index 00000000000000..f3ba375ab575c4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iscontainertype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [isContainerType](./kibana-plugin-plugins-embeddable-public.embeddablefactory.iscontainertype.md) + +## EmbeddableFactory.isContainerType property + +True if is this factory create embeddables that are Containers. Used in the add panel to conditionally show whether these can be added to another container. It's just not supported right now, but once nested containers are officially supported we can probably get rid of this interface. + +Signature: + +```typescript +readonly isContainerType: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iseditable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iseditable.md new file mode 100644 index 00000000000000..f1ad10dfaa1f62 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.iseditable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [isEditable](./kibana-plugin-plugins-embeddable-public.embeddablefactory.iseditable.md) + +## EmbeddableFactory.isEditable property + +Returns whether the current user should be allowed to edit this type of embeddable. Most of the time this should be based off the capabilities service, hence it's async. + +Signature: + +```typescript +readonly isEditable: () => Promise; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.md new file mode 100644 index 00000000000000..d543cf3d096df3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) + +## EmbeddableFactory interface + +EmbeddableFactories create and initialize an embeddable instance + +Signature: + +```typescript +export interface EmbeddableFactory = IEmbeddable, TSavedObjectAttributes extends SavedObjectAttributes = SavedObjectAttributes> extends PersistableState +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [isContainerType](./kibana-plugin-plugins-embeddable-public.embeddablefactory.iscontainertype.md) | boolean | True if is this factory create embeddables that are Containers. Used in the add panel to conditionally show whether these can be added to another container. It's just not supported right now, but once nested containers are officially supported we can probably get rid of this interface. | +| [isEditable](./kibana-plugin-plugins-embeddable-public.embeddablefactory.iseditable.md) | () => Promise<boolean> | Returns whether the current user should be allowed to edit this type of embeddable. Most of the time this should be based off the capabilities service, hence it's async. | +| [savedObjectMetaData](./kibana-plugin-plugins-embeddable-public.embeddablefactory.savedobjectmetadata.md) | SavedObjectMetaData<TSavedObjectAttributes> | | +| [type](./kibana-plugin-plugins-embeddable-public.embeddablefactory.type.md) | string | | + +## Methods + +| Method | Description | +| --- | --- | +| [canCreateNew()](./kibana-plugin-plugins-embeddable-public.embeddablefactory.cancreatenew.md) | If false, this type of embeddable can't be created with the "createNew" functionality. Instead, use createFromSavedObject, where an existing saved object must first exist. | +| [create(initialInput, parent)](./kibana-plugin-plugins-embeddable-public.embeddablefactory.create.md) | Resolves to undefined if a new Embeddable cannot be directly created and the user will instead be redirected elsewhere.This will likely change in future iterations when we improve in place editing capabilities. | +| [createFromSavedObject(savedObjectId, input, parent)](./kibana-plugin-plugins-embeddable-public.embeddablefactory.createfromsavedobject.md) | Creates a new embeddable instance based off the saved object id. | +| [getDefaultInput(partial)](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getdefaultinput.md) | Can be used to get any default input, to be passed in to during the creation process. Default input will not be stored in a parent container, so any inherited input from a container will trump default input parameters. | +| [getDisplayName()](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getdisplayname.md) | Returns a display name for this type of embeddable. Used in "Create new... " options in the add panel for containers. | +| [getExplicitInput()](./kibana-plugin-plugins-embeddable-public.embeddablefactory.getexplicitinput.md) | Can be used to request explicit input from the user, to be passed in to EmbeddableFactory:create. Explicit input is stored on the parent container for this embeddable. It overrides any inherited input passed down from the parent container. | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.savedobjectmetadata.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.savedobjectmetadata.md new file mode 100644 index 00000000000000..ec5bf420aac3e4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.savedobjectmetadata.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [savedObjectMetaData](./kibana-plugin-plugins-embeddable-public.embeddablefactory.savedobjectmetadata.md) + +## EmbeddableFactory.savedObjectMetaData property + +Signature: + +```typescript +readonly savedObjectMetaData?: SavedObjectMetaData; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.type.md new file mode 100644 index 00000000000000..307f808de9bcdc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactory.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) > [type](./kibana-plugin-plugins-embeddable-public.embeddablefactory.type.md) + +## EmbeddableFactory.type property + +Signature: + +```typescript +readonly type: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorydefinition.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorydefinition.md new file mode 100644 index 00000000000000..4e342d3cf73a19 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorydefinition.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactoryDefinition](./kibana-plugin-plugins-embeddable-public.embeddablefactorydefinition.md) + +## EmbeddableFactoryDefinition type + +Signature: + +```typescript +export declare type EmbeddableFactoryDefinition = IEmbeddable, T extends SavedObjectAttributes = SavedObjectAttributes> = Pick, 'create' | 'type' | 'isEditable' | 'getDisplayName'> & Partial, 'createFromSavedObject' | 'isContainerType' | 'getExplicitInput' | 'savedObjectMetaData' | 'canCreateNew' | 'getDefaultInput' | 'telemetry' | 'extract' | 'inject'>>; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror._constructor_.md new file mode 100644 index 00000000000000..273126936ce91a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactoryNotFoundError](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror._constructor_.md) + +## EmbeddableFactoryNotFoundError.(constructor) + +Constructs a new instance of the `EmbeddableFactoryNotFoundError` class + +Signature: + +```typescript +constructor(type: string); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| type | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.code.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.code.md new file mode 100644 index 00000000000000..2ad75d3e68ba46 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.code.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactoryNotFoundError](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md) > [code](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.code.md) + +## EmbeddableFactoryNotFoundError.code property + +Signature: + +```typescript +code: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md new file mode 100644 index 00000000000000..028271d36fee07 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableFactoryNotFoundError](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md) + +## EmbeddableFactoryNotFoundError class + +Signature: + +```typescript +export declare class EmbeddableFactoryNotFoundError extends Error +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(type)](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror._constructor_.md) | | Constructs a new instance of the EmbeddableFactoryNotFoundError class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [code](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.code.md) | | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinput.md new file mode 100644 index 00000000000000..d1d97d50f5948a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinput.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableInput](./kibana-plugin-plugins-embeddable-public.embeddableinput.md) + +## EmbeddableInput type + +Signature: + +```typescript +export declare type EmbeddableInput = { + viewMode?: ViewMode; + title?: string; + id: string; + lastReloadRequestTime?: number; + hidePanelTitles?: boolean; + enhancements?: SerializableState; + disabledActions?: string[]; + disableTriggers?: boolean; + timeRange?: TimeRange; + query?: Query; + filters?: Filter[]; +}; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.id.md new file mode 100644 index 00000000000000..2298c6fb111a0b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableInstanceConfiguration](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md) > [id](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.id.md) + +## EmbeddableInstanceConfiguration.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md new file mode 100644 index 00000000000000..84f6bcefef4476 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableInstanceConfiguration](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md) + +## EmbeddableInstanceConfiguration interface + +Signature: + +```typescript +export interface EmbeddableInstanceConfiguration +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.id.md) | string | | +| [savedObjectId](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.savedobjectid.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.savedobjectid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.savedobjectid.md new file mode 100644 index 00000000000000..c1584403c5bba9 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.savedobjectid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableInstanceConfiguration](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md) > [savedObjectId](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.savedobjectid.md) + +## EmbeddableInstanceConfiguration.savedObjectId property + +Signature: + +```typescript +savedObjectId?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.defaulttitle.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.defaulttitle.md new file mode 100644 index 00000000000000..c9d616a96e8e20 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.defaulttitle.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [defaultTitle](./kibana-plugin-plugins-embeddable-public.embeddableoutput.defaulttitle.md) + +## EmbeddableOutput.defaultTitle property + +Signature: + +```typescript +defaultTitle?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editable.md new file mode 100644 index 00000000000000..4bf84a8f2abf80 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [editable](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editable.md) + +## EmbeddableOutput.editable property + +Signature: + +```typescript +editable?: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editapp.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editapp.md new file mode 100644 index 00000000000000..5c5acd6288ba43 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editapp.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [editApp](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editapp.md) + +## EmbeddableOutput.editApp property + +Signature: + +```typescript +editApp?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editpath.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editpath.md new file mode 100644 index 00000000000000..da282ece32f208 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editpath.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [editPath](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editpath.md) + +## EmbeddableOutput.editPath property + +Signature: + +```typescript +editPath?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editurl.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editurl.md new file mode 100644 index 00000000000000..a0c4bed4ad8bba --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.editurl.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [editUrl](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editurl.md) + +## EmbeddableOutput.editUrl property + +Signature: + +```typescript +editUrl?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.error.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.error.md new file mode 100644 index 00000000000000..db3f27ecf295b2 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.error.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [error](./kibana-plugin-plugins-embeddable-public.embeddableoutput.error.md) + +## EmbeddableOutput.error property + +Signature: + +```typescript +error?: EmbeddableError; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.loading.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.loading.md new file mode 100644 index 00000000000000..a9472b1663f1a3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.loading.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [loading](./kibana-plugin-plugins-embeddable-public.embeddableoutput.loading.md) + +## EmbeddableOutput.loading property + +Signature: + +```typescript +loading?: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.md new file mode 100644 index 00000000000000..92e1560c34e315 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) + +## EmbeddableOutput interface + +Signature: + +```typescript +export interface EmbeddableOutput +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [defaultTitle](./kibana-plugin-plugins-embeddable-public.embeddableoutput.defaulttitle.md) | string | | +| [editable](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editable.md) | boolean | | +| [editApp](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editapp.md) | string | | +| [editPath](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editpath.md) | string | | +| [editUrl](./kibana-plugin-plugins-embeddable-public.embeddableoutput.editurl.md) | string | | +| [error](./kibana-plugin-plugins-embeddable-public.embeddableoutput.error.md) | EmbeddableError | | +| [loading](./kibana-plugin-plugins-embeddable-public.embeddableoutput.loading.md) | boolean | | +| [savedObjectId](./kibana-plugin-plugins-embeddable-public.embeddableoutput.savedobjectid.md) | string | | +| [title](./kibana-plugin-plugins-embeddable-public.embeddableoutput.title.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.savedobjectid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.savedobjectid.md new file mode 100644 index 00000000000000..29aca26621d797 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.savedobjectid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [savedObjectId](./kibana-plugin-plugins-embeddable-public.embeddableoutput.savedobjectid.md) + +## EmbeddableOutput.savedObjectId property + +Signature: + +```typescript +savedObjectId?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.title.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.title.md new file mode 100644 index 00000000000000..0748a60b38e0f1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableoutput.title.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) > [title](./kibana-plugin-plugins-embeddable-public.embeddableoutput.title.md) + +## EmbeddableOutput.title property + +Signature: + +```typescript +title?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.embeddableid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.embeddableid.md new file mode 100644 index 00000000000000..de1598d92b6de3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.embeddableid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePackageState](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) > [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.embeddableid.md) + +## EmbeddablePackageState.embeddableId property + +Signature: + +```typescript +embeddableId?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.input.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.input.md new file mode 100644 index 00000000000000..2f4b1a1fa4237a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.input.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePackageState](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) > [input](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.input.md) + +## EmbeddablePackageState.input property + +Signature: + +```typescript +input: Optional | Optional; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md new file mode 100644 index 00000000000000..1c0b1b8bf8b462 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePackageState](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) + +## EmbeddablePackageState interface + +A state package that contains all fields necessary to create or update an embeddable by reference or by value in a container. + +Signature: + +```typescript +export interface EmbeddablePackageState +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [embeddableId](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.embeddableid.md) | string | | +| [input](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.input.md) | Optional<EmbeddableInput, 'id'> | Optional<SavedObjectEmbeddableInput, 'id'> | | +| [type](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.type.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.type.md new file mode 100644 index 00000000000000..67ca5b8803dd5b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepackagestate.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePackageState](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) > [type](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.type.md) + +## EmbeddablePackageState.type property + +Signature: + +```typescript +type: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel._constructor_.md new file mode 100644 index 00000000000000..741e5df8a1590d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddablepanel._constructor_.md) + +## EmbeddablePanel.(constructor) + +Constructs a new instance of the `EmbeddablePanel` class + +Signature: + +```typescript +constructor(props: Props); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| props | Props | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.closemycontextmenupanel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.closemycontextmenupanel.md new file mode 100644 index 00000000000000..6869257675aa4d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.closemycontextmenupanel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [closeMyContextMenuPanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.closemycontextmenupanel.md) + +## EmbeddablePanel.closeMyContextMenuPanel property + +Signature: + +```typescript +closeMyContextMenuPanel: () => void; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentdidmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentdidmount.md new file mode 100644 index 00000000000000..fb281dcf1107fc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentdidmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [componentDidMount](./kibana-plugin-plugins-embeddable-public.embeddablepanel.componentdidmount.md) + +## EmbeddablePanel.componentDidMount() method + +Signature: + +```typescript +componentDidMount(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentwillunmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentwillunmount.md new file mode 100644 index 00000000000000..41050f9c7c82af --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.componentwillunmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [componentWillUnmount](./kibana-plugin-plugins-embeddable-public.embeddablepanel.componentwillunmount.md) + +## EmbeddablePanel.componentWillUnmount() method + +Signature: + +```typescript +componentWillUnmount(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.md new file mode 100644 index 00000000000000..643649ede51efd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.md @@ -0,0 +1,35 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) + +## EmbeddablePanel class + +Signature: + +```typescript +export declare class EmbeddablePanel extends React.Component +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(props)](./kibana-plugin-plugins-embeddable-public.embeddablepanel._constructor_.md) | | Constructs a new instance of the EmbeddablePanel class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [closeMyContextMenuPanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.closemycontextmenupanel.md) | | () => void | | +| [onBlur](./kibana-plugin-plugins-embeddable-public.embeddablepanel.onblur.md) | | (blurredPanelIndex: string) => void | | +| [onFocus](./kibana-plugin-plugins-embeddable-public.embeddablepanel.onfocus.md) | | (focusedPanelIndex: string) => void | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [componentDidMount()](./kibana-plugin-plugins-embeddable-public.embeddablepanel.componentdidmount.md) | | | +| [componentWillUnmount()](./kibana-plugin-plugins-embeddable-public.embeddablepanel.componentwillunmount.md) | | | +| [render()](./kibana-plugin-plugins-embeddable-public.embeddablepanel.render.md) | | | +| [UNSAFE\_componentWillMount()](./kibana-plugin-plugins-embeddable-public.embeddablepanel.unsafe_componentwillmount.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onblur.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onblur.md new file mode 100644 index 00000000000000..f1db7468018187 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onblur.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [onBlur](./kibana-plugin-plugins-embeddable-public.embeddablepanel.onblur.md) + +## EmbeddablePanel.onBlur property + +Signature: + +```typescript +onBlur: (blurredPanelIndex: string) => void; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onfocus.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onfocus.md new file mode 100644 index 00000000000000..3c9b713eab9501 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.onfocus.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [onFocus](./kibana-plugin-plugins-embeddable-public.embeddablepanel.onfocus.md) + +## EmbeddablePanel.onFocus property + +Signature: + +```typescript +onFocus: (focusedPanelIndex: string) => void; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.render.md new file mode 100644 index 00000000000000..13e87df47a2427 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.render.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [render](./kibana-plugin-plugins-embeddable-public.embeddablepanel.render.md) + +## EmbeddablePanel.render() method + +Signature: + +```typescript +render(): JSX.Element; +``` +Returns: + +`JSX.Element` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.unsafe_componentwillmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.unsafe_componentwillmount.md new file mode 100644 index 00000000000000..286d7e9cee1f30 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanel.unsafe_componentwillmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) > [UNSAFE\_componentWillMount](./kibana-plugin-plugins-embeddable-public.embeddablepanel.unsafe_componentwillmount.md) + +## EmbeddablePanel.UNSAFE\_componentWillMount() method + +Signature: + +```typescript +UNSAFE_componentWillMount(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanelhoc.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanelhoc.md new file mode 100644 index 00000000000000..3f57ac562e6d55 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablepanelhoc.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddablePanelHOC](./kibana-plugin-plugins-embeddable-public.embeddablepanelhoc.md) + +## EmbeddablePanelHOC type + +Signature: + +```typescript +export declare type EmbeddablePanelHOC = React.FC<{ + embeddable: IEmbeddable; + hideHeader?: boolean; +}>; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerenderer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerenderer.md new file mode 100644 index 00000000000000..1bc55e60079102 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerenderer.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRenderer](./kibana-plugin-plugins-embeddable-public.embeddablerenderer.md) + +## EmbeddableRenderer variable + +Helper react component to render an embeddable Can be used if you have an embeddable object or an embeddable factory Supports updating input by passing `input` prop + +Signature: + +```typescript +EmbeddableRenderer: (props: EmbeddableRendererProps) => JSX.Element +``` + +## Remarks + +This component shouldn't be used inside an embeddable container to render embeddable children because children may lose inherited input, here is why: + +When passing `input` inside a prop, internally there is a call: + +```ts +embeddable.updateInput(input); + +``` +If you are simply rendering an embeddable, it's no problem. + +However when you are dealing with containers, you want to be sure to only pass into updateInput the actual state that changed. This is because calling child.updateInput({ foo }) will make foo explicit state. It cannot be inherited from it's parent. + +For example, on a dashboard, the time range is inherited by all children, unless they had their time range set explicitly. This is how "per panel time range" works. That action calls embeddable.updateInput({ timeRange }), and the time range will no longer be inherited from the container. + +see: https://github.com/elastic/kibana/pull/67783\#discussion\_r435447657 for more details. refer to: examples/embeddable\_explorer for examples with correct usage of this component. + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerendererprops.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerendererprops.md new file mode 100644 index 00000000000000..c21864b1140e88 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablerendererprops.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRendererProps](./kibana-plugin-plugins-embeddable-public.embeddablerendererprops.md) + +## EmbeddableRendererProps type + +This type is a publicly exposed props of [EmbeddableRenderer](./kibana-plugin-plugins-embeddable-public.embeddablerenderer.md) Union is used to validate that or factory or embeddable is passed in, but it can't be both simultaneously In case when embeddable is passed in, input is optional, because there is already an input inside of embeddable object In case when factory is used, then input is required, because it will be used as initial input to create an embeddable object + +Signature: + +```typescript +export declare type EmbeddableRendererProps = EmbeddableRendererPropsWithEmbeddable | EmbeddableRendererWithFactory; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot._constructor_.md new file mode 100644 index 00000000000000..4e0a2a6880d295 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddableroot._constructor_.md) + +## EmbeddableRoot.(constructor) + +Constructs a new instance of the `EmbeddableRoot` class + +Signature: + +```typescript +constructor(props: Props); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| props | Props | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidmount.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidmount.md new file mode 100644 index 00000000000000..7085339dd88682 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidmount.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) > [componentDidMount](./kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidmount.md) + +## EmbeddableRoot.componentDidMount() method + +Signature: + +```typescript +componentDidMount(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidupdate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidupdate.md new file mode 100644 index 00000000000000..386c8c61681d5b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidupdate.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) > [componentDidUpdate](./kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidupdate.md) + +## EmbeddableRoot.componentDidUpdate() method + +Signature: + +```typescript +componentDidUpdate(prevProps?: Props): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| prevProps | Props | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.md new file mode 100644 index 00000000000000..49d8a184f334c8 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) + +## EmbeddableRoot class + +Signature: + +```typescript +export declare class EmbeddableRoot extends React.Component +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(props)](./kibana-plugin-plugins-embeddable-public.embeddableroot._constructor_.md) | | Constructs a new instance of the EmbeddableRoot class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [componentDidMount()](./kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidmount.md) | | | +| [componentDidUpdate(prevProps)](./kibana-plugin-plugins-embeddable-public.embeddableroot.componentdidupdate.md) | | | +| [render()](./kibana-plugin-plugins-embeddable-public.embeddableroot.render.md) | | | +| [shouldComponentUpdate(newProps)](./kibana-plugin-plugins-embeddable-public.embeddableroot.shouldcomponentupdate.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.render.md new file mode 100644 index 00000000000000..d9b3820dede151 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.render.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) > [render](./kibana-plugin-plugins-embeddable-public.embeddableroot.render.md) + +## EmbeddableRoot.render() method + +Signature: + +```typescript +render(): JSX.Element; +``` +Returns: + +`JSX.Element` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.shouldcomponentupdate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.shouldcomponentupdate.md new file mode 100644 index 00000000000000..36b08f72c0e401 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddableroot.shouldcomponentupdate.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) > [shouldComponentUpdate](./kibana-plugin-plugins-embeddable-public.embeddableroot.shouldcomponentupdate.md) + +## EmbeddableRoot.shouldComponentUpdate() method + +Signature: + +```typescript +shouldComponentUpdate(newProps: Props): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newProps | Props | | + +Returns: + +`boolean` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.md new file mode 100644 index 00000000000000..97d6eda66bdcd0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-public.embeddablesetup.md) + +## EmbeddableSetup interface + +Signature: + +```typescript +export interface EmbeddableSetup +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [registerEmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablesetup.registerembeddablefactory.md) | <I extends EmbeddableInput, O extends EmbeddableOutput, E extends IEmbeddable<I, O> = IEmbeddable<I, O>>(id: string, factory: EmbeddableFactoryDefinition<I, O, E>) => () => EmbeddableFactory<I, O, E> | | +| [registerEnhancement](./kibana-plugin-plugins-embeddable-public.embeddablesetup.registerenhancement.md) | (enhancement: EnhancementRegistryDefinition) => void | | +| [setCustomEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.embeddablesetup.setcustomembeddablefactoryprovider.md) | (customProvider: EmbeddableFactoryProvider) => void | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerembeddablefactory.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerembeddablefactory.md new file mode 100644 index 00000000000000..d9f63b30dfe6de --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerembeddablefactory.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-public.embeddablesetup.md) > [registerEmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablesetup.registerembeddablefactory.md) + +## EmbeddableSetup.registerEmbeddableFactory property + +Signature: + +```typescript +registerEmbeddableFactory: = IEmbeddable>(id: string, factory: EmbeddableFactoryDefinition) => () => EmbeddableFactory; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerenhancement.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerenhancement.md new file mode 100644 index 00000000000000..46baaf6dbf2681 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.registerenhancement.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-public.embeddablesetup.md) > [registerEnhancement](./kibana-plugin-plugins-embeddable-public.embeddablesetup.registerenhancement.md) + +## EmbeddableSetup.registerEnhancement property + +Signature: + +```typescript +registerEnhancement: (enhancement: EnhancementRegistryDefinition) => void; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.setcustomembeddablefactoryprovider.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.setcustomembeddablefactoryprovider.md new file mode 100644 index 00000000000000..463ff80e5818b7 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.setcustomembeddablefactoryprovider.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-public.embeddablesetup.md) > [setCustomEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.embeddablesetup.setcustomembeddablefactoryprovider.md) + +## EmbeddableSetup.setCustomEmbeddableFactoryProvider property + +Signature: + +```typescript +setCustomEmbeddableFactoryProvider: (customProvider: EmbeddableFactoryProvider) => void; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md new file mode 100644 index 00000000000000..d3a62657372ac1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetupDependencies](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md) > [data](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md) + +## EmbeddableSetupDependencies.data property + +Signature: + +```typescript +data: DataPublicPluginSetup; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md new file mode 100644 index 00000000000000..fdd31ca75be2a7 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetupDependencies](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md) + +## EmbeddableSetupDependencies interface + +Signature: + +```typescript +export interface EmbeddableSetupDependencies +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md) | DataPublicPluginSetup | | +| [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md) | UiActionsSetup | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md new file mode 100644 index 00000000000000..7eff6e2b0b28be --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableSetupDependencies](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md) > [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md) + +## EmbeddableSetupDependencies.uiActions property + +Signature: + +```typescript +uiActions: UiActionsSetup; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.embeddablepanel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.embeddablepanel.md new file mode 100644 index 00000000000000..b8c10bf0e44733 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.embeddablepanel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) > [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablestart.embeddablepanel.md) + +## EmbeddableStart.EmbeddablePanel property + +Signature: + +```typescript +EmbeddablePanel: EmbeddablePanelHOC; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md new file mode 100644 index 00000000000000..cc6b1187903bf3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) > [getEmbeddableFactories](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md) + +## EmbeddableStart.getEmbeddableFactories property + +Signature: + +```typescript +getEmbeddableFactories: () => IterableIterator; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md new file mode 100644 index 00000000000000..d91878754bd7d0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) > [getEmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md) + +## EmbeddableStart.getEmbeddableFactory property + +Signature: + +```typescript +getEmbeddableFactory: = IEmbeddable>(embeddableFactoryId: string) => EmbeddableFactory | undefined; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md new file mode 100644 index 00000000000000..7ba24a62a38932 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) > [getEmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md) + +## EmbeddableStart.getEmbeddablePanel property + +Signature: + +```typescript +getEmbeddablePanel: (stateTransfer?: EmbeddableStateTransfer) => EmbeddablePanelHOC; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getstatetransfer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getstatetransfer.md new file mode 100644 index 00000000000000..dafc66b1a6e15c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.getstatetransfer.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) > [getStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestart.getstatetransfer.md) + +## EmbeddableStart.getStateTransfer property + +Signature: + +```typescript +getStateTransfer: (history?: ScopedHistory) => EmbeddableStateTransfer; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.md new file mode 100644 index 00000000000000..f8e0028d8344b2 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) + +## EmbeddableStart interface + +Signature: + +```typescript +export interface EmbeddableStart extends PersistableState +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablestart.embeddablepanel.md) | EmbeddablePanelHOC | | +| [getEmbeddableFactories](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactories.md) | () => IterableIterator<EmbeddableFactory> | | +| [getEmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablefactory.md) | <I extends EmbeddableInput = EmbeddableInput, O extends EmbeddableOutput = EmbeddableOutput, E extends IEmbeddable<I, O> = IEmbeddable<I, O>>(embeddableFactoryId: string) => EmbeddableFactory<I, O, E> | undefined | | +| [getEmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablestart.getembeddablepanel.md) | (stateTransfer?: EmbeddableStateTransfer) => EmbeddablePanelHOC | | +| [getStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestart.getstatetransfer.md) | (history?: ScopedHistory) => EmbeddableStateTransfer | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md new file mode 100644 index 00000000000000..0595609b11e498 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) > [data](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md) + +## EmbeddableStartDependencies.data property + +Signature: + +```typescript +data: DataPublicPluginStart; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md new file mode 100644 index 00000000000000..299cc945104ab2 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) > [inspector](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md) + +## EmbeddableStartDependencies.inspector property + +Signature: + +```typescript +inspector: InspectorStart; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md new file mode 100644 index 00000000000000..5a1b5d1e068610 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) + +## EmbeddableStartDependencies interface + +Signature: + +```typescript +export interface EmbeddableStartDependencies +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md) | DataPublicPluginStart | | +| [inspector](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md) | InspectorStart | | +| [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md) | UiActionsStart | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md new file mode 100644 index 00000000000000..398ee3fbcbc500 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) > [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md) + +## EmbeddableStartDependencies.uiActions property + +Signature: + +```typescript +uiActions: UiActionsStart; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer._constructor_.md new file mode 100644 index 00000000000000..323ed5e38bde1e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer._constructor_.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer._constructor_.md) + +## EmbeddableStateTransfer.(constructor) + +Constructs a new instance of the `EmbeddableStateTransfer` class + +Signature: + +```typescript +constructor(navigateToApp: ApplicationStart['navigateToApp'], scopedHistory?: ScopedHistory | undefined, appList?: ReadonlyMap | undefined); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| navigateToApp | ApplicationStart['navigateToApp'] | | +| scopedHistory | ScopedHistory<unknown> | undefined | | +| appList | ReadonlyMap<string, PublicAppInfo> | undefined | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getappnamefromid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getappnamefromid.md new file mode 100644 index 00000000000000..f15574593e853e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getappnamefromid.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [getAppNameFromId](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getappnamefromid.md) + +## EmbeddableStateTransfer.getAppNameFromId property + +Fetches an internationalized app title when given an appId. + +Signature: + +```typescript +getAppNameFromId: (appId: string) => string | undefined; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md new file mode 100644 index 00000000000000..2a0823a9bf835a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [getIncomingEditorState](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) + +## EmbeddableStateTransfer.getIncomingEditorState() method + +Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the scoped history's location state. + +Signature: + +```typescript +getIncomingEditorState(options?: { + keysToRemoveAfterFetch?: string[]; + }): EmbeddableEditorState | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | {
keysToRemoveAfterFetch?: string[];
} | | + +Returns: + +`EmbeddableEditorState | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md new file mode 100644 index 00000000000000..2069f0ce084f9f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [getIncomingEmbeddablePackage](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) + +## EmbeddableStateTransfer.getIncomingEmbeddablePackage() method + +Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the scoped history's location state. + +Signature: + +```typescript +getIncomingEmbeddablePackage(options?: { + keysToRemoveAfterFetch?: string[]; + }): EmbeddablePackageState | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | {
keysToRemoveAfterFetch?: string[];
} | | + +Returns: + +`EmbeddablePackageState | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md new file mode 100644 index 00000000000000..2b44693e14846f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md @@ -0,0 +1,35 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) + +## EmbeddableStateTransfer class + +A wrapper around the state object in which provides strongly typed helper methods for common incoming and outgoing states used by the embeddable infrastructure. + +Signature: + +```typescript +export declare class EmbeddableStateTransfer +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(navigateToApp, scopedHistory, appList)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer._constructor_.md) | | Constructs a new instance of the EmbeddableStateTransfer class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [getAppNameFromId](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getappnamefromid.md) | | (appId: string) => string | undefined | Fetches an internationalized app title when given an appId. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [getIncomingEditorState(options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingeditorstate.md) | | Fetches an [originating app](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) argument from the scoped history's location state. | +| [getIncomingEmbeddablePackage(options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.getincomingembeddablepackage.md) | | Fetches an [embeddable package](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) argument from the scoped history's location state. | +| [navigateToEditor(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md) | | A wrapper around the method which navigates to the specified appId with [embeddable editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) | +| [navigateToWithEmbeddablePackage(appId, options)](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md) | | A wrapper around the method which navigates to the specified appId with [embeddable package state](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md new file mode 100644 index 00000000000000..fa24784d9aac57 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [navigateToEditor](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetoeditor.md) + +## EmbeddableStateTransfer.navigateToEditor() method + +A wrapper around the method which navigates to the specified appId with [embeddable editor state](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) + +Signature: + +```typescript +navigateToEditor(appId: string, options?: { + path?: string; + state: EmbeddableEditorState; + appendToExistingState?: boolean; + }): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| appId | string | | +| options | {
path?: string;
state: EmbeddableEditorState;
appendToExistingState?: boolean;
} | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md new file mode 100644 index 00000000000000..7173bc8b127cdd --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) > [navigateToWithEmbeddablePackage](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.navigatetowithembeddablepackage.md) + +## EmbeddableStateTransfer.navigateToWithEmbeddablePackage() method + +A wrapper around the method which navigates to the specified appId with [embeddable package state](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) + +Signature: + +```typescript +navigateToWithEmbeddablePackage(appId: string, options?: { + path?: string; + state: EmbeddablePackageState; + appendToExistingState?: boolean; + }): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| appId | string | | +| options | {
path?: string;
state: EmbeddablePackageState;
appendToExistingState?: boolean;
} | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.id.md new file mode 100644 index 00000000000000..083b3931bcf7d7 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md) > [id](./kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.id.md) + +## EnhancementRegistryDefinition.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md new file mode 100644 index 00000000000000..c54ebe4b1712d3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md) + +## EnhancementRegistryDefinition interface + +Signature: + +```typescript +export interface EnhancementRegistryDefinition

extends PersistableStateDefinition

+``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.id.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable._constructor_.md new file mode 100644 index 00000000000000..0facb07b416924 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable._constructor_.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.errorembeddable._constructor_.md) + +## ErrorEmbeddable.(constructor) + +Constructs a new instance of the `ErrorEmbeddable` class + +Signature: + +```typescript +constructor(error: Error | string, input: EmbeddableInput, parent?: IContainer); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| error | Error | string | | +| input | EmbeddableInput | | +| parent | IContainer | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.destroy.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.destroy.md new file mode 100644 index 00000000000000..eeb605f2140ece --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.destroy.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [destroy](./kibana-plugin-plugins-embeddable-public.errorembeddable.destroy.md) + +## ErrorEmbeddable.destroy() method + +Signature: + +```typescript +destroy(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.error.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.error.md new file mode 100644 index 00000000000000..7e4def3d529230 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.error.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [error](./kibana-plugin-plugins-embeddable-public.errorembeddable.error.md) + +## ErrorEmbeddable.error property + +Signature: + +```typescript +error: Error | string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.md new file mode 100644 index 00000000000000..75f3fc6d503d54 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.md @@ -0,0 +1,33 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) + +## ErrorEmbeddable class + +Signature: + +```typescript +export declare class ErrorEmbeddable extends Embeddable +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(error, input, parent)](./kibana-plugin-plugins-embeddable-public.errorembeddable._constructor_.md) | | Constructs a new instance of the ErrorEmbeddable class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [error](./kibana-plugin-plugins-embeddable-public.errorembeddable.error.md) | | Error | string | | +| [type](./kibana-plugin-plugins-embeddable-public.errorembeddable.type.md) | | | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [destroy()](./kibana-plugin-plugins-embeddable-public.errorembeddable.destroy.md) | | | +| [reload()](./kibana-plugin-plugins-embeddable-public.errorembeddable.reload.md) | | | +| [render(dom)](./kibana-plugin-plugins-embeddable-public.errorembeddable.render.md) | | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.reload.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.reload.md new file mode 100644 index 00000000000000..14d7c9fcf7ee07 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.reload.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [reload](./kibana-plugin-plugins-embeddable-public.errorembeddable.reload.md) + +## ErrorEmbeddable.reload() method + +Signature: + +```typescript +reload(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.render.md new file mode 100644 index 00000000000000..70c9d169f3f7e8 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.render.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [render](./kibana-plugin-plugins-embeddable-public.errorembeddable.render.md) + +## ErrorEmbeddable.render() method + +Signature: + +```typescript +render(dom: HTMLElement): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| dom | HTMLElement | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.type.md new file mode 100644 index 00000000000000..d407e743a89af5 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.errorembeddable.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) > [type](./kibana-plugin-plugins-embeddable-public.errorembeddable.type.md) + +## ErrorEmbeddable.type property + +Signature: + +```typescript +readonly type = "error"; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.addnewembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.addnewembeddable.md new file mode 100644 index 00000000000000..ca0095580a0ba0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.addnewembeddable.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [addNewEmbeddable](./kibana-plugin-plugins-embeddable-public.icontainer.addnewembeddable.md) + +## IContainer.addNewEmbeddable() method + +Adds a new embeddable to the container. `explicitInput` may partially specify the required embeddable input, but the remainder must come from inherited container state. + +Signature: + +```typescript +addNewEmbeddable = Embeddable>(type: string, explicitInput: Partial): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| type | string | | +| explicitInput | Partial<EEI> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getchild.md new file mode 100644 index 00000000000000..4355cfb68ad3fa --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getchild.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [getChild](./kibana-plugin-plugins-embeddable-public.icontainer.getchild.md) + +## IContainer.getChild() method + +Returns the child embeddable with the given id. + +Signature: + +```typescript +getChild = Embeddable>(id: string): E; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`E` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getinputforchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getinputforchild.md new file mode 100644 index 00000000000000..e5afc0eac3ce0f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.getinputforchild.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [getInputForChild](./kibana-plugin-plugins-embeddable-public.icontainer.getinputforchild.md) + +## IContainer.getInputForChild() method + +Returns the input for the given child. Uses a combination of explicit input for the child stored on the parent and derived/inherited input taken from the container itself. + +Signature: + +```typescript +getInputForChild(id: string): EEI; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`EEI` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.md new file mode 100644 index 00000000000000..cba430069c7a41 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) + +## IContainer interface + +Signature: + +```typescript +export interface IContainer = ContainerInput, O extends ContainerOutput = ContainerOutput> extends IEmbeddable +``` + +## Methods + +| Method | Description | +| --- | --- | +| [addNewEmbeddable(type, explicitInput)](./kibana-plugin-plugins-embeddable-public.icontainer.addnewembeddable.md) | Adds a new embeddable to the container. explicitInput may partially specify the required embeddable input, but the remainder must come from inherited container state. | +| [getChild(id)](./kibana-plugin-plugins-embeddable-public.icontainer.getchild.md) | Returns the child embeddable with the given id. | +| [getInputForChild(id)](./kibana-plugin-plugins-embeddable-public.icontainer.getinputforchild.md) | Returns the input for the given child. Uses a combination of explicit input for the child stored on the parent and derived/inherited input taken from the container itself. | +| [removeEmbeddable(embeddableId)](./kibana-plugin-plugins-embeddable-public.icontainer.removeembeddable.md) | Removes the embeddable with the given id. | +| [untilEmbeddableLoaded(id)](./kibana-plugin-plugins-embeddable-public.icontainer.untilembeddableloaded.md) | Call if you want to wait until an embeddable with that id has finished loading. | +| [updateInputForChild(id, changes)](./kibana-plugin-plugins-embeddable-public.icontainer.updateinputforchild.md) | Changes the input for a given child. Note, this will override any inherited state taken from the container itself. | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.removeembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.removeembeddable.md new file mode 100644 index 00000000000000..94a991ca20a14e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.removeembeddable.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [removeEmbeddable](./kibana-plugin-plugins-embeddable-public.icontainer.removeembeddable.md) + +## IContainer.removeEmbeddable() method + +Removes the embeddable with the given id. + +Signature: + +```typescript +removeEmbeddable(embeddableId: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| embeddableId | string | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.untilembeddableloaded.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.untilembeddableloaded.md new file mode 100644 index 00000000000000..0d6d4a3d8ccf03 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.untilembeddableloaded.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [untilEmbeddableLoaded](./kibana-plugin-plugins-embeddable-public.icontainer.untilembeddableloaded.md) + +## IContainer.untilEmbeddableLoaded() method + +Call if you want to wait until an embeddable with that id has finished loading. + +Signature: + +```typescript +untilEmbeddableLoaded(id: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.updateinputforchild.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.updateinputforchild.md new file mode 100644 index 00000000000000..04a82b0065516c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.icontainer.updateinputforchild.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) > [updateInputForChild](./kibana-plugin-plugins-embeddable-public.icontainer.updateinputforchild.md) + +## IContainer.updateInputForChild() method + +Changes the input for a given child. Note, this will override any inherited state taken from the container itself. + +Signature: + +```typescript +updateInputForChild(id: string, changes: Partial): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | +| changes | Partial<EEI> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.destroy.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.destroy.md new file mode 100644 index 00000000000000..7fc636f40f3c21 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.destroy.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [destroy](./kibana-plugin-plugins-embeddable-public.iembeddable.destroy.md) + +## IEmbeddable.destroy() method + +Cleans up subscriptions, destroy nodes mounted from calls to render. + +Signature: + +```typescript +destroy(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.enhancements.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.enhancements.md new file mode 100644 index 00000000000000..9183cd6887872a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.enhancements.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [enhancements](./kibana-plugin-plugins-embeddable-public.iembeddable.enhancements.md) + +## IEmbeddable.enhancements property + +Extra abilities added to Embeddable by `*_enhanced` plugins. + +Signature: + +```typescript +enhancements?: object; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput.md new file mode 100644 index 00000000000000..2fd8db07fa342f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getInput](./kibana-plugin-plugins-embeddable-public.iembeddable.getinput.md) + +## IEmbeddable.getInput() method + +Get the input used to instantiate this embeddable. The input is a serialized representation of this embeddable instance and can be used to clone or re-instantiate it. Input state: + +- Can be updated externally - Can change multiple times for a single embeddable instance. + +Examples: title, pie slice colors, custom search columns and sort order. + +Signature: + +```typescript +getInput(): Readonly; +``` +Returns: + +`Readonly` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput_.md new file mode 100644 index 00000000000000..ad91ad56b3d727 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinput_.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getInput$](./kibana-plugin-plugins-embeddable-public.iembeddable.getinput_.md) + +## IEmbeddable.getInput$() method + +Returns an observable which will be notified when input state changes. + +Signature: + +```typescript +getInput$(): Readonly>; +``` +Returns: + +`Readonly>` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinspectoradapters.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinspectoradapters.md new file mode 100644 index 00000000000000..84b083acac6f41 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getinspectoradapters.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getInspectorAdapters](./kibana-plugin-plugins-embeddable-public.iembeddable.getinspectoradapters.md) + +## IEmbeddable.getInspectorAdapters() method + +An embeddable can return inspector adapters if it wants the inspector to be available via the context menu of that panel. Inspector adapters that will be used to open an inspector for. + +Signature: + +```typescript +getInspectorAdapters(): Adapters | undefined; +``` +Returns: + +`Adapters | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getiscontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getiscontainer.md new file mode 100644 index 00000000000000..f9bfbbc4ca9bd4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getiscontainer.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getIsContainer](./kibana-plugin-plugins-embeddable-public.iembeddable.getiscontainer.md) + +## IEmbeddable.getIsContainer() method + +A functional representation of the isContainer variable, but helpful for typescript to know the shape if this returns true + +Signature: + +```typescript +getIsContainer(): this is IContainer; +``` +Returns: + +`this is IContainer` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput.md new file mode 100644 index 00000000000000..7e4e4fd3d4329e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getOutput](./kibana-plugin-plugins-embeddable-public.iembeddable.getoutput.md) + +## IEmbeddable.getOutput() method + +Output state is: + +- State that should not change once the embeddable is instantiated, or - State that is derived from the input state, or - State that only the embeddable instance itself knows about, or the factory. + +Examples: editUrl, title taken from a saved object, if your input state was first name and last name, your output state could be greeting. + +Signature: + +```typescript +getOutput(): Readonly; +``` +Returns: + +`Readonly` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput_.md new file mode 100644 index 00000000000000..11ec3e0d1c8ead --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getoutput_.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getOutput$](./kibana-plugin-plugins-embeddable-public.iembeddable.getoutput_.md) + +## IEmbeddable.getOutput$() method + +Returns an observable which will be notified when output state changes. + +Signature: + +```typescript +getOutput$(): Readonly>; +``` +Returns: + +`Readonly>` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getroot.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getroot.md new file mode 100644 index 00000000000000..eacec168b4d8ab --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.getroot.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getRoot](./kibana-plugin-plugins-embeddable-public.iembeddable.getroot.md) + +## IEmbeddable.getRoot() method + +Returns the top most parent embeddable, or itself if this embeddable is not within a parent. + +Signature: + +```typescript +getRoot(): IEmbeddable | IContainer; +``` +Returns: + +`IEmbeddable | IContainer` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.gettitle.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.gettitle.md new file mode 100644 index 00000000000000..eed80882f4b932 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.gettitle.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [getTitle](./kibana-plugin-plugins-embeddable-public.iembeddable.gettitle.md) + +## IEmbeddable.getTitle() method + +Returns the title of this embeddable. + +Signature: + +```typescript +getTitle(): string | undefined; +``` +Returns: + +`string | undefined` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.id.md new file mode 100644 index 00000000000000..7d2f5b9c7e71b1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [id](./kibana-plugin-plugins-embeddable-public.iembeddable.id.md) + +## IEmbeddable.id property + +A unique identifier for this embeddable. Mainly only used by containers to map their Panel States to a child embeddable instance. + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.iscontainer.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.iscontainer.md new file mode 100644 index 00000000000000..93b910ee6f6a15 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.iscontainer.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [isContainer](./kibana-plugin-plugins-embeddable-public.iembeddable.iscontainer.md) + +## IEmbeddable.isContainer property + +Is this embeddable an instance of a Container class, can it contain nested embeddables? + +Signature: + +```typescript +readonly isContainer: boolean; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.md new file mode 100644 index 00000000000000..b3b6f961e56d1c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) + +## IEmbeddable interface + +Signature: + +```typescript +export interface IEmbeddable +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [enhancements](./kibana-plugin-plugins-embeddable-public.iembeddable.enhancements.md) | object | Extra abilities added to Embeddable by *_enhanced plugins. | +| [id](./kibana-plugin-plugins-embeddable-public.iembeddable.id.md) | string | A unique identifier for this embeddable. Mainly only used by containers to map their Panel States to a child embeddable instance. | +| [isContainer](./kibana-plugin-plugins-embeddable-public.iembeddable.iscontainer.md) | boolean | Is this embeddable an instance of a Container class, can it contain nested embeddables? | +| [parent](./kibana-plugin-plugins-embeddable-public.iembeddable.parent.md) | IContainer | If this embeddable is nested inside a container, this will contain a reference to its parent. | +| [runtimeId](./kibana-plugin-plugins-embeddable-public.iembeddable.runtimeid.md) | number | Unique ID an embeddable is assigned each time it is initialized. This ID is different for different instances of the same embeddable. For example, if the same dashboard is rendered twice on the screen, all embeddable instances will have a unique runtimeId. | +| [type](./kibana-plugin-plugins-embeddable-public.iembeddable.type.md) | string | The type of embeddable, this is what will be used to take a serialized embeddable and find the correct factory for which to create an instance of it. | + +## Methods + +| Method | Description | +| --- | --- | +| [destroy()](./kibana-plugin-plugins-embeddable-public.iembeddable.destroy.md) | Cleans up subscriptions, destroy nodes mounted from calls to render. | +| [getInput()](./kibana-plugin-plugins-embeddable-public.iembeddable.getinput.md) | Get the input used to instantiate this embeddable. The input is a serialized representation of this embeddable instance and can be used to clone or re-instantiate it. Input state:- Can be updated externally - Can change multiple times for a single embeddable instance.Examples: title, pie slice colors, custom search columns and sort order. | +| [getInput$()](./kibana-plugin-plugins-embeddable-public.iembeddable.getinput_.md) | Returns an observable which will be notified when input state changes. | +| [getInspectorAdapters()](./kibana-plugin-plugins-embeddable-public.iembeddable.getinspectoradapters.md) | An embeddable can return inspector adapters if it wants the inspector to be available via the context menu of that panel. Inspector adapters that will be used to open an inspector for. | +| [getIsContainer()](./kibana-plugin-plugins-embeddable-public.iembeddable.getiscontainer.md) | A functional representation of the isContainer variable, but helpful for typescript to know the shape if this returns true | +| [getOutput()](./kibana-plugin-plugins-embeddable-public.iembeddable.getoutput.md) | Output state is:- State that should not change once the embeddable is instantiated, or - State that is derived from the input state, or - State that only the embeddable instance itself knows about, or the factory.Examples: editUrl, title taken from a saved object, if your input state was first name and last name, your output state could be greeting. | +| [getOutput$()](./kibana-plugin-plugins-embeddable-public.iembeddable.getoutput_.md) | Returns an observable which will be notified when output state changes. | +| [getRoot()](./kibana-plugin-plugins-embeddable-public.iembeddable.getroot.md) | Returns the top most parent embeddable, or itself if this embeddable is not within a parent. | +| [getTitle()](./kibana-plugin-plugins-embeddable-public.iembeddable.gettitle.md) | Returns the title of this embeddable. | +| [reload()](./kibana-plugin-plugins-embeddable-public.iembeddable.reload.md) | Reload the embeddable so output and rendering is up to date. Especially relevant if the embeddable takes relative time as input (e.g. now to now-15) | +| [render(domNode)](./kibana-plugin-plugins-embeddable-public.iembeddable.render.md) | Renders the embeddable at the given node. | +| [supportedTriggers()](./kibana-plugin-plugins-embeddable-public.iembeddable.supportedtriggers.md) | List of triggers that this embeddable will execute. | +| [updateInput(changes)](./kibana-plugin-plugins-embeddable-public.iembeddable.updateinput.md) | Updates input state with the given changes. | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.parent.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.parent.md new file mode 100644 index 00000000000000..d20102902cdb0e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.parent.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [parent](./kibana-plugin-plugins-embeddable-public.iembeddable.parent.md) + +## IEmbeddable.parent property + +If this embeddable is nested inside a container, this will contain a reference to its parent. + +Signature: + +```typescript +readonly parent?: IContainer; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.reload.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.reload.md new file mode 100644 index 00000000000000..8caea9d8dc5111 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.reload.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [reload](./kibana-plugin-plugins-embeddable-public.iembeddable.reload.md) + +## IEmbeddable.reload() method + +Reload the embeddable so output and rendering is up to date. Especially relevant if the embeddable takes relative time as input (e.g. now to now-15) + +Signature: + +```typescript +reload(): void; +``` +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.render.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.render.md new file mode 100644 index 00000000000000..9079227b622dcc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.render.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [render](./kibana-plugin-plugins-embeddable-public.iembeddable.render.md) + +## IEmbeddable.render() method + +Renders the embeddable at the given node. + +Signature: + +```typescript +render(domNode: HTMLElement | Element): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| domNode | HTMLElement | Element | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.runtimeid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.runtimeid.md new file mode 100644 index 00000000000000..5ddd8ddd0f8dd0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.runtimeid.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [runtimeId](./kibana-plugin-plugins-embeddable-public.iembeddable.runtimeid.md) + +## IEmbeddable.runtimeId property + +Unique ID an embeddable is assigned each time it is initialized. This ID is different for different instances of the same embeddable. For example, if the same dashboard is rendered twice on the screen, all embeddable instances will have a unique `runtimeId`. + +Signature: + +```typescript +readonly runtimeId?: number; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.supportedtriggers.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.supportedtriggers.md new file mode 100644 index 00000000000000..5480f3b246648a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.supportedtriggers.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [supportedTriggers](./kibana-plugin-plugins-embeddable-public.iembeddable.supportedtriggers.md) + +## IEmbeddable.supportedTriggers() method + +List of triggers that this embeddable will execute. + +Signature: + +```typescript +supportedTriggers(): Array; +``` +Returns: + +`Array` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.type.md new file mode 100644 index 00000000000000..46b9d40685dba8 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [type](./kibana-plugin-plugins-embeddable-public.iembeddable.type.md) + +## IEmbeddable.type property + +The type of embeddable, this is what will be used to take a serialized embeddable and find the correct factory for which to create an instance of it. + +Signature: + +```typescript +readonly type: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.updateinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.updateinput.md new file mode 100644 index 00000000000000..523464103bd1a0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iembeddable.updateinput.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) > [updateInput](./kibana-plugin-plugins-embeddable-public.iembeddable.updateinput.md) + +## IEmbeddable.updateInput() method + +Updates input state with the given changes. + +Signature: + +```typescript +updateInput(changes: Partial): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| changes | Partial<I> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iserrorembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iserrorembeddable.md new file mode 100644 index 00000000000000..358d085ea9bbab --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.iserrorembeddable.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [isErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.iserrorembeddable.md) + +## isErrorEmbeddable() function + +Signature: + +```typescript +export declare function isErrorEmbeddable(embeddable: TEmbeddable | ErrorEmbeddable): embeddable is ErrorEmbeddable; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| embeddable | TEmbeddable | ErrorEmbeddable | | + +Returns: + +`embeddable is ErrorEmbeddable` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md new file mode 100644 index 00000000000000..cd28494fe3a09d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [isRangeSelectTriggerContext](./kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md) + +## isRangeSelectTriggerContext variable + +Signature: + +```typescript +isRangeSelectTriggerContext: (context: ChartActionContext) => context is RangeSelectContext> +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isreferenceorvalueembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isreferenceorvalueembeddable.md new file mode 100644 index 00000000000000..26a221d929ce6b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isreferenceorvalueembeddable.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [isReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.isreferenceorvalueembeddable.md) + +## isReferenceOrValueEmbeddable() function + +Signature: + +```typescript +export declare function isReferenceOrValueEmbeddable(incoming: unknown): incoming is ReferenceOrValueEmbeddable; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| incoming | unknown | | + +Returns: + +`incoming is ReferenceOrValueEmbeddable` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.issavedobjectembeddableinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.issavedobjectembeddableinput.md new file mode 100644 index 00000000000000..663cc41f1bffca --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.issavedobjectembeddableinput.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [isSavedObjectEmbeddableInput](./kibana-plugin-plugins-embeddable-public.issavedobjectembeddableinput.md) + +## isSavedObjectEmbeddableInput() function + +Signature: + +```typescript +export declare function isSavedObjectEmbeddableInput(input: EmbeddableInput | SavedObjectEmbeddableInput): input is SavedObjectEmbeddableInput; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| input | EmbeddableInput | SavedObjectEmbeddableInput | | + +Returns: + +`input is SavedObjectEmbeddableInput` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md new file mode 100644 index 00000000000000..4e3c970d9b4374 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [isValueClickTriggerContext](./kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md) + +## isValueClickTriggerContext variable + +Signature: + +```typescript +isValueClickTriggerContext: (context: ChartActionContext) => context is ValueClickContext> +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md new file mode 100644 index 00000000000000..64dfdd1c6dc226 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.md @@ -0,0 +1,95 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) + +## kibana-plugin-plugins-embeddable-public package + +## Classes + +| Class | Description | +| --- | --- | +| [AddPanelAction](./kibana-plugin-plugins-embeddable-public.addpanelaction.md) | | +| [Container](./kibana-plugin-plugins-embeddable-public.container.md) | | +| [EditPanelAction](./kibana-plugin-plugins-embeddable-public.editpanelaction.md) | | +| [Embeddable](./kibana-plugin-plugins-embeddable-public.embeddable.md) | | +| [EmbeddableChildPanel](./kibana-plugin-plugins-embeddable-public.embeddablechildpanel.md) | This component can be used by embeddable containers using react to easily render children. It waits for the child to be initialized, showing a loading indicator until that is complete. | +| [EmbeddableFactoryNotFoundError](./kibana-plugin-plugins-embeddable-public.embeddablefactorynotfounderror.md) | | +| [EmbeddablePanel](./kibana-plugin-plugins-embeddable-public.embeddablepanel.md) | | +| [EmbeddableRoot](./kibana-plugin-plugins-embeddable-public.embeddableroot.md) | | +| [EmbeddableStateTransfer](./kibana-plugin-plugins-embeddable-public.embeddablestatetransfer.md) | A wrapper around the state object in which provides strongly typed helper methods for common incoming and outgoing states used by the embeddable infrastructure. | +| [ErrorEmbeddable](./kibana-plugin-plugins-embeddable-public.errorembeddable.md) | | +| [PanelNotFoundError](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.md) | | + +## Enumerations + +| Enumeration | Description | +| --- | --- | +| [ViewMode](./kibana-plugin-plugins-embeddable-public.viewmode.md) | | + +## Functions + +| Function | Description | +| --- | --- | +| [isErrorEmbeddable(embeddable)](./kibana-plugin-plugins-embeddable-public.iserrorembeddable.md) | | +| [isReferenceOrValueEmbeddable(incoming)](./kibana-plugin-plugins-embeddable-public.isreferenceorvalueembeddable.md) | | +| [isSavedObjectEmbeddableInput(input)](./kibana-plugin-plugins-embeddable-public.issavedobjectembeddableinput.md) | | +| [openAddPanelFlyout(options)](./kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md) | | +| [plugin(initializerContext)](./kibana-plugin-plugins-embeddable-public.plugin.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [Adapters](./kibana-plugin-plugins-embeddable-public.adapters.md) | The interface that the adapters used to open an inspector have to fullfill. | +| [ContainerInput](./kibana-plugin-plugins-embeddable-public.containerinput.md) | | +| [ContainerOutput](./kibana-plugin-plugins-embeddable-public.containeroutput.md) | | +| [EmbeddableChildPanelProps](./kibana-plugin-plugins-embeddable-public.embeddablechildpanelprops.md) | | +| [EmbeddableContext](./kibana-plugin-plugins-embeddable-public.embeddablecontext.md) | | +| [EmbeddableEditorState](./kibana-plugin-plugins-embeddable-public.embeddableeditorstate.md) | A state package that contains information an editor will need to create or edit an embeddable then redirect back. | +| [EmbeddableFactory](./kibana-plugin-plugins-embeddable-public.embeddablefactory.md) | EmbeddableFactories create and initialize an embeddable instance | +| [EmbeddableInstanceConfiguration](./kibana-plugin-plugins-embeddable-public.embeddableinstanceconfiguration.md) | | +| [EmbeddableOutput](./kibana-plugin-plugins-embeddable-public.embeddableoutput.md) | | +| [EmbeddablePackageState](./kibana-plugin-plugins-embeddable-public.embeddablepackagestate.md) | A state package that contains all fields necessary to create or update an embeddable by reference or by value in a container. | +| [EmbeddableSetup](./kibana-plugin-plugins-embeddable-public.embeddablesetup.md) | | +| [EmbeddableSetupDependencies](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md) | | +| [EmbeddableStart](./kibana-plugin-plugins-embeddable-public.embeddablestart.md) | | +| [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) | | +| [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-public.enhancementregistrydefinition.md) | | +| [IContainer](./kibana-plugin-plugins-embeddable-public.icontainer.md) | | +| [IEmbeddable](./kibana-plugin-plugins-embeddable-public.iembeddable.md) | | +| [OutputSpec](./kibana-plugin-plugins-embeddable-public.outputspec.md) | | +| [PanelState](./kibana-plugin-plugins-embeddable-public.panelstate.md) | | +| [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) | | +| [RangeSelectContext](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.md) | | +| [ReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md) | Any embeddable that implements this interface will be able to use input that is either by reference (backed by a saved object) OR by value, (provided by the container). | +| [SavedObjectEmbeddableInput](./kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md) | | +| [ValueClickContext](./kibana-plugin-plugins-embeddable-public.valueclickcontext.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [ACTION\_ADD\_PANEL](./kibana-plugin-plugins-embeddable-public.action_add_panel.md) | | +| [ACTION\_EDIT\_PANEL](./kibana-plugin-plugins-embeddable-public.action_edit_panel.md) | | +| [CONTEXT\_MENU\_TRIGGER](./kibana-plugin-plugins-embeddable-public.context_menu_trigger.md) | | +| [contextMenuTrigger](./kibana-plugin-plugins-embeddable-public.contextmenutrigger.md) | | +| [defaultEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md) | | +| [EmbeddableRenderer](./kibana-plugin-plugins-embeddable-public.embeddablerenderer.md) | Helper react component to render an embeddable Can be used if you have an embeddable object or an embeddable factory Supports updating input by passing input prop | +| [isRangeSelectTriggerContext](./kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md) | | +| [isValueClickTriggerContext](./kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md) | | +| [PANEL\_BADGE\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md) | | +| [PANEL\_NOTIFICATION\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md) | | +| [panelBadgeTrigger](./kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md) | | +| [panelNotificationTrigger](./kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md) | | +| [withEmbeddableSubscription](./kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [ChartActionContext](./kibana-plugin-plugins-embeddable-public.chartactioncontext.md) | | +| [EmbeddableFactoryDefinition](./kibana-plugin-plugins-embeddable-public.embeddablefactorydefinition.md) | | +| [EmbeddableInput](./kibana-plugin-plugins-embeddable-public.embeddableinput.md) | | +| [EmbeddablePanelHOC](./kibana-plugin-plugins-embeddable-public.embeddablepanelhoc.md) | | +| [EmbeddableRendererProps](./kibana-plugin-plugins-embeddable-public.embeddablerendererprops.md) | This type is a publicly exposed props of [EmbeddableRenderer](./kibana-plugin-plugins-embeddable-public.embeddablerenderer.md) Union is used to validate that or factory or embeddable is passed in, but it can't be both simultaneously In case when embeddable is passed in, input is optional, because there is already an input inside of embeddable object In case when factory is used, then input is required, because it will be used as initial input to create an embeddable object | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md new file mode 100644 index 00000000000000..ce97f79b4beb97 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [openAddPanelFlyout](./kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md) + +## openAddPanelFlyout() function + +Signature: + +```typescript +export declare function openAddPanelFlyout(options: { + embeddable: IContainer; + getFactory: EmbeddableStart['getEmbeddableFactory']; + getAllFactories: EmbeddableStart['getEmbeddableFactories']; + overlays: OverlayStart; + notifications: NotificationsStart; + SavedObjectFinder: React.ComponentType; +}): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | {
embeddable: IContainer;
getFactory: EmbeddableStart['getEmbeddableFactory'];
getAllFactories: EmbeddableStart['getEmbeddableFactories'];
overlays: OverlayStart;
notifications: NotificationsStart;
SavedObjectFinder: React.ComponentType<any>;
} | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.outputspec.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.outputspec.md new file mode 100644 index 00000000000000..eead69b4e487cf --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.outputspec.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [OutputSpec](./kibana-plugin-plugins-embeddable-public.outputspec.md) + +## OutputSpec interface + +Signature: + +```typescript +export interface OutputSpec +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md new file mode 100644 index 00000000000000..d5032d98ef4aaf --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PANEL\_BADGE\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md) + +## PANEL\_BADGE\_TRIGGER variable + +Signature: + +```typescript +PANEL_BADGE_TRIGGER = "PANEL_BADGE_TRIGGER" +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md new file mode 100644 index 00000000000000..cd8a4a1ca45819 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PANEL\_NOTIFICATION\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md) + +## PANEL\_NOTIFICATION\_TRIGGER variable + +Signature: + +```typescript +PANEL_NOTIFICATION_TRIGGER = "PANEL_NOTIFICATION_TRIGGER" +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md new file mode 100644 index 00000000000000..f6113c93a1c66a --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [panelBadgeTrigger](./kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md) + +## panelBadgeTrigger variable + +Signature: + +```typescript +panelBadgeTrigger: Trigger<'PANEL_BADGE_TRIGGER'> +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror._constructor_.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror._constructor_.md new file mode 100644 index 00000000000000..d1704403b2336b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror._constructor_.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelNotFoundError](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.md) > [(constructor)](./kibana-plugin-plugins-embeddable-public.panelnotfounderror._constructor_.md) + +## PanelNotFoundError.(constructor) + +Constructs a new instance of the `PanelNotFoundError` class + +Signature: + +```typescript +constructor(); +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.code.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.code.md new file mode 100644 index 00000000000000..d169fb97480cc1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.code.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelNotFoundError](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.md) > [code](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.code.md) + +## PanelNotFoundError.code property + +Signature: + +```typescript +code: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.md new file mode 100644 index 00000000000000..2191fdecf1ac5e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotfounderror.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelNotFoundError](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.md) + +## PanelNotFoundError class + +Signature: + +```typescript +export declare class PanelNotFoundError extends Error +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)()](./kibana-plugin-plugins-embeddable-public.panelnotfounderror._constructor_.md) | | Constructs a new instance of the PanelNotFoundError class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [code](./kibana-plugin-plugins-embeddable-public.panelnotfounderror.code.md) | | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md new file mode 100644 index 00000000000000..df606c11f64ce6 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [panelNotificationTrigger](./kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md) + +## panelNotificationTrigger variable + +Signature: + +```typescript +panelNotificationTrigger: Trigger<'PANEL_NOTIFICATION_TRIGGER'> +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.explicitinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.explicitinput.md new file mode 100644 index 00000000000000..16123958d4db14 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.explicitinput.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelState](./kibana-plugin-plugins-embeddable-public.panelstate.md) > [explicitInput](./kibana-plugin-plugins-embeddable-public.panelstate.explicitinput.md) + +## PanelState.explicitInput property + +Signature: + +```typescript +explicitInput: Partial & { + id: string; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.id.md new file mode 100644 index 00000000000000..e6fd4e0264f0d0 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelState](./kibana-plugin-plugins-embeddable-public.panelstate.md) > [id](./kibana-plugin-plugins-embeddable-public.panelstate.id.md) + +## PanelState.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.md new file mode 100644 index 00000000000000..b37f652b5021cc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelState](./kibana-plugin-plugins-embeddable-public.panelstate.md) + +## PanelState interface + +Signature: + +```typescript +export interface PanelState +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [explicitInput](./kibana-plugin-plugins-embeddable-public.panelstate.explicitinput.md) | Partial<E> & {
id: string;
} | | +| [id](./kibana-plugin-plugins-embeddable-public.panelstate.id.md) | string | | +| [type](./kibana-plugin-plugins-embeddable-public.panelstate.type.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.type.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.type.md new file mode 100644 index 00000000000000..8be470a77f1c7d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.panelstate.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PanelState](./kibana-plugin-plugins-embeddable-public.panelstate.md) > [type](./kibana-plugin-plugins-embeddable-public.panelstate.type.md) + +## PanelState.type property + +Signature: + +```typescript +type: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.plugin.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.plugin.md new file mode 100644 index 00000000000000..4e3ae760153cb1 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.plugin.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [plugin](./kibana-plugin-plugins-embeddable-public.plugin.md) + +## plugin() function + +Signature: + +```typescript +export declare function plugin(initializerContext: PluginInitializerContext): EmbeddablePublicPlugin; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| initializerContext | PluginInitializerContext | | + +Returns: + +`EmbeddablePublicPlugin` + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.accesspath.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.accesspath.md new file mode 100644 index 00000000000000..2a337e4b0141aa --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.accesspath.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) > [accessPath](./kibana-plugin-plugins-embeddable-public.propertyspec.accesspath.md) + +## PropertySpec.accessPath property + +Signature: + +```typescript +accessPath: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.description.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.description.md new file mode 100644 index 00000000000000..f36309c657795f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.description.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) > [description](./kibana-plugin-plugins-embeddable-public.propertyspec.description.md) + +## PropertySpec.description property + +Signature: + +```typescript +description: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.displayname.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.displayname.md new file mode 100644 index 00000000000000..16311493fa5dd5 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.displayname.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) > [displayName](./kibana-plugin-plugins-embeddable-public.propertyspec.displayname.md) + +## PropertySpec.displayName property + +Signature: + +```typescript +displayName: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.id.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.id.md new file mode 100644 index 00000000000000..a37ed9000b67a3 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) > [id](./kibana-plugin-plugins-embeddable-public.propertyspec.id.md) + +## PropertySpec.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.md new file mode 100644 index 00000000000000..02534b5d9d4dae --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) + +## PropertySpec interface + +Signature: + +```typescript +export interface PropertySpec +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [accessPath](./kibana-plugin-plugins-embeddable-public.propertyspec.accesspath.md) | string | | +| [description](./kibana-plugin-plugins-embeddable-public.propertyspec.description.md) | string | | +| [displayName](./kibana-plugin-plugins-embeddable-public.propertyspec.displayname.md) | string | | +| [id](./kibana-plugin-plugins-embeddable-public.propertyspec.id.md) | string | | +| [value](./kibana-plugin-plugins-embeddable-public.propertyspec.value.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.value.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.value.md new file mode 100644 index 00000000000000..3360a9fff783cc --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.propertyspec.value.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [PropertySpec](./kibana-plugin-plugins-embeddable-public.propertyspec.md) > [value](./kibana-plugin-plugins-embeddable-public.propertyspec.value.md) + +## PropertySpec.value property + +Signature: + +```typescript +value?: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.data.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.data.md new file mode 100644 index 00000000000000..6d2774d86f1090 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.data.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [RangeSelectContext](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.md) > [data](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.data.md) + +## RangeSelectContext.data property + +Signature: + +```typescript +data: { + table: KibanaDatatable; + column: number; + range: number[]; + timeFieldName?: string; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.embeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.embeddable.md new file mode 100644 index 00000000000000..a6c9f0f7e4253f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.embeddable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [RangeSelectContext](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.md) > [embeddable](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.embeddable.md) + +## RangeSelectContext.embeddable property + +Signature: + +```typescript +embeddable?: T; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.md new file mode 100644 index 00000000000000..0f92ed86301da4 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.rangeselectcontext.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [RangeSelectContext](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.md) + +## RangeSelectContext interface + +Signature: + +```typescript +export interface RangeSelectContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.data.md) | {
table: KibanaDatatable;
column: number;
range: number[];
timeFieldName?: string;
} | | +| [embeddable](./kibana-plugin-plugins-embeddable-public.rangeselectcontext.embeddable.md) | T | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasreftype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasreftype.md new file mode 100644 index 00000000000000..559787c75ab660 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasreftype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md) > [getInputAsRefType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasreftype.md) + +## ReferenceOrValueEmbeddable.getInputAsRefType property + +Gets the embeddable's current input as its Reference type + +Signature: + +```typescript +getInputAsRefType: () => Promise; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasvaluetype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasvaluetype.md new file mode 100644 index 00000000000000..f9cd23b97858ac --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasvaluetype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md) > [getInputAsValueType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasvaluetype.md) + +## ReferenceOrValueEmbeddable.getInputAsValueType property + +Gets the embeddable's current input as its Value type + +Signature: + +```typescript +getInputAsValueType: () => Promise; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.inputisreftype.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.inputisreftype.md new file mode 100644 index 00000000000000..9de0447769397e --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.inputisreftype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md) > [inputIsRefType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.inputisreftype.md) + +## ReferenceOrValueEmbeddable.inputIsRefType property + +determines whether the input is by value or by reference. + +Signature: + +```typescript +inputIsRefType: (input: ValTypeInput | RefTypeInput) => input is RefTypeInput; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md new file mode 100644 index 00000000000000..47d6d8a0772d86 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ReferenceOrValueEmbeddable](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.md) + +## ReferenceOrValueEmbeddable interface + +Any embeddable that implements this interface will be able to use input that is either by reference (backed by a saved object) OR by value, (provided by the container). + +Signature: + +```typescript +export interface ReferenceOrValueEmbeddable +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [getInputAsRefType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasreftype.md) | () => Promise<RefTypeInput> | Gets the embeddable's current input as its Reference type | +| [getInputAsValueType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.getinputasvaluetype.md) | () => Promise<ValTypeInput> | Gets the embeddable's current input as its Value type | +| [inputIsRefType](./kibana-plugin-plugins-embeddable-public.referenceorvalueembeddable.inputisreftype.md) | (input: ValTypeInput | RefTypeInput) => input is RefTypeInput | determines whether the input is by value or by reference. | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md new file mode 100644 index 00000000000000..ae0df9ec01ba1f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [SavedObjectEmbeddableInput](./kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md) + +## SavedObjectEmbeddableInput interface + +Signature: + +```typescript +export interface SavedObjectEmbeddableInput extends EmbeddableInput +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [savedObjectId](./kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.savedobjectid.md) | string | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.savedobjectid.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.savedobjectid.md new file mode 100644 index 00000000000000..d8cb3bbda9d01f --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.savedobjectid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [SavedObjectEmbeddableInput](./kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.md) > [savedObjectId](./kibana-plugin-plugins-embeddable-public.savedobjectembeddableinput.savedobjectid.md) + +## SavedObjectEmbeddableInput.savedObjectId property + +Signature: + +```typescript +savedObjectId: string; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.data.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.data.md new file mode 100644 index 00000000000000..92c33affc47a95 --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.data.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ValueClickContext](./kibana-plugin-plugins-embeddable-public.valueclickcontext.md) > [data](./kibana-plugin-plugins-embeddable-public.valueclickcontext.data.md) + +## ValueClickContext.data property + +Signature: + +```typescript +data: { + data: Array<{ + table: Pick; + column: number; + row: number; + value: any; + }>; + timeFieldName?: string; + negate?: boolean; + }; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.embeddable.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.embeddable.md new file mode 100644 index 00000000000000..38adee9346945b --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.embeddable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ValueClickContext](./kibana-plugin-plugins-embeddable-public.valueclickcontext.md) > [embeddable](./kibana-plugin-plugins-embeddable-public.valueclickcontext.embeddable.md) + +## ValueClickContext.embeddable property + +Signature: + +```typescript +embeddable?: T; +``` diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.md new file mode 100644 index 00000000000000..13133095956c6c --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.valueclickcontext.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ValueClickContext](./kibana-plugin-plugins-embeddable-public.valueclickcontext.md) + +## ValueClickContext interface + +Signature: + +```typescript +export interface ValueClickContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data](./kibana-plugin-plugins-embeddable-public.valueclickcontext.data.md) | {
data: Array<{
table: Pick<KibanaDatatable, 'rows' | 'columns'>;
column: number;
row: number;
value: any;
}>;
timeFieldName?: string;
negate?: boolean;
} | | +| [embeddable](./kibana-plugin-plugins-embeddable-public.valueclickcontext.embeddable.md) | T | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.viewmode.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.viewmode.md new file mode 100644 index 00000000000000..f47169951018df --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.viewmode.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [ViewMode](./kibana-plugin-plugins-embeddable-public.viewmode.md) + +## ViewMode enum + +Signature: + +```typescript +export declare enum ViewMode +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| EDIT | "edit" | | +| VIEW | "view" | | + diff --git a/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md new file mode 100644 index 00000000000000..a815292f3a0c3d --- /dev/null +++ b/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) > [withEmbeddableSubscription](./kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md) + +## withEmbeddableSubscription variable + +Signature: + +```typescript +withEmbeddableSubscription: = IEmbeddable, ExtraProps = {}>(WrappedComponent: React.ComponentType<{ + input: I; + output: O; + embeddable: E; +} & ExtraProps>) => React.ComponentType<{ + embeddable: E; +} & ExtraProps> +``` diff --git a/docs/development/plugins/embeddable/server/index.md b/docs/development/plugins/embeddable/server/index.md new file mode 100644 index 00000000000000..3c4d4ce3aed368 --- /dev/null +++ b/docs/development/plugins/embeddable/server/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) | | + diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.id.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.id.md new file mode 100644 index 00000000000000..ce3e532fcaa3bf --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableRegistryDefinition](./kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md) > [id](./kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.id.md) + +## EmbeddableRegistryDefinition.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md new file mode 100644 index 00000000000000..de46d91d90c651 --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableRegistryDefinition](./kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md) + +## EmbeddableRegistryDefinition interface + +Signature: + +```typescript +export interface EmbeddableRegistryDefinition

extends PersistableStateDefinition

+``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.id.md) | string | | + diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md new file mode 100644 index 00000000000000..59ca4a2bbca75b --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-server.embeddablesetup.md) + +## EmbeddableSetup interface + +Signature: + +```typescript +export interface EmbeddableSetup +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [registerEmbeddableFactory](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md) | (factory: EmbeddableRegistryDefinition) => void | | +| [registerEnhancement](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md) | (enhancement: EnhancementRegistryDefinition) => void | | + diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md new file mode 100644 index 00000000000000..442941ce869501 --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-server.embeddablesetup.md) > [registerEmbeddableFactory](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerembeddablefactory.md) + +## EmbeddableSetup.registerEmbeddableFactory property + +Signature: + +```typescript +registerEmbeddableFactory: (factory: EmbeddableRegistryDefinition) => void; +``` diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md new file mode 100644 index 00000000000000..9ea2846d0300b1 --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EmbeddableSetup](./kibana-plugin-plugins-embeddable-server.embeddablesetup.md) > [registerEnhancement](./kibana-plugin-plugins-embeddable-server.embeddablesetup.registerenhancement.md) + +## EmbeddableSetup.registerEnhancement property + +Signature: + +```typescript +registerEnhancement: (enhancement: EnhancementRegistryDefinition) => void; +``` diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.id.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.id.md new file mode 100644 index 00000000000000..a93c6912468722 --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md) > [id](./kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.id.md) + +## EnhancementRegistryDefinition.id property + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md new file mode 100644 index 00000000000000..09ff48a92158db --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md) + +## EnhancementRegistryDefinition interface + +Signature: + +```typescript +export interface EnhancementRegistryDefinition

extends PersistableStateDefinition

+ +
- -
- ], + items: [ + + + , + ], }), borders: 'none', }, { items: [ + + + , - - diff --git a/src/core/public/http/base_path.ts b/src/core/public/http/base_path.ts index 5d9eb51023b78f..78e9cf75ff8060 100644 --- a/src/core/public/http/base_path.ts +++ b/src/core/public/http/base_path.ts @@ -16,24 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ import { modifyUrl } from '@kbn/std'; diff --git a/src/core/public/i18n/i18n_eui_mapping.tsx b/src/core/public/i18n/i18n_eui_mapping.tsx index 4c7cdd18d03f62..3bb8fa39d4ff86 100644 --- a/src/core/public/i18n/i18n_eui_mapping.tsx +++ b/src/core/public/i18n/i18n_eui_mapping.tsx @@ -25,550 +25,564 @@ interface EuiValues { [key: string]: any; } -export const euiContextMapping = { - 'euiBasicTable.selectAllRows': i18n.translate('core.euiBasicTable.selectAllRows', { - defaultMessage: 'Select all rows', - description: 'ARIA and displayed label on a checkbox to select all table rows', - }), - 'euiBasicTable.selectThisRow': i18n.translate('core.euiBasicTable.selectThisRow', { - defaultMessage: 'Select this row', - description: 'ARIA and displayed label on a checkbox to select a single table row', - }), - 'euiBasicTable.tableDescription': ({ itemCount }: EuiValues) => - i18n.translate('core.euiBasicTable.tableDescription', { - defaultMessage: 'Below is a table of {itemCount} items.', - values: { itemCount }, - description: 'Screen reader text to describe the size of a table', - }), - 'euiBottomBar.screenReaderAnnouncement': i18n.translate( - 'core.euiBottomBar.screenReaderAnnouncement', - { - defaultMessage: - 'There is a new menu opening with page level controls at the end of the document.', - description: - 'Screen reader announcement that functionality is available in the page document', - } - ), - 'euiBreadcrumbs.collapsedBadge.ariaLabel': i18n.translate( - 'core.euiBreadcrumbs.collapsedBadge.ariaLabel', - { - defaultMessage: 'Show all breadcrumbs', - description: 'Displayed when one or more breadcrumbs are hidden.', - } - ), - 'euiCardSelect.select': i18n.translate('core.euiCardSelect.select', { - defaultMessage: 'Select', - description: 'Displayed button text when a card option can be selected.', - }), - 'euiCardSelect.selected': i18n.translate('core.euiCardSelect.selected', { - defaultMessage: 'Selected', - description: 'Displayed button text when a card option is selected.', - }), - 'euiCardSelect.unavailable': i18n.translate('core.euiCardSelect.unavailable', { - defaultMessage: 'Unavailable', - description: 'Displayed button text when a card option is unavailable.', - }), - 'euiCodeBlock.copyButton': i18n.translate('core.euiCodeBlock.copyButton', { - defaultMessage: 'Copy', - description: 'ARIA label for a button that copies source code text to the clipboard', - }), - 'euiCodeEditor.startEditing': i18n.translate('core.euiCodeEditor.startEditing', { - defaultMessage: 'Press Enter to start editing.', - }), - 'euiCodeEditor.startInteracting': i18n.translate('core.euiCodeEditor.startInteracting', { - defaultMessage: 'Press Enter to start interacting with the code.', - }), - 'euiCodeEditor.stopEditing': i18n.translate('core.euiCodeEditor.stopEditing', { - defaultMessage: "When you're done, press Escape to stop editing.", - }), - 'euiCodeEditor.stopInteracting': i18n.translate('core.euiCodeEditor.stopInteracting', { - defaultMessage: "When you're done, press Escape to stop interacting with the code.", - }), - 'euiCollapsedItemActions.allActions': i18n.translate('core.euiCollapsedItemActions.allActions', { - defaultMessage: 'All actions', - description: 'ARIA label and tooltip content describing a button that expands an actions menu', - }), - 'euiColorPicker.screenReaderAnnouncement': i18n.translate( - 'core.euiColorPicker.screenReaderAnnouncement', - { - defaultMessage: - 'A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.', - description: - 'Message when the color picker popover is opened. Describes the interaction with the elements in the popover.', - } - ), - 'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => - i18n.translate('core.euiColorPicker.swatchAriaLabel', { - defaultMessage: 'Select {swatch} as the color', - values: { swatch }, - description: - 'Screen reader text to describe the action and hex value of the selectable option', - }), - 'euiColorStopThumb.removeLabel': i18n.translate('core.euiColorStopThumb.removeLabel', { - defaultMessage: 'Remove this stop', - description: 'Label accompanying a button whose action will remove the color stop', - }), - 'euiColorStopThumb.screenReaderAnnouncement': i18n.translate( - 'core.euiColorStopThumb.screenReaderAnnouncement', - { - defaultMessage: - 'A popup with a color stop edit form opened. Tab forward to cycle through form controls or press escape to close this popup.', - description: - 'Message when the color picker popover has opened for an individual color stop thumb.', - } - ), - 'euiColorStops.screenReaderAnnouncement': ({ label, readOnly, disabled }: EuiValues) => - i18n.translate('core.euiColorStops.screenReaderAnnouncement', { - defaultMessage: - '{label}: {readOnly} {disabled} Color stop picker. Each stop consists of a number and corresponding color value. Use the Down and Up arrow keys to select individual stops. Press the Enter key to create a new stop.', - values: { label, readOnly, disabled }, - description: - 'Screen reader text to describe the composite behavior of the color stops component.', - }), - 'euiColumnSelector.hideAll': i18n.translate('core.euiColumnSelector.hideAll', { - defaultMessage: 'Hide all', - }), - 'euiColumnSelector.selectAll': i18n.translate('core.euiColumnSelector.selectAll', { - defaultMessage: 'Show all', - }), - 'euiColumnSorting.clearAll': i18n.translate('core.euiColumnSorting.clearAll', { - defaultMessage: 'Clear sorting', - }), - 'euiColumnSorting.emptySorting': i18n.translate('core.euiColumnSorting.emptySorting', { - defaultMessage: 'Currently no fields are sorted', - }), - 'euiColumnSorting.pickFields': i18n.translate('core.euiColumnSorting.pickFields', { - defaultMessage: 'Pick fields to sort by', - }), - 'euiColumnSorting.sortFieldAriaLabel': i18n.translate( - 'core.euiColumnSorting.sortFieldAriaLabel', - { - defaultMessage: 'Sort by:', - } - ), - 'euiColumnSortingDraggable.activeSortLabel': i18n.translate( - 'core.euiColumnSortingDraggable.activeSortLabel', - { - defaultMessage: 'is sorting this data grid', - } - ), - 'euiColumnSortingDraggable.defaultSortAsc': i18n.translate( - 'core.euiColumnSortingDraggable.defaultSortAsc', - { - defaultMessage: 'A-Z', - description: 'Ascending sort label', - } - ), - 'euiColumnSortingDraggable.defaultSortDesc': i18n.translate( - 'core.euiColumnSortingDraggable.defaultSortDesc', - { - defaultMessage: 'Z-A', - description: 'Descending sort label', - } - ), - 'euiColumnSortingDraggable.removeSortLabel': i18n.translate( - 'core.euiColumnSortingDraggable.removeSortLabel', - { - defaultMessage: 'Remove from data grid sort:', - } - ), - 'euiColumnSortingDraggable.toggleLegend': i18n.translate( - 'core.euiColumnSortingDraggable.toggleLegend', - { - defaultMessage: 'Select sorting method for field:', - } - ), - 'euiComboBoxOptionsList.allOptionsSelected': i18n.translate( - 'core.euiComboBoxOptionsList.allOptionsSelected', - { - defaultMessage: "You've selected all available options", - } - ), - 'euiComboBoxOptionsList.alreadyAdded': ({ label }: EuiValues) => ( - - ), - 'euiComboBoxOptionsList.createCustomOption': ({ key, searchValue }: EuiValues) => ( - - ), - 'euiComboBoxOptionsList.loadingOptions': i18n.translate( - 'core.euiComboBoxOptionsList.loadingOptions', - { +export const getEuiContextMapping = () => { + const euiContextMapping = { + 'euiBasicTable.selectAllRows': i18n.translate('core.euiBasicTable.selectAllRows', { + defaultMessage: 'Select all rows', + description: 'ARIA and displayed label on a checkbox to select all table rows', + }), + 'euiBasicTable.selectThisRow': i18n.translate('core.euiBasicTable.selectThisRow', { + defaultMessage: 'Select this row', + description: 'ARIA and displayed label on a checkbox to select a single table row', + }), + 'euiBasicTable.tableDescription': ({ itemCount }: EuiValues) => + i18n.translate('core.euiBasicTable.tableDescription', { + defaultMessage: 'Below is a table of {itemCount} items.', + values: { itemCount }, + description: 'Screen reader text to describe the size of a table', + }), + 'euiBottomBar.screenReaderAnnouncement': i18n.translate( + 'core.euiBottomBar.screenReaderAnnouncement', + { + defaultMessage: + 'There is a new menu opening with page level controls at the end of the document.', + description: + 'Screen reader announcement that functionality is available in the page document', + } + ), + 'euiBreadcrumbs.collapsedBadge.ariaLabel': i18n.translate( + 'core.euiBreadcrumbs.collapsedBadge.ariaLabel', + { + defaultMessage: 'Show all breadcrumbs', + description: 'Displayed when one or more breadcrumbs are hidden.', + } + ), + 'euiCardSelect.select': i18n.translate('core.euiCardSelect.select', { + defaultMessage: 'Select', + description: 'Displayed button text when a card option can be selected.', + }), + 'euiCardSelect.selected': i18n.translate('core.euiCardSelect.selected', { + defaultMessage: 'Selected', + description: 'Displayed button text when a card option is selected.', + }), + 'euiCardSelect.unavailable': i18n.translate('core.euiCardSelect.unavailable', { + defaultMessage: 'Unavailable', + description: 'Displayed button text when a card option is unavailable.', + }), + 'euiCodeBlock.copyButton': i18n.translate('core.euiCodeBlock.copyButton', { + defaultMessage: 'Copy', + description: 'ARIA label for a button that copies source code text to the clipboard', + }), + 'euiCodeEditor.startEditing': i18n.translate('core.euiCodeEditor.startEditing', { + defaultMessage: 'Press Enter to start editing.', + }), + 'euiCodeEditor.startInteracting': i18n.translate('core.euiCodeEditor.startInteracting', { + defaultMessage: 'Press Enter to start interacting with the code.', + }), + 'euiCodeEditor.stopEditing': i18n.translate('core.euiCodeEditor.stopEditing', { + defaultMessage: "When you're done, press Escape to stop editing.", + }), + 'euiCodeEditor.stopInteracting': i18n.translate('core.euiCodeEditor.stopInteracting', { + defaultMessage: "When you're done, press Escape to stop interacting with the code.", + }), + 'euiCollapsedItemActions.allActions': i18n.translate( + 'core.euiCollapsedItemActions.allActions', + { + defaultMessage: 'All actions', + description: + 'ARIA label and tooltip content describing a button that expands an actions menu', + } + ), + 'euiColorPicker.screenReaderAnnouncement': i18n.translate( + 'core.euiColorPicker.screenReaderAnnouncement', + { + defaultMessage: + 'A popup with a range of selectable colors opened. Tab forward to cycle through colors choices or press escape to close this popup.', + description: + 'Message when the color picker popover is opened. Describes the interaction with the elements in the popover.', + } + ), + 'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => + i18n.translate('core.euiColorPicker.swatchAriaLabel', { + defaultMessage: 'Select {swatch} as the color', + values: { swatch }, + description: + 'Screen reader text to describe the action and hex value of the selectable option', + }), + 'euiColorStopThumb.removeLabel': i18n.translate('core.euiColorStopThumb.removeLabel', { + defaultMessage: 'Remove this stop', + description: 'Label accompanying a button whose action will remove the color stop', + }), + 'euiColorStopThumb.screenReaderAnnouncement': i18n.translate( + 'core.euiColorStopThumb.screenReaderAnnouncement', + { + defaultMessage: + 'A popup with a color stop edit form opened. Tab forward to cycle through form controls or press escape to close this popup.', + description: + 'Message when the color picker popover has opened for an individual color stop thumb.', + } + ), + 'euiColorStops.screenReaderAnnouncement': ({ label, readOnly, disabled }: EuiValues) => + i18n.translate('core.euiColorStops.screenReaderAnnouncement', { + defaultMessage: + '{label}: {readOnly} {disabled} Color stop picker. Each stop consists of a number and corresponding color value. Use the Down and Up arrow keys to select individual stops. Press the Enter key to create a new stop.', + values: { label, readOnly, disabled }, + description: + 'Screen reader text to describe the composite behavior of the color stops component.', + }), + 'euiColumnSelector.hideAll': i18n.translate('core.euiColumnSelector.hideAll', { + defaultMessage: 'Hide all', + }), + 'euiColumnSelector.selectAll': i18n.translate('core.euiColumnSelector.selectAll', { + defaultMessage: 'Show all', + }), + 'euiColumnSorting.clearAll': i18n.translate('core.euiColumnSorting.clearAll', { + defaultMessage: 'Clear sorting', + }), + 'euiColumnSorting.emptySorting': i18n.translate('core.euiColumnSorting.emptySorting', { + defaultMessage: 'Currently no fields are sorted', + }), + 'euiColumnSorting.pickFields': i18n.translate('core.euiColumnSorting.pickFields', { + defaultMessage: 'Pick fields to sort by', + }), + 'euiColumnSorting.sortFieldAriaLabel': i18n.translate( + 'core.euiColumnSorting.sortFieldAriaLabel', + { + defaultMessage: 'Sort by:', + } + ), + 'euiColumnSortingDraggable.activeSortLabel': i18n.translate( + 'core.euiColumnSortingDraggable.activeSortLabel', + { + defaultMessage: 'is sorting this data grid', + } + ), + 'euiColumnSortingDraggable.defaultSortAsc': i18n.translate( + 'core.euiColumnSortingDraggable.defaultSortAsc', + { + defaultMessage: 'A-Z', + description: 'Ascending sort label', + } + ), + 'euiColumnSortingDraggable.defaultSortDesc': i18n.translate( + 'core.euiColumnSortingDraggable.defaultSortDesc', + { + defaultMessage: 'Z-A', + description: 'Descending sort label', + } + ), + 'euiColumnSortingDraggable.removeSortLabel': i18n.translate( + 'core.euiColumnSortingDraggable.removeSortLabel', + { + defaultMessage: 'Remove from data grid sort:', + } + ), + 'euiColumnSortingDraggable.toggleLegend': i18n.translate( + 'core.euiColumnSortingDraggable.toggleLegend', + { + defaultMessage: 'Select sorting method for field:', + } + ), + 'euiComboBoxOptionsList.allOptionsSelected': i18n.translate( + 'core.euiComboBoxOptionsList.allOptionsSelected', + { + defaultMessage: "You've selected all available options", + } + ), + 'euiComboBoxOptionsList.alreadyAdded': ({ label }: EuiValues) => ( + + ), + 'euiComboBoxOptionsList.createCustomOption': ({ key, searchValue }: EuiValues) => ( + + ), + 'euiComboBoxOptionsList.loadingOptions': i18n.translate( + 'core.euiComboBoxOptionsList.loadingOptions', + { + defaultMessage: 'Loading options', + description: 'Placeholder message while data is asynchronously loaded', + } + ), + 'euiComboBoxOptionsList.noAvailableOptions': i18n.translate( + 'core.euiComboBoxOptionsList.noAvailableOptions', + { + defaultMessage: "There aren't any options available", + } + ), + 'euiComboBoxOptionsList.noMatchingOptions': ({ searchValue }: EuiValues) => ( + + ), + 'euiComboBoxPill.removeSelection': ({ children }: EuiValues) => + i18n.translate('core.euiComboBoxPill.removeSelection', { + defaultMessage: 'Remove {children} from selection in this group', + values: { children }, + description: 'ARIA label, `children` is the human-friendly value of an option', + }), + 'euiCommonlyUsedTimeRanges.legend': i18n.translate('core.euiCommonlyUsedTimeRanges.legend', { + defaultMessage: 'Commonly used', + }), + 'euiDataGrid.screenReaderNotice': i18n.translate('core.euiDataGrid.screenReaderNotice', { + defaultMessage: 'Cell contains interactive content.', + }), + 'euiDataGridCell.expandButtonTitle': i18n.translate('core.euiDataGridCell.expandButtonTitle', { + defaultMessage: 'Click or hit enter to interact with cell content', + }), + 'euiDataGridSchema.booleanSortTextAsc': i18n.translate( + 'core.euiDataGridSchema.booleanSortTextAsc', + { + defaultMessage: 'True-False', + description: 'Ascending boolean label', + } + ), + 'euiDataGridSchema.booleanSortTextDesc': i18n.translate( + 'core.euiDataGridSchema.booleanSortTextDesc', + { + defaultMessage: 'False-True', + description: 'Descending boolean label', + } + ), + 'euiDataGridSchema.currencySortTextAsc': i18n.translate( + 'core.euiDataGridSchema.currencySortTextAsc', + { + defaultMessage: 'Low-High', + description: 'Ascending currency label', + } + ), + 'euiDataGridSchema.currencySortTextDesc': i18n.translate( + 'core.euiDataGridSchema.currencySortTextDesc', + { + defaultMessage: 'High-Low', + description: 'Descending currency label', + } + ), + 'euiDataGridSchema.dateSortTextAsc': i18n.translate('core.euiDataGridSchema.dateSortTextAsc', { + defaultMessage: 'New-Old', + description: 'Ascending date label', + }), + 'euiDataGridSchema.dateSortTextDesc': i18n.translate( + 'core.euiDataGridSchema.dateSortTextDesc', + { + defaultMessage: 'Old-New', + description: 'Descending date label', + } + ), + 'euiDataGridSchema.numberSortTextAsc': i18n.translate( + 'core.euiDataGridSchema.numberSortTextAsc', + { + defaultMessage: 'Low-High', + description: 'Ascending number label', + } + ), + 'euiDataGridSchema.numberSortTextDesc': i18n.translate( + 'core.euiDataGridSchema.numberSortTextDesc', + { + defaultMessage: 'High-Low', + description: 'Descending number label', + } + ), + 'euiDataGridSchema.jsonSortTextAsc': i18n.translate('core.euiDataGridSchema.jsonSortTextAsc', { + defaultMessage: 'Small-Large', + description: 'Ascending size label', + }), + 'euiDataGridSchema.jsonSortTextDesc': i18n.translate( + 'core.euiDataGridSchema.jsonSortTextDesc', + { + defaultMessage: 'Large-Small', + description: 'Descending size label', + } + ), + 'euiFilterButton.filterBadge': ({ count, hasActiveFilters }: EuiValues) => + i18n.translate('core.euiFilterButton.filterBadge', { + defaultMessage: '${count} ${filterCountLabel} filters', + values: { count, filterCountLabel: hasActiveFilters ? 'active' : 'available' }, + }), + 'euiForm.addressFormErrors': i18n.translate('core.euiForm.addressFormErrors', { + defaultMessage: 'Please address the errors in your form.', + }), + 'euiFormControlLayoutClearButton.label': i18n.translate( + 'core.euiFormControlLayoutClearButton.label', + { + defaultMessage: 'Clear input', + description: 'ARIA label on a button that removes any entry in a form field', + } + ), + 'euiHeaderAlert.dismiss': i18n.translate('core.euiHeaderAlert.dismiss', { + defaultMessage: 'Dismiss', + description: 'ARIA label on a button that dismisses/removes a notification', + }), + 'euiHeaderLinks.appNavigation': i18n.translate('core.euiHeaderLinks.appNavigation', { + defaultMessage: 'App navigation', + description: 'ARIA label on a `nav` element', + }), + 'euiHeaderLinks.openNavigationMenu': i18n.translate('core.euiHeaderLinks.openNavigationMenu', { + defaultMessage: 'Open navigation menu', + }), + 'euiHue.label': i18n.translate('core.euiHue.label', { + defaultMessage: 'Select the HSV color mode "hue" value', + }), + 'euiImage.closeImage': ({ alt }: EuiValues) => + i18n.translate('core.euiImage.closeImage', { + defaultMessage: 'Close full screen {alt} image', + values: { alt }, + }), + 'euiImage.openImage': ({ alt }: EuiValues) => + i18n.translate('core.euiImage.openImage', { + defaultMessage: 'Open full screen {alt} image', + values: { alt }, + }), + 'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', { + defaultMessage: 'External link', + }), + 'euiModal.closeModal': i18n.translate('core.euiModal.closeModal', { + defaultMessage: 'Closes this modal window', + }), + 'euiPagination.jumpToLastPage': ({ pageCount }: EuiValues) => + i18n.translate('core.euiPagination.jumpToLastPage', { + defaultMessage: 'Jump to the last page, number {pageCount}', + values: { pageCount }, + }), + 'euiPagination.nextPage': i18n.translate('core.euiPagination.nextPage', { + defaultMessage: 'Next page', + }), + 'euiPagination.pageOfTotal': ({ page, total }: EuiValues) => + i18n.translate('core.euiPagination.pageOfTotal', { + defaultMessage: 'Page {page} of {total}', + values: { page, total }, + }), + 'euiPagination.previousPage': i18n.translate('core.euiPagination.previousPage', { + defaultMessage: 'Previous page', + }), + 'euiPopover.screenReaderAnnouncement': i18n.translate( + 'core.euiPopover.screenReaderAnnouncement', + { + defaultMessage: 'You are in a dialog. To close this dialog, hit escape.', + } + ), + 'euiQuickSelect.applyButton': i18n.translate('core.euiQuickSelect.applyButton', { + defaultMessage: 'Apply', + }), + 'euiQuickSelect.fullDescription': ({ timeTense, timeValue, timeUnit }: EuiValues) => + i18n.translate('core.euiQuickSelect.fullDescription', { + defaultMessage: 'Currently set to {timeTense} {timeValue} {timeUnit}.', + values: { timeTense, timeValue, timeUnit }, + }), + 'euiQuickSelect.legendText': i18n.translate('core.euiQuickSelect.legendText', { + defaultMessage: 'Quick select a time range', + }), + 'euiQuickSelect.nextLabel': i18n.translate('core.euiQuickSelect.nextLabel', { + defaultMessage: 'Next time window', + }), + 'euiQuickSelect.previousLabel': i18n.translate('core.euiQuickSelect.previousLabel', { + defaultMessage: 'Previous time window', + }), + 'euiQuickSelect.quickSelectTitle': i18n.translate('core.euiQuickSelect.quickSelectTitle', { + defaultMessage: 'Quick select', + }), + 'euiQuickSelect.tenseLabel': i18n.translate('core.euiQuickSelect.tenseLabel', { + defaultMessage: 'Time tense', + }), + 'euiQuickSelect.unitLabel': i18n.translate('core.euiQuickSelect.unitLabel', { + defaultMessage: 'Time unit', + }), + 'euiQuickSelect.valueLabel': i18n.translate('core.euiQuickSelect.valueLabel', { + defaultMessage: 'Time value', + }), + 'euiRefreshInterval.fullDescription': ({ optionValue, optionText }: EuiValues) => + i18n.translate('core.euiRefreshInterval.fullDescription', { + defaultMessage: 'Currently set to {optionValue} {optionText}.', + values: { optionValue, optionText }, + }), + 'euiRefreshInterval.legend': i18n.translate('core.euiRefreshInterval.legend', { + defaultMessage: 'Refresh every', + }), + 'euiRefreshInterval.start': i18n.translate('core.euiRefreshInterval.start', { + defaultMessage: 'Start', + }), + 'euiRefreshInterval.stop': i18n.translate('core.euiRefreshInterval.stop', { + defaultMessage: 'Stop', + }), + 'euiRelativeTab.fullDescription': ({ unit }: EuiValues) => + i18n.translate('core.euiRelativeTab.fullDescription', { + defaultMessage: 'The unit is changeable. Currently set to {unit}.', + values: { unit }, + }), + 'euiRelativeTab.relativeDate': ({ position }: EuiValues) => + i18n.translate('core.euiRelativeTab.relativeDate', { + defaultMessage: '{position} date', + values: { position }, + }), + 'euiRelativeTab.roundingLabel': ({ unit }: EuiValues) => + i18n.translate('core.euiRelativeTab.roundingLabel', { + defaultMessage: 'Round to the {unit}', + values: { unit }, + }), + 'euiRelativeTab.unitInputLabel': i18n.translate('core.euiRelativeTab.unitInputLabel', { + defaultMessage: 'Relative time span', + }), + 'euiSaturation.roleDescription': i18n.translate('core.euiSaturation.roleDescription', { + defaultMessage: 'HSV color mode saturation and value selection', + }), + 'euiSaturation.screenReaderAnnouncement': i18n.translate( + 'core.euiSaturation.screenReaderAnnouncement', + { + defaultMessage: + 'Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode "saturation" and "value" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the "saturation" value. Up and down decrease and increase (respectively) the "value" value.', + } + ), + 'euiSelectable.loadingOptions': i18n.translate('core.euiSelectable.loadingOptions', { defaultMessage: 'Loading options', description: 'Placeholder message while data is asynchronously loaded', - } - ), - 'euiComboBoxOptionsList.noAvailableOptions': i18n.translate( - 'core.euiComboBoxOptionsList.noAvailableOptions', - { + }), + 'euiSelectable.noAvailableOptions': i18n.translate('core.euiSelectable.noAvailableOptions', { defaultMessage: "There aren't any options available", - } - ), - 'euiComboBoxOptionsList.noMatchingOptions': ({ searchValue }: EuiValues) => ( - - ), - 'euiComboBoxPill.removeSelection': ({ children }: EuiValues) => - i18n.translate('core.euiComboBoxPill.removeSelection', { - defaultMessage: 'Remove {children} from selection in this group', - values: { children }, - description: 'ARIA label, `children` is the human-friendly value of an option', - }), - 'euiCommonlyUsedTimeRanges.legend': i18n.translate('core.euiCommonlyUsedTimeRanges.legend', { - defaultMessage: 'Commonly used', - }), - 'euiDataGrid.screenReaderNotice': i18n.translate('core.euiDataGrid.screenReaderNotice', { - defaultMessage: 'Cell contains interactive content.', - }), - 'euiDataGridCell.expandButtonTitle': i18n.translate('core.euiDataGridCell.expandButtonTitle', { - defaultMessage: 'Click or hit enter to interact with cell content', - }), - 'euiDataGridSchema.booleanSortTextAsc': i18n.translate( - 'core.euiDataGridSchema.booleanSortTextAsc', - { - defaultMessage: 'True-False', - description: 'Ascending boolean label', - } - ), - 'euiDataGridSchema.booleanSortTextDesc': i18n.translate( - 'core.euiDataGridSchema.booleanSortTextDesc', - { - defaultMessage: 'False-True', - description: 'Descending boolean label', - } - ), - 'euiDataGridSchema.currencySortTextAsc': i18n.translate( - 'core.euiDataGridSchema.currencySortTextAsc', - { - defaultMessage: 'Low-High', - description: 'Ascending currency label', - } - ), - 'euiDataGridSchema.currencySortTextDesc': i18n.translate( - 'core.euiDataGridSchema.currencySortTextDesc', - { - defaultMessage: 'High-Low', - description: 'Descending currency label', - } - ), - 'euiDataGridSchema.dateSortTextAsc': i18n.translate('core.euiDataGridSchema.dateSortTextAsc', { - defaultMessage: 'New-Old', - description: 'Ascending date label', - }), - 'euiDataGridSchema.dateSortTextDesc': i18n.translate('core.euiDataGridSchema.dateSortTextDesc', { - defaultMessage: 'Old-New', - description: 'Descending date label', - }), - 'euiDataGridSchema.numberSortTextAsc': i18n.translate( - 'core.euiDataGridSchema.numberSortTextAsc', - { - defaultMessage: 'Low-High', - description: 'Ascending number label', - } - ), - 'euiDataGridSchema.numberSortTextDesc': i18n.translate( - 'core.euiDataGridSchema.numberSortTextDesc', - { - defaultMessage: 'High-Low', - description: 'Descending number label', - } - ), - 'euiDataGridSchema.jsonSortTextAsc': i18n.translate('core.euiDataGridSchema.jsonSortTextAsc', { - defaultMessage: 'Small-Large', - description: 'Ascending size label', - }), - 'euiDataGridSchema.jsonSortTextDesc': i18n.translate('core.euiDataGridSchema.jsonSortTextDesc', { - defaultMessage: 'Large-Small', - description: 'Descending size label', - }), - 'euiFilterButton.filterBadge': ({ count, hasActiveFilters }: EuiValues) => - i18n.translate('core.euiFilterButton.filterBadge', { - defaultMessage: '${count} ${filterCountLabel} filters', - values: { count, filterCountLabel: hasActiveFilters ? 'active' : 'available' }, - }), - 'euiForm.addressFormErrors': i18n.translate('core.euiForm.addressFormErrors', { - defaultMessage: 'Please address the errors in your form.', - }), - 'euiFormControlLayoutClearButton.label': i18n.translate( - 'core.euiFormControlLayoutClearButton.label', - { - defaultMessage: 'Clear input', - description: 'ARIA label on a button that removes any entry in a form field', - } - ), - 'euiHeaderAlert.dismiss': i18n.translate('core.euiHeaderAlert.dismiss', { - defaultMessage: 'Dismiss', - description: 'ARIA label on a button that dismisses/removes a notification', - }), - 'euiHeaderLinks.appNavigation': i18n.translate('core.euiHeaderLinks.appNavigation', { - defaultMessage: 'App navigation', - description: 'ARIA label on a `nav` element', - }), - 'euiHeaderLinks.openNavigationMenu': i18n.translate('core.euiHeaderLinks.openNavigationMenu', { - defaultMessage: 'Open navigation menu', - }), - 'euiHue.label': i18n.translate('core.euiHue.label', { - defaultMessage: 'Select the HSV color mode "hue" value', - }), - 'euiImage.closeImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.closeImage', { - defaultMessage: 'Close full screen {alt} image', - values: { alt }, - }), - 'euiImage.openImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.openImage', { - defaultMessage: 'Open full screen {alt} image', - values: { alt }, - }), - 'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', { - defaultMessage: 'External link', - }), - 'euiModal.closeModal': i18n.translate('core.euiModal.closeModal', { - defaultMessage: 'Closes this modal window', - }), - 'euiPagination.jumpToLastPage': ({ pageCount }: EuiValues) => - i18n.translate('core.euiPagination.jumpToLastPage', { - defaultMessage: 'Jump to the last page, number {pageCount}', - values: { pageCount }, - }), - 'euiPagination.nextPage': i18n.translate('core.euiPagination.nextPage', { - defaultMessage: 'Next page', - }), - 'euiPagination.pageOfTotal': ({ page, total }: EuiValues) => - i18n.translate('core.euiPagination.pageOfTotal', { - defaultMessage: 'Page {page} of {total}', - values: { page, total }, - }), - 'euiPagination.previousPage': i18n.translate('core.euiPagination.previousPage', { - defaultMessage: 'Previous page', - }), - 'euiPopover.screenReaderAnnouncement': i18n.translate( - 'core.euiPopover.screenReaderAnnouncement', - { - defaultMessage: 'You are in a dialog. To close this dialog, hit escape.', - } - ), - 'euiQuickSelect.applyButton': i18n.translate('core.euiQuickSelect.applyButton', { - defaultMessage: 'Apply', - }), - 'euiQuickSelect.fullDescription': ({ timeTense, timeValue, timeUnit }: EuiValues) => - i18n.translate('core.euiQuickSelect.fullDescription', { - defaultMessage: 'Currently set to {timeTense} {timeValue} {timeUnit}.', - values: { timeTense, timeValue, timeUnit }, - }), - 'euiQuickSelect.legendText': i18n.translate('core.euiQuickSelect.legendText', { - defaultMessage: 'Quick select a time range', - }), - 'euiQuickSelect.nextLabel': i18n.translate('core.euiQuickSelect.nextLabel', { - defaultMessage: 'Next time window', - }), - 'euiQuickSelect.previousLabel': i18n.translate('core.euiQuickSelect.previousLabel', { - defaultMessage: 'Previous time window', - }), - 'euiQuickSelect.quickSelectTitle': i18n.translate('core.euiQuickSelect.quickSelectTitle', { - defaultMessage: 'Quick select', - }), - 'euiQuickSelect.tenseLabel': i18n.translate('core.euiQuickSelect.tenseLabel', { - defaultMessage: 'Time tense', - }), - 'euiQuickSelect.unitLabel': i18n.translate('core.euiQuickSelect.unitLabel', { - defaultMessage: 'Time unit', - }), - 'euiQuickSelect.valueLabel': i18n.translate('core.euiQuickSelect.valueLabel', { - defaultMessage: 'Time value', - }), - 'euiRefreshInterval.fullDescription': ({ optionValue, optionText }: EuiValues) => - i18n.translate('core.euiRefreshInterval.fullDescription', { - defaultMessage: 'Currently set to {optionValue} {optionText}.', - values: { optionValue, optionText }, - }), - 'euiRefreshInterval.legend': i18n.translate('core.euiRefreshInterval.legend', { - defaultMessage: 'Refresh every', - }), - 'euiRefreshInterval.start': i18n.translate('core.euiRefreshInterval.start', { - defaultMessage: 'Start', - }), - 'euiRefreshInterval.stop': i18n.translate('core.euiRefreshInterval.stop', { - defaultMessage: 'Stop', - }), - 'euiRelativeTab.fullDescription': ({ unit }: EuiValues) => - i18n.translate('core.euiRelativeTab.fullDescription', { - defaultMessage: 'The unit is changeable. Currently set to {unit}.', - values: { unit }, - }), - 'euiRelativeTab.relativeDate': ({ position }: EuiValues) => - i18n.translate('core.euiRelativeTab.relativeDate', { - defaultMessage: '{position} date', - values: { position }, - }), - 'euiRelativeTab.roundingLabel': ({ unit }: EuiValues) => - i18n.translate('core.euiRelativeTab.roundingLabel', { - defaultMessage: 'Round to the {unit}', - values: { unit }, - }), - 'euiRelativeTab.unitInputLabel': i18n.translate('core.euiRelativeTab.unitInputLabel', { - defaultMessage: 'Relative time span', - }), - 'euiSaturation.roleDescription': i18n.translate('core.euiSaturation.roleDescription', { - defaultMessage: 'HSV color mode saturation and value selection', - }), - 'euiSaturation.screenReaderAnnouncement': i18n.translate( - 'core.euiSaturation.screenReaderAnnouncement', - { - defaultMessage: - 'Use the arrow keys to navigate the square color gradient. The coordinates resulting from each key press will be used to calculate HSV color mode "saturation" and "value" numbers, in the range of 0 to 1. Left and right decrease and increase (respectively) the "saturation" value. Up and down decrease and increase (respectively) the "value" value.', - } - ), - 'euiSelectable.loadingOptions': i18n.translate('core.euiSelectable.loadingOptions', { - defaultMessage: 'Loading options', - description: 'Placeholder message while data is asynchronously loaded', - }), - 'euiSelectable.noAvailableOptions': i18n.translate('core.euiSelectable.noAvailableOptions', { - defaultMessage: "There aren't any options available", - }), - 'euiSelectable.noMatchingOptions': ({ searchValue }: EuiValues) => ( - - ), - 'euiStat.loadingText': i18n.translate('core.euiStat.loadingText', { - defaultMessage: 'Statistic is loading', - }), - 'euiStep.ariaLabel': ({ status }: EuiValues) => - i18n.translate('core.euiStep.ariaLabel', { - defaultMessage: '{stepStatus}', - values: { stepStatus: status === 'incomplete' ? 'Incomplete Step' : 'Step' }, - }), - 'euiStepHorizontal.buttonTitle': ({ step, title, disabled, isComplete }: EuiValues) => { - return i18n.translate('core.euiStepHorizontal.buttonTitle', { - defaultMessage: 'Step {step}: {title}{titleAppendix}', - values: { - step, - title, - titleAppendix: disabled ? ' is disabled' : isComplete ? ' is complete' : '', - }, - }); - }, - 'euiStepHorizontal.step': i18n.translate('core.euiStepHorizontal.step', { - defaultMessage: 'Step', - description: 'Screen reader text announcing information about a step in some process', - }), - 'euiStepNumber.hasErrors': i18n.translate('core.euiStepNumber.hasErrors', { - defaultMessage: 'has errors', - description: - 'Used as the title attribute on an image or svg icon to indicate a given process step has errors', - }), - 'euiStepNumber.hasWarnings': i18n.translate('core.euiStepNumber.hasWarnings', { - defaultMessage: 'has warnings', - description: - 'Used as the title attribute on an image or svg icon to indicate a given process step has warnings', - }), - 'euiStepNumber.isComplete': i18n.translate('core.euiStepNumber.isComplete', { - defaultMessage: 'complete', - description: - 'Used as the title attribute on an image or svg icon to indicate a given process step is complete', - }), - 'euiStyleSelector.buttonText': i18n.translate('core.euiStyleSelector.buttonText', { - defaultMessage: 'Density', - }), - 'euiSuperDatePicker.showDatesButtonLabel': i18n.translate( - 'core.euiSuperDatePicker.showDatesButtonLabel', - { - defaultMessage: 'Show dates', - description: 'Displayed in a button that shows date picker', - } - ), - 'euiSuperSelect.screenReaderAnnouncement': ({ optionsCount }: EuiValues) => - i18n.translate('core.euiSuperSelect.screenReaderAnnouncement', { - defaultMessage: - 'You are in a form selector of {optionsCount} items and must select a single option. Use the Up and Down keys to navigate or Escape to close.', - values: { optionsCount }, - }), - 'euiSuperSelectControl.selectAnOption': ({ selectedValue }: EuiValues) => - i18n.translate('core.euiSuperSelectControl.selectAnOption', { - defaultMessage: 'Select an option: {selectedValue}, is selected', - values: { selectedValue }, - }), - 'euiSuperUpdateButton.cannotUpdateTooltip': i18n.translate( - 'core.euiSuperUpdateButton.cannotUpdateTooltip', - { - defaultMessage: 'Cannot update', - description: "Displayed in a tooltip when updates can't happen", - } - ), - 'euiSuperUpdateButton.clickToApplyTooltip': i18n.translate( - 'core.euiSuperUpdateButton.clickToApplyTooltip', - { - defaultMessage: 'Click to apply', - description: "Displayed in a tooltip when there are changes that haven't been applied", - } - ), - 'euiSuperUpdateButton.refreshButtonLabel': i18n.translate( - 'core.euiSuperUpdateButton.refreshButtonLabel', - { - defaultMessage: 'Refresh', - description: 'Displayed in a button that refreshes based on date picked', - } - ), - 'euiSuperUpdateButton.updatingButtonLabel': i18n.translate( - 'core.euiSuperUpdateButton.updatingButtonLabel', - { - defaultMessage: 'Updating', - description: 'Displayed in a button that refreshes when updates are happening', - } - ), - 'euiSuperUpdateButton.updateButtonLabel': i18n.translate( - 'core.euiSuperUpdateButton.updateButtonLabel', - { - defaultMessage: 'Update', - description: 'Displayed in a button that updates based on date picked', - } - ), - 'euiTablePagination.rowsPerPage': i18n.translate('core.euiTablePagination.rowsPerPage', { - defaultMessage: 'Rows per page', - description: 'Displayed in a button that toggles a table pagination menu', - }), - 'euiTablePagination.rowsPerPageOption': ({ rowsPerPage }: EuiValues) => - i18n.translate('core.euiTablePagination.rowsPerPageOption', { - defaultMessage: '{rowsPerPage} rows', - description: 'Displayed in a button that toggles the number of visible rows', - values: { rowsPerPage }, - }), - 'euiTableSortMobile.sorting': i18n.translate('core.euiTableSortMobile.sorting', { - defaultMessage: 'Sorting', - description: 'Displayed in a button that toggles a table sorting menu', - }), - 'euiToast.dismissToast': i18n.translate('core.euiToast.dismissToast', { - defaultMessage: 'Dismiss toast', - }), - 'euiToast.newNotification': i18n.translate('core.euiToast.newNotification', { - defaultMessage: 'A new notification appears', - }), - 'euiToast.notification': i18n.translate('core.euiToast.notification', { - defaultMessage: 'Notification', - description: 'ARIA label on an element containing a notification', - }), - 'euiTreeView.ariaLabel': ({ nodeLabel, ariaLabel }: EuiValues) => - i18n.translate('core.euiTreeView.ariaLabel', { - defaultMessage: '{nodeLabel} child of {ariaLabel}', - values: { nodeLabel, ariaLabel }, - }), - 'euiTreeView.listNavigationInstructions': i18n.translate( - 'core.euiTreeView.listNavigationInstructions', - { - defaultMessage: 'You can quickly navigate this list using arrow keys.', - } - ), + }), + 'euiSelectable.noMatchingOptions': ({ searchValue }: EuiValues) => ( + + ), + 'euiStat.loadingText': i18n.translate('core.euiStat.loadingText', { + defaultMessage: 'Statistic is loading', + }), + 'euiStep.ariaLabel': ({ status }: EuiValues) => + i18n.translate('core.euiStep.ariaLabel', { + defaultMessage: '{stepStatus}', + values: { stepStatus: status === 'incomplete' ? 'Incomplete Step' : 'Step' }, + }), + 'euiStepHorizontal.buttonTitle': ({ step, title, disabled, isComplete }: EuiValues) => { + return i18n.translate('core.euiStepHorizontal.buttonTitle', { + defaultMessage: 'Step {step}: {title}{titleAppendix}', + values: { + step, + title, + titleAppendix: disabled ? ' is disabled' : isComplete ? ' is complete' : '', + }, + }); + }, + 'euiStepHorizontal.step': i18n.translate('core.euiStepHorizontal.step', { + defaultMessage: 'Step', + description: 'Screen reader text announcing information about a step in some process', + }), + 'euiStepNumber.hasErrors': i18n.translate('core.euiStepNumber.hasErrors', { + defaultMessage: 'has errors', + description: + 'Used as the title attribute on an image or svg icon to indicate a given process step has errors', + }), + 'euiStepNumber.hasWarnings': i18n.translate('core.euiStepNumber.hasWarnings', { + defaultMessage: 'has warnings', + description: + 'Used as the title attribute on an image or svg icon to indicate a given process step has warnings', + }), + 'euiStepNumber.isComplete': i18n.translate('core.euiStepNumber.isComplete', { + defaultMessage: 'complete', + description: + 'Used as the title attribute on an image or svg icon to indicate a given process step is complete', + }), + 'euiStyleSelector.buttonText': i18n.translate('core.euiStyleSelector.buttonText', { + defaultMessage: 'Density', + }), + 'euiSuperDatePicker.showDatesButtonLabel': i18n.translate( + 'core.euiSuperDatePicker.showDatesButtonLabel', + { + defaultMessage: 'Show dates', + description: 'Displayed in a button that shows date picker', + } + ), + 'euiSuperSelect.screenReaderAnnouncement': ({ optionsCount }: EuiValues) => + i18n.translate('core.euiSuperSelect.screenReaderAnnouncement', { + defaultMessage: + 'You are in a form selector of {optionsCount} items and must select a single option. Use the Up and Down keys to navigate or Escape to close.', + values: { optionsCount }, + }), + 'euiSuperSelectControl.selectAnOption': ({ selectedValue }: EuiValues) => + i18n.translate('core.euiSuperSelectControl.selectAnOption', { + defaultMessage: 'Select an option: {selectedValue}, is selected', + values: { selectedValue }, + }), + 'euiSuperUpdateButton.cannotUpdateTooltip': i18n.translate( + 'core.euiSuperUpdateButton.cannotUpdateTooltip', + { + defaultMessage: 'Cannot update', + description: "Displayed in a tooltip when updates can't happen", + } + ), + 'euiSuperUpdateButton.clickToApplyTooltip': i18n.translate( + 'core.euiSuperUpdateButton.clickToApplyTooltip', + { + defaultMessage: 'Click to apply', + description: "Displayed in a tooltip when there are changes that haven't been applied", + } + ), + 'euiSuperUpdateButton.refreshButtonLabel': i18n.translate( + 'core.euiSuperUpdateButton.refreshButtonLabel', + { + defaultMessage: 'Refresh', + description: 'Displayed in a button that refreshes based on date picked', + } + ), + 'euiSuperUpdateButton.updatingButtonLabel': i18n.translate( + 'core.euiSuperUpdateButton.updatingButtonLabel', + { + defaultMessage: 'Updating', + description: 'Displayed in a button that refreshes when updates are happening', + } + ), + 'euiSuperUpdateButton.updateButtonLabel': i18n.translate( + 'core.euiSuperUpdateButton.updateButtonLabel', + { + defaultMessage: 'Update', + description: 'Displayed in a button that updates based on date picked', + } + ), + 'euiTablePagination.rowsPerPage': i18n.translate('core.euiTablePagination.rowsPerPage', { + defaultMessage: 'Rows per page', + description: 'Displayed in a button that toggles a table pagination menu', + }), + 'euiTablePagination.rowsPerPageOption': ({ rowsPerPage }: EuiValues) => + i18n.translate('core.euiTablePagination.rowsPerPageOption', { + defaultMessage: '{rowsPerPage} rows', + description: 'Displayed in a button that toggles the number of visible rows', + values: { rowsPerPage }, + }), + 'euiTableSortMobile.sorting': i18n.translate('core.euiTableSortMobile.sorting', { + defaultMessage: 'Sorting', + description: 'Displayed in a button that toggles a table sorting menu', + }), + 'euiToast.dismissToast': i18n.translate('core.euiToast.dismissToast', { + defaultMessage: 'Dismiss toast', + }), + 'euiToast.newNotification': i18n.translate('core.euiToast.newNotification', { + defaultMessage: 'A new notification appears', + }), + 'euiToast.notification': i18n.translate('core.euiToast.notification', { + defaultMessage: 'Notification', + description: 'ARIA label on an element containing a notification', + }), + 'euiTreeView.ariaLabel': ({ nodeLabel, ariaLabel }: EuiValues) => + i18n.translate('core.euiTreeView.ariaLabel', { + defaultMessage: '{nodeLabel} child of {ariaLabel}', + values: { nodeLabel, ariaLabel }, + }), + 'euiTreeView.listNavigationInstructions': i18n.translate( + 'core.euiTreeView.listNavigationInstructions', + { + defaultMessage: 'You can quickly navigate this list using arrow keys.', + } + ), + }; + + return euiContextMapping; }; diff --git a/src/core/public/i18n/i18n_service.tsx b/src/core/public/i18n/i18n_service.tsx index 501d83e36b1b94..37af6127346c1d 100644 --- a/src/core/public/i18n/i18n_service.tsx +++ b/src/core/public/i18n/i18n_service.tsx @@ -21,7 +21,7 @@ import React from 'react'; import { EuiContext } from '@elastic/eui'; import { I18nProvider } from '@kbn/i18n/react'; -import { euiContextMapping } from './i18n_eui_mapping'; +import { getEuiContextMapping } from './i18n_eui_mapping'; /** * Service that is responsible for i18n capabilities. @@ -37,6 +37,8 @@ export class I18nService { * @internal */ public getContext(): I18nStart { + const euiContextMapping = getEuiContextMapping(); + const mapping = { ...euiContextMapping, }; diff --git a/src/core/public/kbn_bootstrap.test.mocks.ts b/src/core/public/kbn_bootstrap.test.mocks.ts new file mode 100644 index 00000000000000..30f292280a135f --- /dev/null +++ b/src/core/public/kbn_bootstrap.test.mocks.ts @@ -0,0 +1,50 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { applicationServiceMock } from './application/application_service.mock'; +import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock'; +export const fatalErrorMock = fatalErrorsServiceMock.createSetupContract(); +export const coreSystemMock = { + setup: jest.fn().mockResolvedValue({ + fatalErrors: fatalErrorMock, + }), + start: jest.fn().mockResolvedValue({ + application: applicationServiceMock.createInternalStartContract(), + }), +}; +jest.doMock('./core_system', () => ({ + CoreSystem: jest.fn().mockImplementation(() => coreSystemMock), +})); + +export const apmSystem = { + setup: jest.fn().mockResolvedValue(undefined), + start: jest.fn().mockResolvedValue(undefined), +}; +export const ApmSystemConstructor = jest.fn().mockImplementation(() => apmSystem); +jest.doMock('./apm_system', () => ({ + ApmSystem: ApmSystemConstructor, +})); + +export const i18nLoad = jest.fn().mockResolvedValue(undefined); +jest.doMock('@kbn/i18n', () => ({ + i18n: { + ...jest.requireActual('@kbn/i18n').i18n, + load: i18nLoad, + }, +})); diff --git a/src/core/public/kbn_bootstrap.test.ts b/src/core/public/kbn_bootstrap.test.ts new file mode 100644 index 00000000000000..9cd16dd6ab9dfa --- /dev/null +++ b/src/core/public/kbn_bootstrap.test.ts @@ -0,0 +1,54 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { apmSystem, fatalErrorMock, i18nLoad } from './kbn_bootstrap.test.mocks'; +import { __kbnBootstrap__ } from './'; + +describe('kbn_bootstrap', () => { + beforeAll(() => { + const metadata = { + i18n: { translationsUrl: 'http://localhost' }, + vars: { apmConfig: null }, + }; + // eslint-disable-next-line no-unsanitized/property + document.body.innerHTML = ` +`; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('does not report a fatal error if apm load fails', async () => { + apmSystem.setup.mockRejectedValueOnce(new Error('reason')); + const consoleSpy = jest.spyOn(console, 'warn').mockImplementationOnce(() => undefined); + + await __kbnBootstrap__(); + + expect(fatalErrorMock.add).toHaveBeenCalledTimes(0); + expect(consoleSpy).toHaveBeenCalledTimes(1); + }); + + it('reports a fatal error if i18n load fails', async () => { + i18nLoad.mockRejectedValueOnce(new Error('reason')); + + await __kbnBootstrap__(); + + expect(fatalErrorMock.add).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/core/public/kbn_bootstrap.ts b/src/core/public/kbn_bootstrap.ts index a108b5aaa47ec0..a083196004cf45 100644 --- a/src/core/public/kbn_bootstrap.ts +++ b/src/core/public/kbn_bootstrap.ts @@ -17,70 +17,38 @@ * under the License. */ -/** - * This is the entry point used to boot the frontend when serving a application - * that lives in the Kibana Platform. - * - * Any changes to this file should be kept in sync with - * src/legacy/ui/ui_bundles/app_entry_template.js - */ - import { i18n } from '@kbn/i18n'; import { CoreSystem } from './core_system'; +import { ApmSystem } from './apm_system'; /** @internal */ -export function __kbnBootstrap__() { +export async function __kbnBootstrap__() { const injectedMetadata = JSON.parse( document.querySelector('kbn-injected-metadata')!.getAttribute('data')! ); - /** - * `apmConfig` would be populated with relavant APM RUM agent - * configuration if server is started with `ELASTIC_APM_ACTIVE=true` - */ - const apmConfig = injectedMetadata.vars.apmConfig; - const APM_ENABLED = process.env.IS_KIBANA_DISTRIBUTABLE !== 'true' && apmConfig != null; - - if (APM_ENABLED) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { init, apm } = require('@elastic/apm-rum'); - if (apmConfig.globalLabels) { - apm.addLabels(apmConfig.globalLabels); - } - init(apmConfig); + let i18nError: Error | undefined; + const apmSystem = new ApmSystem(injectedMetadata.vars.apmConfig); + + await Promise.all([ + // eslint-disable-next-line no-console + apmSystem.setup().catch(console.warn), + i18n.load(injectedMetadata.i18n.translationsUrl).catch((error) => { + i18nError = error; + }), + ]); + + const coreSystem = new CoreSystem({ + injectedMetadata, + rootDomElement: document.body, + browserSupportsCsp: !(window as any).__kbnCspNotEnforced__, + }); + + const setup = await coreSystem.setup(); + if (i18nError && setup) { + setup.fatalErrors.add(i18nError); } - i18n - .load(injectedMetadata.i18n.translationsUrl) - .catch((e) => e) - .then(async (i18nError) => { - const coreSystem = new CoreSystem({ - injectedMetadata, - rootDomElement: document.body, - browserSupportsCsp: !(window as any).__kbnCspNotEnforced__, - }); - - const setup = await coreSystem.setup(); - if (i18nError && setup) { - setup.fatalErrors.add(i18nError); - } - - const start = await coreSystem.start(); - - if (APM_ENABLED && start) { - /** - * Register listeners for navigation changes and capture them as - * route-change transactions after Kibana app is bootstrapped - */ - start.application.currentAppId$.subscribe((appId) => { - const apmInstance = (window as any).elasticApm; - if (appId && apmInstance && typeof apmInstance.startTransaction === 'function') { - apmInstance.startTransaction(`/app/${appId}`, 'route-change', { - managed: true, - canReuse: true, - }); - } - }); - } - }); + const start = await coreSystem.start(); + await apmSystem.start(start); } diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 7179c6cf8b1332..5970c9a8571c45 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -42,7 +42,7 @@ import { UnregisterCallback } from 'history'; import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/types'; // @internal (undocumented) -export function __kbnBootstrap__(): void; +export function __kbnBootstrap__(): Promise; // @public (undocumented) export interface App { diff --git a/src/core/server/core_route_handler_context.test.ts b/src/core/server/core_route_handler_context.test.ts new file mode 100644 index 00000000000000..563e337e6c7e00 --- /dev/null +++ b/src/core/server/core_route_handler_context.test.ts @@ -0,0 +1,239 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { CoreRouteHandlerContext } from './core_route_handler_context'; +import { coreMock, httpServerMock } from './mocks'; + +describe('#auditor', () => { + test('returns the results of coreStart.audiTrail.asScoped', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const auditor = context.auditor; + expect(auditor).toBe(coreStart.auditTrail.asScoped.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + expect(coreStart.auditTrail.asScoped).not.toHaveBeenCalled(); + const auditor = context.auditor; + expect(coreStart.auditTrail.asScoped).toHaveBeenCalled(); + expect(auditor).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const auditor1 = context.auditor; + const auditor2 = context.auditor; + expect(coreStart.auditTrail.asScoped.mock.calls.length).toBe(1); + const mockResult = coreStart.auditTrail.asScoped.mock.results[0].value; + expect(auditor1).toBe(mockResult); + expect(auditor2).toBe(mockResult); + }); +}); + +describe('#elasticsearch', () => { + describe('#client', () => { + test('returns the results of coreStart.elasticsearch.client.asScoped', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client = context.elasticsearch.client; + expect(client).toBe(coreStart.elasticsearch.client.asScoped.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + expect(coreStart.elasticsearch.client.asScoped).not.toHaveBeenCalled(); + const client = context.elasticsearch.client; + expect(coreStart.elasticsearch.client.asScoped).toHaveBeenCalled(); + expect(client).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client1 = context.elasticsearch.client; + const client2 = context.elasticsearch.client; + expect(coreStart.elasticsearch.client.asScoped.mock.calls.length).toBe(1); + const mockResult = coreStart.elasticsearch.client.asScoped.mock.results[0].value; + expect(client1).toBe(mockResult); + expect(client2).toBe(mockResult); + }); + }); + + describe('#legacy', () => { + describe('#client', () => { + test('returns the results of coreStart.elasticsearch.legacy.client.asScoped', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client = context.elasticsearch.legacy.client; + expect(client).toBe(coreStart.elasticsearch.legacy.client.asScoped.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + expect(coreStart.elasticsearch.legacy.client.asScoped).not.toHaveBeenCalled(); + const client = context.elasticsearch.legacy.client; + expect(coreStart.elasticsearch.legacy.client.asScoped).toHaveBeenCalled(); + expect(client).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client1 = context.elasticsearch.legacy.client; + const client2 = context.elasticsearch.legacy.client; + expect(coreStart.elasticsearch.legacy.client.asScoped.mock.calls.length).toBe(1); + const mockResult = coreStart.elasticsearch.legacy.client.asScoped.mock.results[0].value; + expect(client1).toBe(mockResult); + expect(client2).toBe(mockResult); + }); + }); + }); +}); + +describe('#savedObjects', () => { + describe('#client', () => { + test('returns the results of coreStart.savedObjects.getScopedClient', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client = context.savedObjects.client; + expect(client).toBe(coreStart.savedObjects.getScopedClient.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const savedObjects = context.savedObjects; + expect(coreStart.savedObjects.getScopedClient).not.toHaveBeenCalled(); + const client = savedObjects.client; + expect(coreStart.savedObjects.getScopedClient).toHaveBeenCalled(); + expect(client).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client1 = context.savedObjects.client; + const client2 = context.savedObjects.client; + expect(coreStart.savedObjects.getScopedClient.mock.calls.length).toBe(1); + const mockResult = coreStart.savedObjects.getScopedClient.mock.results[0].value; + expect(client1).toBe(mockResult); + expect(client2).toBe(mockResult); + }); + }); + + describe('#typeRegistry', () => { + test('returns the results of coreStart.savedObjects.getTypeRegistry', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const typeRegistry = context.savedObjects.typeRegistry; + expect(typeRegistry).toBe(coreStart.savedObjects.getTypeRegistry.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + expect(coreStart.savedObjects.getTypeRegistry).not.toHaveBeenCalled(); + const typeRegistry = context.savedObjects.typeRegistry; + expect(coreStart.savedObjects.getTypeRegistry).toHaveBeenCalled(); + expect(typeRegistry).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const typeRegistry1 = context.savedObjects.typeRegistry; + const typeRegistry2 = context.savedObjects.typeRegistry; + expect(coreStart.savedObjects.getTypeRegistry.mock.calls.length).toBe(1); + const mockResult = coreStart.savedObjects.getTypeRegistry.mock.results[0].value; + expect(typeRegistry1).toBe(mockResult); + expect(typeRegistry2).toBe(mockResult); + }); + }); +}); + +describe('#uiSettings', () => { + describe('#client', () => { + test('returns the results of coreStart.uiSettings.asScopedToClient', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client = context.uiSettings.client; + expect(client).toBe(coreStart.uiSettings.asScopedToClient.mock.results[0].value); + }); + + test('lazily created', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + expect(coreStart.uiSettings.asScopedToClient).not.toHaveBeenCalled(); + const client = context.uiSettings.client; + expect(coreStart.uiSettings.asScopedToClient).toHaveBeenCalled(); + expect(client).toBeDefined(); + }); + + test('only creates one instance', () => { + const request = httpServerMock.createKibanaRequest(); + const coreStart = coreMock.createInternalStart(); + const context = new CoreRouteHandlerContext(coreStart, request); + + const client1 = context.uiSettings.client; + const client2 = context.uiSettings.client; + expect(coreStart.uiSettings.asScopedToClient.mock.calls.length).toBe(1); + const mockResult = coreStart.uiSettings.asScopedToClient.mock.results[0].value; + expect(client1).toBe(mockResult); + expect(client2).toBe(mockResult); + }); + }); +}); diff --git a/src/core/server/core_route_handler_context.ts b/src/core/server/core_route_handler_context.ts new file mode 100644 index 00000000000000..8a182a523f52c9 --- /dev/null +++ b/src/core/server/core_route_handler_context.ts @@ -0,0 +1,132 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// eslint-disable-next-line max-classes-per-file +import { InternalCoreStart } from './internal_types'; +import { KibanaRequest } from './http/router'; +import { SavedObjectsClientContract } from './saved_objects/types'; +import { InternalSavedObjectsServiceStart, ISavedObjectTypeRegistry } from './saved_objects'; +import { + InternalElasticsearchServiceStart, + IScopedClusterClient, + LegacyScopedClusterClient, +} from './elasticsearch'; +import { Auditor } from './audit_trail'; +import { InternalUiSettingsServiceStart, IUiSettingsClient } from './ui_settings'; + +class CoreElasticsearchRouteHandlerContext { + #client?: IScopedClusterClient; + #legacy?: { + client: Pick; + }; + + constructor( + private readonly elasticsearchStart: InternalElasticsearchServiceStart, + private readonly request: KibanaRequest + ) {} + + public get client() { + if (this.#client == null) { + this.#client = this.elasticsearchStart.client.asScoped(this.request); + } + return this.#client; + } + + public get legacy() { + if (this.#legacy == null) { + this.#legacy = { + client: this.elasticsearchStart.legacy.client.asScoped(this.request), + }; + } + return this.#legacy; + } +} + +class CoreSavedObjectsRouteHandlerContext { + constructor( + private readonly savedObjectsStart: InternalSavedObjectsServiceStart, + private readonly request: KibanaRequest + ) {} + #scopedSavedObjectsClient?: SavedObjectsClientContract; + #typeRegistry?: ISavedObjectTypeRegistry; + + public get client() { + if (this.#scopedSavedObjectsClient == null) { + this.#scopedSavedObjectsClient = this.savedObjectsStart.getScopedClient(this.request); + } + return this.#scopedSavedObjectsClient; + } + + public get typeRegistry() { + if (this.#typeRegistry == null) { + this.#typeRegistry = this.savedObjectsStart.getTypeRegistry(); + } + return this.#typeRegistry; + } +} + +class CoreUiSettingsRouteHandlerContext { + #client?: IUiSettingsClient; + constructor( + private readonly uiSettingsStart: InternalUiSettingsServiceStart, + private readonly savedObjectsRouterHandlerContext: CoreSavedObjectsRouteHandlerContext + ) {} + + public get client() { + if (this.#client == null) { + this.#client = this.uiSettingsStart.asScopedToClient( + this.savedObjectsRouterHandlerContext.client + ); + } + return this.#client; + } +} + +export class CoreRouteHandlerContext { + #auditor?: Auditor; + + readonly elasticsearch: CoreElasticsearchRouteHandlerContext; + readonly savedObjects: CoreSavedObjectsRouteHandlerContext; + readonly uiSettings: CoreUiSettingsRouteHandlerContext; + + constructor( + private readonly coreStart: InternalCoreStart, + private readonly request: KibanaRequest + ) { + this.elasticsearch = new CoreElasticsearchRouteHandlerContext( + this.coreStart.elasticsearch, + this.request + ); + this.savedObjects = new CoreSavedObjectsRouteHandlerContext( + this.coreStart.savedObjects, + this.request + ); + this.uiSettings = new CoreUiSettingsRouteHandlerContext( + this.coreStart.uiSettings, + this.savedObjects + ); + } + + public get auditor() { + if (this.#auditor == null) { + this.#auditor = this.coreStart.auditTrail.asScoped(this.request); + } + return this.#auditor; + } +} diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 5935636d54f9d1..ece10db41962d4 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ - +import apm from 'elastic-apm-node'; import { config as pathConfig } from '@kbn/utils'; import { mapToObject } from '@kbn/std'; import { ConfigService, Env, RawConfigurationProvider, coreDeprecationProvider } from './config'; @@ -48,6 +48,7 @@ import { config as statusConfig } from './status'; import { ContextService } from './context'; import { RequestHandlerContext } from '.'; import { InternalCoreSetup, InternalCoreStart, ServiceConfigDescriptor } from './internal_types'; +import { CoreRouteHandlerContext } from './core_route_handler_context'; const coreId = Symbol('core'); const rootConfigPath = ''; @@ -106,6 +107,7 @@ export class Server { public async setup() { this.log.debug('setting up server'); + const setupTransaction = apm.startTransaction('server_setup', 'kibana_platform'); const environmentSetup = await this.environment.setup(); @@ -207,20 +209,25 @@ export class Server { this.registerCoreContext(coreSetup); this.coreApp.setup(coreSetup); + setupTransaction?.end(); return coreSetup; } public async start() { this.log.debug('starting server'); + const startTransaction = apm.startTransaction('server_start', 'kibana_platform'); + const auditTrailStart = this.auditTrail.start(); const elasticsearchStart = await this.elasticsearch.start({ auditTrail: auditTrailStart, }); + const soStartSpan = startTransaction?.startSpan('saved_objects.migration', 'migration'); const savedObjectsStart = await this.savedObjects.start({ elasticsearch: elasticsearchStart, pluginsInitialized: this.#pluginsInitialized, }); + soStartSpan?.end(); const capabilitiesStart = this.capabilities.start(); const uiSettingsStart = await this.uiSettings.start(); const metricsStart = await this.metrics.start(); @@ -248,6 +255,7 @@ export class Server { await this.http.start(); + startTransaction?.end(); return this.coreStart; } @@ -272,25 +280,7 @@ export class Server { coreId, 'core', async (context, req, res): Promise => { - const coreStart = this.coreStart!; - const savedObjectsClient = coreStart.savedObjects.getScopedClient(req); - - return { - savedObjects: { - client: savedObjectsClient, - typeRegistry: coreStart.savedObjects.getTypeRegistry(), - }, - elasticsearch: { - client: coreStart.elasticsearch.client.asScoped(req), - legacy: { - client: coreStart.elasticsearch.legacy.client.asScoped(req), - }, - }, - uiSettings: { - client: coreStart.uiSettings.asScopedToClient(savedObjectsClient), - }, - auditor: coreStart.auditTrail.asScoped(req), - }; + return new CoreRouteHandlerContext(this.coreStart!, req); } ); } diff --git a/src/dev/code_coverage/docs/team_assignment/README.md b/src/dev/code_coverage/docs/team_assignment/README.md index 3509fb5c2a4fc1..f2884fb42b8d75 100644 --- a/src/dev/code_coverage/docs/team_assignment/README.md +++ b/src/dev/code_coverage/docs/team_assignment/README.md @@ -1,8 +1,41 @@ -# Team Assignment Ingestion Pipeline +# Code Coverage Team Assignments -Team assignment will occur once per ci run. -Team assignment uses an ingest pipeline. +Team assignment occurs once per ci run. -The coverage user has the coverage admin role. +The "orchestration" entry point is a [Jenkinsfile Scripted Pipeline](https://github.com/elastic/kibana/blob/f73bc48b3bbbb5ad2042c1aa267aea2150b7b742/.ci/Jenkinsfile_coverage#L21) +This Jenkinsfile runs a [shell script](https://github.com/elastic/kibana/blob/master/src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh#L33) that kicks everything off. +The end result is the data is ingested to our [Kibana Stats Cluster](https://kibana-stats.elastic.dev/app/dashboards#/view/58b8db70-62f9-11ea-8312-7f2d69b79843?_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-7d%2Cto%3Anow))) -This role must have the rights depicted below ![Cluster Rights](./security_privleges.png) +## Team Assignment Parsing (from .github/CODEOWNERS) +We add additional metadata to the CODEOWNERS file. +This metadata allows users to assign teams to paths, in a friendly location. +Example CODEOWNERS Block: +_notice the coverage delimiter `#CC# ...`_ +``` +/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team @elastic/siem +/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem +/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem +#CC# /x-pack/legacy/plugins/siem/ @elastic/siem +#CC# /x-pack/plugins/siem/ @elastic/siem +#CC# /x-pack/plugins/security_solution/ @elastic/siem +``` +The first 3 lines above fill the usual purpose of the CODEOWNERS file and cause PRs modifying files in these paths to require approval by the listed team(s). +They also attribute files in those paths for purpose of code coverage reporting. +The last 3 lines above ONLY attribute files in those paths for purpose of code coverage reporting. + +## Team Assignment Data File Creation (Before Ingestion) +We create a data file containing all paths in the repo, with a team assigned. +Example Team Assignments Block: +``` +x-pack/plugins/security_solution/common/constants.ts siem +x-pack/plugins/security_solution/common/detection_engine/build_exceptions_query.test.ts siem +x-pack/plugins/security_solution/common/detection_engine/build_exceptions_query.ts siem +... +``` + +## Team Assignment Data File Usage (During Code Coverage Ingestion) +Subsequently, we use the data file during ingestion. +We search the data file, for any given "coveredFilePath" + - Given the above assignments block, and lets say the "coveredFilePath" during ingestion is + - `x-pack/plugins/security_solution/common/constants.ts` + - The team assignment would be `siem` in our [Kibana Stats Cluster](https://kibana-stats.elastic.dev/app/dashboards#/view/58b8db70-62f9-11ea-8312-7f2d69b79843?_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-7d%2Cto%3Anow))) diff --git a/src/dev/code_coverage/docs/team_assignment/security_privleges.png b/src/dev/code_coverage/docs/team_assignment/security_privleges.png deleted file mode 100644 index 002774f3ecefae..00000000000000 Binary files a/src/dev/code_coverage/docs/team_assignment/security_privleges.png and /dev/null differ diff --git a/src/dev/jest/setup/react_testing_library.js b/src/dev/jest/setup/react_testing_library.js index 84b5b6096e79b0..90f73b04dc210f 100644 --- a/src/dev/jest/setup/react_testing_library.js +++ b/src/dev/jest/setup/react_testing_library.js @@ -19,14 +19,13 @@ import '@testing-library/jest-dom'; /** - * Have to import "/pure" here to not register afterEach() hook clean up - * in the very beginning. There are couple tests which fail with clean up hook. - * On CI they run before first test which imports '@testing-library/react' - * and registers afterEach hook so the whole suite is passing. - * This have to be fixed as we depend on test order execution + * PLEASE NOTE: + * Importing '@testing-library/react' registers an `afterEach(cleanup)` side effect. + * It has tricky code that flushes pending promises, that previously led to unpredictable test failures * https://github.com/elastic/kibana/issues/59469 + * But since newer versions it has stabilised itself */ -import { configure } from '@testing-library/react/pure'; +import { configure } from '@testing-library/react'; // instead of default 'data-testid', use kibana's 'data-test-subj' configure({ testIdAttribute: 'data-test-subj', asyncUtilTimeout: 4500 }); diff --git a/src/dev/run_check_published_api_changes.ts b/src/dev/run_check_published_api_changes.ts index 5a6b6e092da2c9..984e013114c9eb 100644 --- a/src/dev/run_check_published_api_changes.ts +++ b/src/dev/run_check_published_api_changes.ts @@ -232,6 +232,9 @@ async function run(folder: string, { opts }: { opts: Options }): Promise { - await buildRefs(log); - }); + run( + async ({ log, flags }) => { + await buildRefs(log, flags.project as string); + }, + { + description: 'Build TypeScript projects', + flags: { + string: ['project'], + help: ` +--project Required, path to the tsconfig.refs.file + `, + }, + } + ); } diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index 4d1e549e192b65..9891e9fa02c82d 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -24,11 +24,11 @@ import { Project } from './project'; export const PROJECTS = [ new Project(resolve(REPO_ROOT, 'tsconfig.json')), - new Project(resolve(REPO_ROOT, 'src/test_utils/tsconfig.json')), - new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')), new Project(resolve(REPO_ROOT, 'test/tsconfig.json'), { name: 'kibana/test' }), new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')), new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }), + new Project(resolve(REPO_ROOT, 'src/test_utils/tsconfig.json')), + new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')), new Project(resolve(REPO_ROOT, 'x-pack/plugins/security_solution/cypress/tsconfig.json'), { name: 'security_solution/cypress', }), @@ -47,6 +47,12 @@ export const PROJECTS = [ ...glob .sync('packages/*/tsconfig.json', { cwd: REPO_ROOT }) .map((path) => new Project(resolve(REPO_ROOT, path))), + ...glob + .sync('src/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) + .map((path) => new Project(resolve(REPO_ROOT, path))), + ...glob + .sync('x-pack/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) + .map((path) => new Project(resolve(REPO_ROOT, path))), ...glob .sync('examples/*/tsconfig.json', { cwd: REPO_ROOT }) .map((path) => new Project(resolve(REPO_ROOT, path))), diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts index 00968b7259a303..c52b9454c28be2 100644 --- a/src/dev/typescript/run_type_check_cli.ts +++ b/src/dev/typescript/run_type_check_cli.ts @@ -24,7 +24,7 @@ import getopts from 'getopts'; import { execInProjects } from './exec_in_projects'; import { filterProjectsByFlag } from './projects'; -import { buildRefs } from './build_refs'; +import { buildAllRefs } from './build_refs'; export async function runTypeCheckCli() { const extraFlags: string[] = []; @@ -80,7 +80,7 @@ export async function runTypeCheckCli() { process.exit(); } - await buildRefs(log); + await buildAllRefs(log); const tscArgs = [ // composite project cannot be used with --noEmit diff --git a/src/plugins/advanced_settings/public/management_app/_advanced_settings.scss b/src/plugins/advanced_settings/public/management_app/_advanced_settings.scss index 66ae9cca3f83b7..fd26677e938942 100644 --- a/src/plugins/advanced_settings/public/management_app/_advanced_settings.scss +++ b/src/plugins/advanced_settings/public/management_app/_advanced_settings.scss @@ -64,3 +64,7 @@ .mgtAdvancedSettingsForm__button { width: 100%; } + +.kbnBody--mgtAdvancedSettingsHasBottomBar .mgtPage__body { + padding-bottom: $euiSizeXL * 2; +} diff --git a/src/plugins/advanced_settings/public/management_app/components/form/__snapshots__/form.test.tsx.snap b/src/plugins/advanced_settings/public/management_app/components/form/__snapshots__/form.test.tsx.snap index e38ccb6866ab64..ebebf49c5213f8 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/__snapshots__/form.test.tsx.snap +++ b/src/plugins/advanced_settings/public/management_app/components/form/__snapshots__/form.test.tsx.snap @@ -18,6 +18,32 @@ exports[`Form should not render no settings message when instructed not to 1`] = General + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + { }) ); }); + + it('should save an array typed field when user provides an empty string correctly', async () => { + const wrapper = mountWithI18nProvider( +
+ ); + + (wrapper.instance() as Form).setState({ + unsavedChanges: { + 'general:test:array': { + value: '', + }, + }, + }); + + findTestSubject(wrapper.update(), `advancedSetting-saveButton`).simulate('click'); + expect(save).toHaveBeenCalledWith({ 'general:test:array': [] }); + }); + + it('should save an array typed field when user provides a comma separated string correctly', async () => { + const wrapper = mountWithI18nProvider( + + ); + + (wrapper.instance() as Form).setState({ + unsavedChanges: { + 'general:test:array': { + value: 'test1, test2', + }, + }, + }); + + findTestSubject(wrapper.update(), `advancedSetting-saveButton`).simulate('click'); + expect(save).toHaveBeenCalledWith({ 'general:test:array': ['test1', 'test2'] }); + }); }); diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index 0378d816fd2c3b..d243d85e12a665 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -154,7 +154,9 @@ export class Form extends PureComponent { let equalsToDefault = false; switch (type) { case 'array': - valueToSave = valueToSave.split(',').map((val: string) => val.trim()); + valueToSave = valueToSave.trim(); + valueToSave = + valueToSave === '' ? [] : valueToSave.split(',').map((val: string) => val.trim()); equalsToDefault = valueToSave.join(',') === (defVal as string[]).join(','); break; case 'json': @@ -386,6 +388,13 @@ export class Form extends PureComponent { const { unsavedChanges } = this.state; const { visibleSettings, categories, categoryCounts, clearQuery } = this.props; const currentCategories: Category[] = []; + const hasUnsavedChanges = !isEmpty(unsavedChanges); + + if (hasUnsavedChanges) { + document.body.classList.add('kbnBody--mgtAdvancedSettingsHasBottomBar'); + } else { + document.body.classList.remove('kbnBody--mgtAdvancedSettingsHasBottomBar'); + } categories.forEach((category) => { if (visibleSettings[category] && visibleSettings[category].length) { @@ -406,7 +415,7 @@ export class Form extends PureComponent { }) : this.maybeRenderNoSettings(clearQuery)}
- {!isEmpty(unsavedChanges) && this.renderBottomBar()} + {hasUnsavedChanges && this.renderBottomBar()} ); } diff --git a/src/plugins/charts/public/services/colors/color_palette.ts b/src/plugins/charts/public/services/colors/color_palette.ts index 464e9e3a66101d..e1c32fe68da124 100644 --- a/src/plugins/charts/public/services/colors/color_palette.ts +++ b/src/plugins/charts/public/services/colors/color_palette.ts @@ -17,8 +17,8 @@ * under the License. */ -import d3 from 'd3'; import _ from 'lodash'; +import { hsl } from 'color'; import { seedColors } from './seed_colors'; @@ -49,7 +49,7 @@ const fraction = function (goal: number) { * If the number is greater than the length of seed colors available, * new colors are generated up to the value of the input number. */ -export function createColorPalette(num?: any): string[] { +export function createColorPalette(num: number): string[] { if (!_.isNumber(num)) { throw new TypeError('ColorPaletteUtilService expects a number'); } @@ -58,7 +58,7 @@ export function createColorPalette(num?: any): string[] { const seedLength = seedColors.length; _.times(num - seedLength, function (i) { - colors.push(d3.hsl((fraction(i + seedLength + 1) * 360 + offset) % 360, 0.5, 0.5).toString()); + colors.push(hsl((fraction(i + seedLength + 1) * 360 + offset) % 360, 0.5, 0.5).hex()); }); return colors; diff --git a/src/plugins/charts/public/services/colors/colors_palette.test.ts b/src/plugins/charts/public/services/colors/colors_palette.test.ts index 6612447cefe9ec..02ff5a6056d549 100644 --- a/src/plugins/charts/public/services/colors/colors_palette.test.ts +++ b/src/plugins/charts/public/services/colors/colors_palette.test.ts @@ -37,26 +37,32 @@ describe('Color Palette', () => { it('should throw an error if input is not a number', () => { expect(() => { + // @ts-expect-error createColorPalette(string); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(bool); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(nullValue); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(emptyArr); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(emptyObject); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(); }).toThrowError(); }); diff --git a/src/plugins/charts/public/services/colors/mapped_colors.test.ts b/src/plugins/charts/public/services/colors/mapped_colors.test.ts index e97ca8ac257b4c..9d00bf098de4cc 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.test.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.test.ts @@ -18,7 +18,7 @@ */ import _ from 'lodash'; -import d3 from 'd3'; +import Color from 'color'; import { coreMock } from '../../../../../core/public/mocks'; import { COLOR_MAPPING_SETTING } from '../../../common'; @@ -61,7 +61,7 @@ describe('Mapped Colors', () => { mappedColors.mapKeys(arr); const colorValues = _(mappedColors.mapping).values(); - expect(colorValues.includes(seedColors[0])).toBe(false); + expect(colorValues).not.toContain(seedColors[0]); expect(colorValues.uniq().size()).toBe(arr.length); }); @@ -78,8 +78,8 @@ describe('Mapped Colors', () => { }); it('should treat different formats of colors as equal', () => { - const color = d3.rgb(seedColors[0]); - const rgb = `rgb(${color.r}, ${color.g}, ${color.b})`; + const color = new Color(seedColors[0]); + const rgb = `rgb(${color.red()}, ${color.green()}, ${color.blue()})`; const newConfig = { bar: rgb }; config.set(COLOR_MAPPING_SETTING, newConfig); diff --git a/src/plugins/charts/public/services/colors/mapped_colors.ts b/src/plugins/charts/public/services/colors/mapped_colors.ts index 3b9e1501d638d8..15f9be32b829c5 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.ts @@ -18,14 +18,14 @@ */ import _ from 'lodash'; -import d3 from 'd3'; +import Color from 'color'; import { CoreSetup } from 'kibana/public'; import { COLOR_MAPPING_SETTING } from '../../../common'; import { createColorPalette } from './color_palette'; -const standardizeColor = (color: string) => d3.rgb(color).toString(); +const standardizeColor = (color: string) => new Color(color).hex().toLowerCase(); /** * Maintains a lookup table that associates the value (key) with a hex color (value) diff --git a/src/plugins/data/README.md b/src/plugins/data/README.md index da0b71122fd9eb..33c07078c5348c 100644 --- a/src/plugins/data/README.md +++ b/src/plugins/data/README.md @@ -1,9 +1,137 @@ # data -`data` plugin provides common data access services. +The data plugin provides common data access services, such as `search` and `query`, for solutions and application developers. -- `expressions` — run pipeline functions and render results. -- `filter` -- `index_patterns` -- `query` -- `search`: Elasticsearch API service and strategies \ No newline at end of file +## Autocomplete + +The autocomplete service provides suggestions for field names and values. + +It is wired into the `TopNavMenu` component, but can be used independently. + +### Fetch Query Suggestions + +The `getQuerySuggestions` function helps to construct a query. +KQL suggestion functions are registered in X-Pack, so this API does not return results in OSS. + +```.ts + + // `inputValue` is the user input + const querySuggestions = await autocomplete.getQuerySuggestions({ + language: 'kuery', + indexPatterns: [indexPattern], + query: inputValue, + }); + +``` + +### Fetch Value Suggestions + +The `getValueSuggestions` function returns suggestions for field values. +This is helpful when you want to provide a user with options, for example when constructing a filter. + +```.ts + + // `inputValue` is the user input + const valueSuggestions = await autocomplete.getValueSuggestions({ + indexPattern, + field, + query: inputValue, + }); + +``` + +## Field Formats + +Coming soon. + +## Index Patterns + +Coming soon. + +## Query + +The query service is responsible for managing the configuration of a search query (`QueryState`): filters, time range, query string, and settings such as the auto refresh behavior and saved queries. + +It contains sub-services for each of those configurations: + - `data.query.filterManager` - Manages the `filters` component of a `QueryState`. The global filter state (filters that are persisted between applications) are owned by this service. + - `data.query.timefilter` - Responsible for the time range filter and the auto refresh behavior settings. + - `data.query.queryString` - Responsible for the query string and query language settings. + - `data.query.savedQueries` - Responsible for persisting a `QueryState` into a `SavedObject`, so it can be restored and used by other applications. + + Any changes to the `QueryState` are published on the `data.query.state$`, which is useful when wanting to persist global state or run a search upon data changes. + + A simple use case is: + + ```.ts + function searchOnChange(indexPattern: IndexPattern, aggConfigs: AggConfigs) { + data.query.state$.subscribe(() => { + + // Constuct the query portion of the search request + const query = data.query.getEsQuery(indexPattern); + + // Construct a request + const request = { + params: { + index: indexPattern.title, + body: { + aggs: aggConfigs.toDsl(), + query, + }, + }, + }; + + // Search with the `data.query` config + const search$ = data.search.search(request); + + ... + }); + } + + ``` + +## Search + +Provides access to Elasticsearch using the high-level `SearchSource` API or low-level `Search Strategies`. + +### SearchSource + +The `SearchSource` API is a convenient way to construct and run an Elasticsearch search query. + +```.tsx + + const searchSource = await data.search.searchSource.create(); + const searchResponse = await searchSource + .setParent(undefined) + .setField('index', indexPattern) + .setField('filter', filters) + .fetch(); + +``` + +### Low-level search + +#### Default Search Strategy + +One benefit of using the low-level search API, is partial response support in X-Pack, allowing for a better and more responsive user experience. +In OSS only the final result is returned. + +```.ts + import { isCompleteResponse } from '../plugins/data/public'; + + const search$ = data.search.search(request) + .subscribe({ + next: (response) => { + if (isCompleteResponse(response)) { + // Final result + search$.unsubscribe(); + } else { + // Partial result - you can update the UI, but data is still loading + } + }, + error: (e: Error) => { + // Show customized toast notifications. + // You may choose to handle errors differently if you prefer. + data.search.showError(e); + }, + }); +``` diff --git a/src/plugins/data/public/search/README.md b/src/plugins/data/public/search/README.md deleted file mode 100644 index 0a123ffa3f1e99..00000000000000 --- a/src/plugins/data/public/search/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# search - -The `search` service provides you with APIs to query Elasticsearch. - -The services are split into two parts: (1) low-level API; and (2) high-level API. - -## Low-level API - -With low level API you work directly with elasticsearch DSL - -```typescript -const results = await data.search.search(request, params); -``` - -## High-level API - -Using high-level API you work with Kibana abstractions around Elasticsearch DSL: filters, queries, and aggregations. Provided by the *Search Source* service. - -```typescript -const search = data.search.searchSource.createEmpty(); -search.setField('query', data.query.queryString); -const results = await search.fetch(); -``` diff --git a/src/plugins/data/public/search/errors/timeout_error.test.tsx b/src/plugins/data/public/search/errors/timeout_error.test.tsx index 87b491b976ebc1..ad3384c389fbf2 100644 --- a/src/plugins/data/public/search/errors/timeout_error.test.tsx +++ b/src/plugins/data/public/search/errors/timeout_error.test.tsx @@ -37,9 +37,9 @@ describe('SearchTimeoutError', () => { expect(component.find('EuiButton').length).toBe(1); component.find('EuiButton').simulate('click'); - expect(startMock.application.navigateToApp).toHaveBeenCalledWith('management', { - path: '/kibana/indexPatterns', - }); + expect(startMock.application.navigateToUrl).toHaveBeenCalledWith( + 'https://www.elastic.co/subscriptions' + ); }); it('Should create contact admin message', () => { diff --git a/src/plugins/data/public/search/errors/timeout_error.tsx b/src/plugins/data/public/search/errors/timeout_error.tsx index 56aecb42f5326e..a9ff0c3b38ae6d 100644 --- a/src/plugins/data/public/search/errors/timeout_error.tsx +++ b/src/plugins/data/public/search/errors/timeout_error.tsx @@ -78,9 +78,7 @@ export class SearchTimeoutError extends KbnError { private onClick(application: ApplicationStart) { switch (this.mode) { case TimeoutErrorMode.UPGRADE: - application.navigateToApp('management', { - path: `/kibana/indexPatterns`, - }); + application.navigateToUrl('https://www.elastic.co/subscriptions'); break; case TimeoutErrorMode.CHANGE: application.navigateToApp('management', { diff --git a/src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx b/src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx index 0e2bcc7581950a..7bd4facc9caa93 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx @@ -106,7 +106,11 @@ class FilterEditorUI extends Component { - + {this.state.isCustomEditorOpen ? ( {
as promised, not helpful
@@ -56,6 +57,7 @@ exports[`SuggestionComponent Should make the element active if the selected prop
as promised, not helpful
diff --git a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx index 724287b874bf70..20cb60ddab9e15 100644 --- a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx +++ b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx @@ -72,7 +72,9 @@ export function SuggestionComponent(props: Props) {
-
{props.suggestion.text}
+
+ {props.suggestion.text} +
{props.shouldDisplayDescription && (
{props.suggestion.description}
)} diff --git a/src/plugins/embeddable/README.asciidoc b/src/plugins/embeddable/README.asciidoc new file mode 100644 index 00000000000000..10ec2b840ffa70 --- /dev/null +++ b/src/plugins/embeddable/README.asciidoc @@ -0,0 +1,44 @@ +[[embeddable-plugin]] +== Embeddables plugin + +Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable _containers_. + +=== Embeddable containers + +Containers are a special type of embeddable that can contain nested embeddables. Embeddables can be dynamically added to embeddable _containers_. Currently only dashboard uses this interface. + +=== Examples + +Many example embeddables are implemented and registered https://github.com/elastic/kibana/tree/master/examples/embeddable_examples[here]. They can be played around with and explored https://github.com/elastic/kibana/tree/master/examples/embeddable_explorer[in the Embeddable Explorer example plugin]. Just run kibana with + +[source,sh] +-- +yarn start --run-examples +-- + +and navigate to the Embeddable explorer app. + +There is also an example of rendering dashboard container outside of dashboard app https://github.com/elastic/kibana/tree/master/examples/dashboard_embeddable_examples[here]. + +=== Docs + +(./docs/README.md)[Embeddable docs, guides & caveats] + +=== API docs + +==== Server API +https://github.com/elastic/kibana/blob/master/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablesetup.md[Server Setup contract] +https://github.com/elastic/kibana/blob/master/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.embeddablestart.md[Server Start contract] + +===== Browser API +https://github.com/elastic/kibana/blob/master/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablesetup.md[Browser Setup contract] +https://github.com/elastic/kibana/blob/master/docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.embeddablestart.md[Browser Start contract] + +=== Testing + +Run unit tests + +[source,sh] +-- +node scripts/jest embeddable +-- diff --git a/src/plugins/embeddable/README.md b/src/plugins/embeddable/README.md deleted file mode 100644 index 55abe8606159c6..00000000000000 --- a/src/plugins/embeddable/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Embeddables - -Embeddables are re-usable widgets that can be rendered in any environment or plugin. Developers can embed them directly in their plugin. End users can dynamically add them to any embeddable _containers_. - -## Embeddable containers - -Containers are a special type of embeddable that can contain nested embeddables. Embeddables can be dynamically added to embeddable _containers_. Currently only dashboard uses this interface. - -## Examples - -Many example embeddables are implemented and registered [here](https://github.com/elastic/kibana/tree/master/examples/embeddable_examples). They can be played around with and explored [in the Embeddable Explorer example plugin](https://github.com/elastic/kibana/tree/master/examples/embeddable_explorer). Just run kibana with - -``` -yarn start --run-examples -``` - -and navigate to the Embeddable explorer app. - -There is also an example of rendering dashboard container outside of dashboard app [here](https://github.com/elastic/kibana/tree/master/examples/dashboard_embeddable_examples). - -## Docs - -[Embeddable docs, guides & caveats](./docs/README.md) - -## Testing - -Run unit tests - -```shell -node scripts/jest embeddable -``` diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx index 51213288e47a75..f9be9d5bfade70 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { wait } from '@testing-library/dom'; -import { cleanup, render } from '@testing-library/react/pure'; +import { render } from '@testing-library/react'; import { HelloWorldEmbeddable, HelloWorldEmbeddableFactoryDefinition, @@ -29,8 +29,6 @@ import { EmbeddableRenderer } from './embeddable_renderer'; import { embeddablePluginMock } from '../../mocks'; describe('', () => { - afterEach(cleanup); - test('Render embeddable', () => { const embeddable = new HelloWorldEmbeddable({ id: 'hello' }); const { getByTestId } = render(); diff --git a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx index 17a2ac3b2a32b7..cb14d7ed11dc91 100644 --- a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.test.tsx @@ -17,13 +17,10 @@ * under the License. */ import React from 'react'; -import { wait } from '@testing-library/dom'; -import { cleanup, render } from '@testing-library/react/pure'; +import { wait, render } from '@testing-library/react'; import { ErrorEmbeddable } from './error_embeddable'; import { EmbeddableRoot } from './embeddable_root'; -afterEach(cleanup); - test('ErrorEmbeddable renders an embeddable', async () => { const embeddable = new ErrorEmbeddable('some error occurred', { id: '123', title: 'Error' }); const { getByTestId, getByText } = render(); diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx index 7dde84e510535e..c538b98949a43e 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx @@ -109,12 +109,11 @@ function renderTooltip(description: string) { ); } -const VISUALIZE_EMBEDDABLE_TYPE = 'visualization'; -type VisualizeEmbeddable = any; +type EmbeddableWithDescription = IEmbeddable & { getDescription: () => string }; -function getViewDescription(embeddable: IEmbeddable | VisualizeEmbeddable) { - if (embeddable.type === VISUALIZE_EMBEDDABLE_TYPE) { - const description = embeddable.getVisualizationDescription(); +function getViewDescription(embeddable: IEmbeddable | EmbeddableWithDescription) { + if ('getDescription' in embeddable) { + const description = embeddable.getDescription(); if (description) { return description; @@ -137,7 +136,7 @@ export function PanelHeader({ }: PanelHeaderProps) { const viewDescription = getViewDescription(embeddable); const showTitle = !hidePanelTitle && (!isViewMode || title || viewDescription !== ''); - const showPanelBar = badges.length > 0 || notifications.length > 0 || showTitle; + const showPanelBar = !isViewMode || badges.length > 0 || notifications.length > 0 || showTitle; const classes = classNames('embPanel__header', { // eslint-disable-next-line @typescript-eslint/naming-convention 'embPanel__header--floater': !showPanelBar, diff --git a/src/plugins/embeddable/public/public.api.md b/src/plugins/embeddable/public/public.api.md new file mode 100644 index 00000000000000..b01995ccaab089 --- /dev/null +++ b/src/plugins/embeddable/public/public.api.md @@ -0,0 +1,843 @@ +## API Report File for "kibana" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Action } from 'history'; +import { Action as Action_3 } from 'src/plugins/ui_actions/public'; +import { ActionExecutionContext as ActionExecutionContext_2 } from 'src/plugins/ui_actions/public'; +import { ApiResponse } from '@elastic/elasticsearch/lib/Transport'; +import { ApiResponse as ApiResponse_2 } from '@elastic/elasticsearch'; +import { ApplicationStart as ApplicationStart_2 } from 'kibana/public'; +import { Assign } from '@kbn/utility-types'; +import { BehaviorSubject } from 'rxjs'; +import Boom from 'boom'; +import { CoreSetup as CoreSetup_2 } from 'src/core/public'; +import { CoreSetup as CoreSetup_3 } from 'kibana/public'; +import { CoreStart as CoreStart_2 } from 'kibana/public'; +import * as CSS from 'csstype'; +import { EmbeddableStart as EmbeddableStart_2 } from 'src/plugins/embeddable/public/plugin'; +import { Ensure } from '@kbn/utility-types'; +import { EnvironmentMode } from '@kbn/config'; +import { ErrorToastOptions as ErrorToastOptions_2 } from 'src/core/public/notifications'; +import { EuiBreadcrumb } from '@elastic/eui'; +import { EuiButtonEmptyProps } from '@elastic/eui'; +import { EuiComboBoxProps } from '@elastic/eui'; +import { EuiConfirmModalProps } from '@elastic/eui'; +import { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiGlobalToastListToast } from '@elastic/eui'; +import { ExclusiveUnion } from '@elastic/eui'; +import { ExpressionAstFunction } from 'src/plugins/expressions/common'; +import { History } from 'history'; +import { Href } from 'history'; +import { IconType } from '@elastic/eui'; +import { ISearchOptions } from 'src/plugins/data/public'; +import { ISearchSource } from 'src/plugins/data/public'; +import { IStorageWrapper } from 'src/plugins/kibana_utils/public'; +import { IUiSettingsClient as IUiSettingsClient_2 } from 'src/core/public'; +import { KibanaClient } from '@elastic/elasticsearch/api/kibana'; +import { KibanaConfigType } from 'src/core/server/kibana_config'; +import { Location } from 'history'; +import { LocationDescriptorObject } from 'history'; +import { Logger } from '@kbn/logging'; +import { LogMeta } from '@kbn/logging'; +import { MaybePromise } from '@kbn/utility-types'; +import { Moment } from 'moment'; +import { NameList } from 'elasticsearch'; +import { NotificationsStart as NotificationsStart_2 } from 'src/core/public'; +import { Observable } from 'rxjs'; +import { Optional } from '@kbn/utility-types'; +import { OverlayStart as OverlayStart_2 } from 'src/core/public'; +import { PackageInfo } from '@kbn/config'; +import { Path } from 'history'; +import { PluginInitializerContext } from 'src/core/public'; +import * as PropTypes from 'prop-types'; +import { PublicMethodsOf } from '@kbn/utility-types'; +import { PublicUiSettingsParams } from 'src/core/server/types'; +import React from 'react'; +import { RecursiveReadonly } from '@kbn/utility-types'; +import { RequestAdapter } from 'src/plugins/inspector/common'; +import { Required } from '@kbn/utility-types'; +import * as Rx from 'rxjs'; +import { SavedObject as SavedObject_2 } from 'src/core/server'; +import { SavedObjectAttributes } from 'kibana/server'; +import { SavedObjectAttributes as SavedObjectAttributes_2 } from 'src/core/public'; +import { SavedObjectAttributes as SavedObjectAttributes_3 } from 'kibana/public'; +import { SavedObjectsClientContract as SavedObjectsClientContract_3 } from 'src/core/public'; +import { Search } from '@elastic/elasticsearch/api/requestParams'; +import { SearchResponse } from 'elasticsearch'; +import { SerializedFieldFormat as SerializedFieldFormat_2 } from 'src/plugins/expressions/common'; +import { ShallowPromise } from '@kbn/utility-types'; +import { SimpleSavedObject as SimpleSavedObject_2 } from 'src/core/public'; +import { ToastInputFields as ToastInputFields_2 } from 'src/core/public/notifications'; +import { ToastsSetup as ToastsSetup_2 } from 'kibana/public'; +import { TransportRequestOptions } from '@elastic/elasticsearch/lib/Transport'; +import { TransportRequestParams } from '@elastic/elasticsearch/lib/Transport'; +import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport'; +import { TypeOf } from '@kbn/config-schema'; +import { UiComponent } from 'src/plugins/kibana_utils/public'; +import { UnregisterCallback } from 'history'; +import { UserProvidedValues } from 'src/core/server/types'; + +// Warning: (ae-missing-release-tag) "ACTION_ADD_PANEL" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const ACTION_ADD_PANEL = "ACTION_ADD_PANEL"; + +// Warning: (ae-missing-release-tag) "ACTION_EDIT_PANEL" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const ACTION_EDIT_PANEL = "editPanel"; + +// Warning: (ae-missing-release-tag) "Adapters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface Adapters { + // (undocumented) + [key: string]: any; +} + +// Warning: (ae-forgotten-export) The symbol "ActionContext" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "AddPanelAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class AddPanelAction implements Action_3 { + // Warning: (ae-forgotten-export) The symbol "React" needs to be exported by the entry point index.d.ts + constructor(getFactory: EmbeddableStart_2['getEmbeddableFactory'], getAllFactories: EmbeddableStart_2['getEmbeddableFactories'], overlays: OverlayStart_2, notifications: NotificationsStart_2, SavedObjectFinder: React_2.ComponentType); + // (undocumented) + execute(context: ActionExecutionContext_2): Promise; + // (undocumented) + getDisplayName(): string; + // (undocumented) + getIconType(): string; + // (undocumented) + readonly id = "ACTION_ADD_PANEL"; + // (undocumented) + isCompatible(context: ActionExecutionContext_2): Promise; + // (undocumented) + readonly type = "ACTION_ADD_PANEL"; +} + +// Warning: (ae-missing-release-tag) "ChartActionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ChartActionContext = ValueClickContext | RangeSelectContext; + +// Warning: (ae-missing-release-tag) "Container" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export abstract class Container = {}, TContainerInput extends ContainerInput = ContainerInput, TContainerOutput extends ContainerOutput = ContainerOutput> extends Embeddable implements IContainer { + constructor(input: TContainerInput, output: TContainerOutput, getFactory: EmbeddableStart['getEmbeddableFactory'], parent?: Container); + // (undocumented) + addNewEmbeddable = IEmbeddable>(type: string, explicitInput: Partial): Promise; + // (undocumented) + protected readonly children: { + [key: string]: IEmbeddable | ErrorEmbeddable; + }; + // (undocumented) + protected createNewPanelState>(factory: EmbeddableFactory, partial?: Partial): PanelState; + // (undocumented) + destroy(): void; + // (undocumented) + getChild(id: string): E; + // (undocumented) + getChildIds(): string[]; + // (undocumented) + protected readonly getFactory: EmbeddableStart['getEmbeddableFactory']; + protected abstract getInheritedInput(id: string): TChildInput; + // (undocumented) + getInputForChild(embeddableId: string): TEmbeddableInput; + // (undocumented) + protected getPanelState(embeddableId: string): PanelState; + // (undocumented) + readonly isContainer: boolean; + // (undocumented) + reload(): void; + // (undocumented) + removeEmbeddable(embeddableId: string): void; + // (undocumented) + untilEmbeddableLoaded(id: string): Promise; + // (undocumented) + updateInputForChild(id: string, changes: Partial): void; +} + +// Warning: (ae-missing-release-tag) "ContainerInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ContainerInput extends EmbeddableInput { + // (undocumented) + hidePanelTitles?: boolean; + // (undocumented) + panels: { + [key: string]: PanelState; + }; +} + +// Warning: (ae-missing-release-tag) "ContainerOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ContainerOutput extends EmbeddableOutput { + // (undocumented) + embeddableLoaded: { + [key: string]: boolean; + }; +} + +// Warning: (ae-missing-release-tag) "CONTEXT_MENU_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const CONTEXT_MENU_TRIGGER = "CONTEXT_MENU_TRIGGER"; + +// Warning: (ae-forgotten-export) The symbol "Trigger" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "contextMenuTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const contextMenuTrigger: Trigger<'CONTEXT_MENU_TRIGGER'>; + +// Warning: (ae-missing-release-tag) "defaultEmbeddableFactoryProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const defaultEmbeddableFactoryProvider: = IEmbeddable, T extends SavedObjectAttributes_3 = SavedObjectAttributes_3>(def: EmbeddableFactoryDefinition) => EmbeddableFactory; + +// Warning: (ae-forgotten-export) The symbol "ActionContext" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EditPanelAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class EditPanelAction implements Action_3 { + constructor(getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory'], application: ApplicationStart_2, stateTransfer?: EmbeddableStateTransfer | undefined); + // (undocumented) + currentAppId: string | undefined; + // (undocumented) + execute(context: ActionContext_3): Promise; + // Warning: (ae-forgotten-export) The symbol "NavigationContext" needs to be exported by the entry point index.d.ts + // + // (undocumented) + getAppTarget({ embeddable }: ActionContext_3): NavigationContext | undefined; + // (undocumented) + getDisplayName({ embeddable }: ActionContext_3): string; + // (undocumented) + getHref({ embeddable }: ActionContext_3): Promise; + // (undocumented) + getIconType(): string; + // (undocumented) + readonly id = "editPanel"; + // (undocumented) + isCompatible({ embeddable }: ActionContext_3): Promise; + // (undocumented) + order: number; + // (undocumented) + readonly type = "editPanel"; +} + +// Warning: (ae-missing-release-tag) "Embeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export abstract class Embeddable implements IEmbeddable { + constructor(input: TEmbeddableInput, output: TEmbeddableOutput, parent?: IContainer); + destroy(): void; + // (undocumented) + getInput$(): Readonly>; + // (undocumented) + getInput(): Readonly; + getInspectorAdapters(): Adapters | undefined; + // (undocumented) + getIsContainer(): this is IContainer; + // (undocumented) + getOutput$(): Readonly>; + // (undocumented) + getOutput(): Readonly; + getRoot(): IEmbeddable | IContainer; + // (undocumented) + getTitle(): string; + // (undocumented) + readonly id: string; + // (undocumented) + protected input: TEmbeddableInput; + // (undocumented) + readonly isContainer: boolean; + // (undocumented) + protected output: TEmbeddableOutput; + // (undocumented) + readonly parent?: IContainer; + abstract reload(): void; + // (undocumented) + render(el: HTMLElement): void; + // Warning: (ae-forgotten-export) The symbol "RenderCompleteDispatcher" needs to be exported by the entry point index.d.ts + // + // (undocumented) + protected renderComplete: RenderCompleteDispatcher; + // (undocumented) + static runtimeId: number; + // (undocumented) + readonly runtimeId: number; + // Warning: (ae-forgotten-export) The symbol "TriggerContextMapping" needs to be exported by the entry point index.d.ts + // + // (undocumented) + supportedTriggers(): Array; + // (undocumented) + abstract readonly type: string; + // (undocumented) + updateInput(changes: Partial): void; + // (undocumented) + protected updateOutput(outputChanges: Partial): void; +} + +// Warning: (ae-forgotten-export) The symbol "State" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddableChildPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export class EmbeddableChildPanel extends React.Component { + constructor(props: EmbeddableChildPanelProps); + // (undocumented) + [panel: string]: any; + // (undocumented) + componentDidMount(): Promise; + // (undocumented) + componentWillUnmount(): void; + // (undocumented) + embeddable: IEmbeddable | ErrorEmbeddable; + // (undocumented) + mounted: boolean; + // (undocumented) + render(): JSX.Element; + } + +// Warning: (ae-missing-release-tag) "EmbeddableChildPanelProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableChildPanelProps { + // (undocumented) + className?: string; + // (undocumented) + container: IContainer; + // (undocumented) + embeddableId: string; + // (undocumented) + PanelComponent: EmbeddableStart['EmbeddablePanel']; +} + +// Warning: (ae-missing-release-tag) "EmbeddableContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableContext { + // (undocumented) + embeddable: IEmbeddable; +} + +// @public +export interface EmbeddableEditorState { + // (undocumented) + embeddableId?: string; + // (undocumented) + originatingApp: string; + // (undocumented) + valueInput?: EmbeddableInput; +} + +// Warning: (ae-forgotten-export) The symbol "PersistableState" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddableFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface EmbeddableFactory = IEmbeddable, TSavedObjectAttributes extends SavedObjectAttributes_2 = SavedObjectAttributes_2> extends PersistableState { + canCreateNew(): boolean; + create(initialInput: TEmbeddableInput, parent?: IContainer): Promise; + createFromSavedObject(savedObjectId: string, input: Partial, parent?: IContainer): Promise; + getDefaultInput(partial: Partial): Partial; + getDisplayName(): string; + getExplicitInput(): Promise>; + readonly isContainerType: boolean; + readonly isEditable: () => Promise; + // Warning: (ae-forgotten-export) The symbol "SavedObjectMetaData" needs to be exported by the entry point index.d.ts + // + // (undocumented) + readonly savedObjectMetaData?: SavedObjectMetaData; + // (undocumented) + readonly type: string; +} + +// Warning: (ae-missing-release-tag) "EmbeddableFactoryDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type EmbeddableFactoryDefinition = IEmbeddable, T extends SavedObjectAttributes = SavedObjectAttributes> = Pick, 'create' | 'type' | 'isEditable' | 'getDisplayName'> & Partial, 'createFromSavedObject' | 'isContainerType' | 'getExplicitInput' | 'savedObjectMetaData' | 'canCreateNew' | 'getDefaultInput' | 'telemetry' | 'extract' | 'inject'>>; + +// Warning: (ae-missing-release-tag) "EmbeddableFactoryNotFoundError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class EmbeddableFactoryNotFoundError extends Error { + constructor(type: string); + // (undocumented) + code: string; +} + +// Warning: (ae-missing-release-tag) "EmbeddableInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type EmbeddableInput = { + viewMode?: ViewMode; + title?: string; + id: string; + lastReloadRequestTime?: number; + hidePanelTitles?: boolean; + enhancements?: SerializableState; + disabledActions?: string[]; + disableTriggers?: boolean; + timeRange?: TimeRange; + query?: Query; + filters?: Filter[]; +}; + +// Warning: (ae-missing-release-tag) "EmbeddableInstanceConfiguration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableInstanceConfiguration { + // (undocumented) + id: string; + // (undocumented) + savedObjectId?: string; +} + +// Warning: (ae-missing-release-tag) "EmbeddableOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableOutput { + // (undocumented) + defaultTitle?: string; + // (undocumented) + editable?: boolean; + // (undocumented) + editApp?: string; + // (undocumented) + editPath?: string; + // (undocumented) + editUrl?: string; + // Warning: (ae-forgotten-export) The symbol "EmbeddableError" needs to be exported by the entry point index.d.ts + // + // (undocumented) + error?: EmbeddableError; + // (undocumented) + loading?: boolean; + // (undocumented) + savedObjectId?: string; + // (undocumented) + title?: string; +} + +// @public +export interface EmbeddablePackageState { + // (undocumented) + embeddableId?: string; + // (undocumented) + input: Optional | Optional; + // (undocumented) + type: string; +} + +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "State" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddablePanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class EmbeddablePanel extends React.Component { + constructor(props: Props); + // (undocumented) + closeMyContextMenuPanel: () => void; + // (undocumented) + componentDidMount(): void; + // (undocumented) + componentWillUnmount(): void; + // (undocumented) + onBlur: (blurredPanelIndex: string) => void; + // (undocumented) + onFocus: (focusedPanelIndex: string) => void; + // (undocumented) + render(): JSX.Element; + // (undocumented) + UNSAFE_componentWillMount(): void; +} + +// Warning: (ae-missing-release-tag) "EmbeddablePanelHOC" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type EmbeddablePanelHOC = React.FC<{ + embeddable: IEmbeddable; + hideHeader?: boolean; +}>; + +// @public +export const EmbeddableRenderer: (props: EmbeddableRendererProps) => JSX.Element; + +// Warning: (ae-forgotten-export) The symbol "EmbeddableRendererPropsWithEmbeddable" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "EmbeddableRendererWithFactory" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddableRendererProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type EmbeddableRendererProps = EmbeddableRendererPropsWithEmbeddable | EmbeddableRendererWithFactory; + +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddableRoot" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class EmbeddableRoot extends React.Component { + constructor(props: Props_2); + // (undocumented) + componentDidMount(): void; + // (undocumented) + componentDidUpdate(prevProps?: Props_2): void; + // (undocumented) + render(): JSX.Element; + // (undocumented) + shouldComponentUpdate(newProps: Props_2): boolean; +} + +// Warning: (ae-missing-release-tag) "EmbeddableSetup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableSetup { + // (undocumented) + registerEmbeddableFactory: = IEmbeddable>(id: string, factory: EmbeddableFactoryDefinition) => () => EmbeddableFactory; + // (undocumented) + registerEnhancement: (enhancement: EnhancementRegistryDefinition) => void; + // Warning: (ae-forgotten-export) The symbol "EmbeddableFactoryProvider" needs to be exported by the entry point index.d.ts + // + // (undocumented) + setCustomEmbeddableFactoryProvider: (customProvider: EmbeddableFactoryProvider) => void; +} + +// Warning: (ae-missing-release-tag) "EmbeddableSetupDependencies" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableSetupDependencies { + // Warning: (ae-forgotten-export) The symbol "DataPublicPluginSetup" needs to be exported by the entry point index.d.ts + // + // (undocumented) + data: DataPublicPluginSetup; + // Warning: (ae-forgotten-export) The symbol "UiActionsSetup" needs to be exported by the entry point index.d.ts + // + // (undocumented) + uiActions: UiActionsSetup; +} + +// Warning: (ae-missing-release-tag) "EmbeddableStart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableStart extends PersistableState { + // (undocumented) + EmbeddablePanel: EmbeddablePanelHOC; + // (undocumented) + getEmbeddableFactories: () => IterableIterator; + // (undocumented) + getEmbeddableFactory: = IEmbeddable>(embeddableFactoryId: string) => EmbeddableFactory | undefined; + // (undocumented) + getEmbeddablePanel: (stateTransfer?: EmbeddableStateTransfer) => EmbeddablePanelHOC; + // Warning: (ae-forgotten-export) The symbol "ScopedHistory" needs to be exported by the entry point index.d.ts + // + // (undocumented) + getStateTransfer: (history?: ScopedHistory) => EmbeddableStateTransfer; +} + +// Warning: (ae-missing-release-tag) "EmbeddableStartDependencies" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableStartDependencies { + // Warning: (ae-forgotten-export) The symbol "DataPublicPluginStart" needs to be exported by the entry point index.d.ts + // + // (undocumented) + data: DataPublicPluginStart; + // Warning: (ae-forgotten-export) The symbol "Start" needs to be exported by the entry point index.d.ts + // + // (undocumented) + inspector: Start; + // Warning: (ae-forgotten-export) The symbol "UiActionsStart" needs to be exported by the entry point index.d.ts + // + // (undocumented) + uiActions: UiActionsStart; +} + +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "ScopedHistory" +// +// @public +export class EmbeddableStateTransfer { + // Warning: (ae-forgotten-export) The symbol "ApplicationStart" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "PublicAppInfo" needs to be exported by the entry point index.d.ts + constructor(navigateToApp: ApplicationStart['navigateToApp'], scopedHistory?: ScopedHistory | undefined, appList?: ReadonlyMap | undefined); + getAppNameFromId: (appId: string) => string | undefined; + getIncomingEditorState(options?: { + keysToRemoveAfterFetch?: string[]; + }): EmbeddableEditorState | undefined; + getIncomingEmbeddablePackage(options?: { + keysToRemoveAfterFetch?: string[]; + }): EmbeddablePackageState | undefined; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "ApplicationStart" + navigateToEditor(appId: string, options?: { + path?: string; + state: EmbeddableEditorState; + appendToExistingState?: boolean; + }): Promise; + // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "ApplicationStart" + navigateToWithEmbeddablePackage(appId: string, options?: { + path?: string; + state: EmbeddablePackageState; + appendToExistingState?: boolean; + }): Promise; + } + +// Warning: (ae-forgotten-export) The symbol "PersistableStateDefinition" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EnhancementRegistryDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EnhancementRegistryDefinition

extends PersistableStateDefinition

{ + // (undocumented) + id: string; +} + +// Warning: (ae-missing-release-tag) "ErrorEmbeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class ErrorEmbeddable extends Embeddable { + constructor(error: Error | string, input: EmbeddableInput, parent?: IContainer); + // (undocumented) + destroy(): void; + // (undocumented) + error: Error | string; + // (undocumented) + reload(): void; + // (undocumented) + render(dom: HTMLElement): void; + // (undocumented) + readonly type = "error"; +} + +// Warning: (ae-missing-release-tag) "IContainer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface IContainer = ContainerInput, O extends ContainerOutput = ContainerOutput> extends IEmbeddable { + addNewEmbeddable = Embeddable>(type: string, explicitInput: Partial): Promise; + getChild = Embeddable>(id: string): E; + getInputForChild(id: string): EEI; + removeEmbeddable(embeddableId: string): void; + untilEmbeddableLoaded(id: string): Promise; + updateInputForChild(id: string, changes: Partial): void; +} + +// Warning: (ae-missing-release-tag) "IEmbeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface IEmbeddable { + destroy(): void; + enhancements?: object; + getInput$(): Readonly>; + getInput(): Readonly; + getInspectorAdapters(): Adapters | undefined; + getIsContainer(): this is IContainer; + getOutput$(): Readonly>; + getOutput(): Readonly; + getRoot(): IEmbeddable | IContainer; + getTitle(): string | undefined; + readonly id: string; + readonly isContainer: boolean; + readonly parent?: IContainer; + reload(): void; + render(domNode: HTMLElement | Element): void; + readonly runtimeId?: number; + supportedTriggers(): Array; + readonly type: string; + updateInput(changes: Partial): void; +} + +// Warning: (ae-missing-release-tag) "isErrorEmbeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function isErrorEmbeddable(embeddable: TEmbeddable | ErrorEmbeddable): embeddable is ErrorEmbeddable; + +// Warning: (ae-missing-release-tag) "isRangeSelectTriggerContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const isRangeSelectTriggerContext: (context: ChartActionContext) => context is RangeSelectContext>; + +// Warning: (ae-missing-release-tag) "isReferenceOrValueEmbeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function isReferenceOrValueEmbeddable(incoming: unknown): incoming is ReferenceOrValueEmbeddable; + +// Warning: (ae-missing-release-tag) "isSavedObjectEmbeddableInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function isSavedObjectEmbeddableInput(input: EmbeddableInput | SavedObjectEmbeddableInput): input is SavedObjectEmbeddableInput; + +// Warning: (ae-missing-release-tag) "isValueClickTriggerContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const isValueClickTriggerContext: (context: ChartActionContext) => context is ValueClickContext>; + +// Warning: (ae-missing-release-tag) "openAddPanelFlyout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function openAddPanelFlyout(options: { + embeddable: IContainer; + getFactory: EmbeddableStart['getEmbeddableFactory']; + getAllFactories: EmbeddableStart['getEmbeddableFactories']; + overlays: OverlayStart_2; + notifications: NotificationsStart_2; + SavedObjectFinder: React.ComponentType; +}): Promise; + +// Warning: (ae-missing-release-tag) "OutputSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface OutputSpec { + // (undocumented) + [key: string]: PropertySpec; +} + +// Warning: (ae-missing-release-tag) "PANEL_BADGE_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const PANEL_BADGE_TRIGGER = "PANEL_BADGE_TRIGGER"; + +// Warning: (ae-missing-release-tag) "PANEL_NOTIFICATION_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const PANEL_NOTIFICATION_TRIGGER = "PANEL_NOTIFICATION_TRIGGER"; + +// Warning: (ae-missing-release-tag) "panelBadgeTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const panelBadgeTrigger: Trigger<'PANEL_BADGE_TRIGGER'>; + +// Warning: (ae-missing-release-tag) "PanelNotFoundError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class PanelNotFoundError extends Error { + constructor(); + // (undocumented) + code: string; +} + +// Warning: (ae-missing-release-tag) "panelNotificationTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const panelNotificationTrigger: Trigger<'PANEL_NOTIFICATION_TRIGGER'>; + +// Warning: (ae-missing-release-tag) "PanelState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface PanelState { + // (undocumented) + explicitInput: Partial & { + id: string; + }; + // (undocumented) + type: string; +} + +// Warning: (ae-forgotten-export) The symbol "EmbeddablePublicPlugin" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "plugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function plugin(initializerContext: PluginInitializerContext): EmbeddablePublicPlugin; + +// Warning: (ae-missing-release-tag) "PropertySpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface PropertySpec { + // (undocumented) + accessPath: string; + // (undocumented) + description: string; + // (undocumented) + displayName: string; + // (undocumented) + id: string; + // (undocumented) + value?: string; +} + +// Warning: (ae-missing-release-tag) "RangeSelectContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface RangeSelectContext { + // (undocumented) + data: { + table: KibanaDatatable; + column: number; + range: number[]; + timeFieldName?: string; + }; + // (undocumented) + embeddable?: T; +} + +// @public +export interface ReferenceOrValueEmbeddable { + getInputAsRefType: () => Promise; + getInputAsValueType: () => Promise; + inputIsRefType: (input: ValTypeInput | RefTypeInput) => input is RefTypeInput; +} + +// Warning: (ae-missing-release-tag) "SavedObjectEmbeddableInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface SavedObjectEmbeddableInput extends EmbeddableInput { + // (undocumented) + savedObjectId: string; +} + +// Warning: (ae-missing-release-tag) "ValueClickContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ValueClickContext { + // (undocumented) + data: { + data: Array<{ + table: Pick; + column: number; + row: number; + value: any; + }>; + timeFieldName?: string; + negate?: boolean; + }; + // (undocumented) + embeddable?: T; +} + +// Warning: (ae-missing-release-tag) "ViewMode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export enum ViewMode { + // (undocumented) + EDIT = "edit", + // (undocumented) + VIEW = "view" +} + +// Warning: (ae-missing-release-tag) "withEmbeddableSubscription" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const withEmbeddableSubscription: = IEmbeddable, ExtraProps = {}>(WrappedComponent: React.ComponentType<{ + input: I; + output: O; + embeddable: E; +} & ExtraProps>) => React.ComponentType<{ + embeddable: E; +} & ExtraProps>; + + +// Warnings were encountered during analysis: +// +// src/plugins/embeddable/common/types.ts:44:3 - (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts +// src/plugins/embeddable/common/types.ts:59:3 - (ae-forgotten-export) The symbol "TimeRange" needs to be exported by the entry point index.d.ts +// src/plugins/embeddable/common/types.ts:64:3 - (ae-forgotten-export) The symbol "Query" needs to be exported by the entry point index.d.ts +// src/plugins/embeddable/common/types.ts:69:3 - (ae-forgotten-export) The symbol "Filter" needs to be exported by the entry point index.d.ts +// src/plugins/embeddable/public/lib/triggers/triggers.ts:45:5 - (ae-forgotten-export) The symbol "KibanaDatatable" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/src/plugins/embeddable/server/server.api.md b/src/plugins/embeddable/server/server.api.md new file mode 100644 index 00000000000000..c4fad2917343ba --- /dev/null +++ b/src/plugins/embeddable/server/server.api.md @@ -0,0 +1,50 @@ +## API Report File for "kibana" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CoreSetup } from 'kibana/server'; +import { CoreStart } from 'kibana/server'; +import { Plugin } from 'kibana/server'; +import { SavedObjectReference as SavedObjectReference_2 } from 'kibana/server'; + +// Warning: (ae-forgotten-export) The symbol "EmbeddableInput" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "PersistableStateDefinition" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddableRegistryDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableRegistryDefinition

extends PersistableStateDefinition

{ + // (undocumented) + id: string; +} + +// Warning: (ae-missing-release-tag) "EmbeddableSetup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EmbeddableSetup { + // (undocumented) + registerEmbeddableFactory: (factory: EmbeddableRegistryDefinition) => void; + // (undocumented) + registerEnhancement: (enhancement: EnhancementRegistryDefinition) => void; +} + +// Warning: (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EnhancementRegistryDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface EnhancementRegistryDefinition

extends PersistableStateDefinition

{ + // (undocumented) + id: string; +} + +// Warning: (ae-forgotten-export) The symbol "EmbeddableServerPlugin" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "plugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const plugin: () => EmbeddableServerPlugin; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/src/plugins/es_ui_shared/static/forms/components/index.ts b/src/plugins/es_ui_shared/static/forms/components/index.ts index 6e319978e9392d..1108c56161966a 100644 --- a/src/plugins/es_ui_shared/static/forms/components/index.ts +++ b/src/plugins/es_ui_shared/static/forms/components/index.ts @@ -17,6 +17,21 @@ * under the License. */ +/* +@TODO + +The brace/mode/json import below is loaded eagerly - before this plugin is explicitly loaded by users. This makes +the brace JSON mode, used for JSON syntax highlighting and grammar checking, available across all of Kibana plugins. + +This is not ideal because we are loading JS that is not necessary for Kibana to start, but the alternative +is breaking JSON mode for an unknown number of ace editors across Kibana - not all components reference the underlying +EuiCodeEditor (for instance, explicitly). + +Importing here is a way of preventing a more sophisticated solution to this problem since we want to, eventually, +migrate all code editors over to Monaco. Once that is done, we should remove this import. + */ +import 'brace/mode/json'; + export * from './field'; export * from './form_row'; export * from './fields'; diff --git a/src/plugins/expressions/common/expression_renderers/types.ts b/src/plugins/expressions/common/expression_renderers/types.ts index 7b3e812eafedd4..b760e7b32a7d2b 100644 --- a/src/plugins/expressions/common/expression_renderers/types.ts +++ b/src/plugins/expressions/common/expression_renderers/types.ts @@ -28,7 +28,7 @@ export interface ExpressionRenderDefinition { /** * A user friendly name of the renderer as will be displayed to user in UI. */ - displayName: string; + displayName?: string; /** * Help text as will be displayed to user. A sentence or few about what this diff --git a/src/plugins/expressions/public/public.api.md b/src/plugins/expressions/public/public.api.md index 162f0ef6824f5b..5c0fd8ab1a5729 100644 --- a/src/plugins/expressions/public/public.api.md +++ b/src/plugins/expressions/public/public.api.md @@ -429,7 +429,7 @@ export interface ExpressionImage { // // @public (undocumented) export interface ExpressionRenderDefinition { - displayName: string; + displayName?: string; help?: string; name: string; render: (domNode: HTMLElement, config: Config, handlers: IInterpreterRenderHandlers) => void | Promise; diff --git a/src/plugins/expressions/server/server.api.md b/src/plugins/expressions/server/server.api.md index 6ac251ea005b44..d8872ee4160174 100644 --- a/src/plugins/expressions/server/server.api.md +++ b/src/plugins/expressions/server/server.api.md @@ -401,7 +401,7 @@ export interface ExpressionImage { // // @public (undocumented) export interface ExpressionRenderDefinition { - displayName: string; + displayName?: string; help?: string; name: string; render: (domNode: HTMLElement, config: Config, handlers: IInterpreterRenderHandlers) => void | Promise; diff --git a/src/plugins/home/public/application/components/sample_data/index.tsx b/src/plugins/home/public/application/components/sample_data/index.tsx index 2a51b48b084696..5f15994acc1cbc 100644 --- a/src/plugins/home/public/application/components/sample_data/index.tsx +++ b/src/plugins/home/public/application/components/sample_data/index.tsx @@ -30,8 +30,8 @@ import { EuiButton, EuiButtonEmpty, } from '@elastic/eui'; - import { FormattedMessage } from '@kbn/i18n/react'; +import { getServices } from '../../kibana_services'; interface Props { urlBasePath: string; @@ -40,22 +40,29 @@ interface Props { } export function SampleDataCard({ urlBasePath, onDecline, onConfirm }: Props) { + const IS_DARK_THEME = getServices().uiSettings.get('theme:darkMode'); + const cardGraphicFile = !IS_DARK_THEME + ? 'illustration_integrations_lightmode.png' + : 'illustration_integrations_darkmode.png'; + const cardGraphicURL = `${urlBasePath}/plugins/home/assets/common/${cardGraphicFile}`; + return ( } + title={ + + } description={ } footer={

+``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.id.md) | string | | + diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.md new file mode 100644 index 00000000000000..19ee57d677250f --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) + +## kibana-plugin-plugins-embeddable-server package + +## Interfaces + +| Interface | Description | +| --- | --- | +| [EmbeddableRegistryDefinition](./kibana-plugin-plugins-embeddable-server.embeddableregistrydefinition.md) | | +| [EmbeddableSetup](./kibana-plugin-plugins-embeddable-server.embeddablesetup.md) | | +| [EnhancementRegistryDefinition](./kibana-plugin-plugins-embeddable-server.enhancementregistrydefinition.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [plugin](./kibana-plugin-plugins-embeddable-server.plugin.md) | | + diff --git a/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.plugin.md b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.plugin.md new file mode 100644 index 00000000000000..989f3c3e60963f --- /dev/null +++ b/docs/development/plugins/embeddable/server/kibana-plugin-plugins-embeddable-server.plugin.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) > [plugin](./kibana-plugin-plugins-embeddable-server.plugin.md) + +## plugin variable + +Signature: + +```typescript +plugin: () => EmbeddableServerPlugin +``` diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.displayname.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.displayname.md index 9d5f7609ee6cd2..a957ecd63f0430 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.displayname.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.displayname.md @@ -9,5 +9,5 @@ A user friendly name of the renderer as will be displayed to user in UI. Signature: ```typescript -displayName: string; +displayName?: string; ``` diff --git a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionrenderdefinition.displayname.md b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionrenderdefinition.displayname.md index e936e25cee6cad..8ae5aa2f1790ec 100644 --- a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionrenderdefinition.displayname.md +++ b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.expressionrenderdefinition.displayname.md @@ -9,5 +9,5 @@ A user friendly name of the renderer as will be displayed to user in UI. Signature: ```typescript -displayName: string; +displayName?: string; ``` diff --git a/docs/development/plugins/ui_actions/public/index.md b/docs/development/plugins/ui_actions/public/index.md new file mode 100644 index 00000000000000..cbc7035b880fa1 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md new file mode 100644 index 00000000000000..22a520123cf3f3 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [execute](./kibana-plugin-plugins-ui_actions-public.action.execute.md) + +## Action.execute() method + +Executes the action. + +Signature: + +```typescript +execute(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md new file mode 100644 index 00000000000000..cd8cc527e96ec6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getDisplayName](./kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md) + +## Action.getDisplayName() method + +Returns a title to be displayed to the user. + +Signature: + +```typescript +getDisplayName(context: ActionExecutionContext): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md new file mode 100644 index 00000000000000..5ad9d5e24cf87a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.action.gethref.md) + +## Action.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md new file mode 100644 index 00000000000000..34d45c4ec75c2f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getIconType](./kibana-plugin-plugins-ui_actions-public.action.geticontype.md) + +## Action.getIconType() method + +Optional EUI icon type that can be displayed along with the title. + +Signature: + +```typescript +getIconType(context: ActionExecutionContext): string | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`string | undefined` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md new file mode 100644 index 00000000000000..e32a5c8592ccea --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [id](./kibana-plugin-plugins-ui_actions-public.action.id.md) + +## Action.id property + +A unique identifier for this action instance. + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md new file mode 100644 index 00000000000000..7a1f6cd23be171 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.action.iscompatible.md) + +## Action.isCompatible() method + +Returns a promise that resolves to true if this action is compatible given the context, otherwise resolves to false. + +Signature: + +```typescript +isCompatible(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md new file mode 100644 index 00000000000000..19af63a679de85 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) + +## Action interface + +Signature: + +```typescript +export interface Action extends Partial>> +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-ui_actions-public.action.id.md) | string | A unique identifier for this action instance. | +| [MenuItem](./kibana-plugin-plugins-ui_actions-public.action.menuitem.md) | UiComponent<{
context: ActionExecutionContext<Context>;
}> | UiComponent to render when displaying this action as a context menu item. If not provided, getDisplayName will be used instead. | +| [order](./kibana-plugin-plugins-ui_actions-public.action.order.md) | number | Determined the order when there is more than one action matched to a trigger. Higher numbers are displayed first. | +| [type](./kibana-plugin-plugins-ui_actions-public.action.type.md) | T | The action type is what determines the context shape. | + +## Methods + +| Method | Description | +| --- | --- | +| [execute(context)](./kibana-plugin-plugins-ui_actions-public.action.execute.md) | Executes the action. | +| [getDisplayName(context)](./kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md) | Returns a title to be displayed to the user. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.action.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [getIconType(context)](./kibana-plugin-plugins-ui_actions-public.action.geticontype.md) | Optional EUI icon type that can be displayed along with the title. | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.action.iscompatible.md) | Returns a promise that resolves to true if this action is compatible given the context, otherwise resolves to false. | +| [shouldAutoExecute(context)](./kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md) | Determines if action should be executed automatically, without first showing up in context menu. false by default. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md new file mode 100644 index 00000000000000..ac2168b88e3bec --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [MenuItem](./kibana-plugin-plugins-ui_actions-public.action.menuitem.md) + +## Action.MenuItem property + +`UiComponent` to render when displaying this action as a context menu item. If not provided, `getDisplayName` will be used instead. + +Signature: + +```typescript +MenuItem?: UiComponent<{ + context: ActionExecutionContext; + }>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md new file mode 100644 index 00000000000000..ce9f66cfe5143b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [order](./kibana-plugin-plugins-ui_actions-public.action.order.md) + +## Action.order property + +Determined the order when there is more than one action matched to a trigger. Higher numbers are displayed first. + +Signature: + +```typescript +order?: number; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md new file mode 100644 index 00000000000000..1a784f5dad2d52 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [shouldAutoExecute](./kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md) + +## Action.shouldAutoExecute() method + +Determines if action should be executed automatically, without first showing up in context menu. false by default. + +Signature: + +```typescript +shouldAutoExecute?(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md new file mode 100644 index 00000000000000..c423df9d1324c6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [type](./kibana-plugin-plugins-ui_actions-public.action.type.md) + +## Action.type property + +The action type is what determines the context shape. + +Signature: + +```typescript +readonly type: T; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md new file mode 100644 index 00000000000000..25788d7aecc9ff --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_field.md) + +## ACTION\_VISUALIZE\_FIELD variable + +Signature: + +```typescript +ACTION_VISUALIZE_FIELD = "ACTION_VISUALIZE_FIELD" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md new file mode 100644 index 00000000000000..c9ef93eff934b2 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md) + +## ACTION\_VISUALIZE\_GEO\_FIELD variable + +Signature: + +```typescript +ACTION_VISUALIZE_GEO_FIELD = "ACTION_VISUALIZE_GEO_FIELD" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md new file mode 100644 index 00000000000000..3ceb96adadb1a6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionByType](./kibana-plugin-plugins-ui_actions-public.actionbytype.md) + +## ActionByType type + +Signature: + +```typescript +export declare type ActionByType = Action; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md new file mode 100644 index 00000000000000..eb7b1e5954ed29 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [""](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md) + +## ActionContextMapping."" property + +Signature: + +```typescript +[DEFAULT_ACTION]: BaseContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md new file mode 100644 index 00000000000000..eb0547bbf82611 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md) + +## ActionContextMapping.ACTION\_VISUALIZE\_FIELD property + +Signature: + +```typescript +[ACTION_VISUALIZE_FIELD]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md new file mode 100644 index 00000000000000..b44ed751064237 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md) + +## ActionContextMapping.ACTION\_VISUALIZE\_GEO\_FIELD property + +Signature: + +```typescript +[ACTION_VISUALIZE_GEO_FIELD]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md new file mode 100644 index 00000000000000..740e6ac63bfbaf --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) + +## ActionContextMapping interface + +Signature: + +```typescript +export interface ActionContextMapping +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [""](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md) | BaseContext | | +| [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md) | VisualizeFieldContext | | +| [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md) | VisualizeFieldContext | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md new file mode 100644 index 00000000000000..ba4dc39088fe4f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionDefinitionByType](./kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md) + +## ActionDefinitionByType type + +Signature: + +```typescript +export declare type ActionDefinitionByType = ActionDefinition; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md new file mode 100644 index 00000000000000..3271d867799598 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionContext](./kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md) + +## ActionExecutionContext type + +Action methods are executed with Context from trigger + [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) + +Signature: + +```typescript +export declare type ActionExecutionContext = Context & ActionExecutionMeta; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md new file mode 100644 index 00000000000000..2056d8f9c7fc61 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) + +## ActionExecutionMeta interface + +During action execution we can provide additional information, for example, trigger, that caused the action execution + +Signature: + +```typescript +export interface ActionExecutionMeta +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [trigger](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md) | Trigger | Trigger that executed the action | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md new file mode 100644 index 00000000000000..530c2fe514d2ce --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) > [trigger](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md) + +## ActionExecutionMeta.trigger property + +Trigger that executed the action + +Signature: + +```typescript +trigger: Trigger; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md new file mode 100644 index 00000000000000..49165855310045 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionType](./kibana-plugin-plugins-ui_actions-public.actiontype.md) + +## ActionType type + +Signature: + +```typescript +export declare type ActionType = keyof ActionContextMapping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md new file mode 100644 index 00000000000000..94e66bf404f5ce --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md) + +## APPLY\_FILTER\_TRIGGER variable + +Signature: + +```typescript +APPLY_FILTER_TRIGGER = "FILTER_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md new file mode 100644 index 00000000000000..e1fb6d342457e8 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md) + +## applyFilterTrigger variable + +Signature: + +```typescript +applyFilterTrigger: Trigger<'FILTER_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md new file mode 100644 index 00000000000000..2d6c0ff1060724 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [buildContextMenuForActions](./kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md) + +## buildContextMenuForActions() function + +Transforms an array of Actions to the shape EuiContextMenuPanel expects. + +Signature: + +```typescript +export declare function buildContextMenuForActions({ actions, title, closeMenu, }: BuildContextMenuParams): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { actions, title, closeMenu, } | BuildContextMenuParams | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md new file mode 100644 index 00000000000000..04ab36c2e3f58a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [createAction](./kibana-plugin-plugins-ui_actions-public.createaction.md) + +## createAction() function + +Signature: + +```typescript +export declare function createAction(action: ActionDefinitionByType): ActionByType; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| action | ActionDefinitionByType<T> | | + +Returns: + +`ActionByType` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md new file mode 100644 index 00000000000000..f06bb05270ff04 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) > [(constructor)](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md) + +## IncompatibleActionError.(constructor) + +Constructs a new instance of the `IncompatibleActionError` class + +Signature: + +```typescript +constructor(); +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md new file mode 100644 index 00000000000000..f16aa47438d726 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) > [code](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md) + +## IncompatibleActionError.code property + +Signature: + +```typescript +code: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md new file mode 100644 index 00000000000000..7c9943a53c2bbb --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) + +## IncompatibleActionError class + +Signature: + +```typescript +export declare class IncompatibleActionError extends Error +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)()](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md) | | Constructs a new instance of the IncompatibleActionError class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [code](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md) | | string | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md new file mode 100644 index 00000000000000..ce4e8c17b9dffb --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md @@ -0,0 +1,66 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) + +## kibana-plugin-plugins-ui\_actions-public package + +## Classes + +| Class | Description | +| --- | --- | +| [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) | | +| [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) | | + +## Functions + +| Function | Description | +| --- | --- | +| [buildContextMenuForActions({ actions, title, closeMenu, })](./kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md) | Transforms an array of Actions to the shape EuiContextMenuPanel expects. | +| [createAction(action)](./kibana-plugin-plugins-ui_actions-public.createaction.md) | | +| [plugin(initializerContext)](./kibana-plugin-plugins-ui_actions-public.plugin.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [Action](./kibana-plugin-plugins-ui_actions-public.action.md) | | +| [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) | | +| [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) | During action execution we can provide additional information, for example, trigger, that caused the action execution | +| [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) | This is a convenience interface used to register a \*trigger\*.Trigger specifies a named anchor to which Action can be attached. When Trigger is being \*called\* it creates a Context object and passes it to the execute method of an Action.More than one action can be attached to a single trigger, in which case when trigger is \*called\* it first displays a context menu for user to pick a single action to execute. | +| [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) | | +| [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) | A convenience interface used to register an action. | +| [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) | Represents something that can be displayed to user in UI. | +| [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) | | +| [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_field.md) | | +| [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md) | | +| [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md) | | +| [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md) | | +| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.select_range_trigger.md) | | +| [selectRangeTrigger](./kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md) | | +| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.value_click_trigger.md) | | +| [valueClickTrigger](./kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md) | | +| [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md) | | +| [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md) | | +| [visualizeFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md) | | +| [visualizeGeoFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [ActionByType](./kibana-plugin-plugins-ui_actions-public.actionbytype.md) | | +| [ActionDefinitionByType](./kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md) | | +| [ActionExecutionContext](./kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md) | Action methods are executed with Context from trigger + [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) | +| [ActionType](./kibana-plugin-plugins-ui_actions-public.actiontype.md) | | +| [TriggerContext](./kibana-plugin-plugins-ui_actions-public.triggercontext.md) | | +| [TriggerId](./kibana-plugin-plugins-ui_actions-public.triggerid.md) | | +| [UiActionsPresentableGrouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md) | | +| [UiActionsSetup](./kibana-plugin-plugins-ui_actions-public.uiactionssetup.md) | | +| [UiActionsStart](./kibana-plugin-plugins-ui_actions-public.uiactionsstart.md) | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md new file mode 100644 index 00000000000000..d9427317d4fc6b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [plugin](./kibana-plugin-plugins-ui_actions-public.plugin.md) + +## plugin() function + +Signature: + +```typescript +export declare function plugin(initializerContext: PluginInitializerContext): UiActionsPlugin; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| initializerContext | PluginInitializerContext | | + +Returns: + +`UiActionsPlugin` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md new file mode 100644 index 00000000000000..fd784ff17fa840 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.select_range_trigger.md) + +## SELECT\_RANGE\_TRIGGER variable + +Signature: + +```typescript +SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md new file mode 100644 index 00000000000000..0d9fa2d83ee57a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [selectRangeTrigger](./kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md) + +## selectRangeTrigger variable + +Signature: + +```typescript +selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md new file mode 100644 index 00000000000000..76faaf8e1a691a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [description](./kibana-plugin-plugins-ui_actions-public.trigger.description.md) + +## Trigger.description property + +A longer user friendly description of the trigger. + +Signature: + +```typescript +description?: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md new file mode 100644 index 00000000000000..426f17f9a03529 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) + +## Trigger.id property + +Unique name of the trigger as identified in `ui_actions` plugin trigger registry, such as "SELECT\_RANGE\_TRIGGER" or "VALUE\_CLICK\_TRIGGER". + +Signature: + +```typescript +id: ID; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md new file mode 100644 index 00000000000000..b69bba892f4753 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) + +## Trigger interface + +This is a convenience interface used to register a \*trigger\*. + +`Trigger` specifies a named anchor to which `Action` can be attached. When `Trigger` is being \*called\* it creates a `Context` object and passes it to the `execute` method of an `Action`. + +More than one action can be attached to a single trigger, in which case when trigger is \*called\* it first displays a context menu for user to pick a single action to execute. + +Signature: + +```typescript +export interface Trigger +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [description](./kibana-plugin-plugins-ui_actions-public.trigger.description.md) | string | A longer user friendly description of the trigger. | +| [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) | ID | Unique name of the trigger as identified in ui_actions plugin trigger registry, such as "SELECT\_RANGE\_TRIGGER" or "VALUE\_CLICK\_TRIGGER". | +| [title](./kibana-plugin-plugins-ui_actions-public.trigger.title.md) | string | User friendly name of the trigger. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md new file mode 100644 index 00000000000000..ded71c8d0c437c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [title](./kibana-plugin-plugins-ui_actions-public.trigger.title.md) + +## Trigger.title property + +User friendly name of the trigger. + +Signature: + +```typescript +title?: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md new file mode 100644 index 00000000000000..4ce95d27ecffa7 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContext](./kibana-plugin-plugins-ui_actions-public.triggercontext.md) + +## TriggerContext type + +Signature: + +```typescript +export declare type TriggerContext = T extends TriggerId ? TriggerContextMapping[T] : never; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md new file mode 100644 index 00000000000000..17ad926f8ee829 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [""](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md) + +## TriggerContextMapping."" property + +Signature: + +```typescript +[DEFAULT_TRIGGER]: TriggerContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md new file mode 100644 index 00000000000000..0ccf8aa3d7415a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md) + +## TriggerContextMapping.FILTER\_TRIGGER property + +Signature: + +```typescript +[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md new file mode 100644 index 00000000000000..9db44d4dc7b058 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) + +## TriggerContextMapping interface + +Signature: + +```typescript +export interface TriggerContextMapping +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [""](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md) | TriggerContext | | +| [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md) | ApplyGlobalFilterActionContext | | +| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md) | RangeSelectContext | | +| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md) | ValueClickContext | | +| [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md) | VisualizeFieldContext | | +| [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md) | VisualizeFieldContext | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md new file mode 100644 index 00000000000000..c5ef6843390b34 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md) + +## TriggerContextMapping.SELECT\_RANGE\_TRIGGER property + +Signature: + +```typescript +[SELECT_RANGE_TRIGGER]: RangeSelectContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md new file mode 100644 index 00000000000000..129144a66cee56 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md) + +## TriggerContextMapping.VALUE\_CLICK\_TRIGGER property + +Signature: + +```typescript +[VALUE_CLICK_TRIGGER]: ValueClickContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md new file mode 100644 index 00000000000000..feaaffac8a234d --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md) + +## TriggerContextMapping.VISUALIZE\_FIELD\_TRIGGER property + +Signature: + +```typescript +[VISUALIZE_FIELD_TRIGGER]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md new file mode 100644 index 00000000000000..023490a2ae027f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md) + +## TriggerContextMapping.VISUALIZE\_GEO\_FIELD\_TRIGGER property + +Signature: + +```typescript +[VISUALIZE_GEO_FIELD_TRIGGER]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md new file mode 100644 index 00000000000000..6e5a234e286f91 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerId](./kibana-plugin-plugins-ui_actions-public.triggerid.md) + +## TriggerId type + +Signature: + +```typescript +export declare type TriggerId = keyof TriggerContextMapping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md new file mode 100644 index 00000000000000..a2cf61ecc13061 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [execute](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md) + +## UiActionsActionDefinition.execute() method + +Executes the action. + +Signature: + +```typescript +execute(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md new file mode 100644 index 00000000000000..83fee1233a206a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md) + +## UiActionsActionDefinition.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md new file mode 100644 index 00000000000000..01fa6abce3b4aa --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [id](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md) + +## UiActionsActionDefinition.id property + +ID of the action that uniquely identifies this action in the actions registry. + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md new file mode 100644 index 00000000000000..736cc40c4243f6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md) + +## UiActionsActionDefinition.isCompatible() method + +Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. + +Signature: + +```typescript +isCompatible?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md new file mode 100644 index 00000000000000..7c873715795e91 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) + +## UiActionsActionDefinition interface + +A convenience interface used to register an action. + +Signature: + +```typescript +export interface ActionDefinition extends Partial>> +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md) | string | ID of the action that uniquely identifies this action in the actions registry. | +| [type](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md) | ActionType | ID of the factory for this action. Used to construct dynamic actions. | + +## Methods + +| Method | Description | +| --- | --- | +| [execute(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md) | Executes the action. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md) | Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. | +| [shouldAutoExecute(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md) | Determines if action should be executed automatically, without first showing up in context menu. false by default. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md new file mode 100644 index 00000000000000..04b9975f3b92ec --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [shouldAutoExecute](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md) + +## UiActionsActionDefinition.shouldAutoExecute() method + +Determines if action should be executed automatically, without first showing up in context menu. false by default. + +Signature: + +```typescript +shouldAutoExecute?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md new file mode 100644 index 00000000000000..125f834e9036ed --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [type](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md) + +## UiActionsActionDefinition.type property + +ID of the factory for this action. Used to construct dynamic actions. + +Signature: + +```typescript +readonly type?: ActionType; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md new file mode 100644 index 00000000000000..986ad4afa5a48e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getDisplayName](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md) + +## UiActionsPresentable.getDisplayName() method + +Returns a title to be displayed to the user. + +Signature: + +```typescript +getDisplayName(context: Context): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md new file mode 100644 index 00000000000000..8fc859d5713e6a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getDisplayNameTooltip](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md) + +## UiActionsPresentable.getDisplayNameTooltip() method + +Returns tooltip text which should be displayed when user hovers this object. Should return empty string if tooltip should not be displayed. + +Signature: + +```typescript +getDisplayNameTooltip(context: Context): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md new file mode 100644 index 00000000000000..0c9bd434ff331c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md) + +## UiActionsPresentable.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: Context): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md new file mode 100644 index 00000000000000..8bf5af0f3b7e2e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getIconType](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md) + +## UiActionsPresentable.getIconType() method + +Optional EUI icon type that can be displayed along with the title. + +Signature: + +```typescript +getIconType(context: Context): string | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string | undefined` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md new file mode 100644 index 00000000000000..6b160becf1afc5 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [grouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md) + +## UiActionsPresentable.grouping property + +Grouping where this item should appear as a submenu. Each entry is a new sub-menu level. For example, used to show drilldowns and sharing options in panel context menu in a sub-menu. + +Signature: + +```typescript +readonly grouping?: PresentableGrouping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md new file mode 100644 index 00000000000000..e98401d95cba84 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [id](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md) + +## UiActionsPresentable.id property + +ID that uniquely identifies this object. + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md new file mode 100644 index 00000000000000..073f75c840bcd9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md) + +## UiActionsPresentable.isCompatible() method + +Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. + +Signature: + +```typescript +isCompatible(context: Context): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md new file mode 100644 index 00000000000000..03fa7fb6e447ef --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md @@ -0,0 +1,33 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) + +## UiActionsPresentable interface + +Represents something that can be displayed to user in UI. + +Signature: + +```typescript +export interface Presentable +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [grouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md) | PresentableGrouping<Context> | Grouping where this item should appear as a submenu. Each entry is a new sub-menu level. For example, used to show drilldowns and sharing options in panel context menu in a sub-menu. | +| [id](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md) | string | ID that uniquely identifies this object. | +| [MenuItem](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md) | UiComponent<{
context: Context;
}> | UiComponent to render when displaying this entity as a context menu item. If not provided, getDisplayName will be used instead. | +| [order](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md) | number | Determines the display order in relation to other items. Higher numbers are displayed first. | + +## Methods + +| Method | Description | +| --- | --- | +| [getDisplayName(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md) | Returns a title to be displayed to the user. | +| [getDisplayNameTooltip(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md) | Returns tooltip text which should be displayed when user hovers this object. Should return empty string if tooltip should not be displayed. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [getIconType(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md) | Optional EUI icon type that can be displayed along with the title. | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md) | Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md new file mode 100644 index 00000000000000..42afe6b8361f05 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [MenuItem](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md) + +## UiActionsPresentable.MenuItem property + +`UiComponent` to render when displaying this entity as a context menu item. If not provided, `getDisplayName` will be used instead. + +Signature: + +```typescript +readonly MenuItem?: UiComponent<{ + context: Context; + }>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md new file mode 100644 index 00000000000000..0bbf80dc892118 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [order](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md) + +## UiActionsPresentable.order property + +Determines the display order in relation to other items. Higher numbers are displayed first. + +Signature: + +```typescript +readonly order: number; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md new file mode 100644 index 00000000000000..a61ff65e39c692 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentableGrouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md) + +## UiActionsPresentableGrouping type + +Signature: + +```typescript +export declare type PresentableGrouping = Array>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md new file mode 100644 index 00000000000000..ff272245dbbf94 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [(constructor)](./kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md) + +## UiActionsService.(constructor) + +Constructs a new instance of the `UiActionsService` class + +Signature: + +```typescript +constructor({ triggers, actions, triggerToActions, }?: UiActionsServiceParams); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { triggers, actions, triggerToActions, } | UiActionsServiceParams | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md new file mode 100644 index 00000000000000..aaf4cebaf841c7 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) + +## UiActionsService.actions property + +Signature: + +```typescript +protected readonly actions: ActionRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md new file mode 100644 index 00000000000000..1782eef92442ce --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) + +## UiActionsService.addTriggerAction property + +`addTriggerAction` is similar to `attachAction` as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet. + +`addTriggerAction` also infers better typing of the `action` argument. + +Signature: + +```typescript +readonly addTriggerAction: (triggerId: T, action: ActionDefinition | Action) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md new file mode 100644 index 00000000000000..19f215a96b23b8 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) + +## UiActionsService.attachAction property + +Signature: + +```typescript +readonly attachAction: (triggerId: T, actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md new file mode 100644 index 00000000000000..024c7e3c3f85a5 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) + +## UiActionsService.clear property + +Removes all registered triggers and actions. + +Signature: + +```typescript +readonly clear: () => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md new file mode 100644 index 00000000000000..a6ff2489c6f0e4 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) + +## UiActionsService.detachAction property + +Signature: + +```typescript +readonly detachAction: (triggerId: TriggerId, actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md new file mode 100644 index 00000000000000..1bb6ca1115248d --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) + +## UiActionsService.executeTriggerActions property + +> Warning: This API is now obsolete. +> +> Use `plugins.uiActions.getTrigger(triggerId).exec(params)` instead. +> + +Signature: + +```typescript +readonly executeTriggerActions: (triggerId: T, context: TriggerContext) => Promise; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md new file mode 100644 index 00000000000000..06384cc110a596 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) + +## UiActionsService.executionService property + +Signature: + +```typescript +readonly executionService: UiActionsExecutionService; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md new file mode 100644 index 00000000000000..2b7a43a44cca66 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) + +## UiActionsService.fork property + +"Fork" a separate instance of `UiActionsService` that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of `UiActionsService` are only available within this instance. + +Signature: + +```typescript +readonly fork: () => UiActionsService; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md new file mode 100644 index 00000000000000..0c4584a07b569e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) + +## UiActionsService.getAction property + +Signature: + +```typescript +readonly getAction: >(id: string) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md new file mode 100644 index 00000000000000..d44dc4e43a52e9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) + +## UiActionsService.getTrigger property + +Signature: + +```typescript +readonly getTrigger: (triggerId: T) => TriggerContract; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md new file mode 100644 index 00000000000000..c65a9a992da2e9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) + +## UiActionsService.getTriggerActions property + +Signature: + +```typescript +readonly getTriggerActions: (triggerId: T) => Action[]; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md new file mode 100644 index 00000000000000..751abe332b08eb --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) + +## UiActionsService.getTriggerCompatibleActions property + +Signature: + +```typescript +readonly getTriggerCompatibleActions: (triggerId: T, context: TriggerContextMapping[T]) => Promise[]>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md new file mode 100644 index 00000000000000..2287cb3052864b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) + +## UiActionsService.hasAction property + +Signature: + +```typescript +readonly hasAction: (actionId: string) => boolean; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md new file mode 100644 index 00000000000000..c372eb113d6828 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) + +## UiActionsService class + +Signature: + +```typescript +export declare class UiActionsService +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)({ triggers, actions, triggerToActions, })](./kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md) | | Constructs a new instance of the UiActionsService class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) | | ActionRegistry | | +| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: ActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">) => void | addTriggerAction is similar to attachAction as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.addTriggerAction also infers better typing of the action argument. | +| [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, actionId: string) => void | | +| [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) | | () => void | Removes all registered triggers and actions. | +| [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) | | (triggerId: TriggerId, actionId: string) => void | | +| [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContext<T>) => Promise<void> | | +| [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) | | UiActionsExecutionService | | +| [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) | | () => UiActionsService | "Fork" a separate instance of UiActionsService that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of UiActionsService are only available within this instance. | +| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK"> | | +| [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => TriggerContract<T> | | +| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[] | | +| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[]> | | +| [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) | | (actionId: string) => boolean | | +| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK"> | | +| [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) | | (trigger: Trigger) => void | | +| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) | | TriggerRegistry | | +| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) | | TriggerToActionsRegistry | | +| [unregisterAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md) | | (actionId: string) => void | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md new file mode 100644 index 00000000000000..c71e86fc09dc76 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) + +## UiActionsService.registerAction property + +Signature: + +```typescript +readonly registerAction:
>(definition: A) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md new file mode 100644 index 00000000000000..3002409c023042 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) + +## UiActionsService.registerTrigger property + +Signature: + +```typescript +readonly registerTrigger: (trigger: Trigger) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md new file mode 100644 index 00000000000000..07d480286e771f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) + +## UiActionsService.triggers property + +Signature: + +```typescript +protected readonly triggers: TriggerRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md new file mode 100644 index 00000000000000..1b79a1dd845939 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) + +## UiActionsService.triggerToActions property + +Signature: + +```typescript +protected readonly triggerToActions: TriggerToActionsRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md new file mode 100644 index 00000000000000..0e0eb971c1a7bb --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [unregisterAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md) + +## UiActionsService.unregisterAction property + +Signature: + +```typescript +readonly unregisterAction: (actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md new file mode 100644 index 00000000000000..44d2957b0f8bad --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md) + +## UiActionsServiceParams.actions property + +Signature: + +```typescript +readonly actions?: ActionRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md new file mode 100644 index 00000000000000..756cd3de92ef88 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) + +## UiActionsServiceParams interface + +Signature: + +```typescript +export interface UiActionsServiceParams +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md) | ActionRegistry | | +| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md) | TriggerRegistry | | +| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md) | TriggerToActionsRegistry | A 1-to-N mapping from Trigger to zero or more Action. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md new file mode 100644 index 00000000000000..061aa5eb68c5da --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md) + +## UiActionsServiceParams.triggers property + +Signature: + +```typescript +readonly triggers?: TriggerRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md new file mode 100644 index 00000000000000..bdf1acba484e69 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md) + +## UiActionsServiceParams.triggerToActions property + +A 1-to-N mapping from `Trigger` to zero or more `Action`. + +Signature: + +```typescript +readonly triggerToActions?: TriggerToActionsRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md new file mode 100644 index 00000000000000..d03d4cf9f1ee29 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsSetup](./kibana-plugin-plugins-ui_actions-public.uiactionssetup.md) + +## UiActionsSetup type + +Signature: + +```typescript +export declare type UiActionsSetup = Pick; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md new file mode 100644 index 00000000000000..41f5bbf705e20b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsStart](./kibana-plugin-plugins-ui_actions-public.uiactionsstart.md) + +## UiActionsStart type + +Signature: + +```typescript +export declare type UiActionsStart = PublicMethodsOf; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md new file mode 100644 index 00000000000000..bd8d4dc50b8fdf --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.value_click_trigger.md) + +## VALUE\_CLICK\_TRIGGER variable + +Signature: + +```typescript +VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md new file mode 100644 index 00000000000000..5c4fc284d83b1c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [valueClickTrigger](./kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md) + +## valueClickTrigger variable + +Signature: + +```typescript +valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md new file mode 100644 index 00000000000000..c5d9f53557d6f1 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md) + +## VISUALIZE\_FIELD\_TRIGGER variable + +Signature: + +```typescript +VISUALIZE_FIELD_TRIGGER = "VISUALIZE_FIELD_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md new file mode 100644 index 00000000000000..a9396c19054856 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md) + +## VISUALIZE\_GEO\_FIELD\_TRIGGER variable + +Signature: + +```typescript +VISUALIZE_GEO_FIELD_TRIGGER = "VISUALIZE_GEO_FIELD_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md new file mode 100644 index 00000000000000..681d4127e40301 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [contextualFields](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md) + +## VisualizeFieldContext.contextualFields property + +Signature: + +```typescript +contextualFields?: string[]; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md new file mode 100644 index 00000000000000..95f45b1fbee4a5 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [fieldName](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md) + +## VisualizeFieldContext.fieldName property + +Signature: + +```typescript +fieldName: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md new file mode 100644 index 00000000000000..588c115cd98851 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [indexPatternId](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md) + +## VisualizeFieldContext.indexPatternId property + +Signature: + +```typescript +indexPatternId: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md new file mode 100644 index 00000000000000..7aeb254db7771b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) + +## VisualizeFieldContext interface + +Signature: + +```typescript +export interface VisualizeFieldContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [contextualFields](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md) | string[] | | +| [fieldName](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md) | string | | +| [indexPatternId](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md) | string | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md new file mode 100644 index 00000000000000..15510bd3eb4a35 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [visualizeFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md) + +## visualizeFieldTrigger variable + +Signature: + +```typescript +visualizeFieldTrigger: Trigger<'VISUALIZE_FIELD_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md new file mode 100644 index 00000000000000..faec6a69b71f9c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [visualizeGeoFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md) + +## visualizeGeoFieldTrigger variable + +Signature: + +```typescript +visualizeGeoFieldTrigger: Trigger<'VISUALIZE_GEO_FIELD_TRIGGER'> +``` diff --git a/docs/user/alerting/action-types/jira.asciidoc b/docs/user/alerting/action-types/jira.asciidoc index 48bd6c8501b9f6..65e5ee4fc4a013 100644 --- a/docs/user/alerting/action-types/jira.asciidoc +++ b/docs/user/alerting/action-types/jira.asciidoc @@ -69,6 +69,8 @@ Priority:: The priority of the incident. Labels:: The labels of the incident. Title:: A title for the issue, used for searching the contents of the knowledge base. Description:: The details about the incident. +Parent:: The parent issue id or key. Only for `Sub-task` issue types. +Priority:: The priority of the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. [[configuring-jira]] diff --git a/docs/user/dashboard/dashboard-drilldown.asciidoc b/docs/user/dashboard/dashboard-drilldown.asciidoc index 84701cae2ecc6a..e50c1281beede5 100644 --- a/docs/user/dashboard/dashboard-drilldown.asciidoc +++ b/docs/user/dashboard/dashboard-drilldown.asciidoc @@ -11,6 +11,26 @@ This example shows a dashboard panel that contains a pie chart with a configured [role="screenshot"] image::images/drilldown_on_piechart.gif[Drilldown on pie chart that navigates to another dashboard] +[float] +[[dashboard-drilldown-supported-panels]] +==== Supported panels + +The following panels support dashboard drilldowns: + +* Lens +* Area +* Data table +* Heat map +* Horizontal bar +* Line +* Maps +* Pie +* TSVB +* Tag cloud +* Timelion +* Vega +* Vertical bar + [float] [[drilldowns-example]] ==== Try it: Create a dashboard drilldown @@ -74,3 +94,4 @@ image::images/drilldown_on_panel.png[Drilldown on pie chart that navigates to an + You are navigated to your destination dashboard. Verify that the search query, filters, and time range are carried over. + diff --git a/docs/user/dashboard/url-drilldown.asciidoc b/docs/user/dashboard/url-drilldown.asciidoc index ee879256a1fae4..620a2d2056bf13 100644 --- a/docs/user/dashboard/url-drilldown.asciidoc +++ b/docs/user/dashboard/url-drilldown.asciidoc @@ -14,6 +14,22 @@ image:images/url_drilldown_go_to_github.gif[Drilldown on pie chart that navigate NOTE: URL drilldown is available with the https://www.elastic.co/subscriptions[Gold subscription] and higher. +[float] +[[url-drilldown-supported-panels]] +==== Supported panels + +The following panels support URL drilldowns: + +* Lens +* Area +* Data table +* Heat map +* Horizontal bar +* Line +* Pie +* Tag cloud +* Vertical bar + [float] [[try-it]] ==== Try it: Create a URL drilldown diff --git a/docs/user/dashboard/vega-reference.asciidoc b/docs/user/dashboard/vega-reference.asciidoc index eed8d9a35b8748..0bc77ab0a417e5 100644 --- a/docs/user/dashboard/vega-reference.asciidoc +++ b/docs/user/dashboard/vega-reference.asciidoc @@ -11,7 +11,7 @@ For additional *Vega* and *Vega-Lite* information, refer to the reference sectio {kib} has extended Vega and Vega-Lite with extensions that support: -* Default height and width +* Automatic sizing * Default theme to match {kib} * Writing {es} queries using the time range and filters from dashboards * Using the Elastic Map Service in Vega maps @@ -22,12 +22,35 @@ For additional *Vega* and *Vega-Lite* information, refer to the reference sectio [float] [[vega-sizing-and-positioning]] -==== Default height and width +==== Automatic sizing -By default, Vega visualizations use the `autosize = { type: 'fit', contains: 'padding' }` layout. -`fit` uses all available space, ignores `width` and `height` values, -and respects the padding values. To override this behavior, change the -`autosize` value. +Most users will want their Vega visualizations to take the full available space, so unlike +Vega examples, `width` and `height` are not required parameters in {kib}. To set the width +or height manually, set `autosize: none`. For example, to set the height to a specific pixel value: + +``` +autosize: none +width: container +height: 200 +``` + +The default {kib} settings which are inherited by your visualizations are: + +``` +autosize: { + type: fit + contains: padding +} +width: container +height: container +``` + +{kib} is able to merge your custom `autosize` settings with the defaults. The options `fit-x` +and `fit-y` are supported but not recommended over the default `fit` setting. + +To learn more, read about +https://vega.github.io/vega/docs/specification/#autosize[autosize] +in the Vega documentation. [float] [[vega-theme]] diff --git a/examples/bfetch_explorer/tsconfig.json b/examples/bfetch_explorer/tsconfig.json index 86b35c5e4943fd..253fdd9ee6c89c 100644 --- a/examples/bfetch_explorer/tsconfig.json +++ b/examples/bfetch_explorer/tsconfig.json @@ -13,6 +13,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/examples/embeddable_examples/tsconfig.json b/examples/embeddable_examples/tsconfig.json index 78098339c16f5a..a922c6defcd4c6 100644 --- a/examples/embeddable_examples/tsconfig.json +++ b/examples/embeddable_examples/tsconfig.json @@ -14,6 +14,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/examples/state_containers_examples/tsconfig.json b/examples/state_containers_examples/tsconfig.json index 6cfb9f9dc23217..442fa08022dc4a 100644 --- a/examples/state_containers_examples/tsconfig.json +++ b/examples/state_containers_examples/tsconfig.json @@ -14,6 +14,8 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/examples/ui_action_examples/tsconfig.json b/examples/ui_action_examples/tsconfig.json index 86b35c5e4943fd..253fdd9ee6c89c 100644 --- a/examples/ui_action_examples/tsconfig.json +++ b/examples/ui_action_examples/tsconfig.json @@ -13,6 +13,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/examples/ui_actions_explorer/tsconfig.json b/examples/ui_actions_explorer/tsconfig.json index 782b9cd57fa7b0..b4449819b25a62 100644 --- a/examples/ui_actions_explorer/tsconfig.json +++ b/examples/ui_actions_explorer/tsconfig.json @@ -12,6 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/package.json b/package.json index 6122c1090671f7..26a7fef9cfc187 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "kbn:watch": "node scripts/kibana --dev --logging.json=false", "build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json", "docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept", - "kbn:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook", + "kbn:bootstrap": "node scripts/build_ts_refs --project tsconfig.refs.json && node scripts/register_git_hook", "spec_to_console": "node scripts/spec_to_console", "backport-skip-ci": "backport --prDescription \"[skip-ci]\"", "storybook": "node scripts/storybook", @@ -174,6 +174,7 @@ "handlebars": "4.7.6", "hapi": "^17.5.3", "hapi-auth-cookie": "^9.0.0", + "hjson": "3.2.1", "hoek": "^5.0.4", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^5.0.0", @@ -228,7 +229,7 @@ "devDependencies": { "@babel/parser": "^7.11.2", "@babel/types": "^7.11.0", - "@elastic/apm-rum": "^5.6.0", + "@elastic/apm-rum": "^5.6.1", "@elastic/charts": "21.1.2", "@elastic/ems-client": "7.10.0", "@elastic/eslint-config-kibana": "0.15.0", @@ -407,7 +408,6 @@ "gulp-sourcemaps": "2.6.5", "has-ansi": "^3.0.0", "history": "^4.9.0", - "hjson": "3.2.1", "iedriver": "^3.14.2", "immer": "^1.5.0", "intl-messageformat-parser": "^1.4.0", @@ -478,7 +478,7 @@ "tree-kill": "^1.2.2", "typescript": "4.0.2", "ui-select": "0.19.8", - "vega": "^5.16.1", + "vega": "^5.17.0", "vega-lite": "^4.16.8", "vega-schema-url-parser": "^2.1.0", "vega-tooltip": "^0.24.2", diff --git a/packages/kbn-ace/README.md b/packages/kbn-ace/README.md index 54c422a72c6f86..c11d5cc2f24b82 100644 --- a/packages/kbn-ace/README.md +++ b/packages/kbn-ace/README.md @@ -1,5 +1,20 @@ # @kbn/ace -Contains all Kibana-specific brace related code. Excluding the code that still inside of Console because that code is only used inside of console at the moment. +This package contains the XJSON mode for brace. This is an extension of the `brace/mode/json` mode. -This package enables plugins to use this functionality and import it as needed -- behind an async import so that brace does not bloat the JS code needed for first page load of Kibana. +This package also contains an import of the entire brace editor which is used for creating the custom XJSON worker. + +## Note to plugins +_This code should not be eagerly loaded_. + +Make sure imports of this package are behind a lazy-load `import()` statement. + +Your plugin should already be loading application code this way in the `mount` function. + +## Deprecated + +This package is considered deprecated and will be removed in future. + +New and existing editor functionality should use Monaco. + +_Do not add new functionality to this package_. Build new functionality for Monaco and use it instead. diff --git a/packages/kbn-babel-preset/node_preset.js b/packages/kbn-babel-preset/node_preset.js index ee06e2588b0222..45afe5d5ebc32b 100644 --- a/packages/kbn-babel-preset/node_preset.js +++ b/packages/kbn-babel-preset/node_preset.js @@ -18,23 +18,6 @@ */ module.exports = (_, options = {}) => { - const overrides = []; - if (!process.env.ALLOW_PERFORMANCE_HOOKS_IN_TASK_MANAGER) { - overrides.push({ - test: [/x-pack[\/\\]legacy[\/\\]plugins[\/\\]task_manager/], - plugins: [ - [ - require.resolve('babel-plugin-filter-imports'), - { - imports: { - perf_hooks: ['performance'], - }, - }, - ], - ], - }); - } - return { presets: [ [ @@ -74,6 +57,5 @@ module.exports = (_, options = {}) => { }, ], ], - overrides, }; }; diff --git a/packages/kbn-babel-preset/package.json b/packages/kbn-babel-preset/package.json index d73294b4cf8739..d6d1a78dd4a23a 100644 --- a/packages/kbn-babel-preset/package.json +++ b/packages/kbn-babel-preset/package.json @@ -1,7 +1,7 @@ { "name": "@kbn/babel-preset", - "private": true, "version": "1.0.0", + "private": true, "license": "Apache-2.0", "dependencies": { "@babel/plugin-proposal-class-properties": "^7.10.4", @@ -13,10 +13,8 @@ "@babel/preset-react": "^7.10.4", "@babel/preset-typescript": "^7.10.4", "babel-plugin-add-module-exports": "^1.0.2", - "babel-plugin-filter-imports": "^3.0.0", "babel-plugin-styled-components": "^1.10.7", "babel-plugin-transform-define": "^1.3.1", - "babel-plugin-transform-imports": "^2.0.0", "react-is": "^16.8.0", "styled-components": "^5.1.0" } diff --git a/packages/kbn-babel-preset/webpack_preset.js b/packages/kbn-babel-preset/webpack_preset.js index 97462a579e3c46..a43d607edb17c2 100644 --- a/packages/kbn-babel-preset/webpack_preset.js +++ b/packages/kbn-babel-preset/webpack_preset.js @@ -40,24 +40,5 @@ module.exports = () => { }, ], ], - // NOTE: we can enable this by default for everything as soon as we only have one instance - // of lodash across the entire project. For now we are just enabling it for siem - // as they are extensively using the lodash v4 - overrides: [ - { - test: [/x-pack[\/\\]legacy[\/\\]plugins[\/\\]siem[\/\\]public/], - plugins: [ - [ - require.resolve('babel-plugin-transform-imports'), - { - 'lodash/?(((\\w*)?/?)*)': { - transform: 'lodash/${1}/${member}', - preventFullImport: false, - }, - }, - ], - ], - }, - ], }; }; diff --git a/packages/kbn-config/src/env.test.ts b/packages/kbn-config/src/env.test.ts index f3d51a021246e5..1613a90951d403 100644 --- a/packages/kbn-config/src/env.test.ts +++ b/packages/kbn-config/src/env.test.ts @@ -198,6 +198,18 @@ test('pluginSearchPaths contains x-pack/examples plugins path if --run-examples expect(env.pluginSearchPaths).toContain('/some/home/dir/x-pack/examples'); }); +test('pluginSearchPaths does not contain x-pack/examples plugins path if --oss flag is true', () => { + const env = new Env( + '/some/home/dir', + packageInfos, + getEnvOptions({ + cliArgs: { runExamples: true, oss: true }, + }) + ); + + expect(env.pluginSearchPaths).not.toContain('/some/home/dir/x-pack/examples'); +}); + test('pluginSearchPaths does not contains examples plugins path if --run-examples flag is false', () => { const env = new Env( '/some/home/dir', diff --git a/packages/kbn-config/src/env.ts b/packages/kbn-config/src/env.ts index 250c7b72d47a9c..e4585056696f92 100644 --- a/packages/kbn-config/src/env.ts +++ b/packages/kbn-config/src/env.ts @@ -123,8 +123,9 @@ export class Env { resolve(this.homeDir, 'src', 'plugins'), ...(options.cliArgs.oss ? [] : [resolve(this.homeDir, 'x-pack', 'plugins')]), resolve(this.homeDir, 'plugins'), - ...(options.cliArgs.runExamples - ? [resolve(this.homeDir, 'examples'), resolve(this.homeDir, 'x-pack', 'examples')] + ...(options.cliArgs.runExamples ? [resolve(this.homeDir, 'examples')] : []), + ...(options.cliArgs.runExamples && !options.cliArgs.oss + ? [resolve(this.homeDir, 'x-pack', 'examples')] : []), resolve(this.homeDir, '..', 'kibana-extra'), ]; diff --git a/packages/kbn-dev-utils/src/kbn_client/kbn_client.ts b/packages/kbn-dev-utils/src/kbn_client/kbn_client.ts index 861ea0988692c5..7184727fc53dec 100644 --- a/packages/kbn-dev-utils/src/kbn_client/kbn_client.ts +++ b/packages/kbn-dev-utils/src/kbn_client/kbn_client.ts @@ -54,8 +54,8 @@ export class KbnClient { /** * Make a direct request to the Kibana server */ - async request(options: ReqOptions) { - return await this.requester.request(options); + async request(options: ReqOptions) { + return await this.requester.request(options); } resolveUrl(relativeUrl: string) { diff --git a/packages/kbn-std/src/index.ts b/packages/kbn-std/src/index.ts index 7cf70a0e28e2cf..d9d3ec4b0d52b4 100644 --- a/packages/kbn-std/src/index.ts +++ b/packages/kbn-std/src/index.ts @@ -24,6 +24,6 @@ export { mapToObject } from './map_to_object'; export { merge } from './merge'; export { pick } from './pick'; export { withTimeout } from './promise'; -export { isRelativeUrl, modifyUrl, URLMeaningfulParts } from './url'; +export { isRelativeUrl, modifyUrl, getUrlOrigin, URLMeaningfulParts } from './url'; export { unset } from './unset'; export { getFlattenedObject } from './get_flattened_object'; diff --git a/packages/kbn-std/src/url.test.ts b/packages/kbn-std/src/url.test.ts index 7e9b6adfd3f493..4d5c5a1808c559 100644 --- a/packages/kbn-std/src/url.test.ts +++ b/packages/kbn-std/src/url.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import { modifyUrl, isRelativeUrl } from './url'; +import { modifyUrl, isRelativeUrl, getUrlOrigin } from './url'; describe('modifyUrl()', () => { test('throws an error with invalid input', () => { @@ -83,3 +83,27 @@ describe('isRelativeUrl()', () => { expect(isRelativeUrl(' //evil.com')).toBe(false); }); }); + +describe('getOrigin', () => { + describe('when passing an absolute url', () => { + it('return origin without port when the url does not have a port', () => { + expect(getUrlOrigin('https://example.com/file/to/path?example')).toEqual( + 'https://example.com' + ); + }); + it('return origin with port when the url does have a port', () => { + expect(getUrlOrigin('http://example.com:80/path/to/file')).toEqual('http://example.com:80'); + }); + }); + describe('when passing a non absolute url', () => { + it('returns null for relative url', () => { + expect(getUrlOrigin('./path/to/file')).toBeNull(); + }); + it('returns null for absolute path', () => { + expect(getUrlOrigin('/path/to/file')).toBeNull(); + }); + it('returns null for empty url', () => { + expect(getUrlOrigin('')).toBeNull(); + }); + }); +}); diff --git a/packages/kbn-std/src/url.ts b/packages/kbn-std/src/url.ts index edcdebbd2bc81b..745ed05751b105 100644 --- a/packages/kbn-std/src/url.ts +++ b/packages/kbn-std/src/url.ts @@ -125,3 +125,14 @@ export function isRelativeUrl(candidatePath: string) { } return true; } + +/** + * Returns the origin (protocol + host + port) from given `url` if `url` is a valid absolute url, or null otherwise + */ +export function getUrlOrigin(url: string): string | null { + const obj = parseUrl(url); + if (!obj.protocol && !obj.hostname) { + return null; + } + return `${obj.protocol}//${obj.hostname}${obj.port ? `:${obj.port}` : ''}`; +} diff --git a/plugins/.empty b/plugins/.empty new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index e1f56a2f267fa8..3d81185e8a3138 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -19,6 +19,7 @@ import { resolve } from 'path'; import { format as formatUrl } from 'url'; +import Fs from 'fs'; import opn from 'opn'; import { REPO_ROOT } from '@kbn/utils'; @@ -233,6 +234,14 @@ export class ClusterManager { ) ); + for (const watchPath of watchPaths) { + if (!Fs.existsSync(fromRoot(watchPath))) { + throw new Error( + `A watch directory [${watchPath}] does not exist, which will cause chokidar to fail. Either make sure the directory exists or remove it as a watch source in the ClusterManger` + ); + } + } + const ignorePaths = [ /[\\\/](\..*|node_modules|bower_components|target|public|__[a-z0-9_]+__|coverage)([\\\/]|$)/, /\.test\.(js|tsx?)$/, diff --git a/src/core/public/apm_system.ts b/src/core/public/apm_system.ts new file mode 100644 index 00000000000000..0a18f02c972936 --- /dev/null +++ b/src/core/public/apm_system.ts @@ -0,0 +1,75 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * This is the entry point used to boot the frontend when serving a application + * that lives in the Kibana Platform. + * + * Any changes to this file should be kept in sync with + * src/legacy/ui/ui_bundles/app_entry_template.js + */ +import type { InternalApplicationStart } from './application'; + +interface ApmConfig { + // AgentConfigOptions is not exported from @elastic/apm-rum + globalLabels?: Record; +} + +interface StartDeps { + application: InternalApplicationStart; +} + +export class ApmSystem { + private readonly enabled: boolean; + /** + * `apmConfig` would be populated with relevant APM RUM agent + * configuration if server is started with `ELASTIC_APM_ACTIVE=true` + */ + constructor(private readonly apmConfig?: ApmConfig) { + this.enabled = process.env.IS_KIBANA_DISTRIBUTABLE !== 'true' && apmConfig != null; + } + + async setup() { + if (!this.enabled) return; + const { init, apm } = await import('@elastic/apm-rum'); + const { globalLabels, ...apmConfig } = this.apmConfig!; + if (globalLabels) { + apm.addLabels(globalLabels); + } + + init(apmConfig); + } + + async start(start?: StartDeps) { + if (!this.enabled || !start) return; + /** + * Register listeners for navigation changes and capture them as + * route-change transactions after Kibana app is bootstrapped + */ + start.application.currentAppId$.subscribe((appId) => { + const apmInstance = (window as any).elasticApm; + if (appId && apmInstance && typeof apmInstance.startTransaction === 'function') { + apmInstance.startTransaction(`/app/${appId}`, 'route-change', { + managed: true, + canReuse: true, + }); + } + }); + } +} diff --git a/src/core/public/application/types.ts b/src/core/public/application/types.ts index df83b6e932aad9..02d2d3a52a01a5 100644 --- a/src/core/public/application/types.ts +++ b/src/core/public/application/types.ts @@ -710,11 +710,17 @@ export interface ApplicationStart { navigateToApp(appId: string, options?: NavigateToAppOptions): Promise; /** - * Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible. + * Navigate to given URL in a SPA friendly way when possible (when the URL will redirect to a valid application + * within the current basePath). * - * If all these criteria are true for the given url: + * The method resolves pathnames the same way browsers do when resolving a `` value. The provided `url` can be: + * - an absolute URL + * - an absolute path + * - a path relative to the current URL (window.location.href) + * + * If all these criteria are true for the given URL: * - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location - * - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space) + * - The resolved pathname of the provided URL/path starts with the current basePath (eg. /mybasepath/s/my-space) * - The pathname segment after the basePath matches any known application route (eg. /app// or any application's `appRoute` configuration) * * Then a SPA navigation will be performed using `navigateToApp` using the corresponding application and path. @@ -727,23 +733,27 @@ export interface ApplicationStart { * // will call `application.navigateToApp('discover', { path: '/some-path?foo=bar'})` * application.navigateToUrl('https://kibana:8080/base-path/s/my-space/app/discover/some-path?foo=bar') * application.navigateToUrl('/base-path/s/my-space/app/discover/some-path?foo=bar') + * application.navigateToUrl('./discover/some-path?foo=bar') * * // will perform a full page reload using `window.location.assign` * application.navigateToUrl('https://elsewhere:8080/base-path/s/my-space/app/discover/some-path') // origin does not match * application.navigateToUrl('/app/discover/some-path') // does not include the current basePath * application.navigateToUrl('/base-path/s/my-space/app/unknown-app/some-path') // unknown application + * application.navigateToUrl('../discover') // resolve to `/base-path/s/my-space/discover` which is not a path of a known app. + * application.navigateToUrl('../../other-space/discover') // resolve to `/base-path/s/other-space/discover` which is not within the current basePath. * ``` * - * @param url - an absolute url, or a relative path, to navigate to. + * @param url - an absolute URL, an absolute path or a relative path, to navigate to. */ navigateToUrl(url: string): Promise; /** - * Returns an URL to a given app, including the global base path. - * By default, the URL is relative (/basePath/app/my-app). - * Use the `absolute` option to generate an absolute url (http://host:port/basePath/app/my-app) + * Returns the absolute path (or URL) to a given app, including the global base path. + * + * By default, it returns the absolute path of the application (e.g `/basePath/app/my-app`). + * Use the `absolute` option to generate an absolute url instead (e.g `http://host:port/basePath/app/my-app`) * - * Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's location. + * Note that when generating absolute urls, the origin (protocol, host and port) are determined from the browser's current location. * * @param appId * @param options.path - optional path inside application to deep link to diff --git a/src/core/public/application/utils.ts b/src/core/public/application/utils.ts deleted file mode 100644 index 85760526bf5442..00000000000000 --- a/src/core/public/application/utils.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { IBasePath } from '../http'; -import { App, AppNavLinkStatus, AppStatus, ParsedAppUrl, PublicAppInfo } from './types'; - -/** - * Utility to remove trailing, leading or duplicate slashes. - * By default will only remove duplicates. - */ -export const removeSlashes = ( - url: string, - { - trailing = false, - leading = false, - duplicates = true, - }: { trailing?: boolean; leading?: boolean; duplicates?: boolean } = {} -): string => { - if (duplicates) { - url = url.replace(/\/{2,}/g, '/'); - } - if (trailing) { - url = url.replace(/\/$/, ''); - } - if (leading) { - url = url.replace(/^\//, ''); - } - return url; -}; - -export const appendAppPath = (appBasePath: string, path: string = '') => { - // Only prepend slash if not a hash or query path - path = path === '' || path.startsWith('#') || path.startsWith('?') ? path : `/${path}`; - // Do not remove trailing slash when in hashbang or basePath - const removeTrailing = path.indexOf('#') === -1 && appBasePath.indexOf('#') === -1; - return removeSlashes(`${appBasePath}${path}`, { - trailing: removeTrailing, - duplicates: true, - leading: false, - }); -}; - -/** - * Converts a relative path to an absolute url. - * Implementation is based on a specified behavior of the browser to automatically convert - * a relative url to an absolute one when setting the `href` attribute of a `` html element. - * - * @example - * ```ts - * // current url: `https://kibana:8000/base-path/app/my-app` - * relativeToAbsolute('/base-path/app/another-app') => `https://kibana:8000/base-path/app/another-app` - * ``` - */ -export const relativeToAbsolute = (url: string): string => { - const a = document.createElement('a'); - a.setAttribute('href', url); - return a.href; -}; - -/** - * Parse given url and return the associated app id and path if any app matches. - * Input can either be: - * - a path containing the basePath, ie `/base-path/app/my-app/some-path` - * - an absolute url matching the `origin` of the kibana instance (as seen by the browser), - * i.e `https://kibana:8080/base-path/app/my-app/some-path` - */ -export const parseAppUrl = ( - url: string, - basePath: IBasePath, - apps: Map>, - getOrigin: () => string = () => window.location.origin -): ParsedAppUrl | undefined => { - url = removeBasePath(url, basePath, getOrigin()); - if (!url.startsWith('/')) { - return undefined; - } - - for (const app of apps.values()) { - const appPath = app.appRoute || `/app/${app.id}`; - - if (url.startsWith(appPath)) { - const path = url.substr(appPath.length); - return { - app: app.id, - path: path.length ? path : undefined, - }; - } - } -}; - -const removeBasePath = (url: string, basePath: IBasePath, origin: string): string => { - if (url.startsWith(origin)) { - url = url.substring(origin.length); - } - return basePath.remove(url); -}; - -export function getAppInfo(app: App): PublicAppInfo { - const navLinkStatus = - app.navLinkStatus === AppNavLinkStatus.default - ? app.status === AppStatus.inaccessible - ? AppNavLinkStatus.hidden - : AppNavLinkStatus.visible - : app.navLinkStatus!; - const { updater$, mount, ...infos } = app; - return { - ...infos, - status: app.status!, - navLinkStatus, - appRoute: app.appRoute!, - }; -} diff --git a/src/core/public/application/utils/append_app_path.test.ts b/src/core/public/application/utils/append_app_path.test.ts new file mode 100644 index 00000000000000..a153b5753bbe20 --- /dev/null +++ b/src/core/public/application/utils/append_app_path.test.ts @@ -0,0 +1,40 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { appendAppPath } from './append_app_path'; + +describe('appendAppPath', () => { + it('appends the appBasePath with given path', () => { + expect(appendAppPath('/app/my-app', '/some-path')).toEqual('/app/my-app/some-path'); + expect(appendAppPath('/app/my-app/', 'some-path')).toEqual('/app/my-app/some-path'); + expect(appendAppPath('/app/my-app', 'some-path')).toEqual('/app/my-app/some-path'); + expect(appendAppPath('/app/my-app', '')).toEqual('/app/my-app'); + }); + + it('preserves the trailing slash only if included in the hash or appPath', () => { + expect(appendAppPath('/app/my-app', '/some-path/')).toEqual('/app/my-app/some-path'); + expect(appendAppPath('/app/my-app', '/some-path#/')).toEqual('/app/my-app/some-path#/'); + expect(appendAppPath('/app/my-app#/', '')).toEqual('/app/my-app#/'); + expect(appendAppPath('/app/my-app#', '/')).toEqual('/app/my-app#/'); + expect(appendAppPath('/app/my-app', '/some-path#/hash/')).toEqual( + '/app/my-app/some-path#/hash/' + ); + expect(appendAppPath('/app/my-app', '/some-path#/hash')).toEqual('/app/my-app/some-path#/hash'); + }); +}); diff --git a/src/core/public/application/utils/append_app_path.ts b/src/core/public/application/utils/append_app_path.ts new file mode 100644 index 00000000000000..70cb4a44c648e0 --- /dev/null +++ b/src/core/public/application/utils/append_app_path.ts @@ -0,0 +1,32 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { removeSlashes } from './remove_slashes'; + +export const appendAppPath = (appBasePath: string, path: string = '') => { + // Only prepend slash if not a hash or query path + path = path === '' || path.startsWith('#') || path.startsWith('?') ? path : `/${path}`; + // Do not remove trailing slash when in hashbang or basePath + const removeTrailing = path.indexOf('#') === -1 && appBasePath.indexOf('#') === -1; + return removeSlashes(`${appBasePath}${path}`, { + trailing: removeTrailing, + duplicates: true, + leading: false, + }); +}; diff --git a/src/core/public/application/utils/get_app_info.test.ts b/src/core/public/application/utils/get_app_info.test.ts new file mode 100644 index 00000000000000..055f7d1a5ada9d --- /dev/null +++ b/src/core/public/application/utils/get_app_info.test.ts @@ -0,0 +1,75 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { of } from 'rxjs'; +import { App, AppNavLinkStatus, AppStatus } from '../types'; +import { getAppInfo } from './get_app_info'; + +describe('getAppInfo', () => { + const createApp = (props: Partial = {}): App => ({ + mount: () => () => undefined, + updater$: of(() => undefined), + id: 'some-id', + title: 'some-title', + status: AppStatus.accessible, + navLinkStatus: AppNavLinkStatus.default, + appRoute: `/app/some-id`, + ...props, + }); + + it('converts an application and remove sensitive properties', () => { + const app = createApp(); + const info = getAppInfo(app); + + expect(info).toEqual({ + id: 'some-id', + title: 'some-title', + status: AppStatus.accessible, + navLinkStatus: AppNavLinkStatus.visible, + appRoute: `/app/some-id`, + }); + }); + + it('computes the navLinkStatus depending on the app status', () => { + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.default, + status: AppStatus.inaccessible, + }) + ) + ).toEqual( + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.hidden, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.default, + status: AppStatus.accessible, + }) + ) + ).toEqual( + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.visible, + }) + ); + }); +}); diff --git a/src/core/public/application/utils/get_app_info.ts b/src/core/public/application/utils/get_app_info.ts new file mode 100644 index 00000000000000..71cd8a3e149290 --- /dev/null +++ b/src/core/public/application/utils/get_app_info.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { App, AppNavLinkStatus, AppStatus, PublicAppInfo } from '../types'; + +export function getAppInfo(app: App): PublicAppInfo { + const navLinkStatus = + app.navLinkStatus === AppNavLinkStatus.default + ? app.status === AppStatus.inaccessible + ? AppNavLinkStatus.hidden + : AppNavLinkStatus.visible + : app.navLinkStatus!; + const { updater$, mount, ...infos } = app; + return { + ...infos, + status: app.status!, + navLinkStatus, + appRoute: app.appRoute!, + }; +} diff --git a/src/core/public/application/utils/index.ts b/src/core/public/application/utils/index.ts new file mode 100644 index 00000000000000..3b8a34df8c50da --- /dev/null +++ b/src/core/public/application/utils/index.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { appendAppPath } from './append_app_path'; +export { getAppInfo } from './get_app_info'; +export { parseAppUrl } from './parse_app_url'; +export { relativeToAbsolute } from './relative_to_absolute'; +export { removeSlashes } from './remove_slashes'; diff --git a/src/core/public/application/utils.test.ts b/src/core/public/application/utils/parse_app_url.test.ts similarity index 58% rename from src/core/public/application/utils.test.ts rename to src/core/public/application/utils/parse_app_url.test.ts index ee1d82a7a872e1..bf7e0a88a0742c 100644 --- a/src/core/public/application/utils.test.ts +++ b/src/core/public/application/utils/parse_app_url.test.ts @@ -17,78 +17,16 @@ * under the License. */ -import { of } from 'rxjs'; -import { App, AppNavLinkStatus, AppStatus } from './types'; -import { BasePath } from '../http/base_path'; -import { appendAppPath, getAppInfo, parseAppUrl, relativeToAbsolute, removeSlashes } from './utils'; - -describe('removeSlashes', () => { - it('only removes duplicates by default', () => { - expect(removeSlashes('/some//url//to//')).toEqual('/some/url/to/'); - expect(removeSlashes('some/////other//url')).toEqual('some/other/url'); - }); - - it('remove trailing slash when `trailing` is true', () => { - expect(removeSlashes('/some//url//to//', { trailing: true })).toEqual('/some/url/to'); - }); - - it('remove leading slash when `leading` is true', () => { - expect(removeSlashes('/some//url//to//', { leading: true })).toEqual('some/url/to/'); - }); - - it('does not removes duplicates when `duplicates` is false', () => { - expect(removeSlashes('/some//url//to/', { leading: true, duplicates: false })).toEqual( - 'some//url//to/' - ); - expect(removeSlashes('/some//url//to/', { trailing: true, duplicates: false })).toEqual( - '/some//url//to' - ); - }); - - it('accept mixed options', () => { - expect( - removeSlashes('/some//url//to/', { leading: true, duplicates: false, trailing: true }) - ).toEqual('some//url//to'); - expect( - removeSlashes('/some//url//to/', { leading: true, duplicates: true, trailing: true }) - ).toEqual('some/url/to'); - }); -}); - -describe('appendAppPath', () => { - it('appends the appBasePath with given path', () => { - expect(appendAppPath('/app/my-app', '/some-path')).toEqual('/app/my-app/some-path'); - expect(appendAppPath('/app/my-app/', 'some-path')).toEqual('/app/my-app/some-path'); - expect(appendAppPath('/app/my-app', 'some-path')).toEqual('/app/my-app/some-path'); - expect(appendAppPath('/app/my-app', '')).toEqual('/app/my-app'); - }); - - it('preserves the trailing slash only if included in the hash or appPath', () => { - expect(appendAppPath('/app/my-app', '/some-path/')).toEqual('/app/my-app/some-path'); - expect(appendAppPath('/app/my-app', '/some-path#/')).toEqual('/app/my-app/some-path#/'); - expect(appendAppPath('/app/my-app#/', '')).toEqual('/app/my-app#/'); - expect(appendAppPath('/app/my-app#', '/')).toEqual('/app/my-app#/'); - expect(appendAppPath('/app/my-app', '/some-path#/hash/')).toEqual( - '/app/my-app/some-path#/hash/' - ); - expect(appendAppPath('/app/my-app', '/some-path#/hash')).toEqual('/app/my-app/some-path#/hash'); - }); -}); - -describe('relativeToAbsolute', () => { - it('converts a relative path to an absolute url', () => { - const origin = window.location.origin; - expect(relativeToAbsolute('path')).toEqual(`${origin}/path`); - expect(relativeToAbsolute('/path#hash')).toEqual(`${origin}/path#hash`); - expect(relativeToAbsolute('/path?query=foo')).toEqual(`${origin}/path?query=foo`); - }); -}); +import { App } from '../types'; +import { BasePath } from '../../http/base_path'; +import { parseAppUrl } from './parse_app_url'; describe('parseAppUrl', () => { let apps: Map>; let basePath: BasePath; - const getOrigin = () => 'https://kibana.local:8080'; + const currentUrl = + 'https://kibana.local:8080/base-path/app/current/current-path?current-query=true'; const createApp = (props: Partial): App => { const app: App = { @@ -114,101 +52,178 @@ describe('parseAppUrl', () => { }); }); - describe('with relative paths', () => { + describe('with absolute paths', () => { it('parses the app id', () => { - expect(parseAppUrl('/base-path/app/foo', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/app/foo', basePath, apps, currentUrl)).toEqual({ app: 'foo', path: undefined, }); - expect(parseAppUrl('/base-path/custom-bar', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/custom-bar', basePath, apps, currentUrl)).toEqual({ app: 'bar', path: undefined, }); }); it('parses the path', () => { - expect(parseAppUrl('/base-path/app/foo/some/path', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/app/foo/some/path', basePath, apps, currentUrl)).toEqual({ app: 'foo', path: '/some/path', }); - expect(parseAppUrl('/base-path/custom-bar/another/path/', basePath, apps, getOrigin)).toEqual( - { - app: 'bar', - path: '/another/path/', - } - ); + expect( + parseAppUrl('/base-path/custom-bar/another/path/', basePath, apps, currentUrl) + ).toEqual({ + app: 'bar', + path: '/another/path/', + }); }); it('includes query and hash in the path for default app route', () => { - expect(parseAppUrl('/base-path/app/foo#hash/bang', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/app/foo#hash/bang', basePath, apps, currentUrl)).toEqual({ app: 'foo', path: '#hash/bang', }); - expect(parseAppUrl('/base-path/app/foo?hello=dolly', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/app/foo?hello=dolly', basePath, apps, currentUrl)).toEqual({ app: 'foo', path: '?hello=dolly', }); - expect(parseAppUrl('/base-path/app/foo/path?hello=dolly', basePath, apps, getOrigin)).toEqual( - { - app: 'foo', - path: '/path?hello=dolly', - } - ); - expect(parseAppUrl('/base-path/app/foo/path#hash/bang', basePath, apps, getOrigin)).toEqual({ + expect( + parseAppUrl('/base-path/app/foo/path?hello=dolly', basePath, apps, currentUrl) + ).toEqual({ + app: 'foo', + path: '/path?hello=dolly', + }); + expect(parseAppUrl('/base-path/app/foo/path#hash/bang', basePath, apps, currentUrl)).toEqual({ app: 'foo', path: '/path#hash/bang', }); expect( - parseAppUrl('/base-path/app/foo/path#hash/bang?hello=dolly', basePath, apps, getOrigin) + parseAppUrl('/base-path/app/foo/path#hash/bang?hello=dolly', basePath, apps, currentUrl) ).toEqual({ app: 'foo', path: '/path#hash/bang?hello=dolly', }); }); it('includes query and hash in the path for custom app route', () => { - expect(parseAppUrl('/base-path/custom-bar#hash/bang', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/custom-bar#hash/bang', basePath, apps, currentUrl)).toEqual({ app: 'bar', path: '#hash/bang', }); - expect(parseAppUrl('/base-path/custom-bar?hello=dolly', basePath, apps, getOrigin)).toEqual({ + expect(parseAppUrl('/base-path/custom-bar?hello=dolly', basePath, apps, currentUrl)).toEqual({ app: 'bar', path: '?hello=dolly', }); expect( - parseAppUrl('/base-path/custom-bar/path?hello=dolly', basePath, apps, getOrigin) + parseAppUrl('/base-path/custom-bar/path?hello=dolly', basePath, apps, currentUrl) ).toEqual({ app: 'bar', path: '/path?hello=dolly', }); expect( - parseAppUrl('/base-path/custom-bar/path#hash/bang', basePath, apps, getOrigin) + parseAppUrl('/base-path/custom-bar/path#hash/bang', basePath, apps, currentUrl) ).toEqual({ app: 'bar', path: '/path#hash/bang', }); expect( - parseAppUrl('/base-path/custom-bar/path#hash/bang?hello=dolly', basePath, apps, getOrigin) + parseAppUrl('/base-path/custom-bar/path#hash/bang?hello=dolly', basePath, apps, currentUrl) ).toEqual({ app: 'bar', path: '/path#hash/bang?hello=dolly', }); }); it('returns undefined when the app is not known', () => { - expect(parseAppUrl('/base-path/app/non-registered', basePath, apps, getOrigin)).toEqual( + expect(parseAppUrl('/base-path/app/non-registered', basePath, apps, currentUrl)).toEqual( undefined ); - expect(parseAppUrl('/base-path/unknown-path', basePath, apps, getOrigin)).toEqual(undefined); + expect(parseAppUrl('/base-path/unknown-path', basePath, apps, currentUrl)).toEqual(undefined); + }); + it('returns undefined when the path does not start with the base path', () => { + expect(parseAppUrl('/app/foo', basePath, apps, currentUrl)).toBeUndefined(); + }); + }); + + describe('with relative paths', () => { + it('works with sibling relative urls', () => { + expect( + parseAppUrl('./foo', basePath, apps, 'https://kibana.local:8080/base-path/app/current') + ).toEqual({ + app: 'foo', + path: undefined, + }); + }); + it('works with parent relative urls', () => { + expect( + parseAppUrl( + '../custom-bar', + basePath, + apps, + 'https://kibana.local:8080/base-path/app/current' + ) + ).toEqual({ + app: 'bar', + path: undefined, + }); + }); + it('works with nested parents', () => { + expect( + parseAppUrl( + '../../custom-bar', + basePath, + apps, + 'https://kibana.local:8080/base-path/app/current/some-path' + ) + ).toEqual({ + app: 'bar', + path: undefined, + }); + }); + it('parses the path', () => { + expect( + parseAppUrl( + './foo/path?hello=dolly', + basePath, + apps, + 'https://kibana.local:8080/base-path/app/current' + ) + ).toEqual({ + app: 'foo', + path: '/path?hello=dolly', + }); + }); + it('parses the path with query and hash', () => { + expect( + parseAppUrl( + '../custom-bar/path#hash?hello=dolly', + basePath, + apps, + 'https://kibana.local:8080/base-path/app/current' + ) + ).toEqual({ + app: 'bar', + path: '/path#hash?hello=dolly', + }); + }); + + it('returns undefined if the relative path redirect outside of the basePath', () => { + expect( + parseAppUrl( + '../../custom-bar', + basePath, + apps, + 'https://kibana.local:8080/base-path/app/current' + ) + ).toBeUndefined(); }); }); describe('with absolute urls', () => { it('parses the app id', () => { expect( - parseAppUrl('https://kibana.local:8080/base-path/app/foo', basePath, apps, getOrigin) + parseAppUrl('https://kibana.local:8080/base-path/app/foo', basePath, apps, currentUrl) ).toEqual({ app: 'foo', path: undefined, }); expect( - parseAppUrl('https://kibana.local:8080/base-path/custom-bar', basePath, apps, getOrigin) + parseAppUrl('https://kibana.local:8080/base-path/custom-bar', basePath, apps, currentUrl) ).toEqual({ app: 'bar', path: undefined, @@ -220,7 +235,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo/some/path', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -231,7 +246,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar/another/path/', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -244,7 +259,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo#hash/bang', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -255,7 +270,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -266,7 +281,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo/path?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -277,7 +292,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo/path#hash/bang', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -288,7 +303,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/foo/path#hash/bang?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'foo', @@ -301,7 +316,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar#hash/bang', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -312,7 +327,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -323,7 +338,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar/path?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -334,7 +349,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar/path#hash/bang', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -345,7 +360,7 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/custom-bar/path#hash/bang?hello=dolly', basePath, apps, - getOrigin + currentUrl ) ).toEqual({ app: 'bar', @@ -358,11 +373,11 @@ describe('parseAppUrl', () => { 'https://kibana.local:8080/base-path/app/non-registered', basePath, apps, - getOrigin + currentUrl ) ).toEqual(undefined); expect( - parseAppUrl('https://kibana.local:8080/base-path/unknown-path', basePath, apps, getOrigin) + parseAppUrl('https://kibana.local:8080/base-path/unknown-path', basePath, apps, currentUrl) ).toEqual(undefined); }); it('returns undefined when origin does not match', () => { @@ -371,7 +386,7 @@ describe('parseAppUrl', () => { 'https://other-kibana.external:8080/base-path/app/foo', basePath, apps, - getOrigin + currentUrl ) ).toEqual(undefined); expect( @@ -379,62 +394,14 @@ describe('parseAppUrl', () => { 'https://other-kibana.external:8080/base-path/custom-bar', basePath, apps, - getOrigin + currentUrl ) ).toEqual(undefined); }); - }); -}); - -describe('getAppInfo', () => { - const createApp = (props: Partial = {}): App => ({ - mount: () => () => undefined, - updater$: of(() => undefined), - id: 'some-id', - title: 'some-title', - status: AppStatus.accessible, - navLinkStatus: AppNavLinkStatus.default, - appRoute: `/app/some-id`, - ...props, - }); - - it('converts an application and remove sensitive properties', () => { - const app = createApp(); - const info = getAppInfo(app); - - expect(info).toEqual({ - id: 'some-id', - title: 'some-title', - status: AppStatus.accessible, - navLinkStatus: AppNavLinkStatus.visible, - appRoute: `/app/some-id`, + it('returns undefined when the path does not contain the base path', () => { + expect(parseAppUrl('https://kibana.local:8080/app/foo', basePath, apps, currentUrl)).toEqual( + undefined + ); }); }); - - it('computes the navLinkStatus depending on the app status', () => { - expect( - getAppInfo( - createApp({ - navLinkStatus: AppNavLinkStatus.default, - status: AppStatus.inaccessible, - }) - ) - ).toEqual( - expect.objectContaining({ - navLinkStatus: AppNavLinkStatus.hidden, - }) - ); - expect( - getAppInfo( - createApp({ - navLinkStatus: AppNavLinkStatus.default, - status: AppStatus.accessible, - }) - ) - ).toEqual( - expect.objectContaining({ - navLinkStatus: AppNavLinkStatus.visible, - }) - ); - }); }); diff --git a/src/core/public/application/utils/parse_app_url.ts b/src/core/public/application/utils/parse_app_url.ts new file mode 100644 index 00000000000000..d253129a63ae44 --- /dev/null +++ b/src/core/public/application/utils/parse_app_url.ts @@ -0,0 +1,83 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { getUrlOrigin } from '@kbn/std'; +import { resolve } from 'url'; +import { IBasePath } from '../../http'; +import { App, ParsedAppUrl } from '../types'; + +/** + * Parse given URL and return the associated app id and path if any app matches, or undefined if none do. + * Input can either be: + * + * - an absolute path containing the basePath, + * e.g `/base-path/app/my-app/some-path` + * + * - an absolute URL matching the `origin` of the Kibana instance (as seen by the browser), + * e.g `https://kibana:8080/base-path/app/my-app/some-path` + * + * - a path relative to the provided `currentUrl`. + * e.g with `currentUrl` being `https://kibana:8080/base-path/app/current-app/some-path` + * `../other-app/other-path` will be converted to `/base-path/app/other-app/other-path` + */ +export const parseAppUrl = ( + url: string, + basePath: IBasePath, + apps: Map>, + currentUrl: string = window.location.href +): ParsedAppUrl | undefined => { + const currentOrigin = getUrlOrigin(currentUrl); + if (!currentOrigin) { + throw new Error('when manually provided, currentUrl must be valid url with an origin'); + } + const currentPath = currentUrl.substring(currentOrigin.length); + + // remove the origin from the given url + if (url.startsWith(currentOrigin)) { + url = url.substring(currentOrigin.length); + } + + // if the path is relative (i.e `../../to/somewhere`), we convert it to absolute + if (!url.startsWith('/')) { + url = resolve(currentPath, url); + } + + // if using a basePath and the absolute path does not starts with it, it can't be a match + const basePathValue = basePath.get(); + if (basePathValue && !url.startsWith(basePathValue)) { + return undefined; + } + + url = basePath.remove(url); + if (!url.startsWith('/')) { + return undefined; + } + + for (const app of apps.values()) { + const appPath = app.appRoute || `/app/${app.id}`; + + if (url.startsWith(appPath)) { + const path = url.substr(appPath.length); + return { + app: app.id, + path: path.length ? path : undefined, + }; + } + } +}; diff --git a/src/plugins/vis_type_timelion/public/components/chart.tsx b/src/core/public/application/utils/relative_to_absolute.test.ts similarity index 61% rename from src/plugins/vis_type_timelion/public/components/chart.tsx rename to src/core/public/application/utils/relative_to_absolute.test.ts index 15a376d4e96386..56a33450ce902c 100644 --- a/src/plugins/vis_type_timelion/public/components/chart.tsx +++ b/src/core/public/application/utils/relative_to_absolute.test.ts @@ -17,25 +17,13 @@ * under the License. */ -import React from 'react'; +import { relativeToAbsolute } from './relative_to_absolute'; -import { Sheet } from '../helpers/timelion_request_handler'; -import { Panel } from './panel'; -import { ExprVisAPIEvents } from '../../../visualizations/public'; - -interface ChartComponentProp { - applyFilter: ExprVisAPIEvents['applyFilter']; - interval: string; - renderComplete(): void; - seriesList: Sheet; -} - -function ChartComponent(props: ChartComponentProp) { - if (!props.seriesList) { - return null; - } - - return ; -} - -export { ChartComponent }; +describe('relativeToAbsolute', () => { + it('converts a relative path to an absolute url', () => { + const origin = window.location.origin; + expect(relativeToAbsolute('path')).toEqual(`${origin}/path`); + expect(relativeToAbsolute('/path#hash')).toEqual(`${origin}/path#hash`); + expect(relativeToAbsolute('/path?query=foo')).toEqual(`${origin}/path?query=foo`); + }); +}); diff --git a/src/core/public/application/utils/relative_to_absolute.ts b/src/core/public/application/utils/relative_to_absolute.ts new file mode 100644 index 00000000000000..0f24f754f56cd6 --- /dev/null +++ b/src/core/public/application/utils/relative_to_absolute.ts @@ -0,0 +1,35 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Converts a relative path to an absolute url. + * Implementation is based on a specified behavior of the browser to automatically convert + * a relative url to an absolute one when setting the `href` attribute of a `` html element. + * + * @example + * ```ts + * // current url: `https://kibana:8000/base-path/app/my-app` + * relativeToAbsolute('/base-path/app/another-app') => `https://kibana:8000/base-path/app/another-app` + * ``` + */ +export const relativeToAbsolute = (url: string): string => { + const a = document.createElement('a'); + a.setAttribute('href', url); + return a.href; +}; diff --git a/src/core/public/application/utils/remove_slashes.test.ts b/src/core/public/application/utils/remove_slashes.test.ts new file mode 100644 index 00000000000000..719e1ea08d109e --- /dev/null +++ b/src/core/public/application/utils/remove_slashes.test.ts @@ -0,0 +1,53 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { removeSlashes } from './remove_slashes'; + +describe('removeSlashes', () => { + it('only removes duplicates by default', () => { + expect(removeSlashes('/some//url//to//')).toEqual('/some/url/to/'); + expect(removeSlashes('some/////other//url')).toEqual('some/other/url'); + }); + + it('remove trailing slash when `trailing` is true', () => { + expect(removeSlashes('/some//url//to//', { trailing: true })).toEqual('/some/url/to'); + }); + + it('remove leading slash when `leading` is true', () => { + expect(removeSlashes('/some//url//to//', { leading: true })).toEqual('some/url/to/'); + }); + + it('does not removes duplicates when `duplicates` is false', () => { + expect(removeSlashes('/some//url//to/', { leading: true, duplicates: false })).toEqual( + 'some//url//to/' + ); + expect(removeSlashes('/some//url//to/', { trailing: true, duplicates: false })).toEqual( + '/some//url//to' + ); + }); + + it('accept mixed options', () => { + expect( + removeSlashes('/some//url//to/', { leading: true, duplicates: false, trailing: true }) + ).toEqual('some//url//to'); + expect( + removeSlashes('/some//url//to/', { leading: true, duplicates: true, trailing: true }) + ).toEqual('some/url/to'); + }); +}); diff --git a/src/core/public/application/utils/remove_slashes.ts b/src/core/public/application/utils/remove_slashes.ts new file mode 100644 index 00000000000000..641d7bc4164f48 --- /dev/null +++ b/src/core/public/application/utils/remove_slashes.ts @@ -0,0 +1,42 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Utility to remove trailing, leading or duplicate slashes. + * By default will only remove duplicates. + */ +export const removeSlashes = ( + url: string, + { + trailing = false, + leading = false, + duplicates = true, + }: { trailing?: boolean; leading?: boolean; duplicates?: boolean } = {} +): string => { + if (duplicates) { + url = url.replace(/\/{2,}/g, '/'); + } + if (trailing) { + url = url.replace(/\/$/, ''); + } + if (leading) { + url = url.replace(/^\//, ''); + } + return url; +}; diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index 8937ecb4d9b4e3..2db3eede16e253 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -1907,62 +1907,133 @@ exports[`Header renders 1`] = ` Object { "borders": "none", "items": Array [ - + , + /> + , ], }, Object { "borders": "none", "items": Array [ + + + , - + + /> + @@ -3117,6 +3198,24 @@ exports[`Header renders 1`] = ` +