diff --git a/docs/api/dashboard/export-dashboard.asciidoc b/docs/api/dashboard/export-dashboard.asciidoc index d33b9603fae73..6d239d755eb0d 100644 --- a/docs/api/dashboard/export-dashboard.asciidoc +++ b/docs/api/dashboard/export-dashboard.asciidoc @@ -18,6 +18,7 @@ experimental[] Export dashboards and corresponding saved objects. `dashboard`:: (Required, array|string) The IDs of the dashboards that you want to export. + To export multiple dashboards, repeat the query parameter. [[dashboard-api-export-response-body]] ==== Response body diff --git a/docs/apm/service-overview.asciidoc b/docs/apm/service-overview.asciidoc index 1afe00806474f..088791e6098e6 100644 --- a/docs/apm/service-overview.asciidoc +++ b/docs/apm/service-overview.asciidoc @@ -20,7 +20,7 @@ image::apm/images/latency.png[Service latency] [[service-traffic-transactions]] === Traffic and transactions -The *Traffic* chart visualizes the average number of transactions per minute for the selected service. +The *Throughput* chart visualizes the average number of transactions per minute for the selected service. The *Transactions* table displays a list of _transaction groups_ for the selected service and includes the latency, traffic, error rate, and the impact for each transaction. @@ -71,7 +71,7 @@ image::apm/images/spans-dependencies.png[Span type duration and dependencies] The *All instances* table displays a list of all the available service instances within the selected time range. Depending on how the service runs, the instance could be a host or a container. The table displays latency, traffic, -errors, CPU usage, and memory usage for each instance. By default, instances are sorted by _Traffic_. +errors, CPU usage, and memory usage for each instance. By default, instances are sorted by _Throughput_. [role="screenshot"] image::apm/images/all-instances.png[All instances] diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index ba2ea98cad5e6..642713e48e833 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -168,10 +168,6 @@ Content is fetched from the remote (https://feeds.elastic.co and https://feeds-s |Create choropleth maps. Display the results of a term-aggregation as e.g. countries, zip-codes, states. -|{kib-repo}blob/{branch}/src/plugins/runtime_fields/README.mdx[runtimeFields] -|The runtime fields plugin provides types and constants for OSS and xpack runtime field related code. - - |{kib-repo}blob/{branch}/src/plugins/saved_objects/README.md[savedObjects] |The savedObjects plugin exposes utilities to manipulate saved objects on the client side. @@ -491,8 +487,8 @@ Elastic. |Welcome to the Kibana rollup plugin! This plugin provides Kibana support for Elasticsearch's rollup feature. Please refer to the Elasticsearch documentation to understand rollup indices and how to create rollup jobs. -|{kib-repo}blob/{branch}/x-pack/plugins/runtime_field_editor/README.md[runtimeFieldEditor] -|Welcome to the home of the runtime field editor! +|{kib-repo}blob/{branch}/x-pack/plugins/runtime_fields/README.md[runtimeFields] +|Welcome to the home of the runtime field editor and everything related to runtime fields! |{kib-repo}blob/{branch}/x-pack/plugins/saved_objects_tagging/README.md[savedObjectsTagging] diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md new file mode 100644 index 0000000000000..4a439a1e91316 --- /dev/null +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) > [ExecutionContext](./kibana-plugin-plugins-expressions-public.executioncontext.md) > [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md) + +## ExecutionContext.isSyncColorsEnabled property + +Returns the state (true\|false) of the sync colors across panels switch. + +Signature: + +```typescript +isSyncColorsEnabled?: () => boolean; +``` diff --git a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.md b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.md index 1c0d10a382abf..901b46f0888d4 100644 --- a/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.md +++ b/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.executioncontext.md @@ -22,6 +22,7 @@ export interface ExecutionContext() => ExecutionContextSearch | Get search context of the expression. | | [getSearchSessionId](./kibana-plugin-plugins-expressions-public.executioncontext.getsearchsessionid.md) | () => string | undefined | Search context in which expression should operate. | | [inspectorAdapters](./kibana-plugin-plugins-expressions-public.executioncontext.inspectoradapters.md) | InspectorAdapters | Adapters for inspector plugin. | +| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-public.executioncontext.issynccolorsenabled.md) | () => boolean | Returns the state (true\|false) of the sync colors across panels switch. | | [types](./kibana-plugin-plugins-expressions-public.executioncontext.types.md) | Record<string, ExpressionType> | A map of available expression types. | | [variables](./kibana-plugin-plugins-expressions-public.executioncontext.variables.md) | Record<string, unknown> | Context variables that can be consumed using var and var_set functions. | diff --git a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md new file mode 100644 index 0000000000000..24f7bb618deb8 --- /dev/null +++ b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) > [ExecutionContext](./kibana-plugin-plugins-expressions-server.executioncontext.md) > [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md) + +## ExecutionContext.isSyncColorsEnabled property + +Returns the state (true\|false) of the sync colors across panels switch. + +Signature: + +```typescript +isSyncColorsEnabled?: () => boolean; +``` diff --git a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.md b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.md index fbf9dc634d563..39018599a2c92 100644 --- a/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.md +++ b/docs/development/plugins/expressions/server/kibana-plugin-plugins-expressions-server.executioncontext.md @@ -22,6 +22,7 @@ export interface ExecutionContext() => ExecutionContextSearch | Get search context of the expression. | | [getSearchSessionId](./kibana-plugin-plugins-expressions-server.executioncontext.getsearchsessionid.md) | () => string | undefined | Search context in which expression should operate. | | [inspectorAdapters](./kibana-plugin-plugins-expressions-server.executioncontext.inspectoradapters.md) | InspectorAdapters | Adapters for inspector plugin. | +| [isSyncColorsEnabled](./kibana-plugin-plugins-expressions-server.executioncontext.issynccolorsenabled.md) | () => boolean | Returns the state (true\|false) of the sync colors across panels switch. | | [types](./kibana-plugin-plugins-expressions-server.executioncontext.types.md) | Record<string, ExpressionType> | A map of available expression types. | | [variables](./kibana-plugin-plugins-expressions-server.executioncontext.variables.md) | Record<string, unknown> | Context variables that can be consumed using var and var_set functions. | diff --git a/docs/discover/kuery.asciidoc b/docs/discover/kuery.asciidoc index feb16190cb34b..8c0012fb6c6bf 100644 --- a/docs/discover/kuery.asciidoc +++ b/docs/discover/kuery.asciidoc @@ -111,13 +111,35 @@ tags:(success and info and security) [discrete] === Range queries -KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types. For example: +KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types. [source,yaml] ------------------- -account_number >= 100 and items_sold <= 200 and @timestamp >= now-5m +account_number >= 100 and items_sold <= 200 ------------------- +[discrete] +=== Date range queries + +Typically, Kibana's <> is sufficient for setting a time range, +but in some cases you might need to search on dates. Include the date range in quotes. + +[source,yaml] +------------------- +@timestamp < "2021-01-02T21:55:59" +------------------- + +[source,yaml] +------------------- +@timestamp < "2021-01" +------------------- + +[source,yaml] +------------------- +@timestamp < "2021" +------------------- + + [discrete] === Exist queries diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index febdf707dce9a..6dd76f782d668 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -231,6 +231,16 @@ This value must be a whole number greater than zero. *Default: `"1000"`* suggestions. This value must be a whole number greater than zero. *Default: `"100000"`* +|=== + +[NOTE] +============ +To reload the logging settings, send a SIGHUP signal to {kib}. +============ + +[cols="2*<"] +|=== + |[[logging-dest]] `logging.dest:` | Enables you to specify a file where {kib} stores log output. *Default: `stdout`* diff --git a/package.json b/package.json index edeeebdddabf1..8d4fec8e93c21 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "@kbn/utils": "link:packages/kbn-utils", "@loaders.gl/core": "^2.3.1", "@loaders.gl/json": "^2.3.1", - "@slack/webhook": "^5.0.0", + "@slack/webhook": "^5.0.4", "@storybook/addons": "^6.0.16", "@turf/along": "6.0.1", "@turf/area": "6.0.1", @@ -170,7 +170,7 @@ "apollo-server-errors": "^2.0.2", "apollo-server-hapi": "^1.3.6", "archiver": "^3.1.1", - "axios": "^0.19.2", + "axios": "^0.21.1", "bluebird": "3.5.5", "brace": "0.11.1", "chalk": "^4.1.0", @@ -181,7 +181,6 @@ "classnames": "2.2.6", "color": "1.0.3", "commander": "^3.0.2", - "compression-webpack-plugin": "^4.0.0", "concat-stream": "1.6.2", "content-disposition": "0.5.3", "core-js": "^3.6.5", @@ -328,7 +327,6 @@ "vinyl": "^2.2.0", "vscode-languageserver": "^5.2.1", "vt-pbf": "^3.1.1", - "webpack": "^4.41.5", "wellknown": "^0.5.0", "whatwg-fetch": "^3.0.0", "xml2js": "^0.4.22", @@ -391,7 +389,7 @@ "@microsoft/api-documenter": "7.7.2", "@microsoft/api-extractor": "7.7.0", "@octokit/rest": "^16.35.0", - "@percy/agent": "^0.26.0", + "@percy/agent": "^0.28.6", "@scant/router": "^0.1.0", "@storybook/addon-a11y": "^6.0.26", "@storybook/addon-actions": "^6.0.26", @@ -490,6 +488,7 @@ "@types/md5": "^2.2.0", "@types/memoize-one": "^4.1.0", "@types/mime": "^2.0.1", + "@types/mime-types": "^2.1.0", "@types/minimatch": "^2.0.29", "@types/mocha": "^7.0.2", "@types/mock-fs": "^4.10.0", @@ -593,16 +592,17 @@ "babel-plugin-require-context-hook": "^1.0.0", "babel-plugin-styled-components": "^1.10.7", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "backport": "5.6.0", + "backport": "^5.6.1", "base64-js": "^1.3.1", "base64url": "^3.0.1", "broadcast-channel": "^3.0.3", "chai": "3.5.0", "chance": "1.0.18", - "chromedriver": "^87.0.0", + "chromedriver": "^87.0.3", "clean-webpack-plugin": "^3.0.0", "cmd-shim": "^2.1.0", "compare-versions": "3.5.1", + "compression-webpack-plugin": "^4.0.0", "constate": "^1.3.2", "copy-to-clipboard": "^3.0.8", "copy-webpack-plugin": "^6.0.2", @@ -836,8 +836,9 @@ "vega-tooltip": "^0.25.0", "venn.js": "0.2.20", "vinyl-fs": "^3.0.3", - "wait-on": "^5.0.1", + "wait-on": "^5.2.1", "watchpack": "^1.6.0", + "webpack": "^4.41.5", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.0", "webpack-merge": "^4.2.2", diff --git a/packages/kbn-es/src/cluster.js b/packages/kbn-es/src/cluster.js index eaf353b3e55d0..176c4304055a6 100644 --- a/packages/kbn-es/src/cluster.js +++ b/packages/kbn-es/src/cluster.js @@ -257,8 +257,9 @@ exports.Cluster = class Cluster { this._log.info(chalk.bold('Starting')); this._log.indent(4); + const esArgs = ['indices.query.bool.max_nested_depth=100'].concat(options.esArgs || []); + // Add to esArgs if ssl is enabled - const esArgs = [].concat(options.esArgs || []); if (this._ssl) { esArgs.push('xpack.security.http.ssl.enabled=true'); esArgs.push(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`); diff --git a/packages/kbn-es/src/integration_tests/cluster.test.js b/packages/kbn-es/src/integration_tests/cluster.test.js index 6229a8add0d24..33bce2932fe2f 100644 --- a/packages/kbn-es/src/integration_tests/cluster.test.js +++ b/packages/kbn-es/src/integration_tests/cluster.test.js @@ -17,12 +17,19 @@ * under the License. */ -const { ToolingLog, ES_P12_PATH, ES_P12_PASSWORD } = require('@kbn/dev-utils'); +const { + ToolingLog, + ES_P12_PATH, + ES_P12_PASSWORD, + createAnyInstanceSerializer, +} = require('@kbn/dev-utils'); const execa = require('execa'); const { Cluster } = require('../cluster'); const { installSource, installSnapshot, installArchive } = require('../install'); const { extractConfigFiles } = require('../utils/extract_config_files'); +expect.addSnapshotSerializer(createAnyInstanceSerializer(ToolingLog)); + jest.mock('../install', () => ({ installSource: jest.fn(), installSnapshot: jest.fn(), @@ -265,8 +272,19 @@ describe('#start(installPath)', () => { const cluster = new Cluster({ log, ssl: false }); await cluster.start(); - const config = extractConfigFiles.mock.calls[0][0]; - expect(config).toHaveLength(0); + expect(extractConfigFiles.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Array [ + "indices.query.bool.max_nested_depth=100", + ], + undefined, + Object { + "log": , + }, + ], + ] + `); }); }); @@ -332,8 +350,19 @@ describe('#run()', () => { const cluster = new Cluster({ log, ssl: false }); await cluster.run(); - const config = extractConfigFiles.mock.calls[0][0]; - expect(config).toHaveLength(0); + expect(extractConfigFiles.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Array [ + "indices.query.bool.max_nested_depth=100", + ], + undefined, + Object { + "log": , + }, + ], + ] + `); }); }); diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 485481e2a7f14..44cc4fdabb25e 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -102,8 +102,7 @@ pageLoadAssetSize: visualizations: 295025 visualize: 57431 watcher: 43598 - runtimeFields: 10000 + runtimeFields: 41752 stackAlerts: 29684 presentationUtil: 28545 - runtimeFieldEditor: 46986 spacesOss: 18817 diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 922159ab555c8..955a375228d55 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -94,7 +94,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cli__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "run", function() { return _cli__WEBPACK_IMPORTED_MODULE_0__["run"]; }); -/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(511); +/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(510); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildProductionProjects"]; }); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248); @@ -106,7 +106,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(251); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformDependencies", function() { return _utils_package_json__WEBPACK_IMPORTED_MODULE_4__["transformDependencies"]; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(510); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(509); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; }); /* @@ -150,7 +150,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(128); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(504); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(503); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(246); /* * Licensed to Elasticsearch B.V. under one or more contributor @@ -2981,16 +2981,20 @@ var ReplaySubject = /*@__PURE__*/ (function (_super) { return _this; } ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) { - var _events = this._events; - _events.push(value); - if (_events.length > this._bufferSize) { - _events.shift(); + if (!this.isStopped) { + var _events = this._events; + _events.push(value); + if (_events.length > this._bufferSize) { + _events.shift(); + } } _super.prototype.next.call(this, value); }; ReplaySubject.prototype.nextTimeWindow = function (value) { - this._events.push(new ReplayEvent(this._getNow(), value)); - this._trimBufferThenGetEvents(); + if (!this.isStopped) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + } _super.prototype.next.call(this, value); }; ReplaySubject.prototype._subscribe = function (subscriber) { @@ -8897,9 +8901,9 @@ exports.ToolingLogCollectingWriter = ToolingLogCollectingWriter; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commands", function() { return commands; }); /* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(129); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(372); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(403); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(404); +/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(371); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(402); +/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(403); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -8942,10 +8946,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(246); /* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(247); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(248); -/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(364); -/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(369); -/* harmony import */ var _utils_yarn_lock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(366); -/* harmony import */ var _utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(370); +/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(363); +/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(368); +/* harmony import */ var _utils_yarn_lock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(365); +/* harmony import */ var _utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(369); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -33849,7 +33853,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(320); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(356); +/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(355); /* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(246); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -33947,13 +33951,13 @@ const childProcess = __webpack_require__(321); const crossSpawn = __webpack_require__(322); const stripFinalNewline = __webpack_require__(335); const npmRunPath = __webpack_require__(336); -const onetime = __webpack_require__(338); -const makeError = __webpack_require__(340); -const normalizeStdio = __webpack_require__(345); -const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__(346); -const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__(347); -const {mergePromise, getSpawnedPromise} = __webpack_require__(354); -const {joinCommand, parseCommand} = __webpack_require__(355); +const onetime = __webpack_require__(337); +const makeError = __webpack_require__(339); +const normalizeStdio = __webpack_require__(344); +const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__(345); +const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__(346); +const {mergePromise, getSpawnedPromise} = __webpack_require__(353); +const {joinCommand, parseCommand} = __webpack_require__(354); const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100; @@ -34358,13 +34362,14 @@ module.exports = parse; const path = __webpack_require__(4); const which = __webpack_require__(325); -const pathKey = __webpack_require__(329)(); +const getPathKey = __webpack_require__(329); function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; const cwd = process.cwd(); const hasCustomCwd = parsed.options.cwd != null; // Worker threads do not have process.chdir() - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; // If a custom `cwd` was specified, we need to change the process cwd // because `which` will do stat calls but does not support a custom cwd @@ -34380,7 +34385,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) { try { resolved = which.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey], + path: env[getPathKey({ env })], pathExt: withoutPathExt ? path.delimiter : undefined, }); } catch (e) { @@ -34932,7 +34937,7 @@ module.exports = input => { "use strict"; const path = __webpack_require__(4); -const pathKey = __webpack_require__(337); +const pathKey = __webpack_require__(329); const npmRunPath = options => { options = { @@ -34985,30 +34990,7 @@ module.exports.env = options => { "use strict"; - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports.default = pathKey; - - -/***/ }), -/* 338 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const mimicFn = __webpack_require__(339); +const mimicFn = __webpack_require__(338); const calledFunctions = new WeakMap(); @@ -35060,7 +35042,7 @@ module.exports.callCount = fn => { /***/ }), -/* 339 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35080,12 +35062,12 @@ module.exports.default = mimicFn; /***/ }), -/* 340 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const {signalsByName} = __webpack_require__(341); +const {signalsByName} = __webpack_require__(340); const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => { if (timedOut) { @@ -35173,14 +35155,14 @@ module.exports = makeError; /***/ }), -/* 341 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports,"__esModule",{value:true});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__webpack_require__(121); -var _signals=__webpack_require__(342); -var _realtime=__webpack_require__(344); +var _signals=__webpack_require__(341); +var _realtime=__webpack_require__(343); @@ -35250,14 +35232,14 @@ const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumb //# sourceMappingURL=main.js.map /***/ }), -/* 342 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=__webpack_require__(121); -var _core=__webpack_require__(343); -var _realtime=__webpack_require__(344); +var _core=__webpack_require__(342); +var _realtime=__webpack_require__(343); @@ -35291,7 +35273,7 @@ return{name,number,description,supported,action,forced,standard}; //# sourceMappingURL=signals.js.map /***/ }), -/* 343 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35570,7 +35552,7 @@ standard:"other"}];exports.SIGNALS=SIGNALS; //# sourceMappingURL=core.js.map /***/ }), -/* 344 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35595,7 +35577,7 @@ const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX; //# sourceMappingURL=realtime.js.map /***/ }), -/* 345 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35654,7 +35636,7 @@ module.exports.node = opts => { /***/ }), -/* 346 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35773,14 +35755,14 @@ module.exports = { /***/ }), -/* 347 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const isStream = __webpack_require__(348); -const getStream = __webpack_require__(349); -const mergeStream = __webpack_require__(353); +const isStream = __webpack_require__(347); +const getStream = __webpack_require__(348); +const mergeStream = __webpack_require__(352); // `input` option const handleInput = (spawned, input) => { @@ -35877,7 +35859,7 @@ module.exports = { /***/ }), -/* 348 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35913,13 +35895,13 @@ module.exports = isStream; /***/ }), -/* 349 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pump = __webpack_require__(350); -const bufferStream = __webpack_require__(352); +const pump = __webpack_require__(349); +const bufferStream = __webpack_require__(351); class MaxBufferError extends Error { constructor() { @@ -35978,11 +35960,11 @@ module.exports.MaxBufferError = MaxBufferError; /***/ }), -/* 350 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { var once = __webpack_require__(162) -var eos = __webpack_require__(351) +var eos = __webpack_require__(350) var fs = __webpack_require__(134) // we only need fs to get the ReadStream and WriteStream prototypes var noop = function () {} @@ -36066,7 +36048,7 @@ module.exports = pump /***/ }), -/* 351 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { var once = __webpack_require__(162); @@ -36166,7 +36148,7 @@ module.exports = eos; /***/ }), -/* 352 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36225,7 +36207,7 @@ module.exports = options => { /***/ }), -/* 353 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36273,7 +36255,7 @@ module.exports = function (/*streams...*/) { /***/ }), -/* 354 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36326,7 +36308,7 @@ module.exports = { /***/ }), -/* 355 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36371,7 +36353,7 @@ module.exports = { /***/ }), -/* 356 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { // Copyright IBM Corp. 2014,2018. All Rights Reserved. @@ -36379,12 +36361,12 @@ module.exports = { // This file is licensed under the Apache License 2.0. // License text available at https://opensource.org/licenses/Apache-2.0 -module.exports = __webpack_require__(357); -module.exports.cli = __webpack_require__(361); +module.exports = __webpack_require__(356); +module.exports.cli = __webpack_require__(360); /***/ }), -/* 357 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36399,9 +36381,9 @@ var stream = __webpack_require__(138); var util = __webpack_require__(112); var fs = __webpack_require__(134); -var through = __webpack_require__(358); -var duplexer = __webpack_require__(359); -var StringDecoder = __webpack_require__(360).StringDecoder; +var through = __webpack_require__(357); +var duplexer = __webpack_require__(358); +var StringDecoder = __webpack_require__(359).StringDecoder; module.exports = Logger; @@ -36590,7 +36572,7 @@ function lineMerger(host) { /***/ }), -/* 358 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(138) @@ -36704,7 +36686,7 @@ function through (write, end, opts) { /***/ }), -/* 359 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(138) @@ -36797,13 +36779,13 @@ function duplex(writer, reader) { /***/ }), -/* 360 */ +/* 359 */ /***/ (function(module, exports) { module.exports = require("string_decoder"); /***/ }), -/* 361 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36814,11 +36796,11 @@ module.exports = require("string_decoder"); -var minimist = __webpack_require__(362); +var minimist = __webpack_require__(361); var path = __webpack_require__(4); -var Logger = __webpack_require__(357); -var pkg = __webpack_require__(363); +var Logger = __webpack_require__(356); +var pkg = __webpack_require__(362); module.exports = cli; @@ -36872,7 +36854,7 @@ function usage($0, p) { /***/ }), -/* 362 */ +/* 361 */ /***/ (function(module, exports) { module.exports = function (args, opts) { @@ -37123,13 +37105,13 @@ function isNumber (x) { /***/ }), -/* 363 */ +/* 362 */ /***/ (function(module) { module.exports = JSON.parse("{\"name\":\"strong-log-transformer\",\"version\":\"2.1.0\",\"description\":\"Stream transformer that prefixes lines with timestamps and other things.\",\"author\":\"Ryan Graham \",\"license\":\"Apache-2.0\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strongloop/strong-log-transformer\"},\"keywords\":[\"logging\",\"streams\"],\"bugs\":{\"url\":\"https://github.com/strongloop/strong-log-transformer/issues\"},\"homepage\":\"https://github.com/strongloop/strong-log-transformer\",\"directories\":{\"test\":\"test\"},\"bin\":{\"sl-log-transformer\":\"bin/sl-log-transformer.js\"},\"main\":\"index.js\",\"scripts\":{\"test\":\"tap --100 test/test-*\"},\"dependencies\":{\"duplexer\":\"^0.1.1\",\"minimist\":\"^1.2.0\",\"through\":\"^2.3.4\"},\"devDependencies\":{\"tap\":\"^12.0.1\"},\"engines\":{\"node\":\">=4\"}}"); /***/ }), -/* 364 */ +/* 363 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -37137,13 +37119,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllChecksums", function() { return getAllChecksums; }); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(134); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(365); +/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(364); /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(320); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(366); +/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(365); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -37342,20 +37324,20 @@ async function getAllChecksums(kbn, log, yarnLock) { } /***/ }), -/* 365 */ +/* 364 */ /***/ (function(module, exports) { module.exports = require("crypto"); /***/ }), -/* 366 */ +/* 365 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readYarnLock", function() { return readYarnLock; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveDepsForProject", function() { return resolveDepsForProject; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(367); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(366); /* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(131); /* @@ -37468,7 +37450,7 @@ function resolveDepsForProject({ } /***/ }), -/* 367 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { module.exports = @@ -39027,7 +39009,7 @@ module.exports = invariant; /* 9 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(365); +module.exports = __webpack_require__(364); /***/ }), /* 10 */, @@ -41351,7 +41333,7 @@ function onceStrict (fn) { /* 63 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(368); +module.exports = __webpack_require__(367); /***/ }), /* 64 */, @@ -47746,13 +47728,13 @@ module.exports = process && support(supportLevel); /******/ ]); /***/ }), -/* 368 */ +/* 367 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 369 */ +/* 368 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47849,13 +47831,13 @@ class BootstrapCacheFile { } /***/ }), -/* 370 */ +/* 369 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateDependencies", function() { return validateDependencies; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(367); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(366); /* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_1__); @@ -47866,7 +47848,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(131); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(246); /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(251); -/* harmony import */ var _projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(371); +/* harmony import */ var _projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(370); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -48058,7 +48040,7 @@ function getDevOnlyProductionDepsTree(kbn, projectName) { } /***/ }), -/* 371 */ +/* 370 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48211,7 +48193,7 @@ function addProjectToTree(tree, pathParts, project) { } /***/ }), -/* 372 */ +/* 371 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48219,7 +48201,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CleanCommand", function() { return CleanCommand; }); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(143); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(373); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(372); /* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); @@ -48319,20 +48301,20 @@ const CleanCommand = { }; /***/ }), -/* 373 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readline = __webpack_require__(374); -const chalk = __webpack_require__(375); -const cliCursor = __webpack_require__(382); -const cliSpinners = __webpack_require__(384); -const logSymbols = __webpack_require__(386); -const stripAnsi = __webpack_require__(395); -const wcwidth = __webpack_require__(397); -const isInteractive = __webpack_require__(401); -const MuteStream = __webpack_require__(402); +const readline = __webpack_require__(373); +const chalk = __webpack_require__(374); +const cliCursor = __webpack_require__(381); +const cliSpinners = __webpack_require__(383); +const logSymbols = __webpack_require__(385); +const stripAnsi = __webpack_require__(394); +const wcwidth = __webpack_require__(396); +const isInteractive = __webpack_require__(400); +const MuteStream = __webpack_require__(401); const TEXT = Symbol('text'); const PREFIX_TEXT = Symbol('prefixText'); @@ -48685,23 +48667,23 @@ module.exports.promise = (action, options) => { /***/ }), -/* 374 */ +/* 373 */ /***/ (function(module, exports) { module.exports = require("readline"); /***/ }), -/* 375 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiStyles = __webpack_require__(376); +const ansiStyles = __webpack_require__(375); const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(120); const { stringReplaceAll, stringEncaseCRLFWithFirstIndex -} = __webpack_require__(380); +} = __webpack_require__(379); // `supportsColor.level` → `ansiStyles.color[name]` mapping const levelMapping = [ @@ -48902,7 +48884,7 @@ const chalkTag = (chalk, ...strings) => { } if (template === undefined) { - template = __webpack_require__(381); + template = __webpack_require__(380); } return template(chalk, parts.join('')); @@ -48931,7 +48913,7 @@ module.exports = chalk; /***/ }), -/* 376 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48977,7 +48959,7 @@ const setLazyProperty = (object, property, get) => { let colorConvert; const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { if (colorConvert === undefined) { - colorConvert = __webpack_require__(377); + colorConvert = __webpack_require__(376); } const offset = isBackground ? 10 : 0; @@ -49102,11 +49084,11 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(115)(module))) /***/ }), -/* 377 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { -const conversions = __webpack_require__(378); -const route = __webpack_require__(379); +const conversions = __webpack_require__(377); +const route = __webpack_require__(378); const convert = {}; @@ -49189,7 +49171,7 @@ module.exports = convert; /***/ }), -/* 378 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ @@ -50034,10 +50016,10 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 379 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { -const conversions = __webpack_require__(378); +const conversions = __webpack_require__(377); /* This function routes a model to all other models. @@ -50137,7 +50119,7 @@ module.exports = function (fromModel) { /***/ }), -/* 380 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50183,7 +50165,7 @@ module.exports = { /***/ }), -/* 381 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50324,12 +50306,12 @@ module.exports = (chalk, temporary) => { /***/ }), -/* 382 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(383); +const restoreCursor = __webpack_require__(382); let isHidden = false; @@ -50366,12 +50348,12 @@ exports.toggle = (force, writableStream) => { /***/ }), -/* 383 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const onetime = __webpack_require__(338); +const onetime = __webpack_require__(337); const signalExit = __webpack_require__(309); module.exports = onetime(() => { @@ -50382,13 +50364,13 @@ module.exports = onetime(() => { /***/ }), -/* 384 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const spinners = Object.assign({}, __webpack_require__(385)); +const spinners = Object.assign({}, __webpack_require__(384)); const spinnersList = Object.keys(spinners); @@ -50406,18 +50388,18 @@ module.exports.default = spinners; /***/ }), -/* 385 */ +/* 384 */ /***/ (function(module) { -module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"dots8Bit\":{\"interval\":80,\"frames\":[\"⠀\",\"⠁\",\"⠂\",\"⠃\",\"⠄\",\"⠅\",\"⠆\",\"⠇\",\"⡀\",\"⡁\",\"⡂\",\"⡃\",\"⡄\",\"⡅\",\"⡆\",\"⡇\",\"⠈\",\"⠉\",\"⠊\",\"⠋\",\"⠌\",\"⠍\",\"⠎\",\"⠏\",\"⡈\",\"⡉\",\"⡊\",\"⡋\",\"⡌\",\"⡍\",\"⡎\",\"⡏\",\"⠐\",\"⠑\",\"⠒\",\"⠓\",\"⠔\",\"⠕\",\"⠖\",\"⠗\",\"⡐\",\"⡑\",\"⡒\",\"⡓\",\"⡔\",\"⡕\",\"⡖\",\"⡗\",\"⠘\",\"⠙\",\"⠚\",\"⠛\",\"⠜\",\"⠝\",\"⠞\",\"⠟\",\"⡘\",\"⡙\",\"⡚\",\"⡛\",\"⡜\",\"⡝\",\"⡞\",\"⡟\",\"⠠\",\"⠡\",\"⠢\",\"⠣\",\"⠤\",\"⠥\",\"⠦\",\"⠧\",\"⡠\",\"⡡\",\"⡢\",\"⡣\",\"⡤\",\"⡥\",\"⡦\",\"⡧\",\"⠨\",\"⠩\",\"⠪\",\"⠫\",\"⠬\",\"⠭\",\"⠮\",\"⠯\",\"⡨\",\"⡩\",\"⡪\",\"⡫\",\"⡬\",\"⡭\",\"⡮\",\"⡯\",\"⠰\",\"⠱\",\"⠲\",\"⠳\",\"⠴\",\"⠵\",\"⠶\",\"⠷\",\"⡰\",\"⡱\",\"⡲\",\"⡳\",\"⡴\",\"⡵\",\"⡶\",\"⡷\",\"⠸\",\"⠹\",\"⠺\",\"⠻\",\"⠼\",\"⠽\",\"⠾\",\"⠿\",\"⡸\",\"⡹\",\"⡺\",\"⡻\",\"⡼\",\"⡽\",\"⡾\",\"⡿\",\"⢀\",\"⢁\",\"⢂\",\"⢃\",\"⢄\",\"⢅\",\"⢆\",\"⢇\",\"⣀\",\"⣁\",\"⣂\",\"⣃\",\"⣄\",\"⣅\",\"⣆\",\"⣇\",\"⢈\",\"⢉\",\"⢊\",\"⢋\",\"⢌\",\"⢍\",\"⢎\",\"⢏\",\"⣈\",\"⣉\",\"⣊\",\"⣋\",\"⣌\",\"⣍\",\"⣎\",\"⣏\",\"⢐\",\"⢑\",\"⢒\",\"⢓\",\"⢔\",\"⢕\",\"⢖\",\"⢗\",\"⣐\",\"⣑\",\"⣒\",\"⣓\",\"⣔\",\"⣕\",\"⣖\",\"⣗\",\"⢘\",\"⢙\",\"⢚\",\"⢛\",\"⢜\",\"⢝\",\"⢞\",\"⢟\",\"⣘\",\"⣙\",\"⣚\",\"⣛\",\"⣜\",\"⣝\",\"⣞\",\"⣟\",\"⢠\",\"⢡\",\"⢢\",\"⢣\",\"⢤\",\"⢥\",\"⢦\",\"⢧\",\"⣠\",\"⣡\",\"⣢\",\"⣣\",\"⣤\",\"⣥\",\"⣦\",\"⣧\",\"⢨\",\"⢩\",\"⢪\",\"⢫\",\"⢬\",\"⢭\",\"⢮\",\"⢯\",\"⣨\",\"⣩\",\"⣪\",\"⣫\",\"⣬\",\"⣭\",\"⣮\",\"⣯\",\"⢰\",\"⢱\",\"⢲\",\"⢳\",\"⢴\",\"⢵\",\"⢶\",\"⢷\",\"⣰\",\"⣱\",\"⣲\",\"⣳\",\"⣴\",\"⣵\",\"⣶\",\"⣷\",\"⢸\",\"⢹\",\"⢺\",\"⢻\",\"⢼\",\"⢽\",\"⢾\",\"⢿\",\"⣸\",\"⣹\",\"⣺\",\"⣻\",\"⣼\",\"⣽\",\"⣾\",\"⣿\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕛 \",\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"material\":{\"interval\":17,\"frames\":[\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███████▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"██████████▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"█████████████▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁██████████████▁▁▁▁\",\"▁▁▁██████████████▁▁▁\",\"▁▁▁▁█████████████▁▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁▁█████████████▁▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁▁███████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁▁█████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]},\"grenade\":{\"interval\":80,\"frames\":[\"، \",\"′ \",\" ´ \",\" ‾ \",\" ⸌\",\" ⸊\",\" |\",\" ⁎\",\" ⁕\",\" ෴ \",\" ⁓\",\" \",\" \",\" \"]},\"point\":{\"interval\":125,\"frames\":[\"∙∙∙\",\"●∙∙\",\"∙●∙\",\"∙∙●\",\"∙∙∙\"]},\"layer\":{\"interval\":150,\"frames\":[\"-\",\"=\",\"≡\"]},\"betaWave\":{\"interval\":80,\"frames\":[\"ρββββββ\",\"βρβββββ\",\"ββρββββ\",\"βββρβββ\",\"ββββρββ\",\"βββββρβ\",\"ββββββρ\"]}}"); +module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"dots8Bit\":{\"interval\":80,\"frames\":[\"⠀\",\"⠁\",\"⠂\",\"⠃\",\"⠄\",\"⠅\",\"⠆\",\"⠇\",\"⡀\",\"⡁\",\"⡂\",\"⡃\",\"⡄\",\"⡅\",\"⡆\",\"⡇\",\"⠈\",\"⠉\",\"⠊\",\"⠋\",\"⠌\",\"⠍\",\"⠎\",\"⠏\",\"⡈\",\"⡉\",\"⡊\",\"⡋\",\"⡌\",\"⡍\",\"⡎\",\"⡏\",\"⠐\",\"⠑\",\"⠒\",\"⠓\",\"⠔\",\"⠕\",\"⠖\",\"⠗\",\"⡐\",\"⡑\",\"⡒\",\"⡓\",\"⡔\",\"⡕\",\"⡖\",\"⡗\",\"⠘\",\"⠙\",\"⠚\",\"⠛\",\"⠜\",\"⠝\",\"⠞\",\"⠟\",\"⡘\",\"⡙\",\"⡚\",\"⡛\",\"⡜\",\"⡝\",\"⡞\",\"⡟\",\"⠠\",\"⠡\",\"⠢\",\"⠣\",\"⠤\",\"⠥\",\"⠦\",\"⠧\",\"⡠\",\"⡡\",\"⡢\",\"⡣\",\"⡤\",\"⡥\",\"⡦\",\"⡧\",\"⠨\",\"⠩\",\"⠪\",\"⠫\",\"⠬\",\"⠭\",\"⠮\",\"⠯\",\"⡨\",\"⡩\",\"⡪\",\"⡫\",\"⡬\",\"⡭\",\"⡮\",\"⡯\",\"⠰\",\"⠱\",\"⠲\",\"⠳\",\"⠴\",\"⠵\",\"⠶\",\"⠷\",\"⡰\",\"⡱\",\"⡲\",\"⡳\",\"⡴\",\"⡵\",\"⡶\",\"⡷\",\"⠸\",\"⠹\",\"⠺\",\"⠻\",\"⠼\",\"⠽\",\"⠾\",\"⠿\",\"⡸\",\"⡹\",\"⡺\",\"⡻\",\"⡼\",\"⡽\",\"⡾\",\"⡿\",\"⢀\",\"⢁\",\"⢂\",\"⢃\",\"⢄\",\"⢅\",\"⢆\",\"⢇\",\"⣀\",\"⣁\",\"⣂\",\"⣃\",\"⣄\",\"⣅\",\"⣆\",\"⣇\",\"⢈\",\"⢉\",\"⢊\",\"⢋\",\"⢌\",\"⢍\",\"⢎\",\"⢏\",\"⣈\",\"⣉\",\"⣊\",\"⣋\",\"⣌\",\"⣍\",\"⣎\",\"⣏\",\"⢐\",\"⢑\",\"⢒\",\"⢓\",\"⢔\",\"⢕\",\"⢖\",\"⢗\",\"⣐\",\"⣑\",\"⣒\",\"⣓\",\"⣔\",\"⣕\",\"⣖\",\"⣗\",\"⢘\",\"⢙\",\"⢚\",\"⢛\",\"⢜\",\"⢝\",\"⢞\",\"⢟\",\"⣘\",\"⣙\",\"⣚\",\"⣛\",\"⣜\",\"⣝\",\"⣞\",\"⣟\",\"⢠\",\"⢡\",\"⢢\",\"⢣\",\"⢤\",\"⢥\",\"⢦\",\"⢧\",\"⣠\",\"⣡\",\"⣢\",\"⣣\",\"⣤\",\"⣥\",\"⣦\",\"⣧\",\"⢨\",\"⢩\",\"⢪\",\"⢫\",\"⢬\",\"⢭\",\"⢮\",\"⢯\",\"⣨\",\"⣩\",\"⣪\",\"⣫\",\"⣬\",\"⣭\",\"⣮\",\"⣯\",\"⢰\",\"⢱\",\"⢲\",\"⢳\",\"⢴\",\"⢵\",\"⢶\",\"⢷\",\"⣰\",\"⣱\",\"⣲\",\"⣳\",\"⣴\",\"⣵\",\"⣶\",\"⣷\",\"⢸\",\"⢹\",\"⢺\",\"⢻\",\"⢼\",\"⢽\",\"⢾\",\"⢿\",\"⣸\",\"⣹\",\"⣺\",\"⣻\",\"⣼\",\"⣽\",\"⣾\",\"⣿\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕛 \",\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"material\":{\"interval\":17,\"frames\":[\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"███████▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"██████████▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"█████████████▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁██████████████▁▁▁▁\",\"▁▁▁██████████████▁▁▁\",\"▁▁▁▁█████████████▁▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁██████████████▁▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁██████████████▁\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁██████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁█████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁████████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁███████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁██████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁████████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\"███████████▁▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"████████████▁▁▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"██████████████▁▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁██████████████▁▁▁▁▁\",\"▁▁▁█████████████▁▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁████████████▁▁▁\",\"▁▁▁▁▁▁███████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\"▁▁▁▁▁▁▁▁▁▁█████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]},\"grenade\":{\"interval\":80,\"frames\":[\"، \",\"′ \",\" ´ \",\" ‾ \",\" ⸌\",\" ⸊\",\" |\",\" ⁎\",\" ⁕\",\" ෴ \",\" ⁓\",\" \",\" \",\" \"]},\"point\":{\"interval\":125,\"frames\":[\"∙∙∙\",\"●∙∙\",\"∙●∙\",\"∙∙●\",\"∙∙∙\"]},\"layer\":{\"interval\":150,\"frames\":[\"-\",\"=\",\"≡\"]},\"betaWave\":{\"interval\":80,\"frames\":[\"ρββββββ\",\"βρβββββ\",\"ββρββββ\",\"βββρβββ\",\"ββββρββ\",\"βββββρβ\",\"ββββββρ\"]},\"aesthetic\":{\"interval\":80,\"frames\":[\"▰▱▱▱▱▱▱\",\"▰▰▱▱▱▱▱\",\"▰▰▰▱▱▱▱\",\"▰▰▰▰▱▱▱\",\"▰▰▰▰▰▱▱\",\"▰▰▰▰▰▰▱\",\"▰▰▰▰▰▰▰\",\"▰▱▱▱▱▱▱\"]}}"); /***/ }), -/* 386 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(387); +const chalk = __webpack_require__(386); const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; @@ -50439,16 +50421,16 @@ module.exports = isSupported ? main : fallbacks; /***/ }), -/* 387 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(265); -const ansiStyles = __webpack_require__(388); -const stdoutColor = __webpack_require__(393).stdout; +const ansiStyles = __webpack_require__(387); +const stdoutColor = __webpack_require__(392).stdout; -const template = __webpack_require__(394); +const template = __webpack_require__(393); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -50674,12 +50656,12 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 388 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(389); +const colorConvert = __webpack_require__(388); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -50847,11 +50829,11 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(115)(module))) /***/ }), -/* 389 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(390); -var route = __webpack_require__(392); +var conversions = __webpack_require__(389); +var route = __webpack_require__(391); var convert = {}; @@ -50931,11 +50913,11 @@ module.exports = convert; /***/ }), -/* 390 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(391); +var cssKeywords = __webpack_require__(390); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -51805,7 +51787,7 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 391 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51964,10 +51946,10 @@ module.exports = { /***/ }), -/* 392 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(390); +var conversions = __webpack_require__(389); /* this function routes a model to all other models. @@ -52067,7 +52049,7 @@ module.exports = function (fromModel) { /***/ }), -/* 393 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52205,7 +52187,7 @@ module.exports = { /***/ }), -/* 394 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52340,18 +52322,18 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 395 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(396); +const ansiRegex = __webpack_require__(395); module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; /***/ }), -/* 396 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52368,14 +52350,14 @@ module.exports = ({onlyFirst = false} = {}) => { /***/ }), -/* 397 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var defaults = __webpack_require__(398) -var combining = __webpack_require__(400) +var defaults = __webpack_require__(397) +var combining = __webpack_require__(399) var DEFAULTS = { nul: 0, @@ -52474,10 +52456,10 @@ function bisearch(ucs) { /***/ }), -/* 398 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { -var clone = __webpack_require__(399); +var clone = __webpack_require__(398); module.exports = function(options, defaults) { options = options || {}; @@ -52492,7 +52474,7 @@ module.exports = function(options, defaults) { }; /***/ }), -/* 399 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { var clone = (function() { @@ -52664,7 +52646,7 @@ if ( true && module.exports) { /***/ }), -/* 400 */ +/* 399 */ /***/ (function(module, exports) { module.exports = [ @@ -52720,7 +52702,7 @@ module.exports = [ /***/ }), -/* 401 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52736,7 +52718,7 @@ module.exports = ({stream = process.stdout} = {}) => { /***/ }), -/* 402 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(138) @@ -52887,7 +52869,7 @@ MuteStream.prototype.close = proxy('close') /***/ }), -/* 403 */ +/* 402 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52948,7 +52930,7 @@ const RunCommand = { }; /***/ }), -/* 404 */ +/* 403 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52958,7 +52940,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246); /* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(247); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(248); -/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(405); +/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(404); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -53044,14 +53026,14 @@ const WatchCommand = { }; /***/ }), -/* 405 */ +/* 404 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntilWatchIsReady", function() { return waitUntilWatchIsReady; }); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8); -/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(406); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(405); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -53118,141 +53100,141 @@ function waitUntilWatchIsReady(stream, opts = {}) { } /***/ }), -/* 406 */ +/* 405 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(407); +/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(406); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; }); -/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(408); +/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(407); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; }); -/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(409); +/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(408); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; }); -/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(410); +/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(409); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; }); -/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(411); +/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(410); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; }); -/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(412); +/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(411); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; }); -/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(413); +/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(412); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; }); -/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(414); +/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(413); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; }); -/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(415); +/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(414); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; }); -/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(416); +/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(415); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; }); -/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(417); +/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(416); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; }); /* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; }); -/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(418); +/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(417); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; }); -/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(419); +/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(418); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; }); -/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(420); +/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(419); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; }); -/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(421); +/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(420); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; }); -/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(422); +/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(421); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; }); -/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(423); +/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(422); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; }); -/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(424); +/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(423); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; }); -/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(426); +/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(425); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; }); -/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(427); +/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(426); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; }); -/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(428); +/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(427); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; }); -/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(429); +/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(428); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; }); -/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(430); +/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(429); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; }); -/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(431); +/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(430); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; }); -/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(434); +/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(433); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; }); -/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(435); +/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(434); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; }); -/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(436); +/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(435); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; }); -/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(437); +/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(436); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; }); -/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(438); +/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(437); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; }); /* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(105); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; }); -/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(439); +/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(438); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; }); -/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(440); +/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(439); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; }); -/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(441); +/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(440); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; }); -/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(442); +/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(441); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; }); -/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(443); +/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(442); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; }); -/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(444); +/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(443); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; }); -/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(445); +/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(444); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; }); /* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(66); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; }); -/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(447); +/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(446); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; }); -/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(448); +/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(447); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; }); -/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(449); +/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(448); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; }); -/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(452); +/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(451); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; }); /* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(81); @@ -53263,175 +53245,175 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"]; }); -/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(453); +/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(452); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; }); -/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(454); +/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(453); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; }); -/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(455); +/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(454); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; }); -/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(456); +/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(455); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; }); /* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(41); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; }); -/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(457); +/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(456); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; }); -/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(458); +/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(457); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; }); -/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(459); +/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(458); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; }); -/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(460); +/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(459); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; }); -/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(461); +/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(460); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; }); -/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(462); +/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(461); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; }); -/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(463); +/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(462); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; }); -/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(464); +/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(463); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; }); -/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(465); +/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(464); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; }); -/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(450); +/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(449); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; }); -/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(466); +/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(465); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; }); -/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(467); +/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(466); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; }); -/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(468); +/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(467); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; }); -/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(469); +/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(468); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; }); /* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(30); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; }); -/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(470); +/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(469); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; }); -/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(471); +/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(470); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; }); -/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(451); +/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(450); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; }); -/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(472); +/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(471); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; }); -/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(473); +/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(472); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; }); -/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(474); +/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(473); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; }); -/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(475); +/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(474); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; }); -/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(476); +/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(475); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; }); -/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(477); +/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(476); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; }); -/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(478); +/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(477); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; }); -/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(479); +/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(478); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; }); -/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(480); +/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(479); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; }); -/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(481); +/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(480); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; }); -/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(483); +/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(482); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; }); -/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(484); +/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(483); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; }); -/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(485); +/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(484); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; }); -/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(433); +/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(432); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; }); -/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(446); +/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(445); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; }); -/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(486); +/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(485); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; }); -/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(487); +/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(486); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; }); -/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(488); +/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(487); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; }); -/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(489); +/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(488); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; }); -/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(490); +/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(489); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; }); -/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(432); +/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(431); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; }); -/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(491); +/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(490); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; }); -/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(492); +/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(491); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; }); -/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(493); +/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(492); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; }); -/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(494); +/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(493); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; }); -/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(495); +/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(494); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; }); -/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(496); +/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(495); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; }); -/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(497); +/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(496); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; }); -/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(498); +/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(497); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; }); -/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(499); +/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(498); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; }); -/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(500); +/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(499); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; }); -/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(501); +/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(500); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; }); -/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(502); +/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(501); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; }); -/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(503); +/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(502); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ @@ -53542,7 +53524,7 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 407 */ +/* 406 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53621,14 +53603,14 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 408 */ +/* 407 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); -/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(407); +/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(406); /* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(108); /** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */ @@ -53644,7 +53626,7 @@ function auditTime(duration, scheduler) { /***/ }), -/* 409 */ +/* 408 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53691,7 +53673,7 @@ var BufferSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 410 */ +/* 409 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53792,7 +53774,7 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 411 */ +/* 410 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -53953,7 +53935,7 @@ function dispatchBufferClose(arg) { /***/ }), -/* 412 */ +/* 411 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54072,7 +54054,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 413 */ +/* 412 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54165,7 +54147,7 @@ var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 414 */ +/* 413 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54225,7 +54207,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 415 */ +/* 414 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54241,7 +54223,7 @@ function combineAll(project) { /***/ }), -/* 416 */ +/* 415 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54273,7 +54255,7 @@ function combineLatest() { /***/ }), -/* 417 */ +/* 416 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54293,7 +54275,7 @@ function concat() { /***/ }), -/* 418 */ +/* 417 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54309,13 +54291,13 @@ function concatMap(project, resultSelector) { /***/ }), -/* 419 */ +/* 418 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; }); -/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(418); +/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(417); /** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */ function concatMapTo(innerObservable, resultSelector) { @@ -54325,7 +54307,7 @@ function concatMapTo(innerObservable, resultSelector) { /***/ }), -/* 420 */ +/* 419 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54390,7 +54372,7 @@ var CountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 421 */ +/* 420 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54475,7 +54457,7 @@ var DebounceSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 422 */ +/* 421 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54551,7 +54533,7 @@ function dispatchNext(subscriber) { /***/ }), -/* 423 */ +/* 422 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54601,7 +54583,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 424 */ +/* 423 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54609,7 +54591,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(425); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(424); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */ @@ -54708,7 +54690,7 @@ var DelayMessage = /*@__PURE__*/ (function () { /***/ }), -/* 425 */ +/* 424 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54722,7 +54704,7 @@ function isDate(value) { /***/ }), -/* 426 */ +/* 425 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54868,7 +54850,7 @@ var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 427 */ +/* 426 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54906,7 +54888,7 @@ var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 428 */ +/* 427 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54982,7 +54964,7 @@ var DistinctSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 429 */ +/* 428 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55053,13 +55035,13 @@ var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 430 */ +/* 429 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); -/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(429); +/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(428); /** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */ function distinctUntilKeyChanged(key, compare) { @@ -55069,7 +55051,7 @@ function distinctUntilKeyChanged(key, compare) { /***/ }), -/* 431 */ +/* 430 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55077,9 +55059,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(432); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(423); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(433); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(431); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(422); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(432); /** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */ @@ -55101,7 +55083,7 @@ function elementAt(index, defaultValue) { /***/ }), -/* 432 */ +/* 431 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55167,7 +55149,7 @@ function defaultErrorFactory() { /***/ }), -/* 433 */ +/* 432 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55229,7 +55211,7 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 434 */ +/* 433 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55251,7 +55233,7 @@ function endWith() { /***/ }), -/* 435 */ +/* 434 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55313,7 +55295,7 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 436 */ +/* 435 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55367,7 +55349,7 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 437 */ +/* 436 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55461,7 +55443,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 438 */ +/* 437 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55573,7 +55555,7 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 439 */ +/* 438 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55611,7 +55593,7 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 440 */ +/* 439 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55683,13 +55665,13 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 441 */ +/* 440 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); -/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(440); +/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(439); /** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */ function findIndex(predicate, thisArg) { @@ -55699,7 +55681,7 @@ function findIndex(predicate, thisArg) { /***/ }), -/* 442 */ +/* 441 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55707,9 +55689,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(433); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(423); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(432); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(432); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(422); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(431); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25); /** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -55726,7 +55708,7 @@ function first(predicate, defaultValue) { /***/ }), -/* 443 */ +/* 442 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55763,7 +55745,7 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 444 */ +/* 443 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55807,7 +55789,7 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 445 */ +/* 444 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55815,9 +55797,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(446); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(432); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(423); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(445); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(431); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(422); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25); /** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -55834,7 +55816,7 @@ function last(predicate, defaultValue) { /***/ }), -/* 446 */ +/* 445 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55911,7 +55893,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 447 */ +/* 446 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55950,7 +55932,7 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 448 */ +/* 447 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56000,13 +55982,13 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 449 */ +/* 448 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(450); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(449); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function max(comparer) { @@ -56019,15 +56001,15 @@ function max(comparer) { /***/ }), -/* 450 */ +/* 449 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(451); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(446); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(423); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(450); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(445); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(422); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24); /** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ @@ -56048,7 +56030,7 @@ function reduce(accumulator, seed) { /***/ }), -/* 451 */ +/* 450 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56130,7 +56112,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 452 */ +/* 451 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56150,7 +56132,7 @@ function merge() { /***/ }), -/* 453 */ +/* 452 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56175,7 +56157,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) { /***/ }), -/* 454 */ +/* 453 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56284,13 +56266,13 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 455 */ +/* 454 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(450); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(449); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function min(comparer) { @@ -56303,7 +56285,7 @@ function min(comparer) { /***/ }), -/* 456 */ +/* 455 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56352,7 +56334,7 @@ var MulticastOperator = /*@__PURE__*/ (function () { /***/ }), -/* 457 */ +/* 456 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56442,7 +56424,7 @@ var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 458 */ +/* 457 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56490,7 +56472,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 459 */ +/* 458 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56513,7 +56495,7 @@ function partition(predicate, thisArg) { /***/ }), -/* 460 */ +/* 459 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56553,14 +56535,14 @@ function plucker(props, length) { /***/ }), -/* 461 */ +/* 460 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(456); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(455); /** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */ @@ -56573,14 +56555,14 @@ function publish(selector) { /***/ }), -/* 462 */ +/* 461 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); /* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(456); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(455); /** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */ @@ -56591,14 +56573,14 @@ function publishBehavior(value) { /***/ }), -/* 463 */ +/* 462 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; }); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(456); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(455); /** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */ @@ -56609,14 +56591,14 @@ function publishLast() { /***/ }), -/* 464 */ +/* 463 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(456); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(455); /** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */ @@ -56632,7 +56614,7 @@ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { /***/ }), -/* 465 */ +/* 464 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56659,7 +56641,7 @@ function race() { /***/ }), -/* 466 */ +/* 465 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56724,7 +56706,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 467 */ +/* 466 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56818,7 +56800,7 @@ var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 468 */ +/* 467 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56871,7 +56853,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 469 */ +/* 468 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56957,7 +56939,7 @@ var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 470 */ +/* 469 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57012,7 +56994,7 @@ var SampleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 471 */ +/* 470 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57072,7 +57054,7 @@ function dispatchNotification(state) { /***/ }), -/* 472 */ +/* 471 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57195,13 +57177,13 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 473 */ +/* 472 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; }); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(456); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(455); /* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27); /** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */ @@ -57218,7 +57200,7 @@ function share() { /***/ }), -/* 474 */ +/* 473 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57287,7 +57269,7 @@ function shareReplayOperator(_a) { /***/ }), -/* 475 */ +/* 474 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57367,7 +57349,7 @@ var SingleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 476 */ +/* 475 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57409,7 +57391,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 477 */ +/* 476 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57471,7 +57453,7 @@ var SkipLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 478 */ +/* 477 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57528,7 +57510,7 @@ var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 479 */ +/* 478 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57584,7 +57566,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 480 */ +/* 479 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57613,13 +57595,13 @@ function startWith() { /***/ }), -/* 481 */ +/* 480 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; }); -/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(482); +/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(481); /** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */ function subscribeOn(scheduler, delay) { @@ -57644,7 +57626,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () { /***/ }), -/* 482 */ +/* 481 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57708,13 +57690,13 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /***/ }), -/* 483 */ +/* 482 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(484); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(483); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25); /** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */ @@ -57726,7 +57708,7 @@ function switchAll() { /***/ }), -/* 484 */ +/* 483 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57814,13 +57796,13 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 485 */ +/* 484 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(484); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(483); /** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */ function switchMapTo(innerObservable, resultSelector) { @@ -57830,7 +57812,7 @@ function switchMapTo(innerObservable, resultSelector) { /***/ }), -/* 486 */ +/* 485 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57878,7 +57860,7 @@ var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 487 */ +/* 486 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57946,7 +57928,7 @@ var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 488 */ +/* 487 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58034,7 +58016,7 @@ var TapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 489 */ +/* 488 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58136,7 +58118,7 @@ var ThrottleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 490 */ +/* 489 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58145,7 +58127,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55); -/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(489); +/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(488); /** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */ @@ -58234,7 +58216,7 @@ function dispatchNext(arg) { /***/ }), -/* 491 */ +/* 490 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58242,7 +58224,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(451); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(450); /* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -58278,7 +58260,7 @@ var TimeInterval = /*@__PURE__*/ (function () { /***/ }), -/* 492 */ +/* 491 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58286,7 +58268,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); /* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64); -/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(493); +/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(492); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49); /** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */ @@ -58303,7 +58285,7 @@ function timeout(due, scheduler) { /***/ }), -/* 493 */ +/* 492 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58311,7 +58293,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(425); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(424); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_innerSubscribe PURE_IMPORTS_END */ @@ -58382,7 +58364,7 @@ var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 494 */ +/* 493 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58412,13 +58394,13 @@ var Timestamp = /*@__PURE__*/ (function () { /***/ }), -/* 495 */ +/* 494 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(450); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(449); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function toArrayReducer(arr, item, index) { @@ -58435,7 +58417,7 @@ function toArray() { /***/ }), -/* 496 */ +/* 495 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58513,7 +58495,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 497 */ +/* 496 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58603,7 +58585,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 498 */ +/* 497 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58773,7 +58755,7 @@ function dispatchWindowClose(state) { /***/ }), -/* 499 */ +/* 498 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58916,7 +58898,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 500 */ +/* 499 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59013,7 +58995,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 501 */ +/* 500 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59108,7 +59090,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 502 */ +/* 501 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59130,7 +59112,7 @@ function zip() { /***/ }), -/* 503 */ +/* 502 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59146,7 +59128,7 @@ function zipAll(project) { /***/ }), -/* 504 */ +/* 503 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59155,8 +59137,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(249); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246); /* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248); -/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(371); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(505); +/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(370); +/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(504); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -59238,7 +59220,7 @@ function toArray(value) { } /***/ }), -/* 505 */ +/* 504 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59246,13 +59228,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kibana", function() { return Kibana; }); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(506); +/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(505); /* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(366); +/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(365); /* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(248); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(510); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(509); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -59414,15 +59396,15 @@ class Kibana { } /***/ }), -/* 506 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const minimatch = __webpack_require__(150); -const arrayUnion = __webpack_require__(507); -const arrayDiffer = __webpack_require__(508); -const arrify = __webpack_require__(509); +const arrayUnion = __webpack_require__(506); +const arrayDiffer = __webpack_require__(507); +const arrify = __webpack_require__(508); module.exports = (list, patterns, options = {}) => { list = arrify(list); @@ -59446,7 +59428,7 @@ module.exports = (list, patterns, options = {}) => { /***/ }), -/* 507 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59458,7 +59440,7 @@ module.exports = (...arguments_) => { /***/ }), -/* 508 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59473,7 +59455,7 @@ module.exports = arrayDiffer; /***/ }), -/* 509 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59503,7 +59485,7 @@ module.exports = arrify; /***/ }), -/* 510 */ +/* 509 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59573,12 +59555,12 @@ function getProjectPaths({ } /***/ }), -/* 511 */ +/* 510 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(512); +/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(511); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _build_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildProductionProjects"]; }); /* @@ -59602,19 +59584,19 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 512 */ +/* 511 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return buildProductionProjects; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(513); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(512); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(510); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(509); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(131); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(246); /* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(251); @@ -59751,7 +59733,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { } /***/ }), -/* 513 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59759,14 +59741,14 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { const EventEmitter = __webpack_require__(156); const path = __webpack_require__(4); const os = __webpack_require__(121); -const pMap = __webpack_require__(514); -const arrify = __webpack_require__(509); -const globby = __webpack_require__(515); -const hasGlob = __webpack_require__(715); -const cpFile = __webpack_require__(717); -const junk = __webpack_require__(727); -const pFilter = __webpack_require__(728); -const CpyError = __webpack_require__(730); +const pMap = __webpack_require__(513); +const arrify = __webpack_require__(508); +const globby = __webpack_require__(514); +const hasGlob = __webpack_require__(714); +const cpFile = __webpack_require__(716); +const junk = __webpack_require__(726); +const pFilter = __webpack_require__(727); +const CpyError = __webpack_require__(729); const defaultOptions = { ignoreJunk: true @@ -59917,7 +59899,7 @@ module.exports = (source, destination, { /***/ }), -/* 514 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60005,17 +59987,17 @@ module.exports = async ( /***/ }), -/* 515 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const arrayUnion = __webpack_require__(516); +const arrayUnion = __webpack_require__(515); const glob = __webpack_require__(147); -const fastGlob = __webpack_require__(518); -const dirGlob = __webpack_require__(708); -const gitignore = __webpack_require__(711); +const fastGlob = __webpack_require__(517); +const dirGlob = __webpack_require__(707); +const gitignore = __webpack_require__(710); const DEFAULT_FILTER = () => false; @@ -60160,12 +60142,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 516 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(517); +var arrayUniq = __webpack_require__(516); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -60173,7 +60155,7 @@ module.exports = function () { /***/ }), -/* 517 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60242,10 +60224,10 @@ if ('Set' in global) { /***/ }), -/* 518 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { -const pkg = __webpack_require__(519); +const pkg = __webpack_require__(518); module.exports = pkg.async; module.exports.default = pkg.async; @@ -60258,19 +60240,19 @@ module.exports.generateTasks = pkg.generateTasks; /***/ }), -/* 519 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var optionsManager = __webpack_require__(520); -var taskManager = __webpack_require__(521); -var reader_async_1 = __webpack_require__(679); -var reader_stream_1 = __webpack_require__(703); -var reader_sync_1 = __webpack_require__(704); -var arrayUtils = __webpack_require__(706); -var streamUtils = __webpack_require__(707); +var optionsManager = __webpack_require__(519); +var taskManager = __webpack_require__(520); +var reader_async_1 = __webpack_require__(678); +var reader_stream_1 = __webpack_require__(702); +var reader_sync_1 = __webpack_require__(703); +var arrayUtils = __webpack_require__(705); +var streamUtils = __webpack_require__(706); /** * Synchronous API. */ @@ -60336,7 +60318,7 @@ function isString(source) { /***/ }), -/* 520 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60374,13 +60356,13 @@ exports.prepare = prepare; /***/ }), -/* 521 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var patternUtils = __webpack_require__(522); +var patternUtils = __webpack_require__(521); /** * Generate tasks based on parent directory of each pattern. */ @@ -60471,16 +60453,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 522 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var globParent = __webpack_require__(523); +var globParent = __webpack_require__(522); var isGlob = __webpack_require__(172); -var micromatch = __webpack_require__(526); +var micromatch = __webpack_require__(525); var GLOBSTAR = '**'; /** * Return true for static pattern. @@ -60626,15 +60608,15 @@ exports.matchAny = matchAny; /***/ }), -/* 523 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(4); -var isglob = __webpack_require__(524); -var pathDirname = __webpack_require__(525); +var isglob = __webpack_require__(523); +var pathDirname = __webpack_require__(524); var isWin32 = __webpack_require__(121).platform() === 'win32'; module.exports = function globParent(str) { @@ -60657,7 +60639,7 @@ module.exports = function globParent(str) { /***/ }), -/* 524 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -60688,7 +60670,7 @@ module.exports = function isGlob(str) { /***/ }), -/* 525 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60838,7 +60820,7 @@ module.exports.win32 = win32; /***/ }), -/* 526 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60849,18 +60831,18 @@ module.exports.win32 = win32; */ var util = __webpack_require__(112); -var braces = __webpack_require__(527); -var toRegex = __webpack_require__(528); -var extend = __webpack_require__(645); +var braces = __webpack_require__(526); +var toRegex = __webpack_require__(527); +var extend = __webpack_require__(644); /** * Local dependencies */ -var compilers = __webpack_require__(647); -var parsers = __webpack_require__(674); -var cache = __webpack_require__(675); -var utils = __webpack_require__(676); +var compilers = __webpack_require__(646); +var parsers = __webpack_require__(673); +var cache = __webpack_require__(674); +var utils = __webpack_require__(675); var MAX_LENGTH = 1024 * 64; /** @@ -61722,7 +61704,7 @@ module.exports = micromatch; /***/ }), -/* 527 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61732,18 +61714,18 @@ module.exports = micromatch; * Module dependencies */ -var toRegex = __webpack_require__(528); -var unique = __webpack_require__(550); -var extend = __webpack_require__(551); +var toRegex = __webpack_require__(527); +var unique = __webpack_require__(549); +var extend = __webpack_require__(550); /** * Local dependencies */ -var compilers = __webpack_require__(553); -var parsers = __webpack_require__(568); -var Braces = __webpack_require__(572); -var utils = __webpack_require__(554); +var compilers = __webpack_require__(552); +var parsers = __webpack_require__(567); +var Braces = __webpack_require__(571); +var utils = __webpack_require__(553); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -62047,16 +62029,16 @@ module.exports = braces; /***/ }), -/* 528 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var safe = __webpack_require__(529); -var define = __webpack_require__(535); -var extend = __webpack_require__(543); -var not = __webpack_require__(547); +var safe = __webpack_require__(528); +var define = __webpack_require__(534); +var extend = __webpack_require__(542); +var not = __webpack_require__(546); var MAX_LENGTH = 1024 * 64; /** @@ -62209,10 +62191,10 @@ module.exports.makeRe = makeRe; /***/ }), -/* 529 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(530); +var parse = __webpack_require__(529); var types = parse.types; module.exports = function (re, opts) { @@ -62258,13 +62240,13 @@ function isRegExp (x) { /***/ }), -/* 530 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(531); -var types = __webpack_require__(532); -var sets = __webpack_require__(533); -var positions = __webpack_require__(534); +var util = __webpack_require__(530); +var types = __webpack_require__(531); +var sets = __webpack_require__(532); +var positions = __webpack_require__(533); module.exports = function(regexpStr) { @@ -62546,11 +62528,11 @@ module.exports.types = types; /***/ }), -/* 531 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(532); -var sets = __webpack_require__(533); +var types = __webpack_require__(531); +var sets = __webpack_require__(532); // All of these are private and only used by randexp. @@ -62663,7 +62645,7 @@ exports.error = function(regexp, msg) { /***/ }), -/* 532 */ +/* 531 */ /***/ (function(module, exports) { module.exports = { @@ -62679,10 +62661,10 @@ module.exports = { /***/ }), -/* 533 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(532); +var types = __webpack_require__(531); var INTS = function() { return [{ type: types.RANGE , from: 48, to: 57 }]; @@ -62767,10 +62749,10 @@ exports.anyChar = function() { /***/ }), -/* 534 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(532); +var types = __webpack_require__(531); exports.wordBoundary = function() { return { type: types.POSITION, value: 'b' }; @@ -62790,7 +62772,7 @@ exports.end = function() { /***/ }), -/* 535 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62803,8 +62785,8 @@ exports.end = function() { -var isobject = __webpack_require__(536); -var isDescriptor = __webpack_require__(537); +var isobject = __webpack_require__(535); +var isDescriptor = __webpack_require__(536); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -62835,7 +62817,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 536 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62854,7 +62836,7 @@ module.exports = function isObject(val) { /***/ }), -/* 537 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62867,9 +62849,9 @@ module.exports = function isObject(val) { -var typeOf = __webpack_require__(538); -var isAccessor = __webpack_require__(539); -var isData = __webpack_require__(541); +var typeOf = __webpack_require__(537); +var isAccessor = __webpack_require__(538); +var isData = __webpack_require__(540); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -62883,7 +62865,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 538 */ +/* 537 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63018,7 +63000,7 @@ function isBuffer(val) { /***/ }), -/* 539 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63031,7 +63013,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(540); +var typeOf = __webpack_require__(539); // accessor descriptor properties var accessor = { @@ -63094,7 +63076,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 540 */ +/* 539 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63229,7 +63211,7 @@ function isBuffer(val) { /***/ }), -/* 541 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63242,7 +63224,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(542); +var typeOf = __webpack_require__(541); module.exports = function isDataDescriptor(obj, prop) { // data descriptor properties @@ -63285,7 +63267,7 @@ module.exports = function isDataDescriptor(obj, prop) { /***/ }), -/* 542 */ +/* 541 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -63420,14 +63402,14 @@ function isBuffer(val) { /***/ }), -/* 543 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(544); -var assignSymbols = __webpack_require__(546); +var isExtendable = __webpack_require__(543); +var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -63487,7 +63469,7 @@ function isEnum(obj, key) { /***/ }), -/* 544 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63500,7 +63482,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -63508,7 +63490,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 545 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63521,7 +63503,7 @@ module.exports = function isExtendable(val) { -var isObject = __webpack_require__(536); +var isObject = __webpack_require__(535); function isObjectObject(o) { return isObject(o) === true @@ -63552,7 +63534,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 546 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63599,14 +63581,14 @@ module.exports = function(receiver, objects) { /***/ }), -/* 547 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(548); -var safe = __webpack_require__(529); +var extend = __webpack_require__(547); +var safe = __webpack_require__(528); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -63678,14 +63660,14 @@ module.exports = toRegex; /***/ }), -/* 548 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(549); -var assignSymbols = __webpack_require__(546); +var isExtendable = __webpack_require__(548); +var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -63745,7 +63727,7 @@ function isEnum(obj, key) { /***/ }), -/* 549 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63758,7 +63740,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -63766,7 +63748,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 550 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63816,13 +63798,13 @@ module.exports.immutable = function uniqueImmutable(arr) { /***/ }), -/* 551 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(552); +var isObject = __webpack_require__(551); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -63856,7 +63838,7 @@ function hasOwn(obj, key) { /***/ }), -/* 552 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63876,13 +63858,13 @@ module.exports = function isExtendable(val) { /***/ }), -/* 553 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(554); +var utils = __webpack_require__(553); module.exports = function(braces, options) { braces.compiler @@ -64165,25 +64147,25 @@ function hasQueue(node) { /***/ }), -/* 554 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var splitString = __webpack_require__(555); +var splitString = __webpack_require__(554); var utils = module.exports; /** * Module dependencies */ -utils.extend = __webpack_require__(551); -utils.flatten = __webpack_require__(558); -utils.isObject = __webpack_require__(536); -utils.fillRange = __webpack_require__(559); -utils.repeat = __webpack_require__(567); -utils.unique = __webpack_require__(550); +utils.extend = __webpack_require__(550); +utils.flatten = __webpack_require__(557); +utils.isObject = __webpack_require__(535); +utils.fillRange = __webpack_require__(558); +utils.repeat = __webpack_require__(566); +utils.unique = __webpack_require__(549); utils.define = function(obj, key, val) { Object.defineProperty(obj, key, { @@ -64515,7 +64497,7 @@ utils.escapeRegex = function(str) { /***/ }), -/* 555 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64528,7 +64510,7 @@ utils.escapeRegex = function(str) { -var extend = __webpack_require__(556); +var extend = __webpack_require__(555); module.exports = function(str, options, fn) { if (typeof str !== 'string') { @@ -64693,14 +64675,14 @@ function keepEscaping(opts, str, idx) { /***/ }), -/* 556 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(557); -var assignSymbols = __webpack_require__(546); +var isExtendable = __webpack_require__(556); +var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -64760,7 +64742,7 @@ function isEnum(obj, key) { /***/ }), -/* 557 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64773,7 +64755,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -64781,7 +64763,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 558 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64810,7 +64792,7 @@ function flat(arr, res) { /***/ }), -/* 559 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64824,10 +64806,10 @@ function flat(arr, res) { var util = __webpack_require__(112); -var isNumber = __webpack_require__(560); -var extend = __webpack_require__(563); -var repeat = __webpack_require__(565); -var toRegex = __webpack_require__(566); +var isNumber = __webpack_require__(559); +var extend = __webpack_require__(562); +var repeat = __webpack_require__(564); +var toRegex = __webpack_require__(565); /** * Return a range of numbers or letters. @@ -65025,7 +65007,7 @@ module.exports = fillRange; /***/ }), -/* 560 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65038,7 +65020,7 @@ module.exports = fillRange; -var typeOf = __webpack_require__(561); +var typeOf = __webpack_require__(560); module.exports = function isNumber(num) { var type = typeOf(num); @@ -65054,10 +65036,10 @@ module.exports = function isNumber(num) { /***/ }), -/* 561 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(562); +var isBuffer = __webpack_require__(561); var toString = Object.prototype.toString; /** @@ -65176,7 +65158,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 562 */ +/* 561 */ /***/ (function(module, exports) { /*! @@ -65203,13 +65185,13 @@ function isSlowBuffer (obj) { /***/ }), -/* 563 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(564); +var isObject = __webpack_require__(563); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -65243,7 +65225,7 @@ function hasOwn(obj, key) { /***/ }), -/* 564 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65263,7 +65245,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 565 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65340,7 +65322,7 @@ function repeat(str, num) { /***/ }), -/* 566 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65353,8 +65335,8 @@ function repeat(str, num) { -var repeat = __webpack_require__(565); -var isNumber = __webpack_require__(560); +var repeat = __webpack_require__(564); +var isNumber = __webpack_require__(559); var cache = {}; function toRegexRange(min, max, options) { @@ -65641,7 +65623,7 @@ module.exports = toRegexRange; /***/ }), -/* 567 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65666,14 +65648,14 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 568 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(569); -var utils = __webpack_require__(554); +var Node = __webpack_require__(568); +var utils = __webpack_require__(553); /** * Braces parsers @@ -66033,15 +66015,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 569 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(536); -var define = __webpack_require__(570); -var utils = __webpack_require__(571); +var isObject = __webpack_require__(535); +var define = __webpack_require__(569); +var utils = __webpack_require__(570); var ownNames; /** @@ -66532,7 +66514,7 @@ exports = module.exports = Node; /***/ }), -/* 570 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66545,7 +66527,7 @@ exports = module.exports = Node; -var isDescriptor = __webpack_require__(537); +var isDescriptor = __webpack_require__(536); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -66570,13 +66552,13 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 571 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(561); +var typeOf = __webpack_require__(560); var utils = module.exports; /** @@ -67596,17 +67578,17 @@ function assert(val, message) { /***/ }), -/* 572 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(551); -var Snapdragon = __webpack_require__(573); -var compilers = __webpack_require__(553); -var parsers = __webpack_require__(568); -var utils = __webpack_require__(554); +var extend = __webpack_require__(550); +var Snapdragon = __webpack_require__(572); +var compilers = __webpack_require__(552); +var parsers = __webpack_require__(567); +var utils = __webpack_require__(553); /** * Customize Snapdragon parser and renderer @@ -67707,17 +67689,17 @@ module.exports = Braces; /***/ }), -/* 573 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(574); -var define = __webpack_require__(603); -var Compiler = __webpack_require__(613); -var Parser = __webpack_require__(642); -var utils = __webpack_require__(622); +var Base = __webpack_require__(573); +var define = __webpack_require__(602); +var Compiler = __webpack_require__(612); +var Parser = __webpack_require__(641); +var utils = __webpack_require__(621); var regexCache = {}; var cache = {}; @@ -67888,20 +67870,20 @@ module.exports.Parser = Parser; /***/ }), -/* 574 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var define = __webpack_require__(575); -var CacheBase = __webpack_require__(576); -var Emitter = __webpack_require__(577); -var isObject = __webpack_require__(536); -var merge = __webpack_require__(597); -var pascal = __webpack_require__(600); -var cu = __webpack_require__(601); +var define = __webpack_require__(574); +var CacheBase = __webpack_require__(575); +var Emitter = __webpack_require__(576); +var isObject = __webpack_require__(535); +var merge = __webpack_require__(596); +var pascal = __webpack_require__(599); +var cu = __webpack_require__(600); /** * Optionally define a custom `cache` namespace to use. @@ -68330,7 +68312,7 @@ module.exports.namespace = namespace; /***/ }), -/* 575 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68343,7 +68325,7 @@ module.exports.namespace = namespace; -var isDescriptor = __webpack_require__(537); +var isDescriptor = __webpack_require__(536); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -68368,21 +68350,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 576 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(536); -var Emitter = __webpack_require__(577); -var visit = __webpack_require__(578); -var toPath = __webpack_require__(581); -var union = __webpack_require__(582); -var del = __webpack_require__(588); -var get = __webpack_require__(585); -var has = __webpack_require__(593); -var set = __webpack_require__(596); +var isObject = __webpack_require__(535); +var Emitter = __webpack_require__(576); +var visit = __webpack_require__(577); +var toPath = __webpack_require__(580); +var union = __webpack_require__(581); +var del = __webpack_require__(587); +var get = __webpack_require__(584); +var has = __webpack_require__(592); +var set = __webpack_require__(595); /** * Create a `Cache` constructor that when instantiated will @@ -68636,7 +68618,7 @@ module.exports.namespace = namespace; /***/ }), -/* 577 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { @@ -68805,7 +68787,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 578 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68818,8 +68800,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(579); -var mapVisit = __webpack_require__(580); +var visit = __webpack_require__(578); +var mapVisit = __webpack_require__(579); module.exports = function(collection, method, val) { var result; @@ -68842,7 +68824,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 579 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68855,7 +68837,7 @@ module.exports = function(collection, method, val) { -var isObject = __webpack_require__(536); +var isObject = __webpack_require__(535); module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { @@ -68882,14 +68864,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 580 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var visit = __webpack_require__(579); +var visit = __webpack_require__(578); /** * Map `visit` over an array of objects. @@ -68926,7 +68908,7 @@ function isObject(val) { /***/ }), -/* 581 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68939,7 +68921,7 @@ function isObject(val) { -var typeOf = __webpack_require__(561); +var typeOf = __webpack_require__(560); module.exports = function toPath(args) { if (typeOf(args) !== 'arguments') { @@ -68966,16 +68948,16 @@ function filter(arr) { /***/ }), -/* 582 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(583); -var union = __webpack_require__(584); -var get = __webpack_require__(585); -var set = __webpack_require__(586); +var isObject = __webpack_require__(582); +var union = __webpack_require__(583); +var get = __webpack_require__(584); +var set = __webpack_require__(585); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -69003,7 +68985,7 @@ function arrayify(val) { /***/ }), -/* 583 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69023,7 +69005,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 584 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69059,7 +69041,7 @@ module.exports = function union(init) { /***/ }), -/* 585 */ +/* 584 */ /***/ (function(module, exports) { /*! @@ -69115,7 +69097,7 @@ function toString(val) { /***/ }), -/* 586 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69128,10 +69110,10 @@ function toString(val) { -var split = __webpack_require__(555); -var extend = __webpack_require__(587); -var isPlainObject = __webpack_require__(545); -var isObject = __webpack_require__(583); +var split = __webpack_require__(554); +var extend = __webpack_require__(586); +var isPlainObject = __webpack_require__(544); +var isObject = __webpack_require__(582); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -69177,13 +69159,13 @@ function isValidKey(key) { /***/ }), -/* 587 */ +/* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(583); +var isObject = __webpack_require__(582); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -69217,7 +69199,7 @@ function hasOwn(obj, key) { /***/ }), -/* 588 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69230,8 +69212,8 @@ function hasOwn(obj, key) { -var isObject = __webpack_require__(536); -var has = __webpack_require__(589); +var isObject = __webpack_require__(535); +var has = __webpack_require__(588); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -69256,7 +69238,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 589 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69269,9 +69251,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(590); -var hasValues = __webpack_require__(592); -var get = __webpack_require__(585); +var isObject = __webpack_require__(589); +var hasValues = __webpack_require__(591); +var get = __webpack_require__(584); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -69282,7 +69264,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 590 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69295,7 +69277,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(591); +var isArray = __webpack_require__(590); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -69303,7 +69285,7 @@ module.exports = function isObject(val) { /***/ }), -/* 591 */ +/* 590 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -69314,7 +69296,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 592 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69357,7 +69339,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 593 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69370,9 +69352,9 @@ module.exports = function hasValue(o, noZero) { -var isObject = __webpack_require__(536); -var hasValues = __webpack_require__(594); -var get = __webpack_require__(585); +var isObject = __webpack_require__(535); +var hasValues = __webpack_require__(593); +var get = __webpack_require__(584); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -69380,7 +69362,7 @@ module.exports = function(val, prop) { /***/ }), -/* 594 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69393,8 +69375,8 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(595); -var isNumber = __webpack_require__(560); +var typeOf = __webpack_require__(594); +var isNumber = __webpack_require__(559); module.exports = function hasValue(val) { // is-number checks for NaN and other edge cases @@ -69447,10 +69429,10 @@ module.exports = function hasValue(val) { /***/ }), -/* 595 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(562); +var isBuffer = __webpack_require__(561); var toString = Object.prototype.toString; /** @@ -69572,7 +69554,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 596 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69585,10 +69567,10 @@ module.exports = function kindOf(val) { -var split = __webpack_require__(555); -var extend = __webpack_require__(587); -var isPlainObject = __webpack_require__(545); -var isObject = __webpack_require__(583); +var split = __webpack_require__(554); +var extend = __webpack_require__(586); +var isPlainObject = __webpack_require__(544); +var isObject = __webpack_require__(582); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -69634,14 +69616,14 @@ function isValidKey(key) { /***/ }), -/* 597 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(598); -var forIn = __webpack_require__(599); +var isExtendable = __webpack_require__(597); +var forIn = __webpack_require__(598); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -69705,7 +69687,7 @@ module.exports = mixinDeep; /***/ }), -/* 598 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69718,7 +69700,7 @@ module.exports = mixinDeep; -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -69726,7 +69708,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 599 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69749,7 +69731,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 600 */ +/* 599 */ /***/ (function(module, exports) { /*! @@ -69776,14 +69758,14 @@ module.exports = pascalcase; /***/ }), -/* 601 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(112); -var utils = __webpack_require__(602); +var utils = __webpack_require__(601); /** * Expose class utils @@ -70148,7 +70130,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 602 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70162,10 +70144,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(584); -utils.define = __webpack_require__(603); -utils.isObj = __webpack_require__(536); -utils.staticExtend = __webpack_require__(610); +utils.union = __webpack_require__(583); +utils.define = __webpack_require__(602); +utils.isObj = __webpack_require__(535); +utils.staticExtend = __webpack_require__(609); /** @@ -70176,7 +70158,7 @@ module.exports = utils; /***/ }), -/* 603 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70189,7 +70171,7 @@ module.exports = utils; -var isDescriptor = __webpack_require__(604); +var isDescriptor = __webpack_require__(603); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -70214,7 +70196,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 604 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70227,9 +70209,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(605); -var isAccessor = __webpack_require__(606); -var isData = __webpack_require__(608); +var typeOf = __webpack_require__(604); +var isAccessor = __webpack_require__(605); +var isData = __webpack_require__(607); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -70243,7 +70225,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 605 */ +/* 604 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -70396,7 +70378,7 @@ function isBuffer(val) { /***/ }), -/* 606 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70409,7 +70391,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(607); +var typeOf = __webpack_require__(606); // accessor descriptor properties var accessor = { @@ -70472,10 +70454,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 607 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(562); +var isBuffer = __webpack_require__(561); var toString = Object.prototype.toString; /** @@ -70594,7 +70576,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 608 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70607,7 +70589,7 @@ module.exports = function kindOf(val) { -var typeOf = __webpack_require__(609); +var typeOf = __webpack_require__(608); // data descriptor properties var data = { @@ -70656,10 +70638,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 609 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(562); +var isBuffer = __webpack_require__(561); var toString = Object.prototype.toString; /** @@ -70778,7 +70760,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 610 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70791,8 +70773,8 @@ module.exports = function kindOf(val) { -var copy = __webpack_require__(611); -var define = __webpack_require__(603); +var copy = __webpack_require__(610); +var define = __webpack_require__(602); var util = __webpack_require__(112); /** @@ -70875,15 +70857,15 @@ module.exports = extend; /***/ }), -/* 611 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(561); -var copyDescriptor = __webpack_require__(612); -var define = __webpack_require__(603); +var typeOf = __webpack_require__(560); +var copyDescriptor = __webpack_require__(611); +var define = __webpack_require__(602); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -71056,7 +71038,7 @@ module.exports.has = has; /***/ }), -/* 612 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71144,16 +71126,16 @@ function isObject(val) { /***/ }), -/* 613 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(614); -var define = __webpack_require__(603); -var debug = __webpack_require__(616)('snapdragon:compiler'); -var utils = __webpack_require__(622); +var use = __webpack_require__(613); +var define = __webpack_require__(602); +var debug = __webpack_require__(615)('snapdragon:compiler'); +var utils = __webpack_require__(621); /** * Create a new `Compiler` with the given `options`. @@ -71307,7 +71289,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(641); + var sourcemaps = __webpack_require__(640); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -71328,7 +71310,7 @@ module.exports = Compiler; /***/ }), -/* 614 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71341,7 +71323,7 @@ module.exports = Compiler; -var utils = __webpack_require__(615); +var utils = __webpack_require__(614); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -71456,7 +71438,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 615 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71470,8 +71452,8 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(603); -utils.isObject = __webpack_require__(536); +utils.define = __webpack_require__(602); +utils.isObject = __webpack_require__(535); utils.isString = function(val) { @@ -71486,7 +71468,7 @@ module.exports = utils; /***/ }), -/* 616 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71495,14 +71477,14 @@ module.exports = utils; */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(617); + module.exports = __webpack_require__(616); } else { - module.exports = __webpack_require__(620); + module.exports = __webpack_require__(619); } /***/ }), -/* 617 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71511,7 +71493,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(618); +exports = module.exports = __webpack_require__(617); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -71693,7 +71675,7 @@ function localstorage() { /***/ }), -/* 618 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { @@ -71709,7 +71691,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(619); +exports.humanize = __webpack_require__(618); /** * The currently active debug mode names, and names to skip. @@ -71901,7 +71883,7 @@ function coerce(val) { /***/ }), -/* 619 */ +/* 618 */ /***/ (function(module, exports) { /** @@ -72059,7 +72041,7 @@ function plural(ms, n, name) { /***/ }), -/* 620 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72075,7 +72057,7 @@ var util = __webpack_require__(112); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(618); +exports = module.exports = __webpack_require__(617); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -72254,7 +72236,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(621); + var net = __webpack_require__(620); stream = new net.Socket({ fd: fd, readable: false, @@ -72313,13 +72295,13 @@ exports.enable(load()); /***/ }), -/* 621 */ +/* 620 */ /***/ (function(module, exports) { module.exports = require("net"); /***/ }), -/* 622 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72329,9 +72311,9 @@ module.exports = require("net"); * Module dependencies */ -exports.extend = __webpack_require__(587); -exports.SourceMap = __webpack_require__(623); -exports.sourceMapResolve = __webpack_require__(634); +exports.extend = __webpack_require__(586); +exports.SourceMap = __webpack_require__(622); +exports.sourceMapResolve = __webpack_require__(633); /** * Convert backslash in the given string to forward slashes @@ -72374,7 +72356,7 @@ exports.last = function(arr, n) { /***/ }), -/* 623 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -72382,13 +72364,13 @@ exports.last = function(arr, n) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(624).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(630).SourceMapConsumer; -exports.SourceNode = __webpack_require__(633).SourceNode; +exports.SourceMapGenerator = __webpack_require__(623).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(629).SourceMapConsumer; +exports.SourceNode = __webpack_require__(632).SourceNode; /***/ }), -/* 624 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72398,10 +72380,10 @@ exports.SourceNode = __webpack_require__(633).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(625); -var util = __webpack_require__(627); -var ArraySet = __webpack_require__(628).ArraySet; -var MappingList = __webpack_require__(629).MappingList; +var base64VLQ = __webpack_require__(624); +var util = __webpack_require__(626); +var ArraySet = __webpack_require__(627).ArraySet; +var MappingList = __webpack_require__(628).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -72810,7 +72792,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 625 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -72850,7 +72832,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(626); +var base64 = __webpack_require__(625); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -72956,7 +72938,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 626 */ +/* 625 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73029,7 +73011,7 @@ exports.decode = function (charCode) { /***/ }), -/* 627 */ +/* 626 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73452,7 +73434,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 628 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73462,7 +73444,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(627); +var util = __webpack_require__(626); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -73579,7 +73561,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 629 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73589,7 +73571,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(627); +var util = __webpack_require__(626); /** * Determine whether mappingB is after mappingA with respect to generated @@ -73664,7 +73646,7 @@ exports.MappingList = MappingList; /***/ }), -/* 630 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -73674,11 +73656,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(627); -var binarySearch = __webpack_require__(631); -var ArraySet = __webpack_require__(628).ArraySet; -var base64VLQ = __webpack_require__(625); -var quickSort = __webpack_require__(632).quickSort; +var util = __webpack_require__(626); +var binarySearch = __webpack_require__(630); +var ArraySet = __webpack_require__(627).ArraySet; +var base64VLQ = __webpack_require__(624); +var quickSort = __webpack_require__(631).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -74752,7 +74734,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 631 */ +/* 630 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74869,7 +74851,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 632 */ +/* 631 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74989,7 +74971,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 633 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -74999,8 +74981,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(624).SourceMapGenerator; -var util = __webpack_require__(627); +var SourceMapGenerator = __webpack_require__(623).SourceMapGenerator; +var util = __webpack_require__(626); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -75408,17 +75390,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 634 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(635) -var resolveUrl = __webpack_require__(636) -var decodeUriComponent = __webpack_require__(637) -var urix = __webpack_require__(639) -var atob = __webpack_require__(640) +var sourceMappingURL = __webpack_require__(634) +var resolveUrl = __webpack_require__(635) +var decodeUriComponent = __webpack_require__(636) +var urix = __webpack_require__(638) +var atob = __webpack_require__(639) @@ -75716,7 +75698,7 @@ module.exports = { /***/ }), -/* 635 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -75779,7 +75761,7 @@ void (function(root, factory) { /***/ }), -/* 636 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -75797,13 +75779,13 @@ module.exports = resolveUrl /***/ }), -/* 637 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(638) +var decodeUriComponent = __webpack_require__(637) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -75814,7 +75796,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 638 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75915,7 +75897,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 639 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -75938,7 +75920,7 @@ module.exports = urix /***/ }), -/* 640 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75952,7 +75934,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 641 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75960,8 +75942,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(134); var path = __webpack_require__(4); -var define = __webpack_require__(603); -var utils = __webpack_require__(622); +var define = __webpack_require__(602); +var utils = __webpack_require__(621); /** * Expose `mixin()`. @@ -76104,19 +76086,19 @@ exports.comment = function(node) { /***/ }), -/* 642 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(614); +var use = __webpack_require__(613); var util = __webpack_require__(112); -var Cache = __webpack_require__(643); -var define = __webpack_require__(603); -var debug = __webpack_require__(616)('snapdragon:parser'); -var Position = __webpack_require__(644); -var utils = __webpack_require__(622); +var Cache = __webpack_require__(642); +var define = __webpack_require__(602); +var debug = __webpack_require__(615)('snapdragon:parser'); +var Position = __webpack_require__(643); +var utils = __webpack_require__(621); /** * Create a new `Parser` with the given `input` and `options`. @@ -76644,7 +76626,7 @@ module.exports = Parser; /***/ }), -/* 643 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76751,13 +76733,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 644 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(603); +var define = __webpack_require__(602); /** * Store position for a node @@ -76772,14 +76754,14 @@ module.exports = function Position(start, parser) { /***/ }), -/* 645 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(646); -var assignSymbols = __webpack_require__(546); +var isExtendable = __webpack_require__(645); +var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -76839,7 +76821,7 @@ function isEnum(obj, key) { /***/ }), -/* 646 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76852,7 +76834,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -76860,14 +76842,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 647 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(648); -var extglob = __webpack_require__(663); +var nanomatch = __webpack_require__(647); +var extglob = __webpack_require__(662); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -76944,7 +76926,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 648 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76955,17 +76937,17 @@ function escapeExtglobs(compiler) { */ var util = __webpack_require__(112); -var toRegex = __webpack_require__(528); -var extend = __webpack_require__(649); +var toRegex = __webpack_require__(527); +var extend = __webpack_require__(648); /** * Local dependencies */ -var compilers = __webpack_require__(651); -var parsers = __webpack_require__(652); -var cache = __webpack_require__(655); -var utils = __webpack_require__(657); +var compilers = __webpack_require__(650); +var parsers = __webpack_require__(651); +var cache = __webpack_require__(654); +var utils = __webpack_require__(656); var MAX_LENGTH = 1024 * 64; /** @@ -77789,14 +77771,14 @@ module.exports = nanomatch; /***/ }), -/* 649 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(650); -var assignSymbols = __webpack_require__(546); +var isExtendable = __webpack_require__(649); +var assignSymbols = __webpack_require__(545); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -77856,7 +77838,7 @@ function isEnum(obj, key) { /***/ }), -/* 650 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77869,7 +77851,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(545); +var isPlainObject = __webpack_require__(544); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -77877,7 +77859,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 651 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78223,15 +78205,15 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 652 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regexNot = __webpack_require__(547); -var toRegex = __webpack_require__(528); -var isOdd = __webpack_require__(653); +var regexNot = __webpack_require__(546); +var toRegex = __webpack_require__(527); +var isOdd = __webpack_require__(652); /** * Characters to use in negation regex (we want to "not" match @@ -78617,7 +78599,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 653 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78630,7 +78612,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(654); +var isNumber = __webpack_require__(653); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -78644,7 +78626,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 654 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78672,14 +78654,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 655 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(656))(); +module.exports = new (__webpack_require__(655))(); /***/ }), -/* 656 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78692,7 +78674,7 @@ module.exports = new (__webpack_require__(656))(); -var MapCache = __webpack_require__(643); +var MapCache = __webpack_require__(642); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -78814,7 +78796,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 657 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78827,14 +78809,14 @@ var path = __webpack_require__(4); * Module dependencies */ -var isWindows = __webpack_require__(658)(); -var Snapdragon = __webpack_require__(573); -utils.define = __webpack_require__(659); -utils.diff = __webpack_require__(660); -utils.extend = __webpack_require__(649); -utils.pick = __webpack_require__(661); -utils.typeOf = __webpack_require__(662); -utils.unique = __webpack_require__(550); +var isWindows = __webpack_require__(657)(); +var Snapdragon = __webpack_require__(572); +utils.define = __webpack_require__(658); +utils.diff = __webpack_require__(659); +utils.extend = __webpack_require__(648); +utils.pick = __webpack_require__(660); +utils.typeOf = __webpack_require__(661); +utils.unique = __webpack_require__(549); /** * Returns true if the given value is effectively an empty string @@ -79200,7 +79182,7 @@ utils.unixify = function(options) { /***/ }), -/* 658 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -79228,7 +79210,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 659 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79241,8 +79223,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ -var isobject = __webpack_require__(536); -var isDescriptor = __webpack_require__(537); +var isobject = __webpack_require__(535); +var isDescriptor = __webpack_require__(536); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -79273,7 +79255,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 660 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79327,7 +79309,7 @@ function diffArray(one, two) { /***/ }), -/* 661 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79340,7 +79322,7 @@ function diffArray(one, two) { -var isObject = __webpack_require__(536); +var isObject = __webpack_require__(535); module.exports = function pick(obj, keys) { if (!isObject(obj) && typeof obj !== 'function') { @@ -79369,7 +79351,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 662 */ +/* 661 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -79504,7 +79486,7 @@ function isBuffer(val) { /***/ }), -/* 663 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79514,18 +79496,18 @@ function isBuffer(val) { * Module dependencies */ -var extend = __webpack_require__(587); -var unique = __webpack_require__(550); -var toRegex = __webpack_require__(528); +var extend = __webpack_require__(586); +var unique = __webpack_require__(549); +var toRegex = __webpack_require__(527); /** * Local dependencies */ -var compilers = __webpack_require__(664); -var parsers = __webpack_require__(670); -var Extglob = __webpack_require__(673); -var utils = __webpack_require__(672); +var compilers = __webpack_require__(663); +var parsers = __webpack_require__(669); +var Extglob = __webpack_require__(672); +var utils = __webpack_require__(671); var MAX_LENGTH = 1024 * 64; /** @@ -79842,13 +79824,13 @@ module.exports = extglob; /***/ }), -/* 664 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(665); +var brackets = __webpack_require__(664); /** * Extglob compilers @@ -80018,7 +80000,7 @@ module.exports = function(extglob) { /***/ }), -/* 665 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80028,17 +80010,17 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(666); -var parsers = __webpack_require__(668); +var compilers = __webpack_require__(665); +var parsers = __webpack_require__(667); /** * Module dependencies */ -var debug = __webpack_require__(616)('expand-brackets'); -var extend = __webpack_require__(587); -var Snapdragon = __webpack_require__(573); -var toRegex = __webpack_require__(528); +var debug = __webpack_require__(615)('expand-brackets'); +var extend = __webpack_require__(586); +var Snapdragon = __webpack_require__(572); +var toRegex = __webpack_require__(527); /** * Parses the given POSIX character class `pattern` and returns a @@ -80236,13 +80218,13 @@ module.exports = brackets; /***/ }), -/* 666 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(667); +var posix = __webpack_require__(666); module.exports = function(brackets) { brackets.compiler @@ -80330,7 +80312,7 @@ module.exports = function(brackets) { /***/ }), -/* 667 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80359,14 +80341,14 @@ module.exports = { /***/ }), -/* 668 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(669); -var define = __webpack_require__(603); +var utils = __webpack_require__(668); +var define = __webpack_require__(602); /** * Text regex @@ -80585,14 +80567,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX; /***/ }), -/* 669 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var toRegex = __webpack_require__(528); -var regexNot = __webpack_require__(547); +var toRegex = __webpack_require__(527); +var regexNot = __webpack_require__(546); var cached; /** @@ -80626,15 +80608,15 @@ exports.createRegex = function(pattern, include) { /***/ }), -/* 670 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(665); -var define = __webpack_require__(671); -var utils = __webpack_require__(672); +var brackets = __webpack_require__(664); +var define = __webpack_require__(670); +var utils = __webpack_require__(671); /** * Characters to use in text regex (we want to "not" match @@ -80789,7 +80771,7 @@ module.exports = parsers; /***/ }), -/* 671 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80802,7 +80784,7 @@ module.exports = parsers; -var isDescriptor = __webpack_require__(537); +var isDescriptor = __webpack_require__(536); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -80827,14 +80809,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 672 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regex = __webpack_require__(547); -var Cache = __webpack_require__(656); +var regex = __webpack_require__(546); +var Cache = __webpack_require__(655); /** * Utils @@ -80903,7 +80885,7 @@ utils.createRegex = function(str) { /***/ }), -/* 673 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80913,16 +80895,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(573); -var define = __webpack_require__(671); -var extend = __webpack_require__(587); +var Snapdragon = __webpack_require__(572); +var define = __webpack_require__(670); +var extend = __webpack_require__(586); /** * Local dependencies */ -var compilers = __webpack_require__(664); -var parsers = __webpack_require__(670); +var compilers = __webpack_require__(663); +var parsers = __webpack_require__(669); /** * Customize Snapdragon parser and renderer @@ -80988,16 +80970,16 @@ module.exports = Extglob; /***/ }), -/* 674 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(663); -var nanomatch = __webpack_require__(648); -var regexNot = __webpack_require__(547); -var toRegex = __webpack_require__(528); +var extglob = __webpack_require__(662); +var nanomatch = __webpack_require__(647); +var regexNot = __webpack_require__(546); +var toRegex = __webpack_require__(527); var not; /** @@ -81078,14 +81060,14 @@ function textRegex(pattern) { /***/ }), -/* 675 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(656))(); +module.exports = new (__webpack_require__(655))(); /***/ }), -/* 676 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81098,13 +81080,13 @@ var path = __webpack_require__(4); * Module dependencies */ -var Snapdragon = __webpack_require__(573); -utils.define = __webpack_require__(677); -utils.diff = __webpack_require__(660); -utils.extend = __webpack_require__(645); -utils.pick = __webpack_require__(661); -utils.typeOf = __webpack_require__(678); -utils.unique = __webpack_require__(550); +var Snapdragon = __webpack_require__(572); +utils.define = __webpack_require__(676); +utils.diff = __webpack_require__(659); +utils.extend = __webpack_require__(644); +utils.pick = __webpack_require__(660); +utils.typeOf = __webpack_require__(677); +utils.unique = __webpack_require__(549); /** * Returns true if the platform is windows, or `path.sep` is `\\`. @@ -81401,7 +81383,7 @@ utils.unixify = function(options) { /***/ }), -/* 677 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81414,8 +81396,8 @@ utils.unixify = function(options) { -var isobject = __webpack_require__(536); -var isDescriptor = __webpack_require__(537); +var isobject = __webpack_require__(535); +var isDescriptor = __webpack_require__(536); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -81446,7 +81428,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 678 */ +/* 677 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -81581,7 +81563,7 @@ function isBuffer(val) { /***/ }), -/* 679 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81600,9 +81582,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(680); -var reader_1 = __webpack_require__(693); -var fs_stream_1 = __webpack_require__(697); +var readdir = __webpack_require__(679); +var reader_1 = __webpack_require__(692); +var fs_stream_1 = __webpack_require__(696); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -81663,15 +81645,15 @@ exports.default = ReaderAsync; /***/ }), -/* 680 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(681); -const readdirAsync = __webpack_require__(689); -const readdirStream = __webpack_require__(692); +const readdirSync = __webpack_require__(680); +const readdirAsync = __webpack_require__(688); +const readdirStream = __webpack_require__(691); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -81755,7 +81737,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 681 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81763,11 +81745,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(682); +const DirectoryReader = __webpack_require__(681); let syncFacade = { - fs: __webpack_require__(687), - forEach: __webpack_require__(688), + fs: __webpack_require__(686), + forEach: __webpack_require__(687), sync: true }; @@ -81796,7 +81778,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 682 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81805,9 +81787,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(138).Readable; const EventEmitter = __webpack_require__(156).EventEmitter; const path = __webpack_require__(4); -const normalizeOptions = __webpack_require__(683); -const stat = __webpack_require__(685); -const call = __webpack_require__(686); +const normalizeOptions = __webpack_require__(682); +const stat = __webpack_require__(684); +const call = __webpack_require__(685); /** * Asynchronously reads the contents of a directory and streams the results @@ -82183,14 +82165,14 @@ module.exports = DirectoryReader; /***/ }), -/* 683 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const globToRegExp = __webpack_require__(684); +const globToRegExp = __webpack_require__(683); module.exports = normalizeOptions; @@ -82367,7 +82349,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 684 */ +/* 683 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -82504,13 +82486,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 685 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(686); +const call = __webpack_require__(685); module.exports = stat; @@ -82585,7 +82567,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 686 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82646,14 +82628,14 @@ function callOnce (fn) { /***/ }), -/* 687 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const call = __webpack_require__(686); +const call = __webpack_require__(685); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -82717,7 +82699,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 688 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82746,7 +82728,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 689 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82754,12 +82736,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(690); -const DirectoryReader = __webpack_require__(682); +const maybe = __webpack_require__(689); +const DirectoryReader = __webpack_require__(681); let asyncFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(691), + forEach: __webpack_require__(690), async: true }; @@ -82801,7 +82783,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 690 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82828,7 +82810,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 691 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82864,7 +82846,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 692 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82872,11 +82854,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(682); +const DirectoryReader = __webpack_require__(681); let streamFacade = { fs: __webpack_require__(134), - forEach: __webpack_require__(691), + forEach: __webpack_require__(690), async: true }; @@ -82896,16 +82878,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 693 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var deep_1 = __webpack_require__(694); -var entry_1 = __webpack_require__(696); -var pathUtil = __webpack_require__(695); +var deep_1 = __webpack_require__(693); +var entry_1 = __webpack_require__(695); +var pathUtil = __webpack_require__(694); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -82971,14 +82953,14 @@ exports.default = Reader; /***/ }), -/* 694 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(695); -var patternUtils = __webpack_require__(522); +var pathUtils = __webpack_require__(694); +var patternUtils = __webpack_require__(521); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { this.options = options; @@ -83061,7 +83043,7 @@ exports.default = DeepFilter; /***/ }), -/* 695 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83092,14 +83074,14 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 696 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(695); -var patternUtils = __webpack_require__(522); +var pathUtils = __webpack_require__(694); +var patternUtils = __webpack_require__(521); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { this.options = options; @@ -83184,7 +83166,7 @@ exports.default = EntryFilter; /***/ }), -/* 697 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83204,8 +83186,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var fsStat = __webpack_require__(698); -var fs_1 = __webpack_require__(702); +var fsStat = __webpack_require__(697); +var fs_1 = __webpack_require__(701); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -83255,14 +83237,14 @@ exports.default = FileSystemStream; /***/ }), -/* 698 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(699); -const statProvider = __webpack_require__(701); +const optionsManager = __webpack_require__(698); +const statProvider = __webpack_require__(700); /** * Asynchronous API. */ @@ -83293,13 +83275,13 @@ exports.statSync = statSync; /***/ }), -/* 699 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(700); +const fsAdapter = __webpack_require__(699); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -83312,7 +83294,7 @@ exports.prepare = prepare; /***/ }), -/* 700 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83335,7 +83317,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 701 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83387,7 +83369,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 702 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83418,7 +83400,7 @@ exports.default = FileSystem; /***/ }), -/* 703 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83438,9 +83420,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(138); -var readdir = __webpack_require__(680); -var reader_1 = __webpack_require__(693); -var fs_stream_1 = __webpack_require__(697); +var readdir = __webpack_require__(679); +var reader_1 = __webpack_require__(692); +var fs_stream_1 = __webpack_require__(696); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -83508,7 +83490,7 @@ exports.default = ReaderStream; /***/ }), -/* 704 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83527,9 +83509,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(680); -var reader_1 = __webpack_require__(693); -var fs_sync_1 = __webpack_require__(705); +var readdir = __webpack_require__(679); +var reader_1 = __webpack_require__(692); +var fs_sync_1 = __webpack_require__(704); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -83589,7 +83571,7 @@ exports.default = ReaderSync; /***/ }), -/* 705 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83608,8 +83590,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(698); -var fs_1 = __webpack_require__(702); +var fsStat = __webpack_require__(697); +var fs_1 = __webpack_require__(701); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -83655,7 +83637,7 @@ exports.default = FileSystemSync; /***/ }), -/* 706 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83671,7 +83653,7 @@ exports.flatten = flatten; /***/ }), -/* 707 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83692,13 +83674,13 @@ exports.merge = merge; /***/ }), -/* 708 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const pathType = __webpack_require__(709); +const pathType = __webpack_require__(708); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -83764,13 +83746,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 709 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); -const pify = __webpack_require__(710); +const pify = __webpack_require__(709); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -83813,7 +83795,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 710 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83904,17 +83886,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 711 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(134); const path = __webpack_require__(4); -const fastGlob = __webpack_require__(518); -const gitIgnore = __webpack_require__(712); -const pify = __webpack_require__(713); -const slash = __webpack_require__(714); +const fastGlob = __webpack_require__(517); +const gitIgnore = __webpack_require__(711); +const pify = __webpack_require__(712); +const slash = __webpack_require__(713); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -84012,7 +83994,7 @@ module.exports.sync = options => { /***/ }), -/* 712 */ +/* 711 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -84481,7 +84463,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 713 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84556,7 +84538,7 @@ module.exports = (input, options) => { /***/ }), -/* 714 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84574,7 +84556,7 @@ module.exports = input => { /***/ }), -/* 715 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84587,7 +84569,7 @@ module.exports = input => { -var isGlob = __webpack_require__(716); +var isGlob = __webpack_require__(715); module.exports = function hasGlob(val) { if (val == null) return false; @@ -84607,7 +84589,7 @@ module.exports = function hasGlob(val) { /***/ }), -/* 716 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -84638,17 +84620,17 @@ module.exports = function isGlob(str) { /***/ }), -/* 717 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); const {constants: fsConstants} = __webpack_require__(134); -const pEvent = __webpack_require__(718); -const CpFileError = __webpack_require__(721); -const fs = __webpack_require__(723); -const ProgressEmitter = __webpack_require__(726); +const pEvent = __webpack_require__(717); +const CpFileError = __webpack_require__(720); +const fs = __webpack_require__(722); +const ProgressEmitter = __webpack_require__(725); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -84762,12 +84744,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 718 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(719); +const pTimeout = __webpack_require__(718); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -85058,12 +85040,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 719 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(720); +const pFinally = __webpack_require__(719); class TimeoutError extends Error { constructor(message) { @@ -85109,7 +85091,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 720 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85131,12 +85113,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 721 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(722); +const NestedError = __webpack_require__(721); class CpFileError extends NestedError { constructor(message, nested) { @@ -85150,7 +85132,7 @@ module.exports = CpFileError; /***/ }), -/* 722 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(112).inherits; @@ -85206,16 +85188,16 @@ module.exports = NestedError; /***/ }), -/* 723 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(112); const fs = __webpack_require__(133); -const makeDir = __webpack_require__(724); -const pEvent = __webpack_require__(718); -const CpFileError = __webpack_require__(721); +const makeDir = __webpack_require__(723); +const pEvent = __webpack_require__(717); +const CpFileError = __webpack_require__(720); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -85312,7 +85294,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 724 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85320,7 +85302,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(134); const path = __webpack_require__(4); const {promisify} = __webpack_require__(112); -const semver = __webpack_require__(725); +const semver = __webpack_require__(724); const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); @@ -85475,7 +85457,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 725 */ +/* 724 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -87077,7 +87059,7 @@ function coerce (version, options) { /***/ }), -/* 726 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87118,7 +87100,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 727 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87164,12 +87146,12 @@ exports.default = module.exports; /***/ }), -/* 728 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(729); +const pMap = __webpack_require__(728); const pFilter = async (iterable, filterer, options) => { const values = await pMap( @@ -87186,7 +87168,7 @@ module.exports.default = pFilter; /***/ }), -/* 729 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87265,12 +87247,12 @@ module.exports.default = pMap; /***/ }), -/* 730 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(722); +const NestedError = __webpack_require__(721); class CpyError extends NestedError { constructor(message, nested) { diff --git a/src/plugins/runtime_fields/common/index.ts b/scripts/licenses_csv_report.js similarity index 90% rename from src/plugins/runtime_fields/common/index.ts rename to scripts/licenses_csv_report.js index b08ac661a4bd6..6fe813a472745 100644 --- a/src/plugins/runtime_fields/common/index.ts +++ b/scripts/licenses_csv_report.js @@ -17,5 +17,5 @@ * under the License. */ -export * from './constants'; -export * from './types'; +require('../src/setup_node_env'); +require('../src/dev/run_licenses_csv_report'); diff --git a/src/dev/run_licenses_csv_report.js b/src/dev/run_licenses_csv_report.js new file mode 100644 index 0000000000000..791f296085deb --- /dev/null +++ b/src/dev/run_licenses_csv_report.js @@ -0,0 +1,128 @@ +/* + * 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 { writeFileSync } from 'fs'; +import { resolve } from 'path'; +import { isNull, isUndefined } from 'lodash'; + +import { run } from '@kbn/dev-utils'; + +import { getInstalledPackages } from './npm'; +import { engines } from '../../package'; +import { LICENSE_OVERRIDES } from './license_checker'; + +const allDoubleQuoteRE = /"/g; + +function escapeValue(value) { + if (isNull(value)) { + return; + } + + return `"${value.replace(allDoubleQuoteRE, '""')}"`; +} + +function formatCsvValues(fields, values) { + return fields + .map((field) => { + const value = values[field]; + + if (isNull(value) || isUndefined(value)) { + return null; + } + + return value.toString(); + }) + .map(escapeValue) + .join(','); +} + +run( + async ({ log, flags }) => { + const fields = ['name', 'version', 'url', 'license', 'sourceURL']; + + const file = flags.csv; + const directory = flags.directory; + const dev = flags.dev; + + const root = resolve(__dirname, '..', '..'); + const packages = await getInstalledPackages({ + directory: directory ? resolve(directory) : root, + licenseOverrides: LICENSE_OVERRIDES, + dev, + }); + + packages.unshift( + { + name: 'Node.js', + version: engines.node, + repository: 'https://nodejs.org', + licenses: ['MIT'], + }, + { + name: 'Red Hat Universal Base Image minimal', + version: '8', + repository: + 'https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8', + licenses: [ + 'Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf', + ], + sourceURL: 'https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz', + } + ); + + const csv = packages + .map((pkg) => { + const data = { + name: pkg.name, + version: pkg.version, + url: pkg.repository || `https://www.npmjs.com/package/${pkg.name}`, + license: pkg.licenses.join(','), + sourceURL: pkg.sourceURL, + }; + + return formatCsvValues(fields, data); + }) + .join('\n'); + + if (file) { + writeFileSync(file, `${fields.join(',')}\n${csv}`); + log.success(`wrote to ${file}`); + } else { + log.success(csv); + log.debug('\nspecify "--csv [filepath]" to write the data to a specific file'); + } + }, + { + description: ` + Report of 3rd party dependencies + `, + flags: { + boolean: ['dev'], + string: ['csv', 'directory'], + default: { + dev: false, + }, + help: ` + --dev Include development dependencies + --csv Write csv report to file + --directory Directory to check for licenses + `, + }, + } +); diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index abef8afcc3985..4abc37a455d05 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -97,6 +97,7 @@ function EditorUI({ initialTextValue }: EditorProps) { if (textareaElement) { textareaElement.setAttribute('id', inputId); + textareaElement.setAttribute('data-test-subj', 'console-textarea'); } const readQueryParams = () => { @@ -204,7 +205,7 @@ function EditorUI({ initialTextValue }: EditorProps) { }, [sendCurrentRequestToES, openDocumentation]); return ( -
+
    , + }, }); dashboardState.handleDashboardContainerChanges(dashboardContainer); @@ -149,15 +154,39 @@ describe('DashboardState', function () { const dashboardContainer = initDashboardContainer({ expandedPanelId: 'theCoolestPanelOnThisDashboard', + panels: { + theCoolestPanelOnThisDashboard: { + explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, + } as DashboardPanelState, + }, }); dashboardState.handleDashboardContainerChanges(dashboardContainer); dashboardState.handleDashboardContainerChanges(dashboardContainer); expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(1); + }); + + test('expandedPanelId is set to undefined if panel does not exist in input', () => { + dashboardState.setExpandedPanelId = jest + .fn() + .mockImplementation(dashboardState.setExpandedPanelId); + const dashboardContainer = initDashboardContainer({ + expandedPanelId: 'theCoolestPanelOnThisDashboard', + panels: { + theCoolestPanelOnThisDashboard: { + explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, + } as DashboardPanelState, + }, + }); + + dashboardState.handleDashboardContainerChanges(dashboardContainer); + expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith( + 'theCoolestPanelOnThisDashboard' + ); - dashboardContainer.updateInput({ expandedPanelId: 'woah it changed' }); + dashboardContainer.updateInput({ expandedPanelId: 'theLeastCoolPanelOnThisDashboard' }); dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(2); + expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith(undefined); }); }); diff --git a/src/plugins/dashboard/public/application/dashboard_state_manager.ts b/src/plugins/dashboard/public/application/dashboard_state_manager.ts index dfcbfcafd3db1..891add08547db 100644 --- a/src/plugins/dashboard/public/application/dashboard_state_manager.ts +++ b/src/plugins/dashboard/public/application/dashboard_state_manager.ts @@ -223,6 +223,7 @@ export class DashboardStateManager { const savedDashboardPanelMap: { [key: string]: SavedDashboardPanel } = {}; const input = dashboardContainer.getInput(); + this.getPanels().forEach((savedDashboardPanel) => { if (input.panels[savedDashboardPanel.panelIndex] !== undefined) { savedDashboardPanelMap[savedDashboardPanel.panelIndex] = savedDashboardPanel; @@ -234,11 +235,16 @@ export class DashboardStateManager { const convertedPanelStateMap: { [key: string]: SavedDashboardPanel } = {}; + let expandedPanelValid = false; Object.values(input.panels).forEach((panelState) => { if (savedDashboardPanelMap[panelState.explicitInput.id] === undefined) { dirty = true; } + if (panelState.explicitInput.id === input.expandedPanelId) { + expandedPanelValid = true; + } + convertedPanelStateMap[panelState.explicitInput.id] = convertPanelStateToSavedDashboardPanel( panelState, this.kibanaVersion @@ -272,8 +278,10 @@ export class DashboardStateManager { this.setFullScreenMode(input.isFullScreenMode); } - if (input.expandedPanelId !== this.getExpandedPanelId()) { + if (expandedPanelValid && input.expandedPanelId !== this.getExpandedPanelId()) { this.setExpandedPanelId(input.expandedPanelId); + } else if (!expandedPanelValid && this.getExpandedPanelId()) { + this.setExpandedPanelId(undefined); } if (!_.isEqual(input.query, this.getQuery())) { diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx index c5929c5d85dbb..3d7b9312a5127 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx @@ -34,7 +34,6 @@ import { ViewMode, EmbeddableChildPanel } from '../../../services/embeddable'; import { DASHBOARD_GRID_COLUMN_COUNT, DASHBOARD_GRID_HEIGHT } from '../dashboard_constants'; import { DashboardPanelState } from '../types'; import { withKibana } from '../../../services/kibana_react'; -import { DashboardContainerInput } from '../dashboard_container'; import { DashboardContainer, DashboardReactContextValue } from '../dashboard_container'; let lastValidGridSize = 0; @@ -177,18 +176,17 @@ class DashboardGridUi extends React.Component { isLayoutInvalid, }); - this.subscription = this.props.container - .getInput$() - .subscribe((input: DashboardContainerInput) => { - if (this.mounted) { - this.setState({ - panels: input.panels, - viewMode: input.viewMode, - useMargins: input.useMargins, - expandedPanelId: input.expandedPanelId, - }); - } - }); + this.subscription = this.props.container.getInput$().subscribe(() => { + const { panels, viewMode, useMargins, expandedPanelId } = this.props.container.getInput(); + if (this.mounted) { + this.setState({ + panels, + viewMode, + useMargins, + expandedPanelId, + }); + } + }); } public componentWillUnmount() { diff --git a/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.test.ts index bd3c4f8dd58cf..5edbf6fc4eac2 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.test.ts @@ -108,13 +108,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.ts b/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.ts index 3e3895b7b50db..55a43864879c4 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_histogram_fn.ts @@ -152,7 +152,6 @@ export const aggDateHistogram = (): FunctionDefinition => ({ ...rest, timeRange: getParsedValue(args, 'timeRange'), extended_bounds: getParsedValue(args, 'extended_bounds'), - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/date_range_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/date_range_fn.test.ts index 93bb791874e67..2aa6a3a1f6fab 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_range_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_range_fn.test.ts @@ -88,14 +88,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'date_field', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts b/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts index 0dc66be5b84f2..c09c87b8b9afd 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_range_fn.ts @@ -107,7 +107,6 @@ export const aggDateRange = (): FunctionDefinition => ({ type: BUCKET_TYPES.DATE_RANGE, params: { ...rest, - json: getParsedValue(args, 'json'), ranges: getParsedValue(args, 'ranges'), }, }, diff --git a/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts index c820a73b0a894..1d85b7dba8bd1 100644 --- a/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/filter_fn.test.ts @@ -73,13 +73,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/filter_fn.ts b/src/plugins/data/common/search/aggs/buckets/filter_fn.ts index 8c8c0f430184a..07ed11e2249b1 100644 --- a/src/plugins/data/common/search/aggs/buckets/filter_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/filter_fn.ts @@ -95,7 +95,6 @@ export const aggFilter = (): FunctionDefinition => ({ type: BUCKET_TYPES.FILTER, params: { ...rest, - json: getParsedValue(args, 'json'), geo_bounding_box: getParsedValue(args, 'geo_bounding_box'), }, }, diff --git a/src/plugins/data/common/search/aggs/buckets/filters_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/filters_fn.test.ts index 99c4f7d8c2b65..da29afec1e1e6 100644 --- a/src/plugins/data/common/search/aggs/buckets/filters_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/filters_fn.test.ts @@ -79,13 +79,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/filters_fn.ts b/src/plugins/data/common/search/aggs/buckets/filters_fn.ts index 194feb67d3366..ccf9232d14d3f 100644 --- a/src/plugins/data/common/search/aggs/buckets/filters_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/filters_fn.ts @@ -90,7 +90,6 @@ export const aggFilters = (): FunctionDefinition => ({ params: { ...rest, filters: getParsedValue(args, 'filters'), - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.test.ts index 07ab8e66f1def..1fbb69d7dd182 100644 --- a/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.test.ts @@ -99,14 +99,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'geo_field', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.ts b/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.ts index aa5f473f73f9d..cbd901a438eb4 100644 --- a/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/geo_hash_fn.ts @@ -126,7 +126,6 @@ export const aggGeoHash = (): FunctionDefinition => ({ params: { ...rest, boundingBox: getParsedValue(args, 'boundingBox'), - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.test.ts index bfaf47ede8734..78bf16e8f067c 100644 --- a/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.test.ts @@ -78,14 +78,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'geo_field', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.ts b/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.ts index 346c70bba31fd..1e7258ea7da53 100644 --- a/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/geo_tile_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, BUCKET_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggGeoTileFnName = 'aggGeoTile'; @@ -105,7 +104,6 @@ export const aggGeoTile = (): FunctionDefinition => ({ type: BUCKET_TYPES.GEOTILE_GRID, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/histogram_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/histogram_fn.test.ts index 354946f99a2f5..4a8e785da2974 100644 --- a/src/plugins/data/common/search/aggs/buckets/histogram_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/histogram_fn.test.ts @@ -98,15 +98,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'field', - interval: '10', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/histogram_fn.ts b/src/plugins/data/common/search/aggs/buckets/histogram_fn.ts index 62dbc7ca8ca45..6b5e2d02b271b 100644 --- a/src/plugins/data/common/search/aggs/buckets/histogram_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/histogram_fn.ts @@ -135,7 +135,6 @@ export const aggHistogram = (): FunctionDefinition => ({ params: { ...rest, extended_bounds: getParsedValue(args, 'extended_bounds'), - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/ip_range_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/ip_range_fn.test.ts index 5940345b25890..462672cf5dffe 100644 --- a/src/plugins/data/common/search/aggs/buckets/ip_range_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/ip_range_fn.test.ts @@ -88,15 +88,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'ip_field', - ipRangeType: IP_RANGE_TYPES.FROM_TO, - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/ip_range_fn.ts b/src/plugins/data/common/search/aggs/buckets/ip_range_fn.ts index 7ad61a9c27d86..92eedc35ce61b 100644 --- a/src/plugins/data/common/search/aggs/buckets/ip_range_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/ip_range_fn.ts @@ -110,7 +110,6 @@ export const aggIpRange = (): FunctionDefinition => ({ type: BUCKET_TYPES.IP_RANGE, params: { ...rest, - json: getParsedValue(args, 'json'), ranges: getParsedValue(args, 'ranges'), }, }, diff --git a/src/plugins/data/common/search/aggs/buckets/range_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/range_fn.test.ts index 93ae4490196a8..1a08cc1adaa28 100644 --- a/src/plugins/data/common/search/aggs/buckets/range_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/range_fn.test.ts @@ -87,14 +87,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - field: 'number_field', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/range_fn.ts b/src/plugins/data/common/search/aggs/buckets/range_fn.ts index a52b2427b9845..f3d662ced8fcf 100644 --- a/src/plugins/data/common/search/aggs/buckets/range_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/range_fn.ts @@ -102,7 +102,6 @@ export const aggRange = (): FunctionDefinition => ({ type: BUCKET_TYPES.RANGE, params: { ...rest, - json: getParsedValue(args, 'json'), ranges: getParsedValue(args, 'ranges'), }, }, diff --git a/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.test.ts index 89281490167b3..d2c1fc77d0514 100644 --- a/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.test.ts @@ -52,14 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - - expect(() => { - fn({ - delay: '1000ms', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.ts b/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.ts index 87f80192ca3cd..d13138ad43dad 100644 --- a/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/shard_delay_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggConfigSerialized } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; import { AggParamsShardDelay, SHARD_DELAY_AGG_NAME } from './shard_delay'; export const aggShardDelayFnName = 'aggShardDelay'; @@ -93,7 +92,6 @@ export const aggShardDelay = (): FunctionDefinition => ({ type: SHARD_DELAY_AGG_NAME, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.test.ts index 71be4e9cfa9ac..9e94654821913 100644 --- a/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.test.ts @@ -84,13 +84,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.ts b/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.ts index a1a7500678fd6..2998200ccae76 100644 --- a/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/significant_terms_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, BUCKET_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggSignificantTermsFnName = 'aggSignificantTerms'; @@ -113,7 +112,6 @@ export const aggSignificantTerms = (): FunctionDefinition => ({ type: BUCKET_TYPES.SIGNIFICANT_TERMS, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts b/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts index 1384a9f17e4b6..9374497ddb664 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms_fn.test.ts @@ -154,15 +154,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - order: 'asc', - orderBy: '1', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/buckets/terms_fn.ts b/src/plugins/data/common/search/aggs/buckets/terms_fn.ts index 7737cb1e1c952..a0b491b4cb398 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms_fn.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, BUCKET_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggTermsFnName = 'aggTerms'; @@ -160,7 +159,6 @@ export const aggTerms = (): FunctionDefinition => ({ params: { ...rest, orderAgg: args.orderAgg?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts index 0e2ee00df49dd..8162b6e7554f0 100644 --- a/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/avg_fn.ts index 57dd3dae70fba..d28bd88095191 100644 --- a/src/plugins/data/common/search/aggs/metrics/avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/avg_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggAvgFnName = 'aggAvg'; @@ -87,7 +86,6 @@ export const aggAvg = (): FunctionDefinition => ({ type: METRIC_TYPES.AVG, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts index 7e08bc9954510..7329ea57ade83 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts @@ -67,12 +67,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts index 595d49647d9c2..cfed0205f1b61 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggBucketAvgFnName = 'aggBucketAvg'; @@ -104,7 +103,6 @@ export const aggBucketAvg = (): FunctionDefinition => ({ ...rest, customBucket: args.customBucket?.value, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts index b789bdf51ebd5..9e890331a848f 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts @@ -67,12 +67,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts index 482c73e7d3005..90a494f8cbc77 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggBucketMaxFnName = 'aggBucketMax'; @@ -104,7 +103,6 @@ export const aggBucketMax = (): FunctionDefinition => ({ ...rest, customBucket: args.customBucket?.value, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts index 6ebc83417813b..8a03849769a9a 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts @@ -67,12 +67,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts index 68beffbf05660..8f48166887f25 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggBucketMinFnName = 'aggBucketMin'; @@ -104,7 +103,6 @@ export const aggBucketMin = (): FunctionDefinition => ({ ...rest, customBucket: args.customBucket?.value, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts index 71549f41b1d15..ea26f58dd2f15 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts @@ -67,12 +67,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts index 7994bb85be2a7..d26f22b106c2f 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggBucketSumFnName = 'aggBucketSum'; @@ -104,7 +103,6 @@ export const aggBucketSum = (): FunctionDefinition => ({ ...rest, customBucket: args.customBucket?.value, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts index 4008819018ee5..5045fccf921a3 100644 --- a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts index 6e78a42fea90f..e5599ab8599f7 100644 --- a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggCardinalityFnName = 'aggCardinality'; @@ -92,7 +91,6 @@ export const aggCardinality = (): FunctionDefinition => ({ type: METRIC_TYPES.CARDINALITY, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts index 3cf53e3da153e..48120f9bdc338 100644 --- a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts @@ -108,13 +108,7 @@ describe('agg_expression_functions', () => { buckets_path: 'the_sum', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - buckets_path: 'the_sum', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts index 040e26125079f..b20d03f06c854 100644 --- a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggCumulativeSumFnName = 'aggCumulativeSum'; @@ -107,7 +106,6 @@ export const aggCumulativeSum = (): FunctionDefinition => ({ params: { ...rest, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts index 79ea7292104ee..602ef8e1de48b 100644 --- a/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts @@ -108,13 +108,7 @@ describe('agg_expression_functions', () => { buckets_path: 'the_sum', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - buckets_path: 'the_sum', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts b/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts index 93ef0286a0c7e..b3fb448446c44 100644 --- a/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggDerivativeFnName = 'aggDerivative'; @@ -107,7 +106,6 @@ export const aggDerivative = (): FunctionDefinition => ({ params: { ...rest, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts index 96bd31916784a..3f85a874b0dd5 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts index af5ea3c80506c..1403d95371c1d 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggGeoBoundsFnName = 'aggGeoBounds'; @@ -92,7 +91,6 @@ export const aggGeoBounds = (): FunctionDefinition => ({ type: METRIC_TYPES.GEO_BOUNDS, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts index bf9a4548bafbf..aea6ee1f2c332 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts index 2c2d60711def3..9e36e07cbaf58 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggGeoCentroidFnName = 'aggGeoCentroid'; @@ -92,7 +91,6 @@ export const aggGeoCentroid = (): FunctionDefinition => ({ type: METRIC_TYPES.GEO_CENTROID, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts index 156b51ca54af5..b042b82a048c2 100644 --- a/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/max_fn.ts b/src/plugins/data/common/search/aggs/metrics/max_fn.ts index 9624cd3012398..7f1e3b9ad9d69 100644 --- a/src/plugins/data/common/search/aggs/metrics/max_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/max_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggMaxFnName = 'aggMax'; @@ -87,7 +86,6 @@ export const aggMax = (): FunctionDefinition => ({ type: METRIC_TYPES.MAX, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts index 69200c35426c8..def9197bc3444 100644 --- a/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/median_fn.ts b/src/plugins/data/common/search/aggs/metrics/median_fn.ts index e2ea8ae0fe2e7..2323fa969c245 100644 --- a/src/plugins/data/common/search/aggs/metrics/median_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/median_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggMedianFnName = 'aggMedian'; @@ -92,7 +91,6 @@ export const aggMedian = (): FunctionDefinition => ({ type: METRIC_TYPES.MEDIAN, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts index ef32d086e41f7..44d0f0f4f4607 100644 --- a/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/min_fn.ts b/src/plugins/data/common/search/aggs/metrics/min_fn.ts index b880937eea2d7..40b2085a97e97 100644 --- a/src/plugins/data/common/search/aggs/metrics/min_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/min_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggMinFnName = 'aggMin'; @@ -87,7 +86,6 @@ export const aggMin = (): FunctionDefinition => ({ type: METRIC_TYPES.MIN, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts index d6c0e6b2cbd6e..a9334480ec602 100644 --- a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts @@ -118,13 +118,7 @@ describe('agg_expression_functions', () => { buckets_path: 'the_sum', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - buckets_path: 'the_sum', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts index 85b7e536e66fc..5f30e088954c9 100644 --- a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggMovingAvgFnName = 'aggMovingAvg'; @@ -120,7 +119,6 @@ export const aggMovingAvg = (): FunctionDefinition => ({ params: { ...rest, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts index e3ce91bafd40a..c9393f68ce404 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts @@ -81,13 +81,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts index 9bf35c4dba9ff..bd4c83c1bdbbb 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggPercentileRanksFnName = 'aggPercentileRanks'; @@ -99,7 +98,6 @@ export const aggPercentileRanks = (): FunctionDefinition => ({ type: METRIC_TYPES.PERCENTILE_RANKS, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts index 2074cc1d89527..4b8424b79b33a 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts @@ -81,13 +81,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts index d7bcefc23f711..0b5f5d4c1a890 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggPercentilesFnName = 'aggPercentiles'; @@ -99,7 +98,6 @@ export const aggPercentiles = (): FunctionDefinition => ({ type: METRIC_TYPES.PERCENTILES, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts index 1bb859ad4bad8..a3410401a38cf 100644 --- a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts @@ -108,13 +108,7 @@ describe('agg_expression_functions', () => { buckets_path: 'the_sum', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - json: '/// intentionally malformed json ///', - buckets_path: 'the_sum', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts index f3602f5519d5e..f2c5b152e2f2f 100644 --- a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts @@ -21,7 +21,6 @@ import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggSerialDiffFnName = 'aggSerialDiff'; @@ -107,7 +106,6 @@ export const aggSerialDiff = (): FunctionDefinition => ({ params: { ...rest, customMetric: args.customMetric?.value, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts index bfa6aa7cc4122..bbaa1d3eef3fc 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts index 2a3c1bd33e17d..d0dadf7e0078e 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggStdDeviationFnName = 'aggStdDeviation'; @@ -92,7 +91,6 @@ export const aggStdDeviation = (): FunctionDefinition => ({ type: METRIC_TYPES.STD_DEV, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts index 6e57632ba84cc..fed56246e087a 100644 --- a/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts @@ -52,13 +52,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/sum_fn.ts index a42510dc594ad..d58231f732c9d 100644 --- a/src/plugins/data/common/search/aggs/metrics/sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/sum_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggSumFnName = 'aggSum'; @@ -87,7 +86,6 @@ export const aggSum = (): FunctionDefinition => ({ type: METRIC_TYPES.SUM, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts index d0e9788f85025..7251909e44c81 100644 --- a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts @@ -89,14 +89,7 @@ describe('agg_expression_functions', () => { json: '{ "foo": true }', }); - expect(actual.value.params.json).toEqual({ foo: true }); - expect(() => { - fn({ - field: 'machine.os.keyword', - aggregate: 'min', - json: '/// intentionally malformed json ///', - }); - }).toThrowErrorMatchingInlineSnapshot(`"Unable to parse json argument string"`); + expect(actual.value.params.json).toEqual('{ "foo": true }'); }); }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts index 38a3bc6a59bfc..2636e9865df18 100644 --- a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts @@ -20,7 +20,6 @@ import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common'; import { AggExpressionType, AggExpressionFunctionArgs, METRIC_TYPES } from '../'; -import { getParsedValue } from '../utils/get_parsed_value'; export const aggTopHitFnName = 'aggTopHit'; @@ -119,7 +118,6 @@ export const aggTopHit = (): FunctionDefinition => ({ type: METRIC_TYPES.TOP_HITS, params: { ...rest, - json: getParsedValue(args, 'json'), }, }, }; diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index 935cb945678de..50b6b2223bd0a 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -2624,7 +2624,7 @@ export const UI_SETTINGS: { // src/plugins/data/public/index.ts:433:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts // src/plugins/data/public/index.ts:436:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts // src/plugins/data/public/query/state_sync/connect_to_query_state.ts:45:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts -// src/plugins/data/public/search/session/session_service.ts:51:5 - (ae-forgotten-export) The symbol "UrlGeneratorStateMapping" needs to be exported by the entry point index.d.ts +// src/plugins/data/public/search/session/session_service.ts:52:5 - (ae-forgotten-export) The symbol "UrlGeneratorStateMapping" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/src/plugins/data/public/search/search_interceptor.test.ts b/src/plugins/data/public/search/search_interceptor.test.ts index 947dac1b32640..0656d3ac3aa03 100644 --- a/src/plugins/data/public/search/search_interceptor.test.ts +++ b/src/plugins/data/public/search/search_interceptor.test.ts @@ -115,12 +115,14 @@ describe('SearchInterceptor', () => { }: { isRestore?: boolean; isStored?: boolean; - sessionId?: string; + sessionId: string; }) => { const sessionServiceMock = searchMock.session as jest.Mocked; - sessionServiceMock.getSessionId.mockImplementation(() => sessionId); - sessionServiceMock.isRestore.mockImplementation(() => isRestore); - sessionServiceMock.isStored.mockImplementation(() => isStored); + sessionServiceMock.getSearchOptions.mockImplementation(() => ({ + sessionId, + isRestore, + isStored, + })); fetchMock.mockResolvedValue({ result: 200 }); }; @@ -130,30 +132,14 @@ describe('SearchInterceptor', () => { afterEach(() => { const sessionServiceMock = searchMock.session as jest.Mocked; - sessionServiceMock.getSessionId.mockReset(); - sessionServiceMock.isRestore.mockReset(); - sessionServiceMock.isStored.mockReset(); + sessionServiceMock.getSearchOptions.mockReset(); fetchMock.mockReset(); }); - test('infers isRestore from session service state', async () => { + test('gets session search options from session service', async () => { const sessionId = 'sid'; setup({ isRestore: true, - sessionId, - }); - - await searchInterceptor.search(mockRequest, { sessionId }).toPromise(); - expect(fetchMock.mock.calls[0][0]).toEqual( - expect.objectContaining({ - options: { sessionId: 'sid', isStored: false, isRestore: true }, - }) - ); - }); - - test('infers isStored from session service state', async () => { - const sessionId = 'sid'; - setup({ isStored: true, sessionId, }); @@ -161,41 +147,13 @@ describe('SearchInterceptor', () => { await searchInterceptor.search(mockRequest, { sessionId }).toPromise(); expect(fetchMock.mock.calls[0][0]).toEqual( expect.objectContaining({ - options: { sessionId: 'sid', isStored: true, isRestore: false }, - }) - ); - }); - - test('skips isRestore & isStore in case not a current session Id', async () => { - setup({ - isStored: true, - isRestore: true, - sessionId: 'session id', - }); - - await searchInterceptor - .search(mockRequest, { sessionId: 'different session id' }) - .toPromise(); - expect(fetchMock.mock.calls[0][0]).toEqual( - expect.objectContaining({ - options: { sessionId: 'different session id', isStored: false, isRestore: false }, + options: { sessionId, isStored: true, isRestore: true }, }) ); - }); - test('skips isRestore & isStore in case no session Id', async () => { - setup({ - isStored: true, - isRestore: true, - sessionId: undefined, - }); - - await searchInterceptor.search(mockRequest, { sessionId: 'sessionId' }).toPromise(); - expect(fetchMock.mock.calls[0][0]).toEqual( - expect.objectContaining({ - options: { sessionId: 'sessionId', isStored: false, isRestore: false }, - }) - ); + expect( + (searchMock.session as jest.Mocked).getSearchOptions + ).toHaveBeenCalledWith(sessionId); }); }); diff --git a/src/plugins/data/public/search/search_interceptor.ts b/src/plugins/data/public/search/search_interceptor.ts index 8548a2a9f2b2a..b81a6c4450cc4 100644 --- a/src/plugins/data/public/search/search_interceptor.ts +++ b/src/plugins/data/public/search/search_interceptor.ts @@ -130,16 +130,12 @@ export class SearchInterceptor { ): Promise { const { abortSignal, ...requestOptions } = options || {}; - const isCurrentSession = - options?.sessionId && this.deps.session.getSessionId() === options.sessionId; - return this.batchedFetch( { request, options: { ...requestOptions, - isStored: isCurrentSession ? this.deps.session.isStored() : false, - isRestore: isCurrentSession ? this.deps.session.isRestore() : false, + ...(options?.sessionId && this.deps.session.getSearchOptions(options.sessionId)), }, }, abortSignal diff --git a/src/plugins/data/public/search/session/mocks.ts b/src/plugins/data/public/search/session/mocks.ts index ea0cd8be03f27..13dd054c122d5 100644 --- a/src/plugins/data/public/search/session/mocks.ts +++ b/src/plugins/data/public/search/session/mocks.ts @@ -49,5 +49,7 @@ export function getSessionServiceMock(): jest.Mocked { isStored: jest.fn(), isRestore: jest.fn(), save: jest.fn(), + isCurrentSession: jest.fn(), + getSearchOptions: jest.fn(), }; } diff --git a/src/plugins/data/public/search/session/session_service.test.ts b/src/plugins/data/public/search/session/session_service.test.ts index aeca7b4d63da7..8fbc034b3a4c8 100644 --- a/src/plugins/data/public/search/session/session_service.test.ts +++ b/src/plugins/data/public/search/session/session_service.test.ts @@ -33,10 +33,18 @@ describe('Session service', () => { beforeEach(() => { const initializerContext = coreMock.createPluginInitializerContext(); + const startService = coreMock.createSetup().getStartServices; nowProvider = createNowProviderMock(); sessionService = new SessionService( initializerContext, - coreMock.createSetup().getStartServices, + () => + startService().then(([coreStart, ...rest]) => [ + { + ...coreStart, + application: { ...coreStart.application, currentAppId$: new BehaviorSubject('app') }, + }, + ...rest, + ]), getSessionsClientMock(), nowProvider, { freezeState: false } // needed to use mocks inside state container @@ -100,4 +108,63 @@ describe('Session service', () => { expect(abort).toBeCalledTimes(3); }); }); + + test('getSearchOptions infers isRestore & isStored from state', async () => { + const sessionId = sessionService.start(); + const someOtherId = 'some-other-id'; + + expect(sessionService.getSearchOptions(someOtherId)).toEqual({ + isStored: false, + isRestore: false, + sessionId: someOtherId, + }); + expect(sessionService.getSearchOptions(sessionId)).toEqual({ + isStored: false, + isRestore: false, + sessionId, + }); + + sessionService.setSearchSessionInfoProvider({ + getName: async () => 'Name', + getUrlGeneratorData: async () => ({ + urlGeneratorId: 'id', + initialState: {}, + restoreState: {}, + }), + }); + await sessionService.save(); + + expect(sessionService.getSearchOptions(someOtherId)).toEqual({ + isStored: false, + isRestore: false, + sessionId: someOtherId, + }); + expect(sessionService.getSearchOptions(sessionId)).toEqual({ + isStored: true, + isRestore: false, + sessionId, + }); + + await sessionService.restore(sessionId); + + expect(sessionService.getSearchOptions(someOtherId)).toEqual({ + isStored: false, + isRestore: false, + sessionId: someOtherId, + }); + expect(sessionService.getSearchOptions(sessionId)).toEqual({ + isStored: true, + isRestore: true, + sessionId, + }); + }); + test('isCurrentSession', () => { + expect(sessionService.isCurrentSession()).toBeFalsy(); + + const sessionId = sessionService.start(); + + expect(sessionService.isCurrentSession()).toBeFalsy(); + expect(sessionService.isCurrentSession('some-other')).toBeFalsy(); + expect(sessionService.isCurrentSession(sessionId)).toBeTruthy(); + }); }); diff --git a/src/plugins/data/public/search/session/session_service.ts b/src/plugins/data/public/search/session/session_service.ts index e2185d8148708..26fa5bd10c485 100644 --- a/src/plugins/data/public/search/session/session_service.ts +++ b/src/plugins/data/public/search/session/session_service.ts @@ -29,6 +29,7 @@ import { SessionStateContainer, } from './search_session_state'; import { ISessionsClient } from './sessions_client'; +import { ISearchOptions } from '../../../common'; import { NowProviderInternalContract } from '../../now_provider'; export type ISessionService = PublicContract; @@ -256,4 +257,27 @@ export class SessionService { this.state.transitions.store(); } } + + /** + * Checks if passed sessionId is a current sessionId + * @param sessionId + */ + public isCurrentSession(sessionId?: string): boolean { + return !!sessionId && this.getSessionId() === sessionId; + } + + /** + * Infers search session options for sessionId using current session state + * @param sessionId + */ + public getSearchOptions( + sessionId: string + ): Required> { + const isCurrentSession = this.isCurrentSession(sessionId); + return { + sessionId, + isRestore: isCurrentSession ? this.isRestore() : false, + isStored: isCurrentSession ? this.isStored() : false, + }; + } } diff --git a/src/plugins/es_ui_shared/tsconfig.json b/src/plugins/es_ui_shared/tsconfig.json new file mode 100644 index 0000000000000..9bcda2e0614de --- /dev/null +++ b/src/plugins/es_ui_shared/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "__packages_do_not_import__/**/*", + "common/**/*", + "public/**/*", + "server/**/*", + "static/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + ] +} diff --git a/src/plugins/expressions/common/execution/execution.ts b/src/plugins/expressions/common/execution/execution.ts index 609022f8a55c0..a1841d8fa3743 100644 --- a/src/plugins/expressions/common/execution/execution.ts +++ b/src/plugins/expressions/common/execution/execution.ts @@ -183,6 +183,7 @@ export class Execution< logDatatable: (name: string, datatable: Datatable) => { inspectorAdapters.tables[name] = datatable; }, + isSyncColorsEnabled: () => execution.params.syncColors, ...(execution.params as any).extraContext, }; } diff --git a/src/plugins/expressions/common/execution/types.ts b/src/plugins/expressions/common/execution/types.ts index a1b25c3802f4b..bac9cda128697 100644 --- a/src/plugins/expressions/common/execution/types.ts +++ b/src/plugins/expressions/common/execution/types.ts @@ -83,6 +83,11 @@ export interface ExecutionContext< type: string, id: string ) => Promise>; + + /** + * Returns the state (true|false) of the sync colors across panels switch. + */ + isSyncColorsEnabled?: () => boolean; } /** diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts index ec1fffe64f102..3adf452ef8bd3 100644 --- a/src/plugins/expressions/common/service/expressions_services.ts +++ b/src/plugins/expressions/common/service/expressions_services.ts @@ -70,6 +70,8 @@ export interface ExpressionExecutionParams { searchSessionId?: string; + syncColors?: boolean; + inspectorAdapters?: Adapters; } diff --git a/src/plugins/expressions/public/loader.ts b/src/plugins/expressions/public/loader.ts index 1cf499ce2635a..4db070f88a17f 100644 --- a/src/plugins/expressions/public/loader.ts +++ b/src/plugins/expressions/public/loader.ts @@ -154,6 +154,7 @@ export class ExpressionLoader { inspectorAdapters: params.inspectorAdapters, searchSessionId: params.searchSessionId, debug: params.debug, + syncColors: params.syncColors, }); const prevDataHandler = this.execution; @@ -189,6 +190,7 @@ export class ExpressionLoader { if (params.searchSessionId && this.params) { this.params.searchSessionId = params.searchSessionId; } + this.params.syncColors = params.syncColors; this.params.debug = Boolean(params.debug); this.params.inspectorAdapters = (params.inspectorAdapters || diff --git a/src/plugins/expressions/public/public.api.md b/src/plugins/expressions/public/public.api.md index 5c018adc0131b..df24882f6eb58 100644 --- a/src/plugins/expressions/public/public.api.md +++ b/src/plugins/expressions/public/public.api.md @@ -143,6 +143,7 @@ export interface ExecutionContext ExecutionContextSearch; getSearchSessionId: () => string | undefined; inspectorAdapters: InspectorAdapters; + isSyncColorsEnabled?: () => boolean; types: Record; variables: Record; } diff --git a/src/plugins/expressions/public/render.ts b/src/plugins/expressions/public/render.ts index e3091b908deca..c57f01dbd902e 100644 --- a/src/plugins/expressions/public/render.ts +++ b/src/plugins/expressions/public/render.ts @@ -110,7 +110,7 @@ export class ExpressionRenderHandler { }; } - render = async (value: any, uiState: any = {}) => { + render = async (value: any, uiState?: any) => { if (!value || typeof value !== 'object') { return this.handleRenderError(new Error('invalid data provided to the expression renderer')); } diff --git a/src/plugins/expressions/server/server.api.md b/src/plugins/expressions/server/server.api.md index 71199560ee0c7..0f5c3c8ae8736 100644 --- a/src/plugins/expressions/server/server.api.md +++ b/src/plugins/expressions/server/server.api.md @@ -141,6 +141,7 @@ export interface ExecutionContext ExecutionContextSearch; getSearchSessionId: () => string | undefined; inspectorAdapters: InspectorAdapters; + isSyncColorsEnabled?: () => boolean; types: Record; variables: Record; } diff --git a/src/plugins/lens_oss/tsconfig.json b/src/plugins/lens_oss/tsconfig.json new file mode 100644 index 0000000000000..d7bbc593fa87b --- /dev/null +++ b/src/plugins/lens_oss/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" } + ] +} diff --git a/src/plugins/maps_legacy/public/common/types.ts b/src/plugins/maps_legacy/public/common/types.ts new file mode 100644 index 0000000000000..802bed9f4b905 --- /dev/null +++ b/src/plugins/maps_legacy/public/common/types.ts @@ -0,0 +1,34 @@ +/* + * 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 { TmsLayer } from '..'; + +export interface WMSOptions { + selectedTmsLayer?: TmsLayer; + enabled: boolean; + url?: string; + options: { + version?: string; + layers?: string; + format: string; + transparent: boolean; + attribution?: string; + styles?: string; + }; +} diff --git a/src/plugins/maps_legacy/public/components/wms_internal_options.tsx b/src/plugins/maps_legacy/public/components/wms_internal_options.tsx index 86c15f10ae55d..b8a325ee539d2 100644 --- a/src/plugins/maps_legacy/public/components/wms_internal_options.tsx +++ b/src/plugins/maps_legacy/public/components/wms_internal_options.tsx @@ -22,7 +22,7 @@ import { EuiLink, EuiSpacer, EuiText, EuiScreenReaderOnly } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { TextInputOption } from '../../../vis_default_editor/public'; -import { WMSOptions } from '../common/types/external_basemap_types'; +import { WMSOptions } from '../common/types'; interface WmsInternalOptions { wms: WMSOptions; diff --git a/src/plugins/maps_legacy/public/components/wms_options.tsx b/src/plugins/maps_legacy/public/components/wms_options.tsx index 79e08478f2155..37ec3fcc90015 100644 --- a/src/plugins/maps_legacy/public/components/wms_options.tsx +++ b/src/plugins/maps_legacy/public/components/wms_options.tsx @@ -23,20 +23,19 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { TmsLayer } from '../index'; import { Vis } from '../../../visualizations/public'; -import { RegionMapVisParams } from '../common/types/region_map_types'; import { SelectOption, SwitchOption } from '../../../vis_default_editor/public'; import { WmsInternalOptions } from './wms_internal_options'; -import { WMSOptions, TileMapVisParams } from '../common/types/external_basemap_types'; +import { WMSOptions } from '../common/types'; -interface Props { - stateParams: TileMapVisParams | RegionMapVisParams; +interface Props { + stateParams: K; setValue: (title: 'wms', options: WMSOptions) => void; vis: Vis; } const mapLayerForOption = ({ id }: TmsLayer) => ({ text: id, value: id }); -function WmsOptions({ stateParams, setValue, vis }: Props) { +function WmsOptions({ stateParams, setValue, vis }: Props) { const { wms } = stateParams; const { tmsLayers } = vis.type.editorConfig.collections; const tmsLayerOptions = useMemo(() => tmsLayers.map(mapLayerForOption), [tmsLayers]); diff --git a/src/plugins/maps_legacy/public/index.ts b/src/plugins/maps_legacy/public/index.ts index 2654ded907cce..84edce6dbf8e9 100644 --- a/src/plugins/maps_legacy/public/index.ts +++ b/src/plugins/maps_legacy/public/index.ts @@ -17,17 +17,12 @@ * under the License. */ -// @ts-ignore import { PluginInitializerContext } from 'kibana/public'; import { MapsLegacyPlugin } from './plugin'; // @ts-ignore import * as colorUtil from './map/color_util'; // @ts-ignore import { KibanaMapLayer } from './map/kibana_map_layer'; -// @ts-ignore -import { convertToGeoJson } from './map/convert_to_geojson'; -// @ts-ignore -import { getPrecision, geoContains } from './map/decode_geo_hash'; import { VectorLayer, FileLayerField, @@ -46,10 +41,7 @@ export function plugin(initializerContext: PluginInitializerContext) { /** @public */ export { - getPrecision, - geoContains, colorUtil, - convertToGeoJson, IServiceSettings, KibanaMapLayer, VectorLayer, diff --git a/src/plugins/maps_legacy/public/map/base_maps_visualization.js b/src/plugins/maps_legacy/public/map/base_maps_visualization.js index 406dae43c9b5e..39612a1b60240 100644 --- a/src/plugins/maps_legacy/public/map/base_maps_visualization.js +++ b/src/plugins/maps_legacy/public/map/base_maps_visualization.js @@ -34,8 +34,9 @@ export function BaseMapsVisualizationProvider() { * @constructor */ return class BaseMapsVisualization { - constructor(element, vis) { - this.vis = vis; + constructor(element, handlers, initialVisParams) { + this.handlers = handlers; + this._params = initialVisParams; this._container = element; this._kibanaMap = null; this._chartData = null; //reference to data currently on the map. @@ -61,25 +62,31 @@ export function BaseMapsVisualizationProvider() { * @param status * @return {Promise} */ - async render(esResponse, visParams) { + async render(esResponse = this._esResponse, visParams = this._params) { + await this._mapIsLoaded; + if (!this._kibanaMap) { //the visualization has been destroyed; return; } - await this._mapIsLoaded; - this._kibanaMap.resize(); + this.resize(); this._params = visParams; await this._updateParams(); if (this._hasESResponseChanged(esResponse)) { + this._esResponse = esResponse; await this._updateData(esResponse); } - this._kibanaMap.useUiStateFromVisualization(this.vis); + this._kibanaMap.useUiStateFromVisualization(this.handlers.uiState); await this._whenBaseLayerIsLoaded(); } + resize() { + this._kibanaMap?.resize(); + } + /** * Creates an instance of a kibana-map with a single baselayer and assigns it to the this._kibanaMap property. * Clients can override this method to customize the initialization. @@ -87,11 +94,11 @@ export function BaseMapsVisualizationProvider() { */ async _makeKibanaMap() { const options = {}; - const uiState = this.vis.getUiState(); - const zoomFromUiState = parseInt(uiState.get('mapZoom')); - const centerFromUIState = uiState.get('mapCenter'); - options.zoom = !isNaN(zoomFromUiState) ? zoomFromUiState : this.vis.params.mapZoom; - options.center = centerFromUIState ? centerFromUIState : this.vis.params.mapCenter; + const zoomFromUiState = parseInt(this.handlers.uiState?.get('mapZoom')); + const centerFromUIState = this.handlers.uiState?.get('mapCenter'); + const { mapZoom, mapCenter } = this._getMapsParams(); + options.zoom = !isNaN(zoomFromUiState) ? zoomFromUiState : mapZoom; + options.center = centerFromUIState ? centerFromUIState : mapCenter; const modules = await lazyLoadMapsLegacyModules(); this._kibanaMap = new modules.KibanaMap(this._container, options); @@ -100,7 +107,7 @@ export function BaseMapsVisualizationProvider() { this._kibanaMap.addLegendControl(); this._kibanaMap.addFitControl(); - this._kibanaMap.persistUiStateForVisualization(this.vis); + this._kibanaMap.persistUiStateForVisualization(this.handlers.uiState); this._kibanaMap.on('baseLayer:loaded', () => { this._baseLayerDirty = false; @@ -212,7 +219,7 @@ export function BaseMapsVisualizationProvider() { } _hasESResponseChanged(data) { - return this._chartData !== data; + return this._esResponse !== data; } /** @@ -223,15 +230,11 @@ export function BaseMapsVisualizationProvider() { await this._updateBaseLayer(); this._kibanaMap.setLegendPosition(mapParams.legendPosition); this._kibanaMap.setShowTooltip(mapParams.addTooltip); - this._kibanaMap.useUiStateFromVisualization(this.vis); + this._kibanaMap.useUiStateFromVisualization(this.handlers.uiState); } _getMapsParams() { - return { - ...this.vis.type.visConfig.defaults, - type: this.vis.type.name, - ...this._params, - }; + return this._params; } _whenBaseLayerIsLoaded() { diff --git a/src/plugins/maps_legacy/public/common/types/index.ts b/src/plugins/maps_legacy/public/map/geohash_columns.test.ts similarity index 75% rename from src/plugins/maps_legacy/public/common/types/index.ts rename to src/plugins/maps_legacy/public/map/geohash_columns.test.ts index e6cabdde82cd9..e2a8eb575a9e2 100644 --- a/src/plugins/maps_legacy/public/common/types/index.ts +++ b/src/plugins/maps_legacy/public/map/geohash_columns.test.ts @@ -17,10 +17,11 @@ * under the License. */ -/** - * Use * syntax so that these exports do not break when internal - * types are stripped. - */ -export * from './external_basemap_types'; -export * from './map_types'; -export * from './region_map_types'; +import { geohashColumns } from './geohash_columns'; + +test('geohashColumns', () => { + expect(geohashColumns(1)).toBe(8); + expect(geohashColumns(2)).toBe(8 * 4); + expect(geohashColumns(3)).toBe(8 * 4 * 8); + expect(geohashColumns(4)).toBe(8 * 4 * 8 * 4); +}); diff --git a/src/plugins/maps_legacy/public/map/geohash_columns.ts b/src/plugins/maps_legacy/public/map/geohash_columns.ts new file mode 100644 index 0000000000000..db592306dc705 --- /dev/null +++ b/src/plugins/maps_legacy/public/map/geohash_columns.ts @@ -0,0 +1,38 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export function geohashColumns(precision: number): number { + return geohashCells(precision, 0); +} + +/** + * Get the number of geohash cells for a given precision + * + * @param {number} precision the geohash precision (1<=precision<=12). + * @param {number} axis constant for the axis 0=lengthwise (ie. columns, along longitude), 1=heightwise (ie. rows, along latitude). + * @returns {number} Number of geohash cells (rows or columns) at that precision + */ +function geohashCells(precision: number, axis: number) { + let cells = 1; + for (let i = 1; i <= precision; i += 1) { + /* On odd precisions, rows divide by 4 and columns by 8. Vice-versa on even precisions */ + cells *= i % 2 === axis ? 4 : 8; + } + return cells; +} diff --git a/src/plugins/maps_legacy/public/map/kibana_map.js b/src/plugins/maps_legacy/public/map/kibana_map.js index 3948692e55676..074c11e77b8a7 100644 --- a/src/plugins/maps_legacy/public/map/kibana_map.js +++ b/src/plugins/maps_legacy/public/map/kibana_map.js @@ -672,14 +672,13 @@ export class KibanaMap extends EventEmitter { } } - persistUiStateForVisualization(visualization) { + persistUiStateForVisualization(uiState) { function persistMapStateInUiState() { - const uiState = visualization.getUiState(); const centerFromUIState = uiState.get('mapCenter'); const zoomFromUiState = parseInt(uiState.get('mapZoom')); if (isNaN(zoomFromUiState) || this.getZoomLevel() !== zoomFromUiState) { - visualization.uiStateVal('mapZoom', this.getZoomLevel()); + uiState.set('mapZoom', this.getZoomLevel()); } const centerFromMap = this.getCenter(); if ( @@ -687,24 +686,17 @@ export class KibanaMap extends EventEmitter { centerFromMap.lon !== centerFromUIState[1] || centerFromMap.lat !== centerFromUIState[0] ) { - visualization.uiStateVal('mapCenter', [centerFromMap.lat, centerFromMap.lon]); + uiState.set('mapCenter', [centerFromMap.lat, centerFromMap.lon]); } } - this._leafletMap.on('resize', () => { - visualization.sessionState.mapBounds = this.getBounds(); - }); - this._leafletMap.on('load', () => { - visualization.sessionState.mapBounds = this.getBounds(); - }); this.on('dragend', persistMapStateInUiState); this.on('zoomend', persistMapStateInUiState); } - useUiStateFromVisualization(visualization) { - const uiState = visualization.getUiState(); - const zoomFromUiState = parseInt(uiState.get('mapZoom')); - const centerFromUIState = uiState.get('mapCenter'); + useUiStateFromVisualization(uiState) { + const zoomFromUiState = parseInt(uiState?.get('mapZoom')); + const centerFromUIState = uiState?.get('mapCenter'); if (!isNaN(zoomFromUiState)) { this.setZoomLevel(zoomFromUiState); } diff --git a/src/plugins/maps_legacy/public/map/precision.ts b/src/plugins/maps_legacy/public/map/precision.ts index a1b3b72f201a4..3dafd0813a174 100644 --- a/src/plugins/maps_legacy/public/map/precision.ts +++ b/src/plugins/maps_legacy/public/map/precision.ts @@ -19,7 +19,7 @@ // @ts-ignore import { getUiSettings } from '../kibana_services'; -import { geohashColumns } from './decode_geo_hash'; +import { geohashColumns } from './geohash_columns'; /** * Get the number of geohash columns (world-wide) for a given precision diff --git a/src/plugins/maps_legacy/public/map/zoom_to_precision.ts b/src/plugins/maps_legacy/public/map/zoom_to_precision.ts index 552c509590286..abad0a730a12d 100644 --- a/src/plugins/maps_legacy/public/map/zoom_to_precision.ts +++ b/src/plugins/maps_legacy/public/map/zoom_to_precision.ts @@ -17,7 +17,7 @@ * under the License. */ -import { geohashColumns } from './decode_geo_hash'; +import { geohashColumns } from './geohash_columns'; const defaultMaxPrecision = 12; const minGeoHashPixels = 16; diff --git a/src/plugins/region_map/public/__snapshots__/region_map_fn.test.js.snap b/src/plugins/region_map/public/__snapshots__/region_map_fn.test.ts.snap similarity index 93% rename from src/plugins/region_map/public/__snapshots__/region_map_fn.test.js.snap rename to src/plugins/region_map/public/__snapshots__/region_map_fn.test.ts.snap index cb12712ae824f..df72e75f5ad6b 100644 --- a/src/plugins/region_map/public/__snapshots__/region_map_fn.test.js.snap +++ b/src/plugins/region_map/public/__snapshots__/region_map_fn.test.ts.snap @@ -2,12 +2,9 @@ exports[`interpreter/functions#regionmap returns an object with the correct structure 1`] = ` Object { - "as": "visualization", + "as": "region_map_vis", "type": "render", "value": Object { - "params": Object { - "listenOnChange": true, - }, "visConfig": Object { "addTooltip": true, "colorSchema": "Yellow to Red", diff --git a/src/plugins/region_map/public/components/index.tsx b/src/plugins/region_map/public/components/index.tsx new file mode 100644 index 0000000000000..871bcde41400b --- /dev/null +++ b/src/plugins/region_map/public/components/index.tsx @@ -0,0 +1,29 @@ +/* + * 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, { lazy } from 'react'; +import { IServiceSettings } from 'src/plugins/maps_legacy/public'; +import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; +import { RegionMapVisParams } from '../region_map_types'; + +const RegionMapOptions = lazy(() => import('./region_map_options')); + +export const createRegionMapOptions = (getServiceSettings: () => Promise) => ( + props: VisOptionsProps +) => ; diff --git a/src/plugins/region_map/public/components/region_map_options.tsx b/src/plugins/region_map/public/components/region_map_options.tsx index b2bb250d66ee2..497d75853ceb4 100644 --- a/src/plugins/region_map/public/components/region_map_options.tsx +++ b/src/plugins/region_map/public/components/region_map_options.tsx @@ -24,7 +24,8 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { VisOptionsProps } from 'src/plugins/vis_default_editor/public'; import { FileLayerField, VectorLayer, IServiceSettings } from '../../../maps_legacy/public'; import { SelectOption, SwitchOption, NumberInputOption } from '../../../vis_default_editor/public'; -import { RegionMapVisParams, WmsOptions } from '../../../maps_legacy/public'; +import { WmsOptions } from '../../../maps_legacy/public'; +import { RegionMapVisParams } from '../region_map_types'; const mapLayerForOption = ({ layerId, name }: VectorLayer) => ({ text: name, @@ -212,4 +213,6 @@ function RegionMapOptions(props: RegionMapOptionsProps) { ); } -export { RegionMapOptions }; +// default export required for React.Lazy +// eslint-disable-next-line import/no-default-export +export { RegionMapOptions as default }; diff --git a/src/plugins/region_map/public/plugin.ts b/src/plugins/region_map/public/plugin.ts index e9978803ad5e2..6bb98858ad124 100644 --- a/src/plugins/region_map/public/plugin.ts +++ b/src/plugins/region_map/public/plugin.ts @@ -44,9 +44,10 @@ import { RegionMapsConfigType } from './index'; import { MapsLegacyConfig } from '../../maps_legacy/config'; import { KibanaLegacyStart } from '../../kibana_legacy/public'; import { SharePluginStart } from '../../share/public'; +import { getRegionMapRenderer } from './region_map_renderer'; /** @private */ -interface RegionMapVisualizationDependencies { +export interface RegionMapVisualizationDependencies { uiSettings: IUiSettingsClient; regionmapsConfig: RegionMapsConfig; getServiceSettings: () => Promise; @@ -107,6 +108,7 @@ export class RegionMapPlugin implements Plugin { }; it('returns an object with the correct structure', () => { - const actual = fn( - context, - { visConfig: JSON.stringify(visConfig) }, - { logDatatable: jest.fn() } - ); + const actual = fn(context, { visConfig: JSON.stringify(visConfig) }); expect(actual).toMatchSnapshot(); }); }); diff --git a/src/plugins/region_map/public/region_map_fn.js b/src/plugins/region_map/public/region_map_fn.ts similarity index 67% rename from src/plugins/region_map/public/region_map_fn.js rename to src/plugins/region_map/public/region_map_fn.ts index cc99a5595d096..74f41cf647b5c 100644 --- a/src/plugins/region_map/public/region_map_fn.js +++ b/src/plugins/region_map/public/region_map_fn.ts @@ -19,7 +19,27 @@ import { i18n } from '@kbn/i18n'; -export const createRegionMapFn = () => ({ +import type { ExpressionFunctionDefinition, Datatable, Render } from '../../expressions/public'; +import { RegionMapVisConfig } from './region_map_types'; + +interface Arguments { + visConfig: string | null; +} + +export interface RegionMapVisRenderValue { + visData: Datatable; + visType: 'region_map'; + visConfig: RegionMapVisConfig; +} + +export type RegionMapExpressionFunctionDefinition = ExpressionFunctionDefinition< + 'regionmap', + Datatable, + Arguments, + Render +>; + +export const createRegionMapFn = (): RegionMapExpressionFunctionDefinition => ({ name: 'regionmap', type: 'render', context: { @@ -32,24 +52,22 @@ export const createRegionMapFn = () => ({ visConfig: { types: ['string', 'null'], default: '"{}"', + help: '', }, }, fn(context, args, handlers) { - const visConfig = JSON.parse(args.visConfig); + const visConfig = args.visConfig && JSON.parse(args.visConfig); if (handlers?.inspectorAdapters?.tables) { handlers.inspectorAdapters.tables.logDatatable('default', context); } return { type: 'render', - as: 'visualization', + as: 'region_map_vis', value: { visData: context, visType: 'region_map', visConfig, - params: { - listenOnChange: true, - }, }, }; }, diff --git a/src/plugins/region_map/public/region_map_renderer.tsx b/src/plugins/region_map/public/region_map_renderer.tsx new file mode 100644 index 0000000000000..f0597389b3d0e --- /dev/null +++ b/src/plugins/region_map/public/region_map_renderer.tsx @@ -0,0 +1,52 @@ +/* + * 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, { lazy } from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; + +import { ExpressionRenderDefinition } from 'src/plugins/expressions'; +import { VisualizationContainer } from '../../visualizations/public'; +import { RegionMapVisualizationDependencies } from './plugin'; +import { RegionMapVisRenderValue } from './region_map_fn'; + +const RegionMapVisualization = lazy(() => import('./region_map_visualization_component')); + +export const getRegionMapRenderer: ( + deps: RegionMapVisualizationDependencies +) => ExpressionRenderDefinition = (deps) => ({ + name: 'region_map_vis', + reuseDomNode: true, + render: async (domNode, { visConfig, visData }, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render( + + + , + domNode + ); + }, +}); diff --git a/src/plugins/region_map/public/region_map_type.js b/src/plugins/region_map/public/region_map_type.ts similarity index 87% rename from src/plugins/region_map/public/region_map_type.js rename to src/plugins/region_map/public/region_map_type.ts index e7a339a6cc8b6..1603cfc1e2c0c 100644 --- a/src/plugins/region_map/public/region_map_type.js +++ b/src/plugins/region_map/public/region_map_type.ts @@ -16,19 +16,24 @@ * specific language governing permissions and limitations * under the License. */ -import React from 'react'; import { i18n } from '@kbn/i18n'; -import { mapToLayerWithId } from './util'; -import { createRegionMapVisualization } from './region_map_visualization'; -import { RegionMapOptions } from './components/region_map_options'; + +import { BaseVisTypeOptions } from '../../visualizations/public'; import { truncatedColorSchemas } from '../../charts/public'; import { ORIGIN } from '../../maps_legacy/public'; -import { getDeprecationMessage } from './get_deprecation_message'; -export function createRegionMapTypeDefinition(dependencies) { - const { uiSettings, regionmapsConfig, getServiceSettings } = dependencies; - const visualization = createRegionMapVisualization(dependencies); +import { getDeprecationMessage } from './get_deprecation_message'; +import { RegionMapVisualizationDependencies } from './plugin'; +import { createRegionMapOptions } from './components'; +import { toExpressionAst } from './to_ast'; +import { RegionMapVisParams } from './region_map_types'; +import { mapToLayerWithId } from './util'; +export function createRegionMapTypeDefinition({ + uiSettings, + regionmapsConfig, + getServiceSettings, +}: RegionMapVisualizationDependencies): BaseVisTypeOptions { return { name: 'region_map', getInfoMessage: getDeprecationMessage, @@ -50,14 +55,11 @@ provided base maps, or add your own. Darker colors represent higher values.', mapZoom: 2, mapCenter: [0, 0], outlineWeight: 1, - showAllShapes: true, //still under consideration + showAllShapes: true, // still under consideration }, }, - visualization, editorConfig: { - optionsTemplate: (props) => ( - - ), + optionsTemplate: createRegionMapOptions(getServiceSettings), collections: { colorSchemas: truncatedColorSchemas, vectorLayers: [], @@ -99,6 +101,7 @@ provided base maps, or add your own. Darker colors represent higher values.', }, ], }, + toExpressionAst, setup: async (vis) => { const serviceSettings = await getServiceSettings(); const tmsLayers = await serviceSettings.getTMSServices(); @@ -111,7 +114,7 @@ provided base maps, or add your own. Darker colors represent higher values.', mapToLayerWithId.bind(null, ORIGIN.KIBANA_YML) ); let selectedLayer = vectorLayers[0]; - let selectedJoinField = selectedLayer ? selectedLayer.fields[0] : null; + let selectedJoinField = selectedLayer ? selectedLayer.fields[0] : undefined; if (regionmapsConfig.includeElasticMapsService) { const layers = await serviceSettings.getFileLayers(); const newLayers = layers @@ -132,7 +135,7 @@ provided base maps, or add your own. Darker colors represent higher values.', vis.type.editorConfig.collections.vectorLayers = [...vectorLayers, ...newLayers]; [selectedLayer] = vis.type.editorConfig.collections.vectorLayers; - selectedJoinField = selectedLayer ? selectedLayer.fields[0] : null; + selectedJoinField = selectedLayer ? selectedLayer.fields[0] : undefined; if (selectedLayer && !vis.params.selectedLayer && selectedLayer.isEMS) { vis.params.emsHotLink = await serviceSettings.getEMSHotLink(selectedLayer); diff --git a/src/plugins/maps_legacy/public/common/types/region_map_types.ts b/src/plugins/region_map/public/region_map_types.ts similarity index 81% rename from src/plugins/maps_legacy/public/common/types/region_map_types.ts rename to src/plugins/region_map/public/region_map_types.ts index 0da597068f11e..044872be7a7ca 100644 --- a/src/plugins/maps_legacy/public/common/types/region_map_types.ts +++ b/src/plugins/region_map/public/region_map_types.ts @@ -17,8 +17,8 @@ * under the License. */ -import { VectorLayer, FileLayerField } from '../../index'; -import { WMSOptions } from './external_basemap_types'; +import { SchemaConfig } from 'src/plugins/visualizations/public'; +import { VectorLayer, FileLayerField, WMSOptions } from '../../maps_legacy/public/index'; export interface RegionMapVisParams { readonly addTooltip: true; @@ -34,3 +34,8 @@ export interface RegionMapVisParams { selectedJoinField?: FileLayerField; wms: WMSOptions; } + +export interface RegionMapVisConfig extends RegionMapVisParams { + metric: SchemaConfig; + bucket?: SchemaConfig; +} diff --git a/src/plugins/region_map/public/region_map_visualization.js b/src/plugins/region_map/public/region_map_visualization.js index ecb3541827cb3..4dfc6ead79449 100644 --- a/src/plugins/region_map/public/region_map_visualization.js +++ b/src/plugins/region_map/public/region_map_visualization.js @@ -30,9 +30,8 @@ export function createRegionMapVisualization({ getServiceSettings, }) { return class RegionMapsVisualization extends BaseMapsVisualization { - constructor(container, vis) { - super(container, vis); - this._vis = this.vis; + constructor(container, handlers, initialVisParams) { + super(container, handlers, initialVisParams); this._choroplethLayer = null; this._tooltipFormatter = mapTooltipProvider(container, tooltipFormatter); } @@ -88,7 +87,7 @@ export function createRegionMapVisualization({ ); } - this._kibanaMap.useUiStateFromVisualization(this._vis); + this._kibanaMap.useUiStateFromVisualization(this.handlers.uiState); } async _loadConfig(fileLayerConfig) { @@ -201,11 +200,18 @@ export function createRegionMapVisualization({ this._choroplethLayer.on('select', (event) => { const { rows, columns } = this._chartData; const rowIndex = rows.findIndex((row) => row[columns[0].id] === event); - this._vis.API.events.filter({ - table: this._chartData, - column: 0, - row: rowIndex, - value: event, + this.handlers.event({ + name: 'filterBucket', + data: { + data: [ + { + table: this._chartData, + column: 0, + row: rowIndex, + value: event, + }, + ], + }, }); }); diff --git a/src/plugins/region_map/public/region_map_visualization.scss b/src/plugins/region_map/public/region_map_visualization.scss new file mode 100644 index 0000000000000..ee593e2fc9c8c --- /dev/null +++ b/src/plugins/region_map/public/region_map_visualization.scss @@ -0,0 +1,4 @@ +.rgmChart__wrapper, .rgmChart { + flex: 1 1 0; + display: flex; +} diff --git a/src/plugins/region_map/public/region_map_visualization_component.tsx b/src/plugins/region_map/public/region_map_visualization_component.tsx new file mode 100644 index 0000000000000..7be210f953bf9 --- /dev/null +++ b/src/plugins/region_map/public/region_map_visualization_component.tsx @@ -0,0 +1,103 @@ +/* + * 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, { useEffect, useMemo, useRef } from 'react'; +import { EuiResizeObserver } from '@elastic/eui'; +import { throttle } from 'lodash'; + +import { IInterpreterRenderHandlers, Datatable } from 'src/plugins/expressions'; +import { PersistedState } from 'src/plugins/visualizations/public'; +import { RegionMapVisualizationDependencies } from './plugin'; +import { RegionMapVisConfig } from './region_map_types'; +// @ts-expect-error +import { createRegionMapVisualization } from './region_map_visualization'; + +import './region_map_visualization.scss'; + +interface RegionMapVisController { + render(visData?: Datatable, visConfig?: RegionMapVisConfig): Promise; + resize(): void; + destroy(): void; +} + +interface TileMapVisualizationProps { + deps: RegionMapVisualizationDependencies; + handlers: IInterpreterRenderHandlers; + visData: Datatable; + visConfig: RegionMapVisConfig; +} + +const RegionMapVisualization = ({ + deps, + handlers, + visData, + visConfig, +}: TileMapVisualizationProps) => { + const chartDiv = useRef(null); + const visController = useRef(null); + const isFirstRender = useRef(true); + const uiState = handlers.uiState as PersistedState | undefined; + + useEffect(() => { + if (chartDiv.current && isFirstRender.current) { + isFirstRender.current = false; + const Controller = createRegionMapVisualization(deps); + visController.current = new Controller(chartDiv.current, handlers, visConfig); + } + }, [deps, handlers, visConfig, visData]); + + useEffect(() => { + visController.current?.render(visData, visConfig).then(handlers.done); + }, [visData, visConfig, handlers.done]); + + useEffect(() => { + const onUiStateChange = () => { + visController.current?.render().then(handlers.done); + }; + + uiState?.on('change', onUiStateChange); + + return () => { + uiState?.off('change', onUiStateChange); + }; + }, [uiState, handlers.done]); + + useEffect(() => { + return () => { + visController.current?.destroy(); + visController.current = null; + }; + }, []); + + const updateChartSize = useMemo(() => throttle(() => visController.current?.resize(), 300), []); + + return ( + + {(resizeRef) => ( +
    +
    +
    + )} + + ); +}; + +// default export required for React.Lazy +// eslint-disable-next-line import/no-default-export +export { RegionMapVisualization as default }; diff --git a/src/plugins/region_map/public/to_ast.ts b/src/plugins/region_map/public/to_ast.ts new file mode 100644 index 0000000000000..90dc6583732b3 --- /dev/null +++ b/src/plugins/region_map/public/to_ast.ts @@ -0,0 +1,59 @@ +/* + * 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 { + EsaggsExpressionFunctionDefinition, + IndexPatternLoadExpressionFunctionDefinition, +} from '../../data/public'; +import { buildExpression, buildExpressionFunction } from '../../expressions/public'; +import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { RegionMapExpressionFunctionDefinition } from './region_map_fn'; +import { RegionMapVisConfig, RegionMapVisParams } from './region_map_types'; + +export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { + const esaggs = buildExpressionFunction('esaggs', { + index: buildExpression([ + buildExpressionFunction('indexPatternLoad', { + id: vis.data.indexPattern!.id!, + }), + ]), + metricsAtAllLevels: false, + partialRows: false, + aggs: vis.data.aggs!.aggs.map((agg) => buildExpression(agg.toExpressionAst())), + }); + + const schemas = getVisSchemas(vis, params); + + const visConfig: RegionMapVisConfig = { + ...vis.params, + metric: schemas.metric[0], + }; + + if (schemas.segment) { + visConfig.bucket = schemas.segment[0]; + } + + const regionmap = buildExpressionFunction('regionmap', { + visConfig: JSON.stringify(visConfig), + }); + + const ast = buildExpression([esaggs, regionmap]); + + return ast.toAst(); +}; diff --git a/src/plugins/runtime_fields/README.mdx b/src/plugins/runtime_fields/README.mdx deleted file mode 100644 index 15985b07caf96..0000000000000 --- a/src/plugins/runtime_fields/README.mdx +++ /dev/null @@ -1,4 +0,0 @@ - -# Runtime Fields - -The runtime fields plugin provides types and constants for OSS and xpack runtime field related code. diff --git a/src/plugins/runtime_fields/common/constants.ts b/src/plugins/runtime_fields/common/constants.ts deleted file mode 100644 index 568003508f4bd..0000000000000 --- a/src/plugins/runtime_fields/common/constants.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export const RUNTIME_FIELD_TYPES = ['keyword', 'long', 'double', 'date', 'ip', 'boolean'] as const; diff --git a/src/plugins/runtime_fields/kibana.json b/src/plugins/runtime_fields/kibana.json deleted file mode 100644 index e71116f81532e..0000000000000 --- a/src/plugins/runtime_fields/kibana.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "runtimeFields", - "version": "kibana", - "server": false, - "ui": true -} diff --git a/src/plugins/saved_objects_management/tsconfig.json b/src/plugins/saved_objects_management/tsconfig.json new file mode 100644 index 0000000000000..eb047c346714c --- /dev/null +++ b/src/plugins/saved_objects_management/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../dashboard/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../discover/tsconfig.json" }, + { "path": "../home/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../management/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + ] +} diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index dd3c06a159b81..e1c369dc003bd 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -4942,13 +4942,6 @@ } } }, - "tsvb-validation": { - "properties": { - "failed_validations": { - "type": "long" - } - } - }, "vis_type_vega": { "properties": { "vega_lib_specs_total": { diff --git a/src/plugins/telemetry_management_section/tsconfig.json b/src/plugins/telemetry_management_section/tsconfig.json new file mode 100644 index 0000000000000..48e40814b8570 --- /dev/null +++ b/src/plugins/telemetry_management_section/tsconfig.json @@ -0,0 +1,28 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "../../../typings/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + { "path": "../telemetry/tsconfig.json" }, + { "path": "../kibana_legacy/tsconfig.json"}, + { "path": "../ui_actions/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../home/tsconfig.json" }, + { "path": "../bfetch/tsconfig.json"}, + { "path": "../data/tsconfig.json"}, + { "path": "../advanced_settings/tsconfig.json" }, + { "path": "../management/tsconfig.json"} + ] +} diff --git a/src/plugins/tile_map/public/__snapshots__/tilemap_fn.test.js.snap b/src/plugins/tile_map/public/__snapshots__/tile_map_fn.test.ts.snap similarity index 93% rename from src/plugins/tile_map/public/__snapshots__/tilemap_fn.test.js.snap rename to src/plugins/tile_map/public/__snapshots__/tile_map_fn.test.ts.snap index d5f5127bae919..7aab8b02890c0 100644 --- a/src/plugins/tile_map/public/__snapshots__/tilemap_fn.test.js.snap +++ b/src/plugins/tile_map/public/__snapshots__/tile_map_fn.test.ts.snap @@ -2,12 +2,9 @@ exports[`interpreter/functions#tilemap returns an object with the correct structure 1`] = ` Object { - "as": "visualization", + "as": "tile_map_vis", "type": "render", "value": Object { - "params": Object { - "listenOnChange": true, - }, "visConfig": Object { "addTooltip": true, "colorSchema": "Yellow to Red", diff --git a/src/plugins/tile_map/public/_tile_map.scss b/src/plugins/tile_map/public/_tile_map.scss deleted file mode 100644 index 5e4b20f79fedf..0000000000000 --- a/src/plugins/tile_map/public/_tile_map.scss +++ /dev/null @@ -1,15 +0,0 @@ -// SASSTODO: Does this selector exist today? -.tilemap { - margin-bottom: 6px; - border: $euiBorderThin; - position: relative; -} - -/** -* 1. Visualizations have some padding by default but tilemaps look nice flush against the edge to maximize viewing -* space. -*/ -// SASSTODO: Does this selector exist today? -.tile_map { - padding: 0; /* 1. */ -} diff --git a/src/plugins/runtime_fields/common/types.ts b/src/plugins/tile_map/public/components/index.tsx similarity index 75% rename from src/plugins/runtime_fields/common/types.ts rename to src/plugins/tile_map/public/components/index.tsx index f16d3d75d6ecf..4a4f887046fe2 100644 --- a/src/plugins/runtime_fields/common/types.ts +++ b/src/plugins/tile_map/public/components/index.tsx @@ -17,13 +17,9 @@ * under the License. */ -import { RUNTIME_FIELD_TYPES } from './constants'; +import React, { lazy } from 'react'; +import type { TileMapOptionsProps } from './tile_map_options'; -export type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; -export interface RuntimeField { - name: string; - type: RuntimeType; - script: { - source: string; - }; -} +const TileMapOptions = lazy(() => import('./tile_map_options')); + +export const TileMapOptionsLazy = (props: TileMapOptionsProps) => ; diff --git a/src/plugins/tile_map/public/components/tile_map_options.tsx b/src/plugins/tile_map/public/components/tile_map_options.tsx index a6c0bb8a50dda..eda6b7b52fb45 100644 --- a/src/plugins/tile_map/public/components/tile_map_options.tsx +++ b/src/plugins/tile_map/public/components/tile_map_options.tsx @@ -28,7 +28,9 @@ import { SwitchOption, RangeOption, } from '../../../vis_default_editor/public'; -import { WmsOptions, TileMapVisParams, MapTypes } from '../../../maps_legacy/public'; +import { WmsOptions } from '../../../maps_legacy/public'; +import { TileMapVisParams } from '../types'; +import { MapTypes } from '../utils/map_types'; export type TileMapOptionsProps = VisOptionsProps; @@ -102,4 +104,6 @@ function TileMapOptions(props: TileMapOptionsProps) { ); } -export { TileMapOptions }; +// default export required for React.Lazy +// eslint-disable-next-line import/no-default-export +export { TileMapOptions as default }; diff --git a/src/plugins/tile_map/public/geohash_layer.js b/src/plugins/tile_map/public/geohash_layer.js index ca992a0d09ec9..83c86149de531 100644 --- a/src/plugins/tile_map/public/geohash_layer.js +++ b/src/plugins/tile_map/public/geohash_layer.js @@ -19,11 +19,12 @@ import { min, isEqual } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { KibanaMapLayer, MapTypes } from '../../maps_legacy/public'; +import { KibanaMapLayer } from '../../maps_legacy/public'; import { HeatmapMarkers } from './markers/heatmap'; import { ScaledCirclesMarkers } from './markers/scaled_circles'; import { ShadedCirclesMarkers } from './markers/shaded_circles'; import { GeohashGridMarkers } from './markers/geohash_grid'; +import { MapTypes } from './utils/map_types'; export class GeohashLayer extends KibanaMapLayer { constructor(featureCollection, featureCollectionMetaData, options, zoom, kibanaMap, leaflet) { diff --git a/src/plugins/tile_map/public/index.scss b/src/plugins/tile_map/public/index.scss deleted file mode 100644 index f4b86b0c31190..0000000000000 --- a/src/plugins/tile_map/public/index.scss +++ /dev/null @@ -1,8 +0,0 @@ -// Prefix all styles with "tlm" to avoid conflicts. -// Examples -// tlmChart -// tlmChart__legend -// tlmChart__legend--small -// tlmChart__legend-isLoading - -@import 'tile_map'; diff --git a/src/plugins/tile_map/public/plugin.ts b/src/plugins/tile_map/public/plugin.ts index dfcafafbe47f7..0a877d9595ec9 100644 --- a/src/plugins/tile_map/public/plugin.ts +++ b/src/plugins/tile_map/public/plugin.ts @@ -25,13 +25,6 @@ import { } from 'kibana/public'; import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public'; import { VisualizationsSetup } from '../../visualizations/public'; -// TODO: Determine why visualizations don't populate without this -import 'angular-sanitize'; - -// @ts-ignore -import { createTileMapFn } from './tile_map_fn'; -// @ts-ignore -import { createTileMapTypeDefinition } from './tile_map_type'; import { IServiceSettings, MapsLegacyPluginSetup } from '../../maps_legacy/public'; import { DataPublicPluginStart } from '../../data/public'; import { @@ -44,12 +37,16 @@ import { import { KibanaLegacyStart } from '../../kibana_legacy/public'; import { SharePluginStart } from '../../share/public'; +import { createTileMapFn } from './tile_map_fn'; +import { createTileMapTypeDefinition } from './tile_map_type'; +import { getTileMapRenderer } from './tile_map_renderer'; + export interface TileMapConfigType { tilemap: any; } /** @private */ -interface TileMapVisualizationDependencies { +export interface TileMapVisualizationDependencies { uiSettings: IUiSettingsClient; getZoomPrecision: any; getPrecision: any; @@ -98,7 +95,8 @@ export class TileMapPlugin implements Plugin createTileMapFn(visualizationDependencies)); + expressions.registerFunction(createTileMapFn); + expressions.registerRenderer(getTileMapRenderer(visualizationDependencies)); visualizations.createBaseVisualization(createTileMapTypeDefinition(visualizationDependencies)); diff --git a/src/plugins/tile_map/public/tilemap_fn.test.js b/src/plugins/tile_map/public/tile_map_fn.test.ts similarity index 83% rename from src/plugins/tile_map/public/tilemap_fn.test.js rename to src/plugins/tile_map/public/tile_map_fn.test.ts index 895842ea1e8f4..dde98b7fe84c0 100644 --- a/src/plugins/tile_map/public/tilemap_fn.test.js +++ b/src/plugins/tile_map/public/tile_map_fn.test.ts @@ -17,11 +17,10 @@ * under the License. */ -// eslint-disable-next-line import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; import { createTileMapFn } from './tile_map_fn'; -jest.mock('../../maps_legacy/public', () => ({ +jest.mock('./utils', () => ({ convertToGeoJson: jest.fn().mockReturnValue({ featureCollection: { type: 'FeatureCollection', @@ -36,7 +35,7 @@ jest.mock('../../maps_legacy/public', () => ({ }), })); -import { convertToGeoJson } from '../../maps_legacy/public'; +import { convertToGeoJson } from './utils'; describe('interpreter/functions#tilemap', () => { const fn = functionWrapper(createTileMapFn()); @@ -79,18 +78,14 @@ describe('interpreter/functions#tilemap', () => { jest.clearAllMocks(); }); - it('returns an object with the correct structure', () => { - const actual = fn( - context, - { visConfig: JSON.stringify(visConfig) }, - { logDatatable: jest.fn() } - ); + it('returns an object with the correct structure', async () => { + const actual = await fn(context, { visConfig: JSON.stringify(visConfig) }); expect(actual).toMatchSnapshot(); }); - it('calls response handler with correct values', () => { + it('calls response handler with correct values', async () => { const { geohash, metric, geocentroid } = visConfig.dimensions; - fn(context, { visConfig: JSON.stringify(visConfig) }, { logDatatable: jest.fn() }); + await fn(context, { visConfig: JSON.stringify(visConfig) }); expect(convertToGeoJson).toHaveBeenCalledTimes(1); expect(convertToGeoJson).toHaveBeenCalledWith(context, { geohash, diff --git a/src/plugins/tile_map/public/tile_map_fn.js b/src/plugins/tile_map/public/tile_map_fn.ts similarity index 66% rename from src/plugins/tile_map/public/tile_map_fn.js rename to src/plugins/tile_map/public/tile_map_fn.ts index 7a5f36be1eb9d..786913a1d2b1e 100644 --- a/src/plugins/tile_map/public/tile_map_fn.js +++ b/src/plugins/tile_map/public/tile_map_fn.ts @@ -16,10 +16,30 @@ * specific language governing permissions and limitations * under the License. */ -import { convertToGeoJson } from '../../maps_legacy/public'; + import { i18n } from '@kbn/i18n'; -export const createTileMapFn = () => ({ +import type { ExpressionFunctionDefinition, Datatable, Render } from '../../expressions/public'; +import { TileMapVisConfig, TileMapVisData } from './types'; + +interface Arguments { + visConfig: string | null; +} + +export interface TileMapVisRenderValue { + visData: TileMapVisData; + visType: 'tile_map'; + visConfig: TileMapVisConfig; +} + +export type TileMapExpressionFunctionDefinition = ExpressionFunctionDefinition< + 'tilemap', + Datatable, + Arguments, + Promise> +>; + +export const createTileMapFn = (): TileMapExpressionFunctionDefinition => ({ name: 'tilemap', type: 'render', context: { @@ -32,34 +52,30 @@ export const createTileMapFn = () => ({ visConfig: { types: ['string', 'null'], default: '"{}"', + help: '', }, }, - fn(context, args, handlers) { - const visConfig = JSON.parse(args.visConfig); + async fn(context, args, handlers) { + const visConfig = args.visConfig && JSON.parse(args.visConfig); const { geohash, metric, geocentroid } = visConfig.dimensions; + + const { convertToGeoJson } = await import('./utils'); const convertedData = convertToGeoJson(context, { geohash, metric, geocentroid, }); - if (geohash && geohash.accessor) { - convertedData.meta.geohash = context.columns[geohash.accessor].meta; - } - if (handlers?.inspectorAdapters?.tables) { handlers.inspectorAdapters.tables.logDatatable('default', context); } return { type: 'render', - as: 'visualization', + as: 'tile_map_vis', value: { visData: convertedData, visType: 'tile_map', visConfig, - params: { - listenOnChange: true, - }, }, }; }, diff --git a/src/plugins/tile_map/public/tile_map_renderer.tsx b/src/plugins/tile_map/public/tile_map_renderer.tsx new file mode 100644 index 0000000000000..a61d4a0cb79dc --- /dev/null +++ b/src/plugins/tile_map/public/tile_map_renderer.tsx @@ -0,0 +1,52 @@ +/* + * 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, { lazy } from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; + +import { ExpressionRenderDefinition } from 'src/plugins/expressions'; +import { VisualizationContainer } from '../../visualizations/public'; +import { TileMapVisualizationDependencies } from './plugin'; +import { TileMapVisRenderValue } from './tile_map_fn'; + +const TileMapVisualization = lazy(() => import('./tile_map_visualization_component')); + +export const getTileMapRenderer: ( + deps: TileMapVisualizationDependencies +) => ExpressionRenderDefinition = (deps) => ({ + name: 'tile_map_vis', + reuseDomNode: true, + render: async (domNode, { visConfig, visData }, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render( + + + , + domNode + ); + }, +}); diff --git a/src/plugins/tile_map/public/tile_map_type.js b/src/plugins/tile_map/public/tile_map_type.ts similarity index 90% rename from src/plugins/tile_map/public/tile_map_type.js rename to src/plugins/tile_map/public/tile_map_type.ts index 3e9b5516322d9..e1d0dfb9a116f 100644 --- a/src/plugins/tile_map/public/tile_map_type.js +++ b/src/plugins/tile_map/public/tile_map_type.ts @@ -17,17 +17,22 @@ * under the License. */ -import React from 'react'; import { i18n } from '@kbn/i18n'; -import { convertToGeoJson, MapTypes } from '../../maps_legacy/public'; -import { createTileMapVisualization } from './tile_map_visualization'; -import { TileMapOptions } from './components/tile_map_options'; -import { supportsCssFilters } from './css_filters'; +import { BaseVisTypeOptions } from 'src/plugins/visualizations/public'; import { truncatedColorSchemas } from '../../charts/public'; + +// @ts-expect-error +import { supportsCssFilters } from './css_filters'; +import { TileMapOptionsLazy } from './components'; import { getDeprecationMessage } from './get_deprecation_message'; +import { TileMapVisualizationDependencies } from './plugin'; +import { toExpressionAst } from './to_ast'; +import { TileMapVisParams } from './types'; +import { MapTypes } from './utils/map_types'; -export function createTileMapTypeDefinition(dependencies) { - const CoordinateMapsVisualization = createTileMapVisualization(dependencies); +export function createTileMapTypeDefinition( + dependencies: TileMapVisualizationDependencies +): BaseVisTypeOptions { const { uiSettings, getServiceSettings } = dependencies; return { @@ -54,8 +59,7 @@ export function createTileMapTypeDefinition(dependencies) { wms: uiSettings.get('visualization:tileMap:WMSdefaults'), }, }, - visualization: CoordinateMapsVisualization, - responseHandler: convertToGeoJson, + toExpressionAst, editorConfig: { collections: { colorSchemas: truncatedColorSchemas, @@ -113,7 +117,7 @@ export function createTileMapTypeDefinition(dependencies) { ], tmsLayers: [], }, - optionsTemplate: (props) => , + optionsTemplate: TileMapOptionsLazy, schemas: [ { group: 'metrics', diff --git a/src/plugins/tile_map/public/tile_map_visualization.js b/src/plugins/tile_map/public/tile_map_visualization.js index 80084be283658..2128aec49992f 100644 --- a/src/plugins/tile_map/public/tile_map_visualization.js +++ b/src/plugins/tile_map/public/tile_map_visualization.js @@ -19,12 +19,9 @@ import { get, round } from 'lodash'; import { getFormatService, getQueryService, getKibanaLegacy } from './services'; -import { - geoContains, - mapTooltipProvider, - lazyLoadMapsLegacyModules, -} from '../../maps_legacy/public'; +import { mapTooltipProvider, lazyLoadMapsLegacyModules } from '../../maps_legacy/public'; import { tooltipFormatter } from './tooltip_formatter'; +import { geoContains } from './utils'; function scaleBounds(bounds) { const scale = 0.5; // scale bounds by 50% @@ -57,8 +54,8 @@ export const createTileMapVisualization = (dependencies) => { const { getZoomPrecision, getPrecision, BaseMapsVisualization } = dependencies; return class CoordinateMapsVisualization extends BaseMapsVisualization { - constructor(element, vis) { - super(element, vis); + constructor(element, handlers, initialVisParams) { + super(element, handlers, initialVisParams); this._geohashLayer = null; this._tooltipFormatter = mapTooltipProvider(element, tooltipFormatter); @@ -84,10 +81,10 @@ export const createTileMapVisualization = (dependencies) => { // todo: autoPrecision should be vis parameter, not aggConfig one const zoomPrecision = getZoomPrecision(); updateVarsObject.data.precision = geohashAgg.sourceParams.params.autoPrecision - ? zoomPrecision[this.vis.getUiState().get('mapZoom')] + ? zoomPrecision[this.handlers.uiState.get('mapZoom')] : getPrecision(geohashAgg.sourceParams.params.precision); - this.vis.eventsSubject.next(updateVarsObject); + this.handlers.event(updateVarsObject); }; async render(esResponse, visParams) { @@ -96,13 +93,12 @@ export const createTileMapVisualization = (dependencies) => { } async _makeKibanaMap() { - await super._makeKibanaMap(); + await super._makeKibanaMap(this._params); let previousPrecision = this._kibanaMap.getGeohashPrecision(); let precisionChange = false; - const uiState = this.vis.getUiState(); - uiState.on('change', (prop) => { + this.handlers.uiState.on('change', (prop) => { if (prop === 'mapZoom' || prop === 'mapCenter') { this.updateGeohashAgg(); } @@ -250,8 +246,6 @@ export const createTileMapVisualization = (dependencies) => { const { filterManager } = getQueryService(); filterManager.addFilters([filter]); - - this.vis.updateState(); } _getGeoHashAgg() { diff --git a/src/plugins/tile_map/public/tile_map_visualization.scss b/src/plugins/tile_map/public/tile_map_visualization.scss new file mode 100644 index 0000000000000..4298b06c763da --- /dev/null +++ b/src/plugins/tile_map/public/tile_map_visualization.scss @@ -0,0 +1,4 @@ +.tlmChart__wrapper, .tlmChart { + flex: 1 1 0; + display: flex; +} diff --git a/src/plugins/tile_map/public/tile_map_visualization_component.tsx b/src/plugins/tile_map/public/tile_map_visualization_component.tsx new file mode 100644 index 0000000000000..f087ab59fe73b --- /dev/null +++ b/src/plugins/tile_map/public/tile_map_visualization_component.tsx @@ -0,0 +1,103 @@ +/* + * 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, { useEffect, useMemo, useRef } from 'react'; +import { EuiResizeObserver } from '@elastic/eui'; +import { throttle } from 'lodash'; + +import { IInterpreterRenderHandlers } from 'src/plugins/expressions'; +import { PersistedState } from 'src/plugins/visualizations/public'; +import { TileMapVisualizationDependencies } from './plugin'; +import { TileMapVisConfig, TileMapVisData } from './types'; +// @ts-expect-error +import { createTileMapVisualization } from './tile_map_visualization'; + +import './tile_map_visualization.scss'; + +interface TileMapVisController { + render(visData?: TileMapVisData, visConfig?: TileMapVisConfig): Promise; + resize(): void; + destroy(): void; +} + +interface TileMapVisualizationProps { + deps: TileMapVisualizationDependencies; + handlers: IInterpreterRenderHandlers; + visData: TileMapVisData; + visConfig: TileMapVisConfig; +} + +const TileMapVisualization = ({ + deps, + handlers, + visData, + visConfig, +}: TileMapVisualizationProps) => { + const chartDiv = useRef(null); + const visController = useRef(null); + const isFirstRender = useRef(true); + const uiState = handlers.uiState as PersistedState; + + useEffect(() => { + if (chartDiv.current && isFirstRender.current) { + isFirstRender.current = false; + const Controller = createTileMapVisualization(deps); + visController.current = new Controller(chartDiv.current, handlers, visConfig); + } + }, [deps, handlers, visConfig, visData]); + + useEffect(() => { + visController.current?.render(visData, visConfig).then(handlers.done); + }, [visData, visConfig, handlers.done]); + + useEffect(() => { + const onUiStateChange = () => { + visController.current?.render().then(handlers.done); + }; + + uiState.on('change', onUiStateChange); + + return () => { + uiState.off('change', onUiStateChange); + }; + }, [uiState, handlers.done]); + + useEffect(() => { + return () => { + visController.current?.destroy(); + visController.current = null; + }; + }, []); + + const updateChartSize = useMemo(() => throttle(() => visController.current?.resize(), 300), []); + + return ( + + {(resizeRef) => ( +
    +
    +
    + )} + + ); +}; + +// default export required for React.Lazy +// eslint-disable-next-line import/no-default-export +export { TileMapVisualization as default }; diff --git a/src/plugins/tile_map/public/to_ast.ts b/src/plugins/tile_map/public/to_ast.ts new file mode 100644 index 0000000000000..313ca3218591e --- /dev/null +++ b/src/plugins/tile_map/public/to_ast.ts @@ -0,0 +1,59 @@ +/* + * 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 { + EsaggsExpressionFunctionDefinition, + IndexPatternLoadExpressionFunctionDefinition, +} from '../../data/public'; +import { buildExpression, buildExpressionFunction } from '../../expressions/public'; +import { getVisSchemas, Vis, BuildPipelineParams } from '../../visualizations/public'; +import { TileMapExpressionFunctionDefinition } from './tile_map_fn'; +import { TileMapVisConfig, TileMapVisParams } from './types'; + +export const toExpressionAst = (vis: Vis, params: BuildPipelineParams) => { + const esaggs = buildExpressionFunction('esaggs', { + index: buildExpression([ + buildExpressionFunction('indexPatternLoad', { + id: vis.data.indexPattern!.id!, + }), + ]), + metricsAtAllLevels: false, + partialRows: false, + aggs: vis.data.aggs!.aggs.map((agg) => buildExpression(agg.toExpressionAst())), + }); + + const schemas = getVisSchemas(vis, params); + + const visConfig: TileMapVisConfig = { + ...vis.params, + dimensions: { + metric: schemas.metric[0], + geohash: schemas.segment ? schemas.segment[0] : null, + geocentroid: schemas.geo_centroid ? schemas.geo_centroid[0] : null, + }, + }; + + const tilemap = buildExpressionFunction('tilemap', { + visConfig: JSON.stringify(visConfig), + }); + + const ast = buildExpression([esaggs, tilemap]); + + return ast.toAst(); +}; diff --git a/src/plugins/maps_legacy/public/common/types/external_basemap_types.ts b/src/plugins/tile_map/public/types.ts similarity index 58% rename from src/plugins/maps_legacy/public/common/types/external_basemap_types.ts rename to src/plugins/tile_map/public/types.ts index be9c4d0d9c37b..360e0c474b21c 100644 --- a/src/plugins/maps_legacy/public/common/types/external_basemap_types.ts +++ b/src/plugins/tile_map/public/types.ts @@ -17,23 +17,29 @@ * under the License. */ -import { TmsLayer } from '../../index'; -import { MapTypes } from './map_types'; +import { FeatureCollection } from 'geojson'; +import type { SchemaConfig } from 'src/plugins/visualizations/public'; +import type { DatatableColumnMeta } from 'src/plugins/expressions'; +import type { WMSOptions } from 'src/plugins/maps_legacy/public'; +import type { MapTypes } from './utils/map_types'; -export interface WMSOptions { - selectedTmsLayer?: TmsLayer; - enabled: boolean; - url?: string; - options: { - version?: string; - layers?: string; - format: string; - transparent: boolean; - attribution?: string; - styles?: string; +export interface TileMapVisData { + featureCollection: FeatureCollection; + meta: { + min: number; + max: number; + geohash?: DatatableColumnMeta; + geohashPrecision: number | undefined; + geohashGridDimensionsAtEquator: [number, number] | undefined; }; } +export interface TileMapVisDimensions { + metric: SchemaConfig; + geohash: SchemaConfig | null; + geocentroid: SchemaConfig | null; +} + export interface TileMapVisParams { colorSchema: string; mapType: MapTypes; @@ -45,3 +51,7 @@ export interface TileMapVisParams { mapCenter: [number, number]; wms: WMSOptions; } + +export interface TileMapVisConfig extends TileMapVisParams { + dimensions: TileMapVisDimensions; +} diff --git a/src/plugins/maps_legacy/public/map/convert_to_geojson.js b/src/plugins/tile_map/public/utils/convert_to_geojson.ts similarity index 75% rename from src/plugins/maps_legacy/public/map/convert_to_geojson.js rename to src/plugins/tile_map/public/utils/convert_to_geojson.ts index bca21e4deea97..34fa0d8d4a6c0 100644 --- a/src/plugins/maps_legacy/public/map/convert_to_geojson.js +++ b/src/plugins/tile_map/public/utils/convert_to_geojson.ts @@ -17,11 +17,17 @@ * under the License. */ +import { Feature } from 'geojson'; +import type { Datatable } from '../../../expressions/public'; +import type { TileMapVisDimensions, TileMapVisData } from '../types'; import { decodeGeoHash } from './decode_geo_hash'; import { gridDimensions } from './grid_dimensions'; -export function convertToGeoJson(tabifiedResponse, { geohash, geocentroid, metric }) { - let features; +export function convertToGeoJson( + tabifiedResponse: Datatable, + { geohash, geocentroid, metric }: TileMapVisDimensions +): TileMapVisData { + let features: Feature[]; let min = Infinity; let max = -Infinity; @@ -41,7 +47,7 @@ export function convertToGeoJson(tabifiedResponse, { geohash, geocentroid, metri if (!geohashValue) return false; const geohashLocation = decodeGeoHash(geohashValue); - let pointCoordinates; + let pointCoordinates: number[]; if (geocentroidColumn) { const location = row[geocentroidColumn.id]; pointCoordinates = [location.lon, location.lat]; @@ -58,7 +64,7 @@ export function convertToGeoJson(tabifiedResponse, { geohash, geocentroid, metri const centerLatLng = [geohashLocation.latitude[2], geohashLocation.longitude[2]]; - if (geohash.params.useGeocentroid) { + if (geohash?.params.useGeocentroid) { // see https://github.com/elastic/elasticsearch/issues/24694 for why clampGrid is used pointCoordinates[0] = clampGrid( pointCoordinates[0], @@ -86,35 +92,41 @@ export function convertToGeoJson(tabifiedResponse, { geohash, geocentroid, metri geohash: geohashValue, geohash_meta: { center: centerLatLng, - rectangle: rectangle, + rectangle, }, - value: value, + value, }, - }; + } as Feature; }) - .filter((row) => row); + .filter((row): row is Feature => !!row); } } else { features = []; } - const featureCollection = { - type: 'FeatureCollection', - features: features, - }; - - return { - featureCollection: featureCollection, + const convertedData: TileMapVisData = { + featureCollection: { + type: 'FeatureCollection', + features, + }, meta: { - min: min, - max: max, - geohashPrecision: geohash && geohash.params.precision, - geohashGridDimensionsAtEquator: geohash && gridDimensions(geohash.params.precision), + min, + max, + geohashPrecision: geohash?.params.precision, + geohashGridDimensionsAtEquator: geohash?.params.precision + ? gridDimensions(geohash.params.precision) + : undefined, }, }; + + if (geohash && geohash.accessor) { + convertedData.meta.geohash = tabifiedResponse.columns[geohash.accessor].meta; + } + + return convertedData; } -function clampGrid(val, min, max) { +function clampGrid(val: number, min: number, max: number) { if (val > max) val = max; else if (val < min) val = min; return val; diff --git a/src/plugins/maps_legacy/public/map/decode_geo_hash.test.ts b/src/plugins/tile_map/public/utils/decode_geo_hash.test.ts similarity index 79% rename from src/plugins/maps_legacy/public/map/decode_geo_hash.test.ts rename to src/plugins/tile_map/public/utils/decode_geo_hash.test.ts index c1ca7e4c80383..5114314f2c0af 100644 --- a/src/plugins/maps_legacy/public/map/decode_geo_hash.test.ts +++ b/src/plugins/tile_map/public/utils/decode_geo_hash.test.ts @@ -17,14 +17,7 @@ * under the License. */ -import { geohashColumns, decodeGeoHash } from './decode_geo_hash'; - -test('geohashColumns', () => { - expect(geohashColumns(1)).toBe(8); - expect(geohashColumns(2)).toBe(8 * 4); - expect(geohashColumns(3)).toBe(8 * 4 * 8); - expect(geohashColumns(4)).toBe(8 * 4 * 8 * 4); -}); +import { decodeGeoHash } from './decode_geo_hash'; test('decodeGeoHash', () => { expect(decodeGeoHash('drm3btev3e86')).toEqual({ diff --git a/src/plugins/maps_legacy/public/map/decode_geo_hash.ts b/src/plugins/tile_map/public/utils/decode_geo_hash.ts similarity index 79% rename from src/plugins/maps_legacy/public/map/decode_geo_hash.ts rename to src/plugins/tile_map/public/utils/decode_geo_hash.ts index 65184a8244777..3ee8ab69e996f 100644 --- a/src/plugins/maps_legacy/public/map/decode_geo_hash.ts +++ b/src/plugins/tile_map/public/utils/decode_geo_hash.ts @@ -55,10 +55,11 @@ export function decodeGeoHash(geohash: string): DecodedGeoHash { }); lat[2] = (lat[0] + lat[1]) / 2; lon[2] = (lon[0] + lon[1]) / 2; + return { latitude: lat, longitude: lon, - } as DecodedGeoHash; + }; } function refineInterval(interval: number[], cd: number, mask: number) { @@ -69,26 +70,6 @@ function refineInterval(interval: number[], cd: number, mask: number) { } } -export function geohashColumns(precision: number): number { - return geohashCells(precision, 0); -} - -/** - * Get the number of geohash cells for a given precision - * - * @param {number} precision the geohash precision (1<=precision<=12). - * @param {number} axis constant for the axis 0=lengthwise (ie. columns, along longitude), 1=heightwise (ie. rows, along latitude). - * @returns {number} Number of geohash cells (rows or columns) at that precision - */ -function geohashCells(precision: number, axis: number) { - let cells = 1; - for (let i = 1; i <= precision; i += 1) { - /* On odd precisions, rows divide by 4 and columns by 8. Vice-versa on even precisions */ - cells *= i % 2 === axis ? 4 : 8; - } - return cells; -} - interface GeoBoundingBoxCoordinate { lat: number; lon: number; diff --git a/src/plugins/maps_legacy/public/map/grid_dimensions.js b/src/plugins/tile_map/public/utils/grid_dimensions.ts similarity index 92% rename from src/plugins/maps_legacy/public/map/grid_dimensions.js rename to src/plugins/tile_map/public/utils/grid_dimensions.ts index 0f84e972104ba..113909930598e 100644 --- a/src/plugins/maps_legacy/public/map/grid_dimensions.js +++ b/src/plugins/tile_map/public/utils/grid_dimensions.ts @@ -19,7 +19,7 @@ // geohash precision mapping of geohash grid cell dimensions (width x height, in meters) at equator. // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator -const gridAtEquator = { +const gridAtEquator: { [key: number]: [number, number] } = { 1: [5009400, 4992600], 2: [1252300, 624100], 3: [156500, 156000], @@ -34,6 +34,6 @@ const gridAtEquator = { 12: [0.037, 0.019], }; -export function gridDimensions(precision) { +export function gridDimensions(precision: number) { return gridAtEquator[precision]; } diff --git a/src/plugins/vis_type_timeseries/server/saved_objects/index.ts b/src/plugins/tile_map/public/utils/index.ts similarity index 88% rename from src/plugins/vis_type_timeseries/server/saved_objects/index.ts rename to src/plugins/tile_map/public/utils/index.ts index 5f7f5767f423d..1c3dd02f48425 100644 --- a/src/plugins/vis_type_timeseries/server/saved_objects/index.ts +++ b/src/plugins/tile_map/public/utils/index.ts @@ -17,4 +17,5 @@ * under the License. */ -export { tsvbTelemetrySavedObjectType } from './tsvb_telemetry'; +export { convertToGeoJson } from './convert_to_geojson'; +export { geoContains } from './decode_geo_hash'; diff --git a/src/plugins/maps_legacy/public/common/types/map_types.ts b/src/plugins/tile_map/public/utils/map_types.ts similarity index 100% rename from src/plugins/maps_legacy/public/common/types/map_types.ts rename to src/plugins/tile_map/public/utils/map_types.ts diff --git a/src/plugins/timelion/public/services/_saved_sheet.ts b/src/plugins/timelion/public/services/_saved_sheet.ts index 3fe66fabebe73..eafc8068fbfd1 100644 --- a/src/plugins/timelion/public/services/_saved_sheet.ts +++ b/src/plugins/timelion/public/services/_saved_sheet.ts @@ -69,5 +69,5 @@ export function createSavedSheetClass(savedObjects: SavedObjectsStart, config: I } } - return SavedSheet; + return SavedSheet as unknown; } diff --git a/src/plugins/timelion/tsconfig.json b/src/plugins/timelion/tsconfig.json new file mode 100644 index 0000000000000..5b96d69a878ea --- /dev/null +++ b/src/plugins/timelion/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../navigation/tsconfig.json" }, + { "path": "../vis_type_timelion/tsconfig.json" }, + { "path": "../saved_objects/tsconfig.json" }, + { "path": "../kibana_legacy/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_default_editor/public/components/controls/palette_picker.test.tsx b/src/plugins/vis_default_editor/public/components/controls/palette_picker.test.tsx new file mode 100644 index 0000000000000..1b4d7e060296a --- /dev/null +++ b/src/plugins/vis_default_editor/public/components/controls/palette_picker.test.tsx @@ -0,0 +1,59 @@ +/* + * 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 { mountWithIntl } from '@kbn/test/jest'; +import { ReactWrapper } from 'enzyme'; +import { PalettePicker, PalettePickerProps } from './palette_picker'; +import { chartPluginMock } from '../../../../charts/public/mocks'; +import { EuiColorPalettePicker } from '@elastic/eui'; + +describe('PalettePicker', function () { + let props: PalettePickerProps<'palette'>; + let component: ReactWrapper>; + + beforeAll(() => { + props = { + palettes: chartPluginMock.createPaletteRegistry(), + paramName: 'palette', + activePalette: { + type: 'palette', + name: 'kibana_palette', + }, + setPalette: jest.fn(), + }; + }); + + it('renders the EuiPalettePicker', () => { + component = mountWithIntl(); + expect(component.find(EuiColorPalettePicker).length).toBe(1); + }); + + it('renders the default palette if not activePalette is given', function () { + const { activePalette, ...newProps } = props; + component = mountWithIntl(); + const palettePicker = component.find(EuiColorPalettePicker); + expect(palettePicker.props().valueOfSelected).toBe('default'); + }); + + it('renders the activePalette palette if given', function () { + component = mountWithIntl(); + const palettePicker = component.find(EuiColorPalettePicker); + expect(palettePicker.props().valueOfSelected).toBe('kibana_palette'); + }); +}); diff --git a/src/plugins/vis_default_editor/public/components/controls/palette_picker.tsx b/src/plugins/vis_default_editor/public/components/controls/palette_picker.tsx new file mode 100644 index 0000000000000..8985ded413d46 --- /dev/null +++ b/src/plugins/vis_default_editor/public/components/controls/palette_picker.tsx @@ -0,0 +1,75 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import { PaletteOutput, PaletteRegistry } from 'src/plugins/charts/public'; +import { EuiColorPalettePicker } from '@elastic/eui'; +import { EuiFormRow } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +export interface PalettePickerProps { + activePalette?: PaletteOutput; + palettes: PaletteRegistry; + paramName: ParamName; + setPalette: (paramName: ParamName, value: PaletteOutput) => void; +} + +export function PalettePicker({ + activePalette, + palettes, + paramName, + setPalette, +}: PalettePickerProps) { + return ( + + !internal) + .map(({ id, title, getColors }) => { + return { + value: id, + title, + type: 'fixed', + palette: getColors( + 10, + id === activePalette?.name ? activePalette?.params : undefined + ), + }; + })} + onChange={(newPalette) => { + setPalette(paramName, { + type: 'palette', + name: newPalette, + }); + }} + valueOfSelected={activePalette?.name || 'default'} + selectionDisplay={'palette'} + /> + + ); +} diff --git a/src/plugins/vis_default_editor/public/index.ts b/src/plugins/vis_default_editor/public/index.ts index 06834ab19c876..bd907095baeeb 100644 --- a/src/plugins/vis_default_editor/public/index.ts +++ b/src/plugins/vis_default_editor/public/index.ts @@ -23,6 +23,7 @@ import { VisDefaultEditorPlugin } from './plugin'; export { DefaultEditorController }; export { useValidation } from './components/controls/utils'; +export { PalettePicker } from './components/controls/palette_picker'; export * from './components/options'; export { RangesParamEditor, RangeValues } from './components/controls/ranges'; export * from './editor_size'; diff --git a/src/plugins/vis_default_editor/tsconfig.json b/src/plugins/vis_default_editor/tsconfig.json new file mode 100644 index 0000000000000..27bb775c2d0e8 --- /dev/null +++ b/src/plugins/vis_default_editor/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../visualize/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_markdown/tsconfig.json b/src/plugins/vis_type_markdown/tsconfig.json new file mode 100644 index 0000000000000..d5ab89b98081b --- /dev/null +++ b/src/plugins/vis_type_markdown/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_metric/tsconfig.json b/src/plugins/vis_type_metric/tsconfig.json new file mode 100644 index 0000000000000..7441848d5a430 --- /dev/null +++ b/src/plugins/vis_type_metric/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["public/**/*", "server/**/*", "*.ts"], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" } + ] +} diff --git a/src/plugins/vis_type_table/public/legacy/vis_controller.ts b/src/plugins/vis_type_table/public/legacy/vis_controller.ts index eff8e34f3e778..7584397e78dc6 100644 --- a/src/plugins/vis_type_table/public/legacy/vis_controller.ts +++ b/src/plugins/vis_type_table/public/legacy/vis_controller.ts @@ -42,8 +42,8 @@ export function getTableVisualizationControllerClass( context: PluginInitializerContext ) { return class TableVisualizationController { - private tableVisModule: IModule | undefined; - private injector: auto.IInjectorService | undefined; + tableVisModule: IModule | undefined; + injector: auto.IInjectorService | undefined; el: JQuery; $rootScope: IRootScopeService | null = null; $scope: (IScope & { [key: string]: any }) | undefined; diff --git a/src/plugins/vis_type_table/tsconfig.json b/src/plugins/vis_type_table/tsconfig.json new file mode 100644 index 0000000000000..bda86d06c0ff7 --- /dev/null +++ b/src/plugins/vis_type_table/tsconfig.json @@ -0,0 +1,27 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../share/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_legacy/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_tagcloud/tsconfig.json b/src/plugins/vis_type_tagcloud/tsconfig.json new file mode 100644 index 0000000000000..18bbad2257466 --- /dev/null +++ b/src/plugins/vis_type_tagcloud/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_timelion/common/types.ts b/src/plugins/vis_type_timelion/common/types.ts index f7084948a14f7..fed380130b26d 100644 --- a/src/plugins/vis_type_timelion/common/types.ts +++ b/src/plugins/vis_type_timelion/common/types.ts @@ -19,7 +19,7 @@ type TimelionFunctionArgsTypes = 'seriesList' | 'number' | 'string' | 'boolean' | 'null'; -interface TimelionFunctionArgsSuggestion { +export interface TimelionFunctionArgsSuggestion { name: string; help: string; } diff --git a/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts b/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts index 7a630f36b51f4..896a827f6248c 100644 --- a/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts +++ b/src/plugins/vis_type_timelion/public/helpers/timelion_request_handler.ts @@ -73,12 +73,15 @@ export function getTimelionRequestHandler({ filters, query, visParams, + searchSessionId, }: { timeRange: TimeRange; filters: Filter[]; query: Query; visParams: TimelionVisParams; + searchSessionId?: string; }): Promise { + const dataSearch = getDataSearch(); const expression = visParams.expression; if (!expression) { @@ -93,7 +96,13 @@ export function getTimelionRequestHandler({ // parse the time range client side to make sure it behaves like other charts const timeRangeBounds = timefilter.calculateBounds(timeRange); - const sessionId = getDataSearch().session.getSessionId(); + const untrackSearch = + dataSearch.session.isCurrentSession(searchSessionId) && + dataSearch.session.trackSearch({ + abort: () => { + // TODO: support search cancellations + }, + }); try { return await http.post('/api/timelion/run', { @@ -110,7 +119,9 @@ export function getTimelionRequestHandler({ interval: visParams.interval, timezone, }, - sessionId, + ...(searchSessionId && { + searchSession: dataSearch.session.getSearchOptions(searchSessionId), + }), }), }); } catch (e) { @@ -125,6 +136,11 @@ export function getTimelionRequestHandler({ } else { throw e; } + } finally { + if (untrackSearch && dataSearch.session.isCurrentSession(searchSessionId)) { + // call `untrack` if this search still belongs to current session + untrackSearch(); + } } }; } diff --git a/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts b/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts index 2e8878b11e915..d4bf27ea53819 100644 --- a/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts +++ b/src/plugins/vis_type_timelion/public/timelion_vis_fn.ts @@ -30,23 +30,21 @@ import { KibanaContext, Filter, Query, TimeRange } from '../../data/public'; type Input = KibanaContext | null; type Output = Promise>; -interface Arguments { - expression: string; - interval: string; -} - export interface TimelionRenderValue { visData: TimelionSuccessResponse; visType: 'timelion'; visParams: TimelionVisParams; } -export type TimelionVisParams = Arguments; +export interface TimelionVisParams { + expression: string; + interval: string; +} export type TimelionExpressionFunctionDefinition = ExpressionFunctionDefinition< 'timelion_vis', Input, - Arguments, + TimelionVisParams, Output >; @@ -72,7 +70,7 @@ export const getTimelionVisualizationConfig = ( help: '', }, }, - async fn(input, args) { + async fn(input, args, { getSearchSessionId }) { const timelionRequestHandler = getTimelionRequestHandler(dependencies); const visParams = { expression: args.expression, interval: args.interval }; @@ -82,6 +80,7 @@ export const getTimelionVisualizationConfig = ( query: get(input, 'query') as Query, filters: get(input, 'filters') as Filter[], visParams, + searchSessionId: getSearchSessionId(), }); response.visType = TIMELION_VIS_NAME; diff --git a/src/plugins/vis_type_timelion/server/routes/run.ts b/src/plugins/vis_type_timelion/server/routes/run.ts index 5766705d9873d..af5af35e53b3f 100644 --- a/src/plugins/vis_type_timelion/server/routes/run.ts +++ b/src/plugins/vis_type_timelion/server/routes/run.ts @@ -75,7 +75,13 @@ export function runRoute( to: schema.maybe(schema.string()), }) ), - sessionId: schema.maybe(schema.string()), + searchSession: schema.maybe( + schema.object({ + sessionId: schema.string(), + isRestore: schema.boolean({ defaultValue: false }), + isStored: schema.boolean({ defaultValue: false }), + }) + ), }), }, }, diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js b/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js index f4ba36e4fdd67..b02baefea9919 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js +++ b/src/plugins/vis_type_timelion/server/series_functions/es/es.test.js @@ -60,19 +60,26 @@ describe('es', () => { }); }); - test('should call data search with sessionId', async () => { + test('should call data search with sessionId, isRestore and isStored', async () => { tlConfig = { ...stubRequestAndServer({ rawResponse: esResponse }), request: { body: { - sessionId: 1, + searchSession: { + sessionId: '1', + isRestore: true, + isStored: false, + }, }, }, }; await invoke(es, [5], tlConfig); - expect(tlConfig.context.search.search.mock.calls[0][1]).toHaveProperty('sessionId', 1); + const res = tlConfig.context.search.search.mock.calls[0][1]; + expect(res).toHaveProperty('sessionId', '1'); + expect(res).toHaveProperty('isRestore', true); + expect(res).toHaveProperty('isStored', false); }); test('returns a seriesList', () => { diff --git a/src/plugins/vis_type_timelion/server/series_functions/es/index.js b/src/plugins/vis_type_timelion/server/series_functions/es/index.js index 24b3668b5cd3c..579563088a0a8 100644 --- a/src/plugins/vis_type_timelion/server/series_functions/es/index.js +++ b/src/plugins/vis_type_timelion/server/series_functions/es/index.js @@ -133,7 +133,7 @@ export default new Datasource('es', { .search( body, { - sessionId: tlConfig.request?.body.sessionId, + ...tlConfig.request?.body.searchSession, }, tlConfig.context ) diff --git a/src/plugins/vis_type_timelion/tsconfig.json b/src/plugins/vis_type_timelion/tsconfig.json new file mode 100644 index 0000000000000..77f97de28366d --- /dev/null +++ b/src/plugins/vis_type_timelion/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_timeseries/common/vis_schema.ts b/src/plugins/vis_type_timeseries/common/vis_schema.ts index 40198ab98026e..e3773aada4c19 100644 --- a/src/plugins/vis_type_timeseries/common/vis_schema.ts +++ b/src/plugins/vis_type_timeseries/common/vis_schema.ts @@ -284,5 +284,12 @@ export const visPayloadSchema = schema.object({ min: stringRequired, max: stringRequired, }), - sessionId: schema.maybe(schema.string()), + + searchSession: schema.maybe( + schema.object({ + sessionId: schema.string(), + isRestore: schema.boolean({ defaultValue: false }), + isStored: schema.boolean({ defaultValue: false }), + }) + ), }); diff --git a/src/plugins/vis_type_timeseries/kibana.json b/src/plugins/vis_type_timeseries/kibana.json index 242b62a2c5ee4..aa5eac84663ad 100644 --- a/src/plugins/vis_type_timeseries/kibana.json +++ b/src/plugins/vis_type_timeseries/kibana.json @@ -5,6 +5,5 @@ "server": true, "ui": true, "requiredPlugins": ["charts", "data", "expressions", "visualizations", "visualize"], - "optionalPlugins": ["usageCollection"], "requiredBundles": ["kibanaUtils", "kibanaReact"] } diff --git a/src/plugins/vis_type_timeseries/public/metrics_fn.ts b/src/plugins/vis_type_timeseries/public/metrics_fn.ts index 60acd35b22402..825b964270794 100644 --- a/src/plugins/vis_type_timeseries/public/metrics_fn.ts +++ b/src/plugins/vis_type_timeseries/public/metrics_fn.ts @@ -65,7 +65,7 @@ export const createMetricsFn = (): TimeseriesExpressionFunctionDefinition => ({ help: '', }, }, - async fn(input, args) { + async fn(input, args, { getSearchSessionId }) { const visParams: TimeseriesVisParams = JSON.parse(args.params); const uiState = JSON.parse(args.uiState); @@ -73,6 +73,7 @@ export const createMetricsFn = (): TimeseriesExpressionFunctionDefinition => ({ input, visParams, uiState, + searchSessionId: getSearchSessionId(), }); return { diff --git a/src/plugins/vis_type_timeseries/public/request_handler.ts b/src/plugins/vis_type_timeseries/public/request_handler.ts index aa45453515277..16b5e4c2dc4fa 100644 --- a/src/plugins/vis_type_timeseries/public/request_handler.ts +++ b/src/plugins/vis_type_timeseries/public/request_handler.ts @@ -29,39 +29,57 @@ interface MetricsRequestHandlerParams { input: KibanaContext | null; uiState: Record; visParams: TimeseriesVisParams; + searchSessionId?: string; } export const metricsRequestHandler = async ({ input, uiState, visParams, + searchSessionId, }: MetricsRequestHandlerParams): Promise => { const config = getUISettings(); const timezone = getTimezone(config); const uiStateObj = uiState[visParams.type] ?? {}; - const dataSearch = getDataStart(); - const parsedTimeRange = dataSearch.query.timefilter.timefilter.calculateBounds(input?.timeRange!); + const data = getDataStart(); + const dataSearch = getDataStart().search; + const parsedTimeRange = data.query.timefilter.timefilter.calculateBounds(input?.timeRange!); if (visParams && visParams.id && !visParams.isModelInvalid) { const maxBuckets = config.get(MAX_BUCKETS_SETTING); validateInterval(parsedTimeRange, visParams, maxBuckets); - const resp = await getCoreStart().http.post(ROUTES.VIS_DATA, { - body: JSON.stringify({ - timerange: { - timezone, - ...parsedTimeRange, + const untrackSearch = + dataSearch.session.isCurrentSession(searchSessionId) && + dataSearch.session.trackSearch({ + abort: () => { + // TODO: support search cancellations }, - query: input?.query, - filters: input?.filters, - panels: [visParams], - state: uiStateObj, - sessionId: dataSearch.search.session.getSessionId(), - }), - }); + }); - return resp; + try { + return await getCoreStart().http.post(ROUTES.VIS_DATA, { + body: JSON.stringify({ + timerange: { + timezone, + ...parsedTimeRange, + }, + query: input?.query, + filters: input?.filters, + panels: [visParams], + state: uiStateObj, + ...(searchSessionId && { + searchSession: dataSearch.session.getSearchOptions(searchSessionId), + }), + }), + }); + } finally { + if (untrackSearch && dataSearch.session.isCurrentSession(searchSessionId)) { + // untrack if this search still belongs to current session + untrackSearch(); + } + } } return {}; diff --git a/src/plugins/vis_type_timeseries/server/index.ts b/src/plugins/vis_type_timeseries/server/index.ts index 1037dc81b2b17..993a424e570e4 100644 --- a/src/plugins/vis_type_timeseries/server/index.ts +++ b/src/plugins/vis_type_timeseries/server/index.ts @@ -37,8 +37,6 @@ export const config: PluginConfigDescriptor = { schema: configSchema, }; -export { ValidationTelemetryServiceSetup } from './validation_telemetry'; - export { AbstractSearchStrategy, ReqFacade, diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.js b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.js index 3e3e654617e76..704f865bf7f6e 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.js +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.js @@ -66,7 +66,11 @@ describe('AbstractSearchStrategy', () => { const responses = await abstractSearchStrategy.search( { payload: { - sessionId: 1, + searchSession: { + sessionId: '1', + isRestore: false, + isStored: true, + }, }, requestContext: { search: { search: searchFn }, @@ -85,7 +89,9 @@ describe('AbstractSearchStrategy', () => { indexType: undefined, }, { - sessionId: 1, + sessionId: '1', + isRestore: false, + isStored: true, } ); }); diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts index e27241c5eef62..77da99fb29330 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts @@ -66,7 +66,6 @@ const toSanitizedFieldType = (fields: IFieldType[]) => { export abstract class AbstractSearchStrategy { async search(req: ReqFacade, bodies: any[], indexType?: string) { const requests: any[] = []; - const { sessionId } = req.payload; bodies.forEach((body) => { requests.push( @@ -78,9 +77,7 @@ export abstract class AbstractSearchStrategy { ...body, }, }, - { - sessionId, - } + req.payload.searchSession ) .toPromise() ); diff --git a/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/unit_to_seconds.ts b/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/unit_to_seconds.ts index 8950e05c85d4f..22dfc590245ac 100644 --- a/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/unit_to_seconds.ts +++ b/src/plugins/vis_type_timeseries/server/lib/vis_data/helpers/unit_to_seconds.ts @@ -37,7 +37,7 @@ const units: Record = { const sortedUnits = sortBy(Object.keys(units), (key: Unit) => units[key]); -interface ParsedInterval { +export interface ParsedInterval { value: number; unit: Unit; } diff --git a/src/plugins/vis_type_timeseries/server/plugin.ts b/src/plugins/vis_type_timeseries/server/plugin.ts index aabfa8a40e064..5dd67eaa21a84 100644 --- a/src/plugins/vis_type_timeseries/server/plugin.ts +++ b/src/plugins/vis_type_timeseries/server/plugin.ts @@ -31,7 +31,6 @@ import { Observable } from 'rxjs'; import { Server } from '@hapi/hapi'; import { VisTypeTimeseriesConfig } from './config'; import { getVisData, GetVisData, GetVisDataOptions } from './lib/get_vis_data'; -import { ValidationTelemetryService } from './validation_telemetry'; import { UsageCollectionSetup } from '../../usage_collection/server'; import { PluginStart } from '../../data/server'; import { visDataRoutes } from './routes/vis'; @@ -72,11 +71,8 @@ export interface Framework { } export class VisTypeTimeseriesPlugin implements Plugin { - private validationTelementryService: ValidationTelemetryService; - constructor(private readonly initializerContext: PluginInitializerContext) { this.initializerContext = initializerContext; - this.validationTelementryService = new ValidationTelemetryService(); } public setup( @@ -102,15 +98,8 @@ export class VisTypeTimeseriesPlugin implements Plugin { searchStrategyRegistry, }; - (async () => { - const validationTelemetry = await this.validationTelementryService.setup(core, { - ...plugins, - globalConfig$, - }); - visDataRoutes(router, framework, validationTelemetry); - - fieldsRoutes(framework); - })(); + visDataRoutes(router, framework); + fieldsRoutes(framework); return { getVisData: async ( diff --git a/src/plugins/vis_type_timeseries/server/routes/vis.ts b/src/plugins/vis_type_timeseries/server/routes/vis.ts index 3ed9aaaaea226..67e0676ec1f5c 100644 --- a/src/plugins/vis_type_timeseries/server/routes/vis.ts +++ b/src/plugins/vis_type_timeseries/server/routes/vis.ts @@ -23,16 +23,11 @@ import { ensureNoUnsafeProperties } from '@kbn/std'; import { getVisData, GetVisDataOptions } from '../lib/get_vis_data'; import { visPayloadSchema } from '../../common/vis_schema'; import { ROUTES } from '../../common/constants'; -import { ValidationTelemetryServiceSetup } from '../index'; import { Framework } from '../plugin'; const escapeHatch = schema.object({}, { unknowns: 'allow' }); -export const visDataRoutes = ( - router: IRouter, - framework: Framework, - { logFailedValidation }: ValidationTelemetryServiceSetup -) => { +export const visDataRoutes = (router: IRouter, framework: Framework) => { router.post( { path: ROUTES.VIS_DATA, @@ -52,9 +47,7 @@ export const visDataRoutes = ( try { visPayloadSchema.validate(request.body); } catch (error) { - logFailedValidation(); - - framework.logger.warn( + framework.logger.debug( `Request validation error: ${error.message}. This most likely means your TSVB visualization contains outdated configuration. You can report this problem under https://github.com/elastic/kibana/issues/new?template=Bug_report.md` ); } diff --git a/src/plugins/vis_type_timeseries/server/saved_objects/tsvb_telemetry.ts b/src/plugins/vis_type_timeseries/server/saved_objects/tsvb_telemetry.ts deleted file mode 100644 index dd748ea2d3815..0000000000000 --- a/src/plugins/vis_type_timeseries/server/saved_objects/tsvb_telemetry.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { flow } from 'lodash'; -import { SavedObjectMigrationFn, SavedObjectsType } from 'kibana/server'; - -const resetCount: SavedObjectMigrationFn = (doc) => ({ - ...doc, - attributes: { - ...doc.attributes, - failedRequests: 0, - }, -}); - -export const tsvbTelemetrySavedObjectType: SavedObjectsType = { - name: 'tsvb-validation-telemetry', - hidden: false, - namespaceType: 'agnostic', - mappings: { - properties: { - failedRequests: { - type: 'long', - }, - }, - }, - migrations: { - '7.7.0': flow(resetCount), - '7.8.0': flow(resetCount), - '7.9.0': flow(resetCount), - '7.10.0': flow(resetCount), - }, -}; diff --git a/src/plugins/vis_type_timeseries/server/validation_telemetry/index.ts b/src/plugins/vis_type_timeseries/server/validation_telemetry/index.ts deleted file mode 100644 index 140f61fa2f3fd..0000000000000 --- a/src/plugins/vis_type_timeseries/server/validation_telemetry/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from './validation_telemetry_service'; diff --git a/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts b/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts deleted file mode 100644 index 0e9196eb165e9..0000000000000 --- a/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { CoreSetup, Plugin, PluginInitializerContext } from 'kibana/server'; -import { UsageCollectionSetup } from '../../../usage_collection/server'; -import { tsvbTelemetrySavedObjectType } from '../saved_objects'; - -export interface ValidationTelemetryServiceSetup { - logFailedValidation: () => void; -} -export interface Usage { - failed_validations: number; -} - -export class ValidationTelemetryService implements Plugin { - private kibanaIndex: string = ''; - async setup( - core: CoreSetup, - { - usageCollection, - globalConfig$, - }: { - usageCollection?: UsageCollectionSetup; - globalConfig$: PluginInitializerContext['config']['legacy']['globalConfig$']; - } - ) { - core.savedObjects.registerType(tsvbTelemetrySavedObjectType); - globalConfig$.subscribe((config) => { - this.kibanaIndex = config.kibana.index; - }); - if (usageCollection) { - usageCollection.registerCollector( - usageCollection.makeUsageCollector({ - type: 'tsvb-validation', - isReady: () => this.kibanaIndex !== '', - fetch: async ({ esClient }) => { - try { - const { body: response } = await esClient.get( - { - index: this.kibanaIndex, - id: 'tsvb-validation-telemetry:tsvb-validation-telemetry', - }, - { ignore: [404] } - ); - return { - failed_validations: - response?._source?.['tsvb-validation-telemetry']?.failedRequests || 0, - }; - } catch (err) { - return { - failed_validations: 0, - }; - } - }, - schema: { - failed_validations: { type: 'long' }, - }, - }) - ); - } - const internalRepositoryPromise = core - .getStartServices() - .then(([start]) => start.savedObjects.createInternalRepository()); - - return { - logFailedValidation: async () => { - try { - const internalRepository = await internalRepositoryPromise; - await internalRepository.incrementCounter( - 'tsvb-validation-telemetry', - 'tsvb-validation-telemetry', - ['failedRequests'] - ); - } catch (e) { - // swallow error, validation telemetry shouldn't fail anything else - } - }, - }; - } - start() {} -} diff --git a/src/plugins/vis_type_timeseries/tsconfig.json b/src/plugins/vis_type_timeseries/tsconfig.json new file mode 100644 index 0000000000000..7b2dd4b608c1c --- /dev/null +++ b/src/plugins/vis_type_timeseries/tsconfig.json @@ -0,0 +1,27 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "*.ts" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../visualize/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_vega/public/data_model/search_api.ts b/src/plugins/vis_type_vega/public/data_model/search_api.ts index be58e3e3951eb..1a91079848eba 100644 --- a/src/plugins/vis_type_vega/public/data_model/search_api.ts +++ b/src/plugins/vis_type_vega/public/data_model/search_api.ts @@ -40,7 +40,8 @@ export class SearchAPI { constructor( private readonly dependencies: SearchAPIDependencies, private readonly abortSignal?: AbortSignal, - public readonly inspectorAdapters?: VegaInspectorAdapters + public readonly inspectorAdapters?: VegaInspectorAdapters, + private readonly searchSessionId?: string ) {} search(searchRequests: SearchRequest[]) { @@ -60,10 +61,7 @@ export class SearchAPI { } return search - .search( - { params }, - { abortSignal: this.abortSignal, sessionId: search.session.getSessionId() } - ) + .search({ params }, { abortSignal: this.abortSignal, sessionId: this.searchSessionId }) .pipe( tap((data) => this.inspectSearchResult(data, requestResponders[requestId])), map((data) => ({ diff --git a/src/plugins/vis_type_vega/public/vega_fn.ts b/src/plugins/vis_type_vega/public/vega_fn.ts index 5a8113aeeea11..70f01aa65f822 100644 --- a/src/plugins/vis_type_vega/public/vega_fn.ts +++ b/src/plugins/vis_type_vega/public/vega_fn.ts @@ -74,6 +74,7 @@ export const createVegaFn = ( query: get(input, 'query') as Query, filters: get(input, 'filters') as any, visParams: { spec: args.spec }, + searchSessionId: context.getSearchSessionId(), }); return { diff --git a/src/plugins/vis_type_vega/public/vega_request_handler.ts b/src/plugins/vis_type_vega/public/vega_request_handler.ts index f48b61ed70822..1f60feebe7efa 100644 --- a/src/plugins/vis_type_vega/public/vega_request_handler.ts +++ b/src/plugins/vis_type_vega/public/vega_request_handler.ts @@ -32,6 +32,7 @@ interface VegaRequestHandlerParams { filters: Filter; timeRange: TimeRange; visParams: VisParams; + searchSessionId?: string; } interface VegaRequestHandlerContext { @@ -52,6 +53,7 @@ export function createVegaRequestHandler( filters, query, visParams, + searchSessionId, }: VegaRequestHandlerParams) { if (!searchAPI) { searchAPI = new SearchAPI( @@ -61,7 +63,8 @@ export function createVegaRequestHandler( injectedMetadata: getInjectedMetadata(), }, context.abortSignal, - context.inspectorAdapters + context.inspectorAdapters, + searchSessionId ); } diff --git a/src/plugins/vis_type_vislib/public/to_ast.test.ts b/src/plugins/vis_type_vislib/public/to_ast.test.ts index 48d3dfe254d0b..28049be291723 100644 --- a/src/plugins/vis_type_vislib/public/to_ast.test.ts +++ b/src/plugins/vis_type_vislib/public/to_ast.test.ts @@ -22,7 +22,7 @@ import { buildExpression } from '../../expressions/public'; import { BasicVislibParams } from './types'; import { toExpressionAst } from './to_ast'; -import { sampleAreaVis } from './sample_vis.test.mocks'; +import { sampleAreaVis } from '../../vis_type_xy/public/sample_vis.test.mocks'; jest.mock('../../expressions/public', () => ({ ...(jest.requireActual('../../expressions/public') as any), diff --git a/src/plugins/vis_type_vislib/public/to_ast_pie.test.ts b/src/plugins/vis_type_vislib/public/to_ast_pie.test.ts index 36a9a17341bc5..08a74a37f380c 100644 --- a/src/plugins/vis_type_vislib/public/to_ast_pie.test.ts +++ b/src/plugins/vis_type_vislib/public/to_ast_pie.test.ts @@ -21,7 +21,7 @@ import { Vis } from '../../visualizations/public'; import { buildExpression } from '../../expressions/public'; import { PieVisParams } from './pie'; -import { samplePieVis } from './sample_vis.test.mocks'; +import { samplePieVis } from '../../vis_type_xy/public/sample_vis.test.mocks'; import { toExpressionAst } from './to_ast_pie'; jest.mock('../../expressions/public', () => ({ diff --git a/src/plugins/vis_type_vislib/public/vis_controller.tsx b/src/plugins/vis_type_vislib/public/vis_controller.tsx index 2a32d19874c22..a536ac4b207ea 100644 --- a/src/plugins/vis_type_vislib/public/vis_controller.tsx +++ b/src/plugins/vis_type_vislib/public/vis_controller.tsx @@ -44,8 +44,8 @@ export const createVislibVisController = ( charts: ChartsPluginSetup ) => { return class VislibVisController { - private removeListeners?: () => void; - private unmountLegend?: () => void; + removeListeners?: () => void; + unmountLegend?: () => void; legendRef: RefObject; container: HTMLDivElement; diff --git a/src/plugins/vis_type_vislib/tsconfig.json b/src/plugins/vis_type_vislib/tsconfig.json new file mode 100644 index 0000000000000..74bc1440d9dbc --- /dev/null +++ b/src/plugins/vis_type_vislib/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../kibana_legacy/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + { "path": "../vis_type_xy/tsconfig.json" }, + ] +} diff --git a/src/plugins/vis_type_xy/public/editor/components/options/point_series/elastic_charts_options.tsx b/src/plugins/vis_type_xy/public/editor/components/options/point_series/elastic_charts_options.tsx index a3e573741644c..08fd0155b0d4b 100644 --- a/src/plugins/vis_type_xy/public/editor/components/options/point_series/elastic_charts_options.tsx +++ b/src/plugins/vis_type_xy/public/editor/components/options/point_series/elastic_charts_options.tsx @@ -17,20 +17,26 @@ * under the License. */ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; -import { SelectOption, SwitchOption } from '../../../../../../vis_default_editor/public'; +import { + SelectOption, + SwitchOption, + PalettePicker, +} from '../../../../../../vis_default_editor/public'; +import { PaletteRegistry } from '../../../../../../charts/public'; import { ChartType } from '../../../../../common'; import { VisParams } from '../../../../types'; import { ValidationVisOptionsProps } from '../../common'; -import { getTrackUiMetric } from '../../../../services'; +import { getPalettesService, getTrackUiMetric } from '../../../../services'; export function ElasticChartsOptions(props: ValidationVisOptionsProps) { const trackUiMetric = getTrackUiMetric(); + const [palettesRegistry, setPalettesRegistry] = useState(null); const { stateParams, setValue, vis, aggs } = props; const hasLineChart = stateParams.seriesParams.some( @@ -39,6 +45,14 @@ export function ElasticChartsOptions(props: ValidationVisOptionsProps aggs.aggs.find(({ id }) => id === paramId)?.enabled ); + useEffect(() => { + const fetchPalettes = async () => { + const palettes = await getPalettesService().getPalettes(); + setPalettesRegistry(palettes); + }; + fetchPalettes(); + }, []); + return ( <> }} /> )} + + {palettesRegistry && ( + { + if (trackUiMetric) { + trackUiMetric(METRIC_TYPE.CLICK, 'palette_selected'); + } + setValue(paramName, value); + }} + /> + )} ); } diff --git a/src/plugins/vis_type_xy/public/plugin.ts b/src/plugins/vis_type_xy/public/plugin.ts index ab22ae57ebbdf..cdacc1bfaca6a 100644 --- a/src/plugins/vis_type_xy/public/plugin.ts +++ b/src/plugins/vis_type_xy/public/plugin.ts @@ -29,10 +29,10 @@ import { setDataActions, setFormatService, setThemeService, - setColorsService, setTimefilter, setUISettings, setDocLinks, + setPalettesService, setTrackUiMetric, } from './services'; import { visTypesDefinitions } from './vis_types'; @@ -77,8 +77,7 @@ export class VisTypeXyPlugin if (!core.uiSettings.get(LEGACY_CHARTS_LIBRARY, false)) { setUISettings(core.uiSettings); setThemeService(charts.theme); - setColorsService(charts.legacyColors); - + setPalettesService(charts.palettes); [createVisTypeXyVisFn].forEach(expressions.registerFunction); expressions.registerRenderer(xyVisRenderer); visTypesDefinitions.forEach(visualizations.createBaseVisualization); diff --git a/src/plugins/vis_type_vislib/public/sample_vis.test.mocks.ts b/src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts similarity index 100% rename from src/plugins/vis_type_vislib/public/sample_vis.test.mocks.ts rename to src/plugins/vis_type_xy/public/sample_vis.test.mocks.ts diff --git a/src/plugins/vis_type_xy/public/services.ts b/src/plugins/vis_type_xy/public/services.ts index 086cab8fb217a..67d38d6647a98 100644 --- a/src/plugins/vis_type_xy/public/services.ts +++ b/src/plugins/vis_type_xy/public/services.ts @@ -43,9 +43,9 @@ export const [getThemeService, setThemeService] = createGetterSetter('xy charts.color'); +export const [getPalettesService, setPalettesService] = createGetterSetter< + ChartsPluginSetup['palettes'] +>('xy charts.palette'); export const [getDocLinks, setDocLinks] = createGetterSetter('DocLinks'); diff --git a/src/plugins/vis_type_xy/public/to_ast.test.ts b/src/plugins/vis_type_xy/public/to_ast.test.ts index 678a9faaec585..b6dedd694eb95 100644 --- a/src/plugins/vis_type_xy/public/to_ast.test.ts +++ b/src/plugins/vis_type_xy/public/to_ast.test.ts @@ -19,7 +19,7 @@ import { Vis } from '../../visualizations/public'; import { buildExpression } from '../../expressions/public'; -import { sampleAreaVis } from '../../vis_type_vislib/public/sample_vis.test.mocks'; +import { sampleAreaVis } from './sample_vis.test.mocks'; import { toExpressionAst } from './to_ast'; import { VisParams } from './types'; diff --git a/src/plugins/vis_type_xy/public/types/param.ts b/src/plugins/vis_type_xy/public/types/param.ts index c8cd020dec03c..69b5fe6158bd7 100644 --- a/src/plugins/vis_type_xy/public/types/param.ts +++ b/src/plugins/vis_type_xy/public/types/param.ts @@ -18,7 +18,7 @@ */ import { Fit, Position } from '@elastic/charts'; -import { Style, Labels } from '../../../charts/public'; +import { Style, Labels, PaletteOutput } from '../../../charts/public'; import { SchemaConfig } from '../../../visualizations/public'; import { ChartType } from '../../common'; @@ -156,5 +156,6 @@ export interface VisParams { * Add for detailed tooltip option */ detailedTooltip?: boolean; + palette: PaletteOutput; fittingFunction?: Exclude; } diff --git a/src/plugins/vis_type_xy/public/utils/domain.ts b/src/plugins/vis_type_xy/public/utils/domain.ts index 132c8df71428b..b5e3c15a42c43 100644 --- a/src/plugins/vis_type_xy/public/utils/domain.ts +++ b/src/plugins/vis_type_xy/public/utils/domain.ts @@ -52,7 +52,7 @@ export const getAdjustedDomain = ( data: Datatable['rows'], { accessor, params }: Aspect, timeZone: string, - domain?: DomainRange, + domain: DomainRange | undefined, hasBars?: boolean ): DomainRange => { if ( diff --git a/src/plugins/vis_type_xy/public/utils/get_all_series.test.ts b/src/plugins/vis_type_xy/public/utils/get_all_series.test.ts new file mode 100644 index 0000000000000..0f4f8fd297343 --- /dev/null +++ b/src/plugins/vis_type_xy/public/utils/get_all_series.test.ts @@ -0,0 +1,193 @@ +/* + * 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 { getAllSeries } from './get_all_series'; + +const rowsNoSplitSeries = [ + { + 'col-0-4': 'Kibana Airlines', + 'col-1-1': 85, + }, + { + 'col-0-4': 'ES-Air', + 'col-1-1': 84, + }, + { + 'col-0-4': 'Logstash Airways', + 'col-1-1': 82, + }, + { + 'col-0-4': 'JetBeats', + 'col-1-1': 81, + }, +]; + +const rowsWithSplitSeries = [ + { + 'col-0-4': 'ES-Air', + 'col-1-5': 0, + 'col-2-1': 71, + }, + { + 'col-0-4': 'ES-Air', + 'col-1-5': 1, + 'col-2-1': 14, + }, + { + 'col-0-4': 'Kibana Airlines', + 'col-1-5': 0, + 'col-2-1': 71, + }, + { + 'col-0-4': 'Kibana Airlines', + 'col-1-5': 1, + 'col-2-1': 13, + }, + { + 'col-0-4': 'JetBeats', + 'col-1-5': 0, + 'col-2-1': 72, + }, + { + 'col-0-4': 'JetBeats', + 'col-1-5': 1, + 'col-2-1': 9, + }, + { + 'col-0-4': 'Logstash Airways', + 'col-1-5': 0, + 'col-2-1': 71, + }, + { + 'col-0-4': 'Logstash Airways', + 'col-1-5': 1, + 'col-2-1': 10, + }, +]; + +const yAspects = [ + { + accessor: 'col-2-1', + column: 2, + title: 'Count', + format: { + id: 'number', + }, + aggType: 'count', + aggId: '1', + params: {}, + }, +]; + +const myltipleYAspects = [ + { + accessor: 'col-2-1', + column: 2, + title: 'Count', + format: { + id: 'number', + }, + aggType: 'count', + aggId: '1', + params: {}, + }, + { + accessor: 'col-3-4', + column: 3, + title: 'Average AvgTicketPrice', + format: { + id: 'number', + params: { + pattern: '$0,0.[00]', + }, + }, + aggType: 'avg', + aggId: '4', + params: {}, + }, +]; + +describe('getFilterClickData', () => { + it('returns empty array if splitAccessors is undefined', () => { + const splitAccessors = undefined; + const series = getAllSeries(rowsNoSplitSeries, splitAccessors, yAspects); + expect(series).toStrictEqual([]); + }); + + it('returns an array of series names if splitAccessors is an array', () => { + const splitAccessors = [ + { + accessor: 'col-1-5', + }, + ]; + const series = getAllSeries(rowsWithSplitSeries, splitAccessors, yAspects); + expect(series).toStrictEqual([0, 1]); + }); + + it('returns the correct array of series names for two splitAccessors without duplicates', () => { + const splitAccessors = [ + { + accessor: 'col-0-4', + }, + { + accessor: 'col-1-5', + }, + ]; + const series = getAllSeries(rowsWithSplitSeries, splitAccessors, yAspects); + expect(series).toStrictEqual([ + 'ES-Air - 0', + 'ES-Air - 1', + 'Kibana Airlines - 0', + 'Kibana Airlines - 1', + 'JetBeats - 0', + 'JetBeats - 1', + 'Logstash Airways - 0', + 'Logstash Airways - 1', + ]); + }); + + it('returns the correct array of series names for two splitAccessors and two y axis', () => { + const splitAccessors = [ + { + accessor: 'col-0-4', + }, + { + accessor: 'col-1-5', + }, + ]; + const series = getAllSeries(rowsWithSplitSeries, splitAccessors, myltipleYAspects); + expect(series).toStrictEqual([ + 'ES-Air - 0: Count', + 'ES-Air - 0: Average AvgTicketPrice', + 'ES-Air - 1: Count', + 'ES-Air - 1: Average AvgTicketPrice', + 'Kibana Airlines - 0: Count', + 'Kibana Airlines - 0: Average AvgTicketPrice', + 'Kibana Airlines - 1: Count', + 'Kibana Airlines - 1: Average AvgTicketPrice', + 'JetBeats - 0: Count', + 'JetBeats - 0: Average AvgTicketPrice', + 'JetBeats - 1: Count', + 'JetBeats - 1: Average AvgTicketPrice', + 'Logstash Airways - 0: Count', + 'Logstash Airways - 0: Average AvgTicketPrice', + 'Logstash Airways - 1: Count', + 'Logstash Airways - 1: Average AvgTicketPrice', + ]); + }); +}); diff --git a/src/plugins/vis_type_xy/public/utils/get_all_series.ts b/src/plugins/vis_type_xy/public/utils/get_all_series.ts new file mode 100644 index 0000000000000..8ffc59846c1fc --- /dev/null +++ b/src/plugins/vis_type_xy/public/utils/get_all_series.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 { TickFormatter } from '@elastic/charts'; +import { DatatableRow } from '../../../expressions/public'; +import { Column, Aspect } from '../types'; + +interface SplitAccessors { + accessor: Column['id']; + formatter?: TickFormatter; +} + +export const getAllSeries = ( + rows: DatatableRow[], + splitAccessors: SplitAccessors[] | undefined, + yAspects: Aspect[] +) => { + const allSeries: string[] = []; + if (!splitAccessors) return []; + + rows.forEach((row) => { + let seriesName = ''; + splitAccessors?.forEach(({ accessor, formatter }) => { + if (!accessor) return; + const name = formatter ? formatter(row[accessor]) : row[accessor]; + if (seriesName) { + seriesName += ` - ${name}`; + } else { + seriesName = name; + } + }); + + // multiple y axis + if (yAspects.length > 1) { + yAspects.forEach((aspect) => { + if (!allSeries.includes(`${seriesName}: ${aspect.title}`)) { + allSeries.push(`${seriesName}: ${aspect.title}`); + } + }); + } else { + if (!allSeries.includes(seriesName)) { + allSeries.push(seriesName); + } + } + }); + return allSeries; +}; diff --git a/src/plugins/vis_type_xy/public/utils/index.tsx b/src/plugins/vis_type_xy/public/utils/index.tsx index 20b5d7a3c8881..9143a57454d13 100644 --- a/src/plugins/vis_type_xy/public/utils/index.tsx +++ b/src/plugins/vis_type_xy/public/utils/index.tsx @@ -24,3 +24,4 @@ export { getSeriesNameFn } from './get_series_name_fn'; export { getXDomain, getAdjustedDomain } from './domain'; export { useColorPicker } from './use_color_picker'; export { getXAccessor } from './accessors'; +export { getAllSeries } from './get_all_series'; diff --git a/src/plugins/vis_type_xy/public/utils/use_color_picker.tsx b/src/plugins/vis_type_xy/public/utils/use_color_picker.tsx index 05de38b7700a9..666dcee29fc9d 100644 --- a/src/plugins/vis_type_xy/public/utils/use_color_picker.tsx +++ b/src/plugins/vis_type_xy/public/utils/use_color_picker.tsx @@ -17,10 +17,10 @@ * under the License. */ -import React, { BaseSyntheticEvent, useMemo } from 'react'; +import React, { BaseSyntheticEvent, useCallback, useMemo } from 'react'; import { LegendColorPicker, Position, XYChartSeriesIdentifier, SeriesName } from '@elastic/charts'; -import { PopoverAnchorPosition, EuiWrappingPopover } from '@elastic/eui'; +import { PopoverAnchorPosition, EuiWrappingPopover, EuiOutsideClickDetector } from '@elastic/eui'; import { ColorPicker } from '../../../charts/public'; @@ -61,18 +61,26 @@ export const useColorPicker = ( onClose(); }; + // rule doesn't know this is inside a functional component + // eslint-disable-next-line react-hooks/rules-of-hooks + const handleOutsideClick = useCallback(() => { + onClose?.(); + }, [onClose]); + return ( - - - + + + + + ); }, [getSeriesName, legendPosition, setColor] diff --git a/src/plugins/vis_type_xy/public/vis_component.tsx b/src/plugins/vis_type_xy/public/vis_component.tsx index dcf9f69cc291d..8d27d0161785a 100644 --- a/src/plugins/vis_type_xy/public/vis_component.tsx +++ b/src/plugins/vis_type_xy/public/vis_component.tsx @@ -48,6 +48,7 @@ import { LegendToggle, getBrushFromChartBrushEventFn, ClickTriggerEvent, + PaletteRegistry, } from '../../charts/public'; import { Datatable, IInterpreterRenderHandlers } from '../../expressions/public'; import type { PersistedState } from '../../visualizations/public'; @@ -62,10 +63,11 @@ import { getLegendActions, useColorPicker, getXAccessor, + getAllSeries, } from './utils'; import { XYAxis, XYEndzones, XYCurrentTime, XYSettings, XYThresholdLine } from './components'; import { getConfig } from './config'; -import { getThemeService, getColorsService, getDataActions } from './services'; +import { getThemeService, getDataActions, getPalettesService } from './services'; import { ChartType } from '../common'; import './_chart.scss'; @@ -81,22 +83,19 @@ export interface VisComponentProps { uiState: PersistedState; fireEvent: IInterpreterRenderHandlers['event']; renderComplete: IInterpreterRenderHandlers['done']; + syncColors: boolean; } export type VisComponentType = typeof VisComponent; const VisComponent = (props: VisComponentProps) => { - /** - * Stores all series labels to replicate vislib color map lookup - */ - const allSeries: Array = useMemo(() => [], []); const [showLegend, setShowLegend] = useState(() => { // TODO: Check when this bwc can safely be removed const bwcLegendStateDefault = props.visParams.addLegend == null ? true : props.visParams.addLegend; return props.uiState?.get('vis.legendOpen', bwcLegendStateDefault) as boolean; }); - + const [palettesRegistry, setPalettesRegistry] = useState(null); useEffect(() => { const fn = () => { props?.uiState?.emit?.('reload'); @@ -117,6 +116,14 @@ const VisComponent = (props: VisComponentProps) => { [props] ); + useEffect(() => { + const fetchPalettes = async () => { + const palettes = await getPalettesService().getPalettes(); + setPalettesRegistry(palettes); + }; + fetchPalettes(); + }, []); + const handleFilterClick = useCallback( ( visData: Datatable, @@ -225,7 +232,8 @@ const VisComponent = (props: VisComponentProps) => { [props.uiState] ); - const { visData, visParams } = props; + const { visData, visParams, syncColors } = props; + const config = getConfig(visData, visParams); const timeZone = getTimeZone(); const xDomain = @@ -245,21 +253,58 @@ const VisComponent = (props: VisComponentProps) => { const isDarkMode = getThemeService().useDarkMode(); const getSeriesName = getSeriesNameFn(config.aspects, config.aspects.y.length > 1); + const splitAccessors = config.aspects.series?.map(({ accessor, formatter }) => { + return { accessor, formatter }; + }); + + const allSeries = useMemo(() => getAllSeries(visData.rows, splitAccessors, config.aspects.y), [ + config.aspects.y, + splitAccessors, + visData.rows, + ]); + const getSeriesColor = useCallback( (series: XYChartSeriesIdentifier) => { - const seriesName = getSeriesName(series); + const seriesName = getSeriesName(series) as string; if (!seriesName) { - return; + return null; } - const overwriteColors: Record = props.uiState?.get ? props.uiState.get('vis.colors', {}) : {}; - allSeries.push(seriesName); - return getColorsService().createColorLookupFunction(allSeries, overwriteColors)(seriesName); + if (Object.keys(overwriteColors).includes(seriesName)) { + return overwriteColors[seriesName]; + } + const outputColor = palettesRegistry?.get(visParams.palette.name).getColor( + [ + { + name: seriesName, + rankAtDepth: splitAccessors + ? allSeries.findIndex((name) => name === seriesName) + : config.aspects.y.findIndex((aspect) => aspect.accessor === series.yAccessor), + totalSeriesAtDepth: splitAccessors ? allSeries.length : config.aspects.y.length, + }, + ], + { + maxDepth: 1, + totalSeries: splitAccessors ? allSeries.length : config.aspects.y.length, + behindText: false, + syncColors, + } + ); + return outputColor || null; }, - [allSeries, getSeriesName, props.uiState] + [ + allSeries, + config.aspects.y, + getSeriesName, + props.uiState, + splitAccessors, + syncColors, + visParams.palette.name, + palettesRegistry, + ] ); const xAccessor = getXAccessor(config.aspects.x); const splitSeriesAccessors = config.aspects.series diff --git a/src/plugins/vis_type_xy/public/vis_renderer.tsx b/src/plugins/vis_type_xy/public/vis_renderer.tsx index 16463abb07631..ee0c9983435e9 100644 --- a/src/plugins/vis_type_xy/public/vis_renderer.tsx +++ b/src/plugins/vis_type_xy/public/vis_renderer.tsx @@ -45,9 +45,9 @@ export const xyVisRenderer: ExpressionRenderDefinition = { name: visName, displayName: 'XY visualization', reuseDomNode: true, - render: (domNode, { visData, visConfig, visType }, handlers) => { + render: async (domNode, { visData, visConfig, visType, syncColors }, handlers) => { const showNoResult = shouldShowNoResultsMessage(visData, visType); - const isSplitChart = Boolean(visConfig.dimensions.splitRow || visConfig.dimensions.splitRow); + const isSplitChart = Boolean(visConfig.dimensions.splitRow); handlers.onDestroy(() => unmountComponentAtNode(domNode)); render( @@ -61,6 +61,7 @@ export const xyVisRenderer: ExpressionRenderDefinition = { renderComplete={handlers.done} fireEvent={handlers.event} uiState={handlers.uiState as PersistedState} + syncColors={syncColors} /> diff --git a/src/plugins/vis_type_xy/public/vis_types/area.tsx b/src/plugins/vis_type_xy/public/vis_types/area.tsx index 58423d2f619fa..f04105470e01d 100644 --- a/src/plugins/vis_type_xy/public/vis_types/area.tsx +++ b/src/plugins/vis_type_xy/public/vis_types/area.tsx @@ -119,6 +119,10 @@ export const getAreaVisTypeDefinition = ( ], addTooltip: true, detailedTooltip: true, + palette: { + type: 'palette', + name: 'default', + }, addLegend: true, legendPosition: Position.Right, fittingFunction: Fit.Linear, diff --git a/src/plugins/vis_type_xy/public/vis_types/histogram.tsx b/src/plugins/vis_type_xy/public/vis_types/histogram.tsx index 5bc5f1b49e5da..9e032b34c98de 100644 --- a/src/plugins/vis_type_xy/public/vis_types/histogram.tsx +++ b/src/plugins/vis_type_xy/public/vis_types/histogram.tsx @@ -122,6 +122,10 @@ export const getHistogramVisTypeDefinition = ( radiusRatio: 0, addTooltip: true, detailedTooltip: true, + palette: { + type: 'palette', + name: 'default', + }, addLegend: true, legendPosition: Position.Right, times: [], diff --git a/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.tsx b/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.tsx index 3029b3dcd6765..4b1e95368d9fc 100644 --- a/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.tsx +++ b/src/plugins/vis_type_xy/public/vis_types/horizontal_bar.tsx @@ -122,6 +122,10 @@ export const getHorizontalBarVisTypeDefinition = ( ], addTooltip: true, detailedTooltip: true, + palette: { + type: 'palette', + name: 'default', + }, addLegend: true, legendPosition: Position.Right, times: [], diff --git a/src/plugins/vis_type_xy/public/vis_types/line.tsx b/src/plugins/vis_type_xy/public/vis_types/line.tsx index e0f83ce649d23..e146b91a6141b 100644 --- a/src/plugins/vis_type_xy/public/vis_types/line.tsx +++ b/src/plugins/vis_type_xy/public/vis_types/line.tsx @@ -119,6 +119,10 @@ export const getLineVisTypeDefinition = ( ], addTooltip: true, detailedTooltip: true, + palette: { + type: 'palette', + name: 'default', + }, addLegend: true, legendPosition: Position.Right, fittingFunction: Fit.Linear, diff --git a/src/plugins/vis_type_xy/public/xy_vis_fn.ts b/src/plugins/vis_type_xy/public/xy_vis_fn.ts index 47c4caf243b36..f24b7391c1391 100644 --- a/src/plugins/vis_type_xy/public/xy_vis_fn.ts +++ b/src/plugins/vis_type_xy/public/xy_vis_fn.ts @@ -34,6 +34,7 @@ export interface RenderValue { visData: Datatable; visType: ChartType; visConfig: VisParams; + syncColors: boolean; } export type VisTypeXyExpressionFunctionDefinition = ExpressionFunctionDefinition< @@ -80,6 +81,7 @@ export const createVisTypeXyVisFn = (): VisTypeXyExpressionFunctionDefinition => visType, visConfig, visData: context, + syncColors: handlers?.isSyncColorsEnabled?.() ?? false, }, }; }, diff --git a/src/plugins/vis_type_xy/tsconfig.json b/src/plugins/vis_type_xy/tsconfig.json new file mode 100644 index 0000000000000..5cb0bc8d0bc8e --- /dev/null +++ b/src/plugins/vis_type_xy/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + ] +} diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts index 590b65e1af13d..4eaf70c98a26e 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts @@ -102,6 +102,7 @@ export class VisualizeEmbeddable private query?: Query; private filters?: Filter[]; private searchSessionId?: string; + private syncColors?: boolean; private visCustomizations?: Pick; private subscriptions: Subscription[] = []; private expression: string = ''; @@ -145,6 +146,7 @@ export class VisualizeEmbeddable ); this.deps = deps; this.timefilter = timefilter; + this.syncColors = this.input.syncColors; this.vis = vis; this.vis.uiState.on('change', this.uiStateChangeHandler); this.vis.uiState.on('reload', this.reload); @@ -248,6 +250,11 @@ export class VisualizeEmbeddable dirty = true; } + if (this.syncColors !== this.input.syncColors) { + this.syncColors = this.input.syncColors; + dirty = true; + } + if (this.vis.description && this.domNode) { this.domNode.setAttribute('data-description', this.vis.description); } @@ -377,6 +384,7 @@ export class VisualizeEmbeddable filters: this.input.filters, }, searchSessionId: this.input.searchSessionId, + syncColors: this.input.syncColors, uiState: this.vis.uiState, inspectorAdapters: this.inspectorAdapters, }; diff --git a/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap b/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap index 3ff0c83961e2a..3d685064111dc 100644 --- a/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap +++ b/src/plugins/visualizations/public/legacy/__snapshots__/build_pipeline.test.ts.snap @@ -1,9 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`visualize loader pipeline helpers: build pipeline buildPipeline calls toExpression on vis_type if it exists 1`] = `"kibana | kibana_context | test"`; - -exports[`visualize loader pipeline helpers: build pipeline buildPipelineVisFunction handles region_map function with buckets 1`] = `"regionmap visConfig='{\\"metric\\":{\\"accessor\\":0,\\"label\\":\\"\\",\\"format\\":{},\\"params\\":{},\\"aggType\\":\\"\\"},\\"bucket\\":1}' "`; - -exports[`visualize loader pipeline helpers: build pipeline buildPipelineVisFunction handles region_map function without buckets 1`] = `"regionmap visConfig='{\\"metric\\":{\\"accessor\\":0,\\"label\\":\\"\\",\\"format\\":{},\\"params\\":{},\\"aggType\\":\\"\\"}}' "`; - -exports[`visualize loader pipeline helpers: build pipeline buildPipelineVisFunction handles tile_map function 1`] = `"tilemap visConfig='{\\"metric\\":{},\\"dimensions\\":{\\"metric\\":{\\"accessor\\":0,\\"label\\":\\"\\",\\"format\\":{},\\"params\\":{},\\"aggType\\":\\"\\"},\\"geohash\\":1,\\"geocentroid\\":3}}' "`; diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.test.ts b/src/plugins/visualizations/public/legacy/build_pipeline.test.ts index 57c58a99f09ea..1b86488c06354 100644 --- a/src/plugins/visualizations/public/legacy/build_pipeline.test.ts +++ b/src/plugins/visualizations/public/legacy/build_pipeline.test.ts @@ -17,14 +17,7 @@ * under the License. */ -import { - prepareJson, - prepareString, - buildPipelineVisFunction, - buildPipeline, - SchemaConfig, - Schemas, -} from './build_pipeline'; +import { prepareJson, prepareString, buildPipeline } from './build_pipeline'; import { Vis } from '..'; import { dataPluginMock } from '../../../../plugins/data/public/mocks'; import { parseExpression } from '../../../expressions/common'; @@ -74,53 +67,6 @@ describe('visualize loader pipeline helpers: build pipeline', () => { }); }); - describe('buildPipelineVisFunction', () => { - let schemaConfig: SchemaConfig; - let schemasDef: Schemas; - let uiState: any; - - beforeEach(() => { - schemaConfig = { - accessor: 0, - label: '', - format: {}, - params: {}, - aggType: '', - }; - - schemasDef = { metric: [schemaConfig] }; - uiState = {}; - }); - - describe('handles region_map function', () => { - it('without buckets', () => { - const params = { metric: {} }; - const actual = buildPipelineVisFunction.region_map(params, schemasDef, uiState); - expect(actual).toMatchSnapshot(); - }); - - it('with buckets', () => { - const schemas = { - ...schemasDef, - segment: [1, 2], - }; - const actual = buildPipelineVisFunction.region_map({}, schemas, uiState); - expect(actual).toMatchSnapshot(); - }); - }); - - it('handles tile_map function', () => { - const params = { metric: {} }; - const schemas = { - ...schemasDef, - segment: [1, 2], - geo_centroid: [3, 4], - }; - const actual = buildPipelineVisFunction.tile_map(params, schemas, uiState); - expect(actual).toMatchSnapshot(); - }); - }); - describe('buildPipeline', () => { const dataStart = dataPluginMock.createStartContract(); diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.ts b/src/plugins/visualizations/public/legacy/build_pipeline.ts index 0b422802a7e1b..7c5991d498faf 100644 --- a/src/plugins/visualizations/public/legacy/build_pipeline.ts +++ b/src/plugins/visualizations/public/legacy/build_pipeline.ts @@ -23,9 +23,7 @@ import { SerializedFieldFormat, } from '../../../../plugins/expressions/public'; import { IAggConfig, search, TimefilterContract } from '../../../../plugins/data/public'; - -import { Vis, VisParams } from '../types'; - +import { Vis } from '../types'; const { isDateHistogramBucketAggConfig } = search.aggs; interface SchemaConfigParams { @@ -55,25 +53,6 @@ export interface Schemas { // catch all for schema name [key: string]: any[] | undefined; } - -type BuildVisFunction = ( - params: VisParams, - schemas: Schemas, - uiState: any, - meta?: { savedObjectId?: string } -) => string; - -// eslint-disable-next-line @typescript-eslint/naming-convention -type buildVisConfigFunction = (schemas: Schemas, visParams?: VisParams) => VisParams; - -interface BuildPipelineVisFunction { - [key: string]: BuildVisFunction; -} - -interface BuildVisConfigFunction { - [key: string]: buildVisConfigFunction; -} - export interface BuildPipelineParams { timefilter: TimefilterContract; timeRange?: any; @@ -224,43 +203,6 @@ export const prepareDimension = (variable: string, data: any) => { return expr; }; -export const buildPipelineVisFunction: BuildPipelineVisFunction = { - region_map: (params, schemas) => { - const visConfig = { - ...params, - ...buildVisConfig.region_map(schemas), - }; - return `regionmap ${prepareJson('visConfig', visConfig)}`; - }, - tile_map: (params, schemas) => { - const visConfig = { - ...params, - ...buildVisConfig.tile_map(schemas), - }; - return `tilemap ${prepareJson('visConfig', visConfig)}`; - }, -}; - -const buildVisConfig: BuildVisConfigFunction = { - region_map: (schemas) => { - const visConfig = {} as any; - visConfig.metric = schemas.metric[0]; - if (schemas.segment) { - visConfig.bucket = schemas.segment[0]; - } - return visConfig; - }, - tile_map: (schemas) => { - const visConfig = {} as any; - visConfig.dimensions = { - metric: schemas.metric[0], - geohash: schemas.segment ? schemas.segment[0] : null, - geocentroid: schemas.geo_centroid ? schemas.geo_centroid[0] : null, - }; - return visConfig; - }, -}; - export const buildPipeline = async (vis: Vis, params: BuildPipelineParams) => { const { indexPattern, searchSource } = vis.data; const query = searchSource!.getField('query'); @@ -299,17 +241,8 @@ export const buildPipeline = async (vis: Vis, params: BuildPipelineParams) => { }); } pipeline += `| `; - } - - const schemas = getSchemas(vis, params); - - if (buildPipelineVisFunction[vis.type.name]) { - pipeline += buildPipelineVisFunction[vis.type.name]( - { title, ...vis.params }, - schemas, - uiState - ); } else { + const schemas = getSchemas(vis, params); const visConfig = { ...vis.params }; visConfig.dimensions = schemas; visConfig.title = title; diff --git a/src/plugins/runtime_fields/public/index.ts b/src/plugins/visualizations/public/legacy/vis_update_state.d.ts similarity index 85% rename from src/plugins/runtime_fields/public/index.ts rename to src/plugins/visualizations/public/legacy/vis_update_state.d.ts index a7a94b07ac6e8..a400ac3d1500f 100644 --- a/src/plugins/runtime_fields/public/index.ts +++ b/src/plugins/visualizations/public/legacy/vis_update_state.d.ts @@ -17,12 +17,8 @@ * under the License. */ -export * from '../common'; +import { SavedVisState } from '../types'; -export function plugin() { - return { - setup() {}, - start() {}, - stop() {}, - }; -} +declare function updateOldState(oldState: unknown): SavedVisState; + +export { updateOldState }; diff --git a/src/plugins/visualizations/server/saved_objects/visualization_migrations.test.ts b/src/plugins/visualizations/server/saved_objects/visualization_migrations.test.ts index d3fc5de93c366..4f1b7b3a163be 100644 --- a/src/plugins/visualizations/server/saved_objects/visualization_migrations.test.ts +++ b/src/plugins/visualizations/server/saved_objects/visualization_migrations.test.ts @@ -1720,6 +1720,13 @@ describe('migration visualization', () => { expect(isVislibVis).toEqual(true); }); + it('should decorate existing docs with the kibana legacy palette', () => { + const migratedTestDoc = migrate(getTestDoc()); + const { palette } = JSON.parse(migratedTestDoc.attributes.visState).params; + + expect(palette.name).toEqual('kibana_palette'); + }); + describe('labels.filter', () => { it('should keep existing categoryAxes labels.filter value', () => { const migratedTestDoc = migrate(getTestDoc('area', [{ labels: { filter: false } }])); diff --git a/src/plugins/visualizations/server/saved_objects/visualization_migrations.ts b/src/plugins/visualizations/server/saved_objects/visualization_migrations.ts index c625662ab7fe3..8317536f4b28a 100644 --- a/src/plugins/visualizations/server/saved_objects/visualization_migrations.ts +++ b/src/plugins/visualizations/server/saved_objects/visualization_migrations.ts @@ -21,7 +21,6 @@ import { cloneDeep, get, omit, has, flow } from 'lodash'; import { SavedObjectMigrationFn } from 'kibana/server'; -import { ChartType } from '../../../vis_type_xy/common'; import { DEFAULT_QUERY_LANGUAGE } from '../../../data/common'; const migrateIndexPattern: SavedObjectMigrationFn = (doc) => { @@ -804,6 +803,11 @@ const decorateAxes = ( }, })); +// Inlined from vis_type_xy +const CHART_TYPE_AREA = 'area'; +const CHART_TYPE_LINE = 'line'; +const CHART_TYPE_HISTOGRAM = 'histogram'; + /** * Migrate vislib bar, line and area charts to use new vis_type_xy plugin */ @@ -819,11 +823,11 @@ const migrateVislibAreaLineBarTypes: SavedObjectMigrationFn = (doc) => } if ( visState && - [ChartType.Area, ChartType.Line, ChartType.Histogram].includes(visState?.params?.type) + [CHART_TYPE_AREA, CHART_TYPE_LINE, CHART_TYPE_HISTOGRAM].includes(visState?.params?.type) ) { const isHorizontalBar = visState.type === 'horizontal_bar'; const isLineOrArea = - visState?.params?.type === ChartType.Area || visState?.params?.type === ChartType.Line; + visState?.params?.type === CHART_TYPE_AREA || visState?.params?.type === CHART_TYPE_LINE; return { ...doc, attributes: { @@ -832,6 +836,10 @@ const migrateVislibAreaLineBarTypes: SavedObjectMigrationFn = (doc) => ...visState, params: { ...visState.params, + palette: { + type: 'palette', + name: 'kibana_palette', + }, categoryAxes: visState.params.categoryAxes && decorateAxes(visState.params.categoryAxes, !isHorizontalBar), diff --git a/src/plugins/visualizations/tsconfig.json b/src/plugins/visualizations/tsconfig.json new file mode 100644 index 0000000000000..d7c5e6a4b4366 --- /dev/null +++ b/src/plugins/visualizations/tsconfig.json @@ -0,0 +1,29 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../dashboard/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../ui_actions/tsconfig.json" }, + { "path": "../embeddable/tsconfig.json" }, + { "path": "../inspector/tsconfig.json" }, + { "path": "../saved_objects/tsconfig.json" }, + { "path": "../saved_objects_tagging_oss/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../discover/tsconfig.json" }, + ] +} diff --git a/src/plugins/visualize/tsconfig.json b/src/plugins/visualize/tsconfig.json new file mode 100644 index 0000000000000..bc0891f391746 --- /dev/null +++ b/src/plugins/visualize/tsconfig.json @@ -0,0 +1,34 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../url_forwarding/tsconfig.json" }, + { "path": "../navigation/tsconfig.json" }, + { "path": "../saved_objects/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../embeddable/tsconfig.json" }, + { "path": "../dashboard/tsconfig.json" }, + { "path": "../ui_actions/tsconfig.json" }, + { "path": "../home/tsconfig.json" }, + { "path": "../share/tsconfig.json" }, + { "path": "../saved_objects_tagging_oss/tsconfig.json" }, + { "path": "../kibana_utils/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" }, + { "path": "../home/tsconfig.json" }, + { "path": "../presentation_util/tsconfig.json" }, + { "path": "../discover/tsconfig.json" }, + ] +} diff --git a/tasks/licenses_csv_report.js b/tasks/licenses_csv_report.js deleted file mode 100644 index f504cbcaa5fc8..0000000000000 --- a/tasks/licenses_csv_report.js +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { writeFileSync } from 'fs'; -import { resolve } from 'path'; -import { getInstalledPackages } from '../src/dev/npm'; -import { engines } from '../package'; -import { LICENSE_OVERRIDES } from '../src/dev/license_checker'; - -import { isNull, isUndefined } from 'lodash'; - -const allDoubleQuoteRE = /"/g; - -function escapeValue(value) { - if (isNull(value)) { - return; - } - - return `"${value.replace(allDoubleQuoteRE, '""')}"`; -} - -function formatCsvValues(fields, values) { - return fields - .map((field) => { - const value = values[field]; - - if (isNull(value) || isUndefined(value)) { - return null; - } - - return value.toString(); - }) - .map(escapeValue) - .join(','); -} - -export default function licensesCSVReport(grunt) { - grunt.registerTask('licenses:csv_report', 'Report of 3rd party dependencies', async function () { - const fields = ['name', 'version', 'url', 'license', 'sourceURL']; - const done = this.async(); - - try { - const file = grunt.option('csv'); - const directory = grunt.option('directory'); - const dev = Boolean(grunt.option('dev')); - - const packages = await getInstalledPackages({ - directory: directory ? resolve(directory) : grunt.config.get('root'), - licenseOverrides: LICENSE_OVERRIDES, - dev, - }); - - packages.unshift( - { - name: 'Node.js', - version: engines.node, - repository: 'https://nodejs.org', - licenses: ['MIT'], - }, - { - name: 'Red Hat Universal Base Image minimal', - version: '8', - repository: - 'https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8', - licenses: [ - 'Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf', - ], - sourceURL: 'https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz', - } - ); - - const csv = packages - .map((pkg) => { - const data = { - name: pkg.name, - version: pkg.version, - url: pkg.repository || `https://www.npmjs.com/package/${pkg.name}`, - license: pkg.licenses.join(','), - sourceURL: pkg.sourceURL, - }; - - return formatCsvValues(fields, data); - }) - .join('\n'); - - if (file) { - writeFileSync(file, `${fields.join(',')}\n${csv}`); - grunt.log.writeln(`wrote to ${file}`); - } else { - grunt.log.writeln(csv); - grunt.log.writeln('\nspecify "--csv [filepath]" to write the data to a specific file'); - } - - done(); - } catch (err) { - grunt.fail.fatal(err); - done(err); - } - }); -} diff --git a/test/api_integration/apis/telemetry/telemetry_local.js b/test/api_integration/apis/telemetry/telemetry_local.js index dcc8e989d3ad5..22fdcb7f7ff3e 100644 --- a/test/api_integration/apis/telemetry/telemetry_local.js +++ b/test/api_integration/apis/telemetry/telemetry_local.js @@ -77,7 +77,6 @@ export default function ({ getService }) { expect(stats.stack_stats.kibana.plugins.ui_counters).to.be.an('object'); expect(stats.stack_stats.kibana.plugins.application_usage).to.be.an('object'); expect(stats.stack_stats.kibana.plugins.kql.defaultQueryLanguage).to.be.a('string'); - expect(stats.stack_stats.kibana.plugins['tsvb-validation']).to.be.an('object'); expect(stats.stack_stats.kibana.plugins.localization).to.be.an('object'); expect(stats.stack_stats.kibana.plugins.csp.strict).to.be(true); expect(stats.stack_stats.kibana.plugins.csp.warnLegacyBrowsers).to.be(true); diff --git a/test/functional/apps/console/_console.ts b/test/functional/apps/console/_console.ts index 6e524b2cd33df..fcd136a2720e4 100644 --- a/test/functional/apps/console/_console.ts +++ b/test/functional/apps/console/_console.ts @@ -34,7 +34,6 @@ GET _search export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); - const find = getService('find'); const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'console']); @@ -84,12 +83,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should resize the editor', async () => { - const editor = await find.byCssSelector('.conApp'); + const editor = await PageObjects.console.getEditor(); await browser.setWindowSize(1300, 1100); const initialSize = await editor.getSize(); await browser.setWindowSize(1000, 1100); const afterSize = await editor.getSize(); expect(initialSize.width).to.be.greaterThan(afterSize.width); }); + + it('should provide basic auto-complete functionality', async () => { + // Ensure that the text area can be interacted with + await PageObjects.console.dismissTutorial(); + expect(await PageObjects.console.hasAutocompleter()).to.be(false); + await PageObjects.console.promptAutocomplete(); + retry.waitFor('autocomplete to be visible', () => PageObjects.console.hasAutocompleter()); + }); }); } diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index f67a2722da367..5b0fcd0d331b5 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -17,12 +17,14 @@ * under the License. */ +import { Key } from 'selenium-webdriver'; import { FtrProviderContext } from '../ftr_provider_context'; import { WebElementWrapper } from '../services/lib/web_element_wrapper'; export function ConsolePageProvider({ getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const retry = getService('retry'); + const find = getService('find'); class ConsolePage { public async getVisibleTextFromAceEditor(editor: WebElementWrapper) { @@ -79,6 +81,38 @@ export function ConsolePageProvider({ getService }: FtrProviderContext) { public async getRequestFontSize() { return await this.getFontSize(await this.getRequestEditor()); } + + public async getEditor() { + return testSubjects.find('console-application'); + } + + public async dismissTutorial() { + try { + const closeButton = await testSubjects.find('help-close-button'); + await closeButton.click(); + } catch (e) { + // Ignore because it is probably not there. + } + } + + public async promptAutocomplete() { + // This focusses the cursor on the bottom of the text area + const editor = await this.getEditor(); + const content = await editor.findByCssSelector('.ace_content'); + await content.click(); + const textArea = await testSubjects.find('console-textarea'); + // There should be autocomplete for this on all license levels + await textArea.pressKeys('\nGET s'); + await textArea.pressKeys([Key.CONTROL, Key.SPACE]); + } + + public async hasAutocompleter(): Promise { + try { + return Boolean(await find.byCssSelector('.ace_autocomplete')); + } catch (e) { + return false; + } + } } return new ConsolePage(); diff --git a/test/interpreter_functional/screenshots/baseline/partial_test_3.png b/test/interpreter_functional/screenshots/baseline/partial_test_3.png index c43169bfb7101..93a8e53540744 100644 Binary files a/test/interpreter_functional/screenshots/baseline/partial_test_3.png and b/test/interpreter_functional/screenshots/baseline/partial_test_3.png differ diff --git a/test/interpreter_functional/snapshots/baseline/partial_test_3.json b/test/interpreter_functional/snapshots/baseline/partial_test_3.json index 595127526156e..e011b69de2022 100644 --- a/test/interpreter_functional/snapshots/baseline/partial_test_3.json +++ b/test/interpreter_functional/snapshots/baseline/partial_test_3.json @@ -1 +1 @@ -{"as":"visualization","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"bucket":{"accessor":0},"metric":{"accessor":1,"format":{"id":"number"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"region_map"}} \ No newline at end of file +{"as":"region_map_vis","type":"render","value":{"visConfig":{"addTooltip":true,"bucket":{"accessor":0},"colorSchema":"Yellow to Red","isDisplayWarning":true,"legendPosition":"bottomright","mapCenter":[0,0],"mapZoom":2,"metric":{"accessor":1,"format":{"id":"number"}},"outlineWeight":1,"selectedJoinField":{},"selectedLayer":{},"showAllShapes":true,"wms":{}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"region_map"}} \ No newline at end of file diff --git a/test/interpreter_functional/snapshots/session/partial_test_3.json b/test/interpreter_functional/snapshots/session/partial_test_3.json index 595127526156e..e011b69de2022 100644 --- a/test/interpreter_functional/snapshots/session/partial_test_3.json +++ b/test/interpreter_functional/snapshots/session/partial_test_3.json @@ -1 +1 @@ -{"as":"visualization","type":"render","value":{"params":{"listenOnChange":true},"visConfig":{"bucket":{"accessor":0},"metric":{"accessor":1,"format":{"id":"number"}}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"region_map"}} \ No newline at end of file +{"as":"region_map_vis","type":"render","value":{"visConfig":{"addTooltip":true,"bucket":{"accessor":0},"colorSchema":"Yellow to Red","isDisplayWarning":true,"legendPosition":"bottomright","mapCenter":[0,0],"mapZoom":2,"metric":{"accessor":1,"format":{"id":"number"}},"outlineWeight":1,"selectedJoinField":{},"selectedLayer":{},"showAllShapes":true,"wms":{}},"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visType":"region_map"}} \ No newline at end of file diff --git a/test/interpreter_functional/test_suites/run_pipeline/basic.ts b/test/interpreter_functional/test_suites/run_pipeline/basic.ts index fc7c0428631c6..6bd00b42502d0 100644 --- a/test/interpreter_functional/test_suites/run_pipeline/basic.ts +++ b/test/interpreter_functional/test_suites/run_pipeline/basic.ts @@ -110,7 +110,7 @@ export default function ({ await expectExpression('partial_test_2', metricExpr, context).toMatchSnapshot() ).toMatchScreenshot(); - const regionMapExpr = `regionmap visConfig='{"metric":{"accessor":1,"format":{"id":"number"}},"bucket":{"accessor":0}}'`; + const regionMapExpr = `regionmap visConfig='{"metric":{"accessor":1,"format":{"id":"number"}},"bucket":{"accessor":0},"legendPosition":"bottomright","addTooltip":true,"colorSchema":"Yellow to Red","isDisplayWarning":true,"wms":{},"mapZoom":2,"mapCenter":[0,0],"outlineWeight":1,"showAllShapes":true,"selectedLayer":{},"selectedJoinField":{}}'`; await ( await expectExpression('partial_test_3', regionMapExpr, context).toMatchSnapshot() ).toMatchScreenshot(); diff --git a/test/tsconfig.json b/test/tsconfig.json index f1d5115bf35fb..684efc145e4d0 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -8,13 +8,16 @@ "exclude": ["plugin_functional/plugins/**/*", "interpreter_functional/plugins/**/*"], "references": [ { "path": "../src/core/tsconfig.json" }, + { "path": "../src/plugins/telemetry_management_section/tsconfig.json" }, { "path": "../src/plugins/advanced_settings/tsconfig.json" }, { "path": "../src/plugins/management/tsconfig.json" }, { "path": "../src/plugins/bfetch/tsconfig.json" }, { "path": "../src/plugins/charts/tsconfig.json" }, + { "path": "../src/plugins/console/tsconfig.json" }, { "path": "../src/plugins/dashboard/tsconfig.json" }, { "path": "../src/plugins/discover/tsconfig.json" }, { "path": "../src/plugins/embeddable/tsconfig.json" }, + { "path": "../src/plugins/es_ui_shared/tsconfig.json" }, { "path": "../src/plugins/expressions/tsconfig.json" }, { "path": "../src/plugins/home/tsconfig.json" }, { "path": "../src/plugins/inspector/tsconfig.json" }, @@ -24,6 +27,7 @@ { "path": "../src/plugins/navigation/tsconfig.json" }, { "path": "../src/plugins/newsfeed/tsconfig.json" }, { "path": "../src/plugins/saved_objects/tsconfig.json" }, + { "path": "../src/plugins/saved_objects_management/tsconfig.json" }, { "path": "../src/plugins/saved_objects_tagging_oss/tsconfig.json" }, { "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" }, { "path": "../src/plugins/telemetry/tsconfig.json" }, diff --git a/tsconfig.json b/tsconfig.json index 1d8c61d515fdf..b6742bffeab55 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,15 +7,18 @@ "exclude": [ "src/**/__fixtures__/**/*", "src/core/**/*", + "src/plugins/telemetry_management_section/**/*", "src/plugins/advanced_settings/**/*", "src/plugins/apm_oss/**/*", "src/plugins/bfetch/**/*", "src/plugins/charts/**/*", + "src/plugins/console/**/*", "src/plugins/dashboard/**/*", "src/plugins/discover/**/*", "src/plugins/data/**/*", "src/plugins/dev_tools/**/*", "src/plugins/embeddable/**/*", + "src/plugins/es_ui_shared/**/*", "src/plugins/expressions/**/*", "src/plugins/home/**/*", "src/plugins/inspector/**/*", @@ -23,20 +26,34 @@ "src/plugins/kibana_react/**/*", "src/plugins/kibana_usage_collection/**/*", "src/plugins/kibana_utils/**/*", + "src/plugins/lens_oss/**/*", "src/plugins/management/**/*", "src/plugins/navigation/**/*", "src/plugins/newsfeed/**/*", "src/plugins/saved_objects/**/*", + "src/plugins/saved_objects_management/**/*", "src/plugins/saved_objects_tagging_oss/**/*", "src/plugins/security_oss/**/*", "src/plugins/share/**/*", "src/plugins/spaces_oss/**/*", "src/plugins/telemetry/**/*", "src/plugins/telemetry_collection_manager/**/*", + "src/plugins/timelion/**/*", "src/plugins/ui_actions/**/*", "src/plugins/url_forwarding/**/*", "src/plugins/usage_collection/**/*", - "src/plugins/presentation_util/**/*" + "src/plugins/presentation_util/**/*", + "src/plugins/vis_default_editor/**/*", + "src/plugins/vis_type_markdown/**/*", + "src/plugins/vis_type_metric/**/*", + "src/plugins/vis_type_table/**/*", + "src/plugins/vis_type_tagcloud/**/*", + "src/plugins/vis_type_timelion/**/*", + "src/plugins/vis_type_timeseries/**/*", + "src/plugins/vis_type_vislib/**/*", + "src/plugins/vis_type_xy/**/*", + "src/plugins/visualizations/**/*", + "src/plugins/visualize/**/*", // In the build we actually exclude **/public/**/* from this config so that // we can run the TSC on both this and the .browser version of this config // file, but if we did it during development IDEs would not be able to find @@ -45,15 +62,18 @@ ], "references": [ { "path": "./src/core/tsconfig.json" }, + { "path": "./src/plugins/telemetry_management_section/tsconfig.json" }, { "path": "./src/plugins/advanced_settings/tsconfig.json" }, { "path": "./src/plugins/apm_oss/tsconfig.json" }, { "path": "./src/plugins/bfetch/tsconfig.json" }, { "path": "./src/plugins/charts/tsconfig.json" }, + { "path": "./src/plugins/console/tsconfig.json" }, { "path": "./src/plugins/dashboard/tsconfig.json" }, { "path": "./src/plugins/discover/tsconfig.json" }, { "path": "./src/plugins/data/tsconfig.json" }, { "path": "./src/plugins/dev_tools/tsconfig.json" }, { "path": "./src/plugins/embeddable/tsconfig.json" }, + { "path": "./src/plugins/es_ui_shared/tsconfig.json" }, { "path": "./src/plugins/expressions/tsconfig.json" }, { "path": "./src/plugins/home/tsconfig.json" }, { "path": "./src/plugins/inspector/tsconfig.json" }, @@ -61,18 +81,32 @@ { "path": "./src/plugins/kibana_react/tsconfig.json" }, { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, { "path": "./src/plugins/kibana_utils/tsconfig.json" }, + { "path": "./src/plugins/lens_oss/tsconfig.json" }, { "path": "./src/plugins/management/tsconfig.json" }, { "path": "./src/plugins/navigation/tsconfig.json" }, { "path": "./src/plugins/newsfeed/tsconfig.json" }, { "path": "./src/plugins/saved_objects/tsconfig.json" }, + { "path": "./src/plugins/saved_objects_management/tsconfig.json" }, { "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" }, { "path": "./src/plugins/security_oss/tsconfig.json" }, { "path": "./src/plugins/share/tsconfig.json" }, { "path": "./src/plugins/spaces_oss/tsconfig.json" }, { "path": "./src/plugins/telemetry/tsconfig.json" }, { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, + { "path": "./src/plugins/timelion/tsconfig.json" }, { "path": "./src/plugins/ui_actions/tsconfig.json" }, { "path": "./src/plugins/url_forwarding/tsconfig.json" }, - { "path": "./src/plugins/usage_collection/tsconfig.json" } + { "path": "./src/plugins/usage_collection/tsconfig.json" }, + { "path": "./src/plugins/vis_default_editor/tsconfig.json" }, + { "path": "./src/plugins/vis_type_markdown/tsconfig.json" }, + { "path": "./src/plugins/vis_type_metric/tsconfig.json" }, + { "path": "./src/plugins/vis_type_table/tsconfig.json" }, + { "path": "./src/plugins/vis_type_tagcloud/tsconfig.json" }, + { "path": "./src/plugins/vis_type_timelion/tsconfig.json" }, + { "path": "./src/plugins/vis_type_timeseries/tsconfig.json" }, + { "path": "./src/plugins/vis_type_vislib/tsconfig.json" }, + { "path": "./src/plugins/vis_type_xy/tsconfig.json" }, + { "path": "./src/plugins/visualizations/tsconfig.json" }, + { "path": "./src/plugins/visualize/tsconfig.json" }, ] } diff --git a/tsconfig.refs.json b/tsconfig.refs.json index d6e87da6ac19d..1bce19e2ee44a 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -2,14 +2,17 @@ "include": [], "references": [ { "path": "./src/core/tsconfig.json" }, + { "path": "./src/plugins/telemetry_management_section/tsconfig.json" }, { "path": "./src/plugins/advanced_settings/tsconfig.json" }, { "path": "./src/plugins/apm_oss/tsconfig.json" }, { "path": "./src/plugins/bfetch/tsconfig.json" }, { "path": "./src/plugins/charts/tsconfig.json" }, + { "path": "./src/plugins/console/tsconfig.json" }, { "path": "./src/plugins/data/tsconfig.json" }, { "path": "./src/plugins/dev_tools/tsconfig.json" }, { "path": "./src/plugins/discover/tsconfig.json" }, { "path": "./src/plugins/embeddable/tsconfig.json" }, + { "path": "./src/plugins/es_ui_shared/tsconfig.json" }, { "path": "./src/plugins/expressions/tsconfig.json" }, { "path": "./src/plugins/home/tsconfig.json" }, { "path": "./src/plugins/dashboard/tsconfig.json" }, @@ -19,10 +22,12 @@ { "path": "./src/plugins/kibana_react/tsconfig.json" }, { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, { "path": "./src/plugins/kibana_utils/tsconfig.json" }, + { "path": "./src/plugins/lens_oss/tsconfig.json" }, { "path": "./src/plugins/management/tsconfig.json" }, { "path": "./src/plugins/navigation/tsconfig.json" }, { "path": "./src/plugins/newsfeed/tsconfig.json" }, { "path": "./src/plugins/saved_objects/tsconfig.json" }, + { "path": "./src/plugins/saved_objects_management/tsconfig.json" }, { "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" }, { "path": "./src/plugins/presentation_util/tsconfig.json" }, { "path": "./src/plugins/security_oss/tsconfig.json" }, @@ -30,9 +35,20 @@ { "path": "./src/plugins/spaces_oss/tsconfig.json" }, { "path": "./src/plugins/telemetry/tsconfig.json" }, { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, + { "path": "./src/plugins/timelion/tsconfig.json" }, { "path": "./src/plugins/ui_actions/tsconfig.json" }, { "path": "./src/plugins/url_forwarding/tsconfig.json" }, { "path": "./src/plugins/usage_collection/tsconfig.json" }, - { "path": "./src/plugins/management/tsconfig.json" }, + { "path": "./src/plugins/vis_default_editor/tsconfig.json" }, + { "path": "./src/plugins/vis_type_markdown/tsconfig.json" }, + { "path": "./src/plugins/vis_type_metric/tsconfig.json" }, + { "path": "./src/plugins/vis_type_table/tsconfig.json" }, + { "path": "./src/plugins/vis_type_tagcloud/tsconfig.json" }, + { "path": "./src/plugins/vis_type_timelion/tsconfig.json" }, + { "path": "./src/plugins/vis_type_timeseries/tsconfig.json" }, + { "path": "./src/plugins/vis_type_vislib/tsconfig.json" }, + { "path": "./src/plugins/vis_type_xy/tsconfig.json" }, + { "path": "./src/plugins/visualizations/tsconfig.json" }, + { "path": "./src/plugins/visualize/tsconfig.json" }, ] } diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 7380d25930bc0..6937862d20536 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -42,7 +42,7 @@ "xpack.remoteClusters": "plugins/remote_clusters", "xpack.reporting": ["plugins/reporting"], "xpack.rollupJobs": ["plugins/rollup"], - "xpack.runtimeFields": "plugins/runtime_field_editor", + "xpack.runtimeFields": "plugins/runtime_fields", "xpack.searchProfiler": "plugins/searchprofiler", "xpack.security": "plugins/security", "xpack.server": "legacy/server", diff --git a/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.test.ts b/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.test.ts index 32e1b233274c9..e106b17ad223f 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.test.ts @@ -46,12 +46,9 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('/test', { method: 'get', data: {}, - headers: undefined, httpAgent: undefined, httpsAgent: undefined, - params: undefined, proxy: false, - validateStatus: undefined, }); expect(res).toEqual({ status: 200, @@ -80,12 +77,9 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('http://testProxy', { method: 'get', data: {}, - headers: undefined, httpAgent, httpsAgent, - params: undefined, proxy: false, - validateStatus: undefined, }); expect(res).toEqual({ status: 200, @@ -108,12 +102,9 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('https://testProxy', { method: 'get', data: {}, - headers: undefined, httpAgent: undefined, httpsAgent: undefined, - params: undefined, proxy: false, - validateStatus: undefined, }); expect(res).toEqual({ status: 200, @@ -128,12 +119,9 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('/test', { method: 'post', data: { id: '123' }, - headers: undefined, httpAgent: undefined, httpsAgent: undefined, - params: undefined, proxy: false, - validateStatus: undefined, }); expect(res).toEqual({ status: 200, @@ -156,12 +144,9 @@ describe('patch', () => { expect(axiosMock).toHaveBeenCalledWith('/test', { method: 'patch', data: { id: '123' }, - headers: undefined, httpAgent: undefined, httpsAgent: undefined, - params: undefined, proxy: false, - validateStatus: undefined, }); }); }); diff --git a/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.ts b/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.ts index 322da1077af18..78c6b91b57dc0 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/lib/axios_utils.ts @@ -15,11 +15,8 @@ export const request = async ({ logger, method = 'get', data, - params, proxySettings, - headers, - validateStatus, - auth, + ...rest }: { axios: AxiosInstance; url: string; @@ -35,16 +32,13 @@ export const request = async ({ const { httpAgent, httpsAgent } = getProxyAgents(proxySettings, logger); return await axios(url, { + ...rest, method, data: data ?? {}, - params, - auth, // use httpAgent and httpsAgent and set axios proxy: false, to be able to handle fail on invalid certs httpAgent, httpsAgent, proxy: false, - headers, - validateStatus, }); }; diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts index bd2e18b66c8e3..a41faba2e9382 100644 --- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts +++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts @@ -125,7 +125,7 @@ export const generalSettings: RawSettingDefinition[] = [ defaultMessage: 'When recording, the agent instruments incoming HTTP requests, tracks errors, and collects and sends metrics. When set to non-recording, the agent works as a noop, not collecting data and not communicating with the APM Server except for polling for updated configuration. As this is a reversible switch, agent threads are not being killed when set to non-recording, but they will be mostly idle in this state, so the overhead should be negligible. You can use this setting to dynamically control whether Elastic APM is enabled or disabled.', }), - excludeAgents: ['nodejs'], + excludeAgents: ['nodejs', 'rum-js', 'js-base'], }, // SERVER_TIMEOUT diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts index f7209d8b46edb..4f319e4dd7016 100644 --- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts +++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts @@ -87,14 +87,12 @@ describe('filterByAgent', () => { it('js-base', () => { expect(getSettingKeysForAgent('js-base')).toEqual([ - 'recording', 'transaction_sample_rate', ]); }); it('rum-js', () => { expect(getSettingKeysForAgent('rum-js')).toEqual([ - 'recording', 'transaction_sample_rate', ]); }); diff --git a/x-pack/plugins/apm/common/utils/join_by_key/index.ts b/x-pack/plugins/apm/common/utils/join_by_key/index.ts index 6678bf68afbae..d296fc44c1f24 100644 --- a/x-pack/plugins/apm/common/utils/join_by_key/index.ts +++ b/x-pack/plugins/apm/common/utils/join_by_key/index.ts @@ -9,11 +9,11 @@ import { isEqual, pull, merge, castArray } from 'lodash'; /** * Joins a list of records by a given key. Key can be any type of value, from * strings to plain objects, as long as it is present in all records. `isEqual` - * is used for comparing keys. - * + * is used for comparing keys. + * * UnionToIntersection is needed to get all keys of union types, see below for * example. - * + * const agentNames = [{ serviceName: '', agentName: '' }]; const transactionRates = [{ serviceName: '', transactionsPerMinute: 1 }]; const flattened = joinByKey( diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx index 3b737c6fa4170..f7a4a322e99eb 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/Popover/ServiceStatsFetcher.tsx @@ -56,8 +56,7 @@ export function ServiceStatsFetcher({ } ); - const isLoading = - status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING; + const isLoading = status === FETCH_STATUS.LOADING; if (isLoading) { return ; diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx index e7ce4bb24b38f..c6f82e3492750 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/index.test.tsx @@ -11,7 +11,6 @@ import React, { ReactNode } from 'react'; import { createKibanaReactContext } from 'src/plugins/kibana_react/public'; import { License } from '../../../../../licensing/common/license'; import { EuiThemeProvider } from '../../../../../observability/public'; -import { FETCH_STATUS } from '../../../../../observability/public/hooks/use_fetcher'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { LicenseContext } from '../../../context/license/license_context'; import * as useFetcherModule from '../../../hooks/use_fetcher'; @@ -92,7 +91,7 @@ describe('ServiceMap', () => { jest.spyOn(useFetcherModule, 'useFetcher').mockReturnValueOnce({ data: { elements: [] }, refetch: () => {}, - status: FETCH_STATUS.SUCCESS, + status: useFetcherModule.FETCH_STATUS.SUCCESS, }); expect( diff --git a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx index 9f3a65583ddb7..23f688e66966d 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx @@ -61,29 +61,38 @@ export function AgentConfigurationList({ status, data, refetch }: Props) { } body={ - <> -

    - {i18n.translate( - 'xpack.apm.agentConfig.configTable.emptyPromptText', +

    + {i18n.translate('xpack.apm.agentConfig.configTable.emptyPromptText', { + defaultMessage: + "Let's change that! You can fine-tune agent configuration directly from Kibana without having to redeploy. Get started by creating your first configuration.", + })} +

    + } + actions={ + - - } - actions={ - - {i18n.translate( - 'xpack.apm.agentConfig.configTable.createConfigButtonLabel', - { defaultMessage: 'Create configuration' } - )} - + + {i18n.translate( + 'xpack.apm.agentConfig.configTable.createConfigButtonLabel', + { defaultMessage: 'Create configuration' } + )} + + } /> ); diff --git a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx index ba08af32d65b6..8c10b96c51ce2 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx @@ -248,7 +248,7 @@ export function ApmIndices() { fill onClick={handleApplyChangesEvent} isLoading={isSaving} - disabled={!canSave} + isDisabled={!canSave} > {i18n.translate( 'xpack.apm.settings.apmIndices.applyButton', diff --git a/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx b/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx index 4477ee5a99be3..63dd486544124 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.test.tsx @@ -219,7 +219,8 @@ describe('CustomLink', () => { expect(saveCustomLinkSpy).toHaveBeenCalledTimes(1); }); - it('deletes a custom link', async () => { + // FLAKY: https://github.com/elastic/kibana/issues/75106 + it.skip('deletes a custom link', async () => { const mockContext = getMockAPMContext({ canSave: true }); const component = render( diff --git a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx index e709c7e104472..16aad0a9a8420 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx @@ -71,8 +71,7 @@ export function AddEnvironments({ ); } - const isLoading = - status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING; + const isLoading = status === FETCH_STATUS.LOADING; return ( diff --git a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx index b185685f0720a..c180ffb523f8e 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/jobs_list.tsx @@ -124,8 +124,7 @@ export function JobsList({ data, status, onAddEnvironments }: Props) { function getNoItemsMessage({ status }: { status: FETCH_STATUS }) { // loading state - const isLoading = - status === FETCH_STATUS.PENDING || status === FETCH_STATUS.LOADING; + const isLoading = status === FETCH_STATUS.LOADING; if (isLoading) { return ; } diff --git a/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx b/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx index 5fe371c33475a..4ee4e793ef4ef 100644 --- a/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx +++ b/x-pack/plugins/apm/public/components/app/service_details/service_icons/icon_popover.tsx @@ -35,10 +35,7 @@ export function IconPopover({ if (!icon) { return null; } - const isLoading = - detailsFetchStatus === FETCH_STATUS.LOADING || - detailsFetchStatus === FETCH_STATUS.PENDING; - + const isLoading = detailsFetchStatus === FETCH_STATUS.LOADING; return ( ; diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx index 1f8ff6fdcaf19..2991264b5c0c1 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/index.tsx @@ -137,9 +137,7 @@ export function getServiceColumns({ field: 'transactionType', name: i18n.translate( 'xpack.apm.servicesTable.transactionColumnLabel', - { - defaultMessage: 'Transaction type', - } + { defaultMessage: 'Transaction type' } ), width: px(unit * 10), sortable: true, @@ -148,12 +146,9 @@ export function getServiceColumns({ : []), { field: 'avgResponseTime', - name: i18n.translate( - 'xpack.apm.servicesTable.avgResponseTimeColumnLabel', - { - defaultMessage: 'Avg. response time', - } - ), + name: i18n.translate('xpack.apm.servicesTable.latencyAvgColumnLabel', { + defaultMessage: 'Latency (avg.)', + }), sortable: true, dataType: 'number', render: (_, { avgResponseTime }) => ( @@ -168,12 +163,9 @@ export function getServiceColumns({ }, { field: 'transactionsPerMinute', - name: i18n.translate( - 'xpack.apm.servicesTable.transactionsPerMinuteColumnLabel', - { - defaultMessage: 'Trans. per minute', - } - ), + name: i18n.translate('xpack.apm.servicesTable.throughputColumnLabel', { + defaultMessage: 'Throughput', + }), sortable: true, dataType: 'number', render: (_, { transactionsPerMinute }) => ( diff --git a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx index 45a4afeb53235..275ea3aa13a20 100644 --- a/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx +++ b/x-pack/plugins/apm/public/components/app/service_inventory/ServiceList/service_list.test.tsx @@ -76,13 +76,13 @@ describe('ServiceList', () => { expect(healthHeading).toBeNull(); }); - it('sorts by transactions per minute', async () => { + it('sorts by throughput', async () => { const { findByTitle } = renderWithTheme(, { wrapper: Wrapper, }); expect( - await findByTitle('Trans. per minute; Sorted in descending order') + await findByTitle('Throughput; Sorted in descending order') ).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx index ae297b840ebc8..6ea1c7f7c5b41 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx @@ -102,9 +102,7 @@ export function ServiceOverviewDependenciesTable({ serviceName }: Props) { field: 'throughputValue', name: i18n.translate( 'xpack.apm.serviceOverview.dependenciesTableColumnThroughput', - { - defaultMessage: 'Traffic', - } + { defaultMessage: 'Throughput' } ), width: px(unit * 10), render: (_, { throughput }) => { diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx index 51a4ef649a3ba..611f3499d40c2 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx @@ -117,9 +117,7 @@ export function ServiceOverviewInstancesTable({ serviceName }: Props) { field: 'throughputValue', name: i18n.translate( 'xpack.apm.serviceOverview.instancesTableColumnThroughput', - { - defaultMessage: 'Traffic', - } + { defaultMessage: 'Throughput' } ), width: px(unit * 10), render: (_, { throughput }) => { @@ -232,8 +230,7 @@ export function ServiceOverviewInstancesTable({ serviceName }: Props) { memoryUsageValue: item.memoryUsage?.value ?? 0, })); - const isLoading = - status === FETCH_STATUS.LOADING || status === FETCH_STATUS.PENDING; + const isLoading = status === FETCH_STATUS.LOADING; return ( diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx index e63d30022360e..b79e011bde488 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart.tsx @@ -51,7 +51,7 @@ export function ServiceOverviewThroughputChart({

    {i18n.translate('xpack.apm.serviceOverview.throughtputChartTitle', { - defaultMessage: 'Traffic', + defaultMessage: 'Throughput', })}

    @@ -66,10 +66,8 @@ export function ServiceOverviewThroughputChart({ type: 'linemark', color: theme.eui.euiColorVis0, title: i18n.translate( - 'xpack.apm.serviceOverview.throughputChart.traffic', - { - defaultMessage: 'Traffic', - } + 'xpack.apm.serviceOverview.throughtputChartTitle', + { defaultMessage: 'Throughput' } ), }, ]} diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx index 307997731e5ef..0cb0ec4311043 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx @@ -55,30 +55,29 @@ const DEFAULT_SORT = { function getLatencyAggregationTypeLabel(latencyAggregationType?: string) { switch (latencyAggregationType) { - case 'avg': { - i18n.translate( + case 'avg': + return i18n.translate( 'xpack.apm.serviceOverview.transactionsTableColumnLatency.avg', { defaultMessage: 'Latency (avg.)', } ); - } - case 'p95': { + + case 'p95': return i18n.translate( 'xpack.apm.serviceOverview.transactionsTableColumnLatency.p95', { defaultMessage: 'Latency (95th)', } ); - } - case 'p99': { + + case 'p99': return i18n.translate( 'xpack.apm.serviceOverview.transactionsTableColumnLatency.p99', { defaultMessage: 'Latency (99th)', } ); - } } } @@ -210,10 +209,8 @@ export function ServiceOverviewTransactionsTable(props: Props) { { field: 'throughput', name: i18n.translate( - 'xpack.apm.serviceOverview.transactionsTableColumnTroughput', - { - defaultMessage: 'Traffic', - } + 'xpack.apm.serviceOverview.transactionsTableColumnThroughput', + { defaultMessage: 'Throughput' } ), width: px(unit * 10), render: (_, { throughput }) => { diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx index 1699b7e7474fe..d2a3dc54c2a48 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_overview/TransactionList/index.tsx @@ -101,10 +101,8 @@ export function TransactionList({ items, isLoading }: Props) { { field: 'transactionsPerMinute', name: i18n.translate( - 'xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel', - { - defaultMessage: 'Trans. per minute', - } + 'xpack.apm.transactionsTable.throughputColumnLabel', + { defaultMessage: 'Throughput' } ), sortable: true, dataType: 'number', diff --git a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx index ad2b68ae8a4ef..948facae222e7 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_overview/index.tsx @@ -83,6 +83,7 @@ export function TransactionOverview({ serviceName }: TransactionOverviewProps) { typeof LocalUIFilters > = useMemo( () => ({ + shouldFetch: !!transactionType, filterNames: [ 'transactionResult', 'host', @@ -101,7 +102,7 @@ export function TransactionOverview({ serviceName }: TransactionOverviewProps) { // TODO: improve urlParams typings. // `serviceName` or `transactionType` will never be undefined here, and this check should not be needed - if (!serviceName || !transactionType) { + if (!serviceName) { return null; } diff --git a/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx b/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx index 65164a43bf10e..eaecd86820524 100644 --- a/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/LocalUIFilters/index.tsx @@ -24,6 +24,7 @@ interface Props { params?: Record; showCount?: boolean; children?: React.ReactNode; + shouldFetch?: boolean; } const ButtonWrapper = styled.div` @@ -36,11 +37,13 @@ function LocalUIFilters({ filterNames, children, showCount = true, + shouldFetch = true, }: Props) { const { filters, setFilterValue, clearValues } = useLocalUIFilters({ filterNames, projection, params, + shouldFetch, }); const hasValues = filters.some((filter) => filter.value.length > 0); diff --git a/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx b/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx index 359eadfc55cff..6d430d4c8f49c 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/chart_container.test.tsx @@ -11,7 +11,7 @@ import { ChartContainer } from './chart_container'; describe('ChartContainer', () => { describe('loading indicator', () => { it('shows loading when status equals to Loading or Pending and has no data', () => { - [FETCH_STATUS.PENDING, FETCH_STATUS.LOADING].map((status) => { + [FETCH_STATUS.NOT_INITIATED, FETCH_STATUS.LOADING].map((status) => { const { queryAllByTestId } = render( { }); }); it('does not show loading when status equals to Loading or Pending and has data', () => { - [FETCH_STATUS.PENDING, FETCH_STATUS.LOADING].map((status) => { + [FETCH_STATUS.NOT_INITIATED, FETCH_STATUS.LOADING].map((status) => { const { queryAllByText } = render(
    My amazing component
    diff --git a/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx b/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx index ef58430e1e31e..06a2b879f0622 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/chart_container.tsx @@ -17,10 +17,7 @@ interface Props { } export function ChartContainer({ children, height, status, hasData }: Props) { - if ( - !hasData && - (status === FETCH_STATUS.LOADING || status === FETCH_STATUS.PENDING) - ) { + if (!hasData && status === FETCH_STATUS.LOADING) { return ; } diff --git a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts index 585eef546e754..057b04c2ecc2b 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts +++ b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.test.ts @@ -3,8 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { onBrushEnd } from './helper'; +import { onBrushEnd, isTimeseriesEmpty } from './helper'; import { History } from 'history'; +import { TimeSeries } from '../../../../../typings/timeseries'; describe('Chart helper', () => { describe('onBrushEnd', () => { @@ -36,4 +37,60 @@ describe('Chart helper', () => { }); }); }); + + describe('isTimeseriesEmpty', () => { + it('returns true when timeseries is undefined', () => { + expect(isTimeseriesEmpty()).toBeTruthy(); + }); + it('returns true when timeseries data is empty', () => { + const timeseries = [ + { + title: 'foo', + data: [], + type: 'line', + color: 'red', + }, + ] as TimeSeries[]; + expect(isTimeseriesEmpty(timeseries)).toBeTruthy(); + }); + it('returns true when y coordinate is null', () => { + const timeseries = [ + { + title: 'foo', + data: [{ x: 1, y: null }], + type: 'line', + color: 'red', + }, + ] as TimeSeries[]; + expect(isTimeseriesEmpty(timeseries)).toBeTruthy(); + }); + it('returns true when y coordinate is undefined', () => { + const timeseries = [ + { + title: 'foo', + data: [{ x: 1, y: undefined }], + type: 'line', + color: 'red', + }, + ] as TimeSeries[]; + expect(isTimeseriesEmpty(timeseries)).toBeTruthy(); + }); + it('returns false when at least one coordinate is filled', () => { + const timeseries = [ + { + title: 'foo', + data: [{ x: 1, y: undefined }], + type: 'line', + color: 'red', + }, + { + title: 'bar', + data: [{ x: 1, y: 1 }], + type: 'line', + color: 'green', + }, + ] as TimeSeries[]; + expect(isTimeseriesEmpty(timeseries)).toBeFalsy(); + }); + }); }); diff --git a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts index a9c1337feac99..5239b3bd49bd4 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts +++ b/x-pack/plugins/apm/public/components/shared/charts/helper/helper.ts @@ -6,6 +6,7 @@ import { XYBrushArea } from '@elastic/charts'; import { History } from 'history'; +import { TimeSeries } from '../../../../../typings/timeseries'; import { fromQuery, toQuery } from '../../Links/url_helpers'; export const onBrushEnd = ({ @@ -33,3 +34,16 @@ export const onBrushEnd = ({ }); } }; + +export function isTimeseriesEmpty(timeseries?: TimeSeries[]) { + return ( + !timeseries || + timeseries + .map((serie) => serie.data) + .flat() + .every( + ({ y }: { x?: number | null; y?: number | null }) => + y === null || y === undefined + ) + ); +} diff --git a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx index 2c71e75994a4a..07c18ac766ace 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart.tsx @@ -36,7 +36,7 @@ import { useAnnotationsContext } from '../../../context/annotations/use_annotati import { useChartPointerEventContext } from '../../../context/chart_pointer_event/use_chart_pointer_event_context'; import { unit } from '../../../style/variables'; import { ChartContainer } from './chart_container'; -import { onBrushEnd } from './helper/helper'; +import { onBrushEnd, isTimeseriesEmpty } from './helper/helper'; import { getLatencyChartSelector } from '../../../selectors/latency_chart_selectors'; interface Props { @@ -86,13 +86,7 @@ export function TimeseriesChart({ const xFormatter = niceTimeFormatter([min, max]); - const isEmpty = timeseries - .map((serie) => serie.data) - .flat() - .every( - ({ y }: { x?: number | null; y?: number | null }) => - y === null || y === undefined - ); + const isEmpty = isTimeseriesEmpty(timeseries); const annotationColor = theme.eui.euiColorSecondary; diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx index 38a980fbcd90a..bbae0cd61264f 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/index.tsx @@ -26,7 +26,7 @@ export function TransactionBreakdownChart({

    {i18n.translate('xpack.apm.transactionBreakdown.chartTitle', { - defaultMessage: 'Average duration by span type', + defaultMessage: 'Time spent by span type', })}

    diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx index 19c29815ab655..f1b29fe4b87bd 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_breakdown_chart/transaction_breakdown_chart_contents.tsx @@ -35,7 +35,7 @@ import { useAnnotationsContext } from '../../../../context/annotations/use_annot import { useChartPointerEventContext } from '../../../../context/chart_pointer_event/use_chart_pointer_event_context'; import { unit } from '../../../../style/variables'; import { ChartContainer } from '../../charts/chart_container'; -import { onBrushEnd } from '../../charts/helper/helper'; +import { isTimeseriesEmpty, onBrushEnd } from '../../charts/helper/helper'; interface Props { fetchStatus: FETCH_STATUS; @@ -66,8 +66,10 @@ export function TransactionBreakdownChartContents({ const annotationColor = theme.eui.euiColorSecondary; + const isEmpty = isTimeseriesEmpty(timeseries); + return ( - + onBrushEnd({ x, history })} diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx index 0ea0ee3e5a456..297cf050c4bbc 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx @@ -13,11 +13,9 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { TRANSACTION_REQUEST } from '../../../../../common/transaction_types'; import { asTransactionRate } from '../../../../../common/utils/formatters'; import { AnnotationsContextProvider } from '../../../../context/annotations/annotations_context'; import { ChartPointerEventContextProvider } from '../../../../context/chart_pointer_event/chart_pointer_event_context'; -import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; import { useTransactionThroughputChartsFetcher } from '../../../../hooks/use_transaction_throughput_chart_fetcher'; import { LatencyChart } from '../latency_chart'; import { TimeseriesChart } from '../timeseries_chart'; @@ -25,9 +23,6 @@ import { TransactionBreakdownChart } from '../transaction_breakdown_chart'; import { TransactionErrorRateChart } from '../transaction_error_rate_chart/'; export function TransactionCharts() { - const { urlParams } = useUrlParams(); - const { transactionType } = urlParams; - const { throughputChartsData, throughputChartsStatus, @@ -49,11 +44,16 @@ export function TransactionCharts() { - {tpmLabel(transactionType)} + + {i18n.translate( + 'xpack.apm.metrics.transactionChart.throughputLabel', + { defaultMessage: 'Throughput' } + )} + @@ -76,19 +76,3 @@ export function TransactionCharts() { ); } - -function tpmLabel(type?: string) { - return type === TRANSACTION_REQUEST - ? i18n.translate( - 'xpack.apm.metrics.transactionChart.requestsPerMinuteLabel', - { - defaultMessage: 'Requests per minute', - } - ) - : i18n.translate( - 'xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel', - { - defaultMessage: 'Transactions per minute', - } - ); -} diff --git a/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts b/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts new file mode 100644 index 0000000000000..587cb172eeab7 --- /dev/null +++ b/x-pack/plugins/apm/public/context/url_params_context/helpers.test.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import datemath from '@elastic/datemath'; +import moment from 'moment-timezone'; +import * as helpers from './helpers'; + +describe('url_params_context helpers', () => { + describe('getParsedDate', () => { + describe('given undefined', () => { + it('returns undefined', () => { + expect(helpers.getParsedDate(undefined)).toBeUndefined(); + }); + }); + + describe('given a parsable date', () => { + it('returns the parsed date', () => { + expect(helpers.getParsedDate('1970-01-01T00:00:00.000Z')).toEqual( + '1970-01-01T00:00:00.000Z' + ); + }); + }); + + describe('given a non-parsable date', () => { + it('returns null', () => { + expect(helpers.getParsedDate('nope')).toEqual(null); + }); + }); + }); + + describe('getDateRange', () => { + describe('when rangeFrom and rangeTo are not changed', () => { + it('returns the previous state', () => { + expect( + helpers.getDateRange({ + state: { + rangeFrom: 'now-1m', + rangeTo: 'now', + start: '1970-01-01T00:00:00.000Z', + end: '1971-01-01T00:00:00.000Z', + }, + rangeFrom: 'now-1m', + rangeTo: 'now', + }) + ).toEqual({ + start: '1970-01-01T00:00:00.000Z', + end: '1971-01-01T00:00:00.000Z', + }); + }); + }); + + describe('when rangeFrom or rangeTo have changed', () => { + it('returns new state', () => { + jest.spyOn(datemath, 'parse').mockReturnValue(moment(0).utc()); + + expect( + helpers.getDateRange({ + state: { + rangeFrom: 'now-1m', + rangeTo: 'now', + start: '1972-01-01T00:00:00.000Z', + end: '1973-01-01T00:00:00.000Z', + }, + rangeFrom: 'now-2m', + rangeTo: 'now', + }) + ).toEqual({ + start: '1970-01-01T00:00:00.000Z', + end: '1970-01-01T00:00:00.000Z', + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/apm/public/context/url_params_context/helpers.ts b/x-pack/plugins/apm/public/context/url_params_context/helpers.ts index 45db4dcc94cce..bff2ef5deb86c 100644 --- a/x-pack/plugins/apm/public/context/url_params_context/helpers.ts +++ b/x-pack/plugins/apm/public/context/url_params_context/helpers.ts @@ -17,18 +17,23 @@ export function getParsedDate(rawDate?: string, opts = {}) { } } -export function getStart(prevState: IUrlParams, rangeFrom?: string) { - if (prevState.rangeFrom !== rangeFrom) { - return getParsedDate(rangeFrom); +export function getDateRange({ + state, + rangeFrom, + rangeTo, +}: { + state: IUrlParams; + rangeFrom?: string; + rangeTo?: string; +}) { + if (state.rangeFrom === rangeFrom && state.rangeTo === rangeTo) { + return { start: state.start, end: state.end }; } - return prevState.start; -} -export function getEnd(prevState: IUrlParams, rangeTo?: string) { - if (prevState.rangeTo !== rangeTo) { - return getParsedDate(rangeTo, { roundUp: true }); - } - return prevState.end; + return { + start: getParsedDate(rangeFrom), + end: getParsedDate(rangeTo, { roundUp: true }), + }; } export function toNumber(value?: string) { diff --git a/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts b/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts index 6d9f982f92751..0596d649116a0 100644 --- a/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts +++ b/x-pack/plugins/apm/public/context/url_params_context/resolve_url_params.ts @@ -11,8 +11,7 @@ import { pickKeys } from '../../../common/utils/pick_keys'; import { localUIFilterNames } from '../../../server/lib/ui_filters/local_ui_filters/config'; import { toQuery } from '../../components/shared/Links/url_helpers'; import { - getEnd, - getStart, + getDateRange, removeUndefinedProps, toBoolean, toNumber, @@ -56,8 +55,7 @@ export function resolveUrlParams(location: Location, state: TimeUrlParams) { return removeUndefinedProps({ // date params - start: getStart(state, rangeFrom), - end: getEnd(state, rangeTo), + ...getDateRange({ state, rangeFrom, rangeTo }), rangeFrom, rangeTo, refreshPaused: refreshPaused ? toBoolean(refreshPaused) : undefined, diff --git a/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts b/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts index 551e92f8ba034..dabdf41c63f04 100644 --- a/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts +++ b/x-pack/plugins/apm/public/hooks/useLocalUIFilters.ts @@ -34,10 +34,12 @@ export function useLocalUIFilters({ projection, filterNames, params, + shouldFetch, }: { projection: Projection; filterNames: LocalUIFilterName[]; params?: Record; + shouldFetch: boolean; }) { const history = useHistory(); const { uiFilters, urlParams } = useUrlParams(); @@ -68,17 +70,19 @@ export function useLocalUIFilters({ }; const { data = getInitialData(filterNames), status } = useFetcher(() => { - return callApi({ - method: 'GET', - pathname: `/api/apm/ui_filters/local_filters/${projection}`, - query: { - uiFilters: JSON.stringify(uiFilters), - start: urlParams.start, - end: urlParams.end, - filterNames: JSON.stringify(filterNames), - ...params, - }, - }); + if (shouldFetch) { + return callApi({ + method: 'GET', + pathname: `/api/apm/ui_filters/local_filters/${projection}`, + query: { + uiFilters: JSON.stringify(uiFilters), + start: urlParams.start, + end: urlParams.end, + filterNames: JSON.stringify(filterNames), + ...params, + }, + }); + } }, [ callApi, projection, @@ -87,6 +91,7 @@ export function useLocalUIFilters({ urlParams.end, filterNames, params, + shouldFetch, ]); const filters = data.map((filter) => ({ diff --git a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx index a9a4871dc8707..8174f06e06b8b 100644 --- a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx +++ b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx @@ -15,7 +15,7 @@ export enum FETCH_STATUS { LOADING = 'loading', SUCCESS = 'success', FAILURE = 'failure', - PENDING = 'pending', + NOT_INITIATED = 'not_initiated', } export interface FetcherResult { @@ -46,7 +46,7 @@ export function useFetcher( FetcherResult> >({ data: undefined, - status: FETCH_STATUS.PENDING, + status: FETCH_STATUS.NOT_INITIATED, }); const [counter, setCounter] = useState(0); diff --git a/x-pack/plugins/apm/server/lib/services/get_throughput.ts b/x-pack/plugins/apm/server/lib/services/get_throughput.ts index 0ac0ad17ef8fa..29071f96e3a06 100644 --- a/x-pack/plugins/apm/server/lib/services/get_throughput.ts +++ b/x-pack/plugins/apm/server/lib/services/get_throughput.ts @@ -28,7 +28,10 @@ interface Options { type ESResponse = PromiseReturnType; function transform(response: ESResponse) { - const buckets = response.aggregations?.throughput?.buckets ?? []; + if (response.hits.total.value === 0) { + return []; + } + const buckets = response.aggregations?.throughput.buckets ?? []; return buckets.map(({ key: x, doc_count: y }) => ({ x, y })); } diff --git a/x-pack/plugins/console_extensions/tsconfig.json b/x-pack/plugins/console_extensions/tsconfig.json new file mode 100644 index 0000000000000..5ad28f230a0bb --- /dev/null +++ b/x-pack/plugins/console_extensions/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "server/**/*" + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/console/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts index fc6c860f907f6..d1bb672b985f4 100644 --- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts @@ -373,7 +373,7 @@ describe('EnhancedSearchInterceptor', () => { test('should NOT DELETE a running SAVED async search on abort', async () => { const sessionId = 'sessionId'; - sessionService.getSessionId.mockImplementation(() => sessionId); + sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId); const responses = [ { time: 10, @@ -479,6 +479,7 @@ describe('EnhancedSearchInterceptor', () => { test('should track searches', async () => { const sessionId = 'sessionId'; + sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId); sessionService.getSessionId.mockImplementation(() => sessionId); const untrack = jest.fn(); @@ -496,6 +497,7 @@ describe('EnhancedSearchInterceptor', () => { test('session service should be able to cancel search', async () => { const sessionId = 'sessionId'; + sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId); sessionService.getSessionId.mockImplementation(() => sessionId); const untrack = jest.fn(); @@ -519,6 +521,7 @@ describe('EnhancedSearchInterceptor', () => { test("don't track non current session searches", async () => { const sessionId = 'sessionId'; + sessionService.isCurrentSession.mockImplementation((_sessionId) => _sessionId === sessionId); sessionService.getSessionId.mockImplementation(() => sessionId); const untrack = jest.fn(); @@ -539,6 +542,7 @@ describe('EnhancedSearchInterceptor', () => { test("don't track if no current session", async () => { sessionService.getSessionId.mockImplementation(() => undefined); + sessionService.isCurrentSession.mockImplementation((_sessionId) => false); const untrack = jest.fn(); sessionService.trackSearch.mockImplementation(() => untrack); diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts index b0f194115f0b8..72d2cce49477b 100644 --- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts +++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts @@ -64,20 +64,24 @@ export class EnhancedSearchInterceptor extends SearchInterceptor { const search = () => this.runSearch({ id, ...request }, searchOptions); this.pendingCount$.next(this.pendingCount$.getValue() + 1); - const isCurrentSession = () => - !!options.sessionId && options.sessionId === this.deps.session.getSessionId(); - const untrackSearch = isCurrentSession() && this.deps.session.trackSearch({ abort }); + const untrackSearch = + this.deps.session.isCurrentSession(options.sessionId) && + this.deps.session.trackSearch({ abort }); // track if this search's session will be send to background // if yes, then we don't need to cancel this search when it is aborted let isSavedToBackground = false; const savedToBackgroundSub = - isCurrentSession() && + this.deps.session.isCurrentSession(options.sessionId) && this.deps.session.state$ .pipe( skip(1), // ignore any state, we are only interested in transition x -> BackgroundLoading - filter((state) => isCurrentSession() && state === SearchSessionState.BackgroundLoading), + filter( + (state) => + this.deps.session.isCurrentSession(options.sessionId) && + state === SearchSessionState.BackgroundLoading + ), take(1) ) .subscribe(() => { @@ -93,7 +97,8 @@ export class EnhancedSearchInterceptor extends SearchInterceptor { finalize(() => { this.pendingCount$.next(this.pendingCount$.getValue() - 1); cleanup(); - if (untrackSearch && isCurrentSession()) { + if (untrackSearch && this.deps.session.isCurrentSession(options.sessionId)) { + // untrack if this search still belongs to current session untrackSearch(); } if (savedToBackgroundSub) { diff --git a/x-pack/plugins/discover_enhanced/tsconfig.json b/x-pack/plugins/discover_enhanced/tsconfig.json new file mode 100644 index 0000000000000..38a55e557909b --- /dev/null +++ b/x-pack/plugins/discover_enhanced/tsconfig.json @@ -0,0 +1,24 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["*.ts", "common/**/*", "public/**/*", "server/**/*"], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../src/plugins/discover/tsconfig.json" }, + { "path": "../../../src/plugins/share/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_legacy/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../../src/plugins/url_forwarding/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../src/plugins/visualizations/tsconfig.json" }, + { "path": "../../../src/plugins/ui_actions/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx new file mode 100644 index 0000000000000..6b04a668b1489 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.test.tsx @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { shallow } from 'enzyme'; +import { Route, Switch } from 'react-router-dom'; + +import { AnalyticsRouter } from './'; + +describe('AnalyticsRouter', () => { + // Detailed route testing is better done via E2E tests + it('renders', () => { + const wrapper = shallow(); + + expect(wrapper.find(Switch)).toHaveLength(1); + expect(wrapper.find(Route)).toHaveLength(8); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx new file mode 100644 index 0000000000000..117d14f7ca836 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/analytics_router.tsx @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { Route, Switch } from 'react-router-dom'; + +import { APP_SEARCH_PLUGIN } from '../../../../../common/constants'; +import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; +import { NotFound } from '../../../shared/not_found'; +import { + ENGINE_PATH, + ENGINE_ANALYTICS_PATH, + ENGINE_ANALYTICS_TOP_QUERIES_PATH, + ENGINE_ANALYTICS_TOP_QUERIES_NO_RESULTS_PATH, + ENGINE_ANALYTICS_TOP_QUERIES_NO_CLICKS_PATH, + ENGINE_ANALYTICS_TOP_QUERIES_WITH_CLICKS_PATH, + ENGINE_ANALYTICS_RECENT_QUERIES_PATH, + ENGINE_ANALYTICS_QUERY_DETAIL_PATH, +} from '../../routes'; +import { + ANALYTICS_TITLE, + TOP_QUERIES, + TOP_QUERIES_NO_RESULTS, + TOP_QUERIES_NO_CLICKS, + TOP_QUERIES_WITH_CLICKS, + RECENT_QUERIES, +} from './constants'; + +interface Props { + engineBreadcrumb: string[]; +} +export const AnalyticsRouter: React.FC = ({ engineBreadcrumb }) => { + const ANALYTICS_BREADCRUMB = [...engineBreadcrumb, ANALYTICS_TITLE]; + + return ( + + + + TODO: Analytics overview + + + + TODO: Top queries + + + + TODO: Top queries with no results + + + + TODO: Top queries with no clicks + + + + TODO: Top queries with clicks + + + + TODO: Recent queries + + + TODO: Query detail page + + + + + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts index 9985753d09700..c1087bf4cb2f0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts @@ -11,26 +11,46 @@ export const ANALYTICS_TITLE = i18n.translate( { defaultMessage: 'Analytics' } ); +// Total card titles export const TOTAL_DOCUMENTS = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments', { defaultMessage: 'Total documents' } ); - export const TOTAL_API_OPERATIONS = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.totalApiOperations', { defaultMessage: 'Total API operations' } ); - export const TOTAL_QUERIES = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.totalQueries', { defaultMessage: 'Total queries' } ); - export const TOTAL_CLICKS = i18n.translate( 'xpack.enterpriseSearch.appSearch.engine.analytics.totalClicks', { defaultMessage: 'Total clicks' } ); +// Queries sub-pages +export const TOP_QUERIES = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesTitle', + { defaultMessage: 'Top queries' } +); +export const TOP_QUERIES_NO_RESULTS = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesNoResultsTitle', + { defaultMessage: 'Top queries with no results' } +); +export const TOP_QUERIES_NO_CLICKS = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesNoClicksTitle', + { defaultMessage: 'Top queries with no clicks' } +); +export const TOP_QUERIES_WITH_CLICKS = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.topQueriesWithClicksTitle', + { defaultMessage: 'Top queries with clicks' } +); +export const RECENT_QUERIES = i18n.translate( + 'xpack.enterpriseSearch.appSearch.engine.analytics.recentQueriesTitle', + { defaultMessage: 'Recent queries' } +); + // Moment date format conversions export const SERVER_DATE_FORMAT = 'YYYY-MM-DD'; export const TOOLTIP_DATE_FORMAT = 'MMMM D, YYYY'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts index 3b201b38703d9..0ab5ab80e8353 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/index.ts @@ -5,5 +5,6 @@ */ export { ANALYTICS_TITLE } from './constants'; +export { AnalyticsRouter } from './analytics_router'; export { AnalyticsChart } from './components'; export { convertToChartData } from './utils'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx index 418ab33457d0a..40ae2cef0acb8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_nav.tsx @@ -103,7 +103,11 @@ export const EngineNav: React.FC = () => { {OVERVIEW_TITLE} {canViewEngineAnalytics && ( - + {ANALYTICS_TITLE} )} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx index cbaa347d65732..26c7b3f677fc1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.test.tsx @@ -19,6 +19,7 @@ import { setQueuedErrorMessage } from '../../../shared/flash_messages'; import { Loading } from '../../../shared/loading'; import { EngineOverview } from '../engine_overview'; +import { AnalyticsRouter } from '../analytics'; import { EngineRouter } from './'; @@ -93,6 +94,6 @@ describe('EngineRouter', () => { setMockValues({ ...values, myRole: { canViewEngineAnalytics: true } }); const wrapper = shallow(); - expect(wrapper.find('[data-test-subj="AnalyticsTODO"]')).toHaveLength(1); + expect(wrapper.find(AnalyticsRouter)).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx index 1d2f3f640f341..47fe302ac7014 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/engine_router.tsx @@ -33,13 +33,13 @@ import { } from '../../routes'; import { ENGINES_TITLE } from '../engines'; import { OVERVIEW_TITLE } from '../engine_overview'; -import { ANALYTICS_TITLE } from '../analytics'; import { Loading } from '../../../shared/loading'; import { EngineOverview } from '../engine_overview'; +import { AnalyticsRouter } from '../analytics'; +import { DocumentDetail, Documents } from '../documents'; import { EngineLogic } from './'; -import { DocumentDetail, Documents } from '../documents'; export const EngineRouter: React.FC = () => { const { @@ -87,8 +87,7 @@ export const EngineRouter: React.FC = () => { {canViewEngineAnalytics && ( - -
    Just testing right now
    +
    )} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx new file mode 100644 index 0000000000000..027dea0aec77b --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/assets/icons.test.tsx @@ -0,0 +1,23 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { shallow } from 'enzyme'; + +import { EngineIcon } from './engine_icon'; +import { MetaEngineIcon } from './meta_engine_icon'; + +describe('Engines icons', () => { + it('renders an engine icon', () => { + const wrapper = shallow(); + expect(wrapper.hasClass('engineIcon')).toBe(true); + }); + + it('renders a meta engine icon', () => { + const wrapper = shallow(); + expect(wrapper.hasClass('engineIcon')).toBe(true); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts new file mode 100644 index 0000000000000..157ae396319ac --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.test.ts @@ -0,0 +1,169 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { LogicMounter } from '../../../__mocks__/kea.mock'; + +jest.mock('../../../shared/http', () => ({ + HttpLogic: { values: { http: { get: jest.fn() } } }, +})); +import { HttpLogic } from '../../../shared/http'; + +import { EngineDetails } from '../engine/types'; +import { EnginesLogic } from './'; + +describe('EnginesLogic', () => { + const DEFAULT_VALUES = { + dataLoading: true, + engines: [], + enginesTotal: 0, + enginesPage: 1, + metaEngines: [], + metaEnginesTotal: 0, + metaEnginesPage: 1, + }; + + const MOCK_ENGINE = { + name: 'hello-world', + created_at: 'Fri, 1 Jan 1970 12:00:00 +0000', + document_count: 50, + field_count: 10, + } as EngineDetails; + const MOCK_ENGINES_API_RESPONSE = { + results: [MOCK_ENGINE], + meta: { + page: { + current: 1, + total_pages: 10, + total_results: 100, + size: 10, + }, + }, + }; + + const { mount } = new LogicMounter(EnginesLogic); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('has expected default values', () => { + mount(); + expect(EnginesLogic.values).toEqual(DEFAULT_VALUES); + }); + + describe('actions', () => { + describe('onEnginesLoad', () => { + describe('dataLoading', () => { + it('should be set to false', () => { + mount(); + EnginesLogic.actions.onEnginesLoad({ engines: [], total: 0 }); + + expect(EnginesLogic.values).toEqual({ + ...DEFAULT_VALUES, + dataLoading: false, + }); + }); + }); + + describe('engines & enginesTotal', () => { + it('should be set to the provided value', () => { + mount(); + EnginesLogic.actions.onEnginesLoad({ engines: [MOCK_ENGINE], total: 100 }); + + expect(EnginesLogic.values).toEqual({ + ...DEFAULT_VALUES, + dataLoading: false, + engines: [MOCK_ENGINE], + enginesTotal: 100, + }); + }); + }); + }); + + describe('onMetaEnginesLoad', () => { + describe('engines & enginesTotal', () => { + it('should be set to the provided value', () => { + mount(); + EnginesLogic.actions.onMetaEnginesLoad({ engines: [MOCK_ENGINE], total: 1 }); + + expect(EnginesLogic.values).toEqual({ + ...DEFAULT_VALUES, + metaEngines: [MOCK_ENGINE], + metaEnginesTotal: 1, + }); + }); + }); + }); + + describe('onEnginesPagination', () => { + describe('enginesPage', () => { + it('should be set to the provided value', () => { + mount(); + EnginesLogic.actions.onEnginesPagination(2); + + expect(EnginesLogic.values).toEqual({ + ...DEFAULT_VALUES, + enginesPage: 2, + }); + }); + }); + }); + + describe('onMetaEnginesPagination', () => { + describe('metaEnginesPage', () => { + it('should be set to the provided value', () => { + mount(); + EnginesLogic.actions.onMetaEnginesPagination(99); + + expect(EnginesLogic.values).toEqual({ + ...DEFAULT_VALUES, + metaEnginesPage: 99, + }); + }); + }); + }); + + describe('loadEngines', () => { + it('should call the engines API endpoint and set state based on the results', async () => { + const promise = Promise.resolve(MOCK_ENGINES_API_RESPONSE); + (HttpLogic.values.http.get as jest.Mock).mockReturnValueOnce(promise); + mount({ enginesPage: 10 }); + jest.spyOn(EnginesLogic.actions, 'onEnginesLoad'); + + EnginesLogic.actions.loadEngines(); + await promise; + + expect(HttpLogic.values.http.get).toHaveBeenCalledWith('/api/app_search/engines', { + query: { type: 'indexed', pageIndex: 10 }, + }); + expect(EnginesLogic.actions.onEnginesLoad).toHaveBeenCalledWith({ + engines: [MOCK_ENGINE], + total: 100, + }); + }); + }); + + describe('loadMetaEngines', () => { + it('should call the engines API endpoint and set state based on the results', async () => { + const promise = Promise.resolve(MOCK_ENGINES_API_RESPONSE); + (HttpLogic.values.http.get as jest.Mock).mockReturnValueOnce(promise); + mount({ metaEnginesPage: 99 }); + jest.spyOn(EnginesLogic.actions, 'onMetaEnginesLoad'); + + EnginesLogic.actions.loadMetaEngines(); + await promise; + + expect(HttpLogic.values.http.get).toHaveBeenCalledWith('/api/app_search/engines', { + query: { type: 'meta', pageIndex: 99 }, + }); + expect(EnginesLogic.actions.onMetaEnginesLoad).toHaveBeenCalledWith({ + engines: [MOCK_ENGINE], + total: 100, + }); + }); + }); + }); +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts new file mode 100644 index 0000000000000..097b759cf1505 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_logic.ts @@ -0,0 +1,116 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { kea, MakeLogicType } from 'kea'; + +import { HttpLogic } from '../../../shared/http'; + +import { EngineDetails } from '../engine/types'; + +interface EnginesValues { + dataLoading: boolean; + engines: EngineDetails[]; + enginesTotal: number; + enginesPage: number; + metaEngines: EngineDetails[]; + metaEnginesTotal: number; + metaEnginesPage: number; +} + +interface OnEnginesLoad { + engines: EngineDetails[]; + total: number; +} +interface EnginesActions { + onEnginesLoad({ engines, total }: OnEnginesLoad): OnEnginesLoad; + onMetaEnginesLoad({ engines, total }: OnEnginesLoad): OnEnginesLoad; + onEnginesPagination(page: number): { page: number }; + onMetaEnginesPagination(page: number): { page: number }; + loadEngines(): void; + loadMetaEngines(): void; +} + +export const EnginesLogic = kea>({ + path: ['enterprise_search', 'app_search', 'engines_logic'], + actions: { + onEnginesLoad: ({ engines, total }) => ({ engines, total }), + onMetaEnginesLoad: ({ engines, total }) => ({ engines, total }), + onEnginesPagination: (page) => ({ page }), + onMetaEnginesPagination: (page) => ({ page }), + loadEngines: true, + loadMetaEngines: true, + }, + reducers: { + dataLoading: [ + true, + { + onEnginesLoad: () => false, + }, + ], + engines: [ + [], + { + onEnginesLoad: (_, { engines }) => engines, + }, + ], + enginesTotal: [ + 0, + { + onEnginesLoad: (_, { total }) => total, + }, + ], + enginesPage: [ + 1, + { + onEnginesPagination: (_, { page }) => page, + }, + ], + metaEngines: [ + [], + { + onMetaEnginesLoad: (_, { engines }) => engines, + }, + ], + metaEnginesTotal: [ + 0, + { + onMetaEnginesLoad: (_, { total }) => total, + }, + ], + metaEnginesPage: [ + 1, + { + onMetaEnginesPagination: (_, { page }) => page, + }, + ], + }, + listeners: ({ actions, values }) => ({ + loadEngines: async () => { + const { http } = HttpLogic.values; + const { enginesPage } = values; + + const response = await http.get('/api/app_search/engines', { + query: { type: 'indexed', pageIndex: enginesPage }, + }); + actions.onEnginesLoad({ + engines: response.results, + total: response.meta.page.total_results, + }); + }, + loadMetaEngines: async () => { + const { http } = HttpLogic.values; + const { metaEnginesPage } = values; + + const response = await http.get('/api/app_search/engines', { + query: { type: 'meta', pageIndex: metaEnginesPage }, + }); + actions.onMetaEnginesLoad({ + engines: response.results, + total: response.meta.page.total_results, + }); + }, + }), +}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx index 61f783a8b6c2e..2cedec3c670b5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.test.tsx @@ -4,14 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -import '../../../__mocks__/kea.mock'; -import '../../../__mocks__/react_router_history.mock'; +import '../../../__mocks__/shallow_useeffect.mock'; +import { rerender } from '../../../__mocks__'; +import { setMockValues, setMockActions } from '../../../__mocks__/kea.mock'; import React from 'react'; -import { act } from 'react-dom/test-utils'; -import { shallow, ReactWrapper } from 'enzyme'; - -import { mountAsync, mockHttpValues, setMockValues } from '../../../__mocks__'; +import { shallow, ShallowWrapper } from 'enzyme'; import { LoadingState, EmptyState } from './components'; import { EnginesTable } from './engines_table'; @@ -19,91 +17,85 @@ import { EnginesTable } from './engines_table'; import { EnginesOverview } from './'; describe('EnginesOverview', () => { + const values = { + hasPlatinumLicense: false, + dataLoading: false, + engines: [], + enginesTotal: 0, + enginesPage: 1, + metaEngines: [], + metaEnginesTotal: 0, + metaEnginesPage: 1, + }; + const actions = { + loadEngines: jest.fn(), + loadMetaEngines: jest.fn(), + onEnginesPagination: jest.fn(), + onMetaEnginesPagination: jest.fn(), + }; + + beforeEach(() => { + jest.clearAllMocks(); + setMockValues(values); + setMockActions(actions); + }); + describe('non-happy-path states', () => { it('isLoading', () => { + setMockValues({ ...values, dataLoading: true }); const wrapper = shallow(); expect(wrapper.find(LoadingState)).toHaveLength(1); }); - it('isEmpty', async () => { - setMockValues({ - http: { - ...mockHttpValues.http, - get: () => ({ - results: [], - meta: { page: { total_results: 0 } }, - }), - }, - }); - const wrapper = await mountAsync(, { i18n: true }); + it('isEmpty', () => { + setMockValues({ ...values, engines: [] }); + const wrapper = shallow(); expect(wrapper.find(EmptyState)).toHaveLength(1); }); }); describe('happy-path states', () => { - const mockedApiResponse = { - results: [ - { - name: 'hello-world', - created_at: 'Fri, 1 Jan 1970 12:00:00 +0000', - document_count: 50, - field_count: 10, - }, - ], - meta: { - page: { - current: 1, - total_pages: 10, - total_results: 100, - size: 10, - }, - }, + const valuesWithEngines = { + ...values, + dataLoading: false, + engines: ['dummy-engine'], + enginesTotal: 100, + enginesPage: 1, }; - const mockApi = jest.fn(() => mockedApiResponse); beforeEach(() => { - jest.clearAllMocks(); - setMockValues({ http: { ...mockHttpValues.http, get: mockApi } }); + setMockValues(valuesWithEngines); }); it('renders and calls the engines API', async () => { - const wrapper = await mountAsync(, { i18n: true }); + const wrapper = shallow(); expect(wrapper.find(EnginesTable)).toHaveLength(1); - expect(mockApi).toHaveBeenNthCalledWith(1, '/api/app_search/engines', { - query: { - type: 'indexed', - pageIndex: 1, - }, - }); + expect(actions.loadEngines).toHaveBeenCalled(); }); describe('when on a platinum license', () => { it('renders a 2nd meta engines table & makes a 2nd meta engines API call', async () => { setMockValues({ + ...valuesWithEngines, hasPlatinumLicense: true, - http: { ...mockHttpValues.http, get: mockApi }, + metaEngines: ['dummy-meta-engine'], }); - const wrapper = await mountAsync(, { i18n: true }); + const wrapper = shallow(); expect(wrapper.find(EnginesTable)).toHaveLength(2); - expect(mockApi).toHaveBeenNthCalledWith(2, '/api/app_search/engines', { - query: { - type: 'meta', - pageIndex: 1, - }, - }); + expect(actions.loadMetaEngines).toHaveBeenCalled(); }); }); describe('pagination', () => { - const getTablePagination = (wrapper: ReactWrapper) => + const getTablePagination = (wrapper: ShallowWrapper) => wrapper.find(EnginesTable).prop('pagination'); it('passes down page data from the API', async () => { - const wrapper = await mountAsync(, { i18n: true }); + const wrapper = shallow(); const pagination = getTablePagination(wrapper); expect(pagination.totalEngines).toEqual(100); @@ -111,17 +103,13 @@ describe('EnginesOverview', () => { }); it('re-polls the API on page change', async () => { - const wrapper = await mountAsync(, { i18n: true }); - await act(async () => getTablePagination(wrapper).onPaginate(5)); - wrapper.update(); - - expect(mockApi).toHaveBeenLastCalledWith('/api/app_search/engines', { - query: { - type: 'indexed', - pageIndex: 5, - }, - }); - expect(getTablePagination(wrapper).pageIndex).toEqual(4); + const wrapper = shallow(); + + setMockValues({ ...valuesWithEngines, enginesPage: 51 }); + rerender(wrapper); + + expect(actions.loadEngines).toHaveBeenCalledTimes(2); + expect(getTablePagination(wrapper).pageIndex).toEqual(50); }); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx index 0381c3806fec7..8a24ee746ed14 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_overview.tsx @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useEffect, useState } from 'react'; -import { useValues } from 'kea'; +import React, { useEffect } from 'react'; +import { useValues, useActions } from 'kea'; import { EuiPageContent, EuiPageContentHeader, @@ -17,7 +17,6 @@ import { import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; import { FlashMessages } from '../../../shared/flash_messages'; -import { HttpLogic } from '../../../shared/http'; import { LicensingLogic } from '../../../shared/licensing'; import { EngineIcon } from './assets/engine_icon'; @@ -25,61 +24,34 @@ import { MetaEngineIcon } from './assets/meta_engine_icon'; import { ENGINES_TITLE, META_ENGINES_TITLE } from './constants'; import { EnginesOverviewHeader, LoadingState, EmptyState } from './components'; import { EnginesTable } from './engines_table'; +import { EnginesLogic } from './engines_logic'; import './engines_overview.scss'; -interface GetEnginesParams { - type: string; - pageIndex: number; -} -interface SetEnginesCallbacks { - setResults: React.Dispatch>; - setResultsTotal: React.Dispatch>; -} - export const EnginesOverview: React.FC = () => { - const { http } = useValues(HttpLogic); const { hasPlatinumLicense } = useValues(LicensingLogic); - - const [isLoading, setIsLoading] = useState(true); - const [engines, setEngines] = useState([]); - const [enginesPage, setEnginesPage] = useState(1); - const [enginesTotal, setEnginesTotal] = useState(0); - const [metaEngines, setMetaEngines] = useState([]); - const [metaEnginesPage, setMetaEnginesPage] = useState(1); - const [metaEnginesTotal, setMetaEnginesTotal] = useState(0); - - const getEnginesData = async ({ type, pageIndex }: GetEnginesParams) => { - return await http.get('/api/app_search/engines', { - query: { type, pageIndex }, - }); - }; - const setEnginesData = async (params: GetEnginesParams, callbacks: SetEnginesCallbacks) => { - const response = await getEnginesData(params); - - callbacks.setResults(response.results); - callbacks.setResultsTotal(response.meta.page.total_results); - - setIsLoading(false); - }; + const { + dataLoading, + engines, + enginesTotal, + enginesPage, + metaEngines, + metaEnginesTotal, + metaEnginesPage, + } = useValues(EnginesLogic); + const { loadEngines, loadMetaEngines, onEnginesPagination, onMetaEnginesPagination } = useActions( + EnginesLogic + ); useEffect(() => { - const params = { type: 'indexed', pageIndex: enginesPage }; - const callbacks = { setResults: setEngines, setResultsTotal: setEnginesTotal }; - - setEnginesData(params, callbacks); + loadEngines(); }, [enginesPage]); useEffect(() => { - if (hasPlatinumLicense) { - const params = { type: 'meta', pageIndex: metaEnginesPage }; - const callbacks = { setResults: setMetaEngines, setResultsTotal: setMetaEnginesTotal }; - - setEnginesData(params, callbacks); - } + if (hasPlatinumLicense) loadMetaEngines(); }, [hasPlatinumLicense, metaEnginesPage]); - if (isLoading) return ; + if (dataLoading) return ; if (!engines.length) return ; return ( @@ -103,7 +75,7 @@ export const EnginesOverview: React.FC = () => { pagination={{ totalEngines: enginesTotal, pageIndex: enginesPage - 1, - onPaginate: setEnginesPage, + onPaginate: onEnginesPagination, }} /> @@ -124,7 +96,7 @@ export const EnginesOverview: React.FC = () => { pagination={{ totalEngines: metaEnginesTotal, pageIndex: metaEnginesPage - 1, - onPaginate: setMetaEnginesPage, + onPaginate: onMetaEnginesPagination, }} /> diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx index ea7eeea750cc4..1dde4db15a425 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.test.tsx @@ -12,6 +12,7 @@ import React from 'react'; import { EuiBasicTable, EuiPagination, EuiButtonEmpty } from '@elastic/eui'; import { EuiLinkTo } from '../../../shared/react_router_helpers'; +import { EngineDetails } from '../engine/types'; import { EnginesTable } from './engines_table'; describe('EnginesTable', () => { @@ -25,7 +26,7 @@ describe('EnginesTable', () => { isMeta: false, document_count: 99999, field_count: 10, - }, + } as EngineDetails, ]; const pagination = { totalEngines: 50, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx index e9805ab8f2711..e8944c37efa47 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/engines_table.tsx @@ -16,22 +16,15 @@ import { getEngineRoute } from '../../routes'; import { ENGINES_PAGE_SIZE } from '../../../../../common/constants'; import { UNIVERSAL_LANGUAGE } from '../../constants'; +import { EngineDetails } from '../engine/types'; -interface EnginesTableData { - name: string; - created_at: string; - document_count: number; - field_count: number; - language: string | null; - isMeta: boolean; -} interface EnginesTablePagination { totalEngines: number; pageIndex: number; onPaginate(pageIndex: number): void; } interface EnginesTableProps { - data: EnginesTableData[]; + data: EngineDetails[]; pagination: EnginesTablePagination; } interface OnChange { @@ -55,7 +48,7 @@ export const EnginesTable: React.FC = ({ }), }); - const columns: Array> = [ + const columns: Array> = [ { field: 'name', name: i18n.translate('xpack.enterpriseSearch.appSearch.enginesOverview.table.column.name', { @@ -100,7 +93,7 @@ export const EnginesTable: React.FC = ({ } ), dataType: 'string', - render: (language: string, engine: EnginesTableData) => + render: (language: string, engine: EngineDetails) => engine.isMeta ? '' : language || UNIVERSAL_LANGUAGE, }, { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts index 76ca9239a3c7e..e26a813553b83 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/index.ts @@ -4,5 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ +export { EnginesLogic } from './engines_logic'; export { EnginesOverview } from './engines_overview'; export { ENGINES_TITLE, META_ENGINES_TITLE } from './constants'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts new file mode 100644 index 0000000000000..0e007f5d8d1d1 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { LogRetentionLogic } from './log_retention_logic'; +export * from './types'; +export * from './messaging'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts similarity index 97% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts index 8310e2abe045b..801a8d36cc403 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.test.ts @@ -4,18 +4,18 @@ * you may not use this file except in compliance with the Elastic License. */ -import { LogicMounter } from '../../../../__mocks__/kea.mock'; +import { LogicMounter } from '../../../__mocks__/kea.mock'; -import { mockHttpValues } from '../../../../__mocks__'; -jest.mock('../../../../shared/http', () => ({ +import { mockHttpValues } from '../../../__mocks__'; +jest.mock('../../../shared/http', () => ({ HttpLogic: { values: mockHttpValues }, })); const { http } = mockHttpValues; -jest.mock('../../../../shared/flash_messages', () => ({ +jest.mock('../../../shared/flash_messages', () => ({ flashAPIErrors: jest.fn(), })); -import { flashAPIErrors } from '../../../../shared/flash_messages'; +import { flashAPIErrors } from '../../../shared/flash_messages'; import { LogRetentionOptions } from './types'; import { LogRetentionLogic } from './log_retention_logic'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts similarity index 96% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts index 31fc41213492d..46c91e5c3c45a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/log_retention_logic.ts @@ -6,9 +6,10 @@ import { kea, MakeLogicType } from 'kea'; +import { HttpLogic } from '../../../shared/http'; +import { flashAPIErrors } from '../../../shared/flash_messages'; + import { LogRetentionOptions, LogRetention, LogRetentionServer } from './types'; -import { HttpLogic } from '../../../../shared/http'; -import { flashAPIErrors } from '../../../../shared/flash_messages'; import { convertLogRetentionFromServerToClient } from './utils/convert_log_retention'; interface LogRetentionActions { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/constants.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/constants.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.test.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.test.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.test.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/determine_tooltip_content.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/determine_tooltip_content.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx similarity index 95% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx index b65ffc04ad700..13692bb3e415d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.test.tsx @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import '../../../../../__mocks__/kea.mock'; -import { setMockValues } from '../../../../../__mocks__'; +import '../../../../__mocks__/kea.mock'; +import { setMockValues } from '../../../../__mocks__'; import React from 'react'; import { shallow } from 'enzyme'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx similarity index 96% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx index 21267738f61ad..3b0761950ee3d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { useValues } from 'kea'; import moment from 'moment'; -import { AppLogic } from '../../../../app_logic'; +import { AppLogic } from '../../../app_logic'; import { LogRetentionLogic } from '../log_retention_logic'; import { LogRetentionOptions } from '../types'; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/types.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/messaging/types.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/messaging/types.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/types.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/types.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts similarity index 99% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts index b49b2afe50831..88090dbb5ea1f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.test.ts @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ + import { convertLogRetentionFromServerToClient } from './convert_log_retention'; describe('convertLogRetentionFromServerToClient', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts similarity index 100% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/utils/convert_log_retention.ts rename to x-pack/plugins/enterprise_search/public/applications/app_search/components/log_retention/utils/convert_log_retention.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx index 6d802b0c5cfaf..5b2e439436b55 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/generic_confirmation_modal.tsx @@ -55,7 +55,7 @@ export const GenericConfirmationModal: React.FC =

    {subheading}

    -

    {description}

    + {description} ', () => { const actions = { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx index 67421bb78fa71..25f90df4e541b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_confirmation_modal.tsx @@ -10,10 +10,8 @@ import { i18n } from '@kbn/i18n'; import { EuiTextColor, EuiOverlayMask } from '@elastic/eui'; import { useActions, useValues } from 'kea'; +import { LogRetentionLogic, LogRetentionOptions } from '../../log_retention'; import { GenericConfirmationModal } from './generic_confirmation_modal'; -import { LogRetentionLogic } from './log_retention_logic'; - -import { LogRetentionOptions } from './types'; export const LogRetentionConfirmationModal: React.FC = () => { const CANNOT_BE_RECOVERED_TEXT = i18n.translate( diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx index c44418a1eb5a2..9140704ece3f8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.test.tsx @@ -12,8 +12,8 @@ import { setMockActions, setMockValues } from '../../../../__mocks__'; import React from 'react'; import { shallow } from 'enzyme'; +import { LogRetention } from '../../log_retention/types'; import { LogRetentionPanel } from './log_retention_panel'; -import { LogRetention } from './types'; describe('', () => { const actions = { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx index 3297f0df4d7bd..a3aa463ad069a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/log_retention/log_retention_panel.tsx @@ -12,9 +12,12 @@ import { useActions, useValues } from 'kea'; import { DOCS_PREFIX } from '../../../routes'; -import { LogRetentionLogic } from './log_retention_logic'; -import { AnalyticsLogRetentionMessage, ApiLogRetentionMessage } from './messaging'; -import { LogRetentionOptions } from './types'; +import { + LogRetentionLogic, + LogRetentionOptions, + AnalyticsLogRetentionMessage, + ApiLogRetentionMessage, +} from '../../log_retention'; export const LogRetentionPanel: React.FC = () => { const { toggleLogRetention, fetchLogRetention } = useActions(LogRetentionLogic); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx index dbd6627a3b9ce..993da9e563185 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/settings/settings.tsx @@ -16,9 +16,8 @@ import { import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; import { FlashMessages } from '../../../shared/flash_messages'; -import { LogRetentionPanel } from './log_retention/log_retention_panel'; -import { LogRetentionConfirmationModal } from './log_retention/log_retention_confirmation_modal'; +import { LogRetentionPanel, LogRetentionConfirmationModal } from './log_retention'; import { SETTINGS_TITLE } from './'; export const Settings: React.FC = () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts index ca2ce177617b8..e8c6948438fe0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/routes.ts @@ -25,7 +25,12 @@ export const SAMPLE_ENGINE_PATH = '/engines/national-parks-demo'; export const getEngineRoute = (engineName: string) => generatePath(ENGINE_PATH, { engineName }); export const ENGINE_ANALYTICS_PATH = '/analytics'; -// TODO: Analytics sub-pages +export const ENGINE_ANALYTICS_TOP_QUERIES_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries`; +export const ENGINE_ANALYTICS_TOP_QUERIES_NO_CLICKS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_no_clicks`; +export const ENGINE_ANALYTICS_TOP_QUERIES_NO_RESULTS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_no_results`; +export const ENGINE_ANALYTICS_TOP_QUERIES_WITH_CLICKS_PATH = `${ENGINE_ANALYTICS_PATH}/top_queries_with_clicks`; +export const ENGINE_ANALYTICS_RECENT_QUERIES_PATH = `${ENGINE_ANALYTICS_PATH}/recent_queries`; +export const ENGINE_ANALYTICS_QUERY_DETAIL_PATH = `${ENGINE_ANALYTICS_PATH}/query_detail/:query`; export const ENGINE_DOCUMENTS_PATH = '/documents'; export const ENGINE_DOCUMENT_DETAIL_PATH = `${ENGINE_DOCUMENTS_PATH}/:documentId`; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx index 62c0af31cffd9..083173c8e7a4c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.test.tsx @@ -13,6 +13,7 @@ import { shallow } from 'enzyme'; import { EuiButton as EuiButtonExternal, EuiEmptyPrompt } from '@elastic/eui'; import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../../../../common/constants'; +import { SetAppSearchChrome } from '../kibana_chrome'; import { AppSearchLogo } from './assets/app_search_logo'; import { WorkplaceSearchLogo } from './assets/workplace_search_logo'; @@ -51,6 +52,14 @@ describe('NotFound', () => { expect(prompt.find(EuiButtonExternal).prop('href')).toEqual('https://support.elastic.co'); }); + it('passes down optional custom breadcrumbs', () => { + const wrapper = shallow( + + ); + + expect(wrapper.find(SetAppSearchChrome).prop('trail')).toEqual(['Hello', 'World']); + }); + it('does not render anything without a valid product', () => { const wrapper = shallow(); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx index d0140b8730229..5c76b5dae1e43 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/not_found/not_found.tsx @@ -23,6 +23,7 @@ import { } from '../../../../common/constants'; import { EuiButtonTo } from '../react_router_helpers'; +import { BreadcrumbTrail } from '../kibana_chrome/generate_breadcrumbs'; import { SetAppSearchChrome, SetWorkplaceSearchChrome } from '../kibana_chrome'; import { SendAppSearchTelemetry, SendWorkplaceSearchTelemetry } from '../telemetry'; import { LicensingLogic } from '../licensing'; @@ -37,9 +38,11 @@ interface NotFoundProps { ID: string; SUPPORT_URL: string; }; + // Optional breadcrumbs + breadcrumbs?: BreadcrumbTrail; } -export const NotFound: React.FC = ({ product = {} }) => { +export const NotFound: React.FC = ({ product = {}, breadcrumbs }) => { const { hasGoldLicense } = useValues(LicensingLogic); const supportUrl = hasGoldLicense ? LICENSED_SUPPORT_URL : product.SUPPORT_URL; @@ -64,7 +67,7 @@ export const NotFound: React.FC = ({ product = {} }) => { return ( <> - + diff --git a/x-pack/plugins/fleet/common/services/agent_status.ts b/x-pack/plugins/fleet/common/services/agent_status.ts index 30b52bcb28748..4cf35398bab24 100644 --- a/x-pack/plugins/fleet/common/services/agent_status.ts +++ b/x-pack/plugins/fleet/common/services/agent_status.ts @@ -49,7 +49,7 @@ export function buildKueryForUnenrollingAgents() { } export function buildKueryForOnlineAgents() { - return `not (${buildKueryForOfflineAgents()}) AND not (${buildKueryForErrorAgents()}) AND not (${buildKueryForEnrollingAgents()}) AND not (${buildKueryForUnenrollingAgents()})`; + return `not (${buildKueryForOfflineAgents()}) AND not (${buildKueryForErrorAgents()}) AND not (${buildKueryForUpdatingAgents()})`; } export function buildKueryForErrorAgents() { @@ -59,11 +59,11 @@ export function buildKueryForErrorAgents() { export function buildKueryForOfflineAgents() { return `${AGENT_SAVED_OBJECT_TYPE}.last_checkin < now-${ (4 * AGENT_POLLING_THRESHOLD_MS) / 1000 - }s AND not (${buildKueryForErrorAgents()})`; + }s AND not (${buildKueryForErrorAgents()}) AND not ( ${buildKueryForUpdatingAgents()} )`; } export function buildKueryForUpgradingAgents() { - return `${AGENT_SAVED_OBJECT_TYPE}.upgrade_started_at:*`; + return `(${AGENT_SAVED_OBJECT_TYPE}.upgrade_started_at:*) and not (${AGENT_SAVED_OBJECT_TYPE}.upgraded_at:*)`; } export function buildKueryForUpdatingAgents() { diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts index 36972270de011..3523c73ee64e1 100644 --- a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts @@ -27,6 +27,14 @@ describe('Fleet - packageToPackagePolicy', () => { index_pattern: [], map: [], }, + elasticsearch: { + ingest_pipeline: [], + component_template: [], + index_template: [], + transform: [], + ilm_policy: [], + data_stream_ilm_policy: [], + }, }, status: 'not_installed', release: 'experimental', diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 08f92f406b90f..6724863557411 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -187,8 +187,8 @@ export type AssetTypeToParts = KibanaAssetTypeToParts & ElasticsearchAssetTypeTo export type AssetsGroupedByServiceByType = Record< Extract, KibanaAssetTypeToParts ->; -// & Record, ElasticsearchAssetTypeToParts>; +> & + Record, ElasticsearchAssetTypeToParts>; export type KibanaAssetParts = AssetParts & { service: Extract; diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts index 236fc586bf528..f758ca0921a08 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts @@ -219,5 +219,6 @@ export interface GetAgentStatusResponse { error: number; offline: number; other: number; + updating: number; }; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx index 95c630e3b3686..7326d2efb8565 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx @@ -15,6 +15,8 @@ import { EuiFilterGroup, EuiPanel, EuiButtonEmpty, + EuiCallOut, + EuiLink, } from '@elastic/eui'; import useMeasure from 'react-use/lib/useMeasure'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -184,7 +186,7 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen const [logsPanelRef, { height: logPanelHeight }] = useMeasure(); const agentVersion = agent.local_metadata?.elastic?.agent?.version; - const isLogLevelSelectionAvailable = useMemo(() => { + const isLogFeatureAvailable = useMemo(() => { if (!agentVersion) { return false; } @@ -195,6 +197,31 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen return semverGte(agentVersionWithPrerelease, '7.11.0'); }, [agentVersion]); + if (!isLogFeatureAvailable) { + return ( + + + + ), + }} + /> + } + /> + ); + } + return ( @@ -271,11 +298,9 @@ export const AgentLogsUI: React.FunctionComponent = memo(({ agen />
    - {isLogLevelSelectionAvailable && ( - - - - )} + + + ); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index 2067a2bd91c58..fb7dc78e85770 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -47,7 +47,7 @@ import { AgentTableHeader } from './components/table_header'; import { SelectionMode } from './components/bulk_actions'; import { SearchAndFilterBar } from './components/search_and_filter_bar'; -const REFRESH_INTERVAL_MS = 10000; +const REFRESH_INTERVAL_MS = 30000; const RowActions = React.memo<{ agent: Agent; @@ -282,7 +282,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { healthy: agentsStatusRequest.data.results.online, unhealthy: agentsStatusRequest.data.results.error, offline: agentsStatusRequest.data.results.offline, - updating: agentsStatusRequest.data.results.other, + updating: agentsStatusRequest.data.results.updating, inactive: agentsRequest.data.totalInactive, }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx index 45fd380a06f34..a87dd0c6d35eb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/components/confirm_delete_modal.tsx @@ -37,7 +37,7 @@ export const ConfirmEnrollmentTokenDelete = (props: Props) => { = { data_stream_ilm_policy: 'Data Stream ILM Policy', }; -export const ServiceTitleMap: Record, string> = { +export const ServiceTitleMap: Record = { kibana: 'Kibana', + elasticsearch: 'Elasticsearch', }; export const AssetIcons: Record = { diff --git a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts index f42f5da2695d0..4820f25c05f96 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts @@ -9,7 +9,7 @@ import { GetDataStreamsResponse, KibanaAssetType, KibanaSavedObjectType } from ' import { getPackageSavedObjects, getKibanaSavedObject } from '../../services/epm/packages/get'; import { defaultIngestErrorHandler } from '../../errors'; -const DATA_STREAM_INDEX_PATTERN = 'logs-*-*,metrics-*-*'; +const DATA_STREAM_INDEX_PATTERN = 'logs-*-*,metrics-*-*,traces-*-*'; export const getListHandler: RequestHandler = async (context, request, response) => { const callCluster = context.core.elasticsearch.legacy.client.callAsCurrentUser; diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts index 0dfa6db7df9be..74faedc8e2931 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.ts @@ -5,6 +5,7 @@ */ import { SavedObjectsClientContract } from 'src/core/server'; +import pMap from 'p-map'; import { getAgent, listAgents } from './crud'; import { AGENT_EVENT_SAVED_OBJECT_TYPE, AGENT_SAVED_OBJECT_TYPE } from '../../constants'; import { AgentStatus } from '../../types'; @@ -21,18 +22,32 @@ export async function getAgentStatusById( export const getAgentStatus = AgentStatusKueryHelper.getAgentStatus; +function joinKuerys(...kuerys: Array) { + return kuerys + .filter((kuery) => kuery !== undefined) + .reduce((acc, kuery) => { + if (acc === '') { + return `(${kuery})`; + } + + return `${acc} and (${kuery})`; + }, ''); +} + export async function getAgentStatusForAgentPolicy( soClient: SavedObjectsClientContract, agentPolicyId?: string, filterKuery?: string ) { - const [all, online, error, offline] = await Promise.all( + const [all, online, error, offline, updating] = await pMap( [ undefined, AgentStatusKueryHelper.buildKueryForOnlineAgents(), AgentStatusKueryHelper.buildKueryForErrorAgents(), AgentStatusKueryHelper.buildKueryForOfflineAgents(), - ].map((kuery) => + AgentStatusKueryHelper.buildKueryForUpdatingAgents(), + ], + (kuery) => listAgents(soClient, { showInactive: false, perPage: 0, @@ -44,28 +59,19 @@ export async function getAgentStatusForAgentPolicy( agentPolicyId ? `${AGENT_SAVED_OBJECT_TYPE}.policy_id:"${agentPolicyId}"` : undefined, ] ), - }) - ) + }), + { + concurrency: 1, + } ); - function joinKuerys(...kuerys: Array) { - return kuerys - .filter((kuery) => kuery !== undefined) - .reduce((acc, kuery) => { - if (acc === '') { - return `(${kuery})`; - } - - return `${acc} and (${kuery})`; - }, ''); - } - return { events: await getEventsCount(soClient, agentPolicyId), total: all.total, online: online.total, error: error.total, offline: offline.total, + updating: updating.total, other: all.total - online.total - error.total - offline.total, }; } diff --git a/x-pack/plugins/fleet/server/services/epm/registry/index.ts b/x-pack/plugins/fleet/server/services/epm/registry/index.ts index dc4f02c94acde..61bbb4cddd085 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/index.ts @@ -208,7 +208,10 @@ export function groupPathsByService(paths: string[]): AssetsGroupedByServiceByTy // ASK: best way, if any, to avoid `any`? const assets = paths.reduce((map: any, path) => { const parts = getPathParts(path.replace(/^\/package\//, '')); - if (parts.service === 'kibana' && kibanaAssetTypes.includes(parts.type)) { + if ( + (parts.service === 'kibana' && kibanaAssetTypes.includes(parts.type)) || + parts.service === 'elasticsearch' + ) { if (!map[parts.service]) map[parts.service] = {}; if (!map[parts.service][parts.type]) map[parts.service][parts.type] = []; map[parts.service][parts.type].push(parts); @@ -219,6 +222,6 @@ export function groupPathsByService(paths: string[]): AssetsGroupedByServiceByTy return { kibana: assets.kibana, - // elasticsearch: assets.elasticsearch, + elasticsearch: assets.elasticsearch, }; } diff --git a/x-pack/plugins/global_search_providers/tsconfig.json b/x-pack/plugins/global_search_providers/tsconfig.json new file mode 100644 index 0000000000000..381d314b2e530 --- /dev/null +++ b/x-pack/plugins/global_search_providers/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "server/**/*", + "../../typings/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../global_search/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts index fc5f369e588f1..1cf84c70ff907 100644 --- a/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts +++ b/x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_fetch_route.ts @@ -43,7 +43,7 @@ async function addLinkedIndices(client: ElasticsearchClient, policiesMap: Polici const response = await client.ilm.explainLifecycle<{ indices: { [indexName: string]: IndexLifecyclePolicy }; - }>({ index: '*' }, options); + }>({ index: '*,.*' }, options); // '*,.*' will include hidden indices const policyExplanation = response.body; Object.entries(policyExplanation.indices).forEach(([indexName, { policy }]) => { if (policy && policiesMap[policy]) { diff --git a/x-pack/plugins/index_management/kibana.json b/x-pack/plugins/index_management/kibana.json index af3d61c8808ef..5dcff0ba942e1 100644 --- a/x-pack/plugins/index_management/kibana.json +++ b/x-pack/plugins/index_management/kibana.json @@ -9,6 +9,6 @@ "requiredBundles": [ "kibanaReact", "esUiShared", - "runtimeFieldEditor" + "runtimeFields" ] } diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts index 652925a977fa0..36f7fecbcff21 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts @@ -58,7 +58,7 @@ export { RuntimeField, RuntimeFieldEditorFlyoutContent, RuntimeFieldEditorFlyoutContentProps, -} from '../../../../../runtime_field_editor/public'; +} from '../../../../../runtime_fields/public'; export { createKibanaReactContext } from '../../../../../../../src/plugins/kibana_react/public'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx index 1144a1043c5b1..fd62b8ca962ab 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx @@ -220,6 +220,7 @@ export function DimensionEditor(props: DimensionEditorProps) { 'data-test-subj': `lns-indexPatternDimension-${operationType}${ compatibleWithCurrentField ? '' : ' incompatible' }`, + [`aria-pressed`]: isActive, onClick() { if ( operationDefinitionMap[operationType].input === 'none' || diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx index 625084000fa93..fae086506f015 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx @@ -259,7 +259,7 @@ export const termsOperation: OperationDefinition { - setPopoverOpen(true); + setPopoverOpen(!popoverOpen); }} > {i18n.translate('xpack.lens.indexPattern.terms.advancedSettings', { diff --git a/x-pack/plugins/lens/public/persistence/filter_references.test.ts b/x-pack/plugins/lens/public/persistence/filter_references.test.ts index 23c0cd1d11f1b..02b99c1b63ee5 100644 --- a/x-pack/plugins/lens/public/persistence/filter_references.test.ts +++ b/x-pack/plugins/lens/public/persistence/filter_references.test.ts @@ -56,6 +56,18 @@ describe('filter saved object references', () => { `); }); + it('should remove index and value from persistable filter', () => { + const { persistableFilters } = extractFilterReferences([ + { ...filters[0], meta: { ...filters[0].meta, value: 'CN' } }, + { ...filters[1], meta: { ...filters[1].meta, value: 'US' } }, + ]); + expect(persistableFilters.length).toBe(2); + persistableFilters.forEach((filter) => { + expect(filter.meta.hasOwnProperty('index')).toBe(false); + expect(filter.meta.hasOwnProperty('value')).toBe(false); + }); + }); + it('should restore the same filter after extracting and injecting', () => { const { persistableFilters, references } = extractFilterReferences(filters); expect(injectFilterReferences(persistableFilters, references)).toEqual(filters); diff --git a/x-pack/plugins/lens/public/persistence/filter_references.ts b/x-pack/plugins/lens/public/persistence/filter_references.ts index 47564e510ce9c..0dca0941662c7 100644 --- a/x-pack/plugins/lens/public/persistence/filter_references.ts +++ b/x-pack/plugins/lens/public/persistence/filter_references.ts @@ -22,14 +22,18 @@ export function extractFilterReferences( type: 'index-pattern', id: filterRow.meta.index, }); - return { + const newFilter = { ...filterRow, meta: { ...filterRow.meta, indexRefName: refName, - index: undefined, }, }; + // remove index because it's specified by indexRefName + delete newFilter.meta.index; + // remove value because it can't be persisted + delete newFilter.meta.value; + return newFilter; }); return { persistableFilters, references }; diff --git a/x-pack/plugins/maps/public/api/create_layer_descriptors.ts b/x-pack/plugins/maps/public/api/create_layer_descriptors.ts index 5d3eca2200ad5..fbe8da55ed702 100644 --- a/x-pack/plugins/maps/public/api/create_layer_descriptors.ts +++ b/x-pack/plugins/maps/public/api/create_layer_descriptors.ts @@ -6,6 +6,7 @@ import { LayerDescriptor } from '../../common/descriptor_types'; import { lazyLoadMapModules } from '../lazy_load_bundle'; +import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source'; export const createLayerDescriptors = { async createSecurityLayerDescriptors( @@ -19,4 +20,10 @@ export const createLayerDescriptors = { const mapModules = await lazyLoadMapModules(); return mapModules.createBasemapLayerDescriptor(); }, + async createESSearchSourceLayerDescriptor( + params: CreateLayerDescriptorParams + ): Promise { + const mapModules = await lazyLoadMapModules(); + return mapModules.createESSearchSourceLayerDescriptor(params); + }, }; diff --git a/x-pack/plugins/maps/public/api/start_api.ts b/x-pack/plugins/maps/public/api/start_api.ts index 7109ca8ce5c9d..5877520e9227b 100644 --- a/x-pack/plugins/maps/public/api/start_api.ts +++ b/x-pack/plugins/maps/public/api/start_api.ts @@ -7,6 +7,7 @@ import { LayerDescriptor } from '../../common/descriptor_types'; import { SourceRegistryEntry } from '../classes/sources/source_registry'; import { LayerWizard } from '../classes/layers/layer_wizard_registry'; +import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source'; export interface MapsStartApi { createLayerDescriptors: { @@ -15,6 +16,9 @@ export interface MapsStartApi { indexPatternTitle: string ) => Promise; createBasemapLayerDescriptor: () => Promise; + createESSearchSourceLayerDescriptor: ( + params: CreateLayerDescriptorParams + ) => Promise; }; registerLayerWizard(layerWizard: LayerWizard): Promise; registerSource(entry: SourceRegistryEntry): Promise; diff --git a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx index 5d234f5be44af..1321593f015c0 100644 --- a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx +++ b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.test.tsx @@ -6,7 +6,6 @@ import { SCALING_TYPES, SOURCE_TYPES } from '../../../../common/constants'; import { BlendedVectorLayer } from './blended_vector_layer'; -// @ts-expect-error import { ESSearchSource } from '../../sources/es_search_source'; import { ESGeoGridSourceDescriptor } from '../../../../common/descriptor_types'; diff --git a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx index 2db12db33ff27..a0029c5c64e0b 100644 --- a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx +++ b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx @@ -16,7 +16,6 @@ import { import { getFileUploadComponent } from '../../../kibana_services'; import { GeojsonFileSource } from '../../sources/geojson_file_source'; import { VectorLayer } from '../../layers/vector_layer/vector_layer'; -// @ts-expect-error import { createDefaultLayerDescriptor } from '../../sources/es_search_source'; import { RenderWizardArguments } from '../../layers/layer_wizard_registry'; import { FileUploadComponentProps } from '../../../../../file_upload/public'; diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts new file mode 100644 index 0000000000000..b734186b52c93 --- /dev/null +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.test.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { createLayerDescriptor } from './create_layer_descriptor'; +import { ES_GEO_FIELD_TYPE } from '../../../../common/constants'; + +jest.mock('../../../kibana_services', () => { + return { + getIsDarkMode() { + return false; + }, + }; +}); +jest.mock('../../../licensed_features', () => { + return { + getIsGoldPlus() { + return true; + }, + }; +}); +jest.mock('uuid/v4', () => { + return function () { + return '12345'; + }; +}); + +test('Should create layer descriptor', () => { + const layerDescriptor = createLayerDescriptor({ + indexPatternId: 'myIndexPattern', + geoFieldName: 'myGeoField', + geoFieldType: ES_GEO_FIELD_TYPE.GEO_POINT, + }); + expect(layerDescriptor.sourceDescriptor).toEqual({ + applyGlobalQuery: true, + applyGlobalTime: true, + filterByMapBounds: true, + geoField: 'myGeoField', + id: '12345', + indexPatternId: 'myIndexPattern', + scalingType: 'CLUSTERS', + sortField: '', + sortOrder: 'desc', + tooltipProperties: [], + topHitsSize: 1, + topHitsSplitField: '', + type: 'ES_SEARCH', + }); +}); diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts new file mode 100644 index 0000000000000..4d5d14ef3b2a3 --- /dev/null +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { Query } from 'src/plugins/data/public'; +import { LayerDescriptor } from '../../../../common/descriptor_types'; +import { ES_GEO_FIELD_TYPE, SCALING_TYPES } from '../../../../common/constants'; +import { ESSearchSource } from './es_search_source'; +import { VectorLayer } from '../../layers/vector_layer/vector_layer'; +import { getIsGoldPlus } from '../../../licensed_features'; + +export interface CreateLayerDescriptorParams { + indexPatternId: string; + geoFieldName: string; + geoFieldType: ES_GEO_FIELD_TYPE; + query?: Query; +} + +export function createLayerDescriptor({ + indexPatternId, + geoFieldName, + geoFieldType, + query, +}: CreateLayerDescriptorParams): LayerDescriptor { + // Prefer clusters for geo_shapes if liscensing is enabled. + const scalingType = + geoFieldType === ES_GEO_FIELD_TYPE.GEO_POINT || + (geoFieldType === ES_GEO_FIELD_TYPE.GEO_SHAPE && getIsGoldPlus()) + ? SCALING_TYPES.CLUSTERS + : SCALING_TYPES.LIMIT; + const sourceDescriptor = ESSearchSource.createDescriptor({ + indexPatternId, + geoField: geoFieldName, + scalingType, + }); + + return VectorLayer.createDescriptor({ sourceDescriptor, query }); +} diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.js b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts similarity index 80% rename from x-pack/plugins/maps/public/classes/sources/es_search_source/index.js rename to x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts index 6ae327a18b7c2..44e39b7c637d8 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.js +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +export { createLayerDescriptor, CreateLayerDescriptorParams } from './create_layer_descriptor'; export { ESSearchSource } from './es_search_source'; export { createDefaultLayerDescriptor, diff --git a/x-pack/plugins/maps/public/lazy_load_bundle/index.ts b/x-pack/plugins/maps/public/lazy_load_bundle/index.ts index ce574713608d7..020c25967f4dc 100644 --- a/x-pack/plugins/maps/public/lazy_load_bundle/index.ts +++ b/x-pack/plugins/maps/public/lazy_load_bundle/index.ts @@ -12,6 +12,7 @@ import { LayerDescriptor } from '../../common/descriptor_types'; import { MapEmbeddableConfig, MapEmbeddableInput, MapEmbeddableOutput } from '../embeddable/types'; import { SourceRegistryEntry } from '../classes/sources/source_registry'; import { LayerWizard } from '../classes/layers/layer_wizard_registry'; +import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source'; let loadModulesPromise: Promise; @@ -71,6 +72,7 @@ interface LazyLoadedMapModules { metricFieldName?: string; }) => LayerDescriptor | null; createBasemapLayerDescriptor: () => LayerDescriptor | null; + createESSearchSourceLayerDescriptor: (params: CreateLayerDescriptorParams) => LayerDescriptor; } export async function lazyLoadMapModules(): Promise { @@ -90,6 +92,7 @@ export async function lazyLoadMapModules(): Promise { createTileMapLayerDescriptor, createRegionMapLayerDescriptor, createBasemapLayerDescriptor, + createESSearchSourceLayerDescriptor, } = await import('./lazy'); resolve({ @@ -103,6 +106,7 @@ export async function lazyLoadMapModules(): Promise { createTileMapLayerDescriptor, createRegionMapLayerDescriptor, createBasemapLayerDescriptor, + createESSearchSourceLayerDescriptor, }); }); return loadModulesPromise; diff --git a/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts b/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts index 4d816fd2f2c61..4e78db9cbde23 100644 --- a/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts +++ b/x-pack/plugins/maps/public/lazy_load_bundle/lazy/index.ts @@ -4,9 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// These are map-dependencies of the embeddable. -// By lazy-loading these, the Maps-app can register the embeddable when the plugin mounts, without actually pulling all the code. - export * from '../../embeddable/map_embeddable'; export * from '../../kibana_services'; export { renderApp } from '../../render_app'; @@ -16,3 +13,4 @@ export { registerSource } from '../../classes/sources/source_registry'; export { createTileMapLayerDescriptor } from '../../classes/layers/create_tile_map_layer_descriptor'; export { createRegionMapLayerDescriptor } from '../../classes/layers/create_region_map_layer_descriptor'; export { createBasemapLayerDescriptor } from '../../classes/layers/create_basemap_layer_descriptor'; +export { createLayerDescriptor as createESSearchSourceLayerDescriptor } from '../../classes/sources/es_search_source'; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap index 3713b28a103ec..e2e1140f5c5b4 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_chart_config_builder.test.js.snap @@ -47,6 +47,7 @@ Object { "jobId": "mock-job-id", "metricFieldName": "responsetime", "metricFunction": "avg", + "summaryCountFieldName": undefined, "timeField": "@timestamp", } `; diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap index ecb7fc07711e8..80ad6ed6bfab0 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/__snapshots__/explorer_charts_container_service.test.js.snap @@ -53,6 +53,7 @@ Object { "loading": true, "metricFieldName": "responsetime", "metricFunction": "avg", + "summaryCountFieldName": undefined, "timeField": "@timestamp", }, ], @@ -600,6 +601,7 @@ Object { "plotLatest": 1486783800000, "selectedEarliest": 1486656000000, "selectedLatest": 1486670399999, + "summaryCountFieldName": undefined, "timeField": "@timestamp", }, ], diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js index a2c530c9ca494..3dc1c0234584d 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_charts_container_service.js @@ -126,6 +126,7 @@ export const anomalyDataChange = function ( datafeedQuery, config.metricFunction, config.metricFieldName, + config.summaryCountFieldName, config.timeField, range.min, range.max, diff --git a/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts b/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts index 79afe2ba5a0ad..514449385bf0b 100644 --- a/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts +++ b/x-pack/plugins/ml/public/application/services/results_service/result_service_rx.ts @@ -22,6 +22,7 @@ import { CriteriaField } from './index'; import { findAggField } from '../../../../common/util/validation_utils'; import { getDatafeedAggregations } from '../../../../common/util/datafeed_utils'; import { aggregationTypeTransform } from '../../../../common/util/anomaly_utils'; +import { ES_AGGREGATION } from '../../../../common/constants/aggregation_types'; interface ResultResponse { success: boolean; @@ -68,6 +69,7 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) { query: object | undefined, metricFunction: string, // ES aggregation name metricFieldName: string, + summaryCountFieldName: string | undefined, timeFieldName: string, earliestMs: number, latestMs: number, @@ -153,9 +155,8 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) { body.query.bool.minimum_should_match = shouldCriteria.length / 2; } + body.aggs.byTime.aggs = {}; if (metricFieldName !== undefined && metricFieldName !== '') { - body.aggs.byTime.aggs = {}; - const metricAgg: any = { [metricFunction]: {}, }; @@ -186,8 +187,23 @@ export function resultsServiceRxProvider(mlApiServices: MlApiServices) { } else { body.aggs.byTime.aggs.metric = metricAgg; } + } else { + // if metricFieldName is not defined, it's probably a variation of the non zero count function + // refer to buildConfigFromDetector + if (summaryCountFieldName !== undefined && metricFunction === ES_AGGREGATION.CARDINALITY) { + // if so, check if summaryCountFieldName is an aggregation field + if (typeof aggFields === 'object' && Object.keys(aggFields).length > 0) { + // first item under aggregations can be any name, not necessarily 'buckets' + const accessor = Object.keys(aggFields)[0]; + const tempAggs = { ...(aggFields[accessor].aggs ?? aggFields[accessor].aggregations) }; + const foundCardinalityField = findAggField(tempAggs, summaryCountFieldName); + if (foundCardinalityField !== undefined) { + tempAggs.metric = foundCardinalityField; + } + body.aggs.byTime.aggs = tempAggs; + } + } } - return mlApiServices.esSearch$({ index, body }).pipe( map((resp: any) => { const obj: MetricData = { success: true, results: {} }; diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts index 90c39497a9a18..0fbac571d1bdf 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseries_search_service.ts @@ -91,6 +91,7 @@ function getMetricData( chartConfig.datafeedConfig.query, esMetricFunction ?? chartConfig.metricFunction, chartConfig.metricFieldName, + chartConfig.summaryCountFieldName, chartConfig.timeField, earliestMs, latestMs, diff --git a/x-pack/plugins/ml/public/application/util/chart_config_builder.js b/x-pack/plugins/ml/public/application/util/chart_config_builder.js index 2fa869b058aa2..a30280f1220c0 100644 --- a/x-pack/plugins/ml/public/application/util/chart_config_builder.js +++ b/x-pack/plugins/ml/public/application/util/chart_config_builder.js @@ -28,6 +28,7 @@ export function buildConfigFromDetector(job, detectorIndex) { timeField: job.data_description.time_field, interval: job.analysis_config.bucket_span, datafeedConfig: job.datafeed_config, + summaryCountFieldName: job.analysis_config.summary_count_field_name, }; if (detector.field_name !== undefined) { @@ -63,10 +64,17 @@ export function buildConfigFromDetector(job, detectorIndex) { 'field', ]); } - - if (detector.function === ML_JOB_AGGREGATION.NON_ZERO_COUNT && cardinalityField !== undefined) { + if ( + (detector.function === ML_JOB_AGGREGATION.NON_ZERO_COUNT || + detector.function === ML_JOB_AGGREGATION.LOW_NON_ZERO_COUNT || + detector.function === ML_JOB_AGGREGATION.HIGH_NON_ZERO_COUNT || + detector.function === ML_JOB_AGGREGATION.COUNT || + detector.function === ML_JOB_AGGREGATION.HIGH_COUNT || + detector.function === ML_JOB_AGGREGATION.LOW_COUNT) && + cardinalityField !== undefined + ) { config.metricFunction = ES_AGGREGATION.CARDINALITY; - config.metricFieldName = cardinalityField; + config.metricFieldName = undefined; } else { // For count detectors using summary_count_field, plot sum(summary_count_field_name) config.metricFunction = ES_AGGREGATION.SUM; diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx index 9fdc59d61257e..b0fedf5a44cba 100644 --- a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx +++ b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx @@ -65,7 +65,7 @@ describe('APMSection', () => { expect(getByText('APM')).toBeInTheDocument(); expect(getByText('View in app')).toBeInTheDocument(); expect(getByText('Services 11')).toBeInTheDocument(); - expect(getByText('Transactions per minute 312.00k')).toBeInTheDocument(); + expect(getByText('Throughput 312.00k tpm')).toBeInTheDocument(); expect(queryAllByTestId('loading')).toEqual([]); }); it('shows loading state', () => { @@ -80,6 +80,6 @@ describe('APMSection', () => { expect(getByTestId('loading')).toBeInTheDocument(); expect(queryAllByText('View in app')).toEqual([]); expect(queryAllByText('Services 11')).toEqual([]); - expect(queryAllByText('Transactions per minute 312.00k')).toEqual([]); + expect(queryAllByText('Throughput 312.00k tpm')).toEqual([]); }); }); diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx index 91d20d3478960..620604562cc13 100644 --- a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx @@ -92,9 +92,9 @@ export function APMSection({ bucketSize }: Props) { /x-pack/plugins/runtime_field_editor'], + roots: ['/x-pack/plugins/runtime_fields'], }; diff --git a/x-pack/plugins/runtime_field_editor/kibana.json b/x-pack/plugins/runtime_fields/kibana.json similarity index 88% rename from x-pack/plugins/runtime_field_editor/kibana.json rename to x-pack/plugins/runtime_fields/kibana.json index 3270ada544ba4..65932c723c474 100644 --- a/x-pack/plugins/runtime_field_editor/kibana.json +++ b/x-pack/plugins/runtime_fields/kibana.json @@ -1,5 +1,5 @@ { - "id": "runtimeFieldEditor", + "id": "runtimeFields", "version": "kibana", "server": false, "ui": true, diff --git a/x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx b/x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/__jest__/setup_environment.tsx rename to x-pack/plugins/runtime_fields/public/__jest__/setup_environment.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/index.ts b/x-pack/plugins/runtime_fields/public/components/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/index.ts rename to x-pack/plugins/runtime_fields/public/components/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor/runtime_field_editor.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor/runtime_field_editor.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/runtime_field_editor_flyout_content.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/index.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.test.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.test.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/runtime_field_form.tsx rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/components/runtime_field_form/schema.ts rename to x-pack/plugins/runtime_fields/public/components/runtime_field_form/schema.ts diff --git a/x-pack/plugins/runtime_field_editor/public/constants.ts b/x-pack/plugins/runtime_fields/public/constants.ts similarity index 75% rename from x-pack/plugins/runtime_field_editor/public/constants.ts rename to x-pack/plugins/runtime_fields/public/constants.ts index eebc3007d79d5..017b58c246afe 100644 --- a/x-pack/plugins/runtime_field_editor/public/constants.ts +++ b/x-pack/plugins/runtime_fields/public/constants.ts @@ -3,7 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { ComboBoxOption, RuntimeType } from './types'; +import { ComboBoxOption } from './types'; + +export const RUNTIME_FIELD_TYPES = ['keyword', 'long', 'double', 'date', 'ip', 'boolean'] as const; + +type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; export const RUNTIME_FIELD_OPTIONS: Array> = [ { diff --git a/x-pack/plugins/runtime_field_editor/public/index.ts b/x-pack/plugins/runtime_fields/public/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/index.ts rename to x-pack/plugins/runtime_fields/public/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/lib/documentation.ts b/x-pack/plugins/runtime_fields/public/lib/documentation.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/lib/documentation.ts rename to x-pack/plugins/runtime_fields/public/lib/documentation.ts diff --git a/x-pack/plugins/runtime_field_editor/public/lib/index.ts b/x-pack/plugins/runtime_fields/public/lib/index.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/lib/index.ts rename to x-pack/plugins/runtime_fields/public/lib/index.ts diff --git a/x-pack/plugins/runtime_field_editor/public/load_editor.tsx b/x-pack/plugins/runtime_fields/public/load_editor.tsx similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/load_editor.tsx rename to x-pack/plugins/runtime_fields/public/load_editor.tsx diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.test.ts b/x-pack/plugins/runtime_fields/public/plugin.test.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/plugin.test.ts rename to x-pack/plugins/runtime_fields/public/plugin.test.ts diff --git a/x-pack/plugins/runtime_field_editor/public/plugin.ts b/x-pack/plugins/runtime_fields/public/plugin.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/plugin.ts rename to x-pack/plugins/runtime_fields/public/plugin.ts diff --git a/x-pack/plugins/runtime_field_editor/public/shared_imports.ts b/x-pack/plugins/runtime_fields/public/shared_imports.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/shared_imports.ts rename to x-pack/plugins/runtime_fields/public/shared_imports.ts diff --git a/x-pack/plugins/runtime_field_editor/public/test_utils.ts b/x-pack/plugins/runtime_fields/public/test_utils.ts similarity index 100% rename from x-pack/plugins/runtime_field_editor/public/test_utils.ts rename to x-pack/plugins/runtime_fields/public/test_utils.ts diff --git a/x-pack/plugins/runtime_field_editor/public/types.ts b/x-pack/plugins/runtime_fields/public/types.ts similarity index 80% rename from x-pack/plugins/runtime_field_editor/public/types.ts rename to x-pack/plugins/runtime_fields/public/types.ts index 984d6ab9f8655..b1bbb06d79655 100644 --- a/x-pack/plugins/runtime_field_editor/public/types.ts +++ b/x-pack/plugins/runtime_fields/public/types.ts @@ -4,12 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { DataPublicPluginStart } from 'src/plugins/data/public'; -export type { - RuntimeField, - RuntimeType, - RUNTIME_FIELD_TYPES, -} from 'src/plugins/runtime_fields/common'; +import { RUNTIME_FIELD_TYPES } from './constants'; import { OpenRuntimeFieldEditorProps } from './load_editor'; export interface LoadEditorResponse { @@ -30,6 +26,16 @@ export interface StartPlugins { data: DataPublicPluginStart; } +export type RuntimeType = typeof RUNTIME_FIELD_TYPES[number]; + +export interface RuntimeField { + name: string; + type: RuntimeType; + script: { + source: string; + }; +} + export interface ComboBoxOption { label: string; value?: T; diff --git a/x-pack/plugins/searchprofiler/kibana.json b/x-pack/plugins/searchprofiler/kibana.json index a5e42f20b5c7a..6c94701c0ec09 100644 --- a/x-pack/plugins/searchprofiler/kibana.json +++ b/x-pack/plugins/searchprofiler/kibana.json @@ -2,9 +2,9 @@ "id": "searchprofiler", "version": "8.0.0", "kibanaVersion": "kibana", - "requiredPlugins": ["devTools", "home", "licensing"], "configPath": ["xpack", "searchprofiler"], "server": true, "ui": true, + "requiredPlugins": ["devTools", "home", "licensing"], "requiredBundles": ["esUiShared"] } diff --git a/x-pack/plugins/searchprofiler/tsconfig.json b/x-pack/plugins/searchprofiler/tsconfig.json new file mode 100644 index 0000000000000..f8ac3a61f7812 --- /dev/null +++ b/x-pack/plugins/searchprofiler/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/es_ui_shared/tsconfig.json" }, + { "path": "../../../src/plugins/dev_tools/tsconfig.json" }, + { "path": "../../../src/plugins/home/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + ] +} diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx index bd9e9f28034cc..50f3b722a0343 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx @@ -272,24 +272,9 @@ export const sendAlertToTimelineAction = async ({ notes: null, timeline: { ...timelineDefaults, - kqlMode: 'search', + description: `_id: ${ecsData._id}`, filters: getFiltersFromRule(ecsData.signal?.rule?.filters as string[]), - dataProviders: [ - { - and: [], - id: `send-alert-to-timeline-action-default-draggable-event-details-value-formatted-field-value-${TimelineId.active}-alert-id-${ecsData._id}`, - name: ecsData._id, - enabled: true, - excluded: false, - kqlQuery: '', - queryMatch: { - field: '_id', - value: ecsData._id, - operator: ':', - }, - }, - ...getThresholdAggregationDataProvider(ecsData, nonEcsData), - ], + dataProviders: [...getThresholdAggregationDataProvider(ecsData, nonEcsData)], id: TimelineId.active, indexNames: [], dateRange: { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts index 889bcc15d8df0..228e8cc1c4385 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts @@ -61,7 +61,7 @@ export interface PolicyDetailsState { /** current location of the application */ location?: Immutable; /** A summary of stats for the agents associated with a given Fleet Agent Policy */ - agentStatusSummary?: GetAgentStatusResponse['results']; + agentStatusSummary?: Omit; /** Status of an update to the policy */ updateStatus?: { success: boolean; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index cb5b3e8bc0934..5701312501dba 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -5147,8 +5147,6 @@ "xpack.apm.metrics.transactionChart.machineLearningLabel": "機械学習:", "xpack.apm.metrics.transactionChart.machineLearningTooltip": "平均期間の周りのストリームには予測バウンドが表示されます。異常スコアが>= 75の場合、注釈が表示されます。", "xpack.apm.metrics.transactionChart.machineLearningTooltip.withKuery": "フィルタリングで検索バーを使用しているときには、機械学習結果が表示されません", - "xpack.apm.metrics.transactionChart.requestsPerMinuteLabel": "1 分あたりのリクエスト", - "xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel": "1分あたりのトランザクション数", "xpack.apm.metrics.transactionChart.viewJob": "ジョブを表示", "xpack.apm.notAvailableLabel": "N/A", "xpack.apm.propertiesTable.agentFeature.noDataAvailableLabel": "利用可能なデータがありません", @@ -5288,7 +5286,6 @@ "xpack.apm.serviceOverview.mlNudgeMessage.content": "APM の異常検知統合で、異常なトランザクションを特定し、アップストリームおよびダウンストリームサービスの正常性を確認します。わずか数分で開始できます。", "xpack.apm.serviceOverview.mlNudgeMessage.dismissButton": "閉じる", "xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "使ってみる", - "xpack.apm.serviceOverview.throughputChart.traffic": "トラフィック", "xpack.apm.serviceOverview.throughtputChartTitle": "トラフィック", "xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "エラー率", "xpack.apm.serviceOverview.transactionsTableColumnImpact": "インパクト", @@ -5296,12 +5293,10 @@ "xpack.apm.serviceOverview.transactionsTableColumnLatency.p95": "レイテンシ(95 番目)", "xpack.apm.serviceOverview.transactionsTableColumnLatency.p99": "レイテンシ(99 番目)", "xpack.apm.serviceOverview.transactionsTableColumnName": "名前", - "xpack.apm.serviceOverview.transactionsTableColumnTroughput": "トラフィック", "xpack.apm.serviceOverview.transactionsTableLinkText": "トランザクションを表示", "xpack.apm.serviceOverview.transactionsTableTitle": "トランザクション", "xpack.apm.servicesTable.7xOldDataMessage": "また、移行が必要な古いデータがある可能性もあります。", "xpack.apm.servicesTable.7xUpgradeServerMessage": "バージョン7.xより前からのアップグレードですか?また、\n APMサーバーインスタンスを7.0以降にアップグレードしていることも確認してください。", - "xpack.apm.servicesTable.avgResponseTimeColumnLabel": "平均応答時間", "xpack.apm.servicesTable.environmentColumnLabel": "環境", "xpack.apm.servicesTable.environmentCount": "{environmentCount, plural, one {1 個の環境} other {# 個の環境}}", "xpack.apm.servicesTable.healthColumnLabel": "ヘルス", @@ -5309,7 +5304,6 @@ "xpack.apm.servicesTable.noServicesLabel": "APM サービスがインストールされていないようです。追加しましょう!", "xpack.apm.servicesTable.notFoundLabel": "サービスが見つかりません", "xpack.apm.servicesTable.transactionErrorRate": "エラー率%", - "xpack.apm.servicesTable.transactionsPerMinuteColumnLabel": "1 分あたりのトランザクション", "xpack.apm.servicesTable.UpgradeAssistantLink": "Kibana アップグレードアシスタントで詳細をご覧ください", "xpack.apm.settings.agentConfig": "エージェントの編集", "xpack.apm.settings.anomaly_detection.legacy_jobs.body": "以前の統合のレガシー機械学習ジョブが見つかりました。これは、APMアプリでは使用されていません。", @@ -5436,7 +5430,6 @@ "xpack.apm.transactionActionMenu.trace.title": "トレースの詳細", "xpack.apm.transactionActionMenu.viewInUptime": "ステータス", "xpack.apm.transactionActionMenu.viewSampleDocumentLinkLabel": "サンプルドキュメントを表示", - "xpack.apm.transactionBreakdown.chartTitle": "スパンタイプ別平均期間", "xpack.apm.transactionCardinalityWarning.body": "一意のトランザクション名の数が構成された値{bucketSize}を超えています。エージェントを再構成し、類似したトランザクションをグループ化するか、{codeBlock}の値を増やしてください。", "xpack.apm.transactionCardinalityWarning.docsLink": "詳細はドキュメントをご覧ください", "xpack.apm.transactionCardinalityWarning.title": "このビューには、報告されたトランザクションのサブセットが表示されます。", @@ -5500,7 +5493,6 @@ "xpack.apm.transactionsTable.impactColumnLabel": "インパクト", "xpack.apm.transactionsTable.nameColumnLabel": "名前", "xpack.apm.transactionsTable.notFoundLabel": "トランザクションが見つかりませんでした。", - "xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel": "1 分あたりのトランザクション", "xpack.apm.tutorial.apmServer.title": "APM Server", "xpack.apm.tutorial.elasticCloud.textPre": "APM Server を有効にするには、[the Elastic Cloud console](https://cloud.elastic.co/deployments?q={cloudId}) に移動し、展開設定で APM を有効にします。有効になったら、このページを更新してください。", "xpack.apm.tutorial.elasticCloudInstructions.title": "APM エージェント", @@ -15986,7 +15978,6 @@ "xpack.observability.overview.apm.appLink": "アプリで表示", "xpack.observability.overview.apm.services": "サービス", "xpack.observability.overview.apm.title": "APM", - "xpack.observability.overview.apm.transactionsPerMinute": "1分あたりのトランザクション数", "xpack.observability.overview.breadcrumb": "概要", "xpack.observability.overview.loadingObservability": "オブザーバビリティを読み込んでいます", "xpack.observability.overview.logs.appLink": "アプリで表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 32998d4b28e32..f6e4bfeb9ebde 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -5155,8 +5155,6 @@ "xpack.apm.metrics.transactionChart.machineLearningLabel": "Machine Learning", "xpack.apm.metrics.transactionChart.machineLearningTooltip": "环绕平均持续时间的流显示预期边界。对 ≥ 75 的异常分数显示标注。", "xpack.apm.metrics.transactionChart.machineLearningTooltip.withKuery": "使用搜索栏筛选时,Machine Learning 结果处于隐藏状态", - "xpack.apm.metrics.transactionChart.requestsPerMinuteLabel": "每分钟请求数", - "xpack.apm.metrics.transactionChart.transactionsPerMinuteLabel": "每分钟事务数", "xpack.apm.metrics.transactionChart.viewJob": "查看作业", "xpack.apm.notAvailableLabel": "不可用", "xpack.apm.percentOfParent": "({parentType, select, transaction {事务} trace {追溯} }的{value})", @@ -5297,7 +5295,6 @@ "xpack.apm.serviceOverview.mlNudgeMessage.content": "通过 APM 的异常检测集成来查明异常事务,并了解上下游服务的运行状况。只需几分钟即可开始使用。", "xpack.apm.serviceOverview.mlNudgeMessage.dismissButton": "关闭", "xpack.apm.serviceOverview.mlNudgeMessage.learnMoreButton": "开始使用", - "xpack.apm.serviceOverview.throughputChart.traffic": "流量", "xpack.apm.serviceOverview.throughtputChartTitle": "流量", "xpack.apm.serviceOverview.transactionsTableColumnErrorRate": "错误率", "xpack.apm.serviceOverview.transactionsTableColumnImpact": "影响", @@ -5305,12 +5302,10 @@ "xpack.apm.serviceOverview.transactionsTableColumnLatency.p95": "延迟(第 95 个)", "xpack.apm.serviceOverview.transactionsTableColumnLatency.p99": "延迟(第 99 个)", "xpack.apm.serviceOverview.transactionsTableColumnName": "名称", - "xpack.apm.serviceOverview.transactionsTableColumnTroughput": "流量", "xpack.apm.serviceOverview.transactionsTableLinkText": "查看事务", "xpack.apm.serviceOverview.transactionsTableTitle": "事务", "xpack.apm.servicesTable.7xOldDataMessage": "可能还有需要迁移的旧数据。", "xpack.apm.servicesTable.7xUpgradeServerMessage": "从 7.x 之前的版本升级?另外,确保您已将\n APM Server 实例升级到至少 7.0。", - "xpack.apm.servicesTable.avgResponseTimeColumnLabel": "平均响应时间", "xpack.apm.servicesTable.environmentColumnLabel": "环境", "xpack.apm.servicesTable.environmentCount": "{environmentCount, plural, one {1 个环境} other {# 个环境}}", "xpack.apm.servicesTable.healthColumnLabel": "运行状况", @@ -5318,7 +5313,6 @@ "xpack.apm.servicesTable.noServicesLabel": "似乎您没有安装任何 APM 服务。让我们添加一些!", "xpack.apm.servicesTable.notFoundLabel": "未找到任何服务", "xpack.apm.servicesTable.transactionErrorRate": "错误率 %", - "xpack.apm.servicesTable.transactionsPerMinuteColumnLabel": "每分钟事务数", "xpack.apm.servicesTable.UpgradeAssistantLink": "通过访问 Kibana 升级助手来了解详情", "xpack.apm.settings.agentConfig": "代理配置", "xpack.apm.settings.anomaly_detection.legacy_jobs.body": "我们在以前的集成中发现 APM 应用中不再使用的旧版 Machine Learning 作业", @@ -5445,7 +5439,6 @@ "xpack.apm.transactionActionMenu.trace.title": "跟踪详情", "xpack.apm.transactionActionMenu.viewInUptime": "状态", "xpack.apm.transactionActionMenu.viewSampleDocumentLinkLabel": "查看样例文档", - "xpack.apm.transactionBreakdown.chartTitle": "平均持续时间(按跨度类型)", "xpack.apm.transactionCardinalityWarning.body": "唯一事务名称的数目超过 {bucketSize} 的已配置值。尝试重新配置您的代理以对类似的事务分组或增大 {codeBlock} 的值", "xpack.apm.transactionCardinalityWarning.docsLink": "在文档中了解详情", "xpack.apm.transactionCardinalityWarning.title": "此视图显示已报告事务的子集。", @@ -5510,7 +5503,6 @@ "xpack.apm.transactionsTable.impactColumnLabel": "影响", "xpack.apm.transactionsTable.nameColumnLabel": "名称", "xpack.apm.transactionsTable.notFoundLabel": "未找到任何事务。", - "xpack.apm.transactionsTable.transactionsPerMinuteColumnLabel": "每分钟事务数", "xpack.apm.tutorial.apmServer.title": "APM Server", "xpack.apm.tutorial.elasticCloud.textPre": "要启用 APM Server,请前往 [Elastic Cloud 控制台](https://cloud.elastic.co/deployments?q={cloudId}) 并在部署设置中启用 APM。启用后,请刷新此页面。", "xpack.apm.tutorial.elasticCloudInstructions.title": "APM 代理", @@ -16028,7 +16020,6 @@ "xpack.observability.overview.apm.appLink": "在应用中查看", "xpack.observability.overview.apm.services": "服务", "xpack.observability.overview.apm.title": "APM", - "xpack.observability.overview.apm.transactionsPerMinute": "每分钟事务数", "xpack.observability.overview.breadcrumb": "概览", "xpack.observability.overview.loadingObservability": "正在加载可观测性", "xpack.observability.overview.logs.appLink": "在应用中查看", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss index 70ad1cae6c1d1..476c971cfbbff 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.scss @@ -5,7 +5,7 @@ color: $euiColorDarkShade; } - .euiLink + .euiIcon { + .euiLink + .euiToolTipAnchor { margin-left: $euiSizeXS; } } diff --git a/x-pack/plugins/uptime/common/constants/rest_api.ts b/x-pack/plugins/uptime/common/constants/rest_api.ts index be1f498c2e75d..6916a5ea4788c 100644 --- a/x-pack/plugins/uptime/common/constants/rest_api.ts +++ b/x-pack/plugins/uptime/common/constants/rest_api.ts @@ -29,4 +29,5 @@ export enum API_URLS { CREATE_ALERT = '/api/alerts/alert', ALERT = '/api/alerts/alert/', ALERTS_FIND = '/api/alerts/_find', + ACTION_TYPES = '/api/actions/list_action_types', } diff --git a/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts b/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts index 971a9f51bfae1..8996bad8d4f08 100644 --- a/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts +++ b/x-pack/plugins/uptime/common/runtime_types/alerts/status_check.ts @@ -26,6 +26,7 @@ export const AtomicStatusCheckParamsType = t.intersection([ filters: StatusCheckFiltersType, shouldCheckStatus: t.boolean, isAutoGenerated: t.boolean, + shouldCheckAvailability: t.boolean, }), ]); diff --git a/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx b/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx new file mode 100644 index 0000000000000..e64b3533c0cc5 --- /dev/null +++ b/x-pack/plugins/uptime/public/components/common/header/page_tabs.test.tsx @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { render } from '../../../lib/helper/rtl_helpers'; +import { PageTabs } from './page_tabs'; +import { createMemoryHistory } from 'history'; + +describe('PageTabs', () => { + it('it renders all tabs', () => { + const { getByText } = render(); + expect(getByText('Overview')).toBeInTheDocument(); + expect(getByText('Certificates')).toBeInTheDocument(); + expect(getByText('Settings')).toBeInTheDocument(); + }); + + it('it keep params while switching', () => { + const { getByTestId } = render(, { + history: createMemoryHistory({ + initialEntries: ['/settings/?g=%22%22&dateRangeStart=now-10m&dateRangeEnd=now'], + }), + }); + expect(getByTestId('uptimeSettingsToOverviewLink')).toHaveAttribute( + 'href', + '/?dateRangeStart=now-10m' + ); + expect(getByTestId('uptimeCertificatesLink')).toHaveAttribute( + 'href', + '/certificates?dateRangeStart=now-10m' + ); + expect(getByTestId('settings-page-link')).toHaveAttribute( + 'href', + '/settings?dateRangeStart=now-10m' + ); + }); + + it('it resets params on overview if already on overview', () => { + const { getByTestId } = render(, { + history: createMemoryHistory({ + initialEntries: ['/?g=%22%22&dateRangeStart=now-10m&dateRangeEnd=now'], + }), + }); + expect(getByTestId('uptimeSettingsToOverviewLink')).toHaveAttribute('href', '/'); + }); +}); diff --git a/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx b/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx index 56da7d5f92803..7dfc110dbb6e9 100644 --- a/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx +++ b/x-pack/plugins/uptime/public/components/common/header/page_tabs.tsx @@ -10,6 +10,8 @@ import { EuiTabs, EuiTab } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useHistory, useRouteMatch } from 'react-router-dom'; import { CERTIFICATES_ROUTE, OVERVIEW_ROUTE, SETTINGS_ROUTE } from '../../../../common/constants'; +import { useGetUrlParams } from '../../../hooks'; +import { stringifyUrlParams } from '../../../lib/helper/stringify_url_params'; const tabs = [ { @@ -39,6 +41,8 @@ export const PageTabs = () => { const history = useHistory(); + const params = useGetUrlParams(); + const isOverView = useRouteMatch(OVERVIEW_ROUTE); const isSettings = useRouteMatch(SETTINGS_ROUTE); const isCerts = useRouteMatch(CERTIFICATES_ROUTE); @@ -58,6 +62,15 @@ export const PageTabs = () => { } }, [isCerts, isSettings, isOverView]); + const createHrefForTab = (id: string) => { + if (selectedTabId === OVERVIEW_ROUTE && id === OVERVIEW_ROUTE) { + // If we are already on overview route and user clicks again on overview tabs, + // we will reset the filters + return history.createHref({ pathname: id }); + } + return history.createHref({ pathname: id, search: stringifyUrlParams(params, true) }); + }; + const renderTabs = () => { return tabs.map(({ dataTestSubj, name, id }, index) => ( { isSelected={id === selectedTabId} key={index} data-test-subj={dataTestSubj} - href={history.createHref({ pathname: id })} + href={createHrefForTab(id)} > {name} diff --git a/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx b/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx index 5f40b60420f83..c0ac5d959bda1 100644 --- a/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/synthetics/executed_step.test.tsx @@ -7,11 +7,9 @@ import React from 'react'; import { ExecutedStep } from './executed_step'; import { Ping } from '../../../../common/runtime_types'; -import { mountWithRouter } from '../../../lib'; import { render } from '../../../lib/helper/rtl_helpers'; -// FLAKY: https://github.com/elastic/kibana/issues/85899 -describe.skip('ExecutedStep', () => { +describe('ExecutedStep', () => { let step: Ping; beforeEach(() => { @@ -42,105 +40,28 @@ describe.skip('ExecutedStep', () => { }); it('renders a link to the step detail view', () => { - expect( - mountWithRouter().find( - 'StepDetailLink' - ) - ).toMatchInlineSnapshot(` - - - - - - `); + const { getByRole, getByText } = render( + + ); + expect(getByRole('link')).toHaveAttribute('href', '/journey/fake-group/step/4'); + expect(getByText('4. STEP_NAME')); }); - it('supplies status badge correct status', () => { + it.each([ + ['succeeded', 'Succeeded'], + ['failed', 'Failed'], + ['skipped', 'Skipped'], + ['somegarbage', '4.'], + ])('supplies status badge correct status', (status, expectedStatus) => { step.synthetics = { - payload: { status: 'THE_STATUS' }, + payload: { status }, }; - expect( - mountWithRouter().find( - 'StatusBadge' - ) - ).toMatchInlineSnapshot(` - - - - - - - - - - `); + const { getByText } = render(); + expect(getByText(expectedStatus)); }); - it('renders accordions for step, error message, and error stack script', () => { + it('renders accordion for step', () => { step.synthetics = { - error: { - message: 'There was an error executing the step.', - stack: 'some.stack.trace.string', - }, payload: { source: 'const someVar = "the var"', }, @@ -150,280 +71,26 @@ describe.skip('ExecutedStep', () => { }, }; - expect( - mountWithRouter().find( - 'CodeBlockAccordion' - ) - ).toMatchInlineSnapshot(` - Array [ - - -
    -
    - -
    -
    - -
    -
    - - -
    -
    -                              
    -                                const someVar = "the var"
    -                              
    -                            
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    , - - -
    -
    - -
    -
    - -
    -
    - - -
    -
    -                              
    -                                There was an error executing the step.
    -                              
    -                            
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    , - - -
    -
    - -
    -
    - -
    -
    - - -
    -
    -                              
    -                                some.stack.trace.string
    -                              
    -                            
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    , - ] - `); + const { getByText } = render(); + + expect(getByText('4. STEP_NAME')); + expect(getByText('Step script')); + expect(getByText(`const someVar = "the var"`)); + }); + + it('renders accordions for error message, and stack trace', () => { + step.synthetics = { + error: { + message: 'There was an error executing the step.', + stack: 'some.stack.trace.string', + }, + }; + + const { getByText } = render(); + + expect(getByText('4.')); + expect(getByText('Error')); + expect(getByText('There was an error executing the step.')); + expect(getByText('some.stack.trace.string')); }); }); diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx index 3953d35cc73db..26a8122f1357f 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/columns/monitor_name_col.tsx @@ -35,7 +35,7 @@ const MONITOR_TYPES: Record = { }; export const MonitorNameColumn = ({ summary }: Props) => { - const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useGetUrlParams(); + const params = useGetUrlParams(); const linkParameters = stringifyUrlParams(params, true); diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx index 7cf24d447316c..f100659054ac2 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list_drawer/most_recent_error.tsx @@ -34,7 +34,7 @@ interface MostRecentErrorProps { } export const MostRecentError = ({ error, monitorId, timestamp }: MostRecentErrorProps) => { - const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useGetUrlParams(); + const params = useGetUrlParams(); params.statusFilter = 'down'; const linkParameters = stringifyUrlParams(params, true); diff --git a/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx b/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx index 2f0faebdf2487..ce2d0f6ace7e3 100644 --- a/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx +++ b/x-pack/plugins/uptime/public/components/settings/add_connector_flyout.tsx @@ -11,6 +11,10 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { TriggersAndActionsUIPublicPluginStart } from '../../../../triggers_actions_ui/public'; import { getConnectorsAction } from '../../state/alerts/alerts'; import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; +import { useFetcher } from '../../../../observability/public'; +import { fetchActionTypes } from '../../state/api/alerts'; + +import { ActionTypeId } from './types'; interface Props { focusInput: () => void; @@ -20,6 +24,17 @@ interface KibanaDeps { triggersActionsUi: TriggersAndActionsUIPublicPluginStart; } +export const ALLOWED_ACTION_TYPES: ActionTypeId[] = [ + '.slack', + '.pagerduty', + '.server-log', + '.index', + '.teams', + '.servicenow', + '.jira', + '.webhook', +]; + export const AddConnectorFlyout = ({ focusInput }: Props) => { const [addFlyoutVisible, setAddFlyoutVisibility] = useState(false); const { @@ -30,6 +45,8 @@ export const AddConnectorFlyout = ({ focusInput }: Props) => { const dispatch = useDispatch(); + const { data: actionTypes } = useFetcher(() => fetchActionTypes(), []); + const ConnectorAddFlyout = useMemo( () => getAddConnectorFlyout({ @@ -39,9 +56,12 @@ export const AddConnectorFlyout = ({ focusInput }: Props) => { setAddFlyoutVisibility(false); focusInput(); }, + actionTypes: (actionTypes ?? []).filter((actionType) => + ALLOWED_ACTION_TYPES.includes(actionType.id as ActionTypeId) + ), }), // eslint-disable-next-line react-hooks/exhaustive-deps - [] + [actionTypes] ); return ( diff --git a/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx b/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx index 9c2bd3e86b460..68e9a8297cf33 100644 --- a/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx +++ b/x-pack/plugins/uptime/public/components/settings/alert_defaults_form.tsx @@ -19,12 +19,13 @@ import { useSelector } from 'react-redux'; import styled from 'styled-components'; import { SettingsFormProps } from '../../pages/settings'; import { connectorsSelector } from '../../state/alerts/alerts'; -import { AddConnectorFlyout } from './add_connector_flyout'; +import { AddConnectorFlyout, ALLOWED_ACTION_TYPES } from './add_connector_flyout'; import { useGetUrlParams, useUrlParams } from '../../hooks'; import { alertFormI18n } from './translations'; import { useInitApp } from '../../hooks/use_init_app'; import { useKibana } from '../../../../../../src/plugins/kibana_react/public'; import { TriggersAndActionsUIPublicPluginStart } from '../../../../triggers_actions_ui/public/'; +import { ActionTypeId } from './types'; type ConnectorOption = EuiComboBoxOptionOption; @@ -88,11 +89,13 @@ export const AlertDefaultsForm: React.FC = ({ ); }; - const options = (data ?? []).map((connectorAction) => ({ - value: connectorAction.id, - label: connectorAction.name, - 'data-test-subj': connectorAction.name, - })); + const options = (data ?? []) + .filter((action) => ALLOWED_ACTION_TYPES.includes(action.actionTypeId as ActionTypeId)) + .map((connectorAction) => ({ + value: connectorAction.id, + label: connectorAction.name, + 'data-test-subj': connectorAction.name, + })); const renderOption = (option: ConnectorOption) => { const { label, value } = option; diff --git a/x-pack/plugins/uptime/public/components/settings/types.ts b/x-pack/plugins/uptime/public/components/settings/types.ts new file mode 100644 index 0000000000000..faa1c7e72e47b --- /dev/null +++ b/x-pack/plugins/uptime/public/components/settings/types.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { + IndexActionTypeId, + JiraActionTypeId, + PagerDutyActionTypeId, + ServerLogActionTypeId, + ServiceNowActionTypeId, + SlackActionTypeId, + TeamsActionTypeId, + WebhookActionTypeId, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths +} from '../../../../actions/server/builtin_action_types'; + +export type ActionTypeId = + | typeof SlackActionTypeId + | typeof PagerDutyActionTypeId + | typeof ServerLogActionTypeId + | typeof IndexActionTypeId + | typeof TeamsActionTypeId + | typeof ServiceNowActionTypeId + | typeof JiraActionTypeId + | typeof WebhookActionTypeId; diff --git a/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts b/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts index 2c2fc88ffa480..3806f20813bf1 100644 --- a/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts +++ b/x-pack/plugins/uptime/public/hooks/use_breadcrumbs.ts @@ -38,10 +38,7 @@ function handleBreadcrumbClick( export const makeBaseBreadcrumb = (href: string, params?: UptimeUrlParams): EuiBreadcrumb => { if (params) { const crumbParams: Partial = { ...params }; - // We don't want to encode this values because they are often set to Date.now(), the relative - // values in dateRangeStart are better for a URL. - delete crumbParams.absoluteDateRangeStart; - delete crumbParams.absoluteDateRangeEnd; + delete crumbParams.statusFilter; const query = stringifyUrlParams(crumbParams, true); href += query === EMPTY_QUERY ? '' : query; diff --git a/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts b/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts index 7171aa4828637..86672efc61eb8 100644 --- a/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts +++ b/x-pack/plugins/uptime/public/lib/alert_types/monitor_status.test.ts @@ -26,9 +26,9 @@ describe('monitor status alert type', () => { "errors": Object { "typeCheckFailure": "Provided parameters do not conform to the expected type.", "typeCheckParsingMessage": Array [ - "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", - "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeCount: number", - "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeUnit: string", + "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", + "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeCount: number", + "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/timerangeUnit: string", ], }, } @@ -151,7 +151,7 @@ describe('monitor status alert type', () => { "errors": Object { "typeCheckFailure": "Provided parameters do not conform to the expected type.", "typeCheckParsingMessage": Array [ - "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", + "Invalid value undefined supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", ], }, } @@ -164,7 +164,7 @@ describe('monitor status alert type', () => { "errors": Object { "typeCheckFailure": "Provided parameters do not conform to the expected type.", "typeCheckParsingMessage": Array [ - "Invalid value \\"this isn't a number\\" supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", + "Invalid value \\"this isn't a number\\" supplied to : ({ numTimes: number, timerangeCount: number, timerangeUnit: string } & Partial<{ search: string, filters: { monitor.type: Array, observer.geo.name: Array, tags: Array, url.port: Array }, shouldCheckStatus: boolean, isAutoGenerated: boolean, shouldCheckAvailability: boolean }>)/0: { numTimes: number, timerangeCount: number, timerangeUnit: string }/numTimes: number", ], }, } diff --git a/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx b/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx index e9905e6a706a9..97bd63614141b 100644 --- a/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx +++ b/x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx @@ -11,6 +11,7 @@ import { createMemoryHistory, History } from 'history'; import { CoreStart } from 'kibana/public'; import { I18nProvider } from '@kbn/i18n/react'; import { coreMock } from 'src/core/public/mocks'; +import { configure } from '@testing-library/dom'; import { mockState } from '../__mocks__/uptime_store.mock'; import { EuiThemeProvider } from '../../../../observability/public'; import { @@ -91,6 +92,7 @@ export function MockRouter({ ); } +configure({ testIdAttribute: 'data-test-subj' }); /* Custom react testing library render */ export function render( diff --git a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts index 1b5a6ab7c317b..62d7ed44a2911 100644 --- a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts +++ b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.test.ts @@ -9,6 +9,8 @@ import { stringifyUrlParams } from './stringify_url_params'; describe('stringifyUrlParams', () => { it('creates expected string value', () => { const result = stringifyUrlParams({ + absoluteDateRangeStart: 1000, + absoluteDateRangeEnd: 2000, autorefreshInterval: 50000, autorefreshIsPaused: false, dateRangeStart: 'now-15m', @@ -19,13 +21,15 @@ describe('stringifyUrlParams', () => { statusFilter: 'up', }); expect(result).toMatchInlineSnapshot( - `"?autorefreshInterval=50000&autorefreshIsPaused=false&dateRangeStart=now-15m&dateRangeEnd=now&filters=monitor.id%3A%20bar&focusConnectorField=true&search=monitor.id%3A%20foo&statusFilter=up"` + `"?absoluteDateRangeStart=1000&absoluteDateRangeEnd=2000&autorefreshInterval=50000&autorefreshIsPaused=false&dateRangeStart=now-15m&dateRangeEnd=now&filters=monitor.id%3A%20bar&focusConnectorField=true&search=monitor.id%3A%20foo&statusFilter=up"` ); }); it('creates expected string value when ignore empty is true', () => { const result = stringifyUrlParams( { + absoluteDateRangeStart: 1000, + absoluteDateRangeEnd: 2000, autorefreshInterval: 50000, autorefreshIsPaused: false, dateRangeStart: 'now-15m', diff --git a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts index b10af15961401..2fb970a051801 100644 --- a/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts +++ b/x-pack/plugins/uptime/public/lib/helper/stringify_url_params.ts @@ -18,6 +18,11 @@ const { export const stringifyUrlParams = (params: Partial, ignoreEmpty = false) => { if (ignoreEmpty) { + // We don't want to encode this values because they are often set to Date.now(), the relative + // values in dateRangeStart are better for a URL. + delete params.absoluteDateRangeStart; + delete params.absoluteDateRangeEnd; + Object.keys(params).forEach((key: string) => { // @ts-ignore const val = params[key]; diff --git a/x-pack/plugins/uptime/public/state/api/alert_actions.ts b/x-pack/plugins/uptime/public/state/api/alert_actions.ts new file mode 100644 index 0000000000000..0e8781e5937dd --- /dev/null +++ b/x-pack/plugins/uptime/public/state/api/alert_actions.ts @@ -0,0 +1,144 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { NewAlertParams } from './alerts'; +import { AlertAction } from '../../../../triggers_actions_ui/public'; +import { ACTION_GROUP_DEFINITIONS } from '../../../common/constants/alerts'; +import { MonitorStatusTranslations } from '../../../common/translations'; +import { + IndexActionParams, + PagerDutyActionParams, + ServerLogActionParams, + ServiceNowActionParams, + JiraActionParams, + WebhookActionParams, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths +} from '../../../../actions/server'; +import { ActionTypeId } from '../../components/settings/types'; + +export const SLACK_ACTION_ID: ActionTypeId = '.slack'; +export const PAGER_DUTY_ACTION_ID: ActionTypeId = '.pagerduty'; +export const SERVER_LOG_ACTION_ID: ActionTypeId = '.server-log'; +export const INDEX_ACTION_ID: ActionTypeId = '.index'; +export const TEAMS_ACTION_ID: ActionTypeId = '.teams'; +export const SERVICE_NOW_ACTION_ID: ActionTypeId = '.servicenow'; +export const JIRA_ACTION_ID: ActionTypeId = '.jira'; +export const WEBHOOK_ACTION_ID: ActionTypeId = '.webhook'; + +const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS; + +export function populateAlertActions({ defaultActions, monitorId, monitorName }: NewAlertParams) { + const actions: AlertAction[] = []; + defaultActions.forEach((aId) => { + const action: AlertAction = { + id: aId.id, + actionTypeId: aId.actionTypeId, + group: MONITOR_STATUS.id, + params: {}, + }; + switch (aId.actionTypeId) { + case PAGER_DUTY_ACTION_ID: + action.params = getPagerDutyActionParams(monitorId); + break; + case SERVER_LOG_ACTION_ID: + action.params = getServerLogActionParams(); + break; + case INDEX_ACTION_ID: + action.params = getIndexActionParams(); + break; + case SERVICE_NOW_ACTION_ID: + action.params = getServiceNowActionParams(); + break; + case JIRA_ACTION_ID: + action.params = getJiraActionParams(); + break; + case WEBHOOK_ACTION_ID: + action.params = getWebhookActionParams(); + break; + case SLACK_ACTION_ID: + case TEAMS_ACTION_ID: + default: + action.params = { + message: MonitorStatusTranslations.defaultActionMessage, + }; + } + + actions.push(action); + }); + + return actions; +} + +function getIndexActionParams(): IndexActionParams { + return { + documents: [ + { + monitorName: '{{state.monitorName}}', + monitorUrl: '{{{state.monitorUrl}}}', + statusMessage: '{{state.statusMessage}}', + latestErrorMessage: '{{{state.latestErrorMessage}}}', + observerLocation: '{{state.observerLocation}}', + }, + ], + }; +} + +function getServerLogActionParams(): ServerLogActionParams { + return { + level: 'warn', + message: MonitorStatusTranslations.defaultActionMessage, + }; +} + +function getWebhookActionParams(): WebhookActionParams { + return { + body: MonitorStatusTranslations.defaultActionMessage, + }; +} + +function getPagerDutyActionParams(monitorId: string): PagerDutyActionParams { + return { + dedupKey: monitorId + MONITOR_STATUS.id, + eventAction: 'trigger', + severity: 'error', + summary: MonitorStatusTranslations.defaultActionMessage, + }; +} + +function getServiceNowActionParams(): ServiceNowActionParams { + return { + subAction: 'pushToService', + subActionParams: { + incident: { + short_description: MonitorStatusTranslations.defaultActionMessage, + description: MonitorStatusTranslations.defaultActionMessage, + impact: '2', + severity: '2', + urgency: '2', + externalId: null, + }, + comments: [], + }, + }; +} + +function getJiraActionParams(): JiraActionParams { + return { + subAction: 'pushToService', + subActionParams: { + incident: { + summary: MonitorStatusTranslations.defaultActionMessage, + externalId: null, + description: MonitorStatusTranslations.defaultActionMessage, + issueType: null, + priority: '2', + labels: null, + parent: null, + }, + comments: [], + }, + }; +} diff --git a/x-pack/plugins/uptime/public/state/api/alerts.ts b/x-pack/plugins/uptime/public/state/api/alerts.ts index 9d4dd3a1253c3..dd78be5d08ea0 100644 --- a/x-pack/plugins/uptime/public/state/api/alerts.ts +++ b/x-pack/plugins/uptime/public/state/api/alerts.ts @@ -4,17 +4,17 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ACTION_GROUP_DEFINITIONS, CLIENT_ALERT_TYPES } from '../../../common/constants/alerts'; +import { CLIENT_ALERT_TYPES } from '../../../common/constants/alerts'; import { apiService } from './utils'; import { ActionConnector } from '../alerts/alerts'; import { AlertsResult, MonitorIdParam } from '../actions/types'; -import { AlertAction } from '../../../../triggers_actions_ui/public'; +import { ActionType, AlertAction } from '../../../../triggers_actions_ui/public'; import { API_URLS } from '../../../common/constants'; -import { MonitorStatusTranslations } from '../../../common/translations'; import { Alert, AlertTypeParams } from '../../../../alerts/common'; +import { AtomicStatusCheckParams } from '../../../common/runtime_types/alerts'; -const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS; +import { populateAlertActions } from './alert_actions'; const UPTIME_AUTO_ALERT = 'UPTIME_AUTO'; @@ -28,24 +28,28 @@ export interface NewAlertParams extends AlertTypeParams { defaultActions: ActionConnector[]; } +type NewMonitorStatusAlert = Omit< + Alert, + | 'id' + | 'createdBy' + | 'updatedBy' + | 'createdAt' + | 'updatedAt' + | 'apiKey' + | 'apiKeyOwner' + | 'muteAll' + | 'mutedInstanceIds' + | 'executionStatus' +>; + export const createAlert = async ({ defaultActions, monitorId, monitorName, }: NewAlertParams): Promise => { - const actions: AlertAction[] = []; - defaultActions.forEach((aId) => { - actions.push({ - id: aId.id, - actionTypeId: aId.actionTypeId, - group: MONITOR_STATUS.id, - params: { - message: MonitorStatusTranslations.defaultActionMessage, - }, - }); - }); + const actions: AlertAction[] = populateAlertActions({ defaultActions, monitorId, monitorName }); - const data = { + const data: NewMonitorStatusAlert = { actions, params: { numTimes: 1, @@ -60,8 +64,11 @@ export const createAlert = async ({ consumer: 'uptime', alertTypeId: CLIENT_ALERT_TYPES.MONITOR_STATUS, schedule: { interval: '1m' }, + notifyWhen: 'onActionGroupChange', tags: [UPTIME_AUTO_ALERT], name: `${monitorName} (Simple status alert)`, + enabled: true, + throttle: null, }; return await apiService.post(API_URLS.CREATE_ALERT, data); @@ -99,3 +106,7 @@ export const fetchAlertRecords = async ({ export const disableAlertById = async ({ alertId }: { alertId: string }) => { return await apiService.delete(API_URLS.ALERT + alertId); }; + +export const fetchActionTypes = async (): Promise => { + return await apiService.get(API_URLS.ACTION_TYPES); +}; diff --git a/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json b/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json new file mode 100644 index 0000000000000..c5ec5571917bd --- /dev/null +++ b/x-pack/plugins/vis_type_timeseries_enhanced/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["*.ts", "server/**/*"], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/vis_type_timeseries/tsconfig.json" } + ] +} diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js index 358e54d8738f6..cf43ebf01b610 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/lib/elasticsearch.js @@ -13,6 +13,8 @@ import { getRandomString } from './random'; export const initElasticsearchHelpers = (es) => { let indicesCreated = []; let templatesCreated = []; + let composableTemplatesCreated = []; + let dataStreamsCreated = []; // Indices const getIndex = (index) => es.indices.get({ index }).then(({ body }) => body); @@ -30,6 +32,20 @@ export const initElasticsearchHelpers = (es) => { const deleteAllIndices = () => Promise.all(indicesCreated.map(deleteIndex)).then(() => (indicesCreated = [])); + // Data streams + const createDataStream = (dataStream = getRandomString(), document) => { + dataStreamsCreated.push(dataStream); + return es.index({ index: dataStream, body: document }); + }; + + const deleteDataStream = (dataStream) => { + dataStreamsCreated = dataStreamsCreated.filter((i) => i !== dataStream); + return es.indices.deleteDataStream({ name: dataStream }); + }; + + const deleteAllDataStreams = () => + Promise.all(dataStreamsCreated.map(deleteDataStream)).then(() => (dataStreamsCreated = [])); + // Index templates const getIndexTemplates = () => es.indices.getTemplate(); @@ -39,6 +55,11 @@ export const initElasticsearchHelpers = (es) => { return es.indices.putTemplate({ name, body: template }, { create: true }); }; + const createComposableIndexTemplate = (name, template) => { + composableTemplatesCreated.push(name); + return es.indices.putIndexTemplate({ name, body: template }, { create: true }); + }; + const deleteIndexTemplate = (name) => { templatesCreated = templatesCreated.filter((i) => i !== name); return es.indices.deleteTemplate({ name }).catch((err) => { @@ -49,22 +70,45 @@ export const initElasticsearchHelpers = (es) => { }); }; + const deleteComposableIndexTemplate = (name) => { + composableTemplatesCreated = composableTemplatesCreated.filter((i) => i !== name); + return es.indices.deleteIndexTemplate({ name }).catch((err) => { + // Silently fail if templates not found + if (err.statusCode !== 404) { + throw err; + } + }); + }; + const deleteAllTemplates = () => Promise.all(templatesCreated.map(deleteIndexTemplate)).then(() => (templatesCreated = [])); - const cleanUp = () => Promise.all([deleteAllIndices(), deleteAllTemplates()]); + const deleteAllComposableTemplates = () => + Promise.all(templatesCreated.map(deleteComposableIndexTemplate)).then( + () => (composableTemplatesCreated = []) + ); + + const cleanUp = () => + Promise.all([ + deleteAllIndices(), + deleteAllTemplates(), + deleteAllComposableTemplates(), + deleteAllDataStreams(), + ]); const getNodesStats = () => es.nodes.stats().then(({ body }) => body); return { getIndex, createIndex, + createDataStream, deleteIndex, deleteAllIndices, deleteAllTemplates, getIndexTemplates, createIndexTemplate, deleteIndexTemplate, + createComposableIndexTemplate, getNodesStats, cleanUp, }; diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js index 1589baabb1ded..52979ed208bd6 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/policies.js @@ -17,7 +17,12 @@ export default function ({ getService }) { const es = getService('es'); - const { createIndex, cleanUp: cleanUpEsResources } = initElasticsearchHelpers(es); + const { + createIndex, + createComposableIndexTemplate, + createDataStream, + cleanUp: cleanUpEsResources, + } = initElasticsearchHelpers(es); const { loadPolicies, @@ -74,6 +79,34 @@ export default function ({ getService }) { const fetchedPolicy = body.find((p) => p.name === policyName); expect(fetchedPolicy.linkedIndices).to.eql([indexName]); }); + + it('should add hidden indices linked to policies', async () => { + // Create a policy + const policy = getPolicyPayload('hidden-index-link-test-policy'); + const { name: policyName } = policy; + await createPolicy(policy); + + // Create hidden data stream + await createComposableIndexTemplate('my_template', { + template: {}, + index_patterns: ['hidden*'], + data_stream: { + hidden: true, + }, + }); + + const indexName = 'hidden_index'; + await createDataStream(indexName, { + '@timestamp': '2020-01-27', + }); + + await addPolicyToIndex(policyName, indexName); + + const { body } = await loadPolicies(true); + const fetchedPolicy = body.find((p) => p.name === policyName); + // The index name is dynamically generated as .ds--XXX so we don't check for exact match + expect(fetchedPolicy.linkedIndices[0]).to.contain(indexName); + }); }); describe('create', () => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts index a0c5941d984cd..5b12ba4bf613f 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts @@ -36,6 +36,7 @@ export default ({ getService }: FtrProviderContext): void => { const es = getService('es'); // Failing: See https://github.com/elastic/kibana/issues/88130 + // FLAKY: https://github.com/elastic/kibana/issues/87988 describe.skip('patch_cases', () => { afterEach(async () => { await deleteCases(es); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts index a754966cf18a9..774bfb2863dc6 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/finalize_signals_migrations.ts @@ -47,7 +47,8 @@ export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - describe('Finalizing signals migrations', () => { + // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/88302 + describe.skip('Finalizing signals migrations', () => { let legacySignalsIndexName: string; let outdatedSignalsIndexName: string; let createdMigrations: CreateResponse[]; diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts index d3de41689244b..3ac85fbeff36e 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts @@ -343,6 +343,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job deletion confirms the delete modal'); await ml.jobTable.confirmDeleteJobModal(); + await ml.api.waitForAnomalyDetectionJobNotToExist(jobIdClone, 30 * 1000); await ml.testExecution.logTestStep( 'job deletion does not display the deleted job in the job list any more' diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts index dd6310b67d844..e20b5e8b41bdf 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts @@ -326,6 +326,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job deletion confirms the delete modal'); await ml.jobTable.confirmDeleteJobModal(); + await ml.api.waitForAnomalyDetectionJobNotToExist(jobIdClone, 30 * 1000); await ml.testExecution.logTestStep( 'job deletion does not display the deleted job in the job list any more' diff --git a/x-pack/test/functional/services/ml/api.ts b/x-pack/test/functional/services/ml/api.ts index 0a0a80e52de79..e50fb1818273d 100644 --- a/x-pack/test/functional/services/ml/api.ts +++ b/x-pack/test/functional/services/ml/api.ts @@ -454,8 +454,8 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { return await esSupertest.get(`/_ml/anomaly_detectors/${jobId}`).expect(200); }, - async waitForAnomalyDetectionJobToExist(jobId: string) { - await retry.waitForWithTimeout(`'${jobId}' to exist`, 5 * 1000, async () => { + async waitForAnomalyDetectionJobToExist(jobId: string, timeout: number = 5 * 1000) { + await retry.waitForWithTimeout(`'${jobId}' to exist`, timeout, async () => { if (await this.getAnomalyDetectionJob(jobId)) { return true; } else { @@ -464,8 +464,8 @@ export function MachineLearningAPIProvider({ getService }: FtrProviderContext) { }); }, - async waitForAnomalyDetectionJobNotToExist(jobId: string) { - await retry.waitForWithTimeout(`'${jobId}' to not exist`, 5 * 1000, async () => { + async waitForAnomalyDetectionJobNotToExist(jobId: string, timeout: number = 5 * 1000) { + await retry.waitForWithTimeout(`'${jobId}' to not exist`, timeout, async () => { if (await esSupertest.get(`/_ml/anomaly_detectors/${jobId}`).expect(404)) { return true; } else { diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts index 36812d0cd9eef..ca753e9253bde 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts @@ -53,8 +53,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.click('alertsTab'); } - // Failing: See https://github.com/elastic/kibana/issues/87105 - describe.skip('alerts list', function () { + describe('alerts list', function () { before(async () => { await pageObjects.common.navigateToApp('triggersActions'); await testSubjects.click('alertsTab'); @@ -407,6 +406,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { ).to.equal('Error found in 1 alert.'); }); + await refreshAlertsList(); expect(await testSubjects.getVisibleText('totalAlertsCount')).to.be( 'Showing: 2 of 2 alerts.' ); diff --git a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts index ff4ab65a310ed..04cf8bef1a16c 100644 --- a/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/uptime/alert_flyout.ts @@ -8,7 +8,8 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { - describe('uptime alerts', () => { + // FLAKY: https://github.com/elastic/kibana/issues/88177 + describe.skip('uptime alerts', () => { const pageObjects = getPageObjects(['common', 'uptime']); const supertest = getService('supertest'); const retry = getService('retry'); diff --git a/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts b/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts index c1696d3205294..4734448f32df5 100644 --- a/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts +++ b/x-pack/test/lists_api_integration/security_and_spaces/tests/read_list_privileges.ts @@ -17,7 +17,8 @@ export default ({ getService }: FtrProviderContext) => { const spacesService = getService('spaces'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - describe('read_list_privileges', () => { + // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/88302 + describe.skip('read_list_privileges', () => { const space1Id = 'space_1'; const user1 = { diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 2584cedd01523..a0a94f91a1ddb 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -9,13 +9,16 @@ "exclude": ["../typings/jest.d.ts"], "references": [ { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/telemetry_management_section/tsconfig.json" }, { "path": "../../src/plugins/management/tsconfig.json" }, { "path": "../../src/plugins/bfetch/tsconfig.json" }, { "path": "../../src/plugins/charts/tsconfig.json" }, + { "path": "../../src/plugins/console/tsconfig.json" }, { "path": "../../src/plugins/dashboard/tsconfig.json" }, { "path": "../../src/plugins/discover/tsconfig.json" }, { "path": "../../src/plugins/data/tsconfig.json" }, { "path": "../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../src/plugins/es_ui_shared/tsconfig.json" }, { "path": "../../src/plugins/expressions/tsconfig.json" }, { "path": "../../src/plugins/home/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, @@ -24,6 +27,7 @@ { "path": "../../src/plugins/navigation/tsconfig.json" }, { "path": "../../src/plugins/newsfeed/tsconfig.json" }, { "path": "../../src/plugins/saved_objects/tsconfig.json" }, + { "path": "../../src/plugins/saved_objects_management/tsconfig.json" }, { "path": "../../src/plugins/saved_objects_tagging_oss/tsconfig.json" }, { "path": "../../src/plugins/share/tsconfig.json" }, { "path": "../../src/plugins/telemetry_collection_manager/tsconfig.json" }, @@ -32,8 +36,10 @@ { "path": "../../src/plugins/ui_actions/tsconfig.json" }, { "path": "../../src/plugins/url_forwarding/tsconfig.json" }, + { "path": "../plugins/console_extensions/tsconfig.json" }, { "path": "../plugins/data_enhanced/tsconfig.json" }, { "path": "../plugins/global_search/tsconfig.json" }, + { "path": "../plugins/global_search_providers/tsconfig.json" }, { "path": "../plugins/features/tsconfig.json" }, { "path": "../plugins/embeddable_enhanced/tsconfig.json" }, { "path": "../plugins/licensing/tsconfig.json" }, diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 0780251e42f22..dc720fced3063 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -4,18 +4,23 @@ "exclude": [ "plugins/apm/e2e/cypress/**/*", "plugins/apm/scripts/**/*", + "plugins/console_extensions/**/*", "plugins/data_enhanced/**/*", + "plugins/discover_enhanced/**/*", "plugins/dashboard_enhanced/**/*", "plugins/global_search/**/*", + "plugins/global_search_providers/**/*", "plugins/graph/**/*", "plugins/features/**/*", "plugins/embeddable_enhanced/**/*", "plugins/licensing/**/*", + "plugins/searchprofiler/**/*", "plugins/security_solution/cypress/**/*", "plugins/task_manager/**/*", "plugins/telemetry_collection_xpack/**/*", "plugins/translations/**/*", "plugins/ui_actions_enhanced/**/*", + "plugins/vis_type_timeseries_enhanced/**/*", "test/**/*" ], "compilerOptions": { @@ -24,14 +29,17 @@ }, "references": [ { "path": "../src/core/tsconfig.json" }, + { "path": "../src/plugins/telemetry_management_section/tsconfig.json" }, { "path": "../src/plugins/management/tsconfig.json" }, { "path": "../src/plugins/bfetch/tsconfig.json" }, { "path": "../src/plugins/charts/tsconfig.json" }, + { "path": "../src/plugins/console/tsconfig.json" }, { "path": "../src/plugins/dashboard/tsconfig.json" }, { "path": "../src/plugins/discover/tsconfig.json" }, { "path": "../src/plugins/data/tsconfig.json" }, { "path": "../src/plugins/dev_tools/tsconfig.json" }, { "path": "../src/plugins/embeddable/tsconfig.json" }, + { "path": "../src/plugins/es_ui_shared/tsconfig.json" }, { "path": "../src/plugins/expressions/tsconfig.json" }, { "path": "../src/plugins/home/tsconfig.json" }, { "path": "../src/plugins/inspector/tsconfig.json" }, @@ -42,6 +50,7 @@ { "path": "../src/plugins/navigation/tsconfig.json" }, { "path": "../src/plugins/newsfeed/tsconfig.json" }, { "path": "../src/plugins/saved_objects/tsconfig.json" }, + { "path": "../src/plugins/saved_objects_management/tsconfig.json" }, { "path": "../src/plugins/saved_objects_tagging_oss/tsconfig.json" }, { "path": "../src/plugins/presentation_util/tsconfig.json" }, { "path": "../src/plugins/security_oss/tsconfig.json" }, @@ -53,15 +62,20 @@ { "path": "../src/plugins/url_forwarding/tsconfig.json" }, { "path": "../src/plugins/usage_collection/tsconfig.json" }, + { "path": "./plugins/console_extensions/tsconfig.json" }, { "path": "./plugins/data_enhanced/tsconfig.json" }, + { "path": "./plugins/discover_enhanced/tsconfig.json" }, { "path": "./plugins/global_search/tsconfig.json" }, + { "path": "./plugins/global_search_providers/tsconfig.json" }, { "path": "./plugins/features/tsconfig.json" }, { "path": "./plugins/graph/tsconfig.json" }, { "path": "./plugins/embeddable_enhanced/tsconfig.json" }, { "path": "./plugins/licensing/tsconfig.json" }, + { "path": "./plugins/searchprofiler/tsconfig.json" }, { "path": "./plugins/task_manager/tsconfig.json" }, { "path": "./plugins/telemetry_collection_xpack/tsconfig.json" }, + { "path": "./plugins/ui_actions_enhanced/tsconfig.json" }, + { "path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json" }, { "path": "./plugins/translations/tsconfig.json" }, - { "path": "./plugins/ui_actions_enhanced/tsconfig.json" } ] } diff --git a/x-pack/tsconfig.refs.json b/x-pack/tsconfig.refs.json index 28f77a82f415e..08c81d5f3b802 100644 --- a/x-pack/tsconfig.refs.json +++ b/x-pack/tsconfig.refs.json @@ -3,14 +3,19 @@ "references": [ { "path": "./plugins/dashboard_enhanced/tsconfig.json" }, { "path": "./plugins/licensing/tsconfig.json" }, + { "path": "./plugins/console_extensions/tsconfig.json" }, + { "path": "./plugins/discover_enhanced/tsconfig.json" }, { "path": "./plugins/data_enhanced/tsconfig.json" }, { "path": "./plugins/global_search/tsconfig.json" }, + { "path": "./plugins/global_search_providers/tsconfig.json" }, { "path": "./plugins/features/tsconfig.json" }, { "path": "./plugins/graph/tsconfig.json" }, { "path": "./plugins/embeddable_enhanced/tsconfig.json" }, + { "path": "./plugins/searchprofiler/tsconfig.json" }, { "path": "./plugins/task_manager/tsconfig.json" }, { "path": "./plugins/telemetry_collection_xpack/tsconfig.json" }, + { "path": "./plugins/ui_actions_enhanced/tsconfig.json" }, + { "path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json" }, { "path": "./plugins/translations/tsconfig.json" }, - { "path": "./plugins/ui_actions_enhanced/tsconfig.json" } ] } diff --git a/yarn.lock b/yarn.lock index 02bd107ea0e65..5a39eacf3e68b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1773,13 +1773,6 @@ "@hapi/boom" "9.x.x" "@hapi/hoek" "9.x.x" -"@hapi/address@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.1.0.tgz#d60c5c0d930e77456fdcde2598e77302e2955e1d" - integrity sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/ammo@5.x.x", "@hapi/ammo@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@hapi/ammo/-/ammo-5.0.1.tgz#9d34560f5c214eda563d838c01297387efaab490" @@ -1869,11 +1862,6 @@ resolved "https://registry.yarnpkg.com/@hapi/file/-/file-2.0.0.tgz#2ecda37d1ae9d3078a67c13b7da86e8c3237dfb9" integrity sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ== -"@hapi/formula@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-2.0.0.tgz#edade0619ed58c8e4f164f233cda70211e787128" - integrity sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A== - "@hapi/good-squeeze@6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@hapi/good-squeeze/-/good-squeeze-6.0.0.tgz#bb72d6869cd7398b615a6b7270f630dc4f76aebf" @@ -1987,11 +1975,6 @@ "@hapi/hoek" "9.x.x" "@hapi/nigel" "4.x.x" -"@hapi/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-2.0.0.tgz#805b40d4dbec04fc116a73089494e00f073de8df" - integrity sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw== - "@hapi/podium@4.x.x", "@hapi/podium@^4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@hapi/podium/-/podium-4.1.1.tgz#106e5849f2cb19b8767cc16007e0107f27c3c791" @@ -3205,22 +3188,22 @@ jsonwebtoken "^8.3.0" lru-cache "^5.1.1" -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== +"@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4": + version "2.4.4" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56" + integrity sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.0" -"@octokit/core@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc" - integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw== +"@octokit/core@^3.2.3": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.4.tgz#5791256057a962eca972e31818f02454897fd106" + integrity sha512-d9dTsqdePBqOn7aGkyRFe7pQpCXdibSJ5SFnrTr0axevObZrpz3qkWm7t/NjYv5a66z6vhfteriaq4FRz3e0Qg== dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/graphql" "^4.3.1" - "@octokit/request" "^5.4.0" - "@octokit/types" "^5.0.0" + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.4.12" + "@octokit/types" "^6.0.3" before-after-hook "^2.1.0" universal-user-agent "^6.0.0" @@ -3243,15 +3226,20 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.3.1": - version "4.5.6" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.6.tgz#708143ba15cf7c1879ed6188266e7f270be805d4" - integrity sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg== +"@octokit/graphql@^4.5.8": + version "4.5.8" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.8.tgz#d42373633c3015d0eafce64a8ce196be167fdd9b" + integrity sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA== dependencies: "@octokit/request" "^5.3.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.0" universal-user-agent "^6.0.0" +"@octokit/openapi-types@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.2.0.tgz#123e0438a0bc718ccdac3b5a2e69b3dd00daa85b" + integrity sha512-274lNUDonw10kT8wHg8fCcUc1ZjZHbWv0/TbAwb0ojhBQqZYc1cQ/4yqTVTtPMDeZ//g7xVEYe/s3vURkRghPg== + "@octokit/plugin-paginate-rest@^1.1.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc" @@ -3259,17 +3247,17 @@ dependencies: "@octokit/types" "^2.0.1" -"@octokit/plugin-paginate-rest@^2.2.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz#92f951ddc8a1cd505353fa07650752ca25ed7e93" - integrity sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg== +"@octokit/plugin-paginate-rest@^2.6.2": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.0.tgz#6bb7b043c246e0654119a6ec4e72a172c9e2c7f3" + integrity sha512-+zARyncLjt9b0FjqPAbJo4ss7HOlBi1nprq+cPlw5vu2+qjy7WvlXhtXFdRHQbSL1Pt+bfAKaLADEkkvg8sP8w== dependencies: - "@octokit/types" "^5.5.0" + "@octokit/types" "^6.0.1" -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== +"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz#394d59ec734cd2f122431fbaf05099861ece3c44" + integrity sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg== "@octokit/plugin-rest-endpoint-methods@2.4.0": version "2.4.0" @@ -3279,12 +3267,12 @@ "@octokit/types" "^2.0.1" deprecation "^2.3.1" -"@octokit/plugin-rest-endpoint-methods@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba" - integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw== +"@octokit/plugin-rest-endpoint-methods@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.4.1.tgz#105cf93255432155de078c9efc33bd4e14d1cd63" + integrity sha512-+v5PcvrUcDeFXf8hv1gnNvNLdm4C0+2EiuWt9EatjjUmfriM1pTMM+r4j1lLHxeBQ9bVDmbywb11e3KjuavieA== dependencies: - "@octokit/types" "^5.5.0" + "@octokit/types" "^6.1.0" deprecation "^2.3.1" "@octokit/plugin-retry@^2.2.0": @@ -3324,14 +3312,14 @@ once "^1.4.0" universal-user-agent "^2.0.1" -"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.0": - version "5.4.9" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365" - integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA== +"@octokit/request@^5.2.0", "@octokit/request@^5.3.0", "@octokit/request@^5.4.12": + version "5.4.12" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.12.tgz#b04826fa934670c56b135a81447be2c1723a2ffc" + integrity sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" deprecation "^2.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.1" @@ -3378,15 +3366,15 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^18.0.6": - version "18.0.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.6.tgz#76c274f1a68f40741a131768ef483f041e7b98b6" - integrity sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w== +"@octokit/rest@^18.0.12": + version "18.0.12" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.12.tgz#278bd41358c56d87c201e787e8adc0cac132503a" + integrity sha512-hNRCZfKPpeaIjOVuNJzkEL6zacfZlBPV8vw8ReNeyUkVvbuCvvrrx8K8Gw2eyHHsmd4dPlAxIXIZ9oHhJfkJpw== dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.2.0" + "@octokit/core" "^3.2.3" + "@octokit/plugin-paginate-rest" "^2.6.2" + "@octokit/plugin-request-log" "^1.0.2" + "@octokit/plugin-rest-endpoint-methods" "4.4.1" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": version "2.16.2" @@ -3395,37 +3383,45 @@ dependencies: "@types/node" ">= 8" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0": +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": version "5.5.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== dependencies: "@types/node" ">= 8" -"@percy/agent@^0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.26.0.tgz#9f06849d752df7368198835d0b5edc16c2d69a0c" - integrity sha512-PKah93vdcmHWlvDd2/QTir4iboqpLAcbAxhUDJYfp8rTzVy5kBstKyPrQk+8IifnGRWNSjsXOO6+qZr+cYHdjA== +"@octokit/types@^6.0.0", "@octokit/types@^6.0.1", "@octokit/types@^6.0.3", "@octokit/types@^6.1.0": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.2.1.tgz#7f881fe44475ab1825776a4a59ca1ae082ed1043" + integrity sha512-jHs9OECOiZxuEzxMZcXmqrEO8GYraHF+UzNVH2ACYh8e/Y7YoT+hUf9ldvVd6zIvWv4p3NdxbQ0xx3ku5BnSiA== + dependencies: + "@octokit/openapi-types" "^2.2.0" + "@types/node" ">= 8" + +"@percy/agent@^0.28.6": + version "0.28.6" + resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.28.6.tgz#b220fab6ddcf63ae4e6c343108ba6955a772ce1c" + integrity sha512-SDAyBiUmfQMVTayjvEjQ0IJIA7Y3AoeyWn0jmUxNOMRRIJWo4lQJghfhFCgzCkhXDCm67NMN2nAQAsvXrlIdkQ== dependencies: "@oclif/command" "1.5.19" "@oclif/config" "^1" "@oclif/plugin-help" "^2" "@oclif/plugin-not-found" "^1.2" - axios "^0.19.0" + axios "^0.21.1" body-parser "^1.18.3" colors "^1.3.2" cors "^2.8.4" cosmiconfig "^5.2.1" - cross-spawn "^6.0.5" + cross-spawn "^7.0.2" deepmerge "^4.0.0" express "^4.16.3" - follow-redirects "1.9.0" + follow-redirects "1.12.1" generic-pool "^3.7.1" globby "^10.0.1" image-size "^0.8.2" js-yaml "^3.13.1" percy-client "^3.2.0" - puppeteer "^2.0.0" + puppeteer "^5.3.1" retry-axios "^1.0.1" which "^2.0.1" winston "^3.0.0" @@ -3510,6 +3506,23 @@ dependencies: url-pattern "^1.0.3" +"@sideway/address@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.0.tgz#0b301ada10ac4e0e3fa525c90615e0b61a72b78d" + integrity sha512-wAH/JYRXeIFQRsxerIuLjgUu2Xszam+O5xKeatJ4oudShOOirfmsQ1D6LL54XOU2tizpCYku+s1wmU0SYdpoSA== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -3556,19 +3569,19 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== -"@slack/types@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@slack/types/-/types-1.0.0.tgz#1dc7a63b293c4911e474197585c3feda012df17a" - integrity sha512-IktC4uD/CHfLQcSitKSmjmRu4a6+Nf/KzfS6dTgUlDzENhh26l8aESKAuIpvYD5VOOE6NxDDIAdPJOXBvUGxlg== +"@slack/types@^1.2.1": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@slack/types/-/types-1.9.0.tgz#aa8f90b2f66ac54a77e42606644366f93cff4871" + integrity sha512-RmwgMWqOtzd2JPXdiaD/tyrDD0vtjjRDFdxN1I3tAxwBbg4aryzDUVqFc8na16A+3Xik/UN8X1hvVTw8J4EB9w== -"@slack/webhook@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@slack/webhook/-/webhook-5.0.0.tgz#0044a3940afc16cbc607c71acdffddb9e9d4f161" - integrity sha512-cDj3kz3x9z9271xPNzlwb90DpKTYybG2OWPJHigJL8FegR80rzQyD0v4bGuStGGkHbAYDKE2BMpJambR55hnSg== +"@slack/webhook@^5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@slack/webhook/-/webhook-5.0.4.tgz#5d3e947387c1d0ccb176a153cec68c594edb7060" + integrity sha512-IC1dpVSc2F/pmwCxOb0QzH2xnGKmyT7MofPGhNkeaoiMrLMU+Oc7xV/AxGnz40mURtCtaDchZSM3tDo9c9x6BA== dependencies: - "@slack/types" "^1.0.0" + "@slack/types" "^1.2.1" "@types/node" ">=8.9.0" - axios "^0.18.0" + axios "^0.21.1" "@storybook/addon-a11y@^6.0.26": version "6.0.26" @@ -7642,20 +7655,12 @@ axe-core@^4.0.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.0.2.tgz#c7cf7378378a51fcd272d3c09668002a4990b1cb" integrity sha512-arU1h31OGFu+LPrOLGZ7nB45v940NMDMEJeNmbutu57P+UFDVnkZg3e+J1I2HJRZ9hT7gO8J91dn/PMrAiKakA== -axios@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" - integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== +axios@^0.21.0, axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" - -axios@^0.19.0, axios@^0.19.2: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== - dependencies: - follow-redirects "1.5.10" + follow-redirects "^1.10.0" axobject-query@^2.0.2: version "2.0.2" @@ -8189,17 +8194,17 @@ bach@^1.0.0: async-settle "^1.0.0" now-and-later "^2.0.0" -backport@5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/backport/-/backport-5.6.0.tgz#6dcc0485e5eecf66bb6f950983fd0b018217ec20" - integrity sha512-wz7Ve3uslhGUMtHuctqIEtZFItTGKRRMiNANYso0iw1ar81ILsczDGgxeOlzmmnIQFi1ZvEs6lX3cgypGfef9A== +backport@^5.6.1: + version "5.6.4" + resolved "https://registry.yarnpkg.com/backport/-/backport-5.6.4.tgz#8cf4bc750b26d27161306858ee9069218ad7cdfd" + integrity sha512-ZhuZcGxOBHBXFBCwweVf02b+KhWe0tdgg71jPSl583YYxlru+JBRH+TFM8S0J6/6YUuTWO81M9funjehJ18jqg== dependencies: - "@octokit/rest" "^18.0.6" + "@octokit/rest" "^18.0.12" "@types/lodash.difference" "^4.5.6" "@types/lodash.intersection" "^4.4.6" - axios "^0.19.0" + axios "^0.21.1" dedent "^0.7.0" - del "^5.1.0" + del "^6.0.0" find-up "^5.0.0" inquirer "^7.3.3" lodash.difference "^4.5.0" @@ -8209,11 +8214,11 @@ backport@5.6.0: lodash.isstring "^4.0.1" lodash.uniq "^4.5.0" make-dir "^3.1.0" - ora "^5.1.0" + ora "^5.2.0" safe-json-stringify "^1.2.0" strip-json-comments "^3.1.1" winston "^3.3.3" - yargs "^16.0.3" + yargs "^16.2.0" bail@^1.0.0: version "1.0.2" @@ -9409,17 +9414,18 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^87.0.0: - version "87.0.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.0.tgz#e8390deed8ada791719a67ad6bf1116614f1ba2d" - integrity sha512-PY7FnHOQKfH0oPfSdhpLx5nEy5g4dGYySf2C/WZGkAaCaldYH8/3lPPucZ8MlOCi4bCSGoKoCUTeG6+wYWavvw== +chromedriver@^87.0.3: + version "87.0.5" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.5.tgz#5a56bae6e23fc5eaa0c5ac3b76f936e4dd0989a1" + integrity sha512-bWAKdZANrt3LXMUOKFP+DgW7DjVKfihCbjej6URkUcKsvbQBDYpf5YY5d/dXE3SOSzIFZ7fmLxogusxpsupCJg== dependencies: "@testim/chrome-version" "^1.0.7" - axios "^0.19.2" - del "^5.1.0" + axios "^0.21.0" + del "^6.0.0" extract-zip "^2.0.1" https-proxy-agent "^5.0.0" mkdirp "^1.0.4" + proxy-from-env "^1.1.0" tcp-port-used "^1.0.1" ci-info@^2.0.0: @@ -9512,10 +9518,10 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.2.0, cli-spinners@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" - integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== +cli-spinners@^2.2.0, cli-spinners@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" + integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== cli-table3@0.6.0, cli-table3@~0.6.0: version "0.6.0" @@ -9624,10 +9630,10 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -cliui@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.1.tgz#a4cb67aad45cd83d8d05128fc9f4d8fbb887e6b3" - integrity sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ== +cliui@^7.0.0, cliui@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.2.tgz#e3a412e1d5ec0ccbe50d1b4120fc8164e97881f4" + integrity sha512-lhpKkuUj67j5JgZIPZxLe7nSa4MQoojzRVWQyzMqBp2hBg6gwRjUDAwC1YDeBaC3APDBKNnjWbv2mlDF4XgOSA== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" @@ -10441,7 +10447,7 @@ cross-fetch@2.2.2: node-fetch "2.1.2" whatwg-fetch "2.0.4" -cross-spawn@7.0.1, cross-spawn@^7.0.0: +cross-spawn@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== @@ -10469,6 +10475,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.0, cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypt@~0.0.1: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -11226,7 +11241,7 @@ debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6. dependencies: ms "2.0.0" -debug@3.1.0, debug@=3.1.0: +debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== @@ -11503,6 +11518,20 @@ del@^5.1.0: rimraf "^3.0.0" slash "^3.0.0" +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + dependencies: + globby "^11.0.1" + graceful-fs "^4.2.4" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" + slash "^3.0.0" + delaunator@4: version "4.0.1" resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-4.0.1.tgz#3d779687f57919a7a418f8ab947d3bddb6846957" @@ -11659,6 +11688,11 @@ devtools-protocol@0.0.809251: resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.809251.tgz#300b3366be107d5c46114ecb85274173e3999518" integrity sha512-pf+2OY6ghMDPjKkzSWxHMq+McD+9Ojmq5XVRYpv/kPd9sTMQxzEt21592a31API8qRjro0iYYOc3ag46qF/1FA== +devtools-protocol@0.0.818844: + version "0.0.818844" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e" + integrity sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg== + dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" @@ -12620,10 +12654,10 @@ es6-weak-map@^2.0.1, es6-weak-map@^2.0.2: es6-iterator "^2.0.1" es6-symbol "^3.1.1" -escalade@^3.0.2, escalade@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.0.tgz#e8e2d7c7a8b76f6ee64c2181d6b8151441602d4e" - integrity sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig== +escalade@^3.0.2, escalade@^3.1.0, escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-goat@^2.0.0: version "2.1.1" @@ -13348,7 +13382,7 @@ extract-stack@^1.0.0: resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" integrity sha1-uXrK+UQe6iMyUpYktzL8WhyBZfo= -extract-zip@1.7.0, extract-zip@^1.6.6, extract-zip@^1.7.0: +extract-zip@1.7.0, extract-zip@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== @@ -13872,19 +13906,15 @@ folktale@2.3.2: resolved "https://registry.yarnpkg.com/folktale/-/folktale-2.3.2.tgz#38231b039e5ef36989920cbf805bf6b227bf4fd4" integrity sha512-+8GbtQBwEqutP0v3uajDDoN64K2ehmHd0cjlghhxh0WpcfPzAIjPA03e1VvHlxL02FVGR0A6lwXsNQKn3H1RNQ== -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" +follow-redirects@1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6" + integrity sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg== -follow-redirects@1.9.0, follow-redirects@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" - integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A== - dependencies: - debug "^3.0.0" +follow-redirects@^1.0.0, follow-redirects@^1.10.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" + integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== font-awesome@4.7.0: version "4.7.0" @@ -16557,7 +16587,7 @@ is-buffer@^1.0.2, is-buffer@^1.1.0, is-buffer@^1.1.4, is-buffer@^1.1.5, is-buffe resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.0, is-buffer@^2.0.2, is-buffer@~2.0.3: +is-buffer@^2.0.0, is-buffer@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== @@ -17946,16 +17976,16 @@ joi@13.x.x, joi@^13.5.2: isemail "3.x.x" topo "3.x.x" -joi@^17.1.1: - version "17.2.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.2.1.tgz#e5140fdf07e8fecf9bc977c2832d1bdb1e3f2a0a" - integrity sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA== +joi@^17.3.0: + version "17.3.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.3.0.tgz#f1be4a6ce29bc1716665819ac361dfa139fff5d2" + integrity sha512-Qh5gdU6niuYbUIUV5ejbsMiiFmBdw8Kcp8Buj2JntszCkCfxJ9Cz76OtHxOZMPXrt5810iDIXs+n1nNVoquHgg== dependencies: - "@hapi/address" "^4.1.0" - "@hapi/formula" "^2.0.0" "@hapi/hoek" "^9.0.0" - "@hapi/pinpoint" "^2.0.0" "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.0" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" jpeg-js@0.0.4: version "0.0.4" @@ -19827,7 +19857,7 @@ mime-db@1.44.0, mime-db@1.x.x, "mime-db@>= 1.40.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@^2.0.1, mime-types@^2.1.12, mime-types@^2.1.25, mime-types@^2.1.26, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.0.1, mime-types@^2.1.12, mime-types@^2.1.26, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== @@ -19839,7 +19869,7 @@ mime@1.6.0, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.0.3, mime@^2.4.4: +mime@^2.4.4: version "2.4.6" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== @@ -21293,17 +21323,17 @@ ora@^4.0.3, ora@^4.0.4: strip-ansi "^6.0.0" wcwidth "^1.0.1" -ora@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8" - integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w== +ora@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.2.0.tgz#de10bfd2d15514384af45f3fa9d9b1aaf344fda1" + integrity sha512-+wG2v8TUU8EgzPHun1k/n45pXquQ9fHnbXVetl9rRgO6kjZszGGbraF3XPTIdgeA+s1lbRjSEftAnyT0w8ZMvQ== dependencies: + bl "^4.0.3" chalk "^4.1.0" cli-cursor "^3.1.0" - cli-spinners "^2.4.0" + cli-spinners "^2.5.0" is-interactive "^1.0.0" log-symbols "^4.0.0" - mute-stream "0.0.8" strip-ansi "^6.0.0" wcwidth "^1.0.1" @@ -22568,11 +22598,16 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.0" -proxy-from-env@1.0.0, proxy-from-env@^1.0.0: +proxy-from-env@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= +proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + proxyquire@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/proxyquire/-/proxyquire-1.8.0.tgz#02d514a5bed986f04cbb2093af16741535f79edc" @@ -22665,21 +22700,23 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" -puppeteer@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-2.1.1.tgz#ccde47c2a688f131883b50f2d697bd25189da27e" - integrity sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg== +puppeteer@^5.3.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.5.0.tgz#331a7edd212ca06b4a556156435f58cbae08af00" + integrity sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg== dependencies: - "@types/mime-types" "^2.1.0" debug "^4.1.0" - extract-zip "^1.6.6" + devtools-protocol "0.0.818844" + extract-zip "^2.0.0" https-proxy-agent "^4.0.0" - mime "^2.0.3" - mime-types "^2.1.25" + node-fetch "^2.6.1" + pkg-dir "^4.2.0" progress "^2.0.1" proxy-from-env "^1.0.0" - rimraf "^2.6.1" - ws "^6.1.0" + rimraf "^3.0.2" + tar-fs "^2.0.0" + unbzip2-stream "^1.3.3" + ws "^7.2.3" "puppeteer@npm:@elastic/puppeteer@5.4.1-patch.1": version "5.4.1-patch.1" @@ -24656,7 +24693,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -24816,10 +24853,10 @@ rxjs-marbles@^5.0.6: dependencies: fast-equals "^2.0.0" -rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.5.3, rxjs@^6.5.5, rxjs@^6.6.0: - version "6.6.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" - integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== +rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.5.3, rxjs@^6.5.5, rxjs@^6.6.0, rxjs@^6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" @@ -29037,16 +29074,16 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -wait-on@^5.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.2.0.tgz#6711e74422523279714a36d52cf49fb47c9d9597" - integrity sha512-U1D9PBgGw2XFc6iZqn45VBubw02VsLwnZWteQ1au4hUVHasTZuFSKRzlTB2dqgLhji16YVI8fgpEpwUdCr8B6g== +wait-on@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.2.1.tgz#05b66fcb4d7f5da01537f03e7cf96e8836422996" + integrity sha512-H2F986kNWMU9hKlI9l/ppO6tN8ZSJd35yBljMLa1/vjzWP++Qh6aXyt77/u7ySJFZQqBtQxnvm/xgG48AObXcw== dependencies: - axios "^0.19.2" - joi "^17.1.1" - lodash "^4.17.19" + axios "^0.21.1" + joi "^17.3.0" + lodash "^4.17.20" minimist "^1.2.5" - rxjs "^6.5.5" + rxjs "^6.6.3" walk@^2.3.14: version "2.3.14" @@ -29646,7 +29683,7 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -ws@^6.1.0, ws@^6.1.2, ws@^6.2.1: +ws@^6.1.2, ws@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== @@ -29769,7 +29806,7 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== -y18n@^5.0.1: +y18n@^5.0.1, y18n@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== @@ -29818,10 +29855,10 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.0.0: - version "20.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.0.tgz#944791ca2be2e08ddadd3d87e9de4c6484338605" - integrity sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A== +yargs-parser@^20.0.0, yargs-parser@^20.2.2: + version "20.2.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.2.tgz#84562c6b1c41ccec2f13d346c7dd83f8d1a0dc70" + integrity sha512-XmrpXaTl6noDsf1dKpBuUNCOHqjs0g3jRMXf/ztRxdOmb+er8kE5z5b55Lz3p5u2T8KJ59ENBnASS8/iapVJ5g== yargs-unparser@1.6.0: version "1.6.0" @@ -29865,18 +29902,18 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.0.3, yargs@~16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c" - integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA== +yargs@^16.0.3, yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^7.0.0" - escalade "^3.0.2" + cliui "^7.0.2" + escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.0" - y18n "^5.0.1" - yargs-parser "^20.0.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yargs@^3.15.0: version "3.32.0" @@ -29910,6 +29947,19 @@ yargs@^7.1.0: y18n "^3.2.1" yargs-parser "5.0.0-security.0" +yargs@~16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c" + integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA== + dependencies: + cliui "^7.0.0" + escalade "^3.0.2" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.1" + yargs-parser "^20.0.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"