Skip to content

Commit

Permalink
Merge branch 'master' into reporting/csv-searchsource-version-param
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jul 29, 2021
2 parents 1c96876 + 0ae2134 commit 47329a1
Show file tree
Hide file tree
Showing 280 changed files with 10,493 additions and 9,390 deletions.
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; [SavedObjectMigrationContext](./kibana-plugin-core-server.savedobjectmigrationcontext.md) &gt; [isSingleNamespaceType](./kibana-plugin-core-server.savedobjectmigrationcontext.issinglenamespacetype.md)

## SavedObjectMigrationContext.isSingleNamespaceType property

Whether this is a single-namespace type or not

<b>Signature:</b>

```typescript
readonly isSingleNamespaceType: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface SavedObjectMigrationContext
| Property | Type | Description |
| --- | --- | --- |
| [convertToMultiNamespaceTypeVersion](./kibana-plugin-core-server.savedobjectmigrationcontext.converttomultinamespacetypeversion.md) | <code>string</code> | The version in which this object type is being converted to a multi-namespace type |
| [isSingleNamespaceType](./kibana-plugin-core-server.savedobjectmigrationcontext.issinglenamespacetype.md) | <code>boolean</code> | Whether this is a single-namespace type or not |
| [log](./kibana-plugin-core-server.savedobjectmigrationcontext.log.md) | <code>SavedObjectsMigrationLogger</code> | logger instance to be used by the migration handler |
| [migrationVersion](./kibana-plugin-core-server.savedobjectmigrationcontext.migrationversion.md) | <code>string</code> | The migration version that this migration function is defined for |

3 changes: 3 additions & 0 deletions packages/kbn-apm-config-loader/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
22 changes: 15 additions & 7 deletions packages/kbn-apm-config-loader/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")

PKG_BASE_NAME = "kbn-apm-config-loader"
PKG_REQUIRE_NAME = "@kbn/apm-config-loader"
Expand All @@ -25,21 +26,27 @@ NPM_MODULE_EXTRA_FILES = [
"README.md"
]

SRC_DEPS = [
RUNTIME_DEPS = [
"//packages/elastic-safer-lodash-set",
"//packages/kbn-utils",
"@npm//js-yaml",
"@npm//lodash",
]

TYPES_DEPS = [
"//packages/elastic-safer-lodash-set",
"//packages/kbn-utils",
"@npm//@types/jest",
"@npm//@types/js-yaml",
"@npm//@types/lodash",
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

ts_config(
name = "tsconfig",
Expand All @@ -50,14 +57,15 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
incremental = True,
out_dir = "target",
emit_declaration_only = True,
incremental = False,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -66,7 +74,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-apm-config-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@kbn/apm-config-loader",
"main": "./target/index.js",
"types": "./target/index.d.ts",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
Expand Down
7 changes: 4 additions & 3 deletions packages/kbn-apm-config-loader/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": true,
"outDir": "./target",
"stripInternal": false,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"incremental": false,
"outDir": "./target_types",
"rootDir": "./src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-apm-config-loader/src",
"stripInternal": false,
"types": [
"jest",
"node"
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-common-utils/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
23 changes: 15 additions & 8 deletions packages/kbn-common-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")

PKG_BASE_NAME = "kbn-common-utils"
PKG_REQUIRE_NAME = "@kbn/common-utils"
Expand All @@ -23,18 +24,23 @@ NPM_MODULE_EXTRA_FILES = [
"README.md"
]

SRC_DEPS = [
RUNTIME_DEPS = [
"//packages/kbn-config-schema",
"@npm//load-json-file",
"@npm//tslib",
]

TYPES_DEPS = [
"//packages/kbn-config-schema",
"@npm//tslib",
"@npm//@types/jest",
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

ts_config(
name = "tsconfig",
Expand All @@ -45,14 +51,15 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
incremental = True,
out_dir = "target",
emit_declaration_only = True,
incremental = False,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -61,7 +68,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
5 changes: 2 additions & 3 deletions packages/kbn-common-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "@kbn/common-utils",
"main": "./target/index.js",
"browser": "./target/index.js",
"types": "./target/index.d.ts",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
Expand Down
5 changes: 3 additions & 2 deletions packages/kbn-common-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": true,
"outDir": "target",
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"incremental": false,
"outDir": "target_types",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-common-utils/src",
"types": [
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-std/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
24 changes: 17 additions & 7 deletions packages/kbn-std/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")

PKG_BASE_NAME = "kbn-std"
PKG_REQUIRE_NAME = "@kbn/std"
Expand All @@ -23,7 +24,7 @@ NPM_MODULE_EXTRA_FILES = [
"README.md"
]

SRC_DEPS = [
RUNTIME_DEPS = [
"//packages/kbn-utility-types",
"@npm//lodash",
"@npm//query-string",
Expand All @@ -32,12 +33,20 @@ SRC_DEPS = [
]

TYPES_DEPS = [
"//packages/kbn-utility-types",
"@npm//query-string",
"@npm//rxjs",
"@npm//tslib",
"@npm//@types/jest",
"@npm//@types/lodash",
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

ts_config(
name = "tsconfig",
Expand All @@ -48,14 +57,15 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
incremental = True,
out_dir = "target",
emit_declaration_only = True,
incremental = False,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -64,7 +74,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-std/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@kbn/std",
"main": "./target/index.js",
"types": "./target/index.d.ts",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
Expand Down
7 changes: 4 additions & 3 deletions packages/kbn-std/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"incremental": true,
"outDir": "./target",
"stripInternal": true,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"incremental": false,
"outDir": "./target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-std/src",
"stripInternal": true,
"types": [
"jest",
"node"
Expand Down
12 changes: 7 additions & 5 deletions src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Next page, {page}',
values: { page },
}),
'euiPagination.pageOfTotalCompressed': ({ page, total }: EuiValues) =>
i18n.translate('core.euiPagination.pageOfTotalCompressed', {
defaultMessage: '{page} of {total}',
values: { page, total },
}),
'euiPagination.pageOfTotalCompressed': ({ page, total }: EuiValues) => (
<FormattedMessage
id="core.euiPagination.pageOfTotalCompressed"
defaultMessage="{page} of {total}"
values={{ page, total }}
/>
),
'euiPagination.previousPage': ({ page }: EuiValues) =>
i18n.translate('core.euiPagination.previousPage', {
defaultMessage: 'Previous page, {page}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ function wrapWithTry(
log: new MigrationLogger(log),
migrationVersion: version,
convertToMultiNamespaceTypeVersion: type.convertToMultiNamespaceTypeVersion,
isSingleNamespaceType: type.namespaceType === 'single',
});

return function tryTransformDoc(doc: SavedObjectUnsanitizedDoc) {
Expand Down
3 changes: 3 additions & 0 deletions src/core/server/saved_objects/migrations/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ export const createSavedObjectsMigrationLoggerMock = (): jest.Mocked<SavedObject
const createContextMock = ({
migrationVersion = '8.0.0',
convertToMultiNamespaceTypeVersion,
isSingleNamespaceType = false,
}: {
migrationVersion?: string;
convertToMultiNamespaceTypeVersion?: string;
isSingleNamespaceType?: boolean;
} = {}): jest.Mocked<SavedObjectMigrationContext> => {
const mock = {
log: createSavedObjectsMigrationLoggerMock(),
migrationVersion,
convertToMultiNamespaceTypeVersion,
isSingleNamespaceType,
};
return mock;
};
Expand Down
4 changes: 4 additions & 0 deletions src/core/server/saved_objects/migrations/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export interface SavedObjectMigrationContext {
* The version in which this object type is being converted to a multi-namespace type
*/
readonly convertToMultiNamespaceTypeVersion?: string;
/**
* Whether this is a single-namespace type or not
*/
readonly isSingleNamespaceType: boolean;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2268,6 +2268,7 @@ export interface SavedObjectExportBaseOptions {
// @public
export interface SavedObjectMigrationContext {
readonly convertToMultiNamespaceTypeVersion?: string;
readonly isSingleNamespaceType: boolean;
readonly log: SavedObjectsMigrationLogger;
readonly migrationVersion: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { RangeControlEditor } from './range_control_editor';
import { ListControlEditor } from './list_control_editor';
import { getTitle, ControlParams, CONTROL_TYPES, ControlParamsOptions } from '../../editor_utils';
import { IIndexPattern } from '../../../../data/public';
import { IndexPattern } from '../../../../data/public';
import { InputControlVisDependencies } from '../../plugin';

import './control_editor.scss';
Expand All @@ -35,7 +35,7 @@ interface ControlEditorUiProps {
handleRemoveControl: (controlIndex: number) => void;
handleIndexPatternChange: (controlIndex: number, indexPatternId: string) => void;
handleFieldNameChange: (controlIndex: number, fieldName: string) => void;
getIndexPattern: (indexPatternId: string) => Promise<IIndexPattern>;
getIndexPattern: (indexPatternId: string) => Promise<IndexPattern>;
handleOptionsChange: <T extends keyof ControlParamsOptions>(
controlIndex: number,
optionName: T,
Expand Down
Loading

0 comments on commit 47329a1

Please sign in to comment.