diff --git a/docs/maps/geojson-upload.asciidoc b/docs/maps/geojson-upload.asciidoc
index d9b21f591f62..8c3cb371b6ad 100644
--- a/docs/maps/geojson-upload.asciidoc
+++ b/docs/maps/geojson-upload.asciidoc
@@ -9,7 +9,7 @@ for example, in visualizations and Canvas workpads.
[float]
=== Why GeoJSON?
GeoJSON is an open-standard file format for storing geospatial vector data.
-Although many vector data formats are available in the GIS community,
+Although many vector data formats are available in the GIS community,
GeoJSON is the most commonly used and flexible option.
[float]
@@ -18,14 +18,14 @@ Follow the instructions below to upload a GeoJSON data file, or try the
<>.
. Open *Elastic Maps*, and then click *Add layer*.
-. Click *Upload GeoJSON vector file*.
+. Click *Uploaded GeoJSON*.
+
[role="screenshot"]
image::maps/images/fu_gs_select_source_file_upload.png[]
. Use the file chooser to select a valid GeoJSON file. The file will load
a preview of the data on the map.
-. Use the default *Index type* of {ref}/geo-point.html[geo_point] for point data,
+. Use the default *Index type* of {ref}/geo-point.html[geo_point] for point data,
or override it and select {ref}/geo-shape.html[geo_shape].
All other shapes will default to a type of `geo_shape`.
. Leave the default *Index name* and *Index pattern* names (the name of the uploaded
diff --git a/docs/maps/indexing-geojson-data-tutorial.asciidoc b/docs/maps/indexing-geojson-data-tutorial.asciidoc
index 5645567ec7e7..5284bd9ac2ac 100644
--- a/docs/maps/indexing-geojson-data-tutorial.asciidoc
+++ b/docs/maps/indexing-geojson-data-tutorial.asciidoc
@@ -2,7 +2,7 @@
[[indexing-geojson-data-tutorial]]
== Indexing GeoJSON data tutorial
-In this tutorial, you'll build a customized map that shows the flight path between
+In this tutorial, you'll build a customized map that shows the flight path between
two airports, and the lightning hot spots on that route. You'll learn to:
* Import GeoJSON files into Kibana
@@ -15,7 +15,7 @@ two airports, and the lightning hot spots on that route. You'll learn to:
This tutorial requires you to download the following GeoJSON sample data files.
These files are good examples of the types
of vector data that you can upload to Kibana and index in
-Elasticsearch for display in *Elastic Maps*.
+Elasticsearch for display in *Elastic Maps*.
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/logan_international_airport.geojson[Logan International Airport]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/bangor_international_airport.geojson[Bangor International Airport]
@@ -23,7 +23,7 @@ Elasticsearch for display in *Elastic Maps*.
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/original_flight_path.geojson[Original flight path]
* https://raw.githubusercontent.com/elastic/examples/master/Maps/Getting%20Started%20Examples/geojson_upload_and_styling/modified_flight_path.geojson[Modified flight path]
-The data represents two real airports, two fictitious flight routes, and
+The data represents two real airports, two fictitious flight routes, and
fictitious lightning reports. You don't need to use all of
these files. Feel free to work with as many files as you'd like, or use valid GeoJSON
files of your own.
@@ -47,12 +47,12 @@ image::maps/images/fu_gs_new_england_map.png[]
For each GeoJSON file you downloaded, complete the following steps:
. Below the map legend, click *Add layer*.
-. From the list of layer types, click *Upload GeoJSON vector file*.
+. From the list of layer types, click *Uploaded GeoJSON*.
. Using the File Picker, upload the GeoJSON file.
+
-Depending on the geometry type of your features, this will
+Depending on the geometry type of your features, this will
auto-populate *Index type* with either {ref}/geo-point.html[geo_point] or
- {ref}/geo-shape.html[geo_shape] and *Index name* with
+ {ref}/geo-shape.html[geo_shape] and *Index name* with
``.
. Click *Import file* in the lower right.
@@ -60,7 +60,7 @@ auto-populate *Index type* with either {ref}/geo-point.html[geo_point] or
You'll see activity as the GeoJSON Upload utility creates a new index
and index pattern for the data set. When the process is complete, you should
receive messages that the creation of the new index and index pattern
-were successful.
+were successful.
. Click *Add layer* in the bottom right.
@@ -69,7 +69,7 @@ were successful.
. Once you've added all of the sample files,
<>.
+
-At this point, you could consider the map complete,
+At this point, you could consider the map complete,
but there are a few additions and tweaks that you can make to tell a
better story with your data.
+
@@ -80,18 +80,18 @@ image::maps/images/fu_gs_flight_paths.png[]
=== Add a heatmap aggregation layer
Looking at the `Lightning detected` layer, it's clear where lightning has
-struck. What's less clear, is if there have been more lightning
-strikes in some areas than others, in other words, where the lightning
+struck. What's less clear, is if there have been more lightning
+strikes in some areas than others, in other words, where the lightning
hot spots are. An advantage of having indexed
-{ref}/geo-point.html[geo_point] data for the
-lightning strikes is that you can perform aggregations on the data.
+{ref}/geo-point.html[geo_point] data for the
+lightning strikes is that you can perform aggregations on the data.
. Below the map legend, click *Add layer*.
. From the list of layer types, click *Grid aggregation*.
+
-Because you indexed `lightning_detected.geojson` using the index name and
+Because you indexed `lightning_detected.geojson` using the index name and
pattern `lightning_detected`, that data is available as a {ref}/geo-point.html[geo_point]
-aggregation.
+aggregation.
. Select `lightning_detected`.
. Click *Show as* and select `heat map`.
@@ -99,15 +99,15 @@ aggregation.
"Lightning intensity".
+
The remaining default settings are good, but there are a couple of
-settings that you might want to change.
+settings that you might want to change.
-. Under *Source settings* > *Grid resolution*, select from the different heat map resolutions.
+. Under *Source settings* > *Grid resolution*, select from the different heat map resolutions.
+
The default "Coarse" looks
good, but feel free to select a different resolution.
. Play around with the *Layer Style* >
-*Color range* setting.
+*Color range* setting.
+
Again the default looks good, but feel free to choose a
different color range.
@@ -125,14 +125,14 @@ image::maps/images/fu_gs_lightning_intensity.png[]
=== Organize the layers
Consider ways you might improve the appearance of the final map.
-Small changes in how and when layers are shown can help tell a
+Small changes in how and when layers are shown can help tell a
better story with your data. Here are a few final tweaks
you might make:
* Update layer names
* Adjust styles for each layer
* Adjust the layer order
-* Decide which layers to show at different zoom levels
+* Decide which layers to show at different zoom levels
When you've finished, again be sure to <>.
diff --git a/docs/maps/maps-getting-started.asciidoc b/docs/maps/maps-getting-started.asciidoc
index f6db2f0fff21..88ad6a26d369 100644
--- a/docs/maps/maps-getting-started.asciidoc
+++ b/docs/maps/maps-getting-started.asciidoc
@@ -65,7 +65,7 @@ and lighter shades symbolize countries with less traffic.
==== Add a vector layer from the Elastic Maps Service source
. In the map legend, click *Add layer*.
-. Click the *Vector shapes* data source.
+. Click the *EMS Boundaries* data source.
. From the *Layer* dropdown menu, select *World Countries*.
. Click the *Add layer* button.
. Set *Layer name* to `Total Requests by Country`.
diff --git a/package.json b/package.json
index ffd0e9387809..a0a98e0f75b0 100644
--- a/package.json
+++ b/package.json
@@ -85,7 +85,8 @@
"**/typescript": "3.5.3",
"**/graphql-toolkit/lodash": "^4.17.13",
"**/isomorphic-git/**/base64-js": "^1.2.1",
- "**/babel-plugin-inline-react-svg/svgo/js-yaml": "^3.13.1"
+ "**/babel-plugin-inline-react-svg/svgo/js-yaml": "^3.13.1",
+ "**/image-diff/gm/debug": "^2.6.9"
},
"workspaces": {
"packages": [
@@ -106,7 +107,7 @@
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/register": "^7.5.5",
- "@elastic/charts": "^13.5.4",
+ "@elastic/charts": "^13.5.7",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/eui": "14.5.0",
@@ -159,7 +160,7 @@
"elasticsearch": "^16.4.0",
"elasticsearch-browser": "^16.4.0",
"encode-uri-query": "1.0.1",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"expiry-js": "0.1.7",
"file-loader": "4.2.0",
"font-awesome": "4.7.0",
@@ -275,7 +276,7 @@
"@elastic/eslint-config-kibana": "0.15.0",
"@elastic/eslint-plugin-eui": "0.0.2",
"@elastic/github-checks-reporter": "0.0.20b3",
- "@elastic/makelogs": "^4.5.0",
+ "@elastic/makelogs": "^5.0.0",
"@kbn/dev-utils": "1.0.0",
"@kbn/es": "1.0.0",
"@kbn/eslint-import-resolver-kibana": "2.0.0",
@@ -302,7 +303,6 @@
"@types/elasticsearch": "^5.0.33",
"@types/enzyme": "^3.9.0",
"@types/eslint": "^6.1.2",
- "@types/execa": "^0.9.0",
"@types/fetch-mock": "^7.3.1",
"@types/getopts": "^2.0.1",
"@types/glob": "^7.1.1",
diff --git a/packages/kbn-dev-utils/package.json b/packages/kbn-dev-utils/package.json
index 5c64be294f70..c1f632719c48 100644
--- a/packages/kbn-dev-utils/package.json
+++ b/packages/kbn-dev-utils/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"chalk": "^2.4.2",
"dedent": "^0.7.0",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"exit-hook": "^2.2.0",
"getopts": "^2.2.5",
"moment": "^2.20.1",
diff --git a/packages/kbn-dev-utils/src/proc_runner/proc.ts b/packages/kbn-dev-utils/src/proc_runner/proc.ts
index f29fb5f4b17f..dab69de47af6 100644
--- a/packages/kbn-dev-utils/src/proc_runner/proc.ts
+++ b/packages/kbn-dev-utils/src/proc_runner/proc.ts
@@ -87,6 +87,7 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) {
cwd,
env,
stdio: ['pipe', 'pipe', 'pipe'],
+ preferLocal: true,
});
if (stdin) {
diff --git a/packages/kbn-es-query/src/filters/__tests__/phrase.js b/packages/kbn-es-query/src/filters/__tests__/phrase.js
index 6b611fdf074f..dbd794a018d9 100644
--- a/packages/kbn-es-query/src/filters/__tests__/phrase.js
+++ b/packages/kbn-es-query/src/filters/__tests__/phrase.js
@@ -39,11 +39,8 @@ describe('Filter Manager', function () {
it('should return a match query filter when passed a standard field', function () {
const field = getField(indexPattern, 'bytes');
expected.query = {
- match: {
- bytes: {
- query: 5,
- type: 'phrase'
- }
+ match_phrase: {
+ bytes: 5
}
};
expect(buildPhraseFilter(field, 5, indexPattern)).to.eql(expected);
diff --git a/packages/kbn-es-query/src/filters/lib/index.ts b/packages/kbn-es-query/src/filters/lib/index.ts
index d4948677a48a..ea0239871034 100644
--- a/packages/kbn-es-query/src/filters/lib/index.ts
+++ b/packages/kbn-es-query/src/filters/lib/index.ts
@@ -25,7 +25,13 @@ import { CustomFilter } from './custom_filter';
import { ExistsFilter, isExistsFilter } from './exists_filter';
import { GeoBoundingBoxFilter, isGeoBoundingBoxFilter } from './geo_bounding_box_filter';
import { GeoPolygonFilter, isGeoPolygonFilter } from './geo_polygon_filter';
-import { PhraseFilter, isPhraseFilter, isScriptedPhraseFilter } from './phrase_filter';
+import {
+ PhraseFilter,
+ isPhraseFilter,
+ isScriptedPhraseFilter,
+ getPhraseFilterField,
+ getPhraseFilterValue,
+} from './phrase_filter';
import { PhrasesFilter, isPhrasesFilter } from './phrases_filter';
import { QueryStringFilter, isQueryStringFilter } from './query_string_filter';
import {
@@ -48,6 +54,8 @@ export {
PhraseFilter,
isPhraseFilter,
isScriptedPhraseFilter,
+ getPhraseFilterField,
+ getPhraseFilterValue,
PhrasesFilter,
isPhrasesFilter,
QueryStringFilter,
diff --git a/packages/kbn-es-query/src/filters/lib/phrase_filter.ts b/packages/kbn-es-query/src/filters/lib/phrase_filter.ts
index d2f2e8bc1cca..124a5da37248 100644
--- a/packages/kbn-es-query/src/filters/lib/phrase_filter.ts
+++ b/packages/kbn-es-query/src/filters/lib/phrase_filter.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { get } from 'lodash';
+import { get, isPlainObject } from 'lodash';
import { Filter, FilterMeta } from './meta_filter';
export type PhraseFilterMeta = FilterMeta & {
@@ -36,8 +36,30 @@ export type PhraseFilter = Filter & {
meta: PhraseFilterMeta;
};
-export const isPhraseFilter = (filter: any): filter is PhraseFilter =>
- filter && (filter.query && filter.query.match);
+type PhraseFilterValue = string | number | boolean;
+
+export const isPhraseFilter = (filter: any): filter is PhraseFilter => {
+ const isMatchPhraseQuery = filter && filter.query && filter.query.match_phrase;
+
+ const isDeprecatedMatchPhraseQuery =
+ filter &&
+ filter.query &&
+ filter.query.match &&
+ Object.values(filter.query.match).find((params: any) => params.type === 'phrase');
+
+ return !!(isMatchPhraseQuery || isDeprecatedMatchPhraseQuery);
+};
export const isScriptedPhraseFilter = (filter: any): filter is PhraseFilter =>
Boolean(get(filter, 'script.script.params.value'));
+
+export const getPhraseFilterField = (filter: PhraseFilter) => {
+ const queryConfig = filter.query.match_phrase || filter.query.match;
+ return Object.keys(queryConfig)[0];
+};
+
+export const getPhraseFilterValue = (filter: PhraseFilter): PhraseFilterValue => {
+ const queryConfig = filter.query.match_phrase || filter.query.match;
+ const queryValue = Object.values(queryConfig)[0] as any;
+ return isPlainObject(queryValue) ? queryValue.query : queryValue;
+};
diff --git a/packages/kbn-es-query/src/filters/phrase.js b/packages/kbn-es-query/src/filters/phrase.js
index 032ad9d84c1f..f0134f289ad9 100644
--- a/packages/kbn-es-query/src/filters/phrase.js
+++ b/packages/kbn-es-query/src/filters/phrase.js
@@ -26,11 +26,8 @@ export function buildPhraseFilter(field, value, indexPattern) {
filter.script = getPhraseScript(field, value);
filter.meta.field = field.name;
} else {
- filter.query = { match: {} };
- filter.query.match[field.name] = {
- query: convertedValue,
- type: 'phrase'
- };
+ filter.query = { match_phrase: {} };
+ filter.query.match_phrase[field.name] = convertedValue;
}
return filter;
}
diff --git a/packages/kbn-es/package.json b/packages/kbn-es/package.json
index 5280c671450f..cf98f6062ddd 100644
--- a/packages/kbn-es/package.json
+++ b/packages/kbn-es/package.json
@@ -11,7 +11,7 @@
"chalk": "^2.4.2",
"dedent": "^0.7.0",
"del": "^4.1.1",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"getopts": "^2.2.4",
"glob": "^7.1.2",
"node-fetch": "^2.6.0",
diff --git a/packages/kbn-plugin-generator/package.json b/packages/kbn-plugin-generator/package.json
index 74ccbd8e758b..ac98a0e675fb 100644
--- a/packages/kbn-plugin-generator/package.json
+++ b/packages/kbn-plugin-generator/package.json
@@ -6,7 +6,7 @@
"dependencies": {
"chalk": "^2.4.2",
"dedent": "^0.7.0",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"getopts": "^2.2.4",
"lodash.camelcase": "^4.3.0",
"lodash.kebabcase": "^4.1.1",
diff --git a/packages/kbn-plugin-helpers/package.json b/packages/kbn-plugin-helpers/package.json
index 215963c0769b..1b8247c3f756 100644
--- a/packages/kbn-plugin-helpers/package.json
+++ b/packages/kbn-plugin-helpers/package.json
@@ -17,7 +17,7 @@
"argv-split": "^2.0.1",
"commander": "^3.0.0",
"del": "^4.1.1",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"globby": "^8.0.1",
"gulp-babel": "^8.0.0",
"gulp-rename": "1.4.0",
diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js
index f52c194cfee6..3834ad4c92d5 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__(404);
+/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(412);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildProductionProjects"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; });
@@ -105,10 +105,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Project", function() { return _utils_project__WEBPACK_IMPORTED_MODULE_3__["Project"]; });
-/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(163);
+/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(171);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "copyWorkspacePackages", function() { return _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__["copyWorkspacePackages"]; });
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(164);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(172);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; });
/*
@@ -152,7 +152,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
-/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(394);
+/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(402);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
@@ -2502,9 +2502,9 @@ module.exports = require("path");
__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__(18);
-/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(165);
-/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192);
-/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(193);
+/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173);
+/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
+/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -4415,7 +4415,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53);
/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54);
-/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(163);
+/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(171);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -19082,9 +19082,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(122);
/* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150);
+/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(158);
/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(log_symbols__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(155);
+/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(163);
/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__);
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; }
@@ -19124,7 +19124,8 @@ function generateColors() {
function spawn(command, args, opts) {
return execa__WEBPACK_IMPORTED_MODULE_1___default()(command, args, _objectSpread({
- stdio: 'inherit'
+ stdio: 'inherit',
+ preferLocal: true
}, opts));
}
const nextColor = generateColors();
@@ -19132,7 +19133,8 @@ function spawnStreaming(command, args, opts, {
prefix
}) {
const spawned = execa__WEBPACK_IMPORTED_MODULE_1___default()(command, args, _objectSpread({
- stdio: ['ignore', 'pipe', 'pipe']
+ stdio: ['ignore', 'pipe', 'pipe'],
+ preferLocal: true
}, opts));
const color = nextColor();
const prefixedStdout = strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default()({
@@ -19156,363 +19158,258 @@ function spawnStreaming(command, args, opts, {
const path = __webpack_require__(16);
const childProcess = __webpack_require__(123);
const crossSpawn = __webpack_require__(124);
-const stripEof = __webpack_require__(139);
-const npmRunPath = __webpack_require__(140);
-const isStream = __webpack_require__(142);
-const _getStream = __webpack_require__(143);
-const pFinally = __webpack_require__(147);
-const onExit = __webpack_require__(110);
-const errname = __webpack_require__(148);
-const stdio = __webpack_require__(149);
-
-const TEN_MEGABYTES = 1000 * 1000 * 10;
+const stripFinalNewline = __webpack_require__(137);
+const npmRunPath = __webpack_require__(138);
+const onetime = __webpack_require__(139);
+const makeError = __webpack_require__(141);
+const normalizeStdio = __webpack_require__(146);
+const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __webpack_require__(147);
+const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __webpack_require__(149);
+const {mergePromise, getSpawnedPromise} = __webpack_require__(156);
+const {joinCommand, parseCommand} = __webpack_require__(157);
-function handleArgs(cmd, args, opts) {
- let parsed;
+const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
- opts = Object.assign({
- extendEnv: true,
- env: {}
- }, opts);
+const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
+ const env = extendEnv ? {...process.env, ...envOption} : envOption;
- if (opts.extendEnv) {
- opts.env = Object.assign({}, process.env, opts.env);
+ if (preferLocal) {
+ return npmRunPath.env({env, cwd: localDir, execPath});
}
- if (opts.__winShell === true) {
- delete opts.__winShell;
- parsed = {
- command: cmd,
- args,
- options: opts,
- file: cmd,
- original: {
- cmd,
- args
- }
- };
- } else {
- parsed = crossSpawn._parse(cmd, args, opts);
- }
+ return env;
+};
- opts = Object.assign({
- maxBuffer: TEN_MEGABYTES,
+const handleArgs = (file, args, options = {}) => {
+ const parsed = crossSpawn._parse(file, args, options);
+ file = parsed.command;
+ args = parsed.args;
+ options = parsed.options;
+
+ options = {
+ maxBuffer: DEFAULT_MAX_BUFFER,
buffer: true,
- stripEof: true,
- preferLocal: true,
- localDir: parsed.options.cwd || process.cwd(),
+ stripFinalNewline: true,
+ extendEnv: true,
+ preferLocal: false,
+ localDir: options.cwd || process.cwd(),
+ execPath: process.execPath,
encoding: 'utf8',
reject: true,
- cleanup: true
- }, parsed.options);
-
- opts.stdio = stdio(opts);
-
- if (opts.preferLocal) {
- opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir}));
- }
-
- if (opts.detached) {
- // #115
- opts.cleanup = false;
- }
-
- if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') {
- // #116
- parsed.args.unshift('/q');
- }
-
- return {
- cmd: parsed.command,
- args: parsed.args,
- opts,
- parsed
+ cleanup: true,
+ all: false,
+ ...options,
+ windowsHide: true
};
-}
-
-function handleInput(spawned, input) {
- if (input === null || input === undefined) {
- return;
- }
-
- if (isStream(input)) {
- input.pipe(spawned.stdin);
- } else {
- spawned.stdin.end(input);
- }
-}
-
-function handleOutput(opts, val) {
- if (val && opts.stripEof) {
- val = stripEof(val);
- }
-
- return val;
-}
-
-function handleShell(fn, cmd, opts) {
- let file = '/bin/sh';
- let args = ['-c', cmd];
-
- opts = Object.assign({}, opts);
-
- if (process.platform === 'win32') {
- opts.__winShell = true;
- file = process.env.comspec || 'cmd.exe';
- args = ['/s', '/c', `"${cmd}"`];
- opts.windowsVerbatimArguments = true;
- }
-
- if (opts.shell) {
- file = opts.shell;
- delete opts.shell;
- }
- return fn(file, args, opts);
-}
-
-function getStream(process, stream, {encoding, buffer, maxBuffer}) {
- if (!process[stream]) {
- return null;
- }
+ options.env = getEnv(options);
- let ret;
+ options.stdio = normalizeStdio(options);
- if (!buffer) {
- // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10
- ret = new Promise((resolve, reject) => {
- process[stream]
- .once('end', resolve)
- .once('error', reject);
- });
- } else if (encoding) {
- ret = _getStream(process[stream], {
- encoding,
- maxBuffer
- });
- } else {
- ret = _getStream.buffer(process[stream], {maxBuffer});
+ if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {
+ // #116
+ args.unshift('/q');
}
- return ret.catch(err => {
- err.stream = stream;
- err.message = `${stream} ${err.message}`;
- throw err;
- });
-}
-
-function makeError(result, options) {
- const {stdout, stderr} = result;
-
- let err = result.error;
- const {code, signal} = result;
-
- const {parsed, joinedCmd} = options;
- const timedOut = options.timedOut || false;
-
- if (!err) {
- let output = '';
-
- if (Array.isArray(parsed.opts.stdio)) {
- if (parsed.opts.stdio[2] !== 'inherit') {
- output += output.length > 0 ? stderr : `\n${stderr}`;
- }
-
- if (parsed.opts.stdio[1] !== 'inherit') {
- output += `\n${stdout}`;
- }
- } else if (parsed.opts.stdio !== 'inherit') {
- output = `\n${stderr}${stdout}`;
- }
+ return {file, args, options, parsed};
+};
- err = new Error(`Command failed: ${joinedCmd}${output}`);
- err.code = code < 0 ? errname(code) : code;
+const handleOutput = (options, value, error) => {
+ if (typeof value !== 'string' && !Buffer.isBuffer(value)) {
+ // When `execa.sync()` errors, we normalize it to '' to mimic `execa()`
+ return error === undefined ? undefined : '';
}
- err.stdout = stdout;
- err.stderr = stderr;
- err.failed = true;
- err.signal = signal || null;
- err.cmd = joinedCmd;
- err.timedOut = timedOut;
-
- return err;
-}
-
-function joinCmd(cmd, args) {
- let joinedCmd = cmd;
-
- if (Array.isArray(args) && args.length > 0) {
- joinedCmd += ' ' + args.join(' ');
+ if (options.stripFinalNewline) {
+ return stripFinalNewline(value);
}
- return joinedCmd;
-}
+ return value;
+};
-module.exports = (cmd, args, opts) => {
- const parsed = handleArgs(cmd, args, opts);
- const {encoding, buffer, maxBuffer} = parsed.opts;
- const joinedCmd = joinCmd(cmd, args);
+const execa = (file, args, options) => {
+ const parsed = handleArgs(file, args, options);
+ const command = joinCommand(file, args);
let spawned;
try {
- spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts);
- } catch (err) {
- return Promise.reject(err);
- }
-
- let removeExitHandler;
- if (parsed.opts.cleanup) {
- removeExitHandler = onExit(() => {
- spawned.kill();
- });
- }
-
- let timeoutId = null;
- let timedOut = false;
-
- const cleanup = () => {
- if (timeoutId) {
- clearTimeout(timeoutId);
- timeoutId = null;
- }
-
- if (removeExitHandler) {
- removeExitHandler();
- }
- };
-
- if (parsed.opts.timeout > 0) {
- timeoutId = setTimeout(() => {
- timeoutId = null;
- timedOut = true;
- spawned.kill(parsed.opts.killSignal);
- }, parsed.opts.timeout);
+ spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
+ } catch (error) {
+ // Ensure the returned error is always both a promise and a child process
+ const dummySpawned = new childProcess.ChildProcess();
+ const errorPromise = Promise.reject(makeError({
+ error,
+ stdout: '',
+ stderr: '',
+ all: '',
+ command,
+ parsed,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ }));
+ return mergePromise(dummySpawned, errorPromise);
}
- const processDone = new Promise(resolve => {
- spawned.on('exit', (code, signal) => {
- cleanup();
- resolve({code, signal});
- });
-
- spawned.on('error', err => {
- cleanup();
- resolve({error: err});
- });
-
- if (spawned.stdin) {
- spawned.stdin.on('error', err => {
- cleanup();
- resolve({error: err});
- });
- }
- });
+ const spawnedPromise = getSpawnedPromise(spawned);
+ const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
+ const processDone = setExitHandler(spawned, parsed.options, timedPromise);
- function destroy() {
- if (spawned.stdout) {
- spawned.stdout.destroy();
- }
+ const context = {isCanceled: false};
- if (spawned.stderr) {
- spawned.stderr.destroy();
- }
- }
+ spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
+ spawned.cancel = spawnedCancel.bind(null, spawned, context);
- const handlePromise = () => pFinally(Promise.all([
- processDone,
- getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}),
- getStream(spawned, 'stderr', {encoding, buffer, maxBuffer})
- ]).then(arr => {
- const result = arr[0];
- result.stdout = arr[1];
- result.stderr = arr[2];
+ const handlePromise = async () => {
+ const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
+ const stdout = handleOutput(parsed.options, stdoutResult);
+ const stderr = handleOutput(parsed.options, stderrResult);
+ const all = handleOutput(parsed.options, allResult);
- if (result.error || result.code !== 0 || result.signal !== null) {
- const err = makeError(result, {
- joinedCmd,
+ if (error || exitCode !== 0 || signal !== null) {
+ const returnedError = makeError({
+ error,
+ exitCode,
+ signal,
+ stdout,
+ stderr,
+ all,
+ command,
parsed,
- timedOut
+ timedOut,
+ isCanceled: context.isCanceled,
+ killed: spawned.killed
});
- // TODO: missing some timeout logic for killed
- // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203
- // err.killed = spawned.killed || killed;
- err.killed = err.killed || spawned.killed;
-
- if (!parsed.opts.reject) {
- return err;
+ if (!parsed.options.reject) {
+ return returnedError;
}
- throw err;
+ throw returnedError;
}
return {
- stdout: handleOutput(parsed.opts, result.stdout),
- stderr: handleOutput(parsed.opts, result.stderr),
- code: 0,
+ command,
+ exitCode: 0,
+ stdout,
+ stderr,
+ all,
failed: false,
- killed: false,
- signal: null,
- cmd: joinedCmd,
- timedOut: false
+ timedOut: false,
+ isCanceled: false,
+ killed: false
};
- }), destroy);
+ };
+
+ const handlePromiseOnce = onetime(handlePromise);
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
- handleInput(spawned, parsed.opts.input);
+ handleInput(spawned, parsed.options.input);
- spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);
- spawned.catch = onrejected => handlePromise().catch(onrejected);
+ spawned.all = makeAllStream(spawned, parsed.options);
- return spawned;
+ return mergePromise(spawned, handlePromiseOnce);
};
-// TODO: set `stderr: 'ignore'` when that option is implemented
-module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout);
+module.exports = execa;
-// TODO: set `stdout: 'ignore'` when that option is implemented
-module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr);
+module.exports.sync = (file, args, options) => {
+ const parsed = handleArgs(file, args, options);
+ const command = joinCommand(file, args);
-module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts);
+ validateInputSync(parsed.options);
-module.exports.sync = (cmd, args, opts) => {
- const parsed = handleArgs(cmd, args, opts);
- const joinedCmd = joinCmd(cmd, args);
-
- if (isStream(parsed.opts.input)) {
- throw new TypeError('The `input` option cannot be a stream in sync mode');
+ let result;
+ try {
+ result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
+ } catch (error) {
+ throw makeError({
+ error,
+ stdout: '',
+ stderr: '',
+ all: '',
+ command,
+ parsed,
+ timedOut: false,
+ isCanceled: false,
+ killed: false
+ });
}
- const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
- result.code = result.status;
+ const stdout = handleOutput(parsed.options, result.stdout, result.error);
+ const stderr = handleOutput(parsed.options, result.stderr, result.error);
if (result.error || result.status !== 0 || result.signal !== null) {
- const err = makeError(result, {
- joinedCmd,
- parsed
+ const error = makeError({
+ stdout,
+ stderr,
+ error: result.error,
+ signal: result.signal,
+ exitCode: result.status,
+ command,
+ parsed,
+ timedOut: result.error && result.error.code === 'ETIMEDOUT',
+ isCanceled: false,
+ killed: result.signal !== null
});
- if (!parsed.opts.reject) {
- return err;
+ if (!parsed.options.reject) {
+ return error;
}
- throw err;
+ throw error;
}
return {
- stdout: handleOutput(parsed.opts, result.stdout),
- stderr: handleOutput(parsed.opts, result.stderr),
- code: 0,
+ command,
+ exitCode: 0,
+ stdout,
+ stderr,
failed: false,
- signal: null,
- cmd: joinedCmd,
- timedOut: false
+ timedOut: false,
+ isCanceled: false,
+ killed: false
};
};
-module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);
+module.exports.command = (command, options) => {
+ const [file, ...args] = parseCommand(command);
+ return execa(file, args, options);
+};
+
+module.exports.commandSync = (command, options) => {
+ const [file, ...args] = parseCommand(command);
+ return execa.sync(file, args, options);
+};
+
+module.exports.node = (scriptPath, args, options = {}) => {
+ if (args && !Array.isArray(args) && typeof args === 'object') {
+ options = args;
+ args = [];
+ }
+
+ const stdio = normalizeStdio.node(options);
+
+ const {nodePath = process.execPath, nodeOptions = process.execArgv} = options;
+
+ return execa(
+ nodePath,
+ [
+ ...nodeOptions,
+ scriptPath,
+ ...(Array.isArray(args) ? args : [])
+ ],
+ {
+ ...options,
+ stdin: undefined,
+ stdout: undefined,
+ stderr: undefined,
+ stdio,
+ shell: false
+ }
+ );
+};
/***/ }),
@@ -19530,7 +19427,7 @@ module.exports = require("child_process");
const cp = __webpack_require__(123);
const parse = __webpack_require__(125);
-const enoent = __webpack_require__(138);
+const enoent = __webpack_require__(136);
function spawn(command, args, options) {
// Parse the arguments
@@ -19575,19 +19472,14 @@ module.exports._enoent = enoent;
const path = __webpack_require__(16);
-const niceTry = __webpack_require__(126);
-const resolveCommand = __webpack_require__(127);
-const escape = __webpack_require__(133);
-const readShebang = __webpack_require__(134);
-const semver = __webpack_require__(137);
+const resolveCommand = __webpack_require__(126);
+const escape = __webpack_require__(132);
+const readShebang = __webpack_require__(133);
const isWin = process.platform === 'win32';
const isExecutableRegExp = /\.(?:com|exe)$/i;
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
-// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
-const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false;
-
function detectShebang(parsed) {
parsed.file = resolveCommand(parsed);
@@ -19641,35 +19533,6 @@ function parseNonShell(parsed) {
return parsed;
}
-function parseShell(parsed) {
- // If node supports the shell option, there's no need to mimic its behavior
- if (supportsShellOption) {
- return parsed;
- }
-
- // Mimic node shell option
- // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
- const shellCommand = [parsed.command].concat(parsed.args).join(' ');
-
- if (isWin) {
- parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
- parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
- parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
- } else {
- if (typeof parsed.options.shell === 'string') {
- parsed.command = parsed.options.shell;
- } else if (process.platform === 'android') {
- parsed.command = '/system/bin/sh';
- } else {
- parsed.command = '/bin/sh';
- }
-
- parsed.args = ['-c', shellCommand];
- }
-
- return parsed;
-}
-
function parse(command, args, options) {
// Normalize arguments, similar to nodejs
if (args && !Array.isArray(args)) {
@@ -19693,7 +19556,7 @@ function parse(command, args, options) {
};
// Delegate further parsing to shell or non-shell
- return options.shell ? parseShell(parsed) : parseNonShell(parsed);
+ return options.shell ? parsed : parseNonShell(parsed);
}
module.exports = parse;
@@ -19706,36 +19569,19 @@ module.exports = parse;
"use strict";
-/**
- * Tries to execute a function and discards any error that occurs.
- * @param {Function} fn - Function that might or might not throw an error.
- * @returns {?*} Return-value of the function when no error occurred.
- */
-module.exports = function(fn) {
-
- try { return fn() }
- catch (e) {}
-
-}
-
-/***/ }),
-/* 127 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
const path = __webpack_require__(16);
-const which = __webpack_require__(128);
-const pathKey = __webpack_require__(132)();
+const which = __webpack_require__(127);
+const pathKey = __webpack_require__(131)();
function resolveCommandAttempt(parsed, withoutPathExt) {
const cwd = process.cwd();
const hasCustomCwd = parsed.options.cwd != null;
+ // Worker threads do not have process.chdir()
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
// 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
- if (hasCustomCwd) {
+ if (shouldSwitchCwd) {
try {
process.chdir(parsed.options.cwd);
} catch (err) {
@@ -19753,7 +19599,9 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
} catch (e) {
/* Empty */
} finally {
- process.chdir(cwd);
+ if (shouldSwitchCwd) {
+ process.chdir(cwd);
+ }
}
// If we successfully resolved, ensure that an absolute path is returned
@@ -19773,126 +19621,113 @@ module.exports = resolveCommand;
/***/ }),
-/* 128 */
+/* 127 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = which
-which.sync = whichSync
-
-var isWindows = process.platform === 'win32' ||
+const isWindows = process.platform === 'win32' ||
process.env.OSTYPE === 'cygwin' ||
process.env.OSTYPE === 'msys'
-var path = __webpack_require__(16)
-var COLON = isWindows ? ';' : ':'
-var isexe = __webpack_require__(129)
-
-function getNotFoundError (cmd) {
- var er = new Error('not found: ' + cmd)
- er.code = 'ENOENT'
+const path = __webpack_require__(16)
+const COLON = isWindows ? ';' : ':'
+const isexe = __webpack_require__(128)
- return er
-}
+const getNotFoundError = (cmd) =>
+ Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
-function getPathInfo (cmd, opt) {
- var colon = opt.colon || COLON
- var pathEnv = opt.path || process.env.PATH || ''
- var pathExt = ['']
+const getPathInfo = (cmd, opt) => {
+ const colon = opt.colon || COLON
- pathEnv = pathEnv.split(colon)
+ // If it has a slash, then we don't bother searching the pathenv.
+ // just check the file itself, and that's it.
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
+ : (
+ [
+ // windows always checks the cwd first
+ ...(isWindows ? [process.cwd()] : []),
+ ...(opt.path || process.env.PATH ||
+ /* istanbul ignore next: very unusual */ '').split(colon),
+ ]
+ )
+ const pathExtExe = isWindows
+ ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
+ : ''
+ const pathExt = isWindows ? pathExtExe.split(colon) : ['']
- var pathExtExe = ''
if (isWindows) {
- pathEnv.unshift(process.cwd())
- pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
- pathExt = pathExtExe.split(colon)
-
-
- // Always test the cmd itself first. isexe will check to make sure
- // it's found in the pathExt set.
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
pathExt.unshift('')
}
- // If it has a slash, then we don't bother searching the pathenv.
- // just check the file itself, and that's it.
- if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
- pathEnv = ['']
-
return {
- env: pathEnv,
- ext: pathExt,
- extExe: pathExtExe
+ pathEnv,
+ pathExt,
+ pathExtExe,
}
}
-function which (cmd, opt, cb) {
+const which = (cmd, opt, cb) => {
if (typeof opt === 'function') {
cb = opt
opt = {}
}
+ if (!opt)
+ opt = {}
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
- ;(function F (i, l) {
- if (i === l) {
- if (opt.all && found.length)
- return cb(null, found)
- else
- return cb(getNotFoundError(cmd))
- }
+ const step = i => new Promise((resolve, reject) => {
+ if (i === pathEnv.length)
+ return opt.all && found.length ? resolve(found)
+ : reject(getNotFoundError(cmd))
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
- var p = path.join(pathPart, cmd)
- if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- ;(function E (ii, ll) {
- if (ii === ll) return F(i + 1, l)
- var ext = pathExt[ii]
- isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
- if (!er && is) {
- if (opt.all)
- found.push(p + ext)
- else
- return cb(null, p + ext)
- }
- return E(ii + 1, ll)
- })
- })(0, pathExt.length)
- })(0, pathEnv.length)
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
+
+ resolve(subStep(p, i, 0))
+ })
+
+ const subStep = (p, i, ii) => new Promise((resolve, reject) => {
+ if (ii === pathExt.length)
+ return resolve(step(i + 1))
+ const ext = pathExt[ii]
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
+ if (!er && is) {
+ if (opt.all)
+ found.push(p + ext)
+ else
+ return resolve(p + ext)
+ }
+ return resolve(subStep(p, i, ii + 1))
+ })
+ })
+
+ return cb ? step(0).then(res => cb(null, res), cb) : step(0)
}
-function whichSync (cmd, opt) {
+const whichSync = (cmd, opt) => {
opt = opt || {}
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
- for (var i = 0, l = pathEnv.length; i < l; i ++) {
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
+ for (let i = 0; i < pathEnv.length; i ++) {
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
- var p = path.join(pathPart, cmd)
- if (!pathPart && /^\.[\\\/]/.test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- for (var j = 0, ll = pathExt.length; j < ll; j ++) {
- var cur = p + pathExt[j]
- var is
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
+
+ for (let j = 0; j < pathExt.length; j ++) {
+ const cur = p + pathExt[j]
try {
- is = isexe.sync(cur, { pathExt: pathExtExe })
+ const is = isexe.sync(cur, { pathExt: pathExtExe })
if (is) {
if (opt.all)
found.push(cur)
@@ -19912,17 +19747,20 @@ function whichSync (cmd, opt) {
throw getNotFoundError(cmd)
}
+module.exports = which
+which.sync = whichSync
+
/***/ }),
-/* 129 */
+/* 128 */
/***/ (function(module, exports, __webpack_require__) {
var fs = __webpack_require__(23)
var core
if (process.platform === 'win32' || global.TESTING_WINDOWS) {
- core = __webpack_require__(130)
+ core = __webpack_require__(129)
} else {
- core = __webpack_require__(131)
+ core = __webpack_require__(130)
}
module.exports = isexe
@@ -19977,7 +19815,7 @@ function sync (path, options) {
/***/ }),
-/* 130 */
+/* 129 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = isexe
@@ -20025,7 +19863,7 @@ function sync (path, options) {
/***/ }),
-/* 131 */
+/* 130 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = isexe
@@ -20072,27 +19910,30 @@ function checkMode (stat, options) {
/***/ }),
-/* 132 */
+/* 131 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = opts => {
- opts = opts || {};
- const env = opts.env || process.env;
- const platform = opts.platform || process.platform;
+const pathKey = (options = {}) => {
+ const environment = options.env || process.env;
+ const platform = options.platform || process.platform;
if (platform !== 'win32') {
return 'PATH';
}
- return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || '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;
+
/***/ }),
-/* 133 */
+/* 132 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -20144,28 +19985,19 @@ module.exports.argument = escapeArgument;
/***/ }),
-/* 134 */
+/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(23);
-const shebangCommand = __webpack_require__(135);
+const shebangCommand = __webpack_require__(134);
function readShebang(command) {
// Read the first 150 bytes from the file
const size = 150;
- let buffer;
-
- if (Buffer.alloc) {
- // Node.js v4.5+ / v5.10+
- buffer = Buffer.alloc(size);
- } else {
- // Old Node.js API
- buffer = new Buffer(size);
- buffer.fill(0); // zero-fill
- }
+ const buffer = Buffer.alloc(size);
let fd;
@@ -20183,1560 +20015,1113 @@ module.exports = readShebang;
/***/ }),
-/* 135 */
+/* 134 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var shebangRegex = __webpack_require__(136);
+const shebangRegex = __webpack_require__(135);
-module.exports = function (str) {
- var match = str.match(shebangRegex);
+module.exports = (string = '') => {
+ const match = string.match(shebangRegex);
if (!match) {
return null;
}
- var arr = match[0].replace(/#! ?/, '').split(' ');
- var bin = arr[0].split('/').pop();
- var arg = arr[1];
+ const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
+ const binary = path.split('/').pop();
- return (bin === 'env' ?
- arg :
- bin + (arg ? ' ' + arg : '')
- );
+ if (binary === 'env') {
+ return argument;
+ }
+
+ return argument ? `${binary} ${argument}` : binary;
};
/***/ }),
-/* 136 */
+/* 135 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = /^#!.*/;
+module.exports = /^#!(.*)/;
/***/ }),
-/* 137 */
-/***/ (function(module, exports) {
+/* 136 */
+/***/ (function(module, exports, __webpack_require__) {
-exports = module.exports = SemVer;
+"use strict";
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
+const isWin = process.platform === 'win32';
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+function notFoundError(original, syscall) {
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
+ code: 'ENOENT',
+ errno: 'ENOENT',
+ syscall: `${syscall} ${original.command}`,
+ path: original.command,
+ spawnargs: original.args,
+ });
+}
-// Max safe segment length for coercion.
-var MAX_SAFE_COMPONENT_LENGTH = 16;
+function hookChildProcess(cp, parsed) {
+ if (!isWin) {
+ return;
+ }
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
+ const originalEmit = cp.emit;
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
+ cp.emit = function (name, arg1) {
+ // If emitting "exit" event and exit code is 1, we need to check if
+ // the command exists and emit an "error" instead
+ // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ if (name === 'exit') {
+ const err = verifyENOENT(arg1, parsed, 'spawn');
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
+ if (err) {
+ return originalEmit.call(cp, 'error', err);
+ }
+ }
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+ return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
+ };
+}
+function verifyENOENT(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawn');
+ }
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
+ return null;
+}
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+function verifyENOENTSync(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawnSync');
+ }
+ return null;
+}
-// ## Main Version
-// Three dot-separated numeric identifiers.
+module.exports = {
+ hookChildProcess,
+ verifyENOENT,
+ verifyENOENTSync,
+ notFoundError,
+};
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+/***/ }),
+/* 137 */
+/***/ (function(module, exports, __webpack_require__) {
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
+"use strict";
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
+module.exports = input => {
+ const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
+ const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
+ if (input[input.length - 1] === LF) {
+ input = input.slice(0, input.length - 1);
+ }
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
+ if (input[input.length - 1] === CR) {
+ input = input.slice(0, input.length - 1);
+ }
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+ return input;
+};
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
+/***/ }),
+/* 138 */
+/***/ (function(module, exports, __webpack_require__) {
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+"use strict";
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
+const path = __webpack_require__(16);
+const pathKey = __webpack_require__(131);
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+const npmRunPath = options => {
+ options = {
+ cwd: process.cwd(),
+ path: process.env[pathKey()],
+ execPath: process.execPath,
+ ...options
+ };
+ let previous;
+ let cwdPath = path.resolve(options.cwd);
+ const result = [];
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
+ while (previous !== cwdPath) {
+ result.push(path.join(cwdPath, 'node_modules/.bin'));
+ previous = cwdPath;
+ cwdPath = path.resolve(cwdPath, '..');
+ }
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
+ // Ensure the running `node` binary is used
+ const execPathDir = path.resolve(options.cwd, options.execPath, '..');
+ result.unshift(execPathDir);
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
+ return result.concat(options.path).join(path.delimiter);
+};
-src[FULL] = '^' + FULLPLAIN + '$';
+module.exports = npmRunPath;
+// TODO: Remove this for the next major release
+module.exports.default = npmRunPath;
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
+module.exports.env = options => {
+ options = {
+ env: process.env,
+ ...options
+ };
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
+ const env = {...options.env};
+ const path = pathKey({env});
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
+ options.path = env[path];
+ env[path] = module.exports(options);
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+ return env;
+};
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
+/***/ }),
+/* 139 */
+/***/ (function(module, exports, __webpack_require__) {
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+"use strict";
-// Coercion.
-// Extract anything that could conceivably be a part of a valid semver
-var COERCE = R++;
-src[COERCE] = '(?:^|[^\\d])' +
- '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:$|[^\\d])';
+const mimicFn = __webpack_require__(140);
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
+const calledFunctions = new WeakMap();
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
+const oneTime = (fn, options = {}) => {
+ if (typeof fn !== 'function') {
+ throw new TypeError('Expected a function');
+ }
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+ let ret;
+ let isCalled = false;
+ let callCount = 0;
+ const functionName = fn.displayName || fn.name || '';
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
+ const onetime = function (...args) {
+ calledFunctions.set(onetime, ++callCount);
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
+ if (isCalled) {
+ if (options.throw === true) {
+ throw new Error(`Function \`${functionName}\` can only be called once`);
+ }
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+ return ret;
+ }
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+ isCalled = true;
+ ret = fn.apply(this, args);
+ fn = null;
+ return ret;
+ };
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+ mimicFn(onetime, fn);
+ calledFunctions.set(onetime, callCount);
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
+ return onetime;
+};
+module.exports = oneTime;
+// TODO: Remove this for the next major release
+module.exports.default = oneTime;
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
+module.exports.callCount = fn => {
+ if (!calledFunctions.has(fn)) {
+ throw new Error(`The given function \`${fn.name}\` is not wrapped by the \`onetime\` package`);
+ }
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
+ return calledFunctions.get(fn);
+};
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
+/***/ }),
+/* 140 */
+/***/ (function(module, exports, __webpack_require__) {
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num;
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(new SemVer(b, loose));
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-Comparator.prototype.intersects = function(comp, loose) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError('a Comparator is required');
- }
-
- var rangeTmp;
-
- if (this.operator === '') {
- rangeTmp = new Range(comp.value, loose);
- return satisfies(this.value, rangeTmp, loose);
- } else if (comp.operator === '') {
- rangeTmp = new Range(this.value, loose);
- return satisfies(comp.semver, rangeTmp, loose);
- }
-
- var sameDirectionIncreasing =
- (this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '>=' || comp.operator === '>');
- var sameDirectionDecreasing =
- (this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '<=' || comp.operator === '<');
- var sameSemVer = this.semver.version === comp.semver.version;
- var differentDirectionsInclusive =
- (this.operator === '>=' || this.operator === '<=') &&
- (comp.operator === '>=' || comp.operator === '<=');
- var oppositeDirectionsLessThan =
- cmp(this.semver, '<', comp.semver, loose) &&
- ((this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '<=' || comp.operator === '<'));
- var oppositeDirectionsGreaterThan =
- cmp(this.semver, '>', comp.semver, loose) &&
- ((this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '>=' || comp.operator === '>'));
-
- return sameDirectionIncreasing || sameDirectionDecreasing ||
- (sameSemVer && differentDirectionsInclusive) ||
- oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if (range instanceof Range) {
- if (range.loose === loose) {
- return range;
- } else {
- return new Range(range.raw, loose);
- }
- }
-
- if (range instanceof Comparator) {
- return new Range(range.value, loose);
- }
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-Range.prototype.intersects = function(range, loose) {
- if (!(range instanceof Range)) {
- throw new TypeError('a Range is required');
- }
-
- return this.set.some(function(thisComparators) {
- return thisComparators.every(function(thisComparator) {
- return range.set.some(function(rangeComparators) {
- return rangeComparators.every(function(rangeComparator) {
- return thisComparator.intersects(rangeComparator, loose);
- });
- });
- });
- });
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
+"use strict";
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<';
- if (xm)
- M = +M + 1;
- else
- m = +m + 1;
- }
+const mimicFn = (to, from) => {
+ for (const prop of Reflect.ownKeys(from)) {
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ }
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
+ return to;
+};
- debug('xRange return', ret);
+module.exports = mimicFn;
+// TODO: Remove this for the next major release
+module.exports.default = mimicFn;
- return ret;
- });
-}
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
+/***/ }),
+/* 141 */
+/***/ (function(module, exports, __webpack_require__) {
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
+"use strict";
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
+const {signalsByName} = __webpack_require__(142);
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
+const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {
+ if (timedOut) {
+ return `timed out after ${timeout} milliseconds`;
+ }
- return (from + ' ' + to).trim();
-}
+ if (isCanceled) {
+ return 'was canceled';
+ }
+ if (errorCode !== undefined) {
+ return `failed with ${errorCode}`;
+ }
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
+ if (signal !== undefined) {
+ return `was killed with ${signal} (${signalDescription})`;
+ }
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
+ if (exitCode !== undefined) {
+ return `failed with exit code ${exitCode}`;
+ }
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
+ return 'failed';
};
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
+const makeError = ({
+ stdout,
+ stderr,
+ all,
+ error,
+ signal,
+ exitCode,
+ command,
+ timedOut,
+ isCanceled,
+ killed,
+ parsed: {options: {timeout}}
+}) => {
+ // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.
+ // We normalize them to `undefined`
+ exitCode = exitCode === null ? undefined : exitCode;
+ signal = signal === null ? undefined : signal;
+ const signalDescription = signal === undefined ? undefined : signalsByName[signal].description;
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
+ const errorCode = error && error.code;
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
+ const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});
+ const message = `Command ${prefix}: ${command}`;
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
+ if (error instanceof Error) {
+ error.originalMessage = error.message;
+ error.message = `${message}\n${error.message}`;
+ } else {
+ error = new Error(message);
+ }
- return true;
-}
+ error.command = command;
+ error.exitCode = exitCode;
+ error.signal = signal;
+ error.signalDescription = signalDescription;
+ error.stdout = stdout;
+ error.stderr = stderr;
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
+ if (all !== undefined) {
+ error.all = all;
+ }
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- var max = null;
- var maxSV = null;
- try {
- var rangeObj = new Range(range, loose);
- } catch (er) {
- return null;
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) { // satisfies(v, range, loose)
- if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
- max = v;
- maxSV = new SemVer(max, loose);
- }
- }
- })
- return max;
-}
+ if ('bufferedData' in error) {
+ delete error.bufferedData;
+ }
-exports.minSatisfying = minSatisfying;
-function minSatisfying(versions, range, loose) {
- var min = null;
- var minSV = null;
- try {
- var rangeObj = new Range(range, loose);
- } catch (er) {
- return null;
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) { // satisfies(v, range, loose)
- if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
- min = v;
- minSV = new SemVer(min, loose);
- }
- }
- })
- return min;
-}
+ error.failed = true;
+ error.timedOut = Boolean(timedOut);
+ error.isCanceled = isCanceled;
+ error.killed = killed && !timedOut;
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
+ return error;
+};
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
+module.exports = makeError;
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
+/***/ }),
+/* 142 */
+/***/ (function(module, exports, __webpack_require__) {
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
+"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__webpack_require__(11);
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
+var _signals=__webpack_require__(143);
+var _realtime=__webpack_require__(145);
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
- var high = null;
- var low = null;
+const getSignalsByName=function(){
+const signals=(0,_signals.getSignals)();
+return signals.reduce(getSignalByName,{});
+};
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
+const getSignalByName=function(
+signalByNameMemo,
+{name,number,description,supported,action,forced,standard})
+{
+return{
+...signalByNameMemo,
+[name]:{name,number,description,supported,action,forced,standard}};
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
+};
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
+const signalsByName=getSignalsByName();exports.signalsByName=signalsByName;
-exports.prerelease = prerelease;
-function prerelease(version, loose) {
- var parsed = parse(version, loose);
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
-}
-exports.intersects = intersects;
-function intersects(r1, r2, loose) {
- r1 = new Range(r1, loose)
- r2 = new Range(r2, loose)
- return r1.intersects(r2)
+
+
+const getSignalsByNumber=function(){
+const signals=(0,_signals.getSignals)();
+const length=_realtime.SIGRTMAX+1;
+const signalsA=Array.from({length},(value,number)=>
+getSignalByNumber(number,signals));
+
+return Object.assign({},...signalsA);
+};
+
+const getSignalByNumber=function(number,signals){
+const signal=findSignalByNumber(number,signals);
+
+if(signal===undefined){
+return{};
}
-exports.coerce = coerce;
-function coerce(version) {
- if (version instanceof SemVer)
- return version;
+const{name,description,supported,action,forced,standard}=signal;
+return{
+[number]:{
+name,
+number,
+description,
+supported,
+action,
+forced,
+standard}};
- if (typeof version !== 'string')
- return null;
- var match = version.match(re[COERCE]);
+};
+
- if (match == null)
- return null;
- return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
+const findSignalByNumber=function(number,signals){
+const signal=signals.find(({name})=>_os.constants.signals[name]===number);
+
+if(signal!==undefined){
+return signal;
}
+return signals.find(signalA=>signalA.number===number);
+};
+
+const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber;
+//# sourceMappingURL=main.js.map
/***/ }),
-/* 138 */
+/* 143 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=__webpack_require__(11);
+var _core=__webpack_require__(144);
+var _realtime=__webpack_require__(145);
-const isWin = process.platform === 'win32';
-function notFoundError(original, syscall) {
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
- code: 'ENOENT',
- errno: 'ENOENT',
- syscall: `${syscall} ${original.command}`,
- path: original.command,
- spawnargs: original.args,
- });
-}
-function hookChildProcess(cp, parsed) {
- if (!isWin) {
- return;
- }
+const getSignals=function(){
+const realtimeSignals=(0,_realtime.getRealtimeSignals)();
+const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal);
+return signals;
+};exports.getSignals=getSignals;
- const originalEmit = cp.emit;
- cp.emit = function (name, arg1) {
- // If emitting "exit" event and exit code is 1, we need to check if
- // the command exists and emit an "error" instead
- // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
- if (name === 'exit') {
- const err = verifyENOENT(arg1, parsed, 'spawn');
- if (err) {
- return originalEmit.call(cp, 'error', err);
- }
- }
- return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
- };
-}
-function verifyENOENT(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawn');
- }
- return null;
-}
-function verifyENOENTSync(status, parsed) {
- if (isWin && status === 1 && !parsed.file) {
- return notFoundError(parsed.original, 'spawnSync');
- }
+const normalizeSignal=function({
+name,
+number:defaultNumber,
+description,
+action,
+forced=false,
+standard})
+{
+const{
+signals:{[name]:constantSignal}}=
+_os.constants;
+const supported=constantSignal!==undefined;
+const number=supported?constantSignal:defaultNumber;
+return{name,number,description,supported,action,forced,standard};
+};
+//# sourceMappingURL=signals.js.map
- return null;
-}
+/***/ }),
+/* 144 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.SIGNALS=void 0;
+
+const SIGNALS=[
+{
+name:"SIGHUP",
+number:1,
+action:"terminate",
+description:"Terminal closed",
+standard:"posix"},
+
+{
+name:"SIGINT",
+number:2,
+action:"terminate",
+description:"User interruption with CTRL-C",
+standard:"ansi"},
+
+{
+name:"SIGQUIT",
+number:3,
+action:"core",
+description:"User interruption with CTRL-\\",
+standard:"posix"},
+
+{
+name:"SIGILL",
+number:4,
+action:"core",
+description:"Invalid machine instruction",
+standard:"ansi"},
+
+{
+name:"SIGTRAP",
+number:5,
+action:"core",
+description:"Debugger breakpoint",
+standard:"posix"},
+
+{
+name:"SIGABRT",
+number:6,
+action:"core",
+description:"Aborted",
+standard:"ansi"},
+
+{
+name:"SIGIOT",
+number:6,
+action:"core",
+description:"Aborted",
+standard:"bsd"},
+
+{
+name:"SIGBUS",
+number:7,
+action:"core",
+description:
+"Bus error due to misaligned, non-existing address or paging error",
+standard:"bsd"},
+
+{
+name:"SIGEMT",
+number:7,
+action:"terminate",
+description:"Command should be emulated but is not implemented",
+standard:"other"},
+
+{
+name:"SIGFPE",
+number:8,
+action:"core",
+description:"Floating point arithmetic error",
+standard:"ansi"},
+
+{
+name:"SIGKILL",
+number:9,
+action:"terminate",
+description:"Forced termination",
+standard:"posix",
+forced:true},
+
+{
+name:"SIGUSR1",
+number:10,
+action:"terminate",
+description:"Application-specific signal",
+standard:"posix"},
+
+{
+name:"SIGSEGV",
+number:11,
+action:"core",
+description:"Segmentation fault",
+standard:"ansi"},
+
+{
+name:"SIGUSR2",
+number:12,
+action:"terminate",
+description:"Application-specific signal",
+standard:"posix"},
+
+{
+name:"SIGPIPE",
+number:13,
+action:"terminate",
+description:"Broken pipe or socket",
+standard:"posix"},
+
+{
+name:"SIGALRM",
+number:14,
+action:"terminate",
+description:"Timeout or timer",
+standard:"posix"},
+
+{
+name:"SIGTERM",
+number:15,
+action:"terminate",
+description:"Termination",
+standard:"ansi"},
+
+{
+name:"SIGSTKFLT",
+number:16,
+action:"terminate",
+description:"Stack is empty or overflowed",
+standard:"other"},
+
+{
+name:"SIGCHLD",
+number:17,
+action:"ignore",
+description:"Child process terminated, paused or unpaused",
+standard:"posix"},
+
+{
+name:"SIGCLD",
+number:17,
+action:"ignore",
+description:"Child process terminated, paused or unpaused",
+standard:"other"},
+
+{
+name:"SIGCONT",
+number:18,
+action:"unpause",
+description:"Unpaused",
+standard:"posix",
+forced:true},
+
+{
+name:"SIGSTOP",
+number:19,
+action:"pause",
+description:"Paused",
+standard:"posix",
+forced:true},
+
+{
+name:"SIGTSTP",
+number:20,
+action:"pause",
+description:"Paused using CTRL-Z or \"suspend\"",
+standard:"posix"},
+
+{
+name:"SIGTTIN",
+number:21,
+action:"pause",
+description:"Background process cannot read terminal input",
+standard:"posix"},
+
+{
+name:"SIGBREAK",
+number:21,
+action:"terminate",
+description:"User interruption with CTRL-BREAK",
+standard:"other"},
+
+{
+name:"SIGTTOU",
+number:22,
+action:"pause",
+description:"Background process cannot write to terminal output",
+standard:"posix"},
+
+{
+name:"SIGURG",
+number:23,
+action:"ignore",
+description:"Socket received out-of-band data",
+standard:"bsd"},
+
+{
+name:"SIGXCPU",
+number:24,
+action:"core",
+description:"Process timed out",
+standard:"bsd"},
+
+{
+name:"SIGXFSZ",
+number:25,
+action:"core",
+description:"File too big",
+standard:"bsd"},
+
+{
+name:"SIGVTALRM",
+number:26,
+action:"terminate",
+description:"Timeout or timer",
+standard:"bsd"},
+
+{
+name:"SIGPROF",
+number:27,
+action:"terminate",
+description:"Timeout or timer",
+standard:"bsd"},
+
+{
+name:"SIGWINCH",
+number:28,
+action:"ignore",
+description:"Terminal window size changed",
+standard:"bsd"},
+
+{
+name:"SIGIO",
+number:29,
+action:"terminate",
+description:"I/O is available",
+standard:"other"},
+
+{
+name:"SIGPOLL",
+number:29,
+action:"terminate",
+description:"Watched event",
+standard:"other"},
+
+{
+name:"SIGINFO",
+number:29,
+action:"ignore",
+description:"Request for process information",
+standard:"other"},
+
+{
+name:"SIGPWR",
+number:30,
+action:"terminate",
+description:"Device running out of power",
+standard:"systemv"},
+
+{
+name:"SIGSYS",
+number:31,
+action:"core",
+description:"Invalid system call",
+standard:"other"},
+
+{
+name:"SIGUNUSED",
+number:31,
+action:"terminate",
+description:"Invalid system call",
+standard:"other"}];exports.SIGNALS=SIGNALS;
+//# sourceMappingURL=core.js.map
+
+/***/ }),
+/* 145 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(exports,"__esModule",{value:true});exports.SIGRTMAX=exports.getRealtimeSignals=void 0;
+const getRealtimeSignals=function(){
+const length=SIGRTMAX-SIGRTMIN+1;
+return Array.from({length},getRealtimeSignal);
+};exports.getRealtimeSignals=getRealtimeSignals;
+
+const getRealtimeSignal=function(value,index){
+return{
+name:`SIGRT${index+1}`,
+number:SIGRTMIN+index,
+action:"terminate",
+description:"Application-specific signal (realtime)",
+standard:"posix"};
-module.exports = {
- hookChildProcess,
- verifyENOENT,
- verifyENOENTSync,
- notFoundError,
};
+const SIGRTMIN=34;
+const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX;
+//# sourceMappingURL=realtime.js.map
/***/ }),
-/* 139 */
+/* 146 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = function (x) {
- var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt();
- var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt();
+const aliases = ['stdin', 'stdout', 'stderr'];
+
+const hasAlias = opts => aliases.some(alias => opts[alias] !== undefined);
+
+const normalizeStdio = opts => {
+ if (!opts) {
+ return;
+ }
+
+ const {stdio} = opts;
+
+ if (stdio === undefined) {
+ return aliases.map(alias => opts[alias]);
+ }
+
+ if (hasAlias(opts)) {
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
+ }
+
+ if (typeof stdio === 'string') {
+ return stdio;
+ }
+
+ if (!Array.isArray(stdio)) {
+ throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
+ }
+
+ const length = Math.max(stdio.length, aliases.length);
+ return Array.from({length}, (value, index) => stdio[index]);
+};
+
+module.exports = normalizeStdio;
+
+// `ipc` is pushed unless it is already present
+module.exports.node = opts => {
+ const stdio = normalizeStdio(opts);
- if (x[x.length - 1] === lf) {
- x = x.slice(0, x.length - 1);
+ if (stdio === 'ipc') {
+ return 'ipc';
}
- if (x[x.length - 1] === cr) {
- x = x.slice(0, x.length - 1);
+ if (stdio === undefined || typeof stdio === 'string') {
+ return [stdio, stdio, stdio, 'ipc'];
}
- return x;
+ if (stdio.includes('ipc')) {
+ return stdio;
+ }
+
+ return [...stdio, 'ipc'];
};
/***/ }),
-/* 140 */
+/* 147 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const path = __webpack_require__(16);
-const pathKey = __webpack_require__(141);
+const os = __webpack_require__(11);
+const onExit = __webpack_require__(110);
+const pFinally = __webpack_require__(148);
-module.exports = opts => {
- opts = Object.assign({
- cwd: process.cwd(),
- path: process.env[pathKey()]
- }, opts);
+const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
- let prev;
- let pth = path.resolve(opts.cwd);
- const ret = [];
+// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior
+const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {
+ const killResult = kill(signal);
+ setKillTimeout(kill, signal, options, killResult);
+ return killResult;
+};
- while (prev !== pth) {
- ret.push(path.join(pth, 'node_modules/.bin'));
- prev = pth;
- pth = path.resolve(pth, '..');
+const setKillTimeout = (kill, signal, options, killResult) => {
+ if (!shouldForceKill(signal, options, killResult)) {
+ return;
}
- // ensure the running `node` binary is used
- ret.push(path.dirname(process.execPath));
+ const timeout = getForceKillAfterTimeout(options);
+ setTimeout(() => {
+ kill('SIGKILL');
+ }, timeout).unref();
+};
- return ret.concat(opts.path).join(path.delimiter);
+const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => {
+ return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
};
-module.exports.env = opts => {
- opts = Object.assign({
- env: process.env
- }, opts);
+const isSigterm = signal => {
+ return signal === os.constants.signals.SIGTERM ||
+ (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');
+};
- const env = Object.assign({}, opts.env);
- const path = pathKey({env});
+const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {
+ if (forceKillAfterTimeout === true) {
+ return DEFAULT_FORCE_KILL_TIMEOUT;
+ }
+
+ if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
+ throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
+ }
+
+ return forceKillAfterTimeout;
+};
- opts.path = env[path];
- env[path] = module.exports(opts);
+// `childProcess.cancel()`
+const spawnedCancel = (spawned, context) => {
+ const killResult = spawned.kill();
- return env;
+ if (killResult) {
+ context.isCanceled = true;
+ }
+};
+
+const timeoutKill = (spawned, signal, reject) => {
+ spawned.kill(signal);
+ reject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));
+};
+
+// `timeout` option handling
+const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {
+ if (timeout === 0 || timeout === undefined) {
+ return spawnedPromise;
+ }
+
+ if (!Number.isInteger(timeout) || timeout < 0) {
+ throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
+ }
+
+ let timeoutId;
+ const timeoutPromise = new Promise((resolve, reject) => {
+ timeoutId = setTimeout(() => {
+ timeoutKill(spawned, killSignal, reject);
+ }, timeout);
+ });
+
+ const safeSpawnedPromise = pFinally(spawnedPromise, () => {
+ clearTimeout(timeoutId);
+ });
+
+ return Promise.race([timeoutPromise, safeSpawnedPromise]);
+};
+
+// `cleanup` option handling
+const setExitHandler = (spawned, {cleanup, detached}, timedPromise) => {
+ if (!cleanup || detached) {
+ return timedPromise;
+ }
+
+ const removeExitHandler = onExit(() => {
+ spawned.kill();
+ });
+
+ // TODO: Use native "finally" syntax when targeting Node.js 10
+ return pFinally(timedPromise, removeExitHandler);
+};
+
+module.exports = {
+ spawnedKill,
+ spawnedCancel,
+ setupTimeout,
+ setExitHandler
};
/***/ }),
-/* 141 */
+/* 148 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = opts => {
- opts = opts || {};
-
- const env = opts.env || process.env;
- const platform = opts.platform || process.platform;
- if (platform !== 'win32') {
- return 'PATH';
+module.exports = async (
+ promise,
+ onFinally = (() => {})
+) => {
+ let value;
+ try {
+ value = await promise;
+ } catch (error) {
+ await onFinally();
+ throw error;
}
- return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path';
+ await onFinally();
+ return value;
};
/***/ }),
-/* 142 */
+/* 149 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+const isStream = __webpack_require__(150);
+const getStream = __webpack_require__(151);
+const mergeStream = __webpack_require__(155);
+
+// `input` option
+const handleInput = (spawned, input) => {
+ // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852
+ // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
+ if (input === undefined || spawned.stdin === undefined) {
+ return;
+ }
+
+ if (isStream(input)) {
+ input.pipe(spawned.stdin);
+ } else {
+ spawned.stdin.end(input);
+ }
+};
+
+// `all` interleaves `stdout` and `stderr`
+const makeAllStream = (spawned, {all}) => {
+ if (!all || (!spawned.stdout && !spawned.stderr)) {
+ return;
+ }
+
+ const mixed = mergeStream();
+
+ if (spawned.stdout) {
+ mixed.add(spawned.stdout);
+ }
+
+ if (spawned.stderr) {
+ mixed.add(spawned.stderr);
+ }
+
+ return mixed;
+};
+
+// On failure, `result.stdout|stderr|all` should contain the currently buffered stream
+const getBufferedData = async (stream, streamPromise) => {
+ if (!stream) {
+ return;
+ }
+
+ stream.destroy();
-var isStream = module.exports = function (stream) {
- return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
+ try {
+ return await streamPromise;
+ } catch (error) {
+ return error.bufferedData;
+ }
};
-isStream.writable = function (stream) {
- return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object';
+const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {
+ if (!stream || !buffer) {
+ return;
+ }
+
+ if (encoding) {
+ return getStream(stream, {encoding, maxBuffer});
+ }
+
+ return getStream.buffer(stream, {maxBuffer});
};
-isStream.readable = function (stream) {
- return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object';
+// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
+const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {
+ const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});
+ const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});
+ const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});
+
+ try {
+ return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
+ } catch (error) {
+ return Promise.all([
+ {error, signal: error.signal, timedOut: error.timedOut},
+ getBufferedData(stdout, stdoutPromise),
+ getBufferedData(stderr, stderrPromise),
+ getBufferedData(all, allPromise)
+ ]);
+ }
};
-isStream.duplex = function (stream) {
- return isStream.writable(stream) && isStream.readable(stream);
+const validateInputSync = ({input}) => {
+ if (isStream(input)) {
+ throw new TypeError('The `input` option cannot be a stream in sync mode');
+ }
};
-isStream.transform = function (stream) {
- return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object';
+module.exports = {
+ handleInput,
+ makeAllStream,
+ getSpawnedResult,
+ validateInputSync
};
+
/***/ }),
-/* 143 */
+/* 150 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+const isStream = stream =>
+ stream !== null &&
+ typeof stream === 'object' &&
+ typeof stream.pipe === 'function';
+
+isStream.writable = stream =>
+ isStream(stream) &&
+ stream.writable !== false &&
+ typeof stream._write === 'function' &&
+ typeof stream._writableState === 'object';
+
+isStream.readable = stream =>
+ isStream(stream) &&
+ stream.readable !== false &&
+ typeof stream._read === 'function' &&
+ typeof stream._readableState === 'object';
+
+isStream.duplex = stream =>
+ isStream.writable(stream) &&
+ isStream.readable(stream);
+
+isStream.transform = stream =>
+ isStream.duplex(stream) &&
+ typeof stream._transform === 'function' &&
+ typeof stream._transformState === 'object';
+
+module.exports = isStream;
+
+
+/***/ }),
+/* 151 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const pump = __webpack_require__(144);
-const bufferStream = __webpack_require__(146);
+const pump = __webpack_require__(152);
+const bufferStream = __webpack_require__(154);
class MaxBufferError extends Error {
constructor() {
@@ -21745,21 +21130,25 @@ class MaxBufferError extends Error {
}
}
-function getStream(inputStream, options) {
+async function getStream(inputStream, options) {
if (!inputStream) {
return Promise.reject(new Error('Expected a stream'));
}
- options = Object.assign({maxBuffer: Infinity}, options);
+ options = {
+ maxBuffer: Infinity,
+ ...options
+ };
const {maxBuffer} = options;
let stream;
- return new Promise((resolve, reject) => {
+ await new Promise((resolve, reject) => {
const rejectPromise = error => {
if (error) { // A null check
error.bufferedData = stream.getBufferedValue();
}
+
reject(error);
};
@@ -21777,21 +21166,25 @@ function getStream(inputStream, options) {
rejectPromise(new MaxBufferError());
}
});
- }).then(() => stream.getBufferedValue());
+ });
+
+ return stream.getBufferedValue();
}
module.exports = getStream;
-module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'}));
-module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true}));
+// TODO: Remove this for the next major release
+module.exports.default = getStream;
+module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
+module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
module.exports.MaxBufferError = MaxBufferError;
/***/ }),
-/* 144 */
+/* 152 */
/***/ (function(module, exports, __webpack_require__) {
var once = __webpack_require__(52)
-var eos = __webpack_require__(145)
+var eos = __webpack_require__(153)
var fs = __webpack_require__(23) // we only need fs to get the ReadStream and WriteStream prototypes
var noop = function () {}
@@ -21875,7 +21268,7 @@ module.exports = pump
/***/ }),
-/* 145 */
+/* 153 */
/***/ (function(module, exports, __webpack_require__) {
var once = __webpack_require__(52);
@@ -21968,186 +21361,223 @@ module.exports = eos;
/***/ }),
-/* 146 */
+/* 154 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const {PassThrough} = __webpack_require__(28);
+const {PassThrough: PassThroughStream} = __webpack_require__(28);
module.exports = options => {
- options = Object.assign({}, options);
+ options = {...options};
const {array} = options;
let {encoding} = options;
- const buffer = encoding === 'buffer';
+ const isBuffer = encoding === 'buffer';
let objectMode = false;
if (array) {
- objectMode = !(encoding || buffer);
+ objectMode = !(encoding || isBuffer);
} else {
encoding = encoding || 'utf8';
}
- if (buffer) {
+ if (isBuffer) {
encoding = null;
}
- let len = 0;
- const ret = [];
- const stream = new PassThrough({objectMode});
+ const stream = new PassThroughStream({objectMode});
if (encoding) {
stream.setEncoding(encoding);
}
+ let length = 0;
+ const chunks = [];
+
stream.on('data', chunk => {
- ret.push(chunk);
+ chunks.push(chunk);
if (objectMode) {
- len = ret.length;
+ length = chunks.length;
} else {
- len += chunk.length;
+ length += chunk.length;
}
});
stream.getBufferedValue = () => {
if (array) {
- return ret;
+ return chunks;
}
- return buffer ? Buffer.concat(ret, len) : ret.join('');
+ return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
};
- stream.getBufferedLength = () => len;
+ stream.getBufferedLength = () => length;
return stream;
};
/***/ }),
-/* 147 */
+/* 155 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = (promise, onFinally) => {
- onFinally = onFinally || (() => {});
- return promise.then(
- val => new Promise(resolve => {
- resolve(onFinally());
- }).then(() => val),
- err => new Promise(resolve => {
- resolve(onFinally());
- }).then(() => {
- throw err;
- })
- );
-};
+const { PassThrough } = __webpack_require__(28);
+
+module.exports = function (/*streams...*/) {
+ var sources = []
+ var output = new PassThrough({objectMode: true})
+
+ output.setMaxListeners(0)
+
+ output.add = add
+ output.isEmpty = isEmpty
+
+ output.on('unpipe', remove)
+
+ Array.prototype.slice.call(arguments).forEach(add)
+
+ return output
+
+ function add (source) {
+ if (Array.isArray(source)) {
+ source.forEach(add)
+ return this
+ }
+
+ sources.push(source);
+ source.once('end', remove.bind(null, source))
+ source.once('error', output.emit.bind(output, 'error'))
+ source.pipe(output, {end: false})
+ return this
+ }
+
+ function isEmpty () {
+ return sources.length == 0;
+ }
+
+ function remove (source) {
+ sources = sources.filter(function (it) { return it !== source })
+ if (!sources.length && output.readable) { output.end() }
+ }
+}
/***/ }),
-/* 148 */
+/* 156 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-// Older verions of Node.js might not have `util.getSystemErrorName()`.
-// In that case, fall back to a deprecated internal.
-const util = __webpack_require__(29);
+const mergePromiseProperty = (spawned, promise, property) => {
+ // Starting the main `promise` is deferred to avoid consuming streams
+ const value = typeof promise === 'function' ?
+ (...args) => promise()[property](...args) :
+ promise[property].bind(promise);
-let uv;
+ Object.defineProperty(spawned, property, {
+ value,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+};
-if (typeof util.getSystemErrorName === 'function') {
- module.exports = util.getSystemErrorName;
-} else {
- try {
- uv = process.binding('uv');
+// The return value is a mixin of `childProcess` and `Promise`
+const mergePromise = (spawned, promise) => {
+ mergePromiseProperty(spawned, promise, 'then');
+ mergePromiseProperty(spawned, promise, 'catch');
- if (typeof uv.errname !== 'function') {
- throw new TypeError('uv.errname is not a function');
- }
- } catch (err) {
- console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err);
- uv = null;
+ // TODO: Remove the `if`-guard when targeting Node.js 10
+ if (Promise.prototype.finally) {
+ mergePromiseProperty(spawned, promise, 'finally');
}
- module.exports = code => errname(uv, code);
-}
+ return spawned;
+};
-// Used for testing the fallback behavior
-module.exports.__test__ = errname;
+// Use promises instead of `child_process` events
+const getSpawnedPromise = spawned => {
+ return new Promise((resolve, reject) => {
+ spawned.on('exit', (exitCode, signal) => {
+ resolve({exitCode, signal});
+ });
-function errname(uv, code) {
- if (uv) {
- return uv.errname(code);
- }
+ spawned.on('error', error => {
+ reject(error);
+ });
- if (!(code < 0)) {
- throw new Error('err >= 0');
- }
+ if (spawned.stdin) {
+ spawned.stdin.on('error', error => {
+ reject(error);
+ });
+ }
+ });
+};
- return `Unknown system error ${code}`;
-}
+module.exports = {
+ mergePromise,
+ getSpawnedPromise
+};
/***/ }),
-/* 149 */
+/* 157 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const alias = ['stdin', 'stdout', 'stderr'];
-
-const hasAlias = opts => alias.some(x => Boolean(opts[x]));
+const SPACES_REGEXP = / +/g;
-module.exports = opts => {
- if (!opts) {
- return null;
+const joinCommand = (file, args = []) => {
+ if (!Array.isArray(args)) {
+ return file;
}
- if (opts.stdio && hasAlias(opts)) {
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
- }
+ return [file, ...args].join(' ');
+};
- if (typeof opts.stdio === 'string') {
- return opts.stdio;
+// Allow spaces to be escaped by a backslash if not meant as a delimiter
+const handleEscaping = (tokens, token, index) => {
+ if (index === 0) {
+ return [token];
}
- const stdio = opts.stdio || [];
+ const previousToken = tokens[tokens.length - 1];
- if (!Array.isArray(stdio)) {
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
+ if (previousToken.endsWith('\\')) {
+ return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
}
- const result = [];
- const len = Math.max(stdio.length, alias.length);
-
- for (let i = 0; i < len; i++) {
- let value = null;
-
- if (stdio[i] !== undefined) {
- value = stdio[i];
- } else if (opts[alias[i]] !== undefined) {
- value = opts[alias[i]];
- }
+ return [...tokens, token];
+};
- result[i] = value;
- }
+// Handle `execa.command()`
+const parseCommand = command => {
+ return command
+ .trim()
+ .split(SPACES_REGEXP)
+ .reduce(handleEscaping, []);
+};
- return result;
+module.exports = {
+ joinCommand,
+ parseCommand
};
/***/ }),
-/* 150 */
+/* 158 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const chalk = __webpack_require__(151);
+const chalk = __webpack_require__(159);
const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color';
@@ -22169,16 +21599,16 @@ module.exports = isSupported ? main : fallbacks;
/***/ }),
-/* 151 */
+/* 159 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const escapeStringRegexp = __webpack_require__(3);
-const ansiStyles = __webpack_require__(152);
-const stdoutColor = __webpack_require__(153).stdout;
+const ansiStyles = __webpack_require__(160);
+const stdoutColor = __webpack_require__(161).stdout;
-const template = __webpack_require__(154);
+const template = __webpack_require__(162);
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
@@ -22404,7 +21834,7 @@ module.exports.default = module.exports; // For TypeScript
/***/ }),
-/* 152 */
+/* 160 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22577,7 +22007,7 @@ Object.defineProperty(module, 'exports', {
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module)))
/***/ }),
-/* 153 */
+/* 161 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22719,7 +22149,7 @@ module.exports = {
/***/ }),
-/* 154 */
+/* 162 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22854,7 +22284,7 @@ module.exports = (chalk, tmp) => {
/***/ }),
-/* 155 */
+/* 163 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright IBM Corp. 2014,2018. All Rights Reserved.
@@ -22862,12 +22292,12 @@ module.exports = (chalk, tmp) => {
// 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__(156);
-module.exports.cli = __webpack_require__(160);
+module.exports = __webpack_require__(164);
+module.exports.cli = __webpack_require__(168);
/***/ }),
-/* 156 */
+/* 164 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22882,9 +22312,9 @@ var stream = __webpack_require__(28);
var util = __webpack_require__(29);
var fs = __webpack_require__(23);
-var through = __webpack_require__(157);
-var duplexer = __webpack_require__(158);
-var StringDecoder = __webpack_require__(159).StringDecoder;
+var through = __webpack_require__(165);
+var duplexer = __webpack_require__(166);
+var StringDecoder = __webpack_require__(167).StringDecoder;
module.exports = Logger;
@@ -23073,7 +22503,7 @@ function lineMerger(host) {
/***/ }),
-/* 157 */
+/* 165 */
/***/ (function(module, exports, __webpack_require__) {
var Stream = __webpack_require__(28)
@@ -23187,7 +22617,7 @@ function through (write, end, opts) {
/***/ }),
-/* 158 */
+/* 166 */
/***/ (function(module, exports, __webpack_require__) {
var Stream = __webpack_require__(28)
@@ -23280,13 +22710,13 @@ function duplex(writer, reader) {
/***/ }),
-/* 159 */
+/* 167 */
/***/ (function(module, exports) {
module.exports = require("string_decoder");
/***/ }),
-/* 160 */
+/* 168 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -23297,11 +22727,11 @@ module.exports = require("string_decoder");
-var minimist = __webpack_require__(161);
+var minimist = __webpack_require__(169);
var path = __webpack_require__(16);
-var Logger = __webpack_require__(156);
-var pkg = __webpack_require__(162);
+var Logger = __webpack_require__(164);
+var pkg = __webpack_require__(170);
module.exports = cli;
@@ -23355,7 +22785,7 @@ function usage($0, p) {
/***/ }),
-/* 161 */
+/* 169 */
/***/ (function(module, exports) {
module.exports = function (args, opts) {
@@ -23597,13 +23027,13 @@ function isNumber (x) {
/***/ }),
-/* 162 */
+/* 170 */
/***/ (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\"}}");
/***/ }),
-/* 163 */
+/* 171 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -23616,7 +23046,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29);
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(164);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
/* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20);
/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55);
/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36);
@@ -23709,7 +23139,7 @@ function packagesFromGlobPattern({
}
/***/ }),
-/* 164 */
+/* 172 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -23774,7 +23204,7 @@ function getProjectPaths(rootPath, options = {}) {
}
/***/ }),
-/* 165 */
+/* 173 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -23782,9 +23212,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CleanCommand", function() { return CleanCommand; });
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
+/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
+/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ora__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
@@ -23884,18 +23314,18 @@ const CleanCommand = {
};
/***/ }),
-/* 166 */
+/* 174 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
-const globby = __webpack_require__(167);
-const isPathCwd = __webpack_require__(174);
-const isPathInCwd = __webpack_require__(175);
-const pify = __webpack_require__(178);
-const rimraf = __webpack_require__(179);
-const pMap = __webpack_require__(180);
+const globby = __webpack_require__(175);
+const isPathCwd = __webpack_require__(182);
+const isPathInCwd = __webpack_require__(183);
+const pify = __webpack_require__(186);
+const rimraf = __webpack_require__(187);
+const pMap = __webpack_require__(188);
const rimrafP = pify(rimraf);
@@ -23961,16 +23391,16 @@ module.exports.sync = (patterns, options) => {
/***/ }),
-/* 167 */
+/* 175 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var Promise = __webpack_require__(168);
-var arrayUnion = __webpack_require__(170);
-var objectAssign = __webpack_require__(172);
+var Promise = __webpack_require__(176);
+var arrayUnion = __webpack_require__(178);
+var objectAssign = __webpack_require__(180);
var glob = __webpack_require__(37);
-var pify = __webpack_require__(173);
+var pify = __webpack_require__(181);
var globP = pify(glob, Promise).bind(glob);
@@ -24056,17 +23486,17 @@ module.exports.hasMagic = function (patterns, opts) {
/***/ }),
-/* 168 */
+/* 176 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = typeof Promise === 'function' ? Promise : __webpack_require__(169);
+module.exports = typeof Promise === 'function' ? Promise : __webpack_require__(177);
/***/ }),
-/* 169 */
+/* 177 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24365,12 +23795,12 @@ module.exports = Promise;
/***/ }),
-/* 170 */
+/* 178 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var arrayUniq = __webpack_require__(171);
+var arrayUniq = __webpack_require__(179);
module.exports = function () {
return arrayUniq([].concat.apply([], arguments));
@@ -24378,7 +23808,7 @@ module.exports = function () {
/***/ }),
-/* 171 */
+/* 179 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24447,7 +23877,7 @@ if ('Set' in global) {
/***/ }),
-/* 172 */
+/* 180 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24544,7 +23974,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
/***/ }),
-/* 173 */
+/* 181 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24619,7 +24049,7 @@ pify.all = pify;
/***/ }),
-/* 174 */
+/* 182 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24630,24 +24060,24 @@ module.exports = path_ => path.resolve(path_) === process.cwd();
/***/ }),
-/* 175 */
+/* 183 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const isPathInside = __webpack_require__(176);
+const isPathInside = __webpack_require__(184);
module.exports = path => isPathInside(path, process.cwd());
/***/ }),
-/* 176 */
+/* 184 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
-const pathIsInside = __webpack_require__(177);
+const pathIsInside = __webpack_require__(185);
module.exports = (childPath, parentPath) => {
childPath = path.resolve(childPath);
@@ -24662,7 +24092,7 @@ module.exports = (childPath, parentPath) => {
/***/ }),
-/* 177 */
+/* 185 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24697,7 +24127,7 @@ function stripTrailingSep(thePath) {
/***/ }),
-/* 178 */
+/* 186 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24772,7 +24202,7 @@ module.exports = (input, options) => {
/***/ }),
-/* 179 */
+/* 187 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = rimraf
@@ -25142,7 +24572,7 @@ function rmkidsSync (p, options) {
/***/ }),
-/* 180 */
+/* 188 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25221,15 +24651,15 @@ module.exports.default = pMap;
/***/ }),
-/* 181 */
+/* 189 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const chalk = __webpack_require__(182);
-const cliCursor = __webpack_require__(186);
-const cliSpinners = __webpack_require__(190);
-const logSymbols = __webpack_require__(150);
+const chalk = __webpack_require__(190);
+const cliCursor = __webpack_require__(194);
+const cliSpinners = __webpack_require__(198);
+const logSymbols = __webpack_require__(158);
class Ora {
constructor(options) {
@@ -25376,16 +24806,16 @@ module.exports.promise = (action, options) => {
/***/ }),
-/* 182 */
+/* 190 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const escapeStringRegexp = __webpack_require__(3);
-const ansiStyles = __webpack_require__(183);
-const stdoutColor = __webpack_require__(184).stdout;
+const ansiStyles = __webpack_require__(191);
+const stdoutColor = __webpack_require__(192).stdout;
-const template = __webpack_require__(185);
+const template = __webpack_require__(193);
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
@@ -25611,7 +25041,7 @@ module.exports.default = module.exports; // For TypeScript
/***/ }),
-/* 183 */
+/* 191 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25784,7 +25214,7 @@ Object.defineProperty(module, 'exports', {
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module)))
/***/ }),
-/* 184 */
+/* 192 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25926,7 +25356,7 @@ module.exports = {
/***/ }),
-/* 185 */
+/* 193 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26061,12 +25491,12 @@ module.exports = (chalk, tmp) => {
/***/ }),
-/* 186 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const restoreCursor = __webpack_require__(187);
+const restoreCursor = __webpack_require__(195);
let hidden = false;
@@ -26107,12 +25537,12 @@ exports.toggle = (force, stream) => {
/***/ }),
-/* 187 */
+/* 195 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const onetime = __webpack_require__(188);
+const onetime = __webpack_require__(196);
const signalExit = __webpack_require__(110);
module.exports = onetime(() => {
@@ -26123,12 +25553,12 @@ module.exports = onetime(() => {
/***/ }),
-/* 188 */
+/* 196 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const mimicFn = __webpack_require__(189);
+const mimicFn = __webpack_require__(197);
module.exports = (fn, opts) => {
// TODO: Remove this in v3
@@ -26169,7 +25599,7 @@ module.exports = (fn, opts) => {
/***/ }),
-/* 189 */
+/* 197 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26185,22 +25615,22 @@ module.exports = (to, from) => {
/***/ }),
-/* 190 */
+/* 198 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = __webpack_require__(191);
+module.exports = __webpack_require__(199);
/***/ }),
-/* 191 */
+/* 199 */
/***/ (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\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"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\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"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\":[\"🌲\",\"🎄\"]}}");
/***/ }),
-/* 192 */
+/* 200 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -26260,7 +25690,7 @@ const RunCommand = {
};
/***/ }),
-/* 193 */
+/* 201 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -26271,7 +25701,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34);
/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35);
/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36);
-/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(194);
+/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(202);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -26355,14 +25785,14 @@ const WatchCommand = {
};
/***/ }),
-/* 194 */
+/* 202 */
/***/ (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__(195);
-/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(294);
+/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
+/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(302);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -26429,168 +25859,168 @@ function waitUntilWatchIsReady(stream, opts = {}) {
}
/***/ }),
-/* 195 */
+/* 203 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
-/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214);
+/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
-/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(219);
+/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
-/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(211);
+/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(219);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
-/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(215);
+/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
-/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220);
+/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
-/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(221);
+/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(229);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
-/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(238);
+/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(246);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
-/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(239);
+/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(247);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
-/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(243);
+/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(251);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
-/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(222);
+/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(230);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
-/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(244);
+/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(252);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
-/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(247);
+/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(255);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
-/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(228);
+/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(236);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
-/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(204);
+/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(212);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
-/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(198);
+/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(206);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
-/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(230);
+/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(238);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
-/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(212);
+/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(220);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
-/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(213);
+/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(221);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
-/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(248);
+/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(256);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
-/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(249);
+/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(257);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
-/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(250);
+/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(258);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
-/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(251);
+/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(259);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
-/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(216);
+/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(224);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
-/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(209);
+/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(217);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
-/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(252);
+/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(260);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
-/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(253);
+/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(261);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
-/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(255);
+/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(263);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
-/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(256);
+/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(264);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
-/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(267);
+/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(275);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
-/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(277);
+/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(285);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
-/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(231);
+/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(239);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
-/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(278);
+/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(286);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
-/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(268);
+/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(276);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
-/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(279);
+/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(287);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
-/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(280);
+/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(288);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
-/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(281);
+/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(289);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
-/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(282);
+/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(290);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
-/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(283);
+/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(291);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
-/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(285);
+/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(293);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
-/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(286);
+/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(294);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
-/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(232);
+/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(240);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
-/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(287);
+/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(295);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
-/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(288);
+/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(296);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
-/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(289);
+/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(297);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_44__["race"]; });
-/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(290);
+/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(298);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_45__["range"]; });
-/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(237);
+/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(245);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_46__["throwError"]; });
-/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(291);
+/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(299);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_47__["timer"]; });
-/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(292);
+/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(300);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_48__["using"]; });
-/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(293);
+/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(301);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_49__["zip"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
-/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(202);
+/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(210);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_50__["config"]; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
@@ -26651,16 +26081,16 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/* 196 */
+/* 204 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
-/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197);
-/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
-/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(202);
+/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
+/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(219);
+/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
/** PURE_IMPORTS_START _util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
@@ -26774,15 +26204,15 @@ function getPromiseCtor(promiseCtor) {
/***/ }),
-/* 197 */
+/* 205 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(198);
-/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
-/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(206);
+/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
+/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
@@ -26805,19 +26235,19 @@ function toSubscriber(nextOrObserver, error, complete) {
/***/ }),
-/* 198 */
+/* 206 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
-/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
-/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(202);
-/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(203);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
+/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(212);
+/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(218);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(210);
+/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(211);
/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
@@ -27059,7 +26489,7 @@ function isTrustedSubscriber(obj) {
/***/ }),
-/* 199 */
+/* 207 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27272,7 +26702,7 @@ function __importDefault(mod) {
/***/ }),
-/* 200 */
+/* 208 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27286,14 +26716,14 @@ function isFunction(x) {
/***/ }),
-/* 201 */
+/* 209 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
-/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
+/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
@@ -27314,7 +26744,7 @@ var empty = {
/***/ }),
-/* 202 */
+/* 210 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27342,7 +26772,7 @@ var config = {
/***/ }),
-/* 203 */
+/* 211 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27356,18 +26786,18 @@ function hostReportError(err) {
/***/ }),
-/* 204 */
+/* 212 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
-/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(208);
-/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
+/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216);
+/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(217);
/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */
@@ -27503,7 +26933,7 @@ function flattenUnsubscriptionErrors(errors) {
/***/ }),
-/* 205 */
+/* 213 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27515,7 +26945,7 @@ var isArray = Array.isArray || (function (x) { return x && typeof x.length === '
/***/ }),
-/* 206 */
+/* 214 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27529,13 +26959,13 @@ function isObject(x) {
/***/ }),
-/* 207 */
+/* 215 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tryCatch", function() { return tryCatch; });
-/* harmony import */ var _errorObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
+/* harmony import */ var _errorObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(216);
/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */
var tryCatchTarget;
@@ -27556,7 +26986,7 @@ function tryCatch(fn) {
/***/ }),
-/* 208 */
+/* 216 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27568,13 +26998,13 @@ var errorObject = { e: {} };
/***/ }),
-/* 209 */
+/* 217 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
var UnsubscriptionError = /*@__PURE__*/ (function (_super) {
@@ -27594,7 +27024,7 @@ var UnsubscriptionError = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 210 */
+/* 218 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27610,7 +27040,7 @@ var $$rxSubscriber = rxSubscriber;
/***/ }),
-/* 211 */
+/* 219 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27622,14 +27052,14 @@ var observable = typeof Symbol === 'function' && Symbol.observable || '@@observa
/***/ }),
-/* 212 */
+/* 220 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
-/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
+/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
function pipe() {
@@ -27654,7 +27084,7 @@ function pipeFromArray(fns) {
/***/ }),
-/* 213 */
+/* 221 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27666,19 +27096,19 @@ function noop() { }
/***/ }),
-/* 214 */
+/* 222 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(204);
-/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(212);
+/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(226);
/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
@@ -27825,7 +27255,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 215 */
+/* 223 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -27833,13 +27263,13 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(198);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216);
-/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(217);
-/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(210);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(212);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
+/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(225);
+/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(218);
/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
@@ -28001,13 +27431,13 @@ var AnonymousSubject = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 216 */
+/* 224 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
var ObjectUnsubscribedError = /*@__PURE__*/ (function (_super) {
@@ -28025,14 +27455,14 @@ var ObjectUnsubscribedError = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 217 */
+/* 225 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
@@ -28068,14 +27498,14 @@ var SubjectSubscription = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 218 */
+/* 226 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -28137,18 +27567,18 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 219 */
+/* 227 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(215);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
@@ -28334,15 +27764,15 @@ var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 220 */
+/* 228 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
@@ -28389,19 +27819,19 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 221 */
+/* 229 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(222);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
-/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(229);
-/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(216);
-/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(217);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(212);
+/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(237);
+/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(224);
+/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(225);
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
@@ -28522,14 +27952,14 @@ var ReplayEvent = /*@__PURE__*/ (function () {
/***/ }),
-/* 222 */
+/* 230 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
-/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
-/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
+/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231);
+/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234);
/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
@@ -28538,14 +27968,14 @@ var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["Queu
/***/ }),
-/* 223 */
+/* 231 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
@@ -28590,14 +28020,14 @@ var QueueAction = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 224 */
+/* 232 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(225);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
@@ -28695,14 +28125,14 @@ var AsyncAction = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 225 */
+/* 233 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
@@ -28724,14 +28154,14 @@ var Action = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 226 */
+/* 234 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(235);
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -28747,14 +28177,14 @@ var QueueScheduler = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 227 */
+/* 235 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(236);
/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
@@ -28816,7 +28246,7 @@ var AsyncScheduler = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 228 */
+/* 236 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -28844,7 +28274,7 @@ var Scheduler = /*@__PURE__*/ (function () {
/***/ }),
-/* 229 */
+/* 237 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -28853,9 +28283,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(238);
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -28925,15 +28355,15 @@ var ObserveOnMessage = /*@__PURE__*/ (function () {
/***/ }),
-/* 230 */
+/* 238 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231);
-/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
-/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(237);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
+/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
+/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(245);
/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
@@ -29007,7 +28437,7 @@ var Notification = /*@__PURE__*/ (function () {
/***/ }),
-/* 231 */
+/* 239 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -29015,7 +28445,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emptyScheduled", function() { return emptyScheduled; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
@@ -29029,16 +28459,16 @@ function emptyScheduled(scheduler) {
/***/ }),
-/* 232 */
+/* 240 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(236);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(241);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(242);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
+/* harmony import */ var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(244);
/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */
@@ -29069,7 +28499,7 @@ function of() {
/***/ }),
-/* 233 */
+/* 241 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -29083,15 +28513,15 @@ function isScheduler(value) {
/***/ }),
-/* 234 */
+/* 242 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */
@@ -29122,7 +28552,7 @@ function fromArray(input, scheduler) {
/***/ }),
-/* 235 */
+/* 243 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -29143,13 +28573,13 @@ var subscribeToArray = function (array) {
/***/ }),
-/* 236 */
+/* 244 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scalar", function() { return scalar; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
function scalar(value) {
@@ -29165,13 +28595,13 @@ function scalar(value) {
/***/ }),
-/* 237 */
+/* 245 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
function throwError(error, scheduler) {
@@ -29190,15 +28620,15 @@ function dispatch(_a) {
/***/ }),
-/* 238 */
+/* 246 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
@@ -29249,14 +28679,14 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 239 */
+/* 247 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
-/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
-/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(242);
+/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
+/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(250);
/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
@@ -29265,15 +28695,15 @@ var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapSc
/***/ }),
-/* 240 */
+/* 248 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(249);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(232);
/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
@@ -29316,7 +28746,7 @@ var AsapAction = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 241 */
+/* 249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -29346,14 +28776,14 @@ var Immediate = {
/***/ }),
-/* 242 */
+/* 250 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(235);
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -29390,14 +28820,14 @@ var AsapScheduler = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 243 */
+/* 251 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(224);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(232);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(235);
/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
@@ -29406,14 +28836,14 @@ var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["Asyn
/***/ }),
-/* 244 */
+/* 252 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
-/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(245);
-/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246);
+/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(253);
+/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254);
/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
@@ -29422,14 +28852,14 @@ var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTE
/***/ }),
-/* 245 */
+/* 253 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
@@ -29471,14 +28901,14 @@ var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 246 */
+/* 254 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(235);
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -29515,16 +28945,16 @@ var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 247 */
+/* 255 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
-/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
+/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
@@ -29636,7 +29066,7 @@ var VirtualAction = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 248 */
+/* 256 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -29650,13 +29080,13 @@ function identity(x) {
/***/ }),
-/* 249 */
+/* 257 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
function isObservable(obj) {
@@ -29666,13 +29096,13 @@ function isObservable(obj) {
/***/ }),
-/* 250 */
+/* 258 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
var ArgumentOutOfRangeError = /*@__PURE__*/ (function (_super) {
@@ -29690,13 +29120,13 @@ var ArgumentOutOfRangeError = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 251 */
+/* 259 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
var EmptyError = /*@__PURE__*/ (function (_super) {
@@ -29714,13 +29144,13 @@ var EmptyError = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 252 */
+/* 260 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
var TimeoutError = /*@__PURE__*/ (function (_super) {
@@ -29738,17 +29168,17 @@ var TimeoutError = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 253 */
+/* 261 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(238);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(254);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(233);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(213);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
@@ -29851,15 +29281,15 @@ function dispatchError(state) {
/***/ }),
-/* 254 */
+/* 262 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -29908,17 +29338,17 @@ var MapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 255 */
+/* 263 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(238);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(254);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(233);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(246);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(241);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(213);
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
@@ -30029,7 +29459,7 @@ function dispatchError(arg) {
/***/ }),
-/* 256 */
+/* 264 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -30037,12 +29467,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(234);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(242);
/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
@@ -30147,14 +29577,14 @@ var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 257 */
+/* 265 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -30179,14 +29609,14 @@ var OuterSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 258 */
+/* 266 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
-/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(259);
-/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(260);
+/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
+/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */
@@ -30198,14 +29628,14 @@ function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
/***/ }),
-/* 259 */
+/* 267 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -30237,22 +29667,22 @@ var InnerSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 260 */
+/* 268 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(235);
-/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(261);
-/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
-/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(264);
-/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(265);
-/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(266);
-/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(206);
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(263);
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(211);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
+/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(269);
+/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(270);
+/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(272);
+/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(273);
+/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(274);
+/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(214);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(271);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(219);
/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
@@ -30300,13 +29730,13 @@ var subscribeTo = function (result) {
/***/ }),
-/* 261 */
+/* 269 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
-/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
+/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(211);
/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
var subscribeToPromise = function (promise) {
@@ -30325,13 +29755,13 @@ var subscribeToPromise = function (promise) {
/***/ }),
-/* 262 */
+/* 270 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(263);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(271);
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
var subscribeToIterable = function (iterable) {
@@ -30362,7 +29792,7 @@ var subscribeToIterable = function (iterable) {
/***/ }),
-/* 263 */
+/* 271 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -30383,13 +29813,13 @@ var $$iterator = iterator;
/***/ }),
-/* 264 */
+/* 272 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(211);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
var subscribeToObservable = function (obj) {
@@ -30407,7 +29837,7 @@ var subscribeToObservable = function (obj) {
/***/ }),
-/* 265 */
+/* 273 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -30419,7 +29849,7 @@ var isArrayLike = (function (x) { return x && typeof x.length === 'number' && ty
/***/ }),
-/* 266 */
+/* 274 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -30433,16 +29863,16 @@ function isPromise(value) {
/***/ }),
-/* 267 */
+/* 275 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
-/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(232);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(268);
-/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(274);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(241);
+/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(276);
+/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(282);
/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */
@@ -30462,22 +29892,22 @@ function concat() {
/***/ }),
-/* 268 */
+/* 276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(266);
-/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
-/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(269);
-/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(270);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(234);
-/* harmony import */ var _fromPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(271);
-/* harmony import */ var _fromIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(272);
-/* harmony import */ var _fromObservable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(273);
-/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(260);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(274);
+/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(273);
+/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(277);
+/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(278);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(242);
+/* harmony import */ var _fromPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(279);
+/* harmony import */ var _fromIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(280);
+/* harmony import */ var _fromObservable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(281);
+/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(268);
/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isInteropObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */
@@ -30516,13 +29946,13 @@ function from(input, scheduler) {
/***/ }),
-/* 269 */
+/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(211);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
function isInteropObservable(input) {
@@ -30532,13 +29962,13 @@ function isInteropObservable(input) {
/***/ }),
-/* 270 */
+/* 278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(263);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(271);
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
function isIterable(input) {
@@ -30548,15 +29978,15 @@ function isIterable(input) {
/***/ }),
-/* 271 */
+/* 279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromPromise", function() { return fromPromise; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(261);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(269);
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToPromise PURE_IMPORTS_END */
@@ -30586,16 +30016,16 @@ function fromPromise(input, scheduler) {
/***/ }),
-/* 272 */
+/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromIterable", function() { return fromIterable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(263);
-/* harmony import */ var _util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(271);
+/* harmony import */ var _util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(270);
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */
@@ -30651,16 +30081,16 @@ function fromIterable(input, scheduler) {
/***/ }),
-/* 273 */
+/* 281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromObservable", function() { return fromObservable; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
-/* harmony import */ var _util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(264);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(219);
+/* harmony import */ var _util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(272);
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */
@@ -30689,13 +30119,13 @@ function fromObservable(input, scheduler) {
/***/ }),
-/* 274 */
+/* 282 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
-/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275);
+/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(283);
/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
function concatAll() {
@@ -30705,14 +30135,14 @@ function concatAll() {
/***/ }),
-/* 275 */
+/* 283 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(248);
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(256);
/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
@@ -30726,7 +30156,7 @@ function mergeAll(concurrent) {
/***/ }),
-/* 276 */
+/* 284 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -30734,11 +30164,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(258);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(257);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(268);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(266);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(276);
/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_map,_observable_from PURE_IMPORTS_END */
@@ -30837,15 +30267,15 @@ var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 277 */
+/* 285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(276);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
@@ -30868,19 +30298,19 @@ function defer(observableFactory) {
/***/ }),
-/* 278 */
+/* 286 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(257);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(254);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(239);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(265);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(262);
/** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */
@@ -30958,16 +30388,16 @@ var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 279 */
+/* 287 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
@@ -31034,16 +30464,16 @@ function isEventTarget(sourceObj) {
/***/ }),
-/* 280 */
+/* 288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
-/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
+/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
@@ -31079,15 +30509,15 @@ function fromEventPattern(addHandler, removeHandler, resultSelector) {
/***/ }),
-/* 281 */
+/* 289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(248);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(233);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(256);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
@@ -31216,14 +30646,14 @@ function dispatch(state) {
/***/ }),
-/* 282 */
+/* 290 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
-/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231);
+/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(285);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(239);
/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
@@ -31240,15 +30670,15 @@ function iif(condition, trueResult, falseResult) {
/***/ }),
-/* 283 */
+/* 291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(284);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(292);
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
@@ -31280,13 +30710,13 @@ function dispatch(state) {
/***/ }),
-/* 284 */
+/* 292 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
-/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
+/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
function isNumeric(val) {
@@ -31296,16 +30726,16 @@ function isNumeric(val) {
/***/ }),
-/* 285 */
+/* 293 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(233);
-/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(275);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(234);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
+/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(283);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(242);
/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
@@ -31337,15 +30767,15 @@ function merge() {
/***/ }),
-/* 286 */
+/* 294 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
@@ -31357,16 +30787,16 @@ function never() {
/***/ }),
-/* 287 */
+/* 295 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(276);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(239);
/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
@@ -31397,15 +30827,15 @@ function onErrorResumeNext() {
/***/ }),
-/* 288 */
+/* 296 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
@@ -31448,7 +30878,7 @@ function dispatch(state) {
/***/ }),
-/* 289 */
+/* 297 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -31456,11 +30886,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(234);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -31542,14 +30972,14 @@ var RaceSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 290 */
+/* 298 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
function range(start, count, scheduler) {
@@ -31600,16 +31030,16 @@ function dispatch(state) {
/***/ }),
-/* 291 */
+/* 299 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(284);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(233);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(292);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(241);
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
@@ -31654,15 +31084,15 @@ function dispatch(state) {
/***/ }),
-/* 292 */
+/* 300 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
-/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
-/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(204);
+/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(276);
+/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
@@ -31699,7 +31129,7 @@ function using(resourceFactory, observableFactory) {
/***/ }),
-/* 293 */
+/* 301 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -31707,13 +31137,13 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(234);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(258);
-/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(263);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(242);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
+/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(271);
/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
@@ -31933,320 +31363,320 @@ var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 294 */
+/* 302 */
/***/ (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__(295);
+/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(303);
/* 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__(296);
+/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(304);
/* 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__(297);
+/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(305);
/* 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__(298);
+/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(306);
/* 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__(299);
+/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(307);
/* 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__(300);
+/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(308);
/* 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__(301);
+/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(309);
/* 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__(302);
+/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(310);
/* 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__(303);
+/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(311);
/* 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__(304);
+/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(312);
/* 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__(305);
+/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(313);
/* 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__(274);
+/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(282);
/* 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__(306);
+/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(314);
/* 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__(307);
+/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(315);
/* 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__(308);
+/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(316);
/* 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__(309);
+/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(317);
/* 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__(310);
+/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(318);
/* 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__(311);
+/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(319);
/* 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__(312);
+/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(320);
/* 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__(314);
+/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(322);
/* 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__(315);
+/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(323);
/* 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__(316);
+/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(324);
/* 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__(317);
+/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(325);
/* 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__(318);
+/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(326);
/* 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__(319);
+/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(327);
/* 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__(324);
+/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(332);
/* 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__(325);
+/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(333);
/* 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__(326);
+/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(334);
/* 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__(327);
+/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(335);
/* 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__(328);
+/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(336);
/* 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__(320);
+/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(328);
/* 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__(329);
+/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(337);
/* 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__(330);
+/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(338);
/* 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__(331);
+/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(339);
/* 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__(332);
+/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(340);
/* 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__(219);
+/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(227);
/* 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__(333);
+/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(341);
/* 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__(334);
+/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(342);
/* 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__(335);
+/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(343);
/* 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__(254);
+/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(262);
/* 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__(337);
+/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(345);
/* 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__(338);
+/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(346);
/* 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__(339);
+/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(347);
/* 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__(342);
+/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(350);
/* 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__(275);
+/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(283);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
-/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(276);
+/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(284);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
-/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(343);
+/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(351);
/* 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__(344);
+/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(352);
/* 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__(345);
+/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(353);
/* 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__(346);
+/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(354);
/* 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__(229);
+/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(237);
/* 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__(347);
+/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(355);
/* 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__(348);
+/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(356);
/* 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__(349);
+/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(357);
/* 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__(351);
+/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(359);
/* 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__(352);
+/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(360);
/* 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__(353);
+/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(361);
/* 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__(354);
+/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(362);
/* 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__(355);
+/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(363);
/* 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__(356);
+/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(364);
/* 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__(340);
+/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(348);
/* 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__(357);
+/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(365);
/* 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__(358);
+/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(366);
/* 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__(359);
+/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(367);
/* 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__(360);
+/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(368);
/* 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__(218);
+/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(226);
/* 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__(361);
+/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(369);
/* 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__(362);
+/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(370);
/* 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__(341);
+/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(349);
/* 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__(363);
+/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(371);
/* 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__(364);
+/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(372);
/* 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__(365);
+/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(373);
/* 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__(366);
+/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(374);
/* 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__(367);
+/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(375);
/* 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__(368);
+/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(376);
/* 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__(369);
+/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(377);
/* 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__(370);
+/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(378);
/* 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__(371);
+/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(379);
/* 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__(372);
+/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(380);
/* 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__(374);
+/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(382);
/* 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__(375);
+/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(383);
/* 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__(376);
+/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(384);
/* 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__(323);
+/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(331);
/* 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__(336);
+/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(344);
/* 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__(377);
+/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(385);
/* 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__(378);
+/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(386);
/* 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__(322);
+/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(330);
/* 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__(379);
+/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(387);
/* 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__(380);
+/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(388);
/* 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__(321);
+/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(329);
/* 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__(381);
+/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(389);
/* 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__(382);
+/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(390);
/* 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__(383);
+/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(391);
/* 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__(384);
+/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(392);
/* 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__(385);
+/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(393);
/* 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__(386);
+/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(394);
/* 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__(387);
+/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(395);
/* 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__(388);
+/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(396);
/* 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__(389);
+/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(397);
/* 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__(390);
+/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(398);
/* 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__(391);
+/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(399);
/* 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__(392);
+/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(400);
/* 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__(393);
+/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(401);
/* 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 */
@@ -32358,17 +31788,17 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/* 295 */
+/* 303 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -32441,15 +31871,15 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 296 */
+/* 304 */
/***/ (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__(243);
-/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(295);
-/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(291);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251);
+/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(303);
+/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(299);
/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
@@ -32464,15 +31894,15 @@ function auditTime(duration, scheduler) {
/***/ }),
-/* 297 */
+/* 305 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -32513,14 +31943,14 @@ var BufferSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 298 */
+/* 306 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -32614,16 +32044,16 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 299 */
+/* 307 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(198);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(233);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(241);
/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
@@ -32775,16 +32205,16 @@ function dispatchBufferClose(arg) {
/***/ }),
-/* 300 */
+/* 308 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
@@ -32895,18 +32325,18 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 301 */
+/* 309 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -32992,15 +32422,15 @@ var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 302 */
+/* 310 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -33049,13 +32479,13 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 303 */
+/* 311 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
-/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(256);
+/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(264);
/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
function combineAll(project) {
@@ -33065,15 +32495,15 @@ function combineAll(project) {
/***/ }),
-/* 304 */
+/* 312 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
-/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(256);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(268);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
+/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(264);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(276);
/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
@@ -33097,13 +32527,13 @@ function combineLatest() {
/***/ }),
-/* 305 */
+/* 313 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275);
/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
function concat() {
@@ -33117,13 +32547,13 @@ function concat() {
/***/ }),
-/* 306 */
+/* 314 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276);
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
function concatMap(project, resultSelector) {
@@ -33133,13 +32563,13 @@ function concatMap(project, resultSelector) {
/***/ }),
-/* 307 */
+/* 315 */
/***/ (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__(306);
+/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
function concatMapTo(innerObservable, resultSelector) {
@@ -33149,14 +32579,14 @@ function concatMapTo(innerObservable, resultSelector) {
/***/ }),
-/* 308 */
+/* 316 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -33214,15 +32644,15 @@ var CountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 309 */
+/* 317 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -33302,15 +32732,15 @@ var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 310 */
+/* 318 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
@@ -33378,14 +32808,14 @@ function dispatchNext(subscriber) {
/***/ }),
-/* 311 */
+/* 319 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -33428,17 +32858,17 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 312 */
+/* 320 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(199);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(313);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(321);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(238);
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -33532,7 +32962,7 @@ var DelayMessage = /*@__PURE__*/ (function () {
/***/ }),
-/* 313 */
+/* 321 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -33546,17 +32976,17 @@ function isDate(value) {
/***/ }),
-/* 314 */
+/* 322 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -33687,14 +33117,14 @@ var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 315 */
+/* 323 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -33725,16 +33155,16 @@ var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 316 */
+/* 324 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -33803,16 +33233,16 @@ var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 317 */
+/* 325 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
@@ -33875,13 +33305,13 @@ var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 318 */
+/* 326 */
/***/ (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__(317);
+/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(325);
/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
function distinctUntilKeyChanged(key, compare) {
@@ -33891,17 +33321,17 @@ function distinctUntilKeyChanged(key, compare) {
/***/ }),
-/* 319 */
+/* 327 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(250);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(321);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(311);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(323);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(258);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(328);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(329);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(319);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(331);
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
@@ -33923,14 +33353,14 @@ function elementAt(index, defaultValue) {
/***/ }),
-/* 320 */
+/* 328 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -33977,14 +33407,14 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 321 */
+/* 329 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
-/* harmony import */ var _tap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(322);
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _tap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(330);
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(259);
/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */
@@ -34009,16 +33439,16 @@ function defaultErrorFactory() {
/***/ }),
-/* 322 */
+/* 330 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
-/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(200);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
+/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
@@ -34097,16 +33527,16 @@ var TapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 323 */
+/* 331 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(239);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
@@ -34159,17 +33589,17 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 324 */
+/* 332 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
-/* harmony import */ var _observable_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234);
-/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(236);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(267);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(233);
+/* harmony import */ var _observable_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
+/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(275);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
@@ -34205,14 +33635,14 @@ function endWith() {
/***/ }),
-/* 325 */
+/* 333 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -34267,15 +33697,15 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 326 */
+/* 334 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -34324,17 +33754,17 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 327 */
+/* 335 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(268);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(276);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
@@ -34410,7 +33840,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 328 */
+/* 336 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -34418,11 +33848,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -34526,15 +33956,15 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 329 */
+/* 337 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
@@ -34564,7 +33994,7 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 330 */
+/* 338 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -34572,8 +34002,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -34635,13 +34065,13 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 331 */
+/* 339 */
/***/ (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__(330);
+/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(338);
/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
function findIndex(predicate, thisArg) {
@@ -34651,18 +34081,18 @@ function findIndex(predicate, thisArg) {
/***/ }),
-/* 332 */
+/* 340 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(251);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(323);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(311);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(321);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(248);
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(259);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(328);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(331);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(319);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(329);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(256);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -34678,14 +34108,14 @@ function first(predicate, defaultValue) {
/***/ }),
-/* 333 */
+/* 341 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -34715,14 +34145,14 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 334 */
+/* 342 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -34759,18 +34189,18 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 335 */
+/* 343 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(251);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(336);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(321);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(311);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(248);
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(259);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(328);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(344);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(329);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(256);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -34786,16 +34216,16 @@ function last(predicate, defaultValue) {
/***/ }),
-/* 336 */
+/* 344 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(231);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(239);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
@@ -34863,14 +34293,14 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 337 */
+/* 345 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -34902,15 +34332,15 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 338 */
+/* 346 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(238);
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -34952,13 +34382,13 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 339 */
+/* 347 */
/***/ (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__(340);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(348);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function max(comparer) {
@@ -34971,16 +34401,16 @@ function max(comparer) {
/***/ }),
-/* 340 */
+/* 348 */
/***/ (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__(341);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(336);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(311);
-/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(212);
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(349);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(344);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(319);
+/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(220);
/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
@@ -35002,14 +34432,14 @@ function reduce(accumulator, seed) {
/***/ }),
-/* 341 */
+/* 349 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -35084,13 +34514,13 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 342 */
+/* 350 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
-/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(285);
+/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
function merge() {
@@ -35104,13 +34534,13 @@ function merge() {
/***/ }),
-/* 343 */
+/* 351 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
-/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276);
+/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
function mergeMapTo(innerObservable, resultSelector, concurrent) {
@@ -35129,7 +34559,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) {
/***/ }),
-/* 344 */
+/* 352 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -35137,11 +34567,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(258);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(266);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
@@ -35236,13 +34666,13 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 345 */
+/* 353 */
/***/ (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__(340);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(348);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function min(comparer) {
@@ -35255,14 +34685,14 @@ function min(comparer) {
/***/ }),
-/* 346 */
+/* 354 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
-/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
+/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);
/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
function multicast(subjectOrSubjectFactory, selector) {
@@ -35304,18 +34734,18 @@ var MulticastOperator = /*@__PURE__*/ (function () {
/***/ }),
-/* 347 */
+/* 355 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(276);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -35388,14 +34818,14 @@ var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 348 */
+/* 356 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -35432,14 +34862,14 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 349 */
+/* 357 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
-/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(350);
-/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(320);
+/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(358);
+/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(328);
/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
@@ -35455,7 +34885,7 @@ function partition(predicate, thisArg) {
/***/ }),
-/* 350 */
+/* 358 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -35474,13 +34904,13 @@ function not(pred, thisArg) {
/***/ }),
-/* 351 */
+/* 359 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(254);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(262);
/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
function pluck() {
@@ -35514,14 +34944,14 @@ function plucker(props, length) {
/***/ }),
-/* 352 */
+/* 360 */
/***/ (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__(215);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(346);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(354);
/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
@@ -35534,14 +34964,14 @@ function publish(selector) {
/***/ }),
-/* 353 */
+/* 361 */
/***/ (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__(220);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(346);
+/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(228);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(354);
/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
@@ -35552,14 +34982,14 @@ function publishBehavior(value) {
/***/ }),
-/* 354 */
+/* 362 */
/***/ (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__(238);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(346);
+/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(246);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(354);
/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
@@ -35570,14 +35000,14 @@ function publishLast() {
/***/ }),
-/* 355 */
+/* 363 */
/***/ (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__(221);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(346);
+/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(354);
/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
@@ -35593,14 +35023,14 @@ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
/***/ }),
-/* 356 */
+/* 364 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
-/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
-/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(289);
+/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
+/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(297);
/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
@@ -35620,15 +35050,15 @@ function race() {
/***/ }),
-/* 357 */
+/* 365 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
@@ -35685,18 +35115,18 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 358 */
+/* 366 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -35781,14 +35211,14 @@ var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 359 */
+/* 367 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -35834,18 +35264,18 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 360 */
+/* 368 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -35923,15 +35353,15 @@ var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 361 */
+/* 369 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -35980,15 +35410,15 @@ var SampleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 362 */
+/* 370 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
@@ -36040,7 +35470,7 @@ function dispatchNotification(state) {
/***/ }),
-/* 363 */
+/* 371 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -36048,10 +35478,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
@@ -36159,15 +35589,15 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 364 */
+/* 372 */
/***/ (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__(346);
-/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(354);
+/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
@@ -36182,13 +35612,13 @@ function share() {
/***/ }),
-/* 365 */
+/* 373 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
-/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
+/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
function shareReplay(bufferSize, windowTime, scheduler) {
@@ -36231,15 +35661,15 @@ function shareReplayOperator(bufferSize, windowTime, scheduler) {
/***/ }),
-/* 366 */
+/* 374 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(259);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
@@ -36311,14 +35741,14 @@ var SingleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 367 */
+/* 375 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -36353,15 +35783,15 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 368 */
+/* 376 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(250);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
@@ -36415,15 +35845,15 @@ var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 369 */
+/* 377 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -36467,14 +35897,14 @@ var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 370 */
+/* 378 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -36523,17 +35953,17 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 371 */
+/* 379 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
-/* harmony import */ var _observable_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234);
-/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(236);
-/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
-/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(267);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(233);
+/* harmony import */ var _observable_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
+/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
+/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
+/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(275);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
@@ -36569,13 +35999,13 @@ function startWith() {
/***/ }),
-/* 372 */
+/* 380 */
/***/ (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__(373);
+/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(381);
/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
function subscribeOn(scheduler, delay) {
@@ -36600,16 +36030,16 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () {
/***/ }),
-/* 373 */
+/* 381 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
-/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(284);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
+/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(247);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(292);
/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
@@ -36664,14 +36094,14 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 374 */
+/* 382 */
/***/ (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__(375);
-/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(248);
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(383);
+/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(256);
/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
@@ -36682,17 +36112,17 @@ function switchAll() {
/***/ }),
-/* 375 */
+/* 383 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
-/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(268);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
+/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(276);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
@@ -36766,13 +36196,13 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 376 */
+/* 384 */
/***/ (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__(375);
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(383);
/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
function switchMapTo(innerObservable, resultSelector) {
@@ -36782,15 +36212,15 @@ function switchMapTo(innerObservable, resultSelector) {
/***/ }),
-/* 377 */
+/* 385 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -36829,14 +36259,14 @@ var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 378 */
+/* 386 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
@@ -36887,16 +36317,16 @@ var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 379 */
+/* 387 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -36991,16 +36421,16 @@ var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 380 */
+/* 388 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
-/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(379);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
+/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(387);
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
@@ -37085,17 +36515,17 @@ function dispatchNext(arg) {
/***/ }),
-/* 381 */
+/* 389 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(243);
-/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(341);
-/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(277);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251);
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(349);
+/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(285);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(262);
/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
@@ -37129,16 +36559,16 @@ var TimeInterval = /*@__PURE__*/ (function () {
/***/ }),
-/* 382 */
+/* 390 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(243);
-/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(252);
-/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(383);
-/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(237);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251);
+/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(260);
+/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(391);
+/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(245);
/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
@@ -37154,17 +36584,17 @@ function timeout(due, scheduler) {
/***/ }),
-/* 383 */
+/* 391 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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__(199);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(313);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(321);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -37236,15 +36666,15 @@ var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 384 */
+/* 392 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
-/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251);
+/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
@@ -37266,13 +36696,13 @@ var Timestamp = /*@__PURE__*/ (function () {
/***/ }),
-/* 385 */
+/* 393 */
/***/ (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__(340);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(348);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function toArrayReducer(arr, item, index) {
@@ -37289,16 +36719,16 @@ function toArray() {
/***/ }),
-/* 386 */
+/* 394 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -37369,15 +36799,15 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 387 */
+/* 395 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
@@ -37459,18 +36889,18 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 388 */
+/* 396 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
-/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198);
-/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(284);
-/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(233);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(251);
+/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
+/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(292);
+/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
@@ -37629,19 +37059,19 @@ function dispatchWindowClose(state) {
/***/ }),
-/* 389 */
+/* 397 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -37775,18 +37205,18 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 390 */
+/* 398 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
-/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
-/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
+/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
+/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -37874,15 +37304,15 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 391 */
+/* 399 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
-/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
-/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(257);
-/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(258);
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
+/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(265);
+/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(266);
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -37969,13 +37399,13 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 392 */
+/* 400 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
-/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
+/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(301);
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
function zip() {
@@ -37991,13 +37421,13 @@ function zip() {
/***/ }),
-/* 393 */
+/* 401 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
-/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
+/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(301);
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
function zipAll(project) {
@@ -38007,7 +37437,7 @@ function zipAll(project) {
/***/ }),
-/* 394 */
+/* 402 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -38015,15 +37445,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; });
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(395);
+/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(403);
/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(indent_string__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(396);
+/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(404);
/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(wrap_ansi__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(164);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34);
/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36);
-/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(403);
+/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(411);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -38101,7 +37531,7 @@ function toArray(value) {
}
/***/ }),
-/* 395 */
+/* 403 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38135,13 +37565,13 @@ module.exports = (str, count, opts) => {
/***/ }),
-/* 396 */
+/* 404 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const stringWidth = __webpack_require__(397);
-const stripAnsi = __webpack_require__(401);
+const stringWidth = __webpack_require__(405);
+const stripAnsi = __webpack_require__(409);
const ESCAPES = new Set([
'\u001B',
@@ -38335,13 +37765,13 @@ module.exports = (str, cols, opts) => {
/***/ }),
-/* 397 */
+/* 405 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const stripAnsi = __webpack_require__(398);
-const isFullwidthCodePoint = __webpack_require__(400);
+const stripAnsi = __webpack_require__(406);
+const isFullwidthCodePoint = __webpack_require__(408);
module.exports = str => {
if (typeof str !== 'string' || str.length === 0) {
@@ -38378,18 +37808,18 @@ module.exports = str => {
/***/ }),
-/* 398 */
+/* 406 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const ansiRegex = __webpack_require__(399);
+const ansiRegex = __webpack_require__(407);
module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
/***/ }),
-/* 399 */
+/* 407 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38406,7 +37836,7 @@ module.exports = () => {
/***/ }),
-/* 400 */
+/* 408 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38459,18 +37889,18 @@ module.exports = x => {
/***/ }),
-/* 401 */
+/* 409 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const ansiRegex = __webpack_require__(402);
+const ansiRegex = __webpack_require__(410);
module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
/***/ }),
-/* 402 */
+/* 410 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38487,7 +37917,7 @@ module.exports = () => {
/***/ }),
-/* 403 */
+/* 411 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -38640,15 +38070,15 @@ function addProjectToTree(tree, pathParts, project) {
}
/***/ }),
-/* 404 */
+/* 412 */
/***/ (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__(405);
+/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(413);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _build_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildProductionProjects"]; });
-/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(613);
+/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(620);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; });
/*
@@ -38673,19 +38103,19 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/* 405 */
+/* 413 */
/***/ (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__(406);
+/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(414);
/* 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__(166);
+/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
/* 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__(16);
/* 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__(164);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(172);
/* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34);
/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(55);
@@ -38819,17 +38249,17 @@ async function copyToBuild(project, kibanaRoot, buildRoot) {
}
/***/ }),
-/* 406 */
+/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const EventEmitter = __webpack_require__(46);
const path = __webpack_require__(16);
-const arrify = __webpack_require__(407);
-const globby = __webpack_require__(408);
-const cpFile = __webpack_require__(603);
-const CpyError = __webpack_require__(611);
+const arrify = __webpack_require__(415);
+const globby = __webpack_require__(416);
+const cpFile = __webpack_require__(610);
+const CpyError = __webpack_require__(618);
const preprocessSrcPath = (srcPath, options) => options.cwd ? path.resolve(options.cwd, srcPath) : srcPath;
@@ -38934,7 +38364,7 @@ module.exports.default = cpy;
/***/ }),
-/* 407 */
+/* 415 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38949,17 +38379,17 @@ module.exports = function (val) {
/***/ }),
-/* 408 */
+/* 416 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(23);
-const arrayUnion = __webpack_require__(170);
+const arrayUnion = __webpack_require__(178);
const glob = __webpack_require__(37);
-const fastGlob = __webpack_require__(409);
-const dirGlob = __webpack_require__(596);
-const gitignore = __webpack_require__(599);
+const fastGlob = __webpack_require__(417);
+const dirGlob = __webpack_require__(603);
+const gitignore = __webpack_require__(606);
const DEFAULT_FILTER = () => false;
@@ -39104,10 +38534,10 @@ module.exports.gitignore = gitignore;
/***/ }),
-/* 409 */
+/* 417 */
/***/ (function(module, exports, __webpack_require__) {
-const pkg = __webpack_require__(410);
+const pkg = __webpack_require__(418);
module.exports = pkg.async;
module.exports.default = pkg.async;
@@ -39120,19 +38550,19 @@ module.exports.generateTasks = pkg.generateTasks;
/***/ }),
-/* 410 */
+/* 418 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var optionsManager = __webpack_require__(411);
-var taskManager = __webpack_require__(412);
-var reader_async_1 = __webpack_require__(566);
-var reader_stream_1 = __webpack_require__(590);
-var reader_sync_1 = __webpack_require__(591);
-var arrayUtils = __webpack_require__(593);
-var streamUtils = __webpack_require__(594);
+var optionsManager = __webpack_require__(419);
+var taskManager = __webpack_require__(420);
+var reader_async_1 = __webpack_require__(573);
+var reader_stream_1 = __webpack_require__(597);
+var reader_sync_1 = __webpack_require__(598);
+var arrayUtils = __webpack_require__(600);
+var streamUtils = __webpack_require__(601);
/**
* Synchronous API.
*/
@@ -39198,7 +38628,7 @@ function isString(source) {
/***/ }),
-/* 411 */
+/* 419 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39236,13 +38666,13 @@ exports.prepare = prepare;
/***/ }),
-/* 412 */
+/* 420 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var patternUtils = __webpack_require__(413);
+var patternUtils = __webpack_require__(421);
/**
* Generate tasks based on parent directory of each pattern.
*/
@@ -39333,16 +38763,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask;
/***/ }),
-/* 413 */
+/* 421 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path = __webpack_require__(16);
-var globParent = __webpack_require__(414);
-var isGlob = __webpack_require__(418);
-var micromatch = __webpack_require__(419);
+var globParent = __webpack_require__(422);
+var isGlob = __webpack_require__(426);
+var micromatch = __webpack_require__(427);
var GLOBSTAR = '**';
/**
* Return true for static pattern.
@@ -39488,15 +38918,15 @@ exports.matchAny = matchAny;
/***/ }),
-/* 414 */
+/* 422 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var path = __webpack_require__(16);
-var isglob = __webpack_require__(415);
-var pathDirname = __webpack_require__(417);
+var isglob = __webpack_require__(423);
+var pathDirname = __webpack_require__(425);
var isWin32 = __webpack_require__(11).platform() === 'win32';
module.exports = function globParent(str) {
@@ -39519,7 +38949,7 @@ module.exports = function globParent(str) {
/***/ }),
-/* 415 */
+/* 423 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -39529,7 +38959,7 @@ module.exports = function globParent(str) {
* Licensed under the MIT License.
*/
-var isExtglob = __webpack_require__(416);
+var isExtglob = __webpack_require__(424);
module.exports = function isGlob(str) {
if (typeof str !== 'string' || str === '') {
@@ -39550,7 +38980,7 @@ module.exports = function isGlob(str) {
/***/ }),
-/* 416 */
+/* 424 */
/***/ (function(module, exports) {
/*!
@@ -39576,7 +39006,7 @@ module.exports = function isExtglob(str) {
/***/ }),
-/* 417 */
+/* 425 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39726,7 +39156,7 @@ module.exports.win32 = win32;
/***/ }),
-/* 418 */
+/* 426 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -39736,7 +39166,7 @@ module.exports.win32 = win32;
* Released under the MIT License.
*/
-var isExtglob = __webpack_require__(416);
+var isExtglob = __webpack_require__(424);
var chars = { '{': '}', '(': ')', '[': ']'};
module.exports = function isGlob(str, options) {
@@ -39778,7 +39208,7 @@ module.exports = function isGlob(str, options) {
/***/ }),
-/* 419 */
+/* 427 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39789,18 +39219,18 @@ module.exports = function isGlob(str, options) {
*/
var util = __webpack_require__(29);
-var braces = __webpack_require__(420);
-var toRegex = __webpack_require__(524);
-var extend = __webpack_require__(532);
+var braces = __webpack_require__(428);
+var toRegex = __webpack_require__(531);
+var extend = __webpack_require__(539);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(535);
-var parsers = __webpack_require__(562);
-var cache = __webpack_require__(563);
-var utils = __webpack_require__(564);
+var compilers = __webpack_require__(542);
+var parsers = __webpack_require__(569);
+var cache = __webpack_require__(570);
+var utils = __webpack_require__(571);
var MAX_LENGTH = 1024 * 64;
/**
@@ -40662,7 +40092,7 @@ module.exports = micromatch;
/***/ }),
-/* 420 */
+/* 428 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40672,18 +40102,18 @@ module.exports = micromatch;
* Module dependencies
*/
-var toRegex = __webpack_require__(421);
-var unique = __webpack_require__(433);
-var extend = __webpack_require__(430);
+var toRegex = __webpack_require__(429);
+var unique = __webpack_require__(441);
+var extend = __webpack_require__(438);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(434);
-var parsers = __webpack_require__(449);
-var Braces = __webpack_require__(459);
-var utils = __webpack_require__(435);
+var compilers = __webpack_require__(442);
+var parsers = __webpack_require__(457);
+var Braces = __webpack_require__(467);
+var utils = __webpack_require__(443);
var MAX_LENGTH = 1024 * 64;
var cache = {};
@@ -40987,15 +40417,15 @@ module.exports = braces;
/***/ }),
-/* 421 */
+/* 429 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var define = __webpack_require__(422);
-var extend = __webpack_require__(430);
-var not = __webpack_require__(432);
+var define = __webpack_require__(430);
+var extend = __webpack_require__(438);
+var not = __webpack_require__(440);
var MAX_LENGTH = 1024 * 64;
/**
@@ -41142,7 +40572,7 @@ module.exports.makeRe = makeRe;
/***/ }),
-/* 422 */
+/* 430 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41155,7 +40585,7 @@ module.exports.makeRe = makeRe;
-var isDescriptor = __webpack_require__(423);
+var isDescriptor = __webpack_require__(431);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -41180,7 +40610,7 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 423 */
+/* 431 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41193,9 +40623,9 @@ module.exports = function defineProperty(obj, prop, val) {
-var typeOf = __webpack_require__(424);
-var isAccessor = __webpack_require__(425);
-var isData = __webpack_require__(428);
+var typeOf = __webpack_require__(432);
+var isAccessor = __webpack_require__(433);
+var isData = __webpack_require__(436);
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
@@ -41209,7 +40639,7 @@ module.exports = function isDescriptor(obj, key) {
/***/ }),
-/* 424 */
+/* 432 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -41362,7 +40792,7 @@ function isBuffer(val) {
/***/ }),
-/* 425 */
+/* 433 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41375,7 +40805,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(426);
+var typeOf = __webpack_require__(434);
// accessor descriptor properties
var accessor = {
@@ -41438,10 +40868,10 @@ module.exports = isAccessorDescriptor;
/***/ }),
-/* 426 */
+/* 434 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(427);
+var isBuffer = __webpack_require__(435);
var toString = Object.prototype.toString;
/**
@@ -41560,7 +40990,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 427 */
+/* 435 */
/***/ (function(module, exports) {
/*!
@@ -41587,7 +41017,7 @@ function isSlowBuffer (obj) {
/***/ }),
-/* 428 */
+/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41600,7 +41030,7 @@ function isSlowBuffer (obj) {
-var typeOf = __webpack_require__(429);
+var typeOf = __webpack_require__(437);
// data descriptor properties
var data = {
@@ -41649,10 +41079,10 @@ module.exports = isDataDescriptor;
/***/ }),
-/* 429 */
+/* 437 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(427);
+var isBuffer = __webpack_require__(435);
var toString = Object.prototype.toString;
/**
@@ -41771,13 +41201,13 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 430 */
+/* 438 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(431);
+var isObject = __webpack_require__(439);
module.exports = function extend(o/*, objects*/) {
if (!isObject(o)) { o = {}; }
@@ -41811,7 +41241,7 @@ function hasOwn(obj, key) {
/***/ }),
-/* 431 */
+/* 439 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41831,13 +41261,13 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 432 */
+/* 440 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(430);
+var extend = __webpack_require__(438);
/**
* The main export is a function that takes a `pattern` string and an `options` object.
@@ -41904,7 +41334,7 @@ module.exports = toRegex;
/***/ }),
-/* 433 */
+/* 441 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41954,13 +41384,13 @@ module.exports.immutable = function uniqueImmutable(arr) {
/***/ }),
-/* 434 */
+/* 442 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var utils = __webpack_require__(435);
+var utils = __webpack_require__(443);
module.exports = function(braces, options) {
braces.compiler
@@ -42243,25 +41673,25 @@ function hasQueue(node) {
/***/ }),
-/* 435 */
+/* 443 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var splitString = __webpack_require__(436);
+var splitString = __webpack_require__(444);
var utils = module.exports;
/**
* Module dependencies
*/
-utils.extend = __webpack_require__(430);
-utils.flatten = __webpack_require__(442);
-utils.isObject = __webpack_require__(440);
-utils.fillRange = __webpack_require__(443);
-utils.repeat = __webpack_require__(448);
-utils.unique = __webpack_require__(433);
+utils.extend = __webpack_require__(438);
+utils.flatten = __webpack_require__(450);
+utils.isObject = __webpack_require__(448);
+utils.fillRange = __webpack_require__(451);
+utils.repeat = __webpack_require__(456);
+utils.unique = __webpack_require__(441);
utils.define = function(obj, key, val) {
Object.defineProperty(obj, key, {
@@ -42593,7 +42023,7 @@ utils.escapeRegex = function(str) {
/***/ }),
-/* 436 */
+/* 444 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42606,7 +42036,7 @@ utils.escapeRegex = function(str) {
-var extend = __webpack_require__(437);
+var extend = __webpack_require__(445);
module.exports = function(str, options, fn) {
if (typeof str !== 'string') {
@@ -42771,14 +42201,14 @@ function keepEscaping(opts, str, idx) {
/***/ }),
-/* 437 */
+/* 445 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(438);
-var assignSymbols = __webpack_require__(441);
+var isExtendable = __webpack_require__(446);
+var assignSymbols = __webpack_require__(449);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -42838,7 +42268,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 438 */
+/* 446 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42851,7 +42281,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(439);
+var isPlainObject = __webpack_require__(447);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -42859,7 +42289,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 439 */
+/* 447 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42872,7 +42302,7 @@ module.exports = function isExtendable(val) {
-var isObject = __webpack_require__(440);
+var isObject = __webpack_require__(448);
function isObjectObject(o) {
return isObject(o) === true
@@ -42903,7 +42333,7 @@ module.exports = function isPlainObject(o) {
/***/ }),
-/* 440 */
+/* 448 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42922,7 +42352,7 @@ module.exports = function isObject(val) {
/***/ }),
-/* 441 */
+/* 449 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42969,7 +42399,7 @@ module.exports = function(receiver, objects) {
/***/ }),
-/* 442 */
+/* 450 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -42998,7 +42428,7 @@ function flat(arr, res) {
/***/ }),
-/* 443 */
+/* 451 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -43012,10 +42442,10 @@ function flat(arr, res) {
var util = __webpack_require__(29);
-var isNumber = __webpack_require__(444);
-var extend = __webpack_require__(430);
-var repeat = __webpack_require__(446);
-var toRegex = __webpack_require__(447);
+var isNumber = __webpack_require__(452);
+var extend = __webpack_require__(438);
+var repeat = __webpack_require__(454);
+var toRegex = __webpack_require__(455);
/**
* Return a range of numbers or letters.
@@ -43213,7 +42643,7 @@ module.exports = fillRange;
/***/ }),
-/* 444 */
+/* 452 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -43226,7 +42656,7 @@ module.exports = fillRange;
-var typeOf = __webpack_require__(445);
+var typeOf = __webpack_require__(453);
module.exports = function isNumber(num) {
var type = typeOf(num);
@@ -43242,10 +42672,10 @@ module.exports = function isNumber(num) {
/***/ }),
-/* 445 */
+/* 453 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(427);
+var isBuffer = __webpack_require__(435);
var toString = Object.prototype.toString;
/**
@@ -43364,7 +42794,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 446 */
+/* 454 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -43441,7 +42871,7 @@ function repeat(str, num) {
/***/ }),
-/* 447 */
+/* 455 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -43454,8 +42884,8 @@ function repeat(str, num) {
-var repeat = __webpack_require__(446);
-var isNumber = __webpack_require__(444);
+var repeat = __webpack_require__(454);
+var isNumber = __webpack_require__(452);
var cache = {};
function toRegexRange(min, max, options) {
@@ -43742,7 +43172,7 @@ module.exports = toRegexRange;
/***/ }),
-/* 448 */
+/* 456 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -43767,14 +43197,14 @@ module.exports = function repeat(ele, num) {
/***/ }),
-/* 449 */
+/* 457 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var Node = __webpack_require__(450);
-var utils = __webpack_require__(435);
+var Node = __webpack_require__(458);
+var utils = __webpack_require__(443);
/**
* Braces parsers
@@ -44134,15 +43564,15 @@ function concatNodes(pos, node, parent, options) {
/***/ }),
-/* 450 */
+/* 458 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(440);
-var define = __webpack_require__(451);
-var utils = __webpack_require__(458);
+var isObject = __webpack_require__(448);
+var define = __webpack_require__(459);
+var utils = __webpack_require__(466);
var ownNames;
/**
@@ -44633,7 +44063,7 @@ exports = module.exports = Node;
/***/ }),
-/* 451 */
+/* 459 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -44646,7 +44076,7 @@ exports = module.exports = Node;
-var isDescriptor = __webpack_require__(452);
+var isDescriptor = __webpack_require__(460);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -44671,7 +44101,7 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 452 */
+/* 460 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -44684,9 +44114,9 @@ module.exports = function defineProperty(obj, prop, val) {
-var typeOf = __webpack_require__(453);
-var isAccessor = __webpack_require__(454);
-var isData = __webpack_require__(456);
+var typeOf = __webpack_require__(461);
+var isAccessor = __webpack_require__(462);
+var isData = __webpack_require__(464);
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
@@ -44700,7 +44130,7 @@ module.exports = function isDescriptor(obj, key) {
/***/ }),
-/* 453 */
+/* 461 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -44835,7 +44265,7 @@ function isBuffer(val) {
/***/ }),
-/* 454 */
+/* 462 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -44848,7 +44278,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(455);
+var typeOf = __webpack_require__(463);
// accessor descriptor properties
var accessor = {
@@ -44911,7 +44341,7 @@ module.exports = isAccessorDescriptor;
/***/ }),
-/* 455 */
+/* 463 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -45046,7 +44476,7 @@ function isBuffer(val) {
/***/ }),
-/* 456 */
+/* 464 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -45059,7 +44489,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(457);
+var typeOf = __webpack_require__(465);
module.exports = function isDataDescriptor(obj, prop) {
// data descriptor properties
@@ -45102,7 +44532,7 @@ module.exports = function isDataDescriptor(obj, prop) {
/***/ }),
-/* 457 */
+/* 465 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -45237,13 +44667,13 @@ function isBuffer(val) {
/***/ }),
-/* 458 */
+/* 466 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var typeOf = __webpack_require__(445);
+var typeOf = __webpack_require__(453);
var utils = module.exports;
/**
@@ -46263,17 +45693,17 @@ function assert(val, message) {
/***/ }),
-/* 459 */
+/* 467 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(430);
-var Snapdragon = __webpack_require__(460);
-var compilers = __webpack_require__(434);
-var parsers = __webpack_require__(449);
-var utils = __webpack_require__(435);
+var extend = __webpack_require__(438);
+var Snapdragon = __webpack_require__(468);
+var compilers = __webpack_require__(442);
+var parsers = __webpack_require__(457);
+var utils = __webpack_require__(443);
/**
* Customize Snapdragon parser and renderer
@@ -46374,17 +45804,17 @@ module.exports = Braces;
/***/ }),
-/* 460 */
+/* 468 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var Base = __webpack_require__(461);
-var define = __webpack_require__(422);
-var Compiler = __webpack_require__(491);
-var Parser = __webpack_require__(521);
-var utils = __webpack_require__(501);
+var Base = __webpack_require__(469);
+var define = __webpack_require__(430);
+var Compiler = __webpack_require__(498);
+var Parser = __webpack_require__(528);
+var utils = __webpack_require__(508);
var regexCache = {};
var cache = {};
@@ -46555,20 +45985,20 @@ module.exports.Parser = Parser;
/***/ }),
-/* 461 */
+/* 469 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(29);
-var define = __webpack_require__(462);
-var CacheBase = __webpack_require__(463);
-var Emitter = __webpack_require__(464);
-var isObject = __webpack_require__(440);
-var merge = __webpack_require__(482);
-var pascal = __webpack_require__(485);
-var cu = __webpack_require__(486);
+var define = __webpack_require__(470);
+var CacheBase = __webpack_require__(471);
+var Emitter = __webpack_require__(472);
+var isObject = __webpack_require__(448);
+var merge = __webpack_require__(489);
+var pascal = __webpack_require__(492);
+var cu = __webpack_require__(493);
/**
* Optionally define a custom `cache` namespace to use.
@@ -46997,7 +46427,7 @@ module.exports.namespace = namespace;
/***/ }),
-/* 462 */
+/* 470 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47010,7 +46440,7 @@ module.exports.namespace = namespace;
-var isDescriptor = __webpack_require__(452);
+var isDescriptor = __webpack_require__(460);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -47035,21 +46465,21 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 463 */
+/* 471 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(440);
-var Emitter = __webpack_require__(464);
-var visit = __webpack_require__(465);
-var toPath = __webpack_require__(468);
-var union = __webpack_require__(469);
-var del = __webpack_require__(473);
-var get = __webpack_require__(471);
-var has = __webpack_require__(478);
-var set = __webpack_require__(481);
+var isObject = __webpack_require__(448);
+var Emitter = __webpack_require__(472);
+var visit = __webpack_require__(473);
+var toPath = __webpack_require__(476);
+var union = __webpack_require__(477);
+var del = __webpack_require__(481);
+var get = __webpack_require__(479);
+var has = __webpack_require__(486);
+var set = __webpack_require__(480);
/**
* Create a `Cache` constructor that when instantiated will
@@ -47303,7 +46733,7 @@ module.exports.namespace = namespace;
/***/ }),
-/* 464 */
+/* 472 */
/***/ (function(module, exports, __webpack_require__) {
@@ -47472,7 +46902,7 @@ Emitter.prototype.hasListeners = function(event){
/***/ }),
-/* 465 */
+/* 473 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47485,8 +46915,8 @@ Emitter.prototype.hasListeners = function(event){
-var visit = __webpack_require__(466);
-var mapVisit = __webpack_require__(467);
+var visit = __webpack_require__(474);
+var mapVisit = __webpack_require__(475);
module.exports = function(collection, method, val) {
var result;
@@ -47509,7 +46939,7 @@ module.exports = function(collection, method, val) {
/***/ }),
-/* 466 */
+/* 474 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47522,7 +46952,7 @@ module.exports = function(collection, method, val) {
-var isObject = __webpack_require__(440);
+var isObject = __webpack_require__(448);
module.exports = function visit(thisArg, method, target, val) {
if (!isObject(thisArg) && typeof thisArg !== 'function') {
@@ -47549,14 +46979,14 @@ module.exports = function visit(thisArg, method, target, val) {
/***/ }),
-/* 467 */
+/* 475 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(29);
-var visit = __webpack_require__(466);
+var visit = __webpack_require__(474);
/**
* Map `visit` over an array of objects.
@@ -47593,7 +47023,7 @@ function isObject(val) {
/***/ }),
-/* 468 */
+/* 476 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47606,7 +47036,7 @@ function isObject(val) {
-var typeOf = __webpack_require__(445);
+var typeOf = __webpack_require__(453);
module.exports = function toPath(args) {
if (typeOf(args) !== 'arguments') {
@@ -47633,16 +47063,16 @@ function filter(arr) {
/***/ }),
-/* 469 */
+/* 477 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(431);
-var union = __webpack_require__(470);
-var get = __webpack_require__(471);
-var set = __webpack_require__(472);
+var isObject = __webpack_require__(439);
+var union = __webpack_require__(478);
+var get = __webpack_require__(479);
+var set = __webpack_require__(480);
module.exports = function unionValue(obj, prop, value) {
if (!isObject(obj)) {
@@ -47670,7 +47100,7 @@ function arrayify(val) {
/***/ }),
-/* 470 */
+/* 478 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47706,7 +47136,7 @@ module.exports = function union(init) {
/***/ }),
-/* 471 */
+/* 479 */
/***/ (function(module, exports) {
/*!
@@ -47762,7 +47192,7 @@ function toString(val) {
/***/ }),
-/* 472 */
+/* 480 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47775,64 +47205,56 @@ function toString(val) {
-var toPath = __webpack_require__(468);
-var extend = __webpack_require__(430);
-var isPlainObject = __webpack_require__(439);
-var isObject = __webpack_require__(431);
+var split = __webpack_require__(444);
+var extend = __webpack_require__(438);
+var isPlainObject = __webpack_require__(447);
+var isObject = __webpack_require__(439);
-module.exports = function(obj, path, val) {
+module.exports = function(obj, prop, val) {
if (!isObject(obj)) {
return obj;
}
- if (Array.isArray(path)) {
- path = toPath(path);
+ if (Array.isArray(prop)) {
+ prop = [].concat.apply([], prop).join('.');
}
- if (typeof path !== 'string') {
+ if (typeof prop !== 'string') {
return obj;
}
- var segs = path.split('.');
- var len = segs.length, i = -1;
- var res = obj;
- var last;
-
- while (++i < len) {
- var key = segs[i];
-
- while (key[key.length - 1] === '\\') {
- key = key.slice(0, -1) + '.' + segs[++i];
- }
-
- if (i === len - 1) {
- last = key;
- break;
- }
+ var keys = split(prop, {sep: '.', brackets: true}).filter(isValidKey);
+ var len = keys.length;
+ var idx = -1;
+ var current = obj;
- if (!isObject(obj[key])) {
- obj[key] = {};
+ while (++idx < len) {
+ var key = keys[idx];
+ if (idx !== len - 1) {
+ if (!isObject(current[key])) {
+ current[key] = {};
+ }
+ current = current[key];
+ continue;
}
- obj = obj[key];
- }
- if (obj.hasOwnProperty(last) && isObject(obj[last])) {
- if (isPlainObject(val)) {
- extend(obj[last], val);
+ if (isPlainObject(current[key]) && isPlainObject(val)) {
+ current[key] = extend({}, current[key], val);
} else {
- obj[last] = val;
+ current[key] = val;
}
-
- } else {
- obj[last] = val;
}
- return res;
+
+ return obj;
};
+function isValidKey(key) {
+ return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';
+}
/***/ }),
-/* 473 */
+/* 481 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47845,8 +47267,8 @@ module.exports = function(obj, path, val) {
-var isObject = __webpack_require__(440);
-var has = __webpack_require__(474);
+var isObject = __webpack_require__(448);
+var has = __webpack_require__(482);
module.exports = function unset(obj, prop) {
if (!isObject(obj)) {
@@ -47871,7 +47293,7 @@ module.exports = function unset(obj, prop) {
/***/ }),
-/* 474 */
+/* 482 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47884,9 +47306,9 @@ module.exports = function unset(obj, prop) {
-var isObject = __webpack_require__(475);
-var hasValues = __webpack_require__(477);
-var get = __webpack_require__(471);
+var isObject = __webpack_require__(483);
+var hasValues = __webpack_require__(485);
+var get = __webpack_require__(479);
module.exports = function(obj, prop, noZero) {
if (isObject(obj)) {
@@ -47897,7 +47319,7 @@ module.exports = function(obj, prop, noZero) {
/***/ }),
-/* 475 */
+/* 483 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47910,7 +47332,7 @@ module.exports = function(obj, prop, noZero) {
-var isArray = __webpack_require__(476);
+var isArray = __webpack_require__(484);
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && isArray(val) === false;
@@ -47918,7 +47340,7 @@ module.exports = function isObject(val) {
/***/ }),
-/* 476 */
+/* 484 */
/***/ (function(module, exports) {
var toString = {}.toString;
@@ -47929,7 +47351,7 @@ module.exports = Array.isArray || function (arr) {
/***/ }),
-/* 477 */
+/* 485 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47972,7 +47394,7 @@ module.exports = function hasValue(o, noZero) {
/***/ }),
-/* 478 */
+/* 486 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47985,9 +47407,9 @@ module.exports = function hasValue(o, noZero) {
-var isObject = __webpack_require__(440);
-var hasValues = __webpack_require__(479);
-var get = __webpack_require__(471);
+var isObject = __webpack_require__(448);
+var hasValues = __webpack_require__(487);
+var get = __webpack_require__(479);
module.exports = function(val, prop) {
return hasValues(isObject(val) && prop ? get(val, prop) : val);
@@ -47995,7 +47417,7 @@ module.exports = function(val, prop) {
/***/ }),
-/* 479 */
+/* 487 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48008,8 +47430,8 @@ module.exports = function(val, prop) {
-var typeOf = __webpack_require__(480);
-var isNumber = __webpack_require__(444);
+var typeOf = __webpack_require__(488);
+var isNumber = __webpack_require__(452);
module.exports = function hasValue(val) {
// is-number checks for NaN and other edge cases
@@ -48062,10 +47484,10 @@ module.exports = function hasValue(val) {
/***/ }),
-/* 480 */
+/* 488 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(427);
+var isBuffer = __webpack_require__(435);
var toString = Object.prototype.toString;
/**
@@ -48187,72 +47609,14 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 481 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*!
- * set-value
- *
- * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
- * Released under the MIT License.
- */
-
-
-
-var split = __webpack_require__(436);
-var extend = __webpack_require__(430);
-var isPlainObject = __webpack_require__(439);
-var isObject = __webpack_require__(431);
-
-module.exports = function(obj, prop, val) {
- if (!isObject(obj)) {
- return obj;
- }
-
- if (Array.isArray(prop)) {
- prop = [].concat.apply([], prop).join('.');
- }
-
- if (typeof prop !== 'string') {
- return obj;
- }
-
- var keys = split(prop, {sep: '.', brackets: true});
- var len = keys.length;
- var idx = -1;
- var current = obj;
-
- while (++idx < len) {
- var key = keys[idx];
- if (idx !== len - 1) {
- if (!isObject(current[key])) {
- current[key] = {};
- }
- current = current[key];
- continue;
- }
-
- if (isPlainObject(current[key]) && isPlainObject(val)) {
- current[key] = extend({}, current[key], val);
- } else {
- current[key] = val;
- }
- }
-
- return obj;
-};
-
-
-/***/ }),
-/* 482 */
+/* 489 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(483);
-var forIn = __webpack_require__(484);
+var isExtendable = __webpack_require__(490);
+var forIn = __webpack_require__(491);
function mixinDeep(target, objects) {
var len = arguments.length, i = 0;
@@ -48316,7 +47680,7 @@ module.exports = mixinDeep;
/***/ }),
-/* 483 */
+/* 490 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48329,7 +47693,7 @@ module.exports = mixinDeep;
-var isPlainObject = __webpack_require__(439);
+var isPlainObject = __webpack_require__(447);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -48337,7 +47701,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 484 */
+/* 491 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48360,7 +47724,7 @@ module.exports = function forIn(obj, fn, thisArg) {
/***/ }),
-/* 485 */
+/* 492 */
/***/ (function(module, exports) {
/*!
@@ -48387,14 +47751,14 @@ module.exports = pascalcase;
/***/ }),
-/* 486 */
+/* 493 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(29);
-var utils = __webpack_require__(487);
+var utils = __webpack_require__(494);
/**
* Expose class utils
@@ -48759,7 +48123,7 @@ cu.bubble = function(Parent, events) {
/***/ }),
-/* 487 */
+/* 494 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48773,10 +48137,10 @@ var utils = {};
* Lazily required module dependencies
*/
-utils.union = __webpack_require__(470);
-utils.define = __webpack_require__(422);
-utils.isObj = __webpack_require__(440);
-utils.staticExtend = __webpack_require__(488);
+utils.union = __webpack_require__(478);
+utils.define = __webpack_require__(430);
+utils.isObj = __webpack_require__(448);
+utils.staticExtend = __webpack_require__(495);
/**
@@ -48787,7 +48151,7 @@ module.exports = utils;
/***/ }),
-/* 488 */
+/* 495 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48800,8 +48164,8 @@ module.exports = utils;
-var copy = __webpack_require__(489);
-var define = __webpack_require__(422);
+var copy = __webpack_require__(496);
+var define = __webpack_require__(430);
var util = __webpack_require__(29);
/**
@@ -48884,15 +48248,15 @@ module.exports = extend;
/***/ }),
-/* 489 */
+/* 496 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var typeOf = __webpack_require__(445);
-var copyDescriptor = __webpack_require__(490);
-var define = __webpack_require__(422);
+var typeOf = __webpack_require__(453);
+var copyDescriptor = __webpack_require__(497);
+var define = __webpack_require__(430);
/**
* Copy static properties, prototype properties, and descriptors from one object to another.
@@ -49065,7 +48429,7 @@ module.exports.has = has;
/***/ }),
-/* 490 */
+/* 497 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -49153,16 +48517,16 @@ function isObject(val) {
/***/ }),
-/* 491 */
+/* 498 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var use = __webpack_require__(492);
-var define = __webpack_require__(422);
-var debug = __webpack_require__(494)('snapdragon:compiler');
-var utils = __webpack_require__(501);
+var use = __webpack_require__(499);
+var define = __webpack_require__(430);
+var debug = __webpack_require__(501)('snapdragon:compiler');
+var utils = __webpack_require__(508);
/**
* Create a new `Compiler` with the given `options`.
@@ -49316,7 +48680,7 @@ Compiler.prototype = {
// source map support
if (opts.sourcemap) {
- var sourcemaps = __webpack_require__(520);
+ var sourcemaps = __webpack_require__(527);
sourcemaps(this);
this.mapVisit(this.ast.nodes);
this.applySourceMaps();
@@ -49337,7 +48701,7 @@ module.exports = Compiler;
/***/ }),
-/* 492 */
+/* 499 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -49350,7 +48714,7 @@ module.exports = Compiler;
-var utils = __webpack_require__(493);
+var utils = __webpack_require__(500);
module.exports = function base(app, opts) {
if (!utils.isObject(app) && typeof app !== 'function') {
@@ -49465,7 +48829,7 @@ module.exports = function base(app, opts) {
/***/ }),
-/* 493 */
+/* 500 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -49479,8 +48843,8 @@ var utils = {};
* Lazily required module dependencies
*/
-utils.define = __webpack_require__(422);
-utils.isObject = __webpack_require__(440);
+utils.define = __webpack_require__(430);
+utils.isObject = __webpack_require__(448);
utils.isString = function(val) {
@@ -49495,7 +48859,7 @@ module.exports = utils;
/***/ }),
-/* 494 */
+/* 501 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -49504,14 +48868,14 @@ module.exports = utils;
*/
if (typeof process !== 'undefined' && process.type === 'renderer') {
- module.exports = __webpack_require__(495);
+ module.exports = __webpack_require__(502);
} else {
- module.exports = __webpack_require__(498);
+ module.exports = __webpack_require__(505);
}
/***/ }),
-/* 495 */
+/* 502 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -49520,7 +48884,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') {
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(496);
+exports = module.exports = __webpack_require__(503);
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
@@ -49702,7 +49066,7 @@ function localstorage() {
/***/ }),
-/* 496 */
+/* 503 */
/***/ (function(module, exports, __webpack_require__) {
@@ -49718,7 +49082,7 @@ exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;
-exports.humanize = __webpack_require__(497);
+exports.humanize = __webpack_require__(504);
/**
* The currently active debug mode names, and names to skip.
@@ -49910,7 +49274,7 @@ function coerce(val) {
/***/ }),
-/* 497 */
+/* 504 */
/***/ (function(module, exports) {
/**
@@ -50068,14 +49432,14 @@ function plural(ms, n, name) {
/***/ }),
-/* 498 */
+/* 505 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Module dependencies.
*/
-var tty = __webpack_require__(499);
+var tty = __webpack_require__(506);
var util = __webpack_require__(29);
/**
@@ -50084,7 +49448,7 @@ var util = __webpack_require__(29);
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(496);
+exports = module.exports = __webpack_require__(503);
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
@@ -50263,7 +49627,7 @@ function createWritableStdioStream (fd) {
case 'PIPE':
case 'TCP':
- var net = __webpack_require__(500);
+ var net = __webpack_require__(507);
stream = new net.Socket({
fd: fd,
readable: false,
@@ -50322,19 +49686,19 @@ exports.enable(load());
/***/ }),
-/* 499 */
+/* 506 */
/***/ (function(module, exports) {
module.exports = require("tty");
/***/ }),
-/* 500 */
+/* 507 */
/***/ (function(module, exports) {
module.exports = require("net");
/***/ }),
-/* 501 */
+/* 508 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50344,9 +49708,9 @@ module.exports = require("net");
* Module dependencies
*/
-exports.extend = __webpack_require__(430);
-exports.SourceMap = __webpack_require__(502);
-exports.sourceMapResolve = __webpack_require__(513);
+exports.extend = __webpack_require__(438);
+exports.SourceMap = __webpack_require__(509);
+exports.sourceMapResolve = __webpack_require__(520);
/**
* Convert backslash in the given string to forward slashes
@@ -50389,7 +49753,7 @@ exports.last = function(arr, n) {
/***/ }),
-/* 502 */
+/* 509 */
/***/ (function(module, exports, __webpack_require__) {
/*
@@ -50397,13 +49761,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__(503).SourceMapGenerator;
-exports.SourceMapConsumer = __webpack_require__(509).SourceMapConsumer;
-exports.SourceNode = __webpack_require__(512).SourceNode;
+exports.SourceMapGenerator = __webpack_require__(510).SourceMapGenerator;
+exports.SourceMapConsumer = __webpack_require__(516).SourceMapConsumer;
+exports.SourceNode = __webpack_require__(519).SourceNode;
/***/ }),
-/* 503 */
+/* 510 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -50413,10 +49777,10 @@ exports.SourceNode = __webpack_require__(512).SourceNode;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var base64VLQ = __webpack_require__(504);
-var util = __webpack_require__(506);
-var ArraySet = __webpack_require__(507).ArraySet;
-var MappingList = __webpack_require__(508).MappingList;
+var base64VLQ = __webpack_require__(511);
+var util = __webpack_require__(513);
+var ArraySet = __webpack_require__(514).ArraySet;
+var MappingList = __webpack_require__(515).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@@ -50825,7 +50189,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
/***/ }),
-/* 504 */
+/* 511 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -50865,7 +50229,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var base64 = __webpack_require__(505);
+var base64 = __webpack_require__(512);
// 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,
@@ -50971,7 +50335,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
/***/ }),
-/* 505 */
+/* 512 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -51044,7 +50408,7 @@ exports.decode = function (charCode) {
/***/ }),
-/* 506 */
+/* 513 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -51467,7 +50831,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate
/***/ }),
-/* 507 */
+/* 514 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -51477,7 +50841,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(506);
+var util = __webpack_require__(513);
var has = Object.prototype.hasOwnProperty;
var hasNativeMap = typeof Map !== "undefined";
@@ -51594,7 +50958,7 @@ exports.ArraySet = ArraySet;
/***/ }),
-/* 508 */
+/* 515 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -51604,7 +50968,7 @@ exports.ArraySet = ArraySet;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(506);
+var util = __webpack_require__(513);
/**
* Determine whether mappingB is after mappingA with respect to generated
@@ -51679,7 +51043,7 @@ exports.MappingList = MappingList;
/***/ }),
-/* 509 */
+/* 516 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -51689,11 +51053,11 @@ exports.MappingList = MappingList;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(506);
-var binarySearch = __webpack_require__(510);
-var ArraySet = __webpack_require__(507).ArraySet;
-var base64VLQ = __webpack_require__(504);
-var quickSort = __webpack_require__(511).quickSort;
+var util = __webpack_require__(513);
+var binarySearch = __webpack_require__(517);
+var ArraySet = __webpack_require__(514).ArraySet;
+var base64VLQ = __webpack_require__(511);
+var quickSort = __webpack_require__(518).quickSort;
function SourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
@@ -52767,7 +52131,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
/***/ }),
-/* 510 */
+/* 517 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -52884,7 +52248,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
/***/ }),
-/* 511 */
+/* 518 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -53004,7 +52368,7 @@ exports.quickSort = function (ary, comparator) {
/***/ }),
-/* 512 */
+/* 519 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -53014,8 +52378,8 @@ exports.quickSort = function (ary, comparator) {
* http://opensource.org/licenses/BSD-3-Clause
*/
-var SourceMapGenerator = __webpack_require__(503).SourceMapGenerator;
-var util = __webpack_require__(506);
+var SourceMapGenerator = __webpack_require__(510).SourceMapGenerator;
+var util = __webpack_require__(513);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).
@@ -53423,17 +52787,17 @@ exports.SourceNode = SourceNode;
/***/ }),
-/* 513 */
+/* 520 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014, 2015, 2016, 2017 Simon Lydell
// X11 (“MIT”) Licensed. (See LICENSE.)
-var sourceMappingURL = __webpack_require__(514)
-var resolveUrl = __webpack_require__(515)
-var decodeUriComponent = __webpack_require__(516)
-var urix = __webpack_require__(518)
-var atob = __webpack_require__(519)
+var sourceMappingURL = __webpack_require__(521)
+var resolveUrl = __webpack_require__(522)
+var decodeUriComponent = __webpack_require__(523)
+var urix = __webpack_require__(525)
+var atob = __webpack_require__(526)
@@ -53731,7 +53095,7 @@ module.exports = {
/***/ }),
-/* 514 */
+/* 521 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell
@@ -53794,7 +53158,7 @@ void (function(root, factory) {
/***/ }),
-/* 515 */
+/* 522 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014 Simon Lydell
@@ -53812,13 +53176,13 @@ module.exports = resolveUrl
/***/ }),
-/* 516 */
+/* 523 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2017 Simon Lydell
// X11 (“MIT”) Licensed. (See LICENSE.)
-var decodeUriComponent = __webpack_require__(517)
+var decodeUriComponent = __webpack_require__(524)
function customDecodeUriComponent(string) {
// `decodeUriComponent` turns `+` into ` `, but that's not wanted.
@@ -53829,7 +53193,7 @@ module.exports = customDecodeUriComponent
/***/ }),
-/* 517 */
+/* 524 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53930,7 +53294,7 @@ module.exports = function (encodedURI) {
/***/ }),
-/* 518 */
+/* 525 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014 Simon Lydell
@@ -53953,7 +53317,7 @@ module.exports = urix
/***/ }),
-/* 519 */
+/* 526 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53967,7 +53331,7 @@ module.exports = atob.atob = atob;
/***/ }),
-/* 520 */
+/* 527 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53975,8 +53339,8 @@ module.exports = atob.atob = atob;
var fs = __webpack_require__(23);
var path = __webpack_require__(16);
-var define = __webpack_require__(422);
-var utils = __webpack_require__(501);
+var define = __webpack_require__(430);
+var utils = __webpack_require__(508);
/**
* Expose `mixin()`.
@@ -54119,19 +53483,19 @@ exports.comment = function(node) {
/***/ }),
-/* 521 */
+/* 528 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var use = __webpack_require__(492);
+var use = __webpack_require__(499);
var util = __webpack_require__(29);
-var Cache = __webpack_require__(522);
-var define = __webpack_require__(422);
-var debug = __webpack_require__(494)('snapdragon:parser');
-var Position = __webpack_require__(523);
-var utils = __webpack_require__(501);
+var Cache = __webpack_require__(529);
+var define = __webpack_require__(430);
+var debug = __webpack_require__(501)('snapdragon:parser');
+var Position = __webpack_require__(530);
+var utils = __webpack_require__(508);
/**
* Create a new `Parser` with the given `input` and `options`.
@@ -54659,7 +54023,7 @@ module.exports = Parser;
/***/ }),
-/* 522 */
+/* 529 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -54766,13 +54130,13 @@ MapCache.prototype.del = function mapDelete(key) {
/***/ }),
-/* 523 */
+/* 530 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var define = __webpack_require__(422);
+var define = __webpack_require__(430);
/**
* Store position for a node
@@ -54787,16 +54151,16 @@ module.exports = function Position(start, parser) {
/***/ }),
-/* 524 */
+/* 531 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var safe = __webpack_require__(525);
-var define = __webpack_require__(531);
-var extend = __webpack_require__(532);
-var not = __webpack_require__(534);
+var safe = __webpack_require__(532);
+var define = __webpack_require__(538);
+var extend = __webpack_require__(539);
+var not = __webpack_require__(541);
var MAX_LENGTH = 1024 * 64;
/**
@@ -54949,10 +54313,10 @@ module.exports.makeRe = makeRe;
/***/ }),
-/* 525 */
+/* 532 */
/***/ (function(module, exports, __webpack_require__) {
-var parse = __webpack_require__(526);
+var parse = __webpack_require__(533);
var types = parse.types;
module.exports = function (re, opts) {
@@ -54998,13 +54362,13 @@ function isRegExp (x) {
/***/ }),
-/* 526 */
+/* 533 */
/***/ (function(module, exports, __webpack_require__) {
-var util = __webpack_require__(527);
-var types = __webpack_require__(528);
-var sets = __webpack_require__(529);
-var positions = __webpack_require__(530);
+var util = __webpack_require__(534);
+var types = __webpack_require__(535);
+var sets = __webpack_require__(536);
+var positions = __webpack_require__(537);
module.exports = function(regexpStr) {
@@ -55286,11 +54650,11 @@ module.exports.types = types;
/***/ }),
-/* 527 */
+/* 534 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(528);
-var sets = __webpack_require__(529);
+var types = __webpack_require__(535);
+var sets = __webpack_require__(536);
// All of these are private and only used by randexp.
@@ -55403,7 +54767,7 @@ exports.error = function(regexp, msg) {
/***/ }),
-/* 528 */
+/* 535 */
/***/ (function(module, exports) {
module.exports = {
@@ -55419,10 +54783,10 @@ module.exports = {
/***/ }),
-/* 529 */
+/* 536 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(528);
+var types = __webpack_require__(535);
var INTS = function() {
return [{ type: types.RANGE , from: 48, to: 57 }];
@@ -55507,10 +54871,10 @@ exports.anyChar = function() {
/***/ }),
-/* 530 */
+/* 537 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(528);
+var types = __webpack_require__(535);
exports.wordBoundary = function() {
return { type: types.POSITION, value: 'b' };
@@ -55530,7 +54894,7 @@ exports.end = function() {
/***/ }),
-/* 531 */
+/* 538 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55543,8 +54907,8 @@ exports.end = function() {
-var isobject = __webpack_require__(440);
-var isDescriptor = __webpack_require__(452);
+var isobject = __webpack_require__(448);
+var isDescriptor = __webpack_require__(460);
var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)
? Reflect.defineProperty
: Object.defineProperty;
@@ -55575,14 +54939,14 @@ module.exports = function defineProperty(obj, key, val) {
/***/ }),
-/* 532 */
+/* 539 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(533);
-var assignSymbols = __webpack_require__(441);
+var isExtendable = __webpack_require__(540);
+var assignSymbols = __webpack_require__(449);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -55642,7 +55006,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 533 */
+/* 540 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55655,7 +55019,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(439);
+var isPlainObject = __webpack_require__(447);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -55663,14 +55027,14 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 534 */
+/* 541 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(532);
-var safe = __webpack_require__(525);
+var extend = __webpack_require__(539);
+var safe = __webpack_require__(532);
/**
* The main export is a function that takes a `pattern` string and an `options` object.
@@ -55742,14 +55106,14 @@ module.exports = toRegex;
/***/ }),
-/* 535 */
+/* 542 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var nanomatch = __webpack_require__(536);
-var extglob = __webpack_require__(551);
+var nanomatch = __webpack_require__(543);
+var extglob = __webpack_require__(558);
module.exports = function(snapdragon) {
var compilers = snapdragon.compiler.compilers;
@@ -55826,7 +55190,7 @@ function escapeExtglobs(compiler) {
/***/ }),
-/* 536 */
+/* 543 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55837,17 +55201,17 @@ function escapeExtglobs(compiler) {
*/
var util = __webpack_require__(29);
-var toRegex = __webpack_require__(421);
-var extend = __webpack_require__(537);
+var toRegex = __webpack_require__(429);
+var extend = __webpack_require__(544);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(539);
-var parsers = __webpack_require__(540);
-var cache = __webpack_require__(543);
-var utils = __webpack_require__(545);
+var compilers = __webpack_require__(546);
+var parsers = __webpack_require__(547);
+var cache = __webpack_require__(550);
+var utils = __webpack_require__(552);
var MAX_LENGTH = 1024 * 64;
/**
@@ -56671,14 +56035,14 @@ module.exports = nanomatch;
/***/ }),
-/* 537 */
+/* 544 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(538);
-var assignSymbols = __webpack_require__(441);
+var isExtendable = __webpack_require__(545);
+var assignSymbols = __webpack_require__(449);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -56738,7 +56102,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 538 */
+/* 545 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -56751,7 +56115,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(439);
+var isPlainObject = __webpack_require__(447);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -56759,7 +56123,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 539 */
+/* 546 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57105,15 +56469,15 @@ module.exports = function(nanomatch, options) {
/***/ }),
-/* 540 */
+/* 547 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var regexNot = __webpack_require__(432);
-var toRegex = __webpack_require__(421);
-var isOdd = __webpack_require__(541);
+var regexNot = __webpack_require__(440);
+var toRegex = __webpack_require__(429);
+var isOdd = __webpack_require__(548);
/**
* Characters to use in negation regex (we want to "not" match
@@ -57499,7 +56863,7 @@ module.exports.not = NOT_REGEX;
/***/ }),
-/* 541 */
+/* 548 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57512,7 +56876,7 @@ module.exports.not = NOT_REGEX;
-var isNumber = __webpack_require__(542);
+var isNumber = __webpack_require__(549);
module.exports = function isOdd(i) {
if (!isNumber(i)) {
@@ -57526,7 +56890,7 @@ module.exports = function isOdd(i) {
/***/ }),
-/* 542 */
+/* 549 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57554,14 +56918,14 @@ module.exports = function isNumber(num) {
/***/ }),
-/* 543 */
+/* 550 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = new (__webpack_require__(544))();
+module.exports = new (__webpack_require__(551))();
/***/ }),
-/* 544 */
+/* 551 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57574,7 +56938,7 @@ module.exports = new (__webpack_require__(544))();
-var MapCache = __webpack_require__(522);
+var MapCache = __webpack_require__(529);
/**
* Create a new `FragmentCache` with an optional object to use for `caches`.
@@ -57696,7 +57060,7 @@ exports = module.exports = FragmentCache;
/***/ }),
-/* 545 */
+/* 552 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57709,14 +57073,14 @@ var path = __webpack_require__(16);
* Module dependencies
*/
-var isWindows = __webpack_require__(546)();
-var Snapdragon = __webpack_require__(460);
-utils.define = __webpack_require__(547);
-utils.diff = __webpack_require__(548);
-utils.extend = __webpack_require__(537);
-utils.pick = __webpack_require__(549);
-utils.typeOf = __webpack_require__(550);
-utils.unique = __webpack_require__(433);
+var isWindows = __webpack_require__(553)();
+var Snapdragon = __webpack_require__(468);
+utils.define = __webpack_require__(554);
+utils.diff = __webpack_require__(555);
+utils.extend = __webpack_require__(544);
+utils.pick = __webpack_require__(556);
+utils.typeOf = __webpack_require__(557);
+utils.unique = __webpack_require__(441);
/**
* Returns true if the given value is effectively an empty string
@@ -58082,7 +57446,7 @@ utils.unixify = function(options) {
/***/ }),
-/* 546 */
+/* 553 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -58110,7 +57474,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/***/ }),
-/* 547 */
+/* 554 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58123,8 +57487,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
-var isobject = __webpack_require__(440);
-var isDescriptor = __webpack_require__(452);
+var isobject = __webpack_require__(448);
+var isDescriptor = __webpack_require__(460);
var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)
? Reflect.defineProperty
: Object.defineProperty;
@@ -58155,7 +57519,7 @@ module.exports = function defineProperty(obj, key, val) {
/***/ }),
-/* 548 */
+/* 555 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58209,7 +57573,7 @@ function diffArray(one, two) {
/***/ }),
-/* 549 */
+/* 556 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58222,7 +57586,7 @@ function diffArray(one, two) {
-var isObject = __webpack_require__(440);
+var isObject = __webpack_require__(448);
module.exports = function pick(obj, keys) {
if (!isObject(obj) && typeof obj !== 'function') {
@@ -58251,7 +57615,7 @@ module.exports = function pick(obj, keys) {
/***/ }),
-/* 550 */
+/* 557 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -58386,7 +57750,7 @@ function isBuffer(val) {
/***/ }),
-/* 551 */
+/* 558 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58396,18 +57760,18 @@ function isBuffer(val) {
* Module dependencies
*/
-var extend = __webpack_require__(430);
-var unique = __webpack_require__(433);
-var toRegex = __webpack_require__(421);
+var extend = __webpack_require__(438);
+var unique = __webpack_require__(441);
+var toRegex = __webpack_require__(429);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(552);
-var parsers = __webpack_require__(558);
-var Extglob = __webpack_require__(561);
-var utils = __webpack_require__(560);
+var compilers = __webpack_require__(559);
+var parsers = __webpack_require__(565);
+var Extglob = __webpack_require__(568);
+var utils = __webpack_require__(567);
var MAX_LENGTH = 1024 * 64;
/**
@@ -58724,13 +58088,13 @@ module.exports = extglob;
/***/ }),
-/* 552 */
+/* 559 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var brackets = __webpack_require__(553);
+var brackets = __webpack_require__(560);
/**
* Extglob compilers
@@ -58900,7 +58264,7 @@ module.exports = function(extglob) {
/***/ }),
-/* 553 */
+/* 560 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58910,17 +58274,17 @@ module.exports = function(extglob) {
* Local dependencies
*/
-var compilers = __webpack_require__(554);
-var parsers = __webpack_require__(556);
+var compilers = __webpack_require__(561);
+var parsers = __webpack_require__(563);
/**
* Module dependencies
*/
-var debug = __webpack_require__(494)('expand-brackets');
-var extend = __webpack_require__(430);
-var Snapdragon = __webpack_require__(460);
-var toRegex = __webpack_require__(421);
+var debug = __webpack_require__(501)('expand-brackets');
+var extend = __webpack_require__(438);
+var Snapdragon = __webpack_require__(468);
+var toRegex = __webpack_require__(429);
/**
* Parses the given POSIX character class `pattern` and returns a
@@ -59118,13 +58482,13 @@ module.exports = brackets;
/***/ }),
-/* 554 */
+/* 561 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var posix = __webpack_require__(555);
+var posix = __webpack_require__(562);
module.exports = function(brackets) {
brackets.compiler
@@ -59212,7 +58576,7 @@ module.exports = function(brackets) {
/***/ }),
-/* 555 */
+/* 562 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59241,14 +58605,14 @@ module.exports = {
/***/ }),
-/* 556 */
+/* 563 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var utils = __webpack_require__(557);
-var define = __webpack_require__(422);
+var utils = __webpack_require__(564);
+var define = __webpack_require__(430);
/**
* Text regex
@@ -59467,14 +58831,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX;
/***/ }),
-/* 557 */
+/* 564 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var toRegex = __webpack_require__(421);
-var regexNot = __webpack_require__(432);
+var toRegex = __webpack_require__(429);
+var regexNot = __webpack_require__(440);
var cached;
/**
@@ -59508,15 +58872,15 @@ exports.createRegex = function(pattern, include) {
/***/ }),
-/* 558 */
+/* 565 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var brackets = __webpack_require__(553);
-var define = __webpack_require__(559);
-var utils = __webpack_require__(560);
+var brackets = __webpack_require__(560);
+var define = __webpack_require__(566);
+var utils = __webpack_require__(567);
/**
* Characters to use in text regex (we want to "not" match
@@ -59671,7 +59035,7 @@ module.exports = parsers;
/***/ }),
-/* 559 */
+/* 566 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59684,7 +59048,7 @@ module.exports = parsers;
-var isDescriptor = __webpack_require__(452);
+var isDescriptor = __webpack_require__(460);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -59709,14 +59073,14 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 560 */
+/* 567 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var regex = __webpack_require__(432);
-var Cache = __webpack_require__(544);
+var regex = __webpack_require__(440);
+var Cache = __webpack_require__(551);
/**
* Utils
@@ -59785,7 +59149,7 @@ utils.createRegex = function(str) {
/***/ }),
-/* 561 */
+/* 568 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59795,16 +59159,16 @@ utils.createRegex = function(str) {
* Module dependencies
*/
-var Snapdragon = __webpack_require__(460);
-var define = __webpack_require__(559);
-var extend = __webpack_require__(430);
+var Snapdragon = __webpack_require__(468);
+var define = __webpack_require__(566);
+var extend = __webpack_require__(438);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(552);
-var parsers = __webpack_require__(558);
+var compilers = __webpack_require__(559);
+var parsers = __webpack_require__(565);
/**
* Customize Snapdragon parser and renderer
@@ -59870,16 +59234,16 @@ module.exports = Extglob;
/***/ }),
-/* 562 */
+/* 569 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extglob = __webpack_require__(551);
-var nanomatch = __webpack_require__(536);
-var regexNot = __webpack_require__(432);
-var toRegex = __webpack_require__(524);
+var extglob = __webpack_require__(558);
+var nanomatch = __webpack_require__(543);
+var regexNot = __webpack_require__(440);
+var toRegex = __webpack_require__(531);
var not;
/**
@@ -59960,14 +59324,14 @@ function textRegex(pattern) {
/***/ }),
-/* 563 */
+/* 570 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = new (__webpack_require__(544))();
+module.exports = new (__webpack_require__(551))();
/***/ }),
-/* 564 */
+/* 571 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59980,13 +59344,13 @@ var path = __webpack_require__(16);
* Module dependencies
*/
-var Snapdragon = __webpack_require__(460);
-utils.define = __webpack_require__(531);
-utils.diff = __webpack_require__(548);
-utils.extend = __webpack_require__(532);
-utils.pick = __webpack_require__(549);
-utils.typeOf = __webpack_require__(565);
-utils.unique = __webpack_require__(433);
+var Snapdragon = __webpack_require__(468);
+utils.define = __webpack_require__(538);
+utils.diff = __webpack_require__(555);
+utils.extend = __webpack_require__(539);
+utils.pick = __webpack_require__(556);
+utils.typeOf = __webpack_require__(572);
+utils.unique = __webpack_require__(441);
/**
* Returns true if the platform is windows, or `path.sep` is `\\`.
@@ -60283,7 +59647,7 @@ utils.unixify = function(options) {
/***/ }),
-/* 565 */
+/* 572 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -60418,7 +59782,7 @@ function isBuffer(val) {
/***/ }),
-/* 566 */
+/* 573 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60437,9 +59801,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var readdir = __webpack_require__(567);
-var reader_1 = __webpack_require__(580);
-var fs_stream_1 = __webpack_require__(584);
+var readdir = __webpack_require__(574);
+var reader_1 = __webpack_require__(587);
+var fs_stream_1 = __webpack_require__(591);
var ReaderAsync = /** @class */ (function (_super) {
__extends(ReaderAsync, _super);
function ReaderAsync() {
@@ -60500,15 +59864,15 @@ exports.default = ReaderAsync;
/***/ }),
-/* 567 */
+/* 574 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const readdirSync = __webpack_require__(568);
-const readdirAsync = __webpack_require__(576);
-const readdirStream = __webpack_require__(579);
+const readdirSync = __webpack_require__(575);
+const readdirAsync = __webpack_require__(583);
+const readdirStream = __webpack_require__(586);
module.exports = exports = readdirAsyncPath;
exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath;
@@ -60592,7 +59956,7 @@ function readdirStreamStat (dir, options) {
/***/ }),
-/* 568 */
+/* 575 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60600,11 +59964,11 @@ function readdirStreamStat (dir, options) {
module.exports = readdirSync;
-const DirectoryReader = __webpack_require__(569);
+const DirectoryReader = __webpack_require__(576);
let syncFacade = {
- fs: __webpack_require__(574),
- forEach: __webpack_require__(575),
+ fs: __webpack_require__(581),
+ forEach: __webpack_require__(582),
sync: true
};
@@ -60633,7 +59997,7 @@ function readdirSync (dir, options, internalOptions) {
/***/ }),
-/* 569 */
+/* 576 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60642,9 +60006,9 @@ function readdirSync (dir, options, internalOptions) {
const Readable = __webpack_require__(28).Readable;
const EventEmitter = __webpack_require__(46).EventEmitter;
const path = __webpack_require__(16);
-const normalizeOptions = __webpack_require__(570);
-const stat = __webpack_require__(572);
-const call = __webpack_require__(573);
+const normalizeOptions = __webpack_require__(577);
+const stat = __webpack_require__(579);
+const call = __webpack_require__(580);
/**
* Asynchronously reads the contents of a directory and streams the results
@@ -61020,14 +60384,14 @@ module.exports = DirectoryReader;
/***/ }),
-/* 570 */
+/* 577 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
-const globToRegExp = __webpack_require__(571);
+const globToRegExp = __webpack_require__(578);
module.exports = normalizeOptions;
@@ -61204,7 +60568,7 @@ function normalizeOptions (options, internalOptions) {
/***/ }),
-/* 571 */
+/* 578 */
/***/ (function(module, exports) {
module.exports = function (glob, opts) {
@@ -61341,13 +60705,13 @@ module.exports = function (glob, opts) {
/***/ }),
-/* 572 */
+/* 579 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const call = __webpack_require__(573);
+const call = __webpack_require__(580);
module.exports = stat;
@@ -61422,7 +60786,7 @@ function symlinkStat (fs, path, lstats, callback) {
/***/ }),
-/* 573 */
+/* 580 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61483,14 +60847,14 @@ function callOnce (fn) {
/***/ }),
-/* 574 */
+/* 581 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(23);
-const call = __webpack_require__(573);
+const call = __webpack_require__(580);
/**
* A facade around {@link fs.readdirSync} that allows it to be called
@@ -61554,7 +60918,7 @@ exports.lstat = function (path, callback) {
/***/ }),
-/* 575 */
+/* 582 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61583,7 +60947,7 @@ function syncForEach (array, iterator, done) {
/***/ }),
-/* 576 */
+/* 583 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61591,12 +60955,12 @@ function syncForEach (array, iterator, done) {
module.exports = readdirAsync;
-const maybe = __webpack_require__(577);
-const DirectoryReader = __webpack_require__(569);
+const maybe = __webpack_require__(584);
+const DirectoryReader = __webpack_require__(576);
let asyncFacade = {
fs: __webpack_require__(23),
- forEach: __webpack_require__(578),
+ forEach: __webpack_require__(585),
async: true
};
@@ -61638,7 +61002,7 @@ function readdirAsync (dir, options, callback, internalOptions) {
/***/ }),
-/* 577 */
+/* 584 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61665,7 +61029,7 @@ module.exports = function maybe (cb, promise) {
/***/ }),
-/* 578 */
+/* 585 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61701,7 +61065,7 @@ function asyncForEach (array, iterator, done) {
/***/ }),
-/* 579 */
+/* 586 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61709,11 +61073,11 @@ function asyncForEach (array, iterator, done) {
module.exports = readdirStream;
-const DirectoryReader = __webpack_require__(569);
+const DirectoryReader = __webpack_require__(576);
let streamFacade = {
fs: __webpack_require__(23),
- forEach: __webpack_require__(578),
+ forEach: __webpack_require__(585),
async: true
};
@@ -61733,16 +61097,16 @@ function readdirStream (dir, options, internalOptions) {
/***/ }),
-/* 580 */
+/* 587 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path = __webpack_require__(16);
-var deep_1 = __webpack_require__(581);
-var entry_1 = __webpack_require__(583);
-var pathUtil = __webpack_require__(582);
+var deep_1 = __webpack_require__(588);
+var entry_1 = __webpack_require__(590);
+var pathUtil = __webpack_require__(589);
var Reader = /** @class */ (function () {
function Reader(options) {
this.options = options;
@@ -61808,14 +61172,14 @@ exports.default = Reader;
/***/ }),
-/* 581 */
+/* 588 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var pathUtils = __webpack_require__(582);
-var patternUtils = __webpack_require__(413);
+var pathUtils = __webpack_require__(589);
+var patternUtils = __webpack_require__(421);
var DeepFilter = /** @class */ (function () {
function DeepFilter(options, micromatchOptions) {
this.options = options;
@@ -61898,7 +61262,7 @@ exports.default = DeepFilter;
/***/ }),
-/* 582 */
+/* 589 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61929,14 +61293,14 @@ exports.makeAbsolute = makeAbsolute;
/***/ }),
-/* 583 */
+/* 590 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var pathUtils = __webpack_require__(582);
-var patternUtils = __webpack_require__(413);
+var pathUtils = __webpack_require__(589);
+var patternUtils = __webpack_require__(421);
var EntryFilter = /** @class */ (function () {
function EntryFilter(options, micromatchOptions) {
this.options = options;
@@ -62021,7 +61385,7 @@ exports.default = EntryFilter;
/***/ }),
-/* 584 */
+/* 591 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62041,8 +61405,8 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var stream = __webpack_require__(28);
-var fsStat = __webpack_require__(585);
-var fs_1 = __webpack_require__(589);
+var fsStat = __webpack_require__(592);
+var fs_1 = __webpack_require__(596);
var FileSystemStream = /** @class */ (function (_super) {
__extends(FileSystemStream, _super);
function FileSystemStream() {
@@ -62092,14 +61456,14 @@ exports.default = FileSystemStream;
/***/ }),
-/* 585 */
+/* 592 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const optionsManager = __webpack_require__(586);
-const statProvider = __webpack_require__(588);
+const optionsManager = __webpack_require__(593);
+const statProvider = __webpack_require__(595);
/**
* Asynchronous API.
*/
@@ -62130,13 +61494,13 @@ exports.statSync = statSync;
/***/ }),
-/* 586 */
+/* 593 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const fsAdapter = __webpack_require__(587);
+const fsAdapter = __webpack_require__(594);
function prepare(opts) {
const options = Object.assign({
fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined),
@@ -62149,7 +61513,7 @@ exports.prepare = prepare;
/***/ }),
-/* 587 */
+/* 594 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62172,7 +61536,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter;
/***/ }),
-/* 588 */
+/* 595 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62224,7 +61588,7 @@ exports.isFollowedSymlink = isFollowedSymlink;
/***/ }),
-/* 589 */
+/* 596 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62255,7 +61619,7 @@ exports.default = FileSystem;
/***/ }),
-/* 590 */
+/* 597 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62275,9 +61639,9 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var stream = __webpack_require__(28);
-var readdir = __webpack_require__(567);
-var reader_1 = __webpack_require__(580);
-var fs_stream_1 = __webpack_require__(584);
+var readdir = __webpack_require__(574);
+var reader_1 = __webpack_require__(587);
+var fs_stream_1 = __webpack_require__(591);
var TransformStream = /** @class */ (function (_super) {
__extends(TransformStream, _super);
function TransformStream(reader) {
@@ -62345,7 +61709,7 @@ exports.default = ReaderStream;
/***/ }),
-/* 591 */
+/* 598 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62364,9 +61728,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var readdir = __webpack_require__(567);
-var reader_1 = __webpack_require__(580);
-var fs_sync_1 = __webpack_require__(592);
+var readdir = __webpack_require__(574);
+var reader_1 = __webpack_require__(587);
+var fs_sync_1 = __webpack_require__(599);
var ReaderSync = /** @class */ (function (_super) {
__extends(ReaderSync, _super);
function ReaderSync() {
@@ -62426,7 +61790,7 @@ exports.default = ReaderSync;
/***/ }),
-/* 592 */
+/* 599 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62445,8 +61809,8 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var fsStat = __webpack_require__(585);
-var fs_1 = __webpack_require__(589);
+var fsStat = __webpack_require__(592);
+var fs_1 = __webpack_require__(596);
var FileSystemSync = /** @class */ (function (_super) {
__extends(FileSystemSync, _super);
function FileSystemSync() {
@@ -62492,7 +61856,7 @@ exports.default = FileSystemSync;
/***/ }),
-/* 593 */
+/* 600 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62508,13 +61872,13 @@ exports.flatten = flatten;
/***/ }),
-/* 594 */
+/* 601 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var merge2 = __webpack_require__(595);
+var merge2 = __webpack_require__(602);
/**
* Merge multiple streams and propagate their errors into one stream in parallel.
*/
@@ -62529,7 +61893,7 @@ exports.merge = merge;
/***/ }),
-/* 595 */
+/* 602 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62643,13 +62007,13 @@ function pauseStreams (streams, options) {
/***/ }),
-/* 596 */
+/* 603 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
-const pathType = __webpack_require__(597);
+const pathType = __webpack_require__(604);
const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0];
@@ -62715,13 +62079,13 @@ module.exports.sync = (input, opts) => {
/***/ }),
-/* 597 */
+/* 604 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(23);
-const pify = __webpack_require__(598);
+const pify = __webpack_require__(605);
function type(fn, fn2, fp) {
if (typeof fp !== 'string') {
@@ -62764,7 +62128,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
/***/ }),
-/* 598 */
+/* 605 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62855,17 +62219,17 @@ module.exports = (obj, opts) => {
/***/ }),
-/* 599 */
+/* 606 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(23);
const path = __webpack_require__(16);
-const fastGlob = __webpack_require__(409);
-const gitIgnore = __webpack_require__(600);
-const pify = __webpack_require__(601);
-const slash = __webpack_require__(602);
+const fastGlob = __webpack_require__(417);
+const gitIgnore = __webpack_require__(607);
+const pify = __webpack_require__(608);
+const slash = __webpack_require__(609);
const DEFAULT_IGNORE = [
'**/node_modules/**',
@@ -62963,7 +62327,7 @@ module.exports.sync = options => {
/***/ }),
-/* 600 */
+/* 607 */
/***/ (function(module, exports) {
// A simple implementation of make-array
@@ -63432,7 +62796,7 @@ module.exports = options => new IgnoreBase(options)
/***/ }),
-/* 601 */
+/* 608 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63507,7 +62871,7 @@ module.exports = (input, options) => {
/***/ }),
-/* 602 */
+/* 609 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63525,17 +62889,17 @@ module.exports = input => {
/***/ }),
-/* 603 */
+/* 610 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(16);
const {constants: fsConstants} = __webpack_require__(23);
-const {Buffer} = __webpack_require__(604);
-const CpFileError = __webpack_require__(606);
-const fs = __webpack_require__(608);
-const ProgressEmitter = __webpack_require__(610);
+const {Buffer} = __webpack_require__(611);
+const CpFileError = __webpack_require__(613);
+const fs = __webpack_require__(615);
+const ProgressEmitter = __webpack_require__(617);
const cpFile = (source, destination, options) => {
if (!source || !destination) {
@@ -63689,11 +63053,11 @@ module.exports.sync = (source, destination, options) => {
/***/ }),
-/* 604 */
+/* 611 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint-disable node/no-deprecated-api */
-var buffer = __webpack_require__(605)
+var buffer = __webpack_require__(612)
var Buffer = buffer.Buffer
// alternative to using Object.keys for old browsers
@@ -63757,18 +63121,18 @@ SafeBuffer.allocUnsafeSlow = function (size) {
/***/ }),
-/* 605 */
+/* 612 */
/***/ (function(module, exports) {
module.exports = require("buffer");
/***/ }),
-/* 606 */
+/* 613 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const NestedError = __webpack_require__(607);
+const NestedError = __webpack_require__(614);
class CpFileError extends NestedError {
constructor(message, nested) {
@@ -63782,7 +63146,7 @@ module.exports = CpFileError;
/***/ }),
-/* 607 */
+/* 614 */
/***/ (function(module, exports, __webpack_require__) {
var inherits = __webpack_require__(44);
@@ -63836,15 +63200,15 @@ module.exports = NestedError;
/***/ }),
-/* 608 */
+/* 615 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(22);
const makeDir = __webpack_require__(115);
-const pify = __webpack_require__(609);
-const CpFileError = __webpack_require__(606);
+const pify = __webpack_require__(616);
+const CpFileError = __webpack_require__(613);
const fsP = pify(fs);
@@ -63989,7 +63353,7 @@ if (fs.copyFileSync) {
/***/ }),
-/* 609 */
+/* 616 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64064,7 +63428,7 @@ module.exports = (input, options) => {
/***/ }),
-/* 610 */
+/* 617 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64105,12 +63469,12 @@ module.exports = ProgressEmitter;
/***/ }),
-/* 611 */
+/* 618 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const NestedError = __webpack_require__(612);
+const NestedError = __webpack_require__(619);
class CpyError extends NestedError {
constructor(message, nested) {
@@ -64124,7 +63488,7 @@ module.exports = CpyError;
/***/ }),
-/* 612 */
+/* 619 */
/***/ (function(module, exports, __webpack_require__) {
var inherits = __webpack_require__(29).inherits;
@@ -64180,7 +63544,7 @@ module.exports = NestedError;
/***/ }),
-/* 613 */
+/* 620 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json
index 8480e74ceb3a..9d258af96996 100644
--- a/packages/kbn-pm/package.json
+++ b/packages/kbn-pm/package.json
@@ -18,7 +18,6 @@
"@types/cmd-shim": "^2.0.0",
"@types/cpy": "^5.1.0",
"@types/dedent": "^0.7.0",
- "@types/execa": "^0.9.0",
"@types/getopts": "^2.0.1",
"@types/glob": "^5.0.35",
"@types/globby": "^6.1.0",
@@ -41,7 +40,7 @@
"cpy": "^7.3.0",
"dedent": "^0.7.0",
"del": "^4.1.1",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"getopts": "^2.2.4",
"glob": "^7.1.2",
"globby": "^8.0.1",
diff --git a/packages/kbn-pm/src/utils/child_process.ts b/packages/kbn-pm/src/utils/child_process.ts
index 9b4b7b2516f1..784446924a8d 100644
--- a/packages/kbn-pm/src/utils/child_process.ts
+++ b/packages/kbn-pm/src/utils/child_process.ts
@@ -34,6 +34,7 @@ function generateColors() {
export function spawn(command: string, args: string[], opts: execa.Options) {
return execa(command, args, {
stdio: 'inherit',
+ preferLocal: true,
...opts,
});
}
@@ -48,6 +49,7 @@ export function spawnStreaming(
) {
const spawned = execa(command, args, {
stdio: ['ignore', 'pipe', 'pipe'],
+ preferLocal: true,
...opts,
});
diff --git a/packages/kbn-test/src/functional_tests/tasks.js b/packages/kbn-test/src/functional_tests/tasks.js
index 6ebc49679fbf..d50f6a15c2e0 100644
--- a/packages/kbn-test/src/functional_tests/tasks.js
+++ b/packages/kbn-test/src/functional_tests/tasks.js
@@ -82,12 +82,20 @@ export async function runTests(options) {
await withProcRunner(log, async procs => {
const config = await readConfigFile(log, configPath);
- const es = await runElasticsearch({ config, options: opts });
- await runKibanaServer({ procs, config, options: opts });
- await runFtr({ configPath, options: opts });
-
- await procs.stop('kibana');
- await es.cleanup();
+ let es;
+ try {
+ es = await runElasticsearch({ config, options: opts });
+ await runKibanaServer({ procs, config, options: opts });
+ await runFtr({ configPath, options: opts });
+ } finally {
+ try {
+ await procs.stop('kibana');
+ } finally {
+ if (es) {
+ await es.cleanup();
+ }
+ }
+ }
});
}
}
diff --git a/renovate.json5 b/renovate.json5
index 21af4ad1e83f..12e101fd31d7 100644
--- a/renovate.json5
+++ b/renovate.json5
@@ -353,14 +353,6 @@
'@types/elasticsearch',
],
},
- {
- groupSlug: 'execa',
- groupName: 'execa related packages',
- packageNames: [
- 'execa',
- '@types/execa',
- ],
- },
{
groupSlug: 'fetch-mock',
groupName: 'fetch-mock related packages',
diff --git a/src/core/MIGRATION.md b/src/core/MIGRATION.md
index 09158295fde0..6a12b587085e 100644
--- a/src/core/MIGRATION.md
+++ b/src/core/MIGRATION.md
@@ -1,35 +1,56 @@
# Migrating legacy plugins to the new platform
-* [Overview](#overview)
- * [Architecture](#architecture)
- * [Services](#services)
- * [Integrating with other plugins](#integrating-with-other-plugins)
- * [Challenges to overcome with legacy plugins](#challenges-to-overcome-with-legacy-plugins)
- * [Plan of action](#plan-of-action)
-* [Server-side plan of action](#server-side-plan-of-action)
- * [De-couple from hapi.js server and request objects](#de-couple-from-hapijs-server-and-request-objects)
- * [Introduce new plugin definition shim](#introduce-new-plugin-definition-shim)
- * [Switch to new platform services](#switch-to-new-platform-services)
- * [Migrate to the new plugin system](#migrate-to-the-new-plugin-system)
-* [Browser-side plan of action](#browser-side-plan-of-action)
- * [Move UI modules into plugins](#move-ui-modules-into-plugins)
- * [Provide plugin extension points decoupled from angular.js](#provide-plugin-extension-points-decoupled-from-angularjs)
- * [Move all webpack alias imports into uiExport entry files](#move-all-webpack-alias-imports-into-uiexport-entry-files)
- * [Switch to new platform services](#switch-to-new-platform-services-1)
- * [Migrate to the new plugin system](#migrate-to-the-new-plugin-system-1)
-* [Frequently asked questions](#frequently-asked-questions)
- * [Is migrating a plugin an all-or-nothing thing?](#is-migrating-a-plugin-an-all-or-nothing-thing)
- * [Do plugins need to be converted to TypeScript?](#do-plugins-need-to-be-converted-to-typescript)
- * [Can static code be shared between plugins?](#can-static-code-be-shared-between-plugins)
- * [How can I avoid passing Core services deeply within my UI component tree?](#how-can-i-avoid-passing-core-services-deeply-within-my-ui-component-tree)
- * [How is "common" code shared on both the client and server?](#how-is-common-code-shared-on-both-the-client-and-server)
- * [When does code go into a plugin, core, or packages?](#when-does-code-go-into-a-plugin-core-or-packages)
- * [How do I build my shim for New Platform services?](#how-do-i-build-my-shim-for-new-platform-services)
- * aka, where did everything move to?
-* [How to](#how-to)
- * [Configure plugin](#configure-plugin)
- * [Mock new platform services in tests](#mock-new-platform-services-in-tests)
- * [Provide Legacy Platform API to the New platform plugin](#provide-legacy-platform-api-to-the-new-platform-plugin)
+- [Migrating legacy plugins to the new platform](#migrating-legacy-plugins-to-the-new-platform)
+ - [Overview](#overview)
+ - [Architecture](#architecture)
+ - [Services](#services)
+ - [Integrating with other plugins](#integrating-with-other-plugins)
+ - [Challenges to overcome with legacy plugins](#challenges-to-overcome-with-legacy-plugins)
+ - [Challenges on the server](#challenges-on-the-server)
+ - [Challenges in the browser](#challenges-in-the-browser)
+ - [Plan of action](#plan-of-action)
+ - [Server-side plan of action](#server-side-plan-of-action)
+ - [De-couple from hapi.js server and request objects](#de-couple-from-hapijs-server-and-request-objects)
+ - [Introduce new plugin definition shim](#introduce-new-plugin-definition-shim)
+ - [Switch to new platform services](#switch-to-new-platform-services)
+ - [Migrate to the new plugin system](#migrate-to-the-new-plugin-system)
+ - [Browser-side plan of action](#browser-side-plan-of-action)
+ - [1. Create a plugin definition file](#1-create-a-plugin-definition-file)
+ - [2. Export all static code and types from `public/index.ts`](#2-export-all-static-code-and-types-from-publicindexts)
+ - [3. Export your runtime contract](#3-export-your-runtime-contract)
+ - [4. Move "owned" UI modules into your plugin and expose them from your public contract](#4-move-owned-ui-modules-into-your-plugin-and-expose-them-from-your-public-contract)
+ - [5. Provide plugin extension points decoupled from angular.js](#5-provide-plugin-extension-points-decoupled-from-angularjs)
+ - [6. Move all webpack alias imports into uiExport entry files](#6-move-all-webpack-alias-imports-into-uiexport-entry-files)
+ - [7. Switch to new platform services](#7-switch-to-new-platform-services)
+ - [8. Migrate to the new plugin system](#8-migrate-to-the-new-plugin-system)
+ - [Bonus: Tips for complex migration scenarios](#bonus-tips-for-complex-migration-scenarios)
+ - [Frequently asked questions](#frequently-asked-questions)
+ - [Is migrating a plugin an all-or-nothing thing?](#is-migrating-a-plugin-an-all-or-nothing-thing)
+ - [Do plugins need to be converted to TypeScript?](#do-plugins-need-to-be-converted-to-typescript)
+ - [Can static code be shared between plugins?](#can-static-code-be-shared-between-plugins)
+ - [Background](#background)
+ - [What goes wrong if I do share modules with state?](#what-goes-wrong-if-i-do-share-modules-with-state)
+ - [How to decide what code can be statically imported](#how-to-decide-what-code-can-be-statically-imported)
+ - [Concrete Example](#concrete-example)
+ - [How can I avoid passing Core services deeply within my UI component tree?](#how-can-i-avoid-passing-core-services-deeply-within-my-ui-component-tree)
+ - [How is "common" code shared on both the client and server?](#how-is-common-code-shared-on-both-the-client-and-server)
+ - [When does code go into a plugin, core, or packages?](#when-does-code-go-into-a-plugin-core-or-packages)
+ - [How do I build my shim for New Platform services?](#how-do-i-build-my-shim-for-new-platform-services)
+ - [Client-side](#client-side)
+ - [Core services](#core-services)
+ - [Plugins for shared application services](#plugins-for-shared-application-services)
+ - [Server-side](#server-side)
+ - [Core services](#core-services-1)
+ - [UI Exports](#ui-exports)
+ - [How to](#how-to)
+ - [Configure plugin](#configure-plugin)
+ - [Mock new platform services in tests](#mock-new-platform-services-in-tests)
+ - [Writing mocks for your plugin](#writing-mocks-for-your-plugin)
+ - [Using mocks in your tests](#using-mocks-in-your-tests)
+ - [What about karma tests?](#what-about-karma-tests)
+ - [Provide Legacy Platform API to the New platform plugin](#provide-legacy-platform-api-to-the-new-platform-plugin)
+ - [On the server side](#on-the-server-side)
+ - [On the client side](#on-the-client-side)
Make no mistake, it is going to take a lot of work to move certain plugins to the new platform. Our target is to migrate the entire repo over to the new platform throughout 7.x and to remove the legacy plugin system no later than 8.0, and this is only possible if teams start on the effort now.
@@ -153,10 +174,10 @@ In the new platform, there are three lifecycle functions today: `setup`, `start`
The table below explains how each lifecycle event relates to the state of Kibana.
| lifecycle event | server | browser |
-|-----------------|-------------------------------------------|-----------------------------------------------------|
+| --------------- | ----------------------------------------- | --------------------------------------------------- |
| *setup* | bootstrapping and configuring routes | loading plugin bundles and configuring applications |
| *start* | server is now serving traffic | browser is now showing UI to the user |
-| *stop* | server has received a request to shutdown | user is navigating away from Kibana |
+| *stop* | server has received a request to shutdown | user is navigating away from Kibana |
There is no equivalent behavior to `start` or `stop` in legacy plugins, so this guide primarily focuses on migrating functionality into `setup`.
@@ -229,7 +250,7 @@ With that specified in the plugin manifest, the appropriate interfaces are then
**demo plugin.ts:**
```ts
-import { CoreSetup, CoreStart } from '../../../core/server';
+import { CoreSetup, CoreStart } from 'src/core/server';
import { FoobarPluginSetup, FoobarPluginStop } from '../../foobar/server';
interface DemoSetupPlugins {
@@ -423,7 +444,7 @@ export default (kibana) => {
}
}
- // HTTP functionality from core
+ // HTTP functionality from legacy
server.route({
path: '/api/demo_plugin/search',
method: 'POST',
@@ -448,35 +469,47 @@ We now move this logic into a new plugin definition, which is based off of the c
```ts
// server/plugin.ts
+import { CoreSetup, Plugin } from 'src/core/server';
import { ElasticsearchPlugin } from '../elasticsearch';
-interface CoreSetup {
- elasticsearch: ElasticsearchPlugin // note: Elasticsearch is in Core in NP, rather than a plugin
-}
-
interface FooSetup {
getBar(): string
}
-interface PluginsSetup {
- foo: FooSetup
+// We inject the miminal legacy dependencies into our plugin including dependencies on other legacy
+// plugins. Take care to only expose the legacy functionality you need e.g. don't inject the whole
+// `Legacy.Server` if you only depend on `Legacy.Server['route']`.
+interface LegacySetup {
+ route: Legacy.Server['route']
+ plugins: {
+ elasticsearch: ElasticsearchPlugin, // note: Elasticsearch is in CoreSetup in NP, rather than a plugin
+ foo: FooSetup
+ }
+}
+
+// Define the public API's for our plugins setup and start lifecycle
+export interface DemoSetup {
+ getDemoBar: () => string;
}
+export interface DemoStart {}
-export type DemoPluginSetup = ReturnType;
+// Once we start dependending on NP plugins' setup or start API's we'll add their types here
+export interface DemoSetupDeps {}
+export interface DemoStartDeps {}
-export class Plugin {
- public setup(core: CoreSetup, plugins: PluginsSetup) {
+export class DemoPlugin implements Plugin {
+ public setup(core: CoreSetup, plugins: PluginsSetup, __LEGACY: LegacySetup): DemoSetup {
+ // We're still using the legacy Elasticsearch and http router here, but we're now accessing
+ // these services in the same way a NP plugin would: injected into the setup function. It's
+ // also obvious that these dependencies needs to be removed by migrating over to the New
+ // Platform services exposed through core.
const serverFacade: ServerFacade = {
plugins: {
- // We're still using the legacy Elasticsearch here, but we're now accessing it
- // the same way a NP plugin would, via core. Later, we'll swap this out for the
- // actual New Platform service.
- elasticsearch: core.elasticsearch
+ elasticsearch: __LEGACY.plugins.elasticsearch
}
}
- // HTTP functionality from legacy platform, accessed in the NP convention, just like Elasticsearch above.
- core.http.route({ // note: we know routes will be created on core.http
+ __LEGACY.route({
path: '/api/demo_plugin/search',
method: 'POST',
async handler(request) {
@@ -490,7 +523,7 @@ export class Plugin {
// Exposing functionality for other plugins
return {
getDemoBar() {
- return `Demo ${plugins.foo.getBar()}`; // Accessing functionality from another plugin
+ return `Demo ${__LEGACY.plugins.foo.getBar()}`; // Accessing functionality from another legacy plugin
}
};
}
@@ -502,26 +535,29 @@ The legacy plugin definition is still the one that is being executed, so we now
```ts
// index.ts
-import { Plugin } from './server/plugin';
+import { Plugin, PluginDependencies, LegacySetup } from './server/plugin';
export default (kibana) => {
return new kibana.Plugin({
id: 'demo_plugin',
init(server) {
- // core shim
- const coreSetup = {
- elasticsearch: server.plugins.elasticsearch,
- http: {
- route: server.route
+ // core setup API's
+ const coreSetup = server.newPlatform.setup.core;
+
+ // For now we don't have any dependencies on NP plugins
+ const pluginsSetup: PluginsSetup = {};
+
+ // legacy dependencies
+ const __LEGACY: LegacySetup = {
+ route: server.route,
+ plugins: {
+ elasticsearch: server.plugins.elasticsearch,
+ foo: server.plugins.foo
}
};
- // plugins shim
- const pluginsSetup = {
- foo: server.plugins.foo
- };
- const demoSetup = new Plugin().setup(coreSetup, pluginsSetup);
+ const demoSetup = new Plugin().setup(coreSetup, pluginsSetup, __LEGACY);
// continue to expose functionality to legacy plugins
server.expose('getDemoBar', demoSetup.getDemoBar);
@@ -529,6 +565,11 @@ export default (kibana) => {
});
}
```
+> Note: An equally valid approach is to extend `CoreSetup` with a `__legacy`
+> property instead of introducing a third parameter to your plugins lifecycle
+> function. The important thing is that you reduce the legacy API surface that
+> you depend on to a minimum by only picking and injecting the methods you
+> require and that you clearly differentiate legacy dependencies in a namespace.
This introduces a layer between the legacy plugin system with hapi.js and the logic you want to move to the new plugin system. The functionality exposed through that layer is still provided from the legacy world and in some cases is still technically powered directly by hapi, but building this layer forced you to identify the remaining touch points into the legacy world and it provides you with control when you start migrating to new platform-backed services.
@@ -536,73 +577,81 @@ This introduces a layer between the legacy plugin system with hapi.js and the lo
### Switch to new platform services
-At this point, your legacy server-side plugin is described in the shape and conventions of the new plugin system, and all of the touch points with the legacy world and hapi.js have been isolated to the shims in the legacy plugin definition.
+At this point, your legacy server-side plugin is described in the shape and
+conventions of the new plugin system, and all of the touch points with the
+legacy world and hapi.js have been isolated inside the `__LEGACY` parameter.
-Now the goal is to replace the legacy services backing your shims with services provided by the new platform instead.
+Now the goal is to replace all legacy services with services provided by the new platform instead.
For the first time in this guide, your progress here is limited by the migration efforts within core and other plugins.
As core capabilities are migrated to services in the new platform, they are made available as lifecycle contracts to the legacy `init` function through `server.newPlatform`. This allows you to adopt the new platform service APIs directly in your legacy plugin as they get rolled out.
-For the most part, care has been taken when migrating services to the new platform to preserve the existing APIs as much as possible, but there will be times when new APIs differ from the legacy equivalents. Start things off by having your core shim extend the equivalent new platform contract.
-
-```ts
-// index.ts
-
-init(server) {
- // core shim
- const coreSetup = {
- ...server.newPlatform.setup.core,
-
- elasticsearch: server.plugins.elasticsearch,
- http: {
- route: server.route
- }
- };
-}
-```
+For the most part, care has been taken when migrating services to the new platform to preserve the existing APIs as much as possible, but there will be times when new APIs differ from the legacy equivalents.
If a legacy API differs from its new platform equivalent, some refactoring will be required. The best outcome comes from updating the plugin code to use the new API, but if that's not practical now, you can also create a facade inside your new plugin definition that is shaped like the legacy API but powered by the new API. Once either of these things is done, that override can be removed from the shim.
-Eventually, all overrides will be removed and your `coreSetup` shim is entirely powered by `server.newPlatform.setup.core`.
+Eventually, all `__LEGACY` dependencies will be removed and your Plugin will
+be powered entirely by Core API's from `server.newPlatform.setup.core`.
```ts
init(server) {
- // core shim
- const coreSetup = {
- ...server.newPlatform.setup.core
+ // core setup API's
+ const coreSetup = server.newPlatform.setup.core;
+
+ // For now we don't have any dependencies on NP plugins
+ const pluginsSetup: PluginsSetup = {};
+
+ // legacy dependencies, we've removed our dependency on elasticsearch and server.route
+ const __LEGACY: LegacySetup = {
+ plugins: {
+ foo: server.plugins.foo
+ }
};
+
+ const demoSetup = new Plugin().setup(coreSetup, pluginsSetup, __LEGACY);
}
```
-At this point, your legacy server-side plugin logic is no longer coupled to the legacy core.
+At this point, your legacy server-side plugin logic is no longer coupled to
+the legacy core.
-A similar approach can be taken for your plugins shim. First, update your plugin shim in `init` to extend `server.newPlatform.setup.plugins`.
+A similar approach can be taken for your plugin dependencies. To start
+consuming an API from a New Platform plugin access these from
+`server.newPlatform.setup.plugins` and inject it into your plugin's setup
+function.
```ts
init(server) {
- // plugins shim
- const pluginsSetup = {
- ...server.newPlatform.setup.plugins,
- foo: server.plugins.foo
+ // core setup API's
+ const coreSetup = server.newPlatform.setup.core;
+
+ // Depend on the NP plugin 'foo'
+ const pluginsSetup: PluginsSetup = {
+ foo: server.newPlatform.setup.plugins.foo
};
+
+ const demoSetup = new Plugin().setup(coreSetup, pluginsSetup);
}
```
-As the plugins you depend on are migrated to the new platform, their contract will be exposed through `server.newPlatform`, so the legacy override should be removed. Like in core, plugins should take care to preserve their existing APIs to make this step as seamless as possible.
+As the plugins you depend on are migrated to the new platform, their contract
+will be exposed through `server.newPlatform`, so the `__LEGACY` dependencies
+should be removed. Like in core, plugins should take care to preserve their
+existing APIs to make this step as seamless as possible.
-It is much easier to reliably make breaking changes to plugin APIs in the new platform than it is in the legacy world, so if you're planning a big change, consider doing it after your dependent plugins have migrated rather than as part of your own migration.
+It is much easier to reliably make breaking changes to plugin APIs in the new
+platform than it is in the legacy world, so if you're planning a big change,
+consider doing it after your dependent plugins have migrated rather than as
+part of your own migration.
-Eventually, all overrides will be removed and your `pluginsSetup` shim is entirely powered by `server.newPlatform.setup.plugins`.
+Eventually, all `__LEGACY` dependencies will be removed and your plugin will be
+entirely powered by the New Platform and New Platform plugins.
-```ts
-init(server) {
- // plugins shim
- const pluginsSetup = {
- ...server.newPlatform.setup.plugins
- };
-}
-```
+> Note: All New Platform plugins are exposed to legacy plugins via
+> `server.newPlatform.setup.plugins`. Once you move your plugin over to the
+> New Platform you will have to explicitly declare your dependencies on other
+> plugins in your `kibana.json` manifest file.
At this point, your legacy server-side plugin logic is no longer coupled to legacy plugins.
@@ -616,7 +665,7 @@ With the previous steps resolved, this final step should be easy, but the exact
Other plugins may want to move subsystems over individually. For instance, you can move routes over to the New Platform in groups rather than all at once. Other examples that could be broken up:
- Configuration schema ([see example](./MIGRATION_EXAMPLES.md#declaring-config-schema))
-- HTTP route registration
+- HTTP route registration ([see example](./MIGRATION_EXAMPLES.md#http-routes))
- Polling mechanisms (eg. job worker)
In general, we recommend moving all at once by ensuring you're not depending on any legacy code before you move over.
@@ -748,25 +797,17 @@ import { plugin } from '.';
import { setup as fooSetup, start as fooStart } from '../../foo/public/legacy'; // assumes `foo` lives in `legacy/core_plugins`
const pluginInstance = plugin({} as PluginInitializerContext);
-const shimCoreSetup = {
- ...npSetup.core,
- bar: {}, // shim for a core service that hasn't migrated yet
+const __LEGACYSetup = {
+ bar: {}, // shim for a core service that hasn't migrated yet
+ foo: fooSetup, // dependency on a legacy plugin
};
-const shimCoreStart = {
- ...npStart.core,
- bar: {},
-};
-const shimSetupPlugins = {
- ...npSetup.plugins,
- foo: fooSetup,
-};
-const shimStartPlugins = {
- ...npStart.plugins,
- foo: fooStart,
+const __LEGACYStart = {
+ bar: {}, // shim for a core service that hasn't migrated yet
+ foo: fooStart, // dependency on a legacy plugin
};
-export const setup = pluginInstance.setup(shimCoreSetup, shimSetupPlugins);
-export const start = pluginInstance.start(shimCoreStart, shimStartPlugins);
+export const setup = pluginInstance.setup(npSetup.core, npSetup.plugins, __LEGACYSetup);
+export const start = pluginInstance.start(npStart.core, npStart.plugins, __LEGACYStart);
```
> As you build your shims, you may be wondering where you will find some legacy services in the new platform. Skip to [the tables below](#how-do-i-build-my-shim-for-new-platform-services) for a list of some of the more common legacy services and where we currently expect them to live.
@@ -835,16 +876,13 @@ import { uiThing } from 'ui/thing';
...
const pluginInstance = plugin({} as PluginInitializerContext);
-const shimSetupPlugins = {
- ...npSetup.plugins,
+const __LEGACY = {
foo: fooSetup,
- __LEGACY: {
- uiThing, // eventually this will move out of __LEGACY and into a proper plugin
- },
+ uiThing, // eventually this will move out of __LEGACY and into a NP plugin
};
...
-export const setup = pluginInstance.setup(npSetup.core, shimSetupPlugins);
+export const setup = pluginInstance.setup(npSetup.core, npSetup.plugins, __LEGACY);
```
#### 7. Switch to new platform services
@@ -1010,10 +1048,10 @@ If you have code that should be available to other plugins on both the client an
There are some Core services that are purely presentational, for example `core.overlays.openModal()` or `core.application.createLink()` where UI code does need access to these deeply within your application. However, passing these services down as props throughout your application leads to lots of boilerplate. To avoid this, you have three options:
1. Use an abstraction layer, like Redux, to decouple your UI code from core (**this is the highly preferred option**); or
- [redux-thunk](https://github.com/reduxjs/redux-thunk#injecting-a-custom-argument) and [redux-saga](https://redux-saga.js.org/docs/api/#createsagamiddlewareoptions) already have ways to do this.
-1. Use React Context to provide these services to large parts of your React tree; or
-1. Create a high-order-component that injects core into a React component; or
+2. Use React Context to provide these services to large parts of your React tree; or
+3. Create a high-order-component that injects core into a React component; or
- This would be a stateful module that holds a reference to Core, but provides it as props to components with a `withCore(MyComponent)` interface. This can make testing components simpler. (Note: this module cannot be shared across plugin boundaries, see above).
-1. Create a global singleton module that gets imported into each module that needs it. (Note: this module cannot be shared across plugin boundaries, see above). [Example](https://gist.github.com/epixa/06c8eeabd99da3c7545ab295e49acdc3).
+4. Create a global singleton module that gets imported into each module that needs it. (Note: this module cannot be shared across plugin boundaries, see above). [Example](https://gist.github.com/epixa/06c8eeabd99da3c7545ab295e49acdc3).
If you find that you need many different Core services throughout your application, this may be a code smell and could lead to pain down the road. For instance, if you need access to an HTTP Client or SavedObjectsClient in many places in your React tree, it's likely that a data layer abstraction (like Redux) could make developing your plugin much simpler (see option 1).
@@ -1058,7 +1096,7 @@ import { npStart: { core } } from 'ui/new_platform';
```
| Legacy Platform | New Platform | Notes |
-|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
+| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `chrome.addBasePath` | [`core.http.basePath.prepend`](/docs/development/core/public/kibana-plugin-public.httpservicebase.basepath.md) | |
| `chrome.breadcrumbs.set` | [`core.chrome.setBreadcrumbs`](/docs/development/core/public/kibana-plugin-public.chromestart.setbreadcrumbs.md) | |
| `chrome.getUiSettingsClient` | [`core.uiSettings`](/docs/development/core/public/kibana-plugin-public.uisettingsclient.md) | |
@@ -1087,24 +1125,24 @@ import { setup, start } from '../core_plugins/embeddables/public/legacy';
import { setup, start } from '../core_plugins/visualizations/public/legacy';
```
-| Legacy Platform | New Platform | Notes |
-|--------------------------------------------------------|--------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
-| `import 'ui/apply_filters'` | `import { ApplyFiltersPopover } from '../data/public'` | `import '../data/public/legacy` should be called to load legacy directives |
-| `import 'ui/filter_bar'` | `import { FilterBar } from '../data/public'` | `import '../data/public/legacy` should be called to load legacy directives |
-| `import 'ui/query_bar'` | `import { QueryBar, QueryBarInput } from '../data/public'` | Directives are deprecated. |
-| `import 'ui/search_bar'` | `import { SearchBar } from '../data/public'` | Directive is deprecated. |
-| `import 'ui/kbn_top_nav'` | `import { TopNavMenu } from '../kibana_react/public'` | Directive is still available in `ui/kbn_top_nav`. |
-| `core_plugins/interpreter` | `data.expressions` | still in progress |
-| `ui/courier` | `data.search` | still in progress |
-| `ui/embeddable` | `embeddables` | still in progress |
-| `ui/filter_manager` | `data.filter` | -- |
-| `ui/index_patterns` | `data.indexPatterns` | still in progress |
-| `ui/registry/vis_types` | `visualizations.types` | -- |
-| `ui/vis` | `visualizations.types` | -- |
-| `ui/vis/vis_factory` | `visualizations.types` | -- |
-| `ui/vis/vis_filters` | `visualizations.filters` | -- |
-| `ui/utils/parse_es_interval` | `import { parseEsInterval } from '../data/public'` | `parseEsInterval`, `ParsedInterval`, `InvalidEsCalendarIntervalError`, `InvalidEsIntervalFormatError` items were moved to the `Data Plugin` as a static code |
-
+| Legacy Platform | New Platform | Notes |
+| ------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `import 'ui/apply_filters'` | `import { ApplyFiltersPopover } from '../data/public'` | `import '../data/public/legacy` should be called to load legacy directives |
+| `import 'ui/filter_bar'` | `import { FilterBar } from '../data/public'` | `import '../data/public/legacy` should be called to load legacy directives |
+| `import 'ui/query_bar'` | `import { QueryBar, QueryBarInput } from '../data/public'` | Directives are deprecated. |
+| `import 'ui/search_bar'` | `import { SearchBar } from '../data/public'` | Directive is deprecated. |
+| `import 'ui/kbn_top_nav'` | `import { TopNavMenu } from '../kibana_react/public'` | Directive is still available in `ui/kbn_top_nav`. |
+| `ui/saved_objects/components/saved_object_finder` | `import { SavedObjectFinder } from '../kibana_react/public'` | |
+| `core_plugins/interpreter` | `data.expressions` | still in progress |
+| `ui/courier` | `data.search` | still in progress |
+| `ui/embeddable` | `embeddables` | still in progress |
+| `ui/filter_manager` | `data.filter` | -- |
+| `ui/index_patterns` | `data.indexPatterns` | still in progress |
+| `ui/registry/vis_types` | `visualizations.types` | -- |
+| `ui/vis` | `visualizations.types` | -- |
+| `ui/vis/vis_factory` | `visualizations.types` | -- |
+| `ui/vis/vis_filters` | `visualizations.filters` | -- |
+| `ui/utils/parse_es_interval` | `import { parseEsInterval } from '../data/public'` | `parseEsInterval`, `ParsedInterval`, `InvalidEsCalendarIntervalError`, `InvalidEsIntervalFormatError` items were moved to the `Data Plugin` as a static code |
#### Server-side
@@ -1112,9 +1150,9 @@ import { setup, start } from '../core_plugins/visualizations/public/legacy';
In server code, `core` can be accessed from either `server.newPlatform` or `kbnServer.newPlatform`. There are not currently very many services available on the server-side:
| Legacy Platform | New Platform | Notes |
-|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
+| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `server.config()` | [`initializerContext.config.create()`](/docs/development/core/server/kibana-plugin-server.plugininitializercontext.config.md) | Must also define schema. See _[how to configure plugin](#configure-plugin)_ |
-| `server.route` | [`core.http.createRouter`](/docs/development/core/server/kibana-plugin-server.httpservicesetup.createrouter.md) | |
+| `server.route` | [`core.http.createRouter`](/docs/development/core/server/kibana-plugin-server.httpservicesetup.createrouter.md) | [Examples](./MIGRATION_EXAMPLES.md#route-registration) |
| `request.getBasePath()` | [`core.http.basePath.get`](/docs/development/core/server/kibana-plugin-server.httpservicesetup.basepath.md) | |
| `server.plugins.elasticsearch.getCluster('data')` | [`core.elasticsearch.dataClient$`](/docs/development/core/server/kibana-plugin-server.elasticsearchservicesetup.dataclient_.md) | Handlers will also include a pre-configured client |
| `server.plugins.elasticsearch.getCluster('admin')` | [`core.elasticsearch.adminClient$`](/docs/development/core/server/kibana-plugin-server.elasticsearchservicesetup.adminclient_.md) | Handlers will also include a pre-configured client |
@@ -1128,7 +1166,7 @@ The legacy platform uses a set of "uiExports" to inject modules from one plugin
This table shows where these uiExports have moved to in the New Platform. In most cases, if a uiExport you need is not yet available in the New Platform, you may leave in your legacy plugin for the time being and continue to migrate the rest of your app to the New Platform.
| Legacy Platform | New Platform | Notes |
-|------------------------------|---------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
+| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `aliases` | | |
| `app` | [`core.application.register`](/docs/development/core/public/kibana-plugin-public.applicationsetup.register.md) | |
| `canvas` | | Should be an API on the canvas plugin. |
diff --git a/src/core/MIGRATION_EXAMPLES.md b/src/core/MIGRATION_EXAMPLES.md
index 79ae8953df0e..9eed3a59acaa 100644
--- a/src/core/MIGRATION_EXAMPLES.md
+++ b/src/core/MIGRATION_EXAMPLES.md
@@ -3,6 +3,19 @@
This document is a list of examples of how to migrate plugin code from legacy
APIs to their New Platform equivalents.
+- [Migration Examples](#migration-examples)
+ - [Configuration](#configuration)
+ - [Declaring config schema](#declaring-config-schema)
+ - [Using New Platform config from a Legacy plugin](#using-new-platform-config-from-a-legacy-plugin)
+ - [Create a New Platform plugin](#create-a-new-platform-plugin)
+ - [HTTP Routes](#http-routes)
+ - [1. Legacy route registration](#1-legacy-route-registration)
+ - [2. New Platform shim using legacy router](#2-new-platform-shim-using-legacy-router)
+ - [3. New Platform shim using New Platform router](#3-new-platform-shim-using-new-platform-router)
+ - [4. New Platform plugin](#4-new-platform-plugin)
+ - [Accessing Services](#accessing-services)
+ - [Chrome](#chrome)
+
## Configuration
### Declaring config schema
@@ -149,16 +162,18 @@ This interface has a different API with slightly different behaviors.
continue using the `boom` module internally in your plugin, the framework does
not have native support for converting Boom exceptions into HTTP responses.
-### Route Registration
+Because of the incompatibility between the legacy and New Platform HTTP Route
+API's it might be helpful to break up your migration work into several stages.
+### 1. Legacy route registration
```ts
-// Legacy route registration
+// legacy/plugins/myplugin/index.ts
import Joi from 'joi';
new kibana.Plugin({
init(server) {
server.route({
- path: '/api/my-plugin/my-route',
+ path: '/api/demoplugin/search',
method: 'POST',
options: {
validate: {
@@ -173,17 +188,99 @@ new kibana.Plugin({
});
}
});
+```
+### 2. New Platform shim using legacy router
+Create a New Platform shim and inject the legacy `server.route` into your
+plugin's setup function.
-// New Platform equivalent
+```ts
+// legacy/plugins/demoplugin/index.ts
+import { Plugin, LegacySetup } from './server/plugin';
+export default (kibana) => {
+ return new kibana.Plugin({
+ id: 'demo_plugin',
+
+ init(server) {
+ // core shim
+ const coreSetup: server.newPlatform.setup.core;
+ const pluginSetup = {};
+ const legacySetup: LegacySetup = {
+ route: server.route
+ };
+
+ new Plugin().setup(coreSetup, pluginSetup, legacySetup);
+ }
+ }
+}
+```
+```ts
+// legacy/plugins/demoplugin/server/plugin.ts
+import { CoreSetup } from 'src/core/server';
+import { Legacy } from 'kibana';
+
+export interface LegacySetup {
+ route: Legacy.Server['route'];
+};
+
+export interface DemoPluginsSetup {};
+
+export class Plugin {
+ public setup(core: CoreSetup, plugins: DemoPluginsSetup, __LEGACY: LegacySetup) {
+ __LEGACY.route({
+ path: '/api/demoplugin/search',
+ method: 'POST',
+ options: {
+ validate: {
+ payload: Joi.object({
+ field1: Joi.string().required(),
+ }),
+ }
+ },
+ async handler(req) {
+ return { message: `Received field1: ${req.payload.field1}` };
+ },
+ });
+ }
+}
+```
+
+### 3. New Platform shim using New Platform router
+We now switch the shim to use the real New Platform HTTP API's in `coreSetup`
+instead of relying on the legacy `server.route`. Since our plugin is now using
+the New Platform API's we are guaranteed that our HTTP route handling is 100%
+compatible with the New Platform. As a result, we will also have to adapt our
+route registration accordingly.
+```ts
+// legacy/plugins/demoplugin/index.ts
+import { Plugin } from './server/plugin';
+export default (kibana) => {
+ return new kibana.Plugin({
+ id: 'demo_plugin',
+
+ init(server) {
+ // core shim
+ const coreSetup = server.newPlatform.setup.core;
+ const pluginSetup = {};
+
+ new Plugin().setup(coreSetup, pluginSetup);
+ }
+ }
+}
+```
+```ts
+// legacy/plugins/demoplugin/server/plugin.ts
import { schema } from '@kbn/config-schema';
+import { CoreSetup } from 'src/core/server';
+
+export interface DemoPluginsSetup {};
class Plugin {
- public setup(core) {
+ public setup(core: CoreSetup, pluginSetup: DemoPluginSetup) {
const router = core.http.createRouter();
router.post(
{
- path: '/api/my-plugin/my-route',
+ path: '/api/demoplugin/search',
validate: {
body: schema.object({
field1: schema.string(),
@@ -202,6 +299,14 @@ class Plugin {
}
```
+#### 4. New Platform plugin
+As the final step we delete the shim and move all our code into a New Platform
+plugin. Since we were already consuming the New Platform API's no code changes
+are necessary inside `plugin.ts`.
+```ts
+// Move legacy/plugins/demoplugin/server/plugin.ts -> plugins/demoplugin/server/plugin.ts
+```
+
### Accessing Services
Services in the Legacy Platform were typically available via methods on either
diff --git a/src/core/server/elasticsearch/elasticsearch_service.test.ts b/src/core/server/elasticsearch/elasticsearch_service.test.ts
index 58fe2b52727e..6c4a1f263bc7 100644
--- a/src/core/server/elasticsearch/elasticsearch_service.test.ts
+++ b/src/core/server/elasticsearch/elasticsearch_service.test.ts
@@ -174,11 +174,55 @@ Object {
undefined,
],
"ssl": Object {
+ "certificateAuthorities": undefined,
"verificationMode": "none",
},
}
`);
});
+
+ it('does not merge elasticsearch hosts if custom config overrides', async () => {
+ configService.atPath.mockReturnValueOnce(
+ new BehaviorSubject({
+ hosts: ['http://1.2.3.4', 'http://9.8.7.6'],
+ healthCheck: {
+ delay: 2000,
+ },
+ ssl: {
+ verificationMode: 'none',
+ },
+ } as any)
+ );
+ elasticsearchService = new ElasticsearchService(coreContext);
+ const setupContract = await elasticsearchService.setup(deps);
+ // reset all mocks called during setup phase
+ MockClusterClient.mockClear();
+
+ const customConfig = {
+ hosts: ['http://8.8.8.8'],
+ logQueries: true,
+ ssl: { certificate: 'certificate-value' },
+ };
+ setupContract.createClient('some-custom-type', customConfig);
+
+ const config = MockClusterClient.mock.calls[0][0];
+ expect(config).toMatchInlineSnapshot(`
+ Object {
+ "healthCheckDelay": 2000,
+ "hosts": Array [
+ "http://8.8.8.8",
+ ],
+ "logQueries": true,
+ "requestHeadersWhitelist": Array [
+ undefined,
+ ],
+ "ssl": Object {
+ "certificate": "certificate-value",
+ "verificationMode": "none",
+ },
+ }
+ `);
+ });
});
});
diff --git a/src/core/server/elasticsearch/elasticsearch_service.ts b/src/core/server/elasticsearch/elasticsearch_service.ts
index ed1f2a276ebc..1f062412edaf 100644
--- a/src/core/server/elasticsearch/elasticsearch_service.ts
+++ b/src/core/server/elasticsearch/elasticsearch_service.ts
@@ -19,8 +19,9 @@
import { ConnectableObservable, Observable, Subscription } from 'rxjs';
import { filter, first, map, publishReplay, switchMap } from 'rxjs/operators';
-import { merge } from 'lodash';
+
import { CoreService } from '../../types';
+import { merge } from '../../utils';
import { CoreContext } from '../core_context';
import { Logger } from '../logging';
import { ClusterClient } from './cluster_client';
diff --git a/src/core/server/saved_objects/service/lib/repository.test.js b/src/core/server/saved_objects/service/lib/repository.test.js
index 9e4edcd8d294..e514210752f5 100644
--- a/src/core/server/saved_objects/service/lib/repository.test.js
+++ b/src/core/server/saved_objects/service/lib/repository.test.js
@@ -546,6 +546,28 @@ describe('SavedObjectsRepository', () => {
);
expect(onBeforeWrite).toHaveBeenCalledTimes(1);
});
+
+ it('defaults to empty references array if none are provided', async () => {
+ await savedObjectsRepository.create(
+ 'index-pattern',
+ {
+ title: 'Logstash',
+ },
+ {
+ id: 'logstash-*',
+ }
+ );
+
+ expect(callAdminCluster).toHaveBeenCalledTimes(1);
+ expect(callAdminCluster).toHaveBeenCalledWith(
+ expect.any(String),
+ expect.objectContaining({
+ body: expect.objectContaining({
+ references: [],
+ }),
+ })
+ );
+ });
});
describe('#bulkCreate', () => {
diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts
index 898239e5736d..179aa6fffc7d 100644
--- a/src/core/server/saved_objects/service/lib/repository.ts
+++ b/src/core/server/saved_objects/service/lib/repository.ts
@@ -146,15 +146,15 @@ export class SavedObjectsRepository {
* @property {boolean} [options.overwrite=false]
* @property {object} [options.migrationVersion=undefined]
* @property {string} [options.namespace]
- * @property {array} [options.references] - [{ name, type, id }]
+ * @property {array} [options.references=[]] - [{ name, type, id }]
* @returns {promise} - { id, type, version, attributes }
*/
public async create(
type: string,
attributes: T,
- options: SavedObjectsCreateOptions = { overwrite: false, references: [] }
+ options: SavedObjectsCreateOptions = {}
): Promise> {
- const { id, migrationVersion, overwrite, namespace, references } = options;
+ const { id, migrationVersion, overwrite = false, namespace, references = [] } = options;
if (!this._allowedTypes.includes(type)) {
throw SavedObjectsErrorHelpers.createUnsupportedTypeError(type);
diff --git a/src/core/utils/index.ts b/src/core/utils/index.ts
index b6ffb57db975..98f0800feae7 100644
--- a/src/core/utils/index.ts
+++ b/src/core/utils/index.ts
@@ -22,5 +22,6 @@ export * from './context';
export * from './deep_freeze';
export * from './get';
export * from './map_to_object';
+export * from './merge';
export * from './pick';
export * from './url';
diff --git a/src/core/utils/integration_tests/deep_freeze.test.ts b/src/core/utils/integration_tests/deep_freeze.test.ts
index a9440f70ae47..e6625542bc38 100644
--- a/src/core/utils/integration_tests/deep_freeze.test.ts
+++ b/src/core/utils/integration_tests/deep_freeze.test.ts
@@ -27,16 +27,14 @@ it(
'types return values to prevent mutations in typescript',
async () => {
await expect(
- execa.stdout('tsc', ['--noEmit'], {
+ execa('tsc', ['--noEmit'], {
cwd: resolve(__dirname, '__fixtures__/frozen_object_mutation'),
- })
- ).rejects.toThrowErrorMatchingInlineSnapshot(`
-"Command failed: tsc --noEmit
-
-index.ts(28,12): error TS2540: Cannot assign to 'baz' because it is a read-only property.
-index.ts(36,11): error TS2540: Cannot assign to 'bar' because it is a read-only property.
-"
-`);
+ preferLocal: true,
+ }).catch(err => err.stdout)
+ ).resolves.toMatchInlineSnapshot(`
+ "index.ts(28,12): error TS2540: Cannot assign to 'baz' because it is a read-only property.
+ index.ts(36,11): error TS2540: Cannot assign to 'bar' because it is a read-only property."
+ `);
},
MINUTE
);
diff --git a/src/core/utils/merge.test.ts b/src/core/utils/merge.test.ts
new file mode 100644
index 000000000000..aa98f5106741
--- /dev/null
+++ b/src/core/utils/merge.test.ts
@@ -0,0 +1,64 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { merge } from './merge';
+
+describe('merge', () => {
+ test('empty objects', () => expect(merge({}, {})).toEqual({}));
+
+ test('basic', () => {
+ expect(merge({}, { a: 1 })).toEqual({ a: 1 });
+ expect(merge({ a: 0 }, {})).toEqual({ a: 0 });
+ expect(merge({ a: 0 }, { a: 1 })).toEqual({ a: 1 });
+ });
+
+ test('undefined', () => {
+ expect(merge({ a: undefined }, { a: 1 })).toEqual({ a: 1 });
+ expect(merge({ a: 0 }, { a: undefined })).toEqual({ a: 0 });
+ expect(merge({ a: undefined }, { a: undefined })).toEqual({});
+ expect(merge({ a: void 0 }, { a: void 0 })).toEqual({});
+ });
+
+ test('null', () => {
+ expect(merge({ a: null }, { a: 1 })).toEqual({ a: 1 });
+ expect(merge({ a: 0 }, { a: null })).toEqual({ a: null });
+ expect(merge({ a: null }, { a: null })).toEqual({ a: null });
+ });
+
+ test('arrays', () => {
+ expect(merge({ b: [0] }, { b: [2] })).toEqual({ b: [2] });
+ expect(merge({ b: [0, 1] }, { b: [2] })).toEqual({ b: [2] });
+ expect(merge({ b: [0] }, { b: [2, 3] })).toEqual({ b: [2, 3] });
+ expect(merge({ b: [] }, { b: [2] })).toEqual({ b: [2] });
+ expect(merge({ b: [0] }, { b: [] })).toEqual({ b: [] });
+ });
+
+ test('nested objects', () => {
+ expect(merge({ top: { a: 0, b: 0 } }, { top: { a: 1, c: 1 } })).toEqual({
+ top: { a: 1, b: 0, c: 1 },
+ });
+ expect(merge({ top: { a: 0, b: 0 } }, { top: [0, 1] })).toEqual({ top: [0, 1] });
+ });
+
+ test('multiple objects', () => {
+ expect(merge({}, { a: 1 }, { a: 2 })).toEqual({ a: 2 });
+ expect(merge({ a: 0 }, {}, {})).toEqual({ a: 0 });
+ expect(merge({ a: 0 }, { a: 1 }, {})).toEqual({ a: 1 });
+ });
+});
diff --git a/src/core/utils/merge.ts b/src/core/utils/merge.ts
new file mode 100644
index 000000000000..aead3f35ba84
--- /dev/null
+++ b/src/core/utils/merge.ts
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+
+/**
+ * Deeply merges two objects, omitting undefined values, and not deeply merging Arrays.
+ *
+ * @remarks
+ * Should behave identically to lodash.merge, however it will not merge Array values like lodash does.
+ * Any properties with `undefined` values on both objects will be ommitted from the returned object.
+ */
+export function merge, TSource1 extends Record>(
+ baseObj: TBase,
+ source1: TSource1
+): TBase & TSource1;
+export function merge<
+ TBase extends Record,
+ TSource1 extends Record,
+ TSource2 extends Record
+>(baseObj: TBase, overrideObj: TSource1, overrideObj2: TSource2): TBase & TSource1 & TSource2;
+export function merge<
+ TBase extends Record,
+ TSource1 extends Record,
+ TSource2 extends Record,
+ TSource3 extends Record
+>(
+ baseObj: TBase,
+ overrideObj: TSource1,
+ overrideObj2: TSource2
+): TBase & TSource1 & TSource2 & TSource3;
+export function merge>(
+ baseObj: Record,
+ ...sources: Array>
+): TReturn {
+ const firstSource = sources[0];
+ if (firstSource === undefined) {
+ return baseObj as TReturn;
+ }
+
+ return sources
+ .slice(1)
+ .reduce(
+ (merged, nextSource) => mergeObjects(merged, nextSource),
+ mergeObjects(baseObj, firstSource)
+ ) as TReturn;
+}
+
+const isMergable = (obj: any) => typeof obj === 'object' && obj !== null && !Array.isArray(obj);
+
+const mergeObjects = , U extends Record>(
+ baseObj: T,
+ overrideObj: U
+): T & U =>
+ [...new Set([...Object.keys(baseObj), ...Object.keys(overrideObj)])].reduce(
+ (merged, key) => {
+ const baseVal = baseObj[key];
+ const overrideVal = overrideObj[key];
+
+ if (isMergable(baseVal) && isMergable(overrideVal)) {
+ merged[key] = mergeObjects(baseVal, overrideVal);
+ } else if (overrideVal !== undefined) {
+ merged[key] = overrideVal;
+ } else if (baseVal !== undefined) {
+ merged[key] = baseVal;
+ }
+
+ return merged;
+ },
+ {} as any
+ );
diff --git a/src/dev/build/lib/exec.js b/src/dev/build/lib/exec.js
index 57dced92ca62..82762f3bd03a 100644
--- a/src/dev/build/lib/exec.js
+++ b/src/dev/build/lib/exec.js
@@ -36,6 +36,7 @@ export async function exec(log, cmd, args, options = {}) {
stdio: ['ignore', 'pipe', 'pipe'],
cwd,
env,
+ preferLocal: true,
});
await watchStdioForLine(proc, line => log[level](line), exitAfter);
diff --git a/src/dev/build/lib/version_info.js b/src/dev/build/lib/version_info.js
index b0f51eaaa1d7..8225000c13f0 100644
--- a/src/dev/build/lib/version_info.js
+++ b/src/dev/build/lib/version_info.js
@@ -28,7 +28,9 @@ async function getBuildNumber() {
return log.stdout.split('\n').length;
}
- const wc = await execa.shell('git log --format="%h" | wc -l');
+ const wc = await execa.command('git log --format="%h" | wc -l', {
+ shell: true
+ });
return parseFloat(wc.stdout.trim());
}
@@ -39,7 +41,7 @@ export async function getVersionInfo({ isRelease, versionQualifier, pkg }) {
);
return {
- buildSha: await execa.stdout('git', ['rev-parse', 'HEAD']),
+ buildSha: (await execa('git', ['rev-parse', 'HEAD'])).stdout,
buildVersion,
buildNumber: await getBuildNumber(),
};
diff --git a/src/dev/build/tasks/nodejs/__tests__/download.js b/src/dev/build/tasks/nodejs/__tests__/download.js
index 551773a6f632..c76ff15b8928 100644
--- a/src/dev/build/tasks/nodejs/__tests__/download.js
+++ b/src/dev/build/tasks/nodejs/__tests__/download.js
@@ -196,7 +196,7 @@ describe('src/dev/build/tasks/nodejs/download', () => {
} catch (error) {
expect(error)
.to.have.property('message')
- .contain('Unexpected status code 500');
+ .contain('Request failed with status code 500');
expect(reqCount).to.be(6);
}
});
diff --git a/src/dev/build/tasks/nodejs/download.js b/src/dev/build/tasks/nodejs/download.js
index 48313c0911c2..0a030aced0d4 100644
--- a/src/dev/build/tasks/nodejs/download.js
+++ b/src/dev/build/tasks/nodejs/download.js
@@ -22,7 +22,7 @@ import { dirname } from 'path';
import chalk from 'chalk';
import { createHash } from 'crypto';
-import wreck from '@hapi/wreck';
+import Axios from 'axios';
import { mkdirp } from '../../lib';
@@ -51,21 +51,24 @@ export async function download(options) {
try {
log.debug(`Attempting download of ${url}`, chalk.dim(sha256));
- const response = await wreck.request('GET', url);
+ const response = await Axios.request({
+ url: url,
+ responseType: 'stream'
+ });
- if (response.statusCode !== 200) {
- throw new Error(`Unexpected status code ${response.statusCode} when downloading ${url}`);
+ if (response.status !== 200) {
+ throw new Error(`Unexpected status code ${response.status} when downloading ${url}`);
}
const hash = createHash('sha256');
await new Promise((resolve, reject) => {
- response.on('data', chunk => {
+ response.data.on('data', chunk => {
hash.update(chunk);
writeSync(fileHandle, chunk);
});
- response.on('error', reject);
- response.on('end', resolve);
+ response.data.on('error', reject);
+ response.data.on('end', resolve);
});
const downloadedSha256 = hash.digest('hex');
diff --git a/src/dev/build/tasks/nodejs/node_download_info.js b/src/dev/build/tasks/nodejs/node_download_info.js
index 7c4fd5fde7be..33ffd042d85a 100644
--- a/src/dev/build/tasks/nodejs/node_download_info.js
+++ b/src/dev/build/tasks/nodejs/node_download_info.js
@@ -27,7 +27,7 @@ export function getNodeDownloadInfo(config, platform) {
? 'win-x64/node.exe'
: `node-v${version}-${arch}.tar.gz`;
- const url = `https://nodejs.org/dist/v${version}/${downloadName}`;
+ const url = `https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v${version}/${downloadName}`;
const downloadPath = config.resolveFromRepo('.node_binaries', version, basename(downloadName));
const extractDir = config.resolveFromRepo('.node_binaries', version, arch);
diff --git a/src/dev/build/tasks/nodejs/node_shasums.test.ts b/src/dev/build/tasks/nodejs/node_shasums.test.ts
index ee91d2a370fb..08ac823c7ebf 100644
--- a/src/dev/build/tasks/nodejs/node_shasums.test.ts
+++ b/src/dev/build/tasks/nodejs/node_shasums.test.ts
@@ -60,7 +60,9 @@ c4edece2c0aa68e816c4e067f397eb12e9d0c81bb37b3d349dbaf47cf246b0b7 win-x86/node.l
jest.mock('axios', () => ({
async get(url: string) {
- expect(url).toBe('https://nodejs.org/dist/v8.9.4/SHASUMS256.txt');
+ expect(url).toBe(
+ 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v8.9.4/SHASUMS256.txt'
+ );
return {
status: 200,
data: mockResponse,
diff --git a/src/dev/build/tasks/nodejs/node_shasums.ts b/src/dev/build/tasks/nodejs/node_shasums.ts
index 1b8d01a9b1d9..e0926aa3e49e 100644
--- a/src/dev/build/tasks/nodejs/node_shasums.ts
+++ b/src/dev/build/tasks/nodejs/node_shasums.ts
@@ -20,7 +20,7 @@
import axios from 'axios';
export async function getNodeShasums(nodeVersion: string) {
- const url = `https://nodejs.org/dist/v${nodeVersion}/SHASUMS256.txt`;
+ const url = `https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v${nodeVersion}/SHASUMS256.txt`;
const { status, data } = await axios.get(url);
diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh
index b9fe8fe77d12..3b239bd3ff73 100644
--- a/src/dev/ci_setup/setup_env.sh
+++ b/src/dev/ci_setup/setup_env.sh
@@ -53,10 +53,10 @@ nodeDir="$cacheDir/node/$nodeVersion"
if [[ "$OS" == "win" ]]; then
nodeBin="$HOME/node"
- nodeUrl="https://nodejs.org/dist/v$nodeVersion/node-v$nodeVersion-win-x64.zip"
+ nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-win-x64.zip"
else
nodeBin="$nodeDir/bin"
- nodeUrl="https://nodejs.org/dist/v$nodeVersion/node-v$nodeVersion-linux-x64.tar.gz"
+ nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-linux-x64.tar.gz"
fi
if [[ "$installNode" == "true" ]]; then
@@ -75,11 +75,11 @@ if [[ "$installNode" == "true" ]]; then
mkdir -p "$nodeDir"
if [[ "$OS" == "win" ]]; then
nodePkg="$nodeDir/${nodeUrl##*/}"
- curl --silent -o "$nodePkg" "$nodeUrl"
+ curl --silent -L -o "$nodePkg" "$nodeUrl"
unzip -qo "$nodePkg" -d "$nodeDir"
mv "${nodePkg%.*}" "$nodeBin"
else
- curl --silent "$nodeUrl" | tar -xz -C "$nodeDir" --strip-components=1
+ curl --silent -L "$nodeUrl" | tar -xz -C "$nodeDir" --strip-components=1
fi
fi
fi
diff --git a/src/dev/jest/integration_tests/junit_reporter.test.js b/src/dev/jest/integration_tests/junit_reporter.test.js
index c26c8cfad802..ed5d73cd87c4 100644
--- a/src/dev/jest/integration_tests/junit_reporter.test.js
+++ b/src/dev/jest/integration_tests/junit_reporter.test.js
@@ -52,7 +52,7 @@ it(
}
);
- expect(result.code).toBe(1);
+ expect(result.exitCode).toBe(1);
await expect(parseXml(readFileSync(XML_PATH, 'utf8'))).resolves.toEqual({
testsuites: {
$: {
diff --git a/src/dev/prs/run_update_prs_cli.ts b/src/dev/prs/run_update_prs_cli.ts
index 6d99ac5fa45f..bb7f50758a28 100644
--- a/src/dev/prs/run_update_prs_cli.ts
+++ b/src/dev/prs/run_update_prs_cli.ts
@@ -86,7 +86,7 @@ run(
// attempt to init upstream remote
await execInDir('git', ['remote', 'add', 'upstream', UPSTREAM_URL]);
} catch (error) {
- if (error.code !== 128) {
+ if (error.exitCode !== 128) {
throw error;
}
diff --git a/src/dev/run_check_core_api_changes.ts b/src/dev/run_check_core_api_changes.ts
index d2c75c86ce74..ccf92cc432d2 100644
--- a/src/dev/run_check_core_api_changes.ts
+++ b/src/dev/run_check_core_api_changes.ts
@@ -76,12 +76,16 @@ const apiExtractorConfig = (folder: string): ExtractorConfig => {
};
const runBuildTypes = async () => {
- await execa.shell('yarn run build:types');
+ await execa('yarn', ['run', 'build:types']);
};
const runApiDocumenter = async (folder: string) => {
- await execa.shell(
- `api-documenter markdown -i ./build/${folder} -o ./docs/development/core/${folder}`
+ await execa(
+ 'api-documenter',
+ ['markdown', '-i', `./build/${folder}`, '-o', `./docs/development/core/${folder}`],
+ {
+ preferLocal: true,
+ }
);
};
diff --git a/src/dev/typescript/exec_in_projects.ts b/src/dev/typescript/exec_in_projects.ts
index 8895e964c781..a34f2bdd2867 100644
--- a/src/dev/typescript/exec_in_projects.ts
+++ b/src/dev/typescript/exec_in_projects.ts
@@ -45,6 +45,7 @@ export function execInProjects(
cwd: process.cwd(),
env: chalk.enabled ? { FORCE_COLOR: 'true' } : {},
stdio: ['ignore', 'pipe', 'pipe'],
+ preferLocal: true,
}).catch(error => {
throw new ProjectFailure(project, error);
}),
diff --git a/src/dev/typescript/run_check_ts_projects_cli.ts b/src/dev/typescript/run_check_ts_projects_cli.ts
index f42a4e275937..85f3d473dce6 100644
--- a/src/dev/typescript/run_check_ts_projects_cli.ts
+++ b/src/dev/typescript/run_check_ts_projects_cli.ts
@@ -30,7 +30,7 @@ import { PROJECTS } from './projects';
export async function runCheckTsProjectsCli() {
run(
async ({ log }) => {
- const files = await execa.stdout('git', ['ls-tree', '--name-only', '-r', 'HEAD'], {
+ const { stdout: files } = await execa('git', ['ls-tree', '--name-only', '-r', 'HEAD'], {
cwd: REPO_ROOT,
});
diff --git a/src/legacy/core_plugins/console/np_ready/public/application/containers/editor/legacy/console_editor/keyboard_shortcuts.ts b/src/legacy/core_plugins/console/np_ready/public/application/containers/editor/legacy/console_editor/keyboard_shortcuts.ts
index 1be571f2739a..d1605c1aefa5 100644
--- a/src/legacy/core_plugins/console/np_ready/public/application/containers/editor/legacy/console_editor/keyboard_shortcuts.ts
+++ b/src/legacy/core_plugins/console/np_ready/public/application/containers/editor/legacy/console_editor/keyboard_shortcuts.ts
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+import { throttle } from 'lodash';
interface Actions {
input: any; // TODO: Wrap this in an editor interface
@@ -24,6 +25,10 @@ interface Actions {
}
export function registerCommands({ input, sendCurrentRequestToES, openDocumentation }: Actions) {
+ const throttledAutoIndent = throttle(() => input.autoIndent(), 500, {
+ leading: true,
+ trailing: true,
+ });
input.commands.addCommand({
name: 'send to elasticsearch',
bindKey: { win: 'Ctrl-Enter', mac: 'Command-Enter' },
@@ -40,7 +45,7 @@ export function registerCommands({ input, sendCurrentRequestToES, openDocumentat
name: 'auto indent request',
bindKey: { win: 'Ctrl-I', mac: 'Command-I' },
exec: () => {
- input.autoIndent();
+ throttledAutoIndent();
},
});
input.commands.addCommand({
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/index.ts b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/index.ts
index cbbbd4182785..1dad1b488590 100644
--- a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/index.ts
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/index.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { PluginInitializerContext } from 'kibana/public';
+import { PluginInitializerContext } from '../../../../../../core/public';
import { DashboardEmbeddableContainerPublicPlugin } from './plugin';
export * from './lib';
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/index.ts b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/index.ts
index b0707610cf21..6c0db82fbbc5 100644
--- a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/index.ts
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/index.ts
@@ -18,3 +18,4 @@
*/
export { ExpandPanelAction, EXPAND_PANEL_ACTION } from './expand_panel_action';
+export { ReplacePanelAction, REPLACE_PANEL_ACTION } from './replace_panel_action';
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/open_replace_panel_flyout.tsx b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/open_replace_panel_flyout.tsx
new file mode 100644
index 000000000000..b6652caf3ab8
--- /dev/null
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/open_replace_panel_flyout.tsx
@@ -0,0 +1,56 @@
+/*
+ * 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 { CoreStart } from 'src/core/public';
+import { ReplacePanelFlyout } from './replace_panel_flyout';
+
+import {
+ IEmbeddable,
+ EmbeddableInput,
+ EmbeddableOutput,
+} from '../../../../../../embeddable_api/public/np_ready/public';
+
+import { IContainer } from '../../../../../../embeddable_api/public/np_ready/public';
+import { NotificationsStart } from '../../../../../../../../core/public';
+
+export async function openReplacePanelFlyout(options: {
+ embeddable: IContainer;
+ core: CoreStart;
+ savedObjectFinder: React.ComponentType;
+ notifications: NotificationsStart;
+ panelToRemove: IEmbeddable;
+}) {
+ const { embeddable, core, panelToRemove, savedObjectFinder, notifications } = options;
+ const flyoutSession = core.overlays.openFlyout(
+ {
+ if (flyoutSession) {
+ flyoutSession.close();
+ }
+ }}
+ panelToRemove={panelToRemove}
+ savedObjectsFinder={savedObjectFinder}
+ notifications={notifications}
+ />,
+ {
+ 'data-test-subj': 'replacePanelFlyout',
+ }
+ );
+}
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.test.tsx b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.test.tsx
new file mode 100644
index 000000000000..e1d2e3609570
--- /dev/null
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.test.tsx
@@ -0,0 +1,129 @@
+/*
+ * 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 { isErrorEmbeddable, EmbeddableFactory } from '../embeddable_api';
+import { ReplacePanelAction } from './replace_panel_action';
+import { DashboardContainer } from '../embeddable';
+import { getSampleDashboardInput, getSampleDashboardPanel } from '../test_helpers';
+import {
+ CONTACT_CARD_EMBEDDABLE,
+ ContactCardEmbeddableFactory,
+ ContactCardEmbeddable,
+ ContactCardEmbeddableInput,
+ ContactCardEmbeddableOutput,
+} from '../../../../../../embeddable_api/public/np_ready/public/lib/test_samples';
+import { DashboardOptions } from '../embeddable/dashboard_container_factory';
+
+const embeddableFactories = new Map();
+embeddableFactories.set(
+ CONTACT_CARD_EMBEDDABLE,
+ new ContactCardEmbeddableFactory({} as any, (() => null) as any, {} as any)
+);
+
+let container: DashboardContainer;
+let embeddable: ContactCardEmbeddable;
+
+beforeEach(async () => {
+ const options: DashboardOptions = {
+ ExitFullScreenButton: () => null,
+ SavedObjectFinder: () => null,
+ application: {} as any,
+ embeddable: {
+ getEmbeddableFactory: (id: string) => embeddableFactories.get(id)!,
+ } as any,
+ inspector: {} as any,
+ notifications: {} as any,
+ overlays: {} as any,
+ savedObjectMetaData: {} as any,
+ uiActions: {} as any,
+ };
+ const input = getSampleDashboardInput({
+ panels: {
+ '123': getSampleDashboardPanel({
+ explicitInput: { firstName: 'Sam', id: '123' },
+ type: CONTACT_CARD_EMBEDDABLE,
+ }),
+ },
+ });
+ container = new DashboardContainer(input, options);
+
+ const contactCardEmbeddable = await container.addNewEmbeddable<
+ ContactCardEmbeddableInput,
+ ContactCardEmbeddableOutput,
+ ContactCardEmbeddable
+ >(CONTACT_CARD_EMBEDDABLE, {
+ firstName: 'Kibana',
+ });
+
+ if (isErrorEmbeddable(contactCardEmbeddable)) {
+ throw new Error('Failed to create embeddable');
+ } else {
+ embeddable = contactCardEmbeddable;
+ }
+});
+
+test('Executes the replace panel action', async () => {
+ let core: any;
+ let SavedObjectFinder: any;
+ let notifications: any;
+ const action = new ReplacePanelAction(core, SavedObjectFinder, notifications);
+ action.execute({ embeddable });
+});
+
+test('Is not compatible when embeddable is not in a dashboard container', async () => {
+ let core: any;
+ let SavedObjectFinder: any;
+ let notifications: any;
+ const action = new ReplacePanelAction(core, SavedObjectFinder, notifications);
+ expect(
+ await action.isCompatible({
+ embeddable: new ContactCardEmbeddable(
+ { firstName: 'sue', id: '123' },
+ { execAction: (() => null) as any }
+ ),
+ })
+ ).toBe(false);
+});
+
+test('Execute throws an error when called with an embeddable not in a parent', async () => {
+ let core: any;
+ let SavedObjectFinder: any;
+ let notifications: any;
+ const action = new ReplacePanelAction(core, SavedObjectFinder, notifications);
+ async function check() {
+ await action.execute({ embeddable: container });
+ }
+ await expect(check()).rejects.toThrow(Error);
+});
+
+test('Returns title', async () => {
+ let core: any;
+ let SavedObjectFinder: any;
+ let notifications: any;
+ const action = new ReplacePanelAction(core, SavedObjectFinder, notifications);
+ expect(action.getDisplayName({ embeddable })).toBeDefined();
+});
+
+test('Returns an icon', async () => {
+ let core: any;
+ let SavedObjectFinder: any;
+ let notifications: any;
+ const action = new ReplacePanelAction(core, SavedObjectFinder, notifications);
+ expect(action.getIconType({ embeddable })).toBeDefined();
+});
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.tsx b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.tsx
new file mode 100644
index 000000000000..f36efc498b15
--- /dev/null
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_action.tsx
@@ -0,0 +1,94 @@
+/*
+ * 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 { i18n } from '@kbn/i18n';
+import { CoreStart } from 'src/core/public';
+
+import { IEmbeddable, ViewMode } from '../../../../../../embeddable_api/public/np_ready/public';
+import { DASHBOARD_CONTAINER_TYPE, DashboardContainer } from '../embeddable';
+import {
+ IAction,
+ IncompatibleActionError,
+} from '../../../../../../../../plugins/ui_actions/public';
+import { NotificationsStart } from '../../../../../../../../core/public';
+import { openReplacePanelFlyout } from './open_replace_panel_flyout';
+
+export const REPLACE_PANEL_ACTION = 'replacePanel';
+
+function isDashboard(embeddable: IEmbeddable): embeddable is DashboardContainer {
+ return embeddable.type === DASHBOARD_CONTAINER_TYPE;
+}
+
+interface ActionContext {
+ embeddable: IEmbeddable;
+}
+
+export class ReplacePanelAction implements IAction {
+ public readonly type = REPLACE_PANEL_ACTION;
+ public readonly id = REPLACE_PANEL_ACTION;
+ public order = 11;
+
+ constructor(
+ private core: CoreStart,
+ private savedobjectfinder: React.ComponentType,
+ private notifications: NotificationsStart
+ ) {}
+
+ public getDisplayName({ embeddable }: ActionContext) {
+ if (!embeddable.parent || !isDashboard(embeddable.parent)) {
+ throw new IncompatibleActionError();
+ }
+ return i18n.translate('dashboardEmbeddableContainer.panel.removePanel.replacePanel', {
+ defaultMessage: 'Replace panel',
+ });
+ }
+
+ public getIconType({ embeddable }: ActionContext) {
+ if (!embeddable.parent || !isDashboard(embeddable.parent)) {
+ throw new IncompatibleActionError();
+ }
+ return 'kqlOperand';
+ }
+
+ public async isCompatible({ embeddable }: ActionContext) {
+ if (embeddable.getInput().viewMode) {
+ if (embeddable.getInput().viewMode === ViewMode.VIEW) {
+ return false;
+ }
+ }
+
+ return Boolean(embeddable.parent && isDashboard(embeddable.parent));
+ }
+
+ public async execute({ embeddable }: ActionContext) {
+ if (!embeddable.parent || !isDashboard(embeddable.parent)) {
+ throw new IncompatibleActionError();
+ }
+
+ const view = embeddable;
+ const dash = embeddable.parent;
+ openReplacePanelFlyout({
+ embeddable: dash,
+ core: this.core,
+ savedObjectFinder: this.savedobjectfinder,
+ notifications: this.notifications,
+ panelToRemove: view,
+ });
+ }
+}
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_flyout.tsx b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_flyout.tsx
new file mode 100644
index 000000000000..0e738556372c
--- /dev/null
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/lib/actions/replace_panel_flyout.tsx
@@ -0,0 +1,146 @@
+/*
+ * 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 { i18n } from '@kbn/i18n';
+import React from 'react';
+
+import { NotificationsStart } from 'src/core/public';
+import { DashboardPanelState } from 'src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public';
+
+import {
+ EuiFlyout,
+ EuiFlyoutBody,
+ EuiFlyoutHeader,
+ EuiTitle,
+ EuiGlobalToastListToast as Toast,
+} from '@elastic/eui';
+
+import { IContainer } from '../../../../../../embeddable_api/public/np_ready/public';
+import {
+ IEmbeddable,
+ EmbeddableInput,
+ EmbeddableOutput,
+} from '../../../../../../embeddable_api/public/np_ready/public';
+
+import { start } from '../../../../../../embeddable_api/public/np_ready/public/legacy';
+
+interface Props {
+ container: IContainer;
+ savedObjectsFinder: React.ComponentType;
+ onClose: () => void;
+ notifications: NotificationsStart;
+ panelToRemove: IEmbeddable;
+}
+
+export class ReplacePanelFlyout extends React.Component {
+ private lastToast: Toast = {
+ id: 'panelReplaceToast',
+ };
+
+ constructor(props: Props) {
+ super(props);
+ }
+
+ public showToast = (name: string) => {
+ // To avoid the clutter of having toast messages cover flyout
+ // close previous toast message before creating a new one
+ if (this.lastToast) {
+ this.props.notifications.toasts.remove(this.lastToast);
+ }
+
+ this.lastToast = this.props.notifications.toasts.addSuccess({
+ title: i18n.translate(
+ 'dashboardEmbeddableContainer.addPanel.savedObjectAddedToContainerSuccessMessageTitle',
+ {
+ defaultMessage: '{savedObjectName} was added',
+ values: {
+ savedObjectName: name,
+ },
+ }
+ ),
+ 'data-test-subj': 'addObjectToContainerSuccess',
+ });
+ };
+
+ public onReplacePanel = async (id: string, type: string, name: string) => {
+ const originalPanels = this.props.container.getInput().panels;
+ const filteredPanels = { ...originalPanels };
+
+ const nnw = (filteredPanels[this.props.panelToRemove.id] as DashboardPanelState).gridData.w;
+ const nnh = (filteredPanels[this.props.panelToRemove.id] as DashboardPanelState).gridData.h;
+ const nnx = (filteredPanels[this.props.panelToRemove.id] as DashboardPanelState).gridData.x;
+ const nny = (filteredPanels[this.props.panelToRemove.id] as DashboardPanelState).gridData.y;
+
+ // add the new view
+ const newObj = await this.props.container.addSavedObjectEmbeddable(type, id);
+
+ const finalPanels = this.props.container.getInput().panels;
+ (finalPanels[newObj.id] as DashboardPanelState).gridData.w = nnw;
+ (finalPanels[newObj.id] as DashboardPanelState).gridData.h = nnh;
+ (finalPanels[newObj.id] as DashboardPanelState).gridData.x = nnx;
+ (finalPanels[newObj.id] as DashboardPanelState).gridData.y = nny;
+
+ // delete the old view
+ delete finalPanels[this.props.panelToRemove.id];
+
+ // apply changes
+ this.props.container.updateInput(finalPanels);
+ this.props.container.reload();
+
+ this.showToast(name);
+ this.props.onClose();
+ };
+
+ public render() {
+ const SavedObjectFinder = this.props.savedObjectsFinder;
+ const savedObjectsFinder = (
+
+ Boolean(embeddableFactory.savedObjectMetaData) && !embeddableFactory.isContainerType
+ )
+ .map(({ savedObjectMetaData }) => savedObjectMetaData as any)}
+ showFilter={true}
+ onChoose={this.onReplacePanel}
+ />
+ );
+
+ const panelToReplace = 'Replace panel ' + this.props.panelToRemove.getTitle() + ' with:';
+
+ return (
+
+
+
+
+ {panelToReplace}
+
+
+
+ {savedObjectsFinder}
+
+ );
+ }
+}
diff --git a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/plugin.ts b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/plugin.ts
index 3d243ab3aa37..bb18d109b0de 100644
--- a/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/plugin.ts
+++ b/src/legacy/core_plugins/dashboard_embeddable_container/public/np_ready/public/plugin.ts
@@ -20,7 +20,7 @@
import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'src/core/public';
import { IUiActionsSetup, IUiActionsStart } from '../../../../../../plugins/ui_actions/public';
import { CONTEXT_MENU_TRIGGER, Plugin as EmbeddablePlugin } from './lib/embeddable_api';
-import { ExpandPanelAction, DashboardContainerFactory } from './lib';
+import { ExpandPanelAction, ReplacePanelAction, DashboardContainerFactory } from './lib';
import { Start as InspectorStartContract } from '../../../../../../plugins/inspector/public';
interface SetupDependencies {
@@ -55,6 +55,14 @@ export class DashboardEmbeddableContainerPublicPlugin
const { application, notifications, overlays } = core;
const { embeddable, inspector, __LEGACY, uiActions } = plugins;
+ const changeViewAction = new ReplacePanelAction(
+ core,
+ __LEGACY.SavedObjectFinder,
+ notifications
+ );
+ uiActions.registerAction(changeViewAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, changeViewAction.id);
+
const factory = new DashboardContainerFactory({
application,
notifications,
diff --git a/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_filter.test.ts b/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_filter.test.ts
index ad1c4457f673..c1d4ebfd3f7f 100644
--- a/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_filter.test.ts
+++ b/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_filter.test.ts
@@ -29,7 +29,7 @@ describe('filter manager utilities', () => {
test('should map query filters', async () => {
const before = {
meta: { index: 'logstash-*' },
- query: { match: { _type: { query: 'apache' } } },
+ query: { match: { _type: { query: 'apache', type: 'phrase' } } },
};
const after = mapFilter(before as Filter);
diff --git a/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_phrase.ts b/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_phrase.ts
index 4f6ff9e0d919..efa348c9ad32 100644
--- a/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_phrase.ts
+++ b/src/legacy/core_plugins/data/public/filter/filter_manager/lib/map_phrase.ts
@@ -24,6 +24,8 @@ import {
FILTERS,
isPhraseFilter,
isScriptedPhraseFilter,
+ getPhraseFilterField,
+ getPhraseFilterValue,
FilterValueFormatter,
} from '@kbn/es-query';
@@ -39,8 +41,8 @@ const getFormattedValueFn = (value: any) => {
const getParams = (filter: PhraseFilter) => {
const scriptedPhraseValue = getScriptedPhraseValue(filter);
const isScriptedFilter = Boolean(scriptedPhraseValue);
- const key = isScriptedFilter ? filter.meta.field || '' : Object.keys(filter.query.match)[0];
- const query = scriptedPhraseValue || get(filter, ['query', 'match', key, 'query']);
+ const key = isScriptedFilter ? filter.meta.field || '' : getPhraseFilterField(filter);
+ const query = scriptedPhraseValue || getPhraseFilterValue(filter);
const params = { query };
return {
diff --git a/src/legacy/core_plugins/data/public/index_patterns/fields/field.ts b/src/legacy/core_plugins/data/public/index_patterns/fields/field.ts
index 628b1999b1c2..4097f5429a80 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/fields/field.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/fields/field.ts
@@ -19,7 +19,6 @@
// @ts-ignore
import { fieldFormats } from 'ui/registry/field_formats';
-import { NotificationsSetup } from 'kibana/public';
import { i18n } from '@kbn/i18n';
// @ts-ignore
import { ObjDefine } from './obj_define';
@@ -27,6 +26,7 @@ import { FieldFormat } from '../../../../../../plugins/data/common/field_formats
// @ts-ignore
import { shortenDottedString } from '../../../../../core_plugins/kibana/common/utils/shorten_dotted_string';
import { IndexPattern } from '../index_patterns';
+import { getNotifications } from '../services';
import { getKbnFieldType } from '../../../../../../plugins/data/public';
@@ -80,8 +80,7 @@ export class Field implements FieldType {
constructor(
indexPattern: IndexPattern,
spec: FieldSpec | Field,
- shortDotsEnable: boolean = false,
- notifications: NotificationsSetup
+ shortDotsEnable: boolean = false
) {
// unwrap old instances of Field
if (spec instanceof Field) spec = spec.$$spec;
@@ -106,8 +105,9 @@ export class Field implements FieldType {
values: { name: spec.name, title: indexPattern.title },
defaultMessage: 'Field {name} in indexPattern {title} is using an unknown field type.',
});
+ const { toasts } = getNotifications();
- notifications.toasts.addDanger({
+ toasts.addDanger({
title,
text,
});
diff --git a/src/legacy/core_plugins/data/public/index_patterns/fields/field_list.ts b/src/legacy/core_plugins/data/public/index_patterns/fields/field_list.ts
index 30f4df66f386..108aacc8e07d 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/fields/field_list.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/fields/field_list.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { NotificationsSetup } from 'kibana/public';
import { findIndex } from 'lodash';
import { IndexPattern } from '../index_patterns';
import { Field, FieldType, FieldSpec } from './field';
@@ -36,7 +35,6 @@ export class FieldList extends Array implements FieldListInterface {
private groups: Map = new Map();
private indexPattern: IndexPattern;
private shortDotsEnable: boolean;
- private notifications: NotificationsSetup;
private setByName = (field: Field) => this.byName.set(field.name, field);
private setByGroup = (field: Field) => {
if (typeof this.groups.get(field.type) === 'undefined') {
@@ -45,23 +43,19 @@ export class FieldList extends Array implements FieldListInterface {
this.groups.get(field.type)!.set(field.name, field);
};
private removeByGroup = (field: FieldType) => this.groups.get(field.type)!.delete(field.name);
- constructor(
- indexPattern: IndexPattern,
- specs: FieldSpec[] = [],
- shortDotsEnable = false,
- notifications: NotificationsSetup
- ) {
+
+ constructor(indexPattern: IndexPattern, specs: FieldSpec[] = [], shortDotsEnable = false) {
super();
this.indexPattern = indexPattern;
this.shortDotsEnable = shortDotsEnable;
- this.notifications = notifications;
+
specs.map(field => this.add(field));
}
getByName = (name: Field['name']) => this.byName.get(name);
getByType = (type: Field['type']) => [...(this.groups.get(type) || new Map()).values()];
add = (field: FieldSpec) => {
- const newField = new Field(this.indexPattern, field, this.shortDotsEnable, this.notifications);
+ const newField = new Field(this.indexPattern, field, this.shortDotsEnable);
this.push(newField);
this.setByName(newField);
this.setByGroup(newField);
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/_pattern_cache.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/_pattern_cache.ts
index adc34e34f58e..a3653bb529fa 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/_pattern_cache.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/_pattern_cache.ts
@@ -21,7 +21,7 @@ import { IndexPattern } from './index_pattern';
export interface PatternCache {
get: (id: string) => IndexPattern;
- set: (id: string, value: Promise) => Promise;
+ set: (id: string, value: IndexPattern) => IndexPattern;
clear: (id: string) => void;
clearAll: () => void;
}
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/flatten_hit.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/flatten_hit.ts
index 1ab229f802ab..18c6578e3142 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/flatten_hit.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/flatten_hit.ts
@@ -18,7 +18,7 @@
*/
import _ from 'lodash';
-import { IndexPattern } from './';
+import { IndexPattern } from './index_pattern';
// Takes a hit, merges it with any stored/scripted fields, and with the metaFields
// returns a flattened version
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.test.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.test.ts
index d8bd9623f5c0..2d43faf49f63 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.test.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.test.ts
@@ -27,6 +27,11 @@ import mockLogStashFields from '../../../../../../fixtures/logstash_fields';
import { stubbedSavedObjectIndexPattern } from '../../../../../../fixtures/stubbed_saved_object_index_pattern';
import { Field } from '../index_patterns_service';
+import { setNotifications } from '../services';
+
+// Temporary disable eslint, will be removed after moving to new platform folder
+// eslint-disable-next-line @kbn/eslint/no-restricted-paths
+import { notificationServiceMock } from '../../../../../../core/public/notifications/notifications_service.mock';
jest.mock('ui/registry/field_formats', () => ({
fieldFormats: {
@@ -109,18 +114,6 @@ const apiClient = {
getFieldsForWildcard: jest.fn(),
};
-const notifications = {
- toasts: {
- addDanger: jest.fn(),
- addError: jest.fn(),
- add: jest.fn(),
- addWarning: jest.fn(),
- addSuccess: jest.fn(),
- remove: jest.fn(),
- get$: jest.fn(),
- },
-};
-
// helper function to create index patterns
function create(id: string, payload?: any): Promise {
const indexPattern = new IndexPattern(
@@ -128,8 +121,7 @@ function create(id: string, payload?: any): Promise {
(cfg: any) => config.get(cfg),
savedObjectsClient as any,
apiClient,
- patternCache,
- notifications
+ patternCache
);
setDocsourcePayload(id, payload);
@@ -143,11 +135,14 @@ function setDocsourcePayload(id: string | null, providedPayload: any) {
describe('IndexPattern', () => {
const indexPatternId = 'test-pattern';
+ const notifications = notificationServiceMock.createStartContract();
let indexPattern: IndexPattern;
// create an indexPattern instance for each test
beforeEach(() => {
+ setNotifications(notifications);
+
return create(indexPatternId).then((pattern: IndexPattern) => {
indexPattern = pattern;
});
@@ -392,8 +387,7 @@ describe('IndexPattern', () => {
(cfg: any) => config.get(cfg),
savedObjectsClient as any,
apiClient,
- patternCache,
- notifications
+ patternCache
);
await pattern.init();
@@ -405,8 +399,7 @@ describe('IndexPattern', () => {
(cfg: any) => config.get(cfg),
savedObjectsClient as any,
apiClient,
- patternCache,
- notifications
+ patternCache
);
await samePattern.init();
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.ts
index 0a1eb4c36ae7..bf0d79e960d9 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.ts
@@ -21,7 +21,7 @@ import _, { each, reject } from 'lodash';
import { i18n } from '@kbn/i18n';
// @ts-ignore
import { fieldFormats } from 'ui/registry/field_formats';
-import { NotificationsSetup, SavedObjectsClientContract } from 'src/core/public';
+import { SavedObjectsClientContract } from 'src/core/public';
import {
DuplicateField,
SavedObjectNotFound,
@@ -38,6 +38,7 @@ import { formatHitProvider } from './format_hit';
import { flattenHitWrapper } from './flatten_hit';
import { IIndexPatternsApiClient } from './index_patterns_api_client';
import { ES_FIELD_TYPES } from '../../../../../../plugins/data/common';
+import { getNotifications } from '../services';
const MAX_ATTEMPTS_TO_RESOLVE_CONFLICTS = 3;
const type = 'index-pattern';
@@ -64,7 +65,6 @@ export class IndexPattern implements StaticIndexPattern {
public formatField: any;
public flattenHit: any;
public metaFields: string[];
- public notifications: NotificationsSetup;
private version: string | undefined;
private savedObjectsClient: SavedObjectsClientContract;
@@ -102,8 +102,7 @@ export class IndexPattern implements StaticIndexPattern {
getConfig: any,
savedObjectsClient: SavedObjectsClientContract,
apiClient: IIndexPatternsApiClient,
- patternCache: any,
- notifications: NotificationsSetup
+ patternCache: any
) {
this.id = id;
this.savedObjectsClient = savedObjectsClient;
@@ -111,12 +110,11 @@ export class IndexPattern implements StaticIndexPattern {
// instead of storing config we rather store the getter only as np uiSettingsClient has circular references
// which cause problems when being consumed from angular
this.getConfig = getConfig;
- this.notifications = notifications;
this.shortDotsEnable = this.getConfig('shortDots:enable');
this.metaFields = this.getConfig('metaFields');
- this.fields = new FieldList(this, [], this.shortDotsEnable, notifications);
+ this.fields = new FieldList(this, [], this.shortDotsEnable);
this.fieldsFetcher = createFieldsFetcher(this, apiClient, this.getConfig('metaFields'));
this.flattenHit = flattenHitWrapper(this, this.getConfig('metaFields'));
this.formatHit = formatHitProvider(this, fieldFormats.getDefaultInstance('string'));
@@ -136,7 +134,7 @@ export class IndexPattern implements StaticIndexPattern {
private initFields(input?: any) {
const newValue = input || this.fields;
- this.fields = new FieldList(this, newValue, this.shortDotsEnable, this.notifications);
+ this.fields = new FieldList(this, newValue, this.shortDotsEnable);
}
private isFieldRefreshRequired(): boolean {
@@ -286,8 +284,7 @@ export class IndexPattern implements StaticIndexPattern {
filterable: true,
searchable: true,
},
- false,
- this.notifications
+ false
)
);
@@ -370,8 +367,7 @@ export class IndexPattern implements StaticIndexPattern {
this.getConfig,
this.savedObjectsClient,
this.patternCache,
- this.fieldsFetcher,
- this.notifications
+ this.fieldsFetcher
);
await duplicatePattern.destroy();
}
@@ -423,8 +419,7 @@ export class IndexPattern implements StaticIndexPattern {
this.getConfig,
this.savedObjectsClient,
this.patternCache,
- this.fieldsFetcher,
- this.notifications
+ this.fieldsFetcher
);
return samePattern.init().then(() => {
// What keys changed from now and what the server returned
@@ -456,7 +451,9 @@ export class IndexPattern implements StaticIndexPattern {
'Unable to write index pattern! Refresh the page to get the most up to date changes for this index pattern.',
} // eslint-disable-line max-len
);
- this.notifications.toasts.addDanger(message);
+ const { toasts } = getNotifications();
+
+ toasts.addDanger(message);
throw err;
}
@@ -494,12 +491,14 @@ export class IndexPattern implements StaticIndexPattern {
// we still want to notify the user that there is a problem
// but we do not want to potentially make any pages unusable
// so do not rethrow the error here
+ const { toasts } = getNotifications();
+
if (err instanceof IndexPatternMissingIndices) {
- this.notifications.toasts.addDanger((err as any).message);
+ toasts.addDanger((err as any).message);
return [];
}
- this.notifications.toasts.addError(err, {
+ toasts.addError(err, {
title: i18n.translate('data.indexPatterns.fetchFieldErrorTitle', {
defaultMessage: 'Error fetching fields',
}),
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.test.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.test.ts
index f573f33ef7a5..8a5c78d13c25 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.test.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.test.ts
@@ -23,7 +23,6 @@ import {
SavedObjectsClientContract,
UiSettingsClientContract,
HttpServiceBase,
- NotificationsSetup,
} from 'kibana/public';
jest.mock('../errors', () => ({
@@ -65,14 +64,15 @@ describe('IndexPatterns', () => {
const savedObjectsClient = {} as SavedObjectsClientContract;
const uiSettings = {} as UiSettingsClientContract;
const http = {} as HttpServiceBase;
- const notifications = {} as NotificationsSetup;
- indexPatterns = new IndexPatterns(uiSettings, savedObjectsClient, http, notifications);
+ indexPatterns = new IndexPatterns(uiSettings, savedObjectsClient, http);
});
- test('does cache gets for the same id', () => {
+ test('does cache gets for the same id', async () => {
const id = '1';
+ const indexPattern = await indexPatterns.get(id);
- expect(indexPatterns.get(id)).toBe(indexPatterns.get(id));
+ expect(indexPattern).toBeDefined();
+ expect(indexPattern).toBe(await indexPatterns.get(id));
});
});
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.ts
index fc5ef6cb7535..d445e2e58cd5 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_patterns.ts
@@ -23,7 +23,6 @@ import {
SimpleSavedObject,
UiSettingsClientContract,
HttpServiceBase,
- NotificationsSetup,
} from 'src/core/public';
// @ts-ignore
import { fieldFormats } from 'ui/registry/field_formats';
@@ -41,17 +40,13 @@ export class IndexPatterns {
private savedObjectsClient: SavedObjectsClientContract;
private savedObjectsCache?: Array>> | null;
private apiClient: IndexPatternsApiClient;
- private notifications: NotificationsSetup;
constructor(
config: UiSettingsClientContract,
savedObjectsClient: SavedObjectsClientContract,
- http: HttpServiceBase,
- notifications: NotificationsSetup
+ http: HttpServiceBase
) {
this.apiClient = new IndexPatternsApiClient(http);
- this.notifications = notifications;
-
this.config = config;
this.savedObjectsClient = savedObjectsClient;
}
@@ -122,19 +117,26 @@ export class IndexPatterns {
return null;
};
- get = (id: string) => {
+ get = async (id: string): Promise => {
const cache = indexPatternCache.get(id);
- return cache || indexPatternCache.set(id, this.make(id));
+ if (cache) {
+ return cache;
+ }
+
+ const indexPattern = await this.make(id);
+
+ return indexPatternCache.set(id, indexPattern);
};
make = (id?: string): Promise => {
- return new IndexPattern(
+ const indexPattern = new IndexPattern(
id,
(cfg: any) => this.config.get(cfg),
this.savedObjectsClient,
this.apiClient,
- indexPatternCache,
- this.notifications
- ).init();
+ indexPatternCache
+ );
+
+ return indexPattern.init();
};
}
diff --git a/src/legacy/core_plugins/data/public/index_patterns/index_patterns_service.ts b/src/legacy/core_plugins/data/public/index_patterns/index_patterns_service.ts
index 562dcb248eda..bdeeb787c983 100644
--- a/src/legacy/core_plugins/data/public/index_patterns/index_patterns_service.ts
+++ b/src/legacy/core_plugins/data/public/index_patterns/index_patterns_service.ts
@@ -21,11 +21,13 @@ import {
UiSettingsClientContract,
SavedObjectsClientContract,
HttpServiceBase,
- NotificationsSetup,
+ NotificationsStart,
} from 'src/core/public';
import { Field, FieldList, FieldListInterface, FieldType } from './fields';
import { createFlattenHitWrapper } from './index_patterns';
import { createIndexPatternSelect } from './components';
+import { setNotifications } from './services';
+
import {
formatHitProvider,
IndexPattern,
@@ -37,7 +39,7 @@ export interface IndexPatternDependencies {
uiSettings: UiSettingsClientContract;
savedObjectsClient: SavedObjectsClientContract;
http: HttpServiceBase;
- notifications: NotificationsSetup;
+ notifications: NotificationsStart;
}
/**
@@ -63,9 +65,11 @@ export class IndexPatternsService {
}
public start({ uiSettings, savedObjectsClient, http, notifications }: IndexPatternDependencies) {
+ setNotifications(notifications);
+
return {
...this.setupApi,
- indexPatterns: new IndexPatterns(uiSettings, savedObjectsClient, http, notifications),
+ indexPatterns: new IndexPatterns(uiSettings, savedObjectsClient, http),
IndexPatternSelect: createIndexPatternSelect(savedObjectsClient),
};
}
diff --git a/src/legacy/core_plugins/data/public/index_patterns/services.ts b/src/legacy/core_plugins/data/public/index_patterns/services.ts
new file mode 100644
index 000000000000..5cc087548d6f
--- /dev/null
+++ b/src/legacy/core_plugins/data/public/index_patterns/services.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 { NotificationsStart } from 'src/core/public';
+import { createGetterSetter } from '../../../../../plugins/kibana_utils/public';
+
+export const [getNotifications, setNotifications] = createGetterSetter(
+ 'Notifications'
+);
diff --git a/src/legacy/core_plugins/data/public/plugin.ts b/src/legacy/core_plugins/data/public/plugin.ts
index 5c9d9317d827..2b634e54e5cb 100644
--- a/src/legacy/core_plugins/data/public/plugin.ts
+++ b/src/legacy/core_plugins/data/public/plugin.ts
@@ -28,6 +28,7 @@ import {
LegacyDependenciesPluginStart,
} from './shim/legacy_dependencies_plugin';
import { DataPublicPluginStart } from '../../../../plugins/data/public';
+import { initLegacyModule } from './shim/legacy_module';
import { IUiActionsSetup } from '../../../../plugins/ui_actions/public';
import {
createFilterAction,
@@ -134,6 +135,8 @@ export class DataPlugin
notifications,
});
+ initLegacyModule(indexPatternsService.indexPatterns);
+
const SearchBar = createSearchBar({
core,
data,
diff --git a/src/legacy/core_plugins/data/public/shim/legacy_dependencies_plugin.ts b/src/legacy/core_plugins/data/public/shim/legacy_dependencies_plugin.ts
index 5b12d56dc7b0..83d276fe9ba7 100644
--- a/src/legacy/core_plugins/data/public/shim/legacy_dependencies_plugin.ts
+++ b/src/legacy/core_plugins/data/public/shim/legacy_dependencies_plugin.ts
@@ -19,7 +19,6 @@
import { Storage } from 'ui/storage';
import { Plugin } from '../../../../../../src/core/public';
-import { initLegacyModule } from './legacy_module';
/** @internal */
export interface LegacyDependenciesPluginSetup {
@@ -32,8 +31,6 @@ export interface LegacyDependenciesPluginStart {
export class LegacyDependenciesPlugin implements Plugin {
public setup() {
- initLegacyModule();
-
return {
storage: new Storage(window.localStorage),
} as LegacyDependenciesPluginSetup;
diff --git a/src/legacy/core_plugins/data/public/shim/legacy_module.ts b/src/legacy/core_plugins/data/public/shim/legacy_module.ts
index 0b5ca7259920..54f513d07215 100644
--- a/src/legacy/core_plugins/data/public/shim/legacy_module.ts
+++ b/src/legacy/core_plugins/data/public/shim/legacy_module.ts
@@ -31,7 +31,7 @@ import { mapAndFlattenFilters } from '../filter/filter_manager/lib/map_and_flatt
import { IndexPatterns } from '../index_patterns/index_patterns';
/** @internal */
-export const initLegacyModule = once((): void => {
+export const initLegacyModule = once((indexPatterns: IndexPatterns): void => {
uiModules
.get('app/kibana', ['react'])
.directive('filterBar', () => {
@@ -122,16 +122,5 @@ export const initLegacyModule = once((): void => {
])
);
- const module = uiModules.get('kibana/index_patterns');
- let _service: any;
- module.service('indexPatterns', function() {
- if (!_service)
- _service = new IndexPatterns(
- npStart.core.uiSettings,
- npStart.core.savedObjects.client,
- npStart.core.http,
- npStart.core.notifications
- );
- return _service;
- });
+ uiModules.get('kibana/index_patterns').value('indexPatterns', indexPatterns);
});
diff --git a/src/legacy/core_plugins/expressions/public/np_ready/public/services.ts b/src/legacy/core_plugins/expressions/public/np_ready/public/services.ts
index 4d95a8a91d0b..ae2a7955233d 100644
--- a/src/legacy/core_plugins/expressions/public/np_ready/public/services.ts
+++ b/src/legacy/core_plugins/expressions/public/np_ready/public/services.ts
@@ -17,25 +17,11 @@
* under the License.
*/
+import { createGetterSetter } from '../../../../../../plugins/kibana_utils/public';
import { IInterpreter } from './types';
import { Start as IInspector } from '../../../../../../plugins/inspector/public';
import { ExpressionsSetup } from './plugin';
-const createGetterSetter = (name: string): [() => T, (value: T) => void] => {
- let value: T;
-
- const get = (): T => {
- if (!value) throw new Error(`${name} was not set`);
- return value;
- };
-
- const set = (newValue: T) => {
- value = newValue;
- };
-
- return [get, set];
-};
-
export const [getInspector, setInspector] = createGetterSetter('Inspector');
export const [getInterpreter, setInterpreter] = createGetterSetter('Interpreter');
export const [getRenderersRegistry, setRenderersRegistry] = createGetterSetter<
diff --git a/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.js b/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.js
index 68b837aebdc9..9f0ed1dfb509 100644
--- a/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.js
+++ b/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.js
@@ -19,7 +19,13 @@
import _ from 'lodash';
import { FilterManager } from './filter_manager.js';
-import { buildPhraseFilter, buildPhrasesFilter } from '@kbn/es-query';
+import {
+ buildPhraseFilter,
+ buildPhrasesFilter,
+ getPhraseFilterField,
+ getPhraseFilterValue,
+ isPhraseFilter,
+} from '@kbn/es-query';
export class PhraseFilterManager extends FilterManager {
constructor(controlId, fieldName, indexPattern, queryFilter) {
@@ -101,8 +107,12 @@ export class PhraseFilterManager extends FilterManager {
}
// single phrase filter
- if (_.has(kbnFilter, ['query', 'match', this.fieldName])) {
- return _.get(kbnFilter, ['query', 'match', this.fieldName, 'query']);
+ if (isPhraseFilter(kbnFilter)) {
+ if (getPhraseFilterField(kbnFilter) !== this.fieldName) {
+ return;
+ }
+
+ return getPhraseFilterValue(kbnFilter);
}
// single phrase filter from bool filter
diff --git a/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.test.js b/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.test.js
index a921922e061d..96a615bf7d95 100644
--- a/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.test.js
+++ b/src/legacy/core_plugins/input_control_vis/public/control/filter_manager/phrase_filter_manager.test.js
@@ -54,7 +54,7 @@ describe('PhraseFilterManager', function () {
expect(newFilter.meta.controlledBy).to.be(controlId);
expect(newFilter.meta.key).to.be('field1');
expect(newFilter).to.have.property('query');
- expect(JSON.stringify(newFilter.query, null, '')).to.be('{"match":{"field1":{"query":"ios","type":"phrase"}}}');
+ expect(JSON.stringify(newFilter.query, null, '')).to.be('{"match_phrase":{"field1":"ios"}}');
});
test('should create bool filter from multiple values', function () {
diff --git a/src/legacy/core_plugins/interpreter/public/renderers/visualization.ts b/src/legacy/core_plugins/interpreter/public/renderers/visualization.ts
index 90020f819dbe..bedba6bfaced 100644
--- a/src/legacy/core_plugins/interpreter/public/renderers/visualization.ts
+++ b/src/legacy/core_plugins/interpreter/public/renderers/visualization.ts
@@ -38,7 +38,11 @@ export const visualization = () => ({
// special case in visualize, we need to render first (without executing the expression), for maps to work
if (visConfig) {
$rootScope.$apply(() => {
- handlers.vis.setCurrentState({ type: visType, params: visConfig });
+ handlers.vis.setCurrentState({
+ type: visType,
+ params: visConfig,
+ title: handlers.vis.title,
+ });
});
}
} else {
diff --git a/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx b/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
index 2059e35b2c42..cfc539eafe7b 100644
--- a/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
+++ b/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
@@ -93,9 +93,11 @@ export function DocViewTableRow({
)}
{displayUnderscoreWarning && }
{displayNoMappingWarning && }
-
- {value}
-
+
);
diff --git a/src/legacy/core_plugins/kibana/public/discover/context/query_parameters/__tests__/action_add_filter.js b/src/legacy/core_plugins/kibana/public/discover/context/query_parameters/__tests__/action_add_filter.js
index 631a36547c98..1c96cbeec04a 100644
--- a/src/legacy/core_plugins/kibana/public/discover/context/query_parameters/__tests__/action_add_filter.js
+++ b/src/legacy/core_plugins/kibana/public/discover/context/query_parameters/__tests__/action_add_filter.js
@@ -49,10 +49,10 @@ describe('context app', function () {
const filterManagerAddStub = filterManagerStub.addFilters;
//get the generated filter
const generatedFilter = filterManagerAddStub.firstCall.args[0][0];
- const queryKeys = Object.keys(generatedFilter.query.match);
+ const queryKeys = Object.keys(generatedFilter.query.match_phrase);
expect(filterManagerAddStub.calledOnce).to.be(true);
expect(queryKeys[0]).to.eql('FIELD_NAME');
- expect(generatedFilter.query.match[queryKeys[0]].query).to.eql('FIELD_VALUE');
+ expect(generatedFilter.query.match_phrase[queryKeys[0]]).to.eql('FIELD_VALUE');
});
it('should pass the index pattern id to the filterManager', function () {
diff --git a/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js b/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js
index dac0880e6fec..b24cf447d21d 100644
--- a/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js
+++ b/src/legacy/core_plugins/kibana/public/visualize/editor/editor.js
@@ -600,6 +600,10 @@ function VisEditor(
} else if (savedVis.id === $route.current.params.id) {
docTitle.change(savedVis.lastSavedTitle);
chrome.breadcrumbs.set($injector.invoke(getEditBreadcrumbs));
+ savedVis.vis.title = savedVis.title;
+ savedVis.vis.description = savedVis.description;
+ // it's needed to save the state to update url string
+ $state.save();
} else {
kbnUrl.change(`${VisualizeConstants.EDIT_PATH}/{{id}}`, { id: savedVis.id });
}
diff --git a/src/legacy/ui/public/agg_types/__tests__/buckets/_terms_other_bucket_helper.js b/src/legacy/ui/public/agg_types/__tests__/buckets/_terms_other_bucket_helper.js
index 4fcae0d1c1aa..dcadeacb3d1f 100644
--- a/src/legacy/ui/public/agg_types/__tests__/buckets/_terms_other_bucket_helper.js
+++ b/src/legacy/ui/public/agg_types/__tests__/buckets/_terms_other_bucket_helper.js
@@ -186,8 +186,8 @@ describe('Terms Agg Other bucket helper', () => {
filter: [{ exists: { field: 'machine.os.raw' } }],
should: [],
must_not: [
- { match_phrase: { 'machine.os.raw': { query: 'ios' } } },
- { match_phrase: { 'machine.os.raw': { query: 'win xp' } } }
+ { match_phrase: { 'machine.os.raw': 'ios' } },
+ { match_phrase: { 'machine.os.raw': 'win xp' } }
]
}
},
@@ -210,13 +210,13 @@ describe('Terms Agg Other bucket helper', () => {
bool: {
must: [],
filter: [
- { match_phrase: { 'geo.src': { query: 'IN' } } },
+ { match_phrase: { 'geo.src': 'IN' } },
{ exists: { field: 'machine.os.raw' } }
],
should: [],
must_not: [
- { match_phrase: { 'machine.os.raw': { query: 'ios' } } },
- { match_phrase: { 'machine.os.raw': { query: 'win xp' } } }
+ { match_phrase: { 'machine.os.raw': 'ios' } },
+ { match_phrase: { 'machine.os.raw': 'win xp' } }
]
}
},
@@ -224,13 +224,13 @@ describe('Terms Agg Other bucket helper', () => {
bool: {
must: [],
filter: [
- { match_phrase: { 'geo.src': { query: 'US' } } },
+ { match_phrase: { 'geo.src': 'US' } },
{ exists: { field: 'machine.os.raw' } }
],
should: [],
must_not: [
- { match_phrase: { 'machine.os.raw': { query: 'ios' } } },
- { match_phrase: { 'machine.os.raw': { query: 'win xp' } } }
+ { match_phrase: { 'machine.os.raw': 'ios' } },
+ { match_phrase: { 'machine.os.raw': 'win xp' } }
]
}
},
diff --git a/src/legacy/ui/public/agg_types/__tests__/buckets/create_filter/terms.js b/src/legacy/ui/public/agg_types/__tests__/buckets/create_filter/terms.js
index 4f95bc55ae72..a2812ffb9796 100644
--- a/src/legacy/ui/public/agg_types/__tests__/buckets/create_filter/terms.js
+++ b/src/legacy/ui/public/agg_types/__tests__/buckets/create_filter/terms.js
@@ -35,7 +35,7 @@ describe('AggConfig Filters', function () {
indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
}));
- it('should return a match filter for terms', function () {
+ it('should return a match_phrase filter for terms', function () {
const vis = new Vis(indexPattern, {
type: 'histogram',
aggs: [ { type: 'terms', schema: 'segment', params: { field: '_type' } } ]
@@ -43,10 +43,9 @@ describe('AggConfig Filters', function () {
const aggConfig = vis.aggs.byName('terms')[0];
const filter = createFilterTerms(aggConfig, 'apache');
expect(filter).to.have.property('query');
- expect(filter.query).to.have.property('match');
- expect(filter.query.match).to.have.property('_type');
- expect(filter.query.match._type).to.have.property('query', 'apache');
- expect(filter.query.match._type).to.have.property('type', 'phrase');
+ expect(filter.query).to.have.property('match_phrase');
+ expect(filter.query.match_phrase).to.have.property('_type');
+ expect(filter.query.match_phrase._type).to.be('apache');
expect(filter).to.have.property('meta');
expect(filter.meta).to.have.property('index', indexPattern.id);
@@ -60,15 +59,15 @@ describe('AggConfig Filters', function () {
const aggConfig = vis.aggs.byName('terms')[0];
const filterFalse = createFilterTerms(aggConfig, 0);
expect(filterFalse).to.have.property('query');
- expect(filterFalse.query).to.have.property('match');
- expect(filterFalse.query.match).to.have.property('ssl');
- expect(filterFalse.query.match.ssl).to.have.property('query', false);
+ expect(filterFalse.query).to.have.property('match_phrase');
+ expect(filterFalse.query.match_phrase).to.have.property('ssl');
+ expect(filterFalse.query.match_phrase.ssl).to.be(false);
const filterTrue = createFilterTerms(aggConfig, 1);
expect(filterTrue).to.have.property('query');
- expect(filterTrue.query).to.have.property('match');
- expect(filterTrue.query.match).to.have.property('ssl');
- expect(filterTrue.query.match.ssl).to.have.property('query', true);
+ expect(filterTrue.query).to.have.property('match_phrase');
+ expect(filterTrue.query.match_phrase).to.have.property('ssl');
+ expect(filterTrue.query.match_phrase.ssl).to.be(true);
});
it('should generate correct __missing__ filter', () => {
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/median.js b/src/legacy/ui/public/agg_types/__tests__/metrics/median.js
deleted file mode 100644
index df65afa5e422..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/median.js
+++ /dev/null
@@ -1,73 +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 expect from '@kbn/expect';
-import ngMock from 'ng_mock';
-import { VisProvider } from '../../../vis';
-import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
-
-describe('AggTypeMetricMedianProvider class', function () {
- let indexPattern;
- let aggDsl;
-
- beforeEach(ngMock.module('kibana'));
- beforeEach(ngMock.inject(function (Private) {
- const Vis = Private(VisProvider);
- indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
-
- const vis = new Vis(indexPattern, {
- 'title': 'New Visualization',
- 'type': 'metric',
- 'params': {
- 'fontSize': 60
- },
- 'aggs': [
- {
- 'id': '1',
- 'type': 'median',
- 'schema': 'metric',
- 'params': {
- 'field': 'bytes',
- 'percents': [
- 50
- ]
- }
- }
- ],
- 'listeners': {}
- });
-
- // Grab the aggConfig off the vis (we don't actually use the vis for
- // anything else)
- const aggConfig = vis.aggs.aggs[0];
- aggDsl = aggConfig.toDsl();
- }));
-
- it('requests the percentiles aggregation in the Elasticsearch query DSL', function () {
- expect(Object.keys(aggDsl)[0]).to.be('percentiles');
- });
-
- it ('asks Elasticsearch for the 50th percentile', function () {
- expect(aggDsl.percentiles.percents).to.eql([50]);
- });
-
- it ('asks Elasticsearch for array-based values in the aggregation response', function () {
- expect(aggDsl.percentiles.keyed).to.be(false);
- });
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/parent_pipeline.js b/src/legacy/ui/public/agg_types/__tests__/metrics/parent_pipeline.js
deleted file mode 100644
index e4ca6075c624..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/parent_pipeline.js
+++ /dev/null
@@ -1,220 +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 expect from '@kbn/expect';
-import sinon from 'sinon';
-import ngMock from 'ng_mock';
-import { derivativeMetricAgg } from '../../metrics/derivative';
-import { cumulativeSumMetricAgg } from '../../metrics/cumulative_sum';
-import { movingAvgMetricAgg } from '../../metrics/moving_avg';
-import { serialDiffMetricAgg } from '../../metrics/serial_diff';
-import { VisProvider } from '../../../vis';
-import StubbedIndexPattern from 'fixtures/stubbed_logstash_index_pattern';
-
-const metrics = [
- { name: 'derivative', title: 'Derivative', agg: derivativeMetricAgg },
- { name: 'cumulative_sum', title: 'Cumulative Sum', agg: cumulativeSumMetricAgg },
- { name: 'moving_avg', title: 'Moving Avg', agg: movingAvgMetricAgg, dslName: 'moving_fn' },
- { name: 'serial_diff', title: 'Serial Diff', agg: serialDiffMetricAgg },
-];
-
-describe('parent pipeline aggs', function () {
- metrics.forEach(metric => {
- describe(`${metric.title} metric`, function () {
-
- let aggDsl;
- let metricAgg;
- let aggConfig;
-
- function init(settings) {
- ngMock.module('kibana');
- ngMock.inject(function (Private) {
- const Vis = Private(VisProvider);
- const indexPattern = Private(StubbedIndexPattern);
- indexPattern.stubSetFieldFormat('bytes', 'bytes');
- metricAgg = metric.agg;
-
- const params = settings || {
- metricAgg: '1',
- customMetric: null
- };
-
- const vis = new Vis(indexPattern, {
- title: 'New Visualization',
- type: 'metric',
- params: {
- fontSize: 60
- },
- aggs: [
- {
- id: '1',
- type: 'count',
- schema: 'metric'
- },
- {
- id: '2',
- type: metric.name,
- schema: 'metric',
- params
- },
- {
- id: '3',
- type: 'max',
- params: { field: '@timestamp' },
- schema: 'metric'
- }
- ],
- listeners: {}
- });
-
- // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
- aggConfig = vis.aggs.aggs[1];
- aggDsl = aggConfig.toDsl(vis.aggs);
- });
- }
-
- it(`should return a label prefixed with ${metric.title} of`, function () {
- init();
- expect(metricAgg.makeLabel(aggConfig)).to.eql(`${metric.title} of Count`);
- });
-
- it(`should return a label ${metric.title} of max bytes`, function () {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '1-orderAgg',
- type: 'max',
- params: { field: 'bytes' },
- schema: 'orderAgg'
- }
- });
- expect(metricAgg.makeLabel(aggConfig)).to.eql(`${metric.title} of Max bytes`);
- });
-
- it(`should return a label prefixed with number of ${metric.title.toLowerCase()}`, function () {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '2-orderAgg',
- type: metric.name,
- params: {
- buckets_path: 'custom',
- customMetric: {
- id: '2-orderAgg-orderAgg',
- type: 'count',
- schema: 'orderAgg'
- }
- },
- schema: 'orderAgg'
- }
- });
- expect(metricAgg.makeLabel(aggConfig)).to.eql(`2. ${metric.title.toLowerCase()} of Count`);
- });
-
- it('should set parent aggs', function () {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '2-metric',
- type: 'max',
- params: { field: 'bytes' },
- schema: 'orderAgg'
- }
- });
- expect(aggDsl[metric.dslName || metric.name].buckets_path).to.be('2-metric');
- expect(aggDsl.parentAggs['2-metric'].max.field).to.be('bytes');
- });
-
- it('should set nested parent aggs', function () {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '2-metric',
- type: metric.name,
- params: {
- buckets_path: 'custom',
- customMetric: {
- id: '2-metric-metric',
- type: 'max',
- params: { field: 'bytes' },
- schema: 'orderAgg'
- }
- },
- schema: 'orderAgg'
- }
- });
- expect(aggDsl[metric.dslName || metric.name].buckets_path).to.be('2-metric');
- expect(aggDsl.parentAggs['2-metric'][metric.dslName || metric.name].buckets_path).to.be('2-metric-metric');
- });
-
- it('should have correct formatter', function () {
- init({
- metricAgg: '3'
- });
- expect(metricAgg.getFormat(aggConfig).type.id).to.be('date');
- });
-
- it('should have correct customMetric nested formatter', function () {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '2-metric',
- type: metric.name,
- params: {
- buckets_path: 'custom',
- customMetric: {
- id: '2-metric-metric',
- type: 'max',
- params: { field: 'bytes' },
- schema: 'orderAgg'
- }
- },
- schema: 'orderAgg'
- }
- });
- expect(metricAgg.getFormat(aggConfig).type.id).to.be('bytes');
- });
-
- it('should call modifyAggConfigOnSearchRequestStart for its customMetric\'s parameters', () => {
- init({
- metricAgg: 'custom',
- customMetric: {
- id: '2-metric',
- type: 'max',
- params: { field: 'bytes' },
- schema: 'orderAgg'
- }
- });
-
- const searchSource = {};
- const customMetricSpy = sinon.spy();
- const customMetric = aggConfig.params.customMetric;
-
- // Attach a modifyAggConfigOnSearchRequestStart with a spy to the first parameter
- customMetric.type.params[0].modifyAggConfigOnSearchRequestStart = customMetricSpy;
-
- aggConfig.type.params.forEach(param => {
- param.modifyAggConfigOnSearchRequestStart(aggConfig, searchSource);
- });
- expect(customMetricSpy.calledWith(customMetric, searchSource)).to.be(true);
- });
- });
- });
-
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/percentile_ranks.js b/src/legacy/ui/public/agg_types/__tests__/metrics/percentile_ranks.js
deleted file mode 100644
index 1f767f888626..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/percentile_ranks.js
+++ /dev/null
@@ -1,57 +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 expect from '@kbn/expect';
-import ngMock from 'ng_mock';
-import { percentileRanksMetricAgg } from '../../metrics/percentile_ranks';
-import { VisProvider } from '../../../vis';
-import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
-
-describe('AggTypesMetricsPercentileRanksProvider class', function () {
-
- let Vis;
- let indexPattern;
-
- beforeEach(ngMock.module('kibana'));
- beforeEach(ngMock.inject(function (Private) {
- Vis = Private(VisProvider);
- indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
- }));
-
- it('uses the custom label if it is set', function () {
- const vis = new Vis(indexPattern, {});
-
- // Grab the aggConfig off the vis (we don't actually use the vis for
- // anything else)
- const aggConfig = vis.aggs.aggs[0];
- aggConfig.params.customLabel = 'my custom field label';
- aggConfig.params.values = [ 5000, 10000 ];
- aggConfig.params.field = {
- displayName: 'bytes'
- };
-
- const responseAggs = percentileRanksMetricAgg.getResponseAggs(aggConfig);
- const percentileRankLabelFor5kBytes = responseAggs[0].makeLabel();
- const percentileRankLabelFor10kBytes = responseAggs[1].makeLabel();
-
- expect(percentileRankLabelFor5kBytes).to.be('Percentile rank 5,000 of "my custom field label"');
- expect(percentileRankLabelFor10kBytes).to.be('Percentile rank 10,000 of "my custom field label"');
- });
-
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/percentiles.js b/src/legacy/ui/public/agg_types/__tests__/metrics/percentiles.js
deleted file mode 100644
index afbf8b95d6e7..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/percentiles.js
+++ /dev/null
@@ -1,55 +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 expect from '@kbn/expect';
-import ngMock from 'ng_mock';
-import { percentilesMetricAgg } from '../../metrics/percentiles';
-import { VisProvider } from '../../../vis';
-import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
-
-describe('AggTypesMetricsPercentilesProvider class', function () {
-
- let Vis;
- let indexPattern;
-
- beforeEach(ngMock.module('kibana'));
- beforeEach(ngMock.inject(function (Private) {
- Vis = Private(VisProvider);
- indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
- }));
-
- it('uses the custom label if it is set', function () {
- const vis = new Vis(indexPattern, {});
-
- // Grab the aggConfig off the vis (we don't actually use the vis for
- // anything else)
- const aggConfig = vis.aggs.aggs[0];
- aggConfig.params.customLabel = 'prince';
- aggConfig.params.percents = [ 95 ];
- aggConfig.params.field = {
- displayName: 'bytes'
- };
-
- const responseAggs = percentilesMetricAgg.getResponseAggs(aggConfig);
- const ninetyFifthPercentileLabel = responseAggs[0].makeLabel();
-
- expect(ninetyFifthPercentileLabel).to.be('95th percentile of prince');
- });
-
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/sibling_pipeline.js b/src/legacy/ui/public/agg_types/__tests__/metrics/sibling_pipeline.js
deleted file mode 100644
index aba5db9cedad..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/sibling_pipeline.js
+++ /dev/null
@@ -1,166 +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 expect from '@kbn/expect';
-import sinon from 'sinon';
-import ngMock from 'ng_mock';
-import { bucketSumMetricAgg } from '../../metrics/bucket_sum';
-import { bucketAvgMetricAgg } from '../../metrics/bucket_avg';
-import { bucketMinMetricAgg } from '../../metrics/bucket_min';
-import { bucketMaxMetricAgg } from '../../metrics/bucket_max';
-import { VisProvider } from '../../../vis';
-import StubbedIndexPattern from 'fixtures/stubbed_logstash_index_pattern';
-
-const metrics = [
- { name: 'sum_bucket', title: 'Overall Sum', provider: bucketSumMetricAgg },
- { name: 'avg_bucket', title: 'Overall Average', provider: bucketAvgMetricAgg },
- { name: 'min_bucket', title: 'Overall Min', provider: bucketMinMetricAgg },
- { name: 'max_bucket', title: 'Overall Max', provider: bucketMaxMetricAgg },
-];
-
-describe('sibling pipeline aggs', function () {
- metrics.forEach(metric => {
- describe(`${metric.title} metric`, function () {
-
- let aggDsl;
- let metricAgg;
- let aggConfig;
-
- function init(settings) {
- ngMock.module('kibana');
- ngMock.inject(function (Private) {
- const Vis = Private(VisProvider);
- const indexPattern = Private(StubbedIndexPattern);
- indexPattern.stubSetFieldFormat('bytes', 'bytes');
- metricAgg = metric.provider;
-
- const params = settings || {
- customMetric: {
- id: '5',
- type: 'count',
- schema: 'metric'
- },
- customBucket: {
- id: '6',
- type: 'date_histogram',
- schema: 'bucket',
- params: { field: '@timestamp', interval: '10s' }
- }
- };
-
- const vis = new Vis(indexPattern, {
- title: 'New Visualization',
- type: 'metric',
- params: {
- fontSize: 60
- },
- aggs: [
- {
- id: '1',
- type: 'count',
- schema: 'metric'
- },
- {
- id: '2',
- type: metric.name,
- schema: 'metric',
- params
- }
- ],
- listeners: {}
- });
-
- // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
- aggConfig = vis.aggs.aggs[1];
- aggDsl = aggConfig.toDsl(vis.aggs);
- });
- }
-
- it(`should return a label prefixed with ${metric.title} of`, function () {
- init();
- expect(metricAgg.makeLabel(aggConfig)).to.eql(`${metric.title} of Count`);
- });
-
- it('should set parent aggs', function () {
- init();
- expect(aggDsl[metric.name].buckets_path).to.be('2-bucket>_count');
- expect(aggDsl.parentAggs['2-bucket'].date_histogram).to.not.be.undefined;
- });
-
- it('should set nested parent aggs', function () {
- init({
- customMetric: {
- id: '5',
- type: 'avg',
- schema: 'metric',
- params: { field: 'bytes' },
- },
- customBucket: {
- id: '6',
- type: 'date_histogram',
- schema: 'bucket',
- params: { field: '@timestamp', interval: '10s', },
- }
- });
- expect(aggDsl[metric.name].buckets_path).to.be('2-bucket>2-metric');
- expect(aggDsl.parentAggs['2-bucket'].date_histogram).to.not.be.undefined;
- expect(aggDsl.parentAggs['2-bucket'].aggs['2-metric'].avg.field).to.equal('bytes');
- });
-
- it('should have correct formatter', function () {
- init({
- customMetric: {
- id: '5',
- type: 'avg',
- schema: 'metric',
- params: { field: 'bytes' },
- },
- customBucket: {
- id: '6',
- type: 'date_histogram',
- schema: 'bucket',
- params: { field: '@timestamp', interval: '10s' },
- }
- });
- expect(metricAgg.getFormat(aggConfig).type.id).to.be('bytes');
- });
-
- it('should call modifyAggConfigOnSearchRequestStart for nested aggs\' parameters', () => {
- init();
-
- const searchSource = {};
- const customMetricSpy = sinon.spy();
- const customBucketSpy = sinon.spy();
- const { customMetric, customBucket } = aggConfig.params;
-
- // Attach a modifyAggConfigOnSearchRequestStart with a spy to the first parameter
- customMetric.type.params[0].modifyAggConfigOnSearchRequestStart = customMetricSpy;
- customBucket.type.params[0].modifyAggConfigOnSearchRequestStart = customBucketSpy;
-
- aggConfig.type.params.forEach(param => {
- param.modifyAggConfigOnSearchRequestStart(aggConfig, searchSource);
- });
- expect(customMetricSpy.calledWith(customMetric, searchSource)).to.be(true);
- expect(customBucketSpy.calledWith(customBucket, searchSource)).to.be(true);
- });
-
- });
- });
-
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/std_deviation.js b/src/legacy/ui/public/agg_types/__tests__/metrics/std_deviation.js
deleted file mode 100644
index b31794f6d9ff..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/std_deviation.js
+++ /dev/null
@@ -1,74 +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 expect from '@kbn/expect';
-import ngMock from 'ng_mock';
-import { stdDeviationMetricAgg } from '../../metrics/std_deviation';
-import { VisProvider } from '../../../vis';
-import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
-
-describe('AggTypeMetricStandardDeviationProvider class', function () {
-
- let Vis;
- let indexPattern;
-
- beforeEach(ngMock.module('kibana'));
- beforeEach(ngMock.inject(function (Private) {
- Vis = Private(VisProvider);
- indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
- }));
-
- it('uses the custom label if it is set', function () {
- const vis = new Vis(indexPattern, {});
-
- // Grab the aggConfig off the vis (we don't actually use the vis for
- // anything else)
- const aggConfig = vis.aggs.aggs[0];
- aggConfig.params.customLabel = 'custom label';
- aggConfig.params.field = {
- displayName: 'memory'
- };
-
- const responseAggs = stdDeviationMetricAgg.getResponseAggs(aggConfig);
- const lowerStdDevLabel = responseAggs[0].makeLabel();
- const upperStdDevLabel = responseAggs[1].makeLabel();
-
- expect(lowerStdDevLabel).to.be('Lower custom label');
- expect(upperStdDevLabel).to.be('Upper custom label');
- });
-
- it('uses the default labels if custom label is not set', function () {
- const vis = new Vis(indexPattern, {});
-
- // Grab the aggConfig off the vis (we don't actually use the vis for
- // anything else)
- const aggConfig = vis.aggs.aggs[0];
- aggConfig.params.field = {
- displayName: 'memory'
- };
-
- const responseAggs = stdDeviationMetricAgg.getResponseAggs(aggConfig);
- const lowerStdDevLabel = responseAggs[0].makeLabel();
- const upperStdDevLabel = responseAggs[1].makeLabel();
-
- expect(lowerStdDevLabel).to.be('Lower Standard Deviation of memory');
- expect(upperStdDevLabel).to.be('Upper Standard Deviation of memory');
- });
-
-});
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/top_hit.js b/src/legacy/ui/public/agg_types/__tests__/metrics/top_hit.js
deleted file mode 100644
index 927d73793f46..000000000000
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/top_hit.js
+++ /dev/null
@@ -1,376 +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 _ from 'lodash';
-import expect from '@kbn/expect';
-import ngMock from 'ng_mock';
-import { topHitMetricAgg } from '../../metrics/top_hit';
-import { VisProvider } from '../../../vis';
-import StubbedIndexPattern from 'fixtures/stubbed_logstash_index_pattern';
-
-describe('Top hit metric', function () {
- let aggDsl;
- let aggConfig;
-
- function init({ field, sortOrder = 'desc', aggregate = 'concat', size = 1 }) {
- ngMock.module('kibana');
- ngMock.inject(function (Private) {
- const Vis = Private(VisProvider);
- const indexPattern = Private(StubbedIndexPattern);
-
- const params = {};
- if (field) {
- params.field = field;
- }
- params.sortOrder = {
- value: sortOrder
- };
- params.aggregate = {
- value: aggregate
- };
- params.size = size;
- const vis = new Vis(indexPattern, {
- title: 'New Visualization',
- type: 'metric',
- params: {
- fontSize: 60
- },
- aggs: [
- {
- id: '1',
- type: 'top_hits',
- schema: 'metric',
- params
- }
- ],
- listeners: {}
- });
-
- // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
- aggConfig = vis.aggs.aggs[0];
- aggDsl = aggConfig.toDsl();
- });
- }
-
- it('should return a label prefixed with Last if sorting in descending order', function () {
- init({ field: 'bytes' });
- expect(topHitMetricAgg.makeLabel(aggConfig)).to.eql('Last bytes');
- });
-
- it('should return a label prefixed with First if sorting in ascending order', function () {
- init({
- field: 'bytes',
- sortOrder: 'asc'
- });
- expect(topHitMetricAgg.makeLabel(aggConfig)).to.eql('First bytes');
- });
-
- it('should request the _source field', function () {
- init({ field: '_source' });
- expect(aggDsl.top_hits._source).to.be(true);
- expect(aggDsl.top_hits.docvalue_fields).to.be(undefined);
- });
-
- it('requests both source and docvalues_fields for non-text aggregatable fields', function () {
- init({ field: 'bytes' });
- expect(aggDsl.top_hits._source).to.be('bytes');
- expect(aggDsl.top_hits.docvalue_fields).to.eql([ { field: 'bytes', format: 'use_field_mapping' } ]);
- });
-
- it('requests both source and docvalues_fields for date aggregatable fields', function () {
- init({ field: '@timestamp' });
- expect(aggDsl.top_hits._source).to.be('@timestamp');
- expect(aggDsl.top_hits.docvalue_fields).to.eql([ { field: '@timestamp', format: 'date_time' } ]);
- });
-
- it('requests just source for aggregatable text fields', function () {
- init({ field: 'machine.os' });
- expect(aggDsl.top_hits._source).to.be('machine.os');
- expect(aggDsl.top_hits.docvalue_fields).to.be(undefined);
- });
-
- it('requests just source for not-aggregatable text fields', function () {
- init({ field: 'non-sortable' });
- expect(aggDsl.top_hits._source).to.be('non-sortable');
- expect(aggDsl.top_hits.docvalue_fields).to.be(undefined);
- });
-
- it('requests just source for not-aggregatable, non-text fields', function () {
- init({ field: 'hashed' });
- expect(aggDsl.top_hits._source).to.be('hashed');
- expect(aggDsl.top_hits.docvalue_fields).to.be(undefined);
- });
-
- describe('try to get the value from the top hit', function () {
- it('should return null if there is no hit', function () {
- const bucket = {
- '1': {
- hits: {
- hits: []
- }
- }
- };
-
- init({ field: '@tags' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.be(null);
- });
-
- it('should return undefined if the field does not appear in the source', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- bytes: 123
- }
- }
- ]
- }
- }
- };
-
- init({ field: '@tags' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.be(undefined);
- });
-
- it('should return the field value from the top hit', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- '@tags': 'aaa'
- }
- }
- ]
- }
- }
- };
-
- init({ field: '@tags' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.be('aaa');
- });
-
- it('should return the object if the field value is an object', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- '@tags': {
- label: 'aaa'
- }
- }
- }
- ]
- }
- }
- };
-
- init({ field: '@tags' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.eql({ label: 'aaa' });
- });
-
- it('should return an array if the field has more than one values', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- '@tags': [ 'aaa', 'bbb' ]
- }
- }
- ]
- }
- }
- };
-
- init({ field: '@tags' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.eql([ 'aaa', 'bbb' ]);
- });
-
- it('should get the value from the doc_values field if the source does not have that field', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- 'machine.os': 'linux'
- },
- fields: {
- 'machine.os.raw': [ 'linux' ]
- }
- }
- ]
- }
- }
- };
-
- init({ field: 'machine.os.raw' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.be('linux');
- });
-
- it('should return undefined if the field is not in the source nor in the doc_values field', function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- bytes: 12345
- },
- fields: {
- bytes: 12345
- }
- }
- ]
- }
- }
- };
-
- init({ field: 'machine.os.raw' });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.be(undefined);
- });
-
- describe('Multivalued field and first/last X docs', function () {
- it('should return a label prefixed with Last X docs if sorting in descending order', function () {
- init({
- field: 'bytes',
- size: 2
- });
- expect(topHitMetricAgg.makeLabel(aggConfig)).to.eql('Last 2 bytes');
- });
-
- it('should return a label prefixed with First X docs if sorting in ascending order', function () {
- init({
- field: 'bytes',
- size: 2,
- sortOrder: 'asc'
- });
- expect(topHitMetricAgg.makeLabel(aggConfig)).to.eql('First 2 bytes');
- });
-
- [
- {
- description: 'concat values with a comma',
- type: 'concat',
- data: [ 1, 2, 3 ],
- result: [ 1, 2, 3 ]
- },
- {
- description: 'sum up the values',
- type: 'sum',
- data: [ 1, 2, 3 ],
- result: 6
- },
- {
- description: 'take the minimum value',
- type: 'min',
- data: [ 1, 2, 3 ],
- result: 1
- },
- {
- description: 'take the maximum value',
- type: 'max',
- data: [ 1, 2, 3 ],
- result: 3
- },
- {
- description: 'take the average value',
- type: 'average',
- data: [ 1, 2, 3 ],
- result: 2
- },
- {
- description: 'support null/undefined',
- type: 'min',
- data: [ undefined, null ],
- result: null
- },
- {
- description: 'support null/undefined',
- type: 'max',
- data: [ undefined, null ],
- result: null
- },
- {
- description: 'support null/undefined',
- type: 'sum',
- data: [ undefined, null ],
- result: null
- },
- {
- description: 'support null/undefined',
- type: 'average',
- data: [ undefined, null ],
- result: null
- }
- ]
- .forEach(agg => {
- it(`should return the result of the ${agg.type} aggregation over the last doc - ${agg.description}`, function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- bytes: agg.data
- }
- }
- ]
- }
- }
- };
-
- init({ field: 'bytes', aggregate: agg.type });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.eql(agg.result);
- });
-
- it(`should return the result of the ${agg.type} aggregation over the last X docs - ${agg.description}`, function () {
- const bucket = {
- '1': {
- hits: {
- hits: [
- {
- _source: {
- bytes: _.dropRight(agg.data, 1)
- }
- },
- {
- _source: {
- bytes: _.last(agg.data)
- }
- }
- ]
- }
- }
- };
-
- init({ field: 'bytes', aggregate: agg.type });
- expect(topHitMetricAgg.getValue(aggConfig, bucket)).to.eql(agg.result);
- });
- });
- });
- });
-});
diff --git a/src/legacy/ui/public/agg_types/buckets/_terms_other_bucket_helper.js b/src/legacy/ui/public/agg_types/buckets/_terms_other_bucket_helper.js
index cdf7b4ff5731..5dfa2e3d6ae3 100644
--- a/src/legacy/ui/public/agg_types/buckets/_terms_other_bucket_helper.js
+++ b/src/legacy/ui/public/agg_types/buckets/_terms_other_bucket_helper.js
@@ -113,7 +113,7 @@ const getAggConfigResultMissingBuckets = (responseAggs, aggId) => {
const getOtherAggTerms = (requestAgg, key, otherAgg) => {
return requestAgg['other-filter'].filters.filters[key].bool.must_not
.filter(filter => filter.match_phrase && filter.match_phrase[otherAgg.params.field.name])
- .map(filter => filter.match_phrase[otherAgg.params.field.name].query);
+ .map(filter => filter.match_phrase[otherAgg.params.field.name]);
};
export const buildOtherBucketAgg = (aggConfigs, aggWithOtherBucket, response) => {
diff --git a/src/legacy/ui/public/agg_types/metrics/get_response_agg_config_class.ts b/src/legacy/ui/public/agg_types/metrics/lib/get_response_agg_config_class.ts
similarity index 75%
rename from src/legacy/ui/public/agg_types/metrics/get_response_agg_config_class.ts
rename to src/legacy/ui/public/agg_types/metrics/lib/get_response_agg_config_class.ts
index 34658431a96a..054543de3dd0 100644
--- a/src/legacy/ui/public/agg_types/metrics/get_response_agg_config_class.ts
+++ b/src/legacy/ui/public/agg_types/metrics/lib/get_response_agg_config_class.ts
@@ -16,9 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-
import { assign } from 'lodash';
-import { IMetricAggConfig } from './metric_agg_type';
+import { IMetricAggConfig } from '../metric_agg_type';
/**
* Get the ResponseAggConfig class for an aggConfig,
@@ -41,10 +40,7 @@ export interface IResponseAggConfig extends IMetricAggConfig {
parentId: IMetricAggConfig['id'];
}
-export const create = (
- parentAgg: IMetricAggConfig,
- props: Partial
-): IMetricAggConfig => {
+export const create = (parentAgg: IMetricAggConfig, props: Partial) => {
/**
* AggConfig "wrapper" for multi-value metric aggs which
* need to modify AggConfig behavior for each value produced.
@@ -52,23 +48,21 @@ export const create = (
* @param {string|number} key - the key or index that identifies
* this part of the multi-value
*/
- class ResponseAggConfig {
- id: IMetricAggConfig['id'];
- key: string | number;
- parentId: IMetricAggConfig['id'];
-
- constructor(key: string) {
- this.key = key;
- this.parentId = parentAgg.id;
+ function ResponseAggConfig(this: IResponseAggConfig, key: string) {
+ const parentId = parentAgg.id;
+ let id;
- const subId = String(key);
+ const subId = String(key);
- if (subId.indexOf('.') > -1) {
- this.id = this.parentId + "['" + subId.replace(/'/g, "\\'") + "']";
- } else {
- this.id = this.parentId + '.' + subId;
- }
+ if (subId.indexOf('.') > -1) {
+ id = parentId + "['" + subId.replace(/'/g, "\\'") + "']";
+ } else {
+ id = parentId + '.' + subId;
}
+
+ this.id = id;
+ this.key = key;
+ this.parentId = parentId;
}
ResponseAggConfig.prototype = Object.create(parentAgg);
@@ -76,5 +70,5 @@ export const create = (
assign(ResponseAggConfig.prototype, props);
- return (ResponseAggConfig as unknown) as IMetricAggConfig;
+ return ResponseAggConfig;
};
diff --git a/src/legacy/ui/public/agg_types/__tests__/metrics/lib/make_nested_label.js b/src/legacy/ui/public/agg_types/metrics/lib/make_nested_label.test.ts
similarity index 62%
rename from src/legacy/ui/public/agg_types/__tests__/metrics/lib/make_nested_label.js
rename to src/legacy/ui/public/agg_types/metrics/lib/make_nested_label.test.ts
index f4ba55055787..aed5bd630d3d 100644
--- a/src/legacy/ui/public/agg_types/__tests__/metrics/lib/make_nested_label.js
+++ b/src/legacy/ui/public/agg_types/metrics/lib/make_nested_label.test.ts
@@ -17,40 +17,43 @@
* under the License.
*/
-import expect from '@kbn/expect';
-import { makeNestedLabel } from '../../../metrics/lib/make_nested_label';
+import { makeNestedLabel } from './make_nested_label';
+import { IMetricAggConfig } from 'ui/agg_types/metrics/metric_agg_type';
-describe('metric agg make_nested_label', function () {
-
- function generateAggConfig(metricLabel) {
- return {
+describe('metric agg make_nested_label', () => {
+ const generateAggConfig = (metricLabel: string): IMetricAggConfig => {
+ return ({
params: {
customMetric: {
- makeLabel: () => { return metricLabel; }
- }
+ makeLabel: () => {
+ return metricLabel;
+ },
+ },
},
- getParam(key) {
+ getParam(this: IMetricAggConfig, key: string) {
return this.params[key];
- }
- };
- }
+ },
+ } as unknown) as IMetricAggConfig;
+ };
- it('should return a metric label with prefix', function () {
+ it('should return a metric label with prefix', () => {
const aggConfig = generateAggConfig('Count');
const label = makeNestedLabel(aggConfig, 'derivative');
- expect(label).to.eql('Derivative of Count');
+
+ expect(label).toEqual('Derivative of Count');
});
- it('should return a numbered prefix', function () {
+ it('should return a numbered prefix', () => {
const aggConfig = generateAggConfig('Derivative of Count');
const label = makeNestedLabel(aggConfig, 'derivative');
- expect(label).to.eql('2. derivative of Count');
+
+ expect(label).toEqual('2. derivative of Count');
});
- it('should return a prefix with correct order', function () {
+ it('should return a prefix with correct order', () => {
const aggConfig = generateAggConfig('3. derivative of Count');
const label = makeNestedLabel(aggConfig, 'derivative');
- expect(label).to.eql('4. derivative of Count');
- });
+ expect(label).toEqual('4. derivative of Count');
+ });
});
diff --git a/src/legacy/ui/public/agg_types/metrics/median.test.ts b/src/legacy/ui/public/agg_types/metrics/median.test.ts
new file mode 100644
index 000000000000..819c24f135cd
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/median.test.ts
@@ -0,0 +1,69 @@
+/*
+ * 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 { AggConfigs } from '../agg_configs';
+import { METRIC_TYPES } from './metric_agg_types';
+
+jest.mock('ui/new_platform');
+
+describe('AggTypeMetricMedianProvider class', () => {
+ let aggConfigs: AggConfigs;
+
+ beforeEach(() => {
+ const field = {
+ name: 'bytes',
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: METRIC_TYPES.MEDIAN,
+ type: METRIC_TYPES.MEDIAN,
+ schema: 'metric',
+ params: {
+ field: 'bytes',
+ percents: [70],
+ },
+ },
+ ],
+ null
+ );
+ });
+
+ it('requests the percentiles aggregation in the Elasticsearch query DSL', () => {
+ const dsl: Record = aggConfigs.toDsl();
+
+ expect(dsl.median.percentiles.percents).toEqual([70]);
+ });
+
+ it('asks Elasticsearch for array-based values in the aggregation response', () => {
+ const dsl: Record = aggConfigs.toDsl();
+
+ expect(dsl.median.percentiles.keyed).toBeFalsy();
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/parent_pipeline.test.ts b/src/legacy/ui/public/agg_types/metrics/parent_pipeline.test.ts
new file mode 100644
index 000000000000..bf88adcee92b
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/parent_pipeline.test.ts
@@ -0,0 +1,248 @@
+/*
+ * 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 sinon from 'sinon';
+import { derivativeMetricAgg } from './derivative';
+import { cumulativeSumMetricAgg } from './cumulative_sum';
+import { movingAvgMetricAgg } from './moving_avg';
+import { serialDiffMetricAgg } from './serial_diff';
+import { AggConfigs } from 'ui/agg_types';
+import { IMetricAggConfig, MetricAggType } from 'ui/agg_types/metrics/metric_agg_type';
+
+jest.mock('../../vis/editors/default/schemas', () => {
+ class MockedSchemas {
+ all = [{}];
+ }
+ return {
+ Schemas: jest.fn().mockImplementation(() => new MockedSchemas()),
+ };
+});
+
+jest.mock('../../vis/editors/default/controls/sub_metric', () => {
+ return {
+ SubMetricParamEditor() {},
+ };
+});
+
+jest.mock('../../vis/editors/default/controls/sub_agg', () => {
+ return {
+ SubAggParamEditor() {},
+ };
+});
+
+jest.mock('ui/new_platform');
+
+describe('parent pipeline aggs', function() {
+ const metrics = [
+ { name: 'derivative', title: 'Derivative', provider: derivativeMetricAgg },
+ { name: 'cumulative_sum', title: 'Cumulative Sum', provider: cumulativeSumMetricAgg },
+ { name: 'moving_avg', title: 'Moving Avg', provider: movingAvgMetricAgg, dslName: 'moving_fn' },
+ { name: 'serial_diff', title: 'Serial Diff', provider: serialDiffMetricAgg },
+ ];
+
+ metrics.forEach(metric => {
+ describe(`${metric.title} metric`, () => {
+ let aggDsl: Record;
+ let metricAgg: MetricAggType;
+ let aggConfig: IMetricAggConfig;
+
+ const init = (
+ params: any = {
+ metricAgg: '1',
+ customMetric: null,
+ }
+ ) => {
+ const field = {
+ name: 'field',
+ format: {
+ type: {
+ id: 'bytes',
+ },
+ },
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ const aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: '1',
+ type: 'count',
+ schema: 'metric',
+ },
+ {
+ id: '2',
+ type: metric.name,
+ schema: 'metric',
+ params,
+ },
+ {
+ id: '3',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'metric',
+ },
+ ],
+ null
+ );
+
+ // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
+ metricAgg = metric.provider;
+ aggConfig = aggConfigs.aggs[1];
+ aggDsl = aggConfig.toDsl(aggConfigs);
+ };
+
+ it(`should return a label prefixed with ${metric.title} of`, () => {
+ init();
+
+ expect(metricAgg.makeLabel(aggConfig)).toEqual(`${metric.title} of Count`);
+ });
+
+ it(`should return a label ${metric.title} of max bytes`, () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '1-orderAgg',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'orderAgg',
+ },
+ });
+ expect(metricAgg.makeLabel(aggConfig)).toEqual(`${metric.title} of Max field`);
+ });
+
+ it(`should return a label prefixed with number of ${metric.title.toLowerCase()}`, () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '2-orderAgg',
+ type: metric.name,
+ params: {
+ buckets_path: 'custom',
+ customMetric: {
+ id: '2-orderAgg-orderAgg',
+ type: 'count',
+ schema: 'orderAgg',
+ },
+ },
+ schema: 'orderAgg',
+ },
+ });
+ expect(metricAgg.makeLabel(aggConfig)).toEqual(`2. ${metric.title.toLowerCase()} of Count`);
+ });
+
+ it('should set parent aggs', () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '2-metric',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'orderAgg',
+ },
+ });
+ expect(aggDsl[metric.dslName || metric.name].buckets_path).toBe('2-metric');
+ expect(aggDsl.parentAggs['2-metric'].max.field).toBe('field');
+ });
+
+ it('should set nested parent aggs', () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '2-metric',
+ type: metric.name,
+ params: {
+ buckets_path: 'custom',
+ customMetric: {
+ id: '2-metric-metric',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'orderAgg',
+ },
+ },
+ schema: 'orderAgg',
+ },
+ });
+ expect(aggDsl[metric.dslName || metric.name].buckets_path).toBe('2-metric');
+ expect(aggDsl.parentAggs['2-metric'][metric.dslName || metric.name].buckets_path).toBe(
+ '2-metric-metric'
+ );
+ });
+
+ it('should have correct formatter', () => {
+ init({
+ metricAgg: '3',
+ });
+ expect(metricAgg.getFormat(aggConfig).type.id).toBe('bytes');
+ });
+
+ it('should have correct customMetric nested formatter', () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '2-metric',
+ type: metric.name,
+ params: {
+ buckets_path: 'custom',
+ customMetric: {
+ id: '2-metric-metric',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'orderAgg',
+ },
+ },
+ schema: 'orderAgg',
+ },
+ });
+ expect(metricAgg.getFormat(aggConfig).type.id).toBe('bytes');
+ });
+
+ it("should call modifyAggConfigOnSearchRequestStart for its customMetric's parameters", () => {
+ init({
+ metricAgg: 'custom',
+ customMetric: {
+ id: '2-metric',
+ type: 'max',
+ params: { field: 'field' },
+ schema: 'orderAgg',
+ },
+ });
+
+ const searchSource: any = {};
+ const customMetricSpy = sinon.spy();
+ const customMetric = aggConfig.params.customMetric;
+
+ // Attach a modifyAggConfigOnSearchRequestStart with a spy to the first parameter
+ customMetric.type.params[0].modifyAggConfigOnSearchRequestStart = customMetricSpy;
+
+ aggConfig.type.params.forEach(param => {
+ param.modifyAggConfigOnSearchRequestStart(aggConfig, searchSource);
+ });
+ expect(customMetricSpy.calledWith(customMetric, searchSource)).toBe(true);
+ });
+ });
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/percentile_ranks.test.ts b/src/legacy/ui/public/agg_types/metrics/percentile_ranks.test.ts
new file mode 100644
index 000000000000..f3882ca57161
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/percentile_ranks.test.ts
@@ -0,0 +1,75 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { IPercentileRanksAggConfig, percentileRanksMetricAgg } from './percentile_ranks';
+import { AggConfigs } from '../agg_configs';
+import { METRIC_TYPES } from './metric_agg_types';
+
+jest.mock('ui/new_platform');
+
+describe('AggTypesMetricsPercentileRanksProvider class', function() {
+ let aggConfigs: AggConfigs;
+
+ beforeEach(() => {
+ const field = {
+ name: 'bytes',
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: METRIC_TYPES.PERCENTILE_RANKS,
+ type: METRIC_TYPES.PERCENTILE_RANKS,
+ schema: 'metric',
+ params: {
+ field: {
+ displayName: 'bytes',
+ format: {
+ convert: jest.fn(x => x),
+ },
+ },
+ customLabel: 'my custom field label',
+ values: [5000, 10000],
+ },
+ },
+ ],
+ null
+ );
+ });
+
+ it('uses the custom label if it is set', function() {
+ const responseAggs: any = percentileRanksMetricAgg.getResponseAggs(aggConfigs
+ .aggs[0] as IPercentileRanksAggConfig);
+
+ const percentileRankLabelFor5kBytes = responseAggs[0].makeLabel();
+ const percentileRankLabelFor10kBytes = responseAggs[1].makeLabel();
+
+ expect(percentileRankLabelFor5kBytes).toBe('Percentile rank 5000 of "my custom field label"');
+ expect(percentileRankLabelFor10kBytes).toBe('Percentile rank 10000 of "my custom field label"');
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/percentile_ranks.ts b/src/legacy/ui/public/agg_types/metrics/percentile_ranks.ts
index 6c069f8b70d6..8b923092772d 100644
--- a/src/legacy/ui/public/agg_types/metrics/percentile_ranks.ts
+++ b/src/legacy/ui/public/agg_types/metrics/percentile_ranks.ts
@@ -20,7 +20,7 @@
import { i18n } from '@kbn/i18n';
import { PercentileRanksEditor } from '../../vis/editors/default/controls/percentile_ranks';
import { IMetricAggConfig, MetricAggType } from './metric_agg_type';
-import { getResponseAggConfigClass, IResponseAggConfig } from './get_response_agg_config_class';
+import { getResponseAggConfigClass, IResponseAggConfig } from './lib/get_response_agg_config_class';
import { getPercentileValue } from './percentiles_get_value';
import { METRIC_TYPES } from './metric_agg_types';
@@ -30,7 +30,7 @@ import { KBN_FIELD_TYPES } from '../../../../../plugins/data/common';
// required by the values editor
-type IPercentileRanksAggConfig = IResponseAggConfig;
+export type IPercentileRanksAggConfig = IResponseAggConfig;
const valueProps = {
makeLabel(this: IPercentileRanksAggConfig) {
diff --git a/src/legacy/ui/public/agg_types/metrics/percentiles.test.ts b/src/legacy/ui/public/agg_types/metrics/percentiles.test.ts
new file mode 100644
index 000000000000..1503f43b22dc
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/percentiles.test.ts
@@ -0,0 +1,73 @@
+/*
+ * 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 { IPercentileAggConfig, percentilesMetricAgg } from './percentiles';
+import { AggConfigs } from '../agg_configs';
+import { METRIC_TYPES } from './metric_agg_types';
+
+jest.mock('ui/new_platform');
+
+describe('AggTypesMetricsPercentilesProvider class', () => {
+ let aggConfigs: AggConfigs;
+
+ beforeEach(() => {
+ const field = {
+ name: 'bytes',
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: METRIC_TYPES.PERCENTILES,
+ type: METRIC_TYPES.PERCENTILES,
+ schema: 'metric',
+ params: {
+ field: {
+ displayName: 'bytes',
+ format: {
+ convert: jest.fn(x => `${x}th`),
+ },
+ },
+ customLabel: 'prince',
+ percents: [95],
+ },
+ },
+ ],
+ null
+ );
+ });
+
+ it('uses the custom label if it is set', () => {
+ const responseAggs: any = percentilesMetricAgg.getResponseAggs(aggConfigs
+ .aggs[0] as IPercentileAggConfig);
+
+ const ninetyFifthPercentileLabel = responseAggs[0].makeLabel();
+
+ expect(ninetyFifthPercentileLabel).toBe('95th percentile of prince');
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/percentiles.ts b/src/legacy/ui/public/agg_types/metrics/percentiles.ts
index 21cb3939d38f..0ac045546847 100644
--- a/src/legacy/ui/public/agg_types/metrics/percentiles.ts
+++ b/src/legacy/ui/public/agg_types/metrics/percentiles.ts
@@ -23,14 +23,14 @@ import { IMetricAggConfig, MetricAggType } from './metric_agg_type';
import { METRIC_TYPES } from './metric_agg_types';
import { KBN_FIELD_TYPES } from '../../../../../plugins/data/common';
-import { getResponseAggConfigClass, IResponseAggConfig } from './get_response_agg_config_class';
+import { getResponseAggConfigClass, IResponseAggConfig } from './lib/get_response_agg_config_class';
import { getPercentileValue } from './percentiles_get_value';
import { PercentilesEditor } from '../../vis/editors/default/controls/percentiles';
// @ts-ignore
import { ordinalSuffix } from '../../utils/ordinal_suffix';
-type IPercentileAggConfig = IResponseAggConfig;
+export type IPercentileAggConfig = IResponseAggConfig;
const valueProps = {
makeLabel(this: IPercentileAggConfig) {
diff --git a/src/legacy/ui/public/agg_types/metrics/percentiles_get_value.ts b/src/legacy/ui/public/agg_types/metrics/percentiles_get_value.ts
index 56e1f0456d62..c357d7bb0a90 100644
--- a/src/legacy/ui/public/agg_types/metrics/percentiles_get_value.ts
+++ b/src/legacy/ui/public/agg_types/metrics/percentiles_get_value.ts
@@ -18,7 +18,7 @@
*/
import { find } from 'lodash';
-import { IResponseAggConfig } from './get_response_agg_config_class';
+import { IResponseAggConfig } from './lib/get_response_agg_config_class';
export const getPercentileValue = (
agg: TAggConfig,
diff --git a/src/legacy/ui/public/agg_types/metrics/sibling_pipeline.test.ts b/src/legacy/ui/public/agg_types/metrics/sibling_pipeline.test.ts
new file mode 100644
index 000000000000..a3381aca6f9e
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/sibling_pipeline.test.ts
@@ -0,0 +1,188 @@
+/*
+ * 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 { spy } from 'sinon';
+import { bucketSumMetricAgg } from './bucket_sum';
+import { bucketAvgMetricAgg } from './bucket_avg';
+import { bucketMinMetricAgg } from './bucket_min';
+import { bucketMaxMetricAgg } from './bucket_max';
+
+import { AggConfigs } from 'ui/agg_types';
+import { IMetricAggConfig, MetricAggType } from 'ui/agg_types/metrics/metric_agg_type';
+
+jest.mock('../../vis/editors/default/schemas', () => {
+ class MockedSchemas {
+ all = [{}];
+ }
+ return {
+ Schemas: jest.fn().mockImplementation(() => new MockedSchemas()),
+ };
+});
+
+jest.mock('../../vis/editors/default/controls/sub_metric', () => {
+ return {
+ SubMetricParamEditor() {},
+ };
+});
+
+jest.mock('ui/new_platform');
+
+describe('sibling pipeline aggs', () => {
+ const metrics = [
+ { name: 'sum_bucket', title: 'Overall Sum', provider: bucketSumMetricAgg },
+ { name: 'avg_bucket', title: 'Overall Average', provider: bucketAvgMetricAgg },
+ { name: 'min_bucket', title: 'Overall Min', provider: bucketMinMetricAgg },
+ { name: 'max_bucket', title: 'Overall Max', provider: bucketMaxMetricAgg },
+ ];
+
+ metrics.forEach(metric => {
+ describe(`${metric.title} metric`, () => {
+ let aggDsl: Record;
+ let metricAgg: MetricAggType;
+ let aggConfig: IMetricAggConfig;
+
+ const init = (settings?: any) => {
+ const field = {
+ name: 'field',
+ format: {
+ type: {
+ id: 'bytes',
+ },
+ },
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ const aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: '1',
+ type: 'count',
+ schema: 'metric',
+ },
+ {
+ id: '2',
+ type: metric.name,
+ schema: 'metric',
+ params: settings || {
+ customMetric: {
+ id: '5',
+ type: 'count',
+ schema: 'metric',
+ },
+ customBucket: {
+ id: '6',
+ type: 'date_histogram',
+ schema: 'bucket',
+ params: { field: 'field', interval: '10s' },
+ },
+ },
+ },
+ ],
+ null
+ );
+
+ // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
+ metricAgg = metric.provider;
+ aggConfig = aggConfigs.aggs[1];
+ aggDsl = aggConfig.toDsl(aggConfigs);
+ };
+
+ it(`should return a label prefixed with ${metric.title} of`, () => {
+ init();
+
+ expect(metricAgg.makeLabel(aggConfig)).toEqual(`${metric.title} of Count`);
+ });
+
+ it('should set parent aggs', function() {
+ init();
+
+ expect(aggDsl[metric.name].buckets_path).toBe('2-bucket>_count');
+ expect(aggDsl.parentAggs['2-bucket'].date_histogram).not.toBeUndefined();
+ });
+
+ it('should set nested parent aggs', () => {
+ init({
+ customMetric: {
+ id: '5',
+ type: 'avg',
+ schema: 'metric',
+ params: { field: 'field' },
+ },
+ customBucket: {
+ id: '6',
+ type: 'date_histogram',
+ schema: 'bucket',
+ params: { field: 'field', interval: '10s' },
+ },
+ });
+
+ expect(aggDsl[metric.name].buckets_path).toBe('2-bucket>2-metric');
+ expect(aggDsl.parentAggs['2-bucket'].date_histogram).not.toBeUndefined();
+ expect(aggDsl.parentAggs['2-bucket'].aggs['2-metric'].avg.field).toEqual('field');
+ });
+
+ it('should have correct formatter', () => {
+ init({
+ customMetric: {
+ id: '5',
+ type: 'avg',
+ schema: 'metric',
+ params: { field: 'field' },
+ },
+ customBucket: {
+ id: '6',
+ type: 'date_histogram',
+ schema: 'bucket',
+ params: { field: 'field', interval: '10s' },
+ },
+ });
+
+ expect(metricAgg.getFormat(aggConfig).type.id).toBe('bytes');
+ });
+
+ it("should call modifyAggConfigOnSearchRequestStart for nested aggs' parameters", () => {
+ init();
+
+ const searchSource: any = {};
+ const customMetricSpy = spy();
+ const customBucketSpy = spy();
+ const { customMetric, customBucket } = aggConfig.params;
+
+ // Attach a modifyAggConfigOnSearchRequestStart with a spy to the first parameter
+ customMetric.type.params[0].modifyAggConfigOnSearchRequestStart = customMetricSpy;
+ customBucket.type.params[0].modifyAggConfigOnSearchRequestStart = customBucketSpy;
+
+ aggConfig.type.params.forEach(param => {
+ param.modifyAggConfigOnSearchRequestStart(aggConfig, searchSource);
+ });
+
+ expect(customMetricSpy.calledWith(customMetric, searchSource)).toBe(true);
+ expect(customBucketSpy.calledWith(customBucket, searchSource)).toBe(true);
+ });
+ });
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/std_deviation.test.ts b/src/legacy/ui/public/agg_types/metrics/std_deviation.test.ts
new file mode 100644
index 000000000000..ca81e8daee44
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/std_deviation.test.ts
@@ -0,0 +1,83 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { IStdDevAggConfig, stdDeviationMetricAgg } from './std_deviation';
+import { AggConfigs } from 'ui/agg_types';
+import { METRIC_TYPES } from 'ui/agg_types/metrics/metric_agg_types';
+
+jest.mock('ui/new_platform');
+
+describe('AggTypeMetricStandardDeviationProvider class', () => {
+ const getAggConfigs = (customLabel?: string) => {
+ const field = {
+ name: 'memory',
+ };
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ } as any;
+
+ return new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: METRIC_TYPES.STD_DEV,
+ type: METRIC_TYPES.STD_DEV,
+ schema: 'metric',
+ params: {
+ field: {
+ displayName: 'memory',
+ },
+ customLabel,
+ },
+ },
+ ],
+ null
+ );
+ };
+
+ it('uses the custom label if it is set', () => {
+ const aggConfigs = getAggConfigs('custom label');
+ const responseAggs: any = stdDeviationMetricAgg.getResponseAggs(aggConfigs
+ .aggs[0] as IStdDevAggConfig);
+
+ const lowerStdDevLabel = responseAggs[0].makeLabel();
+ const upperStdDevLabel = responseAggs[1].makeLabel();
+
+ expect(lowerStdDevLabel).toBe('Lower custom label');
+ expect(upperStdDevLabel).toBe('Upper custom label');
+ });
+
+ it('uses the default labels if custom label is not set', () => {
+ const aggConfigs = getAggConfigs();
+
+ const responseAggs: any = stdDeviationMetricAgg.getResponseAggs(aggConfigs
+ .aggs[0] as IStdDevAggConfig);
+
+ const lowerStdDevLabel = responseAggs[0].makeLabel();
+ const upperStdDevLabel = responseAggs[1].makeLabel();
+
+ expect(lowerStdDevLabel).toBe('Lower Standard Deviation of memory');
+ expect(upperStdDevLabel).toBe('Upper Standard Deviation of memory');
+ });
+});
diff --git a/src/legacy/ui/public/agg_types/metrics/std_deviation.ts b/src/legacy/ui/public/agg_types/metrics/std_deviation.ts
index 89051f119c58..ebd5fceb9c75 100644
--- a/src/legacy/ui/public/agg_types/metrics/std_deviation.ts
+++ b/src/legacy/ui/public/agg_types/metrics/std_deviation.ts
@@ -21,7 +21,7 @@ import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import { MetricAggType } from './metric_agg_type';
import { METRIC_TYPES } from './metric_agg_types';
-import { getResponseAggConfigClass, IResponseAggConfig } from './get_response_agg_config_class';
+import { getResponseAggConfigClass, IResponseAggConfig } from './lib/get_response_agg_config_class';
import { KBN_FIELD_TYPES } from '../../../../../plugins/data/common';
interface ValProp {
@@ -29,7 +29,7 @@ interface ValProp {
title: string;
}
-interface IStdDevAggConfig extends IResponseAggConfig {
+export interface IStdDevAggConfig extends IResponseAggConfig {
keyedDetails: (customLabel: string, fieldDisplayName?: string) => { [key: string]: ValProp };
valProp: () => ValProp;
}
diff --git a/src/legacy/ui/public/agg_types/metrics/top_hit.test.ts b/src/legacy/ui/public/agg_types/metrics/top_hit.test.ts
new file mode 100644
index 000000000000..4ed6fcdcf641
--- /dev/null
+++ b/src/legacy/ui/public/agg_types/metrics/top_hit.test.ts
@@ -0,0 +1,366 @@
+/*
+ * 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 { dropRight, last } from 'lodash';
+import { topHitMetricAgg } from './top_hit';
+import { AggConfigs } from 'ui/agg_types';
+import { IMetricAggConfig } from 'ui/agg_types/metrics/metric_agg_type';
+import { KBN_FIELD_TYPES } from '../../../../../plugins/data/common';
+
+jest.mock('ui/new_platform');
+
+describe('Top hit metric', () => {
+ let aggDsl: Record;
+ let aggConfig: IMetricAggConfig;
+
+ const init = ({
+ fieldName = 'field',
+ sortOrder = 'desc',
+ aggregate = 'concat',
+ readFromDocValues = false,
+ fieldType = KBN_FIELD_TYPES.NUMBER,
+ size = 1,
+ }: any) => {
+ const field = {
+ name: fieldName,
+ displayName: fieldName,
+ type: fieldType,
+ readFromDocValues,
+ format: {
+ type: {
+ id: 'bytes',
+ },
+ },
+ };
+
+ const params = {
+ size,
+ field: fieldName,
+ sortField: field,
+ sortOrder: {
+ value: sortOrder,
+ },
+ aggregate: {
+ value: aggregate,
+ },
+ };
+
+ const indexPattern = {
+ id: '1234',
+ title: 'logstash-*',
+ fields: {
+ getByName: () => field,
+ filter: () => [field],
+ },
+ flattenHit: jest.fn(x => x!._source),
+ } as any;
+
+ const aggConfigs = new AggConfigs(
+ indexPattern,
+ [
+ {
+ id: '1',
+ type: 'top_hits',
+ schema: 'metric',
+ params,
+ },
+ ],
+ null
+ );
+
+ // Grab the aggConfig off the vis (we don't actually use the vis for anything else)
+ aggConfig = aggConfigs.aggs[0];
+ aggDsl = aggConfig.toDsl(aggConfigs);
+ };
+
+ it('should return a label prefixed with Last if sorting in descending order', () => {
+ init({ fieldName: 'bytes' });
+ expect(topHitMetricAgg.makeLabel(aggConfig)).toEqual('Last bytes');
+ });
+
+ it('should return a label prefixed with First if sorting in ascending order', () => {
+ init({
+ fieldName: 'bytes',
+ sortOrder: 'asc',
+ });
+ expect(topHitMetricAgg.makeLabel(aggConfig)).toEqual('First bytes');
+ });
+
+ it('should request the _source field', () => {
+ init({ field: '_source' });
+ expect(aggDsl.top_hits._source).toBeTruthy();
+ expect(aggDsl.top_hits.docvalue_fields).toBeUndefined();
+ });
+
+ it('requests both source and docvalues_fields for non-text aggregatable fields', () => {
+ init({ fieldName: 'bytes', readFromDocValues: true });
+ expect(aggDsl.top_hits._source).toBe('bytes');
+ expect(aggDsl.top_hits.docvalue_fields).toEqual([
+ { field: 'bytes', format: 'use_field_mapping' },
+ ]);
+ });
+
+ it('requests both source and docvalues_fields for date aggregatable fields', () => {
+ init({ fieldName: '@timestamp', readFromDocValues: true, fieldType: KBN_FIELD_TYPES.DATE });
+
+ expect(aggDsl.top_hits._source).toBe('@timestamp');
+ expect(aggDsl.top_hits.docvalue_fields).toEqual([{ field: '@timestamp', format: 'date_time' }]);
+ });
+
+ it('requests just source for aggregatable text fields', () => {
+ init({ fieldName: 'machine.os' });
+ expect(aggDsl.top_hits._source).toBe('machine.os');
+ expect(aggDsl.top_hits.docvalue_fields).toBeUndefined();
+ });
+
+ describe('try to get the value from the top hit', () => {
+ it('should return null if there is no hit', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [],
+ },
+ },
+ };
+
+ init({ fieldName: '@tags' });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toBe(null);
+ });
+ //
+ it('should return undefined if the field does not appear in the source', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ bytes: 123,
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: '@tags' });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toBe(undefined);
+ });
+
+ it('should return the field value from the top hit', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ '@tags': 'aaa',
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: '@tags' });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toBe('aaa');
+ });
+
+ it('should return the object if the field value is an object', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ '@tags': {
+ label: 'aaa',
+ },
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: '@tags' });
+
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toEqual({ label: 'aaa' });
+ });
+
+ it('should return an array if the field has more than one values', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ '@tags': ['aaa', 'bbb'],
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: '@tags' });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toEqual(['aaa', 'bbb']);
+ });
+
+ it('should return undefined if the field is not in the source nor in the doc_values field', () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ bytes: 12345,
+ },
+ fields: {
+ bytes: 12345,
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: 'machine.os.raw', readFromDocValues: true });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toBe(undefined);
+ });
+
+ describe('Multivalued field and first/last X docs', () => {
+ it('should return a label prefixed with Last X docs if sorting in descending order', () => {
+ init({
+ fieldName: 'bytes',
+ size: 2,
+ });
+ expect(topHitMetricAgg.makeLabel(aggConfig)).toEqual('Last 2 bytes');
+ });
+
+ it('should return a label prefixed with First X docs if sorting in ascending order', () => {
+ init({
+ fieldName: 'bytes',
+ size: 2,
+ sortOrder: 'asc',
+ });
+ expect(topHitMetricAgg.makeLabel(aggConfig)).toEqual('First 2 bytes');
+ });
+
+ [
+ {
+ description: 'concat values with a comma',
+ type: 'concat',
+ data: [1, 2, 3],
+ result: [1, 2, 3],
+ },
+ {
+ description: 'sum up the values',
+ type: 'sum',
+ data: [1, 2, 3],
+ result: 6,
+ },
+ {
+ description: 'take the minimum value',
+ type: 'min',
+ data: [1, 2, 3],
+ result: 1,
+ },
+ {
+ description: 'take the maximum value',
+ type: 'max',
+ data: [1, 2, 3],
+ result: 3,
+ },
+ {
+ description: 'take the average value',
+ type: 'average',
+ data: [1, 2, 3],
+ result: 2,
+ },
+ {
+ description: 'support null/undefined',
+ type: 'min',
+ data: [undefined, null],
+ result: null,
+ },
+ {
+ description: 'support null/undefined',
+ type: 'max',
+ data: [undefined, null],
+ result: null,
+ },
+ {
+ description: 'support null/undefined',
+ type: 'sum',
+ data: [undefined, null],
+ result: null,
+ },
+ {
+ description: 'support null/undefined',
+ type: 'average',
+ data: [undefined, null],
+ result: null,
+ },
+ ].forEach(agg => {
+ it(`should return the result of the ${agg.type} aggregation over the last doc - ${agg.description}`, () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ bytes: agg.data,
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: 'bytes', aggregate: agg.type });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toEqual(agg.result);
+ });
+
+ it(`should return the result of the ${agg.type} aggregation over the last X docs - ${agg.description}`, () => {
+ const bucket = {
+ '1': {
+ hits: {
+ hits: [
+ {
+ _source: {
+ bytes: dropRight(agg.data, 1),
+ },
+ },
+ {
+ _source: {
+ bytes: last(agg.data),
+ },
+ },
+ ],
+ },
+ },
+ };
+
+ init({ fieldName: 'bytes', aggregate: agg.type });
+ expect(topHitMetricAgg.getValue(aggConfig, bucket)).toEqual(agg.result);
+ });
+ });
+ });
+ });
+});
diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap
index b81e5b242d02..796de886dc5b 100644
--- a/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap
+++ b/src/legacy/ui/public/field_editor/components/field_format_editor/editors/url/__snapshots__/url.test.js.snap
@@ -125,6 +125,7 @@ exports[`UrlFormatEditor should render label template help 1`] = `
/>
@@ -255,6 +256,7 @@ exports[`UrlFormatEditor should render normally 1`] = `
/>
@@ -385,6 +387,7 @@ exports[`UrlFormatEditor should render url template help 1`] = `
/>
@@ -564,6 +567,7 @@ exports[`UrlFormatEditor should render width and height fields if image 1`] = `
/>
@@ -239,6 +239,7 @@ export class UrlFormatEditor extends DefaultFormatEditor {
);
diff --git a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js
index 78e9a2a8f77a..75bee9b1658f 100644
--- a/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js
+++ b/src/legacy/ui/public/field_editor/components/field_format_editor/samples/samples.js
@@ -25,6 +25,9 @@ import { EuiBasicTable, EuiFormRow } from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
export class FormatEditorSamplesComponent extends PureComponent {
+ static defaultProps = {
+ sampleType: 'text'
+ };
static propTypes = {
samples: PropTypes.arrayOf(
PropTypes.shape({
@@ -32,10 +35,11 @@ export class FormatEditorSamplesComponent extends PureComponent {
output: PropTypes.any.isRequired,
})
).isRequired,
+ sampleType: PropTypes.oneOf(['html', 'text']),
};
render() {
- const { samples, intl } = this.props;
+ const { samples, intl, sampleType } = this.props;
const columns = [
{
@@ -55,15 +59,16 @@ export class FormatEditorSamplesComponent extends PureComponent {
defaultMessage: 'Output',
}),
render: output => {
- return (
-
- );
+ dangerouslySetInnerHTML={{ __html: output }} //eslint-disable-line react/no-danger
+ />
+ ) : ({output}
);
},
},
];
diff --git a/src/legacy/ui/public/filter_manager/__tests__/filter_generator.js b/src/legacy/ui/public/filter_manager/__tests__/filter_generator.js
index dee7942f50c0..a6bf2e7aa6c4 100644
--- a/src/legacy/ui/public/filter_manager/__tests__/filter_generator.js
+++ b/src/legacy/ui/public/filter_manager/__tests__/filter_generator.js
@@ -76,7 +76,7 @@ describe('Filter Manager', function () {
expect(queryFilter.addFilters.callCount).to.be(1);
checkAddFilters(1, [{
meta: { index: 'myIndex', negate: false },
- query: { match: { myField: { query: 1, type: 'phrase' } } }
+ query: { match_phrase: { myField: 1 } }
}]);
});
@@ -85,13 +85,13 @@ describe('Filter Manager', function () {
expect(queryFilter.addFilters.callCount).to.be(1);
checkAddFilters(3, [{
meta: { index: 'myIndex', negate: false },
- query: { match: { myField: { query: 1, type: 'phrase' } } }
+ query: { match_phrase: { myField: 1 } }
}, {
meta: { index: 'myIndex', negate: false },
- query: { match: { myField: { query: 2, type: 'phrase' } } }
+ query: { match_phrase: { myField: 2 } }
}, {
meta: { index: 'myIndex', negate: false },
- query: { match: { myField: { query: 3, type: 'phrase' } } }
+ query: { match_phrase: { myField: 3 } }
}]);
});
@@ -107,7 +107,7 @@ describe('Filter Manager', function () {
filterGen.add('myField', 1, '+', 'myIndex');
checkAddFilters(1, [{
meta: { index: 'myIndex', negate: false },
- query: { match: { myField: { query: 1, type: 'phrase' } } }
+ query: { match_phrase: { myField: 1 } }
}], 0);
expect(appState.filters).to.have.length(1);
@@ -115,7 +115,7 @@ describe('Filter Manager', function () {
filterGen.add('myField', 1, '-', 'myIndex');
checkAddFilters(1, [{
meta: { index: 'myIndex', negate: true, disabled: false },
- query: { match: { myField: { query: 1, type: 'phrase' } } }
+ query: { match_phrase: { myField: 1 } }
}], 1);
expect(appState.filters).to.have.length(1);
@@ -152,7 +152,7 @@ describe('Filter Manager', function () {
it('should enable matching filters being changed', function () {
_.each([true, false], function (negate) {
appState.filters = [{
- query: { match: { myField: { query: 1 } } },
+ query: { match_phrase: { myField: 1 } },
meta: { disabled: true, negate: negate }
}];
expect(appState.filters.length).to.be(1);
diff --git a/src/legacy/ui/public/filter_manager/filter_generator.js b/src/legacy/ui/public/filter_manager/filter_generator.js
index 6345f2bad72d..f119a9583366 100644
--- a/src/legacy/ui/public/filter_manager/filter_generator.js
+++ b/src/legacy/ui/public/filter_manager/filter_generator.js
@@ -18,7 +18,7 @@
*/
import _ from 'lodash';
-import { getPhraseScript } from '@kbn/es-query';
+import { getPhraseFilterField, getPhraseFilterValue, getPhraseScript, isPhraseFilter } from '@kbn/es-query';
// Adds a filter to a passed state
export function getFilterGenerator(queryFilter) {
@@ -42,8 +42,8 @@ export function getFilterGenerator(queryFilter) {
return filter.exists.field === value;
}
- if (_.has(filter, 'query.match')) {
- return filter.query.match[fieldName] && filter.query.match[fieldName].query === value;
+ if (isPhraseFilter(filter)) {
+ return getPhraseFilterField(filter) === fieldName && getPhraseFilterValue(filter) === value;
}
if (filter.script) {
@@ -76,8 +76,8 @@ export function getFilterGenerator(queryFilter) {
script: getPhraseScript(field, value)
};
} else {
- filter = { meta: { negate, index }, query: { match: {} } };
- filter.query.match[fieldName] = { query: value, type: 'phrase' };
+ filter = { meta: { negate, index }, query: { match_phrase: {} } };
+ filter.query.match_phrase[fieldName] = value;
}
break;
diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx b/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
index 6513c9211f18..4f4c0bda6520 100644
--- a/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
+++ b/src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
@@ -21,9 +21,10 @@ import React, { useReducer, useEffect, useMemo } from 'react';
import { EuiForm, EuiAccordion, EuiSpacer, EuiFormRow } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { aggTypes, AggType, AggParam } from 'ui/agg_types';
+import { VisState } from 'ui/vis';
+import { aggTypes, AggType, AggParam, AggConfig } from 'ui/agg_types/';
import { IndexPattern } from 'ui/index_patterns';
-import { AggConfig, VisState } from '../../..';
+
import { DefaultEditorAggSelect } from './agg_select';
import { DefaultEditorAggParam } from './agg_param';
import {
diff --git a/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx b/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx
index 836049eb95ca..df1640273135 100644
--- a/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx
+++ b/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx
@@ -21,7 +21,7 @@ import React, { useEffect, useState } from 'react';
import { EuiFormLabel, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { AggParamType } from '../../../../agg_types/param_types/agg';
-import { AggConfig } from '../../..';
+import { AggConfig } from '../../../../agg_types/agg_config';
import { AggParamEditorProps, DefaultEditorAggParams, AggGroupNames } from '..';
function SubMetricParamEditor({
diff --git a/src/plugins/data/common/field_formats/converters/url.ts b/src/plugins/data/common/field_formats/converters/url.ts
index 984cced336d2..6c00f11a408d 100644
--- a/src/plugins/data/common/field_formats/converters/url.ts
+++ b/src/plugins/data/common/field_formats/converters/url.ts
@@ -198,5 +198,3 @@ export class UrlFormat extends FieldFormat {
}
};
}
-
-// console.log(UrlFormat);
diff --git a/src/plugins/kibana_utils/public/core/create_getter_setter.ts b/src/plugins/kibana_utils/public/core/create_getter_setter.ts
new file mode 100644
index 000000000000..be2fd48ee6e7
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/create_getter_setter.ts
@@ -0,0 +1,36 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export type Get = () => T;
+export type Set = (value: T) => void;
+
+export const createGetterSetter = (name: string): [Get, Set] => {
+ let value: T;
+
+ const get: Get = () => {
+ if (!value) throw new Error(`${name} was not set.`);
+ return value;
+ };
+
+ const set: Set = newValue => {
+ value = newValue;
+ };
+
+ return [get, set];
+};
diff --git a/src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts b/src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts
new file mode 100644
index 000000000000..c5b23bdf0055
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts
@@ -0,0 +1,39 @@
+/*
+ * 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 { createKibanaUtilsCore } from './create_kibana_utils_core';
+import { CoreStart } from 'kibana/public';
+
+describe('createKibanaUtilsCore', () => {
+ it('should allows to work with multiple instances', () => {
+ const core1 = {} as CoreStart;
+ const core2 = {} as CoreStart;
+
+ const { setCoreStart: setCoreStart1, getCoreStart: getCoreStart1 } = createKibanaUtilsCore();
+ const { setCoreStart: setCoreStart2, getCoreStart: getCoreStart2 } = createKibanaUtilsCore();
+
+ setCoreStart1(core1);
+ setCoreStart2(core2);
+
+ expect(getCoreStart1()).toBe(core1);
+ expect(getCoreStart2()).toBe(core2);
+
+ expect(getCoreStart1() !== getCoreStart2()).toBeTruthy();
+ });
+});
diff --git a/src/plugins/kibana_utils/public/core/create_kibana_utils_core.ts b/src/plugins/kibana_utils/public/core/create_kibana_utils_core.ts
new file mode 100644
index 000000000000..84ecffa1da63
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/create_kibana_utils_core.ts
@@ -0,0 +1,39 @@
+/*
+ * 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 { createGetterSetter, Get, Set } from './create_getter_setter';
+import { CoreStart } from '../../../../core/public';
+import { KUSavedObjectClient, createSavedObjectsClient } from './saved_objects_client';
+
+interface Return {
+ getCoreStart: Get;
+ setCoreStart: Set;
+ savedObjects: KUSavedObjectClient;
+}
+
+export const createKibanaUtilsCore = (): Return => {
+ const [getCoreStart, setCoreStart] = createGetterSetter('CoreStart');
+ const savedObjects = createSavedObjectsClient(getCoreStart);
+
+ return {
+ getCoreStart,
+ setCoreStart,
+ savedObjects,
+ };
+};
diff --git a/src/plugins/kibana_utils/public/core/index.ts b/src/plugins/kibana_utils/public/core/index.ts
new file mode 100644
index 000000000000..7e8dff7191fe
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/index.ts
@@ -0,0 +1,21 @@
+/*
+ * 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 './create_getter_setter';
+export * from './create_kibana_utils_core';
diff --git a/src/plugins/kibana_utils/public/core/saved_objects_client.ts b/src/plugins/kibana_utils/public/core/saved_objects_client.ts
new file mode 100644
index 000000000000..40407fea5d18
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/saved_objects_client.ts
@@ -0,0 +1,35 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { CoreStart } from '../../../../core/public';
+import { Get } from './create_getter_setter';
+
+type CoreSavedObjectClient = CoreStart['savedObjects']['client'];
+
+export interface KUSavedObjectClient {
+ get: CoreSavedObjectClient['get'];
+}
+
+export const createSavedObjectsClient = (getCoreStart: Get) => {
+ const savedObjectsClient: KUSavedObjectClient = {
+ get: (...args) => getCoreStart().savedObjects.client.get(...args),
+ };
+
+ return savedObjectsClient;
+};
diff --git a/src/plugins/kibana_utils/public/core/state.ts b/src/plugins/kibana_utils/public/core/state.ts
new file mode 100644
index 000000000000..8ac6e4e0e58e
--- /dev/null
+++ b/src/plugins/kibana_utils/public/core/state.ts
@@ -0,0 +1,23 @@
+/*
+ * 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 { createGetterSetter } from './create_getter_setter';
+import { CoreStart } from '../../../../core/public';
+
+export const [getCoreStart, setCoreStart] = createGetterSetter('CoreStart');
diff --git a/src/plugins/kibana_utils/public/index.ts b/src/plugins/kibana_utils/public/index.ts
index bac0ef629789..7cb4d4a34e97 100644
--- a/src/plugins/kibana_utils/public/index.ts
+++ b/src/plugins/kibana_utils/public/index.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+export * from './core';
export * from './store';
export * from './parse';
export * from './render_complete';
diff --git a/tasks/function_test_groups.js b/tasks/function_test_groups.js
index 69b998c4f229..31656df2cb64 100644
--- a/tasks/function_test_groups.js
+++ b/tasks/function_test_groups.js
@@ -58,12 +58,13 @@ grunt.registerTask(
const done = this.async();
try {
- const stats = JSON.parse(await execa.stderr(process.execPath, [
+ const result = await execa(process.execPath, [
'scripts/functional_test_runner',
...TEST_TAGS.map(tag => `--include-tag=${tag}`),
'--config', 'test/functional/config.js',
'--test-stats'
- ]));
+ ]);
+ const stats = JSON.parse(result.stderr);
if (stats.excludedTests.length > 0) {
grunt.fail.fatal(`
diff --git a/test/functional/apps/dashboard/panel_controls.js b/test/functional/apps/dashboard/panel_controls.js
index b67e1dd7b2eb..063ad1f79efa 100644
--- a/test/functional/apps/dashboard/panel_controls.js
+++ b/test/functional/apps/dashboard/panel_controls.js
@@ -19,7 +19,7 @@
import expect from '@kbn/expect';
-import { PIE_CHART_VIS_NAME } from '../../page_objects/dashboard_page';
+import { PIE_CHART_VIS_NAME, AREA_CHART_VIS_NAME, LINE_CHART_VIS_NAME } from '../../page_objects/dashboard_page';
import {
VisualizeConstants
} from '../../../../src/legacy/core_plugins/kibana/public/visualize/visualize_constants';
@@ -28,6 +28,8 @@ export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
const dashboardPanelActions = getService('dashboardPanelActions');
const dashboardAddPanel = getService('dashboardAddPanel');
+ const dashboardReplacePanel = getService('dashboardReplacePanel');
+ const dashboardVisualizations = getService('dashboardVisualizations');
const renderable = getService('renderable');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'discover']);
const dashboardName = 'Dashboard Panel Controls Test';
@@ -44,6 +46,62 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
+ describe('visualization object replace flyout', () => {
+ let intialDimensions;
+ before(async () => {
+ await PageObjects.dashboard.clickNewDashboard();
+ await PageObjects.dashboard.setTimepickerInHistoricalDataRange();
+ await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME);
+ await dashboardAddPanel.addVisualization(LINE_CHART_VIS_NAME);
+ intialDimensions = await PageObjects.dashboard.getPanelDimensions();
+ });
+
+ after(async function () {
+ await PageObjects.dashboard.gotoDashboardLandingPage();
+ });
+
+ it('replaces old panel with selected panel', async () => {
+ await dashboardPanelActions.replacePanelByTitle(PIE_CHART_VIS_NAME);
+ await dashboardReplacePanel.replaceEmbeddable(AREA_CHART_VIS_NAME);
+ await PageObjects.header.waitUntilLoadingHasFinished();
+ const panelTitles = await PageObjects.dashboard.getPanelTitles();
+ expect(panelTitles.length).to.be(2);
+ expect(panelTitles[0]).to.be(AREA_CHART_VIS_NAME);
+ });
+
+ it('replaces selected visualization with old dimensions', async () => {
+ const newDimensions = await PageObjects.dashboard.getPanelDimensions();
+ expect(intialDimensions[0]).to.eql(newDimensions[0]);
+ });
+
+ it('replaced panel persisted correctly when dashboard is hard refreshed', async () => {
+ const currentUrl = await browser.getCurrentUrl();
+ await browser.get(currentUrl, true);
+ await PageObjects.header.waitUntilLoadingHasFinished();
+ await PageObjects.dashboard.waitForRenderComplete();
+ const panelTitles = await PageObjects.dashboard.getPanelTitles();
+ expect(panelTitles.length).to.be(2);
+ expect(panelTitles[0]).to.be(AREA_CHART_VIS_NAME);
+ });
+
+ it('replaced panel with saved search', async () => {
+ const replacedSearch = 'replaced saved search';
+ await dashboardVisualizations.createSavedSearch({ name: replacedSearch, fields: ['bytes', 'agent'] });
+ await PageObjects.header.clickDashboard();
+ const inViewMode = await PageObjects.dashboard.getIsInViewMode();
+ if (inViewMode) {
+ await PageObjects.dashboard.switchToEditMode();
+ }
+ await dashboardPanelActions.replacePanelByTitle(AREA_CHART_VIS_NAME);
+ await dashboardReplacePanel.replaceEmbeddable(replacedSearch, 'search');
+ await PageObjects.header.waitUntilLoadingHasFinished();
+ await PageObjects.dashboard.waitForRenderComplete();
+ const panelTitles = await PageObjects.dashboard.getPanelTitles();
+ expect(panelTitles.length).to.be(2);
+ expect(panelTitles[0]).to.be(replacedSearch);
+ });
+ });
+
describe('panel edit controls', function () {
before(async () => {
await PageObjects.dashboard.clickNewDashboard();
@@ -67,6 +125,7 @@ export default function ({ getService, getPageObjects }) {
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.expectExistsEditPanelAction();
+ await dashboardPanelActions.expectExistsReplacePanelAction();
await dashboardPanelActions.expectExistsRemovePanelAction();
});
@@ -80,6 +139,7 @@ export default function ({ getService, getPageObjects }) {
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.expectExistsEditPanelAction();
+ await dashboardPanelActions.expectExistsReplacePanelAction();
await dashboardPanelActions.expectExistsRemovePanelAction();
// Get rid of the timestamp in the url.
@@ -94,6 +154,7 @@ export default function ({ getService, getPageObjects }) {
await dashboardPanelActions.clickExpandPanelToggle();
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.expectMissingEditPanelAction();
+ await dashboardPanelActions.expectMissingReplacePanelAction();
await dashboardPanelActions.expectMissingRemovePanelAction();
});
@@ -101,6 +162,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.switchToEditMode();
await dashboardPanelActions.openContextMenu();
await dashboardPanelActions.expectExistsEditPanelAction();
+ await dashboardPanelActions.expectExistsReplacePanelAction();
await dashboardPanelActions.expectMissingRemovePanelAction();
await dashboardPanelActions.clickExpandPanelToggle();
});
@@ -126,13 +188,18 @@ export default function ({ getService, getPageObjects }) {
});
describe('saved search object edit menu', () => {
+ const searchName = 'my search';
before(async () => {
await PageObjects.header.clickDiscover();
- await PageObjects.discover.clickFieldListItemAdd('bytes');
- await PageObjects.discover.saveSearch('my search');
+ await PageObjects.discover.clickNewSearchButton();
+ await dashboardVisualizations.createSavedSearch({ name: searchName, fields: ['bytes'] });
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.header.clickDashboard();
- await dashboardAddPanel.addSavedSearch('my search');
+ const inViewMode = await PageObjects.dashboard.getIsInViewMode();
+ if (inViewMode) {
+ await PageObjects.dashboard.switchToEditMode();
+ }
+ await dashboardAddPanel.addSavedSearch(searchName);
const panelCount = await PageObjects.dashboard.getPanelCount();
expect(panelCount).to.be(1);
@@ -143,7 +210,7 @@ export default function ({ getService, getPageObjects }) {
await dashboardPanelActions.clickEdit();
await PageObjects.header.waitUntilLoadingHasFinished();
const queryName = await PageObjects.discover.getCurrentQueryName();
- expect(queryName).to.be('my search');
+ expect(queryName).to.be(searchName);
});
it('deletes the saved search when delete link is clicked', async () => {
diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js
index 9f37feef781c..6c7170d6b216 100644
--- a/test/functional/apps/discover/_discover.js
+++ b/test/functional/apps/discover/_discover.js
@@ -106,9 +106,9 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.discover.brushHistogram();
const newDurationHours = await PageObjects.timePicker.getTimeDurationInHours();
- expect(Math.round(newDurationHours)).to.be(108);
+ expect(Math.round(newDurationHours)).to.be(25);
const rowData = await PageObjects.discover.getDocTableField(1);
- expect(rowData).to.have.string('Sep 22, 2015 @ 23:50:13.253');
+ expect(Date.parse(rowData)).to.be.within(Date.parse('Sep 20, 2015 @ 22:00:00.000'), Date.parse('Sep 20, 2015 @ 23:30:00.000'));
});
it('should show correct initial chart interval of Auto', async function () {
diff --git a/test/functional/apps/visualize/_shared_item.js b/test/functional/apps/visualize/_shared_item.js
index efd534f03509..9fe38be15a74 100644
--- a/test/functional/apps/visualize/_shared_item.js
+++ b/test/functional/apps/visualize/_shared_item.js
@@ -24,8 +24,7 @@ export default function ({ getService, getPageObjects }) {
const retry = getService('retry');
const PageObjects = getPageObjects(['common', 'visualize']);
- // https://github.com/elastic/kibana/issues/37130
- describe.skip('data-shared-item', function indexPatternCreation() {
+ describe('data-shared-item', function indexPatternCreation() {
before(async function () {
log.debug('navigateToApp visualize');
await PageObjects.common.navigateToApp('visualize');
diff --git a/test/functional/page_objects/dashboard_page.js b/test/functional/page_objects/dashboard_page.js
index 4f078d4b7a43..ca141114f976 100644
--- a/test/functional/page_objects/dashboard_page.js
+++ b/test/functional/page_objects/dashboard_page.js
@@ -22,6 +22,7 @@ import { DashboardConstants } from '../../../src/legacy/core_plugins/kibana/publ
export const PIE_CHART_VIS_NAME = 'Visualization PieChart';
export const AREA_CHART_VIS_NAME = 'Visualization漢字 AreaChart';
+export const LINE_CHART_VIS_NAME = 'Visualization漢字 LineChart';
export function DashboardPageProvider({ getService, getPageObjects }) {
const log = getService('log');
@@ -499,7 +500,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
{ name: 'Visualization☺ VerticalBarChart', description: 'VerticalBarChart' },
{ name: AREA_CHART_VIS_NAME, description: 'AreaChart' },
{ name: 'Visualization☺漢字 DataTable', description: 'DataTable' },
- { name: 'Visualization漢字 LineChart', description: 'LineChart' },
+ { name: LINE_CHART_VIS_NAME, description: 'LineChart' },
{ name: 'Visualization TileMap', description: 'TileMap' },
{ name: 'Visualization MetricChart', description: 'MetricChart' }
];
diff --git a/test/functional/services/dashboard/index.js b/test/functional/services/dashboard/index.js
index b2de69015753..bb9b86168290 100644
--- a/test/functional/services/dashboard/index.js
+++ b/test/functional/services/dashboard/index.js
@@ -20,5 +20,6 @@
export { DashboardVisualizationProvider } from './visualizations';
export { DashboardExpectProvider } from './expectations';
export { DashboardAddPanelProvider } from './add_panel';
+export { DashboardReplacePanelProvider } from './replace_panel';
export { DashboardPanelActionsProvider } from './panel_actions';
diff --git a/test/functional/services/dashboard/panel_actions.js b/test/functional/services/dashboard/panel_actions.js
index b7327f4af6d1..6826ea1ff171 100644
--- a/test/functional/services/dashboard/panel_actions.js
+++ b/test/functional/services/dashboard/panel_actions.js
@@ -19,6 +19,7 @@
const REMOVE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-deletePanel';
const EDIT_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-editPanel';
+const REPLACE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-replacePanel';
const TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-togglePanel';
const CUSTOMIZE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-CUSTOMIZE_PANEL_ACTION_ID';
const OPEN_CONTEXT_MENU_ICON_DATA_TEST_SUBJ = 'embeddablePanelToggleMenuIcon';
@@ -87,6 +88,16 @@ export function DashboardPanelActionsProvider({ getService, getPageObjects }) {
await testSubjects.click(CUSTOMIZE_PANEL_DATA_TEST_SUBJ);
}
+ async replacePanelByTitle(title) {
+ log.debug(`replacePanel(${title})`);
+ let panelOptions = null;
+ if (title) {
+ panelOptions = await this.getPanelHeading(title);
+ }
+ await this.openContextMenu(panelOptions);
+ await testSubjects.click(REPLACE_PANEL_DATA_TEST_SUBJ);
+ }
+
async openInspectorByTitle(title) {
const header = await this.getPanelHeading(title);
await this.openInspector(header);
@@ -112,11 +123,21 @@ export function DashboardPanelActionsProvider({ getService, getPageObjects }) {
await testSubjects.existOrFail(EDIT_PANEL_DATA_TEST_SUBJ);
}
+ async expectExistsReplacePanelAction() {
+ log.debug('expectExistsEditPanelAction');
+ await testSubjects.existOrFail(REPLACE_PANEL_DATA_TEST_SUBJ);
+ }
+
async expectMissingEditPanelAction() {
log.debug('expectMissingEditPanelAction');
await testSubjects.missingOrFail(EDIT_PANEL_DATA_TEST_SUBJ);
}
+ async expectMissingReplacePanelAction() {
+ log.debug('expectMissingEditPanelAction');
+ await testSubjects.missingOrFail(REPLACE_PANEL_DATA_TEST_SUBJ);
+ }
+
async expectExistsToggleExpandAction() {
log.debug('expectExistsToggleExpandAction');
await testSubjects.existOrFail(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ);
diff --git a/test/functional/services/dashboard/replace_panel.js b/test/functional/services/dashboard/replace_panel.js
new file mode 100644
index 000000000000..b3ea6f9cf21e
--- /dev/null
+++ b/test/functional/services/dashboard/replace_panel.js
@@ -0,0 +1,102 @@
+/*
+ * 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 DashboardReplacePanelProvider({ getService }) {
+ const log = getService('log');
+ const testSubjects = getService('testSubjects');
+ const flyout = getService('flyout');
+
+ return new class DashboardReplacePanel {
+ async toggleFilterPopover() {
+ log.debug('DashboardReplacePanel.toggleFilter');
+ await testSubjects.click('savedObjectFinderFilterButton');
+ }
+
+ async toggleFilter(type) {
+ log.debug(`DashboardReplacePanel.replaceToFilter(${type})`);
+ await this.waitForListLoading();
+ await this.toggleFilterPopover();
+ await testSubjects.click(`savedObjectFinderFilter-${type}`);
+ await this.toggleFilterPopover();
+ }
+
+ async isReplacePanelOpen() {
+ log.debug('DashboardReplacePanel.isReplacePanelOpen');
+ return await testSubjects.exists('dashboardReplacePanel');
+ }
+
+ async ensureReplacePanelIsShowing() {
+ log.debug('DashboardReplacePanel.ensureReplacePanelIsShowing');
+ const isOpen = await this.isReplacePanelOpen();
+ if (!isOpen) {
+ throw new Error('Replace panel is not open, trying again.');
+ }
+ }
+
+ async waitForListLoading() {
+ await testSubjects.waitForDeleted('savedObjectFinderLoadingIndicator');
+ }
+
+ async closeReplacePanel() {
+ await flyout.ensureClosed('dashboardReplacePanel');
+ }
+
+ async replaceSavedSearch(searchName) {
+ return this.replaceEmbeddable(searchName, 'search');
+ }
+
+ async replaceSavedSearches(searches) {
+ for (const name of searches) {
+ await this.replaceSavedSearch(name);
+ }
+ }
+
+ async replaceVisualization(vizName) {
+ return this.replaceEmbeddable(vizName, 'visualization');
+ }
+
+ async replaceEmbeddable(embeddableName, embeddableType) {
+ log.debug(`DashboardReplacePanel.replaceEmbeddable, name: ${embeddableName}, type: ${embeddableType}`);
+ await this.ensureReplacePanelIsShowing();
+ if (embeddableType) {
+ await this.toggleFilter(embeddableType);
+ }
+ await this.filterEmbeddableNames(`"${embeddableName.replace('-', ' ')}"`);
+ await testSubjects.click(`savedObjectTitle${embeddableName.split(' ').join('-')}`);
+ await testSubjects.exists('addObjectToDashboardSuccess');
+ await this.closeReplacePanel();
+ return embeddableName;
+ }
+
+ async filterEmbeddableNames(name) {
+ // The search input field may be disabled while the table is loading so wait for it
+ await this.waitForListLoading();
+ await testSubjects.setValue('savedObjectFinderSearchInput', name);
+ await this.waitForListLoading();
+ }
+
+ async panelReplaceLinkExists(name) {
+ log.debug(`DashboardReplacePanel.panelReplaceLinkExists(${name})`);
+ await this.ensureReplacePanelIsShowing();
+ await this.filterEmbeddableNames(`"${name}"`);
+ return await testSubjects.exists(`savedObjectTitle${name.split(' ').join('-')}`);
+ }
+ };
+}
diff --git a/test/functional/services/index.ts b/test/functional/services/index.ts
index 2566c3c87334..6098e9931f29 100644
--- a/test/functional/services/index.ts
+++ b/test/functional/services/index.ts
@@ -24,6 +24,7 @@ import { BrowserProvider } from './browser';
import { ComboBoxProvider } from './combo_box';
import {
DashboardAddPanelProvider,
+ DashboardReplacePanelProvider,
DashboardExpectProvider,
DashboardPanelActionsProvider,
DashboardVisualizationProvider,
@@ -66,6 +67,7 @@ export const services = {
failureDebugging: FailureDebuggingProvider,
visualizeListingTable: VisualizeListingTableProvider,
dashboardAddPanel: DashboardAddPanelProvider,
+ dashboardReplacePanel: DashboardReplacePanelProvider,
dashboardPanelActions: DashboardPanelActionsProvider,
flyout: FlyoutProvider,
comboBox: ComboBoxProvider,
diff --git a/webpackShims/lru-cache.js b/webpackShims/lru-cache.js
new file mode 100644
index 000000000000..9cc11a516378
--- /dev/null
+++ b/webpackShims/lru-cache.js
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+module.exports = require('../node_modules/lru-cache');
diff --git a/x-pack/legacy/plugins/TEST_PLAN.md b/x-pack/legacy/plugins/TEST_PLAN.md
deleted file mode 100644
index dfda2522f279..000000000000
--- a/x-pack/legacy/plugins/TEST_PLAN.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# APM UI Test Plan
-
-Moved to: https://github.com/elastic/observability-dev/blob/master/docs/apm/apm-ui-test-plan.md
-
diff --git a/x-pack/legacy/plugins/apm/common/projections/typings.ts b/x-pack/legacy/plugins/apm/common/projections/typings.ts
index 0c56fd2f75bd..2b55395b70c6 100644
--- a/x-pack/legacy/plugins/apm/common/projections/typings.ts
+++ b/x-pack/legacy/plugins/apm/common/projections/typings.ts
@@ -4,15 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams } from 'elasticsearch';
+import { ESSearchRequest, ESSearchBody } from '../../typings/elasticsearch';
+import {
+ AggregationOptionsByType,
+ AggregationInputMap
+} from '../../typings/elasticsearch/aggregations';
-export type Projection = Omit & {
- body: {
- query: any;
- } & {
+export type Projection = Omit & {
+ body: Omit & {
aggs?: {
[key: string]: {
- terms: any;
+ terms: AggregationOptionsByType['terms'];
+ aggs?: AggregationInputMap;
};
};
};
diff --git a/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.test.ts b/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.test.ts
index ae1b7c552ab4..aa72b5fd7136 100644
--- a/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.test.ts
+++ b/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.test.ts
@@ -29,12 +29,15 @@ describe('mergeProjection', () => {
});
it('merges plain objects', () => {
+ const termsAgg = { terms: { field: 'bar' } };
expect(
mergeProjection(
- { body: { query: {}, aggs: { foo: { terms: { field: 'bar' } } } } },
+ { body: { query: {}, aggs: { foo: termsAgg } } },
{
body: {
- aggs: { foo: { aggs: { bar: { terms: { field: 'baz' } } } } }
+ aggs: {
+ foo: { ...termsAgg, aggs: { bar: { terms: { field: 'baz' } } } }
+ }
}
}
)
diff --git a/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.ts b/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.ts
index 5b6b5b0b7f05..9a8f11c6493c 100644
--- a/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.ts
+++ b/x-pack/legacy/plugins/apm/common/projections/util/merge_projection/index.ts
@@ -4,10 +4,22 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { merge, isPlainObject } from 'lodash';
+import { DeepPartial } from 'utility-types';
+import { AggregationInputMap } from '../../../../typings/elasticsearch/aggregations';
+import {
+ ESSearchRequest,
+ ESSearchBody
+} from '../../../../typings/elasticsearch';
import { Projection } from '../../typings';
type PlainObject = Record;
+type SourceProjection = Omit, 'body'> & {
+ body: Omit, 'aggs'> & {
+ aggs?: AggregationInputMap;
+ };
+};
+
type DeepMerge = U extends PlainObject
? (T extends PlainObject
? (Omit &
@@ -19,10 +31,10 @@ type DeepMerge = U extends PlainObject
: U)
: U;
-export function mergeProjection(
- target: T,
- source: U
-): DeepMerge {
+export function mergeProjection<
+ T extends Projection,
+ U extends SourceProjection
+>(target: T, source: U): DeepMerge {
return merge({}, target, source, (a, b) => {
if (isPlainObject(a) && isPlainObject(b)) {
return undefined;
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap
index 2689ce8bd942..7f562efcf64a 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap
+++ b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap
@@ -714,7 +714,13 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
- 1337 minutes ago (mocking 1515578797)
+
+ 1337 minutes ago (mocking 1515578797)
+
@@ -833,7 +839,13 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
- 1337 minutes ago (mocking 1515578797)
+
+ 1337 minutes ago (mocking 1515578797)
+
@@ -952,7 +964,13 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
- 1337 minutes ago (mocking 1515578796)
+
+ 1337 minutes ago (mocking 1515578796)
+
@@ -1071,7 +1089,13 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = `
- 1337 minutes ago (mocking 1515578773)
+
+ 1337 minutes ago (mocking 1515578773)
+
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx
index 37fa6499ff17..2f06f1d52de6 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/List/index.tsx
@@ -7,7 +7,6 @@
import { EuiBadge, EuiToolTip } from '@elastic/eui';
import numeral from '@elastic/numeral';
import { i18n } from '@kbn/i18n';
-import moment from 'moment';
import React, { useMemo } from 'react';
import styled from 'styled-components';
import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n';
@@ -22,6 +21,7 @@ import {
import { useUrlParams } from '../../../../hooks/useUrlParams';
import { ManagedTable } from '../../../shared/ManagedTable';
import { ErrorDetailLink } from '../../../shared/Links/apm/ErrorDetailLink';
+import { TimestampTooltip } from '../../../shared/TimestampTooltip';
const GroupIdLink = styled(ErrorDetailLink)`
font-family: ${fontFamilyCode};
@@ -142,7 +142,11 @@ const ErrorGroupList: React.FC = props => {
),
align: 'right',
render: (value?: number) =>
- value ? moment(value).fromNow() : NOT_AVAILABLE_LABEL
+ value ? (
+
+ ) : (
+ NOT_AVAILABLE_LABEL
+ )
}
],
[serviceName]
diff --git a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx
index 92ae1737a408..fe1a80d702db 100644
--- a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx
@@ -49,6 +49,8 @@ const ErrorGroupOverview: React.SFC = () => {
const { data: errorGroupListData } = useFetcher(
callApmApi => {
+ const normalizedSortDirection = sortDirection === 'asc' ? 'asc' : 'desc';
+
if (serviceName && start && end) {
return callApmApi({
pathname: '/api/apm/services/{serviceName}/errors',
@@ -60,7 +62,7 @@ const ErrorGroupOverview: React.SFC = () => {
start,
end,
sortField,
- sortDirection,
+ sortDirection: normalizedSortDirection,
uiFilters: JSON.stringify(uiFilters)
}
}
diff --git a/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.test.tsx b/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.test.tsx
index c9f6afa0b361..a7149c760469 100644
--- a/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.test.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.test.tsx
@@ -7,17 +7,56 @@
import { shallow } from 'enzyme';
import React from 'react';
import moment from 'moment-timezone';
-import { TimestampTooltip } from './index';
+import { TimestampTooltip, asAbsoluteTime } from './index';
import { mockNow } from '../../../utils/testHelpers';
+describe('asAbsoluteTime', () => {
+ afterAll(() => moment.tz.setDefault(''));
+
+ it('should add a leading plus for timezones with positive UTC offset', () => {
+ moment.tz.setDefault('Europe/Copenhagen');
+ expect(asAbsoluteTime({ time: 1559390400000, precision: 'minutes' })).toBe(
+ 'Jun 1, 2019, 14:00 (UTC+2)'
+ );
+ });
+
+ it('should add a leading minus for timezones with negative UTC offset', () => {
+ moment.tz.setDefault('America/Los_Angeles');
+ expect(asAbsoluteTime({ time: 1559390400000, precision: 'minutes' })).toBe(
+ 'Jun 1, 2019, 05:00 (UTC-7)'
+ );
+ });
+
+ it('should use default UTC offset formatting when offset contains minutes', () => {
+ moment.tz.setDefault('Canada/Newfoundland');
+ expect(asAbsoluteTime({ time: 1559390400000, precision: 'minutes' })).toBe(
+ 'Jun 1, 2019, 09:30 (UTC-02:30)'
+ );
+ });
+
+ it('should respect DST', () => {
+ moment.tz.setDefault('Europe/Copenhagen');
+ const timeWithDST = 1559390400000; // Jun 1, 2019
+ const timeWithoutDST = 1575201600000; // Dec 1, 2019
+
+ expect(asAbsoluteTime({ time: timeWithDST })).toBe(
+ 'Jun 1, 2019, 14:00:00.000 (UTC+2)'
+ );
+
+ expect(asAbsoluteTime({ time: timeWithoutDST })).toBe(
+ 'Dec 1, 2019, 13:00:00.000 (UTC+1)'
+ );
+ });
+});
+
describe('TimestampTooltip', () => {
- const timestamp = 1570720000123;
+ const timestamp = 1570720000123; // Oct 10, 2019, 08:06:40.123 (UTC-7)
beforeAll(() => {
// mock Date.now
mockNow(1570737000000);
- moment.tz.setDefault('Etc/GMT');
+ moment.tz.setDefault('America/Los_Angeles');
});
afterAll(() => moment.tz.setDefault(''));
@@ -26,7 +65,7 @@ describe('TimestampTooltip', () => {
expect(shallow( ))
.toMatchInlineSnapshot(`
@@ -40,7 +79,15 @@ describe('TimestampTooltip', () => {
shallow( )
.find('EuiToolTip')
.prop('content')
- ).toBe('Oct 10th 2019, 15:06:40.123 (+0000 GMT)');
+ ).toBe('Oct 10, 2019, 08:06:40.123 (UTC-7)');
+ });
+
+ it('should format with precision in seconds', () => {
+ expect(
+ shallow( )
+ .find('EuiToolTip')
+ .prop('content')
+ ).toBe('Oct 10, 2019, 08:06:40 (UTC-7)');
});
it('should format with precision in minutes', () => {
@@ -48,7 +95,7 @@ describe('TimestampTooltip', () => {
shallow( )
.find('EuiToolTip')
.prop('content')
- ).toBe('Oct 10th 2019, 15:06 (+0000 GMT)');
+ ).toBe('Oct 10, 2019, 08:06 (UTC-7)');
});
it('should format with precision in days', () => {
@@ -56,6 +103,6 @@ describe('TimestampTooltip', () => {
shallow( )
.find('EuiToolTip')
.prop('content')
- ).toBe('Oct 10th 2019 (+0000 GMT)');
+ ).toBe('Oct 10, 2019 (UTC-7)');
});
});
diff --git a/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.tsx b/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.tsx
index 1f7fcccdd56d..d7ef6517c2fb 100644
--- a/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.tsx
+++ b/x-pack/legacy/plugins/apm/public/components/shared/TimestampTooltip/index.tsx
@@ -12,7 +12,7 @@ interface Props {
* timestamp in milliseconds
*/
time: number;
- precision?: 'days' | 'minutes' | 'milliseconds';
+ precision?: 'days' | 'minutes' | 'seconds' | 'milliseconds';
}
function getPreciseTime(precision: Props['precision']) {
@@ -21,17 +21,33 @@ function getPreciseTime(precision: Props['precision']) {
return '';
case 'minutes':
return ', HH:mm';
+ case 'seconds':
+ return ', HH:mm:ss';
default:
return ', HH:mm:ss.SSS';
}
}
+function withLeadingPlus(value: number) {
+ return value > 0 ? `+${value}` : value;
+}
+
+export function asAbsoluteTime({ time, precision = 'milliseconds' }: Props) {
+ const momentTime = moment(time);
+ const utcOffsetHours = momentTime.utcOffset() / 60;
+ const utcOffsetFormatted = Number.isInteger(utcOffsetHours)
+ ? withLeadingPlus(utcOffsetHours)
+ : 'Z';
+
+ return momentTime.format(
+ `MMM D, YYYY${getPreciseTime(precision)} (UTC${utcOffsetFormatted})`
+ );
+}
+
export function TimestampTooltip({ time, precision = 'milliseconds' }: Props) {
const momentTime = moment(time);
const relativeTimeLabel = momentTime.fromNow();
- const absoluteTimeLabel = momentTime.format(
- `MMM Do YYYY${getPreciseTime(precision)} (ZZ zz)`
- );
+ const absoluteTimeLabel = asAbsoluteTime({ time, precision });
return (
diff --git a/x-pack/legacy/plugins/apm/public/components/shared/charts/Tooltip/index.js b/x-pack/legacy/plugins/apm/public/components/shared/charts/Tooltip/index.js
index 20096d81a94c..f5992ac7fc63 100644
--- a/x-pack/legacy/plugins/apm/public/components/shared/charts/Tooltip/index.js
+++ b/x-pack/legacy/plugins/apm/public/components/shared/charts/Tooltip/index.js
@@ -7,7 +7,6 @@
import React from 'react';
import { isEmpty } from 'lodash';
import { Hint } from 'react-vis';
-import moment from 'moment';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import {
@@ -20,6 +19,7 @@ import {
} from '../../../../style/variables';
import Legend from '../Legend';
import theme from '@elastic/eui/dist/eui_theme_light.json';
+import { asAbsoluteTime } from '../../TimestampTooltip';
const TooltipElm = styled.div`
margin: 0 ${px(unit)};
@@ -87,7 +87,9 @@ export default function Tooltip({
return (
- {header || moment(x).format('MMMM Do YYYY, HH:mm:ss')}
+
+ {header || asAbsoluteTime({ time: x, precision: 'seconds' })}
+
{showLegends ? (
diff --git a/x-pack/legacy/plugins/apm/public/services/rest/ml.ts b/x-pack/legacy/plugins/apm/public/services/rest/ml.ts
index 968450e6aa79..9150c6312731 100644
--- a/x-pack/legacy/plugins/apm/public/services/rest/ml.ts
+++ b/x-pack/legacy/plugins/apm/public/services/rest/ml.ts
@@ -5,7 +5,6 @@
*/
import { npStart } from 'ui/new_platform';
-import { ESFilter } from 'elasticsearch';
import { HttpServiceBase } from 'kibana/public';
import {
PROCESSOR_EVENT,
@@ -14,6 +13,7 @@ import {
} from '../../../common/elasticsearch_fieldnames';
import { getMlJobId, getMlPrefix } from '../../../common/ml_job_constants';
import { callApi } from './callApi';
+import { ESFilter } from '../../../typings/elasticsearch';
interface MlResponseItem {
id: string;
diff --git a/x-pack/legacy/plugins/apm/public/utils/testHelpers.tsx b/x-pack/legacy/plugins/apm/public/utils/testHelpers.tsx
index 73b81bfed479..2e3c8940680f 100644
--- a/x-pack/legacy/plugins/apm/public/utils/testHelpers.tsx
+++ b/x-pack/legacy/plugins/apm/public/utils/testHelpers.tsx
@@ -15,9 +15,9 @@ import { Moment } from 'moment-timezone';
import React from 'react';
import { render, waitForElement } from 'react-testing-library';
import { MemoryRouter } from 'react-router-dom';
-import { ESFilter } from 'elasticsearch';
import { LocationProvider } from '../context/LocationContext';
import { PromiseReturnType } from '../../typings/common';
+import { ESFilter } from '../../typings/elasticsearch';
export function toJson(wrapper: ReactWrapper) {
return enzymeToJson(wrapper, {
diff --git a/x-pack/legacy/plugins/apm/readme.md b/x-pack/legacy/plugins/apm/readme.md
index 90974cbe6958..17a72f07470f 100644
--- a/x-pack/legacy/plugins/apm/readme.md
+++ b/x-pack/legacy/plugins/apm/readme.md
@@ -65,6 +65,13 @@ yarn prettier "./x-pack/legacy/plugins/apm/**/*.{tsx,ts,js}" --write
yarn eslint ./x-pack/legacy/plugins/apm --fix
```
+### Useful Github Pull Request commands
+
+The following commands can be executed by writing them as comments on a pull request:
+
+ - `@elasticmachine merge upstream`: Will merge the upstream (eg. master or 7.x) into the branch. This is useful if a bug has been fixed upstream and the fix is necessary to pass CI checks
+ - `retest` Re-run the tests. This is useful if a flaky test caused the build to fail
+
### Visual Studio Code
When using [Visual Studio Code](https://code.visualstudio.com/) with APM it's best to set up a [multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) and add the `x-pack/legacy/plugins/apm` directory, the `x-pack` directory, and the root of the Kibana repository to the workspace. This makes it so you can navigate and search within APM and use the wider workspace roots when you need to widen your search.
diff --git a/x-pack/legacy/plugins/apm/server/lib/errors/distribution/get_buckets.ts b/x-pack/legacy/plugins/apm/server/lib/errors/distribution/get_buckets.ts
index 9c49a7f613aa..6059f2b0051a 100644
--- a/x-pack/legacy/plugins/apm/server/lib/errors/distribution/get_buckets.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/errors/distribution/get_buckets.ts
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
import { idx } from '@kbn/elastic-idx';
+import { ESFilter } from '../../../../typings/elasticsearch';
import {
ERROR_GROUP_ID,
PROCESSOR_EVENT,
diff --git a/x-pack/legacy/plugins/apm/server/lib/errors/get_error_groups.ts b/x-pack/legacy/plugins/apm/server/lib/errors/get_error_groups.ts
index f692f94e255f..193ee4c2bbd1 100644
--- a/x-pack/legacy/plugins/apm/server/lib/errors/get_error_groups.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/errors/get_error_groups.ts
@@ -17,6 +17,7 @@ import { APMError } from '../../../typings/es_schemas/ui/APMError';
import { Setup } from '../helpers/setup_request';
import { getErrorGroupsProjection } from '../../../common/projections/errors';
import { mergeProjection } from '../../../common/projections/util/merge_projection';
+import { SortOptions } from '../../../typings/elasticsearch/aggregations';
export type ErrorGroupListAPIResponse = PromiseReturnType<
typeof getErrorGroups
@@ -30,7 +31,7 @@ export async function getErrorGroups({
}: {
serviceName: string;
sortField?: string;
- sortDirection?: string;
+ sortDirection?: 'asc' | 'desc';
setup: Setup;
}) {
const { client } = setup;
@@ -40,18 +41,21 @@ export async function getErrorGroups({
const projection = getErrorGroupsProjection({ setup, serviceName });
+ const order: SortOptions = sortByLatestOccurrence
+ ? {
+ max_timestamp: sortDirection
+ }
+ : { _count: sortDirection };
+
const params = mergeProjection(projection, {
body: {
size: 0,
aggs: {
error_groups: {
terms: {
+ ...projection.body.aggs.error_groups.terms,
size: 500,
- order: sortByLatestOccurrence
- ? {
- max_timestamp: sortDirection
- }
- : { _count: sortDirection }
+ order
},
aggs: {
sample: {
@@ -64,7 +68,7 @@ export async function getErrorGroups({
ERROR_GROUP_ID,
'@timestamp'
],
- sort: [{ '@timestamp': 'desc' }],
+ sort: [{ '@timestamp': 'desc' as const }],
size: 1
}
},
@@ -98,13 +102,13 @@ export async function getErrorGroups({
};
}
- const resp = await client.search(params);
+ const resp = await client.search(params);
// aggregations can be undefined when no matching indices are found.
// this is an exception rather than the rule so the ES type does not account for this.
const hits = (idx(resp, _ => _.aggregations.error_groups.buckets) || []).map(
bucket => {
- const source = bucket.sample.hits.hits[0]._source as SampleError;
+ const source = bucket.sample.hits.hits[0]._source;
const message =
idx(source, _ => _.error.log.message) ||
idx(source, _ => _.error.exception[0].message);
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/__test__/get_environment_ui_filter_es.test.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/__test__/get_environment_ui_filter_es.test.ts
index df471af4f5ee..0f0a11a868d6 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/__test__/get_environment_ui_filter_es.test.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/__test__/get_environment_ui_filter_es.test.ts
@@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
import { getEnvironmentUiFilterES } from '../get_environment_ui_filter_es';
import { ENVIRONMENT_NOT_DEFINED } from '../../../../../common/environment_filter_values';
import { SERVICE_ENVIRONMENT } from '../../../../../common/elasticsearch_fieldnames';
+import { ESFilter } from '../../../../../typings/elasticsearch';
describe('getEnvironmentUiFilterES', () => {
it('should return undefined, when environment is undefined', () => {
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_environment_ui_filter_es.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_environment_ui_filter_es.ts
index 8a94e42a40b2..57feaf6a6fd0 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_environment_ui_filter_es.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_environment_ui_filter_es.ts
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
+import { ESFilter } from '../../../../typings/elasticsearch';
import { ENVIRONMENT_NOT_DEFINED } from '../../../../common/environment_filter_values';
import { SERVICE_ENVIRONMENT } from '../../../../common/elasticsearch_fieldnames';
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_kuery_ui_filter_es.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_kuery_ui_filter_es.ts
index 4ba4caa8c69d..2543c2b9a8a6 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_kuery_ui_filter_es.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_kuery_ui_filter_es.ts
@@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
import { Server } from 'hapi';
import { idx } from '@kbn/elastic-idx';
import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query';
+import { ESFilter } from '../../../../typings/elasticsearch';
import { ISavedObject } from '../../../../public/services/rest/savedObjects';
import { StaticIndexPattern } from '../../../../../../../../src/legacy/core_plugins/data/public';
import { getAPMIndexPattern } from '../../../lib/index_pattern';
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_ui_filters_es.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_ui_filters_es.ts
index 1658cb07e4d2..bea7e510875d 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_ui_filters_es.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/convert_ui_filters/get_ui_filters_es.ts
@@ -5,7 +5,7 @@
*/
import { Server } from 'hapi';
-import { ESFilter } from 'elasticsearch';
+import { ESFilter } from '../../../../typings/elasticsearch';
import { UIFilters } from '../../../../typings/ui-filters';
import { getEnvironmentUiFilterES } from './get_environment_ui_filter_es';
import { getKueryUiFilterES } from './get_kuery_ui_filter_es';
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/es_client.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/es_client.ts
index 79fcfe95c055..9b2c97fab7aa 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/es_client.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/es_client.ts
@@ -9,13 +9,16 @@ import {
SearchParams,
IndexDocumentParams,
IndicesDeleteParams,
- IndicesCreateParams,
- AggregationSearchResponseWithTotalHitsAsObject
+ IndicesCreateParams
} from 'elasticsearch';
import { Legacy } from 'kibana';
import { cloneDeep, has, isString, set } from 'lodash';
import { OBSERVER_VERSION_MAJOR } from '../../../common/elasticsearch_fieldnames';
import { StringMap } from '../../../typings/common';
+import {
+ ESSearchResponse,
+ ESSearchRequest
+} from '../../../typings/elasticsearch';
// `type` was deprecated in 7.0
export type APMIndexDocumentParams = Omit, 'type'>;
@@ -92,10 +95,13 @@ export function getESClient(req: Legacy.Request) {
const query = req.query as StringMap;
return {
- search: async (
- params: U,
+ search: async <
+ TDocument = unknown,
+ TSearchRequest extends ESSearchRequest = {}
+ >(
+ params: TSearchRequest,
apmOptions?: APMOptions
- ): Promise> => {
+ ): Promise> => {
const nextParams = await getParamsForSearchRequest(
req,
params,
@@ -117,9 +123,7 @@ export function getESClient(req: Legacy.Request) {
req,
'search',
nextParams
- ) as unknown) as Promise<
- AggregationSearchResponseWithTotalHitsAsObject
- >;
+ ) as unknown) as Promise>;
},
index: (params: APMIndexDocumentParams) => {
return cluster.callWithRequest(req, 'index', params);
diff --git a/x-pack/legacy/plugins/apm/server/lib/helpers/setup_request.test.ts b/x-pack/legacy/plugins/apm/server/lib/helpers/setup_request.test.ts
index cfc33b4fad7e..e8cf56fcd080 100644
--- a/x-pack/legacy/plugins/apm/server/lib/helpers/setup_request.test.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/helpers/setup_request.test.ts
@@ -31,7 +31,7 @@ describe('setupRequest', () => {
it('should call callWithRequest with default args', async () => {
const { mockRequest, callWithRequestSpy } = getMockRequest();
const { client } = await setupRequest(mockRequest);
- await client.search({ index: 'apm-*', body: { foo: 'bar' } });
+ await client.search({ index: 'apm-*', body: { foo: 'bar' } } as any);
expect(callWithRequestSpy).toHaveBeenCalledWith(mockRequest, 'search', {
index: 'apm-*',
body: {
diff --git a/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/fetchAndTransformGcMetrics.ts b/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/fetchAndTransformGcMetrics.ts
index 7b8fc4ac44f6..f785e4506280 100644
--- a/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/fetchAndTransformGcMetrics.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/fetchAndTransformGcMetrics.ts
@@ -124,7 +124,7 @@ export async function fetchAndTransformGcMetrics({
}
const series = aggregations.per_pool.buckets.map((poolBucket, i) => {
- const label = poolBucket.key;
+ const label = poolBucket.key as string;
const timeseriesData = poolBucket.over_time;
const data = (idx(timeseriesData, _ => _.buckets) || []).map(bucket => {
diff --git a/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/getGcRateChart.ts b/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/getGcRateChart.ts
index aa4533db0c33..642c6a901da9 100644
--- a/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/getGcRateChart.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/metrics/by_agent/java/gc/getGcRateChart.ts
@@ -22,7 +22,7 @@ const series = {
const chartBase: ChartBase = {
title: i18n.translate('xpack.apm.agentMetrics.java.gcRateChartTitle', {
- defaultMessage: 'Garbage collection rate per minute'
+ defaultMessage: 'Garbage collection per minute'
}),
key: 'gc_rate_line_chart',
type: 'linemark',
diff --git a/x-pack/legacy/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts b/x-pack/legacy/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts
index 9837fb21b6da..3d425e50bc60 100644
--- a/x-pack/legacy/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts
@@ -4,20 +4,22 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { Unionize } from 'utility-types';
import { Setup } from '../helpers/setup_request';
import { getMetricsDateHistogramParams } from '../helpers/metrics';
import { ChartBase } from './types';
import { transformDataToMetricsChart } from './transform_metrics_chart';
import { getMetricsProjection } from '../../../common/projections/metrics';
import { mergeProjection } from '../../../common/projections/util/merge_projection';
+import { AggregationOptionsByType } from '../../../typings/elasticsearch/aggregations';
interface Aggs {
- [key: string]: {
- min?: any;
- max?: any;
- sum?: any;
- avg?: any;
- };
+ [key: string]: Unionize<{
+ min: AggregationOptionsByType['min'];
+ max: AggregationOptionsByType['max'];
+ sum: AggregationOptionsByType['sum'];
+ avg: AggregationOptionsByType['avg'];
+ }>;
}
interface Filter {
diff --git a/x-pack/legacy/plugins/apm/server/lib/metrics/transform_metrics_chart.ts b/x-pack/legacy/plugins/apm/server/lib/metrics/transform_metrics_chart.ts
index 89bc3b4107a5..594a0d35ed17 100644
--- a/x-pack/legacy/plugins/apm/server/lib/metrics/transform_metrics_chart.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/metrics/transform_metrics_chart.ts
@@ -4,12 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
import theme from '@elastic/eui/dist/eui_theme_light.json';
-import {
- AggregationSearchResponseWithTotalHitsAsObject,
- AggregatedValue
-} from 'elasticsearch';
import { idx } from '@kbn/elastic-idx';
+import { Unionize, Overwrite } from 'utility-types';
import { ChartBase } from './types';
+import {
+ ESSearchResponse,
+ ESSearchRequest
+} from '../../../typings/elasticsearch';
+import { AggregationOptionsByType } from '../../../typings/elasticsearch/aggregations';
const colors = [
theme.euiColorVis0,
@@ -25,33 +27,30 @@ export type GenericMetricsChart = ReturnType<
typeof transformDataToMetricsChart
>;
-interface AggregatedParams {
- body: {
- aggs: {
- timeseriesData: {
- date_histogram: any;
- aggs: {
- min?: any;
- max?: any;
- sum?: any;
- avg?: any;
+interface MetricsAggregationMap {
+ min: AggregationOptionsByType['min'];
+ max: AggregationOptionsByType['max'];
+ sum: AggregationOptionsByType['sum'];
+ avg: AggregationOptionsByType['avg'];
+}
+
+type GenericMetricsRequest = Overwrite<
+ ESSearchRequest,
+ {
+ body: {
+ aggs: {
+ timeseriesData: {
+ date_histogram: AggregationOptionsByType['date_histogram'];
+ aggs: Record>;
};
- };
- } & {
- [key: string]: {
- min?: any;
- max?: any;
- sum?: any;
- avg?: any;
- };
+ } & Record>;
};
- };
-}
+ }
+>;
-export function transformDataToMetricsChart(
- result: AggregationSearchResponseWithTotalHitsAsObject,
- chartBase: ChartBase
-) {
+export function transformDataToMetricsChart<
+ TRequest extends GenericMetricsRequest
+>(result: ESSearchResponse, chartBase: ChartBase) {
const { aggregations, hits } = result;
const timeseriesData = idx(aggregations, _ => _.timeseriesData);
@@ -70,7 +69,7 @@ export function transformDataToMetricsChart(
color: chartBase.series[seriesKey].color || colors[i],
overallValue,
data: (idx(timeseriesData, _ => _.buckets) || []).map(bucket => {
- const { value } = bucket[seriesKey] as AggregatedValue;
+ const { value } = bucket[seriesKey] as { value: number | null };
const y = value === null || isNaN(value) ? null : value;
return {
x: bucket.key,
diff --git a/x-pack/legacy/plugins/apm/server/lib/service_nodes/index.ts b/x-pack/legacy/plugins/apm/server/lib/service_nodes/index.ts
index afdf4795c4d2..1e415252200c 100644
--- a/x-pack/legacy/plugins/apm/server/lib/service_nodes/index.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/service_nodes/index.ts
@@ -24,45 +24,45 @@ const getServiceNodes = async ({
}) => {
const { client } = setup;
- const projection = mergeProjection(
- getServiceNodesProjection({ setup, serviceName }),
- {
- body: {
- aggs: {
- nodes: {
- terms: {
- size: 10000,
- missing: SERVICE_NODE_NAME_MISSING
+ const projection = getServiceNodesProjection({ setup, serviceName });
+
+ const params = mergeProjection(projection, {
+ body: {
+ aggs: {
+ nodes: {
+ terms: {
+ ...projection.body.aggs.nodes.terms,
+ size: 10000,
+ missing: SERVICE_NODE_NAME_MISSING
+ },
+ aggs: {
+ cpu: {
+ avg: {
+ field: METRIC_PROCESS_CPU_PERCENT
+ }
+ },
+ heapMemory: {
+ avg: {
+ field: METRIC_JAVA_HEAP_MEMORY_USED
+ }
},
- aggs: {
- cpu: {
- avg: {
- field: METRIC_PROCESS_CPU_PERCENT
- }
- },
- heapMemory: {
- avg: {
- field: METRIC_JAVA_HEAP_MEMORY_USED
- }
- },
- nonHeapMemory: {
- avg: {
- field: METRIC_JAVA_NON_HEAP_MEMORY_USED
- }
- },
- threadCount: {
- max: {
- field: METRIC_JAVA_THREAD_COUNT
- }
+ nonHeapMemory: {
+ avg: {
+ field: METRIC_JAVA_NON_HEAP_MEMORY_USED
+ }
+ },
+ threadCount: {
+ max: {
+ field: METRIC_JAVA_THREAD_COUNT
}
}
}
}
}
}
- );
+ });
- const response = await client.search(projection);
+ const response = await client.search(params);
if (!response.aggregations) {
return [];
@@ -70,7 +70,7 @@ const getServiceNodes = async ({
return response.aggregations.nodes.buckets.map(bucket => {
return {
- name: bucket.key,
+ name: bucket.key as string,
cpu: bucket.cpu.value,
heapMemory: bucket.heapMemory.value,
nonHeapMemory: bucket.nonHeapMemory.value,
diff --git a/x-pack/legacy/plugins/apm/server/lib/services/get_service_agent_name.ts b/x-pack/legacy/plugins/apm/server/lib/services/get_service_agent_name.ts
index 3c6f68438997..b39e35a305b1 100644
--- a/x-pack/legacy/plugins/apm/server/lib/services/get_service_agent_name.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/services/get_service_agent_name.ts
@@ -44,6 +44,8 @@ export async function getServiceAgentName(serviceName: string, setup: Setup) {
};
const { aggregations } = await client.search(params);
- const agentName = idx(aggregations, _ => _.agents.buckets[0].key);
+ const agentName = idx(aggregations, _ => _.agents.buckets[0].key) as
+ | string
+ | undefined;
return { agentName };
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/services/get_service_transaction_types.ts b/x-pack/legacy/plugins/apm/server/lib/services/get_service_transaction_types.ts
index a1f035da9dc1..9d651247d5ce 100644
--- a/x-pack/legacy/plugins/apm/server/lib/services/get_service_transaction_types.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/services/get_service_transaction_types.ts
@@ -41,6 +41,6 @@ export async function getServiceTransactionTypes(
const { aggregations } = await client.search(params);
const buckets = idx(aggregations, _ => _.types.buckets) || [];
- const transactionTypes = buckets.map(bucket => bucket.key);
+ const transactionTypes = buckets.map(bucket => bucket.key as string);
return { transactionTypes };
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_agent_status.ts b/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_agent_status.ts
index d1654632dbb2..f9a7671abd99 100644
--- a/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_agent_status.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_agent_status.ts
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams } from 'elasticsearch';
import { PROCESSOR_EVENT } from '../../../../common/elasticsearch_fieldnames';
import { Setup } from '../../helpers/setup_request';
@@ -12,13 +11,13 @@ import { Setup } from '../../helpers/setup_request';
export async function getAgentStatus(setup: Setup) {
const { client, config } = setup;
- const params: SearchParams = {
+ const params = {
terminateAfter: 1,
index: [
- config.get('apm_oss.errorIndices'),
- config.get('apm_oss.metricsIndices'),
- config.get('apm_oss.sourcemapIndices'),
- config.get('apm_oss.transactionIndices')
+ config.get('apm_oss.errorIndices'),
+ config.get('apm_oss.metricsIndices'),
+ config.get('apm_oss.sourcemapIndices'),
+ config.get('apm_oss.transactionIndices')
],
body: {
size: 0,
diff --git a/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_services_items.ts b/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_services_items.ts
index c50506db1fae..60f309156705 100644
--- a/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_services_items.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/services/get_services/get_services_items.ts
@@ -28,6 +28,7 @@ export async function getServicesItems(setup: Setup) {
aggs: {
services: {
terms: {
+ ...projection.body.aggs.services.terms,
size: 500
},
aggs: {
@@ -69,12 +70,14 @@ export async function getServicesItems(setup: Setup) {
const environmentsBuckets = bucket.environments.buckets;
const environments = environmentsBuckets.map(
- environmentBucket => environmentBucket.key
+ environmentBucket => environmentBucket.key as string
);
return {
- serviceName: bucket.key,
- agentName: idx(bucket, _ => _.agents.buckets[0].key),
+ serviceName: bucket.key as string,
+ agentName: idx(bucket, _ => _.agents.buckets[0].key) as
+ | string
+ | undefined,
transactionsPerMinute,
errorsPerMinute,
avgResponseTime: bucket.avg.value,
diff --git a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_agent_name_by_service.ts b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_agent_name_by_service.ts
index a18873e86c5a..7742bc938816 100644
--- a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_agent_name_by_service.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_agent_name_by_service.ts
@@ -49,6 +49,8 @@ export async function getAgentNameByService({
};
const { aggregations } = await client.search(params);
- const agentName = idx(aggregations, _ => _.agent_names.buckets[0].key);
+ const agentName = idx(aggregations, _ => _.agent_names.buckets[0].key) as
+ | string
+ | undefined;
return { agentName };
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_all_environments.ts b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_all_environments.ts
index 76ebf75aada2..aad31feef000 100644
--- a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_all_environments.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_all_environments.ts
@@ -58,6 +58,6 @@ export async function getAllEnvironments({
const resp = await client.search(params);
const buckets = idx(resp.aggregations, _ => _.environments.buckets) || [];
- const environments = buckets.map(bucket => bucket.key);
+ const environments = buckets.map(bucket => bucket.key as string);
return [ALL_OPTION_VALUE, ...environments];
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts
index 120cc62cc3bc..6b557f21f345 100644
--- a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts
@@ -44,5 +44,5 @@ export async function getExistingEnvironmentsForService({
const resp = await client.search(params);
const buckets = idx(resp.aggregations, _ => _.environments.buckets) || [];
- return buckets.map(bucket => bucket.key);
+ return buckets.map(bucket => bucket.key as string);
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_service_names.ts b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_service_names.ts
index 55af96acbc71..dfc1041c9648 100644
--- a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_service_names.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/get_service_names.ts
@@ -47,6 +47,6 @@ export async function getServiceNames({ setup }: { setup: Setup }) {
const resp = await client.search(params);
const buckets = idx(resp.aggregations, _ => _.services.buckets) || [];
- const serviceNames = buckets.map(bucket => bucket.key).sort();
+ const serviceNames = buckets.map(bucket => bucket.key as string).sort();
return [ALL_OPTION_VALUE, ...serviceNames];
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/search.ts b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/search.ts
index 664bcb932547..6b0dc370dd87 100644
--- a/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/search.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/settings/agent_configuration/search.ts
@@ -3,8 +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 { ESSearchHit } from 'elasticsearch';
+import { ESSearchHit } from '../../../../typings/elasticsearch';
import {
SERVICE_NAME,
SERVICE_ENVIRONMENT
@@ -50,7 +49,7 @@ export async function searchConfigurations({
}
};
- const resp = await client.search(params);
+ const resp = await client.search(params);
const { hits } = resp.hits;
const exactMatch = hits.find(
diff --git a/x-pack/legacy/plugins/apm/server/lib/traces/get_trace_items.ts b/x-pack/legacy/plugins/apm/server/lib/traces/get_trace_items.ts
index 74e16424b109..71b65982db9f 100644
--- a/x-pack/legacy/plugins/apm/server/lib/traces/get_trace_items.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/traces/get_trace_items.ts
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams } from 'elasticsearch';
import {
PROCESSOR_EVENT,
TRACE_ID,
@@ -21,10 +20,10 @@ export async function getTraceItems(traceId: string, setup: Setup) {
const { start, end, client, config } = setup;
const maxTraceItems = config.get('xpack.apm.ui.maxTraceItems');
- const params: SearchParams = {
+ const params = {
index: [
- config.get('apm_oss.spanIndices'),
- config.get('apm_oss.transactionIndices')
+ config.get('apm_oss.spanIndices'),
+ config.get('apm_oss.transactionIndices')
],
body: {
size: maxTraceItems,
@@ -41,9 +40,9 @@ export async function getTraceItems(traceId: string, setup: Setup) {
}
},
sort: [
- { _score: { order: 'asc' } },
- { [TRANSACTION_DURATION]: { order: 'desc' } },
- { [SPAN_DURATION]: { order: 'desc' } }
+ { _score: { order: 'asc' as const } },
+ { [TRANSACTION_DURATION]: { order: 'desc' as const } },
+ { [SPAN_DURATION]: { order: 'desc' as const } }
],
track_total_hits: true
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/transaction_groups/fetcher.ts b/x-pack/legacy/plugins/apm/server/lib/transaction_groups/fetcher.ts
index a647bd2faff3..bfa46abcad36 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transaction_groups/fetcher.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transaction_groups/fetcher.ts
@@ -12,6 +12,8 @@ import { PromiseReturnType } from '../../../typings/common';
import { Setup } from '../helpers/setup_request';
import { getTransactionGroupsProjection } from '../../../common/projections/transaction_groups';
import { mergeProjection } from '../../../common/projections/util/merge_projection';
+import { SortOptions } from '../../../typings/elasticsearch/aggregations';
+import { Transaction } from '../../../typings/es_schemas/ui/Transaction';
interface TopTransactionOptions {
type: 'top_transactions';
@@ -36,6 +38,11 @@ export function transactionGroupsFetcher(options: Options, setup: Setup) {
options
});
+ const sort: SortOptions = [
+ { _score: 'desc' as const }, // sort by _score to ensure that buckets with sampled:true ends up on top
+ { '@timestamp': { order: 'desc' as const } }
+ ];
+
const params = mergeProjection(projection, {
body: {
size: 0,
@@ -48,17 +55,15 @@ export function transactionGroupsFetcher(options: Options, setup: Setup) {
aggs: {
transactions: {
terms: {
- order: { sum: 'desc' },
+ ...projection.body.aggs.transactions.terms,
+ order: { sum: 'desc' as const },
size: config.get('xpack.apm.ui.transactionGroupBucketSize')
},
aggs: {
sample: {
top_hits: {
size: 1,
- sort: [
- { _score: 'desc' }, // sort by _score to ensure that buckets with sampled:true ends up on top
- { '@timestamp': { order: 'desc' } }
- ]
+ sort
}
},
avg: { avg: { field: TRANSACTION_DURATION } },
@@ -72,5 +77,5 @@ export function transactionGroupsFetcher(options: Options, setup: Setup) {
}
});
- return client.search(params);
+ return client.search(params);
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/transaction_groups/transform.ts b/x-pack/legacy/plugins/apm/server/lib/transaction_groups/transform.ts
index b4e70d260f51..3ec64be08d11 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transaction_groups/transform.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transaction_groups/transform.ts
@@ -6,7 +6,6 @@
import moment from 'moment';
import { idx } from '@kbn/elastic-idx';
-import { Transaction } from '../../../typings/es_schemas/ui/Transaction';
import { ESResponse } from './fetcher';
function calculateRelativeImpacts(transactionGroups: ITransactionGroup[]) {
@@ -34,10 +33,10 @@ function getTransactionGroup(
const averageResponseTime = bucket.avg.value;
const transactionsPerMinute = bucket.doc_count / minutes;
const impact = bucket.sum.value;
- const sample = bucket.sample.hits.hits[0]._source as Transaction;
+ const sample = bucket.sample.hits.hits[0]._source;
return {
- name: bucket.key,
+ name: bucket.key as string,
sample,
p95: bucket.p95.values['95.0'],
averageResponseTime,
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts
index c440ee9c1ecb..e2989498181c 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts
@@ -63,7 +63,7 @@ export async function getTransactionAvgDurationByCountry({
const buckets = resp.aggregations.country_code.buckets;
const avgDurationsByCountry = buckets.map(
({ key, doc_count, avg_duration: { value } }) => ({
- key,
+ key: key as string,
docCount: doc_count,
value: value === null ? 0 : value
})
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/breakdown/index.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/breakdown/index.ts
index b3c1c6603f31..ecf963fec3fe 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/breakdown/index.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/breakdown/index.ts
@@ -50,7 +50,7 @@ export async function getTransactionBreakdown({
field: SPAN_TYPE,
size: 20,
order: {
- _count: 'desc'
+ _count: 'desc' as const
}
},
aggs: {
@@ -60,7 +60,7 @@ export async function getTransactionBreakdown({
missing: '',
size: 20,
order: {
- _count: 'desc'
+ _count: 'desc' as const
}
},
aggs: {
@@ -117,11 +117,11 @@ export async function getTransactionBreakdown({
const breakdowns = flatten(
aggs.types.buckets.map(bucket => {
- const type = bucket.key;
+ const type = bucket.key as string;
return bucket.subtypes.buckets.map(subBucket => {
return {
- name: subBucket.key || type,
+ name: (subBucket.key as string) || type,
percentage:
(subBucket.total_self_time_per_subtype.value || 0) /
sumAllSelfTimes
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_anomaly_data/get_ml_bucket_size.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_anomaly_data/get_ml_bucket_size.ts
index 293cede80cbf..27cff20b7ff3 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_anomaly_data/get_ml_bucket_size.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_anomaly_data/get_ml_bucket_size.ts
@@ -49,7 +49,7 @@ export async function getMlBucketSize({
};
try {
- const resp = await client.search(params);
+ const resp = await client.search(params);
return idx(resp, _ => _.hits.hits[0]._source.bucket_span) || 0;
} catch (err) {
const isHttpError = 'statusCode' in err;
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
index dc5cb925b720..97368b7d92ef 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
+import { ESFilter } from '../../../../../typings/elasticsearch';
import {
PROCESSOR_EVENT,
SERVICE_NAME,
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts
index f403c64a94ae..42828367f794 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts
@@ -57,7 +57,8 @@ export function getTpmBuckets(
});
// Handle empty string result keys
- const key = resultKey === '' ? NOT_AVAILABLE_LABEL : resultKey;
+ const key =
+ resultKey === '' ? NOT_AVAILABLE_LABEL : (resultKey as string);
return { key, dataPoints };
}
@@ -65,7 +66,7 @@ export function getTpmBuckets(
return sortBy(
buckets,
- bucket => bucket.key.replace(/^HTTP (\d)xx$/, '00$1') // ensure that HTTP 3xx are sorted at the top
+ bucket => bucket.key.toString().replace(/^HTTP (\d)xx$/, '00$1') // ensure that HTTP 3xx are sorted at the top
);
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts b/x-pack/legacy/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
index 458aad225fd9..42b35402aab9 100644
--- a/x-pack/legacy/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { Transaction } from '../../../../../typings/es_schemas/ui/Transaction';
import {
PROCESSOR_EVENT,
SERVICE_NAME,
@@ -17,7 +18,7 @@ import {
import { rangeFilter } from '../../../helpers/range_filter';
import { Setup } from '../../../helpers/setup_request';
-export function bucketFetcher(
+export async function bucketFetcher(
serviceName: string,
transactionName: string,
transactionType: string,
@@ -74,5 +75,7 @@ export function bucketFetcher(
}
};
- return client.search(params);
+ const response = await client.search(params);
+
+ return response;
}
diff --git a/x-pack/legacy/plugins/apm/server/lib/ui_filters/get_environments.ts b/x-pack/legacy/plugins/apm/server/lib/ui_filters/get_environments.ts
index 3b48bfc7a986..80795ce468c8 100644
--- a/x-pack/legacy/plugins/apm/server/lib/ui_filters/get_environments.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/ui_filters/get_environments.ts
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ESFilter } from 'elasticsearch';
import { idx } from '@kbn/elastic-idx';
import {
PROCESSOR_EVENT,
@@ -14,6 +13,7 @@ import {
import { rangeFilter } from '../helpers/range_filter';
import { Setup } from '../helpers/setup_request';
import { ENVIRONMENT_NOT_DEFINED } from '../../../common/environment_filter_values';
+import { ESFilter } from '../../../typings/elasticsearch';
export async function getEnvironments(setup: Setup, serviceName?: string) {
const { start, end, client, config } = setup;
@@ -58,7 +58,7 @@ export async function getEnvironments(setup: Setup, serviceName?: string) {
const environmentsBuckets = idx(aggs, _ => _.environments.buckets) || [];
const environments = environmentsBuckets.map(
- environmentBucket => environmentBucket.key
+ environmentBucket => environmentBucket.key as string
);
return environments;
diff --git a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/get_filter_aggregations.ts b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/get_filter_aggregations.ts
index 9c9a5c45f697..b7aaae2ff265 100644
--- a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/get_filter_aggregations.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/get_filter_aggregations.ts
@@ -53,7 +53,7 @@ export const getFilterAggregations = async ({
terms: {
field: field.fieldName,
order: {
- _count: 'desc'
+ _count: 'desc' as const
}
},
...bucketCountAggregation
diff --git a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts
index 7632b0358416..e8c29c29434e 100644
--- a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts
+++ b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts
@@ -68,7 +68,7 @@ export async function getLocalUIFilters({
options: sortByOrder(
aggregationsForFilter.by_terms.buckets.map(bucket => {
return {
- name: bucket.key,
+ name: bucket.key as string,
count:
'bucket_count' in bucket
? bucket.bucket_count.value
diff --git a/x-pack/legacy/plugins/apm/server/routes/errors.ts b/x-pack/legacy/plugins/apm/server/routes/errors.ts
index 73bb6e97b999..a315dd10023d 100644
--- a/x-pack/legacy/plugins/apm/server/routes/errors.ts
+++ b/x-pack/legacy/plugins/apm/server/routes/errors.ts
@@ -21,7 +21,7 @@ export const errorsRoute = createRoute(core => ({
query: t.intersection([
t.partial({
sortField: t.string,
- sortDirection: t.string
+ sortDirection: t.union([t.literal('asc'), t.literal('desc')])
}),
uiFiltersRt,
rangeRt
diff --git a/x-pack/legacy/plugins/apm/typings/elasticsearch.ts b/x-pack/legacy/plugins/apm/typings/elasticsearch.ts
deleted file mode 100644
index 08d1e2b37492..000000000000
--- a/x-pack/legacy/plugins/apm/typings/elasticsearch.ts
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * 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 { StringMap, IndexAsString } from './common';
-
-declare module 'elasticsearch' {
- // extending SearchResponse to be able to have typed aggregations
-
- type ESSearchHit = SearchResponse['hits']['hits'][0];
-
- type AggregationType =
- | 'date_histogram'
- | 'histogram'
- | 'terms'
- | 'avg'
- | 'top_hits'
- | 'max'
- | 'min'
- | 'percentiles'
- | 'sum'
- | 'extended_stats'
- | 'filter'
- | 'filters'
- | 'cardinality'
- | 'sampler'
- | 'value_count'
- | 'derivative'
- | 'bucket_script';
-
- type AggOptions = AggregationOptionMap & {
- [key: string]: any;
- };
-
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
- export type AggregationOptionMap = {
- aggs?: {
- [aggregationName: string]: {
- [T in AggregationType]?: AggOptions & AggregationOptionMap;
- };
- };
- };
-
- type SubAggregation = T extends { aggs: any }
- ? AggregationResultMap
- : {};
-
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
- type BucketAggregation = {
- buckets: Array<
- {
- key: KeyType;
- key_as_string: string;
- doc_count: number;
- } & (SubAggregation)
- >;
- };
-
- type FilterAggregation = {
- doc_count: number;
- } & SubAggregation;
-
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
- type FiltersAggregation = {
- // The filters aggregation can have named filters or anonymous filters,
- // which changes the structure of the return
- // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filters-aggregation.html
- buckets: SubAggregationMap extends {
- filters: { filters: Record };
- }
- ? {
- [key in keyof SubAggregationMap['filters']['filters']]: {
- doc_count: number;
- } & SubAggregation;
- }
- : Array<
- {
- doc_count: number;
- } & SubAggregation
- >;
- };
-
- type SamplerAggregation = SubAggregation<
- SubAggregationMap
- > & {
- doc_count: number;
- };
-
- interface AggregatedValue {
- value: number | null;
- }
-
- interface HitsTotal {
- value: number;
- relation: 'eq' | 'gte';
- }
-
- type AggregationResultMap = IndexAsString<
- {
- [AggregationName in keyof AggregationOption]: {
- avg: AggregatedValue;
- max: AggregatedValue;
- min: AggregatedValue;
- sum: AggregatedValue;
- value_count: AggregatedValue;
- // Elasticsearch might return terms with numbers, but this is a more limited type
- terms: BucketAggregation;
- date_histogram: BucketAggregation<
- AggregationOption[AggregationName],
- number
- >;
- histogram: BucketAggregation<
- AggregationOption[AggregationName],
- number
- >;
- top_hits: {
- hits: {
- total: HitsTotal;
- max_score: number | null;
- hits: Array<{
- _source: AggregationOption[AggregationName] extends {
- Mapping: any;
- }
- ? AggregationOption[AggregationName]['Mapping']
- : never;
- }>;
- };
- };
- percentiles: {
- values: {
- [key: string]: number;
- };
- };
- extended_stats: {
- count: number;
- min: number | null;
- max: number | null;
- avg: number | null;
- sum: number;
- sum_of_squares: number | null;
- variance: number | null;
- std_deviation: number | null;
- std_deviation_bounds: {
- upper: number | null;
- lower: number | null;
- };
- };
- filter: FilterAggregation;
- filters: FiltersAggregation;
- cardinality: {
- value: number;
- };
- sampler: SamplerAggregation;
- derivative: BucketAggregation<
- AggregationOption[AggregationName],
- number
- >;
- bucket_script: {
- value: number | null;
- };
- }[AggregationType & keyof AggregationOption[AggregationName]];
- }
- >;
-
- export type AggregationSearchResponseWithTotalHitsAsInt<
- HitType,
- SearchParams
- > = Pick<
- SearchResponse,
- Exclude, 'aggregations'>
- > &
- (SearchParams extends { body: Required }
- ? {
- aggregations?: AggregationResultMap;
- }
- : {});
-
- type Hits = Pick<
- SearchResponse['hits'],
- Exclude['hits'], 'total'>
- > & {
- total: HitsTotal;
- };
-
- export type AggregationSearchResponseWithTotalHitsAsObject<
- HitType,
- SearchParams
- > = Pick<
- AggregationSearchResponseWithTotalHitsAsInt,
- Exclude<
- keyof AggregationSearchResponseWithTotalHitsAsInt,
- 'hits'
- >
- > & { hits: Hits };
-
- export interface ESFilter {
- [key: string]: {
- [key: string]: string | string[] | number | StringMap | ESFilter[];
- };
- }
-}
diff --git a/x-pack/legacy/plugins/apm/typings/elasticsearch/aggregations.ts b/x-pack/legacy/plugins/apm/typings/elasticsearch/aggregations.ts
new file mode 100644
index 000000000000..9f17b0197a5b
--- /dev/null
+++ b/x-pack/legacy/plugins/apm/typings/elasticsearch/aggregations.ts
@@ -0,0 +1,256 @@
+/*
+ * 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 { Unionize } from 'utility-types';
+
+type SortOrder = 'asc' | 'desc';
+type SortInstruction = Record;
+export type SortOptions = SortOrder | SortInstruction | SortInstruction[];
+
+type Script =
+ | string
+ | {
+ lang?: string;
+ id?: string;
+ source?: string;
+ params?: Record;
+ };
+
+type BucketsPath = string | Record;
+
+type SourceOptions = string | string[];
+
+type MetricsAggregationOptions =
+ | {
+ field: string;
+ missing?: number;
+ }
+ | {
+ script?: Script;
+ };
+
+interface MetricsAggregationResponsePart {
+ value: number | null;
+}
+
+export interface AggregationOptionsByType {
+ terms: {
+ field: string;
+ size?: number;
+ missing?: string;
+ order?: SortOptions;
+ };
+ date_histogram: {
+ field: string;
+ format?: string;
+ min_doc_count?: number;
+ extended_bounds?: {
+ min: number;
+ max: number;
+ };
+ } & ({ calendar_interval: string } | { fixed_interval: string });
+ histogram: {
+ field: string;
+ interval: number;
+ min_doc_count?: number;
+ extended_bounds?: {
+ min?: number | string;
+ max?: number | string;
+ };
+ };
+ avg: MetricsAggregationOptions;
+ max: MetricsAggregationOptions;
+ min: MetricsAggregationOptions;
+ sum: MetricsAggregationOptions;
+ value_count: MetricsAggregationOptions;
+ cardinality: MetricsAggregationOptions & {
+ precision_threshold?: number;
+ };
+ percentiles: {
+ field: string;
+ percents?: number[];
+ };
+ extended_stats: {
+ field: string;
+ };
+ top_hits: {
+ from?: number;
+ size?: number;
+ sort?: SortOptions;
+ _source?: SourceOptions;
+ };
+ filter: Record;
+ filters: {
+ filters: Record | any[];
+ };
+ sampler: {
+ shard_size?: number;
+ };
+ derivative: {
+ buckets_path: BucketsPath;
+ };
+ bucket_script: {
+ buckets_path: BucketsPath;
+ script?: Script;
+ };
+}
+
+type AggregationType = keyof AggregationOptionsByType;
+
+type AggregationOptionsMap = Unionize<
+ {
+ [TAggregationType in AggregationType]: AggregationOptionsByType[TAggregationType];
+ }
+> & { aggs?: AggregationInputMap };
+
+export interface AggregationInputMap {
+ [key: string]: AggregationOptionsMap;
+}
+
+type BucketSubAggregationResponse<
+ TAggregationInputMap extends AggregationInputMap | undefined,
+ TDocument
+> = TAggregationInputMap extends AggregationInputMap
+ ? AggregationResponseMap
+ : {};
+
+interface AggregationResponsePart<
+ TAggregationOptionsMap extends AggregationOptionsMap,
+ TDocument
+> {
+ terms: {
+ buckets: Array<
+ {
+ doc_count: number;
+ key: string | number;
+ } & BucketSubAggregationResponse<
+ TAggregationOptionsMap['aggs'],
+ TDocument
+ >
+ >;
+ };
+ histogram: {
+ buckets: Array<
+ {
+ doc_count: number;
+ key: number;
+ } & BucketSubAggregationResponse<
+ TAggregationOptionsMap['aggs'],
+ TDocument
+ >
+ >;
+ };
+ date_histogram: {
+ buckets: Array<
+ {
+ doc_count: number;
+ key: number;
+ key_as_string: string;
+ } & BucketSubAggregationResponse<
+ TAggregationOptionsMap['aggs'],
+ TDocument
+ >
+ >;
+ };
+ avg: MetricsAggregationResponsePart;
+ sum: MetricsAggregationResponsePart;
+ max: MetricsAggregationResponsePart;
+ min: MetricsAggregationResponsePart;
+ value_count: MetricsAggregationResponsePart;
+ cardinality: {
+ value: number;
+ };
+ percentiles: {
+ values: Record;
+ };
+ extended_stats: {
+ count: number;
+ min: number | null;
+ max: number | null;
+ avg: number | null;
+ sum: number | null;
+ sum_of_squares: number | null;
+ variance: number | null;
+ std_deviation: number | null;
+ std_deviation_bounds: {
+ upper: number | null;
+ lower: number | null;
+ };
+ };
+ top_hits: {
+ hits: {
+ total: {
+ value: number;
+ relation: 'eq' | 'gte';
+ };
+ max_score: number | null;
+ hits: Array<{
+ _source: TDocument;
+ }>;
+ };
+ };
+ filter: {
+ doc_count: number;
+ } & AggregationResponseMap;
+ filters: TAggregationOptionsMap extends { filters: { filters: any[] } }
+ ? Array<
+ { doc_count: number } & AggregationResponseMap<
+ TAggregationOptionsMap['aggs'],
+ TDocument
+ >
+ >
+ : (TAggregationOptionsMap extends {
+ filters: {
+ filters: Record;
+ };
+ }
+ ? {
+ buckets: {
+ [key in keyof TAggregationOptionsMap['filters']['filters']]: {
+ doc_count: number;
+ } & AggregationResponseMap<
+ TAggregationOptionsMap['aggs'],
+ TDocument
+ >;
+ };
+ }
+ : never);
+ sampler: {
+ doc_count: number;
+ } & AggregationResponseMap;
+ derivative:
+ | {
+ value: number;
+ }
+ | undefined;
+ bucket_script:
+ | {
+ value: number | null;
+ }
+ | undefined;
+}
+
+// Type for debugging purposes. If you see an error in AggregationResponseMap
+// similar to "cannot be used to index type", uncomment the type below and hover
+// over it to see what aggregation response types are missing compared to the
+// input map.
+
+// type MissingAggregationResponseTypes = Exclude<
+// AggregationType,
+// keyof AggregationResponsePart<{}>
+// >;
+
+export type AggregationResponseMap<
+ TAggregationInputMap extends AggregationInputMap | undefined,
+ TDocument
+> = TAggregationInputMap extends AggregationInputMap
+ ? {
+ [TName in keyof TAggregationInputMap]: AggregationResponsePart<
+ TAggregationInputMap[TName],
+ TDocument
+ >[AggregationType & keyof TAggregationInputMap[TName]];
+ }
+ : undefined;
diff --git a/x-pack/legacy/plugins/apm/typings/elasticsearch/index.ts b/x-pack/legacy/plugins/apm/typings/elasticsearch/index.ts
new file mode 100644
index 000000000000..657968fbd704
--- /dev/null
+++ b/x-pack/legacy/plugins/apm/typings/elasticsearch/index.ts
@@ -0,0 +1,60 @@
+/*
+ * 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 { Omit } from 'utility-types';
+import { SearchParams, SearchResponse } from 'elasticsearch';
+import { AggregationResponseMap, AggregationInputMap } from './aggregations';
+import { StringMap } from '../common';
+
+export interface ESSearchBody {
+ query?: any;
+ size?: number;
+ aggs?: AggregationInputMap;
+ track_total_hits?: boolean | number;
+}
+
+export type ESSearchRequest = Omit & {
+ body?: ESSearchBody;
+};
+
+export interface ESSearchOptions {
+ restTotalHitsAsInt: boolean;
+}
+
+export type ESSearchHit = SearchResponse['hits']['hits'][0];
+
+export type ESSearchResponse<
+ TDocument,
+ TSearchRequest extends ESSearchRequest,
+ TOptions extends ESSearchOptions = { restTotalHitsAsInt: false }
+> = Omit, 'aggregations' | 'hits'> &
+ (TSearchRequest extends { body: { aggs: AggregationInputMap } }
+ ? {
+ aggregations?: AggregationResponseMap<
+ TSearchRequest['body']['aggs'],
+ TDocument
+ >;
+ }
+ : {}) &
+ ({
+ hits: Omit['hits'], 'total'> &
+ (TOptions['restTotalHitsAsInt'] extends true
+ ? {
+ total: number;
+ }
+ : {
+ total: {
+ value: number;
+ relation: 'eq' | 'gte';
+ };
+ });
+ });
+
+export interface ESFilter {
+ [key: string]: {
+ [key: string]: string | string[] | number | StringMap | ESFilter[];
+ };
+}
diff --git a/x-pack/legacy/plugins/canvas/common/lib/constants.ts b/x-pack/legacy/plugins/canvas/common/lib/constants.ts
index d4b092c830f7..7494ea13e6c0 100644
--- a/x-pack/legacy/plugins/canvas/common/lib/constants.ts
+++ b/x-pack/legacy/plugins/canvas/common/lib/constants.ts
@@ -36,6 +36,6 @@ export const DATATABLE_COLUMN_TYPES = ['string', 'number', 'null', 'boolean', 'd
export const LAUNCHED_FULLSCREEN = 'workpad-full-screen-launch';
export const LAUNCHED_FULLSCREEN_AUTOPLAY = 'workpad-full-screen-launch-with-autoplay';
export const API_ROUTE_SHAREABLE_BASE = '/public/canvas';
-export const API_ROUTE_SHAREABLE_ZIP = `${API_ROUTE_SHAREABLE_BASE}/zip`;
-export const API_ROUTE_SHAREABLE_RUNTIME = `${API_ROUTE_SHAREABLE_BASE}/runtime`;
-export const API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD = `${API_ROUTE_SHAREABLE_BASE}/${SHAREABLE_RUNTIME_NAME}.js`;
+export const API_ROUTE_SHAREABLE_ZIP = '/public/canvas/zip';
+export const API_ROUTE_SHAREABLE_RUNTIME = '/public/canvas/runtime';
+export const API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD = `/public/canvas/${SHAREABLE_RUNTIME_NAME}.js`;
diff --git a/x-pack/legacy/plugins/canvas/scripts/shareable_runtime.js b/x-pack/legacy/plugins/canvas/scripts/shareable_runtime.js
index 11723587b057..760298c8a2df 100644
--- a/x-pack/legacy/plugins/canvas/scripts/shareable_runtime.js
+++ b/x-pack/legacy/plugins/canvas/scripts/shareable_runtime.js
@@ -16,10 +16,10 @@ const execa = require('execa');
const asyncPipeline = promisify(pipeline);
const {
- SHAREABLE_RUNTIME_SRC: RUNTIME_SRC,
+ SHAREABLE_RUNTIME_SRC,
KIBANA_ROOT,
STATS_OUTPUT,
- SHAREABLE_RUNTIME_FILE: RUNTIME_FILE,
+ SHAREABLE_RUNTIME_FILE,
} = require('../shareable_runtime/constants');
run(
@@ -36,11 +36,11 @@ run(
...options,
});
- const webpackConfig = path.resolve(RUNTIME_SRC, 'webpack.config.js');
+ const webpackConfig = path.resolve(SHAREABLE_RUNTIME_SRC, 'webpack.config.js');
const clean = () => {
log.info('Deleting previous build.');
- del.sync([RUNTIME_FILE], { force: true });
+ del.sync([SHAREABLE_RUNTIME_FILE], { force: true });
};
if (flags.clean) {
@@ -66,7 +66,7 @@ run(
'--display-entrypoints',
'false',
'--content-base',
- RUNTIME_SRC,
+ SHAREABLE_RUNTIME_SRC,
],
options
);
diff --git a/x-pack/legacy/plugins/canvas/server/routes/shareables.ts b/x-pack/legacy/plugins/canvas/server/routes/shareables.ts
index cdb6a8105199..5159cde48b3e 100644
--- a/x-pack/legacy/plugins/canvas/server/routes/shareables.ts
+++ b/x-pack/legacy/plugins/canvas/server/routes/shareables.ts
@@ -16,6 +16,7 @@ import {
SHAREABLE_RUNTIME_FILE,
SHAREABLE_RUNTIME_NAME,
SHAREABLE_RUNTIME_SRC,
+ SHAREABLE_RUNTIME_OUTPUT,
} from '../../shareable_runtime/constants';
import { CoreSetup } from '../shim';
@@ -25,8 +26,15 @@ export function shareableWorkpads(route: CoreSetup['http']['route']) {
route({
method: 'GET',
path: API_ROUTE_SHAREABLE_RUNTIME,
+ options: {
+ files: {
+ relativeTo: SHAREABLE_RUNTIME_OUTPUT,
+ },
+ },
handler: {
- file: SHAREABLE_RUNTIME_FILE,
+ file: {
+ path: SHAREABLE_RUNTIME_FILE,
+ },
},
});
@@ -34,6 +42,11 @@ export function shareableWorkpads(route: CoreSetup['http']['route']) {
route({
method: 'GET',
path: API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD,
+ options: {
+ files: {
+ relativeTo: SHAREABLE_RUNTIME_OUTPUT,
+ },
+ },
handler(_request, handler) {
// @ts-ignore No type for inert Hapi handler
const file = handler.file(SHAREABLE_RUNTIME_FILE);
diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/constants.js b/x-pack/legacy/plugins/canvas/shareable_runtime/constants.js
index cc70a536ac9d..605591167c49 100644
--- a/x-pack/legacy/plugins/canvas/shareable_runtime/constants.js
+++ b/x-pack/legacy/plugins/canvas/shareable_runtime/constants.js
@@ -8,23 +8,24 @@ const path = require('path');
const LIBRARY_NAME = 'KbnCanvas';
const SHAREABLE_RUNTIME_NAME = 'kbn_canvas';
-const SHAREABLE_RUNTIME_CSS_NAME = 'kbn_canvas_css';
-const KIBANA_ROOT = path.resolve(__dirname, '../../../../..');
-const SHAREABLE_RUNTIME_SRC = path.resolve(
- KIBANA_ROOT,
- 'x-pack/legacy/plugins/canvas/shareable_runtime'
-);
-const SHAREABLE_RUNTIME_OUTPUT = path.resolve(SHAREABLE_RUNTIME_SRC, 'build');
-const SHAREABLE_RUNTIME_FILE = path.resolve(
- SHAREABLE_RUNTIME_OUTPUT,
- SHAREABLE_RUNTIME_NAME + '.js'
-);
-const STATS_OUTPUT = path.resolve(SHAREABLE_RUNTIME_OUTPUT, 'webpack_stats.json');
+
+const KIBANA_ROOT_PATH = '../../../../..';
+const CANVAS_ROOT_PATH = 'x-pack/legacy/plugins/canvas';
+const SHAREABLE_RUNTIME_PATH = 'shareable_runtime';
+const SHAREABLE_RUNTIME_OUTPUT_PATH = 'shareable_runtime/build';
+const SHAREABLE_RUNTIME_FILE_PATH = 'shareable_runtime/build/kbn_canvas.js';
+const STATS_OUTPUT_PATH = 'shareable_runtime/build/webpack_stats.json';
+
+const KIBANA_ROOT = path.resolve(__dirname, KIBANA_ROOT_PATH);
+const CANVAS_ROOT = path.resolve(KIBANA_ROOT, CANVAS_ROOT_PATH);
+const SHAREABLE_RUNTIME_SRC = path.resolve(CANVAS_ROOT, SHAREABLE_RUNTIME_PATH);
+const SHAREABLE_RUNTIME_OUTPUT = path.resolve(CANVAS_ROOT, SHAREABLE_RUNTIME_OUTPUT_PATH);
+const SHAREABLE_RUNTIME_FILE = path.resolve(CANVAS_ROOT, SHAREABLE_RUNTIME_FILE_PATH);
+const STATS_OUTPUT = path.resolve(CANVAS_ROOT, STATS_OUTPUT_PATH);
module.exports = {
KIBANA_ROOT,
LIBRARY_NAME,
- SHAREABLE_RUNTIME_CSS_NAME,
SHAREABLE_RUNTIME_FILE,
SHAREABLE_RUNTIME_NAME,
SHAREABLE_RUNTIME_OUTPUT,
diff --git a/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_list.tsx b/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_list.tsx
index 8b709d4fe8a1..b9276afe42fa 100644
--- a/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_list.tsx
+++ b/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_list.tsx
@@ -114,7 +114,7 @@ export const TemplateList: React.FunctionComponent
diff --git a/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_table/template_table.tsx b/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_table/template_table.tsx
index 7325f76a3663..52207cfa46e7 100644
--- a/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_table/template_table.tsx
+++ b/x-pack/legacy/plugins/index_management/public/sections/home/template_list/template_table/template_table.tsx
@@ -273,7 +273,7 @@ export const TemplateTable: React.FunctionComponent = ({
message={
}
/>
diff --git a/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx b/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx
index 9c81cda0a3fb..90b1e455d477 100644
--- a/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx
+++ b/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx
@@ -80,7 +80,8 @@ export class LogMinimap extends React.Component {
- const { svgPosition } = this.state;
+ if (!this.dragTargetArea) return;
+ const svgPosition = this.dragTargetArea.getBoundingClientRect();
const clickedYPosition = event.clientY - svgPosition.top;
const clickedTime = Math.floor(this.getYScale().invert(clickedYPosition));
this.setState({
diff --git a/x-pack/legacy/plugins/infra/public/components/logging/log_text_stream/vertical_scroll_panel.tsx b/x-pack/legacy/plugins/infra/public/components/logging/log_text_stream/vertical_scroll_panel.tsx
index 8edec4d1777d..7ff4a2cacee0 100644
--- a/x-pack/legacy/plugins/infra/public/components/logging/log_text_stream/vertical_scroll_panel.tsx
+++ b/x-pack/legacy/plugins/infra/public/components/logging/log_text_stream/vertical_scroll_panel.tsx
@@ -155,7 +155,7 @@ export class VerticalScrollPanel extends React.PureComponent<
} = this;
if (scrollRef.current === null || !target || childDimensions.size <= 0) {
- return;
+ return false;
}
const targetDimensions = childDimensions.get(target);
@@ -166,15 +166,20 @@ export class VerticalScrollPanel extends React.PureComponent<
// opposed to being in direct response to user input
this.nextScrollEventFromCenterTarget = true;
scrollRef.current.scrollTop = targetDimensions.top + targetOffset - scrollViewHeight / 2;
+ return true;
}
+ return false;
};
public handleUpdatedChildren = (target: Child | undefined, offset: number | undefined) => {
this.updateChildDimensions();
+ let centerTargetWillReportChildren = false;
if (!!target) {
- this.centerTarget(target, offset);
+ centerTargetWillReportChildren = this.centerTarget(target, offset);
+ }
+ if (!centerTargetWillReportChildren) {
+ this.reportVisibleChildren();
}
- this.reportVisibleChildren();
};
public componentDidMount() {
diff --git a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/anomalies/chart.tsx b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/anomalies/chart.tsx
index 73adcd13e244..e4100c6d774b 100644
--- a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/anomalies/chart.tsx
+++ b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/anomalies/chart.tsx
@@ -94,6 +94,7 @@ export const AnomaliesChart: React.FunctionComponent<{
onBrushEnd={handleBrushEnd}
tooltip={tooltipProps}
baseTheme={isDarkMode ? DARK_THEME : LIGHT_THEME}
+ xDomain={{ min: timeRange.startTime, max: timeRange.endTime }}
/>
diff --git a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/log_rate/bar_chart.tsx b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/log_rate/bar_chart.tsx
index de856bee9051..5055e3fc0823 100644
--- a/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/log_rate/bar_chart.tsx
+++ b/x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/log_rate/bar_chart.tsx
@@ -90,6 +90,7 @@ export const LogEntryRateBarChart: React.FunctionComponent<{
theme={isDarkMode ? DARK_THEME : LIGHT_THEME}
showLegend
legendPosition="right"
+ xDomain={{ min: timeRange.startTime, max: timeRange.endTime }}
/>
diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx
index f7f56b948cfe..ec933d8e8287 100644
--- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx
+++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx
@@ -13,6 +13,7 @@ import { coreMock } from 'src/core/public/mocks';
import { IndexPatternPrivateState } from './types';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { ChangeIndexPattern } from './change_indexpattern';
+import { EuiProgress } from '@elastic/eui';
jest.mock('ui/new_platform');
jest.mock('../../../../../../src/legacy/ui/public/registry/field_formats');
@@ -265,7 +266,14 @@ describe('IndexPattern Data Panel', () => {
});
describe('loading existence data', () => {
- async function testExistenceLoading(stateChanges?: unknown, propChanges?: unknown) {
+ function waitForPromises() {
+ return Promise.resolve()
+ .catch(() => {})
+ .then(() => {})
+ .then(() => {});
+ }
+
+ function testProps() {
const setState = jest.fn();
core.http.get = jest.fn(async (url: string) => {
const parts = url.split('/');
@@ -277,7 +285,7 @@ describe('IndexPattern Data Panel', () => {
),
};
});
- const props = {
+ return {
...defaultProps,
changeIndexPattern: jest.fn(),
setState,
@@ -301,8 +309,17 @@ describe('IndexPattern Data Panel', () => {
},
} as IndexPatternPrivateState,
};
+ }
+
+ async function testExistenceLoading(stateChanges?: unknown, propChanges?: unknown) {
+ const props = testProps();
const inst = mountWithIntl( );
- inst.update();
+
+ act(() => {
+ inst.update();
+ });
+
+ await waitForPromises();
if (stateChanges || propChanges) {
act(() => {
@@ -316,9 +333,10 @@ describe('IndexPattern Data Panel', () => {
});
inst.update();
});
+ await waitForPromises();
}
- return setState;
+ return props.setState;
}
it('loads existence data', async () => {
@@ -446,6 +464,98 @@ describe('IndexPattern Data Panel', () => {
},
});
});
+
+ it('shows a loading indicator when loading', async () => {
+ const inst = mountWithIntl( );
+
+ expect(inst.find(EuiProgress).length).toEqual(1);
+
+ await waitForPromises();
+ inst.update();
+
+ expect(inst.find(EuiProgress).length).toEqual(0);
+ });
+
+ it('does not perform multiple queries at once', async () => {
+ let queryCount = 0;
+ let overlapCount = 0;
+ const props = testProps();
+
+ core.http.get = jest.fn((url: string) => {
+ if (queryCount) {
+ ++overlapCount;
+ }
+ ++queryCount;
+
+ const parts = url.split('/');
+ const indexPatternTitle = parts[parts.length - 1];
+ const result = Promise.resolve({
+ indexPatternTitle,
+ existingFieldNames: ['field_1', 'field_2'].map(
+ fieldName => `${indexPatternTitle}_${fieldName}`
+ ),
+ });
+
+ result.then(() => --queryCount);
+
+ return result;
+ });
+
+ const inst = mountWithIntl( );
+
+ inst.update();
+
+ act(() => {
+ ((inst.setProps as unknown) as (props: unknown) => {})({
+ ...props,
+ dateRange: { fromDate: '2019-01-01', toDate: '2020-01-02' },
+ });
+ inst.update();
+ });
+
+ act(() => {
+ ((inst.setProps as unknown) as (props: unknown) => {})({
+ ...props,
+ dateRange: { fromDate: '2019-01-01', toDate: '2020-01-03' },
+ });
+ inst.update();
+ });
+
+ await waitForPromises();
+
+ expect(core.http.get).toHaveBeenCalledTimes(2);
+ expect(overlapCount).toEqual(0);
+ });
+
+ it('shows all fields if empty state button is clicked', async () => {
+ const props = testProps();
+
+ core.http.get = jest.fn((url: string) => {
+ return Promise.resolve({
+ indexPatternTitle: props.currentIndexPatternId,
+ existingFieldNames: [],
+ });
+ });
+
+ const inst = mountWithIntl( );
+
+ inst.update();
+ await waitForPromises();
+
+ expect(inst.find('[data-test-subj="lnsFieldListPanelField"]').length).toEqual(0);
+
+ act(() => {
+ inst
+ .find('[data-test-subj="lnsDataPanelShowAllFields"]')
+ .first()
+ .simulate('click');
+ inst.update();
+ });
+
+ expect(
+ props.setState.mock.calls.map(([fn]) => fn(props.state)).filter(s => s.showEmptyFields)
+ ).toHaveLength(1);
+ });
});
describe('while showing empty fields', () => {
diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx
index 7fa8175e1857..e65f7bbc5ba6 100644
--- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx
+++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx
@@ -23,6 +23,7 @@ import {
EuiSwitch,
EuiFacetButton,
EuiIcon,
+ EuiButton,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
@@ -38,6 +39,7 @@ import {
import { trackUiEvent } from '../lens_ui_telemetry';
import { syncExistingFields } from './loader';
import { fieldExists } from './pure_helpers';
+import { Loader } from '../loader';
export type Props = DatasourceDataPanelProps & {
changeIndexPattern: (
@@ -86,9 +88,16 @@ export function IndexPatternDataPanel({
[state, setState]
);
- const onToggleEmptyFields = useCallback(() => {
- setState(prevState => ({ ...prevState, showEmptyFields: !prevState.showEmptyFields }));
- }, [setState]);
+ const onToggleEmptyFields = useCallback(
+ (showEmptyFields?: boolean) => {
+ setState(prevState => ({
+ ...prevState,
+ showEmptyFields:
+ showEmptyFields === undefined ? !prevState.showEmptyFields : showEmptyFields,
+ }));
+ },
+ [setState]
+ );
const indexPatternList = uniq(
Object.values(state.layers)
@@ -102,34 +111,38 @@ export function IndexPatternDataPanel({
timeFieldName: indexPatterns[id].timeFieldName,
}));
- useEffect(() => {
- syncExistingFields({
- dateRange,
- setState,
- indexPatterns: indexPatternList,
- fetchJson: core.http.get,
- });
- }, [
- dateRange.fromDate,
- dateRange.toDate,
- indexPatternList.map(x => `${x.title}:${x.timeFieldName}`).join(','),
- ]);
-
return (
-
+ <>
+
+ syncExistingFields({
+ dateRange,
+ setState,
+ indexPatterns: indexPatternList,
+ fetchJson: core.http.get,
+ })
+ }
+ loadDeps={[
+ dateRange.fromDate,
+ dateRange.toDate,
+ indexPatternList.map(x => `${x.title}:${x.timeFieldName}`).join(','),
+ ]}
+ />
+
+ >
);
}
@@ -158,7 +171,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
indexPatterns: Record;
dragDropContext: DragContextState;
showEmptyFields: boolean;
- onToggleEmptyFields: () => void;
+ onToggleEmptyFields: (showEmptyFields?: boolean) => void;
onChangeIndexPattern: (newId: string) => void;
existingFields: IndexPatternPrivateState['existingFields'];
}) {
@@ -201,6 +214,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
const currentIndexPattern = indexPatterns[currentIndexPatternId];
const allFields = currentIndexPattern.fields;
const fieldByName = indexBy(allFields, 'name');
+ const clearLocalState = () => setLocalState(s => ({ ...s, nameFilter: '', typeFilter: [] }));
const lazyScroll = () => {
if (scrollContainer) {
@@ -279,12 +293,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
indexPatternRefs={indexPatternRefs}
onChangeIndexPattern={(newId: string) => {
onChangeIndexPattern(newId);
-
- setLocalState(s => ({
- ...s,
- nameFilter: '',
- typeFilter: [],
- }));
+ clearLocalState();
}}
/>
@@ -303,11 +312,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}),
onClick: () => {
trackUiEvent('indexpattern_filters_cleared');
- setLocalState(s => ({
- ...s,
- nameFilter: '',
- typeFilter: [],
- }));
+ clearLocalState();
},
}}
>
@@ -448,6 +453,22 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
})}
+ {(!showEmptyFields ||
+ localState.typeFilter.length ||
+ localState.nameFilter.length) && (
+ {
+ trackUiEvent('show_empty_fields_clicked');
+ clearLocalState();
+ onToggleEmptyFields(true);
+ }}
+ >
+ {i18n.translate('xpack.lens.indexPatterns.showAllFields.buttonText', {
+ defaultMessage: 'Show All Fields',
+ })}
+
+ )}
)}
diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts
index 74de89d584d2..61823fd09c96 100644
--- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts
+++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts
@@ -61,6 +61,25 @@ describe('rename_columns', () => {
`);
});
+ it('should replace "" with a visible value', () => {
+ const input: KibanaDatatable = {
+ type: 'kibana_datatable',
+ columns: [{ id: 'a', name: 'A' }],
+ rows: [{ a: '' }],
+ };
+
+ const idMap = {
+ a: {
+ id: 'a',
+ label: 'Austrailia',
+ },
+ };
+
+ expect(renameColumns.fn(input, { idMap: JSON.stringify(idMap) }, {}).rows[0].a).toEqual(
+ '(empty)'
+ );
+ });
+
it('should keep columns which are not mapped', () => {
const input: KibanaDatatable = {
type: 'kibana_datatable',
diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.ts
index 87e51cb62ba1..66073c6a5e9d 100644
--- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.ts
+++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.ts
@@ -54,9 +54,9 @@ export const renameColumns: ExpressionFunction<
Object.entries(row).forEach(([id, value]) => {
if (id in idMap) {
- mappedRow[idMap[id].id] = value;
+ mappedRow[idMap[id].id] = sanitizeValue(value);
} else {
- mappedRow[id] = value;
+ mappedRow[id] = sanitizeValue(value);
}
});
@@ -91,3 +91,13 @@ function getColumnName(originalColumn: OriginalColumn, newColumn: KibanaDatatabl
return originalColumn.label;
}
+
+function sanitizeValue(value: unknown) {
+ if (value === '') {
+ return i18n.translate('xpack.lens.indexpattern.emptyTextColumnValue', {
+ defaultMessage: '(empty)',
+ });
+ }
+
+ return value;
+}
diff --git a/x-pack/legacy/plugins/lens/public/loader.test.tsx b/x-pack/legacy/plugins/lens/public/loader.test.tsx
new file mode 100644
index 000000000000..f448849d1043
--- /dev/null
+++ b/x-pack/legacy/plugins/lens/public/loader.test.tsx
@@ -0,0 +1,57 @@
+/*
+ * 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 { EuiProgress } from '@elastic/eui';
+import { Loader } from './loader';
+import { mount } from 'enzyme';
+
+describe('loader', () => {
+ it('shows a loading indicator when loading', async () => {
+ const load = jest.fn(() => Promise.resolve());
+ const inst = mount( );
+
+ expect(inst.find(EuiProgress).length).toEqual(1);
+
+ await load();
+ inst.update();
+
+ expect(inst.find(EuiProgress).length).toEqual(0);
+ });
+
+ it('hides loading indicator when failed', async () => {
+ const load = jest.fn(() => Promise.reject());
+ const inst = mount( );
+
+ expect(inst.find(EuiProgress).length).toEqual(1);
+
+ await Promise.resolve();
+ inst.update();
+
+ expect(inst.find(EuiProgress).length).toEqual(0);
+ });
+
+ it('does not run load in parallel', async () => {
+ let count = 0;
+ let ranInParallel = false;
+ const load = jest.fn(() => {
+ if (count) {
+ ranInParallel = true;
+ }
+ ++count;
+ return Promise.resolve().then(() => --count);
+ });
+ const inst = mount( );
+ inst.setProps({ loadDeps: ['foo'] });
+ inst.update();
+
+ await Promise.resolve();
+ inst.update();
+
+ expect(load).toHaveBeenCalledTimes(2);
+ expect(ranInParallel).toBeFalsy();
+ });
+});
diff --git a/x-pack/legacy/plugins/lens/public/loader.tsx b/x-pack/legacy/plugins/lens/public/loader.tsx
new file mode 100644
index 000000000000..ebbb006d837b
--- /dev/null
+++ b/x-pack/legacy/plugins/lens/public/loader.tsx
@@ -0,0 +1,47 @@
+/*
+ * 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, { useState, useEffect, useRef } from 'react';
+import { EuiProgress } from '@elastic/eui';
+
+/**
+ * Executes the specified load function any time loadDeps changes. Ensures the load
+ * function is never run in parallel. Shows a loading indicator while loading.
+ */
+export function Loader(props: { load: () => Promise; loadDeps: unknown[] }) {
+ const [isProcessing, setIsProcessing] = useState(false);
+ const prevRequest = useRef | undefined>(undefined);
+ const nextRequest = useRef<(() => void) | undefined>(undefined);
+
+ useEffect(function performLoad() {
+ if (prevRequest.current) {
+ nextRequest.current = performLoad;
+ return;
+ }
+
+ setIsProcessing(true);
+ prevRequest.current = props
+ .load()
+ .catch(() => {})
+ .then(() => {
+ const reload = nextRequest.current;
+ prevRequest.current = undefined;
+ nextRequest.current = undefined;
+
+ if (reload) {
+ reload();
+ } else {
+ setIsProcessing(false);
+ }
+ });
+ }, props.loadDeps);
+
+ if (!isProcessing) {
+ return null;
+ }
+
+ return ;
+}
diff --git a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_config_panel.tsx b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_config_panel.tsx
index 322e1f1ea4a0..f285cb90f225 100644
--- a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_config_panel.tsx
+++ b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_config_panel.tsx
@@ -102,7 +102,8 @@ function LayerSettings({
options={visualizationTypes
.filter(t => isHorizontalSeries(t.id as SeriesType) === horizontalOnly)
.map(t => ({
- ...t,
+ id: t.id,
+ label: t.label,
iconType: t.icon || 'empty',
}))}
idSelected={layer.seriesType}
diff --git a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.test.ts b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.test.ts
index 5cd0791ae3da..4b03c6c346ce 100644
--- a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.test.ts
+++ b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.test.ts
@@ -50,6 +50,15 @@ describe('xy_visualization', () => {
expect(desc.label).toEqual('Mixed XY Chart');
});
+ it('should show the preferredSeriesType if there are no layers', () => {
+ const desc = xyVisualization.getDescription(mixedState());
+
+ // 'test-file-stub' is a hack, but it at least means we aren't using
+ // a standard icon here.
+ expect(desc.icon).toEqual('test-file-stub');
+ expect(desc.label).toEqual('Bar Chart');
+ });
+
it('should show mixed horizontal bar chart when multiple horizontal bar types', () => {
const desc = xyVisualization.getDescription(
mixedState('bar_horizontal', 'bar_horizontal_stacked')
diff --git a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.tsx b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.tsx
index 0c9cb3b6216b..b56e0d9deb55 100644
--- a/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.tsx
+++ b/x-pack/legacy/plugins/lens/public/xy_visualization_plugin/xy_visualization.tsx
@@ -34,7 +34,11 @@ function getDescription(state?: State) {
}
if (!state.layers.length) {
- return visualizationTypes.find(v => v.id === state.preferredSeriesType)!;
+ const visualizationType = visualizationTypes.find(v => v.id === state.preferredSeriesType)!;
+ return {
+ icon: visualizationType.largeIcon || visualizationType.icon,
+ label: visualizationType.label,
+ };
}
const visualizationType = visualizationTypes.find(t => t.id === state.layers[0].seriesType)!;
diff --git a/x-pack/legacy/plugins/lens/server/routes/field_stats.ts b/x-pack/legacy/plugins/lens/server/routes/field_stats.ts
index e7e378e6b20e..ceefb492cdab 100644
--- a/x-pack/legacy/plugins/lens/server/routes/field_stats.ts
+++ b/x-pack/legacy/plugins/lens/server/routes/field_stats.ts
@@ -7,8 +7,8 @@
import Boom from 'boom';
import DateMath from '@elastic/datemath';
import { schema } from '@kbn/config-schema';
-import { AggregationSearchResponseWithTotalHitsAsInt } from 'elasticsearch';
import { CoreSetup } from 'src/core/server';
+import { ESSearchResponse } from '../../../apm/typings/elasticsearch';
import { FieldStatsResponse, BASE_API_URL } from '../../common';
const SHARD_SIZE = 5000;
@@ -135,9 +135,11 @@ export async function getNumberHistogram(
},
};
- const minMaxResult = (await aggSearchWithBody(
- searchBody
- )) as AggregationSearchResponseWithTotalHitsAsInt;
+ const minMaxResult = (await aggSearchWithBody(searchBody)) as ESSearchResponse<
+ unknown,
+ { body: { aggs: typeof searchBody } },
+ { restTotalHitsAsInt: true }
+ >;
const minValue = minMaxResult.aggregations!.sample.min_value.value;
const maxValue = minMaxResult.aggregations!.sample.max_value.value;
@@ -178,11 +180,10 @@ export async function getNumberHistogram(
},
},
};
- const histogramResult = (await aggSearchWithBody(
- histogramBody
- )) as AggregationSearchResponseWithTotalHitsAsInt<
+ const histogramResult = (await aggSearchWithBody(histogramBody)) as ESSearchResponse<
unknown,
- { body: { aggs: typeof histogramBody } }
+ { body: { aggs: typeof histogramBody } },
+ { restTotalHitsAsInt: true }
>;
return {
@@ -214,11 +215,10 @@ export async function getStringSamples(
},
},
};
- const topValuesResult = (await aggSearchWithBody(
- topValuesBody
- )) as AggregationSearchResponseWithTotalHitsAsInt<
+ const topValuesResult = (await aggSearchWithBody(topValuesBody)) as ESSearchResponse<
unknown,
- { body: { aggs: typeof topValuesBody } }
+ { body: { aggs: typeof topValuesBody } },
+ { restTotalHitsAsInt: true }
>;
return {
@@ -263,11 +263,10 @@ export async function getDateHistogram(
const histogramBody = {
histo: { date_histogram: { field: field.name, fixed_interval: fixedInterval } },
};
- const results = (await aggSearchWithBody(
- histogramBody
- )) as AggregationSearchResponseWithTotalHitsAsInt<
+ const results = (await aggSearchWithBody(histogramBody)) as ESSearchResponse<
unknown,
- { body: { aggs: typeof histogramBody } }
+ { body: { aggs: typeof histogramBody } },
+ { restTotalHitsAsInt: true }
>;
return {
diff --git a/x-pack/legacy/plugins/lens/server/usage/task.ts b/x-pack/legacy/plugins/lens/server/usage/task.ts
index ba74bcd24088..8fc6c8cbefe8 100644
--- a/x-pack/legacy/plugins/lens/server/usage/task.ts
+++ b/x-pack/legacy/plugins/lens/server/usage/task.ts
@@ -8,17 +8,13 @@ import moment from 'moment';
import KbnServer, { Server } from 'src/legacy/server/kbn_server';
import { CoreSetup } from 'src/core/server';
import { CallClusterOptions } from 'src/legacy/core_plugins/elasticsearch';
-// This import has the side effect of allowing us to use the elasticsearch type
-// extensions below. Without this import, the compiler is unable to find these
-// in tests
-import {} from '../../../apm/typings/elasticsearch';
import {
SearchParams,
DeleteDocumentByQueryParams,
SearchResponse,
DeleteDocumentByQueryResponse,
- AggregationSearchResponseWithTotalHitsAsInt,
} from 'elasticsearch';
+import { ESSearchResponse } from '../../../apm/typings/elasticsearch';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { RunContext } from '../../../task_manager';
import { getVisualizationCounts } from './visualization_counts';
@@ -135,11 +131,12 @@ export async function getDailyEvents(
},
};
- const metrics: AggregationSearchResponseWithTotalHitsAsInt<
+ const metrics: ESSearchResponse<
unknown,
{
body: { aggs: typeof aggs };
- }
+ },
+ { restTotalHitsAsInt: true }
> = await callCluster('search', {
index: kibanaIndex,
rest_total_hits_as_int: true,
diff --git a/x-pack/legacy/plugins/maps/public/actions/map_actions.js b/x-pack/legacy/plugins/maps/public/actions/map_actions.js
index b159cd02a7c2..dbd6eb6ffb39 100644
--- a/x-pack/legacy/plugins/maps/public/actions/map_actions.js
+++ b/x-pack/legacy/plugins/maps/public/actions/map_actions.js
@@ -143,7 +143,7 @@ export function removeTrackedLayerStateForSelectedLayer() {
export function replaceLayerList(newLayerList) {
return (dispatch, getState) => {
getLayerListRaw(getState()).forEach(({ id }) => {
- dispatch(removeLayer(id));
+ dispatch(removeLayerFromLayerList(id));
});
newLayerList.forEach(layerDescriptor => {
@@ -282,7 +282,7 @@ export function removeTransientLayer() {
return async (dispatch, getState) => {
const transientLayerId = getTransientLayerId(getState());
if (transientLayerId) {
- await dispatch(removeLayer(transientLayerId));
+ await dispatch(removeLayerFromLayerList(transientLayerId));
await dispatch(setTransientLayer(null));
}
};
@@ -611,11 +611,22 @@ export function removeSelectedLayer() {
const state = getState();
const layerId = getSelectedLayerId(state);
dispatch(removeLayer(layerId));
- dispatch(setSelectedLayer(null));
};
}
export function removeLayer(layerId) {
+ return async (dispatch, getState) => {
+ const state = getState();
+ const selectedLayerId = getSelectedLayerId(state);
+ if (layerId === selectedLayerId) {
+ dispatch(updateFlyout(FLYOUT_STATE.NONE));
+ await dispatch(setSelectedLayer(null));
+ }
+ dispatch(removeLayerFromLayerList(layerId));
+ };
+}
+
+function removeLayerFromLayerList(layerId) {
return (dispatch, getState) => {
const layerGettingRemoved = getLayerById(layerId, getState());
if (!layerGettingRemoved) {
@@ -682,7 +693,10 @@ export function clearMissingStyleProperties(layerId) {
if (!style) {
return;
}
- const ordinalFields = await targetLayer.getOrdinalFields();
+
+ const dateFields = await targetLayer.getDateFields();
+ const numberFields = await targetLayer.getNumberFields();
+ const ordinalFields = [...dateFields, ...numberFields];
const { hasChanges, nextStyleDescriptor } = style.getDescriptorWithMissingStylePropsRemoved(ordinalFields);
if (hasChanges) {
dispatch(updateLayerStyle(layerId, nextStyleDescriptor));
diff --git a/x-pack/legacy/plugins/maps/public/components/__snapshots__/layer_toc_actions.test.js.snap b/x-pack/legacy/plugins/maps/public/components/__snapshots__/layer_toc_actions.test.js.snap
index f2814625e45b..af836ceffa4b 100644
--- a/x-pack/legacy/plugins/maps/public/components/__snapshots__/layer_toc_actions.test.js.snap
+++ b/x-pack/legacy/plugins/maps/public/components/__snapshots__/layer_toc_actions.test.js.snap
@@ -105,6 +105,15 @@ exports[`LayerTocActions is rendered 1`] = `
"name": "Clone layer",
"onClick": [Function],
},
+ Object {
+ "data-test-subj": "removeLayerButton",
+ "icon": ,
+ "name": "Remove layer",
+ "onClick": [Function],
+ },
],
"title": "Layer actions",
},
@@ -219,6 +228,15 @@ exports[`LayerTocActions should disable fit to data when supportsFitToBounds is
"name": "Clone layer",
"onClick": [Function],
},
+ Object {
+ "data-test-subj": "removeLayerButton",
+ "icon": ,
+ "name": "Remove layer",
+ "onClick": [Function],
+ },
],
"title": "Layer actions",
},
diff --git a/x-pack/legacy/plugins/maps/public/components/layer_toc_actions.js b/x-pack/legacy/plugins/maps/public/components/layer_toc_actions.js
index 9363d2f0c1ab..6184b6dc2433 100644
--- a/x-pack/legacy/plugins/maps/public/components/layer_toc_actions.js
+++ b/x-pack/legacy/plugins/maps/public/components/layer_toc_actions.js
@@ -168,6 +168,22 @@ export class LayerTocActions extends Component {
this.props.cloneLayer();
}
});
+ actionItems.push({
+ name: i18n.translate('xpack.maps.layerTocActions.removeLayerTitle', {
+ defaultMessage: 'Remove layer',
+ }),
+ icon: (
+
+ ),
+ 'data-test-subj': 'removeLayerButton',
+ onClick: () => {
+ this._closePopover();
+ this.props.removeLayer();
+ }
+ });
}
return {
diff --git a/x-pack/legacy/plugins/maps/public/connected_components/layer_panel/flyout_footer/index.js b/x-pack/legacy/plugins/maps/public/connected_components/layer_panel/flyout_footer/index.js
index 21f269a6f865..9431415618e7 100644
--- a/x-pack/legacy/plugins/maps/public/connected_components/layer_panel/flyout_footer/index.js
+++ b/x-pack/legacy/plugins/maps/public/connected_components/layer_panel/flyout_footer/index.js
@@ -33,7 +33,6 @@ const mapDispatchToProps = (dispatch) => {
dispatch(setSelectedLayer(null));
},
removeLayer: () => {
- dispatch(updateFlyout(FLYOUT_STATE.NONE));
dispatch(removeSelectedLayer());
}
};
diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap
index 80b51976dd8e..7fb7e58e81c9 100644
--- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap
+++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap
@@ -26,6 +26,7 @@ exports[`TOCEntry is rendered 1`] = `
"showAtZoomLevel": [Function],
}
}
+ removeLayer={[Function]}
toggleVisible={[Function]}
zoom={0}
/>
@@ -93,6 +94,7 @@ exports[`TOCEntry props isReadOnly 1`] = `
"showAtZoomLevel": [Function],
}
}
+ removeLayer={[Function]}
toggleVisible={[Function]}
zoom={0}
/>
@@ -142,6 +144,7 @@ exports[`TOCEntry props should display layer details when isLegendDetailsOpen is
"showAtZoomLevel": [Function],
}
}
+ removeLayer={[Function]}
toggleVisible={[Function]}
zoom={0}
/>
diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/index.js b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/index.js
index 74d8bed66a57..a03e2e86677f 100644
--- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/index.js
+++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/index.js
@@ -20,6 +20,7 @@ import {
toggleLayerVisible,
removeTransientLayer,
cloneLayer,
+ removeLayer
} from '../../../../../actions/map_actions';
import { hasDirtyState, getSelectedLayer, isUsingSearch } from '../../../../../selectors/map_selectors';
@@ -51,6 +52,9 @@ function mapDispatchToProps(dispatch) {
cloneLayer: layerId => {
dispatch(cloneLayer(layerId));
},
+ removeLayer: layerId => {
+ dispatch(removeLayer(layerId));
+ },
hideTOCDetails: layerId => {
dispatch(hideTOCDetails(layerId));
},
diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js
index 49dfa8179838..8fd4ba8b1335 100644
--- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js
+++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js
@@ -178,6 +178,7 @@ export class TOCEntry extends React.Component {
_renderLayerHeader() {
const {
+ removeLayer,
cloneLayer,
isReadOnly,
layer,
@@ -211,6 +212,9 @@ export class TOCEntry extends React.Component {
}}
editLayer={this._openLayerPanelWithCheck}
isReadOnly={isReadOnly}
+ removeLayer={() => {
+ removeLayer(layer.getId());
+ }}
/>
{this._renderLayerIcons()}
diff --git a/x-pack/legacy/plugins/maps/public/layers/layer.js b/x-pack/legacy/plugins/maps/public/layers/layer.js
index c1e45d9b7c7a..c8187fd83ee4 100644
--- a/x-pack/legacy/plugins/maps/public/layers/layer.js
+++ b/x-pack/legacy/plugins/maps/public/layers/layer.js
@@ -405,7 +405,11 @@ export class AbstractLayer {
return [];
}
- async getOrdinalFields() {
+ async getDateFields() {
+ return [];
+ }
+
+ async getNumberFields() {
return [];
}
diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/components/vector/vector_style_editor.js b/x-pack/legacy/plugins/maps/public/layers/styles/components/vector/vector_style_editor.js
index ce44b5861dfd..83d4ff7c11d6 100644
--- a/x-pack/legacy/plugins/maps/public/layers/styles/components/vector/vector_style_editor.js
+++ b/x-pack/legacy/plugins/maps/public/layers/styles/components/vector/vector_style_editor.js
@@ -27,7 +27,8 @@ import { EuiSpacer, EuiButtonGroup } from '@elastic/eui';
export class VectorStyleEditor extends Component {
state = {
- ordinalFields: [],
+ dateFields: [],
+ numberFields: [],
defaultDynamicProperties: getDefaultDynamicProperties(),
defaultStaticProperties: getDefaultStaticProperties(),
supportedFeatures: undefined,
@@ -50,13 +51,23 @@ export class VectorStyleEditor extends Component {
}
async _loadOrdinalFields() {
- const ordinalFields = await this.props.layer.getOrdinalFields();
+
+ const dateFields = await this.props.layer.getDateFields();
if (!this._isMounted) {
return;
}
- if (!_.isEqual(ordinalFields, this.state.ordinalFields)) {
- this.setState({ ordinalFields });
+ if (!_.isEqual(dateFields, this.state.dateFields)) {
+ this.setState({ dateFields });
+ }
+
+ const numberFields = await this.props.layer.getNumberFields();
+ if (!this._isMounted) {
+ return;
}
+ if (!_.isEqual(numberFields, this.state.numberFields)) {
+ this.setState({ numberFields });
+ }
+
}
async _loadSupportedFeatures() {
@@ -96,6 +107,10 @@ export class VectorStyleEditor extends Component {
}
}
+ _getOrdinalFields() {
+ return [...this.state.dateFields, ...this.state.numberFields];
+ }
+
_renderFillColor() {
return (
@@ -117,7 +132,7 @@ export class VectorStyleEditor extends Component {
swatches={DEFAULT_LINE_COLORS}
handlePropertyChange={this.props.handlePropertyChange}
styleDescriptor={this.props.styleProperties.lineColor}
- ordinalFields={this.state.ordinalFields}
+ ordinalFields={this._getOrdinalFields()}
defaultStaticStyleOptions={this.state.defaultStaticProperties.lineColor.options}
defaultDynamicStyleOptions={this.state.defaultDynamicProperties.lineColor.options}
/>
@@ -130,7 +145,7 @@ export class VectorStyleEditor extends Component {
styleProperty={vectorStyles.LINE_WIDTH}
handlePropertyChange={this.props.handlePropertyChange}
styleDescriptor={this.props.styleProperties.lineWidth}
- ordinalFields={this.state.ordinalFields}
+ ordinalFields={this._getOrdinalFields()}
defaultStaticStyleOptions={this.state.defaultStaticProperties.lineWidth.options}
defaultDynamicStyleOptions={this.state.defaultDynamicProperties.lineWidth.options}
/>
@@ -143,7 +158,7 @@ export class VectorStyleEditor extends Component {
styleProperty={vectorStyles.ICON_SIZE}
handlePropertyChange={this.props.handlePropertyChange}
styleDescriptor={this.props.styleProperties.iconSize}
- ordinalFields={this.state.ordinalFields}
+ ordinalFields={this._getOrdinalFields()}
defaultStaticStyleOptions={this.state.defaultStaticProperties.iconSize.options}
defaultDynamicStyleOptions={this.state.defaultDynamicProperties.iconSize.options}
/>
@@ -159,7 +174,7 @@ export class VectorStyleEditor extends Component {
styleProperty={vectorStyles.ICON_ORIENTATION}
handlePropertyChange={this.props.handlePropertyChange}
styleDescriptor={this.props.styleProperties.iconOrientation}
- ordinalFields={this.state.ordinalFields}
+ ordinalFields={this.state.numberFields}
defaultStaticStyleOptions={this.state.defaultStaticProperties.iconOrientation.options}
defaultDynamicStyleOptions={this.state.defaultDynamicProperties.iconOrientation.options}
/>
diff --git a/x-pack/legacy/plugins/maps/public/layers/vector_layer.js b/x-pack/legacy/plugins/maps/public/layers/vector_layer.js
index f2c8a05694cd..81f4f3b388d5 100644
--- a/x-pack/legacy/plugins/maps/public/layers/vector_layer.js
+++ b/x-pack/legacy/plugins/maps/public/layers/vector_layer.js
@@ -195,7 +195,7 @@ export class VectorLayer extends AbstractLayer {
getLegendDetails() {
const getFieldLabel = async fieldName => {
- const ordinalFields = await this.getOrdinalFields();
+ const ordinalFields = await this._getOrdinalFields();
const field = ordinalFields.find(({ name }) => {
return name === fieldName;
});
@@ -253,15 +253,20 @@ export class VectorLayer extends AbstractLayer {
return this._source.getDisplayName();
}
- async getOrdinalFields() {
+
+ async getDateFields() {
const timeFields = await this._source.getDateFields();
- const timeFieldOptions = timeFields.map(({ label, name }) => {
+ return timeFields.map(({ label, name }) => {
return {
label,
name,
origin: SOURCE_DATA_ID_ORIGIN
};
});
+ }
+
+
+ async getNumberFields() {
const numberFields = await this._source.getNumberFields();
const numberFieldOptions = numberFields.map(({ label, name }) => {
return {
@@ -281,7 +286,14 @@ export class VectorLayer extends AbstractLayer {
joinFields.push(...fields);
});
- return [...timeFieldOptions, ...numberFieldOptions, ...joinFields];
+ return [...numberFieldOptions, ...joinFields];
+ }
+
+ async _getOrdinalFields() {
+ return [
+ ... await this.getDateFields(),
+ ... await this.getNumberFields()
+ ];
}
getIndexPatternIds() {
diff --git a/x-pack/legacy/plugins/ml/common/types/fields.ts b/x-pack/legacy/plugins/ml/common/types/fields.ts
index ac9e8702e094..9e1b992eec90 100644
--- a/x-pack/legacy/plugins/ml/common/types/fields.ts
+++ b/x-pack/legacy/plugins/ml/common/types/fields.ts
@@ -10,6 +10,7 @@ import {
KIBANA_AGGREGATION,
ES_AGGREGATION,
} from '../../common/constants/aggregation_types';
+import { MLCATEGORY } from '../../common/constants/field_types';
export const EVENT_RATE_FIELD_ID = '__ml_event_rate_count__';
export const METRIC_AGG_TYPE = 'metrics';
@@ -81,3 +82,10 @@ export interface AggFieldNamePair {
};
excludeFrequent?: string;
}
+
+export const mlCategory: Field = {
+ id: MLCATEGORY,
+ name: MLCATEGORY,
+ type: ES_FIELD_TYPES.KEYWORD,
+ aggregatable: false,
+};
diff --git a/x-pack/legacy/plugins/ml/common/util/job_utils.js b/x-pack/legacy/plugins/ml/common/util/job_utils.js
index 2bc8bfaff566..7b7a698cafb9 100644
--- a/x-pack/legacy/plugins/ml/common/util/job_utils.js
+++ b/x-pack/legacy/plugins/ml/common/util/job_utils.js
@@ -500,7 +500,7 @@ export function validateModelMemoryLimitUnits(job) {
if (typeof job.analysis_limits !== 'undefined' && typeof job.analysis_limits.model_memory_limit !== 'undefined') {
const mml = job.analysis_limits.model_memory_limit.toUpperCase();
- const mmlSplit = mml.match(/\d+(\w+)/);
+ const mmlSplit = mml.match(/\d+(\w+)$/);
const unit = (mmlSplit && mmlSplit.length === 2) ? mmlSplit[1] : null;
if (ALLOWED_DATA_UNITS.indexOf(unit) === -1) {
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx
index 35a0e1c82cf3..ab8cc5a5982b 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx
@@ -17,6 +17,7 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
+import { FormattedMessage } from '@kbn/i18n/react';
import { metadata } from 'ui/metadata';
import { IndexPattern, INDEX_PATTERN_ILLEGAL_CHARACTERS } from 'ui/index_patterns';
@@ -46,19 +47,14 @@ const NUMERICAL_FIELD_TYPES = new Set([
'scaled_float',
]);
+// List of system fields we want to ignore for the numeric field check.
+const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
+
export const CreateAnalyticsForm: FC = ({ actions, state }) => {
const { setFormState } = actions;
const kibanaContext = useKibanaContext();
- const {
- form,
- indexPatternsMap,
- indexPatternsWithNumericFields,
- indexPatternTitles,
- isAdvancedEditorEnabled,
- isJobCreated,
- requestMessages,
- } = state;
+ const { form, indexPatternsMap, isAdvancedEditorEnabled, isJobCreated, requestMessages } = state;
const {
createIndexPattern,
@@ -80,14 +76,44 @@ export const CreateAnalyticsForm: FC = ({ actions, sta
sourceIndex,
sourceIndexNameEmpty,
sourceIndexNameValid,
+ sourceIndexContainsNumericalFields,
+ sourceIndexFieldsCheckFailed,
trainingPercent,
} = form;
+ // Find out if index pattern contain numeric fields. Provides a hint in the form
+ // that an analytics jobs is not able to identify outliers if there are no numeric fields present.
+ const validateSourceIndexFields = async () => {
+ try {
+ const indexPattern: IndexPattern = await kibanaContext.indexPatterns.get(
+ indexPatternsMap[sourceIndex].value
+ );
+ const containsNumericalFields: boolean = indexPattern.fields.some(
+ ({ name, type }) => !OMIT_FIELDS.includes(name) && type === 'number'
+ );
+
+ setFormState({
+ sourceIndexContainsNumericalFields: containsNumericalFields,
+ sourceIndexFieldsCheckFailed: false,
+ });
+ } catch (e) {
+ setFormState({
+ sourceIndexFieldsCheckFailed: true,
+ });
+ }
+ };
+
const loadDependentFieldOptions = async () => {
- setFormState({ loadingDepFieldOptions: true, dependentVariable: '' });
+ setFormState({
+ loadingDepFieldOptions: true,
+ dependentVariable: '',
+ // Reset outlier detection sourceIndex checks to default values if we've switched to regression
+ sourceIndexFieldsCheckFailed: false,
+ sourceIndexContainsNumericalFields: true,
+ });
try {
const indexPattern: IndexPattern = await kibanaContext.indexPatterns.get(
- indexPatternsMap[sourceIndex]
+ indexPatternsMap[sourceIndex].value
);
if (indexPattern !== undefined) {
@@ -109,14 +135,43 @@ export const CreateAnalyticsForm: FC = ({ actions, sta
});
}
} catch (e) {
- // TODO: ensure error messages show up correctly
setFormState({ loadingDepFieldOptions: false, dependentVariableFetchFail: true });
}
};
+ const getSourceIndexErrorMessages = () => {
+ const errors = [];
+ if (!sourceIndexNameEmpty && !sourceIndexNameValid) {
+ errors.push(
+
+
+
+ );
+ }
+
+ if (sourceIndexFieldsCheckFailed === true) {
+ errors.push(
+
+
+
+ );
+ }
+
+ return errors;
+ };
+
useEffect(() => {
if (jobType === JOB_TYPES.REGRESSION && sourceIndexNameEmpty === false) {
loadDependentFieldOptions();
+ } else if (jobType === JOB_TYPES.OUTLIER_DETECTION && sourceIndexNameEmpty === false) {
+ validateSourceIndexFields();
}
}, [sourceIndex, jobType, sourceIndexNameEmpty]);
@@ -201,32 +256,20 @@ export const CreateAnalyticsForm: FC = ({ actions, sta
isInvalid={(!jobIdEmpty && !jobIdValid) || jobIdExists}
/>
- {/* TODO: Does the source index message below apply for regression jobs as well? Same for all validation messages below */}
- {i18n.translate('xpack.ml.dataframe.analytics.create.sourceIndexInvalidError', {
- defaultMessage:
- 'Invalid source index name, it cannot contain spaces or the characters: {characterList}',
- values: { characterList },
- })}
- ,
- ]
- }
+ error={getSourceIndexErrorMessages()}
>
{!isJobCreated && (
@@ -238,9 +281,11 @@ export const CreateAnalyticsForm: FC = ({ actions, sta
}
)}
singleSelection={{ asPlainText: true }}
- options={indexPatternTitles.sort().map(d => ({ label: d }))}
+ options={Object.values(indexPatternsMap).sort((a, b) =>
+ a.label.localeCompare(b.label)
+ )}
selectedOptions={
- indexPatternTitles.includes(sourceIndex) ? [{ label: sourceIndex }] : []
+ indexPatternsMap[sourceIndex] !== undefined ? [{ label: sourceIndex }] : []
}
onChange={selectedOptions =>
setFormState({ sourceIndex: selectedOptions[0].label || '' })
@@ -323,6 +368,17 @@ export const CreateAnalyticsForm: FC = ({ actions, sta
defaultMessage: 'Dependent variable',
}
)}
+ helpText={
+ dependentVariableOptions.length === 0 &&
+ dependentVariableFetchFail === false &&
+ !sourceIndexNameEmpty &&
+ i18n.translate(
+ 'xpack.ml.dataframe.analytics.create.dependentVariableOptionsNoNumericalFields',
+ {
+ defaultMessage: 'No numeric type fields were found for this index pattern.',
+ }
+ )
+ }
error={
dependentVariableFetchFail === true && [
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts
index f9d11605b167..a763bd9639bf 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/actions.ts
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { FormMessage, State } from './state';
+import { FormMessage, State, SourceIndexMap } from './state';
export enum ACTION {
ADD_REQUEST_MESSAGE,
@@ -48,8 +48,7 @@ export type Action =
| {
type: ACTION.SET_INDEX_PATTERN_TITLES;
payload: {
- indexPatternTitles: State['indexPatternTitles'];
- indexPatternsWithNumericFields: State['indexPatternsWithNumericFields'];
+ indexPatternsMap: SourceIndexMap;
};
}
| { type: ACTION.SET_IS_JOB_CREATED; isJobCreated: State['isJobCreated'] }
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/reducer.ts b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/reducer.ts
index 135f29adf1ba..037ec95ec17c 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/reducer.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/reducer.ts
@@ -61,9 +61,8 @@ export const validateAdvancedEditor = (state: State): State => {
const destinationIndexName = idx(jobConfig, _ => _.dest.index) || '';
const destinationIndexNameEmpty = destinationIndexName === '';
const destinationIndexNameValid = isValidIndexName(destinationIndexName);
- const destinationIndexPatternTitleExists = state.indexPatternTitles.some(
- name => destinationIndexName === name
- );
+ const destinationIndexPatternTitleExists =
+ state.indexPatternsMap[destinationIndexName] !== undefined;
let dependentVariableEmpty = false;
if (isRegressionAnalysis(jobConfig.analysis)) {
@@ -207,9 +206,8 @@ export function reducer(state: State, action: Action): State {
);
newFormState.destinationIndexNameEmpty = newFormState.destinationIndex === '';
newFormState.destinationIndexNameValid = isValidIndexName(newFormState.destinationIndex);
- newFormState.destinationIndexPatternTitleExists = state.indexPatternTitles.some(
- name => newFormState.destinationIndex === name
- );
+ newFormState.destinationIndexPatternTitleExists =
+ state.indexPatternsMap[newFormState.destinationIndex] !== undefined;
}
if (action.payload.jobId !== undefined) {
@@ -244,9 +242,8 @@ export function reducer(state: State, action: Action): State {
...state,
...action.payload,
};
- newState.form.destinationIndexPatternTitleExists = newState.indexPatternTitles.some(
- name => newState.form.destinationIndex === name
- );
+ newState.form.destinationIndexPatternTitleExists =
+ newState.indexPatternsMap[newState.form.destinationIndex] !== undefined;
return newState;
}
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
index cddc3577413c..bce0a800098f 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
@@ -16,6 +16,11 @@ export type EsIndexName = string;
export type DependentVariable = string;
export type IndexPatternTitle = string;
export type AnalyticsJobType = JOB_TYPES | undefined;
+type IndexPatternId = string;
+export type SourceIndexMap = Record<
+ IndexPatternTitle,
+ { label: IndexPatternTitle; value: IndexPatternId }
+>;
export interface FormMessage {
error?: string;
@@ -50,13 +55,13 @@ export interface State {
sourceIndex: EsIndexName;
sourceIndexNameEmpty: boolean;
sourceIndexNameValid: boolean;
+ sourceIndexContainsNumericalFields: boolean;
+ sourceIndexFieldsCheckFailed: boolean;
trainingPercent: number;
};
disabled: boolean;
indexNames: EsIndexName[];
- indexPatternsMap: any; // TODO: update type
- indexPatternTitles: IndexPatternTitle[];
- indexPatternsWithNumericFields: IndexPatternTitle[];
+ indexPatternsMap: SourceIndexMap;
isAdvancedEditorEnabled: boolean;
isJobCreated: boolean;
isJobStarted: boolean;
@@ -91,6 +96,8 @@ export const getInitialState = (): State => ({
sourceIndex: '',
sourceIndexNameEmpty: true,
sourceIndexNameValid: false,
+ sourceIndexContainsNumericalFields: true,
+ sourceIndexFieldsCheckFailed: false,
trainingPercent: 80,
},
jobConfig: {},
@@ -99,8 +106,6 @@ export const getInitialState = (): State => ({
!checkPermission('canStartStopDataFrameAnalytics'),
indexNames: [],
indexPatternsMap: {},
- indexPatternTitles: [],
- indexPatternsWithNumericFields: [],
isAdvancedEditorEnabled: false,
isJobCreated: false,
isJobStarted: false,
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts
index 18db5bf2205c..34451e2d22dd 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/use_create_analytics_form.ts
@@ -7,7 +7,9 @@
import { useReducer } from 'react';
import { i18n } from '@kbn/i18n';
+import { idx } from '@kbn/elastic-idx';
+import { SimpleSavedObject } from 'src/core/public';
import { ml } from '../../../../../services/ml_api_service';
import { useKibanaContext } from '../../../../../contexts/kibana';
@@ -24,8 +26,8 @@ import {
getJobConfigFromFormState,
EsIndexName,
FormMessage,
- IndexPatternTitle,
State,
+ SourceIndexMap,
} from './state';
export interface CreateAnalyticsFormProps {
@@ -33,9 +35,6 @@ export interface CreateAnalyticsFormProps {
state: State;
}
-// List of system fields we want to ignore for the numeric field check.
-const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
-
export function getErrorMessage(error: any) {
if (typeof error === 'object' && typeof error.message === 'string') {
return error.message;
@@ -66,11 +65,8 @@ export const useCreateAnalyticsForm = () => {
const setAdvancedEditorRawString = (advancedEditorRawString: string) =>
dispatch({ type: ACTION.SET_ADVANCED_EDITOR_RAW_STRING, advancedEditorRawString });
- const setIndexPatternTitles = (payload: {
- indexPatternTitles: IndexPatternTitle[];
- indexPatternsWithNumericFields: IndexPatternTitle[];
- indexPatternsMap: any; // TODO: update this type
- }) => dispatch({ type: ACTION.SET_INDEX_PATTERN_TITLES, payload });
+ const setIndexPatternTitles = (payload: { indexPatternsMap: SourceIndexMap }) =>
+ dispatch({ type: ACTION.SET_INDEX_PATTERN_TITLES, payload });
const setIsJobCreated = (isJobCreated: boolean) =>
dispatch({ type: ACTION.SET_IS_JOB_CREATED, isJobCreated });
@@ -230,31 +226,16 @@ export const useCreateAnalyticsForm = () => {
try {
// Set the index pattern titles which the user can choose as the source.
- const indexPatternTitles = await kibanaContext.indexPatterns.getTitles(true);
- // Find out which index patterns contain numeric fields.
- // This will be used to provide a hint in the form that an analytics jobs is not
- // able to identify outliers if there are no numeric fields present.
- const ids = await kibanaContext.indexPatterns.getIds(true);
- const indexPatternsWithNumericFields: IndexPatternTitle[] = [];
- const indexPatternsMap = {}; // TODO: add type, add to state to keep track of
- ids
- .filter(f => !!f)
- .forEach(async id => {
- const indexPattern = await kibanaContext.indexPatterns.get(id!);
- if (
- indexPattern.fields
- .filter(f => !OMIT_FIELDS.includes(f.name))
- .map(f => f.type)
- .includes('number')
- ) {
- indexPatternsWithNumericFields.push(indexPattern.title);
- // @ts-ignore TODO: fix this type
- indexPatternsMap[indexPattern.title] = id;
- }
- });
+ const indexPatternsMap: SourceIndexMap = {};
+ const savedObjects = (await kibanaContext.indexPatterns.getCache()) || [];
+ savedObjects.forEach((obj: SimpleSavedObject>) => {
+ const title = idx(obj, _ => _.attributes.title);
+ if (title !== undefined) {
+ const id = idx(obj, _ => _.id) || '';
+ indexPatternsMap[title] = { label: title, value: id };
+ }
+ });
setIndexPatternTitles({
- indexPatternTitles,
- indexPatternsWithNumericFields,
indexPatternsMap,
});
} catch (e) {
diff --git a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/route.ts b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/route.ts
index f5ad63e42291..d3e9277b646c 100644
--- a/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/route.ts
+++ b/x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/route.ts
@@ -12,7 +12,6 @@ import { checkGetJobsPrivilege } from '../../../privilege/check_privilege';
import {
loadCurrentIndexPattern,
loadCurrentSavedSearch,
- loadIndexPatterns,
// @ts-ignore
} from '../../../util/index_utils';
import { getDataFrameAnalyticsBreadcrumbs } from '../../breadcrumbs';
@@ -26,7 +25,6 @@ uiRoutes.when('/data_frame_analytics/?', {
CheckLicense: checkFullLicense,
privileges: checkGetJobsPrivilege,
indexPattern: loadCurrentIndexPattern,
- indexPatterns: loadIndexPatterns,
savedSearch: loadCurrentSavedSearch,
},
});
diff --git a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/utils.js b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/utils.js
index 3344d2d4ad4a..08c8993585da 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/utils.js
+++ b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/utils.js
@@ -178,7 +178,7 @@ export function cloneJob(jobId) {
mlJobService.tempJobCloningObjects.end = end;
}
} else {
- // otherwise use the currentJob
+ // otherwise use the tempJobCloningObjects
mlJobService.tempJobCloningObjects.job = job;
}
window.location.href = '#/jobs/new_job';
@@ -284,13 +284,13 @@ export function filterJobs(jobs, clauses) {
return filteredJobs;
}
-// check to see if a job has been stored in mlJobService.currentJob
+// check to see if a job has been stored in mlJobService.tempJobCloningObjects
// if it has, return an object with the minimum properties needed for the
// start datafeed modal.
export function checkForAutoStartDatafeed() {
- const job = mlJobService.currentJob;
+ const job = mlJobService.tempJobCloningObjects.job;
if (job !== undefined) {
- mlJobService.currentJob = undefined;
+ mlJobService.tempJobCloningObjects.job = undefined;
const hasDatafeed = (typeof job.datafeed_config === 'object' && Object.keys(job.datafeed_config).length > 0);
const datafeedId = hasDatafeed ? job.datafeed_config.datafeed_id : '';
return {
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/advanced_job_creator.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/advanced_job_creator.ts
index 4b79264779fe..54e704767b99 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/advanced_job_creator.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/advanced_job_creator.ts
@@ -9,7 +9,7 @@ import { IndexPattern } from 'ui/index_patterns';
import { JobCreator } from './job_creator';
import { Field, Aggregation, SplitField } from '../../../../../common/types/fields';
-import { Job, Datafeed, Detector } from './configs';
+import { Job, Datafeed, Detector, CustomRule } from './configs';
import { createBasicDetector } from './util/default_configs';
import { JOB_TYPE } from './util/constants';
import { getRichDetectors } from './util/general';
@@ -24,6 +24,7 @@ export interface RichDetector {
partitionField: SplitField;
excludeFrequent: string | null;
description: string | null;
+ customRules: CustomRule[] | null;
}
export class AdvancedJobCreator extends JobCreator {
@@ -31,7 +32,6 @@ export class AdvancedJobCreator extends JobCreator {
private _richDetectors: RichDetector[] = [];
private _queryString: string;
- // TODO - remove constructor if it isn't needed
constructor(indexPattern: IndexPattern, savedSearch: SavedSearch, query: object) {
super(indexPattern, savedSearch, query);
@@ -47,6 +47,9 @@ export class AdvancedJobCreator extends JobCreator {
excludeFrequent: string | null,
description: string | null
) {
+ // addDetector doesn't support adding new custom rules.
+ // this will be added in the future once it's supported in the UI
+ const customRules = null;
const { detector, richDetector } = this._createDetector(
agg,
field,
@@ -54,7 +57,8 @@ export class AdvancedJobCreator extends JobCreator {
overField,
partitionField,
excludeFrequent,
- description
+ description,
+ customRules
);
this._addDetector(detector, agg, field);
@@ -71,6 +75,9 @@ export class AdvancedJobCreator extends JobCreator {
description: string | null,
index: number
) {
+ const customRules =
+ this._detectors[index] !== undefined ? this._detectors[index].custom_rules || null : null;
+
const { detector, richDetector } = this._createDetector(
agg,
field,
@@ -78,7 +85,8 @@ export class AdvancedJobCreator extends JobCreator {
overField,
partitionField,
excludeFrequent,
- description
+ description,
+ customRules
);
this._editDetector(detector, agg, field, index);
@@ -95,7 +103,8 @@ export class AdvancedJobCreator extends JobCreator {
overField: SplitField,
partitionField: SplitField,
excludeFrequent: string | null,
- description: string | null
+ description: string | null,
+ customRules: CustomRule[] | null
): { detector: Detector; richDetector: RichDetector } {
const detector: Detector = createBasicDetector(agg, field);
@@ -114,6 +123,9 @@ export class AdvancedJobCreator extends JobCreator {
if (description !== null) {
detector.detector_description = description;
}
+ if (customRules !== null) {
+ detector.custom_rules = customRules;
+ }
const richDetector: RichDetector = {
agg,
@@ -123,6 +135,7 @@ export class AdvancedJobCreator extends JobCreator {
partitionField,
excludeFrequent,
description,
+ customRules,
};
return { detector, richDetector };
@@ -166,7 +179,10 @@ export class AdvancedJobCreator extends JobCreator {
public cloneFromExistingJob(job: Job, datafeed: Datafeed) {
this._overrideConfigs(job, datafeed);
- const detectors = getRichDetectors(job, datafeed, true);
+ const detectors = getRichDetectors(job, datafeed, this.scriptFields, true);
+
+ // keep track of the custom rules for each detector
+ const customRules = this._detectors.map(d => d.custom_rules);
this.removeAllDetectors();
this._richDetectors.length = 0;
@@ -185,5 +201,12 @@ export class AdvancedJobCreator extends JobCreator {
);
}
});
+
+ // re-apply custom rules
+ customRules.forEach((cr, i) => {
+ if (cr !== undefined) {
+ this._detectors[i].custom_rules = cr;
+ }
+ });
}
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/job_creator.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/job_creator.ts
index ee6f30ca4f0d..aa16da08e3a3 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/job_creator.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/job_creator.ts
@@ -8,6 +8,7 @@ import { SavedSearch } from 'src/legacy/core_plugins/kibana/public/discover/type
import { IndexPattern } from 'ui/index_patterns';
import { IndexPatternTitle } from '../../../../../common/types/kibana';
import { ML_JOB_AGGREGATION } from '../../../../../common/constants/aggregation_types';
+import { ES_FIELD_TYPES } from '../../../../../../../../../src/plugins/data/common';
import { Job, Datafeed, Detector, JobId, DatafeedId, BucketSpan } from './configs';
import { Aggregation, Field } from '../../../../../common/types/fields';
import { createEmptyJob, createEmptyDatafeed } from './util/default_configs';
@@ -33,6 +34,7 @@ export class JobCreator {
protected _subscribers: ProgressSubscriber[] = [];
protected _aggs: Aggregation[] = [];
protected _fields: Field[] = [];
+ protected _scriptFields: Field[] = [];
protected _sparseData: boolean = false;
private _stopAllRefreshPolls: {
stop: boolean;
@@ -413,6 +415,14 @@ export class JobCreator {
}
}
+ public get indices(): string[] {
+ return this._datafeed_config.indices;
+ }
+
+ public get scriptFields(): Field[] {
+ return this._scriptFields;
+ }
+
public get subscribers(): ProgressSubscriber[] {
return this._subscribers;
}
@@ -549,5 +559,16 @@ export class JobCreator {
this.useDedicatedIndex = true;
}
this._sparseData = isSparseDataJob(job, datafeed);
+
+ if (this._datafeed_config.script_fields !== undefined) {
+ this._scriptFields = Object.keys(this._datafeed_config.script_fields).map(f => ({
+ id: f,
+ name: f,
+ type: ES_FIELD_TYPES.KEYWORD,
+ aggregatable: true,
+ }));
+ } else {
+ this._scriptFields = [];
+ }
}
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/multi_metric_job_creator.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/multi_metric_job_creator.ts
index 39958b6d8f08..05a253a0962e 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/multi_metric_job_creator.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/multi_metric_job_creator.ts
@@ -141,7 +141,7 @@ export class MultiMetricJobCreator extends JobCreator {
public cloneFromExistingJob(job: Job, datafeed: Datafeed) {
this._overrideConfigs(job, datafeed);
this.createdBy = CREATED_BY_LABEL.MULTI_METRIC;
- const detectors = getRichDetectors(job, datafeed, false);
+ const detectors = getRichDetectors(job, datafeed, this.scriptFields, false);
if (datafeed.aggregations !== undefined) {
// if we've converting from a single metric job,
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/population_job_creator.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/population_job_creator.ts
index 89611743a440..ac7161422628 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/population_job_creator.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/population_job_creator.ts
@@ -126,7 +126,7 @@ export class PopulationJobCreator extends JobCreator {
public cloneFromExistingJob(job: Job, datafeed: Datafeed) {
this._overrideConfigs(job, datafeed);
this.createdBy = CREATED_BY_LABEL.POPULATION;
- const detectors = getRichDetectors(job, datafeed, false);
+ const detectors = getRichDetectors(job, datafeed, this.scriptFields, false);
this.removeAllDetectors();
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/single_metric_job_creator.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/single_metric_job_creator.ts
index 5c5b7bfe712a..aba3b08f330e 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/single_metric_job_creator.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/single_metric_job_creator.ts
@@ -186,7 +186,7 @@ export class SingleMetricJobCreator extends JobCreator {
public cloneFromExistingJob(job: Job, datafeed: Datafeed) {
this._overrideConfigs(job, datafeed);
this.createdBy = CREATED_BY_LABEL.SINGLE_METRIC;
- const detectors = getRichDetectors(job, datafeed, false);
+ const detectors = getRichDetectors(job, datafeed, this.scriptFields, false);
this.removeAllDetectors();
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/util/general.ts b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/util/general.ts
index 7178f637f6eb..10a9260598de 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/util/general.ts
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/common/job_creator/util/general.ts
@@ -11,32 +11,99 @@ import {
ML_JOB_AGGREGATION,
SPARSE_DATA_AGGREGATIONS,
} from '../../../../../../common/constants/aggregation_types';
-import { EVENT_RATE_FIELD_ID, AggFieldPair } from '../../../../../../common/types/fields';
+import { MLCATEGORY } from '../../../../../../common/constants/field_types';
+import {
+ EVENT_RATE_FIELD_ID,
+ Field,
+ AggFieldPair,
+ mlCategory,
+} from '../../../../../../common/types/fields';
import { mlJobService } from '../../../../../services/job_service';
import { JobCreatorType, isMultiMetricJobCreator, isPopulationJobCreator } from '../';
import { CREATED_BY_LABEL, JOB_TYPE } from './constants';
+const getFieldByIdFactory = (scriptFields: Field[]) => (id: string) => {
+ let field = newJobCapsService.getFieldById(id);
+ // if no field could be found it may be a pretend field, like mlcategory or a script field
+ if (field === null) {
+ if (id === MLCATEGORY) {
+ field = mlCategory;
+ } else if (scriptFields.length) {
+ field = scriptFields.find(f => f.id === id) || null;
+ }
+ }
+ return field;
+};
+
// populate the detectors with Field and Agg objects loaded from the job capabilities service
-export function getRichDetectors(job: Job, datafeed: Datafeed, advanced: boolean = false) {
+export function getRichDetectors(
+ job: Job,
+ datafeed: Datafeed,
+ scriptFields: Field[],
+ advanced: boolean = false
+) {
const detectors = advanced ? getDetectorsAdvanced(job, datafeed) : getDetectors(job, datafeed);
+
+ const getFieldById = getFieldByIdFactory(scriptFields);
+
return detectors.map(d => {
+ let field = null;
+ let byField = null;
+ let overField = null;
+ let partitionField = null;
+
+ if (d.field_name !== undefined) {
+ field = getFieldById(d.field_name);
+ }
+ if (d.by_field_name !== undefined) {
+ byField = getFieldById(d.by_field_name);
+ }
+ if (d.over_field_name !== undefined) {
+ overField = getFieldById(d.over_field_name);
+ }
+ if (d.partition_field_name !== undefined) {
+ partitionField = getFieldById(d.partition_field_name);
+ }
+
return {
agg: newJobCapsService.getAggById(d.function),
- field: d.field_name !== undefined ? newJobCapsService.getFieldById(d.field_name) : null,
- byField:
- d.by_field_name !== undefined ? newJobCapsService.getFieldById(d.by_field_name) : null,
- overField:
- d.over_field_name !== undefined ? newJobCapsService.getFieldById(d.over_field_name) : null,
- partitionField:
- d.partition_field_name !== undefined
- ? newJobCapsService.getFieldById(d.partition_field_name)
- : null,
+ field,
+ byField,
+ overField,
+ partitionField,
excludeFrequent: d.exclude_frequent || null,
description: d.detector_description || null,
};
});
}
+export function createFieldOptions(fields: Field[], filterOverride?: (f: Field) => boolean) {
+ const filter = filterOverride || (f => f.id !== EVENT_RATE_FIELD_ID);
+ return fields
+ .filter(filter)
+ .map(f => ({
+ label: f.name,
+ }))
+ .sort((a, b) => a.label.localeCompare(b.label));
+}
+
+export function createScriptFieldOptions(scriptFields: Field[]) {
+ return scriptFields.map(f => ({
+ label: f.id,
+ }));
+}
+
+export function createMlcategoryFieldOption(categorizationFieldName: string | null) {
+ if (categorizationFieldName === null) {
+ return [];
+ }
+ return [
+ {
+ label: MLCATEGORY,
+ },
+ ];
+}
+
function getDetectorsAdvanced(job: Job, datafeed: Datafeed) {
return processFieldlessAggs(job.analysis_config.detectors);
}
@@ -146,33 +213,29 @@ export function isSparseDataJob(job: Job, datafeed: Datafeed): boolean {
function stashCombinedJob(
jobCreator: JobCreatorType,
skipTimeRangeStep: boolean = false,
- advanced: boolean = false,
includeTimeRange: boolean = false
) {
const combinedJob = {
...jobCreator.jobConfig,
datafeed_config: jobCreator.datafeedConfig,
};
- if (advanced === true) {
- mlJobService.currentJob = combinedJob;
- } else {
- mlJobService.tempJobCloningObjects.job = combinedJob;
- // skip over the time picker step of the wizard
- mlJobService.tempJobCloningObjects.skipTimeRangeStep = skipTimeRangeStep;
+ mlJobService.tempJobCloningObjects.job = combinedJob;
- if (includeTimeRange === true) {
- // auto select the start and end dates of the time picker
- mlJobService.tempJobCloningObjects.start = jobCreator.start;
- mlJobService.tempJobCloningObjects.end = jobCreator.end;
- }
+ // skip over the time picker step of the wizard
+ mlJobService.tempJobCloningObjects.skipTimeRangeStep = skipTimeRangeStep;
+
+ if (includeTimeRange === true) {
+ // auto select the start and end dates of the time picker
+ mlJobService.tempJobCloningObjects.start = jobCreator.start;
+ mlJobService.tempJobCloningObjects.end = jobCreator.end;
}
}
export function convertToMultiMetricJob(jobCreator: JobCreatorType) {
jobCreator.createdBy = CREATED_BY_LABEL.MULTI_METRIC;
jobCreator.modelPlot = false;
- stashCombinedJob(jobCreator, true, false, true);
+ stashCombinedJob(jobCreator, true, true);
window.location.href = window.location.href.replace(
JOB_TYPE.SINGLE_METRIC,
@@ -182,7 +245,7 @@ export function convertToMultiMetricJob(jobCreator: JobCreatorType) {
export function convertToAdvancedJob(jobCreator: JobCreatorType) {
jobCreator.createdBy = null;
- stashCombinedJob(jobCreator, true, false, false);
+ stashCombinedJob(jobCreator, true, true);
let jobType = JOB_TYPE.SINGLE_METRIC;
if (isMultiMetricJobCreator(jobCreator)) {
@@ -196,13 +259,13 @@ export function convertToAdvancedJob(jobCreator: JobCreatorType) {
export function resetJob(jobCreator: JobCreatorType) {
jobCreator.jobId = '';
- stashCombinedJob(jobCreator, true, false, true);
+ stashCombinedJob(jobCreator, true, true);
window.location.href = '#/jobs/new_job';
}
export function advancedStartDatafeed(jobCreator: JobCreatorType) {
- stashCombinedJob(jobCreator, false, true, false);
+ stashCombinedJob(jobCreator, false, false);
window.location.href = '#/jobs';
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/common/json_editor_flyout/json_editor_flyout.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/common/json_editor_flyout/json_editor_flyout.tsx
index 8a14a92f8684..cf26d6f532d0 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/common/json_editor_flyout/json_editor_flyout.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/common/json_editor_flyout/json_editor_flyout.tsx
@@ -18,7 +18,7 @@ import {
EuiFlyoutBody,
EuiSpacer,
} from '@elastic/eui';
-import { Job, Datafeed } from '../../../../common/job_creator/configs';
+import { Datafeed } from '../../../../common/job_creator/configs';
import { MLJobEditor } from '../../../../../jobs_list/components/ml_job_editor';
import { isValidJson } from '../../../../../../../common/util/validation_utils';
import { JobCreatorContext } from '../../job_creator_context';
@@ -52,26 +52,32 @@ export const JsonEditorFlyout: FC = ({ isDisabled, jobEditorMode, datafee
const editJsonMode =
jobEditorMode === EDITOR_MODE.HIDDEN || datafeedEditorMode === EDITOR_MODE.HIDDEN;
const flyOutSize = editJsonMode ? 'm' : 'l';
+ const readOnlyMode =
+ jobEditorMode === EDITOR_MODE.READONLY && datafeedEditorMode === EDITOR_MODE.READONLY;
function toggleJsonFlyout() {
setSaveable(false);
setShowJsonFlyout(!showJsonFlyout);
}
- function updateSavable(json: string, originalConfig: Job | Datafeed) {
+ function onJobChange(json: string) {
+ setJobConfigString(json);
const valid = isValidJson(json);
setSaveable(valid);
}
- function onJobChange(json: string) {
- setJobConfigString(json);
-
- updateSavable(json, jobCreator.jobConfig);
- }
function onDatafeedChange(json: string) {
setDatafeedConfigString(json);
-
- updateSavable(json, jobCreator.datafeedConfig);
+ let valid = isValidJson(json);
+ if (valid) {
+ // ensure that the user hasn't altered the indices list in the json.
+ const { indices }: Datafeed = JSON.parse(json);
+ const originalIndices = jobCreator.indices.sort();
+ valid =
+ originalIndices.length === indices.length &&
+ originalIndices.every((value, index) => value === indices[index]);
+ }
+ setSaveable(valid);
}
function onSave() {
@@ -130,14 +136,16 @@ export const JsonEditorFlyout: FC = ({ isDisabled, jobEditorMode, datafee
/>
-
-
-
-
-
+ {readOnlyMode === false && (
+
+
+
+
+
+ )}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/datafeed_step/components/time_field/time_field_select.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/datafeed_step/components/time_field/time_field_select.tsx
index 26508e13e715..d81ceca56731 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/datafeed_step/components/time_field/time_field_select.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/datafeed_step/components/time_field/time_field_select.tsx
@@ -9,6 +9,7 @@ import { EuiComboBox, EuiComboBoxOptionProps } from '@elastic/eui';
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../../common/types/fields';
import { ES_FIELD_TYPES } from '../../../../../../../../../../../../src/plugins/data/public';
+import { createFieldOptions } from '../../../../../common/job_creator/util/general';
interface Props {
fields: Field[];
@@ -17,18 +18,15 @@ interface Props {
}
export const TimeFieldSelect: FC = ({ fields, changeHandler, selectedField }) => {
- const options: EuiComboBoxOptionProps[] = fields
- .filter(f => f.id !== EVENT_RATE_FIELD_ID && f.type === ES_FIELD_TYPES.DATE)
- .map(f => ({
- label: f.name,
- }))
- .sort((a, b) => a.label.localeCompare(b.label));
+ const options: EuiComboBoxOptionProps[] = createFieldOptions(
+ fields,
+ f => f.id !== EVENT_RATE_FIELD_ID && f.type === ES_FIELD_TYPES.DATE
+ );
- const selection: EuiComboBoxOptionProps[] = [
- {
- label: selectedField !== null ? selectedField : '',
- },
- ];
+ const selection: EuiComboBoxOptionProps[] = [];
+ if (selectedField !== null) {
+ selection.push({ label: selectedField });
+ }
function onChange(selectedOptions: EuiComboBoxOptionProps[]) {
const option = selectedOptions[0];
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_detector_modal/advanced_detector_modal.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_detector_modal/advanced_detector_modal.tsx
index 142de85e9756..6ddfdb22feda 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_detector_modal/advanced_detector_modal.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_detector_modal/advanced_detector_modal.tsx
@@ -15,16 +15,20 @@ import {
EuiTextArea,
} from '@elastic/eui';
import { JobCreatorContext } from '../../../job_creator_context';
-import { AdvancedJobCreator, JobCreatorType } from '../../../../../common/job_creator';
+import { AdvancedJobCreator } from '../../../../../common/job_creator';
+import {
+ createFieldOptions,
+ createScriptFieldOptions,
+ createMlcategoryFieldOption,
+} from '../../../../../common/job_creator/util/general';
import {
Field,
Aggregation,
EVENT_RATE_FIELD_ID,
+ mlCategory,
} from '../../../../../../../../common/types/fields';
import { RichDetector } from '../../../../../common/job_creator/advanced_job_creator';
-import { ES_FIELD_TYPES } from '../../../../../../../../../../../../src/plugins/data/public';
import { ModalWrapper } from './modal_wrapper';
-import { MLCATEGORY } from '../../../../../../../../common/constants/field_types';
import { detectorToString } from '../../../../../../../util/string_utils';
import { createBasicDetector } from '../../../../../common/job_creator/util/default_configs';
@@ -55,13 +59,6 @@ const emptyOption: EuiComboBoxOptionProps = {
label: '',
};
-const mlCategory: Field = {
- id: MLCATEGORY,
- name: MLCATEGORY,
- type: ES_FIELD_TYPES.KEYWORD,
- aggregatable: false,
-};
-
const excludeFrequentOptions: EuiComboBoxOptionProps[] = [{ label: 'all' }, { label: 'none' }];
export const AdvancedDetectorModal: FC = ({
@@ -91,19 +88,28 @@ export const AdvancedDetectorModal: FC = ({
const [fieldOptionEnabled, setFieldOptionEnabled] = useState(true);
const { descriptionPlaceholder, setDescriptionPlaceholder } = useDetectorPlaceholder(detector);
- // list of aggregation combobox options. filtering out any aggs with no fields.
+ const usingScriptFields = jobCreator.scriptFields.length > 0;
+ // list of aggregation combobox options.
+
const aggOptions: EuiComboBoxOptionProps[] = aggs
- .filter(a => a.fields !== undefined && a.fields.length)
+ .filter(agg => filterAggs(agg, usingScriptFields))
.map(createAggOption);
// fields available for the selected agg
- const { currentFieldOptions, setCurrentFieldOptions } = useCurrentFieldOptions(detector.agg);
+ const { currentFieldOptions, setCurrentFieldOptions } = useCurrentFieldOptions(
+ detector.agg,
+ jobCreator.scriptFields
+ );
- const allFieldOptions: EuiComboBoxOptionProps[] = fields
- .filter(f => f.id !== EVENT_RATE_FIELD_ID)
- .map(createFieldOption);
+ const allFieldOptions: EuiComboBoxOptionProps[] = [
+ ...createFieldOptions(fields),
+ ...createScriptFieldOptions(jobCreator.scriptFields),
+ ].sort(comboBoxOptionsSort);
- const splitFieldOptions = [...allFieldOptions, ...createMlcategoryField(jobCreator)];
+ const splitFieldOptions: EuiComboBoxOptionProps[] = [
+ ...allFieldOptions,
+ ...createMlcategoryFieldOption(jobCreator.categorizationFieldName),
+ ].sort(comboBoxOptionsSort);
const eventRateField = fields.find(f => f.id === EVENT_RATE_FIELD_ID);
@@ -120,7 +126,9 @@ export const AdvancedDetectorModal: FC = ({
if (title === mlCategory.id) {
return mlCategory;
}
- return fields.find(a => a.id === title) || null;
+ return (
+ fields.find(f => f.id === title) || jobCreator.scriptFields.find(f => f.id === title) || null
+ );
}
useEffect(() => {
@@ -155,6 +163,7 @@ export const AdvancedDetectorModal: FC = ({
partitionField,
excludeFrequent: excludeFrequentOption.label !== '' ? excludeFrequentOption.label : null,
description: descriptionOption !== '' ? descriptionOption : null,
+ customRules: null,
};
setDetector(dtr);
setDescriptionPlaceholder(dtr);
@@ -305,6 +314,13 @@ function createAggOption(agg: Aggregation | null): EuiComboBoxOptionProps {
};
}
+// get list of aggregations, filtering out any aggs with no fields,
+// unless script fields are being used, in which case list all fields, as it's not possible
+// to determine the type of a script field and so all aggs should be available.
+function filterAggs(agg: Aggregation, usingScriptFields: boolean) {
+ return agg.fields !== undefined && (usingScriptFields || agg.fields.length);
+}
+
function createFieldOption(field: Field | null): EuiComboBoxOptionProps {
if (field === null) {
return emptyOption;
@@ -330,17 +346,6 @@ function isFieldlessAgg(agg: Aggregation) {
return agg.fields && agg.fields.length === 1 && agg.fields[0].id === EVENT_RATE_FIELD_ID;
}
-function createMlcategoryField(jobCreator: JobCreatorType): EuiComboBoxOptionProps[] {
- if (jobCreator.categorizationFieldName === null) {
- return [];
- }
- return [
- {
- label: MLCATEGORY,
- },
- ];
-}
-
function useDetectorPlaceholder(detector: RichDetector) {
const [descriptionPlaceholder, setDescriptionPlaceholderString] = useState(
createDefaultDescription(detector)
@@ -354,22 +359,21 @@ function useDetectorPlaceholder(detector: RichDetector) {
}
// creates list of combobox options based on an aggregation's field list
-function createFieldOptionList(agg: Aggregation | null) {
- return (agg !== null && agg.fields !== undefined ? agg.fields : [])
- .filter(f => f.id !== EVENT_RATE_FIELD_ID)
- .map(createFieldOption);
+function createFieldOptionsFromAgg(agg: Aggregation | null) {
+ return createFieldOptions(agg !== null && agg.fields !== undefined ? agg.fields : []);
}
// custom hook for storing combobox options based on an aggregation field list
-function useCurrentFieldOptions(aggregation: Aggregation | null) {
+function useCurrentFieldOptions(aggregation: Aggregation | null, scriptFields: Field[]) {
const [currentFieldOptions, setCurrentFieldOptions] = useState(
- createFieldOptionList(aggregation)
+ createFieldOptionsFromAgg(aggregation)
);
+ const scriptFieldOptions = createScriptFieldOptions(scriptFields);
return {
currentFieldOptions,
setCurrentFieldOptions: (agg: Aggregation | null) =>
- setCurrentFieldOptions(createFieldOptionList(agg)),
+ setCurrentFieldOptions([...createFieldOptionsFromAgg(agg), ...scriptFieldOptions]),
};
}
@@ -394,3 +398,7 @@ function createSelectedOptions(
): EuiComboBoxOptionProps[] {
return options.length === 1 && options[0].label !== option.label ? [] : [option];
}
+
+function comboBoxOptionsSort(a: EuiComboBoxOptionProps, b: EuiComboBoxOptionProps) {
+ return a.label.localeCompare(b.label);
+}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_view/metric_selection.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_view/metric_selection.tsx
index a57858515b95..cb3dbb59f894 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_view/metric_selection.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/advanced_view/metric_selection.tsx
@@ -27,6 +27,7 @@ const emptyRichDetector: RichDetector = {
partitionField: null,
excludeFrequent: null,
description: null,
+ customRules: null,
};
export const AdvancedDetectors: FC = ({ setIsValid }) => {
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/agg_select/agg_select.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/agg_select/agg_select.tsx
index d205691fcb64..bda29b244a5b 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/agg_select/agg_select.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/agg_select/agg_select.tsx
@@ -82,6 +82,6 @@ export const AggSelect: FC = ({ fields, changeHandler, selectedOptions, r
);
};
-export function createLabel(pair: AggFieldPair | null): string {
- return pair === null ? '' : `${pair.agg.title}(${pair.field.name})`;
+export function createLabel(pair: AggFieldPair): string {
+ return `${pair.agg.title}(${pair.field.name})`;
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/categorization_field/categorization_field_select.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/categorization_field/categorization_field_select.tsx
index 226ce20c72da..9d9972a0b533 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/categorization_field/categorization_field_select.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/categorization_field/categorization_field_select.tsx
@@ -4,11 +4,16 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React, { FC } from 'react';
+import React, { FC, useContext } from 'react';
import { EuiComboBox, EuiComboBoxOptionProps } from '@elastic/eui';
+import { JobCreatorContext } from '../../../job_creator_context';
import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../../common/types/fields';
import { ES_FIELD_TYPES } from '../../../../../../../../../../../../src/plugins/data/public';
+import {
+ createFieldOptions,
+ createScriptFieldOptions,
+} from '../../../../../common/job_creator/util/general';
interface Props {
fields: Field[];
@@ -17,19 +22,22 @@ interface Props {
}
export const CategorizationFieldSelect: FC = ({ fields, changeHandler, selectedField }) => {
- const options: EuiComboBoxOptionProps[] = fields
- .filter(f => f.id !== EVENT_RATE_FIELD_ID && f.type === ES_FIELD_TYPES.KEYWORD)
- .map(f => ({
- label: f.name,
- }))
- .sort((a, b) => a.label.localeCompare(b.label));
-
- const selection: EuiComboBoxOptionProps[] = [
- {
- label: selectedField !== null ? selectedField : '',
- },
+ const { jobCreator } = useContext(JobCreatorContext);
+ const options: EuiComboBoxOptionProps[] = [
+ ...createFieldOptions(
+ fields,
+ f =>
+ f.id !== EVENT_RATE_FIELD_ID &&
+ (f.type === ES_FIELD_TYPES.KEYWORD || f.type === ES_FIELD_TYPES.TEXT)
+ ),
+ ...createScriptFieldOptions(jobCreator.scriptFields),
];
+ const selection: EuiComboBoxOptionProps[] = [];
+ if (selectedField !== null) {
+ selection.push({ label: selectedField });
+ }
+
function onChange(selectedOptions: EuiComboBoxOptionProps[]) {
const option = selectedOptions[0];
if (typeof option !== 'undefined') {
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/influencers/influencers_select.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/influencers/influencers_select.tsx
index b1f9c6dbcf55..293202415ced 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/influencers/influencers_select.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/influencers/influencers_select.tsx
@@ -8,8 +8,12 @@ import React, { FC, useContext } from 'react';
import { EuiComboBox, EuiComboBoxOptionProps } from '@elastic/eui';
import { JobCreatorContext } from '../../../job_creator_context';
-import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../../common/types/fields';
-import { MLCATEGORY } from '../../../../../../../../common/constants/field_types';
+import { Field } from '../../../../../../../../common/types/fields';
+import {
+ createFieldOptions,
+ createScriptFieldOptions,
+ createMlcategoryFieldOption,
+} from '../../../../../common/job_creator/util/general';
interface Props {
fields: Field[];
@@ -19,18 +23,11 @@ interface Props {
export const InfluencersSelect: FC = ({ fields, changeHandler, selectedInfluencers }) => {
const { jobCreator } = useContext(JobCreatorContext);
- const options: EuiComboBoxOptionProps[] = fields
- .filter(f => f.id !== EVENT_RATE_FIELD_ID)
- .map(f => ({
- label: f.name,
- }))
- .sort((a, b) => a.label.localeCompare(b.label));
-
- if (jobCreator.categorizationFieldName !== null) {
- options.push({
- label: MLCATEGORY,
- });
- }
+ const options: EuiComboBoxOptionProps[] = [
+ ...createFieldOptions(fields),
+ ...createScriptFieldOptions(jobCreator.scriptFields),
+ ...createMlcategoryFieldOption(jobCreator.categorizationFieldName),
+ ];
const selection: EuiComboBoxOptionProps[] = selectedInfluencers.map(i => ({ label: i }));
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/multi_metric_view/metric_selection.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/multi_metric_view/metric_selection.tsx
index f913b5a5720d..b0a5049924cb 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/multi_metric_view/metric_selection.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/multi_metric_view/metric_selection.tsx
@@ -33,7 +33,7 @@ export const MultiMetricDetectors: FC = ({ setIsValid }) => {
const jobCreator = jc as MultiMetricJobCreator;
const { fields } = newJobCapsService;
- const [selectedOptions, setSelectedOptions] = useState([{ label: '' }]);
+ const [selectedOptions, setSelectedOptions] = useState([]);
const [aggFieldPairList, setAggFieldPairList] = useState(
jobCreator.aggFieldPairs
);
@@ -57,7 +57,7 @@ export const MultiMetricDetectors: FC = ({ setIsValid }) => {
if (typeof option !== 'undefined') {
const newPair = { agg: option.agg, field: option.field };
setAggFieldPairList([...aggFieldPairList, newPair]);
- setSelectedOptions([{ label: '' }]);
+ setSelectedOptions([]);
} else {
setAggFieldPairList([]);
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/population_view/metric_selection.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/population_view/metric_selection.tsx
index 87d3e87d6553..9a24381c9e35 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/population_view/metric_selection.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/population_view/metric_selection.tsx
@@ -36,7 +36,7 @@ export const PopulationDetectors: FC = ({ setIsValid }) => {
const jobCreator = jc as PopulationJobCreator;
const { fields } = newJobCapsService;
- const [selectedOptions, setSelectedOptions] = useState([{ label: '' }]);
+ const [selectedOptions, setSelectedOptions] = useState([]);
const [aggFieldPairList, setAggFieldPairList] = useState(
jobCreator.aggFieldPairs
);
@@ -62,7 +62,7 @@ export const PopulationDetectors: FC = ({ setIsValid }) => {
if (typeof option !== 'undefined') {
const newPair = { agg: option.agg, field: option.field, by: { field: null, value: null } };
setAggFieldPairList([...aggFieldPairList, newPair]);
- setSelectedOptions([{ label: '' }]);
+ setSelectedOptions([]);
} else {
setAggFieldPairList([]);
}
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/single_metric_view/metric_selection.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/single_metric_view/metric_selection.tsx
index 45872faae4c0..19ccca44dc0a 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/single_metric_view/metric_selection.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/single_metric_view/metric_selection.tsx
@@ -32,9 +32,9 @@ export const SingleMetricDetectors: FC = ({ setIsValid }) => {
const jobCreator = jc as SingleMetricJobCreator;
const { fields } = newJobCapsService;
- const [selectedOptions, setSelectedOptions] = useState([
- { label: createLabel(jobCreator.aggFieldPair) },
- ]);
+ const [selectedOptions, setSelectedOptions] = useState(
+ jobCreator.aggFieldPair !== null ? [{ label: createLabel(jobCreator.aggFieldPair) }] : []
+ );
const [aggFieldPair, setAggFieldPair] = useState(jobCreator.aggFieldPair);
const [lineChartsData, setLineChartData] = useState({});
const [loadingData, setLoadingData] = useState(false);
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/summary_count_field/summary_count_field_select.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/summary_count_field/summary_count_field_select.tsx
index d22d2ee11180..2f240344e0ea 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/summary_count_field/summary_count_field_select.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/components/pick_fields_step/components/summary_count_field/summary_count_field_select.tsx
@@ -4,10 +4,15 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React, { FC } from 'react';
+import React, { FC, useContext } from 'react';
import { EuiComboBox, EuiComboBoxOptionProps } from '@elastic/eui';
-import { Field, EVENT_RATE_FIELD_ID } from '../../../../../../../../common/types/fields';
+import { JobCreatorContext } from '../../../job_creator_context';
+import { Field } from '../../../../../../../../common/types/fields';
+import {
+ createFieldOptions,
+ createScriptFieldOptions,
+} from '../../../../../common/job_creator/util/general';
interface Props {
fields: Field[];
@@ -16,19 +21,17 @@ interface Props {
}
export const SummaryCountFieldSelect: FC = ({ fields, changeHandler, selectedField }) => {
- const options: EuiComboBoxOptionProps[] = fields
- .filter(f => f.id !== EVENT_RATE_FIELD_ID)
- .map(f => ({
- label: f.name,
- }))
- .sort((a, b) => a.label.localeCompare(b.label));
-
- const selection: EuiComboBoxOptionProps[] = [
- {
- label: selectedField !== null ? selectedField : '',
- },
+ const { jobCreator } = useContext(JobCreatorContext);
+ const options: EuiComboBoxOptionProps[] = [
+ ...createFieldOptions(fields),
+ ...createScriptFieldOptions(jobCreator.scriptFields),
];
+ const selection: EuiComboBoxOptionProps[] = [];
+ if (selectedField !== null) {
+ selection.push({ label: selectedField });
+ }
+
function onChange(selectedOptions: EuiComboBoxOptionProps[]) {
const option = selectedOptions[0];
if (typeof option !== 'undefined') {
diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/new_job/page.tsx b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/new_job/page.tsx
index 017fdf901ef9..682ed97020a7 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/new_job/page.tsx
+++ b/x-pack/legacy/plugins/ml/public/jobs/new_job_new/pages/new_job/page.tsx
@@ -52,6 +52,8 @@ export const Page: FC = ({ existingJobsAndGroups, jobType }) => {
? WIZARD_STEPS.ADVANCED_CONFIGURE_DATAFEED
: WIZARD_STEPS.TIME_RANGE;
+ let autoSetTimeRange = false;
+
if (mlJobService.tempJobCloningObjects.job !== undefined) {
// cloning a job
const clonedJob = mlJobService.cloneJob(mlJobService.tempJobCloningObjects.job);
@@ -79,6 +81,10 @@ export const Page: FC = ({ existingJobsAndGroups, jobType }) => {
);
mlJobService.tempJobCloningObjects.start = undefined;
mlJobService.tempJobCloningObjects.end = undefined;
+ } else {
+ // if not start and end times are set and this is an advanced job,
+ // auto set the time range based on the index
+ autoSetTimeRange = isAdvancedJobCreator(jobCreator);
}
} else {
// creating a new job
@@ -99,19 +105,22 @@ export const Page: FC = ({ existingJobsAndGroups, jobType }) => {
jobCreator.createdBy = null;
}
- if (isAdvancedJobCreator(jobCreator)) {
- // for advanced jobs, load the full time range start and end times
- // so they can be used for job validation and bucket span estimation
- try {
- jobCreator.autoSetTimeRange();
- } catch (error) {
- toastNotifications.addDanger({
- title: i18n.translate('xpack.ml.newJob.wizard.autoSetJobCreatorTimeRange.error', {
- defaultMessage: `Error retrieving beginning and end times of index`,
- }),
- text: error,
- });
- }
+ // auto set the time range if creating a new advanced job
+ autoSetTimeRange = isAdvancedJobCreator(jobCreator);
+ }
+
+ if (autoSetTimeRange && isAdvancedJobCreator(jobCreator)) {
+ // for advanced jobs, load the full time range start and end times
+ // so they can be used for job validation and bucket span estimation
+ try {
+ jobCreator.autoSetTimeRange();
+ } catch (error) {
+ toastNotifications.addDanger({
+ title: i18n.translate('xpack.ml.newJob.wizard.autoSetJobCreatorTimeRange.error', {
+ defaultMessage: `Error retrieving beginning and end times of index`,
+ }),
+ text: error,
+ });
}
}
diff --git a/x-pack/legacy/plugins/ml/public/services/__mocks__/cloudwatch_job_caps_response.json b/x-pack/legacy/plugins/ml/public/services/__mocks__/cloudwatch_job_caps_response.json
new file mode 100644
index 000000000000..783b2d4e081b
--- /dev/null
+++ b/x-pack/legacy/plugins/ml/public/services/__mocks__/cloudwatch_job_caps_response.json
@@ -0,0 +1,905 @@
+{
+ "cloudwatch-*": {
+ "aggs": [
+ {
+ "id": "count",
+ "title": "Count",
+ "kibanaName": "count",
+ "dslName": "count",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "high_count",
+ "title": "High count",
+ "kibanaName": "count",
+ "dslName": "count",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "low_count",
+ "title": "Low count",
+ "kibanaName": "count",
+ "dslName": "count",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "mean",
+ "title": "Mean",
+ "kibanaName": "avg",
+ "dslName": "avg",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "avg",
+ "min": "avg"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_mean",
+ "title": "High mean",
+ "kibanaName": "avg",
+ "dslName": "avg",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "avg",
+ "min": "avg"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_mean",
+ "title": "Low mean",
+ "kibanaName": "avg",
+ "dslName": "avg",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "avg",
+ "min": "avg"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "sum",
+ "title": "Sum",
+ "kibanaName": "sum",
+ "dslName": "sum",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "sum",
+ "min": "sum"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_sum",
+ "title": "High sum",
+ "kibanaName": "sum",
+ "dslName": "sum",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "sum",
+ "min": "sum"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_sum",
+ "title": "Low sum",
+ "kibanaName": "sum",
+ "dslName": "sum",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "sum",
+ "min": "sum"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "median",
+ "title": "Median",
+ "kibanaName": "median",
+ "dslName": "percentiles",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_median",
+ "title": "High median",
+ "kibanaName": "median",
+ "dslName": "percentiles",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_median",
+ "title": "Low median",
+ "kibanaName": "median",
+ "dslName": "percentiles",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "min",
+ "title": "Min",
+ "kibanaName": "min",
+ "dslName": "min",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "min",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "max",
+ "title": "Max",
+ "kibanaName": "max",
+ "dslName": "max",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "max"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "distinct_count",
+ "title": "Distinct count",
+ "kibanaName": "cardinality",
+ "dslName": "cardinality",
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "instance",
+ "region",
+ "sourcetype.keyword",
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "non_zero_count",
+ "title": "Non zero count",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "high_non_zero_count",
+ "title": "High non zero count",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "low_non_zero_count",
+ "title": "Low non zero count",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "high_distinct_count",
+ "title": "High distinct count",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "instance",
+ "region",
+ "sourcetype.keyword",
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_distinct_count",
+ "title": "Low distinct count",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "instance",
+ "region",
+ "sourcetype.keyword",
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "metric",
+ "title": "Metric",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "varp",
+ "title": "varp",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_varp",
+ "title": "High varp",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_varp",
+ "title": "Low varp",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "non_null_sum",
+ "title": "Non null sum",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_non_null_sum",
+ "title": "High non null sum",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_non_null_sum",
+ "title": "Low non null sum",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "rare",
+ "title": "Rare",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "freq_rare",
+ "title": "Freq rare",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "info_content",
+ "title": "Info content",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "high_info_content",
+ "title": "High info content",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "low_info_content",
+ "title": "Low info content",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ },
+ {
+ "id": "time_of_day",
+ "title": "Time of day",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "time_of_week",
+ "title": "Time of week",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ }
+ },
+ {
+ "id": "lat_long",
+ "title": "Lat long",
+ "kibanaName": null,
+ "dslName": null,
+ "type": "metrics",
+ "mlModelPlotAgg": {
+ "max": "max",
+ "min": "min"
+ },
+ "fieldIds": [
+ "CPUUtilization",
+ "DiskReadBytes",
+ "DiskReadOps",
+ "DiskWriteBytes",
+ "DiskWriteOps",
+ "NetworkIn",
+ "NetworkOut"
+ ]
+ }
+ ],
+ "fields": [
+ {
+ "id": "@timestamp",
+ "name": "@timestamp",
+ "type": "date",
+ "aggregatable": true,
+ "aggIds": []
+ },
+ {
+ "id": "CPUUtilization",
+ "name": "CPUUtilization",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "DiskReadBytes",
+ "name": "DiskReadBytes",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "DiskReadOps",
+ "name": "DiskReadOps",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "DiskWriteBytes",
+ "name": "DiskWriteBytes",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "DiskWriteOps",
+ "name": "DiskWriteOps",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "instance",
+ "name": "instance",
+ "type": "keyword",
+ "aggregatable": true,
+ "aggIds": [
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count"
+ ]
+ },
+ {
+ "id": "NetworkIn",
+ "name": "NetworkIn",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "NetworkOut",
+ "name": "NetworkOut",
+ "type": "double",
+ "aggregatable": true,
+ "aggIds": [
+ "mean",
+ "high_mean",
+ "low_mean",
+ "sum",
+ "high_sum",
+ "low_sum",
+ "median",
+ "high_median",
+ "low_median",
+ "min",
+ "max",
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count",
+ "metric",
+ "varp",
+ "high_varp",
+ "low_varp",
+ "non_null_sum",
+ "high_non_null_sum",
+ "low_non_null_sum",
+ "info_content",
+ "high_info_content",
+ "low_info_content",
+ "lat_long"
+ ]
+ },
+ {
+ "id": "region",
+ "name": "region",
+ "type": "keyword",
+ "aggregatable": true,
+ "aggIds": [
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count"
+ ]
+ },
+ {
+ "id": "sourcetype",
+ "name": "sourcetype",
+ "type": "text",
+ "aggregatable": false,
+ "aggIds": []
+ },
+ {
+ "id": "sourcetype.keyword",
+ "name": "sourcetype.keyword",
+ "type": "keyword",
+ "aggregatable": true,
+ "aggIds": [
+ "distinct_count",
+ "high_distinct_count",
+ "low_distinct_count"
+ ]
+ }
+ ]
+ }
+}
diff --git a/x-pack/legacy/plugins/ml/public/services/__mocks__/farequote_job_caps_response.json b/x-pack/legacy/plugins/ml/public/services/__mocks__/farequote_job_caps_response.json
deleted file mode 100644
index cff91d90e8ff..000000000000
--- a/x-pack/legacy/plugins/ml/public/services/__mocks__/farequote_job_caps_response.json
+++ /dev/null
@@ -1,528 +0,0 @@
-{
- "farequote-*": {
- "aggs": [
- {
- "id": "count",
- "title": "Count",
- "kibanaName": "count",
- "dslName": "count",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "high_count",
- "title": "High count",
- "kibanaName": "count",
- "dslName": "count",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "low_count",
- "title": "Low count",
- "kibanaName": "count",
- "dslName": "count",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "mean",
- "title": "Mean",
- "kibanaName": "avg",
- "dslName": "avg",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "avg",
- "min": "avg"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_mean",
- "title": "High mean",
- "kibanaName": "avg",
- "dslName": "avg",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "avg",
- "min": "avg"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_mean",
- "title": "Low mean",
- "kibanaName": "avg",
- "dslName": "avg",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "avg",
- "min": "avg"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "sum",
- "title": "Sum",
- "kibanaName": "sum",
- "dslName": "sum",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "sum",
- "min": "sum"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_sum",
- "title": "High sum",
- "kibanaName": "sum",
- "dslName": "sum",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "sum",
- "min": "sum"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_sum",
- "title": "Low sum",
- "kibanaName": "sum",
- "dslName": "sum",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "sum",
- "min": "sum"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "median",
- "title": "Median",
- "kibanaName": "median",
- "dslName": "percentiles",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_median",
- "title": "High median",
- "kibanaName": "median",
- "dslName": "percentiles",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_median",
- "title": "Low median",
- "kibanaName": "median",
- "dslName": "percentiles",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "min",
- "title": "Min",
- "kibanaName": "min",
- "dslName": "min",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "min",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "max",
- "title": "Max",
- "kibanaName": "max",
- "dslName": "max",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "max"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "distinct_count",
- "title": "Distinct count",
- "kibanaName": "cardinality",
- "dslName": "cardinality",
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "airline",
- "responsetime"
- ]
- },
- {
- "id": "non_zero_count",
- "title": "Non zero count",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "high_non_zero_count",
- "title": "High non zero count",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "low_non_zero_count",
- "title": "Low non zero count",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "high_distinct_count",
- "title": "High distinct count",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_distinct_count",
- "title": "Low distinct count",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "metric",
- "title": "Metric",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "varp",
- "title": "varp",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_varp",
- "title": "High varp",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_varp",
- "title": "Low varp",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "non_null_sum",
- "title": "Non null sum",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_non_null_sum",
- "title": "High non null sum",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_non_null_sum",
- "title": "Low non null sum",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "rare",
- "title": "Rare",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "freq_rare",
- "title": "Freq rare",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "info_content",
- "title": "Info content",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "high_info_content",
- "title": "High info content",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "low_info_content",
- "title": "Low info content",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- },
- {
- "id": "time_of_day",
- "title": "Time of day",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "time_of_week",
- "title": "Time of week",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": []
- },
- {
- "id": "lat_long",
- "title": "Lat long",
- "kibanaName": null,
- "dslName": null,
- "type": "metrics",
- "mlModelPlotAgg": {
- "max": "max",
- "min": "min"
- },
- "fieldIds": [
- "responsetime"
- ]
- }
- ],
- "fields": [
- {
- "id": "@timestamp",
- "name": "@timestamp",
- "type": "date",
- "aggregatable": true,
- "aggIds": []
- },
- {
- "id": "airline",
- "name": "airline",
- "type": "keyword",
- "aggregatable": true,
- "aggIds": [
- "distinct_count"
- ]
- },
- {
- "id": "responsetime",
- "name": "responsetime",
- "type": "float",
- "aggregatable": true,
- "aggIds": [
- "mean",
- "high_mean",
- "low_mean",
- "sum",
- "high_sum",
- "low_sum",
- "median",
- "high_median",
- "low_median",
- "min",
- "max",
- "distinct_count",
- "high_distinct_count",
- "low_distinct_count",
- "metric",
- "varp",
- "high_varp",
- "low_varp",
- "non_null_sum",
- "high_non_null_sum",
- "low_non_null_sum",
- "info_content",
- "high_info_content",
- "low_info_content",
- "lat_long"
- ]
- }
- ]
- }
-}
diff --git a/x-pack/legacy/plugins/ml/public/services/field_format_service.js b/x-pack/legacy/plugins/ml/public/services/field_format_service.js
index ddcf15606963..4d99ec3fe48d 100644
--- a/x-pack/legacy/plugins/ml/public/services/field_format_service.js
+++ b/x-pack/legacy/plugins/ml/public/services/field_format_service.js
@@ -79,8 +79,11 @@ class FieldFormatService {
// e.g. distinct_count(clientip) should be formatted as a count, not as an IP address.
let fieldFormat = undefined;
if (esAggName !== 'cardinality') {
- const indexPatternFields = _.get(fullIndexPattern, 'fields', []);
- fieldFormat = _.get(indexPatternFields, [fieldName, 'format']);
+ const fieldList = _.get(fullIndexPattern, 'fields', []);
+ const field = fieldList.getByName(fieldName);
+ if (field !== undefined) {
+ fieldFormat = field.format;
+ }
}
return fieldFormat;
@@ -99,13 +102,16 @@ class FieldFormatService {
getIndexPatternById(indexPatternId)
.then((indexPatternData) => {
// Store the FieldFormat for each job by detector_index.
- const fieldsByName = _.get(indexPatternData, 'fields', []);
+ const fieldList = _.get(indexPatternData, 'fields', []);
_.each(detectors, (dtr) => {
const esAgg = mlFunctionToESAggregation(dtr.function);
// distinct_count detectors should fall back to the default
// formatter as the values are just counts.
if (dtr.field_name !== undefined && esAgg !== 'cardinality') {
- formatsByDetector[dtr.detector_index] = _.get(fieldsByName, [dtr.field_name, 'format']);
+ const field = fieldList.getByName(dtr.field_name);
+ if (field !== undefined) {
+ formatsByDetector[dtr.detector_index] = field.format;
+ }
}
});
diff --git a/x-pack/legacy/plugins/ml/public/services/job_service.d.ts b/x-pack/legacy/plugins/ml/public/services/job_service.d.ts
index d00c4c35225a..383932c81221 100644
--- a/x-pack/legacy/plugins/ml/public/services/job_service.d.ts
+++ b/x-pack/legacy/plugins/ml/public/services/job_service.d.ts
@@ -13,7 +13,6 @@ export interface ExistingJobsAndGroups {
}
declare interface JobService {
- currentJob: any;
createResultsUrlForJobs: (jobs: any[], target: string) => string;
tempJobCloningObjects: {
job: any;
diff --git a/x-pack/legacy/plugins/ml/public/services/job_service.js b/x-pack/legacy/plugins/ml/public/services/job_service.js
index 3d5f04fd627a..27dcd0135ad7 100644
--- a/x-pack/legacy/plugins/ml/public/services/job_service.js
+++ b/x-pack/legacy/plugins/ml/public/services/job_service.js
@@ -24,13 +24,11 @@ let datafeedIds = {};
class JobService {
constructor() {
- // currentJob -> used to pass a job object between the job management page and
+ // tempJobCloningObjects -> used to pass a job object between the job management page and
// and the advanced wizard.
// if populated when loading the advanced wizard, the job is used for cloning.
// if populated when loading the job management page, the start datafeed modal
// is automatically opened.
- this.currentJob = undefined;
-
this.tempJobCloningObjects = {
job: undefined,
skipTimeRangeStep: false,
diff --git a/x-pack/legacy/plugins/ml/public/services/new_job_capabilities._service.test.ts b/x-pack/legacy/plugins/ml/public/services/new_job_capabilities._service.test.ts
index fc8bb2407f75..91c945ea8ff2 100644
--- a/x-pack/legacy/plugins/ml/public/services/new_job_capabilities._service.test.ts
+++ b/x-pack/legacy/plugins/ml/public/services/new_job_capabilities._service.test.ts
@@ -9,40 +9,60 @@ import { IndexPattern } from 'ui/index_patterns';
// there is magic happening here. starting the include name with `mock..`
// ensures it can be lazily loaded by the jest.mock function below.
-import mockFarequoteResponse from './__mocks__/farequote_job_caps_response.json';
+import mockCloudwatchResponse from './__mocks__/cloudwatch_job_caps_response.json';
jest.mock('./ml_api_service', () => ({
ml: {
jobs: {
- newJobCaps: jest.fn(() => Promise.resolve(mockFarequoteResponse)),
+ newJobCaps: jest.fn(() => Promise.resolve(mockCloudwatchResponse)),
},
},
}));
const indexPattern = ({
- id: 'farequote-*',
- title: 'farequote-*',
+ id: 'cloudwatch-*',
+ title: 'cloudwatch-*',
} as unknown) as IndexPattern;
describe('new_job_capabilities_service', () => {
- describe('farequote newJobCaps()', () => {
+ describe('cloudwatch newJobCaps()', () => {
it('can construct job caps objects from endpoint json', async done => {
await newJobCapsService.initializeFromIndexPattern(indexPattern);
const { fields, aggs } = await newJobCapsService.newJobCaps;
- const responseTimeField = fields.find(f => f.id === 'responsetime') || { aggs: [] };
- const airlineField = fields.find(f => f.id === 'airline') || { aggs: [] };
+ const networkOutField = fields.find(f => f.id === 'NetworkOut') || { aggs: [] };
+ const regionField = fields.find(f => f.id === 'region') || { aggs: [] };
const meanAgg = aggs.find(a => a.id === 'mean') || { fields: [] };
const distinctCountAgg = aggs.find(a => a.id === 'distinct_count') || { fields: [] };
- expect(fields).toHaveLength(4);
+ expect(fields).toHaveLength(12);
expect(aggs).toHaveLength(35);
- expect(responseTimeField.aggs).toHaveLength(25);
- expect(airlineField.aggs).toHaveLength(1);
+ expect(networkOutField.aggs).toHaveLength(25);
+ expect(regionField.aggs).toHaveLength(3);
+
+ expect(meanAgg.fields).toHaveLength(7);
+ expect(distinctCountAgg.fields).toHaveLength(10);
+ done();
+ });
+
+ it('job caps including text fields', async done => {
+ await newJobCapsService.initializeFromIndexPattern(indexPattern, true, false);
+ const { fields, aggs } = await newJobCapsService.newJobCaps;
+
+ expect(fields).toHaveLength(13); // one more field
+ expect(aggs).toHaveLength(35);
+
+ done();
+ });
+
+ it('job caps excluding event rate', async done => {
+ await newJobCapsService.initializeFromIndexPattern(indexPattern, false, true);
+ const { fields, aggs } = await newJobCapsService.newJobCaps;
+
+ expect(fields).toHaveLength(11); // one less field
+ expect(aggs).toHaveLength(35);
- expect(meanAgg.fields).toHaveLength(1);
- expect(distinctCountAgg.fields).toHaveLength(2);
done();
});
});
diff --git a/x-pack/legacy/plugins/ml/public/services/new_job_capabilities_service.ts b/x-pack/legacy/plugins/ml/public/services/new_job_capabilities_service.ts
index 890683793339..f404d23618ce 100644
--- a/x-pack/legacy/plugins/ml/public/services/new_job_capabilities_service.ts
+++ b/x-pack/legacy/plugins/ml/public/services/new_job_capabilities_service.ts
@@ -50,15 +50,10 @@ export function loadNewJobCapabilities(
const categoryFieldTypes = [ES_FIELD_TYPES.TEXT, ES_FIELD_TYPES.KEYWORD, ES_FIELD_TYPES.IP];
class NewJobCapsService {
- private _fields: Field[];
- private _aggs: Aggregation[];
- private _includeEventRateField: boolean;
-
- constructor(includeEventRateField = true) {
- this._fields = [];
- this._aggs = [];
- this._includeEventRateField = includeEventRateField;
- }
+ private _fields: Field[] = [];
+ private _aggs: Aggregation[] = [];
+ private _includeEventRateField: boolean = true;
+ private _removeTextFields: boolean = true;
public get fields(): Field[] {
return this._fields;
@@ -79,8 +74,15 @@ class NewJobCapsService {
return this._fields.filter(f => categoryFieldTypes.includes(f.type));
}
- public async initializeFromIndexPattern(indexPattern: IndexPattern) {
+ public async initializeFromIndexPattern(
+ indexPattern: IndexPattern,
+ includeEventRateField = true,
+ removeTextFields = true
+ ) {
try {
+ this._includeEventRateField = includeEventRateField;
+ this._removeTextFields = removeTextFields;
+
const resp = await ml.jobs.newJobCaps(indexPattern.title, indexPattern.type === 'rollup');
const { fields, aggs } = createObjects(resp, indexPattern.title);
@@ -88,7 +90,10 @@ class NewJobCapsService {
addEventRateField(aggs, fields);
}
- this._fields = fields;
+ // remove any text fields which have a keyword equivalents
+ const processedFields = this._removeTextFields ? processTextFields(fields) : fields;
+
+ this._fields = processedFields;
this._aggs = aggs;
} catch (error) {
console.error('Unable to load new job capabilities', error); // eslint-disable-line no-console
@@ -199,4 +204,14 @@ function addEventRateField(aggs: Aggregation[], fields: Field[]) {
fields.splice(0, 0, eventRateField);
}
+// remove fields which are text and have a keyword equivalent
+function processTextFields(fields: Field[]) {
+ const keywordIds = fields.filter(f => f.type === ES_FIELD_TYPES.KEYWORD).map(f => f.id);
+ return fields.filter(
+ f =>
+ f.type !== ES_FIELD_TYPES.TEXT ||
+ (f.type === ES_FIELD_TYPES.TEXT && keywordIds.includes(`${f.id}.keyword`) === false)
+ );
+}
+
export const newJobCapsService = new NewJobCapsService();
diff --git a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/_timeseriesexplorer.scss b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/_timeseriesexplorer.scss
index aa172cf000d5..0dd32ceabdb0 100644
--- a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/_timeseriesexplorer.scss
+++ b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/_timeseriesexplorer.scss
@@ -26,6 +26,10 @@
}
}
+ .single-metric-request-callout {
+ margin: 0 $euiSize;
+ }
+
.results-container {
padding: $euiSize;
diff --git a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/components/entity_control/entity_control.js b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/components/entity_control/entity_control.js
index 0e82002904d5..7fb741096e32 100644
--- a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/components/entity_control/entity_control.js
+++ b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/components/entity_control/entity_control.js
@@ -6,12 +6,13 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { injectI18n } from '@kbn/i18n/react';
+import { FormattedMessage, injectI18n } from '@kbn/i18n/react';
import {
EuiComboBox,
EuiFlexItem,
EuiFormRow,
+ EuiToolTip,
} from '@elastic/eui';
function getEntityControlOptions(entity) {
@@ -29,6 +30,7 @@ export const EntityControl = injectI18n(
static propTypes = {
entity: PropTypes.object.isRequired,
entityFieldValueChanged: PropTypes.func.isRequired,
+ forceSelection: PropTypes.bool.isRequired,
};
state = {
@@ -40,7 +42,7 @@ export const EntityControl = injectI18n(
}
componentDidUpdate() {
- const { entity } = this.props;
+ const { entity, forceSelection } = this.props;
const { selectedOptions } = this.state;
const fieldValue = entity.fieldValue;
@@ -57,6 +59,10 @@ export const EntityControl = injectI18n(
selectedOptions: undefined
});
}
+
+ if (forceSelection && this.inputRef) {
+ this.inputRef.focus();
+ }
}
onChange = (selectedOptions) => {
@@ -70,25 +76,45 @@ export const EntityControl = injectI18n(
};
render() {
- const { entity, intl } = this.props;
+ const { entity, intl, forceSelection } = this.props;
const { selectedOptions } = this.state;
const options = getEntityControlOptions(entity);
+ const control = ( {
+ if (input) {
+ this.inputRef = input;
+ }
+ }}
+ style={{ minWidth: '300px' }}
+ placeholder={intl.formatMessage({
+ id: 'xpack.ml.timeSeriesExplorer.enterValuePlaceholder',
+ defaultMessage: 'Enter value'
+ })}
+ singleSelection={{ asPlainText: true }}
+ options={options}
+ selectedOptions={selectedOptions}
+ onChange={this.onChange}
+ isClearable={false}
+ />);
+
+ const selectMessage = ( );
+
return (
-
-
+
+ {control}
+
);
diff --git a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/timeseriesexplorer.js b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/timeseriesexplorer.js
index d335baa3a56d..802772e55078 100644
--- a/x-pack/legacy/plugins/ml/public/timeseriesexplorer/timeseriesexplorer.js
+++ b/x-pack/legacy/plugins/ml/public/timeseriesexplorer/timeseriesexplorer.js
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
import React, { createRef, Fragment } from 'react';
import { i18n } from '@kbn/i18n';
+import { FormattedMessage } from '@kbn/i18n/react';
import {
EuiCheckbox,
@@ -26,6 +27,7 @@ import {
EuiSelect,
EuiSpacer,
EuiText,
+ EuiCallOut,
} from '@elastic/eui';
import chrome from 'ui/chrome';
@@ -161,6 +163,8 @@ export class TimeSeriesExplorer extends React.Component {
subscriptions = new Subscription();
+ _criteriaFields = null;
+
constructor(props) {
super(props);
const { jobSelectService, unsubscribeFromGlobalState } = jobSelectServiceFactory(props.globalState);
@@ -216,17 +220,36 @@ export class TimeSeriesExplorer extends React.Component {
tableFilter = (field, value, operator) => {
const { entities } = this.state;
+ const entity = entities.find(({ fieldName }) => fieldName === field);
- const entity = find(entities, { fieldName: field });
- if (entity !== undefined) {
- if (operator === '+' && entity.fieldValue !== value) {
- entity.fieldValue = value;
- this.saveSeriesPropertiesAndRefresh();
- } else if (operator === '-' && entity.fieldValue === value) {
- entity.fieldValue = '';
- this.saveSeriesPropertiesAndRefresh();
- }
+ if (entity === undefined) {
+ return;
+ }
+
+ const { appStateHandler } = this.props;
+
+ let resultValue = '';
+ if (operator === '+' && entity.fieldValue !== value) {
+ resultValue = value;
+ } else if (operator === '-' && entity.fieldValue === value) {
+ resultValue = '';
+ } else {
+ return;
}
+
+ const resultEntities = {
+ ...entities.reduce((appStateEntities, appStateEntity) => {
+ appStateEntities[appStateEntity.fieldName] = appStateEntity.fieldValue;
+ return appStateEntities;
+ }, {}),
+ [entity.fieldName]: resultValue,
+ };
+
+ appStateHandler(APP_STATE_ACTION.SET_ENTITIES, resultEntities);
+
+ this.updateControlsForDetector(() => {
+ this.refresh();
+ });
}
contextChartSelectedInitCallDone = false;
@@ -296,7 +319,6 @@ export class TimeSeriesExplorer extends React.Component {
const searchBounds = getBoundsRoundedToInterval(bounds, focusAggregationInterval, false);
const {
- criteriaFields,
detectorId,
entities,
modelPlotEnabled,
@@ -310,7 +332,7 @@ export class TimeSeriesExplorer extends React.Component {
});
getFocusData(
- criteriaFields,
+ this._criteriaFields,
+detectorId,
focusAggregationInterval,
appStateHandler(APP_STATE_ACTION.GET_FORECAST_ID),
@@ -357,11 +379,11 @@ export class TimeSeriesExplorer extends React.Component {
loadAnomaliesTableData = (earliestMs, latestMs) => {
const { dateFormatTz } = this.props;
- const { criteriaFields, selectedJob } = this.state;
+ const { selectedJob } = this.state;
ml.results.getAnomaliesTableData(
[selectedJob.job_id],
- criteriaFields,
+ this._criteriaFields,
[],
interval$.getValue().val,
severity$.getValue().val,
@@ -430,16 +452,17 @@ export class TimeSeriesExplorer extends React.Component {
this.setState({
entities: entities.map((entity) => {
- if (firstRec.partition_field_name === entity.fieldName) {
- entity.fieldValues = chain(resp.records).pluck('partition_field_value').uniq().value();
+ const newEntity = { ...entity };
+ if (firstRec.partition_field_name === newEntity.fieldName) {
+ newEntity.fieldValues = chain(resp.records).pluck('partition_field_value').uniq().value();
}
- if (firstRec.over_field_name === entity.fieldName) {
- entity.fieldValues = chain(resp.records).pluck('over_field_value').uniq().value();
+ if (firstRec.over_field_name === newEntity.fieldName) {
+ newEntity.fieldValues = chain(resp.records).pluck('over_field_value').uniq().value();
}
- if (firstRec.by_field_name === entity.fieldName) {
- entity.fieldValues = chain(resp.records).pluck('by_field_value').uniq().value();
+ if (firstRec.by_field_name === newEntity.fieldName) {
+ newEntity.fieldValues = chain(resp.records).pluck('by_field_value').uniq().value();
}
- return entity;
+ return newEntity;
})
}, callback);
}
@@ -582,12 +605,7 @@ export class TimeSeriesExplorer extends React.Component {
}
};
- // Only filter on the entity if the field has a value.
const nonBlankEntities = filter(currentEntities, (entity) => { return entity.fieldValue.length > 0; });
- stateUpdate.criteriaFields = [{
- 'fieldName': 'detector_index',
- 'fieldValue': +currentDetectorId }
- ].concat(nonBlankEntities);
if (modelPlotEnabled === false &&
isSourceDataChartableForDetector(selectedJob, detectorIndex) === false &&
@@ -641,7 +659,7 @@ export class TimeSeriesExplorer extends React.Component {
// across full time range for use in the swimlane.
mlResultsService.getRecordMaxScoreByTime(
selectedJob.job_id,
- stateUpdate.criteriaFields,
+ this._criteriaFields,
searchBounds.min.valueOf(),
searchBounds.max.valueOf(),
stateUpdate.contextAggregationInterval.expression
@@ -698,6 +716,10 @@ export class TimeSeriesExplorer extends React.Component {
});
}
+ /**
+ * Updates local state of detector related controls from the global state.
+ * @param callback to invoke after a state update.
+ */
updateControlsForDetector = (callback = () => {}) => {
const { appStateHandler } = this.props;
const { detectorId, selectedJob } = this.state;
@@ -729,7 +751,26 @@ export class TimeSeriesExplorer extends React.Component {
entities.push({ fieldName: byFieldName, fieldValue: byFieldValue });
}
+ this.updateCriteriaFields(detectorIndex, entities);
+
this.setState({ entities }, callback);
+ };
+
+ /**
+ * Updates criteria fields for API calls, e.g. getAnomaliesTableData
+ * @param detectorIndex
+ * @param entities
+ */
+ updateCriteriaFields(detectorIndex, entities) {
+ // Only filter on the entity if the field has a value.
+ const nonBlankEntities = filter(entities, (entity) => { return entity.fieldValue.length > 0; });
+ this._criteriaFields = [
+ {
+ fieldName: 'detector_index',
+ fieldValue: detectorIndex
+ },
+ ...nonBlankEntities
+ ];
}
loadForJobId(jobId, jobs) {
@@ -988,6 +1029,11 @@ export class TimeSeriesExplorer extends React.Component {
zoomToFocusLoaded,
} = this.state;
+ const fieldNamesWithEmptyValues = entities
+ .filter(({ fieldValue }) => !fieldValue)
+ .map(({ fieldName }) => fieldName);
+ const arePartitioningFieldsProvided = fieldNamesWithEmptyValues.length === 0;
+
const chartProps = {
modelPlotEnabled,
contextChartData,
@@ -1050,9 +1096,32 @@ export class TimeSeriesExplorer extends React.Component {
this.previousShowForecast = showForecast;
this.previousShowModelBounds = showModelBounds;
+ /**
+ * Indicates if any of the previous controls is empty.
+ * @type {boolean}
+ */
+ let hasEmptyFieldValues = false;
+
return (
-
+
+ {fieldNamesWithEmptyValues.length > 0 && }
+ color="warning"
+ iconType="help"
+ size="s"
+ />}
+
@@ -1070,14 +1139,18 @@ export class TimeSeriesExplorer extends React.Component {
{entities.map((entity) => {
const entityKey = `${entity.fieldName}`;
+ const forceSelection = !hasEmptyFieldValues && !entity.fieldValue;
+ hasEmptyFieldValues = !hasEmptyFieldValues && forceSelection;
return (
);
})}
+ {arePartitioningFieldsProvided &&
-
+ }
@@ -1100,12 +1173,14 @@ export class TimeSeriesExplorer extends React.Component {
/>
)}
- {(jobs.length > 0 && loading === false && hasResults === false) && (
+ {(arePartitioningFieldsProvided && jobs.length > 0 && loading === false && hasResults === false) && (
)}
- {(jobs.length > 0 && loading === false && hasResults === true) && (
+ {(arePartitioningFieldsProvided && jobs.length > 0 && loading === false && hasResults === true) && (
+
+
{i18n.translate('xpack.ml.timeSeriesExplorer.singleTimeSeriesAnalysisTitle', {
defaultMessage: 'Single time series analysis of {functionLabel}',
diff --git a/x-pack/legacy/plugins/ml/public/util/custom_url_utils.test.ts b/x-pack/legacy/plugins/ml/public/util/custom_url_utils.test.ts
index 6eb33d92a85f..d4556f085f4b 100644
--- a/x-pack/legacy/plugins/ml/public/util/custom_url_utils.test.ts
+++ b/x-pack/legacy/plugins/ml/public/util/custom_url_utils.test.ts
@@ -269,6 +269,43 @@ describe('ML - custom URL utils', () => {
); // eslint-disable-line max-len
});
+ test('replaces tokens with nesting', () => {
+ const testUrlApache: KibanaUrlConfig = {
+ url_name: 'Raw data',
+ time_range: 'auto',
+ url_value:
+ 'kibana#/dashboard/ml_http_access_explorer_ecs?_g=(time:(from:\u0027$earliest$\u0027,mode:absolute,to:\u0027$latest$\u0027))&_a=(description:\u0027\u0027,filters:!((\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:event.dataset,negate:!f,params:(query:\u0027apache.access\u0027),type:phrase,value:\u0027apache.access\u0027),query:(match:(event.dataset:(query:\u0027apache.access\u0027,type:phrase)))),(\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:http.response.status_code,negate:!f,params:(query:\u0027$http.response.status_code$\u0027),type:phrase,value:\u0027$http.response.status_code$\u0027),query:(match:(http.response.status_code:(query:\u0027$http.response.status_code$\u0027,type:phrase))))),query:(language:kuery,query:\u0027\u0027))', // eslint-disable-line max-len
+ };
+
+ const testRecord = {
+ job_id: 'farequote',
+ result_type: 'record',
+ probability: 6.533287347648861e-45,
+ record_score: 93.84475,
+ initial_record_score: 94.867922946384,
+ bucket_span: 300,
+ detector_index: 0,
+ is_interim: false,
+ timestamp: 1486656600000,
+ function: 'mean',
+ function_description: 'mean',
+ typical: [99.2329899996025],
+ actual: [274.7279901504516],
+ field_name: 'responsetime',
+ earliest: '2017-02-09T15:10:00.000Z',
+ latest: '2017-02-09T17:15:00.000Z',
+ http: {
+ response: {
+ status_code: 403,
+ },
+ },
+ };
+
+ expect(getUrlForRecord(testUrlApache, testRecord)).toBe(
+ "kibana#/dashboard/ml_http_access_explorer_ecs?_g=(time:(from:'2017-02-09T15:10:00.000Z',mode:absolute,to:'2017-02-09T17:15:00.000Z'))&_a=(description:\u0027\u0027,filters:!((\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:event.dataset,negate:!f,params:(query:\u0027apache.access\u0027),type:phrase,value:\u0027apache.access\u0027),query:(match:(event.dataset:(query:\u0027apache.access\u0027,type:phrase)))),(\u0027$state\u0027:(store:appState),meta:(alias:!n,disabled:!f,index:\u0027INDEX_PATTERN_ID\u0027,key:http.response.status_code,negate:!f,params:(query:\u0027403\u0027),type:phrase,value:\u0027403\u0027),query:(match:(http.response.status_code:(query:\u0027403\u0027,type:phrase))))),query:(language:kuery,query:\u0027\u0027))"
+ ); // eslint-disable-line max-len
+ });
+
test('returns expected URL for other type URL', () => {
expect(getUrlForRecord(TEST_OTHER_URL, TEST_RECORD)).toBe(
'http://airlinecodes.info/airline-code-AAL'
diff --git a/x-pack/legacy/plugins/ml/public/util/custom_url_utils.ts b/x-pack/legacy/plugins/ml/public/util/custom_url_utils.ts
index 61c0f3a159f1..7fda7a88d318 100644
--- a/x-pack/legacy/plugins/ml/public/util/custom_url_utils.ts
+++ b/x-pack/legacy/plugins/ml/public/util/custom_url_utils.ts
@@ -103,8 +103,8 @@ function isKibanaUrl(urlConfig: UrlConfig) {
/**
* Escape any double quotes in the value for correct use in KQL.
*/
-function escapeForKQL(value: string): string {
- return value.replace(/\"/g, '\\"');
+function escapeForKQL(value: string | number): string {
+ return String(value).replace(/\"/g, '\\"');
}
// Builds a Kibana dashboard or Discover URL from the supplied config, with any
@@ -127,7 +127,7 @@ function buildKibanaUrl(urlConfig: UrlConfig, record: CustomUrlAnomalyRecordDoc)
);
const replaceSingleTokenValues = (str: string) =>
- str.replace(/\$(\w+)\$/g, (match, name: string) => {
+ str.replace(/\$([^?&$\'"]+)\$/g, (match, name: string) => {
// Use lodash get to allow nested JSON fields to be retrieved.
let tokenValue: string | string[] | undefined = get(record, name);
tokenValue = Array.isArray(tokenValue) ? tokenValue[0] : tokenValue;
diff --git a/x-pack/legacy/plugins/ml/public/util/index_utils.ts b/x-pack/legacy/plugins/ml/public/util/index_utils.ts
index 94d5b7f3b4c1..8a1cfda54a5f 100644
--- a/x-pack/legacy/plugins/ml/public/util/index_utils.ts
+++ b/x-pack/legacy/plugins/ml/public/util/index_utils.ts
@@ -70,7 +70,7 @@ export function loadCurrentIndexPattern(indexPatterns: IndexPatterns, $route: Re
return fullIndexPatterns.get($route.current.params.index);
}
-export function getIndexPatternById(id: string): IndexPattern {
+export function getIndexPatternById(id: string): Promise {
if (fullIndexPatterns !== null) {
return fullIndexPatterns.get(id);
} else {
diff --git a/x-pack/legacy/plugins/ml/public/util/string_utils.js b/x-pack/legacy/plugins/ml/public/util/string_utils.js
index 7d97f0b1d316..cb1ccafc5e60 100644
--- a/x-pack/legacy/plugins/ml/public/util/string_utils.js
+++ b/x-pack/legacy/plugins/ml/public/util/string_utils.js
@@ -20,7 +20,7 @@ import d3 from 'd3';
// 'http://www.google.co.uk/#q=airline+code+AAL'.
// If a corresponding key is not found in valuesByTokenName, then the String is not replaced.
export function replaceStringTokens(str, valuesByTokenName, encodeForURI) {
- return String(str).replace((/\$([^?&$\'"]{1,40})\$/g), (match, name) => {
+ return String(str).replace((/\$([^?&$\'"]+)\$/g), (match, name) => {
// Use lodash get to allow nested JSON fields to be retrieved.
let tokenValue = _.get(valuesByTokenName, name, null);
if (encodeForURI === true && tokenValue !== null) {
diff --git a/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/field_service.ts b/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/field_service.ts
index df4a2c059f1e..d7c26bda77d2 100644
--- a/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/field_service.ts
+++ b/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/field_service.ts
@@ -136,7 +136,8 @@ async function combineFieldsAndAggs(
const numericalFields = getNumericalFields(fields);
const ipFields = getIpFields(fields);
- const mix = mixFactory(rollupFields);
+ const isRollup = Object.keys(rollupFields).length > 0;
+ const mix = mixFactory(isRollup, rollupFields);
aggs.forEach(a => {
if (a.type === METRIC_AGG_TYPE && a.fields !== undefined) {
@@ -165,7 +166,7 @@ async function combineFieldsAndAggs(
return {
aggs,
- fields: filterFields(fields),
+ fields: isRollup ? filterFields(fields) : fields,
};
}
@@ -178,9 +179,7 @@ function filterFields(fields: Field[]): Field[] {
// returns a mix function that is used to cross-reference aggs and fields.
// wrapped in a provider to allow filtering based on rollup job capabilities
-function mixFactory(rollupFields: RollupFields) {
- const isRollup = Object.keys(rollupFields).length > 0;
-
+function mixFactory(isRollup: boolean, rollupFields: RollupFields) {
return function mix(field: Field, agg: Aggregation): void {
if (
isRollup === false ||
diff --git a/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts b/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts
index 87653a1e3f47..2c8f8a8f82fb 100644
--- a/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts
+++ b/x-pack/legacy/plugins/ml/server/models/job_service/new_job_caps/new_job_caps.test.ts
@@ -66,7 +66,9 @@ describe('job_service - job_caps', () => {
expect(response).toEqual(farequoteJobCapsEmpty);
done();
});
+ });
+ describe('cloudwatch newJobCaps()', () => {
it('can get rollup job caps for rollup index pattern', async done => {
const indexPattern = 'cloud_roll_index';
const isRollup = true;
diff --git a/x-pack/legacy/plugins/reporting/common/constants.ts b/x-pack/legacy/plugins/reporting/common/constants.ts
index 6f1f43fe11fe..723320e74bfb 100644
--- a/x-pack/legacy/plugins/reporting/common/constants.ts
+++ b/x-pack/legacy/plugins/reporting/common/constants.ts
@@ -6,6 +6,8 @@
export const PLUGIN_ID = 'reporting';
+export const BROWSER_TYPE = 'chromium';
+
export const JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY =
'xpack.reporting.jobCompletionNotifications';
diff --git a/x-pack/legacy/plugins/reporting/common/get_absolute_url.ts b/x-pack/legacy/plugins/reporting/common/get_absolute_url.ts
index 299cde58891d..79c5a274d8c7 100644
--- a/x-pack/legacy/plugins/reporting/common/get_absolute_url.ts
+++ b/x-pack/legacy/plugins/reporting/common/get_absolute_url.ts
@@ -5,12 +5,11 @@
*/
import url from 'url';
-// @ts-ignore
import { oncePerServer } from '../server/lib/once_per_server';
-import { ConfigObject, KbnServer } from '../types';
+import { ServerFacade } from '../types';
-function getAbsoluteUrlFn(server: KbnServer) {
- const config: ConfigObject = server.config();
+function getAbsoluteUrlFn(server: ServerFacade) {
+ const config = server.config();
return function getAbsoluteUrl({
basePath = config.get('server.basePath'),
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.ts b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.ts
index e933056c7944..887f4dbb11be 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.ts
@@ -5,14 +5,14 @@
*/
// @ts-ignore
import { cryptoFactory } from '../../../server/lib/crypto';
-import { CryptoFactory, JobDocPayload, KbnServer } from '../../../types';
+import { CryptoFactory, JobDocPayload, ServerFacade } from '../../../types';
export const decryptJobHeaders = async ({
job,
server,
}: {
job: JobDocPayload;
- server: KbnServer;
+ server: ServerFacade;
}) => {
const crypto: CryptoFactory = cryptoFactory(server);
const decryptedHeaders: string = await crypto.decrypt(job.headers);
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.ts b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.ts
index 04959712a117..9522d6c087a8 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.ts
@@ -3,7 +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 { ConditionalHeaders, ConfigObject, JobDocPayload, KbnServer } from '../../../types';
+import { ConditionalHeaders, JobDocPayload, ServerFacade } from '../../../types';
export const getConditionalHeaders = ({
job,
@@ -12,9 +12,9 @@ export const getConditionalHeaders = ({
}: {
job: JobDocPayload;
filteredHeaders: Record;
- server: KbnServer;
+ server: ServerFacade;
}) => {
- const config: ConfigObject = server.config();
+ const config = server.config();
const [hostname, port, basePath, protocol] = [
config.get('xpack.reporting.kibanaServer.hostname') || config.get('server.host'),
config.get('xpack.reporting.kibanaServer.port') || config.get('server.port'),
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts
index 00cdd0410fac..749ab3c50f1c 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts
@@ -5,7 +5,7 @@
*/
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../../common/constants';
-import { ConditionalHeaders, KbnServer } from '../../../types';
+import { ConditionalHeaders, ServerFacade } from '../../../types';
import { JobDocPayloadPDF } from '../../printable_pdf/types'; // Logo is PDF only
export const getCustomLogo = async ({
@@ -15,7 +15,7 @@ export const getCustomLogo = async ({
}: {
job: JobDocPayloadPDF;
conditionalHeaders: ConditionalHeaders;
- server: KbnServer;
+ server: ServerFacade;
}) => {
const serverBasePath: string = server.config().get('server.basePath');
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_full_urls.ts b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_full_urls.ts
index e1ca599b38d4..3b8285207342 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_full_urls.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_full_urls.ts
@@ -12,7 +12,7 @@ import {
} from 'url';
import { getAbsoluteUrlFactory } from '../../../common/get_absolute_url';
import { validateUrls } from '../../../common/validate_urls';
-import { KbnServer } from '../../../types';
+import { ServerFacade } from '../../../types';
import { JobDocPayloadPNG } from '../../png/types';
import { JobDocPayloadPDF } from '../../printable_pdf/types';
@@ -26,7 +26,7 @@ export async function getFullUrls({
...mergeValues // pass-throughs
}: {
job: JobDocPayloadPNG | JobDocPayloadPDF;
- server: KbnServer;
+ server: ServerFacade;
}) {
const getAbsoluteUrl = getAbsoluteUrlFactory(server);
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/omit_blacklisted_headers.ts b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/omit_blacklisted_headers.ts
index 44a9ed5a8ee5..a0aa4d973298 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/execute_job/omit_blacklisted_headers.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/execute_job/omit_blacklisted_headers.ts
@@ -5,7 +5,7 @@
*/
import { omit } from 'lodash';
import { KBN_SCREENSHOT_HEADER_BLACKLIST } from '../../../common/constants';
-import { JobDocPayload, KbnServer } from '../../../types';
+import { JobDocPayload, ServerFacade } from '../../../types';
export const omitBlacklistedHeaders = ({
job,
@@ -14,7 +14,7 @@ export const omitBlacklistedHeaders = ({
}: {
job: JobDocPayload;
decryptedHeaders: Record;
- server: KbnServer;
+ server: ServerFacade;
}) => {
const filteredHeaders: Record = omit(
decryptedHeaders,
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/layouts/create_layout.ts b/x-pack/legacy/plugins/reporting/export_types/common/layouts/create_layout.ts
index 17c540e80721..0cb83352d460 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/layouts/create_layout.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/layouts/create_layout.ts
@@ -3,13 +3,13 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import { KbnServer } from '../../../types';
+import { ServerFacade } from '../../../types';
import { LayoutTypes } from '../constants';
import { Layout, LayoutParams } from './layout';
import { PreserveLayout } from './preserve_layout';
import { PrintLayout } from './print_layout';
-export function createLayout(server: KbnServer, layoutParams?: LayoutParams): Layout {
+export function createLayout(server: ServerFacade, layoutParams?: LayoutParams): Layout {
if (layoutParams && layoutParams.id === LayoutTypes.PRESERVE_LAYOUT) {
return new PreserveLayout(layoutParams.dimensions);
}
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/layouts/print_layout.ts b/x-pack/legacy/plugins/reporting/export_types/common/layouts/print_layout.ts
index 9d672318000c..44361181e326 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/layouts/print_layout.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/layouts/print_layout.ts
@@ -7,7 +7,7 @@ import path from 'path';
import { EvaluateFn, SerializableOrJSHandle } from 'puppeteer';
import { LevelLogger } from '../../../server/lib';
import { HeadlessChromiumDriver } from '../../../server/browsers/chromium/driver';
-import { KbnServer } from '../../../types';
+import { ServerFacade } from '../../../types';
import { LayoutTypes } from '../constants';
import { getDefaultLayoutSelectors, Layout, LayoutSelectorDictionary, Size } from './layout';
import { CaptureConfig } from './types';
@@ -20,7 +20,7 @@ export class PrintLayout extends Layout {
public readonly groupCount = 2;
private captureConfig: CaptureConfig;
- constructor(server: KbnServer) {
+ constructor(server: ServerFacade) {
super(LayoutTypes.PRINT);
this.captureConfig = server.config().get('xpack.reporting.capture');
}
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts
index 9713adc76a5f..0c63def67bd0 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/index.ts
@@ -6,8 +6,7 @@
import * as Rx from 'rxjs';
import { first, mergeMap } from 'rxjs/operators';
-import { KbnServer } from '../../../../types';
-import { HeadlessChromiumDriverFactory } from '../../../../server/browsers/chromium/driver_factory';
+import { ServerFacade, CaptureConfig } from '../../../../types';
import { HeadlessChromiumDriver as HeadlessBrowser } from '../../../../server/browsers/chromium/driver';
import {
ElementsPositionAndAttribute,
@@ -29,14 +28,14 @@ import { skipTelemetry } from './skip_telemetry';
// NOTE: Typescript does not throw an error if this interface has errors!
interface ScreenshotResults {
- timeRange: TimeRange;
+ timeRang: TimeRange;
screenshots: Screenshot[];
}
-export function screenshotsObservableFactory(server: KbnServer) {
- const browserDriverFactory: HeadlessChromiumDriverFactory = server.plugins.reporting.browserDriverFactory; // prettier-ignore
+export function screenshotsObservableFactory(server: ServerFacade) {
const config = server.config();
- const captureConfig = config.get('xpack.reporting.capture');
+ const captureConfig: CaptureConfig = config.get('xpack.reporting.capture');
+ const { browserDriverFactory } = server.plugins.reporting!;
return function screenshotsObservable({
logger,
diff --git a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/wait_for_render.ts b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/wait_for_render.ts
index b49b52e18ded..df0d591ff913 100644
--- a/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/wait_for_render.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/common/lib/screenshots/wait_for_render.ts
@@ -4,12 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { CaptureConfig } from '../../../../types';
import { HeadlessChromiumDriver as HeadlessBrowser } from '../../../../server/browsers/chromium/driver';
import { LevelLogger } from '../../../../server/lib';
import { LayoutInstance } from '../../layouts/layout';
export const waitForRenderComplete = async (
- captureConfig: any,
+ captureConfig: CaptureConfig,
browser: HeadlessBrowser,
layout: LayoutInstance,
logger: LevelLogger
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv/server/create_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv/server/create_job.ts
index 952547790adb..b1713e1753ee 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv/server/create_job.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv/server/create_job.ts
@@ -4,19 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import { oncePerServer } from '../../../server/lib/once_per_server';
import { cryptoFactory } from '../../../server/lib/crypto';
-import { KbnServer, ConditionalHeaders, CreateJobFactory } from '../../../types';
+import { ConditionalHeaders, CreateJobFactory, ServerFacade, RequestFacade } from '../../../types';
import { JobParamsDiscoverCsv, ESQueueCreateJobFnDiscoverCsv } from '../types';
-function createJobFn(server: KbnServer) {
+function createJobFn(server: ServerFacade) {
const crypto = cryptoFactory(server);
return async function createJob(
jobParams: JobParamsDiscoverCsv,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) {
const serializedEncryptedHeaders = await crypto.encrypt(headers);
@@ -36,5 +35,5 @@ function createJobFn(server: KbnServer) {
}
export const createJobFactory: CreateJobFactory = oncePerServer(createJobFn as (
- server: KbnServer
+ server: ServerFacade
) => ESQueueCreateJobFnDiscoverCsv);
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv/types.d.ts b/x-pack/legacy/plugins/reporting/export_types/csv/types.d.ts
index 3906c2bb1449..09f32833915b 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv/types.d.ts
@@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
-import { JobDocPayload, JobParamPostPayload, ConditionalHeaders } from '../../types';
+import { JobDocPayload, JobParamPostPayload, ConditionalHeaders, RequestFacade } from '../../types';
export interface JobParamPostPayloadDiscoverCsv extends JobParamPostPayload {
state?: {
@@ -30,5 +29,5 @@ export interface JobDocPayloadDiscoverCsv extends JobDocPayload {
export type ESQueueCreateJobFnDiscoverCsv = (
jobParams: JobParamsDiscoverCsv,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) => Promise;
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts
index 07fdf42a1517..0bcfc6f1ca07 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts
@@ -5,12 +5,10 @@
*/
import { notFound, notImplemented } from 'boom';
-import { Request } from 'hapi';
import { get } from 'lodash';
-
import { PLUGIN_ID, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../../common/constants';
import { cryptoFactory, LevelLogger, oncePerServer } from '../../../../server/lib';
-import { KbnServer } from '../../../../types';
+import { ServerFacade, RequestFacade } from '../../../../types';
import {
SavedObject,
SavedObjectServiceError,
@@ -32,10 +30,10 @@ interface VisData {
type CreateJobFn = (
jobParams: JobParamsPanelCsv,
headers: any,
- req: Request
+ req: RequestFacade
) => Promise;
-function createJobFn(server: KbnServer): CreateJobFn {
+function createJobFn(server: ServerFacade): CreateJobFn {
const crypto = cryptoFactory(server);
const logger = LevelLogger.createForServer(server, [
PLUGIN_ID,
@@ -46,7 +44,7 @@ function createJobFn(server: KbnServer): CreateJobFn {
return async function createJob(
jobParams: JobParamsPanelCsv,
headers: any,
- req: Request
+ req: RequestFacade
): Promise {
const { savedObjectType, savedObjectId } = jobParams;
const serializedEncryptedHeaders = await crypto.encrypt(headers);
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts
index ece5217a5620..9d4bcf1e4b27 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts
@@ -4,11 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import { i18n } from '@kbn/i18n';
-
import { cryptoFactory, LevelLogger, oncePerServer } from '../../../server/lib';
-import { JobDocOutputExecuted, KbnServer, ExecuteImmediateJobFactory } from '../../../types';
+import {
+ JobDocOutputExecuted,
+ ServerFacade,
+ ExecuteImmediateJobFactory,
+ RequestFacade,
+} from '../../../types';
import {
CONTENT_TYPE_CSV,
CSV_FROM_SAVEDOBJECT_JOB_TYPE,
@@ -20,10 +23,10 @@ import { createGenerateCsv } from './lib';
type ExecuteJobFn = (
jobId: string | null,
job: JobDocPayloadPanelCsv,
- realRequest?: Request
+ realRequest?: RequestFacade
) => Promise;
-function executeJobFactoryFn(server: KbnServer): ExecuteJobFn {
+function executeJobFactoryFn(server: ServerFacade): ExecuteJobFn {
const crypto = cryptoFactory(server);
const logger = LevelLogger.createForServer(server, [
PLUGIN_ID,
@@ -34,7 +37,7 @@ function executeJobFactoryFn(server: KbnServer): ExecuteJobFn {
return async function executeJob(
jobId: string | null,
job: JobDocPayloadPanelCsv,
- realRequest?: Request
+ realRequest?: RequestFacade
): Promise {
// There will not be a jobID for "immediate" generation.
// jobID is only for "queued" jobs
@@ -46,7 +49,7 @@ function executeJobFactoryFn(server: KbnServer): ExecuteJobFn {
jobLogger.debug(`Execute job generating [${visType}] csv`);
- let requestObject: Request | FakeRequest;
+ let requestObject: RequestFacade | FakeRequest;
if (isImmediate && realRequest) {
jobLogger.info(`Executing job from immediate API`);
requestObject = realRequest;
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv.ts
index aafad4674a1b..6a4c6df5e1ac 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv.ts
@@ -5,16 +5,14 @@
*/
import { badRequest } from 'boom';
-import { Request } from 'hapi';
-import { KbnServer, Logger } from '../../../../types';
-import { SearchPanel, VisPanel, JobParamsPanelCsv } from '../../types';
-import { FakeRequest } from '../../types';
+import { ServerFacade, RequestFacade, Logger } from '../../../../types';
+import { SearchPanel, VisPanel, JobParamsPanelCsv, FakeRequest } from '../../types';
import { generateCsvSearch } from './generate_csv_search';
export function createGenerateCsv(logger: Logger) {
return async function generateCsv(
- request: Request | FakeRequest,
- server: KbnServer,
+ request: RequestFacade | FakeRequest,
+ server: ServerFacade,
visType: string,
panel: VisPanel | SearchPanel,
jobParams: JobParamsPanelCsv
@@ -27,7 +25,7 @@ export function createGenerateCsv(logger: Logger) {
switch (visType) {
case 'search':
return await generateCsvSearch(
- request as Request,
+ request as RequestFacade,
server,
logger,
panel as SearchPanel,
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts
index da2c184d2d6e..2e2c8635fca5 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/generate_csv_search.ts
@@ -4,15 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
-
import { buildEsQuery } from '@kbn/es-query';
// @ts-ignore no module definition
import { createGenerateCsv } from '../../../csv/server/lib/generate_csv';
-
import { CancellationToken } from '../../../../common/cancellation_token';
-
-import { KbnServer, Logger } from '../../../../types';
+import { ServerFacade, RequestFacade, Logger } from '../../../../types';
import {
IndexPatternSavedObject,
SavedSearchObjectAttributes,
@@ -50,8 +46,8 @@ const getUiSettings = async (config: any) => {
};
export async function generateCsvSearch(
- req: Request,
- server: KbnServer,
+ req: RequestFacade,
+ server: ServerFacade,
logger: Logger,
searchPanel: SearchPanel,
jobParams: JobParamsDiscoverCsv
@@ -140,7 +136,7 @@ export async function generateCsvSearch(
},
};
const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');
- const callCluster = (...params: any[]) => callWithRequest(req, ...params);
+ const callCluster = (...params: [string, object]) => callWithRequest(req, ...params);
const config = server.config();
const uiSettings = await getUiSettings(uiConfig);
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/get_job_params_from_request.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/get_job_params_from_request.ts
index 2041b1253ee5..774e430d593c 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/get_job_params_from_request.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/lib/get_job_params_from_request.ts
@@ -4,11 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
+import { RequestFacade } from '../../../../types';
import { JobParamsPostPayloadPanelCsv, JobParamsPanelCsv } from '../../types';
export function getJobParamsFromRequest(
- request: Request,
+ request: RequestFacade,
opts: { isImmediate: boolean }
): Partial {
const { savedObjectType, savedObjectId } = request.params;
diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/types.d.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/types.d.ts
index aa681210fc74..f8692c336b29 100644
--- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/types.d.ts
@@ -5,11 +5,11 @@
*/
import { CancellationToken } from '../../common/cancellation_token';
-import { JobParamPostPayload, JobDocPayload, KbnServer } from '../../types';
+import { JobParamPostPayload, JobDocPayload, ServerFacade } from '../../types';
export interface FakeRequest {
headers: any;
- server: KbnServer;
+ server: ServerFacade;
}
export interface JobParamsPostPayloadPanelCsv extends JobParamPostPayload {
diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/create_job/index.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/create_job/index.ts
index 2ee1e7a87435..4176a1351d65 100644
--- a/x-pack/legacy/plugins/reporting/export_types/png/server/create_job/index.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/png/server/create_job/index.ts
@@ -4,20 +4,24 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
-import { KbnServer, ConditionalHeaders, CreateJobFactory } from '../../../../types';
+import {
+ ServerFacade,
+ RequestFacade,
+ ConditionalHeaders,
+ CreateJobFactory,
+} from '../../../../types';
import { validateUrls } from '../../../../common/validate_urls';
import { cryptoFactory } from '../../../../server/lib/crypto';
import { oncePerServer } from '../../../../server/lib/once_per_server';
import { JobParamsPNG, ESQueueCreateJobFnPNG } from '../../types';
-function createJobFn(server: KbnServer) {
+function createJobFn(server: ServerFacade) {
const crypto = cryptoFactory(server);
return async function createJob(
{ objectType, title, relativeUrl, browserTimezone, layout }: JobParamsPNG,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) {
const serializedEncryptedHeaders = await crypto.encrypt(headers);
@@ -37,5 +41,5 @@ function createJobFn(server: KbnServer) {
}
export const createJobFactory: CreateJobFactory = oncePerServer(createJobFn as (
- server: KbnServer
+ server: ServerFacade
) => ESQueueCreateJobFnPNG);
diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts
index 3d09d2dae42a..5980f1884ab2 100644
--- a/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/png/server/lib/generate_png.ts
@@ -7,7 +7,7 @@
import * as Rx from 'rxjs';
import { toArray, mergeMap } from 'rxjs/operators';
import { LevelLogger } from '../../../../server/lib';
-import { KbnServer, ConditionalHeaders } from '../../../../types';
+import { ServerFacade, ConditionalHeaders } from '../../../../types';
import { oncePerServer } from '../../../../server/lib/once_per_server';
import { screenshotsObservableFactory } from '../../../common/lib/screenshots';
import { PreserveLayout } from '../../../common/layouts/preserve_layout';
@@ -21,7 +21,7 @@ interface UrlScreenshot {
screenshots: ScreenshotData[];
}
-function generatePngObservableFn(server: KbnServer) {
+function generatePngObservableFn(server: ServerFacade) {
const screenshotsObservable = screenshotsObservableFactory(server);
const captureConcurrency = 1;
diff --git a/x-pack/legacy/plugins/reporting/export_types/png/types.d.ts b/x-pack/legacy/plugins/reporting/export_types/png/types.d.ts
index f0590f98da36..c7ea2bdfba59 100644
--- a/x-pack/legacy/plugins/reporting/export_types/png/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/png/types.d.ts
@@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import { LayoutInstance } from '../common/layouts/layout';
-import { ConditionalHeaders, KbnServer, JobDocPayload } from '../../types';
+import { ConditionalHeaders, JobDocPayload, RequestFacade } from '../../types';
// Job params: structure of incoming user request data
export interface JobParamsPNG {
@@ -30,5 +29,5 @@ export interface JobDocPayloadPNG extends JobDocPayload {
export type ESQueueCreateJobFnPNG = (
jobParams: JobParamsPNG,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) => Promise;
diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts
index e57e18eff1b6..0d2243acfef9 100644
--- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.ts
@@ -8,7 +8,7 @@ import * as Rx from 'rxjs';
import { toArray, mergeMap } from 'rxjs/operators';
import { groupBy } from 'lodash';
import { LevelLogger } from '../../../../server/lib';
-import { KbnServer, ConditionalHeaders } from '../../../../types';
+import { ServerFacade, ConditionalHeaders } from '../../../../types';
// @ts-ignore untyped module
import { pdf } from './pdf';
import { oncePerServer } from '../../../../server/lib/once_per_server';
@@ -38,7 +38,7 @@ const getTimeRange = (urlScreenshots: UrlScreenshot[]) => {
return null;
};
-function generatePdfObservableFn(server: KbnServer) {
+function generatePdfObservableFn(server: ServerFacade) {
const screenshotsObservable = screenshotsObservableFactory(server);
const captureConcurrency = 1;
diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/types.d.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/types.d.ts
index a27b4aed4876..d1e5e58f0f0a 100644
--- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/types.d.ts
@@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import { LayoutInstance } from '../common/layouts/layout';
-import { ConditionalHeaders, KbnServer, JobDocPayload } from '../../types';
+import { ConditionalHeaders, JobDocPayload, ServerFacade, RequestFacade } from '../../types';
// Job params: structure of incoming user request data, after being parsed from RISON
export interface JobParamsPDF {
@@ -32,7 +31,7 @@ export interface JobDocPayloadPDF extends JobDocPayload {
export type ESQueueCreateJobFnPDF = (
jobParams: JobParamsPDF,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) => Promise;
-export type CreateJobFactoryPDF = (server: KbnServer) => ESQueueCreateJobFnPDF;
+export type CreateJobFactoryPDF = (server: ServerFacade) => ESQueueCreateJobFnPDF;
diff --git a/x-pack/legacy/plugins/reporting/index.js b/x-pack/legacy/plugins/reporting/index.js
index 95c792d9d517..1fe83124e2b4 100644
--- a/x-pack/legacy/plugins/reporting/index.js
+++ b/x-pack/legacy/plugins/reporting/index.js
@@ -5,7 +5,7 @@
*/
import { resolve } from 'path';
-import { PLUGIN_ID, UI_SETTINGS_CUSTOM_PDF_LOGO } from './common/constants';
+import { PLUGIN_ID, BROWSER_TYPE, UI_SETTINGS_CUSTOM_PDF_LOGO } from './common/constants';
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
import { registerRoutes } from './server/routes';
import {
@@ -16,13 +16,8 @@ import {
runValidations,
} from './server/lib';
import { config as appConfig } from './server/config/config';
-import {
- CHROMIUM,
- createBrowserDriverFactory,
- getDefaultChromiumSandboxDisabled,
-} from './server/browsers';
+import { createBrowserDriverFactory, getDefaultChromiumSandboxDisabled } from './server/browsers';
import { logConfiguration } from './log_configuration';
-
import { getReportingUsageCollector } from './server/usage';
import { i18n } from '@kbn/i18n';
@@ -116,7 +111,7 @@ export const reporting = (kibana) => {
settleTime: Joi.number().integer().default(1000), //deprecated
concurrency: Joi.number().integer().default(appConfig.concurrency), //deprecated
browser: Joi.object({
- type: Joi.any().valid(CHROMIUM).default(CHROMIUM),
+ type: Joi.any().valid(BROWSER_TYPE).default(BROWSER_TYPE),
autoDownload: Joi.boolean().when('$dist', {
is: true,
then: Joi.default(false),
@@ -182,22 +177,23 @@ export const reporting = (kibana) => {
}).default();
},
+ // TODO: Decouple Hapi: Build a server facade object based on the server to
+ // pass through to the libs. Do not pass server directly
init: async function (server) {
let isCollectorReady = false;
const isReady = () => isCollectorReady;
// Register a function with server to manage the collection of usage stats
server.usage.collectorSet.register(getReportingUsageCollector(server, isReady));
- const logger = LevelLogger.createForServer(server, [PLUGIN_ID], true);
+ const logger = LevelLogger.createForServer(server, [PLUGIN_ID]);
const [exportTypesRegistry, browserFactory] = await Promise.all([
exportTypesRegistryFactory(server),
createBrowserDriverFactory(server),
]);
server.expose('exportTypesRegistry', exportTypesRegistry);
- const config = server.config();
- logConfiguration(config, logger);
- runValidations(server, config, logger, browserFactory);
+ logConfiguration(server, logger);
+ runValidations(server, logger, browserFactory);
const { xpack_main: xpackMainPlugin } = server.plugins;
mirrorPluginStatus(xpackMainPlugin, this);
diff --git a/x-pack/legacy/plugins/reporting/log_configuration.js b/x-pack/legacy/plugins/reporting/log_configuration.js
index ef4dab2ee3be..94ff90f5944d 100644
--- a/x-pack/legacy/plugins/reporting/log_configuration.js
+++ b/x-pack/legacy/plugins/reporting/log_configuration.js
@@ -9,7 +9,9 @@ import { promisify } from 'util';
const getos = promisify(getosSync);
-export async function logConfiguration(config, logger) {
+export async function logConfiguration(server, logger) {
+ const config = server.config();
+
const browserType = config.get('xpack.reporting.capture.browser.type');
logger.debug(`Browser type: ${browserType}`);
diff --git a/x-pack/legacy/plugins/reporting/server/browsers/browsers.ts b/x-pack/legacy/plugins/reporting/reporting.d.ts
similarity index 62%
rename from x-pack/legacy/plugins/reporting/server/browsers/browsers.ts
rename to x-pack/legacy/plugins/reporting/reporting.d.ts
index ff9dece504ea..d4a7943f6d06 100644
--- a/x-pack/legacy/plugins/reporting/server/browsers/browsers.ts
+++ b/x-pack/legacy/plugins/reporting/reporting.d.ts
@@ -4,10 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import * as chromium from './chromium';
-
-export type BrowserType = keyof typeof BROWSERS_BY_TYPE;
-
-export const BROWSERS_BY_TYPE = {
- chromium,
-};
+export { ReportingPlugin } from './types';
diff --git a/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts b/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts
index de4312ea1bef..a253988b0195 100644
--- a/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts
+++ b/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts
@@ -4,44 +4,43 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { BROWSERS_BY_TYPE, BrowserType } from './browsers';
import { ensureBrowserDownloaded } from './download';
import { installBrowser } from './install';
import { LevelLogger } from '../lib/level_logger';
-import { KbnServer } from '../../types';
-import { PLUGIN_ID } from '../../common/constants';
+import { ServerFacade, CaptureConfig } from '../../types';
+import { PLUGIN_ID, BROWSER_TYPE } from '../../common/constants';
+import { chromium } from './index';
import { HeadlessChromiumDriverFactory } from './chromium/driver_factory';
export async function createBrowserDriverFactory(
- server: KbnServer
+ server: ServerFacade
): Promise {
const config = server.config();
const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'browser-driver']);
- const DATA_DIR = config.get('path.data');
- const CAPTURE_CONFIG = config.get('xpack.reporting.capture');
- const BROWSER_TYPE: BrowserType = CAPTURE_CONFIG.browser.type;
- const BROWSER_AUTO_DOWNLOAD = CAPTURE_CONFIG.browser.autoDownload;
- const BROWSER_CONFIG = CAPTURE_CONFIG.browser[BROWSER_TYPE];
- const NETWORK_POLICY = CAPTURE_CONFIG.networkPolicy;
- const REPORTING_TIMEOUT = config.get('xpack.reporting.queue.timeout');
+ const dataDir: string = config.get('path.data');
+ const captureConfig: CaptureConfig = config.get('xpack.reporting.capture');
+ const browserType = captureConfig.browser.type;
+ const browserAutoDownload = captureConfig.browser.autoDownload;
+ const browserConfig = captureConfig.browser[BROWSER_TYPE];
+ const networkPolicy = captureConfig.networkPolicy;
+ const reportingTimeout: number = config.get('xpack.reporting.queue.timeout');
- if (BROWSER_CONFIG.disableSandbox) {
+ if (browserConfig.disableSandbox) {
logger.warning(`Enabling the Chromium sandbox provides an additional layer of protection.`);
}
- if (BROWSER_AUTO_DOWNLOAD) {
- await ensureBrowserDownloaded(BROWSER_TYPE);
+ if (browserAutoDownload) {
+ await ensureBrowserDownloaded(browserType);
}
try {
- const browser = BROWSERS_BY_TYPE[BROWSER_TYPE]; // NOTE: unecessary indirection: this is always a Chromium browser object, as of PhantomJS removal
- const { binaryPath } = await installBrowser(logger, browser, DATA_DIR);
- return browser.createDriverFactory(
+ const { binaryPath } = await installBrowser(logger, chromium, dataDir);
+ return chromium.createDriverFactory(
binaryPath,
logger,
- BROWSER_CONFIG,
- REPORTING_TIMEOUT,
- NETWORK_POLICY
+ browserConfig,
+ reportingTimeout,
+ networkPolicy
);
} catch (error) {
if (error.cause && ['EACCES', 'EEXIST'].includes(error.cause.code)) {
diff --git a/x-pack/legacy/plugins/reporting/server/browsers/download/ensure_downloaded.ts b/x-pack/legacy/plugins/reporting/server/browsers/download/ensure_downloaded.ts
index d322566f9aa1..c79d2c263b2e 100644
--- a/x-pack/legacy/plugins/reporting/server/browsers/download/ensure_downloaded.ts
+++ b/x-pack/legacy/plugins/reporting/server/browsers/download/ensure_downloaded.ts
@@ -7,7 +7,8 @@
import { resolve as resolvePath } from 'path';
import { existsSync } from 'fs';
-import { BROWSERS_BY_TYPE, BrowserType } from '../browsers';
+import { chromium } from '../index';
+import { BrowserType } from '../types';
import { md5 } from './checksum';
import { asyncMap } from './util';
@@ -21,7 +22,7 @@ import { clean } from './clean';
* @return {Promise}
*/
export async function ensureBrowserDownloaded(browserType: BrowserType) {
- await ensureDownloaded([BROWSERS_BY_TYPE[browserType]]);
+ await ensureDownloaded([chromium]);
}
/**
@@ -29,7 +30,7 @@ export async function ensureBrowserDownloaded(browserType: BrowserType) {
* @return {Promise}
*/
export async function ensureAllBrowsersDownloaded() {
- await ensureDownloaded(Object.values(BROWSERS_BY_TYPE));
+ await ensureDownloaded([chromium]);
}
/**
diff --git a/x-pack/legacy/plugins/reporting/server/browsers/index.ts b/x-pack/legacy/plugins/reporting/server/browsers/index.ts
index 3f97a1368246..a5ecc405bf9c 100644
--- a/x-pack/legacy/plugins/reporting/server/browsers/index.ts
+++ b/x-pack/legacy/plugins/reporting/server/browsers/index.ts
@@ -3,8 +3,13 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+import * as chromiumDefinition from './chromium';
export { ensureAllBrowsersDownloaded } from './download';
export { createBrowserDriverFactory } from './create_browser_driver_factory';
export { getDefaultChromiumSandboxDisabled } from './default_chromium_sandbox_disabled';
-export { CHROMIUM } from './browser_types';
+
+export const chromium = {
+ paths: chromiumDefinition.paths,
+ createDriverFactory: chromiumDefinition.createDriverFactory,
+};
diff --git a/x-pack/legacy/plugins/reporting/server/browsers/browser_types.ts b/x-pack/legacy/plugins/reporting/server/browsers/types.d.ts
similarity index 86%
rename from x-pack/legacy/plugins/reporting/server/browsers/browser_types.ts
rename to x-pack/legacy/plugins/reporting/server/browsers/types.d.ts
index 0d67678c183a..43cbb0f13a5a 100644
--- a/x-pack/legacy/plugins/reporting/server/browsers/browser_types.ts
+++ b/x-pack/legacy/plugins/reporting/server/browsers/types.d.ts
@@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-export const CHROMIUM = 'chromium';
+export type BrowserType = 'chromium';
diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts
index 9519b7170d76..a7e81093c136 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts
@@ -5,7 +5,7 @@
*/
import { PLUGIN_ID } from '../../common/constants';
-import { KbnServer } from '../../types';
+import { ServerFacade, QueueConfig } from '../../types';
// @ts-ignore
import { Esqueue } from './esqueue';
import { createWorkerFactory } from './create_worker';
@@ -14,8 +14,8 @@ import { LevelLogger } from './level_logger';
// @ts-ignore
import { createTaggedLogger } from './create_tagged_logger'; // TODO remove createTaggedLogger once esqueue is removed
-function createQueueFn(server: KbnServer): Esqueue {
- const queueConfig = server.config().get('xpack.reporting.queue');
+function createQueueFn(server: ServerFacade): Esqueue {
+ const queueConfig: QueueConfig = server.config().get('xpack.reporting.queue');
const index = server.config().get('xpack.reporting.index');
const queueOptions = {
diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts b/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts
index 28997ce0a388..afad8f096a8b 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts
@@ -5,7 +5,7 @@
*/
import * as sinon from 'sinon';
-import { KbnServer } from '../../types';
+import { ServerFacade } from '../../types';
import { createWorkerFactory } from './create_worker';
// @ts-ignore
import { Esqueue } from './esqueue';
@@ -24,13 +24,13 @@ const executeJobFactoryStub = sinon.stub();
const getMockServer = (
exportTypes: any[] = [{ executeJobFactory: executeJobFactoryStub }]
-): KbnServer => {
+): ServerFacade => {
return ({
log: sinon.stub(),
expose: sinon.stub(),
config: () => ({ get: configGetStub }),
plugins: { reporting: { exportTypesRegistry: { getAll: () => exportTypes } } },
- } as unknown) as KbnServer;
+ } as unknown) as ServerFacade;
};
describe('Create Worker', () => {
diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts b/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts
index 0e53fe23a4f2..7166659487c9 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts
@@ -7,42 +7,50 @@
import { PLUGIN_ID } from '../../common/constants';
import {
ESQueueInstance,
+ QueueConfig,
+ ExportTypeDefinition,
ESQueueWorkerExecuteFn,
- ExportType,
+ ImmediateExecuteFn,
JobDoc,
+ JobDocPayload,
JobSource,
- KbnServer,
+ ServerFacade,
} from '../../types';
// @ts-ignore untyped dependency
import { events as esqueueEvents } from './esqueue';
import { LevelLogger } from './level_logger';
import { oncePerServer } from './once_per_server';
-function createWorkerFn(server: KbnServer) {
+function createWorkerFn(server: ServerFacade) {
const config = server.config();
- const queueConfig = config.get('xpack.reporting.queue');
- const kibanaName = config.get('server.name');
- const kibanaId = config.get('server.uuid');
- const exportTypesRegistry = server.plugins.reporting.exportTypesRegistry;
const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'queue-worker']);
+ const queueConfig: QueueConfig = config.get('xpack.reporting.queue');
+ const kibanaName: string = config.get('server.name');
+ const kibanaId: string = config.get('server.uuid');
+ const { exportTypesRegistry } = server.plugins.reporting!;
// Once more document types are added, this will need to be passed in
return function createWorker(queue: ESQueueInstance) {
// export type / execute job map
- const jobExectors: Map = new Map();
+ const jobExecutors: Map = new Map();
- for (const exportType of exportTypesRegistry.getAll() as ExportType[]) {
- const executeJob = exportType.executeJobFactory(server);
- jobExectors.set(exportType.jobType, executeJob);
+ for (const exportType of exportTypesRegistry.getAll() as ExportTypeDefinition[]) {
+ const executeJobFactory = exportType.executeJobFactory(server);
+ jobExecutors.set(exportType.jobType, executeJobFactory);
}
- const workerFn = (job: JobSource, jobdoc: JobDoc, cancellationToken: any) => {
+ const workerFn = (job: JobSource, jobdoc: JobDocPayload | JobDoc, cancellationToken?: any) => {
// pass the work to the jobExecutor
- const jobExecutor = jobExectors.get(job._source.jobtype);
- if (!jobExecutor) {
+ if (!jobExecutors.get(job._source.jobtype)) {
throw new Error(`Unable to find a job executor for the claimed job: [${job._id}]`);
}
- return jobExecutor(job._id, jobdoc, cancellationToken);
+ if (job._id) {
+ const jobExecutor = jobExecutors.get(job._source.jobtype) as ESQueueWorkerExecuteFn;
+ return jobExecutor(job._id, jobdoc as JobDoc, cancellationToken);
+ } else {
+ const jobExecutor = jobExecutors.get(job._source.jobtype) as ImmediateExecuteFn;
+ return jobExecutor(null, jobdoc as JobDocPayload, cancellationToken);
+ }
};
const workerOptions = {
kibanaName,
diff --git a/x-pack/legacy/plugins/reporting/server/lib/crypto.ts b/x-pack/legacy/plugins/reporting/server/lib/crypto.ts
index 60e558479af5..dbc01fc947f8 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/crypto.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/crypto.ts
@@ -6,9 +6,9 @@
import nodeCrypto from '@elastic/node-crypto';
import { oncePerServer } from './once_per_server';
-import { KbnServer } from '../../types';
+import { ServerFacade } from '../../types';
-function cryptoFn(server: KbnServer) {
+function cryptoFn(server: ServerFacade) {
const encryptionKey = server.config().get('xpack.reporting.encryptionKey');
return nodeCrypto({ encryptionKey });
}
diff --git a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts
index ec0ffdf51733..c264c0ca7e0e 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts
@@ -4,12 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import { get } from 'lodash';
// @ts-ignore
import { events as esqueueEvents } from './esqueue';
import { oncePerServer } from './once_per_server';
-import { KbnServer, Logger, ConditionalHeaders } from '../../types';
+import {
+ ServerFacade,
+ RequestFacade,
+ Logger,
+ CaptureConfig,
+ QueueConfig,
+ ConditionalHeaders,
+} from '../../types';
interface ConfirmedJob {
id: string;
@@ -18,13 +24,13 @@ interface ConfirmedJob {
_primary_term: number;
}
-function enqueueJobFn(server: KbnServer) {
- const jobQueue = server.plugins.reporting.queue;
+function enqueueJobFn(server: ServerFacade) {
const config = server.config();
- const queueConfig = config.get('xpack.reporting.queue');
- const browserType = config.get('xpack.reporting.capture.browser.type');
- const maxAttempts = config.get('xpack.reporting.capture.maxAttempts');
- const exportTypesRegistry = server.plugins.reporting.exportTypesRegistry;
+ const captureConfig: CaptureConfig = config.get('xpack.reporting.capture');
+ const browserType = captureConfig.browser.type;
+ const maxAttempts = captureConfig.maxAttempts;
+ const queueConfig: QueueConfig = config.get('xpack.reporting.queue');
+ const { exportTypesRegistry, queue: jobQueue } = server.plugins.reporting!;
return async function enqueueJob(
parentLogger: Logger,
@@ -32,7 +38,7 @@ function enqueueJobFn(server: KbnServer) {
jobParams: object,
user: string,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) {
const logger = parentLogger.clone(['queue-job']);
const exportType = exportTypesRegistry.getById(exportTypeId);
diff --git a/x-pack/legacy/plugins/reporting/server/lib/export_types_registry.ts b/x-pack/legacy/plugins/reporting/server/lib/export_types_registry.ts
index 21f954fe739d..35c97f1db10d 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/export_types_registry.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/export_types_registry.ts
@@ -6,7 +6,7 @@
import { resolve as pathResolve } from 'path';
import glob from 'glob';
-import { KbnServer } from '../../types';
+import { ServerFacade } from '../../types';
import { PLUGIN_ID } from '../../common/constants';
import { oncePerServer } from './once_per_server';
import { LevelLogger } from './level_logger';
@@ -26,7 +26,7 @@ function scan(pattern: string) {
}
const pattern = pathResolve(__dirname, '../../export_types/*/server/index.[jt]s');
-async function exportTypesRegistryFn(server: KbnServer) {
+async function exportTypesRegistryFn(server: ServerFacade) {
const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'exportTypes']);
const exportTypesRegistry = new ExportTypesRegistry();
const files: string[] = (await scan(pattern)) as string[];
diff --git a/x-pack/legacy/plugins/reporting/server/lib/once_per_server.ts b/x-pack/legacy/plugins/reporting/server/lib/once_per_server.ts
index d4fa35908917..d73a5b73fecd 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/once_per_server.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/once_per_server.ts
@@ -5,10 +5,10 @@
*/
import { memoize, MemoizedFunction } from 'lodash';
-import { KbnServer } from '../../types';
+import { ServerFacade } from '../../types';
-type ServerFn = (server: KbnServer) => any;
-type Memo = ((server: KbnServer) => any) & MemoizedFunction;
+type ServerFn = (server: ServerFacade) => any;
+type Memo = ((server: ServerFacade) => any) & MemoizedFunction;
/**
* allow this function to be called multiple times, but
@@ -22,7 +22,7 @@ type Memo = ((server: KbnServer) => any) & MemoizedFunction;
* @return {any}
*/
export function oncePerServer(fn: ServerFn) {
- const memoized: Memo = memoize(function(server: KbnServer) {
+ const memoized: Memo = memoize(function(server: ServerFacade) {
if (arguments.length !== 1) {
throw new TypeError('This function expects to be called with a single argument');
}
diff --git a/x-pack/legacy/plugins/reporting/server/lib/validate/index.ts b/x-pack/legacy/plugins/reporting/server/lib/validate/index.ts
index f785fac58d48..e0382c020534 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/validate/index.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/validate/index.ts
@@ -4,18 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ConfigObject, KbnServer, Logger } from '../../../types';
+import { ServerFacade, Logger } from '../../../types';
import { validateBrowser } from './validate_browser';
import { validateConfig } from './validate_config';
import { validateMaxContentLength } from './validate_max_content_length';
-export async function runValidations(
- server: KbnServer,
- config: ConfigObject,
- logger: Logger,
- browserFactory: any
-) {
+export async function runValidations(server: ServerFacade, logger: Logger, browserFactory: any) {
try {
+ const config = server.config();
await Promise.all([
validateBrowser(server, browserFactory, logger),
validateConfig(config, logger),
diff --git a/x-pack/legacy/plugins/reporting/server/lib/validate/validate_browser.ts b/x-pack/legacy/plugins/reporting/server/lib/validate/validate_browser.ts
index 7d011e6c0886..031709c85284 100644
--- a/x-pack/legacy/plugins/reporting/server/lib/validate/validate_browser.ts
+++ b/x-pack/legacy/plugins/reporting/server/lib/validate/validate_browser.ts
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Browser } from 'puppeteer';
-import { KbnServer, Logger } from '../../../types';
-import { CHROMIUM } from '../../browsers/browser_types';
+import { BROWSER_TYPE } from '../../../common/constants';
+import { ServerFacade, Logger } from '../../../types';
import { HeadlessChromiumDriverFactory } from '../../browsers/chromium/driver_factory';
/*
@@ -13,11 +13,11 @@ import { HeadlessChromiumDriverFactory } from '../../browsers/chromium/driver_fa
* to the locally running Kibana instance.
*/
export const validateBrowser = async (
- server: KbnServer,
+ server: ServerFacade,
browserFactory: HeadlessChromiumDriverFactory,
logger: Logger
) => {
- if (browserFactory.type === CHROMIUM) {
+ if (browserFactory.type === BROWSER_TYPE) {
return browserFactory
.test({ viewport: { width: 800, height: 600 } }, logger)
.then((browser: Browser | null) => {
diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts
index 9dc1e9d12e30..9c7e0a5f2778 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts
@@ -6,28 +6,33 @@
import boom from 'boom';
import Joi from 'joi';
-import { Request, ResponseToolkit } from 'hapi';
import rison from 'rison-node';
import { API_BASE_URL } from '../../common/constants';
-import { KbnServer } from '../../types';
-import { getRouteConfigFactoryReportingPre } from './lib/route_config_factories';
+import { ServerFacade, RequestFacade, ReportingResponseToolkit } from '../../types';
+import {
+ getRouteConfigFactoryReportingPre,
+ GetRouteConfigFactoryFn,
+ RouteConfigFactory,
+} from './lib/route_config_factories';
import { HandlerErrorFunction, HandlerFunction } from './types';
const BASE_GENERATE = `${API_BASE_URL}/generate`;
export function registerGenerateFromJobParams(
- server: KbnServer,
+ server: ServerFacade,
handler: HandlerFunction,
handleError: HandlerErrorFunction
) {
- const getRouteConfig = getRouteConfigFactoryReportingPre(server);
+ const getRouteConfig = () => {
+ const getOriginalRouteConfig: GetRouteConfigFactoryFn = getRouteConfigFactoryReportingPre(
+ server
+ );
+ const routeConfigFactory: RouteConfigFactory = getOriginalRouteConfig(
+ ({ params: { exportType } }) => exportType
+ );
- // generate report
- server.route({
- path: `${BASE_GENERATE}/{exportType}`,
- method: 'POST',
- config: {
- ...getRouteConfig(request => request.params.exportType),
+ return {
+ ...routeConfigFactory,
validate: {
params: Joi.object({
exportType: Joi.string().required(),
@@ -41,8 +46,15 @@ export function registerGenerateFromJobParams(
jobParams: Joi.string().default(null),
}).default(),
},
- },
- handler: async (request: Request, h: ResponseToolkit) => {
+ };
+ };
+
+ // generate report
+ server.route({
+ path: `${BASE_GENERATE}/{exportType}`,
+ method: 'POST',
+ options: getRouteConfig(),
+ handler: async (request: RequestFacade, h: ReportingResponseToolkit) => {
let jobParamsRison: string | null;
if (request.payload) {
@@ -73,11 +85,10 @@ export function registerGenerateFromJobParams(
},
});
- // show error about GET method to user
+ // Get route to generation endpoint: show error about GET method to user
server.route({
path: `${BASE_GENERATE}/{p*}`,
method: 'GET',
- config: getRouteConfig(),
handler: () => {
const err = boom.methodNotAllowed('GET is not allowed');
err.output.headers.allow = 'POST';
diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts
index baadbc99e82f..ec0a56f8de44 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts
@@ -4,41 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request, ResponseToolkit } from 'hapi';
import { get } from 'lodash';
-
import { API_BASE_GENERATE_V1, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../common/constants';
-import { KbnServer } from '../../types';
+import { ServerFacade, RequestFacade, ReportingResponseToolkit } from '../../types';
import { HandlerErrorFunction, HandlerFunction, QueuedJobPayload } from './types';
-import { getRouteOptions } from './lib/route_config_factories';
+import { getRouteOptionsCsv } from './lib/route_config_factories';
import { getJobParamsFromRequest } from '../../export_types/csv_from_savedobject/server/lib/get_job_params_from_request';
-/*
- * 1. Build `jobParams` object: job data that execution will need to reference in various parts of the lifecycle
- * 2. Pass the jobParams and other common params to `handleRoute`, a shared function to enqueue the job with the params
- * 3. Ensure that details for a queued job were returned
- */
-const getJobFromRouteHandler = async (
- handleRoute: HandlerFunction,
- handleRouteError: HandlerErrorFunction,
- request: Request,
- h: ResponseToolkit
-): Promise => {
- let result: QueuedJobPayload;
- try {
- const jobParams = getJobParamsFromRequest(request, { isImmediate: false });
- result = await handleRoute(CSV_FROM_SAVEDOBJECT_JOB_TYPE, jobParams, request, h);
- } catch (err) {
- throw handleRouteError(CSV_FROM_SAVEDOBJECT_JOB_TYPE, err);
- }
-
- if (get(result, 'source.job') == null) {
- throw new Error(`The Export handler is expected to return a result with job info! ${result}`);
- }
-
- return result;
-};
-
/*
* This function registers API Endpoints for queuing Reporting jobs. The API inputs are:
* - saved object type and ID
@@ -49,18 +21,38 @@ const getJobFromRouteHandler = async (
* - local (transient) changes the user made to the saved object
*/
export function registerGenerateCsvFromSavedObject(
- server: KbnServer,
+ server: ServerFacade,
handleRoute: HandlerFunction,
handleRouteError: HandlerErrorFunction
) {
- const routeOptions = getRouteOptions(server);
+ const routeOptions = getRouteOptionsCsv(server);
server.route({
path: `${API_BASE_GENERATE_V1}/csv/saved-object/{savedObjectType}:{savedObjectId}`,
method: 'POST',
options: routeOptions,
- handler: async (request: Request, h: ResponseToolkit) => {
- return getJobFromRouteHandler(handleRoute, handleRouteError, request, h);
+ handler: async (request: RequestFacade, h: ReportingResponseToolkit) => {
+ /*
+ * 1. Build `jobParams` object: job data that execution will need to reference in various parts of the lifecycle
+ * 2. Pass the jobParams and other common params to `handleRoute`, a shared function to enqueue the job with the params
+ * 3. Ensure that details for a queued job were returned
+ */
+
+ let result: QueuedJobPayload;
+ try {
+ const jobParams = getJobParamsFromRequest(request, { isImmediate: false });
+ result = await handleRoute(CSV_FROM_SAVEDOBJECT_JOB_TYPE, jobParams, request, h);
+ } catch (err) {
+ throw handleRouteError(CSV_FROM_SAVEDOBJECT_JOB_TYPE, err);
+ }
+
+ if (get(result, 'source.job') == null) {
+ throw new Error(
+ `The Export handler is expected to return a result with job info! ${result}`
+ );
+ }
+
+ return result;
},
});
}
diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts
index 8321cf16820c..557f7c370203 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts
@@ -4,24 +4,21 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request, ResponseObject, ResponseToolkit } from 'hapi';
-
import { API_BASE_GENERATE_V1 } from '../../common/constants';
import { createJobFactory, executeJobFactory } from '../../export_types/csv_from_savedobject';
import {
- KbnServer,
+ ServerFacade,
+ RequestFacade,
+ ResponseFacade,
+ ReportingResponseToolkit,
Logger,
JobDocPayload,
JobIDForImmediate,
JobDocOutputExecuted,
} from '../../types';
-import { getRouteOptions } from './lib/route_config_factories';
+import { getRouteOptionsCsv } from './lib/route_config_factories';
import { getJobParamsFromRequest } from '../../export_types/csv_from_savedobject/server/lib/get_job_params_from_request';
-interface KibanaResponse extends ResponseObject {
- isBoom: boolean;
-}
-
/*
* This function registers API Endpoints for immediate Reporting jobs. The API inputs are:
* - saved object type and ID
@@ -32,10 +29,10 @@ interface KibanaResponse extends ResponseObject {
* - local (transient) changes the user made to the saved object
*/
export function registerGenerateCsvFromSavedObjectImmediate(
- server: KbnServer,
+ server: ServerFacade,
parentLogger: Logger
) {
- const routeOptions = getRouteOptions(server);
+ const routeOptions = getRouteOptionsCsv(server);
/*
* CSV export with the `immediate` option does not queue a job with Reporting's ESQueue to run the job async. Instead, this does:
@@ -46,7 +43,7 @@ export function registerGenerateCsvFromSavedObjectImmediate(
path: `${API_BASE_GENERATE_V1}/immediate/csv/saved-object/{savedObjectType}:{savedObjectId}`,
method: 'POST',
options: routeOptions,
- handler: async (request: Request, h: ResponseToolkit) => {
+ handler: async (request: RequestFacade, h: ReportingResponseToolkit) => {
const logger = parentLogger.clone(['savedobject-csv']);
const jobParams = getJobParamsFromRequest(request, { isImmediate: true });
const createJobFn = createJobFactory(server);
@@ -78,7 +75,7 @@ export function registerGenerateCsvFromSavedObjectImmediate(
.type(jobOutputContentType);
// Set header for buffer download, not streaming
- const { isBoom } = response as KibanaResponse;
+ const { isBoom } = response as ResponseFacade;
if (isBoom == null) {
response.header('accept-ranges', 'none');
}
diff --git a/x-pack/legacy/plugins/reporting/server/routes/index.ts b/x-pack/legacy/plugins/reporting/server/routes/index.ts
index cbfd096e7100..118d6b3d43c1 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/index.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/index.ts
@@ -5,9 +5,8 @@
*/
import boom from 'boom';
-import { Request, ResponseToolkit } from 'hapi';
import { API_BASE_URL } from '../../common/constants';
-import { KbnServer, Logger } from '../../types';
+import { ServerFacade, RequestFacade, ReportingResponseToolkit, Logger } from '../../types';
import { enqueueJobFactory } from '../lib/enqueue_job';
import { registerGenerateFromJobParams } from './generate_from_jobparams';
import { registerGenerateCsvFromSavedObject } from './generate_from_savedobject';
@@ -15,9 +14,10 @@ import { registerGenerateCsvFromSavedObjectImmediate } from './generate_from_sav
import { registerJobs } from './jobs';
import { registerLegacy } from './legacy';
-export function registerRoutes(server: KbnServer, logger: Logger) {
+export function registerRoutes(server: ServerFacade, logger: Logger) {
const config = server.config();
const DOWNLOAD_BASE_URL = config.get('server.basePath') + `${API_BASE_URL}/jobs/download`;
+ // @ts-ignore
const { errors: esErrors } = server.plugins.elasticsearch.getCluster('admin');
const enqueueJob = enqueueJobFactory(server);
@@ -27,8 +27,8 @@ export function registerRoutes(server: KbnServer, logger: Logger) {
async function handler(
exportTypeId: string,
jobParams: any,
- request: Request,
- h: ResponseToolkit
+ request: RequestFacade,
+ h: ReportingResponseToolkit
) {
// @ts-ignore
const user = request.pre.user;
diff --git a/x-pack/legacy/plugins/reporting/server/routes/jobs.ts b/x-pack/legacy/plugins/reporting/server/routes/jobs.ts
index 1acc40fd0a55..58a212aa0d7f 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/jobs.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/jobs.ts
@@ -5,10 +5,8 @@
*/
import boom from 'boom';
-import { RequestQuery } from 'hapi';
-import { Request, ResponseToolkit } from 'hapi';
import { API_BASE_URL } from '../../common/constants';
-import { JobDoc, KbnServer } from '../../types';
+import { JobDoc, ServerFacade, RequestFacade, ReportingResponseToolkit } from '../../types';
// @ts-ignore
import { jobsQueryFactory } from '../lib/jobs_query';
// @ts-ignore
@@ -20,13 +18,7 @@ import {
const MAIN_ENTRY = `${API_BASE_URL}/jobs`;
-type ListQuery = RequestQuery & {
- page: string;
- size: string;
- ids?: string; // optional field forbids us from extending RequestQuery
-};
-
-export function registerJobs(server: KbnServer) {
+export function registerJobs(server: ServerFacade) {
const jobsQuery = jobsQueryFactory(server);
const getRouteConfig = getRouteConfigFactoryManagementPre(server);
const getRouteConfigDownload = getRouteConfigFactoryDownloadPre(server);
@@ -35,9 +27,9 @@ export function registerJobs(server: KbnServer) {
server.route({
path: `${MAIN_ENTRY}/list`,
method: 'GET',
- config: getRouteConfig(),
- handler: (request: Request) => {
- const { page: queryPage, size: querySize, ids: queryIds } = request.query as ListQuery;
+ options: getRouteConfig(),
+ handler: (request: RequestFacade) => {
+ const { page: queryPage, size: querySize, ids: queryIds } = request.query;
const page = parseInt(queryPage, 10) || 0;
const size = Math.min(100, parseInt(querySize, 10) || 10);
const jobIds = queryIds ? queryIds.split(',') : null;
@@ -57,8 +49,8 @@ export function registerJobs(server: KbnServer) {
server.route({
path: `${MAIN_ENTRY}/count`,
method: 'GET',
- config: getRouteConfig(),
- handler: (request: Request) => {
+ options: getRouteConfig(),
+ handler: (request: RequestFacade) => {
const results = jobsQuery.count(request.pre.management.jobTypes, request.pre.user);
return results;
},
@@ -68,8 +60,8 @@ export function registerJobs(server: KbnServer) {
server.route({
path: `${MAIN_ENTRY}/output/{docId}`,
method: 'GET',
- config: getRouteConfig(),
- handler: (request: Request) => {
+ options: getRouteConfig(),
+ handler: (request: RequestFacade) => {
const { docId } = request.params;
return jobsQuery.get(request.pre.user, docId, { includeContent: true }).then(
@@ -94,8 +86,8 @@ export function registerJobs(server: KbnServer) {
server.route({
path: `${MAIN_ENTRY}/info/{docId}`,
method: 'GET',
- config: getRouteConfig(),
- handler: (request: Request) => {
+ options: getRouteConfig(),
+ handler: (request: RequestFacade) => {
const { docId } = request.params;
return jobsQuery.get(request.pre.user, docId).then(
@@ -127,8 +119,8 @@ export function registerJobs(server: KbnServer) {
server.route({
path: `${MAIN_ENTRY}/download/{docId}`,
method: 'GET',
- config: getRouteConfigDownload(),
- handler: async (request: Request, h: ResponseToolkit) => {
+ options: getRouteConfigDownload(),
+ handler: async (request: RequestFacade, h: ReportingResponseToolkit) => {
const { docId } = request.params;
let response = await jobResponseHandler(
diff --git a/x-pack/legacy/plugins/reporting/server/routes/legacy.ts b/x-pack/legacy/plugins/reporting/server/routes/legacy.ts
index 24caf8003b7d..011ac4a02bbf 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/legacy.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/legacy.ts
@@ -4,31 +4,34 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request, ResponseToolkit } from 'hapi';
import querystring from 'querystring';
import { API_BASE_URL } from '../../common/constants';
-import { KbnServer } from '../../types';
-import { getRouteConfigFactoryReportingPre } from './lib/route_config_factories';
+import { ServerFacade, RequestFacade, ReportingResponseToolkit } from '../../types';
+import {
+ getRouteConfigFactoryReportingPre,
+ GetRouteConfigFactoryFn,
+} from './lib/route_config_factories';
import { HandlerErrorFunction, HandlerFunction } from './types';
-const getStaticFeatureConfig = (getRouteConfig: any, featureId: any) =>
+const getStaticFeatureConfig = (getRouteConfig: GetRouteConfigFactoryFn, featureId: string) =>
getRouteConfig(() => featureId);
+
const BASE_GENERATE = `${API_BASE_URL}/generate`;
export function registerLegacy(
- server: KbnServer,
+ server: ServerFacade,
handler: HandlerFunction,
handleError: HandlerErrorFunction
) {
const getRouteConfig = getRouteConfigFactoryReportingPre(server);
- function createLegacyPdfRoute({ path, objectType }: { path: string; objectType: any }) {
+ function createLegacyPdfRoute({ path, objectType }: { path: string; objectType: string }) {
const exportTypeId = 'printablePdf';
server.route({
path,
method: 'POST',
- config: getStaticFeatureConfig(getRouteConfig, exportTypeId),
- handler: async (request: Request, h: ResponseToolkit) => {
+ options: getStaticFeatureConfig(getRouteConfig, exportTypeId),
+ handler: async (request: RequestFacade, h: ReportingResponseToolkit) => {
const message = `The following URL is deprecated and will stop working in the next major version: ${request.url.path}`;
server.log(['warning', 'reporting', 'deprecation'], message);
diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts b/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts
index e09db6e536fe..29ded68d403c 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts
@@ -4,18 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
import Joi from 'joi';
-import { KbnServer } from '../../../types';
+import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants';
+import { ServerFacade, RequestFacade } from '../../../types';
// @ts-ignore
import { authorizedUserPreRoutingFactory } from './authorized_user_pre_routing';
// @ts-ignore
import { reportingFeaturePreRoutingFactory } from './reporting_feature_pre_routing';
-import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants';
const API_TAG = 'api';
-interface RouteConfigFactory {
+export interface RouteConfigFactory {
tags?: string[];
pre: any[];
response?: {
@@ -23,10 +22,14 @@ interface RouteConfigFactory {
};
}
-type GetFeatureFunction = (request: Request) => any;
+type GetFeatureFunction = (request: RequestFacade) => any;
type PreRoutingFunction = (getFeatureId?: GetFeatureFunction) => any;
-export function getRouteConfigFactoryReportingPre(server: KbnServer) {
+export type GetRouteConfigFactoryFn = (
+ getFeatureId?: GetFeatureFunction | undefined
+) => RouteConfigFactory;
+
+export function getRouteConfigFactoryReportingPre(server: ServerFacade): GetRouteConfigFactoryFn {
const authorizedUserPreRouting: PreRoutingFunction = authorizedUserPreRoutingFactory(server);
const reportingFeaturePreRouting: PreRoutingFunction = reportingFeaturePreRoutingFactory(server);
@@ -43,7 +46,7 @@ export function getRouteConfigFactoryReportingPre(server: KbnServer) {
};
}
-export function getRouteOptions(server: KbnServer) {
+export function getRouteOptionsCsv(server: ServerFacade) {
const getRouteConfig = getRouteConfigFactoryReportingPre(server);
return {
...getRouteConfig(() => CSV_FROM_SAVEDOBJECT_JOB_TYPE),
@@ -64,7 +67,7 @@ export function getRouteOptions(server: KbnServer) {
};
}
-export function getRouteConfigFactoryManagementPre(server: KbnServer) {
+export function getRouteConfigFactoryManagementPre(server: ServerFacade): GetRouteConfigFactoryFn {
const authorizedUserPreRouting = authorizedUserPreRoutingFactory(server);
const reportingFeaturePreRouting = reportingFeaturePreRoutingFactory(server);
const managementPreRouting = reportingFeaturePreRouting(() => 'management');
@@ -84,7 +87,7 @@ export function getRouteConfigFactoryManagementPre(server: KbnServer) {
// TOC at the end of the PDF, but it's sending multiple cookies and causing our auth to fail with a 401.
// Additionally, the range-request doesn't alleviate any performance issues on the server as the entire
// download is loaded into memory.
-export function getRouteConfigFactoryDownloadPre(server: KbnServer) {
+export function getRouteConfigFactoryDownloadPre(server: ServerFacade): GetRouteConfigFactoryFn {
const getManagementRouteConfig = getRouteConfigFactoryManagementPre(server);
return (): RouteConfigFactory => ({
...getManagementRouteConfig(),
diff --git a/x-pack/legacy/plugins/reporting/server/routes/types.d.ts b/x-pack/legacy/plugins/reporting/server/routes/types.d.ts
index 6004811d8a2b..0b6a9708c7d1 100644
--- a/x-pack/legacy/plugins/reporting/server/routes/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/server/routes/types.d.ts
@@ -4,14 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request, ResponseToolkit } from 'hapi';
-import { JobDocPayload } from '../../types';
+import { RequestFacade, ReportingResponseToolkit, JobDocPayload } from '../../types';
export type HandlerFunction = (
exportType: any,
jobParams: any,
- request: Request,
- h: ResponseToolkit
+ request: RequestFacade,
+ h: ReportingResponseToolkit
) => any;
export type HandlerErrorFunction = (exportType: any, err: Error) => any;
diff --git a/x-pack/legacy/plugins/reporting/test_helpers/create_mock_server.ts b/x-pack/legacy/plugins/reporting/test_helpers/create_mock_server.ts
index 63614a18e829..226355f5edc6 100644
--- a/x-pack/legacy/plugins/reporting/test_helpers/create_mock_server.ts
+++ b/x-pack/legacy/plugins/reporting/test_helpers/create_mock_server.ts
@@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { memoize } from 'lodash';
-import { KbnServer } from '../types';
+import { ServerFacade } from '../types';
-export const createMockServer = ({ settings = {} }: any): KbnServer => {
+export const createMockServer = ({ settings = {} }: any): ServerFacade => {
const mockServer = {
expose: () => {
' ';
@@ -41,5 +41,5 @@ export const createMockServer = ({ settings = {} }: any): KbnServer => {
return key in settings ? settings[key] : defaultSettings[key];
});
- return (mockServer as unknown) as KbnServer;
+ return (mockServer as unknown) as ServerFacade;
};
diff --git a/x-pack/legacy/plugins/reporting/types.d.ts b/x-pack/legacy/plugins/reporting/types.d.ts
index 19c08e59400a..62f8286cdf36 100644
--- a/x-pack/legacy/plugins/reporting/types.d.ts
+++ b/x-pack/legacy/plugins/reporting/types.d.ts
@@ -4,14 +4,26 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Request } from 'hapi';
-
-interface UiSettings {
- get: (value: string) => string;
+import { ResponseObject } from 'hapi';
+import { EventEmitter } from 'events';
+import { Legacy } from 'kibana';
+import { XPackMainPlugin } from '../xpack_main/xpack_main';
+import { ElasticsearchPlugin } from '../../../../src/legacy/core_plugins/elasticsearch';
+import { HeadlessChromiumDriverFactory } from './server/browsers/chromium/driver_factory';
+import { BrowserType } from './server/browsers/types';
+
+type Job = EventEmitter & { id: string };
+
+export interface ReportingPlugin {
+ queue: {
+ addJob: (type: string, payload: object, options: object) => Job;
+ };
+ exportTypesRegistry: {
+ getById: (id: string) => ExportTypeDefinition;
+ getAll: () => ExportTypeDefinition[];
+ };
+ browserDriverFactory: HeadlessChromiumDriverFactory;
}
-
-type SavedObjectClient = any;
-
export interface NetworkPolicyRule {
allow: boolean;
protocol: string;
@@ -23,30 +35,61 @@ export interface NetworkPolicy {
rules: NetworkPolicyRule[];
}
-// these types shoud be in core kibana and are only here temporarily
-export interface KbnServer {
- info: { protocol: string };
- config: () => ConfigObject;
- expose: () => void;
- plugins: Record;
- route: any;
- log: any;
- fieldFormatServiceFactory: (uiConfig: any) => any;
- savedObjects: {
- getScopedSavedObjectsClient: (fakeRequest: {
- headers: object;
- getBasePath: () => string;
- }) => SavedObjectClient;
+// Tracks which parts of the legacy plugin system are being used
+export type ServerFacade = Legacy.Server & {
+ plugins: {
+ reporting?: ReportingPlugin;
+ xpack_main?: XPackMainPlugin & {
+ status?: any;
+ };
};
- uiSettingsServiceFactory: ({
- savedObjectsClient,
- }: {
- savedObjectsClient: SavedObjectClient;
- }) => UiSettings;
+};
+
+interface ListQuery {
+ page: string;
+ size: string;
+ ids?: string; // optional field forbids us from extending RequestQuery
+}
+interface GenerateQuery {
+ jobParams: string;
+}
+interface GenerateExportTypePayload {
+ jobParams: string;
+}
+interface DownloadParams {
+ docId: string;
}
-export interface ConfigObject {
- get: (path?: string) => any;
+// Tracks which parts of the legacy plugin system are being used
+interface ReportingRequest {
+ query: ListQuery & GenerateQuery;
+ params: DownloadParams;
+ payload: GenerateExportTypePayload;
+ pre: {
+ management: {
+ jobTypes: any;
+ };
+ user: any;
+ };
+}
+
+export type RequestFacade = ReportingRequest & Legacy.Request;
+
+export type ResponseFacade = ResponseObject & {
+ isBoom: boolean;
+};
+
+export type ReportingResponseToolkit = Legacy.ResponseToolkit;
+
+export interface CaptureConfig {
+ browser: {
+ type: BrowserType;
+ autoDownload: boolean;
+ chromium: BrowserConfig;
+ };
+ maxAttempts: number;
+ networkPolicy: NetworkPolicy;
+ loadDelay: number;
}
export interface BrowserConfig {
@@ -61,6 +104,14 @@ export interface BrowserConfig {
};
}
+export interface QueueConfig {
+ indexInterval: string;
+ pollEnabled: boolean;
+ pollInterval: number;
+ pollIntervalErrorMultiplier: number;
+ timeout: number;
+}
+
export interface ElementPosition {
boundingClientRect: {
// modern browsers support x/y, but older ones don't
@@ -152,7 +203,7 @@ export interface ESQueueWorker {
export type ESQueueCreateJobFn = (
jobParams: object,
headers: ConditionalHeaders,
- request: Request
+ request: RequestFacade
) => Promise;
export type ESQueueWorkerExecuteFn = (jobId: string, job: JobDoc, cancellationToken: any) => void;
@@ -161,7 +212,7 @@ export type JobIDForImmediate = null;
export type ImmediateExecuteFn = (
jobId: JobIDForImmediate,
jobDocPayload: JobDocPayload,
- request: Request
+ request: RequestFacade
) => Promise;
export interface ESQueueWorkerOptions {
@@ -179,9 +230,9 @@ export interface ESQueueInstance {
) => ESQueueWorker;
}
-export type CreateJobFactory = (server: KbnServer) => ESQueueCreateJobFn;
-export type ExecuteJobFactory = (server: KbnServer) => ESQueueWorkerExecuteFn;
-export type ExecuteImmediateJobFactory = (server: KbnServer) => ImmediateExecuteFn;
+export type CreateJobFactory = (server: ServerFacade) => ESQueueCreateJobFn;
+export type ExecuteJobFactory = (server: ServerFacade) => ESQueueWorkerExecuteFn;
+export type ExecuteImmediateJobFactory = (server: ServerFacade) => ImmediateExecuteFn;
export interface ExportTypeDefinition {
id: string;
@@ -193,13 +244,6 @@ export interface ExportTypeDefinition {
validLicenses: string[];
}
-// Note: this seems to be nearly a duplicate of ExportTypeDefinition
-export interface ExportType {
- jobType: string;
- createJobFactory: any;
- executeJobFactory: (server: KbnServer) => ESQueueWorkerExecuteFn;
-}
-
export interface ExportTypesRegistry {
register: (exportTypeDefinition: ExportTypeDefinition) => void;
}
diff --git a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_table/job_table.js b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_table/job_table.js
index e1c885156faa..9f0315e70530 100644
--- a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_table/job_table.js
+++ b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_list/job_table/job_table.js
@@ -6,7 +6,7 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
-import { i18n } from '@kbn/i18n';
+import { i18n } from '@kbn/i18n';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import {
@@ -278,10 +278,10 @@ export class JobTableUi extends Component {
>
{truncateText
? (
-
+
{content}
- ) : content }
+ ) : content}
);
});
diff --git a/x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts b/x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts
index d043c1587d3c..937b8771ac89 100644
--- a/x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts
+++ b/x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts
@@ -14,6 +14,8 @@ export const sharedSchema = gql`
to: Float!
"The beginning of the timerange"
from: Float!
+ "The default browser set time zone"
+ timezone: String
}
type CursorType {
diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts
index f78f55ddc445..30df3b5b63e2 100644
--- a/x-pack/legacy/plugins/siem/index.ts
+++ b/x-pack/legacy/plugins/siem/index.ts
@@ -29,7 +29,7 @@ import { defaultIndexPattern } from './default_index_pattern';
import { isAlertExecutor } from './server/lib/detection_engine/alerts/types';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export function siem(kibana: any) {
+export const siem = (kibana: any) => {
return new kibana.Plugin({
id: APP_ID,
configPrefix: 'xpack.siem',
@@ -138,4 +138,4 @@ export function siem(kibana: any) {
initServerWithKibana(server);
},
});
-}
+};
diff --git a/x-pack/legacy/plugins/siem/public/app.ts b/x-pack/legacy/plugins/siem/public/app.ts
index 255c51c9e48c..b068f8a9becd 100644
--- a/x-pack/legacy/plugins/siem/public/app.ts
+++ b/x-pack/legacy/plugins/siem/public/app.ts
@@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import './apps/kibana_app';
+import './apps/index';
diff --git a/x-pack/legacy/plugins/siem/public/apps/kibana_app.ts b/x-pack/legacy/plugins/siem/public/apps/index.ts
similarity index 55%
rename from x-pack/legacy/plugins/siem/public/apps/kibana_app.ts
rename to x-pack/legacy/plugins/siem/public/apps/index.ts
index 7ce67f3df9ff..468e72c8a2e5 100644
--- a/x-pack/legacy/plugins/siem/public/apps/kibana_app.ts
+++ b/x-pack/legacy/plugins/siem/public/apps/index.ts
@@ -3,10 +3,10 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import chrome from 'ui/chrome';
-import { SiemRootController } from './start_app';
-import 'uiExports/embeddableFactories';
+import chrome from 'ui/chrome';
+import { npStart } from 'ui/new_platform';
+import { Plugin } from './plugin';
-// load the application
-chrome.setRootController('siem', SiemRootController);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+new Plugin({ opaqueId: Symbol('siem'), env: {} as any }, chrome).start(npStart);
diff --git a/x-pack/legacy/plugins/siem/public/apps/plugin.tsx b/x-pack/legacy/plugins/siem/public/apps/plugin.tsx
new file mode 100644
index 000000000000..f3cbd44f34cd
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/apps/plugin.tsx
@@ -0,0 +1,54 @@
+/*
+ * 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 'react-dom';
+import { LegacyCoreStart, PluginInitializerContext } from 'src/core/public';
+import { PluginsStart } from 'ui/new_platform/new_platform';
+import { Chrome } from 'ui/chrome';
+
+import { SiemApp } from './start_app';
+import template from './template.html';
+
+export const ROOT_ELEMENT_ID = 'react-siem-root';
+
+export interface StartObject {
+ core: LegacyCoreStart;
+ plugins: PluginsStart;
+}
+
+export class Plugin {
+ constructor(
+ // @ts-ignore this is added to satisfy the New Platform typing constraint,
+ // but we're not leveraging any of its functionality yet.
+ private readonly initializerContext: PluginInitializerContext,
+ private readonly chrome: Chrome
+ ) {
+ this.chrome = chrome;
+ }
+
+ public start(start: StartObject): void {
+ const { core, plugins } = start;
+ // @ts-ignore improper type description
+ this.chrome.setRootTemplate(template);
+ const checkForRoot = () => {
+ return new Promise(resolve => {
+ const ready = !!document.getElementById(ROOT_ELEMENT_ID);
+ if (ready) {
+ resolve();
+ } else {
+ setTimeout(() => resolve(checkForRoot()), 10);
+ }
+ });
+ };
+ checkForRoot().then(() => {
+ const node = document.getElementById(ROOT_ELEMENT_ID);
+ if (node) {
+ render( , node);
+ }
+ });
+ }
+}
diff --git a/x-pack/legacy/plugins/siem/public/apps/start_app.tsx b/x-pack/legacy/plugins/siem/public/apps/start_app.tsx
index d923826cdd01..47c8b6eee645 100644
--- a/x-pack/legacy/plugins/siem/public/apps/start_app.tsx
+++ b/x-pack/legacy/plugins/siem/public/apps/start_app.tsx
@@ -7,7 +7,6 @@
import { createHashHistory } from 'history';
import React, { memo, FC } from 'react';
import { ApolloProvider } from 'react-apollo';
-import { render, unmountComponentAtNode } from 'react-dom';
import { Provider as ReduxStoreProvider } from 'react-redux';
import { ThemeProvider } from 'styled-components';
@@ -22,13 +21,18 @@ import { DEFAULT_DARK_MODE } from '../../common/constants';
import { ErrorToastDispatcher } from '../components/error_toast_dispatcher';
import { compose } from '../lib/compose/kibana_compose';
import { AppFrontendLibs } from '../lib/lib';
+import { KibanaCoreContextProvider } from '../lib/compose/kibana_core';
+import { KibanaPluginsContextProvider } from '../lib/compose/kibana_plugins';
+import { useKibanaUiSetting } from '../lib/settings/use_kibana_ui_setting';
import { PageRouter } from '../routes';
import { createStore } from '../store';
import { GlobalToaster, ManageGlobalToaster } from '../components/toasters';
import { MlCapabilitiesProvider } from '../components/ml/permissions/ml_capabilities_provider';
-import { useKibanaUiSetting } from '../lib/settings/use_kibana_ui_setting';
+
import { ApolloClientContext } from '../utils/apollo_context';
+import { StartObject } from './plugin';
+
const StartApp: FC = memo(libs => {
const history = createHashHistory();
@@ -68,21 +72,12 @@ const StartApp: FC = memo(libs => {
return ;
});
-const ROOT_ELEMENT_ID = 'react-siem-root';
+export const ROOT_ELEMENT_ID = 'react-siem-root';
-const App = memo(() => (
-
-
-
+export const SiemApp = memo(({ core, plugins }) => (
+
+
+
+
+
));
-
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export const SiemRootController = ($scope: any, $element: any) => {
- const domNode: Element = $element[0];
-
- render( , domNode);
-
- $scope.$on('$destroy', () => {
- unmountComponentAtNode(domNode);
- });
-};
diff --git a/x-pack/legacy/plugins/siem/public/apps/template.html b/x-pack/legacy/plugins/siem/public/apps/template.html
new file mode 100644
index 000000000000..9f757b25ccec
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/apps/template.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.test.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.test.tsx
deleted file mode 100644
index bbbbd9151383..000000000000
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.test.tsx
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * 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 { Filter } from '@kbn/es-query';
-import { get } from 'lodash/fp';
-
-import { ApplySiemFilterAction, ActionContext } from './apply_siem_filter_action';
-// @ts-ignore Missing type defs as maps moves to Typescript
-import { MAP_SAVED_OBJECT_TYPE } from '../../../../../maps/common/constants';
-import {
- EmbeddableInput,
- EmbeddableOutput,
- IEmbeddable,
-} from '../../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public';
-
-import { siemFilterManager } from '../../search_bar';
-
-interface MockSiemFilterManager {
- addFilters: (filters: Filter[]) => void;
-}
-const mockSiemFilterManager: MockSiemFilterManager = siemFilterManager as MockSiemFilterManager;
-jest.mock('../../search_bar', () => ({
- siemFilterManager: {
- addFilters: jest.fn(),
- },
-}));
-const mockAddFilters = jest.fn();
-mockSiemFilterManager.addFilters = mockAddFilters;
-
-// Using type narrowing to remove all the any's -- https://github.com/elastic/kibana/pull/43965/files#r318796100
-const isEmbeddable = (
- embeddable: unknown
-): embeddable is IEmbeddable => {
- return get('type', embeddable) != null;
-};
-
-// Partial actions for testing that even though the types are there, JavaScript
-// could circumvent the types and call execute() and isCompatible() without a filter array
-interface PartialAction {
- execute: ({ embeddable }: { embeddable: ActionContext['embeddable'] }) => Promise;
- isCompatible: ({ embeddable }: { embeddable: ActionContext['embeddable'] }) => Promise;
-}
-
-// Using type narrowing to remove all the any's
-const isPartialFilterAction = (embeddable: unknown): embeddable is PartialAction => {
- return embeddable instanceof ApplySiemFilterAction;
-};
-
-describe('ApplySiemFilterAction', () => {
- test('it has APPLY_SIEM_FILTER_ACTION_ID type and id', () => {
- const action = new ApplySiemFilterAction();
- expect(action.id).toBe('APPLY_SIEM_FILTER_ACTION_ID');
- expect(action.type).toBe('APPLY_SIEM_FILTER_ACTION_ID');
- });
-
- test('it has expected display name', () => {
- const action = new ApplySiemFilterAction();
- expect(action.getDisplayName()).toMatchInlineSnapshot(`"Apply filter"`);
- });
-
- describe('#isCompatible', () => {
- test('when embeddable type is MAP_SAVED_OBJECT_TYPE and filters exist, returns true', async () => {
- const action = new ApplySiemFilterAction();
- const embeddable = {
- type: MAP_SAVED_OBJECT_TYPE,
- };
- if (isEmbeddable(embeddable)) {
- const result = await action.isCompatible({
- embeddable,
- filters: [],
- });
- expect(result).toBe(true);
- } else {
- throw new Error('Invalid embeddable in unit test');
- }
- });
-
- test('when embeddable type is MAP_SAVED_OBJECT_TYPE and filters do not exist, returns false', async () => {
- const action = new ApplySiemFilterAction();
- const embeddable = {
- type: MAP_SAVED_OBJECT_TYPE,
- };
- if (isEmbeddable(embeddable) && isPartialFilterAction(action)) {
- const result = await action.isCompatible({
- embeddable,
- });
- expect(result).toBe(false);
- } else {
- throw new Error('Invalid embeddable or filter in unit test');
- }
- });
-
- test('when embeddable type is not MAP_SAVED_OBJECT_TYPE, returns false', async () => {
- const action = new ApplySiemFilterAction();
- const embeddable = {
- type: 'defaultEmbeddable',
- };
- if (isEmbeddable(embeddable)) {
- const result = await action.isCompatible({
- embeddable,
- filters: [],
- });
- expect(result).toBe(false);
- } else {
- throw new Error('Invalid embeddable in unit test');
- }
- });
- });
-
- describe('#execute', () => {
- test('it throws an error when triggerContext not set', async () => {
- const action = new ApplySiemFilterAction();
- const embeddable = {
- type: MAP_SAVED_OBJECT_TYPE,
- };
- if (isPartialFilterAction(action) && isEmbeddable(embeddable)) {
- await expect(
- action.execute({
- embeddable,
- })
- ).rejects.toThrow('Applying a filter requires a filter as context');
- } else {
- throw new Error('Invalid embeddable or filter in unit test');
- }
- });
-
- test('it calls applyFilterQueryFromKueryExpression() with valid expression', async () => {
- const action = new ApplySiemFilterAction();
- const embeddable = {
- type: MAP_SAVED_OBJECT_TYPE,
- getInput: () => ({
- query: { query: '' },
- }),
- };
- const filters: Filter[] = [
- {
- query: {
- match: {
- 'host.name': {
- query: 'zeek-newyork-sha-aa8df15',
- type: 'phrase',
- },
- },
- },
- meta: {
- disabled: false,
- negate: false,
- alias: '',
- },
- },
- ];
- if (isEmbeddable(embeddable)) {
- await action.execute({
- embeddable,
- filters,
- });
-
- expect(mockAddFilters.mock.calls[0][0]).toEqual([
- {
- meta: { alias: '', disabled: false, negate: false },
- query: {
- match: { 'host.name': { query: 'zeek-newyork-sha-aa8df15', type: 'phrase' } },
- },
- },
- ]);
- } else {
- throw new Error('Invalid embeddable in unit test');
- }
- });
- });
-});
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.tsx
deleted file mode 100644
index 52368be60c51..000000000000
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/actions/apply_siem_filter_action.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 { Filter } from '@kbn/es-query';
-import { i18n } from '@kbn/i18n';
-import { IAction } from 'src/plugins/ui_actions/public';
-import { IEmbeddable } from '../../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public';
-// @ts-ignore Missing type defs as maps moves to Typescript
-import { MAP_SAVED_OBJECT_TYPE } from '../../../../../maps/common/constants';
-import { siemFilterManager } from '../../search_bar';
-
-export const APPLY_SIEM_FILTER_ACTION_ID = 'APPLY_SIEM_FILTER_ACTION_ID';
-
-export interface ActionContext {
- embeddable: IEmbeddable;
- filters: Filter[];
-}
-
-export class ApplySiemFilterAction implements IAction {
- public readonly type = APPLY_SIEM_FILTER_ACTION_ID;
- public id = APPLY_SIEM_FILTER_ACTION_ID;
-
- public getDisplayName() {
- return i18n.translate('xpack.siem.components.embeddables.actions.applySiemFilterActionTitle', {
- defaultMessage: 'Apply filter',
- });
- }
-
- public getIconType() {
- return undefined;
- }
-
- public async isCompatible(context: ActionContext): Promise {
- return context.embeddable.type === MAP_SAVED_OBJECT_TYPE && context.filters !== undefined;
- }
-
- public async execute({ embeddable, filters }: ActionContext) {
- if (!filters) {
- throw new TypeError('Applying a filter requires a filter as context');
- }
- siemFilterManager.addFilters(filters);
- }
-}
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx
index 26755ecd4b5f..de3e27d7646b 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.test.tsx
@@ -9,6 +9,7 @@ import toJson from 'enzyme-to-json';
import * as React from 'react';
import { EmbeddedMap } from './embedded_map';
import { SetQuery } from './types';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
jest.mock('../search_bar', () => ({
siemFilterManager: {
@@ -16,29 +17,19 @@ jest.mock('../search_bar', () => ({
},
}));
-jest.mock('ui/new_platform', () => ({
- npStart: {
- core: {
- injectedMetadata: {
- getKibanaVersion: () => '8.0.0',
- },
- },
- plugins: {
- uiActions: require('../../../../../../../src/plugins/ui_actions/public/mocks').uiActionsPluginMock.createSetupContract(),
- },
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: {
+ get$: () => 'world',
},
- npSetup: {
- core: {
- uiSettings: {
- get$: () => 'world',
- },
- },
- plugins: {
- uiActions: require('../../../../../../../src/plugins/ui_actions/public/mocks').uiActionsPluginMock.createStartContract(),
- },
+ injectedMetadata: {
+ getKibanaVersion: () => '8.0.0',
},
}));
+jest.mock('../../lib/compose/kibana_plugins');
+
describe('EmbeddedMap', () => {
let setQuery: SetQuery;
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx
index b66d3f7055a4..87e38e0fac2e 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx
@@ -7,7 +7,6 @@
import { EuiFlexGroup, EuiSpacer } from '@elastic/eui';
import { Filter } from '@kbn/es-query';
import React, { useEffect, useState } from 'react';
-import { npStart } from 'ui/new_platform';
import { SavedObjectFinder } from 'ui/saved_objects/components/saved_object_finder';
import { createPortalNode, InPortal } from 'react-reverse-portal';
import { Query } from 'src/plugins/data/common';
@@ -16,17 +15,20 @@ import styled from 'styled-components';
import { start } from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public/legacy';
import { EmbeddablePanel } from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public';
-import { Loader } from '../loader';
+import { getIndexPatternTitleIdMapping } from '../../hooks/api/helpers';
import { useIndexPatterns } from '../../hooks/use_index_patterns';
import { useKibanaUiSetting } from '../../lib/settings/use_kibana_ui_setting';
import { DEFAULT_INDEX_KEY } from '../../../common/constants';
+import { useKibanaPlugins } from '../../lib/compose/kibana_plugins';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
+import { useStateToaster } from '../toasters';
+import { Loader } from '../loader';
import { IndexPatternsMissingPrompt } from './index_patterns_missing_prompt';
import { MapEmbeddable, SetQuery } from './types';
import * as i18n from './translations';
-import { useStateToaster } from '../toasters';
+
import { createEmbeddable, displayErrorToast, setupEmbeddablesAPI } from './embedded_map_helpers';
import { MapToolTip } from './map_tool_tip/map_tool_tip';
-import { getIndexPatternTitleIdMapping } from '../../hooks/api/helpers';
const EmbeddableWrapper = styled(EuiFlexGroup)`
position: relative;
@@ -63,20 +65,24 @@ export const EmbeddedMap = React.memo(
// Search InPortal/OutPortal for implementation touch points
const portalNode = React.useMemo(() => createPortalNode(), []);
+ const plugins = useKibanaPlugins();
+ const core = useKibanaCore();
+
+ // Setup embeddables API (i.e. detach extra actions) useEffect
+ useEffect(() => {
+ try {
+ setupEmbeddablesAPI(plugins);
+ } catch (e) {
+ displayErrorToast(i18n.ERROR_CONFIGURING_EMBEDDABLES_API, e.message, dispatchToaster);
+ setIsLoading(false);
+ setIsError(true);
+ }
+ }, []);
+
// Initial Load useEffect
useEffect(() => {
let isSubscribed = true;
async function setupEmbeddable() {
- // Configure Embeddables API
- try {
- setupEmbeddablesAPI();
- } catch (e) {
- displayErrorToast(i18n.ERROR_CONFIGURING_EMBEDDABLES_API, e.message, dispatchToaster);
- setIsLoading(false);
- setIsError(true);
- return false;
- }
-
// Ensure at least one `siem:defaultIndex` index pattern exists before trying to import
const matchingIndexPatterns = kibanaIndexPatterns.filter(ip =>
siemDefaultIndices.includes(ip.attributes.title)
@@ -96,7 +102,8 @@ export const EmbeddedMap = React.memo(
startDate,
endDate,
setQuery,
- portalNode
+ portalNode,
+ plugins.embeddable
);
if (isSubscribed) {
setEmbeddable(embeddableObject);
@@ -154,12 +161,12 @@ export const EmbeddedMap = React.memo(
) : !isLoading && isIndexError ? (
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx
index 83c511384111..2ad38bae3cce 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.test.tsx
@@ -5,31 +5,26 @@
*/
import { createEmbeddable, displayErrorToast, setupEmbeddablesAPI } from './embedded_map_helpers';
-import { npStart } from 'ui/new_platform';
+import { createUiNewPlatformMock } from 'ui/new_platform/__mocks__/helpers';
import { createPortalNode } from 'react-reverse-portal';
+import { PluginsStart } from 'ui/new_platform/new_platform';
jest.mock('ui/new_platform');
jest.mock('../../lib/settings/use_kibana_ui_setting');
-jest.mock(
- '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public/legacy',
- () => ({
- start: {
- getEmbeddableFactory: () => ({
- createFromState: () => ({
- reload: jest.fn(),
- }),
- }),
- },
- })
-);
-
jest.mock('uuid', () => {
return {
v4: jest.fn(() => '9e1f72a9-7c73-4b7f-a562-09940f7daf4a'),
};
});
+const { npStart } = createUiNewPlatformMock();
+npStart.plugins.embeddable.getEmbeddableFactory = jest.fn().mockImplementation(() => ({
+ createFromState: () => ({
+ reload: jest.fn(),
+ }),
+}));
+
describe('embedded_map_helpers', () => {
describe('displayErrorToast', () => {
test('dispatches toast with correct title and message', () => {
@@ -50,10 +45,9 @@ describe('embedded_map_helpers', () => {
});
describe('setupEmbeddablesAPI', () => {
- test('attaches SIEM_FILTER_ACTION, and detaches extra UI actions', () => {
- setupEmbeddablesAPI();
- expect(npStart.plugins.uiActions.registerAction).toHaveBeenCalledTimes(1);
- expect(npStart.plugins.uiActions.detachAction).toHaveBeenCalledTimes(3);
+ test('detaches extra UI actions', () => {
+ setupEmbeddablesAPI((npStart.plugins as unknown) as PluginsStart);
+ expect(npStart.plugins.uiActions.detachAction).toHaveBeenCalledTimes(2);
});
});
@@ -67,7 +61,8 @@ describe('embedded_map_helpers', () => {
0,
0,
setQueryMock,
- createPortalNode()
+ createPortalNode(),
+ npStart.plugins.embeddable
);
expect(setQueryMock).toHaveBeenCalledTimes(1);
});
@@ -81,7 +76,8 @@ describe('embedded_map_helpers', () => {
0,
0,
setQueryMock,
- createPortalNode()
+ createPortalNode(),
+ npStart.plugins.embeddable
);
expect(setQueryMock.mock.calls[0][0].refetch).not.toBe(embeddable.reload);
setQueryMock.mock.results[0].value();
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx
index bd14e65f0980..7f514b0e53b7 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map_helpers.tsx
@@ -7,24 +7,23 @@
import { Filter } from '@kbn/es-query';
import uuid from 'uuid';
import React from 'react';
-import { npStart } from 'ui/new_platform';
import { OutPortal, PortalNode } from 'react-reverse-portal';
import { Query } from 'src/plugins/data/common';
+import { PluginsStart } from 'ui/new_platform/new_platform';
import { ActionToaster, AppToast } from '../toasters';
-import { start } from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public/legacy';
import {
- APPLY_FILTER_TRIGGER,
CONTEXT_MENU_TRIGGER,
PANEL_BADGE_TRIGGER,
- APPLY_FILTER_ACTION,
ViewMode,
} from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public';
import {
- APPLY_SIEM_FILTER_ACTION_ID,
- ApplySiemFilterAction,
-} from './actions/apply_siem_filter_action';
-import { IndexPatternMapping, MapEmbeddable, RenderTooltipContentParams, SetQuery } from './types';
+ IndexPatternMapping,
+ MapEmbeddable,
+ RenderTooltipContentParams,
+ SetQuery,
+ EmbeddableApi,
+} from './types';
import { getLayerList } from './map_config';
// @ts-ignore Missing type defs as maps moves to Typescript
import { MAP_SAVED_OBJECT_TYPE } from '../../../../maps/common/constants';
@@ -59,23 +58,14 @@ export const displayErrorToast = (
* Temporary Embeddables API configuration override until ability to edit actions is addressed:
* https://github.com/elastic/kibana/issues/43643
*
- * @param applyFilterQueryFromKueryExpression function for updating KQL as provided by NetworkFilter
+ * @param plugins new platform plugins
*
- * @throws Error if action is already registered
+ * @throws Error if trigger/action doesn't exist
*/
-export const setupEmbeddablesAPI = () => {
+export const setupEmbeddablesAPI = (plugins: PluginsStart) => {
try {
- const actions = npStart.plugins.uiActions.getTriggerActions(APPLY_FILTER_TRIGGER);
- const actionLoaded = actions.some(a => a.id === APPLY_SIEM_FILTER_ACTION_ID);
- if (!actionLoaded) {
- const siemFilterAction = new ApplySiemFilterAction();
- npStart.plugins.uiActions.registerAction(siemFilterAction);
- npStart.plugins.uiActions.attachAction(APPLY_FILTER_TRIGGER, siemFilterAction.id);
-
- npStart.plugins.uiActions.detachAction(CONTEXT_MENU_TRIGGER, 'CUSTOM_TIME_RANGE');
- npStart.plugins.uiActions.detachAction(PANEL_BADGE_TRIGGER, 'CUSTOM_TIME_RANGE_BADGE');
- npStart.plugins.uiActions.detachAction(APPLY_FILTER_TRIGGER, APPLY_FILTER_ACTION);
- }
+ plugins.uiActions.detachAction(CONTEXT_MENU_TRIGGER, 'CUSTOM_TIME_RANGE');
+ plugins.uiActions.detachAction(PANEL_BADGE_TRIGGER, 'CUSTOM_TIME_RANGE_BADGE');
} catch (e) {
throw e;
}
@@ -84,12 +74,14 @@ export const setupEmbeddablesAPI = () => {
/**
* Creates MapEmbeddable with provided initial configuration
*
+ * @param filters any existing global filters
* @param indexPatterns list of index patterns to configure layers for
* @param query initial query constraints as Query
* @param startDate
* @param endDate
* @param setQuery function as provided by the GlobalTime component for reacting to refresh
* @param portalNode wrapper for MapToolTip so it is not rendered in the embeddables component tree
+ * @param embeddableApi
*
* @throws Error if EmbeddableFactory does not exist
*/
@@ -100,9 +92,10 @@ export const createEmbeddable = async (
startDate: number,
endDate: number,
setQuery: SetQuery,
- portalNode: PortalNode
+ portalNode: PortalNode,
+ embeddableApi: EmbeddableApi
): Promise => {
- const factory = start.getEmbeddableFactory(MAP_SAVED_OBJECT_TYPE);
+ const factory = embeddableApi.getEmbeddableFactory(MAP_SAVED_OBJECT_TYPE);
const state = {
layerList: getLayerList(indexPatterns),
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap
index 855760b29d2e..a6702a4ff6ed 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap
@@ -3,7 +3,6 @@
exports[`PointToolTipContent renders correctly against snapshot 1`] = `
`;
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx
index 8b9a86408ec0..b26ad1f9ffba 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/map_tool_tip.tsx
@@ -34,7 +34,6 @@ export const MapToolTip = React.memo(
const [isError, setIsError] = useState(false);
const [featureIndex, setFeatureIndex] = useState(0);
const [featureProps, setFeatureProps] = useState([]);
- const [featurePropsFilters, setFeaturePropsFilters] = useState>({});
const [featureGeometry, setFeatureGeometry] = useState(null);
const [, setLayerName] = useState('');
@@ -67,20 +66,7 @@ export const MapToolTip = React.memo(
getLayerName(layerId),
]);
- // Fetch ES filters in advance while loader is present to prevent lag when user clicks to add filter
- const featurePropsPromises = await Promise.all(
- featureProperties.map(property => property.getESFilters())
- );
- const featurePropsESFilters = featureProperties.reduce(
- (acc, property, index) => ({
- ...acc,
- [property._propertyKey]: featurePropsPromises[index],
- }),
- {}
- );
-
setFeatureProps(featureProperties);
- setFeaturePropsFilters(featurePropsESFilters);
setFeatureGeometry(featureGeo);
setLayerName(layerNameString);
} catch (e) {
@@ -135,8 +121,6 @@ export const MapToolTip = React.memo(
)}
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx
index 296935be34df..dca68fe7ab96 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { mount, shallow } from 'enzyme';
+import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import * as React from 'react';
import { FeatureProperty } from '../types';
@@ -27,10 +27,8 @@ describe('PointToolTipContent', () => {
getESFilters: () => new Promise(resolve => setTimeout(resolve)),
},
];
- const mockFeaturePropsFilters: Record = { 'host.name': {} };
test('renders correctly against snapshot', () => {
- const addFilters = jest.fn();
const closeTooltip = jest.fn();
const wrapper = shallow(
@@ -38,8 +36,6 @@ describe('PointToolTipContent', () => {
@@ -47,33 +43,6 @@ describe('PointToolTipContent', () => {
expect(toJson(wrapper)).toMatchSnapshot();
});
- test('tooltip closes when filter for value hover action is clicked', () => {
- const addFilters = jest.fn();
- const closeTooltip = jest.fn();
-
- const wrapper = mount(
-
-
-
- );
- wrapper
- .find(`[data-test-subj="hover-actions-${mockFeatureProps[0]._propertyKey}"]`)
- .first()
- .simulate('mouseenter');
- wrapper
- .find(`[data-test-subj="add-to-filter-${mockFeatureProps[0]._propertyKey}"]`)
- .first()
- .simulate('click');
- expect(closeTooltip).toHaveBeenCalledTimes(1);
- expect(addFilters).toHaveBeenCalledTimes(1);
- });
-
describe('#getRenderedFieldValue', () => {
test('it returns empty tag if value is empty', () => {
expect(getRenderedFieldValue('host.name', '')).toStrictEqual(getEmptyStringTag());
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx
index e2d21f00cb6a..cd286d82c1bf 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/map_tool_tip/point_tool_tip_content.tsx
@@ -5,11 +5,11 @@
*/
import React from 'react';
-import { EuiIcon, EuiToolTip } from '@elastic/eui';
-import * as i18n from '../translations';
import { sourceDestinationFieldMappings } from '../map_config';
-import { WithHoverActions } from '../../with_hover_actions';
-import { HoverActionsContainer } from '../../page/add_to_kql';
+import {
+ AddFilterToGlobalSearchBar,
+ createFilter,
+} from '../../page/add_filter_to_global_search_bar';
import { getEmptyTagValue, getOrEmptyTagFromValue } from '../../empty_value';
import { DescriptionListStyled } from '../../page';
import { FeatureProperty } from '../types';
@@ -19,51 +19,34 @@ import { DefaultFieldRenderer } from '../../field_renderers/field_renderers';
interface PointToolTipContentProps {
contextId: string;
featureProps: FeatureProperty[];
- featurePropsFilters: Record;
- addFilters?(filter: object): void;
closeTooltip?(): void;
}
export const PointToolTipContent = React.memo(
- ({ contextId, featureProps, featurePropsFilters, addFilters, closeTooltip }) => {
- const featureDescriptionListItems = featureProps.map(property => ({
- title: sourceDestinationFieldMappings[property._propertyKey],
- description: (
-
-
- {
- if (closeTooltip != null && addFilters != null) {
- closeTooltip();
- addFilters(featurePropsFilters[property._propertyKey]);
- }
- }}
- />
-
-
- }
- render={() =>
- property._rawValue != null ? (
+ ({ contextId, featureProps, closeTooltip }) => {
+ const featureDescriptionListItems = featureProps.map(
+ ({ _propertyKey: key, _rawValue: value }) => ({
+ title: sourceDestinationFieldMappings[key],
+ description: (
+
+ {value != null ? (
getRenderedFieldValue(property._propertyKey, item)}
+ rowItems={Array.isArray(value) ? value : [value]}
+ attrName={key}
+ idPrefix={`map-point-tooltip-${contextId}-${key}-${value}`}
+ render={item => getRenderedFieldValue(key, item)}
/>
) : (
getEmptyTagValue()
- )
- }
- />
- ),
- }));
+ )}
+
+ ),
+ })
+ );
return ;
}
diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts b/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts
index 7ab991aa7a8a..3a13753ba25e 100644
--- a/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts
+++ b/x-pack/legacy/plugins/siem/public/components/embeddables/types.ts
@@ -11,6 +11,7 @@ import {
EmbeddableInput,
EmbeddableOutput,
IEmbeddable,
+ EmbeddableFactory,
} from '../../../../../../../src/legacy/core_plugins/embeddable_api/public/np_ready/public';
import { inputsModel } from '../../store/inputs';
@@ -70,3 +71,8 @@ export interface RenderTooltipContentParams {
}
export type MapToolTipProps = Partial;
+
+export interface EmbeddableApi {
+ getEmbeddableFactory: (embeddableFactoryId: string) => EmbeddableFactory;
+ registerEmbeddableFactory: (id: string, factory: EmbeddableFactory) => void;
+}
diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx
index 96de698a6393..a97ef2cf5ca0 100644
--- a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.test.tsx
@@ -7,21 +7,23 @@
import { mount } from 'enzyme';
import React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
-import { npSetup } from 'ui/new_platform';
import { TestProviders } from '../../mock';
-import { MockNpSetUp, mockUiSettings } from '../../mock/ui_settings';
+import { mockUiSettings } from '../../mock/ui_settings';
import { wait } from '../../lib/helpers';
import { mockEventViewerResponse } from './mock';
import { StatefulEventsViewer } from '.';
import { defaultHeaders } from './default_headers';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
jest.mock('../../lib/settings/use_kibana_ui_setting');
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
const from = 1566943856794;
const to = 1566857456791;
diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx
index d8c8996b9af4..13f0666b3121 100644
--- a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx
@@ -5,7 +5,7 @@
*/
import { EuiPanel } from '@elastic/eui';
-import { Filter } from '@kbn/es-query';
+import { Filter, getEsQueryConfig } from '@kbn/es-query';
import { getOr, isEmpty, isEqual } from 'lodash/fp';
import React from 'react';
import styled from 'styled-components';
@@ -15,6 +15,7 @@ import { Query } from 'src/plugins/data/common';
import { BrowserFields } from '../../containers/source';
import { TimelineQuery } from '../../containers/timeline';
import { Direction } from '../../graphql/types';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { KqlMode } from '../../store/timeline/model';
import { AutoSizer } from '../auto_sizer';
import { HeaderPanel } from '../header_panel';
@@ -81,8 +82,9 @@ export const EventsViewer = React.memo(
toggleColumn,
}) => {
const columnsHeader = isEmpty(columns) ? defaultHeaders : columns;
-
+ const core = useKibanaCore();
const combinedQueries = combineQueries({
+ config: getEsQueryConfig(core.uiSettings),
dataProviders,
indexPattern,
browserFields,
diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx
index d6b65874a02e..671711c60bd1 100644
--- a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/index.test.tsx
@@ -8,15 +8,22 @@ import { mount } from 'enzyme';
import React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
-import { TestProviders } from '../../mock';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { wait } from '../../lib/helpers';
-import '../../mock/ui_settings';
+import { TestProviders } from '../../mock';
+import { mockUiSettings } from '../../mock/ui_settings';
import { mockEventViewerResponse } from './mock';
import { StatefulEventsViewer } from '.';
jest.mock('../../lib/settings/use_kibana_ui_setting');
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
+
const from = 1566943856794;
const to = 1566857456791;
diff --git a/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx b/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx
index c7912777c653..1045f9c52e5e 100644
--- a/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/field_renderers/field_renderers.tsx
@@ -10,6 +10,7 @@ import { getOr } from 'lodash/fp';
import React, { Fragment, useState } from 'react';
import { pure } from 'recompose';
+import styled from 'styled-components';
import {
AutonomousSystem,
FlowTarget,
@@ -25,6 +26,10 @@ import { HostDetailsLink, ReputationLink, VirusTotalLink, WhoIsLink } from '../l
import { Spacer } from '../page';
import * as i18n from '../page/network/ip_overview/translations';
+const DraggableContainerFlexGroup = styled(EuiFlexGroup)`
+ flex-grow: unset;
+`;
+
export const IpOverviewId = 'ip-overview';
/** The default max-height of the popover used to show "+n More" items (e.g. `+9 More`) */
@@ -182,7 +187,7 @@ export const DefaultFieldRenderer = pure(
});
return draggables.length > 0 ? (
-
+
{draggables}{' '}
{
(
moreMaxHeight={moreMaxHeight}
/>
}
-
+
) : (
getEmptyTagValue()
);
@@ -247,7 +252,7 @@ export const DefaultFieldRendererOverflow = React.memo {
const [isOpen, setIsOpen] = useState(false);
return (
- <>
+
{rowItems.length > overflowIndexStart && (
)}
- >
+
);
}
);
diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts b/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts
index 6c3b6444578d..130c326339b1 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts
+++ b/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts
@@ -99,9 +99,7 @@ export const useAnomaliesTableData = ({
maxRecords: 500,
maxExamples: 10,
},
- {
- 'kbn-version': kbnVersion,
- },
+ kbnVersion,
abortCtrl.signal
);
if (isSubscribed) {
diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts b/x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts
index 12c68467fe11..e66d984a1529 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts
+++ b/x-pack/legacy/plugins/siem/public/components/ml/api/anomalies_table_data.ts
@@ -6,8 +6,6 @@
import chrome from 'ui/chrome';
-import { useKibanaUiSetting } from '../../../lib/settings/use_kibana_ui_setting';
-import { DEFAULT_KBN_VERSION } from '../../../../common/constants';
import { Anomalies, InfluencerInput, CriteriaFields } from '../types';
import { throwIfNotOk } from '../../../hooks/api/api';
export interface Body {
@@ -25,10 +23,9 @@ export interface Body {
export const anomaliesTableData = async (
body: Body,
- headers: Record,
+ kbnVersion: string,
signal: AbortSignal
): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(`${chrome.getBasePath()}/api/ml/results/anomalies_table_data`, {
method: 'POST',
credentials: 'same-origin',
@@ -37,7 +34,7 @@ export const anomaliesTableData = async (
'kbn-system-api': 'true',
'content-Type': 'application/json',
'kbn-xsrf': kbnVersion,
- ...headers,
+ 'kbn-version': kbnVersion,
},
signal,
});
diff --git a/x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts b/x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts
index deec12aacfc4..c1654a1648f2 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts
+++ b/x-pack/legacy/plugins/siem/public/components/ml/api/get_ml_capabilities.ts
@@ -6,8 +6,6 @@
import chrome from 'ui/chrome';
-import { DEFAULT_KBN_VERSION } from '../../../../common/constants';
-import { useKibanaUiSetting } from '../../../lib/settings/use_kibana_ui_setting';
import { InfluencerInput, MlCapabilities } from '../types';
import { throwIfNotOk } from '../../../hooks/api/api';
@@ -25,10 +23,9 @@ export interface Body {
}
export const getMlCapabilities = async (
- headers: Record,
+ kbnVersion: string,
signal: AbortSignal
): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(`${chrome.getBasePath()}/api/ml/ml_capabilities`, {
method: 'GET',
credentials: 'same-origin',
@@ -36,7 +33,7 @@ export const getMlCapabilities = async (
'kbn-system-api': 'true',
'content-Type': 'application/json',
'kbn-xsrf': kbnVersion,
- ...headers,
+ 'kbn-version': kbnVersion,
},
signal,
});
diff --git a/x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx b/x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx
index f9522231f447..352f39a75ded 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/ml/permissions/ml_capabilities_provider.tsx
@@ -44,10 +44,7 @@ export const MlCapabilitiesProvider = React.memo<{ children: JSX.Element }>(({ c
async function fetchMlCapabilities() {
try {
- const mlCapabilities = await getMlCapabilities(
- { 'kbn-version': kbnVersion },
- abortCtrl.signal
- );
+ const mlCapabilities = await getMlCapabilities(kbnVersion, abortCtrl.signal);
if (isSubscribed) {
setCapabilities({ ...mlCapabilities, capabilitiesFetched: true });
}
diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx b/x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx
index 6f74df4aed38..8e7bedd8f872 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx
@@ -19,8 +19,6 @@ import {
StopDatafeedResponse,
} from './types';
import { throwIfErrorAttached, throwIfErrorAttachedToSetup } from '../ml/api/throw_if_not_ok';
-import { useKibanaUiSetting } from '../../lib/settings/use_kibana_ui_setting';
-import { DEFAULT_KBN_VERSION } from '../../../common/constants';
import { throwIfNotOk } from '../../hooks/api/api';
/**
@@ -32,10 +30,9 @@ import { throwIfNotOk } from '../../hooks/api/api';
*/
export const checkRecognizer = async ({
indexPatternName,
- headers = {},
+ kbnVersion,
signal,
}: CheckRecognizerProps): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(
`${chrome.getBasePath()}/api/ml/modules/recognize/${indexPatternName}`,
{
@@ -46,7 +43,6 @@ export const checkRecognizer = async ({
'content-type': 'application/json',
'kbn-version': kbnVersion,
'kbn-xsrf': kbnVersion,
- ...headers,
},
signal,
}
@@ -64,10 +60,9 @@ export const checkRecognizer = async ({
*/
export const getModules = async ({
moduleId = '',
- headers = {},
+ kbnVersion,
signal,
}: GetModulesProps): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(`${chrome.getBasePath()}/api/ml/modules/get_module/${moduleId}`, {
method: 'GET',
credentials: 'same-origin',
@@ -76,7 +71,6 @@ export const getModules = async ({
'content-type': 'application/json',
'kbn-version': kbnVersion,
'kbn-xsrf': kbnVersion,
- ...headers,
},
signal,
});
@@ -99,10 +93,9 @@ export const setupMlJob = async ({
indexPatternName = 'auditbeat-*',
jobIdErrorFilter = [],
groups = ['siem'],
+ kbnVersion,
prefix = '',
- headers = {},
}: MlSetupArgs): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(`${chrome.getBasePath()}/api/ml/modules/setup/${configTemplate}`, {
method: 'POST',
credentials: 'same-origin',
@@ -118,7 +111,6 @@ export const setupMlJob = async ({
'content-type': 'application/json',
'kbn-version': kbnVersion,
'kbn-xsrf': kbnVersion,
- ...headers,
},
});
await throwIfNotOk(response);
@@ -136,14 +128,13 @@ export const setupMlJob = async ({
*/
export const startDatafeeds = async ({
datafeedIds,
- headers,
+ kbnVersion,
start = 0,
}: {
datafeedIds: string[];
start: number;
- headers?: Record;
+ kbnVersion: string;
}): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(`${chrome.getBasePath()}/api/ml/jobs/force_start_datafeeds`, {
method: 'POST',
credentials: 'same-origin',
@@ -156,7 +147,6 @@ export const startDatafeeds = async ({
'content-type': 'application/json',
'kbn-version': kbnVersion,
'kbn-xsrf': kbnVersion,
- ...headers,
},
});
await throwIfNotOk(response);
@@ -173,12 +163,11 @@ export const startDatafeeds = async ({
*/
export const stopDatafeeds = async ({
datafeedIds,
- headers,
+ kbnVersion,
}: {
datafeedIds: string[];
- headers?: Record;
+ kbnVersion: string;
}): Promise<[StopDatafeedResponse | ErrorResponse, CloseJobsResponse]> => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const stopDatafeedsResponse = await fetch(`${chrome.getBasePath()}/api/ml/jobs/stop_datafeeds`, {
method: 'POST',
credentials: 'same-origin',
@@ -189,7 +178,6 @@ export const stopDatafeeds = async ({
'kbn-system-api': 'true',
'content-type': 'application/json',
'kbn-xsrf': kbnVersion,
- ...headers,
},
});
@@ -211,7 +199,6 @@ export const stopDatafeeds = async ({
'content-type': 'application/json',
'kbn-system-api': 'true',
'kbn-xsrf': kbnVersion,
- ...headers,
},
});
@@ -227,8 +214,10 @@ export const stopDatafeeds = async ({
*
* @param signal to cancel request
*/
-export const getJobsSummary = async (signal: AbortSignal): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
+export const getJobsSummary = async (
+ signal: AbortSignal,
+ kbnVersion: string
+): Promise => {
const response = await fetch(`${chrome.getBasePath()}/api/ml/jobs/jobs_summary`, {
method: 'POST',
credentials: 'same-origin',
diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx b/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx
index 89f995773e83..0bef34a7edc4 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx
@@ -13,7 +13,7 @@ import { MlCapabilitiesContext } from '../../ml/permissions/ml_capabilities_prov
import { useStateToaster } from '../../toasters';
import { errorToToaster } from '../../ml/api/error_to_toaster';
import { useKibanaUiSetting } from '../../../lib/settings/use_kibana_ui_setting';
-import { DEFAULT_INDEX_KEY } from '../../../../common/constants';
+import { DEFAULT_INDEX_KEY, DEFAULT_KBN_VERSION } from '../../../../common/constants';
import * as i18n from './translations';
import { createSiemJobs } from './use_siem_jobs_helpers';
@@ -34,6 +34,7 @@ export const useSiemJobs = (refetchData: boolean): Return => {
const capabilities = useContext(MlCapabilitiesContext);
const userPermissions = hasMlUserPermissions(capabilities);
const [siemDefaultIndex] = useKibanaUiSetting(DEFAULT_INDEX_KEY);
+ const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const [, dispatchToaster] = useStateToaster();
useEffect(() => {
@@ -46,9 +47,13 @@ export const useSiemJobs = (refetchData: boolean): Return => {
try {
// Batch fetch all installed jobs, ML modules, and check which modules are compatible with siemDefaultIndex
const [jobSummaryData, modulesData, compatibleModules] = await Promise.all([
- getJobsSummary(abortCtrl.signal),
- getModules({ signal: abortCtrl.signal }),
- checkRecognizer({ indexPatternName: siemDefaultIndex, signal: abortCtrl.signal }),
+ getJobsSummary(abortCtrl.signal, kbnVersion),
+ getModules({ signal: abortCtrl.signal, kbnVersion }),
+ checkRecognizer({
+ indexPatternName: siemDefaultIndex,
+ kbnVersion,
+ signal: abortCtrl.signal,
+ }),
]);
const compositeSiemJobs = createSiemJobs(jobSummaryData, modulesData, compatibleModules);
diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx b/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx
index 2c3bc469a51d..15e9c15744e9 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/ml_popover.tsx
@@ -23,6 +23,8 @@ import { errorToToaster } from '../ml/api/error_to_toaster';
import { METRIC_TYPE, TELEMETRY_EVENT, trackUiAction as track } from '../../lib/track_usage';
import { useSiemJobs } from './hooks/use_siem_jobs';
import { filterJobs } from './helpers';
+import { useKibanaUiSetting } from '../../lib/settings/use_kibana_ui_setting';
+import { DEFAULT_KBN_VERSION } from '../../../common/constants';
const PopoverContentsDiv = styled.div`
max-width: 684px;
@@ -93,6 +95,7 @@ export const MlPopover = React.memo(() => {
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
const [filterProperties, setFilterProperties] = useState(defaultFilterProps);
+ const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const [isLoadingSiemJobs, siemJobs] = useSiemJobs(refreshToggle);
const [, dispatchToaster] = useStateToaster();
const capabilities = useContext(MlCapabilitiesContext);
@@ -108,6 +111,7 @@ export const MlPopover = React.memo(() => {
indexPatternName: job.defaultIndexPattern,
jobIdErrorFilter: [job.id],
groups: job.groups,
+ kbnVersion,
});
} catch (error) {
errorToToaster({ title: i18n.CREATE_JOB_FAILURE, error, dispatchToaster });
@@ -125,14 +129,14 @@ export const MlPopover = React.memo(() => {
if (enable) {
const startTime = Math.max(latestTimestampMs, maxStartTime);
try {
- await startDatafeeds({ datafeedIds: [`datafeed-${job.id}`], start: startTime });
+ await startDatafeeds({ datafeedIds: [`datafeed-${job.id}`], kbnVersion, start: startTime });
} catch (error) {
track(METRIC_TYPE.COUNT, TELEMETRY_EVENT.JOB_ENABLE_FAILURE);
errorToToaster({ title: i18n.START_JOB_FAILURE, error, dispatchToaster });
}
} else {
try {
- await stopDatafeeds({ datafeedIds: [`datafeed-${job.id}`] });
+ await stopDatafeeds({ datafeedIds: [`datafeed-${job.id}`], kbnVersion });
} catch (error) {
track(METRIC_TYPE.COUNT, TELEMETRY_EVENT.JOB_DISABLE_FAILURE);
errorToToaster({ title: i18n.STOP_JOB_FAILURE, error, dispatchToaster });
diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts b/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts
index 203f4f646b62..88481e140cb0 100644
--- a/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts
+++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/types.ts
@@ -14,7 +14,7 @@ export interface Group {
export interface CheckRecognizerProps {
indexPatternName: string;
- headers?: Record;
+ kbnVersion: string;
signal: AbortSignal;
}
@@ -30,7 +30,7 @@ export interface RecognizerModule {
export interface GetModulesProps {
moduleId?: string;
- headers?: Record;
+ kbnVersion: string;
signal: AbortSignal;
}
@@ -97,7 +97,7 @@ export interface MlSetupArgs {
jobIdErrorFilter: string[];
groups: string[];
prefix?: string;
- headers?: Record;
+ kbnVersion: string;
}
/**
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap
new file mode 100644
index 000000000000..13f444f33547
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/__snapshots__/index.test.tsx.snap
@@ -0,0 +1,43 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`AddFilterToGlobalSearchBar Component Rendering 1`] = `
+
+
+ siem-kibana
+
+
+`;
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx
new file mode 100644
index 000000000000..7e5e53f575be
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.test.tsx
@@ -0,0 +1,57 @@
+/*
+ * 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 { createFilter } from './helpers';
+
+describe('helpers', () => {
+ describe('createFilter', () => {
+ test('returns valid filter when key and value are provided', () => {
+ const filter = createFilter('host.name', 'siem-xavier');
+ expect(filter).toEqual({
+ meta: {
+ alias: null,
+ disabled: false,
+ key: 'host.name',
+ negate: false,
+ params: { query: 'siem-xavier' },
+ type: 'phrase',
+ value: 'siem-xavier',
+ },
+ query: { match: { 'host.name': { query: 'siem-xavier', type: 'phrase' } } },
+ });
+ });
+
+ test('return valid exists filter when valid key and null value are provided', () => {
+ const filter = createFilter('host.name', null);
+ expect(filter).toEqual({
+ exists: { field: 'host.name' },
+ meta: {
+ alias: null,
+ disabled: false,
+ key: 'host.name',
+ negate: false,
+ type: 'exists',
+ value: 'exists',
+ },
+ });
+ });
+
+ test('return valid !exists filter when valid key and undefined value are provided', () => {
+ const filter = createFilter('host.name', undefined);
+ expect(filter).toEqual({
+ exists: { field: 'host.name' },
+ meta: {
+ alias: null,
+ disabled: false,
+ key: 'host.name',
+ negate: true,
+ type: 'exists',
+ value: 'exists',
+ },
+ });
+ });
+ });
+});
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts
new file mode 100644
index 000000000000..bd0859bac2d1
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/helpers.ts
@@ -0,0 +1,42 @@
+/*
+ * 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 const createFilter = (key: string, value: string | null | undefined) =>
+ value != null
+ ? {
+ meta: {
+ alias: null,
+ negate: false,
+ disabled: false,
+ type: 'phrase',
+ key,
+ value,
+ params: {
+ query: value,
+ },
+ },
+ query: {
+ match: {
+ [key]: {
+ query: value,
+ type: 'phrase',
+ },
+ },
+ },
+ }
+ : {
+ exists: {
+ field: key,
+ },
+ meta: {
+ alias: null,
+ disabled: false,
+ key,
+ negate: value === undefined,
+ type: 'exists',
+ value: 'exists',
+ },
+ };
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx
similarity index 88%
rename from x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.test.tsx
rename to x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx
index 1f5f20cfc923..34e2bc01a4ea 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.test.tsx
@@ -9,15 +9,10 @@ import { mount, shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import * as React from 'react';
-import {
- apolloClientObservable,
- mockGlobalState,
- TestProviders,
- mockIndexPattern,
-} from '../../../mock';
+import { apolloClientObservable, mockGlobalState, TestProviders } from '../../../mock';
import { createStore, State } from '../../../store';
import { siemFilterManager } from '../../search_bar';
-import { AddToKql } from '.';
+import { AddFilterToGlobalSearchBar } from '.';
interface MockSiemFilterManager {
addFilters: (filters: Filter[]) => void;
@@ -31,7 +26,7 @@ jest.mock('../../search_bar', () => ({
const mockAddFilters = jest.fn();
mockSiemFilterManager.addFilters = mockAddFilters;
-describe('AddToKql Component', () => {
+describe('AddFilterToGlobalSearchBar Component', () => {
const state: State = mockGlobalState;
let store = createStore(state, apolloClientObservable);
@@ -42,9 +37,7 @@ describe('AddToKql Component', () => {
test('Rendering', async () => {
const wrapper = shallow(
- {
}}
>
<>{'siem-kibana'}>
-
+
);
@@ -78,9 +71,7 @@ describe('AddToKql Component', () => {
test('Rendering tooltip', async () => {
const wrapper = shallow(
- {
}}
>
<>{'siem-kibana'}>
-
+
);
@@ -114,11 +105,12 @@ describe('AddToKql Component', () => {
});
test('Functionality with inputs state', async () => {
+ const onFilterAdded = jest.fn();
+
const wrapper = mount(
- {
}}
>
<>{'siem-kibana'}>
-
+
);
@@ -174,5 +166,6 @@ describe('AddToKql Component', () => {
},
},
});
+ expect(onFilterAdded).toHaveBeenCalledTimes(1);
});
});
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx
similarity index 54%
rename from x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.tsx
rename to x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx
index 2e3edb2c59a6..6f3b56417173 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/index.tsx
@@ -6,46 +6,36 @@
import { EuiIcon, EuiPanel, EuiToolTip } from '@elastic/eui';
import { Filter } from '@kbn/es-query';
-import { getOr } from 'lodash/fp';
import React from 'react';
-import { connect } from 'react-redux';
import styled from 'styled-components';
-import { StaticIndexPattern } from 'ui/index_patterns';
-import { Query } from 'src/plugins/data/common';
import { WithHoverActions } from '../../with_hover_actions';
-import { InputsModelId } from '../../../store/inputs/constants';
import { siemFilterManager } from '../../search_bar';
import * as i18n from './translations';
-import { filterQuerySelector } from '../../search_bar/selectors';
-import { State } from '../../../store';
-import { InputsRange } from '../../../store/inputs/model';
export * from './helpers';
-interface AddToKqlRedux {
- query: Query;
-}
-
interface OwnProps {
- id: InputsModelId;
children: JSX.Element;
- indexPattern: StaticIndexPattern;
filter: Filter;
+ onFilterAdded?: () => void;
}
-const AddToKqlComponent = React.memo(
- ({ children, id, indexPattern, filter, query }) => {
+export const AddFilterToGlobalSearchBar = React.memo(
+ ({ children, filter, onFilterAdded }) => {
const addToKql = () => {
siemFilterManager.addFilters(filter);
+ if (onFilterAdded != null) {
+ onFilterAdded();
+ }
};
return (
-
+
}
@@ -55,7 +45,7 @@ const AddToKqlComponent = React.memo(
}
);
-AddToKqlComponent.displayName = 'AddToKqlComponent';
+AddFilterToGlobalSearchBar.displayName = 'AddFilterToGlobalSearchBar';
export const HoverActionsContainer = styled(EuiPanel)`
align-items: center;
@@ -69,15 +59,3 @@ export const HoverActionsContainer = styled(EuiPanel)`
width: 30px;
cursor: pointer;
`;
-
-const makeMapStateToProps = () => {
- const getFilterQuerySelector = filterQuerySelector();
- return (state: State, { id }: OwnProps) => {
- const inputsRange: InputsRange = getOr({}, `inputs.${id}`, state);
- return {
- query: getFilterQuerySelector(inputsRange),
- };
- };
-};
-
-export const AddToKql = connect(makeMapStateToProps)(AddToKqlComponent);
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/translations.ts b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts
similarity index 61%
rename from x-pack/legacy/plugins/siem/public/components/page/add_to_kql/translations.ts
rename to x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts
index 82f6ddd44e8c..81772527e59d 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/translations.ts
+++ b/x-pack/legacy/plugins/siem/public/components/page/add_filter_to_global_search_bar/translations.ts
@@ -6,6 +6,9 @@
import { i18n } from '@kbn/i18n';
-export const FILTER_FOR_VALUE = i18n.translate('xpack.siem.add_to_kql.filterForValueHoverAction', {
- defaultMessage: 'Filter for value',
-});
+export const FILTER_FOR_VALUE = i18n.translate(
+ 'xpack.siem.add_filter_to_global_search_bar.filterForValueHoverAction',
+ {
+ defaultMessage: 'Filter for value',
+ }
+);
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/__snapshots__/index.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/__snapshots__/index.test.tsx.snap
deleted file mode 100644
index 823ed972d4a2..000000000000
--- a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/__snapshots__/index.test.tsx.snap
+++ /dev/null
@@ -1,135 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`AddToKql Component Rendering 1`] = `
-
-
- siem-kibana
-
-
-`;
diff --git a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/helpers.ts b/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/helpers.ts
deleted file mode 100644
index 4be2a6be55fc..000000000000
--- a/x-pack/legacy/plugins/siem/public/components/page/add_to_kql/helpers.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 const createFilter = (key: string, value: string) => ({
- meta: {
- alias: null,
- negate: false,
- disabled: false,
- type: 'phrase',
- key,
- value,
- params: {
- query: value,
- },
- },
- query: {
- match: {
- [key]: {
- query: value,
- type: 'phrase',
- },
- },
- },
-});
diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap
index c320ab1be2d8..4c84aa15fd4c 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap
+++ b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/__snapshots__/index.test.tsx.snap
@@ -1,169 +1,181 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Hosts Table rendering it renders the default Hosts table 1`] = `
-
+
+ fakeTotalCount={50}
+ id="hostsQuery"
+ indexPattern={
+ Object {
+ "fields": Array [
+ Object {
+ "aggregatable": true,
+ "name": "@timestamp",
+ "searchable": true,
+ "type": "date",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "@version",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.ephemeral_id",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.hostname",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.id",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test1",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test2",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test3",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test4",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test5",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test6",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test7",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "agent.test8",
+ "searchable": true,
+ "type": "string",
+ },
+ Object {
+ "aggregatable": true,
+ "name": "host.name",
+ "searchable": true,
+ "type": "string",
+ },
+ ],
+ "title": "filebeat-*,auditbeat-*,packetbeat-*",
+ }
+ }
+ isInspect={false}
+ loadPage={[MockFunction]}
+ loading={false}
+ showMorePagesIndicator={true}
+ totalCount={4}
+ type="page"
+ />
+
`;
diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx
index 216c76fa9296..b626df58b007 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/columns.tsx
@@ -7,9 +7,6 @@
import { EuiIcon, EuiToolTip } from '@elastic/eui';
import moment from 'moment';
import React from 'react';
-import { StaticIndexPattern } from 'ui/index_patterns';
-
-import { hostsModel } from '../../../../store';
import { DragEffects, DraggableWrapper } from '../../../drag_and_drop/draggable_wrapper';
import { escapeDataProviderId } from '../../../drag_and_drop/helpers';
import { getEmptyTagValue } from '../../../empty_value';
@@ -18,15 +15,12 @@ import { HostDetailsLink } from '../../../links';
import { LocalizedDateTooltip } from '../../../localized_date_tooltip';
import { IS_OPERATOR } from '../../../timeline/data_providers/data_provider';
import { Provider } from '../../../timeline/data_providers/provider';
-import { AddToKql, createFilter } from '../../add_to_kql';
+import { AddFilterToGlobalSearchBar, createFilter } from '../../add_filter_to_global_search_bar';
import { HostsTableColumns } from './';
import * as i18n from './translations';
-export const getHostsColumns = (
- type: hostsModel.HostsType,
- indexPattern: StaticIndexPattern
-): HostsTableColumns => [
+export const getHostsColumns = (): HostsTableColumns => [
{
field: 'node.host.name',
name: i18n.NAME,
@@ -54,13 +48,9 @@ export const getHostsColumns = (
) : (
-
+
-
+
)
}
/>
@@ -103,13 +93,9 @@ export const getHostsColumns = (
render: hostOsName => {
if (hostOsName != null) {
return (
-
+
<>{hostOsName}>
-
+
);
}
return getEmptyTagValue();
@@ -124,13 +110,9 @@ export const getHostsColumns = (
render: hostOsVersion => {
if (hostOsVersion != null) {
return (
-
+
<>{hostOsVersion}>
-
+
);
}
return getEmptyTagValue();
diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx
index 90d7a9c613dc..44898e7a307f 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.test.tsx
@@ -9,8 +9,6 @@ import toJson from 'enzyme-to-json';
import { getOr } from 'lodash/fp';
import * as React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
-import { Provider as ReduxStoreProvider } from 'react-redux';
-import { npSetup } from 'ui/new_platform';
import {
apolloClientObservable,
@@ -18,15 +16,24 @@ import {
mockGlobalState,
TestProviders,
} from '../../../../mock';
-import { MockNpSetUp, mockUiSettings } from '../../../../mock/ui_settings';
+import { mockUiSettings } from '../../../../mock/ui_settings';
+import { useKibanaCore } from '../../../../lib/compose/kibana_core';
import { createStore, hostsModel, State } from '../../../../store';
import { HostsTableType } from '../../../../store/hosts/model';
import { HostsTable } from './index';
import { mockData } from './mock';
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
+
+// Test will fail because we will to need to mock some core services to make the test work
+// For now let's forget about SiemSearchBar
+jest.mock('../../../search_bar', () => ({
+ SiemSearchBar: () => null,
+}));
describe('Hosts Table', () => {
const loadPage = jest.fn();
@@ -41,7 +48,7 @@ describe('Hosts Table', () => {
describe('rendering', () => {
test('it renders the default Hosts table', () => {
const wrapper = shallow(
-
+
{
totalCount={mockData.Hosts.totalCount}
type={hostsModel.HostsType.page}
/>
-
+
);
expect(toJson(wrapper)).toMatchSnapshot();
diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx
index d4b3b5e87598..48eea4d5a611 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/hosts/hosts_table/index.tsx
@@ -130,7 +130,7 @@ const HostsTableComponent = React.memo(
}
};
- const hostsColumns = useMemo(() => getHostsColumns(type, indexPattern), [type, indexPattern]);
+ const hostsColumns = useMemo(() => getHostsColumns(), []);
const sorting = useMemo(() => getSorting(`${sortField}-${direction}`, sortField, direction), [
sortField,
diff --git a/x-pack/legacy/plugins/siem/public/components/page/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/index.tsx
index 8101e2c2ec8b..d211d1513767 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/index.tsx
@@ -32,6 +32,12 @@ export const DescriptionListStyled = styled(EuiDescriptionList)`
dt {
font-size: ${theme.eui.euiFontSizeXS} !important;
}
+ dd {
+ width: fit-content;
+ }
+ dd > div {
+ width: fit-content;
+ }
`}
`;
diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
index 8ab694df32c6..855c951fbcec 100644
--- a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
@@ -5,23 +5,18 @@
*/
import { cloneDeep } from 'lodash/fp';
-import { npSetup } from 'ui/new_platform';
import { mockIndexPattern } from '../../mock';
-import { mockUiSettings, MockNpSetUp } from '../../mock/ui_settings';
import { mockDataProviders } from './data_providers/mock/mock_data_providers';
import { buildGlobalQuery, combineQueries } from './helpers';
import { mockBrowserFields } from '../../containers/source/mock';
+import { EsQueryConfig } from '../../lib/keury';
const cleanUpKqlQuery = (str: string) => str.replace(/\n/g, '').replace(/\s\s+/g, ' ');
const startDate = new Date('2018-03-23T18:49:23.132Z').valueOf();
const endDate = new Date('2018-03-24T03:33:52.253Z').valueOf();
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
-
describe('Build KQL Query', () => {
test('Build KQL query with one data provider', () => {
const dataProviders = mockDataProviders.slice(0, 1);
@@ -122,9 +117,16 @@ describe('Build KQL Query', () => {
});
describe('Combined Queries', () => {
+ const config: EsQueryConfig = {
+ allowLeadingWildcards: true,
+ queryStringOptions: {},
+ ignoreFilterIfFieldNotInIndex: true,
+ dateFormatTZ: 'America/New_York',
+ };
test('No Data Provider & No kqlQuery & and isEventViewer is false', () => {
expect(
combineQueries({
+ config,
dataProviders: [],
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -141,6 +143,7 @@ describe('Combined Queries', () => {
const isEventViewer = true;
expect(
combineQueries({
+ config,
dataProviders: [],
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -160,6 +163,7 @@ describe('Combined Queries', () => {
test('Only Data Provider', () => {
const dataProviders = mockDataProviders.slice(0, 1);
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -179,6 +183,7 @@ describe('Combined Queries', () => {
dataProviders[0].queryMatch.field = '@timestamp';
dataProviders[0].queryMatch.value = '2018-03-23T23:36:23.232Z';
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -198,6 +203,7 @@ describe('Combined Queries', () => {
dataProviders[0].queryMatch.field = '@timestamp';
dataProviders[0].queryMatch.value = 1521848183232;
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -217,6 +223,7 @@ describe('Combined Queries', () => {
dataProviders[0].queryMatch.field = 'event.end';
dataProviders[0].queryMatch.value = '2018-03-23T23:36:23.232Z';
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -236,6 +243,7 @@ describe('Combined Queries', () => {
dataProviders[0].queryMatch.field = 'event.end';
dataProviders[0].queryMatch.value = 1521848183232;
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -252,6 +260,7 @@ describe('Combined Queries', () => {
test('Only KQL search/filter query', () => {
const { filterQuery } = combineQueries({
+ config,
dataProviders: [],
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -269,6 +278,7 @@ describe('Combined Queries', () => {
test('Data Provider & KQL search query', () => {
const dataProviders = mockDataProviders.slice(0, 1);
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -286,6 +296,7 @@ describe('Combined Queries', () => {
test('Data Provider & KQL filter query', () => {
const dataProviders = mockDataProviders.slice(0, 1);
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -305,6 +316,7 @@ describe('Combined Queries', () => {
dataProviders[0].and = mockDataProviders.slice(2, 4);
dataProviders[1].and = mockDataProviders.slice(4, 5);
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
@@ -324,6 +336,7 @@ describe('Combined Queries', () => {
dataProviders[0].and = mockDataProviders.slice(2, 4);
dataProviders[1].and = mockDataProviders.slice(4, 5);
const { filterQuery } = combineQueries({
+ config,
dataProviders,
indexPattern: mockIndexPattern,
browserFields: mockBrowserFields,
diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
index b56145d3a058..a18e4d7962e9 100644
--- a/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
@@ -10,7 +10,7 @@ import memoizeOne from 'memoize-one';
import { StaticIndexPattern } from 'ui/index_patterns';
import { Query } from 'src/plugins/data/common';
-import { escapeQueryValue, convertToBuildEsQuery } from '../../lib/keury';
+import { escapeQueryValue, convertToBuildEsQuery, EsQueryConfig } from '../../lib/keury';
import { DataProvider, DataProvidersAnd, EXISTS_OPERATOR } from './data_providers/data_provider';
import { BrowserFields } from '../../containers/source';
@@ -91,6 +91,7 @@ export const buildGlobalQuery = (dataProviders: DataProvider[], browserFields: B
.trim();
export const combineQueries = ({
+ config,
dataProviders,
indexPattern,
browserFields,
@@ -101,6 +102,7 @@ export const combineQueries = ({
end,
isEventViewer,
}: {
+ config: EsQueryConfig;
dataProviders: DataProvider[];
indexPattern: StaticIndexPattern;
browserFields: BrowserFields;
@@ -117,12 +119,12 @@ export const combineQueries = ({
} else if (isEmpty(dataProviders) && isEmpty(kqlQuery.query) && isEventViewer) {
kuery.query = `@timestamp >= ${start} and @timestamp <= ${end}`;
return {
- filterQuery: convertToBuildEsQuery({ queries: [kuery], indexPattern, filters }),
+ filterQuery: convertToBuildEsQuery({ config, queries: [kuery], indexPattern, filters }),
};
} else if (isEmpty(dataProviders) && !isEmpty(kqlQuery.query)) {
kuery.query = `(${kqlQuery.query}) and @timestamp >= ${start} and @timestamp <= ${end}`;
return {
- filterQuery: convertToBuildEsQuery({ queries: [kuery], indexPattern, filters }),
+ filterQuery: convertToBuildEsQuery({ config, queries: [kuery], indexPattern, filters }),
};
} else if (!isEmpty(dataProviders) && isEmpty(kqlQuery)) {
kuery.query = `(${buildGlobalQuery(
@@ -130,7 +132,7 @@ export const combineQueries = ({
browserFields
)}) and @timestamp >= ${start} and @timestamp <= ${end}`;
return {
- filterQuery: convertToBuildEsQuery({ queries: [kuery], indexPattern, filters }),
+ filterQuery: convertToBuildEsQuery({ config, queries: [kuery], indexPattern, filters }),
};
}
const operatorKqlQuery = kqlMode === 'filter' ? 'and' : 'or';
@@ -139,7 +141,7 @@ export const combineQueries = ({
kqlQuery.query as string
)}) and @timestamp >= ${start} and @timestamp <= ${end}`;
return {
- filterQuery: convertToBuildEsQuery({ queries: [kuery], indexPattern, filters }),
+ filterQuery: convertToBuildEsQuery({ config, queries: [kuery], indexPattern, filters }),
};
};
diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx
index 85986d2ed471..700489f47d0c 100644
--- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx
@@ -12,8 +12,10 @@ import { MockedProvider } from 'react-apollo/test-utils';
import { timelineQuery } from '../../containers/timeline/index.gql_query';
import { mockBrowserFields } from '../../containers/source/mock';
import { Direction } from '../../graphql/types';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { defaultHeaders, mockTimelineData, mockIndexPattern } from '../../mock';
import { TestProviders } from '../../mock/test_providers';
+import { mockUiSettings } from '../../mock/ui_settings';
import { flyoutHeaderHeight } from '../flyout';
import {
@@ -27,6 +29,12 @@ import { mockDataProviders } from './data_providers/mock/mock_data_providers';
const testFlyoutHeight = 980;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
+
describe('Timeline', () => {
const sort: Sort = {
columnId: '@timestamp',
diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx
index efab2ac52a0b..fb62b636398c 100644
--- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx
@@ -5,6 +5,7 @@
*/
import { EuiFlexGroup } from '@elastic/eui';
+import { getEsQueryConfig } from '@kbn/es-query';
import { getOr, isEmpty } from 'lodash/fp';
import * as React from 'react';
import styled from 'styled-components';
@@ -13,6 +14,7 @@ import { StaticIndexPattern } from 'ui/index_patterns';
import { BrowserFields } from '../../containers/source';
import { TimelineQuery } from '../../containers/timeline';
import { Direction } from '../../graphql/types';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { KqlMode } from '../../store/timeline/model';
import { AutoSizer } from '../auto_sizer';
import { ColumnHeader } from './body/column_headers/column_header';
@@ -111,7 +113,9 @@ export const Timeline = React.memo(
sort,
toggleColumn,
}) => {
+ const core = useKibanaCore();
const combinedQueries = combineQueries({
+ config: getEsQueryConfig(core.uiSettings),
dataProviders,
indexPattern,
browserFields,
diff --git a/x-pack/legacy/plugins/siem/public/containers/events/events_over_time/index.tsx b/x-pack/legacy/plugins/siem/public/containers/events/events_over_time/index.tsx
index 5ce445779255..6fde630c691b 100644
--- a/x-pack/legacy/plugins/siem/public/containers/events/events_over_time/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/events/events_over_time/index.tsx
@@ -50,12 +50,13 @@ class EventsOverTimeComponentQuery extends QueryTemplate<
public render() {
const {
children,
+ endDate,
filterQuery,
id = ID,
isInspected,
sourceId,
startDate,
- endDate,
+ timezone,
} = this.props;
return (
@@ -69,6 +70,7 @@ class EventsOverTimeComponentQuery extends QueryTemplate<
interval: '12h',
from: startDate!,
to: endDate!,
+ timezone,
},
defaultIndex: chrome.getUiSettingsClient().get(DEFAULT_INDEX_KEY),
inspect: isInspected,
diff --git a/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx b/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx
index 9cf7331441da..dac531365c87 100644
--- a/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/kuery_autocompletion/index.tsx
@@ -5,9 +5,9 @@
*/
import React, { useState } from 'react';
-import { npStart } from 'ui/new_platform';
import { StaticIndexPattern } from 'ui/index_patterns';
import { AutocompleteSuggestion } from '../../../../../../../src/plugins/data/public';
+import { useKibanaPlugins } from '../../lib/compose/kibana_plugins';
type RendererResult = React.ReactElement | null;
type RendererFunction = (args: RenderArgs) => Result;
@@ -26,23 +26,19 @@ interface KueryAutocompletionCurrentRequest {
cursorPosition: number;
}
-const getAutocompleteProvider = (language: string) =>
- npStart.plugins.data.autocomplete.getProvider(language);
-
export const KueryAutocompletion = React.memo(
({ children, indexPattern }) => {
const [currentRequest, setCurrentRequest] = useState(
null
);
-
const [suggestions, setSuggestions] = useState([]);
-
+ const plugins = useKibanaPlugins();
const loadSuggestions = async (
expression: string,
cursorPosition: number,
maxSuggestions?: number
) => {
- const autocompletionProvider = getAutocompleteProvider('kuery');
+ const autocompletionProvider = plugins.data.autocomplete.getProvider('kuery');
const config = {
get: () => true,
};
diff --git a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx b/x-pack/legacy/plugins/siem/public/containers/query_template.tsx
index b51eac492c48..035ebba5ae6b 100644
--- a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx
+++ b/x-pack/legacy/plugins/siem/public/containers/query_template.tsx
@@ -17,6 +17,7 @@ export interface QueryTemplateProps {
skip?: boolean;
sourceId: string;
startDate?: number;
+ timezone?: string;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FetchMoreOptionsArgs = FetchMoreQueryOptions &
diff --git a/x-pack/legacy/plugins/siem/public/graphql/introspection.json b/x-pack/legacy/plugins/siem/public/graphql/introspection.json
index 0348b283ed31..cc9438d67bd2 100644
--- a/x-pack/legacy/plugins/siem/public/graphql/introspection.json
+++ b/x-pack/legacy/plugins/siem/public/graphql/introspection.json
@@ -2351,6 +2351,12 @@
"ofType": { "kind": "SCALAR", "name": "Float", "ofType": null }
},
"defaultValue": null
+ },
+ {
+ "name": "timezone",
+ "description": "The default browser set time zone",
+ "type": { "kind": "SCALAR", "name": "String", "ofType": null },
+ "defaultValue": null
}
],
"interfaces": null,
diff --git a/x-pack/legacy/plugins/siem/public/graphql/types.ts b/x-pack/legacy/plugins/siem/public/graphql/types.ts
index 50fb6bd9e8a8..332592a64dfa 100644
--- a/x-pack/legacy/plugins/siem/public/graphql/types.ts
+++ b/x-pack/legacy/plugins/siem/public/graphql/types.ts
@@ -27,6 +27,8 @@ export interface TimerangeInput {
to: number;
/** The beginning of the timerange */
from: number;
+ /** The default browser set time zone */
+ timezone?: Maybe;
}
export interface PaginationInputPaginated {
diff --git a/x-pack/legacy/plugins/siem/public/hooks/api/api.tsx b/x-pack/legacy/plugins/siem/public/hooks/api/api.tsx
index b0493733a735..12282241247c 100644
--- a/x-pack/legacy/plugins/siem/public/hooks/api/api.tsx
+++ b/x-pack/legacy/plugins/siem/public/hooks/api/api.tsx
@@ -6,8 +6,6 @@
import chrome from 'ui/chrome';
-import { useKibanaUiSetting } from '../../lib/settings/use_kibana_ui_setting';
-import { DEFAULT_KBN_VERSION } from '../../../common/constants';
import * as i18n from '../translations';
import { parseJsonFromBody, ToasterErrors } from '../../components/ml/api/throw_if_not_ok';
import { IndexPatternResponse, IndexPatternSavedObject } from '../types';
@@ -24,9 +22,8 @@ const emptyIndexPattern: IndexPatternSavedObject[] = [];
*/
export const getIndexPatterns = async (
signal: AbortSignal,
- headers?: Record
+ kbnVersion: string
): Promise => {
- const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
const response = await fetch(
`${chrome.getBasePath()}/api/saved_objects/_find?type=index-pattern&fields=title&fields=type&per_page=10000`,
{
@@ -37,7 +34,6 @@ export const getIndexPatterns = async (
'kbn-xsrf': kbnVersion,
'kbn-version': kbnVersion,
'kbn-system-api': 'true',
- ...headers,
},
signal,
}
diff --git a/x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx b/x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx
index b7e899cc50f7..091315df314d 100644
--- a/x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx
+++ b/x-pack/legacy/plugins/siem/public/hooks/use_index_patterns.tsx
@@ -6,12 +6,14 @@
import { useEffect, useState } from 'react';
+import { DEFAULT_KBN_VERSION } from '../../common/constants';
import { useStateToaster } from '../components/toasters';
import { errorToToaster } from '../components/ml/api/error_to_toaster';
-
-import * as i18n from './translations';
import { IndexPatternSavedObject } from '../components/ml_popover/types';
+import { useKibanaUiSetting } from '../lib/settings/use_kibana_ui_setting';
+
import { getIndexPatterns } from './api/api';
+import * as i18n from './translations';
type Return = [boolean, IndexPatternSavedObject[]];
@@ -19,6 +21,7 @@ export const useIndexPatterns = (refreshToggle = false): Return => {
const [indexPatterns, setIndexPatterns] = useState([]);
const [isLoading, setIsLoading] = useState(true);
const [, dispatchToaster] = useStateToaster();
+ const [kbnVersion] = useKibanaUiSetting(DEFAULT_KBN_VERSION);
useEffect(() => {
let isSubscribed = true;
@@ -27,7 +30,7 @@ export const useIndexPatterns = (refreshToggle = false): Return => {
async function fetchIndexPatterns() {
try {
- const data = await getIndexPatterns(abortCtrl.signal);
+ const data = await getIndexPatterns(abortCtrl.signal, kbnVersion);
if (isSubscribed) {
setIndexPatterns(data);
diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_core.ts b/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_core.ts
new file mode 100644
index 000000000000..7511f65dfb30
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_core.ts
@@ -0,0 +1,13 @@
+/*
+ * 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 { createUiNewPlatformMock } from 'ui/new_platform/__mocks__/helpers';
+
+const npStart = createUiNewPlatformMock().npStart;
+
+export function useKibanaCore() {
+ return npStart.core;
+}
diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_plugins.ts b/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_plugins.ts
new file mode 100644
index 000000000000..ab255f7c73a0
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/lib/compose/__mocks__/kibana_plugins.ts
@@ -0,0 +1,13 @@
+/*
+ * 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 { createUiNewPlatformMock } from 'ui/new_platform/__mocks__/helpers';
+
+const npStart = createUiNewPlatformMock().npStart;
+
+export function useKibanaPlugins() {
+ return npStart.plugins;
+}
diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx
index 9a956ea885ad..00dfbcd8a4d8 100644
--- a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx
+++ b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_compose.tsx
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ILocationProvider } from 'angular';
import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import ApolloClient from 'apollo-client';
import { ApolloLink } from 'apollo-link';
@@ -32,19 +31,6 @@ export function compose(): AppFrontendLibs {
const apolloClient = new ApolloClient(graphQLOptions);
- const appModule = uiModules.get('app/siem');
-
- // disable angular's location provider
- appModule.config(($locationProvider: ILocationProvider) => {
- $locationProvider.html5Mode({
- enabled: false,
- requireBase: false,
- rewriteLinks: false,
- });
- });
-
- // const framework = new AppKibanaFrameworkAdapter(appModule, uiRoutes, timezoneProvider);
-
const libs: AppFrontendLibs = {
apolloClient,
};
diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_core.tsx b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_core.tsx
new file mode 100644
index 000000000000..f2fa261bf3eb
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_core.tsx
@@ -0,0 +1,25 @@
+/*
+ * 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, { createContext, useContext } from 'react';
+import { LegacyCoreStart } from 'src/core/public';
+
+interface CoreMountContext {
+ core: LegacyCoreStart;
+}
+
+// TODO: Replace CoreStart/CoreSetup with AppMountContext
+// see: https://github.com/elastic/kibana/pull/41007
+
+export const KibanaCoreContext = createContext({} as CoreMountContext['core']);
+
+export const KibanaCoreContextProvider: React.FC<{ core: CoreMountContext['core'] }> = props => (
+
+);
+
+export function useKibanaCore() {
+ return useContext(KibanaCoreContext);
+}
diff --git a/x-pack/legacy/plugins/siem/public/lib/compose/kibana_plugins.tsx b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_plugins.tsx
new file mode 100644
index 000000000000..7d1f1bc01edd
--- /dev/null
+++ b/x-pack/legacy/plugins/siem/public/lib/compose/kibana_plugins.tsx
@@ -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 React, { createContext, useContext } from 'react';
+import { PluginsStart } from 'ui/new_platform/new_platform';
+
+interface PluginsMountContext {
+ plugins: PluginsStart;
+}
+
+// TODO: Replace CoreStart/CoreSetup with AppMountContext
+// see: https://github.com/elastic/kibana/pull/41007
+
+export const KibanaPluginsContext = createContext({} as PluginsMountContext['plugins']);
+
+export const KibanaPluginsContextProvider: React.FC<{
+ plugins: PluginsMountContext['plugins'];
+}> = props => (
+
+);
+
+export function useKibanaPlugins() {
+ return useContext(KibanaPluginsContext);
+}
diff --git a/x-pack/legacy/plugins/siem/public/lib/keury/index.ts b/x-pack/legacy/plugins/siem/public/lib/keury/index.ts
index 2ded8923c4af..0c78fb9d6f45 100644
--- a/x-pack/legacy/plugins/siem/public/lib/keury/index.ts
+++ b/x-pack/legacy/plugins/siem/public/lib/keury/index.ts
@@ -4,16 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import {
- buildEsQuery,
- getEsQueryConfig,
- Filter,
- fromKueryExpression,
- toElasticsearchQuery,
-} from '@kbn/es-query';
+import { buildEsQuery, Filter, fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query';
import { isEmpty, isString, flow } from 'lodash/fp';
import { StaticIndexPattern } from 'ui/index_patterns';
-import { npSetup } from 'ui/new_platform';
import { Query } from 'src/plugins/data/common';
import { KueryFilterQuery } from '../../store';
@@ -74,23 +67,27 @@ export const escapeKuery = flow(
escapeWhitespace
);
+export interface EsQueryConfig {
+ allowLeadingWildcards: boolean;
+ queryStringOptions: unknown;
+ ignoreFilterIfFieldNotInIndex: boolean;
+ dateFormatTZ?: string | null;
+}
+
export const convertToBuildEsQuery = ({
+ config,
indexPattern,
queries,
filters,
}: {
+ config: EsQueryConfig;
indexPattern: StaticIndexPattern;
queries: Query[];
filters: Filter[];
}) => {
try {
return JSON.stringify(
- buildEsQuery(
- indexPattern,
- queries,
- filters.filter(f => f.meta.disabled === false),
- getEsQueryConfig(npSetup.core.uiSettings)
- )
+ buildEsQuery(indexPattern, queries, filters.filter(f => f.meta.disabled === false), config)
);
} catch (exp) {
return '';
diff --git a/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_setting.ts b/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_setting.ts
index 8f9eed15b196..086e142f77fb 100644
--- a/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_setting.ts
+++ b/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_setting.ts
@@ -5,11 +5,11 @@
*/
import { useCallback, useMemo } from 'react';
-import { npSetup, npStart } from 'ui/new_platform';
// @ts-ignore: path dynamic for kibana
import { timezoneProvider } from 'ui/vis/lib/timezone';
import { DEFAULT_KBN_VERSION, DEFAULT_TIMEZONE_BROWSER } from '../../../common/constants';
+import { useKibanaCore } from '../compose/kibana_core';
import { useObservable } from './use_observable';
type GenericValue = string | boolean | number;
@@ -31,8 +31,9 @@ type GenericValue = string | boolean | number;
* because the underlying `UiSettingsClient` doesn't support that.
*/
export const useKibanaUiSetting = (key: string, defaultValue?: GenericValue) => {
- const uiSettingsClient = npSetup.core.uiSettings;
- const uiInjectedMetadata = npStart.core.injectedMetadata;
+ const core = useKibanaCore();
+ const uiSettingsClient = core.uiSettings;
+ const uiInjectedMetadata = core.injectedMetadata;
if (key === DEFAULT_KBN_VERSION) {
return [uiInjectedMetadata.getKibanaVersion()];
diff --git a/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_settings.test.tsx b/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_settings.test.tsx
index 825cd8ecafaf..33f07411c8cb 100644
--- a/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_settings.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/lib/settings/use_kibana_ui_settings.test.tsx
@@ -7,23 +7,18 @@ import * as React from 'react';
import { DEFAULT_KBN_VERSION, DEFAULT_TIMEZONE_BROWSER } from '../../../common/constants';
import { HookWrapper } from '../../mock/hook_wrapper';
+import { useKibanaCore } from '../compose/kibana_core';
import { useKibanaUiSetting } from './use_kibana_ui_setting';
import { mount } from 'enzyme';
-jest.mock('ui/new_platform', () => ({
- npStart: {
- core: {
- injectedMetadata: {
- getKibanaVersion: () => '8.0.0',
- },
- },
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ injectedMetadata: {
+ getKibanaVersion: () => '8.0.0',
},
- npSetup: {
- core: {
- uiSettings: {
- get$: () => 'world',
- },
- },
+ uiSettings: {
+ get$: () => 'world',
},
}));
diff --git a/x-pack/legacy/plugins/siem/public/pages/home/index.tsx b/x-pack/legacy/plugins/siem/public/pages/home/index.tsx
index 037c90056829..da53ac8fceac 100644
--- a/x-pack/legacy/plugins/siem/public/pages/home/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/home/index.tsx
@@ -34,6 +34,13 @@ import { SiemPageName } from './types';
import { UseUrlState } from '../../components/url_state';
import { SpyRoute } from '../../utils/route/spy_routes';
+/*
+ * This is import is important to keep because if we do not have it
+ * we will loose the map embeddable until they move to the New Platform
+ * we need to have it
+ */
+import 'uiExports/embeddableFactories';
+
const WrappedByAutoSizer = styled.div`
height: 100%;
`;
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.test.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.test.tsx
index 5b4fadbbbc9a..83af0a616a66 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.test.tsx
@@ -8,17 +8,19 @@ import { shallow, mount } from 'enzyme';
import toJson from 'enzyme-to-json';
import React from 'react';
import { StaticIndexPattern } from 'ui/index_patterns';
-import { npSetup } from 'ui/new_platform';
import { mockIndexPattern } from '../../../mock/index_pattern';
import { TestProviders } from '../../../mock/test_providers';
-import { mockUiSettings, MockNpSetUp } from '../../../mock/ui_settings';
+import { mockUiSettings } from '../../../mock/ui_settings';
import { CommonChildren } from '../navigation/types';
import { HostDetailsBody } from './body';
+import { useKibanaCore } from '../../../lib/compose/kibana_core';
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
jest.mock('../../../containers/source', () => ({
indicesExistOrDataTemporarilyUnavailable: () => true,
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.tsx
index d0f8d8037d02..ae8ebcf41cd5 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/details/body.tsx
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { getEsQueryConfig } from '@kbn/es-query';
import React from 'react';
import { connect } from 'react-redux';
@@ -12,6 +13,7 @@ import { setAbsoluteRangeDatePicker as dispatchAbsoluteRangeDatePicker } from '.
import { scoreIntervalToDateTime } from '../../../components/ml/score/score_interval_to_datetime';
import { Anomaly } from '../../../components/ml/types';
import { convertToBuildEsQuery } from '../../../lib/keury';
+import { useKibanaCore } from '../../../lib/compose/kibana_core';
import { HostDetailsBodyComponentProps } from './types';
import { type, makeMapStateToProps } from './utils';
@@ -29,10 +31,12 @@ const HostDetailsBodyComponent = React.memo(
setQuery,
to,
}) => {
+ const core = useKibanaCore();
return (
{({ indicesExist, indexPattern }) => {
const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
indexPattern,
queries: [query],
filters: [
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
index 349ede915811..d1d29c3d2ea8 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
@@ -5,6 +5,7 @@
*/
import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui';
+import { getEsQueryConfig } from '@kbn/es-query';
import React, { useContext, useEffect } from 'react';
import { compose } from 'redux';
import { connect } from 'react-redux';
@@ -39,6 +40,7 @@ export { HostDetailsBody } from './body';
import { navTabsHostDetails } from './nav_tabs';
import { HostDetailsComponentProps } from './types';
import { makeMapStateToProps } from './utils';
+import { useKibanaCore } from '../../../lib/compose/kibana_core';
const HostOverviewManage = manageQuery(HostOverview);
const KpiHostDetailsManage = manageQuery(KpiHostsComponent);
@@ -59,11 +61,13 @@ const HostDetailsComponent = React.memo(
setHostDetailsTablesActivePageToZero(null);
}, [detailName]);
const capabilities = useContext(MlCapabilitiesContext);
+ const core = useKibanaCore();
return (
<>
{({ indicesExist, indexPattern }) => {
const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
indexPattern,
queries: [query],
filters: [
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx
index a04638a50941..5b6444148045 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.test.tsx
@@ -10,7 +10,6 @@ import * as React from 'react';
import { Router } from 'react-router-dom';
import { MockedProvider } from 'react-apollo/test-utils';
import { ActionCreator } from 'typescript-fsa';
-import { npSetup } from 'ui/new_platform';
import '../../mock/match_media';
@@ -18,22 +17,25 @@ import { SiemNavigation } from '../../components/navigation';
import { mocksSource } from '../../containers/source/mock';
import { wait } from '../../lib/helpers';
import { TestProviders } from '../../mock';
-import { MockNpSetUp, mockUiSettings } from '../../mock/ui_settings';
+import { mockUiSettings } from '../../mock/ui_settings';
import { InputsModelId } from '../../store/inputs/constants';
import { Hosts, HostsComponentProps } from './hosts';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
jest.mock('../../lib/settings/use_kibana_ui_setting');
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
+
jest.mock('ui/documentation_links', () => ({
documentationLinks: {
kibana: 'http://www.example.com',
},
}));
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
-
// Test will fail because we will to need to mock some core services to make the test work
// For now let's forget about SiemSearchBar
jest.mock('../../components/search_bar', () => ({
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
index 9197cb0e9a58..fc969974609e 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
@@ -5,7 +5,7 @@
*/
import { EuiSpacer } from '@elastic/eui';
-import { Filter } from '@kbn/es-query';
+import { Filter, getEsQueryConfig } from '@kbn/es-query';
import * as React from 'react';
import { compose } from 'redux';
import { connect } from 'react-redux';
@@ -35,6 +35,7 @@ import { SpyRoute } from '../../utils/route/spy_routes';
import { HostsEmptyPage } from './hosts_empty_page';
import { navTabsHosts } from './nav_tabs';
import * as i18n from './translations';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
const KpiHostsComponentManage = manageQuery(KpiHostsComponent);
@@ -51,7 +52,7 @@ interface HostsComponentDispatchProps {
}>;
}
-export type HostsQueryProps = GlobalTimeArgs;
+export type HostsQueryProps = { timezone?: string } & GlobalTimeArgs;
export type HostsComponentProps = HostsComponentReduxProps &
HostsComponentDispatchProps &
@@ -60,11 +61,13 @@ export type HostsComponentProps = HostsComponentReduxProps &
const HostsComponent = React.memo(
({ isInitializing, filters, from, query, setAbsoluteRangeDatePicker, setQuery, to }) => {
const capabilities = React.useContext(MlCapabilitiesContext);
+ const core = useKibanaCore();
return (
<>
{({ indicesExist, indexPattern }) => {
const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
indexPattern,
queries: [query],
filters,
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_body.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_body.tsx
index d8cd2b0c30fe..242c66bb3a9e 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_body.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/hosts_body.tsx
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { getEsQueryConfig } from '@kbn/es-query';
import React, { memo } from 'react';
import { connect } from 'react-redux';
@@ -11,6 +12,7 @@ import { scoreIntervalToDateTime } from '../../components/ml/score/score_interva
import { Anomaly } from '../../components/ml/types';
import { indicesExistOrDataTemporarilyUnavailable, WithSource } from '../../containers/source';
import { convertToBuildEsQuery } from '../../lib/keury';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { hostsModel, inputsSelectors, State } from '../../store';
import { setAbsoluteRangeDatePicker as dispatchSetAbsoluteRangeDatePicker } from '../../store/inputs/actions';
@@ -31,12 +33,15 @@ const HostsBodyComponent = memo(
query,
setAbsoluteRangeDatePicker,
setQuery,
+ timezone,
to,
}) => {
+ const core = useKibanaCore();
return (
{({ indicesExist, indexPattern }) => {
const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
indexPattern,
queries: [query],
filters,
@@ -50,6 +55,7 @@ const HostsBodyComponent = memo(
skip: isInitializing,
setQuery,
startDate: from,
+ timezone,
type: hostsModel.HostsType.page,
indexPattern,
narrowDateRange: (score: Anomaly, interval: string) => {
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx
index 6596d4c65c00..840c65af8229 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/index.tsx
@@ -20,6 +20,8 @@ import { HostsTableType } from '../../store/hosts/model';
import { GlobalTime } from '../../containers/global_time';
import { SiemPageName } from '../home/types';
import { Hosts } from './hosts';
+import { useKibanaUiSetting } from '../../lib/settings/use_kibana_ui_setting';
+import { DEFAULT_TIMEZONE_BROWSER } from '../../../common/constants';
const hostsPagePath = `/:pageName(${SiemPageName.hosts})`;
@@ -40,214 +42,223 @@ const getHostDetailsTabPath = (pagePath: string) =>
type Props = Partial> & { url: string };
-export const HostsContainer = React.memo(({ url }) => (
-
- {({ to, from, setQuery, deleteQuery, isInitializing }) => (
-
- (
- (
- <>
-
-
- >
- )}
- />
- )}
- />
- (
- <>
-
+export const HostsContainer = React.memo(({ url }) => {
+ const [timezone] = useKibanaUiSetting(DEFAULT_TIMEZONE_BROWSER);
+ return (
+
+ {({ to, from, setQuery, deleteQuery, isInitializing }) => (
+
+ (
(
-
+ <>
+
+
+ >
)}
/>
- (
-
- )}
- />
- (
-
- )}
- />
- (
-
- )}
+ )}
+ />
+ (
+ <>
+
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ >
+ )}
+ />
+ (
+ <>
+
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ (
+
+ )}
+ />
+ >
+ )}
+ />
+ (
+
- (
-
- )}
- />
- >
- )}
- />
- (
- <>
-
- (
-
- )}
- />
- (
-
- )}
- />
- (
-
- )}
- />
- (
-
- )}
- />
- (
-
- )}
+ )}
+ />
+ (
+
- >
- )}
- />
- (
-
- )}
- />
- (
-
- )}
- />
-
- )}
-
-));
+ )}
+ />
+
+ )}
+
+ );
+});
HostsContainer.displayName = 'HostsContainer';
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx
index a4f43f752cac..53bf73a1b9b7 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/events_query_tab_body.tsx
@@ -18,9 +18,10 @@ const EventsOverTimeManage = manageQuery(EventsOverTimeHistogram);
export const EventsQueryTabBody = ({
endDate,
- startDate,
- setQuery,
filterQuery,
+ setQuery,
+ startDate,
+ timezone,
updateDateRange = () => {},
}: HostsComponentsQueryProps) => {
return (
@@ -30,6 +31,7 @@ export const EventsQueryTabBody = ({
filterQuery={filterQuery}
sourceId="default"
startDate={startDate}
+ timezone={timezone}
type={hostsModel.HostsType.page}
>
{({ eventsOverTime, loading, id, inspect, refetch, totalCount }) => (
diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts
index d567038a05bd..552426602cdc 100644
--- a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts
+++ b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts
@@ -29,6 +29,7 @@ interface QueryTabBodyProps {
type: hostsModel.HostsType;
startDate: number;
endDate: number;
+ timezone?: string;
filterQuery?: string | ESTermQuery;
}
diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx
index a438fcbaa5c4..ed93061ba252 100644
--- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.test.tsx
@@ -11,14 +11,14 @@ import * as React from 'react';
import { Router } from 'react-router-dom';
import { MockedProvider } from 'react-apollo/test-utils';
import { ActionCreator } from 'typescript-fsa';
-import { npSetup } from 'ui/new_platform';
import '../../../mock/match_media';
import { mocksSource } from '../../../containers/source/mock';
import { FlowTarget } from '../../../graphql/types';
+import { useKibanaCore } from '../../../lib/compose/kibana_core';
import { apolloClientObservable, mockGlobalState, TestProviders } from '../../../mock';
-import { MockNpSetUp, mockUiSettings } from '../../../mock/ui_settings';
+import { mockUiSettings } from '../../../mock/ui_settings';
import { createStore, State } from '../../../store';
import { InputsModelId } from '../../../store/inputs/constants';
@@ -31,9 +31,11 @@ const pop: Action = 'POP';
type GlobalWithFetch = NodeJS.Global & { fetch: jest.Mock };
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
// Test will fail because we will to need to mock some core services to make the test work
// For now let's forget about SiemSearchBar
diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx
index 9e7ef2975e2b..824539cad8d5 100644
--- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx
@@ -5,6 +5,7 @@
*/
import { EuiHorizontalRule, EuiSpacer, EuiFlexItem } from '@elastic/eui';
+import { getEsQueryConfig } from '@kbn/es-query';
import React, { useCallback, useEffect } from 'react';
import { connect } from 'react-redux';
import { StickyContainer } from 'react-sticky';
@@ -38,6 +39,7 @@ import { TlsQueryTable } from './tls_query_table';
import { UsersQueryTable } from './users_query_table';
import { NetworkTopNFlowQueryTable } from './network_top_n_flow_query_table';
import { NetworkTopCountriesQueryTable } from './network_top_countries_query_table';
+import { useKibanaCore } from '../../../lib/compose/kibana_core';
const IpOverviewManage = manageQuery(IpOverview);
@@ -65,6 +67,7 @@ export const IPDetailsComponent = React.memo(
},
[scoreIntervalToDateTime, setAbsoluteRangeDatePicker]
);
+ const core = useKibanaCore();
useEffect(() => {
setIpDetailsTablesActivePageToZero(null);
@@ -76,6 +79,7 @@ export const IPDetailsComponent = React.memo(
{({ indicesExist, indexPattern }) => {
const ip = decodeIpv6(detailName);
const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
indexPattern,
queries: [query],
filters,
diff --git a/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx b/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx
index 9ab1bacf5625..a10118dc6ca6 100644
--- a/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/network/network.test.tsx
@@ -9,16 +9,15 @@ import { cloneDeep } from 'lodash/fp';
import * as React from 'react';
import { Router } from 'react-router-dom';
import { MockedProvider } from 'react-apollo/test-utils';
-import { npSetup } from 'ui/new_platform';
import '../../mock/match_media';
import { mocksSource } from '../../containers/source/mock';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
import { TestProviders } from '../../mock';
-import { mockUiSettings, MockNpSetUp } from '../../mock/ui_settings';
+import { mockUiSettings } from '../../mock/ui_settings';
import { Network } from './network';
-jest.mock('ui/new_platform');
jest.mock('../../lib/settings/use_kibana_ui_setting');
jest.mock('ui/documentation_links', () => ({
@@ -27,9 +26,11 @@ jest.mock('ui/documentation_links', () => ({
},
}));
-const mockNpSetup: MockNpSetUp = (npSetup as unknown) as MockNpSetUp;
-jest.mock('ui/new_platform');
-mockNpSetup.core.uiSettings = mockUiSettings;
+const mockUseKibanaCore = useKibanaCore as jest.Mock;
+jest.mock('../../lib/compose/kibana_core');
+mockUseKibanaCore.mockImplementation(() => ({
+ uiSettings: mockUiSettings,
+}));
// Test will fail because we will to need to mock some core services to make the test work
// For now let's forget about SiemSearchBar
diff --git a/x-pack/legacy/plugins/siem/public/pages/network/network.tsx b/x-pack/legacy/plugins/siem/public/pages/network/network.tsx
index f5e1892b6ec6..b10c09d65426 100644
--- a/x-pack/legacy/plugins/siem/public/pages/network/network.tsx
+++ b/x-pack/legacy/plugins/siem/public/pages/network/network.tsx
@@ -5,6 +5,7 @@
*/
import { EuiSpacer } from '@elastic/eui';
+import { getEsQueryConfig } from '@kbn/es-query';
import React from 'react';
import { connect } from 'react-redux';
import { StickyContainer } from 'react-sticky';
@@ -18,18 +19,17 @@ import { KpiNetworkComponent } from '../../components/page/network';
import { SiemNavigation } from '../../components/navigation';
import { SiemSearchBar } from '../../components/search_bar';
import { KpiNetworkQuery } from '../../containers/kpi_network';
-
import { indicesExistOrDataTemporarilyUnavailable, WithSource } from '../../containers/source';
import { LastEventIndexKey } from '../../graphql/types';
+import { useKibanaCore } from '../../lib/compose/kibana_core';
+import { convertToBuildEsQuery } from '../../lib/keury';
import { networkModel, State, inputsSelectors } from '../../store';
import { setAbsoluteRangeDatePicker as dispatchSetAbsoluteRangeDatePicker } from '../../store/inputs/actions';
import { SpyRoute } from '../../utils/route/spy_routes';
-import { NetworkEmptyPage } from './network_empty_page';
-import * as i18n from './translations';
-import { convertToBuildEsQuery } from '../../lib/keury';
import { navTabsNetwork, NetworkRoutes, NetworkRoutesLoading } from './navigation';
-
+import { NetworkEmptyPage } from './network_empty_page';
+import * as i18n from './translations';
import { NetworkComponentProps } from './types';
const KpiNetworkComponentManage = manageQuery(KpiNetworkComponent);
@@ -47,99 +47,103 @@ const NetworkComponent = React.memo(
isInitializing,
hasMlUserPermissions,
capabilitiesFetched,
- }) => (
- <>
-
- {({ indicesExist, indexPattern }) => {
- const filterQuery = convertToBuildEsQuery({
- indexPattern,
- queries: [query],
- filters,
- });
- return indicesExistOrDataTemporarilyUnavailable(indicesExist) ? (
-
-
-
-
-
- }
- title={i18n.PAGE_TITLE}
- />
-
-
-
-
- {({ kpiNetwork, loading, id, inspect, refetch }) => (
- {
- setAbsoluteRangeDatePicker({ id: 'global', from: min, to: max });
- }}
- />
+ }) => {
+ const core = useKibanaCore();
+ return (
+ <>
+
+ {({ indicesExist, indexPattern }) => {
+ const filterQuery = convertToBuildEsQuery({
+ config: getEsQueryConfig(core.uiSettings),
+ indexPattern,
+ queries: [query],
+ filters,
+ });
+ return indicesExistOrDataTemporarilyUnavailable(indicesExist) ? (
+
+
+
+
+
+ }
+ title={i18n.PAGE_TITLE}
+ />
+
+
+
+
+ {({ kpiNetwork, loading, id, inspect, refetch }) => (
+ {
+ setAbsoluteRangeDatePicker({ id: 'global', from: min, to: max });
+ }}
+ />
+ )}
+
+
+ {capabilitiesFetched && !isInitializing ? (
+ <>
+
+
+
+
+
+
+
+ >
+ ) : (
+
)}
-
-
- {capabilitiesFetched && !isInitializing ? (
- <>
-
-
-
-
-
-
-
- >
- ) : (
-
- )}
-
-
-
- ) : (
- <>
-
-
- >
- );
- }}
-
-
- >
- )
+
+
+
+ ) : (
+ <>
+
+
+ >
+ );
+ }}
+
+
+ >
+ );
+ }
);
NetworkComponent.displayName = 'NetworkComponent';
diff --git a/x-pack/legacy/plugins/siem/public/store/network/reducer.ts b/x-pack/legacy/plugins/siem/public/store/network/reducer.ts
index b2192a92fdf1..88adc118d51d 100644
--- a/x-pack/legacy/plugins/siem/public/store/network/reducer.ts
+++ b/x-pack/legacy/plugins/siem/public/store/network/reducer.ts
@@ -45,7 +45,7 @@ export const initialNetworkState: NetworkState = {
activePage: DEFAULT_TABLE_ACTIVE_PAGE,
limit: DEFAULT_TABLE_LIMIT,
sort: {
- field: NetworkTopTablesFields.bytes_out,
+ field: NetworkTopTablesFields.bytes_in,
direction: Direction.desc,
},
},
@@ -78,7 +78,7 @@ export const initialNetworkState: NetworkState = {
activePage: DEFAULT_TABLE_ACTIVE_PAGE,
limit: DEFAULT_TABLE_LIMIT,
sort: {
- field: NetworkTopTablesFields.bytes_out,
+ field: NetworkTopTablesFields.bytes_in,
direction: Direction.desc,
},
},
@@ -98,7 +98,7 @@ export const initialNetworkState: NetworkState = {
activePage: DEFAULT_TABLE_ACTIVE_PAGE,
limit: DEFAULT_TABLE_LIMIT,
sort: {
- field: NetworkTopTablesFields.bytes_out,
+ field: NetworkTopTablesFields.bytes_in,
direction: Direction.desc,
},
},
@@ -114,7 +114,7 @@ export const initialNetworkState: NetworkState = {
activePage: DEFAULT_TABLE_ACTIVE_PAGE,
limit: DEFAULT_TABLE_LIMIT,
sort: {
- field: NetworkTopTablesFields.bytes_out,
+ field: NetworkTopTablesFields.bytes_in,
direction: Direction.desc,
},
},
diff --git a/x-pack/legacy/plugins/siem/server/graphql/types.ts b/x-pack/legacy/plugins/siem/server/graphql/types.ts
index 776efeebd6dd..a87d321fc68d 100644
--- a/x-pack/legacy/plugins/siem/server/graphql/types.ts
+++ b/x-pack/legacy/plugins/siem/server/graphql/types.ts
@@ -29,6 +29,8 @@ export interface TimerangeInput {
to: number;
/** The beginning of the timerange */
from: number;
+ /** The default browser set time zone */
+ timezone?: Maybe;
}
export interface PaginationInputPaginated {
diff --git a/x-pack/legacy/plugins/siem/server/lib/events/query.events_over_time.dsl.ts b/x-pack/legacy/plugins/siem/server/lib/events/query.events_over_time.dsl.ts
index e655485638e1..357c1c24119b 100644
--- a/x-pack/legacy/plugins/siem/server/lib/events/query.events_over_time.dsl.ts
+++ b/x-pack/legacy/plugins/siem/server/lib/events/query.events_over_time.dsl.ts
@@ -8,7 +8,7 @@ import { RequestBasicOptions } from '../framework';
export const buildEventsOverTimeQuery = ({
filterQuery,
- timerange: { from, to },
+ timerange: { from, timezone, to },
defaultIndex,
sourceConfiguration: {
fields: { timestamp },
@@ -21,6 +21,7 @@ export const buildEventsOverTimeQuery = ({
[timestamp]: {
gte: from,
lte: to,
+ ...(timezone && { time_zone: timezone }),
},
},
},
diff --git a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
index 7f4860e74baf..e2782a135825 100644
--- a/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
+++ b/x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
@@ -400,9 +400,7 @@ describe.skip(' ', () => {
test('should invite the user to first register a repository', () => {
const { find, exists } = testBed;
- expect(find('emptyPrompt.title').text()).toBe(
- `You don't have any snapshots or repositories yet`
- );
+ expect(find('emptyPrompt.title').text()).toBe('Start by registering a repository');
expect(exists('emptyPrompt.registerRepositoryButton')).toBe(true);
});
});
diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_list.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_list.tsx
index a1688b8e3548..dfcf75b5b89a 100644
--- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_list.tsx
+++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_list.tsx
@@ -113,7 +113,7 @@ export const PolicyList: React.FunctionComponent
}
@@ -122,7 +122,7 @@ export const PolicyList: React.FunctionComponent
diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/repository_list/repository_list.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/repository_list/repository_list.tsx
index fb8eb7b771b8..5e3250f082fc 100644
--- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/repository_list/repository_list.tsx
+++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/repository_list/repository_list.tsx
@@ -99,7 +99,7 @@ export const RepositoryList: React.FunctionComponent
}
@@ -108,7 +108,7 @@ export const RepositoryList: React.FunctionComponent
diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/restore_list/restore_list.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/restore_list/restore_list.tsx
index dfbfcf27e6fa..ec4b8d9f19fb 100644
--- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/restore_list/restore_list.tsx
+++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/restore_list/restore_list.tsx
@@ -98,7 +98,7 @@ export const RestoreList: React.FunctionComponent = () => {
}
diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_list.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_list.tsx
index e10a528d8a96..642a12411e6f 100644
--- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_list.tsx
+++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/snapshot_list/snapshot_list.tsx
@@ -168,7 +168,7 @@ export const SnapshotList: React.FunctionComponent
}
@@ -177,7 +177,7 @@ export const SnapshotList: React.FunctionComponent
diff --git a/x-pack/legacy/plugins/transform/common/constants.ts b/x-pack/legacy/plugins/transform/common/constants.ts
index 3c6224c96d6f..c85408d3c5ce 100644
--- a/x-pack/legacy/plugins/transform/common/constants.ts
+++ b/x-pack/legacy/plugins/transform/common/constants.ts
@@ -24,40 +24,54 @@ export const PLUGIN = {
export const API_BASE_PATH = '/api/transform/';
-// Current df_admin permission requirements:
-// 1. `read` on source index
-// 2. `all` on source index to create and start transform
-// 3. `all` on dest index (could be less tbd)
-// 3. `monitor` cluster privilege
-// 4. builtin `data_frame_transforms_admin`
-// 5. builtin `kibana_user`
-// 6. builtin `data_frame_transforms_user` (although this is probably included in the admin)
+// In order to create a transform, the API requires the following privileges:
+// - transform_admin (builtin)
+// - cluster privileges: manage_transform
+// - index privileges:
+// - indices: .transform-notifications-*, .data-frame-notifications-*, .transform-notifications-read
+// - privileges: view_index_metadata, read
+// - transform_user (builtin)
+// - cluster privileges: monitor_transform
+// - index privileges:
+// - indices: .transform-notifications-*, .data-frame-notifications-*, .transform-notifications-read
+// - privileges: view_index_metadata, read
+// - source index: read, view_index_metadata (can be applied to a pattern e.g. farequote-*)
+// - dest index: index, create_index (can be applied to a pattern e.g. df-*)
+//
+// In the UI additional privileges are required:
+// - kibana_user (builtin)
+// - dest index: monitor (applied to df-*)
+// - cluster: monitor
+//
+// Note that users with kibana_user can see all Kibana index patterns and saved searches
+// in the source selection modal when creating a transform, but the wizard will trigger
+// error callouts when there are no sufficient privileges to read the actual source indices.
export const APP_CLUSTER_PRIVILEGES = [
- 'cluster:monitor/data_frame/get',
- 'cluster:monitor/data_frame/stats/get',
- 'cluster:admin/data_frame/delete',
- 'cluster:admin/data_frame/preview',
- 'cluster:admin/data_frame/put',
- 'cluster:admin/data_frame/start',
- 'cluster:admin/data_frame/start_task',
- 'cluster:admin/data_frame/stop',
+ 'cluster:monitor/transform/get',
+ 'cluster:monitor/transform/stats/get',
+ 'cluster:admin/transform/delete',
+ 'cluster:admin/transform/preview',
+ 'cluster:admin/transform/put',
+ 'cluster:admin/transform/start',
+ 'cluster:admin/transform/start_task',
+ 'cluster:admin/transform/stop',
];
// Equivalent of capabilities.canGetTransform
export const APP_GET_TRANSFORM_CLUSTER_PRIVILEGES = [
- 'cluster.cluster:monitor/data_frame/get',
- 'cluster.cluster:monitor/data_frame/stats/get',
+ 'cluster.cluster:monitor/transform/get',
+ 'cluster.cluster:monitor/transform/stats/get',
];
// Equivalent of capabilities.canGetTransform
export const APP_CREATE_TRANSFORM_CLUSTER_PRIVILEGES = [
- 'cluster.cluster:monitor/data_frame/get',
- 'cluster.cluster:monitor/data_frame/stats/get',
- 'cluster.cluster:admin/data_frame/preview',
- 'cluster.cluster:admin/data_frame/put',
- 'cluster.cluster:admin/data_frame/start',
- 'cluster.cluster:admin/data_frame/start_task',
+ 'cluster.cluster:monitor/transform/get',
+ 'cluster.cluster:monitor/transform/stats/get',
+ 'cluster.cluster:admin/transform/preview',
+ 'cluster.cluster:admin/transform/put',
+ 'cluster.cluster:admin/transform/start',
+ 'cluster.cluster:admin/transform/start_task',
];
export const APP_INDEX_PRIVILEGES = ['monitor'];
diff --git a/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.test.tsx b/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.test.tsx
index ffdb79a9d410..2a0ce8ca08be 100644
--- a/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.test.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.test.tsx
@@ -25,6 +25,8 @@ describe('ToastNotificationText', () => {
'a text message that is longer than 140 characters. a text message that is longer than 140 characters. a text message that is longer than 140 characters. ',
};
const { container } = render( );
- expect(container.textContent).toBe('View details');
+ expect(container.textContent).toBe(
+ 'a text message that is longer than 140 characters. a text message that is longer than 140 characters. a text message that is longer than 140 ...View details'
+ );
});
});
diff --git a/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.tsx b/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.tsx
index 15cb23415bb3..28bb9b268791 100644
--- a/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/components/toast_notification_text.tsx
@@ -35,7 +35,11 @@ export const ToastNotificationText: FC<{ text: any }> = ({ text }) => {
return text.message;
}
- const formattedText = text.message ? text.message : JSON.stringify(text, null, 2);
+ const unformattedText = text.message ? text.message : text;
+ const formattedText = typeof unformattedText === 'object' ? JSON.stringify(text, null, 2) : text;
+ const previewText = `${formattedText.substring(0, 140)}${
+ formattedText.length > 140 ? ' ...' : ''
+ }`;
const openModal = () => {
const modal = npStart.core.overlays.openModal(
@@ -65,6 +69,7 @@ export const ToastNotificationText: FC<{ text: any }> = ({ text }) => {
return (
<>
+
{previewText}
{i18n.translate('xpack.transform.toastText.openModalButtonText', {
defaultMessage: 'View details',
diff --git a/x-pack/legacy/plugins/transform/public/app/lib/authorization/components/authorization_provider.tsx b/x-pack/legacy/plugins/transform/public/app/lib/authorization/components/authorization_provider.tsx
index 84c7d616c19b..8060659c78b8 100644
--- a/x-pack/legacy/plugins/transform/public/app/lib/authorization/components/authorization_provider.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/lib/authorization/components/authorization_provider.tsx
@@ -64,25 +64,25 @@ export const AuthorizationProvider = ({ privilegesEndpoint, children }: Props) =
const hasPrivilege = hasPrivilegeFactory(value.privileges);
value.capabilities.canGetTransform =
- hasPrivilege(['cluster', 'cluster:monitor/data_frame/get']) &&
- hasPrivilege(['cluster', 'cluster:monitor/data_frame/stats/get']);
+ hasPrivilege(['cluster', 'cluster:monitor/transform/get']) &&
+ hasPrivilege(['cluster', 'cluster:monitor/transform/stats/get']);
- value.capabilities.canCreateTransform = hasPrivilege(['cluster', 'cluster:admin/data_frame/put']);
+ value.capabilities.canCreateTransform = hasPrivilege(['cluster', 'cluster:admin/transform/put']);
value.capabilities.canDeleteTransform = hasPrivilege([
'cluster',
- 'cluster:admin/data_frame/delete',
+ 'cluster:admin/transform/delete',
]);
value.capabilities.canPreviewTransform = hasPrivilege([
'cluster',
- 'cluster:admin/data_frame/preview',
+ 'cluster:admin/transform/preview',
]);
value.capabilities.canStartStopTransform =
- hasPrivilege(['cluster', 'cluster:admin/data_frame/start']) &&
- hasPrivilege(['cluster', 'cluster:admin/data_frame/start_task']) &&
- hasPrivilege(['cluster', 'cluster:admin/data_frame/stop']);
+ hasPrivilege(['cluster', 'cluster:admin/transform/start']) &&
+ hasPrivilege(['cluster', 'cluster:admin/transform/start_task']) &&
+ hasPrivilege(['cluster', 'cluster:admin/transform/stop']);
return (
{children}
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx
index 27234af868fb..504156b8b89b 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx
@@ -15,6 +15,7 @@ import {
EuiButtonIcon,
EuiCallOut,
EuiCheckbox,
+ EuiCodeBlock,
EuiCopy,
EuiFlexGroup,
EuiFlexItem,
@@ -142,7 +143,9 @@ export const SourceIndexPreview: React.SFC = React.memo(({ cellClick, que
color="danger"
iconType="cross"
>
- {errorMessage}
+
+ {errorMessage}
+
);
@@ -164,7 +167,7 @@ export const SourceIndexPreview: React.SFC = React.memo(({ cellClick, que
{i18n.translate('xpack.transform.sourceIndexPreview.SourceIndexNoDataCalloutBody', {
defaultMessage:
- 'The query for the source index returned no results. Please make sure the index contains documents and your query is not too restrictive.',
+ 'The query for the source index returned no results. Please make sure you have sufficient permissions, the index contains documents and your query is not too restrictive.',
})}
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/use_source_index_data.ts b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/use_source_index_data.ts
index 9d60e3550fd7..1f8f25d33e80 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/use_source_index_data.ts
+++ b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/source_index_preview/use_source_index_data.ts
@@ -32,6 +32,23 @@ export enum SOURCE_INDEX_STATUS {
ERROR,
}
+interface ErrorResponse {
+ error: {
+ body: string;
+ msg: string;
+ path: string;
+ query: any;
+ response: string;
+ statusCode: number;
+ };
+}
+
+const isErrorResponse = (arg: any): arg is ErrorResponse => {
+ return arg.error !== undefined;
+};
+
+type SourceIndexSearchResponse = ErrorResponse | SearchResponse;
+
export interface UseSourceIndexDataReturnType {
errorMessage: string;
status: SOURCE_INDEX_STATUS;
@@ -54,13 +71,17 @@ export const useSourceIndexData = (
setStatus(SOURCE_INDEX_STATUS.LOADING);
try {
- const resp: SearchResponse = await api.esSearch({
+ const resp: SourceIndexSearchResponse = await api.esSearch({
index: indexPattern.title,
size: SEARCH_SIZE,
// Instead of using the default query (`*`), fall back to a more efficient `match_all` query.
body: { query: isDefaultQuery(query) ? { match_all: {} } : query },
});
+ if (isErrorResponse(resp)) {
+ throw resp.error;
+ }
+
const docs = resp.hits.hits;
if (docs.length === 0) {
@@ -101,7 +122,7 @@ export const useSourceIndexData = (
if (e.message !== undefined) {
setErrorMessage(e.message);
} else {
- setErrorMessage(JSON.stringify(e));
+ setErrorMessage(JSON.stringify(e, null, 2));
}
setTableItems([]);
setStatus(SOURCE_INDEX_STATUS.ERROR);
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx
index 3f5ddc6238fa..47ce0f19f8f6 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_create/step_create_form.tsx
@@ -88,7 +88,16 @@ export const StepCreateForm: SFC = React.memo(
setCreated(true);
try {
- await api.createTransform(transformId, transformConfig);
+ const resp = await api.createTransform(transformId, transformConfig);
+
+ if (resp.errors !== undefined) {
+ if (Array.isArray(resp.errors) && resp.errors.length === 1) {
+ throw resp.errors[0];
+ }
+
+ throw resp.errors;
+ }
+
toastNotifications.addSuccess(
i18n.translate('xpack.transform.stepCreateForm.createTransformSuccessMessage', {
defaultMessage: 'Request to create transform {transformId} acknowledged.',
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_preview.tsx b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_preview.tsx
index 3ac87f61d4c8..bbfc6b11d361 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_preview.tsx
+++ b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/pivot_preview.tsx
@@ -12,12 +12,12 @@ import { i18n } from '@kbn/i18n';
import {
EuiButtonIcon,
EuiCallOut,
+ EuiCodeBlock,
EuiCopy,
EuiFlexGroup,
EuiFlexItem,
EuiPanel,
EuiProgress,
- EuiText,
EuiTitle,
} from '@elastic/eui';
@@ -102,24 +102,11 @@ interface ErrorMessageProps {
message: string;
}
-const ErrorMessage: SFC = ({ message }) => {
- const error = JSON.parse(message);
-
- const statusCodeLabel = i18n.translate('xpack.transform.pivotPreview.statusCodeLabel', {
- defaultMessage: 'Status code',
- });
-
- return (
-
-
- {(error.message &&
- error.statusCode &&
- `${statusCodeLabel}: ${error.statusCode}\n${error.message}`) ||
- message}
-
-
- );
-};
+const ErrorMessage: SFC = ({ message }) => (
+
+ {message}
+
+);
interface PivotPreviewProps {
aggs: PivotAggsConfigDict;
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/use_pivot_preview_data.ts b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/use_pivot_preview_data.ts
index 7f7d06a7d18e..17deb4db3199 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/use_pivot_preview_data.ts
+++ b/x-pack/legacy/plugins/transform/public/app/sections/create_transform/components/step_define/use_pivot_preview_data.ts
@@ -82,7 +82,7 @@ export const usePivotPreviewData = (
setPreviewMappings(resp.mappings);
setStatus(PIVOT_PREVIEW_STATUS.LOADED);
} catch (e) {
- setErrorMessage(JSON.stringify(e));
+ setErrorMessage(JSON.stringify(e, null, 2));
setPreviewData([]);
setPreviewMappings({ properties: {} });
setStatus(PIVOT_PREVIEW_STATUS.ERROR);
@@ -97,5 +97,6 @@ export const usePivotPreviewData = (
JSON.stringify(groupByArr),
JSON.stringify(query),
]);
+
return { errorMessage, status, previewData, previewMappings, previewRequest };
};
diff --git a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/__snapshots__/transform_management_section.test.tsx.snap b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/__snapshots__/transform_management_section.test.tsx.snap
index df8002cb7145..8348f93b3214 100644
--- a/x-pack/legacy/plugins/transform/public/app/sections/transform_management/__snapshots__/transform_management_section.test.tsx.snap
+++ b/x-pack/legacy/plugins/transform/public/app/sections/transform_management/__snapshots__/transform_management_section.test.tsx.snap
@@ -4,8 +4,8 @@ exports[`Transform: Minimal initialization 1`] =
diff --git a/x-pack/package.json b/x-pack/package.json
index 7f7b3e822bd0..bb77508f769b 100644
--- a/x-pack/package.json
+++ b/x-pack/package.json
@@ -133,7 +133,7 @@
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-adapter-utils": "^1.12.0",
"enzyme-to-json": "^3.3.4",
- "execa": "^1.0.0",
+ "execa": "^3.2.0",
"fancy-log": "^1.3.2",
"fetch-mock": "^7.3.9",
"graphql-code-generator": "^0.18.2",
@@ -310,7 +310,7 @@
"oboe": "^2.1.4",
"oppsy": "^2.0.0",
"papaparse": "^4.6.3",
- "pdfmake": "0.1.57",
+ "pdfmake": "^0.1.60",
"pluralize": "3.1.0",
"pngjs": "3.4.0",
"polished": "^1.9.2",
@@ -336,7 +336,7 @@
"react-redux": "^5.1.1",
"react-redux-request": "^1.5.6",
"react-resize-detector": "^4.2.0",
- "react-reverse-portal": "^1.0.2",
+ "react-reverse-portal": "^1.0.4",
"react-router-dom": "^4.3.1",
"react-select": "^1.2.1",
"react-shortcuts": "^2.0.0",
diff --git a/x-pack/plugins/features/server/oss_features.ts b/x-pack/plugins/features/server/oss_features.ts
index ff19df62bc3d..d70f72a7ff08 100644
--- a/x-pack/plugins/features/server/oss_features.ts
+++ b/x-pack/plugins/features/server/oss_features.ts
@@ -84,6 +84,7 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
'visualization',
'timelion-sheet',
'canvas-workpad',
+ 'lens',
'map',
],
},
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index d3d66cd10412..4ff145963788 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -6990,7 +6990,6 @@
"xpack.transform.transformList.stopActionName": "停止",
"xpack.transform.transformList.stopTransformSuccessMessage": "データフレームジョブ {transformId} が停止しました",
"xpack.transform.pivotPreview.copyClipboardTooltip": "ピボットプレビューの開発コンソールステートメントをクリップボードにコピーします。",
- "xpack.transform.pivotPreview.statusCodeLabel": "ステータスコード",
"xpack.transform.progress": "進捗",
"xpack.transform.sourceIndex": "ソースインデックス",
"xpack.transform.sourceIndexPreview.copyClipboardTooltip": "ソースインデックスプレビューの開発コンソールステートメントをクリップボードにコピーします。",
@@ -8797,7 +8796,6 @@
"xpack.server.checkLicense.errorExpiredMessage": "{licenseType} ライセンスが期限切れのため {pluginName} を使用できません",
"xpack.server.checkLicense.errorUnavailableMessage": "現在ライセンス情報が利用できないため {pluginName} を使用できません。",
"xpack.server.checkLicense.errorUnsupportedMessage": "ご使用の {licenseType} ライセンスは {pluginName} をサポートしていません。ライセンスをアップグレードしてください。",
- "xpack.siem.add_to_kql.filterForValueHoverAction": "値でフィルターします",
"xpack.siem.andOrBadge.and": "AND",
"xpack.siem.andOrBadge.or": "OR",
"xpack.siem.auditd.abortedAuditStartupDescription": "中断された監査のスタートアップ",
@@ -9319,7 +9317,6 @@
"xpack.siem.anomaliesTable.table.anomaliesTooltip": "異常表は SIEM グローバル KQL 検索でフィルタリングできません。",
"xpack.siem.anomaliesTable.table.unit": "{totalCount, plural, =1 {anomaly} other {anomalies}}",
"xpack.siem.clipboard.copy.to.the.clipboard": "クリップボードにコピー",
- "xpack.siem.components.embeddables.actions.applySiemFilterActionTitle": "フィルターを適用",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "インデックスパターンを編集",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription": "マップにイベントデータを表示するには、ECS に準拠した Kibana インデックスパターンを構成する必要があります。ビートを使用すると、次のセットアップコマンドを実行して必要な Kibana インデックスパターンを作成するか、Kibana の設定で手動により構成することができます。",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorTitle": "必要なインデックスパターンが構成されていません",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index c7448d0a7972..116a1f15a139 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -7148,7 +7148,6 @@
"xpack.transform.transformList.stopActionName": "停止",
"xpack.transform.transformList.stopTransformSuccessMessage": "数据帧作业 {transformId} 停止成功。",
"xpack.transform.pivotPreview.copyClipboardTooltip": "将透视预览的开发控制台语句复制到剪贴板。",
- "xpack.transform.pivotPreview.statusCodeLabel": "状态代码",
"xpack.transform.progress": "进度",
"xpack.transform.sourceIndex": "源索引",
"xpack.transform.sourceIndexPreview.copyClipboardTooltip": "将源索引预览的开发控制台语句复制到剪贴板。",
@@ -8954,7 +8953,6 @@
"xpack.server.checkLicense.errorExpiredMessage": "您不能使用 {pluginName},因为您的 {licenseType} 许可证已过期",
"xpack.server.checkLicense.errorUnavailableMessage": "您不能使用 {pluginName},因为许可证信息当前不可用。",
"xpack.server.checkLicense.errorUnsupportedMessage": "您的 {licenseType} 许可证不支持 {pluginName}。请升级您的许可。",
- "xpack.siem.add_to_kql.filterForValueHoverAction": "筛留值",
"xpack.siem.andOrBadge.and": "AND",
"xpack.siem.andOrBadge.or": "OR",
"xpack.siem.auditd.abortedAuditStartupDescription": "已中止审计启动",
@@ -9476,7 +9474,6 @@
"xpack.siem.anomaliesTable.table.anomaliesTooltip": "异常表无法通过 SIEM 全局 KQL 搜索进行筛选。",
"xpack.siem.anomaliesTable.table.unit": "{totalCount, plural, =1 {anomaly} other {anomalies}}",
"xpack.siem.clipboard.copy.to.the.clipboard": "复制到剪贴板",
- "xpack.siem.components.embeddables.actions.applySiemFilterActionTitle": "应用筛选",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorButtonLabel": "配置索引模式",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorDescription": "必须配置符合 ECS 的 Kibana 索引模式,才能查看地图上的数据。使用 Beats 时,您可以运行以下设置命令来创建所需的 Kibana 索引模式,否则只能在 Kibana 设置内手动配置。",
"xpack.siem.components.embeddables.indexPatternsMissingPrompt.errorTitle": "未配置所需的索引模式",
diff --git a/x-pack/test/api_integration/apis/siem/events_over_time.ts b/x-pack/test/api_integration/apis/siem/events_over_time.ts
index 10b81734b7b7..253dbbab77c3 100644
--- a/x-pack/test/api_integration/apis/siem/events_over_time.ts
+++ b/x-pack/test/api_integration/apis/siem/events_over_time.ts
@@ -29,6 +29,7 @@ export default function({ getService }: FtrProviderContext) {
interval: '12h',
to: TO,
from: FROM,
+ timezone: 'America/Denver',
},
defaultIndex: ['auditbeat-*', 'filebeat-*', 'packetbeat-*', 'winlogbeat-*'],
inspect: false,
@@ -69,6 +70,7 @@ export default function({ getService }: FtrProviderContext) {
interval: '12h',
to: TO,
from: FROM,
+ timezone: 'America/Denver',
},
defaultIndex: ['auditbeat-*', 'filebeat-*', 'packetbeat-*', 'winlogbeat-*'],
inspect: false,
diff --git a/x-pack/test/functional/apps/machine_learning/anomaly_detection/single_metric_job.ts b/x-pack/test/functional/apps/machine_learning/anomaly_detection/single_metric_job.ts
index b5b3d2371bf1..7da395d42ffd 100644
--- a/x-pack/test/functional/apps/machine_learning/anomaly_detection/single_metric_job.ts
+++ b/x-pack/test/functional/apps/machine_learning/anomaly_detection/single_metric_job.ts
@@ -232,7 +232,7 @@ export default function({ getService }: FtrProviderContext) {
it('pre-fills field and aggregation', async () => {
await ml.jobWizardCommon.assertAggAndFieldInputExists();
- await ml.jobWizardCommon.assertAggAndFieldSelection(aggAndFieldIdentifier);
+ await ml.jobWizardCommon.assertAggAndFieldSelection([aggAndFieldIdentifier]);
await ml.jobWizardCommon.assertAnomalyChartExists('LINE');
});
diff --git a/x-pack/test/functional/apps/monitoring/time_filter.js b/x-pack/test/functional/apps/monitoring/time_filter.js
index e4254b487adf..0afcada14be5 100644
--- a/x-pack/test/functional/apps/monitoring/time_filter.js
+++ b/x-pack/test/functional/apps/monitoring/time_filter.js
@@ -27,7 +27,8 @@ export default function ({ getService, getPageObjects }) {
await tearDown();
});
- it('should send another request when clicking Refresh', async () => {
+ // FLAKY: https://github.com/elastic/kibana/issues/48910
+ it.skip('should send another request when clicking Refresh', async () => {
await testSubjects.click('querySubmitButton');
const isLoading = await PageObjects.header.isGlobalLoadingIndicatorVisible();
expect(isLoading).to.be(true);
diff --git a/x-pack/test/functional/services/machine_learning/job_wizard_common.ts b/x-pack/test/functional/services/machine_learning/job_wizard_common.ts
index 08f1fb92d348..73764e8f3651 100644
--- a/x-pack/test/functional/services/machine_learning/job_wizard_common.ts
+++ b/x-pack/test/functional/services/machine_learning/job_wizard_common.ts
@@ -70,17 +70,16 @@ export function MachineLearningJobWizardCommonProvider({ getService }: FtrProvid
await testSubjects.existOrFail('mlJobWizardAggSelection > comboBoxInput');
},
- async assertAggAndFieldSelection(expectedIdentifier: string) {
+ async assertAggAndFieldSelection(expectedIdentifier: string[]) {
const comboBoxSelectedOptions = await comboBox.getComboBoxSelectedOptions(
'mlJobWizardAggSelection > comboBoxInput'
);
- expect(comboBoxSelectedOptions.length).to.eql(1);
- expect(comboBoxSelectedOptions[0]).to.eql(expectedIdentifier);
+ expect(comboBoxSelectedOptions).to.eql(expectedIdentifier);
},
async selectAggAndField(identifier: string, isIdentifierKeptInField: boolean) {
await comboBox.set('mlJobWizardAggSelection > comboBoxInput', identifier);
- await this.assertAggAndFieldSelection(isIdentifierKeptInField ? identifier : '');
+ await this.assertAggAndFieldSelection(isIdentifierKeptInField ? [identifier] : []);
},
async assertBucketSpanInputExists() {
diff --git a/yarn.lock b/yarn.lock
index 69953ec3d422..2513a0d34ed2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1064,13 +1064,12 @@
debug "^3.1.0"
lodash.once "^4.1.1"
-"@elastic/charts@^13.5.4":
- version "13.5.4"
- resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-13.5.4.tgz#b958639d485ed58d116ac66a16e4accef97919e0"
- integrity sha512-F+aE4VgJ7xvl9RmWtJiHZwADQT9FwBSWgQS1IR1VQ5wLyOI9LUwrDGZXMtLR56M7wjPWbk0228n5xPgjsuBcdg==
+"@elastic/charts@^13.5.7":
+ version "13.5.7"
+ resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-13.5.7.tgz#97ba458059613efd542ae68d7d2da059aac38484"
+ integrity sha512-8ibgrEJD3fpoLurB/DnNaWRmMGxAPHdtvCiPl1saPIjvlmGlrUNlXMneVgsPLqerNT0vuJDgqfQHHQcef/S2Hw==
dependencies:
"@types/d3-shape" "^1.3.1"
- "@types/luxon" "^1.11.1"
classnames "^2.2.6"
d3-array "^1.2.4"
d3-collection "^1.0.7"
@@ -1078,7 +1077,6 @@
d3-shape "^1.3.4"
fp-ts "^1.14.2"
konva "^2.6.0"
- luxon "^1.11.3"
mobx "^4.9.2"
mobx-react "^5.4.3"
newtype-ts "^0.2.4"
@@ -1240,16 +1238,14 @@
vscode-languageserver "^5.2.1"
vscode-languageserver-types "^3.14.0"
-"@elastic/makelogs@^4.5.0":
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/@elastic/makelogs/-/makelogs-4.5.0.tgz#d9256eb89fbfe7df9ff442cb31c598c5594370d7"
- integrity sha512-xf8pG6vYoztTJUIjJDxHVRpwzMfsruZ33GjwbkzvKr4C/ZN1fjk5/iZYAnoGkknZgWVB1YEwTdFdUBR9h7ejcg==
+"@elastic/makelogs@^5.0.0":
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/@elastic/makelogs/-/makelogs-5.0.0.tgz#0064e9009c4e480d17195ab70d627bc07635540f"
+ integrity sha512-QiKPR4DHwGH47O1kMuQIQkFCkepVIKrwP3nHUVbC//xMul7QgKRIogcQNTsZoMTGSIUrS80ngqHx+OVnd3t4Bg==
dependencies:
async "^1.4.2"
- bluebird "^2.10.0"
- elasticsearch "^15.2.0"
- inquirer "^0.11.1"
- lodash "~2.4.1"
+ elasticsearch "^16.4.0"
+ inquirer "^7.0.0"
moment "^2.10.6"
optimist "~0.6.1"
progress "^1.1.8"
@@ -3297,13 +3293,6 @@
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86"
integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==
-"@types/execa@^0.9.0":
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/@types/execa/-/execa-0.9.0.tgz#9b025d2755f17e80beaf9368c3f4f319d8b0fb93"
- integrity sha512-mgfd93RhzjYBUHHV532turHC2j4l/qxsF/PbfDmprHDEUHmNZGlDn1CEsulGK3AfsPdhkWzZQT/S/k0UGhLGsA==
- dependencies:
- "@types/node" "*"
-
"@types/fancy-log@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.1.tgz#dd94fbc8c2e2ab8ab402ca8d04bb8c34965f0696"
@@ -3643,11 +3632,6 @@
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03"
integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==
-"@types/luxon@^1.11.1":
- version "1.12.0"
- resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-1.12.0.tgz#acf14294d18e6eba427a5e5d7dfce0f5cd2a9400"
- integrity sha512-+UzPmwHSEEyv7aGlNkVpuFxp/BirXgl8NnPGCtmyx2KXIzAapoW3IqSVk87/Z3PUk8vEL8Pe1HXEMJbNBOQgtg==
-
"@types/mapbox-gl@^0.54.1":
version "0.54.3"
resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-0.54.3.tgz#6215fbf4dbb555d2ca6ce3be0b1de045eec0f967"
@@ -4644,11 +4628,25 @@ acorn-jsx@^5.0.2:
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384"
integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
+acorn-node@^1.3.0:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8"
+ integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==
+ dependencies:
+ acorn "^7.0.0"
+ acorn-walk "^7.0.0"
+ xtend "^4.0.2"
+
acorn-walk@^6.0.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913"
integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==
+acorn-walk@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.0.0.tgz#c8ba6f0f1aac4b0a9e32d1f0af12be769528f36b"
+ integrity sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==
+
acorn@5.X, acorn@^5.0.0, acorn@^5.0.3, acorn@^5.1.2, acorn@^5.5.0:
version "5.7.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
@@ -6717,11 +6715,6 @@ bluebird@3.5.5, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.5:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==
-bluebird@^2.10.0:
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
- integrity sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=
-
bluebird@^3.3.0, bluebird@^3.3.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
@@ -6945,6 +6938,16 @@ brfs@^1.3.0, brfs@^1.4.0:
static-module "^1.1.0"
through2 "^2.0.0"
+brfs@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/brfs/-/brfs-2.0.2.tgz#44237878fa82aa479ce4f5fe2c1796ec69f07845"
+ integrity sha512-IrFjVtwu4eTJZyu8w/V2gxU7iLTtcHih67sgEdzrhjLBMHp2uYefUBfdM4k2UvcuWMgV7PQDZHSLeNWnLFKWVQ==
+ dependencies:
+ quote-stream "^1.0.1"
+ resolve "^1.1.5"
+ static-module "^3.0.2"
+ through2 "^2.0.0"
+
brorand@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
@@ -8067,11 +8070,6 @@ cli-ux@^4.9.0:
treeify "^1.1.0"
tslib "^1.9.3"
-cli-width@^1.0.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d"
- integrity sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=
-
cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
@@ -9078,6 +9076,15 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0:
shebang-command "^1.2.0"
which "^1.2.9"
+cross-spawn@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14"
+ integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==
+ 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"
@@ -9744,7 +9751,7 @@ debug-fabulous@1.X:
memoizee "0.4.X"
object-assign "4.X"
-debug@2.6.9, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9:
+debug@2.6.9, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9, debug@~2.2.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
@@ -9779,13 +9786,6 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
dependencies:
ms "^2.1.1"
-debug@~2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
- integrity sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=
- dependencies:
- ms "0.7.1"
-
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
@@ -10580,7 +10580,7 @@ dragselect@1.13.1:
resolved "https://registry.yarnpkg.com/dragselect/-/dragselect-1.13.1.tgz#aa4166e1164b51ed5ee0cd89e0c5310a9c35be6a"
integrity sha512-spfUz6/sNnlY4fF/OxPBwaKLa5hVz6V+fq5XhVuD+h47RAkA75TMkfvr4AoWUh5Ufq3V1oIAbfu+sjc9QbewoA==
-duplexer2@^0.1.4:
+duplexer2@^0.1.4, duplexer2@~0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=
@@ -10713,15 +10713,6 @@ elasticsearch-browser@^16.4.0:
resolved "https://registry.yarnpkg.com/elasticsearch-browser/-/elasticsearch-browser-16.4.0.tgz#0e0b9b781f9f5207498085ce1d47d916ff46fb82"
integrity sha512-VILNtZQytYnT3mYit3SeN+SgjqOw4piZEhUrHjl7bNY1OGU7nwODtVj/rL7bc0pTmVAnDTtq0CBKE+ncjd+3hQ==
-elasticsearch@^15.2.0:
- version "15.2.0"
- resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-15.2.0.tgz#234362b5aa743d9c0a925566569ea7813b8f2569"
- integrity sha512-jOFcBoEh3Sn3gjUTozInODZTLriJtfppAUC7jnQCUE+OUj8o7GoAyC+L4h/L3ZxmXNFbQCunqVR+nmSofHdo9A==
- dependencies:
- agentkeepalive "^3.4.1"
- chalk "^1.0.0"
- lodash "^4.17.10"
-
elasticsearch@^16.4.0:
version "16.4.0"
resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-16.4.0.tgz#534d6d83a9e0cc3080bec92b89dac0eb1e4d4c73"
@@ -11087,7 +11078,7 @@ es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
es5-ext "^0.10.35"
es6-symbol "^3.1.1"
-es6-map@^0.1.3:
+es6-map@^0.1.3, es6-map@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0"
integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=
@@ -11121,7 +11112,7 @@ es6-promisify@^5.0.0:
dependencies:
es6-promise "^4.0.3"
-es6-set@~0.1.5:
+es6-set@^0.1.5, es6-set@~0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1"
integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=
@@ -11209,6 +11200,18 @@ escodegen@^1.8.0:
optionalDependencies:
source-map "~0.6.1"
+escodegen@^1.8.1:
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541"
+ integrity sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==
+ dependencies:
+ esprima "^3.1.3"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.6.1"
+
escodegen@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852"
@@ -11253,6 +11256,18 @@ escodegen@~1.3.2:
optionalDependencies:
source-map "~0.1.33"
+escodegen@~1.9.0:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2"
+ integrity sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==
+ dependencies:
+ esprima "^3.1.3"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.6.1"
+
escope@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3"
@@ -11654,6 +11669,11 @@ estraverse@~1.5.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.5.1.tgz#867a3e8e58a9f84618afb6c2ddbcd916b7cbaf71"
integrity sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=
+estree-is-function@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/estree-is-function/-/estree-is-function-1.0.0.tgz#c0adc29806d7f18a74db7df0f3b2666702e37ad2"
+ integrity sha512-nSCWn1jkSq2QAtkaVLJZY2ezwcFO161HVc174zL1KPW3RJ+O6C3eJb8Nx7OXzvhoEv+nLgSR1g71oWUHUDTrJA==
+
esutils@^2.0.0, esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -11815,6 +11835,22 @@ execa@^2.0.4:
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
+execa@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-3.2.0.tgz#18326b79c7ab7fbd6610fd900c1b9e95fa48f90a"
+ integrity sha512-kJJfVbI/lZE1PZYDI5VPxp8zXPO9rtxOkhpZ0jMKha56AI9y2gGVC6bkukStQf0ka5Rh15BA5m7cCCH4jmHqkw==
+ dependencies:
+ cross-spawn "^7.0.0"
+ get-stream "^5.0.0"
+ human-signals "^1.1.1"
+ is-stream "^2.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^4.0.0"
+ onetime "^5.1.0"
+ p-finally "^2.0.0"
+ signal-exit "^3.0.2"
+ strip-final-newline "^2.0.0"
+
execall@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execall/-/execall-1.0.0.tgz#73d0904e395b3cab0658b08d09ec25307f29bb73"
@@ -13251,6 +13287,11 @@ get-amd-module-type@^3.0.0:
ast-module-types "^2.3.2"
node-source-walk "^4.0.0"
+get-assigned-identifiers@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1"
+ integrity sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==
+
get-caller-file@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
@@ -15095,6 +15136,11 @@ https-proxy-agent@^2.2.2:
agent-base "^4.3.0"
debug "^3.1.0"
+human-signals@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
+ integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
+
humanize-ms@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed"
@@ -15150,6 +15196,13 @@ iconv-lite@0.4.23:
dependencies:
safer-buffer ">= 2.1.2 < 3"
+iconv-lite@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.5.0.tgz#59cdde0a2a297cc2aeb0c6445a195ee89f127550"
+ integrity sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
icss-replace-symbols@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
@@ -15431,25 +15484,6 @@ inquirer@6.5.0:
strip-ansi "^5.1.0"
through "^2.3.6"
-inquirer@^0.11.1:
- version "0.11.4"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.11.4.tgz#81e3374e8361beaff2d97016206d359d0b32fa4d"
- integrity sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=
- dependencies:
- ansi-escapes "^1.1.0"
- ansi-regex "^2.0.0"
- chalk "^1.0.0"
- cli-cursor "^1.0.1"
- cli-width "^1.0.1"
- figures "^1.3.5"
- lodash "^3.3.1"
- readline2 "^1.0.1"
- run-async "^0.1.0"
- rx-lite "^3.1.2"
- string-width "^1.0.1"
- strip-ansi "^3.0.0"
- through "^2.3.6"
-
inquirer@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e"
@@ -17887,6 +17921,15 @@ linebreak@^0.3.0:
brfs "^1.3.0"
unicode-trie "^0.3.0"
+linebreak@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-1.0.2.tgz#4b5781733e9a9eb2849dba2f963e47c887f8aa06"
+ integrity sha512-bJwSRsJeAmaZYnkcwl5sCQNfSDAhBuXxb6L27tb+qkBRtUQSSTUa5bcgCPD6hFEkRNlpWHfK7nFMmcANU7ZP1w==
+ dependencies:
+ base64-js "0.0.8"
+ brfs "^2.0.2"
+ unicode-trie "^1.0.0"
+
lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
@@ -18483,7 +18526,7 @@ lodash@4.17.11, lodash@4.17.15, lodash@>4.17.4, lodash@^4.0.0, lodash@^4.0.1, lo
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
-lodash@^3.10.1, lodash@^3.3.1:
+lodash@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=
@@ -18493,11 +18536,6 @@ lodash@^3.10.1, lodash@^3.3.1:
resolved "https://registry.yarnpkg.com/@elastic/lodash/-/lodash-3.10.1-kibana3.tgz#c0e318245219eeeff535895c429e0cef5058a9ad"
integrity sha512-HMfwwT2yAkEQNzHSR1BxgE5YcDMUaZ/skhNyjy1nvM/A4m0Kh940hLZeCqKBCsSaUJz/8A/9cQGd9BaAOCIBLg==
-lodash@~2.4.1:
- version "2.4.2"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e"
- integrity sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=
-
log-ok@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334"
@@ -18683,11 +18721,6 @@ lru-queue@0.1:
dependencies:
es5-ext "~0.10.2"
-luxon@^1.11.3:
- version "1.13.1"
- resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.13.1.tgz#b7fb7ba1e5c93ebda098af8d579314797e0a0d69"
- integrity sha512-IQKRIiz9ldUrgcozN13SAeNZVYfD3bEI9X6TcrGu+dkgE4GR/Iik03ozbTM5cTr0lz8ucYPL2jtYT7Va2Flbsg==
-
lz-string@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
@@ -18721,6 +18754,13 @@ madge@3.4.4:
rc "^1.2.7"
walkdir "^0.0.12"
+magic-string@^0.22.4:
+ version "0.22.5"
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e"
+ integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==
+ dependencies:
+ vlq "^0.2.2"
+
majo@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/majo/-/majo-0.4.1.tgz#5e6eeb9b63bda77e59d396b9c9ce4189ce6100bc"
@@ -19079,6 +19119,13 @@ merge-descriptors@1.0.1, merge-descriptors@~1.0.0:
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+merge-source-map@1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.4.tgz#a5de46538dae84d4114cc5ea02b4772a6346701f"
+ integrity sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=
+ dependencies:
+ source-map "^0.5.6"
+
merge-source-map@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
@@ -19665,11 +19712,6 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"
-ms@0.7.1:
- version "0.7.1"
- resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
- integrity sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=
-
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -20355,6 +20397,13 @@ npm-run-path@^3.0.0:
dependencies:
path-key "^3.0.0"
+npm-run-path@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.0.tgz#d644ec1bd0569187d2a52909971023a0a58e8438"
+ integrity sha512-8eyAOAH+bYXFPSnNnKr3J+yoybe8O87Is5rtAQ8qRczJz1ajcsjg8l2oZqP+Ppx15Ii3S1vUTjQN2h4YO2tWWQ==
+ dependencies:
+ path-key "^3.0.0"
+
npmconf@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/npmconf/-/npmconf-2.1.3.tgz#1cbe5dd02e899d365fed7260b54055473f90a15c"
@@ -20520,6 +20569,11 @@ object-inspect@~0.4.0:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-0.4.0.tgz#f5157c116c1455b243b06ee97703392c5ad89fec"
integrity sha1-9RV8EWwUVbJDsG7pdwM5LFrYn+w=
+object-inspect@~1.4.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.4.1.tgz#37ffb10e71adaf3748d05f713b4c9452f402cbc4"
+ integrity sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==
+
object-is@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
@@ -21482,7 +21536,7 @@ path-key@^2.0.0, path-key@^2.0.1:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
-path-key@^3.0.0:
+path-key@^3.0.0, path-key@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3"
integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==
@@ -21593,7 +21647,7 @@ pdfjs-dist@^2.0.943:
node-ensure "^0.0.0"
worker-loader "^2.0.0"
-pdfkit@^0.10.0:
+pdfkit@>=0.8.1, pdfkit@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/pdfkit/-/pdfkit-0.10.0.tgz#88f2aa8e3cf9e1cc2caff6447b68dd4e435cb284"
integrity sha512-mRJ6iuDzpIQ4ftKp5GvijLXNVRK86xjnyIPBraYSPrUPubNqWM5/oYmc7FZKUWz3wusRTj3PLR9HJ1X5ooqfsg==
@@ -21603,14 +21657,15 @@ pdfkit@^0.10.0:
linebreak "^0.3.0"
png-js ">=0.1.0"
-pdfmake@0.1.57:
- version "0.1.57"
- resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.1.57.tgz#408e9853777fb851eeb700aaa221905e135917a0"
- integrity sha512-s6Bs71Ylh06yNgJfP61xicHZSEvFrwo8lvI/BOU4+6eDddO8lwOZi5A42RA0V8zQr6hrI1XYxtLkk/7oJ+5w+w==
+pdfmake@^0.1.60:
+ version "0.1.60"
+ resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.1.60.tgz#d6067e30651a70c9095c37c504eae2137a675d28"
+ integrity sha512-vu+d9xaspGfMB0cNfH+CSet3q+Ip7/CRsx1LJLv2ToMduSTzqE4oTxjZQkPLB9LOL+36zT1SvbNvs0qoxusz1A==
dependencies:
- iconv-lite "^0.4.24"
- linebreak "^0.3.0"
+ iconv-lite "^0.5.0"
+ linebreak "^1.0.2"
pdfkit "^0.10.0"
+ svg-to-pdfkit "^0.1.7"
pegjs@0.10.0:
version "0.10.0"
@@ -23283,10 +23338,10 @@ react-resize-detector@^4.0.5, react-resize-detector@^4.2.0:
raf-schd "^4.0.0"
resize-observer-polyfill "^1.5.1"
-react-reverse-portal@^1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/react-reverse-portal/-/react-reverse-portal-1.0.3.tgz#38cd2d40f40862352dd63905f9b923f9c41f474b"
- integrity sha512-mCtpp3BzPedmGTAMqT2v5U1hwnAvRfSqMusriON/GxnedT9gvNNTvai24NnrfKfQ78zqPo4e3N5nWPLpY7bORQ==
+react-reverse-portal@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/react-reverse-portal/-/react-reverse-portal-1.0.4.tgz#d127d2c9147549b25c4959aba1802eca4b144cd4"
+ integrity sha512-WESex/wSjxHwdG7M0uwPNkdQXaLauXNHi4INQiRybmFIXVzAqgf/Ak2OzJ4MLf4UuCD/IzEwJOkML2SxnnontA==
react-router-dom@4.2.2:
version "4.2.2"
@@ -23677,7 +23732,7 @@ read-pkg@^5.1.1, read-pkg@^5.2.0:
parse-json "^5.0.0"
type-fest "^0.6.0"
-"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6:
+"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.3, readable-stream@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
@@ -25081,6 +25136,18 @@ schema-utils@^2.4.1:
ajv "^6.10.2"
ajv-keywords "^3.4.1"
+scope-analyzer@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/scope-analyzer/-/scope-analyzer-2.0.5.tgz#72c9c6770c3e66984f84c7d3c7045998a1a7db8a"
+ integrity sha512-+U5H0417mnTEstCD5VwOYO7V4vYuSqwqjFap40ythe67bhMFL5C3UgPwyBv7KDJsqUBIKafOD57xMlh1rN7eaw==
+ dependencies:
+ array-from "^2.1.1"
+ es6-map "^0.1.5"
+ es6-set "^0.1.5"
+ es6-symbol "^3.1.1"
+ estree-is-function "^1.0.0"
+ get-assigned-identifiers "^1.1.0"
+
scoped-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8"
@@ -25328,20 +25395,10 @@ set-immediate-shim@^1.0.0, set-immediate-shim@~1.0.1:
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=
-set-value@^0.4.3:
- version "0.4.3"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
- integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE=
- dependencies:
- extend-shallow "^2.0.1"
- is-extendable "^0.1.1"
- is-plain-object "^2.0.1"
- to-object-path "^0.3.0"
-
-set-value@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
- integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
dependencies:
extend-shallow "^2.0.1"
is-extendable "^0.1.1"
@@ -25427,11 +25484,23 @@ shebang-command@^1.2.0:
dependencies:
shebang-regex "^1.0.0"
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
+ dependencies:
+ shebang-regex "^3.0.0"
+
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+
shell-quote@1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
@@ -26066,6 +26135,13 @@ statehood@6.x.x:
iron "5.x.x"
joi "13.x.x"
+static-eval@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42"
+ integrity sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==
+ dependencies:
+ escodegen "^1.8.1"
+
static-eval@~0.2.0:
version "0.2.4"
resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-0.2.4.tgz#b7d34d838937b969f9641ca07d48f8ede263ea7b"
@@ -26098,6 +26174,26 @@ static-module@^1.1.0:
static-eval "~0.2.0"
through2 "~0.4.1"
+static-module@^3.0.2:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/static-module/-/static-module-3.0.3.tgz#cc2301ed3fe353e2d2a2195137013853676f9960"
+ integrity sha512-RDaMYaI5o/ym0GkCqL/PlD1Pn216omp8fY81okxZ6f6JQxWW5tptOw9reXoZX85yt/scYvbWIt6uoszeyf+/MQ==
+ dependencies:
+ acorn-node "^1.3.0"
+ concat-stream "~1.6.0"
+ convert-source-map "^1.5.1"
+ duplexer2 "~0.1.4"
+ escodegen "~1.9.0"
+ has "^1.0.1"
+ magic-string "^0.22.4"
+ merge-source-map "1.0.4"
+ object-inspect "~1.4.0"
+ readable-stream "~2.3.3"
+ scope-analyzer "^2.0.1"
+ shallow-copy "~0.0.1"
+ static-eval "^2.0.2"
+ through2 "~2.0.3"
+
stats-lite@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/stats-lite/-/stats-lite-2.2.0.tgz#278a5571fa1d2e8b1691295dccc0235282393bbf"
@@ -26687,6 +26783,13 @@ sver-compat@^1.5.0:
es6-iterator "^2.0.1"
es6-symbol "^3.1.1"
+svg-to-pdfkit@^0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/svg-to-pdfkit/-/svg-to-pdfkit-0.1.7.tgz#7db6d47e47b3888dce18060751a8de2417f85775"
+ integrity sha1-fbbUfkeziI3OGAYHUajeJBf4V3U=
+ dependencies:
+ pdfkit ">=0.8.1"
+
svgo@^0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
@@ -27149,6 +27252,14 @@ through2@~0.4.1:
readable-stream "~1.0.17"
xtend "~2.1.1"
+through2@~2.0.3:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
+ integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
+ dependencies:
+ readable-stream "~2.3.6"
+ xtend "~4.0.1"
+
through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3.4, through@~2.3.6, through@~2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
@@ -28336,6 +28447,14 @@ unicode-trie@^0.3.0:
pako "^0.2.5"
tiny-inflate "^1.0.0"
+unicode-trie@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-1.0.0.tgz#f649afdca127135edb55ca0ad7c8c60656d92ad1"
+ integrity sha512-v5raLKsobbFbWLMoX9+bChts/VhPPj3XpkNr/HbqkirXR1DPk8eo9IYKyvk0MQZFkaoRsFj2Rmaqgi2rfAZYtA==
+ dependencies:
+ pako "^0.2.5"
+ tiny-inflate "^1.0.0"
+
unified@^6.1.5:
version "6.1.6"
resolved "https://registry.yarnpkg.com/unified/-/unified-6.1.6.tgz#5ea7f807a0898f1f8acdeefe5f25faa010cc42b1"
@@ -28369,14 +28488,14 @@ union-find@^1.0.0:
integrity sha1-KSusQV5q06iVNdI3AQ20pTYoTlg=
union-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
- integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
dependencies:
arr-union "^3.1.0"
get-value "^2.0.6"
is-extendable "^0.1.1"
- set-value "^0.4.3"
+ set-value "^2.0.1"
uniq@^1.0.1:
version "1.0.1"
@@ -29384,6 +29503,11 @@ vision@^5.3.3:
items "2.x.x"
joi "13.x.x"
+vlq@^0.2.2:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
+ integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==
+
vm-browserify@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
@@ -29879,6 +30003,13 @@ which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.8, which@^1.3.0:
dependencies:
isexe "^2.0.0"
+which@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.1.tgz#f1cf94d07a8e571b6ff006aeb91d0300c47ef0a4"
+ integrity sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==
+ dependencies:
+ isexe "^2.0.0"
+
wide-align@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@@ -30307,6 +30438,11 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
+xtend@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
+ integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
+
xtend@~2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"