diff --git a/package.json b/package.json index f2c760ed19cc110..68f5043166b162e 100644 --- a/package.json +++ b/package.json @@ -210,8 +210,9 @@ "@kbn/eslint-plugin-license-header": "link:packages/kbn-eslint-plugin-license-header", "@kbn/plugin-generator": "link:packages/kbn-plugin-generator", "@kbn/test": "link:packages/kbn-test", + "@types/angular": "^1.6.50", + "@types/angular-mocks": "^1.7.0", "@octokit/rest": "^15.10.0", - "@types/angular": "^1.6.45", "@types/babel-core": "^6.25.5", "@types/bluebird": "^3.1.1", "@types/boom": "^7.2.0", diff --git a/packages/kbn-es/package.json b/packages/kbn-es/package.json index 9e798ebbe7e0be4..861be267be7fce4 100644 --- a/packages/kbn-es/package.json +++ b/packages/kbn-es/package.json @@ -8,7 +8,6 @@ "@kbn/dev-utils": "link:../kbn-dev-utils", "chalk": "^2.4.1", "dedent": "^0.7.0", - "elasticsearch": "^14.1.0", "execa": "^0.10.0", "getopts": "^2.0.6", "glob": "^7.1.2", diff --git a/packages/kbn-es/yarn.lock b/packages/kbn-es/yarn.lock index 16c1f54ad5dc953..8eb8bd13777d1e2 100644 --- a/packages/kbn-es/yarn.lock +++ b/packages/kbn-es/yarn.lock @@ -6,20 +6,6 @@ version "0.0.0" uid "" -agentkeepalive@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.4.1.tgz#aa95aebc3a749bca5ed53e3880a09f5235b48f0c" - dependencies: - humanize-ms "^1.2.1" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -47,16 +33,6 @@ buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" -chalk@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -107,24 +83,13 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" -elasticsearch@^14.1.0: - version "14.2.0" - resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-14.2.0.tgz#ef7c6e505cb41525a0751b5156e8c0fbd1f02d62" - dependencies: - agentkeepalive "^3.4.1" - chalk "^1.0.0" - lodash "2.4.2" - lodash.get "^4.4.2" - lodash.isempty "^4.4.0" - lodash.trimend "^4.5.1" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" dependencies: once "^1.4.0" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -169,22 +134,10 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - dependencies: - ms "^2.0.0" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -208,22 +161,6 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - -lodash.isempty@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" - -lodash.trimend@^4.5.1: - version "4.5.1" - resolved "https://registry.yarnpkg.com/lodash.trimend/-/lodash.trimend-4.5.1.tgz#12804437286b98cad8996b79414e11300114082f" - -lodash@2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" - minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -252,10 +189,6 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -ms@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" @@ -355,20 +288,10 @@ string_decoder@~1.0.3: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - supports-color@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" diff --git a/packages/kbn-i18n/.babelrc b/packages/kbn-i18n/.babelrc deleted file mode 100644 index 4216ef3ceccd9d3..000000000000000 --- a/packages/kbn-i18n/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "env": { - "web": { - "presets": ["@kbn/babel-preset/webpack_preset"] - }, - "node": { - "presets": ["@kbn/babel-preset/node_preset"] - } - } -} diff --git a/packages/kbn-i18n/angular/package.json b/packages/kbn-i18n/angular/package.json index 1359539d4a86724..1e98356f11639c7 100644 --- a/packages/kbn-i18n/angular/package.json +++ b/packages/kbn-i18n/angular/package.json @@ -1,4 +1,5 @@ { "browser": "../target/web/angular", - "main": "../target/node/angular" + "main": "../target/node/angular", + "types": "./target/types/angular/index.d.ts" } diff --git a/packages/kbn-i18n/babel.config.js b/packages/kbn-i18n/babel.config.js new file mode 100644 index 000000000000000..3530b4daf67923a --- /dev/null +++ b/packages/kbn-i18n/babel.config.js @@ -0,0 +1,51 @@ +/* + * 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. + */ + +// We can't use common Kibana presets here because of babel versions incompatibility +module.exports = { + plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread'], + presets: ['@babel/preset-react', '@babel/typescript'], + env: { + web: { + presets: [ + [ + '@babel/preset-env', + { + targets: { + browsers: ['last 2 versions', '> 5%', 'Safari 7'], + }, + }, + ], + ], + }, + node: { + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 'current', + }, + }, + ], + ], + }, + }, + ignore: ['**/*.test.ts', '**/*.test.tsx'], +}; diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index e760bcd51e8fc05..7cd11c2f8a12902 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -2,30 +2,40 @@ "name": "@kbn/i18n", "browser": "./target/web/browser.js", "main": "./target/node/index.js", + "types": "./target/types/index.d.ts", "module": "./src/index.js", "version": "1.0.0", "license": "Apache-2.0", "private": true, "scripts": { - "build": "yarn build:web && yarn build:node", - "build:web": "cross-env BABEL_ENV=web babel src --out-dir target/web", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir target/node", + "build": "yarn build:web && yarn build:node && yarn build:types", + "build:types": "tsc --emitDeclarationOnly", + "build:web": "cross-env BABEL_ENV=web babel src --config-file ./babel.config.js --out-dir target/web --extensions \".ts,.js,.tsx\"", + "build:node": "cross-env BABEL_ENV=node babel src --config-file ./babel.config.js --out-dir target/node --extensions \".ts,.js,.tsx\"", "kbn:bootstrap": "yarn build", "kbn:watch": "yarn build --watch" }, "devDependencies": { - "@kbn/babel-preset": "link:../kbn-babel-preset", - "@kbn/dev-utils": "link:../kbn-dev-utils", - "babel-cli": "^6.26.0", - "cross-env": "^5.2.0" + "@babel/cli": "^7.1.0", + "@babel/core": "^7.1.0", + "@babel/plugin-proposal-class-properties": "^7.1.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/preset-env": "^7.1.0", + "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@types/intl-relativeformat": "^2.1.0", + "@types/json5": "^0.0.30", + "@types/react-intl": "^2.3.11", + "cross-env": "^5.2.0", + "typescript": "^3.0.3" }, "dependencies": { "intl-format-cache": "^2.1.0", "intl-messageformat": "^2.2.0", "intl-relativeformat": "^2.1.0", - "json5": "^1.0.1", - "prop-types": "^15.5.8", + "json5": "^2.0.1", + "prop-types": "^15.6.2", "react": "^16.3.0", - "react-intl": "^2.4.0" + "react-intl": "^2.7.0" } } diff --git a/packages/kbn-i18n/react/package.json b/packages/kbn-i18n/react/package.json index 73e591f8b1fc3e0..e075c66a584116c 100644 --- a/packages/kbn-i18n/react/package.json +++ b/packages/kbn-i18n/react/package.json @@ -1,4 +1,5 @@ { "browser": "../target/web/react", - "main": "../target/node/react" + "main": "../target/node/react", + "types": "./target/types/react/index.d.ts" } diff --git a/packages/kbn-i18n/src/__snapshots__/loader.test.js.snap b/packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap similarity index 100% rename from packages/kbn-i18n/src/__snapshots__/loader.test.js.snap rename to packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap diff --git a/packages/kbn-i18n/src/angular/directive.test.js b/packages/kbn-i18n/src/angular/directive.test.ts similarity index 79% rename from packages/kbn-i18n/src/angular/directive.test.js rename to packages/kbn-i18n/src/angular/directive.test.ts index 6f28c0b453236a5..20bcab4e67cdac0 100644 --- a/packages/kbn-i18n/src/angular/directive.test.js +++ b/packages/kbn-i18n/src/angular/directive.test.ts @@ -19,27 +19,30 @@ import angular from 'angular'; import 'angular-mocks'; + import { i18nDirective } from './directive'; -import { i18nProvider } from './provider'; +import { I18nProvider } from './provider'; angular .module('app', []) - .provider('i18n', i18nProvider) + .provider('i18n', I18nProvider) .directive('i18nId', i18nDirective); describe('i18nDirective', () => { - let compile; - let scope; + let compile: angular.ICompileService; + let scope: angular.IRootScopeService; beforeEach(angular.mock.module('app')); beforeEach( - angular.mock.inject(($compile, $rootScope) => { - compile = $compile; - scope = $rootScope.$new(); - }) + angular.mock.inject( + ($compile: angular.ICompileService, $rootScope: angular.IRootScopeService) => { + compile = $compile; + scope = $rootScope.$new(); + } + ) ); - it('inserts correct translation html content', () => { + test('inserts correct translation html content', () => { const id = 'id'; const defaultMessage = 'default-message'; @@ -56,7 +59,7 @@ describe('i18nDirective', () => { expect(element.html()).toEqual(defaultMessage); }); - it('inserts correct translation html content with values', () => { + test('inserts correct translation html content with values', () => { const id = 'id'; const defaultMessage = 'default-message {word}'; const compiledContent = 'default-message word'; diff --git a/packages/kbn-i18n/src/angular/directive.js b/packages/kbn-i18n/src/angular/directive.ts similarity index 65% rename from packages/kbn-i18n/src/angular/directive.js rename to packages/kbn-i18n/src/angular/directive.ts index f9421814d9817e2..f0ef9e6b58a898a 100644 --- a/packages/kbn-i18n/src/angular/directive.js +++ b/packages/kbn-i18n/src/angular/directive.ts @@ -17,7 +17,11 @@ * under the License. */ -export function i18nDirective(i18n) { +import { IDirective, IRootElementService, IScope } from 'angular'; + +import { I18nServiceType } from './provider'; + +export function i18nDirective(i18n: I18nServiceType): IDirective { return { restrict: 'A', scope: { @@ -25,19 +29,18 @@ export function i18nDirective(i18n) { defaultMessage: '@i18nDefaultMessage', values: '=i18nValues', }, - link: function($scope, $element) { - $scope.$watchGroup(['id', 'defaultMessage', 'values'], function([ - id, - defaultMessage = '', - values = {}, - ]) { - $element.html( - i18n(id, { - values, - defaultMessage, - }) - ); - }); + link($scope: IScope, $element: IRootElementService) { + $scope.$watchGroup( + ['id', 'defaultMessage', 'values'], + ([id, defaultMessage = '', values = {}]) => { + $element.html( + i18n(id, { + values, + defaultMessage, + }) + ); + } + ); }, }; } diff --git a/packages/kbn-i18n/src/angular/filter.test.js b/packages/kbn-i18n/src/angular/filter.test.ts similarity index 85% rename from packages/kbn-i18n/src/angular/filter.test.js rename to packages/kbn-i18n/src/angular/filter.test.ts index b1ec5b8c3ad4ced..78bc27968935733 100644 --- a/packages/kbn-i18n/src/angular/filter.test.js +++ b/packages/kbn-i18n/src/angular/filter.test.ts @@ -17,23 +17,24 @@ * under the License. */ -import angular from 'angular'; -import 'angular-mocks'; -import { i18nProvider } from './provider'; -import { i18nFilter } from './filter'; -import * as i18n from '../core/i18n'; - jest.mock('../core/i18n', () => ({ translate: jest.fn().mockImplementation(() => 'translation'), })); +import angular from 'angular'; +import 'angular-mocks'; + +import * as i18n from '../core/i18n'; +import { i18nFilter as angularI18nFilter } from './filter'; +import { I18nProvider, I18nServiceType } from './provider'; + angular .module('app', []) - .provider('i18n', i18nProvider) - .filter('i18n', i18nFilter); + .provider('i18n', I18nProvider) + .filter('i18n', angularI18nFilter); describe('i18nFilter', () => { - let filter; + let filter: I18nServiceType; beforeEach(angular.mock.module('app')); beforeEach( @@ -45,15 +46,15 @@ describe('i18nFilter', () => { jest.resetAllMocks(); }); - it('provides wrapper around i18n engine', () => { + test('provides wrapper around i18n engine', () => { const id = 'id'; const defaultMessage = 'default-message'; const values = {}; const result = filter(id, { defaultMessage, values }); + expect(result).toEqual('translation'); expect(i18n.translate).toHaveBeenCalledTimes(1); expect(i18n.translate).toHaveBeenCalledWith(id, { defaultMessage, values }); - expect(result).toEqual('translation'); }); }); diff --git a/packages/kbn-i18n/src/angular/filter.js b/packages/kbn-i18n/src/angular/filter.ts similarity index 83% rename from packages/kbn-i18n/src/angular/filter.js rename to packages/kbn-i18n/src/angular/filter.ts index cdbe869237b1a62..2f7425a9dd8e0dc 100644 --- a/packages/kbn-i18n/src/angular/filter.js +++ b/packages/kbn-i18n/src/angular/filter.ts @@ -17,8 +17,10 @@ * under the License. */ -export function i18nFilter(i18n) { - return function(id, { defaultMessage = '', values = {} } = {}) { +import { I18nServiceType } from './provider'; + +export function i18nFilter(i18n: I18nServiceType) { + return (id: string, { defaultMessage = '', values = {} } = {}) => { return i18n(id, { values, defaultMessage, diff --git a/packages/kbn-i18n/src/angular/index.js b/packages/kbn-i18n/src/angular/index.ts similarity index 95% rename from packages/kbn-i18n/src/angular/index.js rename to packages/kbn-i18n/src/angular/index.ts index a7af6fbeffc3511..da3fa03bc2f120c 100644 --- a/packages/kbn-i18n/src/angular/index.js +++ b/packages/kbn-i18n/src/angular/index.ts @@ -17,6 +17,6 @@ * under the License. */ -export { i18nProvider } from './provider'; +export { I18nProvider } from './provider'; export { i18nFilter } from './filter'; export { i18nDirective } from './directive'; diff --git a/packages/kbn-i18n/src/angular/provider.test.js b/packages/kbn-i18n/src/angular/provider.test.ts similarity index 64% rename from packages/kbn-i18n/src/angular/provider.test.js rename to packages/kbn-i18n/src/angular/provider.test.ts index 3246a6f1964d666..dfa1894c82c7ad2 100644 --- a/packages/kbn-i18n/src/angular/provider.test.js +++ b/packages/kbn-i18n/src/angular/provider.test.ts @@ -19,36 +19,37 @@ import angular from 'angular'; import 'angular-mocks'; -import { i18nProvider } from './provider'; -import * as i18n from '../core/i18n'; -angular.module('app', []).provider('i18n', i18nProvider); +import * as i18nCore from '../core/i18n'; +import { I18nProvider, I18nServiceType } from './provider'; + +angular.module('app', []).provider('i18n', I18nProvider); describe('i18nProvider', () => { - let provider; - let service; + let provider: I18nProvider; + let service: I18nServiceType; beforeEach( angular.mock.module('app', [ 'i18nProvider', - i18n => { - service = i18n; + (i18n: I18nProvider) => { + provider = i18n; }, ]) ); beforeEach( - angular.mock.inject(i18n => { - provider = i18n; + angular.mock.inject((i18n: I18nServiceType) => { + service = i18n; }) ); - it('provides wrapper around i18n engine', () => { - expect(provider).toEqual(i18n.translate); + test('provides wrapper around i18n engine', () => { + expect(service).toEqual(i18nCore.translate); }); - it('provides service wrapper around i18n engine', () => { - const serviceMethodNames = Object.keys(service); - const pluginMethodNames = Object.keys(i18n); + test('provides service wrapper around i18n engine', () => { + const serviceMethodNames = Object.keys(provider); + const pluginMethodNames = Object.keys(i18nCore); expect([...serviceMethodNames, 'translate'].sort()).toEqual( [...pluginMethodNames, '$get'].sort() diff --git a/packages/kbn-i18n/src/angular/provider.ts b/packages/kbn-i18n/src/angular/provider.ts new file mode 100644 index 000000000000000..b239afece4d2911 --- /dev/null +++ b/packages/kbn-i18n/src/angular/provider.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 * as i18n from '../core'; + +export type I18nServiceType = ReturnType; + +export class I18nProvider implements angular.IServiceProvider { + public addMessages = i18n.addMessages; + public getMessages = i18n.getMessages; + public setLocale = i18n.setLocale; + public getLocale = i18n.getLocale; + public setDefaultLocale = i18n.setDefaultLocale; + public getDefaultLocale = i18n.getDefaultLocale; + public setFormats = i18n.setFormats; + public getFormats = i18n.getFormats; + public getRegisteredLocales = i18n.getRegisteredLocales; + public init = i18n.init; + public $get = () => i18n.translate; +} diff --git a/packages/kbn-i18n/src/browser.js b/packages/kbn-i18n/src/browser.ts similarity index 100% rename from packages/kbn-i18n/src/browser.js rename to packages/kbn-i18n/src/browser.ts diff --git a/packages/kbn-i18n/src/core/__snapshots__/i18n.test.js.snap b/packages/kbn-i18n/src/core/__snapshots__/i18n.test.ts.snap similarity index 100% rename from packages/kbn-i18n/src/core/__snapshots__/i18n.test.js.snap rename to packages/kbn-i18n/src/core/__snapshots__/i18n.test.ts.snap diff --git a/packages/kbn-i18n/src/core/formats.js b/packages/kbn-i18n/src/core/formats.ts similarity index 65% rename from packages/kbn-i18n/src/core/formats.js rename to packages/kbn-i18n/src/core/formats.ts index 6a74040a7e1b7c1..69cd61d9921dc4d 100644 --- a/packages/kbn-i18n/src/core/formats.js +++ b/packages/kbn-i18n/src/core/formats.ts @@ -28,7 +28,7 @@ * described in `options` section of [DateTimeFormat constructor]. * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat} */ -export const formats = { +export const formats: Formats = { number: { currency: { style: 'currency', @@ -84,3 +84,43 @@ export const formats = { }, }, }; + +interface NumberFormatOptions extends Intl.NumberFormatOptions { + style?: TStyle; + localeMatcher?: 'lookup' | 'best fit'; + currencyDisplay?: 'symbol' | 'code' | 'name'; +} + +export interface Formats { + number?: Partial<{ + [key: string]: NumberFormatOptions<'currency' | 'percent' | 'decimal'>; + currency: NumberFormatOptions<'currency'>; + percent: NumberFormatOptions<'percent'>; + }>; + date?: Partial<{ + [key: string]: DateTimeFormatOptions; + short: DateTimeFormatOptions; + medium: DateTimeFormatOptions; + long: DateTimeFormatOptions; + full: DateTimeFormatOptions; + }>; + time?: Partial<{ + [key: string]: DateTimeFormatOptions; + short: DateTimeFormatOptions; + medium: DateTimeFormatOptions; + long: DateTimeFormatOptions; + full: DateTimeFormatOptions; + }>; +} + +interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { + weekday?: 'narrow' | 'short' | 'long'; + era?: 'narrow' | 'short' | 'long'; + year?: 'numeric' | '2-digit'; + month?: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long'; + day?: 'numeric' | '2-digit'; + hour?: 'numeric' | '2-digit'; + minute?: 'numeric' | '2-digit'; + second?: 'numeric' | '2-digit'; + timeZoneName?: 'short' | 'long'; +} diff --git a/packages/kbn-i18n/src/core/helper.test.js b/packages/kbn-i18n/src/core/helper.test.ts similarity index 97% rename from packages/kbn-i18n/src/core/helper.test.js rename to packages/kbn-i18n/src/core/helper.test.ts index cb54be97ca9e77e..ee2202dca7f0c65 100644 --- a/packages/kbn-i18n/src/core/helper.test.js +++ b/packages/kbn-i18n/src/core/helper.test.ts @@ -17,7 +17,7 @@ * under the License. */ -import { isString, isObject, hasValues, unique, mergeAll } from './helper'; +import { hasValues, isObject, isString, mergeAll, unique } from './helper'; describe('I18n helper', () => { describe('isString', () => { @@ -26,6 +26,7 @@ describe('I18n helper', () => { }); test('should return false for string object', () => { + // tslint:disable-next-line:no-construct expect(isString(new String('test'))).toBe(false); }); diff --git a/packages/kbn-i18n/src/core/helper.js b/packages/kbn-i18n/src/core/helper.ts similarity index 73% rename from packages/kbn-i18n/src/core/helper.js rename to packages/kbn-i18n/src/core/helper.ts index c13b1b3a303e93e..34d7261a0c9aa57 100644 --- a/packages/kbn-i18n/src/core/helper.js +++ b/packages/kbn-i18n/src/core/helper.ts @@ -17,15 +17,16 @@ * under the License. */ -export const isString = value => typeof value === 'string'; +export const isString = (value: any): value is string => typeof value === 'string'; -export const isObject = value => typeof value === 'object' && value !== null; +export const isObject = (value: any): value is object => + typeof value === 'object' && value !== null; -export const hasValues = values => Object.keys(values).length > 0; +export const hasValues = (values: any) => Object.keys(values).length > 0; -export const unique = (arr = []) => [...new Set(arr)]; +export const unique = (arr: T[] = []): T[] => [...new Set(arr)]; -const merge = (a, b) => +const merge = (a: any, b: any): { [k: string]: any } => unique([...Object.keys(a), ...Object.keys(b)]).reduce((acc, key) => { if (isObject(a[key]) && isObject(b[key]) && !Array.isArray(a[key]) && !Array.isArray(b[key])) { return { @@ -40,5 +41,5 @@ const merge = (a, b) => }; }, {}); -export const mergeAll = (...sources) => +export const mergeAll = (...sources: any[]) => sources.filter(isObject).reduce((acc, source) => merge(acc, source)); diff --git a/packages/kbn-i18n/src/core/i18n.test.js b/packages/kbn-i18n/src/core/i18n.test.ts similarity index 89% rename from packages/kbn-i18n/src/core/i18n.test.js rename to packages/kbn-i18n/src/core/i18n.test.ts index 695b65a3e2d3ee6..3839788c0e5e1bb 100644 --- a/packages/kbn-i18n/src/core/i18n.test.js +++ b/packages/kbn-i18n/src/core/i18n.test.ts @@ -17,11 +17,13 @@ * under the License. */ +import * as i18nModule from './i18n'; + describe('I18n engine', () => { - let i18n; + let i18n: typeof i18nModule; beforeEach(() => { - i18n = require('./i18n'); + i18n = require.requireActual('./i18n'); }); afterEach(() => { @@ -181,11 +183,11 @@ describe('I18n engine', () => { describe('setLocale', () => { test('should throw error if locale is not a non-empty string', () => { - expect(() => i18n.setLocale(undefined)).toThrow(); - expect(() => i18n.setLocale(null)).toThrow(); - expect(() => i18n.setLocale(true)).toThrow(); - expect(() => i18n.setLocale(5)).toThrow(); - expect(() => i18n.setLocale({})).toThrow(); + expect(() => i18n.setLocale(undefined as any)).toThrow(); + expect(() => i18n.setLocale(null as any)).toThrow(); + expect(() => i18n.setLocale(true as any)).toThrow(); + expect(() => i18n.setLocale(5 as any)).toThrow(); + expect(() => i18n.setLocale({} as any)).toThrow(); expect(() => i18n.setLocale('')).toThrow(); }); @@ -214,11 +216,11 @@ describe('I18n engine', () => { describe('setDefaultLocale', () => { test('should throw error if locale is not a non-empty string', () => { - expect(() => i18n.setDefaultLocale(undefined)).toThrow(); - expect(() => i18n.setDefaultLocale(null)).toThrow(); - expect(() => i18n.setDefaultLocale(true)).toThrow(); - expect(() => i18n.setDefaultLocale(5)).toThrow(); - expect(() => i18n.setDefaultLocale({})).toThrow(); + expect(() => i18n.setDefaultLocale(undefined as any)).toThrow(); + expect(() => i18n.setDefaultLocale(null as any)).toThrow(); + expect(() => i18n.setDefaultLocale(true as any)).toThrow(); + expect(() => i18n.setDefaultLocale(5 as any)).toThrow(); + expect(() => i18n.setDefaultLocale({} as any)).toThrow(); expect(() => i18n.setDefaultLocale('')).toThrow(); }); @@ -265,16 +267,16 @@ describe('I18n engine', () => { describe('setFormats', () => { test('should throw error if formats parameter is not a non-empty object', () => { - expect(() => i18n.setFormats(undefined)).toThrow(); - expect(() => i18n.setFormats(null)).toThrow(); - expect(() => i18n.setFormats(true)).toThrow(); - expect(() => i18n.setFormats(5)).toThrow(); - expect(() => i18n.setFormats('foo')).toThrow(); - expect(() => i18n.setFormats({})).toThrow(); + expect(() => i18n.setFormats(undefined as any)).toThrow(); + expect(() => i18n.setFormats(null as any)).toThrow(); + expect(() => i18n.setFormats(true as any)).toThrow(); + expect(() => i18n.setFormats(5 as any)).toThrow(); + expect(() => i18n.setFormats('foo' as any)).toThrow(); + expect(() => i18n.setFormats({} as any)).toThrow(); }); test('should merge current formats with a passed formats', () => { - expect(i18n.getFormats().date.short).not.toEqual({ + expect(i18n.getFormats().date!.short).not.toEqual({ month: 'short', day: 'numeric', year: 'numeric', @@ -290,7 +292,7 @@ describe('I18n engine', () => { }, }); - expect(i18n.getFormats().date.short).toEqual({ + expect(i18n.getFormats().date!.short).toEqual({ month: 'short', day: 'numeric', year: 'numeric', @@ -304,7 +306,7 @@ describe('I18n engine', () => { }, }); - expect(i18n.getFormats().date.short).toEqual({ + expect(i18n.getFormats().date!.short).toEqual({ month: 'long', day: 'numeric', year: 'numeric', @@ -323,12 +325,23 @@ describe('I18n engine', () => { const { formats } = require('./formats'); i18n.setFormats({ - foo: 'bar', + number: { + currency: { + style: 'currency', + currency: 'EUR', + }, + }, }); expect(i18n.getFormats()).toEqual({ ...formats, - foo: 'bar', + number: { + ...formats.number, + currency: { + style: 'currency', + currency: 'EUR', + }, + }, }); }); }); @@ -349,25 +362,28 @@ describe('I18n engine', () => { locale: 'ru', }); - expect(i18n.getRegisteredLocales()).toContain('en', 'ru'); + expect(i18n.getRegisteredLocales()).toContain('en'); + expect(i18n.getRegisteredLocales()).toContain('ru'); expect(i18n.getRegisteredLocales().length).toBe(2); i18n.addMessages({ locale: 'fr', }); - expect(i18n.getRegisteredLocales()).toContain('en', 'ru', 'fr'); + expect(i18n.getRegisteredLocales()).toContain('en'); + expect(i18n.getRegisteredLocales()).toContain('fr'); + expect(i18n.getRegisteredLocales()).toContain('ru'); expect(i18n.getRegisteredLocales().length).toBe(3); }); }); describe('translate', () => { test('should throw error if id is not a non-empty string', () => { - expect(() => i18n.translate(undefined)).toThrowErrorMatchingSnapshot(); - expect(() => i18n.translate(null)).toThrowErrorMatchingSnapshot(); - expect(() => i18n.translate(true)).toThrowErrorMatchingSnapshot(); - expect(() => i18n.translate(5)).toThrowErrorMatchingSnapshot(); - expect(() => i18n.translate({})).toThrowErrorMatchingSnapshot(); + expect(() => i18n.translate(undefined as any)).toThrowErrorMatchingSnapshot(); + expect(() => i18n.translate(null as any)).toThrowErrorMatchingSnapshot(); + expect(() => i18n.translate(true as any)).toThrowErrorMatchingSnapshot(); + expect(() => i18n.translate(5 as any)).toThrowErrorMatchingSnapshot(); + expect(() => i18n.translate({} as any)).toThrowErrorMatchingSnapshot(); expect(() => i18n.translate('')).toThrowErrorMatchingSnapshot(); }); @@ -764,7 +780,7 @@ describe('I18n engine', () => { }, }); - expect(i18n.getFormats().date.custom).toEqual({ + expect((i18n.getFormats().date as any).custom).toEqual({ month: 'short', day: 'numeric', year: 'numeric', diff --git a/packages/kbn-i18n/src/core/i18n.js b/packages/kbn-i18n/src/core/i18n.ts similarity index 73% rename from packages/kbn-i18n/src/core/i18n.js rename to packages/kbn-i18n/src/core/i18n.ts index 3d76d13a72d63b7..66c46afa37d78b5 100644 --- a/packages/kbn-i18n/src/core/i18n.js +++ b/packages/kbn-i18n/src/core/i18n.ts @@ -17,25 +17,20 @@ * under the License. */ -/** - @typedef Messages - messages tree, where leafs are translated strings - @type {object} - @property {string} [locale] - locale of the messages - @property {object} [formats] - set of options to the underlying formatter - */ - +import memoizeIntlConstructor from 'intl-format-cache'; import IntlMessageFormat from 'intl-messageformat'; import IntlRelativeFormat from 'intl-relativeformat'; -import memoizeIntlConstructor from 'intl-format-cache'; -import { isString, isObject, hasValues, mergeAll } from './helper'; -import { formats as EN_FORMATS } from './formats'; + +import { Messages, PlainMessages } from '../messages'; +import { Formats, formats as EN_FORMATS } from './formats'; +import { hasValues, isObject, isString, mergeAll } from './helper'; // Add all locale data to `IntlMessageFormat`. -import './locales'; +import './locales.js'; const EN_LOCALE = 'en'; const LOCALE_DELIMITER = '-'; -const messages = {}; +const messages: Messages = {}; const getMessageFormat = memoizeIntlConstructor(IntlMessageFormat); let defaultLocale = EN_LOCALE; @@ -47,28 +42,26 @@ IntlRelativeFormat.defaultLocale = defaultLocale; /** * Returns message by the given message id. - * @param {string} id - path to the message - * @returns {string} message - translated message from messages tree + * @param id - path to the message */ -function getMessageById(id) { +function getMessageById(id: string): string { return getMessages()[id]; } /** * Normalizes locale to make it consistent with IntlMessageFormat locales - * @param {string} locale - * @returns {string} normalizedLocale + * @param locale */ -function normalizeLocale(locale) { +function normalizeLocale(locale: string) { return locale.toLowerCase().replace('_', LOCALE_DELIMITER); } /** * Provides a way to register translations with the engine - * @param {Messages} newMessages - * @param {string} [locale = messages.locale] + * @param newMessages + * @param [locale = messages.locale] */ -export function addMessages(newMessages = {}, locale = newMessages.locale) { +export function addMessages(newMessages: PlainMessages = {}, locale = newMessages.locale) { if (!locale || !isString(locale)) { throw new Error('[I18n] A `locale` must be a non-empty string to add messages.'); } @@ -89,17 +82,16 @@ export function addMessages(newMessages = {}, locale = newMessages.locale) { /** * Returns messages for the current language - * @returns {Messages} messages */ -export function getMessages() { +export function getMessages(): PlainMessages { return messages[currentLocale] || {}; } /** * Tells the engine which language to use by given language key - * @param {string} locale + * @param locale */ -export function setLocale(locale) { +export function setLocale(locale: string) { if (!locale || !isString(locale)) { throw new Error('[I18n] A `locale` must be a non-empty string.'); } @@ -109,7 +101,6 @@ export function setLocale(locale) { /** * Returns the current locale - * @returns {string} locale */ export function getLocale() { return currentLocale; @@ -117,9 +108,9 @@ export function getLocale() { /** * Tells the library which language to fallback when missing translations - * @param {string} locale + * @param locale */ -export function setDefaultLocale(locale) { +export function setDefaultLocale(locale: string) { if (!locale || !isString(locale)) { throw new Error('[I18n] A `locale` must be a non-empty string.'); } @@ -129,10 +120,6 @@ export function setDefaultLocale(locale) { IntlRelativeFormat.defaultLocale = defaultLocale; } -/** - * Returns the default locale - * @returns {string} defaultLocale - */ export function getDefaultLocale() { return defaultLocale; } @@ -143,12 +130,12 @@ export function getDefaultLocale() { * {@link https://github.com/yahoo/intl-messageformat/blob/master/src/core.js#L62} * These are used when constructing the internal Intl.NumberFormat * and Intl.DateTimeFormat instances. - * @param {object} newFormats - * @param {object} [newFormats.number] - * @param {object} [newFormats.date] - * @param {object} [newFormats.time] + * @param newFormats + * @param [newFormats.number] + * @param [newFormats.date] + * @param [newFormats.time] */ -export function setFormats(newFormats) { +export function setFormats(newFormats: Formats) { if (!isObject(newFormats) || !hasValues(newFormats)) { throw new Error('[I18n] A `formats` must be a non-empty object.'); } @@ -158,7 +145,6 @@ export function setFormats(newFormats) { /** * Returns current formats - * @returns {object} formats */ export function getFormats() { return formats; @@ -166,21 +152,30 @@ export function getFormats() { /** * Returns array of locales having translations - * @returns {string[]} locales */ export function getRegisteredLocales() { return Object.keys(messages); } +interface TranslateArguments { + values?: { [key: string]: string | number | Date }; + defaultMessage?: string; +} + /** * Translate message by id - * @param {string} id - translation id to be translated - * @param {object} [options] - * @param {object} [options.values] - values to pass into translation - * @param {string} [options.defaultMessage] - will be used unless translation was successful - * @returns {string} + * @param id - translation id to be translated + * @param [options] + * @param [options.values] - values to pass into translation + * @param [options.defaultMessage] - will be used unless translation was successful */ -export function translate(id, { values = {}, defaultMessage = '' } = {}) { +export function translate( + id: string, + { values = {}, defaultMessage = '' }: TranslateArguments = { + values: {}, + defaultMessage: '', + } +) { if (!id || !isString(id)) { throw new Error('[I18n] An `id` must be a non-empty string to translate a message.'); } @@ -218,9 +213,9 @@ export function translate(id, { values = {}, defaultMessage = '' } = {}) { /** * Initializes the engine - * @param {Messages} newMessages + * @param newMessages */ -export function init(newMessages) { +export function init(newMessages?: PlainMessages) { if (!newMessages) { return; } diff --git a/packages/kbn-i18n/src/core/index.js b/packages/kbn-i18n/src/core/index.ts similarity index 100% rename from packages/kbn-i18n/src/core/index.js rename to packages/kbn-i18n/src/core/index.ts diff --git a/packages/kbn-i18n/src/index.js b/packages/kbn-i18n/src/index.ts similarity index 100% rename from packages/kbn-i18n/src/index.js rename to packages/kbn-i18n/src/index.ts diff --git a/packages/kbn-i18n/src/loader.test.js b/packages/kbn-i18n/src/loader.test.ts similarity index 93% rename from packages/kbn-i18n/src/loader.test.js rename to packages/kbn-i18n/src/loader.test.ts index c2d494a9f1095be..df99c22ede71b2b 100644 --- a/packages/kbn-i18n/src/loader.test.js +++ b/packages/kbn-i18n/src/loader.test.ts @@ -20,7 +20,7 @@ import { join } from 'path'; describe('I18n loader', () => { - let i18nLoader; + let i18nLoader: typeof import('./loader'); beforeEach(() => { i18nLoader = require('./loader'); @@ -33,7 +33,9 @@ describe('I18n loader', () => { describe('registerTranslationFile', () => { test('should throw error if path to translation file is not specified', () => { - expect(() => i18nLoader.registerTranslationFile()).toThrowErrorMatchingSnapshot(); + expect(() => + i18nLoader.registerTranslationFile(undefined as any) + ).toThrowErrorMatchingSnapshot(); }); test('should throw error if path to translation file is not an absolute', () => { @@ -69,7 +71,8 @@ describe('I18n loader', () => { join(__dirname, './__fixtures__/test_plugin_1/translations/en-US.json') ); - expect(i18nLoader.getRegisteredLocales()).toContain('en', 'en-US'); + expect(i18nLoader.getRegisteredLocales()).toContain('en'); + expect(i18nLoader.getRegisteredLocales()).toContain('en-US'); expect(i18nLoader.getRegisteredLocales().length).toBe(2); }); }); @@ -83,7 +86,8 @@ describe('I18n loader', () => { join(__dirname, './__fixtures__/test_plugin_1/translations/en-US.json'), ]); - expect(i18nLoader.getRegisteredLocales()).toContain('en', 'en-US'); + expect(i18nLoader.getRegisteredLocales()).toContain('en'); + expect(i18nLoader.getRegisteredLocales()).toContain('en-US'); expect(i18nLoader.getRegisteredLocales().length).toBe(2); }); }); @@ -228,7 +232,7 @@ describe('I18n loader', () => { }); test('should return empty object if there are no translation files', async () => { - expect(await i18nLoader.getAllTranslationsFromPaths()).toEqual({}); + expect(await i18nLoader.getAllTranslationsFromPaths(undefined as any)).toEqual({}); }); }); }); diff --git a/packages/kbn-i18n/src/loader.js b/packages/kbn-i18n/src/loader.ts similarity index 65% rename from packages/kbn-i18n/src/loader.js rename to packages/kbn-i18n/src/loader.ts index 009d866725846ef..e45964b94e3f979 100644 --- a/packages/kbn-i18n/src/loader.js +++ b/packages/kbn-i18n/src/loader.ts @@ -17,44 +17,38 @@ * under the License. */ -/** - @typedef Messages - messages tree, where leafs are translated strings - @type {object} - @property {string} [locale] - locale of the messages - @property {object} [formats] - set of options to the underlying formatter - */ - -import path from 'path'; import { readFile } from 'fs'; +import * as JSON5 from 'json5'; +import * as path from 'path'; import { promisify } from 'util'; -import JSON5 from 'json5'; + import { unique } from './core/helper'; +import { Messages, PlainMessages } from './messages'; const asyncReadFile = promisify(readFile); const TRANSLATION_FILE_EXTENSION = '.json'; /** - * Internal property for storing registered translations paths - * @type {Map|{}} - Key is locale, value is array of registered paths + * Internal property for storing registered translations paths. + * Key is locale, value is array of registered paths */ -const translationsRegistry = {}; +const translationsRegistry: { [key: string]: string[] } = {}; /** - * Internal property for caching loaded translations files - * @type {Map|{}} - Key is path to translation file, value is - * object with translation messages + * Internal property for caching loaded translations files. + * Key is path to translation file, value is object with translation messages */ -const loadedFiles = {}; +const loadedFiles: { [key: string]: PlainMessages } = {}; /** * Returns locale by the given translation file name - * @param {string} fullFileName - * @returns {string} locale + * @param fullFileName + * @returns locale * @example * getLocaleFromFileName('./path/to/translation/ru.json') // => 'ru' */ -function getLocaleFromFileName(fullFileName) { +function getLocaleFromFileName(fullFileName: string) { if (!fullFileName) { throw new Error('Filename is empty'); } @@ -72,19 +66,19 @@ function getLocaleFromFileName(fullFileName) { /** * Loads file and parses it as JSON5 - * @param {string} pathToFile - * @returns {Promise} + * @param pathToFile + * @returns */ -async function loadFile(pathToFile) { +async function loadFile(pathToFile: string): Promise { return JSON5.parse(await asyncReadFile(pathToFile, 'utf8')); } /** * Loads translations files and adds them into "loadedFiles" cache - * @param {string[]} files - * @returns {Promise} + * @param files + * @returns */ -async function loadAndCacheFiles(files) { +async function loadAndCacheFiles(files: string[]) { const translations = await Promise.all(files.map(loadFile)); files.forEach((file, index) => { @@ -94,9 +88,9 @@ async function loadAndCacheFiles(files) { /** * Registers translation file with i18n loader - * @param {string} translationFilePath - Absolute path to the translation file to register. + * @param translationFilePath - Absolute path to the translation file to register. */ -export function registerTranslationFile(translationFilePath) { +export function registerTranslationFile(translationFilePath: string) { if (!path.isAbsolute(translationFilePath)) { throw new TypeError( 'Paths to translation files must be absolute. ' + @@ -114,15 +108,15 @@ export function registerTranslationFile(translationFilePath) { /** * Registers array of translation files with i18n loader - * @param {string[]} arrayOfPaths - Array of absolute paths to the translation files to register. + * @param arrayOfPaths - Array of absolute paths to the translation files to register. */ -export function registerTranslationFiles(arrayOfPaths = []) { +export function registerTranslationFiles(arrayOfPaths: string[] = []) { arrayOfPaths.forEach(registerTranslationFile); } /** * Returns an array of locales that have been registered with i18n loader - * @returns {string[]} registeredTranslations + * @returns registeredTranslations */ export function getRegisteredLocales() { return Object.keys(translationsRegistry); @@ -130,10 +124,10 @@ export function getRegisteredLocales() { /** * Returns translation messages by specified locale - * @param {string} locale - * @returns {Promise} translations - translation messages + * @param locale + * @returns translation messages */ -export async function getTranslationsByLocale(locale) { +export async function getTranslationsByLocale(locale: string): Promise { const files = translationsRegistry[locale] || []; const notLoadedFiles = files.filter(file => !loadedFiles[file]); @@ -154,10 +148,10 @@ export async function getTranslationsByLocale(locale) { /** * Returns all translations for registered locales - * @return {Promise>} translations - A Promise object + * @returns A Promise object * where keys are the locale and values are objects of translation messages */ -export async function getAllTranslations() { +export async function getAllTranslations(): Promise<{ [key: string]: Messages }> { const locales = getRegisteredLocales(); const translations = await Promise.all(locales.map(getTranslationsByLocale)); @@ -173,11 +167,11 @@ export async function getAllTranslations() { /** * Registers passed translations files, loads them and returns promise with * all translation messages - * @param {string[]} paths - Array of absolute paths to the translation files - * @returns {Promise>} translations - A Promise object - * where keys are the locale and values are objects of translation messages + * @param paths - Array of absolute paths to the translation files + * @returns A Promise object where + * keys are the locale and values are objects of translation messages */ -export async function getAllTranslationsFromPaths(paths) { +export async function getAllTranslationsFromPaths(paths: string[]) { registerTranslationFiles(paths); return await getAllTranslations(); diff --git a/packages/kbn-i18n/src/angular/provider.js b/packages/kbn-i18n/src/messages.ts similarity index 61% rename from packages/kbn-i18n/src/angular/provider.js rename to packages/kbn-i18n/src/messages.ts index e4f73b7de0db3b2..edfea322c7436af 100644 --- a/packages/kbn-i18n/src/angular/provider.js +++ b/packages/kbn-i18n/src/messages.ts @@ -17,18 +17,23 @@ * under the License. */ -import * as i18n from '../core'; +import { Formats } from './core/formats'; -export function i18nProvider() { - this.addMessages = i18n.addMessages; - this.getMessages = i18n.getMessages; - this.setLocale = i18n.setLocale; - this.getLocale = i18n.getLocale; - this.setDefaultLocale = i18n.setDefaultLocale; - this.getDefaultLocale = i18n.getDefaultLocale; - this.setFormats = i18n.setFormats; - this.getFormats = i18n.getFormats; - this.getRegisteredLocales = i18n.getRegisteredLocales; - this.init = i18n.init; - this.$get = () => i18n.translate; +/** + * Messages tree, where leafs are translated strings + */ +export interface Messages { + [key: string]: PlainMessages; +} + +export interface PlainMessages { + [key: string]: any; + /** + * locale of the messages + */ + locale?: string; + /** + * set of options to the underlying formatter + */ + formats?: Formats; } diff --git a/packages/kbn-i18n/src/react/__snapshots__/provider.test.js.snap b/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap similarity index 98% rename from packages/kbn-i18n/src/react/__snapshots__/provider.test.js.snap rename to packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap index 750d2d48b045af8..3929cd16a0c58be 100644 --- a/packages/kbn-i18n/src/react/__snapshots__/provider.test.js.snap +++ b/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap @@ -132,7 +132,9 @@ Object { "locale": "en", "messages": Object {}, "now": [Function], + "onError": [Function], "textComponent": "span", + "timeZone": null, } `; diff --git a/packages/kbn-i18n/src/react/index.js b/packages/kbn-i18n/src/react/index.tsx similarity index 100% rename from packages/kbn-i18n/src/react/index.js rename to packages/kbn-i18n/src/react/index.tsx diff --git a/packages/kbn-i18n/src/react/inject.js b/packages/kbn-i18n/src/react/inject.tsx similarity index 100% rename from packages/kbn-i18n/src/react/inject.js rename to packages/kbn-i18n/src/react/inject.tsx diff --git a/packages/kbn-i18n/src/react/provider.test.js b/packages/kbn-i18n/src/react/provider.test.tsx similarity index 88% rename from packages/kbn-i18n/src/react/provider.test.js rename to packages/kbn-i18n/src/react/provider.test.tsx index 2bfdaedba9130b9..6dabc806541cbe1 100644 --- a/packages/kbn-i18n/src/react/provider.test.js +++ b/packages/kbn-i18n/src/react/provider.test.tsx @@ -17,15 +17,15 @@ * under the License. */ -import React from 'react'; +import { mount, shallow } from 'enzyme'; +import * as React from 'react'; import { intlShape } from 'react-intl'; -import { shallow, mount } from 'enzyme'; -import { I18nProvider } from './provider'; import { injectI18n } from './inject'; +import { I18nProvider } from './provider'; describe('I18nProvider', () => { - it('renders children', () => { - const ChildrenMock = () => {}; + test('renders children', () => { + const ChildrenMock = () => null; const wrapper = shallow( @@ -36,7 +36,7 @@ describe('I18nProvider', () => { expect(wrapper.children()).toMatchSnapshot(); }); - it('provides with context', () => { + test('provides with context', () => { const childrenMock = () =>
; const WithIntl = injectI18n(childrenMock); diff --git a/packages/kbn-i18n/src/react/provider.js b/packages/kbn-i18n/src/react/provider.tsx similarity index 89% rename from packages/kbn-i18n/src/react/provider.js rename to packages/kbn-i18n/src/react/provider.tsx index 46e94863a0ba1a2..adeef0dbc21b92e 100644 --- a/packages/kbn-i18n/src/react/provider.js +++ b/packages/kbn-i18n/src/react/provider.tsx @@ -17,8 +17,8 @@ * under the License. */ -import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; +import * as PropTypes from 'prop-types'; +import * as React from 'react'; import { IntlProvider } from 'react-intl'; import * as i18n from '../core'; @@ -28,12 +28,12 @@ import * as i18n from '../core'; * of components. This component is used to setup the i18n context for a tree. * IntlProvider should wrap react app's root component (inside each react render method). */ -export class I18nProvider extends PureComponent { - static propTypes = { +export class I18nProvider extends React.PureComponent { + public static propTypes = { children: PropTypes.object, }; - render() { + public render() { const { children } = this.props; return ( diff --git a/packages/kbn-i18n/tsconfig.json b/packages/kbn-i18n/tsconfig.json new file mode 100644 index 000000000000000..c6d1da43b893fb2 --- /dev/null +++ b/packages/kbn-i18n/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "include": [ + "src/**/*.ts", + "src/**/*.tsx", + "types/intl_format_cache.d.ts", + "types/intl_relativeformat.d.ts" + ], + "exclude": [ + "target" + ], + "compilerOptions": { + "declaration": true, + "declarationDir": "./target/types", + } +} diff --git a/packages/kbn-i18n/tslint.yml b/packages/kbn-i18n/tslint.yml new file mode 100644 index 000000000000000..e470d241339a776 --- /dev/null +++ b/packages/kbn-i18n/tslint.yml @@ -0,0 +1,2 @@ +extends: + - ../../tslint.yaml diff --git a/packages/kbn-i18n/types/intl_format_cache.d.ts b/packages/kbn-i18n/types/intl_format_cache.d.ts new file mode 100644 index 000000000000000..cdc7e69b986034f --- /dev/null +++ b/packages/kbn-i18n/types/intl_format_cache.d.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. + */ + +declare module 'intl-format-cache' { + import IntlMessageFormat from 'intl-messageformat'; + + interface Message { + format: (values: { [key: string]: string | number | Date }) => string; + } + + function memoizeIntlConstructor( + IntlMessageFormatCtor: typeof IntlMessageFormat + ): (msg: string, locale: string, formats: any) => Message; + + export = memoizeIntlConstructor; +} diff --git a/packages/kbn-i18n/types/intl_relativeformat.d.ts b/packages/kbn-i18n/types/intl_relativeformat.d.ts new file mode 100644 index 000000000000000..784b975c7813133 --- /dev/null +++ b/packages/kbn-i18n/types/intl_relativeformat.d.ts @@ -0,0 +1,22 @@ +/* + * 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. + */ + +declare module 'intl-relativeformat' { + export let defaultLocale: string; +} diff --git a/packages/kbn-i18n/yarn.lock b/packages/kbn-i18n/yarn.lock index b495c747149f4d3..edf8dfa36f8f670 100644 --- a/packages/kbn-i18n/yarn.lock +++ b/packages/kbn-i18n/yarn.lock @@ -2,681 +2,718 @@ # yarn lockfile v1 -"@kbn/babel-preset@link:../kbn-babel-preset": - version "0.0.0" - uid "" - -"@kbn/dev-utils@link:../kbn-dev-utils": - version "0.0.0" - uid "" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +"@babel/cli@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.1.0.tgz#a9429fd63911711b0fa93ae50d73beee6c42aef8" + dependencies: + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + lodash "^4.17.10" + mkdirp "^0.5.1" + output-file-sync "^2.0.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + chokidar "^2.0.3" + +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helpers" "^7.1.0" + "@babel/parser" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + convert-source-map "^1.1.0" + debug "^3.1.0" + json5 "^0.5.0" + lodash "^4.17.10" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" + dependencies: + "@babel/types" "^7.0.0" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: - color-convert "^1.9.0" + "@babel/types" "^7.0.0" -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" +"@babel/helper-builder-react-jsx@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0.tgz#fa154cb53eb918cf2a9a7ce928e29eb649c5acdb" dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" + "@babel/types" "^7.0.0" + esutils "^2.0.0" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" +"@babel/helper-call-delegate@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -babel-cli@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" - dependencies: - babel-core "^6.26.0" - babel-polyfill "^6.26.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - commander "^2.11.0" - convert-source-map "^1.5.0" - fs-readdir-recursive "^1.0.0" - glob "^7.1.2" - lodash "^4.17.4" - output-file-sync "^1.1.2" - path-is-absolute "^1.0.1" - slash "^1.0.0" - source-map "^0.5.6" - v8flags "^2.1.1" - optionalDependencies: - chokidar "^1.6.1" + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" +"@babel/helper-define-map@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.0.0" + lodash "^4.17.10" -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/types" "^7.0.0" -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" +"@babel/helper-hoist-variables@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + "@babel/types" "^7.0.0" -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/types" "^7.0.0" -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/types" "^7.0.0" -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" +"@babel/helper-module-transforms@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + lodash "^4.17.10" -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/types" "^7.0.0" -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" +"@babel/helper-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + lodash "^4.17.10" -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" +"@babel/helper-replace-supers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" dependencies: - babel-runtime "^6.22.0" + "@babel/types" "^7.0.0" -babel-plugin-add-module-exports@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz#9ae9a1f4a8dc67f0cdec4f4aeda1e43a5ff65e25" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" +"@babel/helper-wrap-function@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" +"@babel/helpers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" + dependencies: + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" +"@babel/parser@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" -babel-plugin-transform-async-generator-functions@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" +"@babel/plugin-proposal-async-generator-functions@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" +"@babel/plugin-proposal-class-properties@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/plugin-syntax-class-properties" "^7.0.0" -babel-plugin-transform-class-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" +"@babel/plugin-proposal-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.0.0" -babel-plugin-transform-define@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-1.3.0.tgz#94c5f9459c810c738cc7c50cbd44a31829d6f319" +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" dependencies: - lodash "4.17.4" - traverse "0.6.6" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" +"@babel/plugin-proposal-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" +"@babel/plugin-proposal-unicode-property-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.2.0" -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" +"@babel/plugin-syntax-async-generators@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-classes@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" +"@babel/plugin-syntax-class-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" +"@babel/plugin-syntax-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" +"@babel/plugin-syntax-jsx@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" +"@babel/plugin-syntax-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" +"@babel/plugin-syntax-typescript@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz#90f4fe0a741ae9c0dcdc3017717c05a0cbbd5158" dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" +"@babel/plugin-transform-arrow-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" +"@babel/plugin-transform-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" +"@babel/plugin-transform-block-scoping@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.10" -babel-plugin-transform-es2015-modules-umd@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" +"@babel/plugin-transform-classes@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.1.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + globals "^11.1.0" -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" +"@babel/plugin-transform-computed-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-parameters@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" +"@babel/plugin-transform-destructuring@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" +"@babel/plugin-transform-dotall-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" +"@babel/plugin-transform-duplicate-keys@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" +"@babel/plugin-transform-exponentiation-operator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" +"@babel/plugin-transform-for-of@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" +"@babel/plugin-transform-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" +"@babel/plugin-transform-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" +"@babel/plugin-transform-modules-amd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" +"@babel/plugin-transform-modules-commonjs@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" -babel-plugin-transform-object-rest-spread@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" +"@babel/plugin-transform-modules-systemjs@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" +"@babel/plugin-transform-modules-umd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" dependencies: - babel-runtime "^6.22.0" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" +"@babel/plugin-transform-new-target@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" +"@babel/plugin-transform-object-super@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" -babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" +"@babel/plugin-transform-parameters@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" + "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-regenerator@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" +"@babel/plugin-transform-react-display-name@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" dependencies: - regenerator-transform "^0.10.0" + "@babel/helper-plugin-utils" "^7.0.0" -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" +"@babel/plugin-transform-react-jsx-self@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.0.0.tgz#a84bb70fea302d915ea81d9809e628266bb0bc11" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" +"@babel/plugin-transform-react-jsx-source@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0.tgz#28e00584f9598c0dd279f6280eee213fa0121c3c" dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -babel-preset-env@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.4.0.tgz#c8e02a3bcc7792f23cded68e0355b9d4c28f0f7a" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^1.4.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + +"@babel/plugin-transform-react-jsx@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0.tgz#524379e4eca5363cd10c4446ba163f093da75f3e" + dependencies: + "@babel/helper-builder-react-jsx" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" + dependencies: + regenerator-transform "^0.13.3" + +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typescript@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.0.0" + +"@babel/plugin-transform-unicode-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" + +"@babel/preset-env@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.1.0" + "@babel/plugin-proposal-json-strings" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.1.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.1.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-dotall-regex" "^7.0.0" + "@babel/plugin-transform-duplicate-keys" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator" "^7.1.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.1.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-amd" "^7.1.0" + "@babel/plugin-transform-modules-commonjs" "^7.1.0" + "@babel/plugin-transform-modules-systemjs" "^7.0.0" + "@babel/plugin-transform-modules-umd" "^7.1.0" + "@babel/plugin-transform-new-target" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.1.0" + "@babel/plugin-transform-parameters" "^7.1.0" + "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + "@babel/plugin-transform-typeof-symbol" "^7.0.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + browserslist "^4.1.0" invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.3.0" -babel-preset-flow@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" +"@babel/preset-react@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.0.0.tgz#e86b4b3d99433c7b3e9e91747e2653958bc6b3c0" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + +"@babel/preset-typescript@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.1.0" + +"@babel/template@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/traverse@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.10" + +"@babel/types@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" -babel-preset-react@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" +"@types/intl-relativeformat@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz#3a2b0043380388f39c666665ec517e11412f1358" + +"@types/json5@^0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" + +"@types/react-intl@^2.3.11": + version "2.3.11" + resolved "https://registry.yarnpkg.com/@types/react-intl/-/react-intl-2.3.11.tgz#8d9e8a5931c665ce9086cbcda5b7467d668dfa33" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" + color-convert "^1.9.0" -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" + micromatch "^3.1.4" + normalize-path "^2.1.1" -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" @@ -688,36 +725,48 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" +braces@^2.3.0, braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" -browserslist@^1.4.0: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - -caniuse-db@^1.0.30000639: - version "1.0.30000850" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000850.tgz#965c816641576d08709bee12256a0550164b95d5" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" +browserslist@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.1.tgz#328eb4ff1215b12df6589e9ab82f8adaa4fc8cd6" dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" + caniuse-lite "^1.0.30000884" + electron-to-chromium "^1.3.62" + node-releases "^1.0.0-alpha.11" -chalk@^2.4.1: +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +caniuse-lite@^1.0.30000884: + version "1.0.30000885" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000885.tgz#e889e9f8e7e50e769f2a49634c932b8aee622984" + +chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -725,29 +774,49 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chokidar@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" +chokidar@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" dependencies: - anymatch "^1.3.0" + anymatch "^2.0.0" async-each "^1.0.0" - glob-parent "^2.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" inherits "^2.0.1" is-binary-path "^1.0.0" - is-glob "^2.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" path-is-absolute "^1.0.0" readdirp "^2.0.0" + upath "^1.0.5" optionalDependencies: - fsevents "^1.0.0" + fsevents "^1.2.2" chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" @@ -758,9 +827,13 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -commander@^2.11.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" +commander@^2.8.1: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" concat-map@0.0.1: version "0.0.1" @@ -770,17 +843,15 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" -convert-source-map@^1.5.0, convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" +convert-source-map@^1.1.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + dependencies: + safe-buffer "~5.1.1" -core-js@^2.4.0, core-js@^2.5.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" core-util-is@~1.0.0: version "1.0.2" @@ -793,7 +864,7 @@ cross-env@^5.2.0: cross-spawn "^6.0.5" is-windows "^1.0.0" -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -803,113 +874,121 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -debug@^2.1.2, debug@^2.6.8, debug@^2.6.9: +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" +debug@^3.1.0: + version "3.2.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407" + dependencies: + ms "^2.1.1" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" -delegates@^1.0.0: +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" dependencies: - repeating "^2.0.0" + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" -electron-to-chromium@^1.2.7: - version "1.3.48" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz#d3b0d8593814044e092ece2108fc3ac9aea4b900" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" +electron-to-chromium@^1.3.62: + version "1.3.67" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.67.tgz#5e8f3ffac89b4b0402c7e1a565be06f3a109abbc" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -esutils@^2.0.2: +esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -execa@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" - dependencies: - cross-spawn "^6.0.0" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" dependencies: - fill-range "^2.1.0" + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" dependencies: - is-extglob "^1.0.0" + is-extendable "^0.1.0" -fbjs@^0.8.16: - version "0.8.16" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.9" + assign-symbols "^1.0.0" + is-extendable "^1.0.1" -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" -for-in@^1.0.1: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" dependencies: - for-in "^1.0.1" + map-cache "^0.2.2" fs-minipass@^1.2.5: version "1.2.5" @@ -917,7 +996,7 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" -fs-readdir-recursive@^1.0.0: +fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -925,7 +1004,7 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0: +fsevents@^1.2.2: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" dependencies: @@ -945,24 +1024,29 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" + is-glob "^3.1.0" + path-dirname "^1.0.0" -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" +glob@^7.0.0: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: - is-glob "^2.0.0" + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" -glob@^7.0.5, glob@^7.1.2: +glob@^7.0.5: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -973,20 +1057,14 @@ glob@^7.0.5, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" +globals@^11.1.0: + version "11.7.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" -graceful-fs@^4.1.2, graceful-fs@^4.1.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -995,14 +1073,38 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" -iconv-lite@^0.4.4, iconv-lite@~0.4.13: +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +hoist-non-react-statics@^2.5.5: + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + +iconv-lite@^0.4.4: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: @@ -1043,7 +1145,7 @@ intl-messageformat@^2.0.0, intl-messageformat@^2.1.0, intl-messageformat@^2.2.0: dependencies: intl-messageformat-parser "1.4.0" -intl-relativeformat@^2.0.0, intl-relativeformat@^2.1.0: +intl-relativeformat@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz#010f1105802251f40ac47d0e3e1a201348a255df" dependencies: @@ -1055,6 +1157,18 @@ invariant@^2.1.1, invariant@^2.2.2: dependencies: loose-envify "^1.0.0" +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -1065,29 +1179,47 @@ is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" dependencies: - is-primitive "^2.0.0" + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" -is-extendable@^0.1.1: +is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" dependencies: - number-is-nan "^1.0.0" + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" is-fullwidth-code-point@^1.0.0: version "1.0.0" @@ -1099,35 +1231,35 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" dependencies: - kind-of "^3.0.2" + is-extglob "^2.1.0" -is-number@^4.0.0: +is-glob@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" -is-stream@^1.0.1, is-stream@^1.1.0: +is-plain-obj@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" -is-windows@^1.0.0: +is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -1145,52 +1277,67 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +js-levenshtein@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" -js-tokens@^3.0.0, js-tokens@^3.0.2: +js-tokens@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" -json5@^0.5.1: +json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" +json5@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.0.1.tgz#3d6d0d1066039eb50984e66a7840e4f4b7a2c660" dependencies: minimist "^1.2.0" -kind-of@^3.0.2: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: is-buffer "^1.1.5" -kind-of@^6.0.0: +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" -lodash@4.17.4: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash@^4.17.4: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +lodash@^4.17.10: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: version "1.3.1" @@ -1198,27 +1345,33 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" @@ -1247,24 +1400,47 @@ minizlib@^1.1.0: dependencies: minipass "^2.2.1" +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" -moment@^2.20.1: - version "2.22.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + needle@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" @@ -1277,13 +1453,6 @@ nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - node-pre-gyp@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" @@ -1299,6 +1468,12 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" +node-releases@^1.0.0-alpha.11: + version "1.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" + dependencies: + semver "^5.3.0" + nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -1306,7 +1481,7 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-path@^2.0.0, normalize-path@^2.0.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: @@ -1323,12 +1498,6 @@ npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -1346,12 +1515,25 @@ object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" once@^1.3.0: version "1.4.0" @@ -1363,7 +1545,7 @@ os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -1374,40 +1556,39 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -output-file-sync@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" +output-file-sync@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" dependencies: - graceful-fs "^4.1.4" + graceful-fs "^4.1.11" + is-plain-obj "^1.1.0" mkdirp "^0.5.1" - object-assign "^4.1.0" -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-key@^2.0.0, path-key@^2.0.1: +path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +path-parse@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" -private@^0.1.6, private@^0.1.8: +private@^0.1.6: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -1415,28 +1596,13 @@ process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" +prop-types@^15.6.2: + version "15.6.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: - asap "~2.0.3" - -prop-types@^15.5.8, prop-types@^15.6.0: - version "15.6.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" - dependencies: - fbjs "^0.8.16" loose-envify "^1.3.1" object-assign "^4.1.1" -randomatic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - rc@^1.1.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -1446,23 +1612,24 @@ rc@^1.1.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-intl@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.4.0.tgz#66c14dc9df9a73b2fbbfbd6021726e80a613eb15" +react-intl@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.7.0.tgz#be1244769ce51f71476afb9556485a46090db5fa" dependencies: + hoist-non-react-statics "^2.5.5" intl-format-cache "^2.0.5" intl-messageformat "^2.1.0" - intl-relativeformat "^2.0.0" + intl-relativeformat "^2.1.0" invariant "^2.1.1" react@^16.3.0: - version "16.4.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.4.0.tgz#402c2db83335336fba1962c08b98c6272617d585" + version "16.5.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.5.2.tgz#19f6b444ed139baa45609eee6dc3d318b3895d42" dependencies: - fbjs "^0.8.16" loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.0" + prop-types "^15.6.2" + schedule "^0.5.0" readable-stream@^2.0.2, readable-stream@^2.0.6: version "2.3.6" @@ -1485,47 +1652,47 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -regenerate@^1.2.1: +regenerate-unicode-properties@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" +regenerator-transform@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" private "^0.1.6" -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" dependencies: - is-equal-shallow "^0.1.3" + extend-shallow "^3.0.2" + safe-regex "^1.1.0" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" +regexpu-core@^4.1.3, regexpu-core@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" + regenerate "^1.4.0" + regenerate-unicode-properties "^7.0.0" + regjsgen "^0.4.0" + regjsparser "^0.3.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.0.2" -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" +regjsgen@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" +regjsparser@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" dependencies: jsesc "~0.5.0" @@ -1537,15 +1704,23 @@ repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" -repeat-string@^1.5.2: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.3.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: - is-finite "^1.0.0" + path-parse "^1.0.5" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" rimraf@^2.6.1: version "2.6.2" @@ -1553,16 +1728,16 @@ rimraf@^2.6.1: dependencies: glob "^7.0.5" -rxjs@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.1.tgz#246cebec189a6cbc143a3ef9f62d6f4c91813ca1" - dependencies: - tslib "^1.9.0" - safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -1571,10 +1746,20 @@ sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +schedule@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.5.0.tgz#c128fffa0b402488b08b55ae74bb9df55cc29cc8" + dependencies: + object-assign "^4.1.1" + semver@^5.3.0, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.4.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -1583,9 +1768,23 @@ set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" shebang-command@^1.2.0: version "1.2.0" @@ -1601,20 +1800,68 @@ signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" -source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -1648,18 +1895,10 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" @@ -1678,51 +1917,90 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" -traverse@0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" -tree-kill@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -tslib@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e" +typescript@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" -tslib@^1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - -ua-parser-js@^0.7.9: - version "0.7.18" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" -util-deprecate@~1.0.1: +unicode-match-property-value-ecmascript@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" -v8flags@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" dependencies: - user-home "^1.1.1" + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" -whatwg-fetch@>=0.10.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" which@^1.2.9: version "1.3.1" diff --git a/packages/kbn-ui-framework/dist/ui_framework.css b/packages/kbn-ui-framework/dist/ui_framework.css index 928c41497a547a6..edacb61119c3a09 100644 --- a/packages/kbn-ui-framework/dist/ui_framework.css +++ b/packages/kbn-ui-framework/dist/ui_framework.css @@ -2213,7 +2213,8 @@ main { -ms-flex-align: center; align-items: center; padding-left: 10px; - /* 1 */ } + /* 1 */ + height: 100%; } .kuiLocalBreadcrumb { font-size: 14px; @@ -2685,6 +2686,8 @@ main { -ms-flex-pack: justify; justify-content: space-between; min-height: 29px; + /* 1 */ + line-height: 29px; /* 1 */ } .kuiLocalNavRow__section { diff --git a/packages/kbn-ui-framework/src/components/local_nav/_local_breadcrumbs.scss b/packages/kbn-ui-framework/src/components/local_nav/_local_breadcrumbs.scss index b6a732b0e51a16a..94186c39d3692d9 100644 --- a/packages/kbn-ui-framework/src/components/local_nav/_local_breadcrumbs.scss +++ b/packages/kbn-ui-framework/src/components/local_nav/_local_breadcrumbs.scss @@ -6,6 +6,7 @@ display: flex; align-items: center; padding-left: $localNavSideSpacing; /* 1 */ + height: 100%; } .kuiLocalBreadcrumb { diff --git a/packages/kbn-ui-framework/src/components/local_nav/_local_nav.scss b/packages/kbn-ui-framework/src/components/local_nav/_local_nav.scss index 54ae35593b6ccb2..c5d7421addf2e08 100644 --- a/packages/kbn-ui-framework/src/components/local_nav/_local_nav.scss +++ b/packages/kbn-ui-framework/src/components/local_nav/_local_nav.scss @@ -28,6 +28,7 @@ align-items: stretch; justify-content: space-between; min-height: 29px; /* 1 */ + line-height: 29px; /* 1 */ } .kuiLocalNavRow__section { diff --git a/src/core_plugins/input_control_vis/public/control/list_control_factory.js b/src/core_plugins/input_control_vis/public/control/list_control_factory.js index 65471f15657bcf9..bc1048f82c9d51d 100644 --- a/src/core_plugins/input_control_vis/public/control/list_control_factory.js +++ b/src/core_plugins/input_control_vis/public/control/list_control_factory.js @@ -80,6 +80,7 @@ class ListControl extends Control { defaultMessage: 'Disabled until \'{label}\' is set.', values: { label: this.ancestors[0].label } })); + this.lastAncestorValues = undefined; return; } diff --git a/src/core_plugins/input_control_vis/public/control/list_control_factory.test.js b/src/core_plugins/input_control_vis/public/control/list_control_factory.test.js index 9537f015c650c56..ad2ea56756f3c2f 100644 --- a/src/core_plugins/input_control_vis/public/control/list_control_factory.test.js +++ b/src/core_plugins/input_control_vis/public/control/list_control_factory.test.js @@ -34,6 +34,31 @@ const mockIndexPattern = { } }; +function MockSearchSource() { + return { + setParent: () => {}, + setField: () => {}, + fetch: async () => { + return { + aggregations: { + termsAgg: { + buckets: [ + { + key: 'Zurich Airport', + doc_count: 691, + }, + { + key: 'Xi an Xianyang International Airport', + doc_count: 526, + }, + ] + } + } + }; + } + }; +} + const mockKbnApi = { indexPatterns: { get: async () => { @@ -47,7 +72,8 @@ const mockKbnApi = { getGlobalFilters: () => { return []; } - } + }, + SearchSource: MockSearchSource, }; describe('hasValue', () => { @@ -77,3 +103,70 @@ describe('hasValue', () => { expect(listControl.hasValue()).toBe(true); }); }); + +describe('fetch', () => { + const controlParams = { + id: '1', + fieldName: 'myField', + options: {} + }; + const useTimeFilter = false; + + let listControl; + beforeEach(async () => { + listControl = await listControlFactory(controlParams, mockKbnApi, useTimeFilter); + }); + + test('should set selectOptions to results of terms aggregation', async () => { + await listControl.fetch(); + expect(listControl.selectOptions).toEqual([ + { + 'label': 'Xi an Xianyang International Airport', + 'value': 'Xi an Xianyang International Airport', + }, + { + 'label': 'Zurich Airport', + 'value': 'Zurich Airport', + } + ]); + }); +}); + +describe('fetch with ancestors', () => { + const controlParams = { + id: '1', + fieldName: 'myField', + options: {}, + }; + const useTimeFilter = false; + + + let listControl; + let parentControl; + beforeEach(async () => { + listControl = await listControlFactory(controlParams, mockKbnApi, useTimeFilter); + + const parentControlParams = { + id: 'parent', + fieldName: 'myField', + options: {}, + }; + parentControl = await listControlFactory(parentControlParams, mockKbnApi, useTimeFilter); + parentControl.clear(); + listControl.setAncestors([parentControl]); + }); + + describe('ancestor does not have value', () => { + + test('should disable control', async () => { + await listControl.fetch(); + expect(listControl.isEnabled()).toBe(false); + }); + + test('should reset lastAncestorValues', async () => { + listControl.lastAncestorValues = 'last ancestor value'; + await listControl.fetch(); + expect(listControl.lastAncestorValues).toBeUndefined(); + }); + }); +}); diff --git a/src/core_plugins/input_control_vis/public/vis_controller.js b/src/core_plugins/input_control_vis/public/vis_controller.js index 3a92c7e10b229b5..1327cd51a4ba1c6 100644 --- a/src/core_plugins/input_control_vis/public/vis_controller.js +++ b/src/core_plugins/input_control_vis/public/vis_controller.js @@ -147,10 +147,11 @@ class VisController { this.vis.API.queryFilter.addFilters(newFilters, this.vis.params.pinFilters); } - clearControls = () => { + clearControls = async () => { this.controls.forEach((control) => { control.clear(); }); + await this.updateNestedControls(); this.drawVis(); } diff --git a/src/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js b/src/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js new file mode 100644 index 000000000000000..f7da58952600369 --- /dev/null +++ b/src/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js @@ -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. + */ + +/** + * Returns valid configuration for a beat.yml file for adding the space id + * if there is an active space and that space is not the default one. + * + * @param {object} context - Context object generated from tutorial factory (see #22760) + */ +export function getSpaceIdForBeatsTutorial(context) { + if (!context || !context.spaceId || context.isInDefaultSpace) { + return ''; + } + + return ` space.id: "${context.spaceId}"`; +} diff --git a/src/core_plugins/kibana/common/tutorials/filebeat_instructions.js b/src/core_plugins/kibana/common/tutorials/filebeat_instructions.js index b96f1f6b1b7d030..05c3c25626f253b 100644 --- a/src/core_plugins/kibana/common/tutorials/filebeat_instructions.js +++ b/src/core_plugins/kibana/common/tutorials/filebeat_instructions.js @@ -20,8 +20,9 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; +import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; -export const createFilebeatInstructions = () => ({ +export const createFilebeatInstructions = context => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTitle', { @@ -181,6 +182,7 @@ export const createFilebeatInstructions = () => ({ ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -209,6 +211,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -237,6 +240,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -265,6 +269,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -484,8 +489,8 @@ export function filebeatStatusCheck(moduleName) { }; } -export function onPremInstructions(moduleName, platforms, geoipRequired, uaRequired) { - const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(); +export function onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context) { + const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(context); const variants = []; for (let i = 0; i < platforms.length; i++) { diff --git a/src/core_plugins/kibana/common/tutorials/metricbeat_instructions.js b/src/core_plugins/kibana/common/tutorials/metricbeat_instructions.js index b15d3aaab1e7ed0..db3890f343e89e0 100644 --- a/src/core_plugins/kibana/common/tutorials/metricbeat_instructions.js +++ b/src/core_plugins/kibana/common/tutorials/metricbeat_instructions.js @@ -20,8 +20,9 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; +import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; -export const createMetricbeatInstructions = () => ({ +export const createMetricbeatInstructions = context => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTitle', { @@ -168,6 +169,7 @@ export const createMetricbeatInstructions = () => ({ ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -196,6 +198,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -224,6 +227,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -252,6 +256,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' password: ""', 'setup.kibana:', ' host: ""', + getSpaceIdForBeatsTutorial(context) ], textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -444,8 +449,8 @@ export function metricbeatStatusCheck(moduleName) { }; } -export function onPremInstructions(moduleName) { - const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(); +export function onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context) { + const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(context); return { instructionSets: [ diff --git a/src/core_plugins/kibana/index.js b/src/core_plugins/kibana/index.js index 91bc29d6097f460..82859b388967849 100644 --- a/src/core_plugins/kibana/index.js +++ b/src/core_plugins/kibana/index.js @@ -76,6 +76,7 @@ export default function (kibana) { url: `${kbnBaseUrl}#/discover`, description: 'interactively explore your data', icon: 'plugins/kibana/assets/discover.svg', + euiIconType: 'discoverApp', }, { id: 'kibana:visualize', title: 'Visualize', @@ -83,6 +84,7 @@ export default function (kibana) { url: `${kbnBaseUrl}#/visualize`, description: 'design data visualizations', icon: 'plugins/kibana/assets/visualize.svg', + euiIconType: 'visualizeApp', }, { id: 'kibana:dashboard', title: 'Dashboard', @@ -96,13 +98,15 @@ export default function (kibana) { subUrlBase: `${kbnBaseUrl}#/dashboard`, description: 'compose visualizations for much win', icon: 'plugins/kibana/assets/dashboard.svg', + euiIconType: 'dashboardApp', }, { id: 'kibana:dev_tools', title: 'Dev Tools', order: 9001, url: '/app/kibana#/dev_tools', description: 'development tools', - icon: 'plugins/kibana/assets/wrench.svg' + icon: 'plugins/kibana/assets/wrench.svg', + euiIconType: 'devToolsApp', }, { id: 'kibana:management', title: 'Management', @@ -110,6 +114,7 @@ export default function (kibana) { url: `${kbnBaseUrl}#/management`, description: 'define index patterns, change config, and more', icon: 'plugins/kibana/assets/settings.svg', + euiIconType: 'managementApp', linkToLastSubUrl: false }, ], diff --git a/src/core_plugins/kibana/public/dashboard/dashboard_app.html b/src/core_plugins/kibana/public/dashboard/dashboard_app.html index 76326d2f2665203..66a2f65e471737c 100644 --- a/src/core_plugins/kibana/public/dashboard/dashboard_app.html +++ b/src/core_plugins/kibana/public/dashboard/dashboard_app.html @@ -7,20 +7,21 @@
-
-
- Dashboard +
+
+
+ Dashboard +
+
+ {{ getDashTitle() }} +
+
-
- {{ getDashTitle() }} -
-
diff --git a/src/core_plugins/kibana/public/dashboard/dashboard_app.js b/src/core_plugins/kibana/public/dashboard/dashboard_app.js index a230249aca828c1..58cad9edd54403e 100644 --- a/src/core_plugins/kibana/public/dashboard/dashboard_app.js +++ b/src/core_plugins/kibana/public/dashboard/dashboard_app.js @@ -81,7 +81,17 @@ app.directive('dashboardApp', function ($injector) { return { restrict: 'E', controllerAs: 'dashboardApp', - controller: function ($scope, $rootScope, $route, $routeParams, $location, getAppState, dashboardConfig, localStorage) { + controller: function ( + $scope, + $rootScope, + $route, + $routeParams, + $location, + getAppState, + dashboardConfig, + localStorage, + breadcrumbState + ) { const filterManager = Private(FilterManagerProvider); const filterBar = Private(FilterBarQueryFilterProvider); const docTitle = Private(DocTitleProvider); @@ -169,6 +179,18 @@ app.directive('dashboardApp', function ($injector) { dashboardStateManager.getTitle(), dashboardStateManager.getViewMode(), dashboardStateManager.getIsDirty(timefilter)); + + // Push breadcrumbs to new header navigation + const updateBreadcrumbs = () => { + breadcrumbState.set([ + { text: 'Dashboard', href: $scope.landingPageUrl() }, + { text: $scope.getDashTitle() } + ]); + }; + updateBreadcrumbs(); + dashboardStateManager.registerChangeListener(updateBreadcrumbs); + config.watch('k7design', (val) => $scope.showPluginBreadcrumbs = !val); + $scope.newDashboard = () => { kbnUrl.change(DashboardConstants.CREATE_NEW_DASHBOARD_URL, {}); }; $scope.saveState = () => dashboardStateManager.saveState(); $scope.getShouldShowEditHelp = () => ( diff --git a/src/core_plugins/kibana/public/dashboard/grid/_dashboard_grid.scss b/src/core_plugins/kibana/public/dashboard/grid/_dashboard_grid.scss index 232d12f51bc8b26..29d00eb9e6de206 100644 --- a/src/core_plugins/kibana/public/dashboard/grid/_dashboard_grid.scss +++ b/src/core_plugins/kibana/public/dashboard/grid/_dashboard_grid.scss @@ -35,7 +35,7 @@ } /** - * .dshLayout-withMargins only affects the panel styles themselves, see ../panel + * .dshLayout-withoutMargins only affects the panel styles themselves, see ../panel */ /** @@ -57,10 +57,6 @@ // REACT-GRID -.react-grid-layout .dshPanel { - overflow: visible; -} - .react-grid-item { /** * Disable transitions from the library on each grid element. @@ -87,6 +83,7 @@ } &.react-draggable-dragging { + transition: box-shadow $euiAnimSpeedFast $euiAnimSlightResistance; @include euiBottomShadowLarge; border-radius: $euiBorderRadius; // keeps shadow within bounds } diff --git a/src/core_plugins/kibana/public/dashboard/grid/dashboard_grid.js b/src/core_plugins/kibana/public/dashboard/grid/dashboard_grid.js index 9e36600ec852670..ccb22b4e533cb68 100644 --- a/src/core_plugins/kibana/public/dashboard/grid/dashboard_grid.js +++ b/src/core_plugins/kibana/public/dashboard/grid/dashboard_grid.js @@ -70,7 +70,7 @@ function ResponsiveGrid({ 'dshLayout--viewing': isViewMode, 'dshLayout--editing': !isViewMode, 'dshLayout-isMaximizedPanel': maximizedPanelId !== undefined, - 'dshLayout-withMargins': useMargins, + 'dshLayout-withoutMargins': !useMargins, }); const MARGINS = useMargins ? 8 : 0; diff --git a/src/core_plugins/kibana/public/dashboard/index.js b/src/core_plugins/kibana/public/dashboard/index.js index 6c9e3bb510fe601..eadcefe96872ce6 100644 --- a/src/core_plugins/kibana/public/dashboard/index.js +++ b/src/core_plugins/kibana/public/dashboard/index.js @@ -50,7 +50,7 @@ uiRoutes }) .when(DashboardConstants.LANDING_PAGE_PATH, { template: dashboardListingTemplate, - controller($injector, $location, $scope, Private, config) { + controller($injector, $location, $scope, Private, config, breadcrumbState) { const services = Private(SavedObjectRegistryProvider).byLoaderPropertiesName; const dashboardConfig = $injector.get('dashboardConfig'); @@ -63,6 +63,7 @@ uiRoutes }; $scope.hideWriteControls = dashboardConfig.getHideWriteControls(); $scope.initialFilter = ($location.search()).filter || EMPTY_FILTER; + breadcrumbState.set([{ text: 'Dashboards' }]); }, resolve: { dash: function ($route, Private, redirectWhenMissing, kbnUrl) { diff --git a/src/core_plugins/kibana/public/dashboard/panel/__snapshots__/dashboard_panel.test.js.snap b/src/core_plugins/kibana/public/dashboard/panel/__snapshots__/dashboard_panel.test.js.snap index 1680ef4c5b1f298..ac19a4917530abc 100644 --- a/src/core_plugins/kibana/public/dashboard/panel/__snapshots__/dashboard_panel.test.js.snap +++ b/src/core_plugins/kibana/public/dashboard/panel/__snapshots__/dashboard_panel.test.js.snap @@ -2,69 +2,65 @@ exports[`DashboardPanel matches snapshot 1`] = `
+ + my embeddable title +
- - my embeddable title -
-
- -
+ + + +
-
+
`; diff --git a/src/core_plugins/kibana/public/dashboard/panel/_dashboard_panel.scss b/src/core_plugins/kibana/public/dashboard/panel/_dashboard_panel.scss index 36130cd1837476d..6efb9d4f25b0de1 100644 --- a/src/core_plugins/kibana/public/dashboard/panel/_dashboard_panel.scss +++ b/src/core_plugins/kibana/public/dashboard/panel/_dashboard_panel.scss @@ -12,7 +12,7 @@ flex: 1 1 100%; height: auto; z-index: 1; - background-color: inherit; + min-height: 0; // Absolute must for Firefox to scroll contents } // SASSTODO: Pretty sure this doesn't do anything since the flex-basis 100%, @@ -24,64 +24,48 @@ /** * 1. We want the doc-table-container to scroll only when embedded in a dashboard panel * 2. Fix overflow of vis's specifically for inside dashboard panels, lets the panel decide the overflow + * 3. Force a better looking scrollbar */ .doc-table-container { flex: 1 1 0; /* 1 */ overflow: auto; /* 1 */ } + .visualization { + @include euiScrollBar; /* 3 */ + } + .visualization .vis-container { overflow: visible; /* 2 */ } } -// CONTENT +.dshPanel--editing { + transition: all $euiAnimSpeedFast $euiAnimSlightResistance; -.dshPanel__panel { - background-color: $euiColorEmptyShade; - border: 1px solid $euiColorEmptyShade; - overflow: hidden; - - // maintain the 100% height of the panel - height: 100%; - flex: 1; - - // flex layout allows us to define the visualize element as "fill available space" - display: flex; - flex-direction: column; - justify-content: flex-start; -} - -.dshPanel__panel--editing { - // SASSTOD: Change this back $euiBorderColor, when EUI adds !default to borders - border-color: $euiColorLightShade; - - &:hover { + &:hover, + &:focus { border-color: $euiColorPrimary; + @include euiSlightShadowHover; } } -// Adjust borders/margin/etc... for spaced out panels -.dshLayout-withMargins { - .dshPanel__panel { - @include euiBottomShadowSmall; - // SASSTOD: Change this back $euiBorderColor, when EUI adds !default to borders - border-color: $euiColorLightShade; - border-radius: $euiBorderRadius; - } +// LAYOUT MODES - .dshPanel__panel--editing { - transition: all $euiAnimSpeedFast $euiAnimSlightResistance; +// Adjust borders/etc... for non-spaced out and expanded panels +.dshLayout-withoutMargins, +.dshDashboardGrid__item--expanded { + // Remove border color unless in editing mode + .dshPanel:not(.dshPanel--editing) { + border-color: transparent; + } - &:hover, - &:focus { - border-color: $euiColorPrimary; - @include euiSlightShadowHover; - } + .dshPanel { + box-shadow: none; + border-radius: 0; } } - // HEADER .dshPanel__header { @@ -91,12 +75,6 @@ display: flex; border: none; transition: background-color $euiAnimSpeedFast $euiAnimSlightResistance; - - // Add a rounded corner to stay within the bordered panel - .dshLayout-withMargins & { - border-top-left-radius: $euiBorderRadius - 1px; - border-top-right-radius: $euiBorderRadius - 1px; - } } .dshPanel__title { @@ -111,7 +89,7 @@ display: inline-block; } -.dshPanel__panel--editing:hover { +.dshPanel--editing:hover { .dshPanel__header { background-color: rgba($euiColorFullShade,.05) !important; cursor: move; diff --git a/src/core_plugins/kibana/public/dashboard/panel/dashboard_panel.js b/src/core_plugins/kibana/public/dashboard/panel/dashboard_panel.js index 6e09f64e85b4173..684fe6c54a223ee 100644 --- a/src/core_plugins/kibana/public/dashboard/panel/dashboard_panel.js +++ b/src/core_plugins/kibana/public/dashboard/panel/dashboard_panel.js @@ -25,6 +25,10 @@ import _ from 'lodash'; import { PanelHeader } from './panel_header'; import { PanelError } from './panel_error'; +import { + EuiPanel, +} from '@elastic/eui'; + export class DashboardPanel extends React.Component { constructor(props) { super(props); @@ -125,28 +129,24 @@ export class DashboardPanel extends React.Component { render() { const { viewOnlyMode, panel } = this.props; - const classes = classNames('dshPanel__panel', this.props.className, { - 'dshPanel__panel--editing': !viewOnlyMode + const classes = classNames('dshPanel', this.props.className, { + 'dshPanel--editing': !viewOnlyMode }); return ( -
-
- - - {this.renderContent()} - -
-
+ + + {this.renderContent()} + ); } } diff --git a/src/core_plugins/kibana/public/discover/controllers/discover.js b/src/core_plugins/kibana/public/discover/controllers/discover.js index 14ffacf8773d5d0..e6b6947d07a94e9 100644 --- a/src/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/core_plugins/kibana/public/discover/controllers/discover.js @@ -155,8 +155,8 @@ function discoverController( courier, kbnUrl, localStorage, + breadcrumbState ) { - const Vis = Private(VisProvider); const docTitle = Private(DocTitleProvider); const HitSortFn = Private(PluginsKibanaDiscoverHitSortFnProvider); @@ -289,6 +289,12 @@ function discoverController( const pageTitleSuffix = savedSearch.id && savedSearch.title ? `: ${savedSearch.title}` : ''; docTitle.change(`Discover${pageTitleSuffix}`); + if (savedSearch.id && savedSearch.title) { + breadcrumbState.set([{ text: 'Discover', href: '#/discover' }, { text: savedSearch.title }]); + } else { + breadcrumbState.set([{ text: 'Discover' }]); + } + let stateMonitor; const $state = $scope.state = new AppState(getStateDefaults()); diff --git a/src/core_plugins/kibana/public/home/components/home_app.js b/src/core_plugins/kibana/public/home/components/home_app.js index e27356b06196df3..b0dbbf040e460e5 100644 --- a/src/core_plugins/kibana/public/home/components/home_app.js +++ b/src/core_plugins/kibana/public/home/components/home_app.js @@ -38,9 +38,6 @@ export function HomeApp({ addBasePath, directories, recentlyAccessed, - getConfig, - setConfig, - clearIndexPatternsCache, }) { const isCloudEnabled = chrome.getInjected('isCloudEnabled', false); @@ -53,9 +50,6 @@ export function HomeApp({ addBasePath={addBasePath} openTab={props.match.params.tab} isCloudEnabled={isCloudEnabled} - getConfig={getConfig} - setConfig={setConfig} - clearIndexPatternsCache={clearIndexPatternsCache} /> ); }; @@ -124,7 +118,4 @@ HomeApp.propTypes = { category: PropTypes.string.isRequired })), recentlyAccessed: PropTypes.arrayOf(recentlyAccessedShape).isRequired, - getConfig: PropTypes.func.isRequired, - setConfig: PropTypes.func.isRequired, - clearIndexPatternsCache: PropTypes.func.isRequired, }; diff --git a/src/core_plugins/kibana/public/home/components/sample_data_set_cards.js b/src/core_plugins/kibana/public/home/components/sample_data_set_cards.js index 6d0c25498f3d3d0..e47a6c681fee29c 100644 --- a/src/core_plugins/kibana/public/home/components/sample_data_set_cards.js +++ b/src/core_plugins/kibana/public/home/components/sample_data_set_cards.js @@ -37,7 +37,7 @@ import { listSampleDataSets, installSampleDataSet, uninstallSampleDataSet -} from '../sample_data_sets'; +} from '../sample_data_client'; import { i18n } from '@kbn/i18n'; @@ -90,12 +90,6 @@ export class SampleDataSetCards extends React.Component { } install = async (id) => { - const { - getConfig, - setConfig, - clearIndexPatternsCache, - } = this.props; - const targetSampleDataSet = this.state.sampleDataSets.find((sampleDataSet) => { return sampleDataSet.id === id; }); @@ -105,7 +99,7 @@ export class SampleDataSetCards extends React.Component { })); try { - await installSampleDataSet(id, targetSampleDataSet.defaultIndex, getConfig, setConfig, clearIndexPatternsCache); + await installSampleDataSet(id, targetSampleDataSet.defaultIndex); } catch (fetchError) { if (this._isMounted) { this.setState((prevState) => ({ @@ -121,15 +115,18 @@ export class SampleDataSetCards extends React.Component { return; } - this.setState((prevState) => ({ - processingStatus: { ...prevState.processingStatus, [id]: false }, - sampleDataSets: prevState.sampleDataSets.map(sampleDataSet => { - if (sampleDataSet.id === id) { - sampleDataSet.status = INSTALLED_STATUS; - } - return sampleDataSet; - }), - })); + if (this._isMounted) { + this.setState((prevState) => ({ + processingStatus: { ...prevState.processingStatus, [id]: false }, + sampleDataSets: prevState.sampleDataSets.map(sampleDataSet => { + if (sampleDataSet.id === id) { + sampleDataSet.status = INSTALLED_STATUS; + } + return sampleDataSet; + }), + })); + } + toastNotifications.addSuccess({ title: i18n.translate('kbn.home.sampleDataSet.installedLabel', { defaultMessage: '{name} installed', values: { name: targetSampleDataSet.name } } @@ -139,12 +136,6 @@ export class SampleDataSetCards extends React.Component { } uninstall = async (id) => { - const { - getConfig, - setConfig, - clearIndexPatternsCache, - } = this.props; - const targetSampleDataSet = this.state.sampleDataSets.find((sampleDataSet) => { return sampleDataSet.id === id; }); @@ -154,7 +145,7 @@ export class SampleDataSetCards extends React.Component { })); try { - await uninstallSampleDataSet(id, targetSampleDataSet.defaultIndex, getConfig, setConfig, clearIndexPatternsCache); + await uninstallSampleDataSet(id, targetSampleDataSet.defaultIndex); } catch (fetchError) { if (this._isMounted) { this.setState((prevState) => ({ @@ -170,15 +161,18 @@ export class SampleDataSetCards extends React.Component { return; } - this.setState((prevState) => ({ - processingStatus: { ...prevState.processingStatus, [id]: false }, - sampleDataSets: prevState.sampleDataSets.map(sampleDataSet => { - if (sampleDataSet.id === id) { - sampleDataSet.status = UNINSTALLED_STATUS; - } - return sampleDataSet; - }), - })); + if (this._isMounted) { + this.setState((prevState) => ({ + processingStatus: { ...prevState.processingStatus, [id]: false }, + sampleDataSets: prevState.sampleDataSets.map(sampleDataSet => { + if (sampleDataSet.id === id) { + sampleDataSet.status = UNINSTALLED_STATUS; + } + return sampleDataSet; + }), + })); + } + toastNotifications.addSuccess({ title: i18n.translate('kbn.home.sampleDataSet.uninstalledLabel', { defaultMessage: '{name} uninstalled', values: { name: targetSampleDataSet.name } } @@ -216,8 +210,5 @@ export class SampleDataSetCards extends React.Component { } SampleDataSetCards.propTypes = { - getConfig: PropTypes.func.isRequired, - setConfig: PropTypes.func.isRequired, - clearIndexPatternsCache: PropTypes.func.isRequired, addBasePath: PropTypes.func.isRequired, }; diff --git a/src/core_plugins/kibana/public/home/components/tutorial_directory.js b/src/core_plugins/kibana/public/home/components/tutorial_directory.js index af869c93aaf5add..bedd9357d5f98ad 100644 --- a/src/core_plugins/kibana/public/home/components/tutorial_directory.js +++ b/src/core_plugins/kibana/public/home/components/tutorial_directory.js @@ -148,9 +148,6 @@ class TutorialDirectoryUi extends React.Component { if (this.state.selectedTabId === SAMPLE_DATA_TAB_ID) { return ( ); @@ -222,9 +219,6 @@ TutorialDirectoryUi.propTypes = { addBasePath: PropTypes.func.isRequired, openTab: PropTypes.string, isCloudEnabled: PropTypes.bool.isRequired, - getConfig: PropTypes.func.isRequired, - setConfig: PropTypes.func.isRequired, - clearIndexPatternsCache: PropTypes.func.isRequired, }; export const TutorialDirectory = injectI18n(TutorialDirectoryUi); diff --git a/src/core_plugins/kibana/public/home/home_ng_wrapper.html b/src/core_plugins/kibana/public/home/home_ng_wrapper.html index e0baaefe64bc019..9da03c2d606e4a8 100644 --- a/src/core_plugins/kibana/public/home/home_ng_wrapper.html +++ b/src/core_plugins/kibana/public/home/home_ng_wrapper.html @@ -2,7 +2,4 @@ add-base-path="addBasePath" directories="directories" recently-accessed="recentlyAccessed" - get-config="getConfig" - set-config="setConfig" - clear-index-patterns-cache="clearIndexPatternsCache" /> diff --git a/src/core_plugins/kibana/public/home/index.js b/src/core_plugins/kibana/public/home/index.js index d2855a8b8e9cf34..ab31ef50e6c91f2 100644 --- a/src/core_plugins/kibana/public/home/index.js +++ b/src/core_plugins/kibana/public/home/index.js @@ -43,12 +43,6 @@ function getRoute() { item.link = chrome.addBasePath(item.link); return item; }); - $scope.getConfig = (...args) => config.get(...args); - $scope.setConfig = (...args) => config.set(...args); - $scope.clearIndexPatternsCache = () => { - const getter = indexPatterns.getIds; - getter.clearCache(); - }; } }; } diff --git a/src/core_plugins/kibana/public/home/kibana_services.js b/src/core_plugins/kibana/public/home/kibana_services.js new file mode 100644 index 000000000000000..fc06a61ae343ddc --- /dev/null +++ b/src/core_plugins/kibana/public/home/kibana_services.js @@ -0,0 +1,26 @@ +/* + * 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 { uiModules } from 'ui/modules'; + +export let indexPatternService; + +uiModules.get('kibana').run(($injector) => { + indexPatternService = $injector.get('indexPatterns'); +}); diff --git a/src/core_plugins/kibana/public/home/sample_data_sets.js b/src/core_plugins/kibana/public/home/sample_data_client.js similarity index 64% rename from src/core_plugins/kibana/public/home/sample_data_sets.js rename to src/core_plugins/kibana/public/home/sample_data_client.js index 84823e1c01fca8d..943eedb290f8c9c 100644 --- a/src/core_plugins/kibana/public/home/sample_data_sets.js +++ b/src/core_plugins/kibana/public/home/sample_data_client.js @@ -18,30 +18,35 @@ */ import { kfetch } from 'ui/kfetch'; +import chrome from 'ui/chrome'; +import { indexPatternService } from './kibana_services'; const sampleDataUrl = '/api/sample_data'; +function clearIndexPatternsCache() { + indexPatternService.getIds.clearCache(); +} + export async function listSampleDataSets() { return await kfetch({ method: 'GET', pathname: sampleDataUrl }); } -export async function installSampleDataSet(id, defaultIndex, getConfig, setConfig, clearIndexPatternsCache) { +export async function installSampleDataSet(id, sampleDataDefaultIndex) { await kfetch({ method: 'POST', pathname: `${sampleDataUrl}/${id}` }); - const existingDefaultIndex = await getConfig('defaultIndex'); - if (existingDefaultIndex === null) { - await setConfig('defaultIndex', defaultIndex); + if (chrome.getUiSettingsClient().isDefault('defaultIndex')) { + chrome.getUiSettingsClient().set('defaultIndex', sampleDataDefaultIndex); } clearIndexPatternsCache(); } -export async function uninstallSampleDataSet(id, defaultIndex, getConfig, setConfig, clearIndexPatternsCache) { +export async function uninstallSampleDataSet(id, sampleDataDefaultIndex) { await kfetch({ method: 'DELETE', pathname: `${sampleDataUrl}/${id}` }); - const existingDefaultIndex = await getConfig('defaultIndex'); - if (existingDefaultIndex && existingDefaultIndex === defaultIndex) { - await setConfig('defaultIndex', null); + if (!chrome.getUiSettingsClient().isDefault('defaultIndex') + && chrome.getUiSettingsClient().get('defaultIndex') === sampleDataDefaultIndex) { + chrome.getUiSettingsClient().set('defaultIndex', null); } clearIndexPatternsCache(); diff --git a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html index e593546a6b8b783..60d4622862e029e 100644 --- a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html +++ b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html @@ -5,11 +5,14 @@
- Visualize +
+ Visualize +
diff --git a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js index e31a2cbfb57b794..0f8808e11fde8f0 100644 --- a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js +++ b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js @@ -34,6 +34,7 @@ export function VisualizeListingController($injector) { const Notifier = $injector.get('Notifier'); const Private = $injector.get('Private'); const config = $injector.get('config'); + const breadcrumbState = $injector.get('breadcrumbState'); timefilter.disableAutoRefreshSelector(); timefilter.disableTimeRangeSelector(); @@ -58,4 +59,7 @@ export function VisualizeListingController($injector) { return visualizationService.delete(selectedIds) .catch(error => notify.error(error)); }; + + breadcrumbState.set([{ text: 'Visualize' }]); + config.watch('k7design', (val) => this.showPluginBreadcrumbs = !val); } diff --git a/src/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js b/src/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js index f9b656a888e1c4f..e5eef704ab77d6a 100644 --- a/src/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function aerospikeMetricsSpecProvider() { +export function aerospikeMetricsSpecProvider(server, context) { const moduleName = 'aerospike'; return { id: 'aerospikeMetrics', @@ -53,7 +53,7 @@ export function aerospikeMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/apache_logs/index.js b/src/core_plugins/kibana/server/tutorials/apache_logs/index.js index f9c90abc54bf127..cce2343500d0288 100644 --- a/src/core_plugins/kibana/server/tutorials/apache_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/apache_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function apacheLogsSpecProvider() { +export function apacheLogsSpecProvider(server, context) { const moduleName = 'apache2'; const geoipRequired = true; const uaRequired = true; @@ -59,7 +59,7 @@ export function apacheLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/apache_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/apache_metrics/index.js b/src/core_plugins/kibana/server/tutorials/apache_metrics/index.js index 9ea9c894d89777d..d7d04589843bfc9 100644 --- a/src/core_plugins/kibana/server/tutorials/apache_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/apache_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function apacheMetricsSpecProvider() { +export function apacheMetricsSpecProvider(server, context) { const moduleName = 'apache'; return { id: 'apacheMetrics', @@ -56,7 +56,7 @@ export function apacheMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/apache_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js index aebcc62fc3211c6..6cf411aeb861919 100644 --- a/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/ceph_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function cephMetricsSpecProvider() { +export function cephMetricsSpecProvider(server, context) { const moduleName = 'ceph'; return { id: 'cephMetrics', @@ -53,7 +53,7 @@ export function cephMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js b/src/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js index c9cc9610e086042..729e40b97ab55f9 100644 --- a/src/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function couchbaseMetricsSpecProvider() { +export function couchbaseMetricsSpecProvider(server, context) { const moduleName = 'couchbase'; return { id: 'couchbaseMetrics', @@ -53,7 +53,7 @@ export function couchbaseMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/docker_metrics/index.js b/src/core_plugins/kibana/server/tutorials/docker_metrics/index.js index 6429390a48e554f..289f8d23241550f 100644 --- a/src/core_plugins/kibana/server/tutorials/docker_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/docker_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function dockerMetricsSpecProvider() { +export function dockerMetricsSpecProvider(server, context) { const moduleName = 'docker'; return { id: 'dockerMetrics', @@ -56,7 +56,7 @@ export function dockerMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/docker_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js b/src/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js index 2222d9468808d00..bb8a15894a3dea2 100644 --- a/src/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function dropwizardMetricsSpecProvider() { +export function dropwizardMetricsSpecProvider(server, context) { const moduleName = 'dropwizard'; return { id: 'dropwizardMetrics', @@ -53,7 +53,7 @@ export function dropwizardMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js b/src/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js index 4dfcdbfbde5d942..55f2b3ea4ecb376 100644 --- a/src/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function elasticsearchLogsSpecProvider() { +export function elasticsearchLogsSpecProvider(server, context) { const moduleName = 'elasticsearch'; const geoipRequired = false; const uaRequired = false; @@ -57,7 +57,7 @@ export function elasticsearchLogsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js b/src/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js index abbbe3f1429c9b8..8982eedce706933 100644 --- a/src/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function elasticsearchMetricsSpecProvider() { +export function elasticsearchMetricsSpecProvider(server, context) { const moduleName = 'elasticsearch'; return { id: 'elasticsearchMetrics', @@ -54,7 +54,7 @@ export function elasticsearchMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/etcd_metrics/index.js b/src/core_plugins/kibana/server/tutorials/etcd_metrics/index.js index 2b704f57ab20815..a357c31d94215db 100644 --- a/src/core_plugins/kibana/server/tutorials/etcd_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/etcd_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function etcdMetricsSpecProvider() { +export function etcdMetricsSpecProvider(server, context) { const moduleName = 'etcd'; return { id: 'etcdMetrics', @@ -53,7 +53,7 @@ export function etcdMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/golang_metrics/index.js b/src/core_plugins/kibana/server/tutorials/golang_metrics/index.js index 2714de14f494dde..f56d146dbedecbc 100644 --- a/src/core_plugins/kibana/server/tutorials/golang_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/golang_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function golangMetricsSpecProvider() { +export function golangMetricsSpecProvider(server, context) { const moduleName = 'golang'; return { id: moduleName + 'Metrics', @@ -56,7 +56,7 @@ export function golangMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js b/src/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js index f2d119b75e91656..bb1a4319617b4f1 100644 --- a/src/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function haproxyMetricsSpecProvider() { +export function haproxyMetricsSpecProvider(server, context) { const moduleName = 'haproxy'; return { id: 'haproxyMetrics', @@ -53,7 +53,7 @@ export function haproxyMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/iis_logs/index.js b/src/core_plugins/kibana/server/tutorials/iis_logs/index.js index 54ee34caa1765a4..0abef39ba17fd1e 100644 --- a/src/core_plugins/kibana/server/tutorials/iis_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/iis_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function iisLogsSpecProvider() { +export function iisLogsSpecProvider(server, context) { const moduleName = 'iis'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function iisLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/iis_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/kafka_logs/index.js b/src/core_plugins/kibana/server/tutorials/kafka_logs/index.js index 4ac90a5e85e4af9..269265ce933eb7c 100644 --- a/src/core_plugins/kibana/server/tutorials/kafka_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/kafka_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function kafkaLogsSpecProvider() { +export function kafkaLogsSpecProvider(server, context) { const moduleName = 'kafka'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function kafkaLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/kafka_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/kafka_metrics/index.js b/src/core_plugins/kibana/server/tutorials/kafka_metrics/index.js index c5f0403a937732a..6e3288695e0c659 100644 --- a/src/core_plugins/kibana/server/tutorials/kafka_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/kafka_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function kafkaMetricsSpecProvider() { +export function kafkaMetricsSpecProvider(server, context) { const moduleName = 'kafka'; return { id: 'kafkaMetrics', @@ -53,7 +53,7 @@ export function kafkaMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/kibana_metrics/index.js b/src/core_plugins/kibana/server/tutorials/kibana_metrics/index.js index 5e2a734372f1c51..83953af8589ed00 100644 --- a/src/core_plugins/kibana/server/tutorials/kibana_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/kibana_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function kibanaMetricsSpecProvider() { +export function kibanaMetricsSpecProvider(server, context) { const moduleName = 'kibana'; return { id: 'kibanaMetrics', @@ -54,7 +54,7 @@ export function kibanaMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js b/src/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js index c4b483be10ec728..255f5821f0e666d 100644 --- a/src/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function kubernetesMetricsSpecProvider() { +export function kubernetesMetricsSpecProvider(server, context) { const moduleName = 'kubernetes'; return { id: 'kubernetesMetrics', @@ -56,7 +56,7 @@ export function kubernetesMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/kubernetes_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/logstash_logs/index.js b/src/core_plugins/kibana/server/tutorials/logstash_logs/index.js index ca11ee947008451..8bec45d94adfd35 100644 --- a/src/core_plugins/kibana/server/tutorials/logstash_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/logstash_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function logstashLogsSpecProvider() { +export function logstashLogsSpecProvider(server, context) { const moduleName = 'logstash'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function logstashLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/logstash_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/logstash_metrics/index.js b/src/core_plugins/kibana/server/tutorials/logstash_metrics/index.js index 8689cad2fc966c8..b18bbede0c70b9b 100644 --- a/src/core_plugins/kibana/server/tutorials/logstash_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/logstash_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function logstashMetricsSpecProvider() { +export function logstashMetricsSpecProvider(server, context) { const moduleName = 'logstash'; return { id: moduleName + 'Metrics', @@ -55,7 +55,7 @@ export function logstashMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/memcached_metrics/index.js b/src/core_plugins/kibana/server/tutorials/memcached_metrics/index.js index 28021ffebdbf745..f9b09ce12ed3bfd 100644 --- a/src/core_plugins/kibana/server/tutorials/memcached_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/memcached_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function memcachedMetricsSpecProvider() { +export function memcachedMetricsSpecProvider(server, context) { const moduleName = 'memcached'; return { id: 'memcachedMetrics', @@ -53,7 +53,7 @@ export function memcachedMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js b/src/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js index e3db5dd55a4f28a..b02fbac0d9590e9 100644 --- a/src/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function mongodbMetricsSpecProvider() { +export function mongodbMetricsSpecProvider(server, context) { const moduleName = 'mongodb'; return { id: 'mongodbMetrics', @@ -56,7 +56,7 @@ export function mongodbMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mongodb_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/munin_metrics/index.js b/src/core_plugins/kibana/server/tutorials/munin_metrics/index.js index ab21dc2b03bd42c..e6e6489dc6fca1e 100644 --- a/src/core_plugins/kibana/server/tutorials/munin_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/munin_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function muninMetricsSpecProvider() { +export function muninMetricsSpecProvider(server, context) { const moduleName = 'munin'; return { id: 'muninMetrics', @@ -53,7 +53,7 @@ export function muninMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/mysql_logs/index.js b/src/core_plugins/kibana/server/tutorials/mysql_logs/index.js index bddc0d9659f49f8..9b06e4a1fafc4a1 100644 --- a/src/core_plugins/kibana/server/tutorials/mysql_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/mysql_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function mysqlLogsSpecProvider() { +export function mysqlLogsSpecProvider(server, context) { const moduleName = 'mysql'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function mysqlLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mysql_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/mysql_metrics/index.js b/src/core_plugins/kibana/server/tutorials/mysql_metrics/index.js index 37bd452a7fad80d..24614ab353e83b4 100644 --- a/src/core_plugins/kibana/server/tutorials/mysql_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/mysql_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function mysqlMetricsSpecProvider() { +export function mysqlMetricsSpecProvider(server, context) { const moduleName = 'mysql'; return { id: 'mysqlMetrics', @@ -56,7 +56,7 @@ export function mysqlMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mysql_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/nginx_logs/index.js b/src/core_plugins/kibana/server/tutorials/nginx_logs/index.js index d540a3f9f2daaf8..03e7454b60b8c58 100644 --- a/src/core_plugins/kibana/server/tutorials/nginx_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/nginx_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function nginxLogsSpecProvider() { +export function nginxLogsSpecProvider(server, context) { const moduleName = 'nginx'; const geoipRequired = true; const uaRequired = true; @@ -59,7 +59,7 @@ export function nginxLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/nginx_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/nginx_metrics/index.js b/src/core_plugins/kibana/server/tutorials/nginx_metrics/index.js index 38c54bf8ae2d622..1eb34a5413cc39b 100644 --- a/src/core_plugins/kibana/server/tutorials/nginx_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/nginx_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function nginxMetricsSpecProvider() { +export function nginxMetricsSpecProvider(server, context) { const moduleName = 'nginx'; return { id: 'nginxMetrics', @@ -60,7 +60,7 @@ which must be enabled in your Nginx installation. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/nginx_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/osquery_logs/index.js b/src/core_plugins/kibana/server/tutorials/osquery_logs/index.js index fab1fb78285ac68..f394291e62f753d 100644 --- a/src/core_plugins/kibana/server/tutorials/osquery_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/osquery_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function osqueryLogsSpecProvider() { +export function osqueryLogsSpecProvider(server, context) { const moduleName = 'osquery'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function osqueryLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/osquery_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js b/src/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js index f024bcb62f852d2..45a8e919d65a93f 100644 --- a/src/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function phpfpmMetricsSpecProvider() { +export function phpfpmMetricsSpecProvider(server, context) { const moduleName = 'php_fpm'; return { id: 'phpfpmMetrics', @@ -55,7 +55,7 @@ export function phpfpmMetricsSpecProvider() { }, completionTimeMinutes: 10, //previewImagePath: '/plugins/kibana/home/tutorial_resources/php_fpm_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/postgresql_logs/index.js b/src/core_plugins/kibana/server/tutorials/postgresql_logs/index.js index ff4c09d8ba2f0a9..a31e65eaf61a4de 100644 --- a/src/core_plugins/kibana/server/tutorials/postgresql_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/postgresql_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function postgresqlLogsSpecProvider() { +export function postgresqlLogsSpecProvider(server, context) { const moduleName = 'postgresql'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function postgresqlLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js b/src/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js index c646700c3d011b0..fb40d4d638801b2 100644 --- a/src/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function postgresqlMetricsSpecProvider() { +export function postgresqlMetricsSpecProvider(server, context) { const moduleName = 'postgresql'; return { id: 'postgresqlMetrics', @@ -57,7 +57,7 @@ export function postgresqlMetricsSpecProvider() { }, completionTimeMinutes: 10, //previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js b/src/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js index 5bfad2d708706ba..987374e1389a5b9 100644 --- a/src/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function prometheusMetricsSpecProvider() { +export function prometheusMetricsSpecProvider(server, context) { const moduleName = 'prometheus'; return { id: moduleName + 'Metrics', @@ -54,7 +54,7 @@ export function prometheusMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js b/src/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js index 0b343d3dd4abc92..642f00280751019 100644 --- a/src/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function rabbitmqMetricsSpecProvider() { +export function rabbitmqMetricsSpecProvider(server, context) { const moduleName = 'rabbitmq'; return { id: 'rabbitmqMetrics', @@ -57,7 +57,7 @@ export function rabbitmqMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/rabbitmq_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/redis_logs/index.js b/src/core_plugins/kibana/server/tutorials/redis_logs/index.js index 397181820d06091..c142f62a8ea5c41 100644 --- a/src/core_plugins/kibana/server/tutorials/redis_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/redis_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function redisLogsSpecProvider() { +export function redisLogsSpecProvider(server, context) { const moduleName = 'redis'; const geoipRequired = false; const uaRequired = false; @@ -65,7 +65,7 @@ Note that the `slowlog` fileset is experimental. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/redis_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/redis_metrics/index.js b/src/core_plugins/kibana/server/tutorials/redis_metrics/index.js index e1d451a17fb3273..928ced07ade262c 100644 --- a/src/core_plugins/kibana/server/tutorials/redis_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/redis_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function redisMetricsSpecProvider() { +export function redisMetricsSpecProvider(server, context) { const moduleName = 'redis'; return { id: 'redisMetrics', @@ -56,7 +56,7 @@ export function redisMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/redis_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/system_logs/index.js b/src/core_plugins/kibana/server/tutorials/system_logs/index.js index 74117526ac77c2d..54f295ecb44f8e3 100644 --- a/src/core_plugins/kibana/server/tutorials/system_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/system_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function systemLogsSpecProvider() { +export function systemLogsSpecProvider(server, context) { const moduleName = 'system'; const geoipRequired = true; const uaRequired = false; @@ -59,7 +59,7 @@ Unix/Linux based distributions. This module is not available on Windows. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/system_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/system_metrics/index.js b/src/core_plugins/kibana/server/tutorials/system_metrics/index.js index 61669025d2f1ff8..a5fc1d7fd6333cf 100644 --- a/src/core_plugins/kibana/server/tutorials/system_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/system_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function systemMetricsSpecProvider() { +export function systemMetricsSpecProvider(server, context) { const moduleName = 'system'; return { id: 'systemMetrics', @@ -56,7 +56,7 @@ It collects system wide statistics and statistics per process and filesystem. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/system_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/traefik_logs/index.js b/src/core_plugins/kibana/server/tutorials/traefik_logs/index.js index 7c7cdafd4fa258a..5b90a2707b7a3a2 100644 --- a/src/core_plugins/kibana/server/tutorials/traefik_logs/index.js +++ b/src/core_plugins/kibana/server/tutorials/traefik_logs/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/filebeat_instructions'; -export function traefikLogsSpecProvider() { +export function traefikLogsSpecProvider(server, context) { const moduleName = 'traefik'; const geoipRequired = false; const uaRequired = false; @@ -59,7 +59,7 @@ export function traefikLogsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/traefik_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired), + onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms) }; diff --git a/src/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js b/src/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js index 3769c3fa6f014fe..a55d7c237d98743 100644 --- a/src/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function uwsgiMetricsSpecProvider() { +export function uwsgiMetricsSpecProvider(server, context) { const moduleName = 'uwsgi'; return { id: 'uwsgiMetrics', @@ -57,7 +57,7 @@ export function uwsgiMetricsSpecProvider() { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/uwsgi_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js b/src/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js index 7ef4e68768b22d2..035e4ef5983ff98 100644 --- a/src/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function vSphereMetricsSpecProvider() { +export function vSphereMetricsSpecProvider(server, context) { const moduleName = 'vsphere'; return { id: 'vsphereMetrics', @@ -54,7 +54,7 @@ export function vSphereMetricsSpecProvider() { }, completionTimeMinutes: 10, //previewImagePath: '/plugins/kibana/home/tutorial_resources/vsphere_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/windows_metrics/index.js b/src/core_plugins/kibana/server/tutorials/windows_metrics/index.js index 16543ef745b9212..380cca3264f2261 100644 --- a/src/core_plugins/kibana/server/tutorials/windows_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/windows_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function windowsMetricsSpecProvider() { +export function windowsMetricsSpecProvider(server, context) { const moduleName = 'windows'; return { id: 'windowsMetrics', @@ -53,7 +53,7 @@ export function windowsMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js b/src/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js index 1a5b78df196bf81..93b57b18d0409b0 100644 --- a/src/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js +++ b/src/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions } from '../../../common/tutorials/metricbeat_instructions'; -export function zookeeperMetricsSpecProvider() { +export function zookeeperMetricsSpecProvider(server, context) { const moduleName = 'zookeeper'; return { id: moduleName + 'Metrics', @@ -54,7 +54,7 @@ export function zookeeperMetricsSpecProvider() { } }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName), + onPrem: onPremInstructions(moduleName, null, null, null, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName) }; diff --git a/src/core_plugins/kibana/ui_setting_defaults.js b/src/core_plugins/kibana/ui_setting_defaults.js index 8b2dcc2d2b4a6a1..f56980de6537181 100644 --- a/src/core_plugins/kibana/ui_setting_defaults.js +++ b/src/core_plugins/kibana/ui_setting_defaults.js @@ -44,6 +44,12 @@ export function getUiSettingDefaults() { description: `When set, * is allowed as the first character in a query clause. Currently only applies when experimental query features are enabled in the query bar. To disallow leading wildcards in basic lucene queries, use query:queryString:options`, }, + 'k7design': { + name: 'Use the new K7 UI design', + value: false, + description: `When set, Kibana will use the new K7 design targeted for release in 7.0. At this time, not all features are + implemented.`, + }, 'search:queryLanguage': { name: 'Query language', value: 'lucene', diff --git a/src/core_plugins/timelion/index.js b/src/core_plugins/timelion/index.js index 5999f3900cbb562..aecb3f6cbbe229d 100644 --- a/src/core_plugins/timelion/index.js +++ b/src/core_plugins/timelion/index.js @@ -26,6 +26,7 @@ export default function (kibana) { order: -1000, description: 'Time series expressions for everything', icon: 'plugins/timelion/icon.svg', + euiIconType: 'timelionApp', main: 'plugins/timelion/app', }, styleSheetPaths: `${__dirname}/public/index.scss`, diff --git a/src/server/saved_objects/migrations/core/call_cluster.ts b/src/server/saved_objects/migrations/core/call_cluster.ts index 35da4352dac672a..656b14d18a5a836 100644 --- a/src/server/saved_objects/migrations/core/call_cluster.ts +++ b/src/server/saved_objects/migrations/core/call_cluster.ts @@ -41,6 +41,7 @@ export interface CallCluster { (path: 'reindex', opts: ReindexOpts): Promise; (path: 'scroll', opts: ScrollOpts): Promise; (path: 'search', opts: SearchOpts): Promise; + (path: 'tasks.get', opts: { taskId: string }): Promise<{ completed: boolean }>; } /////////////////////////////////////////////////////////////////// @@ -97,7 +98,7 @@ export interface IndexCreationOpts { export interface ReindexOpts { body: { dest: IndexOpts; - source: IndexOpts; + source: IndexOpts & { size: number }; }; refresh: boolean; waitForCompletion: boolean; diff --git a/src/server/saved_objects/migrations/core/elastic_index.test.ts b/src/server/saved_objects/migrations/core/elastic_index.test.ts index 3014921dec57d72..90cc62c3799adec 100644 --- a/src/server/saved_objects/migrations/core/elastic_index.test.ts +++ b/src/server/saved_objects/migrations/core/elastic_index.test.ts @@ -252,15 +252,18 @@ describe('ElasticIndex', () => { expect(arg.index).toEqual('.ze-index'); return true; case 'reindex': - expect(arg).toEqual({ + expect(arg).toMatchObject({ body: { dest: { index: '.ze-index' }, source: { index: '.muchacha' }, }, refresh: true, - waitForCompletion: true, + waitForCompletion: false, }); - return true; + return { task: 'abc' }; + case 'tasks.get': + expect(arg.taskId).toEqual('abc'); + return { completed: true }; case 'indices.getAlias': return { '.my-fanci-index': '.muchacha' }; case 'indices.updateAliases': @@ -291,11 +294,12 @@ describe('ElasticIndex', () => { }, }, }; - await Index.convertToAlias(callCluster, info, '.muchacha'); + await Index.convertToAlias(callCluster, info, '.muchacha', 10); expect(callCluster.args.map(([path]) => path)).toEqual([ 'indices.create', 'reindex', + 'tasks.get', 'indices.getAlias', 'indices.updateAliases', 'indices.refresh', diff --git a/src/server/saved_objects/migrations/core/elastic_index.ts b/src/server/saved_objects/migrations/core/elastic_index.ts index f3759a3728e1069..a46836235709f52 100644 --- a/src/server/saved_objects/migrations/core/elastic_index.ts +++ b/src/server/saved_objects/migrations/core/elastic_index.ts @@ -217,20 +217,18 @@ export async function deleteIndex(callCluster: CallCluster, index: string) { * @param {FullIndexInfo} info - Information about the mappings and name of the new index * @param {string} alias - The name of the index being converted to an alias */ -export async function convertToAlias(callCluster: CallCluster, info: FullIndexInfo, alias: string) { +export async function convertToAlias( + callCluster: CallCluster, + info: FullIndexInfo, + alias: string, + batchSize: number +) { await callCluster('indices.create', { body: { mappings: info.mappings }, index: info.indexName, }); - await callCluster('reindex', { - body: { - dest: { index: info.indexName }, - source: { index: alias }, - }, - refresh: true, - waitForCompletion: true, - }); + await reindex(callCluster, alias, info.indexName, batchSize); await claimAlias(callCluster, info.indexName, alias, [{ remove_index: { index: alias } }]); } @@ -284,3 +282,32 @@ async function assertIsSupportedIndex(indexInfo: FullIndexInfo) { } return indexInfo; } + +/** + * Reindexes from source to dest, polling for the reindex completion. + */ +async function reindex(callCluster: CallCluster, source: string, dest: string, batchSize: number) { + // We poll instead of having the request wait for completion, as for large indices, + // the request times out on the Elasticsearch side of things. We have a relatively tight + // polling interval, as the request is fairly efficent, and we don't + // want to block index migrations for too long on this. + const pollInterval = 250; + const { task } = await callCluster('reindex', { + body: { + dest: { index: dest }, + source: { index: source, size: batchSize }, + }, + refresh: true, + waitForCompletion: false, + }); + + let completed = false; + + while (!completed) { + await new Promise(r => setTimeout(r, pollInterval)); + + completed = await callCluster('tasks.get', { + taskId: task, + }).then(result => result.completed); + } +} diff --git a/src/server/saved_objects/migrations/core/index_migrator.test.ts b/src/server/saved_objects/migrations/core/index_migrator.test.ts index d14c8f55c9b9275..51eb3e424c7e7ec 100644 --- a/src/server/saved_objects/migrations/core/index_migrator.test.ts +++ b/src/server/saved_objects/migrations/core/index_migrator.test.ts @@ -339,7 +339,8 @@ function withIndex(callCluster: sinon.SinonStub, opts: any = {}) { }); callCluster.withArgs('indices.get').returns(Promise.resolve(index)); callCluster.withArgs('indices.getAlias').returns(Promise.resolve(alias)); - + callCluster.withArgs('reindex').returns(Promise.resolve({ task: 'zeid' })); + callCluster.withArgs('tasks.get').returns(Promise.resolve({ completed: true })); callCluster.withArgs('search').returns(searchResult(0)); _.range(1, docs.length).forEach(i => { diff --git a/src/server/saved_objects/migrations/core/index_migrator.ts b/src/server/saved_objects/migrations/core/index_migrator.ts index bae5d37bc6e3aab..4d68b96db8d2317 100644 --- a/src/server/saved_objects/migrations/core/index_migrator.ts +++ b/src/server/saved_objects/migrations/core/index_migrator.ts @@ -158,7 +158,7 @@ async function migrateSourceToDest(context: Context) { if (!source.aliases[alias]) { log.info(`Reindexing ${alias} to ${source.indexName}`); - await Index.convertToAlias(callCluster, source, alias); + await Index.convertToAlias(callCluster, source, alias, batchSize); } const read = Index.reader(callCluster, source.indexName, { batchSize, scrollDuration }); diff --git a/src/ui/public/chrome/directives/header_global_nav/components/__snapshots__/header_breadcrumbs.test.tsx.snap b/src/ui/public/chrome/directives/header_global_nav/components/__snapshots__/header_breadcrumbs.test.tsx.snap new file mode 100644 index 000000000000000..74243a506a0fd9a --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/__snapshots__/header_breadcrumbs.test.tsx.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`HeaderBreadcrumbs renders updates to the breadcrumbs observable 1`] = ` + + First + +`; + +exports[`HeaderBreadcrumbs renders updates to the breadcrumbs observable 2`] = ` +Array [ + + + , + , + + Second + , +] +`; + +exports[`HeaderBreadcrumbs renders updates to the breadcrumbs observable 3`] = `null`; diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header.tsx new file mode 100644 index 000000000000000..444e92cadcc2d0a --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header.tsx @@ -0,0 +1,87 @@ +/* + * 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 React, { Component } from 'react'; +import { Subscribable } from 'rxjs'; + +import { + // TODO: add type annotations + // @ts-ignore + EuiHeader, + // @ts-ignore + EuiHeaderLogo, + // @ts-ignore + EuiHeaderSection, + // @ts-ignore + EuiHeaderSectionItem, +} from '@elastic/eui'; + +import { HeaderAppMenu } from './header_app_menu'; +import { HeaderBreadcrumbs } from './header_breadcrumbs'; +import { HeaderNavControls } from './header_nav_controls'; + +import { ChromeHeaderNavControlsRegistry } from 'ui/registry/chrome_header_nav_controls'; +import { Breadcrumb, NavControlSide, NavLink } from '../'; + +interface Props { + appTitle?: string; + breadcrumbs: Subscribable; + homeHref: string; + isVisible: boolean; + navLinks: NavLink[]; + navControls: ChromeHeaderNavControlsRegistry; +} + +export class Header extends Component { + public renderLogo() { + const { homeHref } = this.props; + return ; + } + + public render() { + const { appTitle, breadcrumbs, isVisible, navControls, navLinks } = this.props; + + if (!isVisible) { + return null; + } + + const leftNavControls = navControls.bySide[NavControlSide.Left]; + const rightNavControls = navControls.bySide[NavControlSide.Right]; + + return ( + + + {this.renderLogo()} + + + + + + + + + + + + + + + ); + } +} diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_app_menu.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_app_menu.tsx new file mode 100644 index 000000000000000..d56597b7fe9bc39 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_app_menu.tsx @@ -0,0 +1,106 @@ +/* + * 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 React, { Component } from 'react'; + +import { + // TODO: add type annotations + // @ts-ignore + EuiHeaderSectionItemButton, + // @ts-ignore + EuiIcon, + // @ts-ignore + EuiKeyPadMenu, + // @ts-ignore + EuiKeyPadMenuItem, + EuiPopover, +} from '@elastic/eui'; + +import { NavLink } from '../'; + +interface Props { + navLinks: NavLink[]; +} + +interface State { + isOpen: boolean; +} + +export class HeaderAppMenu extends Component { + constructor(props: Props) { + super(props); + + this.state = { + isOpen: false, + }; + } + + public render() { + const { navLinks = [] } = this.props; + + const button = ( + + + + ); + + return ( + + + {navLinks.map(this.renderNavLink)} + + + ); + } + + private onMenuButtonClick = () => { + this.setState({ + isOpen: !this.state.isOpen, + }); + }; + + private closeMenu = () => { + this.setState({ + isOpen: false, + }); + }; + + private renderNavLink = (navLink: NavLink) => ( + + + + ); +} diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.test.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.test.tsx new file mode 100644 index 000000000000000..73c3724b1a95a41 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.test.tsx @@ -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. + */ + +import { mount } from 'enzyme'; +import React from 'react'; +import { breadcrumbs, set } from '../../../services/breadcrumb_state'; +import { HeaderBreadcrumbs } from './header_breadcrumbs'; + +describe('HeaderBreadcrumbs', () => { + it('renders updates to the breadcrumbs observable', () => { + const wrapper = mount(); + + set([{ text: 'First' }]); + // Unfortunately, enzyme won't update the wrapper until we call update. + wrapper.update(); + expect(wrapper.find('.euiBreadcrumb')).toMatchSnapshot(); + + set([{ text: 'First' }, { text: 'Second' }]); + wrapper.update(); + expect(wrapper.find('.euiBreadcrumb')).toMatchSnapshot(); + + set([]); + wrapper.update(); + expect(wrapper.find('.euiBreadcrumb')).toMatchSnapshot(); + }); +}); diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.tsx new file mode 100644 index 000000000000000..ff880ccbd9f67a1 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_breadcrumbs.tsx @@ -0,0 +1,87 @@ +/* + * 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 React, { Component } from 'react'; +import { Subscribable, Unsubscribable } from 'rxjs'; + +import { + // @ts-ignore + EuiHeaderBreadcrumbs, +} from '@elastic/eui'; + +import { Breadcrumb } from '../'; + +interface Props { + appTitle?: string; + breadcrumbs: Subscribable; +} + +interface State { + breadcrumbs: Breadcrumb[]; +} + +export class HeaderBreadcrumbs extends Component { + private unsubscribable?: Unsubscribable; + + constructor(props: Props) { + super(props); + + this.state = { breadcrumbs: [] }; + } + + public componentDidMount() { + this.subscribe(); + } + + public componentDidUpdate(prevProps: Props) { + if (prevProps.breadcrumbs === this.props.breadcrumbs) { + return; + } + + this.unsubscribe(); + this.subscribe(); + } + + public componentWillUnmount() { + this.unsubscribe(); + } + + public render() { + let breadcrumbs = this.state.breadcrumbs; + + if (breadcrumbs.length === 0 && this.props.appTitle) { + breadcrumbs = [{ text: this.props.appTitle }]; + } + + return ; + } + + private subscribe() { + this.unsubscribable = this.props.breadcrumbs.subscribe(breadcrumbs => { + this.setState({ breadcrumbs }); + }); + } + + private unsubscribe() { + if (this.unsubscribable) { + this.unsubscribable.unsubscribe(); + delete this.unsubscribable; + } + } +} diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.test.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.test.tsx new file mode 100644 index 000000000000000..2642ebd430e357e --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.test.tsx @@ -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 { mount } from 'enzyme'; +import React from 'react'; +import { NavControl, NavControlSide } from '../'; +import { HeaderNavControl } from './header_nav_control'; + +describe('HeaderNavControl', () => { + const defaultNavControl = { name: '', order: 1, side: NavControlSide.Right }; + + it('calls navControl.render with div node', () => { + const renderSpy = jest.fn(); + const navControl = { ...defaultNavControl, render: renderSpy } as NavControl; + + mount(); + + expect(renderSpy.mock.calls.length).toEqual(1); + + const [divNode] = renderSpy.mock.calls[0]; + expect(divNode).toBeInstanceOf(HTMLElement); + }); + + it('calls unrender callback when unmounted', () => { + const unrenderSpy = jest.fn(); + const render = () => unrenderSpy; + const navControl = { ...defaultNavControl, render } as NavControl; + + const wrapper = mount(); + + wrapper.unmount(); + expect(unrenderSpy.mock.calls.length).toEqual(1); + }); +}); diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.tsx new file mode 100644 index 000000000000000..53791bf771c9ee9 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_control.tsx @@ -0,0 +1,64 @@ +/* + * 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 React from 'react'; +import { NavControl } from '../'; + +interface Props { + navControl: NavControl; +} + +export class HeaderNavControl extends React.Component { + private readonly ref = React.createRef(); + private unrender?: () => void; + + public componentDidMount() { + if (!this.ref.current) { + throw new Error(' mounted without ref'); + } + + this.unrender = this.props.navControl.render(this.ref.current) || undefined; + } + + public componentDidUpdate(prevProps: Props) { + if (this.props.navControl.render === prevProps.navControl.render) { + return; + } + + if (!this.ref.current) { + throw new Error(' updated without ref'); + } + + if (this.unrender) { + this.unrender(); + } + + this.unrender = this.props.navControl.render(this.ref.current) || undefined; + } + + public componentWillUnmount() { + if (this.unrender) { + this.unrender(); + } + } + + public render() { + return
; + } +} diff --git a/src/ui/public/chrome/directives/header_global_nav/components/header_nav_controls.tsx b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_controls.tsx new file mode 100644 index 000000000000000..c452dc518f8812c --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/components/header_nav_controls.tsx @@ -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 React, { Component } from 'react'; + +import { + // @ts-ignore + EuiHeaderSectionItem, +} from '@elastic/eui'; + +import { NavControl } from '../'; +import { HeaderNavControl } from './header_nav_control'; + +interface Props { + navControls: NavControl[]; +} + +export class HeaderNavControls extends Component { + public render() { + const { navControls } = this.props; + + if (!navControls) { + return null; + } + + return navControls.map(this.renderNavControl); + } + + private renderNavControl = (navControl: NavControl) => ( + + + + ); +} diff --git a/src/ui/public/chrome/directives/header_global_nav/header_global_nav.js b/src/ui/public/chrome/directives/header_global_nav/header_global_nav.js new file mode 100644 index 000000000000000..1b81119c0804350 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/header_global_nav.js @@ -0,0 +1,47 @@ +/* + * 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 { uiModules } from '../../../modules'; +import { Header } from './components/header'; +import './header_global_nav.less'; +import { chromeHeaderNavControlsRegistry } from 'ui/registry/chrome_header_nav_controls'; +import { breadcrumbs } from '../../services/breadcrumb_state'; + +const module = uiModules.get('kibana'); + +module.directive('headerGlobalNav', (reactDirective, chrome, Private) => { + const navControls = Private(chromeHeaderNavControlsRegistry); + const navLinks = chrome.getNavLinks(); + const homeHref = chrome.addBasePath('/app/kibana#/home'); + + return reactDirective(Header, [ + // scope accepted by directive, passed in as React props + 'appTitle', + 'isVisible', + ], + {}, + // angular injected React props + { + breadcrumbs, + navLinks, + navControls, + homeHref + }); +}); diff --git a/src/ui/public/chrome/directives/header_global_nav/header_global_nav.less b/src/ui/public/chrome/directives/header_global_nav/header_global_nav.less new file mode 100644 index 000000000000000..1281c00455bb865 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/header_global_nav.less @@ -0,0 +1,11 @@ +.header-global-wrapper { + width: 100%; + position: fixed; + top: 0; + z-index: 10; +} + +.header-global-wrapper + .app-wrapper { + top: 65px; + left: 0; +} diff --git a/src/ui/public/chrome/directives/header_global_nav/index.ts b/src/ui/public/chrome/directives/header_global_nav/index.ts new file mode 100644 index 000000000000000..9b6b7521c2c4df0 --- /dev/null +++ b/src/ui/public/chrome/directives/header_global_nav/index.ts @@ -0,0 +1,45 @@ +/* + * 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 { IconType } from '@elastic/eui'; +import './header_global_nav'; + +export enum NavControlSide { + Left = 'left', + Right = 'right', +} + +export interface NavControl { + name: string; + order: number; + side: NavControlSide; + render: (targetDomElement: HTMLDivElement) => (() => void) | void; +} + +export interface NavLink { + title: string; + url: string; + id: string; + euiIconType: IconType; +} + +export interface Breadcrumb { + text: string; + href?: string; +} diff --git a/src/ui/public/chrome/directives/index.js b/src/ui/public/chrome/directives/index.js index 0cd8d49c0c31a2f..cbc254ba3447e39 100644 --- a/src/ui/public/chrome/directives/index.js +++ b/src/ui/public/chrome/directives/index.js @@ -19,6 +19,7 @@ import './global_nav'; +import './header_global_nav'; import { kbnChromeProvider } from './kbn_chrome'; import { kbnAppendChromeNavControls } from './append_nav_controls'; diff --git a/src/ui/public/chrome/directives/kbn_chrome.html b/src/ui/public/chrome/directives/kbn_chrome.html index 1c993506dab5ef9..3dd6f2972da2fb1 100644 --- a/src/ui/public/chrome/directives/kbn_chrome.html +++ b/src/ui/public/chrome/directives/kbn_chrome.html @@ -1,5 +1,8 @@
+ + + +
- -
$scope.k7design = val); + const getUnhashableStates = Private(getUnhashableStatesProvider); // are we showing the embedded version of the chrome? diff --git a/src/ui/public/chrome/directives/loading_indicator.less b/src/ui/public/chrome/directives/loading_indicator.less index 7f13c022c32bd40..5e57ba5ff7cc0c4 100644 --- a/src/ui/public/chrome/directives/loading_indicator.less +++ b/src/ui/public/chrome/directives/loading_indicator.less @@ -14,7 +14,7 @@ top: 0; // 1 left: 0; // 1 right: 0; // 1 - z-index: 1; // 1 + z-index: 20; // 1 overflow: hidden; // 2 height: @loadingIndicatorHeight; @@ -31,7 +31,7 @@ right: 0; bottom: 0; position: absolute; - z-index: 10; + z-index: 21; visibility: visible; display: block; animation: animate-loading-indicator 2s linear infinite; diff --git a/src/ui/public/chrome/services/breadcrumb_state.ts b/src/ui/public/chrome/services/breadcrumb_state.ts new file mode 100644 index 000000000000000..020c9f133396871 --- /dev/null +++ b/src/ui/public/chrome/services/breadcrumb_state.ts @@ -0,0 +1,62 @@ +/* + * 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 { Subject, Subscribable } from 'rxjs'; +// @ts-ignore +import { uiModules } from '../../modules'; +import { Breadcrumb } from '../directives/header_global_nav'; + +// A flag used to keep track of clearing between route changes. +let shouldClear = false; + +// Subject used by Header component to subscribe to breadcrumbs changes. +// This is not exposed publicly. +const breadcrumbsSubject = new Subject(); + +/** + * A rxjs subscribable that can be used to subscribe to breadcrumb updates. + */ +export const breadcrumbs: Subscribable = breadcrumbsSubject; + +/** + * Should be called by plugins to set breadcrumbs in the header navigation. + * + * @param breadcrumbs: Array where Breadcrumb has shape + * { text: '', href?: '' } + */ +export const set = (newBreadcrumbs: Breadcrumb[]) => { + breadcrumbsSubject.next(newBreadcrumbs); + + // If a plugin called set, don't clear on route change. + shouldClear = false; +}; + +uiModules.get('kibana').service('breadcrumbState', ($rootScope: any) => { + // When a route change happens we want to clear the breadcrumbs ONLY if + // the new route does not set any breadcrumbs. Deferring the clearing until + // the route finishes changing helps avoiding the breadcrumbs from 'flickering'. + $rootScope.$on('$routeChangeStart', () => (shouldClear = true)); + $rootScope.$on('$routeChangeSuccess', () => { + if (shouldClear) { + set([]); + } + }); + + return { set }; +}); diff --git a/src/ui/public/chrome/services/index.js b/src/ui/public/chrome/services/index.js index 3b3967f51b2ffa7..3c2f2fb71d202f0 100644 --- a/src/ui/public/chrome/services/index.js +++ b/src/ui/public/chrome/services/index.js @@ -18,3 +18,4 @@ */ import './global_nav_state'; +import './breadcrumb_state'; diff --git a/src/ui/public/i18n/index.js b/src/ui/public/i18n/index.js index 5c2c7f3f96c0515..d23ff00230b9a32 100644 --- a/src/ui/public/i18n/index.js +++ b/src/ui/public/i18n/index.js @@ -20,13 +20,13 @@ import { uiModules } from 'ui/modules'; import { metadata } from 'ui/metadata'; import { - i18nProvider, + I18nProvider, i18nFilter, i18nDirective, } from '@kbn/i18n/angular'; uiModules.get('i18n') - .provider('i18n', i18nProvider) + .provider('i18n', I18nProvider) .filter('i18n', i18nFilter) .directive('i18nId', i18nDirective) .config((i18nProvider) => { diff --git a/src/ui/public/indexed_array/__tests__/indexed_array.js b/src/ui/public/indexed_array/__tests__/indexed_array.js index 0b70aa3de49e139..66966fe09519863 100644 --- a/src/ui/public/indexed_array/__tests__/indexed_array.js +++ b/src/ui/public/indexed_array/__tests__/indexed_array.js @@ -99,7 +99,11 @@ describe('IndexedArray', function () { reg.push(firstUser); // end up with the same structure that is in the users fixture - expect(reg.byGroup).to.eql(users.byGroup); + expect(Object.keys(reg.byGroup).length).to.be(Object.keys(users.byGroup).length); + for (const group of Object.keys(reg.byGroup)) { + expect(reg.byGroup[group].toJSON()).to.eql(users.byGroup[group]); + } + expect(reg.inIdOrder).to.eql(users.inIdOrder); }); diff --git a/src/ui/public/indexed_array/index.d.ts b/src/ui/public/indexed_array/index.d.ts new file mode 100644 index 000000000000000..9041a35cb3ab087 --- /dev/null +++ b/src/ui/public/indexed_array/index.d.ts @@ -0,0 +1,41 @@ +/* + * 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 { ListIterator } from 'lodash'; + +interface IndexedArrayConfig { + index?: string[]; + group?: string[]; + order?: string[]; + initialSet?: T[]; + immutable?: boolean; +} + +declare class IndexedArray extends Array { + public immutable: boolean; + public raw: T[]; + // May not actually be present, is dynamically defined. + public inOrder: T[]; + + constructor(config: IndexedArrayConfig); + + public remove(predicate: ListIterator): T[]; + + public toJSON(): T[]; +} diff --git a/src/ui/public/indexed_array/indexed_array.js b/src/ui/public/indexed_array/indexed_array.js index a910d4e402e9099..a7f10d6db873b23 100644 --- a/src/ui/public/indexed_array/indexed_array.js +++ b/src/ui/public/indexed_array/indexed_array.js @@ -51,7 +51,7 @@ export class IndexedArray { Object.defineProperty(this, 'raw', { value: [] }); this._indexNames = _.union( - this._setupIndex(config.group, inflectIndex, organizeBy), + this._setupIndex(config.group, inflectIndex, organizeByIndexedArray(config)), this._setupIndex(config.index, inflectIndex, _.indexBy), this._setupIndex(config.order, inflectOrder, (raw, pluckValue) => { return [...raw].sort((itemA, itemB) => { @@ -195,3 +195,20 @@ export class IndexedArray { // using traditional `extends Array` syntax doesn't work with babel // See https://babeljs.io/docs/usage/caveats/ Object.setPrototypeOf(IndexedArray.prototype, Array.prototype); + + +// Similar to `organizeBy` but returns IndexedArrays instead of normal Arrays. +function organizeByIndexedArray(config) { + return (...args) => { + const grouped = organizeBy(...args); + + return _.reduce(grouped, (acc, value, group) => { + acc[group] = new IndexedArray({ + ...config, + initialSet: value + }); + + return acc; + }, {}); + }; +} diff --git a/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.html b/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.html index bddd6f840a18fa3..1e8aa7e62051c73 100644 --- a/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.html +++ b/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.html @@ -3,6 +3,7 @@ data-test-subj="breadcrumbs" role="heading" aria-level="1" + ng-if="showPluginBreadcrumbs" >
$scope.showPluginBreadcrumbs = !val); function omitPagesFilter(crumb) { return ( @@ -70,6 +70,15 @@ module.directive('breadCrumbs', function () { .filter(omitPagesFilter) .filter(omitCurrentPageFilter) ); + + const newBreadcrumbs = $scope.breadcrumbs + .map(b => ({ text: b.display, href: b.href })); + + if ($scope.pageTitle) { + newBreadcrumbs.push({ text: $scope.pageTitle }); + } + + breadcrumbState.set(newBreadcrumbs); }); } }; diff --git a/src/ui/public/registry/_registry.d.ts b/src/ui/public/registry/_registry.d.ts new file mode 100644 index 000000000000000..425ab450365196c --- /dev/null +++ b/src/ui/public/registry/_registry.d.ts @@ -0,0 +1,31 @@ +/* + * 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 { IndexedArray, IndexedArrayConfig } from '../indexed_array'; + +interface UIRegistry extends IndexedArray { + register(privateModule: T): UIRegistry; +} + +interface UIRegistrySpec extends IndexedArrayConfig { + name: string; + filter?(item: T): boolean; +} + +declare function uiRegistry(spec: UIRegistrySpec): UIRegistry; diff --git a/src/ui/public/registry/chrome_header_nav_controls.ts b/src/ui/public/registry/chrome_header_nav_controls.ts new file mode 100644 index 000000000000000..5207113db6899f1 --- /dev/null +++ b/src/ui/public/registry/chrome_header_nav_controls.ts @@ -0,0 +1,37 @@ +/* + * 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 { NavControl } from '../chrome/directives/header_global_nav'; +import { IndexedArray } from '../indexed_array'; +import { uiRegistry, UIRegistry } from './_registry'; + +interface BySideDictionary { + // this key should be from NavControlSide + [side: string]: IndexedArray; +} + +export interface ChromeHeaderNavControlsRegistry extends UIRegistry { + bySide: BySideDictionary; +} + +export const chromeHeaderNavControlsRegistry: ChromeHeaderNavControlsRegistry = uiRegistry({ + name: 'chromeHeaderNavControls', + order: ['order'], + group: ['side'], +}) as ChromeHeaderNavControlsRegistry; diff --git a/src/ui/public/registry/chrome_nav_controls.js b/src/ui/public/registry/chrome_nav_controls.js index 85072a09ab6566f..b6c935b9cc3332a 100644 --- a/src/ui/public/registry/chrome_nav_controls.js +++ b/src/ui/public/registry/chrome_nav_controls.js @@ -23,4 +23,3 @@ export const chromeNavControlsRegistry = uiRegistry({ name: 'chromeNavControls', order: ['order'] }); - diff --git a/src/ui/ui_apps/ui_app.js b/src/ui/ui_apps/ui_app.js index 269bd044a56adff..1174f9da7f91bdc 100644 --- a/src/ui/ui_apps/ui_app.js +++ b/src/ui/ui_apps/ui_app.js @@ -29,6 +29,7 @@ export class UiApp { order = 0, description, icon, + euiIconType, hidden, linkToLastSubUrl, listed, @@ -45,6 +46,7 @@ export class UiApp { this._order = order; this._description = description; this._icon = icon; + this._euiIconType = euiIconType; this._linkToLastSubUrl = linkToLastSubUrl; this._hidden = hidden; this._listed = listed; @@ -66,6 +68,7 @@ export class UiApp { order: this._order, description: this._description, icon: this._icon, + euiIconType: this._euiIconType, url: this._url, linkToLastSubUrl: this._linkToLastSubUrl }); @@ -117,6 +120,7 @@ export class UiApp { title: this._title, description: this._description, icon: this._icon, + euiIconType: this._euiIconType, main: this._main, navLink: this._navLink, linkToLastSubUrl: this._linkToLastSubUrl, diff --git a/src/ui/ui_exports/ui_export_types/ui_apps.js b/src/ui/ui_exports/ui_export_types/ui_apps.js index 56f7a4f5f723771..d7ac49d9d49a323 100644 --- a/src/ui/ui_exports/ui_export_types/ui_apps.js +++ b/src/ui/ui_exports/ui_export_types/ui_apps.js @@ -29,6 +29,7 @@ function applySpecDefaults(spec, type, pluginSpec) { order = 0, description = '', icon, + euiIconType, hidden = false, linkToLastSubUrl = true, listed = !hidden, @@ -55,6 +56,7 @@ function applySpecDefaults(spec, type, pluginSpec) { order, description, icon, + euiIconType, hidden, linkToLastSubUrl, listed, diff --git a/src/ui/ui_nav_links/__tests__/ui_nav_link.js b/src/ui/ui_nav_links/__tests__/ui_nav_link.js index 6ac7bf55d18264f..a7c7c005ec72b35 100644 --- a/src/ui/ui_nav_links/__tests__/ui_nav_link.js +++ b/src/ui/ui_nav_links/__tests__/ui_nav_link.js @@ -31,6 +31,7 @@ describe('UiNavLink', () => { url: '/app/kibana#/discover', description: 'interactively explore your data', icon: 'plugins/kibana/assets/discover.svg', + euiIconType: 'discoverApp', hidden: true, disabled: true }; @@ -44,6 +45,7 @@ describe('UiNavLink', () => { subUrlBase: spec.url, description: spec.description, icon: spec.icon, + euiIconType: spec.euiIconType, hidden: spec.hidden, disabled: spec.disabled, diff --git a/src/ui/ui_nav_links/ui_nav_link.js b/src/ui/ui_nav_links/ui_nav_link.js index fe2d7c84b40a17b..25f7221b7b4be9d 100644 --- a/src/ui/ui_nav_links/ui_nav_link.js +++ b/src/ui/ui_nav_links/ui_nav_link.js @@ -27,6 +27,7 @@ export class UiNavLink { subUrlBase, description, icon, + euiIconType, linkToLastSubUrl = true, hidden = false, disabled = false, @@ -40,6 +41,7 @@ export class UiNavLink { this._subUrlBase = subUrlBase || url; this._description = description; this._icon = icon; + this._euiIconType = euiIconType; this._linkToLastSubUrl = linkToLastSubUrl; this._hidden = hidden; this._disabled = disabled; @@ -59,6 +61,7 @@ export class UiNavLink { subUrlBase: this._subUrlBase, description: this._description, icon: this._icon, + euiIconType: this._euiIconType, linkToLastSubUrl: this._linkToLastSubUrl, hidden: this._hidden, disabled: this._disabled, diff --git a/x-pack/README.md b/x-pack/README.md index 177a88f6e9f4366..a8b8fd8d643e3e9 100644 --- a/x-pack/README.md +++ b/x-pack/README.md @@ -102,33 +102,7 @@ node scripts/functional_tests --config test/saml_api_integration/config #### Running Reporting functional tests -prerequisites: -The reporting functional tests use [pdf-image](https://www.npmjs.com/package/pdf-image) to convert PDF's pages to png files for image comparisions between generated reports and baseline reports. -pdf-image requires the system commands `convert`, `gs`, and `pdfinfo` to function. Those can be set up by running the following. - -```sh -//OSX -brew install imagemagick ghostscript poppler - -//Ubutnu -sudo apt-get install imagemagick ghostscript poppler-utils -``` - -To run the reporting functional tests: - -Start the test server -```sh -// Run from the directory KIBANA_HOME/x-pack -node scripts/functional_tests_server -``` - -Start the test runner -```sh -// Run from the directory KIBANA_HOME/x-pack -node ../scripts/functional_test_runner --config test/reporting/configs/chromium_functional.js -``` - -**Note** Configurations from `kibana.dev.yml` are picked up when running the tests. Ensure that `kibana.dev.yml` does not contain any `xpack.reporting` configurations. +See [here](test/reporting/README.md) for more information on running reporting tests. #### Developing functional tests diff --git a/x-pack/plugins/apm/index.js b/x-pack/plugins/apm/index.js index 4929056878dc49c..6b18d589813c30a 100644 --- a/x-pack/plugins/apm/index.js +++ b/x-pack/plugins/apm/index.js @@ -22,7 +22,8 @@ export function apm(kibana) { title: 'APM', description: 'APM for the Elastic Stack', main: 'plugins/apm/index', - icon: 'plugins/apm/icon.svg' + icon: 'plugins/apm/icon.svg', + euiIconType: 'apmApp' }, home: ['plugins/apm/register_feature'], injectDefaultVars(server) { diff --git a/x-pack/plugins/apm/public/components/app/Main/Breadcrumbs.js b/x-pack/plugins/apm/public/components/app/Main/Breadcrumbs.js index 88d66795d05c00f..ba4fd5ed004a1e8 100644 --- a/x-pack/plugins/apm/public/components/app/Main/Breadcrumbs.js +++ b/x-pack/plugins/apm/public/components/app/Main/Breadcrumbs.js @@ -9,12 +9,37 @@ import { withBreadcrumbs } from 'react-router-breadcrumbs-hoc'; import { toQuery } from '../../../utils/url'; import { routes } from './routeConfig'; import { flatten, capitalize } from 'lodash'; +import { set } from 'ui/chrome/services/breadcrumb_state'; class Breadcrumbs extends React.Component { + updateHeaderBreadcrumbs() { + const { _g = '', kuery = '' } = toQuery(this.props.location.search); + const breadcrumbs = this.props.breadcrumbs.map(({ breadcrumb, match }) => ({ + text: breadcrumb, + href: `#${match.url}?_g=${_g}&kuery=${kuery}` + })); + + set(breadcrumbs); + } + + componentDidMount() { + this.updateHeaderBreadcrumbs(); + } + + componentDidUpdate() { + this.updateHeaderBreadcrumbs(); + } + render() { - const { breadcrumbs, location } = this.props; + const { breadcrumbs, location, showPluginBreadcrumbs } = this.props; const { _g = '', kuery = '' } = toQuery(location.search); + // If we don't display plugin breadcrumbs, render null, but continue + // to push updates to header. + if (!showPluginBreadcrumbs) { + return null; + } + return (
{breadcrumbs.map(({ breadcrumb, path, match }, i) => { diff --git a/x-pack/plugins/apm/public/components/app/Main/__test__/Breadcrumbs.test.js b/x-pack/plugins/apm/public/components/app/Main/__test__/Breadcrumbs.test.js index c69c320aace9727..ac2a45350997675 100644 --- a/x-pack/plugins/apm/public/components/app/Main/__test__/Breadcrumbs.test.js +++ b/x-pack/plugins/apm/public/components/app/Main/__test__/Breadcrumbs.test.js @@ -36,7 +36,7 @@ jest.mock( function expectBreadcrumbToMatchSnapshot(route) { const wrapper = mount( - + ); expect( @@ -74,4 +74,13 @@ describe('Breadcrumbs', () => { '/:serviceName/transactions/request/my-transaction-name' ); }); + + it('does not render breadcrumbs when showPluginBreadcrumbs = false', () => { + const wrapper = mount( + + + + ); + expect(wrapper.find('.kuiLocalBreadcrumbs').exists()).toEqual(false); + }); }); diff --git a/x-pack/plugins/apm/public/index.js b/x-pack/plugins/apm/public/index.js index 3eff6c6903d4123..1030555895af53b 100644 --- a/x-pack/plugins/apm/public/index.js +++ b/x-pack/plugins/apm/public/index.js @@ -31,9 +31,13 @@ chrome.setRootTemplate(template); const store = configureStore(); initTimepicker(history, store.dispatch).then(() => { + const showPluginBreadcrumbs = !chrome + .getUiSettingsClient() + .get('k7design', false); + ReactDOM.render( - + , document.getElementById('react-apm-breadcrumbs') ); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js index e955f38136ccab6..364752763cd2767 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js @@ -47,13 +47,15 @@ class ImageUpload extends React.Component { }; } + componentDidMount() { + // keep track of whether or not the component is mounted, to prevent rogue setState calls + this._isMounted = true; + } + componentWillUnmount() { this._isMounted = false; } - // keep track of whether or not the component is mounted, to prevent rogue setState calls - _isMounted = true; - handleUpload = files => { const { onAssetAdd, onValueChange } = this.props; const [upload] = files; diff --git a/x-pack/plugins/canvas/index.js b/x-pack/plugins/canvas/index.js index 8f702ed972e166e..f9353180518acdf 100644 --- a/x-pack/plugins/canvas/index.js +++ b/x-pack/plugins/canvas/index.js @@ -20,6 +20,7 @@ export function canvas(kibana) { title: 'Canvas', description: 'Data driven workpads', icon: 'plugins/canvas/icon.svg', + euiIconType: 'canvasApp', main: 'plugins/canvas/app', }, styleSheetPaths: `${__dirname}/public/style/index.scss`, diff --git a/x-pack/plugins/canvas/public/components/arg_form/arg_form.js b/x-pack/plugins/canvas/public/components/arg_form/arg_form.js index c7b4582d6c76668..594875ed3cbdcc4 100644 --- a/x-pack/plugins/canvas/public/components/arg_form/arg_form.js +++ b/x-pack/plugins/canvas/public/components/arg_form/arg_form.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React from 'react'; +import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { compose, branch, renderComponent } from 'recompose'; import { ErrorBoundary } from '../enhance/error_boundary'; @@ -29,101 +29,112 @@ const branches = [ ]; // This is what is being generated by render() from the Arg class. It is called in FunctionForm -const ArgFormComponent = props => { - const { - argId, - argTypeInstance, - templateProps, - valueMissing, - label, - setLabel, - onValueRemove, - workpad, - renderError, - setRenderError, - resolvedArgValue, - } = props; - - return ( - - {({ error, resetErrorState }) => { - const { template, simpleTemplate } = argTypeInstance.argType; - const hasError = Boolean(error) || renderError; - - const argumentProps = { - ...templateProps, - resolvedArgValue, - defaultValue: argTypeInstance.default, - - renderError: () => { - // TODO: don't do this - // It's an ugly hack to avoid React's render cycle and ensure the error happens on the next tick - // This is important; Otherwise we end up updating state in the middle of a render cycle - Promise.resolve().then(() => { - // Provide templates with a renderError method, and wrap the error in a known error type - // to stop Kibana's window.error from being called - // see window_error_handler.js for details, - setRenderError(true); - }); - }, - error: hasError, - setLabel, - resetErrorState: () => { - resetErrorState(); - setRenderError(false); - }, - label, - workpad, - argId, - }; - - const expandableLabel = Boolean(hasError || template); - - const simpleArg = ( - - - - ); - - const extendedArg = ( -
- -
- ); - - return ( -
- + {({ error, resetErrorState }) => { + const { template, simpleTemplate } = argTypeInstance.argType; + const hasError = Boolean(error) || renderError; + + const argumentProps = { + ...templateProps, + resolvedArgValue, + defaultValue: argTypeInstance.default, + + renderError: () => { + // TODO: don't do this + // It's an ugly hack to avoid React's render cycle and ensure the error happens on the next tick + // This is important; Otherwise we end up updating state in the middle of a render cycle + Promise.resolve().then(() => { + // Provide templates with a renderError method, and wrap the error in a known error type + // to stop Kibana's window.error from being called + // see window_error_handler.js for details, + this._isMounted && setRenderError(true); + }); + }, + error: hasError, + setLabel: label => this._isMounted && setLabel(label), + resetErrorState: () => { + resetErrorState(); + this._isMounted && setRenderError(false); + }, + label, + workpad, + argId, + }; + + const expandableLabel = Boolean(hasError || template); + + const simpleArg = ( + - {extendedArg} - -
- ); - }} -
- ); -}; + + + ); + + const extendedArg = ( +
+ +
+ ); + + return ( +
+ + {extendedArg} + +
+ ); + }} + + ); + } +} ArgFormComponent.propTypes = { argId: PropTypes.string.isRequired, diff --git a/x-pack/plugins/canvas/public/components/page_manager/page_manager.js b/x-pack/plugins/canvas/public/components/page_manager/page_manager.js index aabf086fa0023ce..02d662fd919875e 100644 --- a/x-pack/plugins/canvas/public/components/page_manager/page_manager.js +++ b/x-pack/plugins/canvas/public/components/page_manager/page_manager.js @@ -31,10 +31,13 @@ export class PageManager extends React.PureComponent { }; componentDidMount() { + // keep track of whether or not the component is mounted, to prevent rogue setState calls + this._isMounted = true; + // gives the tray pop animation time to finish setTimeout(() => { this.scrollToActivePage(); - this.setState({ showTrayPop: false }); + this._isMounted && this.setState({ showTrayPop: false }); }, 1000); } @@ -43,6 +46,10 @@ export class PageManager extends React.PureComponent { if (prevProps.selectedPage !== this.props.selectedPage) setTimeout(this.scrollToActivePage, 0); } + componentWillUnmount() { + this._isMounted = false; + } + scrollToActivePage = () => { if (this.activePageRef && this.pageListRef) { const pageOffset = this.activePageRef.offsetLeft; @@ -73,10 +80,10 @@ export class PageManager extends React.PureComponent { }; confirmDelete = pageId => { - this.props.setDeleteId(pageId); + this._isMounted && this.props.setDeleteId(pageId); }; - resetDelete = () => this.props.setDeleteId(null); + resetDelete = () => this._isMounted && this.props.setDeleteId(null); doDelete = () => { const { previousPage, removePage, deleteId, selectedPage } = this.props; diff --git a/x-pack/plugins/canvas/public/components/page_manager/page_manager.scss b/x-pack/plugins/canvas/public/components/page_manager/page_manager.scss index 8261d421b002201..1a57463702759cb 100644 --- a/x-pack/plugins/canvas/public/components/page_manager/page_manager.scss +++ b/x-pack/plugins/canvas/public/components/page_manager/page_manager.scss @@ -88,6 +88,7 @@ @include euiBottomShadowSmall; position: relative; overflow: hidden; + color: $euiTextColor; .canvasPositionable { position: absolute; diff --git a/x-pack/plugins/canvas/public/components/popover/popover.js b/x-pack/plugins/canvas/public/components/popover/popover.js index 19d90de50478b79..89de57aa845d98b 100644 --- a/x-pack/plugins/canvas/public/components/popover/popover.js +++ b/x-pack/plugins/canvas/public/components/popover/popover.js @@ -62,12 +62,15 @@ export class Popover extends Component { return button(handleClick); }; + const appWrapper = document.querySelector('.app-wrapper'); + return ( {children({ closePopover: this.closePopover })} diff --git a/x-pack/plugins/canvas/public/components/workpad_loader/workpad_loader.js b/x-pack/plugins/canvas/public/components/workpad_loader/workpad_loader.js index 8987eead96486b5..11b7549068b031c 100644 --- a/x-pack/plugins/canvas/public/components/workpad_loader/workpad_loader.js +++ b/x-pack/plugins/canvas/public/components/workpad_loader/workpad_loader.js @@ -45,8 +45,8 @@ export class WorkpadLoader extends React.PureComponent { }; state = { - deletingWorkpad: false, createPending: false, + deletingWorkpad: false, sortField: '@timestamp', sortDirection: 'desc', selectedWorkpads: [], @@ -56,6 +56,9 @@ export class WorkpadLoader extends React.PureComponent { async componentDidMount() { // on component load, kick off the workpad search this.props.findWorkpads(); + + // keep track of whether or not the component is mounted, to prevent rogue setState calls + this._isMounted = true; } componentWillReceiveProps(newProps) { @@ -64,25 +67,29 @@ export class WorkpadLoader extends React.PureComponent { if (workpadId !== newProps.workpadId) onClose(); } + componentWillUnmount() { + this._isMounted = false; + } + // create new empty workpad createWorkpad = async () => { this.setState({ createPending: true }); await this.props.createWorkpad(); - this.setState({ createPending: false }); + this._isMounted && this.setState({ createPending: false }); }; // create new workpad from uploaded JSON uploadWorkpad = async workpad => { this.setState({ createPending: true }); await this.props.createWorkpad(workpad); - this.setState({ createPending: false }); + this._isMounted && this.setState({ createPending: false }); }; // clone existing workpad cloneWorkpad = async workpad => { this.setState({ createPending: true }); await this.props.cloneWorkpad(workpad.id); - this.setState({ createPending: false }); + this._isMounted && this.setState({ createPending: false }); }; // Workpad remove methods @@ -92,16 +99,18 @@ export class WorkpadLoader extends React.PureComponent { removeWorkpads = () => { const { selectedWorkpads } = this.state; + this.props.removeWorkpads(selectedWorkpads.map(({ id }) => id)).then(remainingIds => { const remainingWorkpads = remainingIds.length > 0 ? selectedWorkpads.filter(({ id }) => remainingIds.includes(id)) : []; - this.setState({ - deletingWorkpad: false, - selectedWorkpads: remainingWorkpads, - }); + this._isMounted && + this.setState({ + deletingWorkpad: false, + selectedWorkpads: remainingWorkpads, + }); }); }; diff --git a/x-pack/plugins/canvas/public/components/workpad_page/event_handlers.js b/x-pack/plugins/canvas/public/components/workpad_page/event_handlers.js index c95395d91734ca0..b6aa9c8da6328bb 100644 --- a/x-pack/plugins/canvas/public/components/workpad_page/event_handlers.js +++ b/x-pack/plugins/canvas/public/components/workpad_page/event_handlers.js @@ -126,4 +126,5 @@ export const withEventHandlers = withHandlers({ onMouseMove: props => e => handleMouseMove(props.commit, e, props.isEditable), onKeyDown: props => e => handleKeyDown(props.commit, e, props.isEditable, props.remove), onKeyUp: props => e => handleKeyUp(props.commit, e, props.isEditable), + resetHandler: () => () => resetHandler(), }); diff --git a/x-pack/plugins/canvas/public/components/workpad_page/workpad_page.js b/x-pack/plugins/canvas/public/components/workpad_page/workpad_page.js index b94c5b8c2a45f05..fc46820aca56f32 100644 --- a/x-pack/plugins/canvas/public/components/workpad_page/workpad_page.js +++ b/x-pack/plugins/canvas/public/components/workpad_page/workpad_page.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React from 'react'; +import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { ElementWrapper } from '../element_wrapper'; import { AlignmentGuide } from '../alignment_guide'; @@ -14,105 +14,114 @@ import { BorderConnection } from '../border_connection'; import { BorderResizeHandle } from '../border_resize_handle'; // NOTE: the data-shared-* attributes here are used for reporting -export const WorkpadPage = ({ - page, - className, - animationStyle, - elements, - cursor = 'auto', - height, - width, - isEditable, - onDoubleClick, - onKeyDown, - onKeyUp, - onMouseDown, - onMouseMove, - onMouseUp, - onAnimationEnd, -}) => { - return ( -
- {elements - .map(element => { - if (element.type === 'annotation') { - if (!isEditable) return; - const props = { - key: element.id, - type: element.type, - transformMatrix: element.transformMatrix, - width: element.width, - height: element.height, - }; +export class WorkpadPage extends PureComponent { + static propTypes = { + page: PropTypes.shape({ + id: PropTypes.string.isRequired, + style: PropTypes.object, + }).isRequired, + className: PropTypes.string.isRequired, + animationStyle: PropTypes.object.isRequired, + elements: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string.isRequired, + transformMatrix: PropTypes.arrayOf(PropTypes.number).isRequired, + width: PropTypes.number.isRequired, + height: PropTypes.number.isRequired, + type: PropTypes.string, + }) + ).isRequired, + cursor: PropTypes.string, + height: PropTypes.number.isRequired, + width: PropTypes.number.isRequired, + isEditable: PropTypes.bool.isRequired, + onDoubleClick: PropTypes.func, + onKeyDown: PropTypes.func, + onKeyUp: PropTypes.func, + onMouseDown: PropTypes.func, + onMouseMove: PropTypes.func, + onMouseUp: PropTypes.func, + onAnimationEnd: PropTypes.func, + resetHandler: PropTypes.func, + }; - switch (element.subtype) { - case 'alignmentGuide': - return ; - case 'hoverAnnotation': - return ; - case 'rotationHandle': - return ; - case 'resizeHandle': - return ; - case 'resizeConnector': - return ; - default: - return []; - } - } else if (element.subtype !== 'adHocGroup') { - return ; - } - }) - .filter(element => !!element)} -
- ); -}; + componentWillUnmount() { + this.props.resetHandler(); + } -WorkpadPage.propTypes = { - page: PropTypes.shape({ - id: PropTypes.string.isRequired, - style: PropTypes.object, - }).isRequired, - className: PropTypes.string.isRequired, - animationStyle: PropTypes.object.isRequired, - elements: PropTypes.arrayOf( - PropTypes.shape({ - id: PropTypes.string.isRequired, - transformMatrix: PropTypes.arrayOf(PropTypes.number).isRequired, - width: PropTypes.number.isRequired, - height: PropTypes.number.isRequired, - type: PropTypes.string, - }) - ).isRequired, - cursor: PropTypes.string, - height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired, - isEditable: PropTypes.bool.isRequired, - onDoubleClick: PropTypes.func, - onKeyDown: PropTypes.func, - onKeyUp: PropTypes.func, - onMouseDown: PropTypes.func, - onMouseMove: PropTypes.func, - onMouseUp: PropTypes.func, - onAnimationEnd: PropTypes.func, -}; + render() { + const { + page, + className, + animationStyle, + elements, + cursor = 'auto', + height, + width, + isEditable, + onDoubleClick, + onKeyDown, + onKeyUp, + onMouseDown, + onMouseMove, + onMouseUp, + onAnimationEnd, + } = this.props; + + return ( +
+ {elements + .map(element => { + if (element.type === 'annotation') { + if (!isEditable) return; + const props = { + key: element.id, + type: element.type, + transformMatrix: element.transformMatrix, + width: element.width, + height: element.height, + }; + + switch (element.subtype) { + case 'alignmentGuide': + return ; + case 'hoverAnnotation': + return ; + case 'rotationHandle': + return ; + case 'resizeHandle': + return ; + case 'resizeConnector': + return ; + default: + return []; + } + } else if (element.subtype !== 'adHocGroup') { + return ; + } + }) + .filter(element => !!element)} +
+ ); + } +} diff --git a/x-pack/plugins/canvas/public/lib/aeroelastic/config.js b/x-pack/plugins/canvas/public/lib/aeroelastic/config.js index a9fc4072683fa4a..3abc805099d505b 100644 --- a/x-pack/plugins/canvas/public/lib/aeroelastic/config.js +++ b/x-pack/plugins/canvas/public/lib/aeroelastic/config.js @@ -14,7 +14,7 @@ const atopZ = 1000; const depthSelect = true; const devColor = 'magenta'; const groupName = 'group'; -const groupResize = false; +const groupResize = true; const guideDistance = 3; const hoverAnnotationName = 'hoverAnnotation'; const intraGroupManipulation = false; diff --git a/x-pack/plugins/canvas/public/lib/aeroelastic/functional.js b/x-pack/plugins/canvas/public/lib/aeroelastic/functional.js index 4f8967503337aa5..d7ad63032c8a8a2 100644 --- a/x-pack/plugins/canvas/public/lib/aeroelastic/functional.js +++ b/x-pack/plugins/canvas/public/lib/aeroelastic/functional.js @@ -79,7 +79,11 @@ const not = fun => (...args) => !fun(...args); const removeDuplicates = (idFun, a) => a.filter((d, i) => a.findIndex(s => idFun(s) === idFun(d)) === i); +const epsilon = 1 / 1000; +const applyTolerance = d => Math.round(d / epsilon) * epsilon; + module.exports = { + applyTolerance, disjunctiveUnion, flatten, identity, diff --git a/x-pack/plugins/canvas/public/lib/aeroelastic/layout.js b/x-pack/plugins/canvas/public/lib/aeroelastic/layout.js index 06cef83699154e9..91df7d4ab913841 100644 --- a/x-pack/plugins/canvas/public/lib/aeroelastic/layout.js +++ b/x-pack/plugins/canvas/public/lib/aeroelastic/layout.js @@ -28,6 +28,7 @@ const matrix2d = require('./matrix2d'); const config = require('./config'); const { + applyTolerance, disjunctiveUnion, identity, flatten, @@ -904,19 +905,31 @@ function resizeAnnotation(shapes, selectedShapes, shape) { // fixme left active: snap wobble. right active: opposite side wobble. const a = snappedA(properShape); const b = snappedB(properShape); - const resizeVertices = - config.groupResize || properShape.type !== 'group' // todo remove the limitation of no group resize - ? [ - [-1, -1, 315], - [1, -1, 45], - [1, 1, 135], - [-1, 1, 225], // corners - [0, -1, 0], - [1, 0, 90], - [0, 1, 180], - [-1, 0, 270], // edge midpoints - ] - : []; + const groupedShape = shape => + shape.parent === properShape.id && + shape.type !== 'annotation' && + shape.subtype !== config.adHocGroupName; + // fixme broaden resizableChild to other multiples of 90 degrees + const resizableChild = shape => + shallowEqual( + matrix.compositeComponent(shape.localTransformMatrix).map(applyTolerance), + matrix.UNITMATRIX + ); + const allowResize = + properShape.type !== 'group' || + (config.groupResize && shapes.filter(groupedShape).every(resizableChild)); + const resizeVertices = allowResize + ? [ + [-1, -1, 315], + [1, -1, 45], + [1, 1, 135], + [-1, 1, 225], // corners + [0, -1, 0], + [1, 0, 90], + [0, 1, 180], + [-1, 0, 270], // edge midpoints + ] + : []; const resizePoints = resizeVertices.map(resizePointAnnotations(shape.id, a, b)); const connectors = connectorVertices.map(resizeEdgeAnnotations(shape.id, a, b)); return [...resizePoints, ...connectors]; @@ -1160,43 +1173,47 @@ const axisAlignedBoundingBoxShape = shapesToBox => { return aabbShape; }; -const resizeGroup = (shapes, selectedShapes) => { - const extending = shape => { - const children = shapes.filter(s => s.parent === shape.id && s.type !== 'annotation'); - const axisAlignedBoundingBox = getAABB(children); - const { a, b, localTransformMatrix, rigTransform } = projectAABB(axisAlignedBoundingBox); - return { - ...shape, - localTransformMatrix, - a, - b, - rigTransform, - deltaLocalTransformMatrix: matrix.multiply( - shape.localTransformMatrix, - matrix.invert(localTransformMatrix) - ), - }; - }; - const extender = (shapes, shape) => { - if (!shape.parent) return shape; - const parent = shapes.find(s => s.id === shape.parent); +const resizeGroup = (shapes, selectedShapes, elements) => { + if (!elements.length) return { shapes, selectedShapes }; + const e = elements[0]; + if (e.subtype !== 'adHocGroup') return { shapes, selectedShapes }; + if (!e.baseAB) { return { - ...shape, - localTransformMatrix: matrix.multiply( - shape.localTransformMatrix, - parent.deltaLocalTransformMatrix - ), + shapes: shapes.map(s => ({ ...s, childBaseAB: null, baseLocalTransformMatrix: null })), + selectedShapes, }; - }; - const extendingIfNeeded = shape => (isAdHocGroup(shape) ? extending(shape) : shape); - const extenderIfNeeded = (shape, i, shapes) => - isAdHocGroup(shape) || shape.type === 'annotation' ? shape : extender(shapes, shape); - const extendingShapes = shapes.map(extendingIfNeeded); + } + const groupScaleX = e.a / e.baseAB[0]; + const groupScaleY = e.b / e.baseAB[1]; + const groupScale = matrix.scale(groupScaleX, groupScaleY, 1); return { - shapes: extendingShapes.map(extenderIfNeeded), - selectedShapes: selectedShapes - .map(extendingIfNeeded) - .map(d => extenderIfNeeded(d, undefined, extendingShapes)), + shapes: shapes.map(s => { + if (s.parent !== e.id || s.type === 'annotation') return s; + const childBaseAB = s.childBaseAB || [s.a, s.b]; + const impliedScale = matrix.scale(...childBaseAB, 1); + const inverseImpliedScale = matrix.invert(impliedScale); + const baseLocalTransformMatrix = s.baseLocalTransformMatrix || s.localTransformMatrix; + const normalizedBaseLocalTransformMatrix = matrix.multiply( + baseLocalTransformMatrix, + impliedScale + ); + const T = matrix.multiply(groupScale, normalizedBaseLocalTransformMatrix); + const backScaler = groupScale.map(d => Math.abs(d)); + const transformShit = matrix.invert(backScaler); + const abTuple = matrix.mvMultiply(matrix.multiply(backScaler, impliedScale), [1, 1, 1, 1]); + return { + ...s, + localTransformMatrix: matrix.multiply( + T, + matrix.multiply(inverseImpliedScale, transformShit) + ), + a: abTuple[0], + b: abTuple[1], + childBaseAB, + baseLocalTransformMatrix, + }; + }), + selectedShapes, }; }; @@ -1212,8 +1229,10 @@ const getLeafs = (descendCondition, allShapes, shapes) => const grouping = select((shapes, selectedShapes) => { const preexistingAdHocGroups = shapes.filter(isAdHocGroup); - const freshSelectedShapes = shapes.filter(idsMatch(selectedShapes)); - const freshNonSelectedShapes = shapes.filter(not(idsMatch(selectedShapes))); + const matcher = idsMatch(selectedShapes); + const selectedFn = shape => matcher(shape) && shape.type !== 'annotation'; + const freshSelectedShapes = shapes.filter(selectedFn); + const freshNonSelectedShapes = shapes.filter(not(selectedFn)); const someSelectedShapesAreGrouped = selectedShapes.some(isOrBelongsToAdHocGroup); const selectionOutsideGroup = !someSelectedShapesAreGrouped; @@ -1228,16 +1247,16 @@ const grouping = select((shapes, selectedShapes) => { } // preserve the current selection if the sole ad hoc group is being manipulated - if ( - selectedShapes.length === 1 && - contentShapes(shapes, selectedShapes)[0].subtype === 'adHocGroup' - ) - return { shapes, selectedShapes }; - + const elements = contentShapes(shapes, selectedShapes); + if (selectedShapes.length === 1 && elements[0].subtype === 'adHocGroup') { + return config.groupResize + ? resizeGroup(shapes, selectedShapes, elements) + : { shapes, selectedShapes }; + } // group items or extend group bounding box (if enabled) if (selectedShapes.length < 2) { // resize the group if needed (ad-hoc group resize is manipulated) - return config.groupResize ? resizeGroup(shapes, selectedShapes) : { shapes, selectedShapes }; + return { shapes, selectedShapes }; } else { // group together the multiple items const group = axisAlignedBoundingBoxShape(freshSelectedShapes); @@ -1351,9 +1370,9 @@ const nextScene = select( const selectedLeafShapes = getLeafs( shape => shape.subtype === config.adHocGroupName, shapes, - selectionState.shapes.map( - s => (s.type === 'annotation' ? shapes.find(ss => ss.id === s.parent) : s) - ) + selectionState.shapes + .map(s => (s.type === 'annotation' ? shapes.find(ss => ss.id === s.parent) : s)) + .filter(identity) ) .filter(shape => shape.type !== 'annotation') .map(s => s.id); diff --git a/x-pack/plugins/canvas/public/lib/aeroelastic/matrix.js b/x-pack/plugins/canvas/public/lib/aeroelastic/matrix.js index 3760f4fbf906ffd..53c5652c024970e 100644 --- a/x-pack/plugins/canvas/public/lib/aeroelastic/matrix.js +++ b/x-pack/plugins/canvas/public/lib/aeroelastic/matrix.js @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +/*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/ + /** * transpose * @@ -231,9 +233,9 @@ const invert = ([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p]) => { } }; -const translateComponent = a => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, a[12], a[13], a[14], a[15]]; +const translateComponent = a => [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, a[12], a[13], a[14], 1]; -const compositeComponent = ([a, b, c, d, e, f, g, h, i, j, k, l]) => [ +const compositeComponent = ([a, b, c, d, e, f, g, h, i, j, k, l, _m, _n, _o, p]) => [ a, b, c, @@ -249,7 +251,7 @@ const compositeComponent = ([a, b, c, d, e, f, g, h, i, j, k, l]) => [ 0, 0, 0, - 1, + p, ]; const add = ( diff --git a/x-pack/plugins/canvas/public/state/middleware/aeroelastic.js b/x-pack/plugins/canvas/public/state/middleware/aeroelastic.js index ea9f76550bc325e..44c7600bff0542e 100644 --- a/x-pack/plugins/canvas/public/state/middleware/aeroelastic.js +++ b/x-pack/plugins/canvas/public/state/middleware/aeroelastic.js @@ -161,6 +161,11 @@ export const aeroelastic = ({ dispatch, getState }) => { pages.map(p => p.id).forEach(createStore); } + if (action.type === restoreHistory.toString()) { + aero.clearStores(); + action.payload.workpad.pages.map(p => p.id).forEach(createStore); + } + if (action.type === appReady.toString()) { const pages = getPages(getState()); aero.clearStores(); diff --git a/x-pack/plugins/graph/index.js b/x-pack/plugins/graph/index.js index 5950713f582a5a3..b87bd3f37deebcd 100644 --- a/x-pack/plugins/graph/index.js +++ b/x-pack/plugins/graph/index.js @@ -21,6 +21,7 @@ export function graph(kibana) { title: 'Graph', order: 9000, icon: 'plugins/graph/icon.png', + euiIconType: 'graphApp', description: 'Graph exploration', main: 'plugins/graph/app', }, diff --git a/x-pack/plugins/ml/index.js b/x-pack/plugins/ml/index.js index ce511ad3f7d8457..cca3e97bdcd8a18 100644 --- a/x-pack/plugins/ml/index.js +++ b/x-pack/plugins/ml/index.js @@ -37,6 +37,7 @@ export const ml = (kibana) => { title: 'Machine Learning', description: 'Machine Learning for the Elastic Stack', icon: 'plugins/ml/ml.svg', + euiIconType: 'machineLearningApp', main: 'plugins/ml/app', }, hacks: ['plugins/ml/hacks/toggle_app_link_in_nav'], diff --git a/x-pack/plugins/ml/public/components/nav_menu/nav_menu.html b/x-pack/plugins/ml/public/components/nav_menu/nav_menu.html index 3c426a925aa7641..d72d46c9c4babcd 100644 --- a/x-pack/plugins/ml/public/components/nav_menu/nav_menu.html +++ b/x-pack/plugins/ml/public/components/nav_menu/nav_menu.html @@ -1,7 +1,10 @@
-
+
{{ crumb.label }} {{ crumb.label }} diff --git a/x-pack/plugins/ml/public/components/nav_menu/nav_menu.js b/x-pack/plugins/ml/public/components/nav_menu/nav_menu.js index 72686c4a1354676..117a0fdc03b79d2 100644 --- a/x-pack/plugins/ml/public/components/nav_menu/nav_menu.js +++ b/x-pack/plugins/ml/public/components/nav_menu/nav_menu.js @@ -14,7 +14,7 @@ import uiRouter from 'ui/routes'; import { uiModules } from 'ui/modules'; const module = uiModules.get('apps/ml'); -module.directive('mlNavMenu', function () { +module.directive('mlNavMenu', function (breadcrumbState, config) { return { restrict: 'E', transclude: true, @@ -64,6 +64,9 @@ module.directive('mlNavMenu', function () { }); scope.breadcrumbs = breadcrumbs.filter(Boolean); + config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val); + breadcrumbState.set(scope.breadcrumbs.map(b => ({ text: b.label, href: b.url }))); + // when the page loads, focus on the first breadcrumb el.ready(() => { const $crumbs = $('.kuiLocalBreadcrumbs a'); diff --git a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js index c23e75abab0fa13..fc25996d4412364 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js +++ b/x-pack/plugins/ml/public/explorer/explorer_charts/explorer_charts_container_service.js @@ -48,7 +48,11 @@ export function explorerChartsContainerServiceFactory( callback(getDefaultData()); + let requestCount = 0; const anomalyDataChangeListener = function (anomalyRecords, earliestMs, latestMs) { + const newRequestCount = ++requestCount; + requestCount = newRequestCount; + const data = getDefaultData(); const threshold = mlSelectSeverityService.state.get('threshold'); @@ -265,6 +269,11 @@ export function explorerChartsContainerServiceFactory( Promise.all(seriesPromises) .then(response => { + // TODO: Add test to prevent this regression. + // Ignore this response if it's returned by an out of date promise + if (newRequestCount < requestCount) { + return; + } // calculate an overall min/max for all series const processedData = response.map(processChartData); const allDataPoints = _.reduce(processedData, (datapoints, series) => { diff --git a/x-pack/plugins/monitoring/public/directives/main/index.html b/x-pack/plugins/monitoring/public/directives/main/index.html index c48775107dd4c07..96fee7dcbb9cea9 100644 --- a/x-pack/plugins/monitoring/public/directives/main/index.html +++ b/x-pack/plugins/monitoring/public/directives/main/index.html @@ -7,20 +7,24 @@ Breadcrumbs can't be automatically derived because the directive doesn't automatically know to show the Clusters breadcrumb. We recreate the structure and styles manually --> -
-
- - {{ crumb.label }} - +
+
+
+ + {{ crumb.label }} + - - {{ crumb.label }} - + + {{ crumb.label }} + +
diff --git a/x-pack/plugins/monitoring/public/directives/main/index.js b/x-pack/plugins/monitoring/public/directives/main/index.js index a53dfd80d220769..6e255a8bef9773e 100644 --- a/x-pack/plugins/monitoring/public/directives/main/index.js +++ b/x-pack/plugins/monitoring/public/directives/main/index.js @@ -71,7 +71,7 @@ export class MonitoringMainController { } const uiModule = uiModules.get('plugins/monitoring/directives', []); -uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl) => { +uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => { return { restrict: 'E', transclude: true, @@ -80,6 +80,7 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl) => { controllerAs: 'monitoringMain', bindToController: true, link(scope, _element, attributes, controller) { + config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val); controller.setup({ licenseService: license, diff --git a/x-pack/plugins/monitoring/public/services/breadcrumbs_provider.js b/x-pack/plugins/monitoring/public/services/breadcrumbs_provider.js index b3bb157bc6a831f..85264f311728689 100644 --- a/x-pack/plugins/monitoring/public/services/breadcrumbs_provider.js +++ b/x-pack/plugins/monitoring/public/services/breadcrumbs_provider.js @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { set as setBreadcrumbs } from 'ui/chrome/services/breadcrumb_state'; + // Helper for making objects to use in a link element const createCrumb = (url, label, testSubj) => { const crumb = { url, label }; @@ -118,6 +120,8 @@ export function breadcrumbsProvider() { breadcrumbs = breadcrumbs.concat(getApmBreadcrumbs(mainInstance)); } + setBreadcrumbs(breadcrumbs.map(b => ({ text: b.label, href: b.url }))); + return breadcrumbs; }; } diff --git a/x-pack/plugins/monitoring/ui_exports.js b/x-pack/plugins/monitoring/ui_exports.js index eb21475456eaafd..c65496ecda907c1 100644 --- a/x-pack/plugins/monitoring/ui_exports.js +++ b/x-pack/plugins/monitoring/ui_exports.js @@ -16,6 +16,7 @@ export const uiExports = { order: 9002, description: 'Monitoring for Elastic Stack', icon: 'plugins/monitoring/icons/monitoring.svg', + euiIconType: 'monitoringApp', linkToLastSubUrl: false, main: 'plugins/monitoring/monitoring', }, diff --git a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js index 198a4d7dde0f19e..ca1fa44c2591c0a 100644 --- a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js +++ b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js @@ -32,9 +32,9 @@ function generatePdfObservableFn(server) { const screenshotsObservable = screenshotsObservableFactory(server); const captureConcurrency = 1; - const urlScreenshotsObservable = (urls, headers, layout) => { + const urlScreenshotsObservable = (urls, headers, layout, browserTimezone) => { return Rx.from(urls).pipe( - mergeMap(url => screenshotsObservable(url, headers, layout), + mergeMap(url => screenshotsObservable(url, headers, layout, browserTimezone), (outer, inner) => inner, captureConcurrency ) @@ -70,7 +70,7 @@ function generatePdfObservableFn(server) { const layout = createLayout(server, layoutParams); - const screenshots$ = urlScreenshotsObservable(urls, headers, layout); + const screenshots$ = urlScreenshotsObservable(urls, headers, layout, browserTimezone); return screenshots$.pipe( toArray(), diff --git a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/screenshots.js b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/screenshots.js index 57e17f924bb119c..a97d625a46af3fe 100644 --- a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/screenshots.js +++ b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/screenshots.js @@ -223,7 +223,7 @@ export function screenshotsObservableFactory(server) { return screenshots; }; - return function screenshotsObservable(url, headers, layout) { + return function screenshotsObservable(url, headers, layout, browserTimezone) { return Rx.defer(async () => await getPort()).pipe( mergeMap(bridgePort => { @@ -233,6 +233,7 @@ export function screenshotsObservableFactory(server) { viewport: layout.getBrowserViewport(), zoom: layout.getBrowserZoom(), logger, + browserTimezone, }); }), tap(() => logger.debug('Driver factory created')), diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts index ea90e8bf8316d8d..c419cae26340204 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts @@ -36,7 +36,7 @@ export class HeadlessChromiumDriver { this.logger.debug(`HeadlessChromiumDriver:opening url ${url}`); await this.page.setExtraHTTPHeaders(headers); - await this.page.goto(url, { waitUntil: 'networkidle0' }); + await this.page.goto(url, { waitUntil: 'domcontentloaded' }); await this.page.waitFor(waitForSelector); } diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.js b/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.js index 4d5137283ebbae4..b721fb7e76d8b4f 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.js +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.js @@ -27,7 +27,7 @@ export class HeadlessChromiumDriverFactory { type = 'chromium'; - create({ viewport }) { + create({ viewport, browserTimezone }) { return Rx.Observable.create(async observer => { const userDataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'chromium-')); const chromiumArgs = args({ @@ -46,6 +46,9 @@ export class HeadlessChromiumDriverFactory { executablePath: this.binaryPath, ignoreHTTPSErrors: true, args: chromiumArgs, + env: { + TZ: browserTimezone + }, }); page = await chromium.newPage(); diff --git a/x-pack/plugins/searchprofiler/index.js b/x-pack/plugins/searchprofiler/index.js index 0633b460054e536..efbe02dbc33d2d2 100644 --- a/x-pack/plugins/searchprofiler/index.js +++ b/x-pack/plugins/searchprofiler/index.js @@ -24,6 +24,7 @@ export const searchprofiler = (kibana) => { devTools: ['plugins/searchprofiler/app'], hacks: ['plugins/searchprofiler/register'], home: ['plugins/searchprofiler/register_feature'], + styleSheetPaths: `${__dirname}/public/index.scss`, }, init: function (server) { const thisPlugin = this; diff --git a/x-pack/plugins/searchprofiler/public/app.js b/x-pack/plugins/searchprofiler/public/app.js index e3a7e837b1bf8e1..9dde1f173fc3d39 100644 --- a/x-pack/plugins/searchprofiler/public/app.js +++ b/x-pack/plugins/searchprofiler/public/app.js @@ -25,7 +25,6 @@ import { checkForParseErrors } from 'plugins/searchprofiler/app_util.js'; // Styles and templates import 'ui/autoload/all'; -import './less/main.less'; import template from './templates/index.html'; import { defaultQuery } from './templates/default_query'; diff --git a/x-pack/plugins/searchprofiler/public/directives/_directives.scss b/x-pack/plugins/searchprofiler/public/directives/_directives.scss new file mode 100644 index 000000000000000..e3b500510ec78b5 --- /dev/null +++ b/x-pack/plugins/searchprofiler/public/directives/_directives.scss @@ -0,0 +1,145 @@ +.prfDevTool { + + .prfDevTool__panel { + background-color: inherit; + margin: 0; + padding: 0; + border: none; + border-bottom: $euiBorderThin; + } + + .prfDevTool__shardBody { + padding-top: $euiSizeXS; + margin: 0 0 0 $euiSizeXS; + } + + .prfDevTool__panelBody { + padding: $euiSize $euiSizeXS $euiSizeXS; + margin-top: $euiSize; + margin-left: $euiSizeS; + } + + // Profile details treeview + .prfDevTool__shardDetails { + float: left; + margin-bottom: $euiSizeXS; + + .fa { + width: $euiSizeM; + height: $euiSizeM; + cursor: pointer; + } + } + + .prfDevTool__shardDetails--dim { + color: $euiColorDarkShade; + float: right; + text-align: right; + margin-bottom: $euiSizeXS; + } + + .prfDevTool__shard { + margin-top: $euiSizeS; + min-width: 100%; + display: inline-block; + border: none; + } + + .prfDevTool__index { + margin-top: $euiSize; + min-width: 100%; + padding: $euiSizeS; + display: inline-block; + } + + .prfDevTool__tvRow:hover, + .prfDevTool__tvRow--last { + border-bottom: $euiBorderThin; + cursor: pointer; + } + + .prfDevTool__tvRow, + .prfDevTool__tvHeader { + display: table; + width: 100%; + table-layout: fixed; + } + + .prfDevTool__tvHeader { + margin-bottom: $euiSizeS; + + > .prfDevTool__cell { + color: $euiColorDarkShade; + } + } + + .prfDevTool__cell { + display: table-cell; + vertical-align: middle; + text-align: center; + } + + .prfDevTool__detail { + font-style: italic; + font-size: $euiFontSizeXS; + padding-left: $euiSize; + } + + .prfDevTool__description { + background-color: $euiColorEmptyShade; + text-align: left; + + .fa-bars { + padding-left: $euiSizeS; + } + } + + .prfDevTool__time, + .prfDevTool__totalTime { + width: 10%; + } + + .prfDevTool__percentage { + width: 15%; + background-color: $euiColorEmptyShade; + } + + // Progressbar + .prfDevTool__graph { + height: 20px; + border: 1px solid $euiColorMediumShade; + background: linear-gradient(to top, $euiColorLightShade, $euiColorLightestShade 23%); + position: relative; + vertical-align: middle; + margin: $euiSizeXS; + } + + .prfDevTool__graphLabel { + position: absolute; + text-align: center; + width: 100%; + margin: 0; + line-height: $euiFontSizeM; + vertical-align: middle; + font-size: $euiFontSizeXS; + order: 5; + } + + .prfDevTool__bar { + height: 20px; /* Not 30px because the 1px top-border brings it up to 30px to match #graph */ + // SASSTODO This pink color is hardcoded elsewhere in the javascript and in tests, needs an overall redesign + background: rgba(255, 175, 175, .1); + background: linear-gradient(to top, rgba(255, 175, 175, .3) 0%, rgba(255, 175, 175, .6) 100%); + vertical-align: middle; + float: right; + } + + // Breakdown table + .prfDevTool__breakdown { + width:100%; + + td { + padding-right: $euiSizeXS; + } + } +} \ No newline at end of file diff --git a/x-pack/plugins/searchprofiler/public/directives/_index.scss b/x-pack/plugins/searchprofiler/public/directives/_index.scss new file mode 100644 index 000000000000000..67b0c83843688a3 --- /dev/null +++ b/x-pack/plugins/searchprofiler/public/directives/_index.scss @@ -0,0 +1 @@ +@import 'directives'; \ No newline at end of file diff --git a/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html b/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html index e549b249a337b35..901c5bebe353fb0 100644 --- a/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html +++ b/x-pack/plugins/searchprofiler/public/directives/highlight_details/index.html @@ -11,14 +11,14 @@ Self Time

{{detailRow.selfTime | msToPretty:3 }}

Timing Breakdown - +
diff --git a/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html b/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html index 71cf55da82feffc..e8d0db30f51d4aa 100644 --- a/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html +++ b/x-pack/plugins/searchprofiler/public/directives/profile_tree/index.html @@ -1,25 +1,25 @@ -
-
+
+

Cumulative Time: {{index.time[target] | msToPretty: 3}}


-
+

Index: {{index.name}}

-
-
-
-
-
-

{{shard.time[target] | msToPretty: 3}}

+
+
+
+
+
+

{{shard.time[target] | msToPretty: 3}}

-
+
{{breakdown.key}} {{breakdown.time | nsToPretty: 1}} -
-
-

{{breakdown.relative}}%

+
+
+

{{breakdown.relative}}%