Skip to content

Commit

Permalink
Merge branch 'main' into migrate-popover
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Apr 10, 2022
2 parents d44c921 + 27ff7d3 commit bc1b7c2
Show file tree
Hide file tree
Showing 539 changed files with 6,112 additions and 3,717 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ module.exports = {
*/
{
files: [
'packages/elastic-datemath/**/*.{js,mjs,ts,tsx}',
'packages/elastic-eslint-config-kibana/**/*.{js,mjs,ts,tsx}',
'packages/kbn-datemath/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@kbn/eslint/require-license-header': [
Expand Down
10 changes: 4 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
# The #CC# prefix delineates Code Coverage,
# used for the 'team' designator within Kibana Stats

# Tech leads
/dev_docs @elastic/kibana-tech-leads
/src/dev/license_checker/config.ts @elastic/kibana-tech-leads
/packages/kbn-docs-utils/ @elastic/kibana-tech-leads @elastic/kibana-operations

# Virtual teams
/x-pack/plugins/rule_registry/ @elastic/rac @elastic/response-ops

Expand Down Expand Up @@ -60,7 +55,7 @@
/examples/field_formats_example/ @elastic/kibana-app-services
/examples/partial_results_example/ @elastic/kibana-app-services
/examples/search_examples/ @elastic/kibana-app-services
/packages/elastic-datemath/ @elastic/kibana-app-services
/packages/kbn-datemath/ @elastic/kibana-app-services
/packages/kbn-interpreter/ @elastic/kibana-app-services
/packages/kbn-react-field/ @elastic/kibana-app-services
/packages/kbn-es-query/ @elastic/kibana-app-services
Expand Down Expand Up @@ -216,6 +211,8 @@
/packages/kbn-mapbox-gl @elastic/kibana-gis

# Operations
/src/dev/license_checker/config.ts @elastic/kibana-operations
/packages/kbn-docs-utils/ @elastic/kibana-operations
/src/dev/ @elastic/kibana-operations
/src/setup_node_env/ @elastic/kibana-operations
/packages/*eslint*/ @elastic/kibana-operations
Expand Down Expand Up @@ -327,6 +324,7 @@
/src/plugins/interactive_setup/ @elastic/kibana-security
/test/interactive_setup_api_integration/ @elastic/kibana-security
/test/interactive_setup_functional/ @elastic/kibana-security
/test/plugin_functional/test_suites/core_plugins/rendering.ts @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
Expand Down
3 changes: 2 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"share": "src/plugins/share",
"sharedUX": "src/plugins/shared_ux",
"sharedUXComponents": "packages/kbn-shared-ux-components/src",
"coloring": "packages/kbn-coloring/src",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": [
"src/plugins/telemetry",
Expand Down Expand Up @@ -94,4 +95,4 @@
"unifiedSearch": "src/plugins/unified_search"
},
"translations": []
}
}
16 changes: 8 additions & 8 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
sha256 = "523da2d6b50bc00eaf14b00ed28b1a366b3ab456e14131e9812558b26599125c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.3.1/rules_nodejs-5.3.1.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
# Build Node.js rules dependencies
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "4.0.0")
# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand All @@ -38,14 +39,13 @@ node_repositories(
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
yarn_repositories = {
yarn_releases = {
"1.21.1": ("yarn-v1.21.1.tar.gz", "yarn-v1.21.1", "d1d9f4a0f16f5ed484e814afeb98f39b82d4728c6c8beaafb5abc99c02db6674"),
},
yarn_version = "1.21.1",
yarn_urls = [
"https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}",
],
package_json = ["//:package.json"],
)

# Run yarn_install rule to take care of dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ yarn kbn watch
[discrete]
=== List of Already Migrated Packages to Bazel

- @elastic/datemath
- @elastic/eslint-config-kibana
- @elastic/safer-lodash-set
- @kbn/ace
Expand All @@ -64,6 +63,7 @@ yarn kbn watch
- @kbn/config
- @kbn/config-schema
- @kbn/crypto
- @kbn/datemath
- @kbn/dev-utils
- @kbn/docs-utils
- @kbn/es
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## App.id property

The unique identifier of the application
The unique identifier of the application.

Can only be composed of alphanumeric characters, `-`<!-- -->, `:` and `_`

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface App<HistoryLocationState = unknown> extends AppNavOptions
| [deepLinks?](./kibana-plugin-core-public.app.deeplinks.md) | AppDeepLink\[\] | <i>(Optional)</i> Input type for registering secondary in-app locations for an application.<!-- -->Deep links must include at least one of <code>path</code> or <code>deepLinks</code>. A deep link that does not have a <code>path</code> represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. |
| [defaultPath?](./kibana-plugin-core-public.app.defaultpath.md) | string | <i>(Optional)</i> Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the <code>path</code> option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. |
| [exactRoute?](./kibana-plugin-core-public.app.exactroute.md) | boolean | <i>(Optional)</i> If set to true, the application's route will only be checked against an exact match. Defaults to <code>false</code>. |
| [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application |
| [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application.<!-- -->Can only be composed of alphanumeric characters, <code>-</code>, <code>:</code> and <code>_</code> |
| [keywords?](./kibana-plugin-core-public.app.keywords.md) | string\[\] | <i>(Optional)</i> Optional keywords to match with in deep links search. Omit if this part of the hierarchy does not have a page URL. |
| [mount](./kibana-plugin-core-public.app.mount.md) | AppMount&lt;HistoryLocationState&gt; | A mount function called when the user navigates to this app's route. |
| [navLinkStatus?](./kibana-plugin-core-public.app.navlinkstatus.md) | AppNavLinkStatus | <i>(Optional)</i> The initial status of the application's navLink. Defaulting to <code>visible</code> if <code>status</code> is <code>accessible</code> and <code>hidden</code> if status is <code>inaccessible</code> See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ navigateToUrl(url: string, options?: NavigateToUrlOptions): Promise<void>;
| Parameter | Type | Description |
| --- | --- | --- |
| url | string | an absolute URL, an absolute path or a relative path, to navigate to. |
| options | NavigateToUrlOptions | |
| options | NavigateToUrlOptions | navigation options |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [DiscoveredPlugin](./kibana-plugin-core-server.discoveredplugin.md) &gt; [enabledOnAnonymousPages](./kibana-plugin-core-server.discoveredplugin.enabledonanonymouspages.md)

## DiscoveredPlugin.enabledOnAnonymousPages property

Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when configured, etc.) Default is false.

<b>Signature:</b>

```typescript
readonly enabledOnAnonymousPages?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface DiscoveredPlugin
| Property | Type | Description |
| --- | --- | --- |
| [configPath](./kibana-plugin-core-server.discoveredplugin.configpath.md) | ConfigPath | Root configuration path used by the plugin, defaults to "id" in snake\_case format. |
| [enabledOnAnonymousPages?](./kibana-plugin-core-server.discoveredplugin.enabledonanonymouspages.md) | boolean | <i>(Optional)</i> Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when configured, etc.) Default is false. |
| [id](./kibana-plugin-core-server.discoveredplugin.id.md) | PluginName | Identifier of the plugin. |
| [optionalPlugins](./kibana-plugin-core-server.discoveredplugin.optionalplugins.md) | readonly PluginName\[\] | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. |
| [requiredBundles](./kibana-plugin-core-server.discoveredplugin.requiredbundles.md) | readonly PluginName\[\] | List of plugin ids that this plugin's UI code imports modules from that are not in <code>requiredPlugins</code>. |
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [IRenderOptions](./kibana-plugin-core-server.irenderoptions.md) &gt; [isAnonymousPage](./kibana-plugin-core-server.irenderoptions.isanonymouspage.md)

## IRenderOptions.isAnonymousPage property

Set whether the page is anonymous, which determines what plugins are enabled and whether to output user settings in the page metadata. `false` by default.

<b>Signature:</b>

```typescript
isAnonymousPage?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface IRenderOptions

| Property | Type | Description |
| --- | --- | --- |
| [includeUserSettings?](./kibana-plugin-core-server.irenderoptions.includeusersettings.md) | boolean | <i>(Optional)</i> Set whether to output user settings in the page metadata. <code>true</code> by default. |
| [isAnonymousPage?](./kibana-plugin-core-server.irenderoptions.isanonymouspage.md) | boolean | <i>(Optional)</i> Set whether the page is anonymous, which determines what plugins are enabled and whether to output user settings in the page metadata. <code>false</code> by default. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [PluginManifest](./kibana-plugin-core-server.pluginmanifest.md) &gt; [enabledOnAnonymousPages](./kibana-plugin-core-server.pluginmanifest.enabledonanonymouspages.md)

## PluginManifest.enabledOnAnonymousPages property

Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when configured, etc.) Default is false.

<b>Signature:</b>

```typescript
readonly enabledOnAnonymousPages?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Should never be used in code outside of Core but is exported for documentation p
| --- | --- | --- |
| [configPath](./kibana-plugin-core-server.pluginmanifest.configpath.md) | ConfigPath | Root used by the plugin, defaults to "id" in snake\_case format. |
| [description?](./kibana-plugin-core-server.pluginmanifest.description.md) | string | <i>(Optional)</i> TODO: make required once all plugins specify this. A brief description of what this plugin does and any capabilities it provides. |
| [enabledOnAnonymousPages?](./kibana-plugin-core-server.pluginmanifest.enabledonanonymouspages.md) | boolean | <i>(Optional)</i> Specifies whether this plugin - and its required dependencies - will be enabled for anonymous pages (login page, status page when configured, etc.) Default is false. |
| [extraPublicDirs?](./kibana-plugin-core-server.pluginmanifest.extrapublicdirs.md) | string\[\] | <i>(Optional)</i> Specifies directory names that can be imported by other ui-plugins built using the same instance of the @<!-- -->kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins |
| [id](./kibana-plugin-core-server.pluginmanifest.id.md) | PluginName | Identifier of the plugin. Must be a string in camelCase. Part of a plugin public contract. Other plugins leverage it to access plugin API, navigate to the plugin, etc. |
| [kibanaVersion](./kibana-plugin-core-server.pluginmanifest.kibanaversion.md) | string | The version of Kibana the plugin is compatible with, defaults to "version". |
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@elastic/apm-rum-react": "^1.3.4",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "45.1.1",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
"@elastic/ems-client": "8.2.0",
"@elastic/eui": "53.0.1",
Expand Down Expand Up @@ -136,9 +136,11 @@
"@kbn/analytics": "link:bazel-bin/packages/kbn-analytics",
"@kbn/apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader",
"@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils",
"@kbn/coloring": "link:bazel-bin/packages/kbn-coloring",
"@kbn/config": "link:bazel-bin/packages/kbn-config",
"@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema",
"@kbn/crypto": "link:bazel-bin/packages/kbn-crypto",
"@kbn/datemath": "link:bazel-bin/packages/kbn-datemath",
"@kbn/doc-links": "link:bazel-bin/packages/kbn-doc-links",
"@kbn/es-query": "link:bazel-bin/packages/kbn-es-query",
"@kbn/eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports",
Expand Down Expand Up @@ -309,7 +311,7 @@
"mime-types": "^2.1.27",
"mini-css-extract-plugin": "1.1.0",
"minimatch": "^3.1.2",
"moment": "^2.24.0",
"moment": "^2.29.2",
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.27",
"monaco-editor": "^0.22.3",
Expand Down Expand Up @@ -454,7 +456,7 @@
"@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0",
"@bazel/ibazel": "^0.16.2",
"@bazel/typescript": "4.0.0",
"@bazel/typescript": "5.3.1",
"@cypress/code-coverage": "^3.9.12",
"@cypress/snapshot": "^2.1.7",
"@cypress/webpack-preprocessor": "^5.6.0",
Expand Down Expand Up @@ -544,7 +546,6 @@
"@types/delete-empty": "^2.0.0",
"@types/ejs": "^3.0.6",
"@types/elastic__apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace/npm_module_types",
"@types/elastic__datemath": "link:bazel-bin/packages/elastic-datemath/npm_module_types",
"@types/enzyme": "^3.10.8",
"@types/eslint": "^7.28.0",
"@types/express": "^4.17.13",
Expand Down Expand Up @@ -590,9 +591,11 @@
"@types/kbn__axe-config": "link:bazel-bin/packages/kbn-axe-config/npm_module_types",
"@types/kbn__bazel-packages": "link:bazel-bin/packages/kbn-bazel-packages/npm_module_types",
"@types/kbn__cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode/npm_module_types",
"@types/kbn__coloring": "link:bazel-bin/packages/kbn-coloring/npm_module_types",
"@types/kbn__config": "link:bazel-bin/packages/kbn-config/npm_module_types",
"@types/kbn__config-schema": "link:bazel-bin/packages/kbn-config-schema/npm_module_types",
"@types/kbn__crypto": "link:bazel-bin/packages/kbn-crypto/npm_module_types",
"@types/kbn__datemath": "link:bazel-bin/packages/kbn-datemath/npm_module_types",
"@types/kbn__dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module_types",
"@types/kbn__doc-links": "link:bazel-bin/packages/kbn-doc-links/npm_module_types",
"@types/kbn__docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module_types",
Expand Down
6 changes: 4 additions & 2 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ filegroup(
srcs = [
"//packages/elastic-analytics:build",
"//packages/elastic-apm-synthtrace:build",
"//packages/elastic-datemath:build",
"//packages/elastic-eslint-config-kibana:build",
"//packages/elastic-safer-lodash-set:build",
"//packages/kbn-ace:build",
Expand All @@ -26,9 +25,11 @@ filegroup(
"//packages/kbn-babel-preset:build",
"//packages/kbn-bazel-packages:build",
"//packages/kbn-cli-dev-mode:build",
"//packages/kbn-coloring:build",
"//packages/kbn-config-schema:build",
"//packages/kbn-config:build",
"//packages/kbn-crypto:build",
"//packages/kbn-datemath:build",
"//packages/kbn-dev-utils:build",
"//packages/kbn-doc-links:build",
"//packages/kbn-docs-utils:build",
Expand Down Expand Up @@ -101,7 +102,6 @@ filegroup(
srcs = [
"//packages/elastic-analytics:build_types",
"//packages/elastic-apm-synthtrace:build_types",
"//packages/elastic-datemath:build_types",
"//packages/elastic-safer-lodash-set:build_types",
"//packages/kbn-ace:build_types",
"//packages/kbn-alerts:build_types",
Expand All @@ -111,9 +111,11 @@ filegroup(
"//packages/kbn-axe-config:build_types",
"//packages/kbn-bazel-packages:build_types",
"//packages/kbn-cli-dev-mode:build_types",
"//packages/kbn-coloring:build_types",
"//packages/kbn-config-schema:build_types",
"//packages/kbn-config:build_types",
"//packages/kbn-crypto:build_types",
"//packages/kbn-datemath:build_types",
"//packages/kbn-dev-utils:build_types",
"//packages/kbn-doc-links:build_types",
"//packages/kbn-docs-utils:build_types",
Expand Down
4 changes: 2 additions & 2 deletions packages/elastic-apm-synthtrace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [
]

RUNTIME_DEPS = [
"//packages/elastic-datemath",
"//packages/kbn-datemath",
"@npm//@elastic/elasticsearch",
"@npm//lodash",
"@npm//moment",
Expand All @@ -36,7 +36,7 @@ RUNTIME_DEPS = [
]

TYPES_DEPS = [
"//packages/elastic-datemath:npm_module_types",
"//packages/kbn-datemath:npm_module_types",
"@npm//@elastic/elasticsearch",
"@npm//@types/jest",
"@npm//@types/lodash",
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic-apm-synthtrace/src/scripts/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import datemath from '@elastic/datemath';
import datemath from '@kbn/datemath';
import yargs from 'yargs/yargs';
import { Argv } from 'yargs';
import { intervalToMs } from './utils/interval_to_ms';
Expand Down
9 changes: 9 additions & 0 deletions packages/kbn-coloring/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

module.exports = require('@kbn/storybook').defaultConfig;
Loading

0 comments on commit bc1b7c2

Please sign in to comment.